Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / libs / n2sram / mp / n2_irf_mp_128x72_cust_l / n2_irf_mp_128x72_cust / rtl / n2_irf_mp_128x72_cust.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: n2_irf_mp_128x72_cust.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35module n2_irf_mp_128x72_cust (
36 l2clk,
37 scan_in,
38 tcu_pce_ov,
39 tcu_aclk,
40 tcu_bclk,
41 tcu_array_wr_inhibit,
42 tcu_scan_en,
43 tcu_se_scancollar_in,
44 clken,
45 rd_tid,
46 rd_addr_p0,
47 rd_addr_p1,
48 rd_addr_p2,
49 rd_en_p0,
50 rd_en_p1,
51 rd_en_p2,
52 wr_en_p0,
53 wr_en_p1,
54 wr_tid_p0,
55 wr_tid_p1,
56 wr_addr_p0,
57 wr_addr_p1,
58 wr_data_p0,
59 wr_data_p1,
60 save_tid,
61 save_local_addr,
62 save_even_addr,
63 save_odd_addr,
64 save_even_en,
65 save_odd_en,
66 save_local_en,
67 restore_tid,
68 restore_local_addr,
69 restore_even_addr,
70 restore_odd_addr,
71 restore_even_en,
72 restore_odd_en,
73 restore_local_en,
74 save_global_en,
75 save_global_tid,
76 save_global_addr,
77 restore_global_en,
78 restore_global_tid,
79 restore_global_addr,
80 dout_p0,
81 dout_p1,
82 dout_p2,
83 scan_out);
84wire siclk;
85wire soclk;
86wire l1clk_sci;
87wire [35:0] i_wr_data_1st_p0_ff_scanin;
88wire [35:0] i_wr_data_1st_p0_ff_scanout;
89wire [71:0] wr_data_p0_ff;
90wire [35:0] i_wr_data_1st_p1_ff_scanin;
91wire [35:0] i_wr_data_1st_p1_ff_scanout;
92wire [71:0] wr_data_p1_ff;
93wire [19:0] i_rd_control_ff_scanin;
94wire [19:0] i_rd_control_ff_scanout;
95wire l1clk_free;
96wire rd_en_p0_ff;
97wire rd_en_p1_ff;
98wire rd_en_p2_ff;
99wire [4:0] rd_addr_p0_ff;
100wire [4:0] rd_addr_p1_ff;
101wire [4:0] rd_addr_p2_ff;
102wire [1:0] rd_tid_ff;
103wire [19:0] rd_control_l1_l_unused;
104wire [19:0] rd_control_ff_l_unused;
105wire [19:0] rd_control_ff_unused;
106wire [15:0] i_wr_control_ff_scanin;
107wire [15:0] i_wr_control_ff_scanout;
108wire [4:0] wr_addr_p1_ff;
109wire [1:0] wr_tid_p1_ff;
110wire wr_en_p1_ff;
111wire [4:0] wr_addr_p0_ff;
112wire [1:0] wr_tid_p0_ff;
113wire wr_en_p0_ff;
114wire [16:0] i_restore_ff_scanin;
115wire [16:0] i_restore_ff_scanout;
116wire [1:0] restore_even_addr_ff;
117wire [2:0] restore_local_addr_ff;
118wire [1:0] restore_odd_addr_ff;
119wire [1:0] restore_global_addr_ff;
120wire restore_even_en_ff;
121wire restore_odd_en_ff;
122wire restore_local_en_ff;
123wire restore_global_en_ff;
124wire [1:0] restore_tid_ff;
125wire [1:0] restore_global_tid_ff;
126wire [16:0] i_save_ff_scanin;
127wire [16:0] i_save_ff_scanout;
128wire [1:0] save_even_addr_ff;
129wire [2:0] save_local_addr_ff;
130wire [1:0] save_odd_addr_ff;
131wire [1:0] save_global_addr_ff;
132wire save_even_en_ff;
133wire save_odd_en_ff;
134wire save_local_en_ff;
135wire save_global_en_ff;
136wire [1:0] save_tid_ff;
137wire [1:0] save_global_tid_ff;
138wire [35:0] i_wr_data_2nd_p0_ff_scanin;
139wire [35:0] i_wr_data_2nd_p0_ff_scanout;
140wire [35:0] i_wr_data_2nd_p1_ff_scanin;
141wire [35:0] i_wr_data_2nd_p1_ff_scanout;
142
143
144input l2clk;
145input scan_in;
146input tcu_pce_ov;
147input tcu_aclk;
148input tcu_bclk;
149input tcu_array_wr_inhibit;
150input tcu_scan_en;
151input tcu_se_scancollar_in;
152
153
154// *** Power Management ***
155input clken;
156
157// *** Reading controls ***
158input [1:0] rd_tid;
159input [4:0] rd_addr_p0;
160input [4:0] rd_addr_p1;
161input [4:0] rd_addr_p2;
162input rd_en_p0;
163input rd_en_p1;
164input rd_en_p2;
165
166// *** Writing controls ***
167input wr_en_p0;
168input wr_en_p1;
169input [1:0] wr_tid_p0;
170input [1:0] wr_tid_p1;
171input [4:0] wr_addr_p0;
172input [4:0] wr_addr_p1;
173
174// *** Write data ports ***
175input [71:0] wr_data_p0;
176input [71:0] wr_data_p1;
177
178// *** Window swapping controls ***
179input [1:0] save_tid;
180input [2:0] save_local_addr;
181input [1:0] save_even_addr;
182input [1:0] save_odd_addr;
183input save_even_en;
184input save_odd_en;
185input save_local_en;
186
187input [1:0] restore_tid;
188input [2:0] restore_local_addr;
189input [1:0] restore_even_addr;
190input [1:0] restore_odd_addr;
191input restore_even_en;
192input restore_odd_en;
193input restore_local_en;
194
195input save_global_en;
196input [1:0] save_global_tid;
197input [1:0] save_global_addr;
198
199input restore_global_en;
200input [1:0] restore_global_tid;
201input [1:0] restore_global_addr;
202
203
204
205output [71:0] dout_p0; // RS1 operand : [71:64] contains 8-bit ECC, [63:0] contains 64-bit data
206output [71:0] dout_p1; // RS2 operand : [71:64] contains 8-bit ECC, [63:0] contains 64-bit data
207output [71:0] dout_p2; // RS3 operand : [71:64] contains 8-bit ECC, [63:0] contains 64-bit data
208
209output scan_out;
210
211`ifndef FPGA
212// JDL
213// synopsys translate_off
214`endif
215
216
217assign siclk = tcu_aclk;
218assign soclk = tcu_bclk;
219
220
221// 0in custom -fire (wr_en_p0 & wr_en_p1 & (wr_tid_p0[1:0] == wr_tid_p1[1:0])) -message "IRF p0 & p1 ports wrote to same TID"
222
223// 0in custom -fire (save_even_en & restore_even_en & (save_tid[1:0] == restore_tid[1:0])) -message "IRF Save and Restore EVEN to same TID"
224// 0in custom -fire (save_odd_en & restore_odd_en & (save_tid[1:0] == restore_tid[1:0])) -message "IRF Save and Restore ODD to same TID"
225// 0in custom -fire (save_local_en & restore_local_en & (save_tid[1:0] == restore_tid[1:0])) -message "IRF Save and Restore LOCAL to same TID"
226// 0in custom -fire (save_global_en & restore_global_en & (save_global_tid[1:0] == restore_global_tid[1:0])) -message "IRF Save and Restore GLOBAL to same TID"
227
228
229
230
231n2_irf_mp_128x72_cust_l1clkhdr_ctl_macro clkgen_sci (
232 .l2clk (l2clk ),
233 .l1en (clken ),
234 .pce_ov (tcu_pce_ov ),
235 .stop (1'b0 ),
236 .se (tcu_se_scancollar_in ),
237 .l1clk (l1clk_sci ));
238
239
240
241n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_36 i_wr_data_1st_p0_ff (
242 .scan_in(i_wr_data_1st_p0_ff_scanin[35:0]),
243 .scan_out(i_wr_data_1st_p0_ff_scanout[35:0]),
244 .l1clk ( l1clk_sci ),
245 .din ( wr_data_p0[35:0] ),
246 .dout ( wr_data_p0_ff[35:0] ),
247 .siclk(siclk),
248 .soclk(soclk));
249
250
251n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_36 i_wr_data_1st_p1_ff (
252 .scan_in(i_wr_data_1st_p1_ff_scanin[35:0]),
253 .scan_out(i_wr_data_1st_p1_ff_scanout[35:0]),
254 .l1clk ( l1clk_sci ),
255 .din ( wr_data_p1[35:0] ),
256 .dout ( wr_data_p1_ff[35:0] ),
257 .siclk(siclk),
258 .soclk(soclk));
259
260
261
262n2_irf_mp_128x72_cust_sram_msff_mo_macro__fs_1__width_20 i_rd_control_ff (
263 .scan_in(i_rd_control_ff_scanin[19:0]),
264 .scan_out(i_rd_control_ff_scanout[19:0]),
265 .l1clk ( l1clk_sci ),
266 .and_clk( l1clk_free ),
267 .d ({rd_en_p0 ,
268 rd_en_p1 ,
269 rd_en_p2 ,
270 rd_addr_p0[4:0] ,
271 rd_addr_p1[4:0] ,
272 rd_addr_p2[4:0] ,
273 rd_tid[1:0]} ),
274 .mq ({rd_en_p0_ff ,
275 rd_en_p1_ff ,
276 rd_en_p2_ff ,
277 rd_addr_p0_ff[4:0] ,
278 rd_addr_p1_ff[4:0] ,
279 rd_addr_p2_ff[4:0] ,
280 rd_tid_ff[1:0]} ),
281 .mq_l ( rd_control_l1_l_unused[19:0]),
282 .q_l ( rd_control_ff_l_unused[19:0]),
283 .q ( rd_control_ff_unused[19:0] ),
284 .siclk(siclk),
285 .soclk(soclk));
286
287
288
289n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_16 i_wr_control_ff (
290 .scan_in(i_wr_control_ff_scanin[15:0]),
291 .scan_out(i_wr_control_ff_scanout[15:0]),
292 .l1clk ( l1clk_sci ),
293 .din ({wr_addr_p1[4:0] ,
294 wr_tid_p1[1:0] ,
295 wr_en_p1 ,
296 wr_addr_p0[4:0] ,
297 wr_tid_p0[1:0] ,
298 wr_en_p0 }),
299 .dout ({wr_addr_p1_ff[4:0] ,
300 wr_tid_p1_ff[1:0] ,
301 wr_en_p1_ff ,
302 wr_addr_p0_ff[4:0] ,
303 wr_tid_p0_ff[1:0] ,
304 wr_en_p0_ff }),
305 .siclk(siclk),
306 .soclk(soclk));
307
308
309
310n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_17 i_restore_ff (
311 .scan_in(i_restore_ff_scanin[16:0]),
312 .scan_out(i_restore_ff_scanout[16:0]),
313 .l1clk ( l1clk_sci ),
314 .din ({restore_even_addr[1:0] ,
315 restore_local_addr[2:0] ,
316 restore_odd_addr[1:0] ,
317 restore_global_addr[1:0] ,
318 restore_even_en ,
319 restore_odd_en ,
320 restore_local_en ,
321 restore_global_en ,
322 restore_tid[1:0] ,
323 restore_global_tid[1:0] }),
324 .dout ({restore_even_addr_ff[1:0] ,
325 restore_local_addr_ff[2:0] ,
326 restore_odd_addr_ff[1:0] ,
327 restore_global_addr_ff[1:0] ,
328 restore_even_en_ff ,
329 restore_odd_en_ff ,
330 restore_local_en_ff ,
331 restore_global_en_ff ,
332 restore_tid_ff[1:0] ,
333 restore_global_tid_ff[1:0] }),
334 .siclk(siclk),
335 .soclk(soclk));
336
337
338
339
340n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_17 i_save_ff (
341 .scan_in(i_save_ff_scanin[16:0]),
342 .scan_out(i_save_ff_scanout[16:0]),
343 .l1clk ( l1clk_sci ),
344 .din ({save_even_addr[1:0] ,
345 save_local_addr[2:0] ,
346 save_odd_addr[1:0] ,
347 save_global_addr[1:0] ,
348 save_even_en ,
349 save_odd_en ,
350 save_local_en ,
351 save_global_en ,
352 save_tid[1:0] ,
353 save_global_tid[1:0] }),
354 .dout ({save_even_addr_ff[1:0] ,
355 save_local_addr_ff[2:0] ,
356 save_odd_addr_ff[1:0] ,
357 save_global_addr_ff[1:0] ,
358 save_even_en_ff ,
359 save_odd_en_ff ,
360 save_local_en_ff ,
361 save_global_en_ff ,
362 save_tid_ff[1:0] ,
363 save_global_tid_ff[1:0] }),
364 .siclk(siclk),
365 .soclk(soclk));
366
367
368
369n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_36 i_wr_data_2nd_p0_ff (
370 .scan_in(i_wr_data_2nd_p0_ff_scanin[35:0]),
371 .scan_out(i_wr_data_2nd_p0_ff_scanout[35:0]),
372 .l1clk ( l1clk_sci ),
373 .din ( wr_data_p0[71:36] ),
374 .dout ( wr_data_p0_ff[71:36] ),
375 .siclk(siclk),
376 .soclk(soclk));
377
378
379
380n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_36 i_wr_data_2nd_p1_ff (
381 .scan_in(i_wr_data_2nd_p1_ff_scanin[35:0]),
382 .scan_out(i_wr_data_2nd_p1_ff_scanout[35:0]),
383 .l1clk ( l1clk_sci ),
384 .din ( wr_data_p1[71:36] ),
385 .dout ( wr_data_p1_ff[71:36] ),
386 .siclk(siclk),
387 .soclk(soclk));
388
389
390
391
392n2_irf_mp_128x72_cust_l1clkhdr_ctl_macro clkgen_free (
393 .l2clk (l2clk ),
394 .l1en (clken ),
395 .pce_ov (tcu_pce_ov ),
396 .stop (1'b0 ),
397 .se (tcu_scan_en ),
398 .l1clk (l1clk_free ));
399
400
401exu_irf_array irf_array (
402 .clk ( l1clk_free ),
403 .a_rd_en_p0 ( rd_en_p0_ff ),
404 .a_rd_en_p1 ( rd_en_p1_ff ),
405 .a_rd_en_p2 ( rd_en_p2_ff ),
406 .a_rd_tid ( rd_tid_ff[1:0] ),
407 .a_rd_addr_p0 ( rd_addr_p0_ff[4:0] ),
408 .a_rd_addr_p1 ( rd_addr_p1_ff[4:0] ),
409 .a_rd_addr_p2 ( rd_addr_p2_ff[4:0] ),
410
411 .a_wr_en_p0 ( wr_en_p0_ff ),
412 .a_wr_tid_p0 ( wr_tid_p0_ff[1:0] ),
413 .a_wr_addr_p0 ( wr_addr_p0_ff[4:0] ),
414 .a_wr_data_p0 ( wr_data_p0_ff[71:0] ),
415 .a_wr_en_p1 ( wr_en_p1_ff ),
416 .a_wr_tid_p1 ( wr_tid_p1_ff[1:0] ),
417 .a_wr_addr_p1 ( wr_addr_p1_ff[4:0] ),
418 .a_wr_data_p1 ( wr_data_p1_ff[71:0] ),
419
420 .a_save_tid ( save_tid_ff[1:0] ),
421 .a_save_global_tid ( save_global_tid_ff[1:0] ),
422 .a_save_global_addr ( save_global_addr_ff[1:0] ),
423 .a_save_even_addr ( save_even_addr_ff[1:0] ),
424 .a_save_odd_addr ( save_odd_addr_ff[1:0] ),
425 .a_save_local_addr ( save_local_addr_ff[2:0] ),
426 .a_save_global_en ( save_global_en_ff ),
427 .a_save_even_en ( save_even_en_ff ),
428 .a_save_local_en ( save_local_en_ff ),
429 .a_save_odd_en ( save_odd_en_ff ),
430
431 .a_restore_tid ( restore_tid_ff[1:0] ),
432 .a_restore_global_tid ( restore_global_tid_ff[1:0] ),
433 .a_restore_global_addr( restore_global_addr_ff[1:0] ),
434 .a_restore_even_addr ( restore_even_addr_ff[1:0] ),
435 .a_restore_odd_addr ( restore_odd_addr_ff[1:0] ),
436 .a_restore_local_addr ( restore_local_addr_ff[2:0] ),
437 .a_restore_global_en ( restore_global_en_ff ),
438 .a_restore_even_en ( restore_even_en_ff ),
439 .a_restore_local_en ( restore_local_en_ff ),
440 .a_restore_odd_en ( restore_odd_en_ff ),
441
442 .a_rd_data_p0 ( dout_p0[71:0] ),
443 .a_rd_data_p1 ( dout_p1[71:0] ),
444 .a_rd_data_p2 ( dout_p2[71:0] ),
445 .tcu_array_wr_inhibit(tcu_array_wr_inhibit));
446
447
448
449supply0 vss;
450supply1 vdd;
451
452
453// scanorder start
454// i_wr_data_1st_p0_ff_scanin[0]
455// i_wr_data_1st_p1_ff_scanin[0]
456// i_wr_data_1st_p0_ff_scanin[1]
457// i_wr_data_1st_p1_ff_scanin[1]
458// i_wr_data_1st_p0_ff_scanin[2]
459// i_wr_data_1st_p1_ff_scanin[2]
460// i_wr_data_1st_p0_ff_scanin[3]
461// i_wr_data_1st_p1_ff_scanin[3]
462// i_wr_data_1st_p0_ff_scanin[4]
463// i_wr_data_1st_p1_ff_scanin[4]
464// i_wr_data_1st_p0_ff_scanin[5]
465// i_wr_data_1st_p1_ff_scanin[5]
466// i_wr_data_1st_p0_ff_scanin[6]
467// i_wr_data_1st_p1_ff_scanin[6]
468// i_wr_data_1st_p0_ff_scanin[7]
469// i_wr_data_1st_p1_ff_scanin[7]
470// i_wr_data_1st_p0_ff_scanin[8]
471// i_wr_data_1st_p1_ff_scanin[8]
472// i_wr_data_1st_p0_ff_scanin[9]
473// i_wr_data_1st_p1_ff_scanin[9]
474// i_wr_data_1st_p0_ff_scanin[10]
475// i_wr_data_1st_p1_ff_scanin[10]
476// i_wr_data_1st_p0_ff_scanin[11]
477// i_wr_data_1st_p1_ff_scanin[11]
478// i_wr_data_1st_p0_ff_scanin[12]
479// i_wr_data_1st_p1_ff_scanin[12]
480// i_wr_data_1st_p0_ff_scanin[13]
481// i_wr_data_1st_p1_ff_scanin[13]
482// i_wr_data_1st_p0_ff_scanin[14]
483// i_wr_data_1st_p1_ff_scanin[14]
484// i_wr_data_1st_p0_ff_scanin[15]
485// i_wr_data_1st_p1_ff_scanin[15]
486// i_wr_data_1st_p0_ff_scanin[16]
487// i_wr_data_1st_p1_ff_scanin[16]
488// i_wr_data_1st_p0_ff_scanin[17]
489// i_wr_data_1st_p1_ff_scanin[17]
490// i_wr_data_1st_p0_ff_scanin[18]
491// i_wr_data_1st_p1_ff_scanin[18]
492// i_wr_data_1st_p0_ff_scanin[19]
493// i_wr_data_1st_p1_ff_scanin[19]
494// i_wr_data_1st_p0_ff_scanin[20]
495// i_wr_data_1st_p1_ff_scanin[20]
496// i_wr_data_1st_p0_ff_scanin[21]
497// i_wr_data_1st_p1_ff_scanin[21]
498// i_wr_data_1st_p0_ff_scanin[22]
499// i_wr_data_1st_p1_ff_scanin[22]
500// i_wr_data_1st_p0_ff_scanin[23]
501// i_wr_data_1st_p1_ff_scanin[23]
502// i_wr_data_1st_p0_ff_scanin[24]
503// i_wr_data_1st_p1_ff_scanin[24]
504// i_wr_data_1st_p0_ff_scanin[25]
505// i_wr_data_1st_p1_ff_scanin[25]
506// i_wr_data_1st_p0_ff_scanin[26]
507// i_wr_data_1st_p1_ff_scanin[26]
508// i_wr_data_1st_p0_ff_scanin[27]
509// i_wr_data_1st_p1_ff_scanin[27]
510// i_wr_data_1st_p0_ff_scanin[28]
511// i_wr_data_1st_p1_ff_scanin[28]
512// i_wr_data_1st_p0_ff_scanin[29]
513// i_wr_data_1st_p1_ff_scanin[29]
514// i_wr_data_1st_p0_ff_scanin[30]
515// i_wr_data_1st_p1_ff_scanin[30]
516// i_wr_data_1st_p0_ff_scanin[31]
517// i_wr_data_1st_p1_ff_scanin[31]
518// i_wr_data_1st_p0_ff_scanin[32]
519// i_wr_data_1st_p1_ff_scanin[32]
520// i_wr_data_1st_p0_ff_scanin[33]
521// i_wr_data_1st_p1_ff_scanin[33]
522// i_wr_data_1st_p0_ff_scanin[34]
523// i_wr_data_1st_p1_ff_scanin[34]
524// i_wr_data_1st_p0_ff_scanin[35]
525// i_wr_data_1st_p1_ff_scanin[35]
526
527// i_rd_control_ff_scanin[1]
528// i_rd_control_ff_scanin[0]
529// i_rd_control_ff_scanin[6]
530// i_rd_control_ff_scanin[5]
531// i_rd_control_ff_scanin[4]
532// i_rd_control_ff_scanin[3]
533// i_rd_control_ff_scanin[2]
534// i_rd_control_ff_scanin[17]
535// i_rd_control_ff_scanin[7]
536// i_rd_control_ff_scanin[8]
537// i_rd_control_ff_scanin[9]
538// i_rd_control_ff_scanin[10]
539// i_rd_control_ff_scanin[11]
540// i_rd_control_ff_scanin[18]
541// i_rd_control_ff_scanin[12]
542// i_rd_control_ff_scanin[13]
543// i_rd_control_ff_scanin[14]
544// i_rd_control_ff_scanin[15]
545// i_rd_control_ff_scanin[16]
546// i_rd_control_ff_scanin[19]
547
548// i_wr_control_ff_scanin[0]
549// i_wr_control_ff_scanin[1]
550// i_wr_control_ff_scanin[2]
551// i_wr_control_ff_scanin[8]
552// i_wr_control_ff_scanin[9]
553// i_wr_control_ff_scanin[10]
554// i_wr_control_ff_scanin[3]
555// i_wr_control_ff_scanin[4]
556// i_wr_control_ff_scanin[5]
557// i_wr_control_ff_scanin[6]
558// i_wr_control_ff_scanin[7]
559// i_wr_control_ff_scanin[11]
560// i_wr_control_ff_scanin[12]
561// i_wr_control_ff_scanin[13]
562// i_wr_control_ff_scanin[14]
563// i_wr_control_ff_scanin[15]
564
565
566// i_restore_ff_scanin[1]
567// i_restore_ff_scanin[0]
568// i_restore_ff_scanin[2]
569// i_restore_ff_scanin[3]
570// i_restore_ff_scanin[4]
571// i_restore_ff_scanin[6]
572// i_restore_ff_scanin[5]
573// i_restore_ff_scanin[11]
574// i_restore_ff_scanin[10]
575// i_restore_ff_scanin[9]
576// i_restore_ff_scanin[8]
577// i_restore_ff_scanin[7]
578// i_restore_ff_scanin[12]
579// i_restore_ff_scanin[13]
580// i_restore_ff_scanin[14]
581// i_restore_ff_scanin[15]
582// i_restore_ff_scanin[16]
583
584// i_save_ff_scanin[1]
585// i_save_ff_scanin[0]
586// i_save_ff_scanin[2]
587// i_save_ff_scanin[3]
588// i_save_ff_scanin[4]
589// i_save_ff_scanin[6]
590// i_save_ff_scanin[5]
591// i_save_ff_scanin[11]
592// i_save_ff_scanin[10]
593// i_save_ff_scanin[9]
594// i_save_ff_scanin[8]
595// i_save_ff_scanin[7]
596// i_save_ff_scanin[12]
597// i_save_ff_scanin[13]
598// i_save_ff_scanin[14]
599// i_save_ff_scanin[15]
600// i_save_ff_scanin[16]
601
602
603// i_wr_data_2nd_p0_ff_scanin[0]
604// i_wr_data_2nd_p1_ff_scanin[0]
605// i_wr_data_2nd_p0_ff_scanin[1]
606// i_wr_data_2nd_p1_ff_scanin[1]
607// i_wr_data_2nd_p0_ff_scanin[2]
608// i_wr_data_2nd_p1_ff_scanin[2]
609// i_wr_data_2nd_p0_ff_scanin[3]
610// i_wr_data_2nd_p1_ff_scanin[3]
611// i_wr_data_2nd_p0_ff_scanin[4]
612// i_wr_data_2nd_p1_ff_scanin[4]
613// i_wr_data_2nd_p0_ff_scanin[5]
614// i_wr_data_2nd_p1_ff_scanin[5]
615// i_wr_data_2nd_p0_ff_scanin[6]
616// i_wr_data_2nd_p1_ff_scanin[6]
617// i_wr_data_2nd_p0_ff_scanin[7]
618// i_wr_data_2nd_p1_ff_scanin[7]
619// i_wr_data_2nd_p0_ff_scanin[8]
620// i_wr_data_2nd_p1_ff_scanin[8]
621// i_wr_data_2nd_p0_ff_scanin[9]
622// i_wr_data_2nd_p1_ff_scanin[9]
623// i_wr_data_2nd_p0_ff_scanin[10]
624// i_wr_data_2nd_p1_ff_scanin[10]
625// i_wr_data_2nd_p0_ff_scanin[11]
626// i_wr_data_2nd_p1_ff_scanin[11]
627// i_wr_data_2nd_p0_ff_scanin[12]
628// i_wr_data_2nd_p1_ff_scanin[12]
629// i_wr_data_2nd_p0_ff_scanin[13]
630// i_wr_data_2nd_p1_ff_scanin[13]
631// i_wr_data_2nd_p0_ff_scanin[14]
632// i_wr_data_2nd_p1_ff_scanin[14]
633// i_wr_data_2nd_p0_ff_scanin[15]
634// i_wr_data_2nd_p1_ff_scanin[15]
635// i_wr_data_2nd_p0_ff_scanin[16]
636// i_wr_data_2nd_p1_ff_scanin[16]
637// i_wr_data_2nd_p0_ff_scanin[17]
638// i_wr_data_2nd_p1_ff_scanin[17]
639// i_wr_data_2nd_p0_ff_scanin[18]
640// i_wr_data_2nd_p1_ff_scanin[18]
641// i_wr_data_2nd_p0_ff_scanin[19]
642// i_wr_data_2nd_p1_ff_scanin[19]
643// i_wr_data_2nd_p0_ff_scanin[20]
644// i_wr_data_2nd_p1_ff_scanin[20]
645// i_wr_data_2nd_p0_ff_scanin[21]
646// i_wr_data_2nd_p1_ff_scanin[21]
647// i_wr_data_2nd_p0_ff_scanin[22]
648// i_wr_data_2nd_p1_ff_scanin[22]
649// i_wr_data_2nd_p0_ff_scanin[23]
650// i_wr_data_2nd_p1_ff_scanin[23]
651// i_wr_data_2nd_p0_ff_scanin[24]
652// i_wr_data_2nd_p1_ff_scanin[24]
653// i_wr_data_2nd_p0_ff_scanin[25]
654// i_wr_data_2nd_p1_ff_scanin[25]
655// i_wr_data_2nd_p0_ff_scanin[26]
656// i_wr_data_2nd_p1_ff_scanin[26]
657// i_wr_data_2nd_p0_ff_scanin[27]
658// i_wr_data_2nd_p1_ff_scanin[27]
659// i_wr_data_2nd_p0_ff_scanin[28]
660// i_wr_data_2nd_p1_ff_scanin[28]
661// i_wr_data_2nd_p0_ff_scanin[29]
662// i_wr_data_2nd_p1_ff_scanin[29]
663// i_wr_data_2nd_p0_ff_scanin[30]
664// i_wr_data_2nd_p1_ff_scanin[30]
665// i_wr_data_2nd_p0_ff_scanin[31]
666// i_wr_data_2nd_p1_ff_scanin[31]
667// i_wr_data_2nd_p0_ff_scanin[32]
668// i_wr_data_2nd_p1_ff_scanin[32]
669// i_wr_data_2nd_p0_ff_scanin[33]
670// i_wr_data_2nd_p1_ff_scanin[33]
671// i_wr_data_2nd_p0_ff_scanin[34]
672// i_wr_data_2nd_p1_ff_scanin[34]
673// i_wr_data_2nd_p0_ff_scanin[35]
674// i_wr_data_2nd_p1_ff_scanin[35]
675
676// scanorder end
677// fixscan start
678assign i_wr_data_1st_p0_ff_scanin[0]=scan_in;
679assign i_wr_data_1st_p1_ff_scanin[0]=i_wr_data_1st_p0_ff_scanout[0];
680assign i_wr_data_1st_p0_ff_scanin[1]=i_wr_data_1st_p1_ff_scanout[0];
681assign i_wr_data_1st_p1_ff_scanin[1]=i_wr_data_1st_p0_ff_scanout[1];
682assign i_wr_data_1st_p0_ff_scanin[2]=i_wr_data_1st_p1_ff_scanout[1];
683assign i_wr_data_1st_p1_ff_scanin[2]=i_wr_data_1st_p0_ff_scanout[2];
684assign i_wr_data_1st_p0_ff_scanin[3]=i_wr_data_1st_p1_ff_scanout[2];
685assign i_wr_data_1st_p1_ff_scanin[3]=i_wr_data_1st_p0_ff_scanout[3];
686assign i_wr_data_1st_p0_ff_scanin[4]=i_wr_data_1st_p1_ff_scanout[3];
687assign i_wr_data_1st_p1_ff_scanin[4]=i_wr_data_1st_p0_ff_scanout[4];
688assign i_wr_data_1st_p0_ff_scanin[5]=i_wr_data_1st_p1_ff_scanout[4];
689assign i_wr_data_1st_p1_ff_scanin[5]=i_wr_data_1st_p0_ff_scanout[5];
690assign i_wr_data_1st_p0_ff_scanin[6]=i_wr_data_1st_p1_ff_scanout[5];
691assign i_wr_data_1st_p1_ff_scanin[6]=i_wr_data_1st_p0_ff_scanout[6];
692assign i_wr_data_1st_p0_ff_scanin[7]=i_wr_data_1st_p1_ff_scanout[6];
693assign i_wr_data_1st_p1_ff_scanin[7]=i_wr_data_1st_p0_ff_scanout[7];
694assign i_wr_data_1st_p0_ff_scanin[8]=i_wr_data_1st_p1_ff_scanout[7];
695assign i_wr_data_1st_p1_ff_scanin[8]=i_wr_data_1st_p0_ff_scanout[8];
696assign i_wr_data_1st_p0_ff_scanin[9]=i_wr_data_1st_p1_ff_scanout[8];
697assign i_wr_data_1st_p1_ff_scanin[9]=i_wr_data_1st_p0_ff_scanout[9];
698assign i_wr_data_1st_p0_ff_scanin[10]=i_wr_data_1st_p1_ff_scanout[9];
699assign i_wr_data_1st_p1_ff_scanin[10]=i_wr_data_1st_p0_ff_scanout[10];
700assign i_wr_data_1st_p0_ff_scanin[11]=i_wr_data_1st_p1_ff_scanout[10];
701assign i_wr_data_1st_p1_ff_scanin[11]=i_wr_data_1st_p0_ff_scanout[11];
702assign i_wr_data_1st_p0_ff_scanin[12]=i_wr_data_1st_p1_ff_scanout[11];
703assign i_wr_data_1st_p1_ff_scanin[12]=i_wr_data_1st_p0_ff_scanout[12];
704assign i_wr_data_1st_p0_ff_scanin[13]=i_wr_data_1st_p1_ff_scanout[12];
705assign i_wr_data_1st_p1_ff_scanin[13]=i_wr_data_1st_p0_ff_scanout[13];
706assign i_wr_data_1st_p0_ff_scanin[14]=i_wr_data_1st_p1_ff_scanout[13];
707assign i_wr_data_1st_p1_ff_scanin[14]=i_wr_data_1st_p0_ff_scanout[14];
708assign i_wr_data_1st_p0_ff_scanin[15]=i_wr_data_1st_p1_ff_scanout[14];
709assign i_wr_data_1st_p1_ff_scanin[15]=i_wr_data_1st_p0_ff_scanout[15];
710assign i_wr_data_1st_p0_ff_scanin[16]=i_wr_data_1st_p1_ff_scanout[15];
711assign i_wr_data_1st_p1_ff_scanin[16]=i_wr_data_1st_p0_ff_scanout[16];
712assign i_wr_data_1st_p0_ff_scanin[17]=i_wr_data_1st_p1_ff_scanout[16];
713assign i_wr_data_1st_p1_ff_scanin[17]=i_wr_data_1st_p0_ff_scanout[17];
714assign i_wr_data_1st_p0_ff_scanin[18]=i_wr_data_1st_p1_ff_scanout[17];
715assign i_wr_data_1st_p1_ff_scanin[18]=i_wr_data_1st_p0_ff_scanout[18];
716assign i_wr_data_1st_p0_ff_scanin[19]=i_wr_data_1st_p1_ff_scanout[18];
717assign i_wr_data_1st_p1_ff_scanin[19]=i_wr_data_1st_p0_ff_scanout[19];
718assign i_wr_data_1st_p0_ff_scanin[20]=i_wr_data_1st_p1_ff_scanout[19];
719assign i_wr_data_1st_p1_ff_scanin[20]=i_wr_data_1st_p0_ff_scanout[20];
720assign i_wr_data_1st_p0_ff_scanin[21]=i_wr_data_1st_p1_ff_scanout[20];
721assign i_wr_data_1st_p1_ff_scanin[21]=i_wr_data_1st_p0_ff_scanout[21];
722assign i_wr_data_1st_p0_ff_scanin[22]=i_wr_data_1st_p1_ff_scanout[21];
723assign i_wr_data_1st_p1_ff_scanin[22]=i_wr_data_1st_p0_ff_scanout[22];
724assign i_wr_data_1st_p0_ff_scanin[23]=i_wr_data_1st_p1_ff_scanout[22];
725assign i_wr_data_1st_p1_ff_scanin[23]=i_wr_data_1st_p0_ff_scanout[23];
726assign i_wr_data_1st_p0_ff_scanin[24]=i_wr_data_1st_p1_ff_scanout[23];
727assign i_wr_data_1st_p1_ff_scanin[24]=i_wr_data_1st_p0_ff_scanout[24];
728assign i_wr_data_1st_p0_ff_scanin[25]=i_wr_data_1st_p1_ff_scanout[24];
729assign i_wr_data_1st_p1_ff_scanin[25]=i_wr_data_1st_p0_ff_scanout[25];
730assign i_wr_data_1st_p0_ff_scanin[26]=i_wr_data_1st_p1_ff_scanout[25];
731assign i_wr_data_1st_p1_ff_scanin[26]=i_wr_data_1st_p0_ff_scanout[26];
732assign i_wr_data_1st_p0_ff_scanin[27]=i_wr_data_1st_p1_ff_scanout[26];
733assign i_wr_data_1st_p1_ff_scanin[27]=i_wr_data_1st_p0_ff_scanout[27];
734assign i_wr_data_1st_p0_ff_scanin[28]=i_wr_data_1st_p1_ff_scanout[27];
735assign i_wr_data_1st_p1_ff_scanin[28]=i_wr_data_1st_p0_ff_scanout[28];
736assign i_wr_data_1st_p0_ff_scanin[29]=i_wr_data_1st_p1_ff_scanout[28];
737assign i_wr_data_1st_p1_ff_scanin[29]=i_wr_data_1st_p0_ff_scanout[29];
738assign i_wr_data_1st_p0_ff_scanin[30]=i_wr_data_1st_p1_ff_scanout[29];
739assign i_wr_data_1st_p1_ff_scanin[30]=i_wr_data_1st_p0_ff_scanout[30];
740assign i_wr_data_1st_p0_ff_scanin[31]=i_wr_data_1st_p1_ff_scanout[30];
741assign i_wr_data_1st_p1_ff_scanin[31]=i_wr_data_1st_p0_ff_scanout[31];
742assign i_wr_data_1st_p0_ff_scanin[32]=i_wr_data_1st_p1_ff_scanout[31];
743assign i_wr_data_1st_p1_ff_scanin[32]=i_wr_data_1st_p0_ff_scanout[32];
744assign i_wr_data_1st_p0_ff_scanin[33]=i_wr_data_1st_p1_ff_scanout[32];
745assign i_wr_data_1st_p1_ff_scanin[33]=i_wr_data_1st_p0_ff_scanout[33];
746assign i_wr_data_1st_p0_ff_scanin[34]=i_wr_data_1st_p1_ff_scanout[33];
747assign i_wr_data_1st_p1_ff_scanin[34]=i_wr_data_1st_p0_ff_scanout[34];
748assign i_wr_data_1st_p0_ff_scanin[35]=i_wr_data_1st_p1_ff_scanout[34];
749assign i_wr_data_1st_p1_ff_scanin[35]=i_wr_data_1st_p0_ff_scanout[35];
750assign i_rd_control_ff_scanin[1]=i_wr_data_1st_p1_ff_scanout[35];
751assign i_rd_control_ff_scanin[0]=i_rd_control_ff_scanout[1];
752assign i_rd_control_ff_scanin[6]=i_rd_control_ff_scanout[0];
753assign i_rd_control_ff_scanin[5]=i_rd_control_ff_scanout[6];
754assign i_rd_control_ff_scanin[4]=i_rd_control_ff_scanout[5];
755assign i_rd_control_ff_scanin[3]=i_rd_control_ff_scanout[4];
756assign i_rd_control_ff_scanin[2]=i_rd_control_ff_scanout[3];
757assign i_rd_control_ff_scanin[17]=i_rd_control_ff_scanout[2];
758assign i_rd_control_ff_scanin[7]=i_rd_control_ff_scanout[17];
759assign i_rd_control_ff_scanin[8]=i_rd_control_ff_scanout[7];
760assign i_rd_control_ff_scanin[9]=i_rd_control_ff_scanout[8];
761assign i_rd_control_ff_scanin[10]=i_rd_control_ff_scanout[9];
762assign i_rd_control_ff_scanin[11]=i_rd_control_ff_scanout[10];
763assign i_rd_control_ff_scanin[18]=i_rd_control_ff_scanout[11];
764assign i_rd_control_ff_scanin[12]=i_rd_control_ff_scanout[18];
765assign i_rd_control_ff_scanin[13]=i_rd_control_ff_scanout[12];
766assign i_rd_control_ff_scanin[14]=i_rd_control_ff_scanout[13];
767assign i_rd_control_ff_scanin[15]=i_rd_control_ff_scanout[14];
768assign i_rd_control_ff_scanin[16]=i_rd_control_ff_scanout[15];
769assign i_rd_control_ff_scanin[19]=i_rd_control_ff_scanout[16];
770assign i_wr_control_ff_scanin[0]=i_rd_control_ff_scanout[19];
771assign i_wr_control_ff_scanin[1]=i_wr_control_ff_scanout[0];
772assign i_wr_control_ff_scanin[2]=i_wr_control_ff_scanout[1];
773assign i_wr_control_ff_scanin[8]=i_wr_control_ff_scanout[2];
774assign i_wr_control_ff_scanin[9]=i_wr_control_ff_scanout[8];
775assign i_wr_control_ff_scanin[10]=i_wr_control_ff_scanout[9];
776assign i_wr_control_ff_scanin[3]=i_wr_control_ff_scanout[10];
777assign i_wr_control_ff_scanin[4]=i_wr_control_ff_scanout[3];
778assign i_wr_control_ff_scanin[5]=i_wr_control_ff_scanout[4];
779assign i_wr_control_ff_scanin[6]=i_wr_control_ff_scanout[5];
780assign i_wr_control_ff_scanin[7]=i_wr_control_ff_scanout[6];
781assign i_wr_control_ff_scanin[11]=i_wr_control_ff_scanout[7];
782assign i_wr_control_ff_scanin[12]=i_wr_control_ff_scanout[11];
783assign i_wr_control_ff_scanin[13]=i_wr_control_ff_scanout[12];
784assign i_wr_control_ff_scanin[14]=i_wr_control_ff_scanout[13];
785assign i_wr_control_ff_scanin[15]=i_wr_control_ff_scanout[14];
786assign i_restore_ff_scanin[1]=i_wr_control_ff_scanout[15];
787assign i_restore_ff_scanin[0]=i_restore_ff_scanout[1];
788assign i_restore_ff_scanin[2]=i_restore_ff_scanout[0];
789assign i_restore_ff_scanin[3]=i_restore_ff_scanout[2];
790assign i_restore_ff_scanin[4]=i_restore_ff_scanout[3];
791assign i_restore_ff_scanin[6]=i_restore_ff_scanout[4];
792assign i_restore_ff_scanin[5]=i_restore_ff_scanout[6];
793assign i_restore_ff_scanin[11]=i_restore_ff_scanout[5];
794assign i_restore_ff_scanin[10]=i_restore_ff_scanout[11];
795assign i_restore_ff_scanin[9]=i_restore_ff_scanout[10];
796assign i_restore_ff_scanin[8]=i_restore_ff_scanout[9];
797assign i_restore_ff_scanin[7]=i_restore_ff_scanout[8];
798assign i_restore_ff_scanin[12]=i_restore_ff_scanout[7];
799assign i_restore_ff_scanin[13]=i_restore_ff_scanout[12];
800assign i_restore_ff_scanin[14]=i_restore_ff_scanout[13];
801assign i_restore_ff_scanin[15]=i_restore_ff_scanout[14];
802assign i_restore_ff_scanin[16]=i_restore_ff_scanout[15];
803assign i_save_ff_scanin[1]=i_restore_ff_scanout[16];
804assign i_save_ff_scanin[0]=i_save_ff_scanout[1];
805assign i_save_ff_scanin[2]=i_save_ff_scanout[0];
806assign i_save_ff_scanin[3]=i_save_ff_scanout[2];
807assign i_save_ff_scanin[4]=i_save_ff_scanout[3];
808assign i_save_ff_scanin[6]=i_save_ff_scanout[4];
809assign i_save_ff_scanin[5]=i_save_ff_scanout[6];
810assign i_save_ff_scanin[11]=i_save_ff_scanout[5];
811assign i_save_ff_scanin[10]=i_save_ff_scanout[11];
812assign i_save_ff_scanin[9]=i_save_ff_scanout[10];
813assign i_save_ff_scanin[8]=i_save_ff_scanout[9];
814assign i_save_ff_scanin[7]=i_save_ff_scanout[8];
815assign i_save_ff_scanin[12]=i_save_ff_scanout[7];
816assign i_save_ff_scanin[13]=i_save_ff_scanout[12];
817assign i_save_ff_scanin[14]=i_save_ff_scanout[13];
818assign i_save_ff_scanin[15]=i_save_ff_scanout[14];
819assign i_save_ff_scanin[16]=i_save_ff_scanout[15];
820assign i_wr_data_2nd_p0_ff_scanin[0]=i_save_ff_scanout[16];
821assign i_wr_data_2nd_p1_ff_scanin[0]=i_wr_data_2nd_p0_ff_scanout[0];
822assign i_wr_data_2nd_p0_ff_scanin[1]=i_wr_data_2nd_p1_ff_scanout[0];
823assign i_wr_data_2nd_p1_ff_scanin[1]=i_wr_data_2nd_p0_ff_scanout[1];
824assign i_wr_data_2nd_p0_ff_scanin[2]=i_wr_data_2nd_p1_ff_scanout[1];
825assign i_wr_data_2nd_p1_ff_scanin[2]=i_wr_data_2nd_p0_ff_scanout[2];
826assign i_wr_data_2nd_p0_ff_scanin[3]=i_wr_data_2nd_p1_ff_scanout[2];
827assign i_wr_data_2nd_p1_ff_scanin[3]=i_wr_data_2nd_p0_ff_scanout[3];
828assign i_wr_data_2nd_p0_ff_scanin[4]=i_wr_data_2nd_p1_ff_scanout[3];
829assign i_wr_data_2nd_p1_ff_scanin[4]=i_wr_data_2nd_p0_ff_scanout[4];
830assign i_wr_data_2nd_p0_ff_scanin[5]=i_wr_data_2nd_p1_ff_scanout[4];
831assign i_wr_data_2nd_p1_ff_scanin[5]=i_wr_data_2nd_p0_ff_scanout[5];
832assign i_wr_data_2nd_p0_ff_scanin[6]=i_wr_data_2nd_p1_ff_scanout[5];
833assign i_wr_data_2nd_p1_ff_scanin[6]=i_wr_data_2nd_p0_ff_scanout[6];
834assign i_wr_data_2nd_p0_ff_scanin[7]=i_wr_data_2nd_p1_ff_scanout[6];
835assign i_wr_data_2nd_p1_ff_scanin[7]=i_wr_data_2nd_p0_ff_scanout[7];
836assign i_wr_data_2nd_p0_ff_scanin[8]=i_wr_data_2nd_p1_ff_scanout[7];
837assign i_wr_data_2nd_p1_ff_scanin[8]=i_wr_data_2nd_p0_ff_scanout[8];
838assign i_wr_data_2nd_p0_ff_scanin[9]=i_wr_data_2nd_p1_ff_scanout[8];
839assign i_wr_data_2nd_p1_ff_scanin[9]=i_wr_data_2nd_p0_ff_scanout[9];
840assign i_wr_data_2nd_p0_ff_scanin[10]=i_wr_data_2nd_p1_ff_scanout[9];
841assign i_wr_data_2nd_p1_ff_scanin[10]=i_wr_data_2nd_p0_ff_scanout[10];
842assign i_wr_data_2nd_p0_ff_scanin[11]=i_wr_data_2nd_p1_ff_scanout[10];
843assign i_wr_data_2nd_p1_ff_scanin[11]=i_wr_data_2nd_p0_ff_scanout[11];
844assign i_wr_data_2nd_p0_ff_scanin[12]=i_wr_data_2nd_p1_ff_scanout[11];
845assign i_wr_data_2nd_p1_ff_scanin[12]=i_wr_data_2nd_p0_ff_scanout[12];
846assign i_wr_data_2nd_p0_ff_scanin[13]=i_wr_data_2nd_p1_ff_scanout[12];
847assign i_wr_data_2nd_p1_ff_scanin[13]=i_wr_data_2nd_p0_ff_scanout[13];
848assign i_wr_data_2nd_p0_ff_scanin[14]=i_wr_data_2nd_p1_ff_scanout[13];
849assign i_wr_data_2nd_p1_ff_scanin[14]=i_wr_data_2nd_p0_ff_scanout[14];
850assign i_wr_data_2nd_p0_ff_scanin[15]=i_wr_data_2nd_p1_ff_scanout[14];
851assign i_wr_data_2nd_p1_ff_scanin[15]=i_wr_data_2nd_p0_ff_scanout[15];
852assign i_wr_data_2nd_p0_ff_scanin[16]=i_wr_data_2nd_p1_ff_scanout[15];
853assign i_wr_data_2nd_p1_ff_scanin[16]=i_wr_data_2nd_p0_ff_scanout[16];
854assign i_wr_data_2nd_p0_ff_scanin[17]=i_wr_data_2nd_p1_ff_scanout[16];
855assign i_wr_data_2nd_p1_ff_scanin[17]=i_wr_data_2nd_p0_ff_scanout[17];
856assign i_wr_data_2nd_p0_ff_scanin[18]=i_wr_data_2nd_p1_ff_scanout[17];
857assign i_wr_data_2nd_p1_ff_scanin[18]=i_wr_data_2nd_p0_ff_scanout[18];
858assign i_wr_data_2nd_p0_ff_scanin[19]=i_wr_data_2nd_p1_ff_scanout[18];
859assign i_wr_data_2nd_p1_ff_scanin[19]=i_wr_data_2nd_p0_ff_scanout[19];
860assign i_wr_data_2nd_p0_ff_scanin[20]=i_wr_data_2nd_p1_ff_scanout[19];
861assign i_wr_data_2nd_p1_ff_scanin[20]=i_wr_data_2nd_p0_ff_scanout[20];
862assign i_wr_data_2nd_p0_ff_scanin[21]=i_wr_data_2nd_p1_ff_scanout[20];
863assign i_wr_data_2nd_p1_ff_scanin[21]=i_wr_data_2nd_p0_ff_scanout[21];
864assign i_wr_data_2nd_p0_ff_scanin[22]=i_wr_data_2nd_p1_ff_scanout[21];
865assign i_wr_data_2nd_p1_ff_scanin[22]=i_wr_data_2nd_p0_ff_scanout[22];
866assign i_wr_data_2nd_p0_ff_scanin[23]=i_wr_data_2nd_p1_ff_scanout[22];
867assign i_wr_data_2nd_p1_ff_scanin[23]=i_wr_data_2nd_p0_ff_scanout[23];
868assign i_wr_data_2nd_p0_ff_scanin[24]=i_wr_data_2nd_p1_ff_scanout[23];
869assign i_wr_data_2nd_p1_ff_scanin[24]=i_wr_data_2nd_p0_ff_scanout[24];
870assign i_wr_data_2nd_p0_ff_scanin[25]=i_wr_data_2nd_p1_ff_scanout[24];
871assign i_wr_data_2nd_p1_ff_scanin[25]=i_wr_data_2nd_p0_ff_scanout[25];
872assign i_wr_data_2nd_p0_ff_scanin[26]=i_wr_data_2nd_p1_ff_scanout[25];
873assign i_wr_data_2nd_p1_ff_scanin[26]=i_wr_data_2nd_p0_ff_scanout[26];
874assign i_wr_data_2nd_p0_ff_scanin[27]=i_wr_data_2nd_p1_ff_scanout[26];
875assign i_wr_data_2nd_p1_ff_scanin[27]=i_wr_data_2nd_p0_ff_scanout[27];
876assign i_wr_data_2nd_p0_ff_scanin[28]=i_wr_data_2nd_p1_ff_scanout[27];
877assign i_wr_data_2nd_p1_ff_scanin[28]=i_wr_data_2nd_p0_ff_scanout[28];
878assign i_wr_data_2nd_p0_ff_scanin[29]=i_wr_data_2nd_p1_ff_scanout[28];
879assign i_wr_data_2nd_p1_ff_scanin[29]=i_wr_data_2nd_p0_ff_scanout[29];
880assign i_wr_data_2nd_p0_ff_scanin[30]=i_wr_data_2nd_p1_ff_scanout[29];
881assign i_wr_data_2nd_p1_ff_scanin[30]=i_wr_data_2nd_p0_ff_scanout[30];
882assign i_wr_data_2nd_p0_ff_scanin[31]=i_wr_data_2nd_p1_ff_scanout[30];
883assign i_wr_data_2nd_p1_ff_scanin[31]=i_wr_data_2nd_p0_ff_scanout[31];
884assign i_wr_data_2nd_p0_ff_scanin[32]=i_wr_data_2nd_p1_ff_scanout[31];
885assign i_wr_data_2nd_p1_ff_scanin[32]=i_wr_data_2nd_p0_ff_scanout[32];
886assign i_wr_data_2nd_p0_ff_scanin[33]=i_wr_data_2nd_p1_ff_scanout[32];
887assign i_wr_data_2nd_p1_ff_scanin[33]=i_wr_data_2nd_p0_ff_scanout[33];
888assign i_wr_data_2nd_p0_ff_scanin[34]=i_wr_data_2nd_p1_ff_scanout[33];
889assign i_wr_data_2nd_p1_ff_scanin[34]=i_wr_data_2nd_p0_ff_scanout[34];
890assign i_wr_data_2nd_p0_ff_scanin[35]=i_wr_data_2nd_p1_ff_scanout[34];
891assign i_wr_data_2nd_p1_ff_scanin[35]=i_wr_data_2nd_p0_ff_scanout[35];
892assign scan_out=i_wr_data_2nd_p1_ff_scanout[35];
893// fixscan end
894
895`ifndef FPGA
896// synopsys translate_on
897`endif
898
899endmodule
900
901
902
903
904
905
906// any PARAMS parms go into naming of macro
907
908module n2_irf_mp_128x72_cust_l1clkhdr_ctl_macro (
909 l2clk,
910 l1en,
911 pce_ov,
912 stop,
913 se,
914 l1clk);
915
916
917 input l2clk;
918 input l1en;
919 input pce_ov;
920 input stop;
921 input se;
922 output l1clk;
923
924
925
926
927
928cl_sc1_l1hdr_8x c_0 (
929
930
931 .l2clk(l2clk),
932 .pce(l1en),
933 .l1clk(l1clk),
934 .se(se),
935 .pce_ov(pce_ov),
936 .stop(stop)
937);
938
939
940
941endmodule
942
943
944
945
946
947
948
949
950
951
952
953
954
955// any PARAMS parms go into naming of macro
956
957module n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_36 (
958 din,
959 l1clk,
960 scan_in,
961 siclk,
962 soclk,
963 dout,
964 scan_out);
965wire [35:0] fdin;
966
967 input [35:0] din;
968 input l1clk;
969 input [35:0] scan_in;
970
971
972 input siclk;
973 input soclk;
974
975 output [35:0] dout;
976 output [35:0] scan_out;
977assign fdin[35:0] = din[35:0];
978
979
980
981
982
983
984dff #(36) d0_0 (
985.l1clk(l1clk),
986.siclk(siclk),
987.soclk(soclk),
988.d(fdin[35:0]),
989.si(scan_in[35:0]),
990.so(scan_out[35:0]),
991.q(dout[35:0])
992);
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005endmodule
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015//
1016// macro for cl_mc1_sram_msff_mo_{16,8,4}x flops
1017//
1018//
1019
1020
1021
1022
1023
1024module n2_irf_mp_128x72_cust_sram_msff_mo_macro__fs_1__width_20 (
1025 d,
1026 scan_in,
1027 l1clk,
1028 and_clk,
1029 siclk,
1030 soclk,
1031 mq,
1032 mq_l,
1033 scan_out,
1034 q,
1035 q_l);
1036input [19:0] d;
1037 input [19:0] scan_in;
1038input l1clk;
1039input and_clk;
1040input siclk;
1041input soclk;
1042output [19:0] mq;
1043output [19:0] mq_l;
1044 output [19:0] scan_out;
1045output [19:0] q;
1046output [19:0] q_l;
1047
1048
1049
1050
1051
1052
1053new_dlata #(20) d0_0 (
1054.d(d[19:0]),
1055.si(scan_in[19:0]),
1056.so(scan_out[19:0]),
1057.l1clk(l1clk),
1058.and_clk(and_clk),
1059.siclk(siclk),
1060.soclk(soclk),
1061.q(q[19:0]),
1062.q_l(q_l[19:0]),
1063.mq(mq[19:0]),
1064.mq_l(mq_l[19:0])
1065);
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076//place::generic_place($width,$stack,$left);
1077
1078endmodule
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088// any PARAMS parms go into naming of macro
1089
1090module n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_16 (
1091 din,
1092 l1clk,
1093 scan_in,
1094 siclk,
1095 soclk,
1096 dout,
1097 scan_out);
1098wire [15:0] fdin;
1099
1100 input [15:0] din;
1101 input l1clk;
1102 input [15:0] scan_in;
1103
1104
1105 input siclk;
1106 input soclk;
1107
1108 output [15:0] dout;
1109 output [15:0] scan_out;
1110assign fdin[15:0] = din[15:0];
1111
1112
1113
1114
1115
1116
1117dff #(16) d0_0 (
1118.l1clk(l1clk),
1119.siclk(siclk),
1120.soclk(soclk),
1121.d(fdin[15:0]),
1122.si(scan_in[15:0]),
1123.so(scan_out[15:0]),
1124.q(dout[15:0])
1125);
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138endmodule
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152// any PARAMS parms go into naming of macro
1153
1154module n2_irf_mp_128x72_cust_msff_ctl_macro__fs_1__width_17 (
1155 din,
1156 l1clk,
1157 scan_in,
1158 siclk,
1159 soclk,
1160 dout,
1161 scan_out);
1162wire [16:0] fdin;
1163
1164 input [16:0] din;
1165 input l1clk;
1166 input [16:0] scan_in;
1167
1168
1169 input siclk;
1170 input soclk;
1171
1172 output [16:0] dout;
1173 output [16:0] scan_out;
1174assign fdin[16:0] = din[16:0];
1175
1176
1177
1178
1179
1180
1181dff #(17) d0_0 (
1182.l1clk(l1clk),
1183.siclk(siclk),
1184.soclk(soclk),
1185.d(fdin[16:0]),
1186.si(scan_in[16:0]),
1187.so(scan_out[16:0]),
1188.q(dout[16:0])
1189);
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202endmodule
1203
1204
1205
1206
1207
1208
1209`ifndef FPGA
1210
1211module exu_irf_array (
1212 clk,
1213 tcu_array_wr_inhibit,
1214 a_rd_en_p0,
1215 a_rd_en_p1,
1216 a_rd_en_p2,
1217 a_rd_tid,
1218 a_rd_addr_p0,
1219 a_rd_addr_p1,
1220 a_rd_addr_p2,
1221 a_wr_en_p0,
1222 a_wr_tid_p0,
1223 a_wr_addr_p0,
1224 a_wr_data_p0,
1225 a_wr_en_p1,
1226 a_wr_tid_p1,
1227 a_wr_addr_p1,
1228 a_wr_data_p1,
1229 a_save_tid,
1230 a_save_global_tid,
1231 a_save_global_addr,
1232 a_save_even_addr,
1233 a_save_local_addr,
1234 a_save_odd_addr,
1235 a_save_global_en,
1236 a_save_even_en,
1237 a_save_local_en,
1238 a_save_odd_en,
1239 a_restore_tid,
1240 a_restore_global_tid,
1241 a_restore_global_addr,
1242 a_restore_even_addr,
1243 a_restore_odd_addr,
1244 a_restore_local_addr,
1245 a_restore_global_en,
1246 a_restore_even_en,
1247 a_restore_local_en,
1248 a_restore_odd_en,
1249 a_rd_data_p0,
1250 a_rd_data_p1,
1251 a_rd_data_p2);
1252wire [6:0] thr_rs1;
1253wire [6:0] thr_rs2;
1254wire [6:0] thr_rs3;
1255wire [6:0] thr_rd_w;
1256wire [6:0] thr_rd_w2;
1257wire rd_en_p0;
1258wire rd_en_p1;
1259wire rd_en_p2;
1260wire wr_en_p0;
1261wire wr_en_p1;
1262wire p0_rd_eq_wr;
1263wire p1_rd_eq_wr;
1264wire p2_rd_eq_wr;
1265
1266
1267input clk;
1268
1269input tcu_array_wr_inhibit;
1270
1271input a_rd_en_p0;
1272input a_rd_en_p1;
1273input a_rd_en_p2;
1274input [1:0] a_rd_tid;
1275input [4:0] a_rd_addr_p0;
1276input [4:0] a_rd_addr_p1;
1277input [4:0] a_rd_addr_p2;
1278
1279input a_wr_en_p0;
1280input [1:0] a_wr_tid_p0;
1281input [4:0] a_wr_addr_p0;
1282input [71:0] a_wr_data_p0;
1283
1284input a_wr_en_p1;
1285input [1:0] a_wr_tid_p1;
1286input [4:0] a_wr_addr_p1;
1287input [71:0] a_wr_data_p1;
1288
1289
1290input [1:0] a_save_tid;
1291input [1:0] a_save_global_tid;
1292input [1:0] a_save_global_addr;
1293input [2:1] a_save_even_addr;
1294input [2:0] a_save_local_addr;
1295input [2:1] a_save_odd_addr;
1296input a_save_global_en;
1297input a_save_even_en;
1298input a_save_local_en;
1299input a_save_odd_en;
1300
1301input [1:0] a_restore_tid;
1302input [1:0] a_restore_global_tid;
1303input [1:0] a_restore_global_addr;
1304input [2:1] a_restore_even_addr;
1305input [2:1] a_restore_odd_addr;
1306input [2:0] a_restore_local_addr;
1307input a_restore_global_en;
1308input a_restore_even_en;
1309input a_restore_local_en;
1310input a_restore_odd_en;
1311
1312
1313output [71:0] a_rd_data_p0;
1314output [71:0] a_rd_data_p1;
1315output [71:0] a_rd_data_p2;
1316
1317
1318
1319
1320 reg [71:0] active_window[127:0]; // Physical active array : 4(thread) x 32(reg) x 72 bit registers
1321
1322 reg [71:0] locals[255:0]; // Physical shadow array : 4(thread) x 8(reg) x 8(shadow)
1323 reg [71:0] evens[127:0]; // Physical shadow array : 4(thread) x 8(reg) x 4(shadow)
1324 reg [71:0] odds[127:0]; // Physical shadow array : 4(thread) x 8(reg) x 4(shadow)
1325 reg [71:0] globals[127:0]; // Physical shadow array : 4(thread) x 8(reg) x 4(shadow)
1326
1327
1328 integer i; // *** Temporary array index (no physical flops involved) ***
1329
1330 reg [71:0] rd_data_p0; // *** Temporary array read regs (no physical flops involved) ***
1331 reg [71:0] rd_data_p1; // *** Temporary array read regs (no physical flops involved) ***
1332 reg [71:0] rd_data_p2; // *** Temporary array read regs (no physical flops involved) ***
1333
1334
1335// For Axis, make synthesizable by making all writes to active_window occur at negedge (normal write and restore)
1336// Reads of active occur at both edges (read and save)
1337
1338
1339
1340
1341
1342 // -----------------------------------------------------------------------
1343 // *** initialization section ***
1344 // -----------------------------------------------------------------------
1345
1346 initial begin
1347 active_window[0] = {72{1'b0}}; // TID=0 G0 location is always ZERO - location is tied to ground, no memory cell at this address
1348 active_window[32] = {72{1'b0}}; // TID=1 G0 location is always ZERO - location is tied to ground, no memory cell at this address
1349 active_window[64] = {72{1'b0}}; // TID=2 G0 location is always ZERO - location is tied to ground, no memory cell at this address
1350 active_window[96] = {72{1'b0}}; // TID=3 G0 location is always ZERO - location is tied to ground, no memory cell at this address
1351 end
1352
1353
1354`ifndef NOINITMEM
1355 initial begin
1356 for (i=0; i<128; i=i+1) begin
1357 active_window[i] = {72{1'b0}};
1358 evens[i] = {72{1'b0}};
1359 odds[i] = {72{1'b0}};
1360 globals[i] = {72{1'b0}};
1361 locals[i] = {72{1'b0}};
1362 locals[i+128] = {72{1'b0}};
1363 end
1364 end
1365`endif
1366
1367
1368
1369
1370// Concatenate the thread and index bits together
1371
1372assign thr_rs1[6:0] = {a_rd_tid[1:0] , a_rd_addr_p0[4:0] };
1373assign thr_rs2[6:0] = {a_rd_tid[1:0] , a_rd_addr_p1[4:0] };
1374assign thr_rs3[6:0] = {a_rd_tid[1:0] , a_rd_addr_p2[4:0] };
1375assign thr_rd_w[6:0] = {a_wr_tid_p0[1:0], a_wr_addr_p0[4:0] };
1376assign thr_rd_w2[6:0] = {a_wr_tid_p1[1:0], a_wr_addr_p1[4:0] };
1377
1378
1379// Clear read enables if reading G0; clear write enables if writing G0;
1380
1381assign rd_en_p0 = a_rd_en_p0 & (thr_rs1[4:0] != 5'b00000) & ~tcu_array_wr_inhibit;
1382assign rd_en_p1 = a_rd_en_p1 & (thr_rs2[4:0] != 5'b00000) & ~tcu_array_wr_inhibit;
1383assign rd_en_p2 = a_rd_en_p2 & (thr_rs3[4:0] != 5'b00000) & ~tcu_array_wr_inhibit;
1384
1385assign wr_en_p0 = a_wr_en_p0 & (thr_rd_w[4:0] != 5'b00000) & ~tcu_array_wr_inhibit;
1386assign wr_en_p1 = a_wr_en_p1 & (thr_rd_w2[4:0] != 5'b00000) & ~tcu_array_wr_inhibit;
1387
1388assign p0_rd_eq_wr = (wr_en_p0 & (thr_rs1[6:0] == thr_rd_w[6:0])) | (wr_en_p1 & (thr_rs1[6:0] == thr_rd_w2[6:0]));
1389assign p1_rd_eq_wr = (wr_en_p0 & (thr_rs2[6:0] == thr_rd_w[6:0])) | (wr_en_p1 & (thr_rs2[6:0] == thr_rd_w2[6:0]));
1390assign p2_rd_eq_wr = (wr_en_p0 & (thr_rs3[6:0] == thr_rd_w[6:0])) | (wr_en_p1 & (thr_rs3[6:0] == thr_rd_w2[6:0]));
1391
1392
1393
1394 always @ (clk or rd_en_p0 or rd_en_p1 or rd_en_p2 or thr_rs1 or thr_rs2 or thr_rs3 or p0_rd_eq_wr or p1_rd_eq_wr or p2_rd_eq_wr)
1395
1396 begin
1397
1398 if (clk)
1399 begin
1400 if (rd_en_p0)
1401 begin
1402 if (p0_rd_eq_wr) rd_data_p0[71:0] <= {72{1'bx}};
1403 else rd_data_p0[71:0] <= active_window[thr_rs1[6:0]];
1404 end
1405 else rd_data_p0[71:0] <= {72{1'b0}};
1406
1407
1408 if (rd_en_p1)
1409 begin
1410 if (p1_rd_eq_wr) rd_data_p1[71:0] <= {72{1'bx}};
1411 else rd_data_p1[71:0] <= active_window[thr_rs2[6:0]];
1412 end
1413 else rd_data_p1[71:0] <= {72{1'b0}};
1414
1415
1416 if (rd_en_p2)
1417 begin
1418 if (p2_rd_eq_wr) rd_data_p2[71:0] <= {72{1'bx}};
1419 else rd_data_p2[71:0] <= active_window[thr_rs3[6:0]];
1420 end
1421 else rd_data_p2[71:0] <= {72{1'b0}};
1422
1423 end
1424
1425 end // ALWAYS CLK ...
1426
1427
1428
1429
1430 always @ (negedge clk)
1431
1432 begin
1433
1434 if (wr_en_p0) active_window[thr_rd_w[6:0]] <= a_wr_data_p0[71:0];
1435
1436 if (wr_en_p1) active_window[thr_rd_w2[6:0]] <= a_wr_data_p1[71:0];
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460 end // NEGEDGE ALWAYS
1461
1462
1463
1464
1465 /////////////////////////////////////////////
1466 // Globals
1467 //-----------------------------------
1468 // rml inputs are latched on rising edge
1469 // 1st cycle used for decode
1470 // 2nd cycle stores active window in phase 1
1471 // 3rd cycle loads new globals in phase 1
1472 /////////////////////////////////////////////
1473
1474 ////////////////////////////
1475 // locals, ins and outs
1476 //-------------------------
1477 // E - set up inputs to flop
1478 // M - Decode
1479 // W (phase 1) - Save
1480 // W (phase 2) - write is allowed for save because restore will get killed
1481 // W2 (phase 1) - Restore
1482 // W2 (phase 2) - write is allowed
1483 //
1484 // actions that occur in phase one are modelled as occurring on the
1485 // rising edge
1486 //
1487 // swaps to the same thread in consecutive cycles not allowed
1488 /////////////////////////////
1489
1490
1491 // For synthesis, flop inputs again, then do write of active window on negedge...
1492 always @ (posedge clk) begin
1493
1494
1495
1496
1497
1498
1499 // *** *** *** *** *** *** *** *** *** SAVE *** *** *** *** *** *** *** *** ***
1500
1501
1502 if (a_save_global_en & ~tcu_array_wr_inhibit) begin // save the globals (0-7 in active window)
1503
1504 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b000}] <= active_window[{a_save_global_tid[1:0], 5'b00000}];
1505 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b001}] <= active_window[{a_save_global_tid[1:0], 5'b00001}];
1506 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b010}] <= active_window[{a_save_global_tid[1:0], 5'b00010}];
1507 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b011}] <= active_window[{a_save_global_tid[1:0], 5'b00011}];
1508 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b100}] <= active_window[{a_save_global_tid[1:0], 5'b00100}];
1509 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b101}] <= active_window[{a_save_global_tid[1:0], 5'b00101}];
1510 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b110}] <= active_window[{a_save_global_tid[1:0], 5'b00110}];
1511 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b111}] <= active_window[{a_save_global_tid[1:0], 5'b00111}];
1512
1513 end
1514
1515
1516 if (a_save_odd_en & ~tcu_array_wr_inhibit) begin // save the ins in odd window (8-15 in active window)
1517
1518 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b000}] <= active_window[{a_save_tid[1:0], 5'b01000}];
1519 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b001}] <= active_window[{a_save_tid[1:0], 5'b01001}];
1520 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b010}] <= active_window[{a_save_tid[1:0], 5'b01010}];
1521 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b011}] <= active_window[{a_save_tid[1:0], 5'b01011}];
1522 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b100}] <= active_window[{a_save_tid[1:0], 5'b01100}];
1523 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b101}] <= active_window[{a_save_tid[1:0], 5'b01101}];
1524 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b110}] <= active_window[{a_save_tid[1:0], 5'b01110}];
1525 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b111}] <= active_window[{a_save_tid[1:0], 5'b01111}];
1526
1527 end
1528
1529
1530 if (a_save_local_en & ~tcu_array_wr_inhibit) begin // save the locals (16-23 in active window)
1531
1532 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b000}] <= active_window[{a_save_tid[1:0], 5'b10000}];
1533 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b001}] <= active_window[{a_save_tid[1:0], 5'b10001}];
1534 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b010}] <= active_window[{a_save_tid[1:0], 5'b10010}];
1535 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b011}] <= active_window[{a_save_tid[1:0], 5'b10011}];
1536 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b100}] <= active_window[{a_save_tid[1:0], 5'b10100}];
1537 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b101}] <= active_window[{a_save_tid[1:0], 5'b10101}];
1538 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b110}] <= active_window[{a_save_tid[1:0], 5'b10110}];
1539 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b111}] <= active_window[{a_save_tid[1:0], 5'b10111}];
1540
1541 end
1542
1543
1544 if (a_save_even_en & ~tcu_array_wr_inhibit) begin // save the ins in even window (24-31 in active window)
1545
1546 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b000}] <= active_window[{a_save_tid[1:0], 5'b11000}];
1547 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b001}] <= active_window[{a_save_tid[1:0], 5'b11001}];
1548 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b010}] <= active_window[{a_save_tid[1:0], 5'b11010}];
1549 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b011}] <= active_window[{a_save_tid[1:0], 5'b11011}];
1550 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b100}] <= active_window[{a_save_tid[1:0], 5'b11100}];
1551 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b101}] <= active_window[{a_save_tid[1:0], 5'b11101}];
1552 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b110}] <= active_window[{a_save_tid[1:0], 5'b11110}];
1553 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b111}] <= active_window[{a_save_tid[1:0], 5'b11111}];
1554
1555 end
1556
1557
1558
1559
1560 // *** *** *** *** *** *** *** *** *** RESTORE *** *** *** *** *** *** *** *** ***
1561
1562
1563 if (a_restore_global_en & ~tcu_array_wr_inhibit) begin // restore the globals (0-7 in active window)
1564
1565 active_window[{a_restore_global_tid[1:0], 5'b00000}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b000}];
1566 active_window[{a_restore_global_tid[1:0], 5'b00001}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b001}];
1567 active_window[{a_restore_global_tid[1:0], 5'b00010}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b010}];
1568 active_window[{a_restore_global_tid[1:0], 5'b00011}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b011}];
1569 active_window[{a_restore_global_tid[1:0], 5'b00100}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b100}];
1570 active_window[{a_restore_global_tid[1:0], 5'b00101}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b101}];
1571 active_window[{a_restore_global_tid[1:0], 5'b00110}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b110}];
1572 active_window[{a_restore_global_tid[1:0], 5'b00111}] <= globals[{a_restore_global_tid[1:0], a_restore_global_addr[1:0], 3'b111}];
1573
1574 end
1575
1576
1577 if (a_restore_odd_en & ~tcu_array_wr_inhibit) begin // restore the ins in odd window (8-15 in active window)
1578
1579 active_window[{a_restore_tid[1:0], 5'b01000}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b000}];
1580 active_window[{a_restore_tid[1:0], 5'b01001}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b001}];
1581 active_window[{a_restore_tid[1:0], 5'b01010}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b010}];
1582 active_window[{a_restore_tid[1:0], 5'b01011}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b011}];
1583 active_window[{a_restore_tid[1:0], 5'b01100}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b100}];
1584 active_window[{a_restore_tid[1:0], 5'b01101}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b101}];
1585 active_window[{a_restore_tid[1:0], 5'b01110}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b110}];
1586 active_window[{a_restore_tid[1:0], 5'b01111}] <= odds[{a_restore_tid[1:0], a_restore_odd_addr[2:1], 3'b111}];
1587
1588 end
1589
1590
1591 if (a_restore_local_en & ~tcu_array_wr_inhibit) begin // restore the locals (16-23 in active window)
1592
1593 active_window[{a_restore_tid[1:0], 5'b10000}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b000}];
1594 active_window[{a_restore_tid[1:0], 5'b10001}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b001}];
1595 active_window[{a_restore_tid[1:0], 5'b10010}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b010}];
1596 active_window[{a_restore_tid[1:0], 5'b10011}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b011}];
1597 active_window[{a_restore_tid[1:0], 5'b10100}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b100}];
1598 active_window[{a_restore_tid[1:0], 5'b10101}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b101}];
1599 active_window[{a_restore_tid[1:0], 5'b10110}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b110}];
1600 active_window[{a_restore_tid[1:0], 5'b10111}] <= locals[{a_restore_tid[1:0], a_restore_local_addr[2:0], 3'b111}];
1601
1602 end
1603
1604
1605 if (a_restore_even_en & ~tcu_array_wr_inhibit) begin // restore the ins in even window (24-31 in active window)
1606
1607 active_window[{a_restore_tid[1:0], 5'b11000}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b000}];
1608 active_window[{a_restore_tid[1:0], 5'b11001}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b001}];
1609 active_window[{a_restore_tid[1:0], 5'b11010}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b010}];
1610 active_window[{a_restore_tid[1:0], 5'b11011}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b011}];
1611 active_window[{a_restore_tid[1:0], 5'b11100}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b100}];
1612 active_window[{a_restore_tid[1:0], 5'b11101}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b101}];
1613 active_window[{a_restore_tid[1:0], 5'b11110}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b110}];
1614 active_window[{a_restore_tid[1:0], 5'b11111}] <= evens[{a_restore_tid[1:0], a_restore_even_addr[2:1], 3'b111}];
1615
1616 end
1617
1618
1619 end // POSEDGE ALWAYS
1620
1621
1622assign a_rd_data_p0[71:0] = rd_data_p0[71:0];
1623assign a_rd_data_p1[71:0] = rd_data_p1[71:0];
1624assign a_rd_data_p2[71:0] = rd_data_p2[71:0];
1625
1626
1627supply0 vss;
1628supply1 vdd;
1629
1630endmodule
1631`endif // `ifndef FPGA
1632
1633
1634`ifdef FPGA
1635
1636module exu_irf_array(clk, tcu_array_wr_inhibit, a_rd_en_p0, a_rd_en_p1,
1637 a_rd_en_p2, a_rd_tid, a_rd_addr_p0, a_rd_addr_p1, a_rd_addr_p2,
1638 a_wr_en_p0, a_wr_tid_p0, a_wr_addr_p0, a_wr_data_p0, a_wr_en_p1,
1639 a_wr_tid_p1, a_wr_addr_p1, a_wr_data_p1, a_save_tid, a_save_global_tid,
1640 a_save_global_addr, a_save_even_addr, a_save_local_addr,
1641 a_save_odd_addr, a_save_global_en, a_save_even_en, a_save_local_en,
1642 a_save_odd_en, a_restore_tid, a_restore_global_tid,
1643 a_restore_global_addr, a_restore_even_addr, a_restore_odd_addr,
1644 a_restore_local_addr, a_restore_global_en, a_restore_even_en,
1645 a_restore_local_en, a_restore_odd_en, a_rd_data_p0, a_rd_data_p1,
1646 a_rd_data_p2);
1647
1648 input clk;
1649 input tcu_array_wr_inhibit;
1650 input a_rd_en_p0;
1651 input a_rd_en_p1;
1652 input a_rd_en_p2;
1653 input [1:0] a_rd_tid;
1654 input [4:0] a_rd_addr_p0;
1655 input [4:0] a_rd_addr_p1;
1656 input [4:0] a_rd_addr_p2;
1657 input a_wr_en_p0;
1658 input [1:0] a_wr_tid_p0;
1659 input [4:0] a_wr_addr_p0;
1660 input [71:0] a_wr_data_p0;
1661 input a_wr_en_p1;
1662 input [1:0] a_wr_tid_p1;
1663 input [4:0] a_wr_addr_p1;
1664 input [71:0] a_wr_data_p1;
1665 input [1:0] a_save_tid;
1666 input [1:0] a_save_global_tid;
1667 input [1:0] a_save_global_addr;
1668 input [2:1] a_save_even_addr;
1669 input [2:0] a_save_local_addr;
1670 input [2:1] a_save_odd_addr;
1671 input a_save_global_en;
1672 input a_save_even_en;
1673 input a_save_local_en;
1674 input a_save_odd_en;
1675 input [1:0] a_restore_tid;
1676 input [1:0] a_restore_global_tid;
1677 input [1:0] a_restore_global_addr;
1678 input [2:1] a_restore_even_addr;
1679 input [2:1] a_restore_odd_addr;
1680 input [2:0] a_restore_local_addr;
1681 input a_restore_global_en;
1682 input a_restore_even_en;
1683 input a_restore_local_en;
1684 input a_restore_odd_en;
1685 output [71:0] a_rd_data_p0;
1686 output [71:0] a_rd_data_p1;
1687 output [71:0] a_rd_data_p2;
1688
1689 wire [6:0] thr_rs1;
1690 wire [6:0] thr_rs2;
1691 wire [6:0] thr_rs3;
1692 wire [6:0] thr_rd_w;
1693 wire [6:0] thr_rd_w2;
1694 wire rd_en_p0;
1695 wire rd_en_p1;
1696 wire rd_en_p2;
1697 wire wr_en_p0;
1698 wire wr_en_p1;
1699 wire p0_rd_eq_wr;
1700 wire p1_rd_eq_wr;
1701 wire p2_rd_eq_wr;
1702
1703 reg [71:0] active_window[127:0];
1704 reg [71:0] locals[255:0];
1705 reg [71:0] evens[127:0];
1706 reg [71:0] odds[127:0];
1707 reg [71:0] globals[127:0];
1708 integer i;
1709 reg [71:0] rd_data_p0;
1710 reg [71:0] rd_data_p1;
1711 reg [71:0] rd_data_p2;
1712 reg [1:0] a_restore_global_tid_d1;
1713 reg [1:0] a_restore_tid_d1;
1714 reg [1:0] a_restore_global_addr_d1;
1715 reg [2:1] a_restore_odd_addr_d1;
1716 reg [2:1] a_restore_even_addr_d1;
1717 reg [2:0] a_restore_local_addr_d1;
1718 reg a_save_global_en_d1;
1719 reg tcu_array_wr_inhibit_d1;
1720 reg a_save_odd_en_d1;
1721 reg a_save_local_en_d1;
1722 reg a_save_even_en_d1;
1723 reg a_restore_global_en_d1;
1724 reg a_restore_odd_en_d1;
1725 reg a_restore_local_en_d1;
1726 reg a_restore_even_en_d1;
1727 supply0 vss;
1728 supply1 vdd;
1729
1730
1731 assign thr_rs1[6:0] = {a_rd_tid[1:0], a_rd_addr_p0[4:0]};
1732 assign thr_rs2[6:0] = {a_rd_tid[1:0], a_rd_addr_p1[4:0]};
1733 assign thr_rs3[6:0] = {a_rd_tid[1:0], a_rd_addr_p2[4:0]};
1734 assign thr_rd_w[6:0] = {a_wr_tid_p0[1:0], a_wr_addr_p0[4:0]};
1735 assign thr_rd_w2[6:0] = {a_wr_tid_p1[1:0], a_wr_addr_p1[4:0]};
1736
1737
1738
1739
1740 assign rd_en_p0 = ((a_rd_en_p0 & (thr_rs1[4:0] != 5'b0)) & (~
1741 tcu_array_wr_inhibit));
1742 assign rd_en_p1 = ((a_rd_en_p1 & (thr_rs2[4:0] != 5'b0)) & (~
1743 tcu_array_wr_inhibit));
1744 assign rd_en_p2 = ((a_rd_en_p2 & (thr_rs3[4:0] != 5'b0)) & (~
1745 tcu_array_wr_inhibit));
1746 assign wr_en_p0 = ((a_wr_en_p0 & (thr_rd_w[4:0] != 5'b0)) & (~
1747 tcu_array_wr_inhibit));
1748 assign wr_en_p1 = ((a_wr_en_p1 & (thr_rd_w2[4:0] != 5'b0)) & (~
1749 tcu_array_wr_inhibit));
1750 assign p0_rd_eq_wr = ((wr_en_p0 & (thr_rs1[6:0] == thr_rd_w[6:0])) | (
1751 wr_en_p1 & (thr_rs1[6:0] == thr_rd_w2[6:0])));
1752 assign p1_rd_eq_wr = ((wr_en_p0 & (thr_rs2[6:0] == thr_rd_w[6:0])) | (
1753 wr_en_p1 & (thr_rs2[6:0] == thr_rd_w2[6:0])));
1754 assign p2_rd_eq_wr = ((wr_en_p0 & (thr_rs3[6:0] == thr_rd_w[6:0])) | (
1755 wr_en_p1 & (thr_rs3[6:0] == thr_rd_w2[6:0])));
1756 assign a_rd_data_p0[71:0] = rd_data_p0[71:0];
1757 assign a_rd_data_p1[71:0] = rd_data_p1[71:0];
1758 assign a_rd_data_p2[71:0] = rd_data_p2[71:0];
1759
1760 initial begin
1761 active_window[0] = {72 {1'b0}};
1762 active_window[32] = {72 {1'b0}};
1763 active_window[64] = {72 {1'b0}};
1764 active_window[96] = {72 {1'b0}};
1765 end
1766 initial begin
1767 for (i = 0; (i < 128); i = (i + 1)) begin
1768 active_window[i] = {72 {1'b0}};
1769 evens[i] = {72 {1'b0}};
1770 odds[i] = {72 {1'b0}};
1771 globals[i] = {72 {1'b0}};
1772 locals[i] = {72 {1'b0}};
1773 locals[(i + 128)] = {72 {1'b0}};
1774 end
1775 end
1776 always @(clk or rd_en_p0 or rd_en_p1 or rd_en_p2 or thr_rs1 or thr_rs2
1777 or thr_rs3 or p0_rd_eq_wr or p1_rd_eq_wr or p2_rd_eq_wr) begin
1778 if (clk) begin
1779 if (rd_en_p0) begin
1780 if (p0_rd_eq_wr) begin
1781 rd_data_p0[71:0] <= {72 {1'bx}};
1782 end
1783 else begin
1784 rd_data_p0[71:0] <= active_window[thr_rs1[6:0]];
1785 end
1786 end
1787 else begin
1788 rd_data_p0[71:0] <= {72 {1'b0}};
1789 end
1790 if (rd_en_p1) begin
1791 if (p1_rd_eq_wr) begin
1792 rd_data_p1[71:0] <= {72 {1'bx}};
1793 end
1794 else begin
1795 rd_data_p1[71:0] <= active_window[thr_rs2[6:0]];
1796 end
1797 end
1798 else begin
1799 rd_data_p1[71:0] <= {72 {1'b0}};
1800 end
1801 if (rd_en_p2) begin
1802 if (p2_rd_eq_wr) begin
1803 rd_data_p2[71:0] <= {72 {1'bx}};
1804 end
1805 else begin
1806 rd_data_p2[71:0] <= active_window[thr_rs3[6:0]];
1807 end
1808 end
1809 else begin
1810 rd_data_p2[71:0] <= {72 {1'b0}};
1811 end
1812 end
1813 end
1814 always @(negedge clk) begin
1815 if (wr_en_p0) begin
1816 active_window[thr_rd_w[6:0]] <= a_wr_data_p0[71:0];
1817 end
1818 if (wr_en_p1) begin
1819 active_window[thr_rd_w2[6:0]] <= a_wr_data_p1[71:0];
1820 end
1821 if (a_restore_global_en_d1 & (~tcu_array_wr_inhibit_d1)) begin
1822 active_window[{a_restore_global_tid_d1[1:0], 5'b0}] <=
1823 globals[{a_restore_global_tid_d1[1:0],
1824 a_restore_global_addr_d1[1:0], 3'b0}];
1825 active_window[{a_restore_global_tid_d1[1:0], 5'b1}] <=
1826 globals[{a_restore_global_tid_d1[1:0],
1827 a_restore_global_addr_d1[1:0], 3'b1}];
1828 active_window[{a_restore_global_tid_d1[1:0], 5'b00010}] <=
1829 globals[{a_restore_global_tid_d1[1:0],
1830 a_restore_global_addr_d1[1:0], 3'd2}];
1831 active_window[{a_restore_global_tid_d1[1:0], 5'b00011}] <=
1832 globals[{a_restore_global_tid_d1[1:0],
1833 a_restore_global_addr_d1[1:0], 3'd3}];
1834 active_window[{a_restore_global_tid_d1[1:0], 5'b00100}] <=
1835 globals[{a_restore_global_tid_d1[1:0],
1836 a_restore_global_addr_d1[1:0], 3'd4}];
1837 active_window[{a_restore_global_tid_d1[1:0], 5'b00101}] <=
1838 globals[{a_restore_global_tid_d1[1:0],
1839 a_restore_global_addr_d1[1:0], 3'd5}];
1840 active_window[{a_restore_global_tid_d1[1:0], 5'b00110}] <=
1841 globals[{a_restore_global_tid_d1[1:0],
1842 a_restore_global_addr_d1[1:0], 3'd6}];
1843 active_window[{a_restore_global_tid_d1[1:0], 5'b00111}] <=
1844 globals[{a_restore_global_tid_d1[1:0],
1845 a_restore_global_addr_d1[1:0], 3'd7}];
1846 end
1847 if (a_restore_odd_en_d1 & (~tcu_array_wr_inhibit_d1)) begin
1848 active_window[{a_restore_tid_d1[1:0], 5'b01000}] <=
1849 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1850 3'b0}];
1851 active_window[{a_restore_tid_d1[1:0], 5'b01001}] <=
1852 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1853 3'b1}];
1854 active_window[{a_restore_tid_d1[1:0], 5'b01010}] <=
1855 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1856 3'd2}];
1857 active_window[{a_restore_tid_d1[1:0], 5'b01011}] <=
1858 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1859 3'd3}];
1860 active_window[{a_restore_tid_d1[1:0], 5'b01100}] <=
1861 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1862 3'd4}];
1863 active_window[{a_restore_tid_d1[1:0], 5'b01101}] <=
1864 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1865 3'd5}];
1866 active_window[{a_restore_tid_d1[1:0], 5'b01110}] <=
1867 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1868 3'd6}];
1869 active_window[{a_restore_tid_d1[1:0], 5'b01111}] <=
1870 odds[{a_restore_tid_d1[1:0], a_restore_odd_addr_d1[2:1],
1871 3'd7}];
1872 end
1873 if (a_restore_local_en_d1 & (~tcu_array_wr_inhibit_d1)) begin
1874 active_window[{a_restore_tid_d1[1:0], 5'b10000}] <=
1875 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1876 3'b0}];
1877 active_window[{a_restore_tid_d1[1:0], 5'b10001}] <=
1878 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1879 3'b1}];
1880 active_window[{a_restore_tid_d1[1:0], 5'b10010}] <=
1881 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1882 3'd2}];
1883 active_window[{a_restore_tid_d1[1:0], 5'b10011}] <=
1884 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1885 3'd3}];
1886 active_window[{a_restore_tid_d1[1:0], 5'b10100}] <=
1887 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1888 3'd4}];
1889 active_window[{a_restore_tid_d1[1:0], 5'b10101}] <=
1890 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1891 3'd5}];
1892 active_window[{a_restore_tid_d1[1:0], 5'b10110}] <=
1893 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1894 3'd6}];
1895 active_window[{a_restore_tid_d1[1:0], 5'b10111}] <=
1896 locals[{a_restore_tid_d1[1:0], a_restore_local_addr_d1[2:0],
1897 3'd7}];
1898 end
1899 if (a_restore_even_en_d1 & (~tcu_array_wr_inhibit_d1)) begin
1900 active_window[{a_restore_tid_d1[1:0], 5'b11000}] <=
1901 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1902 3'b0}];
1903 active_window[{a_restore_tid_d1[1:0], 5'b11001}] <=
1904 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1905 3'b1}];
1906 active_window[{a_restore_tid_d1[1:0], 5'b11010}] <=
1907 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1908 3'd2}];
1909 active_window[{a_restore_tid_d1[1:0], 5'b11011}] <=
1910 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1911 3'd3}];
1912 active_window[{a_restore_tid_d1[1:0], 5'b11100}] <=
1913 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1914 3'd4}];
1915 active_window[{a_restore_tid_d1[1:0], 5'b11101}] <=
1916 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1917 3'd5}];
1918 active_window[{a_restore_tid_d1[1:0], 5'b11110}] <=
1919 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1920 3'd6}];
1921 active_window[{a_restore_tid_d1[1:0], 5'b11111}] <=
1922 evens[{a_restore_tid_d1[1:0], a_restore_even_addr_d1[2:1],
1923 3'd7}];
1924 end
1925 end
1926 always @(posedge clk) begin
1927 tcu_array_wr_inhibit_d1 <= tcu_array_wr_inhibit;
1928 a_restore_global_tid_d1[1:0] <= a_restore_global_tid[1:0];
1929 a_restore_global_addr_d1[1:0] <= a_restore_global_addr[1:0];
1930 a_restore_tid_d1[1:0] <= a_restore_tid[1:0];
1931 a_restore_odd_addr_d1[2:1] <= a_restore_odd_addr[2:1];
1932 a_restore_local_addr_d1[2:0] <= a_restore_local_addr[2:0];
1933 a_restore_even_addr_d1[2:1] <= a_restore_even_addr[2:1];
1934 a_restore_global_en_d1 <= a_restore_global_en;
1935 a_restore_odd_en_d1 <= a_restore_odd_en;
1936 a_restore_local_en_d1 <= a_restore_local_en;
1937 a_restore_even_en_d1 <= a_restore_even_en;
1938 if (a_save_global_en & (~tcu_array_wr_inhibit)) begin
1939 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b0}] <=
1940 active_window[{a_save_global_tid[1:0], 5'b0}];
1941 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'b1}] <=
1942 active_window[{a_save_global_tid[1:0], 5'b1}];
1943 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd2}] <=
1944 active_window[{a_save_global_tid[1:0], 5'b00010}];
1945 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd3}] <=
1946 active_window[{a_save_global_tid[1:0], 5'b00011}];
1947 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd4}] <=
1948 active_window[{a_save_global_tid[1:0], 5'b00100}];
1949 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd5}] <=
1950 active_window[{a_save_global_tid[1:0], 5'b00101}];
1951 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd6}] <=
1952 active_window[{a_save_global_tid[1:0], 5'b00110}];
1953 globals[{a_save_global_tid[1:0], a_save_global_addr[1:0], 3'd7}] <=
1954 active_window[{a_save_global_tid[1:0], 5'b00111}];
1955 end
1956 if (a_save_odd_en & (~tcu_array_wr_inhibit)) begin
1957 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b0}] <=
1958 active_window[{a_save_tid[1:0], 5'b01000}];
1959 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'b1}] <=
1960 active_window[{a_save_tid[1:0], 5'b01001}];
1961 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd2}] <=
1962 active_window[{a_save_tid[1:0], 5'b01010}];
1963 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd3}] <=
1964 active_window[{a_save_tid[1:0], 5'b01011}];
1965 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd4}] <=
1966 active_window[{a_save_tid[1:0], 5'b01100}];
1967 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd5}] <=
1968 active_window[{a_save_tid[1:0], 5'b01101}];
1969 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd6}] <=
1970 active_window[{a_save_tid[1:0], 5'b01110}];
1971 odds[{a_save_tid[1:0], a_save_odd_addr[2:1], 3'd7}] <=
1972 active_window[{a_save_tid[1:0], 5'b01111}];
1973 end
1974 if (a_save_local_en & (~tcu_array_wr_inhibit)) begin
1975 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b0}] <=
1976 active_window[{a_save_tid[1:0], 5'b10000}];
1977 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'b1}] <=
1978 active_window[{a_save_tid[1:0], 5'b10001}];
1979 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd2}] <=
1980 active_window[{a_save_tid[1:0], 5'b10010}];
1981 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd3}] <=
1982 active_window[{a_save_tid[1:0], 5'b10011}];
1983 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd4}] <=
1984 active_window[{a_save_tid[1:0], 5'b10100}];
1985 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd5}] <=
1986 active_window[{a_save_tid[1:0], 5'b10101}];
1987 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd6}] <=
1988 active_window[{a_save_tid[1:0], 5'b10110}];
1989 locals[{a_save_tid[1:0], a_save_local_addr[2:0], 3'd7}] <=
1990 active_window[{a_save_tid[1:0], 5'b10111}];
1991 end
1992 if (a_save_even_en & (~tcu_array_wr_inhibit)) begin
1993 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b0}] <=
1994 active_window[{a_save_tid[1:0], 5'b11000}];
1995 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'b1}] <=
1996 active_window[{a_save_tid[1:0], 5'b11001}];
1997 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd2}] <=
1998 active_window[{a_save_tid[1:0], 5'b11010}];
1999 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd3}] <=
2000 active_window[{a_save_tid[1:0], 5'b11011}];
2001 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd4}] <=
2002 active_window[{a_save_tid[1:0], 5'b11100}];
2003 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd5}] <=
2004 active_window[{a_save_tid[1:0], 5'b11101}];
2005 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd6}] <=
2006 active_window[{a_save_tid[1:0], 5'b11110}];
2007 evens[{a_save_tid[1:0], a_save_even_addr[2:1], 3'd7}] <=
2008 active_window[{a_save_tid[1:0], 5'b11111}];
2009 end
2010 end
2011
2012endmodule
2013
2014`endif // `ifdef FPGA
2015