Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / tcu / rtl / tcu_mbist_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tcu_mbist_ctl.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 ============================================
35`define CNT_ADDR_HI 14
36`define CNT_ADDR_LO 12
37`define IAB_ADDR_HI 11
38`define IAB_ADDR_LO 9
39`define DAB_ADDR_HI 8
40`define DAB_ADDR_LO 6
41`define EXT_ADDR_HI 5
42`define EXT_ADDR_LO 3
43`define AE_ADDR_HI 2
44`define AE_ADDR_LO 0
45
46//debug event codes
47`define WATCH_POINT 2'b00
48`define HARD_STOP 2'b01
49`define SOFT_STOP 2'b10
50`define START_COUNT 2'b11
51
52//debug event status bit location
53`define CNT 4
54`define IAB 3
55`define DAB 2
56`define EXT 1
57`define AE 0
58
59// UCB defines, copied from Niagara iop/include/sys.h or iop.h
60`define UCB_BUF_HI 11 // (2) buffer ID
61`define UCB_BUF_LO 10
62`define UCB_THR_HI 9 // (6) cpu/thread ID
63`define UCB_THR_LO 4
64`define UCB_DATA_HI 127 // (64) data
65`define UCB_DATA_LO 64
66`define UCB_PKT_HI 3 // (4) packet type
67`define UCB_PKT_LO 0
68`define UCB_READ_ACK 4'b0001
69`define UCB_READ_REQ 4'b0100 // req types
70`define UCB_WRITE_ACK 4'b0010
71`define UCB_WRITE_REQ 4'b0101
72`define UCB_SIZE_HI 14 // (3) request size
73`define UCB_SIZE_LO 12
74`define UCB_BID_TAP 2'b01
75`define UCB_ADDR_HI 54 // (40) bit address
76`define UCB_ADDR_LO 15
77`define PCX_SZ_8B 3'b011 // encoding for 8B access
78
79// MBIST Defines
80`define NUM_TOTAL_MBIST_M1 47
81`define NUM_TOTAL_MBIST 48
82
83`define NUM_TOTAL_LBIST 8
84`define NUM_TOTAL_LBIST_M1 7
85
86`define MBIST_IDLE 4'd0
87`define POR_CLR_DF 4'd1
88`define POR_START 4'd2
89`define POR_CLR_START 4'd3
90`define POR_END_WAIT 4'd4
91`define WMR_DUMMY 4'd5
92`define WMR_CLR_DF 4'd6
93`define WMR_START 4'd7
94`define WMR_CLR_START 4'd8
95`define WMR_END_WAIT 4'd9
96`define BISX_CLR_DF 4'd10
97`define BISX_START 4'd11
98`define BISX_CLR_START 4'd12
99
100
101
102module tcu_mbist_ctl (
103 l2clk,
104 scan_in,
105 scan_out,
106 tcu_int_aclk,
107 tcu_int_bclk,
108 tcu_int_se,
109 tcu_int_ce,
110 tcu_pce_ov,
111 tcu_rst_flush_init_ack,
112 start_bisx_por,
113 start_bisx_wmr,
114 stop_bisx_wmr,
115 tcu_bisx_done,
116 mbist_clk_stop_req,
117 mbist_done,
118 mbist_fail,
119 mbist_done_fail,
120 core_avail,
121 mbist_clkstpen,
122 lb_tcu_done_d,
123 mb_tcu_done,
124 mb_tcu_fail,
125 tcu_mb_start,
126 tcu_mbist_bisi_en,
127 tcu_mbist_user_mode,
128 lb_tcu_done,
129 tcu_spc_lbist_start,
130 dmo_coresel,
131 dmo_dcmuxctl,
132 dmo_icmuxctl,
133 spc4_dmo_dout,
134 spc6_dmo_dout,
135 l2t4_dmo_dout,
136 l2t6_dmo_dout,
137 dmo_l2tsel,
138 dmo_tagmuxctl,
139 rtx_tcu_dmo_data_out,
140 tds_tcu_dmo_dout,
141 rdp_tcu_dmo_dout,
142 tcu_rtx_dmo_ctl,
143 tcu_mio_dmo_data,
144 tcu_mio_dmo_sync,
145 tcu_mio_mbist_done,
146 tcu_mio_mbist_fail,
147 tcu_mio_jtag_membist_mode,
148 jtag_dmo_enable,
149 jtag_dmo_control_upd,
150 jtag_dmo_control,
151 dmo_cfg,
152 cmp_io2x_sync_en,
153 io_cmp_sync_en,
154 cmp_io_sync_en,
155 ncu_spc0_core_available,
156 ncu_spc1_core_available,
157 ncu_spc2_core_available,
158 ncu_spc3_core_available,
159 ncu_spc4_core_available,
160 ncu_spc5_core_available,
161 ncu_spc6_core_available,
162 ncu_spc7_core_available,
163 ncu_spc0_core_enable_status,
164 ncu_spc1_core_enable_status,
165 ncu_spc2_core_enable_status,
166 ncu_spc3_core_enable_status,
167 ncu_spc4_core_enable_status,
168 ncu_spc5_core_enable_status,
169 ncu_spc6_core_enable_status,
170 ncu_spc7_core_enable_status,
171 ncu_spc_pm,
172 ncu_spc_ba01,
173 ncu_spc_ba23,
174 ncu_spc_ba45,
175 ncu_spc_ba67,
176 ncu_tcu_bank_avail,
177 bank_avail,
178 tcu_test_protect,
179 tcu_test_protect_cmp,
180 jtag_csr_wr,
181 jtag_csr_addr,
182 jtag_csr_data,
183 ucb_csr_wr,
184 ucb_csr_addr,
185 ucb_data_out,
186 ac_test_mode,
187 csr_ucb_data,
188 csdel_data,
189 cycle_count,
190 tcu_dcr,
191 de_count,
192 debug_reg_hard_stop_domain_1st,
193 tcu_peu_entestcfg,
194 debug_cycle_counter_stop_to_mbc,
195 mbist_clk_stop_to_mbc,
196 debug_cycle_counter_stop,
197 mbist_clk_stop,
198 cycle_stretch_to_mbc,
199 cycle_stretch);
200wire l1en;
201wire pce_ov;
202wire stop;
203wire se;
204wire siclk;
205wire soclk;
206wire l1clk;
207wire jtag_csr_wr_sync_reg_scanin;
208wire jtag_csr_wr_sync_reg_scanout;
209wire jtag_csr_wr_sync;
210wire mb_tcu_done_36_sync_reg_scanin;
211wire mb_tcu_done_36_sync_reg_scanout;
212wire mb_tcu_done_36_sync;
213wire mb_tcu_fail_36_sync_reg_scanin;
214wire mb_tcu_fail_36_sync_reg_scanout;
215wire mb_tcu_fail_36_sync;
216wire tcu_mbist_sync_en_reg_scanin;
217wire tcu_mbist_sync_en_reg_scanout;
218wire io_cmp_sync_en_local;
219wire cmp_io_sync_en_local;
220wire cmp_io2x_sync_en_local;
221wire tcu_test_protect_cmp_reg_scanin;
222wire tcu_test_protect_cmp_reg_scanout;
223wire tcu_test_protect_sync;
224wire ucb_csr_wr_sync_reg_scanin;
225wire ucb_csr_wr_sync_reg_scanout;
226wire ucb_csr_wr_sync;
227wire ucb_csr_addr_sync_reg_scanin;
228wire ucb_csr_addr_sync_reg_scanout;
229wire [5:0] ucb_csr_addr_sync;
230wire ucb_sel_mbist_mode;
231wire ucb_sel_mbist_bypass;
232wire ucb_sel_mbist_start;
233wire ucb_sel_mbist_abort;
234wire ucb_sel_mbist_result;
235wire ucb_sel_mbist_get_done;
236wire ucb_sel_mbist_get_fail;
237wire ucb_sel_mbist_start_wmr;
238wire ucb_sel_lbist_mode;
239wire ucb_sel_lbist_bypass;
240wire ucb_sel_lbist_start;
241wire ucb_sel_lbist_get_done;
242wire ucb_sel_cycle_count;
243wire ucb_sel_dcr;
244wire ucb_sel_dec;
245wire ucb_sel_clkstp_delay;
246wire ucb_sel_clk_domain;
247wire ucb_sel_peu_entestcfg;
248wire ucb_wr_mbist_mode;
249wire ucb_wr_mbist_bypass;
250wire ucb_wr_mbist_start;
251wire ucb_wr_mbist_abort;
252wire ucb_wr_mbist_start_wmr;
253wire ucb_wr_lbist_mode;
254wire ucb_wr_lbist_bypass;
255wire ucb_wr_lbist_start;
256wire ucb_wr_peu_entestcfg;
257wire jtag_sel_mbist_mode;
258wire jtag_sel_mbist_bypass;
259wire jtag_sel_mbist_start;
260wire jtag_sel_mbist_abort;
261wire jtag_sel_mbist_start_wmr;
262wire jtag_sel_lbist_mode;
263wire jtag_sel_lbist_bypass;
264wire jtag_sel_lbist_start;
265wire jtag_sel_lbist_abort;
266wire jtag_wr_mbist_mode;
267wire jtag_wr_mbist_bypass;
268wire jtag_wr_mbist_start;
269wire jtag_wr_mbist_abort;
270wire jtag_wr_mbist_start_wmr;
271wire jtag_wr_lbist_mode;
272wire jtag_wr_lbist_bypass;
273wire jtag_wr_lbist_start;
274wire jtag_wr_lbist_abort;
275wire [3:0] csr_mbist_mode_din;
276wire [3:0] csr_mbist_mode;
277wire csr_mbist_mode_reg_scanin;
278wire csr_mbist_mode_reg_scanout;
279wire tcu_mbist_loop_mode;
280wire parallel;
281wire hold_start;
282wire [47:0] csr_mbist_bypass_din;
283wire [47:0] csr_mbist_bypass;
284wire csr_mbist_bypass_reg_scanin;
285wire csr_mbist_bypass_reg_scanout;
286wire csr_mbist_start_reg_scanin;
287wire csr_mbist_start_reg_scanout;
288wire csr_mbist_start;
289wire csr_mbist_abort_din;
290wire csr_mbist_abort_reg_scanin;
291wire csr_mbist_abort_reg_scanout;
292wire csr_mbist_abort;
293wire csr_mbist_abort_d_reg_scanin;
294wire csr_mbist_abort_d_reg_scanout;
295wire csr_mbist_abort_d;
296wire csr_mbist_abort_up;
297wire csr_mbist_start_wmr_din;
298wire clr_mbist_start_wmr;
299wire csr_mbist_start_wmr;
300wire csr_mbist_start_wmr_reg_scanin;
301wire csr_mbist_start_wmr_reg_scanout;
302wire [47:0] mbist_done_din;
303wire mbist_start_io_sync;
304wire [47:0] mbist_skip;
305wire [47:0] mb_tcu_done_d;
306wire mbist_done_reg_scanin;
307wire mbist_done_reg_scanout;
308wire [47:0] mbist_fail_din;
309wire [47:0] mb_tcu_fail_d;
310wire mbist_fail_reg_scanin;
311wire mbist_fail_reg_scanout;
312wire [1:0] mbist_done_fail_din;
313wire [47:0] mbist_skip_or_done;
314wire mbist_done_fail_reg_scanin;
315wire mbist_done_fail_reg_scanout;
316wire mbist_all_done;
317wire mbist_all_done_real_time;
318wire mbist_one_fail_real_time;
319wire [1:0] csr_lbist_mode_din;
320wire [1:0] csr_lbist_mode;
321wire csr_lbist_mode_reg_scanin;
322wire csr_lbist_mode_reg_scanout;
323wire [7:0] csr_lbist_bypass_din;
324wire [7:0] csr_lbist_bypass;
325wire csr_lbist_bypass_reg_scanin;
326wire csr_lbist_bypass_reg_scanout;
327wire csr_lbist_start_din;
328wire lbist_all_done;
329wire csr_lbist_start;
330wire csr_lbist_start_reg_scanin;
331wire csr_lbist_start_reg_scanout;
332wire csr_lbist_start_d_reg_scanin;
333wire csr_lbist_start_d_reg_scanout;
334wire csr_lbist_start_d;
335wire csr_lbist_start_up;
336wire [7:0] csr_lbist_done_din;
337wire [7:0] csr_lbist_done;
338wire csr_lbist_done_reg_scanin;
339wire csr_lbist_done_reg_scanout;
340wire csr_peu_entestcfg_din;
341wire csr_peu_entestcfg;
342wire csr_peu_entestcfg_reg_scanin;
343wire csr_peu_entestcfg_reg_scanout;
344wire [63:0] csr_ucb_data_din;
345wire csr_ucb_data_reg_scanin;
346wire csr_ucb_data_reg_scanout;
347wire start_bisx_por_d_reg_scanin;
348wire start_bisx_por_d_reg_scanout;
349wire start_bisx_por_d;
350wire start_bisx_por_up;
351wire [3:0] state;
352wire bisx_counter_en;
353wire bisx_time_out;
354wire tcu_mbist_state_reg_scanin;
355wire tcu_mbist_state_reg_scanout;
356wire mbist_start_io_sync_reg_scanin;
357wire mbist_start_io_sync_reg_scanout;
358wire hold_start_reg_scanin;
359wire hold_start_reg_scanout;
360wire clr_mbist_start_wmr_reg_scanin;
361wire clr_mbist_start_wmr_reg_scanout;
362wire tcu_mbist_user_mode_reg_scanin;
363wire tcu_mbist_user_mode_reg_scanout;
364wire [17:0] mb_tcu_done_stg_din;
365wire mb_tcu_done_stg_reg_scanin;
366wire mb_tcu_done_stg_reg_scanout;
367wire [17:0] mb_tcu_done_stg;
368wire [31:0] mb_tcu_done_d_cmp_din;
369wire mb_tcu_done_d_cmp_reg_scanin;
370wire mb_tcu_done_d_cmp_reg_scanout;
371wire [31:0] mb_tcu_done_d_cmp;
372wire [15:0] mb_tcu_done_d_io_din;
373wire mb_tcu_done_d_io_reg_scanin;
374wire mb_tcu_done_d_io_reg_scanout;
375wire [15:0] mb_tcu_done_d_io;
376wire [17:0] mb_tcu_fail_stg_din;
377wire mb_tcu_fail_stg_reg_scanin;
378wire mb_tcu_fail_stg_reg_scanout;
379wire [17:0] mb_tcu_fail_stg;
380wire [31:0] mb_tcu_fail_d_cmp_din;
381wire mb_tcu_fail_d_cmp_reg_scanin;
382wire mb_tcu_fail_d_cmp_reg_scanout;
383wire [31:0] mb_tcu_fail_d_cmp;
384wire [15:0] mb_tcu_fail_d_io_din;
385wire mb_tcu_fail_d_io_reg_scanin;
386wire mb_tcu_fail_d_io_reg_scanout;
387wire [15:0] mb_tcu_fail_d_io;
388wire [7:0] tcu_core_avail;
389wire [7:0] core_avail_din;
390wire core_avail_reg_scanin;
391wire core_avail_reg_scanout;
392wire [7:0] bank_avail_din;
393wire bank_avail_reg_scanin;
394wire bank_avail_reg_scanout;
395wire [7:0] ncu_core_enable_status;
396wire [7:0] core_enable_status_din;
397wire [7:0] core_enable_status;
398wire core_enable_status_reg_scanin;
399wire core_enable_status_reg_scanout;
400wire [4:0] ncu_bank_enable_status;
401wire [4:0] bank_enable_status_din;
402wire [4:0] bank_enable_status;
403wire bank_enable_status_reg_scanin;
404wire bank_enable_status_reg_scanout;
405wire [7:0] bank_enable_status_8;
406wire [3:0] bank_avail_4;
407wire [47:0] not_core_avail_48;
408wire [47:0] not_core_enable_48;
409wire [47:0] not_bank_avail_48;
410wire [47:0] not_bank_enable_48;
411wire prev_skip_done_reg_scanin;
412wire prev_skip_done_reg_scanout;
413wire [47:0] tcu_mb_start_din;
414wire [31:0] tcu_mb_start_d_cmp_din;
415wire tcu_mb_start_d_cmp_reg_scanin;
416wire tcu_mb_start_d_cmp_reg_scanout;
417wire [31:0] tcu_mb_start_d_cmp;
418wire [17:0] tcu_mb_start_d2_cmp_din;
419wire tcu_mb_start_d2_cmp_reg_scanin;
420wire tcu_mb_start_d2_cmp_reg_scanout;
421wire [17:0] tcu_mb_start_d2_cmp;
422wire [15:0] tcu_mb_start_d_io_din;
423wire tcu_mb_start_d_io_reg_scanin;
424wire tcu_mb_start_d_io_reg_scanout;
425wire [15:0] tcu_mb_start_d_io;
426wire tcu_bisx_done_reg_scanin;
427wire tcu_bisx_done_reg_scanout;
428wire bisx_counter_en_reg_scanin;
429wire bisx_counter_en_reg_scanout;
430wire [31:0] bisx_counter_din;
431wire [31:0] bisx_counter;
432wire bisx_counter_reg_scanin;
433wire bisx_counter_reg_scanout;
434wire tcu_lb_tcu_done_reg_scanin;
435wire tcu_lb_tcu_done_reg_scanout;
436wire [7:0] lb_prev_clear;
437wire [7:0] lbist_skip_or_done;
438wire lbist_all_done_din;
439wire lbist_all_done_reg_scanin;
440wire lbist_all_done_reg_scanout;
441wire [7:0] lb_start;
442wire tcu_lbist_start_reg_scanin;
443wire tcu_lbist_start_reg_scanout;
444wire tcu_mb_clkstop_reg_scanin;
445wire tcu_mb_clkstop_reg_scanout;
446wire mb_clkstop_req;
447wire tcu_dmo_ctl_scanin;
448wire tcu_dmo_ctl_scanout;
449wire spare_flops_scanin;
450wire spare_flops_scanout;
451wire [11:0] spare_flops_d;
452wire [11:0] spare_flops_q;
453wire spare9_flop_d;
454wire spare3_flop_d;
455wire spare0_flop_d;
456wire [11:1] spare_flops_unused;
457wire spare9_flop_q;
458wire spare3_flop_q;
459wire spare0_flop_q;
460
461
462// global
463input l2clk;
464input scan_in;
465output scan_out;
466input tcu_int_aclk;
467input tcu_int_bclk;
468input tcu_int_se;
469input tcu_int_ce;
470input tcu_pce_ov;
471
472// Interface with sigmux_ctl
473input tcu_rst_flush_init_ack;
474input start_bisx_por;
475input start_bisx_wmr;
476input stop_bisx_wmr;
477output tcu_bisx_done;
478output mbist_clk_stop_req;
479
480// JTAG interface
481output [47:0] mbist_done;
482output [47:0] mbist_fail;
483output [1:0] mbist_done_fail;
484output [7:0] core_avail;
485input mbist_clkstpen;
486
487output [7:0] lb_tcu_done_d;
488
489// core/SOC interface
490input [47:0] mb_tcu_done;
491input [47:0] mb_tcu_fail;
492output [47:0] tcu_mb_start;
493output tcu_mbist_bisi_en;
494output tcu_mbist_user_mode;
495
496input [7:0] lb_tcu_done;
497output [7:0] tcu_spc_lbist_start;
498
499// DMO Memory BIST Direct-Output Observe: For SPCs
500output [5:0] dmo_coresel; // to SPC {4,5,1,6,7,3}
501output dmo_dcmuxctl; // to all SPCs
502output dmo_icmuxctl; // to all SPCs
503
504input [35:0] spc4_dmo_dout; // Mux'ed data from spc4
505input [35:0] spc6_dmo_dout; // Mux'ed data from spc6
506
507// DMO MBIST Direct Observe: For L2 Tags
508input [38:0] l2t4_dmo_dout; // Mux'ed data from l2t4
509input [38:0] l2t6_dmo_dout; // Mux'ed data from l2t6
510
511output [5:0] dmo_l2tsel; // to l2t {1,5,4 & 3,7,6}
512output dmo_tagmuxctl; // to all l2ts
513
514// DMO MBIST Direct Observe: For NIU (RTX, RDP, TDS)
515input [39:0] rtx_tcu_dmo_data_out;
516input [39:0] tds_tcu_dmo_dout;
517input [39:0] rdp_tcu_dmo_dout;
518
519output [2:0] tcu_rtx_dmo_ctl; // Mux Control
520
521// DMO Output to MIO (Chip Pins)
522output [39:0] tcu_mio_dmo_data; // final data to pins
523output tcu_mio_dmo_sync;
524output tcu_mio_mbist_done;
525output tcu_mio_mbist_fail;
526output tcu_mio_jtag_membist_mode;
527
528// DMO JTAG Interface
529input jtag_dmo_enable; // enables DMO port
530input jtag_dmo_control_upd;
531input [47:0] jtag_dmo_control;
532output [47:0] dmo_cfg;
533
534// Synchronizer
535input cmp_io2x_sync_en;
536input io_cmp_sync_en;
537input cmp_io_sync_en;
538
539// NCU interface
540input ncu_spc0_core_available;
541input ncu_spc1_core_available;
542input ncu_spc2_core_available;
543input ncu_spc3_core_available;
544input ncu_spc4_core_available;
545input ncu_spc5_core_available;
546input ncu_spc6_core_available;
547input ncu_spc7_core_available;
548input ncu_spc0_core_enable_status;
549input ncu_spc1_core_enable_status;
550input ncu_spc2_core_enable_status;
551input ncu_spc3_core_enable_status;
552input ncu_spc4_core_enable_status;
553input ncu_spc5_core_enable_status;
554input ncu_spc6_core_enable_status;
555input ncu_spc7_core_enable_status;
556input ncu_spc_pm;
557input ncu_spc_ba01;
558input ncu_spc_ba23;
559input ncu_spc_ba45;
560input ncu_spc_ba67;
561
562input [7:0] ncu_tcu_bank_avail;
563output [7:0] bank_avail;
564
565// UCB/CSR Related
566input tcu_test_protect;
567output tcu_test_protect_cmp;
568input jtag_csr_wr;
569input [5:0] jtag_csr_addr;
570input [47:0] jtag_csr_data;
571input ucb_csr_wr;
572input [5:0] ucb_csr_addr;
573input [63:0] ucb_data_out;
574input ac_test_mode;
575
576output [63:0] csr_ucb_data;
577
578input [6:0] csdel_data; // From sigmux_ctl
579input [63:0] cycle_count; // From dbg_ctl
580input [3:0] tcu_dcr; // From dbg_ctl
581input [31:0] de_count; // From dbg_ctl
582input [23:0] debug_reg_hard_stop_domain_1st; // From regs_ctl
583
584output tcu_peu_entestcfg;
585
586// For ECO C to use spare flops to flop these signals for timing
587input debug_cycle_counter_stop_to_mbc; // ECO C
588input mbist_clk_stop_to_mbc; // ECO C
589output debug_cycle_counter_stop; // ECO C
590output mbist_clk_stop; // ECO C
591// For ECO D to use spare flops to flop these signals for timing
592input cycle_stretch_to_mbc; // ECO D
593output cycle_stretch; // ECO D
594
595reg hold_start_din;
596reg set_bisi_en;
597reg clr_done_fail;
598reg clr_mbist_start_wmr_din;
599reg csr_mbist_start_din;
600reg tcu_bisx_done_din;
601reg bisx_counter_en_din;
602reg [3:0] next_state;
603
604wire [47:1] prev_skip_done;
605wire [47:1] prev_skip_done_din;
606
607// Scan reassigns
608assign l1en = tcu_int_ce;
609assign pce_ov = tcu_pce_ov;
610assign stop = 1'b0;
611assign se = tcu_int_se;
612assign siclk = tcu_int_aclk;
613assign soclk = tcu_int_bclk;
614
615tcu_mbist_ctl_l1clkhdr_ctl_macro ucb_clkgen (
616 .l2clk (l2clk),
617 .l1clk (l1clk ),
618 .l1en(l1en),
619 .pce_ov(pce_ov),
620 .stop(stop),
621 .se(se));
622
623//================================================================================
624// Synchronizers
625// TCK -> CMP
626//================================================================================
627cl_sc1_clksyncff_4x jtag_csr_wr_sync_reg (
628 .si ( jtag_csr_wr_sync_reg_scanin ),
629 .so ( jtag_csr_wr_sync_reg_scanout ),
630 .l1clk ( l1clk ),
631 .d ( jtag_csr_wr ),
632 .q ( jtag_csr_wr_sync ),
633 .siclk(siclk),
634 .soclk(soclk));
635
636//================================================================================
637// Synchronizers
638// SERDES -> CMP
639//================================================================================
640cl_sc1_clksyncff_4x mb_tcu_done_36_sync_reg (
641 .si ( mb_tcu_done_36_sync_reg_scanin ),
642 .so ( mb_tcu_done_36_sync_reg_scanout ),
643 .l1clk ( l1clk ),
644 .d ( mb_tcu_done[36] ),
645 .q ( mb_tcu_done_36_sync ),
646 .siclk(siclk),
647 .soclk(soclk));
648
649cl_sc1_clksyncff_4x mb_tcu_fail_36_sync_reg (
650 .si ( mb_tcu_fail_36_sync_reg_scanin ),
651 .so ( mb_tcu_fail_36_sync_reg_scanout ),
652 .l1clk ( l1clk ),
653 .d ( mb_tcu_fail[36] ),
654 .q ( mb_tcu_fail_36_sync ),
655 .siclk(siclk),
656 .soclk(soclk));
657
658//================================================================================
659// Flop the Sync Enable Output from clkgen_tcu_cmp
660//================================================================================
661tcu_mbist_ctl_msff_ctl_macro__width_3 tcu_mbist_sync_en_reg (
662 .scan_in ( tcu_mbist_sync_en_reg_scanin ),
663 .scan_out ( tcu_mbist_sync_en_reg_scanout ),
664 .l1clk ( l1clk ),
665 .din ( {io_cmp_sync_en, cmp_io_sync_en, cmp_io2x_sync_en} ),
666 .dout ( {io_cmp_sync_en_local, cmp_io_sync_en_local, cmp_io2x_sync_en_local} ),
667 .siclk(siclk),
668 .soclk(soclk));
669
670//================================================================================
671// Synchronize tcu_test_protect
672//================================================================================
673tcu_mbist_ctl_msff_ctl_macro__en_1__width_1 tcu_test_protect_cmp_reg (
674 .scan_in ( tcu_test_protect_cmp_reg_scanin ),
675 .scan_out ( tcu_test_protect_cmp_reg_scanout ),
676 .l1clk ( l1clk ),
677 .en ( io_cmp_sync_en_local ),
678 .din ( tcu_test_protect ),
679 .dout ( tcu_test_protect_sync ),
680 .siclk(siclk),
681 .soclk(soclk));
682
683assign tcu_test_protect_cmp = ac_test_mode | tcu_test_protect_sync;
684
685//==================================================
686// UCB CREG Access
687//==================================================
688//================================================================================
689// Synchronize ucb_csr_wr
690// FROM IO to CMP
691//================================================================================
692tcu_mbist_ctl_msff_ctl_macro__en_1__width_1 ucb_csr_wr_sync_reg (
693 .scan_in ( ucb_csr_wr_sync_reg_scanin ),
694 .scan_out ( ucb_csr_wr_sync_reg_scanout ),
695 .l1clk ( l1clk ),
696 .en ( io_cmp_sync_en_local ),
697 .din ( ucb_csr_wr ),
698 .dout ( ucb_csr_wr_sync ),
699 .siclk(siclk),
700 .soclk(soclk));
701
702tcu_mbist_ctl_msff_ctl_macro__en_1__width_6 ucb_csr_addr_sync_reg (
703 .scan_in ( ucb_csr_addr_sync_reg_scanin ),
704 .scan_out ( ucb_csr_addr_sync_reg_scanout ),
705 .l1clk ( l1clk ),
706 .en ( io_cmp_sync_en_local ),
707 .din ( ucb_csr_addr[5:0] ),
708 .dout ( ucb_csr_addr_sync[5:0] ),
709 .siclk(siclk),
710 .soclk(soclk));
711
712assign ucb_sel_mbist_mode = (ucb_csr_addr_sync == 6'h0);
713assign ucb_sel_mbist_bypass = (ucb_csr_addr_sync == 6'h1);
714assign ucb_sel_mbist_start = (ucb_csr_addr_sync == 6'h2);
715assign ucb_sel_mbist_abort = (ucb_csr_addr_sync == 6'h3);
716assign ucb_sel_mbist_result = (ucb_csr_addr_sync == 6'h4);
717assign ucb_sel_mbist_get_done = (ucb_csr_addr_sync == 6'h5);
718assign ucb_sel_mbist_get_fail = (ucb_csr_addr_sync == 6'h6);
719assign ucb_sel_mbist_start_wmr = (ucb_csr_addr_sync == 6'h7);
720assign ucb_sel_lbist_mode = (ucb_csr_addr_sync == 6'h8);
721assign ucb_sel_lbist_bypass = (ucb_csr_addr_sync == 6'h9);
722assign ucb_sel_lbist_start = (ucb_csr_addr_sync == 6'hA);
723assign ucb_sel_lbist_get_done = (ucb_csr_addr_sync == 6'hC);
724assign ucb_sel_cycle_count = (ucb_csr_addr_sync == 6'h20);
725assign ucb_sel_dcr = (ucb_csr_addr_sync == 6'h21);
726assign ucb_sel_dec = (ucb_csr_addr_sync == 6'h23);
727assign ucb_sel_clkstp_delay = (ucb_csr_addr_sync == 6'h24);
728assign ucb_sel_clk_domain = (ucb_csr_addr_sync == 6'h25);
729assign ucb_sel_peu_entestcfg = (ucb_csr_addr_sync == 6'h30);
730
731
732assign ucb_wr_mbist_mode = ucb_csr_wr_sync && ucb_sel_mbist_mode;
733assign ucb_wr_mbist_bypass = ucb_csr_wr_sync && ucb_sel_mbist_bypass;
734assign ucb_wr_mbist_start = ucb_csr_wr_sync && ucb_sel_mbist_start && ucb_data_out[0];
735assign ucb_wr_mbist_abort = ucb_csr_wr_sync && ucb_sel_mbist_abort && ucb_data_out[0];
736assign ucb_wr_mbist_start_wmr = ucb_csr_wr_sync && ucb_sel_mbist_start_wmr && ucb_data_out[0];
737assign ucb_wr_lbist_mode = ucb_csr_wr_sync && ucb_sel_lbist_mode;
738assign ucb_wr_lbist_bypass = ucb_csr_wr_sync && ucb_sel_lbist_bypass;
739assign ucb_wr_lbist_start = ucb_csr_wr_sync && ucb_sel_lbist_start;
740assign ucb_wr_peu_entestcfg = ucb_csr_wr_sync && ucb_sel_peu_entestcfg;
741
742assign jtag_sel_mbist_mode = (jtag_csr_addr == 6'h0);
743assign jtag_sel_mbist_bypass = (jtag_csr_addr == 6'h1);
744assign jtag_sel_mbist_start = (jtag_csr_addr == 6'h2);
745assign jtag_sel_mbist_abort = (jtag_csr_addr == 6'h3);
746assign jtag_sel_mbist_start_wmr = (jtag_csr_addr == 6'h7);
747assign jtag_sel_lbist_mode = (jtag_csr_addr == 6'h8);
748assign jtag_sel_lbist_bypass = (jtag_csr_addr == 6'h9);
749assign jtag_sel_lbist_start = (jtag_csr_addr == 6'hA);
750assign jtag_sel_lbist_abort = (jtag_csr_addr == 6'hB);
751
752assign jtag_wr_mbist_mode = jtag_csr_wr_sync && jtag_sel_mbist_mode;
753assign jtag_wr_mbist_bypass = jtag_csr_wr_sync && jtag_sel_mbist_bypass;
754assign jtag_wr_mbist_start = jtag_csr_wr_sync && jtag_sel_mbist_start;
755assign jtag_wr_mbist_abort = jtag_csr_wr_sync && jtag_sel_mbist_abort;
756assign jtag_wr_mbist_start_wmr = jtag_csr_wr_sync && jtag_sel_mbist_start_wmr;
757assign jtag_wr_lbist_mode = jtag_csr_wr_sync && jtag_sel_lbist_mode;
758assign jtag_wr_lbist_bypass = jtag_csr_wr_sync && jtag_sel_lbist_bypass;
759assign jtag_wr_lbist_start = jtag_csr_wr_sync && jtag_sel_lbist_start;
760assign jtag_wr_lbist_abort = jtag_csr_wr_sync && jtag_sel_lbist_abort;
761
762
763//==================================================
764// MBIST MODE CREG
765//==================================================
766assign {csr_mbist_mode_din[3:2], csr_mbist_mode_din[0]} =
767 jtag_wr_mbist_mode ? {jtag_csr_data[3:2], jtag_csr_data[0]} :
768 ucb_wr_mbist_mode ? {ucb_data_out[3:2], ucb_data_out[0]} :
769 {csr_mbist_mode[3:2], csr_mbist_mode[0]};
770
771assign csr_mbist_mode_din[1] = jtag_wr_mbist_mode ? jtag_csr_data[1] :
772 ucb_wr_mbist_mode ? ucb_data_out[1] :
773 set_bisi_en ? 1'b1 :
774 tcu_mbist_bisi_en;
775
776tcu_mbist_ctl_msff_ctl_macro__width_4 csr_mbist_mode_reg (
777 .scan_in ( csr_mbist_mode_reg_scanin ),
778 .scan_out ( csr_mbist_mode_reg_scanout ),
779 .l1clk ( l1clk ),
780 .din ( csr_mbist_mode_din[3:0] ),
781 .dout ( csr_mbist_mode[3:0] ),
782 .siclk(siclk),
783 .soclk(soclk));
784
785assign tcu_mbist_loop_mode = csr_mbist_mode[3];
786assign tcu_mbist_bisi_en = csr_mbist_mode[1];
787assign parallel = csr_mbist_mode[0] || hold_start;
788
789//==================================================
790// MBIST BYPASS CREG
791//==================================================
792assign csr_mbist_bypass_din[47:0] = jtag_wr_mbist_bypass ? jtag_csr_data[47:0] :
793 ucb_wr_mbist_bypass ? ucb_data_out[47:0] :
794 csr_mbist_bypass[47:0];
795tcu_mbist_ctl_msff_ctl_macro__width_48 csr_mbist_bypass_reg (
796 .scan_in ( csr_mbist_bypass_reg_scanin ),
797 .scan_out ( csr_mbist_bypass_reg_scanout ),
798 .l1clk ( l1clk ),
799 .din ( csr_mbist_bypass_din[47:0] ),
800 .dout ( csr_mbist_bypass[47:0] ),
801 .siclk(siclk),
802 .soclk(soclk));
803
804
805//==================================================
806// MBIST START CREG
807//==================================================
808tcu_mbist_ctl_msff_ctl_macro__width_1 csr_mbist_start_reg (
809 .scan_in ( csr_mbist_start_reg_scanin ),
810 .scan_out ( csr_mbist_start_reg_scanout ),
811 .l1clk ( l1clk ),
812 .din ( csr_mbist_start_din ),
813 .dout ( csr_mbist_start ),
814 .siclk(siclk),
815 .soclk(soclk));
816
817
818//==================================================
819// MBIST ABORT CREG
820//==================================================
821assign csr_mbist_abort_din = jtag_wr_mbist_abort ? 1'b1 :
822 ucb_wr_mbist_abort ? ucb_data_out[0] : 1'b0;
823tcu_mbist_ctl_msff_ctl_macro__width_1 csr_mbist_abort_reg (
824 .scan_in ( csr_mbist_abort_reg_scanin ),
825 .scan_out ( csr_mbist_abort_reg_scanout ),
826 .l1clk ( l1clk ),
827 .din ( csr_mbist_abort_din ),
828 .dout ( csr_mbist_abort ),
829 .siclk(siclk),
830 .soclk(soclk));
831
832tcu_mbist_ctl_msff_ctl_macro__width_1 csr_mbist_abort_d_reg (
833 .scan_in ( csr_mbist_abort_d_reg_scanin ),
834 .scan_out ( csr_mbist_abort_d_reg_scanout ),
835 .l1clk ( l1clk ),
836 .din ( csr_mbist_abort ),
837 .dout ( csr_mbist_abort_d ),
838 .siclk(siclk),
839 .soclk(soclk));
840
841assign csr_mbist_abort_up = csr_mbist_abort && !csr_mbist_abort_d;
842
843//==================================================
844// MBIST START WMR CREG
845//==================================================
846assign csr_mbist_start_wmr_din = jtag_wr_mbist_start_wmr ? jtag_csr_data[0] :
847 ucb_wr_mbist_start_wmr ? ucb_data_out[0] :
848 clr_mbist_start_wmr ? 1'b0 :
849 csr_mbist_start_wmr;
850tcu_mbist_ctl_msff_ctl_macro__width_1 csr_mbist_start_wmr_reg (
851 .scan_in ( csr_mbist_start_wmr_reg_scanin ),
852 .scan_out ( csr_mbist_start_wmr_reg_scanout ),
853 .l1clk ( l1clk ),
854 .din ( csr_mbist_start_wmr_din ),
855 .dout ( csr_mbist_start_wmr ),
856 .siclk(siclk),
857 .soclk(soclk));
858
859
860//==================================================
861// MBIST DONE CREG
862//==================================================
863assign mbist_done_din[47:0] =
864 clr_done_fail ? 48'h0 :
865 mbist_start_io_sync ? ((~mbist_skip & mb_tcu_done_d) | mbist_done):
866 mbist_done;
867
868tcu_mbist_ctl_msff_ctl_macro__width_48 mbist_done_reg (
869 .scan_in ( mbist_done_reg_scanin ),
870 .scan_out ( mbist_done_reg_scanout ),
871 .l1clk ( l1clk ),
872 .din ( mbist_done_din[47:0] ),
873 .dout ( mbist_done[47:0] ),
874 .siclk(siclk),
875 .soclk(soclk));
876
877
878//================================================================================
879// MBIST FAIL
880// Reset to 0 before starting a new MBIST operation
881// When DONE comes back capture FAIL signals
882//================================================================================
883assign mbist_fail_din =
884 clr_done_fail ? 48'h0 :
885 mbist_start_io_sync ? ((~mbist_skip & mb_tcu_fail_d) | mbist_fail) :
886 mbist_fail;
887
888tcu_mbist_ctl_msff_ctl_macro__width_48 mbist_fail_reg (
889 .scan_in ( mbist_fail_reg_scanin ),
890 .scan_out ( mbist_fail_reg_scanout ),
891 .l1clk ( l1clk ),
892 .din ( mbist_fail_din[47:0] ),
893 .dout ( mbist_fail[47:0] ),
894 .siclk(siclk),
895 .soclk(soclk));
896
897
898//==================================================
899// MBIST RESULT CREG
900//==================================================
901assign mbist_done_fail_din[1:0] = clr_done_fail ? 2'b0 :
902 {(&mbist_skip_or_done && !(&mbist_skip)), |mbist_fail};
903tcu_mbist_ctl_msff_ctl_macro__width_2 mbist_done_fail_reg (
904 .scan_in ( mbist_done_fail_reg_scanin ),
905 .scan_out ( mbist_done_fail_reg_scanout ),
906 .l1clk ( l1clk ),
907 .din ( mbist_done_fail_din[1:0] ),
908 .dout ( mbist_done_fail[1:0] ),
909 .siclk(siclk),
910 .soclk(soclk));
911
912assign mbist_all_done = mbist_done_fail[1];
913
914assign mbist_all_done_real_time = mbist_done_fail_din[1];
915assign mbist_one_fail_real_time = mbist_done_fail_din[0];
916
917
918//==================================================
919// LBIST MODE CREG
920//==================================================
921assign csr_lbist_mode_din[1:0] = jtag_wr_lbist_abort ? 2'b0 :
922 jtag_wr_lbist_mode ? jtag_csr_data[1:0] :
923 ucb_wr_lbist_mode ? ucb_data_out[1:0] :
924 csr_lbist_mode[1:0];
925tcu_mbist_ctl_msff_ctl_macro__width_2 csr_lbist_mode_reg (
926 .scan_in ( csr_lbist_mode_reg_scanin ),
927 .scan_out ( csr_lbist_mode_reg_scanout ),
928 .l1clk ( l1clk ),
929 .din ( csr_lbist_mode_din[1:0] ),
930 .dout ( csr_lbist_mode[1:0] ),
931 .siclk(siclk),
932 .soclk(soclk));
933
934
935//==================================================
936// LBIST BYPASS CREG
937//==================================================
938assign csr_lbist_bypass_din[7:0] = jtag_wr_lbist_abort ? 8'h0 :
939 jtag_wr_lbist_bypass ? jtag_csr_data[7:0] :
940 ucb_wr_lbist_bypass ? ucb_data_out[7:0] :
941 csr_lbist_bypass[7:0];
942tcu_mbist_ctl_msff_ctl_macro__width_8 csr_lbist_bypass_reg (
943 .scan_in ( csr_lbist_bypass_reg_scanin ),
944 .scan_out ( csr_lbist_bypass_reg_scanout ),
945 .l1clk ( l1clk ),
946 .din ( csr_lbist_bypass_din[7:0] ),
947 .dout ( csr_lbist_bypass[7:0] ),
948 .siclk(siclk),
949 .soclk(soclk));
950
951
952//==================================================
953// LBIST START CREG
954//==================================================
955assign csr_lbist_start_din = jtag_wr_lbist_abort ? 1'b0 :
956 jtag_wr_lbist_start ? 1'b1 :
957 ucb_wr_lbist_start ? ucb_data_out[0] :
958 lbist_all_done ? 1'b0 :
959 csr_lbist_start;
960tcu_mbist_ctl_msff_ctl_macro__width_1 csr_lbist_start_reg (
961 .scan_in ( csr_lbist_start_reg_scanin ),
962 .scan_out ( csr_lbist_start_reg_scanout ),
963 .l1clk ( l1clk ),
964 .din ( csr_lbist_start_din ),
965 .dout ( csr_lbist_start ),
966 .siclk(siclk),
967 .soclk(soclk));
968
969tcu_mbist_ctl_msff_ctl_macro__width_1 csr_lbist_start_d_reg (
970 .scan_in ( csr_lbist_start_d_reg_scanin ),
971 .scan_out ( csr_lbist_start_d_reg_scanout ),
972 .l1clk ( l1clk ),
973 .din ( csr_lbist_start ),
974 .dout ( csr_lbist_start_d ),
975 .siclk(siclk),
976 .soclk(soclk));
977
978assign csr_lbist_start_up = csr_lbist_start && !csr_lbist_start_d;
979
980//==================================================
981// LBIST DONE
982//==================================================
983assign csr_lbist_done_din[7:0] = csr_lbist_start_up ?
984 8'h0 :
985 (csr_lbist_done | lb_tcu_done_d);
986
987tcu_mbist_ctl_msff_ctl_macro__width_8 csr_lbist_done_reg (
988 .scan_in ( csr_lbist_done_reg_scanin ),
989 .scan_out ( csr_lbist_done_reg_scanout ),
990 .l1clk ( l1clk ),
991 .din ( csr_lbist_done_din[7:0] ),
992 .dout ( csr_lbist_done[7:0] ),
993 .siclk(siclk),
994 .soclk(soclk));
995
996
997//==================================================
998// PEU Test Config Enable
999// CSR Only. No JTAG Access
1000//==================================================
1001assign csr_peu_entestcfg_din = ucb_wr_peu_entestcfg ?
1002 ucb_data_out[0] :
1003 csr_peu_entestcfg;
1004
1005tcu_mbist_ctl_msff_ctl_macro__width_1 csr_peu_entestcfg_reg (
1006 .scan_in ( csr_peu_entestcfg_reg_scanin ),
1007 .scan_out ( csr_peu_entestcfg_reg_scanout ),
1008 .l1clk ( l1clk ),
1009 .din ( csr_peu_entestcfg_din ),
1010 .dout ( csr_peu_entestcfg ),
1011 .siclk(siclk),
1012 .soclk(soclk));
1013
1014assign tcu_peu_entestcfg = csr_peu_entestcfg;
1015
1016//==================================================
1017// Send CSR Read Back to UCB
1018//==================================================
1019assign csr_ucb_data_din =
1020 ucb_sel_mbist_mode ? {60'h0, csr_mbist_mode[3:0]} :
1021 ucb_sel_mbist_bypass ? {16'h0, csr_mbist_bypass[47:0]} :
1022 ucb_sel_mbist_start ? {63'h0, csr_mbist_start} :
1023 ucb_sel_mbist_abort ? {63'h0, csr_mbist_abort} :
1024 ucb_sel_mbist_result ? {62'h0, mbist_done_fail[1:0]} :
1025 ucb_sel_mbist_get_done ? {16'h0, mbist_done} :
1026 ucb_sel_mbist_get_fail ? {16'h0, mbist_fail} :
1027 ucb_sel_mbist_start_wmr ? {63'h0, csr_mbist_start_wmr} :
1028 ucb_sel_lbist_mode ? {62'h0, csr_lbist_mode[1:0]} :
1029 ucb_sel_lbist_bypass ? {56'h0, csr_lbist_bypass[7:0]} :
1030 ucb_sel_lbist_start ? {63'h0, csr_lbist_start} :
1031 ucb_sel_lbist_get_done ? {56'h0, csr_lbist_done[7:0]} :
1032 ucb_sel_cycle_count ? cycle_count :
1033 ucb_sel_dcr ? {60'h0, tcu_dcr} :
1034 ucb_sel_dec ? {32'h0, de_count} :
1035 ucb_sel_clkstp_delay ? {57'h0, csdel_data} :
1036 ucb_sel_peu_entestcfg ? {63'h0, csr_peu_entestcfg} :
1037 ucb_sel_clk_domain ? {40'h0, debug_reg_hard_stop_domain_1st} :
1038 csr_ucb_data;
1039
1040tcu_mbist_ctl_msff_ctl_macro__en_1__width_64 csr_ucb_data_reg (
1041 .scan_in ( csr_ucb_data_reg_scanin ),
1042 .scan_out ( csr_ucb_data_reg_scanout ),
1043 .l1clk ( l1clk ),
1044 .en ( cmp_io_sync_en_local ),
1045 .din ( csr_ucb_data_din[63:0] ),
1046 .dout ( csr_ucb_data[63:0] ),
1047 .siclk(siclk),
1048 .soclk(soclk));
1049
1050
1051tcu_mbist_ctl_msff_ctl_macro__width_1 start_bisx_por_d_reg (
1052 .scan_in ( start_bisx_por_d_reg_scanin ),
1053 .scan_out ( start_bisx_por_d_reg_scanout ),
1054 .l1clk ( l1clk ),
1055 .din ( start_bisx_por ),
1056 .dout ( start_bisx_por_d ),
1057 .siclk(siclk),
1058 .soclk(soclk));
1059
1060assign start_bisx_por_up = start_bisx_por && !start_bisx_por_d;
1061
1062
1063//==================================================
1064// MBIST Control State Machine
1065//==================================================
1066always @(state or clr_mbist_start_wmr or csr_mbist_start or hold_start or
1067 tcu_bisx_done or bisx_counter_en or start_bisx_por_up or
1068 start_bisx_wmr or csr_mbist_start_wmr or jtag_wr_mbist_start or
1069 ucb_wr_mbist_start or csr_mbist_abort_up or tcu_rst_flush_init_ack or
1070 mbist_all_done or tcu_mbist_loop_mode or
1071 bisx_time_out or csr_mbist_mode[1])
1072begin
1073 set_bisi_en = 1'b0;
1074 clr_done_fail = 1'b0;
1075 clr_mbist_start_wmr_din = clr_mbist_start_wmr;
1076 csr_mbist_start_din = csr_mbist_start;
1077 hold_start_din = hold_start;
1078 tcu_bisx_done_din = tcu_bisx_done;
1079 bisx_counter_en_din = bisx_counter_en;
1080 next_state = `MBIST_IDLE;
1081 case (state)
1082 `MBIST_IDLE: begin // 0
1083 clr_mbist_start_wmr_din = 1'b0;
1084 if (start_bisx_por_up)
1085 next_state = `POR_CLR_DF;
1086 else if (start_bisx_wmr)
1087 if (csr_mbist_start_wmr)
1088 next_state = `WMR_CLR_DF;
1089 else
1090 next_state = `WMR_DUMMY;
1091 else if (jtag_wr_mbist_start || ucb_wr_mbist_start)
1092 next_state = `BISX_CLR_DF;
1093 else
1094 next_state = `MBIST_IDLE;
1095 end
1096
1097 `POR_CLR_DF: begin // 1
1098 clr_done_fail = 1'b1;
1099 bisx_counter_en_din = 1'b0;
1100 hold_start_din = 1'b1;
1101 if (csr_mbist_abort_up) begin
1102 next_state = `MBIST_IDLE;
1103 end
1104 else begin
1105 next_state = `POR_START;
1106 set_bisi_en = 1'b1;
1107 end
1108 end
1109
1110 `POR_START: begin // 2
1111 bisx_counter_en_din = 1'b1;
1112 csr_mbist_start_din = 1'b1;
1113 if (csr_mbist_abort_up)
1114 next_state = `POR_CLR_START;
1115 else if (mbist_all_done || bisx_time_out)
1116 next_state = `POR_CLR_START;
1117 else
1118 next_state = `POR_START;
1119 end
1120
1121 `POR_CLR_START: begin // 3
1122 next_state = `POR_END_WAIT;
1123 bisx_counter_en_din = 1'b0;
1124 tcu_bisx_done_din = 1'b1;
1125 end
1126
1127 `POR_END_WAIT: begin // 4
1128 if (csr_mbist_abort_up || tcu_rst_flush_init_ack) begin
1129 next_state = `MBIST_IDLE;
1130 tcu_bisx_done_din = 1'b0;
1131 hold_start_din = 1'b0;
1132 csr_mbist_start_din = 1'b0;
1133 end
1134 else
1135 next_state = `POR_END_WAIT;
1136 end
1137
1138 `WMR_DUMMY: begin // 6 - For asserting tcu_bisx_done when no WMR BISX is programmed
1139 if (csr_mbist_abort_up || tcu_rst_flush_init_ack) begin
1140 tcu_bisx_done_din = 1'b0;
1141 next_state = `MBIST_IDLE;
1142 end
1143 else begin
1144 tcu_bisx_done_din = 1'b1;
1145 next_state = `WMR_DUMMY;
1146 end
1147 end
1148
1149 `WMR_CLR_DF: begin // 7
1150 clr_done_fail = 1'b1;
1151 bisx_counter_en_din = 1'b0;
1152 hold_start_din = 1'b1;
1153 if (csr_mbist_abort_up) begin
1154 next_state = `MBIST_IDLE;
1155 end
1156 else begin
1157 next_state = `WMR_START;
1158 end
1159 end
1160
1161 `WMR_START: begin // 8
1162 bisx_counter_en_din = 1'b1;
1163 if (csr_mbist_abort_up) begin
1164 next_state = `MBIST_IDLE;
1165 csr_mbist_start_din = 1'b0;
1166 end
1167 else if (mbist_all_done || bisx_time_out) begin
1168 next_state = `WMR_CLR_START;
1169 csr_mbist_start_din = 1'b1;
1170 end
1171 else begin
1172 next_state = `WMR_START;
1173 csr_mbist_start_din = 1'b1;
1174 end
1175 end
1176
1177 `WMR_CLR_START: begin // 9
1178 next_state = `WMR_END_WAIT;
1179 clr_mbist_start_wmr_din = 1'b1;
1180 bisx_counter_en_din = 1'b0;
1181 tcu_bisx_done_din = 1'b1;
1182 end
1183
1184 `WMR_END_WAIT: begin // 10
1185 if (csr_mbist_abort_up || tcu_rst_flush_init_ack) begin
1186 next_state = `MBIST_IDLE;
1187 tcu_bisx_done_din = 1'b0;
1188 hold_start_din = 1'b0;
1189 csr_mbist_start_din = 1'b0;
1190 end
1191 else
1192 next_state = `WMR_END_WAIT;
1193 end
1194
1195 `BISX_CLR_DF: begin // 11
1196 clr_done_fail = 1'b1;
1197 bisx_counter_en_din = 1'b0;
1198 if (csr_mbist_abort_up) begin
1199 next_state = `MBIST_IDLE;
1200 end
1201 else begin
1202 next_state = `BISX_START;
1203 end
1204 end
1205
1206 `BISX_START: begin // 12
1207 if (csr_mbist_mode[1]) begin
1208 bisx_counter_en_din = 1'b1;
1209 end
1210 else begin
1211 bisx_counter_en_din = 1'b0;
1212 end
1213 if (csr_mbist_abort_up) begin
1214 next_state = `MBIST_IDLE;
1215 csr_mbist_start_din = 1'b0;
1216 end
1217 else if (mbist_all_done && !tcu_mbist_loop_mode) begin
1218 next_state = `BISX_CLR_START;
1219 csr_mbist_start_din = 1'b1;
1220 end
1221 else begin
1222 next_state = `BISX_START;
1223 csr_mbist_start_din = 1'b1;
1224 end
1225 end
1226
1227 `BISX_CLR_START: begin // 13
1228 next_state = `MBIST_IDLE;
1229 csr_mbist_start_din = 1'b0;
1230 bisx_counter_en_din = 1'b0;
1231 end
1232
1233 default: begin
1234 set_bisi_en = 1'b0;
1235 clr_done_fail = 1'b0;
1236 clr_mbist_start_wmr_din = clr_mbist_start_wmr;
1237 csr_mbist_start_din = csr_mbist_start;
1238 hold_start_din = hold_start;
1239 tcu_bisx_done_din = tcu_bisx_done;
1240 bisx_counter_en_din = bisx_counter_en;
1241 next_state = `MBIST_IDLE;
1242 end
1243 endcase
1244end
1245
1246tcu_mbist_ctl_msff_ctl_macro__width_4 tcu_mbist_state_reg (
1247 .scan_in ( tcu_mbist_state_reg_scanin ),
1248 .scan_out ( tcu_mbist_state_reg_scanout ),
1249 .l1clk ( l1clk ),
1250 .din ( next_state[3:0] ),
1251 .dout ( state[3:0] ),
1252 .siclk(siclk),
1253 .soclk(soclk));
1254
1255
1256tcu_mbist_ctl_msff_ctl_macro__en_1__width_1 mbist_start_io_sync_reg (
1257 .scan_in ( mbist_start_io_sync_reg_scanin ),
1258 .scan_out ( mbist_start_io_sync_reg_scanout ),
1259 .l1clk ( l1clk ),
1260 .en ( cmp_io_sync_en_local ),
1261 .din ( csr_mbist_start ),
1262 .dout ( mbist_start_io_sync ),
1263 .siclk(siclk),
1264 .soclk(soclk));
1265
1266tcu_mbist_ctl_msff_ctl_macro__width_1 hold_start_reg (
1267 .scan_in ( hold_start_reg_scanin ),
1268 .scan_out ( hold_start_reg_scanout ),
1269 .l1clk ( l1clk ),
1270 .din ( hold_start_din ),
1271 .dout ( hold_start ),
1272 .siclk(siclk),
1273 .soclk(soclk));
1274
1275tcu_mbist_ctl_msff_ctl_macro__width_1 clr_mbist_start_wmr_reg (
1276 .scan_in ( clr_mbist_start_wmr_reg_scanin ),
1277 .scan_out ( clr_mbist_start_wmr_reg_scanout ),
1278 .l1clk ( l1clk ),
1279 .din ( clr_mbist_start_wmr_din ),
1280 .dout ( clr_mbist_start_wmr ),
1281 .siclk(siclk),
1282 .soclk(soclk));
1283
1284
1285tcu_mbist_ctl_msff_ctl_macro__en_1__width_1 tcu_mbist_user_mode_reg (
1286 .scan_in ( tcu_mbist_user_mode_reg_scanin ),
1287 .scan_out ( tcu_mbist_user_mode_reg_scanout ),
1288 .l1clk ( l1clk ),
1289 .en ( cmp_io_sync_en_local ),
1290 .din ( csr_mbist_mode[2] ),
1291 .dout ( tcu_mbist_user_mode ),
1292 .siclk(siclk),
1293 .soclk(soclk));
1294
1295//================================================================================
1296// Latch mb_tcu_done to filter DONE signals that are less than 2-cycle wide
1297// During loop mode, MBIST engines generate DONE pulse (1-cycle) per compare
1298// TCU should not turn off START signals when it sees such DONE pulses
1299// Since TCU doesn't know if the engines are running in loop or non-loop mode
1300// We need to exame the width of the DONE signals to determine if we should turn
1301// off START signals when DONE signals are back
1302// For engines running in CMP latch their DONE signals once so that we can filter
1303// out those DONE pulses during loop mode
1304// For engines running in IO clock or PEU we need at least 6 CMP to be safe
1305//================================================================================
1306
1307//================================================================================
1308// First latch the DONE signal because they are coming from other clusters
1309// For L2T1, L2T3-7, L2B4-7, SPC1, SPC3-7, MCU2, and MCU3
1310// We need to latch twice because there are corresponding staging flops in some
1311// other blocks for every other MBIST signals
1312//================================================================================
1313assign mb_tcu_done_stg_din[17:0] = {mb_tcu_done[33:29], // L2T7-3
1314 mb_tcu_done[27], // L2T1
1315 mb_tcu_done[25:22], // L2B7-4
1316 mb_tcu_done[17:16], // MCU3-2
1317 mb_tcu_done[7:3], // SPC7-3
1318 mb_tcu_done[1]}; // SPC1
1319
1320tcu_mbist_ctl_msff_ctl_macro__width_18 mb_tcu_done_stg_reg (
1321 .scan_in ( mb_tcu_done_stg_reg_scanin ),
1322 .scan_out ( mb_tcu_done_stg_reg_scanout ),
1323 .l1clk ( l1clk ),
1324 .din ( mb_tcu_done_stg_din[17:0] ),
1325 .dout ( mb_tcu_done_stg[17:0] ),
1326 .siclk(siclk),
1327 .soclk(soclk));
1328
1329assign mb_tcu_done_d_cmp_din[31:0] = {mb_tcu_done_stg[17:13], // L2T7-3
1330 mb_tcu_done[28], // L2T2
1331 mb_tcu_done_stg[12], // L2T1
1332 mb_tcu_done[26], // L2T0
1333 mb_tcu_done_stg[11:8], // L2B7-4
1334 mb_tcu_done[21:18], // L2B3-0
1335 mb_tcu_done_stg[7:6], // MCU3-2
1336 mb_tcu_done[15:14], // MCU1-0
1337 mb_tcu_done[12], // NCU0
1338 mb_tcu_done[10], // SIO0
1339 mb_tcu_done[9:8], // SII
1340 mb_tcu_done_stg[5:1], // SPC7-3
1341 mb_tcu_done[2], // SPC2
1342 mb_tcu_done_stg[0], // SPC1
1343 mb_tcu_done[0]}; // SPC0
1344
1345tcu_mbist_ctl_msff_ctl_macro__width_32 mb_tcu_done_d_cmp_reg (
1346 .scan_in ( mb_tcu_done_d_cmp_reg_scanin ),
1347 .scan_out ( mb_tcu_done_d_cmp_reg_scanout ),
1348 .l1clk ( l1clk ),
1349 .din ( mb_tcu_done_d_cmp_din[31:0] ),
1350 .dout ( mb_tcu_done_d_cmp[31:0] ),
1351 .siclk(siclk),
1352 .soclk(soclk));
1353
1354assign mb_tcu_done_d_io_din[15:0] = {mb_tcu_done[47:37], // 15:5 (NIU)
1355 mb_tcu_done_36_sync, // 4 (PEU)
1356 mb_tcu_done[35:34], // 3:2 (DMU)
1357 mb_tcu_done[13], // 1 (NCU 1)
1358 mb_tcu_done[11]}; // 0 (SIO 1)
1359
1360tcu_mbist_ctl_msff_ctl_macro__en_1__width_16 mb_tcu_done_d_io_reg (
1361 .scan_in ( mb_tcu_done_d_io_reg_scanin ),
1362 .scan_out ( mb_tcu_done_d_io_reg_scanout ),
1363 .l1clk ( l1clk ),
1364 .en ( io_cmp_sync_en_local ),
1365 .din ( mb_tcu_done_d_io_din[15:0] ),
1366 .dout ( mb_tcu_done_d_io[15:0] ),
1367 .siclk(siclk),
1368 .soclk(soclk));
1369
1370assign mb_tcu_done_d[47:0] = {mb_tcu_done_d_io[15:2], // (NIU, PEU, DMU)
1371 mb_tcu_done_d_cmp[31:12], // (L2T, L2B, MCU3-0)
1372 mb_tcu_done_d_io[1], // (NCU 1)
1373 mb_tcu_done_d_cmp[11], // (NCU 0)
1374 mb_tcu_done_d_io[0], // (SIO 1)
1375 mb_tcu_done_d_cmp[10:0]}; // (SIO 0, SII, SPC)
1376
1377
1378//================================================================================
1379// Staging Flops for FAIL signals
1380//================================================================================
1381assign mb_tcu_fail_stg_din[17:0] = {mb_tcu_fail[33:29], // [17:13] L2T7-3
1382 mb_tcu_fail[27], // [12] L2T1
1383 mb_tcu_fail[25:22], // [11:8] L2B7-4
1384 mb_tcu_fail[17:16], // [7:6] MCU3-2
1385 mb_tcu_fail[7:3], // [5:1] SPC7-3
1386 mb_tcu_fail[1]}; // [0] SPC1
1387
1388tcu_mbist_ctl_msff_ctl_macro__width_18 mb_tcu_fail_stg_reg (
1389 .scan_in ( mb_tcu_fail_stg_reg_scanin ),
1390 .scan_out ( mb_tcu_fail_stg_reg_scanout ),
1391 .l1clk ( l1clk ),
1392 .din ( mb_tcu_fail_stg_din[17:0] ),
1393 .dout ( mb_tcu_fail_stg[17:0] ),
1394 .siclk(siclk),
1395 .soclk(soclk));
1396
1397assign mb_tcu_fail_d_cmp_din[31:0] = {mb_tcu_fail_stg[17:13], // L2T7-3
1398 mb_tcu_fail[28], // L2T2
1399 mb_tcu_fail_stg[12], // L2T1
1400 mb_tcu_fail[26], // L2T0
1401 mb_tcu_fail_stg[11:8], // L2B7-4
1402 mb_tcu_fail[21:18], // L2B3-0
1403 mb_tcu_fail_stg[7:6], // MCU3-2
1404 mb_tcu_fail[15:14], // MCU1-0
1405 mb_tcu_fail[12], // NCU0
1406 mb_tcu_fail[10], // SIO0
1407 mb_tcu_fail[9:8], // SII
1408 mb_tcu_fail_stg[5:1], // SPC7-3
1409 mb_tcu_fail[2], // SPC2
1410 mb_tcu_fail_stg[0], // SPC1
1411 mb_tcu_fail[0]}; // SPC0
1412
1413tcu_mbist_ctl_msff_ctl_macro__width_32 mb_tcu_fail_d_cmp_reg (
1414 .scan_in ( mb_tcu_fail_d_cmp_reg_scanin ),
1415 .scan_out ( mb_tcu_fail_d_cmp_reg_scanout ),
1416 .l1clk ( l1clk ),
1417 .din ( mb_tcu_fail_d_cmp_din[31:0] ),
1418 .dout ( mb_tcu_fail_d_cmp[31:0] ),
1419 .siclk(siclk),
1420 .soclk(soclk));
1421
1422assign mb_tcu_fail_d_io_din[15:0] = {mb_tcu_fail[47:37], // 15:5 (NIU)
1423 mb_tcu_fail_36_sync, // 4 (PEU)
1424 mb_tcu_fail[35:34], // 3:2 (DMU)
1425 mb_tcu_fail[13], // 1 (NCU 1)
1426 mb_tcu_fail[11]}; // 0 (SIO 1)
1427
1428tcu_mbist_ctl_msff_ctl_macro__en_1__width_16 mb_tcu_fail_d_io_reg (
1429 .scan_in ( mb_tcu_fail_d_io_reg_scanin ),
1430 .scan_out ( mb_tcu_fail_d_io_reg_scanout ),
1431 .l1clk ( l1clk ),
1432 .en ( io_cmp_sync_en_local ),
1433 .din ( mb_tcu_fail_d_io_din[15:0] ),
1434 .dout ( mb_tcu_fail_d_io[15:0] ),
1435 .siclk(siclk),
1436 .soclk(soclk));
1437
1438assign mb_tcu_fail_d[47:0] = {mb_tcu_fail_d_io[15:2], // (NIU, PEU, DMU)
1439 mb_tcu_fail_d_cmp[31:12], // (L2T, L2B, MCU3-0)
1440 mb_tcu_fail_d_io[1], // (NCU 1)
1441 mb_tcu_fail_d_cmp[11], // (NCU 0)
1442 mb_tcu_fail_d_io[0], // (SIO 1)
1443 mb_tcu_fail_d_cmp[10:0]}; // (SIO 0, SII, SPC)
1444
1445assign tcu_core_avail[0] = ncu_spc0_core_available;
1446assign tcu_core_avail[1] = ncu_spc1_core_available;
1447assign tcu_core_avail[2] = ncu_spc2_core_available;
1448assign tcu_core_avail[3] = ncu_spc3_core_available;
1449assign tcu_core_avail[4] = ncu_spc4_core_available;
1450assign tcu_core_avail[5] = ncu_spc5_core_available;
1451assign tcu_core_avail[6] = ncu_spc6_core_available;
1452assign tcu_core_avail[7] = ncu_spc7_core_available;
1453
1454assign core_avail_din[7:0] = tcu_test_protect_cmp ?
1455 core_avail[7:0] :
1456 tcu_core_avail[7:0];
1457
1458tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 core_avail_reg (
1459 .scan_in ( core_avail_reg_scanin ),
1460 .scan_out ( core_avail_reg_scanout ),
1461 .l1clk ( l1clk ),
1462 .en ( io_cmp_sync_en_local ),
1463 .din ( core_avail_din[7:0] ),
1464 .dout ( core_avail[7:0] ),
1465 .siclk(siclk),
1466 .soclk(soclk));
1467
1468// Incoming bank_available signals from NCU
1469// One Bank = one each of L2D, L2T and L2B
1470
1471assign bank_avail_din[7:0] = tcu_test_protect_cmp ?
1472 bank_avail[7:0] :
1473 ncu_tcu_bank_avail[7:0];
1474
1475tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 bank_avail_reg (
1476 .scan_in ( bank_avail_reg_scanin ),
1477 .scan_out ( bank_avail_reg_scanout ),
1478 .l1clk ( l1clk ),
1479 .en ( io_cmp_sync_en_local ),
1480 .din ( bank_avail_din[7:0] ),
1481 .dout ( bank_avail[7:0] ),
1482 .siclk(siclk),
1483 .soclk(soclk));
1484
1485assign ncu_core_enable_status[7:0] =
1486 {ncu_spc7_core_enable_status, ncu_spc6_core_enable_status,
1487 ncu_spc5_core_enable_status, ncu_spc4_core_enable_status,
1488 ncu_spc3_core_enable_status, ncu_spc2_core_enable_status,
1489 ncu_spc1_core_enable_status, ncu_spc0_core_enable_status};
1490
1491assign core_enable_status_din[7:0] = tcu_test_protect_cmp ?
1492 core_enable_status[7:0] :
1493 ncu_core_enable_status[7:0];
1494
1495tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 core_enable_status_reg (
1496 .scan_in ( core_enable_status_reg_scanin ),
1497 .scan_out ( core_enable_status_reg_scanout ),
1498 .l1clk ( l1clk ),
1499 .en ( io_cmp_sync_en_local ),
1500 .din ( core_enable_status_din[7:0] ),
1501 .dout ( core_enable_status[7:0] ),
1502 .siclk(siclk),
1503 .soclk(soclk));
1504
1505
1506assign ncu_bank_enable_status[4:0] = {ncu_spc_pm,
1507 ncu_spc_ba67, ncu_spc_ba45,
1508 ncu_spc_ba23, ncu_spc_ba01};
1509
1510assign bank_enable_status_din[4:0] = tcu_test_protect_cmp ?
1511 bank_enable_status[4:0] :
1512 ncu_bank_enable_status[4:0];
1513
1514tcu_mbist_ctl_msff_ctl_macro__en_1__width_5 bank_enable_status_reg (
1515 .scan_in ( bank_enable_status_reg_scanin ),
1516 .scan_out ( bank_enable_status_reg_scanout ),
1517 .l1clk ( l1clk ),
1518 .en ( io_cmp_sync_en_local ),
1519 .din ( bank_enable_status_din[4:0] ),
1520 .dout ( bank_enable_status[4:0] ),
1521 .siclk(siclk),
1522 .soclk(soclk));
1523
1524assign bank_enable_status_8[7:0] =
1525 {8{!bank_enable_status[4]}} | {{2{bank_enable_status[3]}},
1526 {2{bank_enable_status[2]}},
1527 {2{bank_enable_status[1]}},
1528 {2{bank_enable_status[0]}}};
1529assign bank_avail_4[3:0] = {|bank_avail[7:6], |bank_avail[5:4],
1530 |bank_avail[3:2], |bank_avail[1:0]};
1531
1532assign not_core_avail_48[47:0] = {40'h0, ~core_avail[7:0]};
1533assign not_core_enable_48[47:0] = {40'h0, ~core_enable_status[7:0]};
1534assign not_bank_avail_48[47:0] = {14'h0, {2{~bank_avail[7:0]}}, ~bank_avail_4[3:0], 14'h0};
1535assign not_bank_enable_48[47:0] = {14'h0, // NIU, PEU, DMU
1536 {2{~bank_enable_status_8[7:0]}}, // L2T, L2B
1537 ~bank_enable_status_8[6], // MCU3
1538 ~bank_enable_status_8[4], // MCU2
1539 ~bank_enable_status_8[2], // MCU1
1540 ~bank_enable_status_8[0], // MCU0
1541 14'h0}; // SIO, SII, SPC
1542
1543assign mbist_skip[47:0] = csr_mbist_bypass |
1544 not_core_avail_48 | not_core_enable_48 |
1545 not_bank_avail_48 | not_bank_enable_48;
1546assign mbist_skip_or_done[47:0] = mbist_skip | mbist_done;
1547
1548//================================================================================
1549// Previous is Skipped or Done
1550// Go through one engine in one cycle
1551// Move on to the next engine when the previous one is
1552// 1. Skipped (Bypassed or Core not available)
1553// 2. Done
1554//================================================================================
1555assign prev_skip_done_din[47:1] = {prev_skip_done[46:1], mbist_start_io_sync} & mbist_skip_or_done[46:0];
1556
1557tcu_mbist_ctl_msff_ctl_macro__width_47 prev_skip_done_reg (
1558 .scan_in ( prev_skip_done_reg_scanin ),
1559 .scan_out ( prev_skip_done_reg_scanout ),
1560 .l1clk ( l1clk ),
1561 .din ( prev_skip_done_din[47:1] ),
1562 .dout ( prev_skip_done[47:1] ),
1563 .siclk(siclk),
1564 .soclk(soclk));
1565
1566
1567assign tcu_mb_start_din = ~mbist_skip[47:0] & (~mbist_done | {48{hold_start}} | {48{tcu_mbist_loop_mode}}) &
1568 (parallel ? {48{mbist_start_io_sync}}:
1569 {prev_skip_done_din, mbist_start_io_sync});
1570
1571assign tcu_mb_start_d_cmp_din[31:0] = {tcu_mb_start_din[33:14], // [31:12] L2T, L2B, MCU
1572 tcu_mb_start_din[12], // [11] NCU 0
1573 tcu_mb_start_din[10], // [10] SIO 0
1574 tcu_mb_start_din[9:0]}; // [9:0] SII, SPC
1575
1576tcu_mbist_ctl_msff_ctl_macro__width_32 tcu_mb_start_d_cmp_reg (
1577 .scan_in ( tcu_mb_start_d_cmp_reg_scanin ),
1578 .scan_out ( tcu_mb_start_d_cmp_reg_scanout ),
1579 .l1clk ( l1clk ),
1580 .din ( tcu_mb_start_d_cmp_din[31:0] ),
1581 .dout ( tcu_mb_start_d_cmp[31:0] ),
1582 .siclk(siclk),
1583 .soclk(soclk));
1584
1585// Latch again for staging flops
1586assign tcu_mb_start_d2_cmp_din[17:0] = {tcu_mb_start_d_cmp[31:27], // [17:13] L2T7-3
1587 tcu_mb_start_d_cmp[25], // [12] L2T1
1588 tcu_mb_start_d_cmp[23:20], // [11:8] L2B7-3
1589 tcu_mb_start_d_cmp[15:14], // [7:6] MCU3-2
1590 tcu_mb_start_d_cmp[7:3], // [5:1] SPC7-3
1591 tcu_mb_start_d_cmp[1]}; // [0] SPC1
1592
1593tcu_mbist_ctl_msff_ctl_macro__width_18 tcu_mb_start_d2_cmp_reg (
1594 .scan_in ( tcu_mb_start_d2_cmp_reg_scanin ),
1595 .scan_out ( tcu_mb_start_d2_cmp_reg_scanout ),
1596 .l1clk ( l1clk ),
1597 .din ( tcu_mb_start_d2_cmp_din[17:0] ),
1598 .dout ( tcu_mb_start_d2_cmp[17:0] ),
1599 .siclk(siclk),
1600 .soclk(soclk));
1601
1602assign tcu_mb_start_d_io_din = {tcu_mb_start_din[47:34], // [15:2] NIU, PEU DMU
1603 tcu_mb_start_din[13], // [1] NCU1
1604 tcu_mb_start_din[11]}; // [0] SIO1
1605
1606tcu_mbist_ctl_msff_ctl_macro__en_1__width_16 tcu_mb_start_d_io_reg (
1607 .scan_in ( tcu_mb_start_d_io_reg_scanin ),
1608 .scan_out ( tcu_mb_start_d_io_reg_scanout ),
1609 .l1clk ( l1clk ),
1610 .en ( cmp_io_sync_en_local ),
1611 .din ( tcu_mb_start_d_io_din[15:0] ),
1612 .dout ( tcu_mb_start_d_io[15:0] ),
1613 .siclk(siclk),
1614 .soclk(soclk));
1615
1616assign tcu_mb_start = {tcu_mb_start_d_io[15:2], // NIU, PEU, DMU
1617 tcu_mb_start_d2_cmp[17:13], // L2T7-3
1618 tcu_mb_start_d_cmp[26], // L2T2
1619 tcu_mb_start_d2_cmp[12], // L2T1
1620 tcu_mb_start_d_cmp[24], // L2T0
1621 tcu_mb_start_d2_cmp[11:8], // L2B7-4
1622 tcu_mb_start_d_cmp[19:16], // L2B3-0
1623 tcu_mb_start_d2_cmp[7:6], // MCU3-2
1624 tcu_mb_start_d_cmp[13:12], // MCU1-0
1625 tcu_mb_start_d_io[1], // NCU1
1626 tcu_mb_start_d_cmp[11], // NCU0
1627 tcu_mb_start_d_io[0], // SIO1
1628 tcu_mb_start_d_cmp[10:8], // SIO0, SII
1629 tcu_mb_start_d2_cmp[5:1], // SPC7-3
1630 tcu_mb_start_d_cmp[2], // SPC2
1631 tcu_mb_start_d2_cmp[0], // SPC1
1632 tcu_mb_start_d_cmp[0]}; // SPC0
1633
1634tcu_mbist_ctl_msff_ctl_macro__width_1 tcu_bisx_done_reg (
1635 .scan_in ( tcu_bisx_done_reg_scanin ),
1636 .scan_out ( tcu_bisx_done_reg_scanout ),
1637 .l1clk ( l1clk ),
1638 .din ( tcu_bisx_done_din ),
1639 .dout ( tcu_bisx_done ),
1640 .siclk(siclk),
1641 .soclk(soclk));
1642
1643tcu_mbist_ctl_msff_ctl_macro__width_1 bisx_counter_en_reg (
1644 .scan_in ( bisx_counter_en_reg_scanin ),
1645 .scan_out ( bisx_counter_en_reg_scanout ),
1646 .l1clk ( l1clk ),
1647 .din ( bisx_counter_en_din ),
1648 .dout ( bisx_counter_en ),
1649 .siclk(siclk),
1650 .soclk(soclk));
1651
1652//================================================================================
1653// BISX Counter
1654//================================================================================
1655assign bisx_counter_din = bisx_counter_en ? bisx_counter + 32'b1 :
1656 32'h0;
1657
1658
1659tcu_mbist_ctl_msff_ctl_macro__width_32 bisx_counter_reg (
1660 .scan_in ( bisx_counter_reg_scanin ),
1661 .scan_out ( bisx_counter_reg_scanout ),
1662 .l1clk ( l1clk ),
1663 .din ( bisx_counter_din[31:0] ),
1664 .dout ( bisx_counter[31:0] ),
1665 .siclk(siclk),
1666 .soclk(soclk));
1667
1668assign bisx_time_out = &bisx_counter;
1669
1670
1671//==============================================================================
1672// LBIST Control
1673//==============================================================================
1674//==============================================================================
1675// Flop Incoming Signals from Another Block
1676//==============================================================================
1677tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 tcu_lb_tcu_done_reg (
1678 .scan_in ( tcu_lb_tcu_done_reg_scanin ),
1679 .scan_out ( tcu_lb_tcu_done_reg_scanout ),
1680 .l1clk ( l1clk ),
1681 .en ( io_cmp_sync_en_local ),
1682 .din ( lb_tcu_done[7:0] ),
1683 .dout ( lb_tcu_done_d[7:0] ),
1684 .siclk(siclk),
1685 .soclk(soclk));
1686
1687assign lb_prev_clear[7:1] =
1688 lb_prev_clear[6:0] & lbist_skip_or_done[6:0];
1689
1690assign lb_prev_clear[0] = csr_lbist_start;
1691
1692assign lbist_skip_or_done[7:0] = lb_tcu_done_d | csr_lbist_bypass | not_core_avail_48[7:0];
1693
1694assign lbist_all_done_din = &lbist_skip_or_done[7:0];
1695tcu_mbist_ctl_msff_ctl_macro__width_1 lbist_all_done_reg (
1696 .scan_in ( lbist_all_done_reg_scanin ),
1697 .scan_out ( lbist_all_done_reg_scanout ),
1698 .l1clk ( l1clk ),
1699 .din ( lbist_all_done_din ),
1700 .dout ( lbist_all_done ),
1701 .siclk(siclk),
1702 .soclk(soclk));
1703
1704
1705assign lb_start[7:0] = ~lbist_skip_or_done &
1706 (csr_lbist_mode[0] ? {8{csr_lbist_start}} : lb_prev_clear);
1707
1708tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 tcu_lbist_start_reg (
1709 .scan_in ( tcu_lbist_start_reg_scanin ),
1710 .scan_out ( tcu_lbist_start_reg_scanout ),
1711 .l1clk ( l1clk ),
1712 .en ( io_cmp_sync_en_local ),
1713 .din ( lb_start[7:0] ),
1714 .dout ( tcu_spc_lbist_start[7:0] ),
1715 .siclk(siclk),
1716 .soclk(soclk));
1717
1718//================================================================================
1719// Send mbist start to debug ctl to request a clock stop when cycle counter
1720// reaches zero
1721//================================================================================
1722tcu_mbist_ctl_msff_ctl_macro__width_1 tcu_mb_clkstop_reg (
1723 .scan_in ( tcu_mb_clkstop_reg_scanin ),
1724 .scan_out ( tcu_mb_clkstop_reg_scanout ),
1725 .l1clk ( l1clk ),
1726 .din ( mb_clkstop_req ),
1727 .dout ( mbist_clk_stop_req ),
1728 .siclk(siclk),
1729 .soclk(soclk));
1730
1731assign mb_clkstop_req = (mbist_clk_stop_req | mbist_start_io_sync) & mbist_clkstpen;
1732
1733//********************************************************************
1734// Instantiate DMO Control Sub-Block
1735//********************************************************************
1736
1737tcu_dmo_ctl dmo_ctl (
1738 .mbist_all_done ( mbist_all_done_real_time ),
1739 .mbist_one_fail ( mbist_one_fail_real_time ),
1740 .scan_in ( tcu_dmo_ctl_scanin ),
1741 .scan_out ( tcu_dmo_ctl_scanout ),
1742 .l2clk(l2clk),
1743 .tcu_int_se(tcu_int_se),
1744 .tcu_int_aclk(tcu_int_aclk),
1745 .tcu_int_bclk(tcu_int_bclk),
1746 .tcu_int_ce(tcu_int_ce),
1747 .tcu_pce_ov(tcu_pce_ov),
1748 .io_cmp_sync_en_local(io_cmp_sync_en_local),
1749 .cmp_io2x_sync_en_local(cmp_io2x_sync_en_local),
1750 .mbist_start_io_sync(mbist_start_io_sync),
1751 .tcu_mio_dmo_data(tcu_mio_dmo_data[39:0]),
1752 .tcu_mio_dmo_sync(tcu_mio_dmo_sync),
1753 .tcu_mio_mbist_done(tcu_mio_mbist_done),
1754 .tcu_mio_mbist_fail(tcu_mio_mbist_fail),
1755 .tcu_mio_jtag_membist_mode(tcu_mio_jtag_membist_mode),
1756 .spc4_dmo_dout(spc4_dmo_dout[35:0]),
1757 .spc6_dmo_dout(spc6_dmo_dout[35:0]),
1758 .dmo_coresel(dmo_coresel[5:0]),
1759 .dmo_dcmuxctl(dmo_dcmuxctl),
1760 .dmo_icmuxctl(dmo_icmuxctl),
1761 .l2t4_dmo_dout(l2t4_dmo_dout[38:0]),
1762 .l2t6_dmo_dout(l2t6_dmo_dout[38:0]),
1763 .dmo_l2tsel(dmo_l2tsel[5:0]),
1764 .dmo_tagmuxctl(dmo_tagmuxctl),
1765 .rtx_tcu_dmo_data_out(rtx_tcu_dmo_data_out[39:0]),
1766 .tds_tcu_dmo_dout(tds_tcu_dmo_dout[39:0]),
1767 .rdp_tcu_dmo_dout(rdp_tcu_dmo_dout[39:0]),
1768 .tcu_rtx_dmo_ctl(tcu_rtx_dmo_ctl[2:0]),
1769 .jtag_dmo_enable(jtag_dmo_enable),
1770 .jtag_dmo_control_upd(jtag_dmo_control_upd),
1771 .jtag_dmo_control(jtag_dmo_control[47:0]),
1772 .dmo_cfg(dmo_cfg[47:0]));
1773
1774
1775//==================================================
1776// Spare Gates
1777//==================================================
1778// ----------------------------------------------------------------------
1779// Removed for ECO to make flops visible in SunV
1780//
1781//spare_ctl_macro spare (num=12) (
1782// .l1clk ( l1clk ),
1783// .scan_in ( spare_scanin ),
1784// .scan_out ( spare_scanout ));
1785
1786// Added for ECO to make flops visible
1787
1788// - this is an expansion of spare_ctl_macro with just the gates
1789tcu_mbist_ctl_spare_ctl_macro__flops_0__num_12 spare_gates (
1790);
1791
1792tcu_mbist_ctl_msff_ctl_macro__scanreverse_1__width_12 spare_flops (
1793 .scan_in(spare_flops_scanin),
1794 .scan_out(spare_flops_scanout),
1795 .l1clk(l1clk),
1796 .din (spare_flops_d[11:0]),
1797 .dout (spare_flops_q[11:0]),
1798 .siclk(siclk),
1799 .soclk(soclk)
1800);
1801
1802assign spare_flops_d[11] = 1'b0;
1803assign spare_flops_d[10] = 1'b0;
1804assign spare_flops_d[9] = spare9_flop_d; // ECO C
1805assign spare_flops_d[8] = 1'b0;
1806assign spare_flops_d[7] = 1'b0;
1807assign spare_flops_d[6] = 1'b0;
1808assign spare_flops_d[5] = 1'b0;
1809assign spare_flops_d[4] = 1'b0;
1810assign spare_flops_d[3] = spare3_flop_d; // ECO C
1811assign spare_flops_d[2] = 1'b0;
1812assign spare_flops_d[1] = 1'b0;
1813assign spare_flops_d[0] = spare0_flop_d; // ECO D
1814
1815assign spare_flops_unused[11] = spare_flops_q[11];
1816assign spare_flops_unused[10] = spare_flops_q[10];
1817assign spare9_flop_q = spare_flops_q[9]; // ECO C
1818assign spare_flops_unused[8] = spare_flops_q[8];
1819assign spare_flops_unused[7] = spare_flops_q[7];
1820assign spare_flops_unused[6] = spare_flops_q[6];
1821assign spare_flops_unused[5] = spare_flops_q[5];
1822assign spare_flops_unused[4] = spare_flops_q[4];
1823assign spare3_flop_q = spare_flops_q[3]; // ECO C
1824assign spare_flops_unused[2] = spare_flops_q[2];
1825assign spare_flops_unused[1] = spare_flops_q[1];
1826assign spare0_flop_q = spare_flops_q[0]; // ECO D
1827
1828assign spare0_flop_d = cycle_stretch_to_mbc; // ECO D
1829assign cycle_stretch = spare0_flop_q; // ECO D
1830
1831assign spare3_flop_d = debug_cycle_counter_stop_to_mbc; // ECO C
1832assign debug_cycle_counter_stop = spare3_flop_q; // ECO C
1833
1834assign spare9_flop_d = mbist_clk_stop_to_mbc; // ECO C
1835assign mbist_clk_stop = spare9_flop_q; // ECO C
1836
1837// ----------------------------------------------------------------------
1838
1839// fixscan start:
1840assign jtag_csr_wr_sync_reg_scanin = scan_in;
1841assign mb_tcu_done_36_sync_reg_scanin = jtag_csr_wr_sync_reg_scanout;
1842assign mb_tcu_fail_36_sync_reg_scanin = mb_tcu_done_36_sync_reg_scanout;
1843assign tcu_mbist_sync_en_reg_scanin = mb_tcu_fail_36_sync_reg_scanout;
1844assign tcu_test_protect_cmp_reg_scanin = tcu_mbist_sync_en_reg_scanout;
1845assign ucb_csr_wr_sync_reg_scanin = tcu_test_protect_cmp_reg_scanout;
1846assign ucb_csr_addr_sync_reg_scanin = ucb_csr_wr_sync_reg_scanout;
1847assign csr_mbist_mode_reg_scanin = ucb_csr_addr_sync_reg_scanout;
1848assign csr_mbist_bypass_reg_scanin = csr_mbist_mode_reg_scanout;
1849assign csr_mbist_start_reg_scanin = csr_mbist_bypass_reg_scanout;
1850assign csr_mbist_abort_reg_scanin = csr_mbist_start_reg_scanout;
1851assign csr_mbist_abort_d_reg_scanin = csr_mbist_abort_reg_scanout;
1852assign csr_mbist_start_wmr_reg_scanin = csr_mbist_abort_d_reg_scanout;
1853assign mbist_done_reg_scanin = csr_mbist_start_wmr_reg_scanout;
1854assign mbist_fail_reg_scanin = mbist_done_reg_scanout;
1855assign mbist_done_fail_reg_scanin = mbist_fail_reg_scanout;
1856assign csr_lbist_mode_reg_scanin = mbist_done_fail_reg_scanout;
1857assign csr_lbist_bypass_reg_scanin = csr_lbist_mode_reg_scanout;
1858assign csr_lbist_start_reg_scanin = csr_lbist_bypass_reg_scanout;
1859assign csr_lbist_start_d_reg_scanin = csr_lbist_start_reg_scanout;
1860assign csr_lbist_done_reg_scanin = csr_lbist_start_d_reg_scanout;
1861assign csr_peu_entestcfg_reg_scanin = csr_lbist_done_reg_scanout;
1862assign csr_ucb_data_reg_scanin = csr_peu_entestcfg_reg_scanout;
1863assign start_bisx_por_d_reg_scanin = csr_ucb_data_reg_scanout;
1864assign tcu_mbist_state_reg_scanin = start_bisx_por_d_reg_scanout;
1865assign mbist_start_io_sync_reg_scanin = tcu_mbist_state_reg_scanout;
1866assign hold_start_reg_scanin = mbist_start_io_sync_reg_scanout;
1867assign clr_mbist_start_wmr_reg_scanin = hold_start_reg_scanout;
1868assign tcu_mbist_user_mode_reg_scanin = clr_mbist_start_wmr_reg_scanout;
1869assign mb_tcu_done_stg_reg_scanin = tcu_mbist_user_mode_reg_scanout;
1870assign mb_tcu_done_d_cmp_reg_scanin = mb_tcu_done_stg_reg_scanout;
1871assign mb_tcu_done_d_io_reg_scanin = mb_tcu_done_d_cmp_reg_scanout;
1872assign mb_tcu_fail_stg_reg_scanin = mb_tcu_done_d_io_reg_scanout;
1873assign mb_tcu_fail_d_cmp_reg_scanin = mb_tcu_fail_stg_reg_scanout;
1874assign mb_tcu_fail_d_io_reg_scanin = mb_tcu_fail_d_cmp_reg_scanout;
1875assign core_avail_reg_scanin = mb_tcu_fail_d_io_reg_scanout;
1876assign bank_avail_reg_scanin = core_avail_reg_scanout;
1877assign core_enable_status_reg_scanin = bank_avail_reg_scanout;
1878assign bank_enable_status_reg_scanin = core_enable_status_reg_scanout;
1879assign prev_skip_done_reg_scanin = bank_enable_status_reg_scanout;
1880assign tcu_mb_start_d_cmp_reg_scanin = prev_skip_done_reg_scanout;
1881assign tcu_mb_start_d2_cmp_reg_scanin = tcu_mb_start_d_cmp_reg_scanout;
1882assign tcu_mb_start_d_io_reg_scanin = tcu_mb_start_d2_cmp_reg_scanout;
1883assign tcu_bisx_done_reg_scanin = tcu_mb_start_d_io_reg_scanout;
1884assign bisx_counter_en_reg_scanin = tcu_bisx_done_reg_scanout;
1885assign bisx_counter_reg_scanin = bisx_counter_en_reg_scanout;
1886assign tcu_lb_tcu_done_reg_scanin = bisx_counter_reg_scanout;
1887assign lbist_all_done_reg_scanin = tcu_lb_tcu_done_reg_scanout;
1888assign tcu_lbist_start_reg_scanin = lbist_all_done_reg_scanout;
1889assign tcu_mb_clkstop_reg_scanin = tcu_lbist_start_reg_scanout;
1890assign tcu_dmo_ctl_scanin = tcu_mb_clkstop_reg_scanout;
1891assign spare_flops_scanin = tcu_dmo_ctl_scanout;
1892assign scan_out = spare_flops_scanout;
1893// fixscan end:
1894
1895endmodule
1896
1897
1898
1899
1900
1901
1902// any PARAMS parms go into naming of macro
1903
1904module tcu_mbist_ctl_l1clkhdr_ctl_macro (
1905 l2clk,
1906 l1en,
1907 pce_ov,
1908 stop,
1909 se,
1910 l1clk);
1911
1912
1913 input l2clk;
1914 input l1en;
1915 input pce_ov;
1916 input stop;
1917 input se;
1918 output l1clk;
1919
1920
1921
1922
1923
1924cl_sc1_l1hdr_8x c_0 (
1925
1926
1927 .l2clk(l2clk),
1928 .pce(l1en),
1929 .l1clk(l1clk),
1930 .se(se),
1931 .pce_ov(pce_ov),
1932 .stop(stop)
1933);
1934
1935
1936
1937endmodule
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951// any PARAMS parms go into naming of macro
1952
1953module tcu_mbist_ctl_msff_ctl_macro__width_3 (
1954 din,
1955 l1clk,
1956 scan_in,
1957 siclk,
1958 soclk,
1959 dout,
1960 scan_out);
1961wire [2:0] fdin;
1962wire [1:0] so;
1963
1964 input [2:0] din;
1965 input l1clk;
1966 input scan_in;
1967
1968
1969 input siclk;
1970 input soclk;
1971
1972 output [2:0] dout;
1973 output scan_out;
1974assign fdin[2:0] = din[2:0];
1975
1976
1977
1978
1979
1980
1981dff #(3) d0_0 (
1982.l1clk(l1clk),
1983.siclk(siclk),
1984.soclk(soclk),
1985.d(fdin[2:0]),
1986.si({scan_in,so[1:0]}),
1987.so({so[1:0],scan_out}),
1988.q(dout[2:0])
1989);
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002endmodule
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016// any PARAMS parms go into naming of macro
2017
2018module tcu_mbist_ctl_msff_ctl_macro__en_1__width_1 (
2019 din,
2020 en,
2021 l1clk,
2022 scan_in,
2023 siclk,
2024 soclk,
2025 dout,
2026 scan_out);
2027wire [0:0] fdin;
2028
2029 input [0:0] din;
2030 input en;
2031 input l1clk;
2032 input scan_in;
2033
2034
2035 input siclk;
2036 input soclk;
2037
2038 output [0:0] dout;
2039 output scan_out;
2040assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}});
2041
2042
2043
2044
2045
2046
2047dff #(1) d0_0 (
2048.l1clk(l1clk),
2049.siclk(siclk),
2050.soclk(soclk),
2051.d(fdin[0:0]),
2052.si(scan_in),
2053.so(scan_out),
2054.q(dout[0:0])
2055);
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068endmodule
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082// any PARAMS parms go into naming of macro
2083
2084module tcu_mbist_ctl_msff_ctl_macro__en_1__width_6 (
2085 din,
2086 en,
2087 l1clk,
2088 scan_in,
2089 siclk,
2090 soclk,
2091 dout,
2092 scan_out);
2093wire [5:0] fdin;
2094wire [4:0] so;
2095
2096 input [5:0] din;
2097 input en;
2098 input l1clk;
2099 input scan_in;
2100
2101
2102 input siclk;
2103 input soclk;
2104
2105 output [5:0] dout;
2106 output scan_out;
2107assign fdin[5:0] = (din[5:0] & {6{en}}) | (dout[5:0] & ~{6{en}});
2108
2109
2110
2111
2112
2113
2114dff #(6) d0_0 (
2115.l1clk(l1clk),
2116.siclk(siclk),
2117.soclk(soclk),
2118.d(fdin[5:0]),
2119.si({scan_in,so[4:0]}),
2120.so({so[4:0],scan_out}),
2121.q(dout[5:0])
2122);
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135endmodule
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149// any PARAMS parms go into naming of macro
2150
2151module tcu_mbist_ctl_msff_ctl_macro__width_4 (
2152 din,
2153 l1clk,
2154 scan_in,
2155 siclk,
2156 soclk,
2157 dout,
2158 scan_out);
2159wire [3:0] fdin;
2160wire [2:0] so;
2161
2162 input [3:0] din;
2163 input l1clk;
2164 input scan_in;
2165
2166
2167 input siclk;
2168 input soclk;
2169
2170 output [3:0] dout;
2171 output scan_out;
2172assign fdin[3:0] = din[3:0];
2173
2174
2175
2176
2177
2178
2179dff #(4) d0_0 (
2180.l1clk(l1clk),
2181.siclk(siclk),
2182.soclk(soclk),
2183.d(fdin[3:0]),
2184.si({scan_in,so[2:0]}),
2185.so({so[2:0],scan_out}),
2186.q(dout[3:0])
2187);
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200endmodule
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214// any PARAMS parms go into naming of macro
2215
2216module tcu_mbist_ctl_msff_ctl_macro__width_48 (
2217 din,
2218 l1clk,
2219 scan_in,
2220 siclk,
2221 soclk,
2222 dout,
2223 scan_out);
2224wire [47:0] fdin;
2225wire [46:0] so;
2226
2227 input [47:0] din;
2228 input l1clk;
2229 input scan_in;
2230
2231
2232 input siclk;
2233 input soclk;
2234
2235 output [47:0] dout;
2236 output scan_out;
2237assign fdin[47:0] = din[47:0];
2238
2239
2240
2241
2242
2243
2244dff #(48) d0_0 (
2245.l1clk(l1clk),
2246.siclk(siclk),
2247.soclk(soclk),
2248.d(fdin[47:0]),
2249.si({scan_in,so[46:0]}),
2250.so({so[46:0],scan_out}),
2251.q(dout[47:0])
2252);
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265endmodule
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279// any PARAMS parms go into naming of macro
2280
2281module tcu_mbist_ctl_msff_ctl_macro__width_1 (
2282 din,
2283 l1clk,
2284 scan_in,
2285 siclk,
2286 soclk,
2287 dout,
2288 scan_out);
2289wire [0:0] fdin;
2290
2291 input [0:0] din;
2292 input l1clk;
2293 input scan_in;
2294
2295
2296 input siclk;
2297 input soclk;
2298
2299 output [0:0] dout;
2300 output scan_out;
2301assign fdin[0:0] = din[0:0];
2302
2303
2304
2305
2306
2307
2308dff #(1) d0_0 (
2309.l1clk(l1clk),
2310.siclk(siclk),
2311.soclk(soclk),
2312.d(fdin[0:0]),
2313.si(scan_in),
2314.so(scan_out),
2315.q(dout[0:0])
2316);
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329endmodule
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343// any PARAMS parms go into naming of macro
2344
2345module tcu_mbist_ctl_msff_ctl_macro__width_2 (
2346 din,
2347 l1clk,
2348 scan_in,
2349 siclk,
2350 soclk,
2351 dout,
2352 scan_out);
2353wire [1:0] fdin;
2354wire [0:0] so;
2355
2356 input [1:0] din;
2357 input l1clk;
2358 input scan_in;
2359
2360
2361 input siclk;
2362 input soclk;
2363
2364 output [1:0] dout;
2365 output scan_out;
2366assign fdin[1:0] = din[1:0];
2367
2368
2369
2370
2371
2372
2373dff #(2) d0_0 (
2374.l1clk(l1clk),
2375.siclk(siclk),
2376.soclk(soclk),
2377.d(fdin[1:0]),
2378.si({scan_in,so[0:0]}),
2379.so({so[0:0],scan_out}),
2380.q(dout[1:0])
2381);
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394endmodule
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408// any PARAMS parms go into naming of macro
2409
2410module tcu_mbist_ctl_msff_ctl_macro__width_8 (
2411 din,
2412 l1clk,
2413 scan_in,
2414 siclk,
2415 soclk,
2416 dout,
2417 scan_out);
2418wire [7:0] fdin;
2419wire [6:0] so;
2420
2421 input [7:0] din;
2422 input l1clk;
2423 input scan_in;
2424
2425
2426 input siclk;
2427 input soclk;
2428
2429 output [7:0] dout;
2430 output scan_out;
2431assign fdin[7:0] = din[7:0];
2432
2433
2434
2435
2436
2437
2438dff #(8) d0_0 (
2439.l1clk(l1clk),
2440.siclk(siclk),
2441.soclk(soclk),
2442.d(fdin[7:0]),
2443.si({scan_in,so[6:0]}),
2444.so({so[6:0],scan_out}),
2445.q(dout[7:0])
2446);
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459endmodule
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473// any PARAMS parms go into naming of macro
2474
2475module tcu_mbist_ctl_msff_ctl_macro__en_1__width_64 (
2476 din,
2477 en,
2478 l1clk,
2479 scan_in,
2480 siclk,
2481 soclk,
2482 dout,
2483 scan_out);
2484wire [63:0] fdin;
2485wire [62:0] so;
2486
2487 input [63:0] din;
2488 input en;
2489 input l1clk;
2490 input scan_in;
2491
2492
2493 input siclk;
2494 input soclk;
2495
2496 output [63:0] dout;
2497 output scan_out;
2498assign fdin[63:0] = (din[63:0] & {64{en}}) | (dout[63:0] & ~{64{en}});
2499
2500
2501
2502
2503
2504
2505dff #(64) d0_0 (
2506.l1clk(l1clk),
2507.siclk(siclk),
2508.soclk(soclk),
2509.d(fdin[63:0]),
2510.si({scan_in,so[62:0]}),
2511.so({so[62:0],scan_out}),
2512.q(dout[63:0])
2513);
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526endmodule
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540// any PARAMS parms go into naming of macro
2541
2542module tcu_mbist_ctl_msff_ctl_macro__width_18 (
2543 din,
2544 l1clk,
2545 scan_in,
2546 siclk,
2547 soclk,
2548 dout,
2549 scan_out);
2550wire [17:0] fdin;
2551wire [16:0] so;
2552
2553 input [17:0] din;
2554 input l1clk;
2555 input scan_in;
2556
2557
2558 input siclk;
2559 input soclk;
2560
2561 output [17:0] dout;
2562 output scan_out;
2563assign fdin[17:0] = din[17:0];
2564
2565
2566
2567
2568
2569
2570dff #(18) d0_0 (
2571.l1clk(l1clk),
2572.siclk(siclk),
2573.soclk(soclk),
2574.d(fdin[17:0]),
2575.si({scan_in,so[16:0]}),
2576.so({so[16:0],scan_out}),
2577.q(dout[17:0])
2578);
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591endmodule
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605// any PARAMS parms go into naming of macro
2606
2607module tcu_mbist_ctl_msff_ctl_macro__width_32 (
2608 din,
2609 l1clk,
2610 scan_in,
2611 siclk,
2612 soclk,
2613 dout,
2614 scan_out);
2615wire [31:0] fdin;
2616wire [30:0] so;
2617
2618 input [31:0] din;
2619 input l1clk;
2620 input scan_in;
2621
2622
2623 input siclk;
2624 input soclk;
2625
2626 output [31:0] dout;
2627 output scan_out;
2628assign fdin[31:0] = din[31:0];
2629
2630
2631
2632
2633
2634
2635dff #(32) d0_0 (
2636.l1clk(l1clk),
2637.siclk(siclk),
2638.soclk(soclk),
2639.d(fdin[31:0]),
2640.si({scan_in,so[30:0]}),
2641.so({so[30:0],scan_out}),
2642.q(dout[31:0])
2643);
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656endmodule
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670// any PARAMS parms go into naming of macro
2671
2672module tcu_mbist_ctl_msff_ctl_macro__en_1__width_16 (
2673 din,
2674 en,
2675 l1clk,
2676 scan_in,
2677 siclk,
2678 soclk,
2679 dout,
2680 scan_out);
2681wire [15:0] fdin;
2682wire [14:0] so;
2683
2684 input [15:0] din;
2685 input en;
2686 input l1clk;
2687 input scan_in;
2688
2689
2690 input siclk;
2691 input soclk;
2692
2693 output [15:0] dout;
2694 output scan_out;
2695assign fdin[15:0] = (din[15:0] & {16{en}}) | (dout[15:0] & ~{16{en}});
2696
2697
2698
2699
2700
2701
2702dff #(16) d0_0 (
2703.l1clk(l1clk),
2704.siclk(siclk),
2705.soclk(soclk),
2706.d(fdin[15:0]),
2707.si({scan_in,so[14:0]}),
2708.so({so[14:0],scan_out}),
2709.q(dout[15:0])
2710);
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723endmodule
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737// any PARAMS parms go into naming of macro
2738
2739module tcu_mbist_ctl_msff_ctl_macro__en_1__width_8 (
2740 din,
2741 en,
2742 l1clk,
2743 scan_in,
2744 siclk,
2745 soclk,
2746 dout,
2747 scan_out);
2748wire [7:0] fdin;
2749wire [6:0] so;
2750
2751 input [7:0] din;
2752 input en;
2753 input l1clk;
2754 input scan_in;
2755
2756
2757 input siclk;
2758 input soclk;
2759
2760 output [7:0] dout;
2761 output scan_out;
2762assign fdin[7:0] = (din[7:0] & {8{en}}) | (dout[7:0] & ~{8{en}});
2763
2764
2765
2766
2767
2768
2769dff #(8) d0_0 (
2770.l1clk(l1clk),
2771.siclk(siclk),
2772.soclk(soclk),
2773.d(fdin[7:0]),
2774.si({scan_in,so[6:0]}),
2775.so({so[6:0],scan_out}),
2776.q(dout[7:0])
2777);
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790endmodule
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804// any PARAMS parms go into naming of macro
2805
2806module tcu_mbist_ctl_msff_ctl_macro__en_1__width_5 (
2807 din,
2808 en,
2809 l1clk,
2810 scan_in,
2811 siclk,
2812 soclk,
2813 dout,
2814 scan_out);
2815wire [4:0] fdin;
2816wire [3:0] so;
2817
2818 input [4:0] din;
2819 input en;
2820 input l1clk;
2821 input scan_in;
2822
2823
2824 input siclk;
2825 input soclk;
2826
2827 output [4:0] dout;
2828 output scan_out;
2829assign fdin[4:0] = (din[4:0] & {5{en}}) | (dout[4:0] & ~{5{en}});
2830
2831
2832
2833
2834
2835
2836dff #(5) d0_0 (
2837.l1clk(l1clk),
2838.siclk(siclk),
2839.soclk(soclk),
2840.d(fdin[4:0]),
2841.si({scan_in,so[3:0]}),
2842.so({so[3:0],scan_out}),
2843.q(dout[4:0])
2844);
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857endmodule
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871// any PARAMS parms go into naming of macro
2872
2873module tcu_mbist_ctl_msff_ctl_macro__width_47 (
2874 din,
2875 l1clk,
2876 scan_in,
2877 siclk,
2878 soclk,
2879 dout,
2880 scan_out);
2881wire [46:0] fdin;
2882wire [45:0] so;
2883
2884 input [46:0] din;
2885 input l1clk;
2886 input scan_in;
2887
2888
2889 input siclk;
2890 input soclk;
2891
2892 output [46:0] dout;
2893 output scan_out;
2894assign fdin[46:0] = din[46:0];
2895
2896
2897
2898
2899
2900
2901dff #(47) d0_0 (
2902.l1clk(l1clk),
2903.siclk(siclk),
2904.soclk(soclk),
2905.d(fdin[46:0]),
2906.si({scan_in,so[45:0]}),
2907.so({so[45:0],scan_out}),
2908.q(dout[46:0])
2909);
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922endmodule
2923
2924
2925
2926// any PARAMS parms go into naming of macro
2927
2928module tcu_mbist_ctl_msff_ctl_macro__width_36 (
2929 din,
2930 l1clk,
2931 scan_in,
2932 siclk,
2933 soclk,
2934 dout,
2935 scan_out);
2936wire [35:0] fdin;
2937wire [34:0] so;
2938
2939 input [35:0] din;
2940 input l1clk;
2941 input scan_in;
2942
2943
2944 input siclk;
2945 input soclk;
2946
2947 output [35:0] dout;
2948 output scan_out;
2949assign fdin[35:0] = din[35:0];
2950
2951
2952
2953
2954
2955
2956dff #(36) d0_0 (
2957.l1clk(l1clk),
2958.siclk(siclk),
2959.soclk(soclk),
2960.d(fdin[35:0]),
2961.si({scan_in,so[34:0]}),
2962.so({so[34:0],scan_out}),
2963.q(dout[35:0])
2964);
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977endmodule
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991// any PARAMS parms go into naming of macro
2992
2993module tcu_mbist_ctl_msff_ctl_macro__width_39 (
2994 din,
2995 l1clk,
2996 scan_in,
2997 siclk,
2998 soclk,
2999 dout,
3000 scan_out);
3001wire [38:0] fdin;
3002wire [37:0] so;
3003
3004 input [38:0] din;
3005 input l1clk;
3006 input scan_in;
3007
3008
3009 input siclk;
3010 input soclk;
3011
3012 output [38:0] dout;
3013 output scan_out;
3014assign fdin[38:0] = din[38:0];
3015
3016
3017
3018
3019
3020
3021dff #(39) d0_0 (
3022.l1clk(l1clk),
3023.siclk(siclk),
3024.soclk(soclk),
3025.d(fdin[38:0]),
3026.si({scan_in,so[37:0]}),
3027.so({so[37:0],scan_out}),
3028.q(dout[38:0])
3029);
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042endmodule
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056// any PARAMS parms go into naming of macro
3057
3058module tcu_mbist_ctl_msff_ctl_macro__en_1__width_40 (
3059 din,
3060 en,
3061 l1clk,
3062 scan_in,
3063 siclk,
3064 soclk,
3065 dout,
3066 scan_out);
3067wire [39:0] fdin;
3068wire [38:0] so;
3069
3070 input [39:0] din;
3071 input en;
3072 input l1clk;
3073 input scan_in;
3074
3075
3076 input siclk;
3077 input soclk;
3078
3079 output [39:0] dout;
3080 output scan_out;
3081assign fdin[39:0] = (din[39:0] & {40{en}}) | (dout[39:0] & ~{40{en}});
3082
3083
3084
3085
3086
3087
3088dff #(40) d0_0 (
3089.l1clk(l1clk),
3090.siclk(siclk),
3091.soclk(soclk),
3092.d(fdin[39:0]),
3093.si({scan_in,so[38:0]}),
3094.so({so[38:0],scan_out}),
3095.q(dout[39:0])
3096);
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109endmodule
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123// any PARAMS parms go into naming of macro
3124
3125module tcu_mbist_ctl_msff_ctl_macro__clr__1__width_1 (
3126 din,
3127 clr_,
3128 l1clk,
3129 scan_in,
3130 siclk,
3131 soclk,
3132 dout,
3133 scan_out);
3134wire [0:0] fdin;
3135
3136 input [0:0] din;
3137 input clr_;
3138 input l1clk;
3139 input scan_in;
3140
3141
3142 input siclk;
3143 input soclk;
3144
3145 output [0:0] dout;
3146 output scan_out;
3147assign fdin[0:0] = din[0:0] & ~{1{(~clr_)}};
3148
3149
3150
3151
3152
3153
3154dff #(1) d0_0 (
3155.l1clk(l1clk),
3156.siclk(siclk),
3157.soclk(soclk),
3158.d(fdin[0:0]),
3159.si(scan_in),
3160.so(scan_out),
3161.q(dout[0:0])
3162);
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175endmodule
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189// any PARAMS parms go into naming of macro
3190
3191module tcu_mbist_ctl_msff_ctl_macro__en_1__width_3 (
3192 din,
3193 en,
3194 l1clk,
3195 scan_in,
3196 siclk,
3197 soclk,
3198 dout,
3199 scan_out);
3200wire [2:0] fdin;
3201wire [1:0] so;
3202
3203 input [2:0] din;
3204 input en;
3205 input l1clk;
3206 input scan_in;
3207
3208
3209 input siclk;
3210 input soclk;
3211
3212 output [2:0] dout;
3213 output scan_out;
3214assign fdin[2:0] = (din[2:0] & {3{en}}) | (dout[2:0] & ~{3{en}});
3215
3216
3217
3218
3219
3220
3221dff #(3) d0_0 (
3222.l1clk(l1clk),
3223.siclk(siclk),
3224.soclk(soclk),
3225.d(fdin[2:0]),
3226.si({scan_in,so[1:0]}),
3227.so({so[1:0],scan_out}),
3228.q(dout[2:0])
3229);
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242endmodule
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252// Description: Spare gate macro for control blocks
3253//
3254// Param num controls the number of times the macro is added
3255// flops=0 can be used to use only combination spare logic
3256
3257
3258module tcu_mbist_ctl_spare_ctl_macro__flops_0__num_12;
3259wire spare0_buf_32x_unused;
3260wire spare0_nand3_8x_unused;
3261wire spare0_inv_8x_unused;
3262wire spare0_aoi22_4x_unused;
3263wire spare0_buf_8x_unused;
3264wire spare0_oai22_4x_unused;
3265wire spare0_inv_16x_unused;
3266wire spare0_nand2_16x_unused;
3267wire spare0_nor3_4x_unused;
3268wire spare0_nand2_8x_unused;
3269wire spare0_buf_16x_unused;
3270wire spare0_nor2_16x_unused;
3271wire spare0_inv_32x_unused;
3272wire spare1_buf_32x_unused;
3273wire spare1_nand3_8x_unused;
3274wire spare1_inv_8x_unused;
3275wire spare1_aoi22_4x_unused;
3276wire spare1_buf_8x_unused;
3277wire spare1_oai22_4x_unused;
3278wire spare1_inv_16x_unused;
3279wire spare1_nand2_16x_unused;
3280wire spare1_nor3_4x_unused;
3281wire spare1_nand2_8x_unused;
3282wire spare1_buf_16x_unused;
3283wire spare1_nor2_16x_unused;
3284wire spare1_inv_32x_unused;
3285wire spare2_buf_32x_unused;
3286wire spare2_nand3_8x_unused;
3287wire spare2_inv_8x_unused;
3288wire spare2_aoi22_4x_unused;
3289wire spare2_buf_8x_unused;
3290wire spare2_oai22_4x_unused;
3291wire spare2_inv_16x_unused;
3292wire spare2_nand2_16x_unused;
3293wire spare2_nor3_4x_unused;
3294wire spare2_nand2_8x_unused;
3295wire spare2_buf_16x_unused;
3296wire spare2_nor2_16x_unused;
3297wire spare2_inv_32x_unused;
3298wire spare3_buf_32x_unused;
3299wire spare3_nand3_8x_unused;
3300wire spare3_inv_8x_unused;
3301wire spare3_aoi22_4x_unused;
3302wire spare3_buf_8x_unused;
3303wire spare3_oai22_4x_unused;
3304wire spare3_inv_16x_unused;
3305wire spare3_nand2_16x_unused;
3306wire spare3_nor3_4x_unused;
3307wire spare3_nand2_8x_unused;
3308wire spare3_buf_16x_unused;
3309wire spare3_nor2_16x_unused;
3310wire spare3_inv_32x_unused;
3311wire spare4_buf_32x_unused;
3312wire spare4_nand3_8x_unused;
3313wire spare4_inv_8x_unused;
3314wire spare4_aoi22_4x_unused;
3315wire spare4_buf_8x_unused;
3316wire spare4_oai22_4x_unused;
3317wire spare4_inv_16x_unused;
3318wire spare4_nand2_16x_unused;
3319wire spare4_nor3_4x_unused;
3320wire spare4_nand2_8x_unused;
3321wire spare4_buf_16x_unused;
3322wire spare4_nor2_16x_unused;
3323wire spare4_inv_32x_unused;
3324wire spare5_buf_32x_unused;
3325wire spare5_nand3_8x_unused;
3326wire spare5_inv_8x_unused;
3327wire spare5_aoi22_4x_unused;
3328wire spare5_buf_8x_unused;
3329wire spare5_oai22_4x_unused;
3330wire spare5_inv_16x_unused;
3331wire spare5_nand2_16x_unused;
3332wire spare5_nor3_4x_unused;
3333wire spare5_nand2_8x_unused;
3334wire spare5_buf_16x_unused;
3335wire spare5_nor2_16x_unused;
3336wire spare5_inv_32x_unused;
3337wire spare6_buf_32x_unused;
3338wire spare6_nand3_8x_unused;
3339wire spare6_inv_8x_unused;
3340wire spare6_aoi22_4x_unused;
3341wire spare6_buf_8x_unused;
3342wire spare6_oai22_4x_unused;
3343wire spare6_inv_16x_unused;
3344wire spare6_nand2_16x_unused;
3345wire spare6_nor3_4x_unused;
3346wire spare6_nand2_8x_unused;
3347wire spare6_buf_16x_unused;
3348wire spare6_nor2_16x_unused;
3349wire spare6_inv_32x_unused;
3350wire spare7_buf_32x_unused;
3351wire spare7_nand3_8x_unused;
3352wire spare7_inv_8x_unused;
3353wire spare7_aoi22_4x_unused;
3354wire spare7_buf_8x_unused;
3355wire spare7_oai22_4x_unused;
3356wire spare7_inv_16x_unused;
3357wire spare7_nand2_16x_unused;
3358wire spare7_nor3_4x_unused;
3359wire spare7_nand2_8x_unused;
3360wire spare7_buf_16x_unused;
3361wire spare7_nor2_16x_unused;
3362wire spare7_inv_32x_unused;
3363wire spare8_buf_32x_unused;
3364wire spare8_nand3_8x_unused;
3365wire spare8_inv_8x_unused;
3366wire spare8_aoi22_4x_unused;
3367wire spare8_buf_8x_unused;
3368wire spare8_oai22_4x_unused;
3369wire spare8_inv_16x_unused;
3370wire spare8_nand2_16x_unused;
3371wire spare8_nor3_4x_unused;
3372wire spare8_nand2_8x_unused;
3373wire spare8_buf_16x_unused;
3374wire spare8_nor2_16x_unused;
3375wire spare8_inv_32x_unused;
3376wire spare9_buf_32x_unused;
3377wire spare9_nand3_8x_unused;
3378wire spare9_inv_8x_unused;
3379wire spare9_aoi22_4x_unused;
3380wire spare9_buf_8x_unused;
3381wire spare9_oai22_4x_unused;
3382wire spare9_inv_16x_unused;
3383wire spare9_nand2_16x_unused;
3384wire spare9_nor3_4x_unused;
3385wire spare9_nand2_8x_unused;
3386wire spare9_buf_16x_unused;
3387wire spare9_nor2_16x_unused;
3388wire spare9_inv_32x_unused;
3389wire spare10_buf_32x_unused;
3390wire spare10_nand3_8x_unused;
3391wire spare10_inv_8x_unused;
3392wire spare10_aoi22_4x_unused;
3393wire spare10_buf_8x_unused;
3394wire spare10_oai22_4x_unused;
3395wire spare10_inv_16x_unused;
3396wire spare10_nand2_16x_unused;
3397wire spare10_nor3_4x_unused;
3398wire spare10_nand2_8x_unused;
3399wire spare10_buf_16x_unused;
3400wire spare10_nor2_16x_unused;
3401wire spare10_inv_32x_unused;
3402wire spare11_buf_32x_unused;
3403wire spare11_nand3_8x_unused;
3404wire spare11_inv_8x_unused;
3405wire spare11_aoi22_4x_unused;
3406wire spare11_buf_8x_unused;
3407wire spare11_oai22_4x_unused;
3408wire spare11_inv_16x_unused;
3409wire spare11_nand2_16x_unused;
3410wire spare11_nor3_4x_unused;
3411wire spare11_nand2_8x_unused;
3412wire spare11_buf_16x_unused;
3413wire spare11_nor2_16x_unused;
3414wire spare11_inv_32x_unused;
3415
3416
3417cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
3418 .out(spare0_buf_32x_unused));
3419cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
3420 .in1(1'b1),
3421 .in2(1'b1),
3422 .out(spare0_nand3_8x_unused));
3423cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
3424 .out(spare0_inv_8x_unused));
3425cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
3426 .in01(1'b1),
3427 .in10(1'b1),
3428 .in11(1'b1),
3429 .out(spare0_aoi22_4x_unused));
3430cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
3431 .out(spare0_buf_8x_unused));
3432cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
3433 .in01(1'b1),
3434 .in10(1'b1),
3435 .in11(1'b1),
3436 .out(spare0_oai22_4x_unused));
3437cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
3438 .out(spare0_inv_16x_unused));
3439cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
3440 .in1(1'b1),
3441 .out(spare0_nand2_16x_unused));
3442cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
3443 .in1(1'b0),
3444 .in2(1'b0),
3445 .out(spare0_nor3_4x_unused));
3446cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
3447 .in1(1'b1),
3448 .out(spare0_nand2_8x_unused));
3449cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
3450 .out(spare0_buf_16x_unused));
3451cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
3452 .in1(1'b0),
3453 .out(spare0_nor2_16x_unused));
3454cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
3455 .out(spare0_inv_32x_unused));
3456
3457cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
3458 .out(spare1_buf_32x_unused));
3459cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
3460 .in1(1'b1),
3461 .in2(1'b1),
3462 .out(spare1_nand3_8x_unused));
3463cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
3464 .out(spare1_inv_8x_unused));
3465cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
3466 .in01(1'b1),
3467 .in10(1'b1),
3468 .in11(1'b1),
3469 .out(spare1_aoi22_4x_unused));
3470cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
3471 .out(spare1_buf_8x_unused));
3472cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
3473 .in01(1'b1),
3474 .in10(1'b1),
3475 .in11(1'b1),
3476 .out(spare1_oai22_4x_unused));
3477cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
3478 .out(spare1_inv_16x_unused));
3479cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
3480 .in1(1'b1),
3481 .out(spare1_nand2_16x_unused));
3482cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
3483 .in1(1'b0),
3484 .in2(1'b0),
3485 .out(spare1_nor3_4x_unused));
3486cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
3487 .in1(1'b1),
3488 .out(spare1_nand2_8x_unused));
3489cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
3490 .out(spare1_buf_16x_unused));
3491cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
3492 .in1(1'b0),
3493 .out(spare1_nor2_16x_unused));
3494cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
3495 .out(spare1_inv_32x_unused));
3496
3497cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
3498 .out(spare2_buf_32x_unused));
3499cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
3500 .in1(1'b1),
3501 .in2(1'b1),
3502 .out(spare2_nand3_8x_unused));
3503cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
3504 .out(spare2_inv_8x_unused));
3505cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
3506 .in01(1'b1),
3507 .in10(1'b1),
3508 .in11(1'b1),
3509 .out(spare2_aoi22_4x_unused));
3510cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
3511 .out(spare2_buf_8x_unused));
3512cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
3513 .in01(1'b1),
3514 .in10(1'b1),
3515 .in11(1'b1),
3516 .out(spare2_oai22_4x_unused));
3517cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
3518 .out(spare2_inv_16x_unused));
3519cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
3520 .in1(1'b1),
3521 .out(spare2_nand2_16x_unused));
3522cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
3523 .in1(1'b0),
3524 .in2(1'b0),
3525 .out(spare2_nor3_4x_unused));
3526cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
3527 .in1(1'b1),
3528 .out(spare2_nand2_8x_unused));
3529cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
3530 .out(spare2_buf_16x_unused));
3531cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
3532 .in1(1'b0),
3533 .out(spare2_nor2_16x_unused));
3534cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
3535 .out(spare2_inv_32x_unused));
3536
3537cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
3538 .out(spare3_buf_32x_unused));
3539cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
3540 .in1(1'b1),
3541 .in2(1'b1),
3542 .out(spare3_nand3_8x_unused));
3543cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
3544 .out(spare3_inv_8x_unused));
3545cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
3546 .in01(1'b1),
3547 .in10(1'b1),
3548 .in11(1'b1),
3549 .out(spare3_aoi22_4x_unused));
3550cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
3551 .out(spare3_buf_8x_unused));
3552cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
3553 .in01(1'b1),
3554 .in10(1'b1),
3555 .in11(1'b1),
3556 .out(spare3_oai22_4x_unused));
3557cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
3558 .out(spare3_inv_16x_unused));
3559cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
3560 .in1(1'b1),
3561 .out(spare3_nand2_16x_unused));
3562cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
3563 .in1(1'b0),
3564 .in2(1'b0),
3565 .out(spare3_nor3_4x_unused));
3566cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
3567 .in1(1'b1),
3568 .out(spare3_nand2_8x_unused));
3569cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
3570 .out(spare3_buf_16x_unused));
3571cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
3572 .in1(1'b0),
3573 .out(spare3_nor2_16x_unused));
3574cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
3575 .out(spare3_inv_32x_unused));
3576
3577cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
3578 .out(spare4_buf_32x_unused));
3579cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
3580 .in1(1'b1),
3581 .in2(1'b1),
3582 .out(spare4_nand3_8x_unused));
3583cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
3584 .out(spare4_inv_8x_unused));
3585cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
3586 .in01(1'b1),
3587 .in10(1'b1),
3588 .in11(1'b1),
3589 .out(spare4_aoi22_4x_unused));
3590cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
3591 .out(spare4_buf_8x_unused));
3592cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
3593 .in01(1'b1),
3594 .in10(1'b1),
3595 .in11(1'b1),
3596 .out(spare4_oai22_4x_unused));
3597cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
3598 .out(spare4_inv_16x_unused));
3599cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
3600 .in1(1'b1),
3601 .out(spare4_nand2_16x_unused));
3602cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
3603 .in1(1'b0),
3604 .in2(1'b0),
3605 .out(spare4_nor3_4x_unused));
3606cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
3607 .in1(1'b1),
3608 .out(spare4_nand2_8x_unused));
3609cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
3610 .out(spare4_buf_16x_unused));
3611cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
3612 .in1(1'b0),
3613 .out(spare4_nor2_16x_unused));
3614cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
3615 .out(spare4_inv_32x_unused));
3616
3617cl_u1_buf_32x spare5_buf_32x (.in(1'b1),
3618 .out(spare5_buf_32x_unused));
3619cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1),
3620 .in1(1'b1),
3621 .in2(1'b1),
3622 .out(spare5_nand3_8x_unused));
3623cl_u1_inv_8x spare5_inv_8x (.in(1'b1),
3624 .out(spare5_inv_8x_unused));
3625cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1),
3626 .in01(1'b1),
3627 .in10(1'b1),
3628 .in11(1'b1),
3629 .out(spare5_aoi22_4x_unused));
3630cl_u1_buf_8x spare5_buf_8x (.in(1'b1),
3631 .out(spare5_buf_8x_unused));
3632cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1),
3633 .in01(1'b1),
3634 .in10(1'b1),
3635 .in11(1'b1),
3636 .out(spare5_oai22_4x_unused));
3637cl_u1_inv_16x spare5_inv_16x (.in(1'b1),
3638 .out(spare5_inv_16x_unused));
3639cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1),
3640 .in1(1'b1),
3641 .out(spare5_nand2_16x_unused));
3642cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0),
3643 .in1(1'b0),
3644 .in2(1'b0),
3645 .out(spare5_nor3_4x_unused));
3646cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1),
3647 .in1(1'b1),
3648 .out(spare5_nand2_8x_unused));
3649cl_u1_buf_16x spare5_buf_16x (.in(1'b1),
3650 .out(spare5_buf_16x_unused));
3651cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0),
3652 .in1(1'b0),
3653 .out(spare5_nor2_16x_unused));
3654cl_u1_inv_32x spare5_inv_32x (.in(1'b1),
3655 .out(spare5_inv_32x_unused));
3656
3657cl_u1_buf_32x spare6_buf_32x (.in(1'b1),
3658 .out(spare6_buf_32x_unused));
3659cl_u1_nand3_8x spare6_nand3_8x (.in0(1'b1),
3660 .in1(1'b1),
3661 .in2(1'b1),
3662 .out(spare6_nand3_8x_unused));
3663cl_u1_inv_8x spare6_inv_8x (.in(1'b1),
3664 .out(spare6_inv_8x_unused));
3665cl_u1_aoi22_4x spare6_aoi22_4x (.in00(1'b1),
3666 .in01(1'b1),
3667 .in10(1'b1),
3668 .in11(1'b1),
3669 .out(spare6_aoi22_4x_unused));
3670cl_u1_buf_8x spare6_buf_8x (.in(1'b1),
3671 .out(spare6_buf_8x_unused));
3672cl_u1_oai22_4x spare6_oai22_4x (.in00(1'b1),
3673 .in01(1'b1),
3674 .in10(1'b1),
3675 .in11(1'b1),
3676 .out(spare6_oai22_4x_unused));
3677cl_u1_inv_16x spare6_inv_16x (.in(1'b1),
3678 .out(spare6_inv_16x_unused));
3679cl_u1_nand2_16x spare6_nand2_16x (.in0(1'b1),
3680 .in1(1'b1),
3681 .out(spare6_nand2_16x_unused));
3682cl_u1_nor3_4x spare6_nor3_4x (.in0(1'b0),
3683 .in1(1'b0),
3684 .in2(1'b0),
3685 .out(spare6_nor3_4x_unused));
3686cl_u1_nand2_8x spare6_nand2_8x (.in0(1'b1),
3687 .in1(1'b1),
3688 .out(spare6_nand2_8x_unused));
3689cl_u1_buf_16x spare6_buf_16x (.in(1'b1),
3690 .out(spare6_buf_16x_unused));
3691cl_u1_nor2_16x spare6_nor2_16x (.in0(1'b0),
3692 .in1(1'b0),
3693 .out(spare6_nor2_16x_unused));
3694cl_u1_inv_32x spare6_inv_32x (.in(1'b1),
3695 .out(spare6_inv_32x_unused));
3696
3697cl_u1_buf_32x spare7_buf_32x (.in(1'b1),
3698 .out(spare7_buf_32x_unused));
3699cl_u1_nand3_8x spare7_nand3_8x (.in0(1'b1),
3700 .in1(1'b1),
3701 .in2(1'b1),
3702 .out(spare7_nand3_8x_unused));
3703cl_u1_inv_8x spare7_inv_8x (.in(1'b1),
3704 .out(spare7_inv_8x_unused));
3705cl_u1_aoi22_4x spare7_aoi22_4x (.in00(1'b1),
3706 .in01(1'b1),
3707 .in10(1'b1),
3708 .in11(1'b1),
3709 .out(spare7_aoi22_4x_unused));
3710cl_u1_buf_8x spare7_buf_8x (.in(1'b1),
3711 .out(spare7_buf_8x_unused));
3712cl_u1_oai22_4x spare7_oai22_4x (.in00(1'b1),
3713 .in01(1'b1),
3714 .in10(1'b1),
3715 .in11(1'b1),
3716 .out(spare7_oai22_4x_unused));
3717cl_u1_inv_16x spare7_inv_16x (.in(1'b1),
3718 .out(spare7_inv_16x_unused));
3719cl_u1_nand2_16x spare7_nand2_16x (.in0(1'b1),
3720 .in1(1'b1),
3721 .out(spare7_nand2_16x_unused));
3722cl_u1_nor3_4x spare7_nor3_4x (.in0(1'b0),
3723 .in1(1'b0),
3724 .in2(1'b0),
3725 .out(spare7_nor3_4x_unused));
3726cl_u1_nand2_8x spare7_nand2_8x (.in0(1'b1),
3727 .in1(1'b1),
3728 .out(spare7_nand2_8x_unused));
3729cl_u1_buf_16x spare7_buf_16x (.in(1'b1),
3730 .out(spare7_buf_16x_unused));
3731cl_u1_nor2_16x spare7_nor2_16x (.in0(1'b0),
3732 .in1(1'b0),
3733 .out(spare7_nor2_16x_unused));
3734cl_u1_inv_32x spare7_inv_32x (.in(1'b1),
3735 .out(spare7_inv_32x_unused));
3736
3737cl_u1_buf_32x spare8_buf_32x (.in(1'b1),
3738 .out(spare8_buf_32x_unused));
3739cl_u1_nand3_8x spare8_nand3_8x (.in0(1'b1),
3740 .in1(1'b1),
3741 .in2(1'b1),
3742 .out(spare8_nand3_8x_unused));
3743cl_u1_inv_8x spare8_inv_8x (.in(1'b1),
3744 .out(spare8_inv_8x_unused));
3745cl_u1_aoi22_4x spare8_aoi22_4x (.in00(1'b1),
3746 .in01(1'b1),
3747 .in10(1'b1),
3748 .in11(1'b1),
3749 .out(spare8_aoi22_4x_unused));
3750cl_u1_buf_8x spare8_buf_8x (.in(1'b1),
3751 .out(spare8_buf_8x_unused));
3752cl_u1_oai22_4x spare8_oai22_4x (.in00(1'b1),
3753 .in01(1'b1),
3754 .in10(1'b1),
3755 .in11(1'b1),
3756 .out(spare8_oai22_4x_unused));
3757cl_u1_inv_16x spare8_inv_16x (.in(1'b1),
3758 .out(spare8_inv_16x_unused));
3759cl_u1_nand2_16x spare8_nand2_16x (.in0(1'b1),
3760 .in1(1'b1),
3761 .out(spare8_nand2_16x_unused));
3762cl_u1_nor3_4x spare8_nor3_4x (.in0(1'b0),
3763 .in1(1'b0),
3764 .in2(1'b0),
3765 .out(spare8_nor3_4x_unused));
3766cl_u1_nand2_8x spare8_nand2_8x (.in0(1'b1),
3767 .in1(1'b1),
3768 .out(spare8_nand2_8x_unused));
3769cl_u1_buf_16x spare8_buf_16x (.in(1'b1),
3770 .out(spare8_buf_16x_unused));
3771cl_u1_nor2_16x spare8_nor2_16x (.in0(1'b0),
3772 .in1(1'b0),
3773 .out(spare8_nor2_16x_unused));
3774cl_u1_inv_32x spare8_inv_32x (.in(1'b1),
3775 .out(spare8_inv_32x_unused));
3776
3777cl_u1_buf_32x spare9_buf_32x (.in(1'b1),
3778 .out(spare9_buf_32x_unused));
3779cl_u1_nand3_8x spare9_nand3_8x (.in0(1'b1),
3780 .in1(1'b1),
3781 .in2(1'b1),
3782 .out(spare9_nand3_8x_unused));
3783cl_u1_inv_8x spare9_inv_8x (.in(1'b1),
3784 .out(spare9_inv_8x_unused));
3785cl_u1_aoi22_4x spare9_aoi22_4x (.in00(1'b1),
3786 .in01(1'b1),
3787 .in10(1'b1),
3788 .in11(1'b1),
3789 .out(spare9_aoi22_4x_unused));
3790cl_u1_buf_8x spare9_buf_8x (.in(1'b1),
3791 .out(spare9_buf_8x_unused));
3792cl_u1_oai22_4x spare9_oai22_4x (.in00(1'b1),
3793 .in01(1'b1),
3794 .in10(1'b1),
3795 .in11(1'b1),
3796 .out(spare9_oai22_4x_unused));
3797cl_u1_inv_16x spare9_inv_16x (.in(1'b1),
3798 .out(spare9_inv_16x_unused));
3799cl_u1_nand2_16x spare9_nand2_16x (.in0(1'b1),
3800 .in1(1'b1),
3801 .out(spare9_nand2_16x_unused));
3802cl_u1_nor3_4x spare9_nor3_4x (.in0(1'b0),
3803 .in1(1'b0),
3804 .in2(1'b0),
3805 .out(spare9_nor3_4x_unused));
3806cl_u1_nand2_8x spare9_nand2_8x (.in0(1'b1),
3807 .in1(1'b1),
3808 .out(spare9_nand2_8x_unused));
3809cl_u1_buf_16x spare9_buf_16x (.in(1'b1),
3810 .out(spare9_buf_16x_unused));
3811cl_u1_nor2_16x spare9_nor2_16x (.in0(1'b0),
3812 .in1(1'b0),
3813 .out(spare9_nor2_16x_unused));
3814cl_u1_inv_32x spare9_inv_32x (.in(1'b1),
3815 .out(spare9_inv_32x_unused));
3816
3817cl_u1_buf_32x spare10_buf_32x (.in(1'b1),
3818 .out(spare10_buf_32x_unused));
3819cl_u1_nand3_8x spare10_nand3_8x (.in0(1'b1),
3820 .in1(1'b1),
3821 .in2(1'b1),
3822 .out(spare10_nand3_8x_unused));
3823cl_u1_inv_8x spare10_inv_8x (.in(1'b1),
3824 .out(spare10_inv_8x_unused));
3825cl_u1_aoi22_4x spare10_aoi22_4x (.in00(1'b1),
3826 .in01(1'b1),
3827 .in10(1'b1),
3828 .in11(1'b1),
3829 .out(spare10_aoi22_4x_unused));
3830cl_u1_buf_8x spare10_buf_8x (.in(1'b1),
3831 .out(spare10_buf_8x_unused));
3832cl_u1_oai22_4x spare10_oai22_4x (.in00(1'b1),
3833 .in01(1'b1),
3834 .in10(1'b1),
3835 .in11(1'b1),
3836 .out(spare10_oai22_4x_unused));
3837cl_u1_inv_16x spare10_inv_16x (.in(1'b1),
3838 .out(spare10_inv_16x_unused));
3839cl_u1_nand2_16x spare10_nand2_16x (.in0(1'b1),
3840 .in1(1'b1),
3841 .out(spare10_nand2_16x_unused));
3842cl_u1_nor3_4x spare10_nor3_4x (.in0(1'b0),
3843 .in1(1'b0),
3844 .in2(1'b0),
3845 .out(spare10_nor3_4x_unused));
3846cl_u1_nand2_8x spare10_nand2_8x (.in0(1'b1),
3847 .in1(1'b1),
3848 .out(spare10_nand2_8x_unused));
3849cl_u1_buf_16x spare10_buf_16x (.in(1'b1),
3850 .out(spare10_buf_16x_unused));
3851cl_u1_nor2_16x spare10_nor2_16x (.in0(1'b0),
3852 .in1(1'b0),
3853 .out(spare10_nor2_16x_unused));
3854cl_u1_inv_32x spare10_inv_32x (.in(1'b1),
3855 .out(spare10_inv_32x_unused));
3856
3857cl_u1_buf_32x spare11_buf_32x (.in(1'b1),
3858 .out(spare11_buf_32x_unused));
3859cl_u1_nand3_8x spare11_nand3_8x (.in0(1'b1),
3860 .in1(1'b1),
3861 .in2(1'b1),
3862 .out(spare11_nand3_8x_unused));
3863cl_u1_inv_8x spare11_inv_8x (.in(1'b1),
3864 .out(spare11_inv_8x_unused));
3865cl_u1_aoi22_4x spare11_aoi22_4x (.in00(1'b1),
3866 .in01(1'b1),
3867 .in10(1'b1),
3868 .in11(1'b1),
3869 .out(spare11_aoi22_4x_unused));
3870cl_u1_buf_8x spare11_buf_8x (.in(1'b1),
3871 .out(spare11_buf_8x_unused));
3872cl_u1_oai22_4x spare11_oai22_4x (.in00(1'b1),
3873 .in01(1'b1),
3874 .in10(1'b1),
3875 .in11(1'b1),
3876 .out(spare11_oai22_4x_unused));
3877cl_u1_inv_16x spare11_inv_16x (.in(1'b1),
3878 .out(spare11_inv_16x_unused));
3879cl_u1_nand2_16x spare11_nand2_16x (.in0(1'b1),
3880 .in1(1'b1),
3881 .out(spare11_nand2_16x_unused));
3882cl_u1_nor3_4x spare11_nor3_4x (.in0(1'b0),
3883 .in1(1'b0),
3884 .in2(1'b0),
3885 .out(spare11_nor3_4x_unused));
3886cl_u1_nand2_8x spare11_nand2_8x (.in0(1'b1),
3887 .in1(1'b1),
3888 .out(spare11_nand2_8x_unused));
3889cl_u1_buf_16x spare11_buf_16x (.in(1'b1),
3890 .out(spare11_buf_16x_unused));
3891cl_u1_nor2_16x spare11_nor2_16x (.in0(1'b0),
3892 .in1(1'b0),
3893 .out(spare11_nor2_16x_unused));
3894cl_u1_inv_32x spare11_inv_32x (.in(1'b1),
3895 .out(spare11_inv_32x_unused));
3896
3897
3898
3899endmodule
3900
3901
3902
3903
3904
3905
3906// any PARAMS parms go into naming of macro
3907
3908module tcu_mbist_ctl_msff_ctl_macro__scanreverse_1__width_12 (
3909 din,
3910 l1clk,
3911 scan_in,
3912 siclk,
3913 soclk,
3914 dout,
3915 scan_out);
3916wire [11:0] fdin;
3917wire [0:10] so;
3918
3919 input [11:0] din;
3920 input l1clk;
3921 input scan_in;
3922
3923
3924 input siclk;
3925 input soclk;
3926
3927 output [11:0] dout;
3928 output scan_out;
3929assign fdin[11:0] = din[11:0];
3930
3931
3932
3933
3934
3935
3936dff #(12) d0_0 (
3937.l1clk(l1clk),
3938.siclk(siclk),
3939.soclk(soclk),
3940.d(fdin[11:0]),
3941.si({so[0:10],scan_in}),
3942.so({scan_out,so[0:10]}),
3943.q(dout[11:0])
3944);
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957endmodule
3958
3959
3960
3961
3962
3963
3964
3965