Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / tcu / rtl / tcu_jtag_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tcu_jtag_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
102
103
104//*****************************
105// JTAG TAP state machine
106// - tap states (tap_state[3:0]) mapped to common industry usage
107//*****************************
108`define TAP_RESET 4'hF
109`define TAP_CAP_IR 4'hE
110`define TAP_UPDATE_IR 4'hD
111`define TAP_RTI 4'hC
112`define TAP_PAUSE_IR 4'hB
113`define TAP_SHIFT_IR 4'hA
114`define TAP_EXIT1_IR 4'h9
115`define TAP_EXIT2_IR 4'h8
116`define TAP_SEL_DR 4'h7
117`define TAP_CAP_DR 4'h6
118`define TAP_UPDATE_DR 4'h5
119`define TAP_SEL_IR 4'h4
120`define TAP_PAUSE_DR 4'h3
121`define TAP_SHIFT_DR 4'h2
122`define TAP_EXIT1_DR 4'h1
123`define TAP_EXIT2_DR 4'h0
124
125//*****************************
126// JTAG IDCODE - bits 27:1 need to be UPDATED
127// 31:28 = jtag_id[3:0] Version = 4 bits
128// 27:12 = 0bxxxx_xxxx_xxxx_xxxx Part Number = 16 bits
129// 11:1 = 0b000_0011_1110 Manuf. Id. = 11 bits; Sun=0x03e
130// 0 = 1'b1 lsb is constant one = 1 bit
131//*****************************
132`define PART_ID 16'h2aaa
133`define MANUF_ID 11'h3e
134
135//*****************************
136// JTAG Instruction Opcodes
137//*****************************
138
139`define TAP_EXTEST 8'h00
140`define TAP_BYPASS 8'hff
141`define TAP_IDCODE 8'h01
142`define TAP_SAMPLE_PRELOAD 8'h02
143`define TAP_HIGHZ 8'h03
144`define TAP_CLAMP 8'h04
145`define TAP_EXTEST_PULSE 8'h05
146`define TAP_EXTEST_TRAIN 8'h06
147
148`define TAP_CREG_ADDR 8'h08
149`define TAP_CREG_WDATA 8'h09
150`define TAP_CREG_RDATA 8'h0a
151`define TAP_CREG_SCRATCH 8'h0b
152`define TAP_NCU_WR 8'h0c
153`define TAP_NCU_RD 8'h0d
154`define TAP_NCU_WADDR 8'h0e
155`define TAP_NCU_WDATA 8'h0f
156`define TAP_NCU_RADDR 8'h10
157
158`define TAP_SERSCAN 8'h80
159`define TAP_CHAINSEL 8'h81
160`define TAP_MT_ACCESS 8'h82
161`define TAP_MT_CLEAR 8'h83
162`define TAP_MT_SCAN 8'h84
163
164`define TAP_TP_ACCESS 8'h88
165`define TAP_TP_CLEAR 8'h89
166
167`define TAP_FUSE_READ 8'h28
168`define TAP_FUSE_BYPASS_DATA 8'h29
169`define TAP_FUSE_BYPASS 8'h2a
170`define TAP_FUSE_ROW_ADDR 8'h2b
171`define TAP_FUSE_COL_ADDR 8'h2c
172`define TAP_FUSE_READ_MODE 8'h2d
173`define TAP_FUSE_DEST_SAMPLE 8'h2e
174`define TAP_FUSE_RVCLR 8'h2f
175
176`define TAP_MBIST_CLKSTPEN 8'h13
177`define TAP_MBIST_BYPASS 8'h14
178`define TAP_MBIST_MODE 8'h15
179`define TAP_MBIST_START 8'h16
180`define TAP_MBIST_RESULT 8'h18
181`define TAP_MBIST_DIAG 8'h19
182`define TAP_MBIST_GETDONE 8'h1a
183`define TAP_MBIST_GETFAIL 8'h1b
184`define TAP_DMO_ACCESS 8'h1c
185`define TAP_DMO_CLEAR 8'h1d
186`define TAP_DMO_CONFIG 8'h1e
187`define TAP_MBIST_ABORT 8'h1f
188
189`define TAP_SPC_SHSCAN 5'b00110
190`define TAP_SPCTHR0_SHSCAN 8'h30
191`define TAP_SPCTHR1_SHSCAN 8'h31
192`define TAP_SPCTHR2_SHSCAN 8'h32
193`define TAP_SPCTHR3_SHSCAN 8'h33
194`define TAP_SPCTHR4_SHSCAN 8'h34
195`define TAP_SPCTHR5_SHSCAN 8'h35
196`define TAP_SPCTHR6_SHSCAN 8'h36
197`define TAP_SPCTHR7_SHSCAN 8'h37
198`define TAP_L2T_SHSCAN 8'h38
199
200`define TAP_CLOCK_SSTOP 8'h40
201`define TAP_CLOCK_HSTOP 8'h41
202`define TAP_CLOCK_START 8'h42
203`define TAP_CLOCK_DOMAIN 8'h43
204`define TAP_CLOCK_STATUS 8'h44
205`define TAP_CLKSTP_DELAY 8'h45
206`define TAP_CORE_SELECT 8'h46
207
208`define TAP_DE_COUNT 8'h48
209`define TAP_CYCLE_COUNT 8'h49
210`define TAP_TCU_DCR 8'h4A
211`define TAP_CORE_RUN_STATUS 8'h4C
212`define TAP_DOSS_ENABLE 8'h4D
213`define TAP_DOSS_MODE 8'h4E
214`define TAP_SS_REQUEST 8'h4F
215
216`define TAP_DOSS_STATUS 8'h50
217`define TAP_CS_MODE 8'h51
218`define TAP_CS_STATUS 8'h52
219
220`define TAP_L2_ADDR 8'h58
221`define TAP_L2_WRDATA 8'h59
222`define TAP_L2_WR 8'h5A
223`define TAP_L2_RD 8'h5B
224
225`define TAP_LBIST_START 8'h60
226`define TAP_LBIST_BYPASS 8'h61
227`define TAP_LBIST_MODE 8'h62
228`define TAP_LBIST_ACCESS 8'h63
229`define TAP_LBIST_GETDONE 8'h64
230`define TAP_LBIST_ABORT 8'h65
231
232`define TAP_STCI_ACCESS 8'h90
233`define TAP_STCI_CLEAR 8'h91
234
235`define TAP_JTPOR_ACCESS 8'hA0
236`define TAP_JTPOR_CLEAR 8'hA1
237`define TAP_JTPOR_STATUS 8'hA2
238`define TAP_SCKBYP_ACCESS 8'hA3
239`define TAP_SCKBYP_CLEAR 8'hA4
240
241
242
243
244module tcu_jtag_ctl (
245 io_tdi,
246 io_tms,
247 io_trst_l,
248 io_tck,
249 io_tck_l,
250 tcu_tdo,
251 tcu_tdo_en,
252 io_test_mode,
253 io_scan_en,
254 jtag_ser_scan_q,
255 sel_chain,
256 chain_select,
257 ser_scan_out,
258 jt_scan_in,
259 tck_clk_tree,
260 instr_mt_scan_rti,
261 jtag_id,
262 scan_in,
263 scan_out,
264 tcu_jtag_aclk,
265 tcu_int_bclk,
266 tcu_jtag_se,
267 tap_spc0_shscan_scan_out,
268 spc7_tap_shscan_scan_in,
269 tcu_spc_shscan_aclk,
270 tcu_spc_shscan_bclk,
271 tcu_spc_shscan_scan_en,
272 jtag_spc_shscan_pce_ov,
273 jtag_spc0_shscan_clk_stop,
274 jtag_spc1_shscan_clk_stop,
275 jtag_spc2_shscan_clk_stop,
276 jtag_spc3_shscan_clk_stop,
277 jtag_spc4_shscan_clk_stop,
278 jtag_spc5_shscan_clk_stop,
279 jtag_spc6_shscan_clk_stop,
280 jtag_spc7_shscan_clk_stop,
281 jtag_spc_shscanid,
282 tcu_l2t_shscan_aclk,
283 tcu_l2t_shscan_bclk,
284 tcu_l2t_shscan_scan_en,
285 jtag_l2t_shscan_pce_ov,
286 jtag_l2t0_shscan_clk_stop,
287 jtag_l2t1_shscan_clk_stop,
288 jtag_l2t2_shscan_clk_stop,
289 jtag_l2t3_shscan_clk_stop,
290 jtag_l2t4_shscan_clk_stop,
291 jtag_l2t5_shscan_clk_stop,
292 jtag_l2t6_shscan_clk_stop,
293 jtag_l2t7_shscan_clk_stop,
294 l2t7_tcu_shscan_scan_out,
295 spc0_clk_stop,
296 spc1_clk_stop,
297 spc2_clk_stop,
298 spc3_clk_stop,
299 spc4_clk_stop,
300 spc5_clk_stop,
301 spc6_clk_stop,
302 spc7_clk_stop,
303 l2t0_clk_stop,
304 l2t1_clk_stop,
305 l2t2_clk_stop,
306 l2t3_clk_stop,
307 l2t4_clk_stop,
308 l2t5_clk_stop,
309 l2t6_clk_stop,
310 l2t7_clk_stop,
311 tcu_efu_rowaddr,
312 tcu_efu_coladdr,
313 tcu_efu_read_en,
314 tcu_efu_read_mode,
315 jtag_efu_clear_instr,
316 jtag_efu_rvclr,
317 tcu_efu_fuse_bypass,
318 tcu_efu_dest_sample,
319 tcu_efu_data_in,
320 tcu_efu_updatedr,
321 tcu_efu_shiftdr,
322 tcu_efu_capturedr,
323 efu_tcu_data_out,
324 chop_aclk,
325 chop_bclk,
326 jt_scan_en,
327 jt_scan_aclk,
328 jt_scan_bclk,
329 mio_tcu_bs_scan_out,
330 tcu_mio_bs_scan_in,
331 tcu_mio_bs_scan_en,
332 tcu_mio_bs_clk,
333 tcu_mio_bs_aclk,
334 tcu_mio_bs_bclk,
335 tcu_mio_bs_uclk,
336 tcu_mio_bs_mode_ctl,
337 tcu_mio_bs_highz_l,
338 tcu_stciclk,
339 tcu_stcicfg,
340 tcu_stcid,
341 tcu_mio_stciq,
342 mio_tcu_stciclk,
343 mio_tcu_stcicfg,
344 mio_tcu_stcid,
345 stciq_tcu,
346 sbs_tcu_scan_out,
347 jtag_sbs_scan_in,
348 tcu_sbs_acmode,
349 tcu_sbs_actestsignal,
350 tcu_sbs_enbspt,
351 tcu_sbs_bsinitclk,
352 tcu_sbs_scan_en,
353 tcu_sbs_clk,
354 tcu_sbs_aclk,
355 tcu_sbs_bclk,
356 tcu_sbs_uclk,
357 tcu_sbs_enbstx,
358 tcu_sbs_enbsrx,
359 lb_tcu_done_d,
360 tcu_spc_lbist_pgm,
361 spc0_tcu_lbist_scan_out,
362 spc1_tcu_lbist_scan_out,
363 spc2_tcu_lbist_scan_out,
364 spc3_tcu_lbist_scan_out,
365 spc4_tcu_lbist_scan_out,
366 spc5_tcu_lbist_scan_out,
367 spc6_tcu_lbist_scan_out,
368 spc7_tcu_lbist_scan_out,
369 mbist_clkstpen,
370 mbist_done,
371 mbist_fail,
372 mbist_done_fail,
373 jtag_csr_addr,
374 jtag_csr_wr,
375 spc0_mb_scan_in,
376 tap_spc0_mb_scan_out,
377 tap_spc0_mb_aclk,
378 tap_spc0_mb_bclk,
379 tap_spc0_mb_scan_en,
380 tap_spc0_mb_clk_stop,
381 spc1_mb_scan_in,
382 tap_spc1_mb_scan_out,
383 tap_spc1_mb_aclk,
384 tap_spc1_mb_bclk,
385 tap_spc1_mb_scan_en,
386 tap_spc1_mb_clk_stop,
387 spc2_mb_scan_in,
388 tap_spc2_mb_scan_out,
389 tap_spc2_mb_aclk,
390 tap_spc2_mb_bclk,
391 tap_spc2_mb_scan_en,
392 tap_spc2_mb_clk_stop,
393 spc3_mb_scan_in,
394 tap_spc3_mb_scan_out,
395 tap_spc3_mb_aclk,
396 tap_spc3_mb_bclk,
397 tap_spc3_mb_scan_en,
398 tap_spc3_mb_clk_stop,
399 spc4_mb_scan_in,
400 tap_spc4_mb_scan_out,
401 tap_spc4_mb_aclk,
402 tap_spc4_mb_bclk,
403 tap_spc4_mb_scan_en,
404 tap_spc4_mb_clk_stop,
405 spc5_mb_scan_in,
406 tap_spc5_mb_scan_out,
407 tap_spc5_mb_aclk,
408 tap_spc5_mb_bclk,
409 tap_spc5_mb_scan_en,
410 tap_spc5_mb_clk_stop,
411 spc6_mb_scan_in,
412 tap_spc6_mb_scan_out,
413 tap_spc6_mb_aclk,
414 tap_spc6_mb_bclk,
415 tap_spc6_mb_scan_en,
416 tap_spc6_mb_clk_stop,
417 spc7_mb_scan_in,
418 tap_spc7_mb_scan_out,
419 tap_spc7_mb_aclk,
420 tap_spc7_mb_bclk,
421 tap_spc7_mb_scan_en,
422 tap_spc7_mb_clk_stop,
423 sii_tcu_mbist_scan_out,
424 sio_tcu_mbist_scan_out,
425 ncu_tcu_mbist_scan_out,
426 mcu0_tcu_mbist_scan_out,
427 mcu1_tcu_mbist_scan_out,
428 mcu2_tcu_mbist_scan_out,
429 mcu3_tcu_mbist_scan_out,
430 l2b0_tcu_mbist_scan_out,
431 l2b1_tcu_mbist_scan_out,
432 l2b2_tcu_mbist_scan_out,
433 l2b3_tcu_mbist_scan_out,
434 l2b4_tcu_mbist_scan_out,
435 l2b5_tcu_mbist_scan_out,
436 l2b6_tcu_mbist_scan_out,
437 l2b7_tcu_mbist_scan_out,
438 l2t0_tcu_mbist_scan_out,
439 l2t1_tcu_mbist_scan_out,
440 l2t2_tcu_mbist_scan_out,
441 l2t3_tcu_mbist_scan_out,
442 l2t4_tcu_mbist_scan_out,
443 l2t5_tcu_mbist_scan_out,
444 l2t6_tcu_mbist_scan_out,
445 l2t7_tcu_mbist_scan_out,
446 dmu_tcu_mbist_scan_out,
447 peu_tcu_mbist_scan_out,
448 rdp_rdmc_mbist_scan_out,
449 rtx_mbist_scan_out,
450 tds_mbist_scan_out,
451 instr_mbist_diag,
452 soc_mbist_aclk,
453 soc_mbist_bclk,
454 soc_mbist_scan_en,
455 soc0_mbist_clk_stop,
456 mcu0_mbist_clk_stop,
457 mcu1_mbist_clk_stop,
458 mcu2_mbist_clk_stop,
459 mcu3_mbist_clk_stop,
460 l2b0_mbist_clk_stop,
461 l2b1_mbist_clk_stop,
462 l2b2_mbist_clk_stop,
463 l2b3_mbist_clk_stop,
464 l2b4_mbist_clk_stop,
465 l2b5_mbist_clk_stop,
466 l2b6_mbist_clk_stop,
467 l2b7_mbist_clk_stop,
468 l2t0_mbist_clk_stop,
469 l2t1_mbist_clk_stop,
470 l2t2_mbist_clk_stop,
471 l2t3_mbist_clk_stop,
472 l2t4_mbist_clk_stop,
473 l2t5_mbist_clk_stop,
474 l2t6_mbist_clk_stop,
475 l2t7_mbist_clk_stop,
476 dmu_mbist_clk_stop,
477 peu_mbist_clk_stop,
478 rdp_mbist_clk_stop,
479 rtx_mbist_clk_stop,
480 tds_mbist_clk_stop,
481 jtag_creg_addr,
482 jtag_creg_data,
483 jtag_creg_rd_en,
484 jtag_creg_wr_en,
485 jtag_creg_addr_en,
486 jtag_creg_data_en,
487 ucb_csr_wr,
488 ucb_csr_addr,
489 ucb_data_out,
490 ucb_jtag_data_rdy,
491 jtag_ucb_data_ack,
492 jtag_csr_data,
493 l2access,
494 l2data_upd,
495 l2addr_upd,
496 l2rti,
497 instr_l2_wr,
498 instr_l2_rd,
499 l2rddata,
500 l2_read_vld,
501 tcu_jtag_flush_req,
502 tcu_jtag_flush_dly_req,
503 jtag_clock_start,
504 instr_sstop_csmode,
505 jtag_clk_stop_req,
506 clock_domain_upd,
507 clock_domain,
508 debug_reg_hard_stop_domain_1st,
509 csdel_data,
510 jtag_upd_cntdly,
511 jtag_cntdly_data,
512 clkseq_stop,
513 clkseq_strt,
514 spc_crs,
515 spc_ss_sel,
516 core_sel,
517 core_sel_upd,
518 de_count,
519 decnt_data,
520 decnt_upd,
521 cycle_count,
522 cyc_count,
523 cyc_count_upd,
524 tcu_dcr,
525 tcudcr_data,
526 tcudcr_upd,
527 doss_enab,
528 dossen,
529 dossen_upd,
530 dossmode,
531 dossmode_upd,
532 doss_mode,
533 ssreq_upd,
534 doss_stat,
535 csmode,
536 csmode_upd,
537 cs_mode,
538 cs_mode_active,
539 dmo_cfg,
540 jtag_dmo_control,
541 jtag_dmo_control_upd,
542 jtag_dmo_enable,
543 jtag_por_status,
544 jtag_por_enable,
545 jtag_sck_byp,
546 jtag_test_protect,
547 jtag_mt_enable);
548wire tck_l;
549wire pin_scanmode;
550wire pin_scan_en;
551wire l1en;
552wire pce_ov;
553wire stop;
554wire se;
555wire siclk;
556wire soclk;
557wire l1tck;
558wire ucb_jtag_data_rdy_sync_reg_scanin;
559wire ucb_jtag_data_rdy_sync_reg_scanout;
560wire ucb_jtag_data_rdy_sync;
561wire flush;
562wire flush_dly;
563wire jtag_dr_tdo;
564wire [31:0] new_idcode;
565wire instr_idcode;
566wire [5:0] selchain;
567wire instr_chainsel;
568wire [6:0] new_rvclr;
569wire instr_rvclr;
570wire [47:0] new_mbibypass;
571wire instr_mbist_bypass;
572wire [47:0] mbist_get_done_fail;
573wire instr_mbist66;
574wire [1:0] mbist_result;
575wire instr_mbist_result;
576wire [3:0] mbist_mode;
577wire instr_mbist_mode;
578wire [7:0] new_lbist_bypass;
579wire instr_lbist_bypass;
580wire [7:0] lbist_done;
581wire instr_lbist_getdone;
582wire [1:0] lbist_mode;
583wire instr_lbist_mode;
584wire [39:0] creg_addr;
585wire creg_addr_instr;
586wire [63:0] creg_wdata;
587wire creg_wdata_instr;
588wire creg_rdrtrn_out;
589wire instr_creg_rdata;
590wire [31:0] new_gen32;
591wire instr_gen32;
592wire [63:0] new_gen64;
593wire instr_gen64;
594wire [6:0] clkstopdly;
595wire instr_clkstopdly;
596wire [1:0] clkseqstat;
597wire instr_clkseq_stat;
598wire [7:0] coresel;
599wire instr_core_sel;
600wire [3:0] tcudcr;
601wire instr_tcu_dcr;
602wire instr_doss_mode;
603wire [7:0] dossstat;
604wire instr_doss_status;
605wire instr_cs_mode;
606wire csstat;
607wire instr_cs_status;
608wire jtporstat;
609wire instr_jtpor_status;
610wire stciq_tdo;
611wire stci_val_instr;
612wire [47:0] dmocfg;
613wire instr_dmo_config;
614wire tap_tdo;
615wire tap_tdo_en;
616wire ext_dr_tdo;
617wire bs_instr;
618wire jtag_ser_scan;
619wire fuse_dout;
620wire fuse_instr;
621wire mbist_scan_out;
622wire spcshscan_scan_out;
623wire instr_spc_shscan;
624wire l2tshscan_scan_out;
625wire instr_l2t_shscan;
626wire ext_jtag_instr;
627wire scan_instr;
628wire ext_jtag_ll_reg_scanin;
629wire ext_jtag_ll_reg_scanout_unused;
630wire next_fuse_dout;
631wire [2:0] new_fusemode;
632wire instr_fuse_read_mode;
633wire [6:0] new_fuserowaddr;
634wire instr_fuse_row_addr;
635wire [4:0] new_fusecoladdr;
636wire instr_fuse_col_addr;
637wire instr_fuse_read;
638wire instr_fuse_dest_sample;
639wire instr_fuse_bypass_data;
640wire bypass_sel;
641wire [3:0] tap_state;
642wire [7:0] instr;
643wire capture_dr_state;
644wire shift_dr_state;
645wire update_dr_state;
646wire update_ireg_unused;
647wire tlr_state;
648wire tap_scan_in;
649wire tap_scan_out;
650wire instr_highz;
651wire instr_clamp;
652wire instr_bypass;
653wire instr_extest;
654wire instr_sample_pl;
655wire instr_extest_pulse;
656wire instr_extest_train;
657wire instr_ser_scan;
658wire instr_mt_scan;
659wire instr_fuse_bypass;
660wire instr_mbist_clkstpen;
661wire instr_mbist_getdone;
662wire instr_mbist_getfail;
663wire instr_mbist_start;
664wire instr_mbist_abort;
665wire instr_lbist_start;
666wire instr_lbist_access;
667wire instr_lbist_abort;
668wire instr_creg_addr;
669wire instr_creg_wdata;
670wire instr_ncu_wr;
671wire instr_ncu_rd;
672wire instr_ncu_waddr;
673wire instr_ncu_wdata;
674wire instr_ncu_raddr;
675wire instr_clock_sstop;
676wire instr_clock_hstop;
677wire instr_clock_start;
678wire instr_clock_domain;
679wire instr_l2_addr;
680wire instr_l2_wrdata;
681wire instr_de_count;
682wire instr_cycle_count;
683wire instr_core_run_stat;
684wire instr_doss_enable;
685wire instr_ss_request;
686wire instr_stci_access;
687wire instr_jtpor_access;
688wire instr_jtpor_clear;
689wire instr_sckbyp_access;
690wire instr_sckbyp_clear;
691wire instr_mt_access;
692wire instr_mt_clear;
693wire instr_stci_clear;
694wire instr_dmo_access;
695wire instr_dmo_clear;
696wire instr_tp_access;
697wire instr_tp_clear;
698wire ucb_jtag_sel_mbist_mode;
699wire ucb_jtag_sel_mbist_bypass;
700wire ucb_jtag_sel_mbist_abort;
701wire ucb_jtag_sel_lbist_mode;
702wire ucb_jtag_sel_lbist_bypass;
703wire ucb_wr_mbist_mode;
704wire ucb_wr_mbist_bypass;
705wire ucb_wr_mbist_abort;
706wire ucb_wr_lbist_mode;
707wire ucb_wr_lbist_bypass;
708wire jtag_csr_wr_din;
709wire upd_ir_state;
710wire jtag_csr_wr_reg_scanin;
711wire jtag_csr_wr_reg_scanout;
712wire jtag_csr_data_reg_scanin;
713wire jtag_csr_data_reg_scanout;
714wire clock_chop_aclk;
715wire clock_chop_bclk;
716wire pre_tcu_sbs_enbstx;
717wire pre_tcu_sbs_enbsrx;
718wire pre_tcu_sbs_acmode;
719wire actest_out;
720wire pre_tcu_sbs_enbspt;
721wire tck_bsinitclk;
722wire tck_l_bsinitclk;
723wire bs_scan_en;
724wire bs_clk;
725wire bs_aclk;
726wire bs_bclk;
727wire bs_uclk;
728wire bs_actest_reg_scanout_unused;
729wire actest_in;
730wire rti_state;
731wire actest_toggle;
732wire actest_gen;
733wire ex_state;
734wire ex1_dr_state;
735wire ex2_dr_state;
736wire extest_active;
737wire pre_tcu_mio_bs_mode_ctl;
738wire bs_mode_ctl;
739wire pre_tcu_mio_bs_highz_l;
740wire bs_aclk_en;
741wire bs_bclk_en;
742wire bs_scan_en_pre;
743wire bs_scan_enne_reg_scanin;
744wire bs_scan_enne_reg_scanout_unused;
745wire bs_scan_en_ne;
746wire bs_scan_enpe_reg_scanin;
747wire bs_scan_enpe_reg_scanout;
748wire bs_scan_en_pe;
749wire soclk_buf;
750wire soclk_l;
751wire bs_update;
752wire tap_idcode_reg_scanin;
753wire tap_idcode_reg_scanout;
754wire [31:0] next_idcode;
755wire [31:0] idcode_data;
756wire tap_chainsel_reg_scanin;
757wire tap_chainsel_reg_scanout;
758wire [5:0] next_selchain;
759wire tap_fusemode_shift_reg_scanin;
760wire tap_fusemode_shift_reg_scanout;
761wire [2:0] next_new_fusemode;
762wire [2:0] fusemode;
763wire tap_fusemode_upd_reg_scanin;
764wire tap_fusemode_upd_reg_scanout_unused;
765wire [2:0] next_fusemode;
766wire tap_fuserowaddr_shift_reg_scanin;
767wire tap_fuserowaddr_shift_reg_scanout;
768wire [6:0] next_new_fuserowaddr;
769wire [6:0] fuserowaddr;
770wire tap_fuserowaddr_upd_reg_scanin;
771wire tap_fuserowaddr_upd_reg_scanout_unused;
772wire [6:0] next_fuserowaddr;
773wire tap_fusecoladdr_shift_reg_scanin;
774wire tap_fusecoladdr_shift_reg_scanout;
775wire [4:0] next_new_fusecoladdr;
776wire [4:0] fusecoladdr;
777wire tap_fusecoladdr_upd_reg_scanin;
778wire tap_fusecoladdr_upd_reg_scanout_unused;
779wire [4:0] next_fusecoladdr;
780wire tap_fusereaden_reg_scanin;
781wire tap_fusereaden_reg_scanout;
782wire next_fusereaden;
783wire new_fusereaden;
784wire tap_fusedestsample_reg_scanin;
785wire tap_fusedestsample_reg_scanout;
786wire next_fusedestsample;
787wire new_fusedestsample;
788wire tap_fusebypass_reg_scanin;
789wire tap_fusebypass_reg_scanout;
790wire next_fusebypass;
791wire new_fusebypass;
792wire fuse_capshft;
793wire tap_rvclr_shift_reg_scanin;
794wire tap_rvclr_shift_reg_scanout;
795wire [6:0] next_new_rvclr;
796wire [6:0] rvclr;
797wire tap_rvclr_upd_reg_scanin;
798wire tap_rvclr_upd_reg_scanout;
799wire [6:0] next_rvclr;
800wire efu_clear_upd;
801wire tap_mbibypass_shift_reg_scanin;
802wire tap_mbibypass_shift_reg_scanout;
803wire [47:0] mbibypass;
804wire tap_mbibypass_upd_reg_scanin;
805wire tap_mbibypass_upd_reg_scanout;
806wire tap_mbist_get_done_fail_shift_reg_scanin;
807wire tap_mbist_get_done_fail_shift_reg_scanout;
808wire [47:0] next_mbist_get_done_fail;
809wire tap_mbist_result_reg_scanin;
810wire tap_mbist_result_reg_scanout;
811wire tap_mbist_mode_reg_scanin;
812wire tap_mbist_mode_reg_scanout;
813wire [3:0] next_mbist_mode;
814wire tap_mbist_clkstpen_reg_scanin;
815wire tap_mbist_clkstpen_reg_scanout;
816wire clkstpen_clear;
817wire mbist_cyc_count_en;
818wire mbist_clkstpen_q;
819wire mbi_shiftdr;
820wire mbi_a_scan_en_reg_scanin;
821wire mbi_a_scan_en_reg_scanout_unused;
822wire mbi_a_scan_en_q;
823wire mbi_a_scan_en;
824wire mbi_b_scan_en_reg_scanin;
825wire mbi_b_scan_en_reg_scanout;
826wire mbi_b_scan_en_q;
827wire mbi_b_scan_en;
828wire mbi_scan_en;
829wire pause_dr_state;
830wire soclk_off;
831wire mbi_spc0;
832wire spc0_mb_aclk;
833wire spc0_mb_bclk;
834wire spc0_mb_scan_en;
835wire spc0_mb_clk_stop;
836wire [7:0] spc_lb_aclk;
837wire [7:0] spc_lb_bclk;
838wire [7:0] spc_lb_scan_en;
839wire tap_spc0_mb_clk_stop_din;
840wire [7:0] spc_lb_clk_stop;
841wire mbi_spc1;
842wire spc1_mb_aclk;
843wire spc1_mb_bclk;
844wire spc1_mb_scan_en;
845wire spc1_mb_clk_stop;
846wire tap_spc1_mb_clk_stop_din;
847wire mbi_spc2;
848wire spc2_mb_aclk;
849wire spc2_mb_bclk;
850wire spc2_mb_scan_en;
851wire spc2_mb_clk_stop;
852wire tap_spc2_mb_clk_stop_din;
853wire mbi_spc3;
854wire spc3_mb_aclk;
855wire spc3_mb_bclk;
856wire spc3_mb_scan_en;
857wire spc3_mb_clk_stop;
858wire tap_spc3_mb_clk_stop_din;
859wire mbi_spc4;
860wire spc4_mb_aclk;
861wire spc4_mb_bclk;
862wire spc4_mb_scan_en;
863wire spc4_mb_clk_stop;
864wire tap_spc4_mb_clk_stop_din;
865wire mbi_spc5;
866wire spc5_mb_aclk;
867wire spc5_mb_bclk;
868wire spc5_mb_scan_en;
869wire spc5_mb_clk_stop;
870wire tap_spc5_mb_clk_stop_din;
871wire mbi_spc6;
872wire spc6_mb_aclk;
873wire spc6_mb_bclk;
874wire spc6_mb_scan_en;
875wire spc6_mb_clk_stop;
876wire tap_spc6_mb_clk_stop_din;
877wire mbi_spc7;
878wire spc7_mb_aclk;
879wire spc7_mb_bclk;
880wire spc7_mb_scan_en;
881wire spc7_mb_clk_stop;
882wire tap_spc7_mb_clk_stop_din;
883wire mbist_sii;
884wire mbist_sio;
885wire mbist_ncu;
886wire mbist_mcu0;
887wire mbist_mcu1;
888wire mbist_mcu2;
889wire mbist_mcu3;
890wire mbist_l2b0;
891wire mbist_l2b1;
892wire mbist_l2b2;
893wire mbist_l2b3;
894wire mbist_l2b4;
895wire mbist_l2b5;
896wire mbist_l2b6;
897wire mbist_l2b7;
898wire mbist_l2t0;
899wire mbist_l2t1;
900wire mbist_l2t2;
901wire mbist_l2t3;
902wire mbist_l2t4;
903wire mbist_l2t5;
904wire mbist_l2t6;
905wire mbist_l2t7;
906wire mbist_dmu;
907wire mbist_peu;
908wire mbist_tds_tdmc;
909wire mbist_rtx;
910wire mbist_rdp_rdmc;
911wire mbist_sii_n;
912wire mbist_sio_n;
913wire mbist_ncu_n;
914wire mbist_mcu0_n;
915wire mbist_mcu1_n;
916wire mbist_mcu2_n;
917wire mbist_mcu3_n;
918wire mbist_l2b0_n;
919wire mbist_l2b1_n;
920wire mbist_l2b2_n;
921wire mbist_l2b3_n;
922wire mbist_l2b4_n;
923wire mbist_l2b5_n;
924wire mbist_l2b6_n;
925wire mbist_l2b7_n;
926wire mbist_l2t0_n;
927wire mbist_l2t1_n;
928wire mbist_l2t2_n;
929wire mbist_l2t3_n;
930wire mbist_l2t4_n;
931wire mbist_l2t5_n;
932wire mbist_l2t6_n;
933wire mbist_l2t7_n;
934wire mbist_dmu_n;
935wire mbist_peu_n;
936wire mbist_tds_tdmc_n;
937wire mbist_rtx_n;
938wire mbist_rdp_rdmc_n;
939wire soc0_mbist_clk_stop_din;
940wire mcu0_mbist_clk_stop_din;
941wire mcu1_mbist_clk_stop_din;
942wire mcu2_mbist_clk_stop_din;
943wire mcu3_mbist_clk_stop_din;
944wire l2b0_mbist_clk_stop_din;
945wire l2b1_mbist_clk_stop_din;
946wire l2b2_mbist_clk_stop_din;
947wire l2b3_mbist_clk_stop_din;
948wire l2b4_mbist_clk_stop_din;
949wire l2b5_mbist_clk_stop_din;
950wire l2b6_mbist_clk_stop_din;
951wire l2b7_mbist_clk_stop_din;
952wire l2t0_mbist_clk_stop_din;
953wire l2t1_mbist_clk_stop_din;
954wire l2t2_mbist_clk_stop_din;
955wire l2t3_mbist_clk_stop_din;
956wire l2t4_mbist_clk_stop_din;
957wire l2t5_mbist_clk_stop_din;
958wire l2t6_mbist_clk_stop_din;
959wire l2t7_mbist_clk_stop_din;
960wire dmu_mbist_clk_stop_din;
961wire peu_mbist_clk_stop_din;
962wire rdp_mbist_clk_stop_din;
963wire rtx_mbist_clk_stop_din;
964wire tds_mbist_clk_stop_din;
965wire [7:0] lbist_spc;
966wire [36:0] jtag_output_flops_din;
967wire jtag_dmo_enable_din;
968wire jtag_mt_enable_din;
969wire jtag_por_enable_din;
970wire jtag_output_flops_reg_scanin;
971wire jtag_output_flops_reg_scanout;
972wire [36:0] jtag_output_flops;
973wire tstmode_not_tlr;
974wire tap_lbist_bypass_shift_reg_scanin;
975wire tap_lbist_bypass_shift_reg_scanout;
976wire [7:0] next_new_lbist_bypass;
977wire [7:0] lbist_bypass;
978wire tap_lbist_bypass_upd_reg_scanin;
979wire tap_lbist_bypass_upd_reg_scanout;
980wire [7:0] next_lbist_bypass;
981wire [7:0] lbist_bypass_q;
982wire tap_lbist_mode_reg_scanin;
983wire tap_lbist_mode_reg_scanout;
984wire [1:0] next_lbist_mode;
985wire tap_lbist_done_reg_scanin;
986wire tap_lbist_done_reg_scanout;
987wire [7:0] next_lbist_done;
988wire tap_lbist_start_reg_scanin;
989wire tap_lbist_start_reg_scanout;
990wire next_lbist_start;
991wire lbist_start_q;
992wire lbist_start;
993wire lbist_shiftdr;
994wire tap_lbist_a_scan_en_reg_scanin;
995wire tap_lbist_a_scan_en_reg_scanout_unused;
996wire lbist_a_scan_en_q;
997wire lbist_a_scan_en;
998wire tap_lbist_b_scan_en_reg_scanin;
999wire tap_lbist_b_scan_en_reg_scanout;
1000wire lbist_b_scan_en_q;
1001wire lbist_b_scan_en;
1002wire [7:0] lbist_scan_en_8;
1003wire [7:0] lbist_a_scan_en_8;
1004wire [7:0] lbist_b_scan_en_8;
1005wire [7:0] lbist_b_scan_en_q_8;
1006wire [7:0] clock_chop_aclk_8;
1007wire [7:0] clock_chop_bclk_8;
1008wire [7:0] soclk_off_8;
1009wire [7:0] instr_lbist_access_8;
1010wire next_jtag_creg_addr_en;
1011wire next_jtag_creg_wr_en;
1012wire next_jtag_creg_rd_en;
1013wire next_jtag_creg_data_en;
1014wire tap_cregaddr_shift_reg_scanin;
1015wire tap_cregaddr_shift_reg_scanout;
1016wire [39:0] next_creg_addr;
1017wire tap_cregwdata_reg_scanin;
1018wire tap_cregwdata_reg_scanout;
1019wire [63:0] next_creg_wdata;
1020wire creg_rdrtrn_load;
1021wire ucb_jtag_data_rdy_d2;
1022wire creg_rdrtrn_load_d1;
1023wire creg_rdrtrn_shift;
1024wire creg_rdrtrn_vld;
1025wire tap_cregrdrtrn_reg_scanin;
1026wire tap_cregrdrtrn_reg_scanout;
1027wire [64:0] next_creg_rdrtrn;
1028wire [64:0] creg_rdrtrn;
1029wire clear_creg_rdrtrn_vld;
1030wire instr_ncu_rd_d1;
1031wire instr_ncu_raddr_d1;
1032wire next_creg_rdrtrn_vld;
1033wire tap_cregaddren_reg_scanin;
1034wire tap_cregaddren_reg_scanout;
1035wire jtag_creg_addr_en_q;
1036wire tap_cregwren_reg_scanin;
1037wire tap_cregwren_reg_scanout;
1038wire jtag_creg_wr_en_q;
1039wire tap_cregrden_reg_scanin;
1040wire tap_cregrden_reg_scanout;
1041wire jtag_creg_rd_en_q;
1042wire tap_cregdataen_reg_scanin;
1043wire tap_cregdataen_reg_scanout;
1044wire jtag_creg_data_en_q;
1045wire tap_cregrdrtrnvld_reg_scanin;
1046wire tap_cregrdrtrnvld_reg_scanout;
1047wire tap_ucb_jtag_data_rdy_d_reg_scanin;
1048wire tap_ucb_jtag_data_rdy_d_reg_scanout;
1049wire ucb_jtag_data_rdy_d;
1050wire tap_ucb_jtag_data_rdy_d2_reg_scanin;
1051wire tap_ucb_jtag_data_rdy_d2_reg_scanout;
1052wire tap_cregrdrtrnload_reg_scanin;
1053wire tap_cregrdrtrnload_reg_scanout;
1054wire tap_ncurd_reg_scanin;
1055wire tap_ncurd_reg_scanout;
1056wire tap_ncuraddr_reg_scanin;
1057wire tap_ncuraddr_reg_scanout;
1058wire spcshscan_shiftdr;
1059wire spcshscan_a_scan_en_reg_scanin;
1060wire spcshscan_a_scan_en_reg_scanout_unused;
1061wire spcshscan_a_scan_en_q;
1062wire spcshscan_a_scan_en;
1063wire spcshscan_b_scan_en_reg_scanin;
1064wire spcshscan_b_scan_en_reg_scanout;
1065wire spcshscan_b_scan_en_q;
1066wire spcshscan_b_scan_en;
1067wire spcshscan_scan_en;
1068wire spc_shscan_aclk;
1069wire spc_shscan_bclk;
1070wire spc_shscan_pce_ov;
1071wire spc_shscan_clk_stop;
1072wire tcu_spc_shscan_clk_stop_ps;
1073wire l2tshscan_shiftdr;
1074wire l2tshscan_a_scan_en_reg_scanin;
1075wire l2tshscan_a_scan_en_reg_scanout_unused;
1076wire l2tshscan_a_scan_en_q;
1077wire l2tshscan_a_scan_en;
1078wire l2tshscan_b_scan_en_reg_scanin;
1079wire l2tshscan_b_scan_en_reg_scanout;
1080wire l2tshscan_b_scan_en_q;
1081wire l2tshscan_b_scan_en;
1082wire l2tshscan_scan_en;
1083wire l2t_shscan_aclk;
1084wire l2t_shscan_bclk;
1085wire l2t_shscan_pce_ov;
1086wire l2t_shscan_clk_stop;
1087wire tcu_l2t_shscan_clk_stop_ps;
1088wire tap_jtagclkstop_reg_scanin;
1089wire tap_jtagclkstop_reg_scanout;
1090wire clear_jtag_clk_stop;
1091wire next_jtag_clk_stop;
1092wire jtag_clk_stop;
1093wire sstop_ready;
1094wire instr_sstop_csmode_din;
1095wire tap_gen32_shift_reg_scanin;
1096wire tap_gen32_shift_reg_scanout;
1097wire [31:0] next_new_gen32;
1098wire [23:0] debug_reg_hs_domain;
1099wire tap_gen64_shift_reg_scanin;
1100wire tap_gen64_shift_reg_scanout;
1101wire [63:0] next_new_gen64;
1102wire serscan_shiftdr;
1103wire serscan_a_scan_en_reg_scanin;
1104wire serscan_a_scan_en_reg_scanout_unused;
1105wire serscan_a_scan_en_q;
1106wire serscan_a_scan_en;
1107wire serscan_b_scan_en_reg_scanin;
1108wire serscan_b_scan_en_reg_scanout;
1109wire serscan_b_scan_en_q;
1110wire serscan_b_scan_en;
1111wire instr_l2access;
1112wire tap_l2access_shift_reg_scanin;
1113wire tap_l2access_shift_reg_scanout;
1114wire [64:0] next_l2access;
1115wire l2data_cap;
1116wire tap_clkstopdly_shift_reg_scanin;
1117wire tap_clkstopdly_shift_reg_scanout;
1118wire [6:0] next_clkstopdly;
1119wire csdelay_cap;
1120wire tap_clkseqstat_reg_scanin;
1121wire tap_clkseqstat_reg_scanout;
1122wire [1:0] next_clkseqstat;
1123wire [1:0] clkseq;
1124wire tap_coresel_shift_reg_scanin;
1125wire tap_coresel_shift_reg_scanout;
1126wire [7:0] next_coresel;
1127wire coresel_cap;
1128wire tap_tcudcr_shift_reg_scanin;
1129wire tap_tcudcr_shift_reg_scanout;
1130wire [3:0] next_tcudcr;
1131wire tcudcr_cap;
1132wire tap_dossmode_shift_reg_scanin;
1133wire tap_dossmode_shift_reg_scanout;
1134wire [1:0] next_dossmode;
1135wire dossmode_cap;
1136wire tap_dossstat_shift_reg_scanin;
1137wire tap_dossstat_shift_reg_scanout;
1138wire [7:0] next_dossstat;
1139wire dossstat_cap;
1140wire tap_csmode_shift_reg_scanin;
1141wire tap_csmode_shift_reg_scanout;
1142wire next_csmode;
1143wire csmode_cap;
1144wire tap_csstat_shift_reg_scanin;
1145wire tap_csstat_shift_reg_scanout;
1146wire next_csstat;
1147wire csstat_cap;
1148wire tap_stciaccess_reg_scanin;
1149wire tap_stciaccess_reg_scanout;
1150wire next_stciaccess;
1151wire stciaccess;
1152wire stci_acc_mode;
1153wire stci_shft_clk;
1154wire updatedr;
1155wire clockdr;
1156wire shiftdr;
1157wire stci_cfg0;
1158wire stci_cfg1;
1159wire tap_stcicfg1_reg_scanin;
1160wire tap_stcicfg1_reg_scanout;
1161wire stcicfg1_clear;
1162wire stcicfg1_en;
1163wire tap_shiftdr_reg_scanout_unused;
1164wire tap_dmoaccess_reg_scanin;
1165wire tap_dmoaccess_reg_scanout;
1166wire next_dmoaccess;
1167wire dmoaccess;
1168wire tap_dmocfg_shift_reg_scanin;
1169wire tap_dmocfg_shift_reg_scanout;
1170wire [47:0] next_dmocfg;
1171wire dmocfg_cap;
1172wire tap_mtaccess_reg_scanin;
1173wire tap_mtaccess_reg_scanout;
1174wire next_mtaccess;
1175wire mtaccess;
1176wire pin_macrotest;
1177wire jtag_macrotest;
1178wire tap_jtporaccess_reg_scanin;
1179wire tap_jtporaccess_reg_scanout;
1180wire next_jtporaccess;
1181wire jtporaccess;
1182wire tap_jtporstat_shift_reg_scanin;
1183wire tap_jtporstat_shift_reg_scanout;
1184wire next_jtporstat;
1185wire jtporstat_cap;
1186wire tap_jtsckbyp_reg_scanin;
1187wire tap_jtsckbyp_reg_scanout;
1188wire next_jtsckbyp;
1189wire jtsckbyp;
1190wire tap_tpaccess_reg_scanin;
1191wire tap_tpaccess_reg_scanout;
1192wire next_tpaccess;
1193wire tpaccess;
1194wire ex1_ir_state;
1195wire ex2_ir_state;
1196wire exit_ir;
1197wire next_state_updir;
1198wire active_upd_ir;
1199wire jtss_next_instr_dec;
1200wire [7:0] next_instr;
1201wire jtss_next_instr;
1202wire jtss_active;
1203wire jtss_active_window;
1204wire jtss_active_dly;
1205wire spare_flops_scanin;
1206wire spare_flops_scanout;
1207wire [11:0] spare_flops_d;
1208wire [11:0] spare_flops_q;
1209wire spare11_flop_d;
1210wire spare10_flop_d;
1211wire spare9_flop_d;
1212wire spare8_flop_d;
1213wire spare11_flop_q;
1214wire spare10_flop_q;
1215wire spare9_flop_q;
1216wire spare8_flop_q;
1217wire [7:0] spare_flops_unused;
1218wire flush_scanout;
1219
1220
1221 //JTAG chip interface
1222 input io_tdi;
1223 input io_tms;
1224 input io_trst_l;
1225 input io_tck;
1226 input io_tck_l;
1227
1228 output tcu_tdo;
1229 output tcu_tdo_en;
1230
1231 // controls for ATPG scan
1232 input io_test_mode; //pin_scanmode;
1233 input io_scan_en; //pin_scan_en;
1234 // serial scan
1235 output jtag_ser_scan_q; // indicates serial scan mode // ECO yyyyyy
1236 output [4:0] sel_chain; // selects 1 or 32 chains to scan; bypassing in TCU
1237 output chain_select; // enables sel_chain reg.
1238 input ser_scan_out; // from one or all 32 chains cat'd together; scan dump
1239 output jt_scan_in; // to one or all 32 chains cat'd together; scan dump
1240 // JTAG Macrotest
1241 output tck_clk_tree; // TCK during RTI, for jtag MacroTest
1242 output instr_mt_scan_rti; // updateDR state
1243
1244 // id info
1245 input [3:0] jtag_id;
1246 // scan
1247 input scan_in;
1248 output scan_out;
1249 input tcu_jtag_aclk;
1250 input tcu_int_bclk;
1251 input tcu_jtag_se;
1252
1253 // shadow scan interface: SHSCAN
1254 output tap_spc0_shscan_scan_out; // to core 0
1255 input spc7_tap_shscan_scan_in; // from core 7
1256
1257 output tcu_spc_shscan_aclk;
1258 output tcu_spc_shscan_bclk;
1259 output tcu_spc_shscan_scan_en;
1260 output jtag_spc_shscan_pce_ov;
1261 output jtag_spc0_shscan_clk_stop;
1262 output jtag_spc1_shscan_clk_stop;
1263 output jtag_spc2_shscan_clk_stop;
1264 output jtag_spc3_shscan_clk_stop;
1265 output jtag_spc4_shscan_clk_stop;
1266 output jtag_spc5_shscan_clk_stop;
1267 output jtag_spc6_shscan_clk_stop;
1268 output jtag_spc7_shscan_clk_stop;
1269 output [2:0] jtag_spc_shscanid;
1270
1271 //================================================================================
1272 //
1273 // Added on 20041119
1274 // Added L2T Shadow Scan Signals
1275 //================================================================================
1276 output tcu_l2t_shscan_aclk;
1277 output tcu_l2t_shscan_bclk;
1278 output tcu_l2t_shscan_scan_en;
1279 output jtag_l2t_shscan_pce_ov;
1280 output jtag_l2t0_shscan_clk_stop;
1281 output jtag_l2t1_shscan_clk_stop;
1282 output jtag_l2t2_shscan_clk_stop;
1283 output jtag_l2t3_shscan_clk_stop;
1284 output jtag_l2t4_shscan_clk_stop;
1285 output jtag_l2t5_shscan_clk_stop;
1286 output jtag_l2t6_shscan_clk_stop;
1287 output jtag_l2t7_shscan_clk_stop;
1288
1289 input l2t7_tcu_shscan_scan_out;
1290
1291 // inputs from sigmux_ctl for coordination of clock_stops, a, bclks to scan chains
1292 input spc0_clk_stop;
1293 input spc1_clk_stop;
1294 input spc2_clk_stop;
1295 input spc3_clk_stop;
1296 input spc4_clk_stop;
1297 input spc5_clk_stop;
1298 input spc6_clk_stop;
1299 input spc7_clk_stop;
1300
1301 //================================================================================
1302 //
1303 // Added on 20041119
1304 // Added L2T Shadow Scan Signals
1305 //================================================================================
1306 input l2t0_clk_stop;
1307 input l2t1_clk_stop;
1308 input l2t2_clk_stop;
1309 input l2t3_clk_stop;
1310 input l2t4_clk_stop;
1311 input l2t5_clk_stop;
1312 input l2t6_clk_stop;
1313 input l2t7_clk_stop;
1314
1315 // EFuse Control Interface
1316 output [6:0] tcu_efu_rowaddr; // row for read/write
1317 output [4:0] tcu_efu_coladdr; // column for write
1318 output tcu_efu_read_en; // read enable, one TCK cycle
1319 output [2:0] tcu_efu_read_mode; // indicates mode
1320 output jtag_efu_clear_instr; // to tcu_sigmux_ctl; indicates jtag clear active
1321 output [6:0] jtag_efu_rvclr; // to tcu_sigmux_ctl; redundancy value clear ID
1322 output tcu_efu_fuse_bypass; // one TCK cycle to set bypass mode
1323 output tcu_efu_dest_sample; // one TCK cycle to sample data
1324 // EFuse Shift Interface
1325 output tcu_efu_data_in; // serial scan_in to EFU
1326 output tcu_efu_updatedr; // transfer data from TCK reg. into EFUSE register
1327 output tcu_efu_shiftdr; // shift JTAG data to TCK reg. in EFU
1328 output tcu_efu_capturedr; // transfer EFUSE reg. into TCK reg.
1329 input efu_tcu_data_out; // serial scan_out from EFU
1330
1331 // JTAG Serial Scan
1332 input chop_aclk; // from tck clock chopper
1333 input chop_bclk; // from tck clock chopper
1334 output jt_scan_en;
1335 output jt_scan_aclk;
1336 output jt_scan_bclk;
1337
1338 // Boundary Scan
1339 input mio_tcu_bs_scan_out;
1340 output tcu_mio_bs_scan_in;
1341 output tcu_mio_bs_scan_en;
1342 output tcu_mio_bs_clk;
1343 output tcu_mio_bs_aclk;
1344 output tcu_mio_bs_bclk;
1345 output tcu_mio_bs_uclk; // update clock for copy latches in bscan register
1346 output tcu_mio_bs_mode_ctl;
1347 output tcu_mio_bs_highz_l;
1348
1349 // Serdes STCI Control
1350 output tcu_stciclk; // to SerDes macro
1351 output [1:0] tcu_stcicfg; // to SerDes macro
1352 output tcu_stcid; // to SerDes macro
1353 output tcu_mio_stciq; // to pin
1354 input mio_tcu_stciclk; // from pin
1355 input [1:0] mio_tcu_stcicfg; // from pin
1356 input mio_tcu_stcid; // from pin
1357 input stciq_tcu; // from SerDes macro
1358
1359 // Serdes Boundary Scan and ATPG
1360 input sbs_tcu_scan_out;
1361 output jtag_sbs_scan_in; // to boundary scan chain scan-in
1362 output tcu_sbs_acmode;
1363 output tcu_sbs_actestsignal;
1364 output tcu_sbs_enbspt;
1365 output tcu_sbs_bsinitclk;
1366 output tcu_sbs_scan_en;
1367 output tcu_sbs_clk;
1368 output tcu_sbs_aclk;
1369 output tcu_sbs_bclk;
1370 output tcu_sbs_uclk;
1371
1372 output tcu_sbs_enbstx; // to SerDes SOC counterpart
1373 output tcu_sbs_enbsrx; // to SerDes SOC counterpart
1374
1375 // LBIST
1376 input [`NUM_TOTAL_LBIST-1:0] lb_tcu_done_d;
1377 output tcu_spc_lbist_pgm;
1378 input spc0_tcu_lbist_scan_out; // Core 0 Scan Out
1379 input spc1_tcu_lbist_scan_out; // Core 1 Scan Out
1380 input spc2_tcu_lbist_scan_out; // Core 2 Scan Out
1381 input spc3_tcu_lbist_scan_out; // Core 3 Scan Out
1382 input spc4_tcu_lbist_scan_out; // Core 4 Scan Out
1383 input spc5_tcu_lbist_scan_out; // Core 5 Scan Out
1384 input spc6_tcu_lbist_scan_out; // Core 6 Scan Out
1385 input spc7_tcu_lbist_scan_out; // Core 7 Scan Out
1386
1387 // MBIST
1388 output mbist_clkstpen;
1389 input [47:0] mbist_done;
1390 input [47:0] mbist_fail;
1391 input [1:0] mbist_done_fail;
1392 output [5:0] jtag_csr_addr;
1393 output jtag_csr_wr;
1394
1395 reg [5:0] jtag_csr_addr;
1396 reg [47:0] jtag_csr_data_din;
1397
1398 // MBIST - SPC0
1399 input spc0_mb_scan_in; // from core 0
1400 output tap_spc0_mb_scan_out; // to core 0
1401 output tap_spc0_mb_aclk;
1402 output tap_spc0_mb_bclk ;
1403 output tap_spc0_mb_scan_en;
1404 output tap_spc0_mb_clk_stop;
1405 // MBIST - SPC1
1406 input spc1_mb_scan_in; // from core 1
1407 output tap_spc1_mb_scan_out; // to core 1
1408 output tap_spc1_mb_aclk;
1409 output tap_spc1_mb_bclk ;
1410 output tap_spc1_mb_scan_en;
1411 output tap_spc1_mb_clk_stop;
1412 // MBIST - SPC2
1413 input spc2_mb_scan_in; // from core 2
1414 output tap_spc2_mb_scan_out; // to core 2
1415 output tap_spc2_mb_aclk;
1416 output tap_spc2_mb_bclk ;
1417 output tap_spc2_mb_scan_en;
1418 output tap_spc2_mb_clk_stop;
1419 // MBIST - SPC3
1420 input spc3_mb_scan_in; // from core 3
1421 output tap_spc3_mb_scan_out; // to core 3
1422 output tap_spc3_mb_aclk;
1423 output tap_spc3_mb_bclk ;
1424 output tap_spc3_mb_scan_en;
1425 output tap_spc3_mb_clk_stop;
1426 // MBIST - SPC4
1427 input spc4_mb_scan_in; // from core 4
1428 output tap_spc4_mb_scan_out; // to core 4
1429 output tap_spc4_mb_aclk;
1430 output tap_spc4_mb_bclk ;
1431 output tap_spc4_mb_scan_en;
1432 output tap_spc4_mb_clk_stop;
1433 // MBIST - SPC5
1434 input spc5_mb_scan_in; // from core 5
1435 output tap_spc5_mb_scan_out; // to core 5
1436 output tap_spc5_mb_aclk;
1437 output tap_spc5_mb_bclk ;
1438 output tap_spc5_mb_scan_en;
1439 output tap_spc5_mb_clk_stop;
1440 // MBIST - SPC6
1441 input spc6_mb_scan_in; // from core 6
1442 output tap_spc6_mb_scan_out; // to core 6
1443 output tap_spc6_mb_aclk;
1444 output tap_spc6_mb_bclk ;
1445 output tap_spc6_mb_scan_en;
1446 output tap_spc6_mb_clk_stop;
1447 // MBIST - SPC7
1448 input spc7_mb_scan_in; // from core 7
1449 output tap_spc7_mb_scan_out; // to core 7
1450 output tap_spc7_mb_aclk;
1451 output tap_spc7_mb_bclk ;
1452 output tap_spc7_mb_scan_en;
1453 output tap_spc7_mb_clk_stop;
1454
1455 // SOC MBIST Scan Inputs to TCU
1456 input sii_tcu_mbist_scan_out;
1457 input sio_tcu_mbist_scan_out;
1458 input ncu_tcu_mbist_scan_out;
1459 input mcu0_tcu_mbist_scan_out;
1460 input mcu1_tcu_mbist_scan_out;
1461 input mcu2_tcu_mbist_scan_out;
1462 input mcu3_tcu_mbist_scan_out;
1463 input l2b0_tcu_mbist_scan_out;
1464 input l2b1_tcu_mbist_scan_out;
1465 input l2b2_tcu_mbist_scan_out;
1466 input l2b3_tcu_mbist_scan_out;
1467 input l2b4_tcu_mbist_scan_out;
1468 input l2b5_tcu_mbist_scan_out;
1469 input l2b6_tcu_mbist_scan_out;
1470 input l2b7_tcu_mbist_scan_out;
1471 input l2t0_tcu_mbist_scan_out;
1472 input l2t1_tcu_mbist_scan_out;
1473 input l2t2_tcu_mbist_scan_out;
1474 input l2t3_tcu_mbist_scan_out;
1475 input l2t4_tcu_mbist_scan_out;
1476 input l2t5_tcu_mbist_scan_out;
1477 input l2t6_tcu_mbist_scan_out;
1478 input l2t7_tcu_mbist_scan_out;
1479 input dmu_tcu_mbist_scan_out;
1480 input peu_tcu_mbist_scan_out;
1481 input rdp_rdmc_mbist_scan_out;
1482 input rtx_mbist_scan_out;
1483 input tds_mbist_scan_out;
1484
1485 output instr_mbist_diag;
1486 output soc_mbist_aclk;
1487 output soc_mbist_bclk;
1488 output soc_mbist_scan_en;
1489
1490 output soc0_mbist_clk_stop;
1491 output mcu0_mbist_clk_stop;
1492 output mcu1_mbist_clk_stop;
1493 output mcu2_mbist_clk_stop;
1494 output mcu3_mbist_clk_stop;
1495
1496 output l2b0_mbist_clk_stop;
1497 output l2b1_mbist_clk_stop;
1498 output l2b2_mbist_clk_stop;
1499 output l2b3_mbist_clk_stop;
1500 output l2b4_mbist_clk_stop;
1501 output l2b5_mbist_clk_stop;
1502 output l2b6_mbist_clk_stop;
1503 output l2b7_mbist_clk_stop;
1504
1505 output l2t0_mbist_clk_stop;
1506 output l2t1_mbist_clk_stop;
1507 output l2t2_mbist_clk_stop;
1508 output l2t3_mbist_clk_stop;
1509 output l2t4_mbist_clk_stop;
1510 output l2t5_mbist_clk_stop;
1511 output l2t6_mbist_clk_stop;
1512 output l2t7_mbist_clk_stop;
1513
1514 output dmu_mbist_clk_stop;
1515 output peu_mbist_clk_stop;
1516
1517 output rdp_mbist_clk_stop;
1518 output rtx_mbist_clk_stop;
1519 output tds_mbist_clk_stop;
1520
1521 // CREG R/W interface
1522 output [39:0] jtag_creg_addr; //address of internal register
1523 output [63:0] jtag_creg_data; //data to load into internal register
1524 output jtag_creg_rd_en;
1525 output jtag_creg_wr_en;
1526 output jtag_creg_addr_en;
1527 output jtag_creg_data_en;
1528
1529 //input [63:0] creg_jtag_scratch_data;
1530
1531 // UCB
1532 input ucb_csr_wr;
1533 input [5:0] ucb_csr_addr;
1534 input [63:0] ucb_data_out;
1535 input ucb_jtag_data_rdy;
1536 output jtag_ucb_data_ack;
1537 output [47:0] jtag_csr_data;
1538
1539 // L2 R/W interface (via SIU, through tcu_ucb_ctl)
1540 output [64:0] l2access; // either wrdata or address for L2
1541 output l2data_upd;
1542 output l2addr_upd;
1543 output l2rti;
1544 output instr_l2_wr;
1545 output instr_l2_rd;
1546 input [63:0] l2rddata; // from SIO via ucb_ctl
1547 input l2_read_vld; // indicates valid data during read
1548
1549 // Scan Flush
1550 input tcu_jtag_flush_req; // from sigmux_ctl, indicates flush active
1551 input tcu_jtag_flush_dly_req; // from sigmux_ctl, delayed flush
1552
1553 // Clock Stopping
1554 output jtag_clock_start;
1555 output instr_sstop_csmode;
1556 output jtag_clk_stop_req;
1557 output clock_domain_upd;
1558 output [23:0] clock_domain;
1559 input [23:0] debug_reg_hard_stop_domain_1st;
1560 // Clock Stopping - Delay (interval) Counter
1561 input [6:0] csdel_data;
1562 output jtag_upd_cntdly;
1563 output [6:0] jtag_cntdly_data;
1564 // Clock Stopping - Clock Status
1565 input clkseq_stop;
1566 input clkseq_strt;
1567
1568 // Debug Register Access
1569 input [63:0] spc_crs; // core_run_status - read only
1570 input [7:0] spc_ss_sel; // core_select
1571 output [7:0] core_sel;
1572 output core_sel_upd;
1573 input [31:0] de_count; // debug_event counter
1574 output [31:0] decnt_data;
1575 output decnt_upd;
1576 input [63:0] cycle_count;
1577 output [63:0] cyc_count;
1578 output cyc_count_upd;
1579 input [3:0] tcu_dcr;
1580 output [3:0] tcudcr_data;
1581 output tcudcr_upd;
1582 input [63:0] doss_enab;
1583 output [63:0] dossen;
1584 output dossen_upd;
1585 output [1:0] dossmode;
1586 output dossmode_upd;
1587 input [1:0] doss_mode;
1588 output ssreq_upd;
1589 input [7:0] doss_stat;
1590 output csmode;
1591 output csmode_upd;
1592 input cs_mode;
1593 input cs_mode_active;
1594
1595 // DMO Control Register
1596 input [47:0] dmo_cfg;
1597 output [47:0] jtag_dmo_control;
1598 output jtag_dmo_control_upd;
1599 output jtag_dmo_enable;
1600
1601 // JTAG Access during POR
1602 input jtag_por_status;
1603 output jtag_por_enable;
1604
1605 // JTAG SCK Counter Bypass to NCU
1606 output jtag_sck_byp;
1607 // Test Protect signal for mbist, lbist, whenver test mode needs it
1608 output jtag_test_protect;
1609
1610 output jtag_mt_enable;
1611
1612 wire [`NUM_TOTAL_MBIST_M1:0] next_new_mbibypass;
1613 wire [`NUM_TOTAL_MBIST_M1:0] next_mbibypass;
1614 wire [`NUM_TOTAL_MBIST_M1:0] next_mbist_result;
1615
1616 assign tck_l = ~io_tck_l;
1617
1618 assign pin_scanmode = io_test_mode;
1619 assign pin_scan_en = io_scan_en;
1620
1621 // Scan reassigns
1622 assign l1en = 1'b1; // this is "ce" or "pce"
1623 assign pce_ov = 1'b1;
1624 assign stop = 1'b0;
1625 assign se = tcu_jtag_se;
1626 assign siclk = tcu_jtag_aclk;
1627 assign soclk = tcu_int_bclk;
1628
1629 tcu_jtag_ctl_l1clkhdr_ctl_macro jtag_clkgen
1630 (
1631 .l2clk (io_tck),
1632 .l1clk (l1tck ),
1633 .l1en(l1en),
1634 .pce_ov(pce_ov),
1635 .stop(stop),
1636 .se(se)
1637 );
1638 // end scan
1639
1640 cl_sc1_clksyncff_4x ucb_jtag_data_rdy_sync_reg (
1641 .si ( ucb_jtag_data_rdy_sync_reg_scanin ),
1642 .so ( ucb_jtag_data_rdy_sync_reg_scanout ),
1643 .l1clk ( l1tck ),
1644 .d ( ucb_jtag_data_rdy ),
1645 .q ( ucb_jtag_data_rdy_sync ),
1646 .siclk(siclk),
1647 .soclk(soclk));
1648
1649
1650 // Reassigns for Flush Scan Mode
1651 assign flush = tcu_jtag_flush_req; // for aclk
1652 assign flush_dly = tcu_jtag_flush_dly_req; // for se
1653
1654 //********************************************************************
1655 // JTAG Data Register path to TDO - these go through bypass lockup latch
1656 // - they are shifted with TCK
1657 //********************************************************************
1658
1659 assign jtag_dr_tdo =
1660 (
1661 (new_idcode[0] & instr_idcode) |
1662 (l2access[0] & instr_l2_rd) |
1663 (selchain[0] & instr_chainsel) |
1664 (new_rvclr[0] & instr_rvclr) |
1665 (new_mbibypass[0] & instr_mbist_bypass) |
1666 (mbist_get_done_fail[0] & instr_mbist66) |
1667 (mbist_result[0] & instr_mbist_result) |
1668 (mbist_mode[0] & instr_mbist_mode) |
1669 (new_lbist_bypass[0] & instr_lbist_bypass) |
1670 (lbist_done[0] & instr_lbist_getdone)|
1671 (lbist_mode[0] & instr_lbist_mode)
1672 | (creg_addr[0] & creg_addr_instr) //instr_creg_addr)
1673 | (creg_wdata[0] & creg_wdata_instr) //instr_creg_wdata)
1674 //| (creg_scratch[0] & instr_creg_scratch)
1675 | (creg_rdrtrn_out & instr_creg_rdata)
1676 | (new_gen32[0] & instr_gen32)
1677 | (new_gen64[0] & instr_gen64)
1678 | (clkstopdly[0] & instr_clkstopdly)
1679 | (clkseqstat[0] & instr_clkseq_stat)
1680 | (coresel[0] & instr_core_sel)
1681 | (tcudcr[0] & instr_tcu_dcr)
1682 | (dossmode[0] & instr_doss_mode)
1683 | (dossstat[0] & instr_doss_status)
1684 | (csmode & instr_cs_mode)
1685 | (csstat & instr_cs_status)
1686 | (jtporstat & instr_jtpor_status)
1687 | (stciq_tdo & stci_val_instr)
1688 | (dmocfg[0] & instr_dmo_config)
1689 );
1690
1691 assign tcu_tdo = tap_tdo;
1692 assign tcu_tdo_en = tap_tdo_en;
1693
1694 //********************************************************************
1695 // External Data Register path to TDO
1696 // - they are shifted with aclk/bclk created off of TCK (chopped)
1697 // - except efuse logic (fuse_dout), it uses TCK directly
1698 //********************************************************************
1699 assign ext_dr_tdo =
1700 (
1701 (mio_tcu_bs_scan_out & bs_instr) |
1702 (ser_scan_out & jtag_ser_scan) |
1703 (fuse_dout & fuse_instr) |
1704 (mbist_scan_out & instr_mbist_diag) |
1705 (spcshscan_scan_out & instr_spc_shscan) |
1706 (l2tshscan_scan_out & instr_l2t_shscan)
1707 );
1708
1709 assign ext_jtag_instr = scan_instr | fuse_instr | instr_mbist_diag
1710 | instr_spc_shscan | instr_l2t_shscan;
1711 // ext_jtag_instr indicates instr has data reg outside of TAP
1712
1713 // provide lockup latch for jtag data regs that shift with TCK outside of TAP
1714 // - does not need trst_l, but can use it
1715 tcu_jtag_ctl_msff_ctl_macro__width_1 ext_jtag_ll_reg
1716 (
1717 .scan_in(ext_jtag_ll_reg_scanin),
1718 .scan_out(ext_jtag_ll_reg_scanout_unused),
1719 .l1clk (tck_l),
1720 .din (next_fuse_dout),
1721 .dout (fuse_dout),
1722 .siclk(siclk),
1723 .soclk(soclk)
1724 );
1725 assign next_fuse_dout = (new_fusemode[0] & instr_fuse_read_mode) |
1726 (new_fuserowaddr[0] & instr_fuse_row_addr) |
1727 (new_fusecoladdr[0] & instr_fuse_col_addr) |
1728 (efu_tcu_data_out &
1729 (instr_fuse_read | instr_fuse_dest_sample | instr_fuse_bypass_data)
1730 )
1731 ;
1732
1733 //********************************************************************
1734 // TAP State Machine, Instruction and Bypass Registers
1735 //********************************************************************
1736 tcu_jtag_tap_ctl tcu_jtag_tap_ctl
1737 (
1738 //inputs
1739 .io_tdi (io_tdi),
1740 .io_tms (io_tms),
1741 .io_tck (io_tck),
1742 .io_trst_l (io_trst_l),
1743 .jtag_dr_tdo (jtag_dr_tdo),
1744 .ext_dr_tdo (ext_dr_tdo),
1745 .bypass_sel (bypass_sel),
1746 .ext_jtag_instr (ext_jtag_instr), //(scan_instr),
1747
1748 //output
1749 .tap_tdo (tap_tdo),
1750 .tap_tdo_en (tap_tdo_en),
1751 .tap_state (tap_state[3:0]),
1752 .instr (instr[7:0]),
1753 .capture_dr_state (capture_dr_state),
1754 .shift_dr_state (shift_dr_state),
1755 .update_dr_state (update_dr_state),
1756 .update_ireg (update_ireg_unused),
1757 .tlr_state (tlr_state),
1758
1759 //scan
1760 .tap_scan_in (tap_scan_in),
1761 .siclk (siclk),
1762 .soclk (soclk),
1763 .tap_scan_out (tap_scan_out),
1764 .next_instr(next_instr[7:0]),
1765 .tcu_jtag_se(tcu_jtag_se)
1766 );
1767
1768 //********************************************************************
1769 // instruction decode
1770 //********************************************************************
1771
1772 assign bypass_sel = (
1773 (instr_highz | instr_clamp | instr_bypass)
1774 //| (instr_mbist_start | instr_mbist_mode)
1775 | ( ~instr_extest & ~instr_idcode & ~instr_sample_pl
1776 & ~instr_extest_pulse & ~instr_extest_train
1777 & ~instr_ser_scan & ~instr_chainsel
1778 & ~instr_mt_scan
1779 & ~instr_fuse_read & ~instr_fuse_bypass_data & ~instr_fuse_bypass
1780 & ~instr_fuse_row_addr & ~instr_fuse_col_addr
1781 & ~instr_fuse_read_mode & ~instr_fuse_dest_sample
1782 & ~instr_rvclr
1783 & ~instr_mbist_clkstpen
1784 & ~instr_mbist_bypass & ~instr_mbist_result & ~instr_mbist_getdone
1785 & ~instr_mbist_getfail & ~instr_mbist_mode & ~instr_mbist_diag
1786 & ~instr_mbist_start & ~instr_mbist_abort
1787 & ~instr_lbist_start & ~instr_lbist_bypass & ~instr_lbist_mode
1788 & ~instr_lbist_access & ~instr_lbist_getdone & ~instr_lbist_abort
1789 & ~instr_creg_addr & ~instr_creg_wdata
1790 //& ~instr_creg_rdata & ~instr_creg_scratch
1791 & ~instr_creg_rdata
1792 & ~instr_ncu_wr & ~instr_ncu_rd
1793 & ~instr_ncu_waddr & ~instr_ncu_wdata & ~instr_ncu_raddr
1794 & ~instr_spc_shscan
1795 & ~instr_l2t_shscan
1796 & ~instr_clock_sstop & ~instr_clock_hstop
1797 & ~instr_clock_start & ~instr_clock_domain
1798 & ~instr_l2_addr & ~instr_l2_wrdata
1799 & ~instr_l2_wr & ~instr_l2_rd
1800 & ~instr_clkstopdly & ~instr_clkseq_stat
1801 & ~instr_core_sel & ~instr_de_count
1802 & ~instr_cycle_count & ~instr_core_run_stat
1803 & ~instr_tcu_dcr & ~instr_doss_enable
1804 & ~instr_doss_mode & ~instr_ss_request
1805 & ~instr_doss_status & ~instr_cs_mode
1806 & ~instr_cs_status & ~instr_stci_access
1807 //& ~instr_dmo_access & ~instr_dmo_clear
1808 & ~instr_dmo_config
1809 & ~instr_jtpor_access & ~instr_jtpor_clear & ~instr_jtpor_status
1810 & ~instr_sckbyp_access & ~instr_sckbyp_clear
1811 )
1812 );
1813
1814 //assign instr_bypass = tap_instructions[TAP_CMD_HI:TAP_CMD_LO] == {`TAP_CMD_WIDTH{1'b1}}
1815 // | (tap_instructions[TAP_CMD_HI:TAP_CMD_HI-3] == 4'b0001 // 0x05 thru 0x07
1816 // & (|tap_instructions[TAP_CMD_HI-4:TAP_CMD_LO]))
1817 // | (tap_instructions[TAP_CMD_HI:TAP_CMD_HI-3] == 4'b0100 // 0x11 thru 0x13
1818 // & (|tap_instructions[TAP_CMD_HI-4:TAP_CMD_LO]))
1819 // | tap_instructions[TAP_CMD_HI:TAP_CMD_LO] == 6'h19
1820 // | tap_instructions[TAP_CMD_HI:TAP_CMD_LO] == 6'h27
1821 // | tap_instructions[TAP_CMD_HI:TAP_CMD_LO] == 6'h2F
1822 // | tap_instructions[TAP_CMD_HI:TAP_CMD_HI-1] == 2'd3;
1823
1824 assign instr_extest = instr[7:0] == `TAP_EXTEST;
1825 assign instr_bypass = instr[7:0] == `TAP_BYPASS;
1826 assign instr_idcode = instr[7:0] == `TAP_IDCODE;
1827 assign instr_sample_pl = instr[7:0] == `TAP_SAMPLE_PRELOAD;
1828 assign instr_highz = instr[7:0] == `TAP_HIGHZ;
1829 assign instr_clamp = instr[7:0] == `TAP_CLAMP;
1830 assign instr_extest_pulse = instr[7:0] == `TAP_EXTEST_PULSE;
1831 assign instr_extest_train = instr[7:0] == `TAP_EXTEST_TRAIN;
1832 assign instr_ser_scan = instr[7:0] == `TAP_SERSCAN;
1833 assign instr_chainsel = instr[7:0] == `TAP_CHAINSEL;
1834 assign instr_mt_access = instr[7:0] == `TAP_MT_ACCESS;
1835 assign instr_mt_clear = instr[7:0] == `TAP_MT_CLEAR;
1836 assign instr_mt_scan = instr[7:0] == `TAP_MT_SCAN;
1837
1838 assign instr_creg_addr = instr[7:0] == `TAP_CREG_ADDR;
1839 assign instr_creg_wdata = instr[7:0] == `TAP_CREG_WDATA;
1840 assign instr_creg_rdata = instr[7:0] == `TAP_CREG_RDATA;
1841 //assign instr_creg_scratch = instr[7:0] == `TAP_CREG_SCRATCH;
1842 assign instr_ncu_wr = instr[7:0] == `TAP_NCU_WR;
1843 assign instr_ncu_rd = instr[7:0] == `TAP_NCU_RD;
1844 assign instr_ncu_waddr = instr[7:0] == `TAP_NCU_WADDR;
1845 assign instr_ncu_wdata = instr[7:0] == `TAP_NCU_WDATA;
1846 assign instr_ncu_raddr = instr[7:0] == `TAP_NCU_RADDR;
1847
1848 assign instr_fuse_read = instr[7:0] == `TAP_FUSE_READ;
1849 assign instr_fuse_bypass_data = instr[7:0] == `TAP_FUSE_BYPASS_DATA;
1850 assign instr_fuse_bypass = instr[7:0] == `TAP_FUSE_BYPASS;
1851 assign instr_fuse_row_addr = instr[7:0] == `TAP_FUSE_ROW_ADDR;
1852 assign instr_fuse_col_addr = instr[7:0] == `TAP_FUSE_COL_ADDR;
1853 assign instr_fuse_read_mode = instr[7:0] == `TAP_FUSE_READ_MODE;
1854 assign instr_fuse_dest_sample = instr[7:0] == `TAP_FUSE_DEST_SAMPLE;
1855 assign instr_rvclr = instr[7:0] == `TAP_FUSE_RVCLR;
1856
1857 assign instr_mbist_clkstpen = instr[7:0] == `TAP_MBIST_CLKSTPEN;
1858 assign instr_mbist_bypass = instr[7:0] == `TAP_MBIST_BYPASS;
1859 assign instr_mbist_mode = instr[7:0] == `TAP_MBIST_MODE;
1860 assign instr_mbist_start = instr[7:0] == `TAP_MBIST_START;
1861 assign instr_mbist_result = instr[7:0] == `TAP_MBIST_RESULT;
1862 assign instr_mbist_diag = instr[7:0] == `TAP_MBIST_DIAG;
1863 assign instr_mbist_getdone = instr[7:0] == `TAP_MBIST_GETDONE;
1864 assign instr_mbist_getfail = instr[7:0] == `TAP_MBIST_GETFAIL;
1865 assign instr_mbist_abort = instr[7:0] == `TAP_MBIST_ABORT;
1866 assign instr_spc_shscan = instr[7:3] == `TAP_SPC_SHSCAN;
1867 assign instr_l2t_shscan = instr[7:0] == `TAP_L2T_SHSCAN;
1868
1869 assign instr_clock_sstop = instr[7:0] == `TAP_CLOCK_SSTOP;
1870 assign instr_clock_hstop = instr[7:0] == `TAP_CLOCK_HSTOP;
1871 assign instr_clock_start = instr[7:0] == `TAP_CLOCK_START;
1872 assign instr_clock_domain = instr[7:0] == `TAP_CLOCK_DOMAIN;
1873 assign instr_cycle_count = instr[7:0] == `TAP_CYCLE_COUNT;
1874
1875 assign instr_l2_addr = instr[7:0] == `TAP_L2_ADDR;
1876 assign instr_l2_wrdata = instr[7:0] == `TAP_L2_WRDATA;
1877 assign instr_l2_wr = instr[7:0] == `TAP_L2_WR;
1878 assign instr_l2_rd = instr[7:0] == `TAP_L2_RD;
1879 assign instr_clkstopdly = instr[7:0] == `TAP_CLKSTP_DELAY;
1880 assign instr_clkseq_stat = instr[7:0] == `TAP_CLOCK_STATUS;
1881 assign instr_core_sel = instr[7:0] == `TAP_CORE_SELECT;
1882 assign instr_de_count = instr[7:0] == `TAP_DE_COUNT;
1883 assign instr_core_run_stat = instr[7:0] == `TAP_CORE_RUN_STATUS;
1884 assign instr_tcu_dcr = instr[7:0] == `TAP_TCU_DCR;
1885
1886 assign instr_lbist_start = instr[7:0] == `TAP_LBIST_START;
1887 assign instr_lbist_bypass = instr[7:0] == `TAP_LBIST_BYPASS;
1888 assign instr_lbist_mode = instr[7:0] == `TAP_LBIST_MODE;
1889 assign instr_lbist_access = instr[7:0] == `TAP_LBIST_ACCESS;
1890 assign instr_lbist_getdone = instr[7:0] == `TAP_LBIST_GETDONE;
1891 assign instr_lbist_abort = instr[7:0] == `TAP_LBIST_ABORT;
1892
1893 assign instr_doss_enable = instr[7:0] == `TAP_DOSS_ENABLE;
1894 assign instr_doss_mode = instr[7:0] == `TAP_DOSS_MODE;
1895 assign instr_ss_request = instr[7:0] == `TAP_SS_REQUEST;
1896 assign instr_doss_status = instr[7:0] == `TAP_DOSS_STATUS;
1897 assign instr_cs_mode = instr[7:0] == `TAP_CS_MODE;
1898 assign instr_cs_status = instr[7:0] == `TAP_CS_STATUS;
1899 assign instr_stci_access = instr[7:0] == `TAP_STCI_ACCESS;
1900 assign instr_stci_clear = instr[7:0] == `TAP_STCI_CLEAR;
1901 assign instr_dmo_access = instr[7:0] == `TAP_DMO_ACCESS;
1902 assign instr_dmo_clear = instr[7:0] == `TAP_DMO_CLEAR;
1903 assign instr_dmo_config = instr[7:0] == `TAP_DMO_CONFIG;
1904 assign instr_jtpor_access = instr[7:0] == `TAP_JTPOR_ACCESS;
1905 assign instr_jtpor_clear = instr[7:0] == `TAP_JTPOR_CLEAR;
1906 assign instr_jtpor_status = instr[7:0] == `TAP_JTPOR_STATUS;
1907 assign instr_sckbyp_access = instr[7:0] == `TAP_SCKBYP_ACCESS;
1908 assign instr_sckbyp_clear = instr[7:0] == `TAP_SCKBYP_CLEAR;
1909 assign instr_tp_access = instr[7:0] == `TAP_TP_ACCESS;
1910 assign instr_tp_clear = instr[7:0] == `TAP_TP_CLEAR;
1911
1912 //==================================================
1913 // Decode UCB Write Registers
1914 //==================================================
1915 assign ucb_jtag_sel_mbist_mode = (ucb_csr_addr == 6'h0);
1916 assign ucb_jtag_sel_mbist_bypass = (ucb_csr_addr == 6'h1);
1917 assign ucb_jtag_sel_mbist_abort = (ucb_csr_addr == 6'h3);
1918 assign ucb_jtag_sel_lbist_mode = (ucb_csr_addr == 6'h8);
1919 assign ucb_jtag_sel_lbist_bypass = (ucb_csr_addr == 6'h9);
1920
1921 assign ucb_wr_mbist_mode = ucb_csr_wr && ucb_jtag_sel_mbist_mode;
1922 assign ucb_wr_mbist_bypass = ucb_csr_wr && ucb_jtag_sel_mbist_bypass;
1923 assign ucb_wr_mbist_abort = ucb_csr_wr && ucb_jtag_sel_mbist_abort;
1924 assign ucb_wr_lbist_mode = ucb_csr_wr && ucb_jtag_sel_lbist_mode;
1925 assign ucb_wr_lbist_bypass = ucb_csr_wr && ucb_jtag_sel_lbist_bypass;
1926
1927 always @(instr)
1928 begin
1929 case (instr)
1930 `TAP_MBIST_MODE: jtag_csr_addr = 6'h0;
1931 `TAP_MBIST_BYPASS: jtag_csr_addr = 6'h1;
1932 `TAP_MBIST_START: jtag_csr_addr = 6'h2;
1933 `TAP_MBIST_ABORT: jtag_csr_addr = 6'h3;
1934 `TAP_LBIST_MODE: jtag_csr_addr = 6'h8;
1935 `TAP_LBIST_BYPASS: jtag_csr_addr = 6'h9;
1936 `TAP_LBIST_START: jtag_csr_addr = 6'hA;
1937 `TAP_LBIST_ABORT: jtag_csr_addr = 6'hB;
1938 default: jtag_csr_addr = 6'hF;
1939 endcase
1940 end
1941
1942 assign jtag_csr_wr_din = update_dr_state ||
1943 ((instr==`TAP_MBIST_START ||
1944 instr==`TAP_MBIST_ABORT ||
1945 instr==`TAP_LBIST_START ||
1946 instr==`TAP_LBIST_ABORT) && upd_ir_state);
1947
1948 always @(instr or mbist_mode or new_mbibypass or lbist_mode or new_lbist_bypass)
1949 begin
1950 case (instr)
1951 `TAP_MBIST_MODE: jtag_csr_data_din[47:0] = {44'h0, mbist_mode[3:0]};
1952 `TAP_MBIST_BYPASS: jtag_csr_data_din[47:0] = new_mbibypass[47:0];
1953 `TAP_LBIST_MODE: jtag_csr_data_din[47:0] = {46'h0, lbist_mode[1:0]};
1954 `TAP_LBIST_BYPASS: jtag_csr_data_din[47:0] = {40'h0, new_lbist_bypass[7:0]};
1955 default: jtag_csr_data_din[47:0] = 48'h0;
1956 endcase
1957 end
1958
1959 tcu_jtag_ctl_msff_ctl_macro__width_1 jtag_csr_wr_reg (
1960 .scan_in ( jtag_csr_wr_reg_scanin ),
1961 .scan_out ( jtag_csr_wr_reg_scanout ),
1962 .l1clk ( l1tck ),
1963 .din ( jtag_csr_wr_din ),
1964 .dout ( jtag_csr_wr ),
1965 .siclk(siclk),
1966 .soclk(soclk));
1967
1968 tcu_jtag_ctl_msff_ctl_macro__width_48 jtag_csr_data_reg (
1969 .scan_in ( jtag_csr_data_reg_scanin ),
1970 .scan_out ( jtag_csr_data_reg_scanout ),
1971 .l1clk ( l1tck ),
1972 .din ( jtag_csr_data_din[47:0] ),
1973 .dout ( jtag_csr_data[47:0] ),
1974 .siclk(siclk),
1975 .soclk(soclk));
1976
1977 //********************************************************************
1978 // Clock chopper
1979 //********************************************************************
1980 //n2_clk_clkchp_4sel_32x_cust tck_clock_chopper_cust
1981 //(
1982 // .tck (io_tck),
1983 // .aclk (chop_aclk), // output
1984 // .bclk (chop_bclk), // output
1985 // .s500 (1'b0), // select 500 pS pulse width
1986 // .s1000 (1'b0), // select 1000 pS pulse width
1987 // .s1500 (1'b0), // select 1500 pS pulse width
1988 // .s2000 (1'b1) // select 2000 pS pulse width
1989 //);
1990 // Clock chopper now placed at tcu.sv level
1991 assign clock_chop_aclk = ~tlr_state & chop_aclk;
1992 assign clock_chop_bclk = ~tlr_state & chop_bclk;
1993
1994 //********************************************************************
1995 // SerDes Boundary Scan control logic
1996 //********************************************************************
1997 // Serdes 1149.1
1998 assign pre_tcu_sbs_enbstx = instr_clamp | instr_extest | instr_extest_pulse | instr_extest_train;//ECO xxxxxx
1999 assign pre_tcu_sbs_enbsrx = instr_clamp | instr_extest | instr_extest_pulse | instr_extest_train;//ECO xxxxxx
2000 // Serdes 1149.6
2001 assign pre_tcu_sbs_acmode = instr_extest_pulse | instr_extest_train; // ECO xxxxxx
2002 assign tcu_sbs_actestsignal = pre_tcu_sbs_acmode & actest_out; // ECO xxxxxx
2003 assign pre_tcu_sbs_enbspt = instr_extest_pulse | instr_extest_train; // ECO xxxxxx
2004 assign tcu_sbs_bsinitclk = tck_bsinitclk | tck_l_bsinitclk;
2005
2006 //assign tcu_sbs_clk = bs_clk;
2007 //assign tcu_sbs_aclk = bs_aclk;
2008 //assign tcu_sbs_uclk = bs_uclk;
2009
2010 cl_u1_buf_4x tcu_sbs_se_buf ( .in(bs_scan_en), .out(tcu_sbs_scan_en) );
2011 cl_u1_buf_4x tcu_sbs_clk_buf ( .in(bs_clk), .out(tcu_sbs_clk) );
2012 cl_u1_buf_4x tcu_sbs_aclk_buf ( .in(bs_aclk), .out(tcu_sbs_aclk) );
2013 cl_u1_buf_4x tcu_sbs_bclk_buf ( .in(bs_bclk), .out(tcu_sbs_bclk) );
2014 cl_u1_buf_4x tcu_sbs_uclk_buf ( .in(bs_uclk), .out(tcu_sbs_uclk) );
2015
2016
2017 tcu_jtag_ctl_msff_ctl_macro__width_1 bs_actest_reg
2018 (
2019 .scan_in(1'b0),
2020 .scan_out(bs_actest_reg_scanout_unused),
2021 .l1clk (tck_l),
2022 .din (actest_in),
2023 .dout (actest_out),
2024 .siclk(siclk),
2025 .soclk(soclk)
2026 );
2027 assign actest_in = rti_state & actest_toggle;
2028 assign actest_toggle = ~(actest_out & actest_gen);
2029 assign actest_gen = (~instr_extest_pulse | instr_extest_train);
2030
2031 assign ex_state = ex1_dr_state | ex2_dr_state;
2032 assign extest_active = instr_extest_pulse | instr_extest_train;
2033 assign tck_bsinitclk = l1tck & ex_state & extest_active;
2034 assign tck_l_bsinitclk = tck_l & capture_dr_state & instr_extest;
2035
2036 //********************************************************************
2037 // Boundary Scan control logic and clock generation - to MIO
2038 //********************************************************************
2039 assign tcu_mio_bs_scan_en = bs_scan_en;
2040 assign tcu_mio_bs_clk = bs_clk;
2041 assign tcu_mio_bs_aclk = bs_aclk;
2042 assign tcu_mio_bs_bclk = bs_bclk;
2043 assign tcu_mio_bs_uclk = bs_uclk;
2044 assign pre_tcu_mio_bs_mode_ctl = bs_mode_ctl | pin_scanmode; // ECO xxxxxx
2045 assign tcu_mio_bs_scan_in = sbs_tcu_scan_out;
2046 assign pre_tcu_mio_bs_highz_l = ~instr_highz; // ECO xxxxxx
2047
2048 assign bs_instr = instr_extest | instr_sample_pl | instr_extest_pulse | instr_extest_train;
2049 assign scan_instr = bs_instr | jtag_ser_scan;
2050 assign bs_mode_ctl = ~(instr_extest | instr_extest_pulse | instr_extest_train | instr_clamp | instr_highz);
2051
2052
2053 assign bs_clk = pin_scanmode ? l1tck : (~bs_instr | (io_tck | ~capture_dr_state));
2054 assign bs_aclk = pin_scanmode ? siclk
2055 : bs_aclk_en ? clock_chop_aclk
2056 : 1'b0;
2057 assign bs_bclk = pin_scanmode ? soclk
2058 : (bs_scan_en & ~bs_bclk_en) ? 1'b1
2059 : bs_bclk_en ? ~clock_chop_bclk
2060 : 1'b0;
2061
2062 assign bs_scan_en_pre = scan_instr & shift_dr_state;
2063 tcu_jtag_ctl_msff_ctl_macro__width_1 bs_scan_enne_reg
2064 (
2065 .scan_in(bs_scan_enne_reg_scanin),
2066 .scan_out(bs_scan_enne_reg_scanout_unused),
2067 .l1clk (tck_l),
2068 .din (bs_scan_en_pre),
2069 .dout (bs_scan_en_ne),
2070 .siclk(siclk),
2071 .soclk(soclk)
2072 );
2073 tcu_jtag_ctl_msff_ctl_macro__width_1 bs_scan_enpe_reg
2074 (
2075 .scan_in(bs_scan_enpe_reg_scanin),
2076 .scan_out(bs_scan_enpe_reg_scanout),
2077 .l1clk (l1tck),
2078 .din (bs_scan_en_pre),
2079 .dout (bs_scan_en_pe),
2080 .siclk(siclk),
2081 .soclk(soclk)
2082 );
2083 assign bs_scan_en = pin_scanmode ? pin_scan_en
2084 : tlr_state ? 1'b0
2085 : bs_scan_en_ne;
2086 assign bs_aclk_en = scan_instr & bs_scan_en_ne;
2087 assign bs_bclk_en = tlr_state ? 1'b0
2088 : scan_instr & bs_scan_en_pe;
2089
2090 cl_u1_buf_4x tcu_sbs_soclk_buf ( .in(soclk), .out(soclk_buf ) );
2091 assign soclk_l = ~soclk_buf;
2092 assign bs_update = bs_instr & update_dr_state;
2093 assign bs_uclk = ~pin_scanmode ? (bs_update & clock_chop_bclk)
2094 : bs_scan_en ? soclk_l : l1tck;
2095
2096 // Scan out connection to tdi or to serial scan chain (one/all of 32 scan chains)
2097 assign jtag_sbs_scan_in = bs_instr ? io_tdi : ser_scan_out;
2098 assign jt_scan_in = io_tdi;
2099
2100 //********************************************************************
2101 // IDCODE
2102 //********************************************************************
2103 // this is the IDCODE register; capture and shift only, no update reg.
2104 // - capture on TCK rising edge in capDR after tlr, this will be idcode instr.
2105 // - does not need trst_l
2106
2107 tcu_jtag_ctl_msff_ctl_macro__width_32 tap_idcode_reg
2108 (
2109 .scan_in(tap_idcode_reg_scanin),
2110 .scan_out(tap_idcode_reg_scanout),
2111 .l1clk (l1tck),
2112 .din (next_idcode[31:0]),
2113 .dout (new_idcode[31:0]),
2114 .siclk(siclk),
2115 .soclk(soclk)
2116 );
2117
2118 assign idcode_data[31:0] = {jtag_id[3:0], `PART_ID, `MANUF_ID, 1'b1};
2119 assign next_idcode[31:0] = (instr_idcode & shift_dr_state) ? {io_tdi, new_idcode[31:1]}
2120 : (instr_idcode & capture_dr_state) ? idcode_data[31:0]
2121 : new_idcode;
2122
2123 //********************************************************************
2124 // Select Chains for SERIAL Scan: Either all or only one between TDI & TDO
2125 //********************************************************************
2126 // this is the register to specify one of 32 chains to select
2127 // - msb = enable bit
2128 // - serial chain shifts only; we don't want to capture or update the serial scan reg.
2129 // - does not need trst_l
2130
2131 tcu_jtag_ctl_msff_ctl_macro__width_6 tap_chainsel_reg
2132 (
2133 .scan_in(tap_chainsel_reg_scanin),
2134 .scan_out(tap_chainsel_reg_scanout),
2135 .l1clk (l1tck),
2136 .din (next_selchain[5:0]),
2137 .dout (selchain[5:0]),
2138 .siclk(siclk),
2139 .soclk(soclk)
2140 );
2141
2142 // TLR ECO
2143 //assign next_selchain[5:0] = (instr_chainsel & shift_dr_state) ? {io_tdi, selchain[5:1]}
2144 // : (instr_chainsel & capture_dr_state) ? selchain[5:0] //6'b000000
2145 // : tlr_state ? 6'b000000
2146 // : selchain[5:0];
2147
2148 assign next_selchain[5:0] = ({6{(instr_chainsel & shift_dr_state)}} & {io_tdi, selchain[5:1]}) |
2149 ({6{(~(instr_chainsel & shift_dr_state) & ~tlr_state)}} & selchain[5:0]);
2150
2151 assign sel_chain[4:0] = selchain[4:0];
2152 assign chain_select = selchain[5];
2153
2154 //********************************************************************
2155 // EFuse Support - FUSE_READ_MODE
2156 //********************************************************************
2157 // - update reg needs trst_l; can capture previously scanned value for inspection
2158 // fuse_read_mode
2159 // this is the SHIFT register
2160 tcu_jtag_ctl_msff_ctl_macro__width_3 tap_fusemode_shift_reg
2161 (
2162 .scan_in(tap_fusemode_shift_reg_scanin),
2163 .scan_out(tap_fusemode_shift_reg_scanout),
2164 .l1clk (l1tck),
2165 .din (next_new_fusemode[2:0]),
2166 .dout (new_fusemode[2:0]),
2167 .siclk(siclk),
2168 .soclk(soclk)
2169 );
2170 assign next_new_fusemode[2:0] = (instr_fuse_read_mode & shift_dr_state) ? {io_tdi, new_fusemode[2:1]}
2171 :(instr_fuse_read_mode & capture_dr_state) ? fusemode[2:0]
2172 : new_fusemode[2:0];
2173 // this is the UPDATE register - gets tck_l
2174 tcu_jtag_ctl_msff_ctl_macro__width_3 tap_fusemode_upd_reg
2175 (
2176 .scan_in(tap_fusemode_upd_reg_scanin),
2177 .scan_out(tap_fusemode_upd_reg_scanout_unused),
2178 .l1clk (tck_l),
2179 .din (next_fusemode[2:0]),
2180 .dout (fusemode[2:0]),
2181 .siclk(siclk),
2182 .soclk(soclk)
2183 );
2184 // this performs update
2185 assign next_fusemode[2:0] = (instr_fuse_read_mode & update_dr_state) ? new_fusemode[2:0]
2186 : tlr_state ? 3'b000 : fusemode[2:0];
2187 assign tcu_efu_read_mode[2:0] = {3{~tlr_state}} & fusemode[2:0];
2188
2189 //********************************************************************
2190 // EFuse Support - FUSE_ROW_ADDR
2191 //********************************************************************
2192 // - update reg needs trst_l; can capture previously scanned value for inspection
2193 // fuse_row_addr
2194 // this is the SHIFT register
2195 tcu_jtag_ctl_msff_ctl_macro__width_7 tap_fuserowaddr_shift_reg
2196 (
2197 .scan_in(tap_fuserowaddr_shift_reg_scanin),
2198 .scan_out(tap_fuserowaddr_shift_reg_scanout),
2199 .l1clk (l1tck),
2200 .din (next_new_fuserowaddr[6:0]),
2201 .dout (new_fuserowaddr[6:0]),
2202 .siclk(siclk),
2203 .soclk(soclk)
2204 );
2205 assign next_new_fuserowaddr[6:0] = (instr_fuse_row_addr & shift_dr_state)
2206 ? {io_tdi, new_fuserowaddr[6:1]}
2207 :(instr_fuse_row_addr & capture_dr_state)
2208 ? fuserowaddr[6:0] : new_fuserowaddr[6:0];
2209
2210 // this is the UPDATE register - gets tck_l
2211 tcu_jtag_ctl_msff_ctl_macro__width_7 tap_fuserowaddr_upd_reg
2212 (
2213 .scan_in(tap_fuserowaddr_upd_reg_scanin),
2214 .scan_out(tap_fuserowaddr_upd_reg_scanout_unused),
2215 .l1clk (tck_l),
2216 .din (next_fuserowaddr[6:0]),
2217 .dout (fuserowaddr[6:0]),
2218 .siclk(siclk),
2219 .soclk(soclk)
2220 );
2221 // this performs update
2222 assign next_fuserowaddr[6:0] = (instr_fuse_row_addr & update_dr_state) ? new_fuserowaddr[6:0]
2223 : tlr_state ? 7'b0000000 : fuserowaddr[6:0];
2224 assign tcu_efu_rowaddr[6:0] = {7{~tlr_state}} & fuserowaddr[6:0];
2225
2226 //********************************************************************
2227 // EFuse Support - FUSE_COl_ADDR
2228 //********************************************************************
2229 // - update reg needs trst_l; can capture previously scanned value for inspection
2230 // fuse_col_addr
2231 // this is the SHIFT register
2232 tcu_jtag_ctl_msff_ctl_macro__width_5 tap_fusecoladdr_shift_reg
2233 (
2234 .scan_in(tap_fusecoladdr_shift_reg_scanin),
2235 .scan_out(tap_fusecoladdr_shift_reg_scanout),
2236 .l1clk (l1tck),
2237 .din (next_new_fusecoladdr[4:0]),
2238 .dout (new_fusecoladdr[4:0]),
2239 .siclk(siclk),
2240 .soclk(soclk)
2241 );
2242 assign next_new_fusecoladdr[4:0] = (instr_fuse_col_addr & shift_dr_state) ? {io_tdi, new_fusecoladdr[4:1]}
2243 :(instr_fuse_col_addr & capture_dr_state) ? fusecoladdr[4:0]
2244 : new_fusecoladdr[4:0];
2245 // this is the UPDATE register - gets tck_l
2246 tcu_jtag_ctl_msff_ctl_macro__width_5 tap_fusecoladdr_upd_reg
2247 (
2248 .scan_in(tap_fusecoladdr_upd_reg_scanin),
2249 .scan_out(tap_fusecoladdr_upd_reg_scanout_unused),
2250 .l1clk (tck_l),
2251 .din (next_fusecoladdr[4:0]),
2252 .dout (fusecoladdr[4:0]),
2253 .siclk(siclk),
2254 .soclk(soclk)
2255 );
2256 // this performs update
2257 assign next_fusecoladdr[4:0] = (instr_fuse_col_addr & update_dr_state) ? new_fusecoladdr[4:0]
2258 : tlr_state ? 5'b00000 : fusecoladdr[4:0];
2259 assign tcu_efu_coladdr[4:0] = {5{~tlr_state}} & fusecoladdr[4:0];
2260
2261 //********************************************************************
2262 // EFuse Support - FUSE_READ instruction
2263 //********************************************************************
2264 // - no shift or update regs involved
2265 // single bit to pulse tcu_efu_read_en for one TCK cycle
2266 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_fusereaden_reg
2267 (
2268 .scan_in(tap_fusereaden_reg_scanin),
2269 .scan_out(tap_fusereaden_reg_scanout),
2270 .l1clk (l1tck),
2271 .din (next_fusereaden),
2272 .dout (new_fusereaden),
2273 .siclk(siclk),
2274 .soclk(soclk)
2275 );
2276 assign next_fusereaden = instr_fuse_read & rti_state;
2277 assign tcu_efu_read_en = ~new_fusereaden & next_fusereaden;
2278
2279 //********************************************************************
2280 // EFuse Support - FUSE_DEST_SAMPLE instruction
2281 //********************************************************************
2282 // - no shift or update regs involved
2283 // single bit to pulse tcu_efu_dest_sample for one TCK cycle
2284 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_fusedestsample_reg
2285 (
2286 .scan_in(tap_fusedestsample_reg_scanin),
2287 .scan_out(tap_fusedestsample_reg_scanout),
2288 .l1clk (l1tck),
2289 .din (next_fusedestsample),
2290 .dout (new_fusedestsample),
2291 .siclk(siclk),
2292 .soclk(soclk)
2293 );
2294 assign next_fusedestsample = instr_fuse_dest_sample & rti_state;
2295 assign tcu_efu_dest_sample = ~new_fusedestsample & next_fusedestsample;
2296
2297 //********************************************************************
2298 // EFuse Support - FUSE_BYPASS instruction
2299 //********************************************************************
2300 // - no shift or update regs involved
2301 // single bit to pulse tcu_efu_fuse_bypass for one TCK cycle
2302 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_fusebypass_reg
2303 (
2304 .scan_in(tap_fusebypass_reg_scanin),
2305 .scan_out(tap_fusebypass_reg_scanout),
2306 .l1clk (l1tck),
2307 .din (next_fusebypass),
2308 .dout (new_fusebypass),
2309 .siclk(siclk),
2310 .soclk(soclk)
2311 );
2312 assign next_fusebypass = instr_fuse_bypass & rti_state;
2313 assign tcu_efu_fuse_bypass = ~new_fusebypass & next_fusebypass;
2314
2315 // common EFuse assigns
2316 assign fuse_capshft = instr_fuse_read | instr_fuse_dest_sample;
2317 assign tcu_efu_capturedr = fuse_capshft & capture_dr_state;
2318 assign tcu_efu_shiftdr = (fuse_capshft | instr_fuse_bypass_data) & shift_dr_state;
2319 assign tcu_efu_updatedr = instr_fuse_bypass_data & update_dr_state;
2320
2321 assign rti_state = (tap_state[3:0] == `TAP_RTI);
2322 //assign tlr_state = (tap_state[3:0] == `TAP_RESET);
2323 assign tcu_efu_data_in = io_tdi;
2324 assign fuse_instr = instr_fuse_read_mode | instr_fuse_row_addr | instr_fuse_col_addr
2325 | instr_fuse_read | instr_fuse_dest_sample | instr_fuse_bypass_data;
2326
2327 //********************************************************************
2328 // EFuse Support - Redundancy Value Clear - to tcu_sigmux_ctl
2329 //********************************************************************
2330 // can capture previously scanned value for inspection
2331 // bit[6]=enable; bits[5:0]=RV_ID
2332 // this is the SHIFT register
2333 tcu_jtag_ctl_msff_ctl_macro__width_7 tap_rvclr_shift_reg
2334 (
2335 .scan_in(tap_rvclr_shift_reg_scanin),
2336 .scan_out(tap_rvclr_shift_reg_scanout),
2337 .l1clk (l1tck),
2338 .din (next_new_rvclr[6:0]),
2339 .dout (new_rvclr[6:0]),
2340 .siclk(siclk),
2341 .soclk(soclk)
2342 );
2343 assign next_new_rvclr[6:0] = (instr_rvclr & shift_dr_state) ? {io_tdi, new_rvclr[6:1]}
2344 : (instr_rvclr & capture_dr_state) ? rvclr[6:0]
2345 : tlr_state ? 7'b0000000
2346 : new_rvclr[6:0];
2347 // this is the UPDATE register - gets tck_l
2348 tcu_jtag_ctl_msff_ctl_macro__width_7 tap_rvclr_upd_reg
2349 (
2350 .scan_in(tap_rvclr_upd_reg_scanin),
2351 .scan_out(tap_rvclr_upd_reg_scanout),
2352 .l1clk (l1tck), // don't need tck_l since not a tck domain data register
2353 .din (next_rvclr[6:0]),
2354 .dout (rvclr[6:0]),
2355 .siclk(siclk),
2356 .soclk(soclk)
2357 );
2358 // this performs update
2359 assign next_rvclr[6:0] = efu_clear_upd ? new_rvclr[6:0]
2360 : tlr_state ? 7'b0000000 : rvclr[6:0];
2361
2362 assign efu_clear_upd = instr_rvclr & update_dr_state;
2363 //assign jtag_efu_rvclr[6:0] = {7{~tlr_state}} & new_rvclr[6:0];// to tcu_sigmux_ctl; redundancy value clear ID // TLR ECO
2364 assign jtag_efu_rvclr[6:0] = new_rvclr[6:0]; // TLR ECO
2365 //assign jtag_efu_clear_instr = ~tlr_state & efu_clear_upd; // to tcu_sigmux_ctl; indicates jtag clear active
2366 assign jtag_efu_clear_instr = efu_clear_upd; // TLR ECO // to tcu_sigmux_ctl; indicates jtag clear active
2367 //jtag_efu_rvclr update reg value sent to efuse changed to output of shift reg to avoid sending old value during update dr
2368 //********************************************************************
2369 // MBIST: Bypass register: 88 bypass bits, 1=bypass mbist engine
2370 //********************************************************************
2371 // Update register specifies which mbist engines to bypass
2372 // Capture into shift reg enabled
2373 // - update reg only needs trst_l; default is to bypass no mbist engines (all selected)
2374
2375 // this is the SHIFT register
2376 tcu_jtag_ctl_msff_ctl_macro__width_48 tap_mbibypass_shift_reg
2377 (
2378 .scan_in (tap_mbibypass_shift_reg_scanin),
2379 .scan_out (tap_mbibypass_shift_reg_scanout),
2380 .l1clk (l1tck),
2381 .din (next_new_mbibypass[`NUM_TOTAL_MBIST_M1:0]),
2382 .dout (new_mbibypass[`NUM_TOTAL_MBIST_M1:0]),
2383 .siclk(siclk),
2384 .soclk(soclk)
2385 );
2386 assign next_new_mbibypass = (instr_mbist_bypass & shift_dr_state) ? {io_tdi, new_mbibypass[`NUM_TOTAL_MBIST_M1:1]}
2387 : (instr_mbist_bypass & capture_dr_state) ? mbibypass
2388 : new_mbibypass;
2389
2390 // this is the UPDATE register
2391 tcu_jtag_ctl_msff_ctl_macro__width_48 tap_mbibypass_upd_reg
2392 (
2393 .scan_in (tap_mbibypass_upd_reg_scanin),
2394 .scan_out (tap_mbibypass_upd_reg_scanout),
2395 .l1clk (l1tck), //(tck_l),
2396 .din (next_mbibypass[`NUM_TOTAL_MBIST_M1:0]),
2397 .dout (mbibypass[`NUM_TOTAL_MBIST_M1:0]),
2398 .siclk(siclk),
2399 .soclk(soclk)
2400 );
2401 // this performs update
2402 assign next_mbibypass = (instr_mbist_bypass & update_dr_state) ? new_mbibypass
2403 : (ucb_wr_mbist_abort || tlr_state) ? {`NUM_TOTAL_MBIST{1'b0}}
2404 : ucb_wr_mbist_bypass ? ucb_data_out[47:0]
2405 : mbibypass;
2406
2407 //********************************************************************
2408 // MBIST: Done register: 66 done bits from MBIST engines
2409 // Fail register: 66 fail bits from MBIST engines
2410 //********************************************************************
2411 // No update, capture/shift only
2412 // If MBIST GETDONE instruction active, captures 66 done status bits from the mbist engines
2413 // If MBIST GETFAIL instruction active, captures 66 fail status bits from the mbist engines
2414 // - this register is shared by the TAP_MBIST_GETDONE and TAP_MBIST_GETFAIL instructions
2415 // - capture into shift reg only for getdone/getfail
2416 // does not need trst_l
2417
2418 assign instr_mbist66 = instr_mbist_getdone | instr_mbist_getfail;
2419
2420 // this is the SHIFT register
2421 tcu_jtag_ctl_msff_ctl_macro__width_48 tap_mbist_get_done_fail_shift_reg
2422 (
2423 .scan_in (tap_mbist_get_done_fail_shift_reg_scanin),
2424 .scan_out (tap_mbist_get_done_fail_shift_reg_scanout),
2425 .l1clk (l1tck),
2426 .din (next_mbist_get_done_fail[`NUM_TOTAL_MBIST_M1:0]),
2427 .dout (mbist_get_done_fail[`NUM_TOTAL_MBIST_M1:0]),
2428 .siclk(siclk),
2429 .soclk(soclk)
2430 );
2431 assign next_mbist_get_done_fail = (instr_mbist66 & shift_dr_state) ?
2432 {io_tdi, mbist_get_done_fail[`NUM_TOTAL_MBIST_M1:1]}
2433 : (instr_mbist_getdone & capture_dr_state) ? mbist_done
2434 : (instr_mbist_getfail & capture_dr_state) ? mbist_fail
2435 : mbist_get_done_fail;
2436
2437 //********************************************************************
2438 // MBIST: Result register
2439 //********************************************************************
2440 // captures 2 bits: done, fail for all 66 mbist engines, to shift out (no update reg.)
2441 // - does not need trst_l
2442 // bit 1=diag mode, bit 0=serial/parallel mode (bit0=1-->parallel mode)
2443
2444 tcu_jtag_ctl_msff_ctl_macro__width_2 tap_mbist_result_reg
2445 (
2446 .scan_in (tap_mbist_result_reg_scanin),
2447 .scan_out (tap_mbist_result_reg_scanout),
2448 .l1clk (l1tck),
2449 .din (next_mbist_result[1:0]),
2450 .dout (mbist_result[1:0]),
2451 .siclk(siclk),
2452 .soclk(soclk)
2453 );
2454 assign next_mbist_result[1:0] = (instr_mbist_result & shift_dr_state) ? {io_tdi, mbist_result[1]}
2455 : (instr_mbist_result & capture_dr_state) ? mbist_done_fail[1:0]
2456 : mbist_result[1:0];
2457
2458 //********************************************************************
2459 // MBIST: Mode
2460 //********************************************************************
2461 // - no capture, only shift (contents gated by mbist_start); needs trst_l
2462 // dual bits to store diag/serial bits until cleared by TAP_MBIST_ABORT/TLR
2463 tcu_jtag_ctl_msff_ctl_macro__width_4 tap_mbist_mode_reg
2464 (
2465 .scan_in (tap_mbist_mode_reg_scanin),
2466 .scan_out (tap_mbist_mode_reg_scanout),
2467 .l1clk (l1tck),
2468 .din (next_mbist_mode[3:0]),
2469 .dout (mbist_mode[3:0]),
2470 .siclk(siclk),
2471 .soclk(soclk)
2472 );
2473 assign next_mbist_mode[3:0] = (instr_mbist_mode & shift_dr_state) ? {io_tdi, mbist_mode[3:1]}
2474 : (instr_mbist_abort | tlr_state | ucb_wr_mbist_abort) ? 4'b00
2475 : ucb_wr_mbist_mode ? ucb_data_out[3:0] : mbist_mode;
2476
2477 //********************************************************************
2478 // MBIST Enable for Clock Stop via Cycle Counter
2479 //********************************************************************
2480 // When mbist controller is started, it sends a start signal to the cycle
2481 // counter if this register is set. When the cycle counter reaches zero,
2482 // a hard clock stop is initiated, so that a scan dump can be performed.
2483 // single bit to store start signal until cleared by TAP_CLOCK_START/TLR
2484 tcu_jtag_ctl_msff_ctl_macro__clr_1__en_1__width_1 tap_mbist_clkstpen_reg
2485 (
2486 .scan_in (tap_mbist_clkstpen_reg_scanin),
2487 .scan_out (tap_mbist_clkstpen_reg_scanout),
2488 .l1clk (l1tck),
2489 .clr (clkstpen_clear),
2490 .en (mbist_cyc_count_en),
2491 .din (instr_mbist_clkstpen),
2492 .dout (mbist_clkstpen_q),
2493 .siclk(siclk),
2494 .soclk(soclk));
2495 assign mbist_clkstpen = mbist_clkstpen_q; // TLR ECO // & ~tlr_state;
2496 assign clkstpen_clear = instr_clock_start | tlr_state;
2497 assign mbist_cyc_count_en = ~mbist_clkstpen_q & ~tlr_state;
2498
2499 //********************************************************************
2500 // MBIST: Diagnostics
2501 //********************************************************************
2502 // This places one mbist engine (out of 66) between TDI & TDO
2503 // It is for shifting only, no need to capture or update since we use clock_stop
2504 // to the header to control activity.
2505 // To use: 1. program tap_mbist_bypass & bypass all but one mbist engine (or 3 per core)
2506 // 2. program tap_mbist_diag, and shift data out TDO
2507 // The logic below first stops the clock to the targeted mbist engine
2508 // then it puts soclk "high" to turn off slave (assumes clock stops low)
2509 // then it activates scan_en (shiftDR)
2510 // then it sends siclk & soclk via chopped TCK to the target mbist engine
2511 // Scan is destructive; to program mbist you must scan in valid data, then
2512 // reverse the above: put soclk "high", turn off scan_en, then turn off stop
2513
2514 // General MBIST logic
2515 assign mbi_shiftdr = instr_mbist_diag & shift_dr_state;
2516 tcu_jtag_ctl_msff_ctl_macro__width_1 mbi_ascan_en_reg
2517 (
2518 .scan_in (mbi_a_scan_en_reg_scanin),
2519 .scan_out (mbi_a_scan_en_reg_scanout_unused),
2520 .l1clk (tck_l),
2521 .din (mbi_shiftdr),
2522 .dout (mbi_a_scan_en_q),
2523 .siclk(siclk),
2524 .soclk(soclk)
2525 );
2526 assign mbi_a_scan_en = mbi_a_scan_en_q & ~tlr_state;
2527 tcu_jtag_ctl_msff_ctl_macro__width_1 mbi_bscan_en_reg
2528 (
2529 .scan_in (mbi_b_scan_en_reg_scanin),
2530 .scan_out (mbi_b_scan_en_reg_scanout),
2531 .l1clk (l1tck),
2532 .din (mbi_shiftdr),
2533 .dout (mbi_b_scan_en_q),
2534 .siclk(siclk),
2535 .soclk(soclk)
2536 );
2537 assign mbi_b_scan_en = mbi_b_scan_en_q & ~tlr_state;
2538
2539 assign mbi_scan_en = mbi_a_scan_en | mbi_b_scan_en;
2540 assign ex1_dr_state = (tap_state[3:0] == `TAP_EXIT1_DR);
2541 assign pause_dr_state = (tap_state[3:0] == `TAP_PAUSE_DR);
2542 assign ex2_dr_state = (tap_state[3:0] == `TAP_EXIT2_DR);
2543 assign soclk_off = shift_dr_state | ex1_dr_state | pause_dr_state | ex2_dr_state | update_dr_state;
2544
2545 /*
2546 assign spc_mbist_en[7:0] = ~mbibypass[7:0];
2547
2548 assign spc_mb_aclk[7:0] = (spc_mbist_en[7:0] & {8{mbi_a_scan_en}}) ?
2549 {8{clock_chop_aclk}} : 8'b0;
2550 assign spc_mb_bclk[7:0] = (spc_mbist_en[7:0] & {8{mbi_b_scan_en}}) ?
2551 {8{!clock_chop_bclk}} :
2552 (spc_mbist_en[7:0] & {8{instr_mbist_diag}} & {8{soclk_off}}) ?
2553 8'hFF :
2554 8'h0;
2555 assign spc_mb_scan_en[7:0] = spc_mbist_en[7:0] & {8{mbi_scan_en}};
2556 assign spc_mb_clk_stop[7:0] = spc_mbist_en[7:0] & {8{instr_mbist_diag}};
2557
2558 assign tap_spc_mb_aclk[7:0] = instr_mbist_diag ? spc_mb_aclk[7:0] : spc_lb_aclk[7:0];
2559 assign tap_spc_mb_bclk[7:0] = instr_mbist_diag ? spc_mb_bclk[7:0] : spc_lb_bclk[7:0];
2560 assign tap_spc_mb_scan_en[7:0] = instr_mbist_diag ? spc_mb_scan_en[7:0] : spc_lb_scan_en[7:0];
2561 assign tap_spc_mb_clk_stop_ps[7:0] = instr_mbist_diag ? spc_mb_clk_stop[7:0] : spc_lb_clk_stop[7:0];
2562 assign tap_spc_mb_clk_stop[0] = tap_spc0_mb_clk_stop_sync;
2563 assign tap_spc_mb_clk_stop[1] = tap_spc1_mb_clk_stop_sync;
2564 assign tap_spc_mb_clk_stop[2] = tap_spc2_mb_clk_stop_sync;
2565 assign tap_spc_mb_clk_stop[3] = tap_spc3_mb_clk_stop_sync;
2566 assign tap_spc_mb_clk_stop[4] = tap_spc4_mb_clk_stop_sync;
2567 assign tap_spc_mb_clk_stop[5] = tap_spc5_mb_clk_stop_sync;
2568 assign tap_spc_mb_clk_stop[6] = tap_spc6_mb_clk_stop_sync;
2569 assign tap_spc_mb_clk_stop[7] = tap_spc7_mb_clk_stop_sync;
2570*/
2571
2572
2573
2574 // ******* For SPC0, mbist engine 0-2 ********************************
2575 assign mbi_spc0 = !mbibypass[0] & ~tlr_state; // |mbibypass[2:0];
2576 assign spc0_mb_aclk = (mbi_spc0 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2577 assign spc0_mb_bclk = (mbi_spc0 & mbi_b_scan_en) ? ~clock_chop_bclk
2578 : (mbi_spc0 & instr_mbist_diag & soclk_off) ? 1'b1
2579 : 1'b0;
2580 assign spc0_mb_scan_en = (mbi_spc0 & mbi_scan_en);
2581 assign spc0_mb_clk_stop = (mbi_spc0 & instr_mbist_diag);
2582
2583 //assign tap_spc0_mb_aclk = pin_scanmode ? siclk : (flush | spc0_mb_aclk | jt_scan_aclk);
2584 //assign tap_spc0_mb_bclk = pin_scanmode ? soclk : (spc0_mb_bclk | jt_scan_bclk);
2585 //assign tap_spc0_mb_scan_en = pin_scanmode ? pin_scan_en : (flush_dly | spc0_mb_scan_en | jt_scan_en);
2586 //assign tap_spc0_mb_clk_stop_ps = pin_scanmode ? 1'b0 : spc0_mb_clk_stop;
2587 //assign tap_spc0_mb_clk_stop = spc0_clk_stop | tap_spc0_mb_clk_stop_sync;
2588 assign tap_spc0_mb_aclk = instr_mbist_diag ? spc0_mb_aclk : spc_lb_aclk[0];
2589 assign tap_spc0_mb_bclk = instr_mbist_diag ? spc0_mb_bclk : spc_lb_bclk[0];
2590 assign tap_spc0_mb_scan_en = instr_mbist_diag ? spc0_mb_scan_en : spc_lb_scan_en[0];
2591 assign tap_spc0_mb_clk_stop_din = instr_mbist_diag ? spc0_mb_clk_stop : spc_lb_clk_stop[0];
2592 assign tap_spc0_mb_scan_out = io_tdi;
2593 // ******* For SPC1, mbist engine 0-2 ********************************
2594 assign mbi_spc1 = !mbibypass[1] & ~tlr_state;
2595 assign spc1_mb_aclk = (mbi_spc1 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2596 assign spc1_mb_bclk = (mbi_spc1 & mbi_b_scan_en) ? ~clock_chop_bclk
2597 : (mbi_spc1 & instr_mbist_diag & soclk_off) ? 1'b1
2598 : 1'b0;
2599 assign spc1_mb_scan_en = (mbi_spc1 & mbi_scan_en);
2600 assign spc1_mb_clk_stop = (mbi_spc1 & instr_mbist_diag);
2601
2602 assign tap_spc1_mb_aclk = instr_mbist_diag ? spc1_mb_aclk : spc_lb_aclk[1];
2603 assign tap_spc1_mb_bclk = instr_mbist_diag ? spc1_mb_bclk : spc_lb_bclk[1];
2604 assign tap_spc1_mb_scan_en = instr_mbist_diag ? spc1_mb_scan_en : spc_lb_scan_en[1];
2605 assign tap_spc1_mb_clk_stop_din = instr_mbist_diag ? spc1_mb_clk_stop : spc_lb_clk_stop[1];
2606 assign tap_spc1_mb_scan_out = io_tdi;
2607 // ******* For SPC2, mbist engine 0-2 ********************************
2608 assign mbi_spc2 = !mbibypass[2] & ~tlr_state;
2609 assign spc2_mb_aclk = (mbi_spc2 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2610 assign spc2_mb_bclk = (mbi_spc2 & mbi_b_scan_en) ? ~clock_chop_bclk
2611 : (mbi_spc2 & instr_mbist_diag & soclk_off) ? 1'b1
2612 : 1'b0;
2613 assign spc2_mb_scan_en = (mbi_spc2 & mbi_scan_en);
2614 assign spc2_mb_clk_stop = (mbi_spc2 & instr_mbist_diag);
2615
2616 assign tap_spc2_mb_aclk = instr_mbist_diag ? spc2_mb_aclk : spc_lb_aclk[2];
2617 assign tap_spc2_mb_bclk = instr_mbist_diag ? spc2_mb_bclk : spc_lb_bclk[2];
2618 assign tap_spc2_mb_scan_en = instr_mbist_diag ? spc2_mb_scan_en : spc_lb_scan_en[2];
2619 assign tap_spc2_mb_clk_stop_din = instr_mbist_diag ? spc2_mb_clk_stop : spc_lb_clk_stop[2];
2620 assign tap_spc2_mb_scan_out = io_tdi;
2621 // ******* For SPC3, mbist engine 0-2 ********************************
2622 assign mbi_spc3 = !mbibypass[3] & ~tlr_state;
2623 assign spc3_mb_aclk = (mbi_spc3 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2624 assign spc3_mb_bclk = (mbi_spc3 & mbi_b_scan_en) ? ~clock_chop_bclk
2625 : (mbi_spc3 & instr_mbist_diag & soclk_off) ? 1'b1
2626 : 1'b0;
2627 assign spc3_mb_scan_en = (mbi_spc3 & mbi_scan_en);
2628 assign spc3_mb_clk_stop = (mbi_spc3 & instr_mbist_diag);
2629
2630 assign tap_spc3_mb_aclk = instr_mbist_diag ? spc3_mb_aclk : spc_lb_aclk[3];
2631 assign tap_spc3_mb_bclk = instr_mbist_diag ? spc3_mb_bclk : spc_lb_bclk[3];
2632 assign tap_spc3_mb_scan_en = instr_mbist_diag ? spc3_mb_scan_en : spc_lb_scan_en[3];
2633 assign tap_spc3_mb_clk_stop_din = instr_mbist_diag ? spc3_mb_clk_stop : spc_lb_clk_stop[3];
2634 assign tap_spc3_mb_scan_out = io_tdi;
2635 // ******* For SPC4, mbist engine 0-2 ********************************
2636 assign mbi_spc4 = !mbibypass[4] & ~tlr_state;
2637 assign spc4_mb_aclk = (mbi_spc4 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2638 assign spc4_mb_bclk = (mbi_spc4 & mbi_b_scan_en) ? ~clock_chop_bclk
2639 : (mbi_spc4 & instr_mbist_diag & soclk_off) ? 1'b1
2640 : 1'b0;
2641 assign spc4_mb_scan_en = (mbi_spc4 & mbi_scan_en);
2642 assign spc4_mb_clk_stop = (mbi_spc4 & instr_mbist_diag);
2643
2644 assign tap_spc4_mb_aclk = instr_mbist_diag ? spc4_mb_aclk : spc_lb_aclk[4];
2645 assign tap_spc4_mb_bclk = instr_mbist_diag ? spc4_mb_bclk : spc_lb_bclk[4];
2646 assign tap_spc4_mb_scan_en = instr_mbist_diag ? spc4_mb_scan_en : spc_lb_scan_en[4];
2647 assign tap_spc4_mb_clk_stop_din = instr_mbist_diag ? spc4_mb_clk_stop : spc_lb_clk_stop[4];
2648 assign tap_spc4_mb_scan_out = io_tdi;
2649 // ******* For SPC5, mbist engine 0-2 ********************************
2650 assign mbi_spc5 = !mbibypass[5] & ~tlr_state;
2651 assign spc5_mb_aclk = (mbi_spc5 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2652 assign spc5_mb_bclk = (mbi_spc5 & mbi_b_scan_en) ? ~clock_chop_bclk
2653 : (mbi_spc5 & instr_mbist_diag & soclk_off) ? 1'b1
2654 : 1'b0;
2655 assign spc5_mb_scan_en = (mbi_spc5 & mbi_scan_en);
2656 assign spc5_mb_clk_stop = (mbi_spc5 & instr_mbist_diag);
2657
2658 assign tap_spc5_mb_aclk = instr_mbist_diag ? spc5_mb_aclk : spc_lb_aclk[5];
2659 assign tap_spc5_mb_bclk = instr_mbist_diag ? spc5_mb_bclk : spc_lb_bclk[5];
2660 assign tap_spc5_mb_scan_en = instr_mbist_diag ? spc5_mb_scan_en : spc_lb_scan_en[5];
2661 assign tap_spc5_mb_clk_stop_din = instr_mbist_diag ? spc5_mb_clk_stop : spc_lb_clk_stop[5];
2662 assign tap_spc5_mb_scan_out = io_tdi;
2663 // ******* For SPC6, mbist engine 0-2 ********************************
2664 assign mbi_spc6 = !mbibypass[6] & ~tlr_state;
2665 assign spc6_mb_aclk = (mbi_spc6 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2666 assign spc6_mb_bclk = (mbi_spc6 & mbi_b_scan_en) ? ~clock_chop_bclk
2667 : (mbi_spc6 & instr_mbist_diag & soclk_off) ? 1'b1
2668 : 1'b0;
2669 assign spc6_mb_scan_en = (mbi_spc6 & mbi_scan_en);
2670 assign spc6_mb_clk_stop = (mbi_spc6 & instr_mbist_diag);
2671
2672 assign tap_spc6_mb_aclk = instr_mbist_diag ? spc6_mb_aclk : spc_lb_aclk[6];
2673 assign tap_spc6_mb_bclk = instr_mbist_diag ? spc6_mb_bclk : spc_lb_bclk[6];
2674 assign tap_spc6_mb_scan_en = instr_mbist_diag ? spc6_mb_scan_en : spc_lb_scan_en[6];
2675 assign tap_spc6_mb_clk_stop_din = instr_mbist_diag ? spc6_mb_clk_stop : spc_lb_clk_stop[6];
2676 assign tap_spc6_mb_scan_out = io_tdi;
2677 // ******* For SPC7, mbist engine 0-2 ********************************
2678 assign mbi_spc7 = !mbibypass[7] & ~tlr_state;
2679 assign spc7_mb_aclk = (mbi_spc7 & mbi_a_scan_en) ? clock_chop_aclk : 1'b0;
2680 assign spc7_mb_bclk = (mbi_spc7 & mbi_b_scan_en) ? ~clock_chop_bclk
2681 : (mbi_spc7 & instr_mbist_diag & soclk_off) ? 1'b1
2682 : 1'b0;
2683 assign spc7_mb_scan_en = (mbi_spc7 & mbi_scan_en);
2684 assign spc7_mb_clk_stop = (mbi_spc7 & instr_mbist_diag);
2685
2686 assign tap_spc7_mb_aclk = instr_mbist_diag ? spc7_mb_aclk : spc_lb_aclk[7];
2687 assign tap_spc7_mb_bclk = instr_mbist_diag ? spc7_mb_bclk : spc_lb_bclk[7];
2688 assign tap_spc7_mb_scan_en = instr_mbist_diag ? spc7_mb_scan_en : spc_lb_scan_en[7];
2689 assign tap_spc7_mb_clk_stop_din = instr_mbist_diag ? spc7_mb_clk_stop : spc_lb_clk_stop[7];
2690 assign tap_spc7_mb_scan_out = io_tdi;
2691
2692
2693 assign mbist_sii = !(&mbibypass[9:8]) & ~tlr_state;
2694 assign mbist_sio = !(&mbibypass[11:10]) & ~tlr_state;
2695 assign mbist_ncu = !(&mbibypass[13:12]) & ~tlr_state;
2696 assign mbist_mcu0 = !mbibypass[14] & ~tlr_state;
2697 assign mbist_mcu1 = !mbibypass[15] & ~tlr_state;
2698 assign mbist_mcu2 = !mbibypass[16] & ~tlr_state;
2699 assign mbist_mcu3 = !mbibypass[17] & ~tlr_state;
2700 assign mbist_l2b0 = !mbibypass[18] & ~tlr_state;
2701 assign mbist_l2b1 = !mbibypass[19] & ~tlr_state;
2702 assign mbist_l2b2 = !mbibypass[20] & ~tlr_state;
2703 assign mbist_l2b3 = !mbibypass[21] & ~tlr_state;
2704 assign mbist_l2b4 = !mbibypass[22] & ~tlr_state;
2705 assign mbist_l2b5 = !mbibypass[23] & ~tlr_state;
2706 assign mbist_l2b6 = !mbibypass[24] & ~tlr_state;
2707 assign mbist_l2b7 = !mbibypass[25] & ~tlr_state;
2708 assign mbist_l2t0 = !mbibypass[26] & ~tlr_state;
2709 assign mbist_l2t1 = !mbibypass[27] & ~tlr_state;
2710 assign mbist_l2t2 = !mbibypass[28] & ~tlr_state;
2711 assign mbist_l2t3 = !mbibypass[29] & ~tlr_state;
2712 assign mbist_l2t4 = !mbibypass[30] & ~tlr_state;
2713 assign mbist_l2t5 = !mbibypass[31] & ~tlr_state;
2714 assign mbist_l2t6 = !mbibypass[32] & ~tlr_state;
2715 assign mbist_l2t7 = !mbibypass[33] & ~tlr_state;
2716 assign mbist_dmu = !(&mbibypass[35:34]) & ~tlr_state;
2717 assign mbist_peu = !mbibypass[36] & ~tlr_state;
2718 assign mbist_tds_tdmc = !(&mbibypass[38:37]) & ~tlr_state;
2719 assign mbist_rtx = !(&mbibypass[46:39]) & ~tlr_state;
2720 assign mbist_rdp_rdmc = !mbibypass[47] & ~tlr_state;
2721
2722 // TLR ECO
2723 assign mbist_sii_n = !(&mbibypass[9:8]) ;
2724 assign mbist_sio_n = !(&mbibypass[11:10]) ;
2725 assign mbist_ncu_n = !(&mbibypass[13:12]) ;
2726 assign mbist_mcu0_n = !mbibypass[14] ;
2727 assign mbist_mcu1_n = !mbibypass[15] ;
2728 assign mbist_mcu2_n = !mbibypass[16] ;
2729 assign mbist_mcu3_n = !mbibypass[17] ;
2730 assign mbist_l2b0_n = !mbibypass[18] ;
2731 assign mbist_l2b1_n = !mbibypass[19] ;
2732 assign mbist_l2b2_n = !mbibypass[20] ;
2733 assign mbist_l2b3_n = !mbibypass[21] ;
2734 assign mbist_l2b4_n = !mbibypass[22] ;
2735 assign mbist_l2b5_n = !mbibypass[23] ;
2736 assign mbist_l2b6_n = !mbibypass[24] ;
2737 assign mbist_l2b7_n = !mbibypass[25] ;
2738 assign mbist_l2t0_n = !mbibypass[26] ;
2739 assign mbist_l2t1_n = !mbibypass[27] ;
2740 assign mbist_l2t2_n = !mbibypass[28] ;
2741 assign mbist_l2t3_n = !mbibypass[29] ;
2742 assign mbist_l2t4_n = !mbibypass[30] ;
2743 assign mbist_l2t5_n = !mbibypass[31] ;
2744 assign mbist_l2t6_n = !mbibypass[32] ;
2745 assign mbist_l2t7_n = !mbibypass[33] ;
2746 assign mbist_dmu_n = !(&mbibypass[35:34]) ;
2747 assign mbist_peu_n = !mbibypass[36] ;
2748 assign mbist_tds_tdmc_n = !(&mbibypass[38:37]) ;
2749 assign mbist_rtx_n = !(&mbibypass[46:39]) ;
2750 assign mbist_rdp_rdmc_n = !mbibypass[47] ;
2751
2752 assign soc_mbist_aclk = mbi_a_scan_en && clock_chop_aclk;
2753 assign soc_mbist_bclk = mbi_b_scan_en ? !clock_chop_bclk :
2754 (instr_mbist_diag && soclk_off);
2755 assign soc_mbist_scan_en = &mbibypass[7:0] && mbi_scan_en;
2756
2757 assign soc0_mbist_clk_stop_din = instr_mbist_diag &
2758 (mbist_sii || mbist_sio || mbist_ncu);
2759 assign mcu0_mbist_clk_stop_din = instr_mbist_diag & mbist_mcu0;
2760 assign mcu1_mbist_clk_stop_din = instr_mbist_diag & mbist_mcu1;
2761 assign mcu2_mbist_clk_stop_din = instr_mbist_diag & mbist_mcu2;
2762 assign mcu3_mbist_clk_stop_din = instr_mbist_diag & mbist_mcu3;
2763
2764 assign l2b0_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b0;
2765 assign l2b1_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b1;
2766 assign l2b2_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b2;
2767 assign l2b3_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b3;
2768 assign l2b4_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b4;
2769 assign l2b5_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b5;
2770 assign l2b6_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b6;
2771 assign l2b7_mbist_clk_stop_din = instr_mbist_diag & mbist_l2b7;
2772
2773 assign l2t0_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t0;
2774 assign l2t1_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t1;
2775 assign l2t2_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t2;
2776 assign l2t3_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t3;
2777 assign l2t4_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t4;
2778 assign l2t5_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t5;
2779 assign l2t6_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t6;
2780 assign l2t7_mbist_clk_stop_din = instr_mbist_diag & mbist_l2t7;
2781
2782 assign dmu_mbist_clk_stop_din = instr_mbist_diag & mbist_dmu;
2783 assign peu_mbist_clk_stop_din = instr_mbist_diag & mbist_peu;
2784
2785 assign rdp_mbist_clk_stop_din = instr_mbist_diag & mbist_rdp_rdmc;
2786 assign rtx_mbist_clk_stop_din = instr_mbist_diag & mbist_rtx;
2787 assign tds_mbist_clk_stop_din = instr_mbist_diag & mbist_tds_tdmc;
2788
2789 // TLR ECO: remove tlr_state from the mbist_* signals at the bottom of mbist_scan_out
2790 assign mbist_scan_out = mbi_spc0 ? spc0_mb_scan_in :
2791 mbi_spc1 ? spc1_mb_scan_in :
2792 mbi_spc2 ? spc2_mb_scan_in :
2793 mbi_spc3 ? spc3_mb_scan_in :
2794 mbi_spc4 ? spc4_mb_scan_in :
2795 mbi_spc5 ? spc5_mb_scan_in :
2796 mbi_spc6 ? spc6_mb_scan_in :
2797 mbi_spc7 ? spc7_mb_scan_in :
2798 (instr_lbist_access && lbist_spc[0]) ? spc0_tcu_lbist_scan_out :
2799 (instr_lbist_access && lbist_spc[1]) ? spc1_tcu_lbist_scan_out :
2800 (instr_lbist_access && lbist_spc[2]) ? spc2_tcu_lbist_scan_out :
2801 (instr_lbist_access && lbist_spc[3]) ? spc3_tcu_lbist_scan_out :
2802 (instr_lbist_access && lbist_spc[4]) ? spc4_tcu_lbist_scan_out :
2803 (instr_lbist_access && lbist_spc[5]) ? spc5_tcu_lbist_scan_out :
2804 (instr_lbist_access && lbist_spc[6]) ? spc6_tcu_lbist_scan_out :
2805 (instr_lbist_access && lbist_spc[7]) ? spc7_tcu_lbist_scan_out :
2806 mbist_sii_n ? sii_tcu_mbist_scan_out :
2807 mbist_sio_n ? sio_tcu_mbist_scan_out :
2808 mbist_ncu_n ? ncu_tcu_mbist_scan_out :
2809 mbist_mcu0_n ? mcu0_tcu_mbist_scan_out :
2810 mbist_mcu1_n ? mcu1_tcu_mbist_scan_out :
2811 mbist_mcu2_n ? mcu2_tcu_mbist_scan_out :
2812 mbist_mcu3_n ? mcu3_tcu_mbist_scan_out :
2813 mbist_l2b0_n ? l2b0_tcu_mbist_scan_out :
2814 mbist_l2b1_n ? l2b1_tcu_mbist_scan_out :
2815 mbist_l2b2_n ? l2b2_tcu_mbist_scan_out :
2816 mbist_l2b3_n ? l2b3_tcu_mbist_scan_out :
2817 mbist_l2b4_n ? l2b4_tcu_mbist_scan_out :
2818 mbist_l2b5_n ? l2b5_tcu_mbist_scan_out :
2819 mbist_l2b6_n ? l2b6_tcu_mbist_scan_out :
2820 mbist_l2b7_n ? l2b7_tcu_mbist_scan_out :
2821 mbist_l2t0_n ? l2t0_tcu_mbist_scan_out :
2822 mbist_l2t1_n ? l2t1_tcu_mbist_scan_out :
2823 mbist_l2t2_n ? l2t2_tcu_mbist_scan_out :
2824 mbist_l2t3_n ? l2t3_tcu_mbist_scan_out :
2825 mbist_l2t4_n ? l2t4_tcu_mbist_scan_out :
2826 mbist_l2t5_n ? l2t5_tcu_mbist_scan_out :
2827 mbist_l2t6_n ? l2t6_tcu_mbist_scan_out :
2828 mbist_l2t7_n ? l2t7_tcu_mbist_scan_out :
2829 mbist_dmu_n ? dmu_tcu_mbist_scan_out :
2830 mbist_peu_n ? peu_tcu_mbist_scan_out :
2831 mbist_rdp_rdmc_n ? rdp_rdmc_mbist_scan_out :
2832 mbist_rtx_n ? rtx_mbist_scan_out :
2833 mbist_tds_tdmc_n ? tds_mbist_scan_out :
2834 1'b0;
2835
2836 //============================================================
2837 // Output Flops
2838 // These signals go into a synchronizer in other modules
2839 // So they need to be coming straight out from a flop
2840 //============================================================
2841 assign jtag_output_flops_din[36:0] = {
2842 jtag_dmo_enable_din,
2843 jtag_mt_enable_din,
2844 jtag_por_enable_din,
2845 rdp_mbist_clk_stop_din, rtx_mbist_clk_stop_din, tds_mbist_clk_stop_din,
2846 peu_mbist_clk_stop_din,
2847 dmu_mbist_clk_stop_din,
2848 l2t7_mbist_clk_stop_din, l2t6_mbist_clk_stop_din,
2849 l2t5_mbist_clk_stop_din, l2t4_mbist_clk_stop_din,
2850 l2t3_mbist_clk_stop_din, l2t2_mbist_clk_stop_din,
2851 l2t1_mbist_clk_stop_din, l2t0_mbist_clk_stop_din,
2852 l2b7_mbist_clk_stop_din, l2b6_mbist_clk_stop_din,
2853 l2b5_mbist_clk_stop_din, l2b4_mbist_clk_stop_din,
2854 l2b3_mbist_clk_stop_din, l2b2_mbist_clk_stop_din,
2855 l2b1_mbist_clk_stop_din, l2b0_mbist_clk_stop_din,
2856 mcu3_mbist_clk_stop_din, mcu2_mbist_clk_stop_din,
2857 mcu1_mbist_clk_stop_din, mcu0_mbist_clk_stop_din,
2858 soc0_mbist_clk_stop_din,
2859 tap_spc7_mb_clk_stop_din, tap_spc6_mb_clk_stop_din,
2860 tap_spc5_mb_clk_stop_din, tap_spc4_mb_clk_stop_din,
2861 tap_spc3_mb_clk_stop_din, tap_spc2_mb_clk_stop_din,
2862 tap_spc1_mb_clk_stop_din, tap_spc0_mb_clk_stop_din};
2863
2864
2865 tcu_jtag_ctl_msff_ctl_macro__width_37 jtag_output_flops_reg (
2866 .scan_in ( jtag_output_flops_reg_scanin ),
2867 .scan_out ( jtag_output_flops_reg_scanout ),
2868 .l1clk ( l1tck ),
2869 .din ( jtag_output_flops_din[36:0] ),
2870 .dout ( jtag_output_flops[36:0] ),
2871 .siclk(siclk),
2872 .soclk(soclk));
2873
2874 assign {
2875 //jtag_dmo_enable, // TLR ECO
2876 //jtag_mt_enable, // TLR ECO
2877 //jtag_por_enable, // TLR ECO
2878 rdp_mbist_clk_stop, rtx_mbist_clk_stop, tds_mbist_clk_stop,
2879 peu_mbist_clk_stop,
2880 dmu_mbist_clk_stop,
2881 l2t7_mbist_clk_stop, l2t6_mbist_clk_stop,
2882 l2t5_mbist_clk_stop, l2t4_mbist_clk_stop,
2883 l2t3_mbist_clk_stop, l2t2_mbist_clk_stop,
2884 l2t1_mbist_clk_stop, l2t0_mbist_clk_stop,
2885 l2b7_mbist_clk_stop, l2b6_mbist_clk_stop,
2886 l2b5_mbist_clk_stop, l2b4_mbist_clk_stop,
2887 l2b3_mbist_clk_stop, l2b2_mbist_clk_stop,
2888 l2b1_mbist_clk_stop, l2b0_mbist_clk_stop,
2889 mcu3_mbist_clk_stop, mcu2_mbist_clk_stop,
2890 mcu1_mbist_clk_stop, mcu0_mbist_clk_stop,
2891 soc0_mbist_clk_stop,
2892 tap_spc7_mb_clk_stop, tap_spc6_mb_clk_stop,
2893 tap_spc5_mb_clk_stop, tap_spc4_mb_clk_stop,
2894 tap_spc3_mb_clk_stop, tap_spc2_mb_clk_stop,
2895 //tap_spc1_mb_clk_stop, tap_spc0_mb_clk_stop} = tlr_state ? 37'h0 : jtag_output_flops[36:0];
2896 //tap_spc1_mb_clk_stop, tap_spc0_mb_clk_stop} = tstmode_not_tlr ? jtag_output_flops[36:0] : 37'h0; // TLR ECO
2897 tap_spc1_mb_clk_stop, tap_spc0_mb_clk_stop} = tstmode_not_tlr ? jtag_output_flops[33:0] : 34'h0; // TLR ECO
2898
2899 assign jtag_dmo_enable = jtag_output_flops[36]; // TLR ECO
2900 assign jtag_mt_enable = jtag_output_flops[35]; // TLR ECO
2901 assign jtag_por_enable = jtag_output_flops[34]; // TLR ECO
2902
2903 assign tstmode_not_tlr = pin_scanmode | ~tlr_state;
2904
2905 //==============================================================================
2906 //
2907 // Added on 20050328
2908 // Added LBIST Registers
2909 //==============================================================================
2910 //==============================================================================
2911 // LBIST Bypass Shift Registers
2912 // 8-bit shifting register to hold the value shifted in during Shift-DR
2913 // 1 means bypass
2914 // Default to 0 (NOT Bypass)
2915 //==============================================================================
2916
2917 tcu_jtag_ctl_msff_ctl_macro__width_8 tap_lbist_bypass_shift_reg
2918 (
2919 .scan_in ( tap_lbist_bypass_shift_reg_scanin ),
2920 .scan_out ( tap_lbist_bypass_shift_reg_scanout ),
2921 .l1clk ( l1tck ),
2922 .din ( next_new_lbist_bypass[`NUM_TOTAL_LBIST-1:0] ),
2923 .dout ( new_lbist_bypass[`NUM_TOTAL_LBIST-1:0] ),
2924 .siclk(siclk),
2925 .soclk(soclk));
2926
2927 assign next_new_lbist_bypass = (instr_lbist_bypass & shift_dr_state) ? {io_tdi, new_lbist_bypass[`NUM_TOTAL_LBIST-1:1]}
2928 : (instr_lbist_bypass & capture_dr_state) ? lbist_bypass
2929 : new_lbist_bypass;
2930
2931 //==============================================================================
2932 // LBIST Bypass Update Registers
2933 // This Update Register gets the value of the shift register during Update-DR
2934 //==============================================================================
2935 tcu_jtag_ctl_msff_ctl_macro__width_8 tap_lbist_bypass_upd_reg
2936 (
2937 .scan_in ( tap_lbist_bypass_upd_reg_scanin ),
2938 .scan_out ( tap_lbist_bypass_upd_reg_scanout ),
2939 .l1clk ( l1tck ), // tck_l
2940 .din ( next_lbist_bypass[`NUM_TOTAL_LBIST-1:0] ),
2941 .dout ( lbist_bypass_q[`NUM_TOTAL_LBIST-1:0] ),
2942 .siclk(siclk),
2943 .soclk(soclk));
2944
2945 assign next_lbist_bypass = (instr_lbist_bypass & update_dr_state) ?
2946 new_lbist_bypass :
2947 ucb_wr_lbist_bypass ? ucb_data_out[7:0] :
2948 tlr_state ? {`NUM_TOTAL_LBIST{1'b0}} : lbist_bypass;
2949 assign lbist_bypass[`NUM_TOTAL_LBIST-1:0] = lbist_bypass_q[`NUM_TOTAL_LBIST-1:0] & {`NUM_TOTAL_LBIST{~tlr_state}};
2950 //==============================================================================
2951 // LBIST Mode Register
2952 //==============================================================================
2953 // - no capture, only shift (contents gated by mbist_start); needs trst_l
2954 // dual bits to store diag/serial bits until cleared by TAP_MBIST_ABORT/TLR
2955 tcu_jtag_ctl_msff_ctl_macro__width_2 tap_lbist_mode_reg
2956 (
2957 .scan_in ( tap_lbist_mode_reg_scanin ),
2958 .scan_out ( tap_lbist_mode_reg_scanout ),
2959 .l1clk ( l1tck ),
2960 .din ( next_lbist_mode[1:0] ),
2961 .dout ( lbist_mode[1:0] ),
2962 .siclk(siclk),
2963 .soclk(soclk));
2964
2965 assign next_lbist_mode[1:0] = (instr_lbist_mode & shift_dr_state) ?
2966 {io_tdi, lbist_mode[1]} :
2967 ucb_wr_lbist_mode ? ucb_data_out[1:0] :
2968 (instr_lbist_abort | tlr_state) ?
2969 2'b00 :
2970 lbist_mode;
2971
2972 assign tcu_spc_lbist_pgm = lbist_mode[1] & ~tlr_state;
2973
2974 //==============================================================================
2975 // LBIST Done Register
2976 //==============================================================================
2977 // No update, capture/shift only
2978 // If MBIST GETDONE instruction active, captures 66 done status bits from the mbist engines
2979 // If MBIST GETFAIL instruction active, captures 66 fail status bits from the mbist engines
2980 // - this register is shared by the TAP_MBIST_GETDONE and TAP_MBIST_GETFAIL instructions
2981 // - capture into shift reg only for getdone/getfail
2982 // does not need trst_l
2983
2984 tcu_jtag_ctl_msff_ctl_macro__width_8 tap_lbist_done_reg
2985 (
2986 .scan_in ( tap_lbist_done_reg_scanin ),
2987 .scan_out ( tap_lbist_done_reg_scanout ),
2988 .l1clk ( l1tck ),
2989 .din ( next_lbist_done[`NUM_TOTAL_LBIST-1:0] ),
2990 .dout ( lbist_done[`NUM_TOTAL_LBIST-1:0] ),
2991 .siclk(siclk),
2992 .soclk(soclk));
2993
2994 assign next_lbist_done = (instr_lbist_getdone & shift_dr_state) ?
2995 {io_tdi, lbist_done[`NUM_TOTAL_LBIST-1:1]} :
2996 (instr_lbist_getdone & capture_dr_state) ?
2997 lb_tcu_done_d :
2998 lbist_done;
2999
3000 //==============================================================================
3001 // LBIST Start Signal
3002 //==============================================================================
3003 // single bit to store start signal until cleared by TAP_MBIST_ABORT/TLR
3004 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_lbist_start_reg
3005 (
3006 .scan_in ( tap_lbist_start_reg_scanin ),
3007 .scan_out ( tap_lbist_start_reg_scanout ),
3008 .l1clk ( l1tck ),
3009 .din ( next_lbist_start ),
3010 .dout ( lbist_start_q ),
3011 .siclk(siclk),
3012 .soclk(soclk));
3013 assign lbist_start = lbist_start_q & ~tlr_state;
3014 assign next_lbist_start = (instr_lbist_start & rti_state) ?
3015 1'b1 :
3016 (instr_lbist_abort | tlr_state) ?
3017 1'b0 :
3018 lbist_start;
3019
3020 //==============================================================================
3021 // LBIST Access Scanning
3022 //==============================================================================
3023 assign lbist_shiftdr = instr_lbist_access & shift_dr_state;
3024
3025 tcu_jtag_ctl_msff_ctl_macro__width_1 lbist_ascan_en_reg
3026 (
3027 .scan_in (tap_lbist_a_scan_en_reg_scanin),
3028 .scan_out (tap_lbist_a_scan_en_reg_scanout_unused),
3029 .l1clk (tck_l),
3030 .din (lbist_shiftdr),
3031 .dout (lbist_a_scan_en_q),
3032 .siclk(siclk),
3033 .soclk(soclk)
3034 );
3035 assign lbist_a_scan_en = lbist_a_scan_en_q & ~tlr_state;
3036 tcu_jtag_ctl_msff_ctl_macro__width_1 lbist_bscan_en_reg
3037 (
3038 .scan_in (tap_lbist_b_scan_en_reg_scanin),
3039 .scan_out (tap_lbist_b_scan_en_reg_scanout),
3040 .l1clk (l1tck),
3041 .din (lbist_shiftdr),
3042 .dout (lbist_b_scan_en_q),
3043 .siclk(siclk),
3044 .soclk(soclk)
3045 );
3046 assign lbist_b_scan_en = lbist_b_scan_en_q & ~tlr_state;
3047
3048 assign lbist_scan_en_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{(lbist_a_scan_en | lbist_b_scan_en)}};
3049
3050 assign lbist_a_scan_en_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{lbist_a_scan_en}};
3051 assign lbist_b_scan_en_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{lbist_b_scan_en}};
3052 assign lbist_b_scan_en_q_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{lbist_b_scan_en_q}}; // TLR ECO
3053 assign clock_chop_aclk_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{clock_chop_aclk}};
3054 assign clock_chop_bclk_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{clock_chop_bclk}};
3055 assign soclk_off_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{soclk_off}};
3056 assign instr_lbist_access_8[`NUM_TOTAL_LBIST-1:0] = {`NUM_TOTAL_LBIST{instr_lbist_access}};
3057
3058 assign lbist_spc[`NUM_TOTAL_LBIST-1:0] = ~lbist_bypass;
3059 assign spc_lb_aclk[`NUM_TOTAL_LBIST-1:0] = lbist_spc & lbist_a_scan_en_8 & clock_chop_aclk_8;
3060 // TLR ECO
3061 //assign spc_lb_bclk[`NUM_TOTAL_LBIST-1:0] = lbist_spc &
3062 // ((lbist_b_scan_en_8 & clock_chop_bclk_8) |
3063 // (~lbist_b_scan_en_8 & instr_lbist_access_8 & soclk_off_8));
3064 assign spc_lb_bclk[`NUM_TOTAL_LBIST-1:0] = lbist_spc &
3065 ((lbist_b_scan_en_8 & clock_chop_bclk_8) |
3066 (~lbist_b_scan_en_q_8 & instr_lbist_access_8 & soclk_off_8));
3067 assign spc_lb_scan_en[`NUM_TOTAL_LBIST-1:0] = lbist_spc & lbist_scan_en_8;
3068 assign spc_lb_clk_stop[`NUM_TOTAL_LBIST-1:0] = lbist_spc & instr_lbist_access_8;
3069
3070
3071 //********************************************************************
3072 // CREG Logic: based on Niagara logic
3073 //********************************************************************
3074
3075 //********************************************************************
3076 // - generate enables to creg block
3077 //********************************************************************
3078 assign next_jtag_creg_addr_en = update_dr_state & creg_addr_instr;
3079
3080 assign next_jtag_creg_wr_en = instr_ncu_wr
3081 | (update_dr_state & ( instr_ncu_wdata | instr_ncu_waddr));
3082
3083 assign next_jtag_creg_rd_en = instr_ncu_rd | (update_dr_state & instr_ncu_raddr);
3084
3085 assign next_jtag_creg_data_en = update_dr_state & creg_wdata_instr;
3086
3087 //********************************************************************
3088 // CREG Address
3089 //********************************************************************
3090 // Shift register only, no capture
3091 // Update register is in tcu_ucb_ctl block in TCU
3092
3093 // this is the SHIFT register
3094 tcu_jtag_ctl_msff_ctl_macro__width_40 tap_cregaddr_shift_reg
3095 (
3096 .scan_in (tap_cregaddr_shift_reg_scanin),
3097 .scan_out (tap_cregaddr_shift_reg_scanout),
3098 .l1clk (l1tck),
3099 .din (next_creg_addr[39:0]),
3100 .dout (creg_addr[39:0]),
3101 .siclk(siclk),
3102 .soclk(soclk)
3103 );
3104
3105 assign creg_addr_instr = instr_creg_addr
3106 | instr_ncu_waddr
3107 | instr_ncu_raddr;
3108
3109 // TLR ECO
3110 //assign next_creg_addr[39:0] = tlr_state ? 40'h0 : (creg_addr_instr & shift_dr_state) ? {io_tdi, creg_addr[39:1]}
3111 // : creg_addr[39:0];
3112 assign next_creg_addr[39:0] = ({40{(creg_addr_instr & shift_dr_state)}} & {io_tdi, creg_addr[39:1]}) |
3113 ({40{(~tlr_state & ~(creg_addr_instr & shift_dr_state))}} & creg_addr[39:0]);
3114
3115 assign jtag_creg_addr = creg_addr[39:0];
3116
3117 //********************************************************************
3118 // CREG Write Data
3119 //********************************************************************
3120 // Shift register only, no capture
3121 // Update register is in tcu_ucb_ctl block in TCU
3122
3123 // this is the SHIFT register
3124 tcu_jtag_ctl_msff_ctl_macro__width_64 tap_cregwdata_shift_reg
3125 (
3126 .scan_in (tap_cregwdata_reg_scanin),
3127 .scan_out (tap_cregwdata_reg_scanout),
3128 .l1clk (l1tck),
3129 .din (next_creg_wdata[63:0]),
3130 .dout (creg_wdata[63:0]),
3131 .siclk(siclk),
3132 .soclk(soclk)
3133 );
3134
3135 assign creg_wdata_instr = instr_creg_wdata | instr_ncu_wdata;
3136
3137 // TLR ECO
3138 //assign next_creg_wdata[63:0] = tlr_state ? 64'h0 : (creg_wdata_instr & shift_dr_state) ? {io_tdi, creg_wdata[63:1]}
3139 // : creg_wdata[63:0];
3140 assign next_creg_wdata[63:0] = ({64{(creg_wdata_instr & shift_dr_state)}} & {io_tdi, creg_wdata[63:1]}) |
3141 ({64{~(creg_wdata_instr & shift_dr_state) & ~tlr_state}} & creg_wdata[63:0]);
3142
3143
3144 assign jtag_creg_data = creg_wdata[63:0];
3145
3146 //********************************************************************
3147 // CREG Read Return
3148 //********************************************************************
3149 // Shift register, with capture - data comes from tcu_ucb_ctl block in TCU
3150 // Handshake with creg
3151 // - load_l is generated on rising edge on ucb_jtag_data_rdy
3152 // - load delayed by one provides the output handshake to ctu_creg
3153
3154 // capture condition
3155 assign creg_rdrtrn_load = ucb_jtag_data_rdy_sync & ~ucb_jtag_data_rdy_d2;
3156
3157 assign jtag_ucb_data_ack = creg_rdrtrn_load_d1 & ~tlr_state;
3158
3159 // shift condition: start shifting out read data once it is valid
3160 assign creg_rdrtrn_shift = instr_creg_rdata & shift_dr_state & creg_rdrtrn_vld;
3161
3162 // this is the SHIFT register
3163 tcu_jtag_ctl_msff_ctl_macro__width_65 tap_cregrdrtrn_shift_reg
3164 (
3165 .scan_in (tap_cregrdrtrn_reg_scanin),
3166 .scan_out (tap_cregrdrtrn_reg_scanout),
3167 .l1clk (l1tck),
3168 .din (next_creg_rdrtrn[64:0]),
3169 .dout (creg_rdrtrn[64:0]),
3170 .siclk(siclk),
3171 .soclk(soclk)
3172 );
3173
3174 // TLR ECO
3175 //assign next_creg_rdrtrn[64:0] = tlr_state ? 65'h0 : creg_rdrtrn_shift ? {io_tdi, creg_rdrtrn[64:1]}
3176 // : creg_rdrtrn_load ? {ucb_data_out[63:0], 1'b1}
3177 // : creg_rdrtrn[64:0];
3178
3179 assign next_creg_rdrtrn[64:0] = ({65{creg_rdrtrn_shift}} & {io_tdi, creg_rdrtrn[64:1]}) |
3180 ({65{~creg_rdrtrn_shift & creg_rdrtrn_load & ~tlr_state}} & {ucb_data_out[63:0], 1'b1}) |
3181 ({65{~creg_rdrtrn_shift & ~creg_rdrtrn_load & ~tlr_state}} & creg_rdrtrn[64:0]);
3182
3183
3184 // set when load data into read-return_reg
3185 assign clear_creg_rdrtrn_vld = (instr_ncu_rd & ~instr_ncu_rd_d1)
3186 | (instr_ncu_raddr & ~instr_ncu_raddr_d1);
3187 assign next_creg_rdrtrn_vld = tlr_state ? 1'b0 :
3188 (creg_rdrtrn_load | (creg_rdrtrn_vld & ~clear_creg_rdrtrn_vld));
3189
3190 assign creg_rdrtrn_out = creg_rdrtrn[0] & creg_rdrtrn_vld;
3191
3192 //********************************************************************
3193 // Scratch Register
3194 //********************************************************************
3195 // Shift register, with capture - data comes from tcu_ucb_ctl block in TCU
3196
3197 // this is the SHIFT register
3198 //msff_ctl_macro tap_cregscratch_reg (width=64)
3199 //(
3200 //.scan_in (tap_cregscratch_reg_scanin),
3201 //.scan_out (tap_cregscratch_reg_scanout),
3202 //.l1clk (l1tck),
3203 //.din (next_creg_scratch[63:0]),
3204 //.dout (creg_scratch[63:0])
3205 //);
3206
3207 //assign next_creg_scratch[63:0] = (instr_creg_scratch & shift_dr_state) ? {io_tdi, creg_scratch[63:1]}
3208 //: (instr_creg_scratch & capture_dr_state) ? {creg_jtag_scratch_data}
3209 //: creg_scratch[63:0];
3210
3211 //********************************************************************
3212 // Flops for Various CREG Support Signals
3213 //********************************************************************
3214 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_addr_en_reg
3215 (
3216 .scan_in (tap_cregaddren_reg_scanin),
3217 .scan_out (tap_cregaddren_reg_scanout),
3218 .l1clk (l1tck),
3219 .din (next_jtag_creg_addr_en),
3220 .dout (jtag_creg_addr_en_q),
3221 .siclk(siclk),
3222 .soclk(soclk)
3223 );
3224 assign jtag_creg_addr_en = jtag_creg_addr_en_q; // TLR ECO // & ~tlr_state;
3225 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_wr_en_reg
3226 (
3227 .scan_in (tap_cregwren_reg_scanin),
3228 .scan_out (tap_cregwren_reg_scanout),
3229 .l1clk (l1tck),
3230 .din (next_jtag_creg_wr_en),
3231 .dout (jtag_creg_wr_en_q),
3232 .siclk(siclk),
3233 .soclk(soclk)
3234 );
3235 assign jtag_creg_wr_en = jtag_creg_wr_en_q; // TLR ECO // & ~tlr_state;
3236 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_rd_en_reg
3237 (
3238 .scan_in (tap_cregrden_reg_scanin),
3239 .scan_out (tap_cregrden_reg_scanout),
3240 .l1clk (l1tck),
3241 .din (next_jtag_creg_rd_en),
3242 .dout (jtag_creg_rd_en_q),
3243 .siclk(siclk),
3244 .soclk(soclk)
3245 );
3246 assign jtag_creg_rd_en = jtag_creg_rd_en_q; // TLR ECO // & ~tlr_state;
3247 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_data_en_reg
3248 (
3249 .scan_in (tap_cregdataen_reg_scanin),
3250 .scan_out (tap_cregdataen_reg_scanout),
3251 .l1clk (l1tck),
3252 .din (next_jtag_creg_data_en),
3253 .dout (jtag_creg_data_en_q),
3254 .siclk(siclk),
3255 .soclk(soclk)
3256 );
3257 assign jtag_creg_data_en = jtag_creg_data_en_q; // TLR ECO // & ~tlr_state;
3258 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_rdrtrn_vld_reg
3259 (
3260 .scan_in (tap_cregrdrtrnvld_reg_scanin),
3261 .scan_out (tap_cregrdrtrnvld_reg_scanout),
3262 .l1clk (l1tck),
3263 .din (next_creg_rdrtrn_vld),
3264 .dout (creg_rdrtrn_vld),
3265 .siclk(siclk),
3266 .soclk(soclk)
3267 );
3268 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_ucb_jtag_data_rdy_d_reg
3269 (
3270 .scan_in (tap_ucb_jtag_data_rdy_d_reg_scanin),
3271 .scan_out (tap_ucb_jtag_data_rdy_d_reg_scanout),
3272 .l1clk (l1tck),
3273 .din (ucb_jtag_data_rdy_sync),
3274 .dout (ucb_jtag_data_rdy_d),
3275 .siclk(siclk),
3276 .soclk(soclk)
3277 );
3278 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_ucb_jtag_data_rdy_d2_reg
3279 (
3280 .scan_in (tap_ucb_jtag_data_rdy_d2_reg_scanin),
3281 .scan_out (tap_ucb_jtag_data_rdy_d2_reg_scanout),
3282 .l1clk (l1tck),
3283 .din (ucb_jtag_data_rdy_d),
3284 .dout (ucb_jtag_data_rdy_d2),
3285 .siclk(siclk),
3286 .soclk(soclk)
3287 );
3288 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_creg_rdrtrn_load_reg
3289 (
3290 .scan_in (tap_cregrdrtrnload_reg_scanin),
3291 .scan_out (tap_cregrdrtrnload_reg_scanout),
3292 .l1clk (l1tck),
3293 .din (creg_rdrtrn_load),
3294 .dout (creg_rdrtrn_load_d1),
3295 .siclk(siclk),
3296 .soclk(soclk)
3297 );
3298 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_ncu_rd_reg
3299 (
3300 .scan_in (tap_ncurd_reg_scanin),
3301 .scan_out (tap_ncurd_reg_scanout),
3302 .l1clk (l1tck),
3303 .din (instr_ncu_rd),
3304 .dout (instr_ncu_rd_d1),
3305 .siclk(siclk),
3306 .soclk(soclk)
3307 );
3308 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_ncu_raddr_reg
3309 (
3310 .scan_in (tap_ncuraddr_reg_scanin),
3311 .scan_out (tap_ncuraddr_reg_scanout),
3312 .l1clk (l1tck),
3313 .din (instr_ncu_raddr),
3314 .dout (instr_ncu_raddr_d1),
3315 .siclk(siclk),
3316 .soclk(soclk)
3317 );
3318
3319 //********************************************************************
3320 // Core Shadow Scan Logic: SHSCAN
3321 //********************************************************************
3322 // This places the core shadow scan chains between TDI & TDO
3323 // It is for shifting only, no need to capture or update since we use clock_stop
3324 // to the header to control activity.
3325 // To use: 1. program tap_spcthrx_shscan with x=thread id to capture in all cores
3326 // 2. shift data out TDO; unavailable cores will be skipped
3327 // The logic below first stops the clock to the core shadow scans
3328 // then it puts soclk "high" to turn off slave (assumes clock stops low)
3329 // then it activates scan_en (shiftDR)
3330 // then it sends siclk & soclk via chopped TCK to the core shadow scans
3331 // Scan is destructive; to program the core shadow scans you must scan in valid data, then
3332 // reverse the above: put soclk "high", turn off scan_en, then turn off stop
3333
3334 // To control timing and put distance between clk_stop changing and shscan_bclk changing,
3335 // restrict sequence through tap states to 6-2-1-3-0-5; i.e., make transition directly from
3336 // state 1 (exit1DR) to state 5 (updDR) illegal; this allows shscan_bclk to be turned off
3337 // in state 0(ex2dr) and still separates it from clk_stop changing in state 5
3338 // - this only applies to shadow scan operations; mbist is not affected. This is needed to
3339 // allow shadow scan to cycle through capDR/ShiftDR repeatedly, so we need clk_stop off
3340 // during capDR to allow the capture to occur. Since state 7 always occurs before state 6,
3341 // we use state 7 as the last time clk_stop is off before clk_stop is activated in state 6,
3342 // so capture actually occurs as clk_stop is activated entering state 6.
3343
3344 // General Core Shadow Scan logic
3345 assign spcshscan_shiftdr = instr_spc_shscan & shift_dr_state;
3346 tcu_jtag_ctl_msff_ctl_macro__width_1 spcshscan_ascan_en_reg
3347 (
3348 .scan_in (spcshscan_a_scan_en_reg_scanin),
3349 .scan_out (spcshscan_a_scan_en_reg_scanout_unused),
3350 .l1clk (tck_l),
3351 .din (spcshscan_shiftdr),
3352 .dout (spcshscan_a_scan_en_q),
3353 .siclk(siclk),
3354 .soclk(soclk)
3355 );
3356 assign spcshscan_a_scan_en = spcshscan_a_scan_en_q & ~tlr_state;
3357 tcu_jtag_ctl_msff_ctl_macro__width_1 spcshscan_bscan_en_reg
3358 (
3359 .scan_in (spcshscan_b_scan_en_reg_scanin),
3360 .scan_out (spcshscan_b_scan_en_reg_scanout),
3361 .l1clk (l1tck),
3362 .din (spcshscan_shiftdr),
3363 .dout (spcshscan_b_scan_en_q),
3364 .siclk(siclk),
3365 .soclk(soclk)
3366 );
3367 assign spcshscan_b_scan_en = spcshscan_b_scan_en_q & ~tlr_state;
3368 assign spcshscan_scan_en = spcshscan_a_scan_en | spcshscan_b_scan_en;
3369
3370 //assign mbi_spc0 = ~(&mbibypass[2:0]); // |mbibypass[2:0];
3371 assign spc_shscan_aclk = (instr_spc_shscan & spcshscan_a_scan_en) ? clock_chop_aclk : 1'b0;
3372 // TLR ECO
3373 //assign spc_shscan_bclk = (instr_spc_shscan & spcshscan_b_scan_en) ? ~clock_chop_bclk
3374 // : (instr_spc_shscan & soclk_off & ~ex2_dr_state & ~update_dr_state) ? 1'b1
3375 // : 1'b0;
3376 assign spc_shscan_bclk = (instr_spc_shscan & spcshscan_b_scan_en & ~clock_chop_bclk) |
3377 (~spcshscan_b_scan_en_q & instr_spc_shscan & soclk_off & ~ex2_dr_state & ~update_dr_state);
3378
3379 //assign spc_shscan_pce_ov = instr_spc_shscan & capture_dr_state;
3380 //assign spc_shscan_clk_stop = instr_spc_shscan;
3381 assign spc_shscan_pce_ov = instr_spc_shscan; // & capture_dr_state;
3382 assign spc_shscan_clk_stop = instr_spc_shscan & (capture_dr_state | shift_dr_state
3383 | ex1_dr_state | pause_dr_state | ex2_dr_state
3384 | update_dr_state);
3385
3386 assign tcu_spc_shscan_aclk = pin_scanmode ? siclk : (flush | spc_shscan_aclk | jt_scan_aclk);
3387 assign tcu_spc_shscan_bclk = pin_scanmode ? soclk : (spc_shscan_bclk | jt_scan_bclk);
3388 assign jtag_spc_shscan_pce_ov = pin_scanmode ? 1'b0 : spc_shscan_pce_ov;
3389 assign tcu_spc_shscan_clk_stop_ps = pin_scanmode ? 1'b0 : spc_shscan_clk_stop;
3390 assign tcu_spc_shscan_scan_en = pin_scanmode ? pin_scan_en : (flush_dly | spcshscan_scan_en | jt_scan_en);
3391 assign jtag_spc_shscanid[2:0] = {3{instr_spc_shscan}} & instr[2:0];
3392
3393 assign jtag_spc0_shscan_clk_stop = (spc0_clk_stop | tcu_spc_shscan_clk_stop_ps);
3394 assign jtag_spc1_shscan_clk_stop = (spc1_clk_stop | tcu_spc_shscan_clk_stop_ps);
3395 assign jtag_spc2_shscan_clk_stop = (spc2_clk_stop | tcu_spc_shscan_clk_stop_ps);
3396 assign jtag_spc3_shscan_clk_stop = (spc3_clk_stop | tcu_spc_shscan_clk_stop_ps);
3397 assign jtag_spc4_shscan_clk_stop = (spc4_clk_stop | tcu_spc_shscan_clk_stop_ps);
3398 assign jtag_spc5_shscan_clk_stop = (spc5_clk_stop | tcu_spc_shscan_clk_stop_ps);
3399 assign jtag_spc6_shscan_clk_stop = (spc6_clk_stop | tcu_spc_shscan_clk_stop_ps);
3400 assign jtag_spc7_shscan_clk_stop = (spc7_clk_stop | tcu_spc_shscan_clk_stop_ps);
3401
3402 //================================================================================
3403 //
3404 // Added on 20041119
3405 // Added L2T Shadow Scan Signals
3406 //================================================================================
3407 // General Core Shadow Scan logic
3408 assign l2tshscan_shiftdr = instr_l2t_shscan & shift_dr_state;
3409
3410 tcu_jtag_ctl_msff_ctl_macro__width_1 l2tshscan_ascan_en_reg
3411 (
3412 .scan_in (l2tshscan_a_scan_en_reg_scanin),
3413 .scan_out (l2tshscan_a_scan_en_reg_scanout_unused), // Floating
3414 .l1clk (tck_l),
3415 .din (l2tshscan_shiftdr),
3416 .dout (l2tshscan_a_scan_en_q),
3417 .siclk(siclk),
3418 .soclk(soclk)
3419 );
3420 assign l2tshscan_a_scan_en = l2tshscan_a_scan_en_q & ~tlr_state;
3421 tcu_jtag_ctl_msff_ctl_macro__width_1 l2tshscan_bscan_en_reg
3422 (
3423 .scan_in (l2tshscan_b_scan_en_reg_scanin),
3424 .scan_out (l2tshscan_b_scan_en_reg_scanout),
3425 .l1clk (l1tck),
3426 .din (l2tshscan_shiftdr),
3427 .dout (l2tshscan_b_scan_en_q),
3428 .siclk(siclk),
3429 .soclk(soclk)
3430 );
3431 assign l2tshscan_b_scan_en = l2tshscan_b_scan_en_q & ~tlr_state;
3432
3433 assign l2tshscan_scan_en = l2tshscan_a_scan_en | l2tshscan_b_scan_en;
3434
3435 assign l2t_shscan_aclk = (instr_l2t_shscan & l2tshscan_a_scan_en) ? clock_chop_aclk : 1'b0;
3436 // TLR ECO
3437 //assign l2t_shscan_bclk = (instr_l2t_shscan & l2tshscan_b_scan_en) ? ~clock_chop_bclk
3438 // : (instr_l2t_shscan & soclk_off & ~ex2_dr_state & ~update_dr_state) ? 1'b1
3439 // : 1'b0;
3440 assign l2t_shscan_bclk = (instr_l2t_shscan & l2tshscan_b_scan_en & ~clock_chop_bclk) |
3441 (~l2tshscan_b_scan_en_q & instr_l2t_shscan & soclk_off & ~ex2_dr_state & ~update_dr_state);
3442 assign l2t_shscan_pce_ov = instr_l2t_shscan; // & capture_dr_state;
3443 assign l2t_shscan_clk_stop = instr_l2t_shscan & (capture_dr_state | shift_dr_state
3444 | ex1_dr_state | pause_dr_state | ex2_dr_state
3445 | update_dr_state);
3446
3447 assign tcu_l2t_shscan_aclk = pin_scanmode ? siclk : (flush | l2t_shscan_aclk | jt_scan_aclk);
3448 assign tcu_l2t_shscan_bclk = pin_scanmode ? soclk : (l2t_shscan_bclk | jt_scan_bclk);
3449 assign jtag_l2t_shscan_pce_ov = pin_scanmode ? 1'b0 : l2t_shscan_pce_ov;
3450 assign tcu_l2t_shscan_clk_stop_ps = pin_scanmode ? 1'b0 : l2t_shscan_clk_stop;
3451 assign tcu_l2t_shscan_scan_en = pin_scanmode ? pin_scan_en : (flush_dly | l2tshscan_scan_en | jt_scan_en);
3452
3453 assign jtag_l2t0_shscan_clk_stop = (l2t0_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3454 assign jtag_l2t1_shscan_clk_stop = (l2t1_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3455 assign jtag_l2t2_shscan_clk_stop = (l2t2_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3456 assign jtag_l2t3_shscan_clk_stop = (l2t3_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3457 assign jtag_l2t4_shscan_clk_stop = (l2t4_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3458 assign jtag_l2t5_shscan_clk_stop = (l2t5_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3459 assign jtag_l2t6_shscan_clk_stop = (l2t6_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3460 assign jtag_l2t7_shscan_clk_stop = (l2t7_clk_stop | tcu_l2t_shscan_clk_stop_ps);
3461
3462
3463 // Send TDI to each core shadow scan via tcu_sigmux_ctl
3464 assign tap_spc0_shscan_scan_out = io_tdi;
3465 // Receive spc7 shscan scan out, to TDO
3466 assign spcshscan_scan_out = instr_spc_shscan ? spc7_tap_shscan_scan_in : 1'b0;
3467
3468 assign l2tshscan_scan_out = instr_l2t_shscan ? l2t7_tcu_shscan_scan_out : 1'b0;
3469
3470
3471 //********************************************************************
3472 // Clock Stop - Supports Scan Dump, Debug
3473 //********************************************************************
3474 // - no shift or update regs involved
3475 // Flop set with TAP_CLOCK_HSTOP or _SSTOP, reset with TAP_CLOCK_START
3476 tcu_jtag_ctl_msff_ctl_macro__clr_1__width_1 tap_jtagclkstop_reg
3477 (
3478 .scan_in(tap_jtagclkstop_reg_scanin),
3479 .scan_out(tap_jtagclkstop_reg_scanout),
3480 .l1clk (l1tck),
3481 .clr (clear_jtag_clk_stop),
3482 .din (next_jtag_clk_stop),
3483 .dout (jtag_clk_stop),
3484 .siclk(siclk),
3485 .soclk(soclk)
3486 );
3487 assign clear_jtag_clk_stop = instr_clock_start | tlr_state;
3488 assign sstop_ready = |spc_ss_sel[7:0];
3489 assign next_jtag_clk_stop = (instr_clock_hstop | (instr_clock_sstop & sstop_ready)) ? 1'b1
3490 : jtag_clk_stop;
3491 assign jtag_clk_stop_req = jtag_clk_stop ; // TLR ECO //& ~tlr_state;
3492 // jtagclkstop_ov comes from cycle-step debug logic and turns off jtag_clk_stop while in
3493 // cycle step mode and cycle counter is running
3494 //assign instr_sstop_csmode = !tlr_state && (instr_clock_sstop | instr_cs_mode); // TLR ECO
3495 assign instr_sstop_csmode_din = (instr_clock_sstop | instr_cs_mode); // TLR ECO
3496
3497 // Use this to turn on clocks while stopped during a debug event
3498 // It should turn off the debug event that is active, thus restarting clocks
3499 assign jtag_clock_start = instr_clock_start; // & rti_state;
3500
3501 //********************************************************************
3502 // GENERIC 32-bit Shift Register: Gate the output at the Update Register
3503 //********************************************************************
3504 // This is a generic 32-bit register
3505 // Capture into shift reg enabled
3506 // Used for Clock Domain; Debug Event Counter
3507
3508 // this is the SHIFT register
3509 tcu_jtag_ctl_msff_ctl_macro__width_32 tap_gen32_shift_reg
3510 (
3511 .scan_in (tap_gen32_shift_reg_scanin),
3512 .scan_out (tap_gen32_shift_reg_scanout),
3513 .l1clk (l1tck),
3514 .din (next_new_gen32[31:0]),
3515 .dout (new_gen32[31:0]),
3516 .siclk(siclk),
3517 .soclk(soclk)
3518 );
3519
3520 // TLR ECO
3521 //assign next_new_gen32[31:0] = tlr_state ? 32'h0 : (instr_gen32 & shift_dr_state) ? {io_tdi, new_gen32[31:1]}
3522 // : (instr_clock_domain & capture_dr_state) ? {8'b0,debug_reg_hs_domain[23:0]}
3523 // : (instr_de_count & capture_dr_state) ? {de_count[31:0]}
3524 // : new_gen32[31:0];
3525 assign next_new_gen32[31:0] = ({32{(instr_gen32 & shift_dr_state)}} & {io_tdi, new_gen32[31:1]}) |
3526 ({32{(instr_clock_domain & capture_dr_state)}} & {8'b0,debug_reg_hs_domain[23:0]}) |
3527 ({32{(~instr_clock_domain & instr_de_count & capture_dr_state)}} & {de_count[31:0]}) |
3528 ({32{~(instr_gen32 & shift_dr_state) & ~(instr_clock_domain & capture_dr_state) &
3529 ~(~instr_clock_domain & instr_de_count & capture_dr_state) & ~tlr_state}} & new_gen32[31:0]);
3530
3531 assign instr_gen32 = instr_clock_domain | instr_de_count;
3532 // TAP_CLOCK_DOMAIN: 24-bit reg to control starting point for clock stop/start
3533 assign debug_reg_hs_domain[23:0] = debug_reg_hard_stop_domain_1st[23:0]; // input from regs_ctl
3534 assign clock_domain[23:0] = new_gen32[23:0]; // output to regs_ctl
3535 assign clock_domain_upd = instr_clock_domain & update_dr_state; // output to regs_ctl
3536 // DEBUG_EVENT CNTR: 32-bit reg for counting debug event occurrences
3537 assign decnt_data[31:0] = new_gen32[31:0]; // output to regs_ctl
3538 assign decnt_upd = instr_de_count & update_dr_state; // output to regs_ctl
3539
3540 //********************************************************************
3541 // GENERIC 64-bit Shift Register: Gate the output at the Update Register
3542 //********************************************************************
3543 // This is a generic 64-bit register
3544 // Capture into shift reg enabled
3545 // Used for Cycle Counter; Core Run Status; DOSS Enable
3546
3547 // this is the SHIFT register
3548 tcu_jtag_ctl_msff_ctl_macro__width_64 tap_gen64_shift_reg
3549 (
3550 .scan_in (tap_gen64_shift_reg_scanin),
3551 .scan_out (tap_gen64_shift_reg_scanout),
3552 .l1clk (l1tck),
3553 .din (next_new_gen64[63:0]),
3554 .dout (new_gen64[63:0]),
3555 .siclk(siclk),
3556 .soclk(soclk)
3557 );
3558 // TLR ECO
3559 //assign next_new_gen64[63:0] = tlr_state ? 64'h0 : (instr_gen64 & shift_dr_state) ? {io_tdi, new_gen64[63:1]}
3560 // : (instr_cycle_count & capture_dr_state) ? {cycle_count[63:0]}
3561 // : (instr_core_run_stat & capture_dr_state) ? {spc_crs[63:0]}
3562 // : (instr_doss_enable & capture_dr_state) ? doss_enab[63:0]
3563 // : new_gen64[63:0];
3564
3565 assign next_new_gen64[63:0] = ({64{(instr_gen64 & shift_dr_state)}} & {io_tdi, new_gen64[63:1]}) |
3566 ({64{(instr_cycle_count & capture_dr_state)}} & {cycle_count[63:0]}) |
3567 ({64{(~instr_cycle_count & instr_core_run_stat & capture_dr_state)}} & {spc_crs[63:0]}) |
3568 ({64{(~instr_cycle_count & ~instr_core_run_stat & instr_doss_enable & capture_dr_state)}} & doss_enab[63:0]) |
3569 ({64{~(instr_gen64 & shift_dr_state) &
3570 ~(instr_cycle_count & capture_dr_state) &
3571 ~(~instr_cycle_count & instr_core_run_stat & capture_dr_state) &
3572 ~(~instr_cycle_count & ~instr_core_run_stat & instr_doss_enable & capture_dr_state) &
3573 ~tlr_state}} & new_gen64[63:0]);
3574
3575 assign instr_gen64 = instr_cycle_count | instr_core_run_stat | instr_doss_enable;
3576 // TAP_CYCLE_COUNT: 64-bit reg for counting cmp clock cycles for debug events
3577 assign cyc_count[63:0] = new_gen64[63:0]; // output to regs_ctl
3578 assign cyc_count_upd = instr_cycle_count & update_dr_state; // output to regs_ctl
3579 // CORE_RUN_STATUS: 64-bit reg - Read Only - gets core run status from cores via regs_ctl
3580 // DOSS_ENABLE: 64-bit reg for Disable Overlap or Single Step Enabling
3581 assign dossen = new_gen64[63:0]; // output to regs_ctl
3582 assign dossen_upd = instr_doss_enable & update_dr_state; // output to regs_ctl
3583
3584 //********************************************************************
3585 // JTAG Serial Scan Logic
3586 //********************************************************************
3587 // This places all 32 scan chains between TDI & TDO
3588 // It is for shifting only, no need to capture or update since we use clock_stop
3589 // to the header to control activity.
3590 // To use: 1. stop the clocks with TAP_CLOCK_HSTOP or TAP_CLOCK_SSTOP
3591 // 2. unload: shift data out TDO; unavailable cores will be skipped
3592 // 3. re-start clocks with TAP_CLOCK_START
3593 // The logic below first puts bclk (soclk) "high" to turn off slave (assumes clock stops low)
3594 // then it activates scan_en (shiftDR)
3595 // then it sends aclk(siclk) & bclk(soclk) via chopped TCK to the 32 scan chains
3596 // Scan is destructive; you must reload with desired data after unloading
3597
3598 // General JTAG Serial Scan logic
3599 assign serscan_shiftdr = jtag_ser_scan & shift_dr_state;
3600 tcu_jtag_ctl_msff_ctl_macro__width_1 serscan_ascan_en_reg
3601 (
3602 .scan_in (serscan_a_scan_en_reg_scanin),
3603 .scan_out (serscan_a_scan_en_reg_scanout_unused),
3604 .l1clk (tck_l),
3605 .din (serscan_shiftdr),
3606 .dout (serscan_a_scan_en_q),
3607 .siclk(siclk),
3608 .soclk(soclk)
3609 );
3610 assign serscan_a_scan_en = serscan_a_scan_en_q & ~tlr_state;
3611 tcu_jtag_ctl_msff_ctl_macro__width_1 serscan_bscan_en_reg
3612 (
3613 .scan_in (serscan_b_scan_en_reg_scanin),
3614 .scan_out (serscan_b_scan_en_reg_scanout),
3615 .l1clk (l1tck),
3616 .din (serscan_shiftdr),
3617 .dout (serscan_b_scan_en_q),
3618 .siclk(siclk),
3619 .soclk(soclk)
3620 );
3621 assign serscan_b_scan_en = serscan_b_scan_en_q & ~tlr_state;
3622 assign jt_scan_en = serscan_a_scan_en | serscan_b_scan_en;
3623
3624 assign jt_scan_aclk = serscan_a_scan_en ? clock_chop_aclk : 1'b0;
3625 assign jt_scan_bclk = serscan_b_scan_en ? ~clock_chop_bclk
3626 : (jtag_ser_scan & soclk_off) ? 1'b1
3627 : 1'b0;
3628 //assign jt_scan_pce_ov = instr_spc_shscan & capture_dr_state;
3629
3630 //********************************************************************
3631 // SIU Interface to Access L2
3632 //********************************************************************
3633 // Update register is in UCB_CTL, here is capture/shift only
3634 // Four Instructions:
3635 // TAP_L2_ADDR - fills 64-bit header which contains address for L2
3636 // TAP_L2_WRDATA - fills 64-bit data
3637 // TAP_L2_WR - writes data to L2 addr via SIU; pulses tcu_sii_vld coincident with bit 0
3638 // of both addr and data; shifts addr & data out lsb first
3639 // TAP_L2_RD - reads data from L2 addr via SIU; pulses tcu_sii_vld coincident with bit 0
3640 // of L2 addr to SIU, then waits until SIU returns data to shift register
3641 // This reg. is used for shifting both data and address, then updated into regs
3642 // in ucb_ctl; also this reg. captures data from sio for l2 reads
3643
3644 assign instr_l2access = instr_l2_addr | instr_l2_wrdata | instr_l2_rd;
3645
3646 // this is the SHIFT register; bit 0 used only to indicate valid data during READ
3647 tcu_jtag_ctl_msff_ctl_macro__width_65 tap_l2access_shift_reg
3648 (
3649 .scan_in (tap_l2access_shift_reg_scanin),
3650 .scan_out (tap_l2access_shift_reg_scanout),
3651 .l1clk (l1tck),
3652 .din (next_l2access[64:0]),
3653 .dout (l2access[64:0]),
3654 .siclk(siclk),
3655 .soclk(soclk)
3656 );
3657 assign next_l2access[64:0] = (instr_l2access & shift_dr_state) ? {io_tdi, l2access[64:1]}
3658 : l2data_cap ? {l2rddata[63:0],l2_read_vld}
3659 : tlr_state ? 65'b0
3660 : l2access[64:0];
3661
3662 assign l2data_upd = instr_l2_wrdata & update_dr_state; // must be synchronized in ucb_ctl
3663 assign l2addr_upd = instr_l2_addr & update_dr_state; // must be synchronized in ucb_ctl
3664 assign l2rti = (instr_l2_wr | instr_l2_rd) & rti_state; // must be synchronized in ucb_ctl
3665
3666 assign l2data_cap = instr_l2_rd & capture_dr_state;
3667
3668 //********************************************************************
3669 // Clock Stop Interval Delay
3670 //********************************************************************
3671 // Update register is in SIGMUX_CTL, here is capture/shift only
3672 // TAP_CLKSTOP_DELAY - fills 7-bit interval delay reg. in sigmux_ctl
3673
3674 // this is the SHIFT register
3675 tcu_jtag_ctl_msff_ctl_macro__width_7 tap_clkstopdly_shift_reg
3676 (
3677 .scan_in (tap_clkstopdly_shift_reg_scanin),
3678 .scan_out (tap_clkstopdly_shift_reg_scanout),
3679 .l1clk (l1tck),
3680 .din (next_clkstopdly[6:0]),
3681 .dout (clkstopdly[6:0]),
3682 .siclk(siclk),
3683 .soclk(soclk)
3684 );
3685 assign next_clkstopdly[6:0] = (instr_clkstopdly & shift_dr_state) ? {io_tdi, clkstopdly[6:1]}
3686 : csdelay_cap ? csdel_data[6:0]
3687 : tlr_state ? 7'b0
3688 : clkstopdly[6:0];
3689
3690 assign jtag_upd_cntdly = instr_clkstopdly & update_dr_state; // must be synchronized in sigmux_ctl
3691
3692 assign csdelay_cap = instr_clkstopdly & capture_dr_state;
3693 assign jtag_cntdly_data[6:0] = clkstopdly[6:0];
3694
3695 //********************************************************************
3696 // Clock Stop: Clock Sequencer Status
3697 //********************************************************************
3698 // captures 2 bits: status of sigmux_ctl clock sequencer, to shift out (no update reg.)
3699 // bits = 00 --> clock sequencer is running
3700 // bits = 01 --> clock sequencer has started all clocks
3701 // bits = 10 --> clock sequencer has stopped all clocks
3702 // bits = 11 --> should not happen; indeterminate
3703
3704 tcu_jtag_ctl_msff_ctl_macro__width_2 tap_clkseqstat_reg
3705 (
3706 .scan_in (tap_clkseqstat_reg_scanin),
3707 .scan_out (tap_clkseqstat_reg_scanout),
3708 .l1clk (l1tck),
3709 .din (next_clkseqstat[1:0]),
3710 .dout (clkseqstat[1:0]),
3711 .siclk(siclk),
3712 .soclk(soclk)
3713 );
3714 assign clkseq[0] = clkseq_strt;
3715 assign clkseq[1] = clkseq_stop;
3716 assign next_clkseqstat[1:0] = (instr_clkseq_stat & shift_dr_state) ? {io_tdi, clkseqstat[1]}
3717 : (instr_clkseq_stat & capture_dr_state) ? clkseq[1:0]
3718 : clkseqstat[1:0];
3719
3720 //********************************************************************
3721 // Core Select
3722 //********************************************************************
3723 // Update register is in regs_ctl.dbg_ctl, here is capture/shift only
3724 // TAP_CORE_SEL - fills 8-bit core select register for soft stopping clocks
3725 // only to cores specified in this reg.
3726
3727 // this is the SHIFT register
3728 tcu_jtag_ctl_msff_ctl_macro__width_8 tap_coresel_shift_reg
3729 (
3730 .scan_in (tap_coresel_shift_reg_scanin),
3731 .scan_out (tap_coresel_shift_reg_scanout),
3732 .l1clk (l1tck),
3733 .din (next_coresel[7:0]),
3734 .dout (coresel[7:0]),
3735 .siclk(siclk),
3736 .soclk(soclk)
3737 );
3738 assign next_coresel[7:0] = (instr_core_sel & shift_dr_state) ? {io_tdi, coresel[7:1]}
3739 : coresel_cap ? spc_ss_sel[7:0]
3740 : tlr_state ? 8'b0
3741 : coresel[7:0];
3742
3743 assign core_sel_upd = instr_core_sel & update_dr_state; // must be synchronized in dbg_ctl
3744
3745 assign coresel_cap = instr_core_sel & capture_dr_state;
3746 assign core_sel[7:0] = coresel[7:0];
3747
3748 //********************************************************************
3749 // TCU Debug Control Register (TAP_TCU_DCR)
3750 //********************************************************************
3751 // Update register is in regs_ctl.dbg_ctl, here is capture/shift only
3752 // TAP_TCU_DCR - fills 4-bit DCR register for control of reset debug events
3753
3754 // this is the SHIFT register
3755 tcu_jtag_ctl_msff_ctl_macro__width_4 tap_tcudcr_shift_reg
3756 (
3757 .scan_in (tap_tcudcr_shift_reg_scanin),
3758 .scan_out (tap_tcudcr_shift_reg_scanout),
3759 .l1clk (l1tck),
3760 .din (next_tcudcr[3:0]),
3761 .dout (tcudcr[3:0]),
3762 .siclk(siclk),
3763 .soclk(soclk)
3764 );
3765 assign next_tcudcr[3:0] = (instr_tcu_dcr & shift_dr_state) ? {io_tdi, tcudcr[3:1]}
3766 : tcudcr_cap ? tcu_dcr[3:0]
3767 : tlr_state ? 4'b0
3768 : tcudcr[3:0];
3769
3770 assign tcudcr_upd = instr_tcu_dcr & update_dr_state; // must be synchronized in dbg_ctl
3771
3772 assign tcudcr_cap = instr_tcu_dcr & capture_dr_state;
3773 assign tcudcr_data[3:0] = tcudcr[3:0];
3774
3775 //********************************************************************
3776 // DOSS Mode
3777 //********************************************************************
3778 // Update register is in regs_ctl.dbg_ctl, here is capture/shift only
3779 // TAP_DOSS_MODE - fills 2-bit DOSS Mode, specifies Disable Overlap or Single Step Mode
3780
3781 // this is the SHIFT register
3782 tcu_jtag_ctl_msff_ctl_macro__width_2 tap_dossmode_shift_reg
3783 (
3784 .scan_in (tap_dossmode_shift_reg_scanin),
3785 .scan_out (tap_dossmode_shift_reg_scanout),
3786 .l1clk (l1tck),
3787 .din (next_dossmode[1:0]),
3788 .dout (dossmode[1:0]),
3789 .siclk(siclk),
3790 .soclk(soclk)
3791 );
3792 assign next_dossmode[1:0] = (instr_doss_mode & shift_dr_state) ? {io_tdi, dossmode[1]}
3793 : dossmode_cap ? doss_mode[1:0]
3794 : tlr_state ? 2'b0
3795 : dossmode[1:0];
3796
3797 assign dossmode_upd = instr_doss_mode & update_dr_state; // must be synch'd in dbg_ctl
3798
3799 assign dossmode_cap = instr_doss_mode & capture_dr_state;
3800
3801 //********************************************************************
3802 // Single Step - Generate Single Step Request Pulse
3803 //********************************************************************
3804 // there is no flop for this instruction
3805 assign ssreq_upd = instr_ss_request & update_dr_state; // synch'd in regs_ctl
3806
3807 //********************************************************************
3808 // DOSS Status
3809 //********************************************************************
3810 // TAP_DOSS_STATUS - Read Only
3811 // this is the CAPTURE/SHIFT register
3812 tcu_jtag_ctl_msff_ctl_macro__width_8 tap_dossstat_shift_reg
3813 (
3814 .scan_in (tap_dossstat_shift_reg_scanin),
3815 .scan_out (tap_dossstat_shift_reg_scanout),
3816 .l1clk (l1tck),
3817 .din (next_dossstat[7:0]),
3818 .dout (dossstat[7:0]),
3819 .siclk(siclk),
3820 .soclk(soclk)
3821 );
3822 assign next_dossstat[7:0] = (instr_doss_status & shift_dr_state) ? {io_tdi, dossstat[7:1]}
3823 : dossstat_cap ? doss_stat[7:0]
3824 : tlr_state ? 8'b0
3825 : dossstat[7:0];
3826
3827 assign dossstat_cap = instr_doss_status & capture_dr_state;
3828
3829 //********************************************************************
3830 // Cycle Step Mode
3831 //********************************************************************
3832 // Update register is in regs_ctl.dbg_ctl, here is capture/shift only
3833 // TAP_CS_MODE - fills 1-bit CS Mode
3834
3835 // this is the SHIFT register
3836 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_csmode_shift_reg
3837 (
3838 .scan_in (tap_csmode_shift_reg_scanin),
3839 .scan_out (tap_csmode_shift_reg_scanout),
3840 .l1clk (l1tck),
3841 .din (next_csmode),
3842 .dout (csmode),
3843 .siclk(siclk),
3844 .soclk(soclk)
3845 );
3846 // TLR ECO
3847 //assign next_csmode = (instr_cs_mode & shift_dr_state) ? io_tdi
3848 // : csmode_cap ? cs_mode
3849 // : tlr_state ? 1'b0
3850 // : csmode;
3851 assign next_csmode = ((~tlr_state & instr_cs_mode & shift_dr_state) & io_tdi) |
3852 ((~tlr_state & csmode_cap) & cs_mode) |
3853 ((~tlr_state & ~csmode_cap & ~(instr_cs_mode & shift_dr_state)) & csmode);
3854
3855 assign csmode_upd = instr_cs_mode & update_dr_state; // must be synch'd in dbg_ctl
3856 assign csmode_cap = instr_cs_mode & capture_dr_state;
3857
3858 //********************************************************************
3859 // Cycle Step Status
3860 //********************************************************************
3861 // TAP_CS_STATUS - Read Only
3862
3863 // this is the CAPTURE/SHIFT register
3864 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_csstat_shift_reg
3865 (
3866 .scan_in (tap_csstat_shift_reg_scanin),
3867 .scan_out (tap_csstat_shift_reg_scanout),
3868 .l1clk (l1tck),
3869 .din (next_csstat),
3870 .dout (csstat),
3871 .siclk(siclk),
3872 .soclk(soclk)
3873 );
3874 // TLR ECO
3875 //assign next_csstat = (instr_cs_status & shift_dr_state) ? io_tdi
3876 // : csstat_cap ? cs_mode_active
3877 // : tlr_state ? 1'b0
3878 // : csstat;
3879 assign next_csstat = ((~tlr_state & instr_cs_status & shift_dr_state) & io_tdi) |
3880 ((~tlr_state & csstat_cap) & cs_mode_active) |
3881 ((~tlr_state & ~csstat_cap & ~(instr_cs_status & shift_dr_state)) & csstat);
3882
3883 assign csstat_cap = instr_cs_status & capture_dr_state;
3884
3885 //********************************************************************
3886 // SerDes: ACCESS Mode
3887 //********************************************************************
3888 // - no JTAG_shift or update regs involved; needs trst_l
3889 // single bit to store access mode signal; set by TAP_STCI_ACCESS
3890 // and cleared by TAP_STCI_CLEAR or TLR
3891 // This instruction places STCI Chain between TDI & TDO
3892 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_stciaccess_reg
3893 (
3894 .scan_in (tap_stciaccess_reg_scanin),
3895 .scan_out (tap_stciaccess_reg_scanout),
3896 .l1clk (l1tck),
3897 .din (next_stciaccess),
3898 .dout (stciaccess),
3899 .siclk(siclk),
3900 .soclk(soclk)
3901 );
3902 // TLR ECO
3903 //assign next_stciaccess = (instr_stci_access & upd_ir_state) ? 1'b1
3904 // : (instr_stci_clear | tlr_state) ? 1'b0
3905 // : stciaccess;
3906 assign next_stciaccess = (instr_stci_access & upd_ir_state & ~tlr_state) |
3907 (~(instr_stci_access & upd_ir_state) & ~instr_stci_clear & ~tlr_state & stciaccess);
3908
3909 assign stci_acc_mode = stciaccess & ~pin_scanmode & ~tlr_state & stci_val_instr;
3910
3911 assign upd_ir_state = (tap_state[3:0] == `TAP_UPDATE_IR);
3912
3913
3914 assign stci_val_instr = instr_stci_access; // OR other instrs valid during stci here
3915 assign stci_shft_clk = ~updatedr & (clockdr | ~shiftdr);
3916 assign stci_cfg0 = ~shiftdr;
3917 assign updatedr = update_dr_state & tck_l;
3918 assign clockdr = ~(tck_l & (shift_dr_state | capture_dr_state));
3919
3920 assign tcu_stciclk = stci_acc_mode ? stci_shft_clk : mio_tcu_stciclk;
3921 assign tcu_stcicfg[1] = stci_acc_mode ? stci_cfg1 : mio_tcu_stcicfg[1];
3922 assign tcu_stcicfg[0] = stci_acc_mode ? stci_cfg0 : mio_tcu_stcicfg[0];
3923 assign tcu_stcid = stci_acc_mode ? io_tdi : mio_tcu_stcid;
3924 assign stciq_tdo = stci_acc_mode & stciq_tcu;
3925 assign tcu_mio_stciq = stciq_tcu; // ECO stciq_tdo;
3926
3927 tcu_jtag_ctl_msff_ctl_macro__clr_1__en_1__width_1 tap_stcicfg1_reg
3928 (
3929 .scan_in (tap_stcicfg1_reg_scanin),
3930 .scan_out (tap_stcicfg1_reg_scanout),
3931 .l1clk (l1tck),
3932 .clr (stcicfg1_clear),
3933 .en (stcicfg1_en),
3934 .din (capture_dr_state),
3935 .dout (stci_cfg1),
3936 .siclk(siclk),
3937 .soclk(soclk)
3938 );
3939 assign stcicfg1_clear = ~stci_acc_mode;
3940 assign stcicfg1_en = stci_acc_mode & ~stci_cfg1;
3941 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_shiftdr_reg
3942 (
3943 .scan_in (1'b0),
3944 .scan_out (tap_shiftdr_reg_scanout_unused),
3945 .l1clk (tck_l),
3946 .din (shift_dr_state),
3947 .dout (shiftdr),
3948 .siclk(siclk),
3949 .soclk(soclk)
3950 );
3951
3952 //********************************************************************
3953 // DMO: ACCESS Mode
3954 //********************************************************************
3955 // - no JTAG_shift or update regs involved; needs trst_l
3956 // single bit to store dmo mode signal; set by TAP_DMO_ACCESS
3957 // and cleared by TAP_DMO_CLEAR or TLR
3958 // This instruction places no register between TDI/TDO
3959 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_dmoaccess_reg
3960 (
3961 .scan_in (tap_dmoaccess_reg_scanin),
3962 .scan_out (tap_dmoaccess_reg_scanout),
3963 .l1clk (l1tck),
3964 .din (next_dmoaccess),
3965 .dout (dmoaccess),
3966 .siclk(siclk),
3967 .soclk(soclk)
3968 );
3969 // TLR ECO
3970 //assign next_dmoaccess = (instr_dmo_access & upd_ir_state) ? 1'b1
3971 // : (instr_dmo_clear | tlr_state) ? 1'b0
3972 // : dmoaccess;
3973 assign next_dmoaccess = (instr_dmo_access & upd_ir_state & ~tlr_state) |
3974 (~(instr_dmo_access & upd_ir_state) & ~instr_dmo_clear & ~tlr_state & dmoaccess);
3975
3976 assign jtag_dmo_enable_din = dmoaccess & ~pin_scanmode & ~tlr_state;
3977
3978 //********************************************************************
3979 // DMO Control Register
3980 //********************************************************************
3981 // Update register is in mbist_ctl.dmo_ctl, here is capture/shift only
3982 // TAP_DMO_CONFIG - fills 32-bit DMO Config register for control of DMO
3983
3984 // this is the SHIFT register
3985 tcu_jtag_ctl_msff_ctl_macro__width_48 tap_dmocfg_shift_reg
3986 (
3987 .scan_in (tap_dmocfg_shift_reg_scanin),
3988 .scan_out (tap_dmocfg_shift_reg_scanout),
3989 .l1clk (l1tck),
3990 .din (next_dmocfg[47:0]),
3991 .dout (dmocfg[47:0]),
3992 .siclk(siclk),
3993 .soclk(soclk)
3994 );
3995 assign next_dmocfg[47:0] = (instr_dmo_config & shift_dr_state) ? {io_tdi, dmocfg[47:1]}
3996 : dmocfg_cap ? dmo_cfg[47:0]
3997 : tlr_state ? 48'b0
3998 : dmocfg[47:0];
3999
4000 assign dmocfg_cap = instr_dmo_config & capture_dr_state;
4001
4002 assign jtag_dmo_control_upd = instr_dmo_config & update_dr_state; // must be synch'd in mbist_ctl
4003 assign jtag_dmo_control[47:0] = dmocfg[47:0];
4004
4005
4006 //********************************************************************
4007 // Macro Test: ACCESS Mode
4008 //********************************************************************
4009 // - no JTAG_shift or update regs involved; needs trst_l
4010 // single bit to store MACRO TEST mode signal; set by TAP_MT_ACCESS
4011 // and cleared by TAP_MT_CLEAR or TLR
4012 // This instruction places no register between TDI/TDO
4013 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_mtaccess_reg
4014 (
4015 .scan_in (tap_mtaccess_reg_scanin),
4016 .scan_out (tap_mtaccess_reg_scanout),
4017 .l1clk (l1tck),
4018 .din (next_mtaccess),
4019 .dout (mtaccess),
4020 .siclk(siclk),
4021 .soclk(soclk)
4022 );
4023 assign next_mtaccess = pin_scanmode ? mtaccess
4024 : (instr_mt_access & upd_ir_state) ? 1'b1
4025 : (instr_mt_clear | tlr_state) ? 1'b0
4026 : mtaccess;
4027 //assign jtag_mt_enable = mtaccess & ~pin_scanmode & ~tlr_state;
4028 assign pin_macrotest = mtaccess;
4029 assign jtag_macrotest = mtaccess & ~tlr_state;
4030 assign jtag_mt_enable_din = pin_scanmode ? pin_macrotest : jtag_macrotest;
4031 assign tck_clk_tree = ~instr_mt_scan | ~rti_state | (rti_state & l1tck);
4032
4033 assign jtag_ser_scan = instr_mt_scan | instr_ser_scan;
4034 // Only difference between instr_mt_scan and instr_ser_scan is that instr_mt_scan
4035 // allows tck out on RTI; they are separate instructions in case their behavior
4036 // needs to diverge in the future
4037 assign instr_mt_scan_rti = instr_mt_scan & rti_state;
4038
4039 // ********************************************************************
4040 // JTAG During POR: ACCESS Mode
4041 // ********************************************************************
4042 // - no JTAG_shift or update regs involved; needs trst_l
4043 // single bit to store jtpor mode signal; set by TAP_JTPOR_ACCESS
4044 // and cleared by TAP_JTPOR_CLEAR or TLR
4045 // This instruction places no register between TDI/TDO
4046 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_jtporaccess_reg
4047 (
4048 .scan_in (tap_jtporaccess_reg_scanin),
4049 .scan_out (tap_jtporaccess_reg_scanout),
4050 .l1clk (l1tck),
4051 .din (next_jtporaccess),
4052 .dout (jtporaccess),
4053 .siclk(siclk),
4054 .soclk(soclk)
4055 );
4056 // TLR ECO
4057 //assign next_jtporaccess = (instr_jtpor_access & upd_ir_state) ? 1'b1
4058 // : (instr_jtpor_clear | tlr_state) ? 1'b0
4059 // : jtporaccess;
4060 assign next_jtporaccess = (instr_jtpor_access & upd_ir_state & ~tlr_state) |
4061 (~(instr_jtpor_clear | tlr_state) & ~instr_jtpor_clear & ~tlr_state & jtporaccess);
4062
4063 assign jtag_por_enable_din = jtporaccess & ~pin_scanmode & ~tlr_state;
4064
4065 // ********************************************************************
4066 // JTAG During POR: Status
4067 // ********************************************************************
4068 // TAP_JTPOR_STATUS - Read Only
4069
4070 // this is the CAPTURE/SHIFT register
4071 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_jtporstat_shift_reg
4072 (
4073 .scan_in (tap_jtporstat_shift_reg_scanin),
4074 .scan_out (tap_jtporstat_shift_reg_scanout),
4075 .l1clk (l1tck),
4076 .din (next_jtporstat),
4077 .dout (jtporstat),
4078 .siclk(siclk),
4079 .soclk(soclk)
4080 );
4081 // TLR ECO
4082 //assign next_jtporstat = (instr_jtpor_status & shift_dr_state) ? io_tdi
4083 // : jtporstat_cap ? jtag_por_status
4084 // : tlr_state ? 1'b0
4085 // : jtporstat;
4086 assign next_jtporstat = ((~tlr_state & instr_jtpor_status & shift_dr_state) & io_tdi) |
4087 ((~tlr_state & jtporstat_cap) & jtag_por_status) |
4088 ((~tlr_state & ~jtporstat_cap & ~(instr_jtpor_status & shift_dr_state)) & jtporstat);
4089
4090 assign jtporstat_cap = instr_jtpor_status & capture_dr_state;
4091
4092 // ********************************************************************
4093 // JTAG SCK Counter Bypass: ACCESS Mode
4094 // ********************************************************************
4095 // - no JTAG_shift or update regs involved; needs trst_l
4096 // single bit to store jtag_sck_byp signal; set by TAP_SCKBYP_ACCESS
4097 // and cleared by TAP_SCKBYP_CLEAR or TLR
4098 // This instruction places no register between TDI/TDO
4099 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_jtsckbyp_reg
4100 (
4101 .scan_in (tap_jtsckbyp_reg_scanin),
4102 .scan_out (tap_jtsckbyp_reg_scanout),
4103 .l1clk (l1tck),
4104 .din (next_jtsckbyp),
4105 .dout (jtsckbyp),
4106 .siclk(siclk),
4107 .soclk(soclk)
4108 );
4109 // TLR ECO
4110 //assign next_jtsckbyp = (instr_sckbyp_access & upd_ir_state) ? 1'b1
4111 // : (instr_sckbyp_clear | tlr_state) ? 1'b0
4112 // : jtsckbyp;
4113 assign next_jtsckbyp = (instr_sckbyp_access & upd_ir_state & ~tlr_state) |
4114 (~(instr_sckbyp_access & upd_ir_state) & ~instr_sckbyp_clear & ~tlr_state & jtsckbyp);
4115
4116 assign jtag_sck_byp = jtsckbyp;
4117
4118 // ********************************************************************
4119 // JTAG Test Protect: ACCESS Mode
4120 // ********************************************************************
4121 // - no JTAG_shift or update regs involved
4122 // single bit to store test protect mode signal; set by TAP_TP_ACCESS
4123 // and cleared by TAP_TP_CLEAR or TLR
4124 // This instruction places no register between TDI/TDO
4125 tcu_jtag_ctl_msff_ctl_macro__width_1 tap_tpaccess_reg
4126 (
4127 .scan_in (tap_tpaccess_reg_scanin),
4128 .scan_out (tap_tpaccess_reg_scanout),
4129 .l1clk (l1tck),
4130 .din (next_tpaccess),
4131 .dout (tpaccess),
4132 .siclk(siclk),
4133 .soclk(soclk)
4134 );
4135 // TLR ECO
4136 //assign next_tpaccess = (instr_tp_access & upd_ir_state) ? 1'b1
4137 // : (instr_tp_clear | tlr_state) ? 1'b0
4138 // : tpaccess;
4139 assign next_tpaccess = (instr_tp_access & upd_ir_state & ~tlr_state) |
4140 (~(instr_tp_access & upd_ir_state) & ~instr_tp_clear & ~tlr_state & tpaccess);
4141
4142 assign jtag_test_protect = tpaccess; // TLR ECO // & ~tlr_state;
4143
4144
4145 // ********************************************************************
4146 // ********************************************************************
4147
4148 assign ex1_ir_state = (tap_state[3:0] == `TAP_EXIT1_IR);
4149 assign ex2_ir_state = (tap_state[3:0] == `TAP_EXIT2_IR);
4150
4151 assign exit_ir = ex1_ir_state | ex2_ir_state;
4152 assign next_state_updir = exit_ir & io_tms; // next state will be update IR
4153
4154 assign tcu_mio_bs_mode_ctl = active_upd_ir | pre_tcu_mio_bs_mode_ctl ;
4155 assign tcu_sbs_enbstx = ~active_upd_ir & pre_tcu_sbs_enbstx ;
4156 assign tcu_sbs_enbsrx = ~active_upd_ir & pre_tcu_sbs_enbsrx ;
4157 assign tcu_sbs_acmode = ~active_upd_ir & pre_tcu_sbs_acmode ;
4158 assign tcu_sbs_enbspt = ~active_upd_ir & pre_tcu_sbs_enbspt ;
4159 assign tcu_mio_bs_highz_l = active_upd_ir | pre_tcu_mio_bs_highz_l ;
4160
4161 //END of ECO xxxxxx
4162
4163 // ----- ECO yyyyyy ---------
4164
4165 assign jtss_next_instr_dec = (next_instr[7:0] == `TAP_MT_SCAN)
4166 | (next_instr[7:0] == `TAP_SERSCAN);
4167
4168 assign jtss_next_instr = (next_state_updir | tlr_state) ? jtss_next_instr_dec : jtss_active;
4169
4170 assign jtss_active_window = (jtss_active | jtss_active_dly);
4171 assign jtag_ser_scan_q = jtss_active_window & jtag_ser_scan;
4172
4173 //END of ECO yyyyyy
4174
4175// ----------------------------------------------------------------------
4176// Removed for ECO to make flops visible in SunV
4177//spare_ctl_macro spare (num=12) (
4178// .l1clk ( l1tck ),
4179// .scan_in ( spare_scanin ),
4180// .scan_out ( spare_scanout ));
4181
4182// Added for ECO to make flops visible
4183
4184// - this is an expansion of spare_ctl_macro with just the gates
4185tcu_jtag_ctl_spare_ctl_macro__flops_0__num_12 spare_gates (
4186);
4187
4188tcu_jtag_ctl_msff_ctl_macro__scanreverse_1__width_12 spare_flops (
4189 .scan_in(spare_flops_scanin),
4190 .scan_out(spare_flops_scanout),
4191 .l1clk(l1tck),
4192 .din (spare_flops_d[11:0]),
4193 .dout (spare_flops_q[11:0]),
4194 .siclk(siclk),
4195 .soclk(soclk)
4196);
4197
4198assign spare_flops_d[11] = spare11_flop_d;
4199assign spare_flops_d[10] = spare10_flop_d; // ECO yyyyyy
4200assign spare_flops_d[9] = spare9_flop_d; // TLR ECO
4201assign spare_flops_d[8] = spare8_flop_d; // ECO yyyyyy
4202assign spare_flops_d[7] = 1'b0;
4203assign spare_flops_d[6] = 1'b0;
4204assign spare_flops_d[5] = 1'b0;
4205assign spare_flops_d[4] = 1'b0;
4206assign spare_flops_d[3] = 1'b0;
4207assign spare_flops_d[2] = 1'b0;
4208assign spare_flops_d[1] = 1'b0;
4209assign spare_flops_d[0] = 1'b0;
4210
4211assign spare11_flop_q = spare_flops_q[11];
4212assign spare10_flop_q = spare_flops_q[10]; // ECO yyyyyy
4213assign spare9_flop_q = spare_flops_q[9]; // TLR ECO
4214assign spare8_flop_q = spare_flops_q[8]; // ECO yyyyyy
4215assign spare_flops_unused[7] = spare_flops_q[7];
4216assign spare_flops_unused[6] = spare_flops_q[6];
4217assign spare_flops_unused[5] = spare_flops_q[5];
4218assign spare_flops_unused[4] = spare_flops_q[4];
4219assign spare_flops_unused[3] = spare_flops_q[3];
4220assign spare_flops_unused[2] = spare_flops_q[2];
4221assign spare_flops_unused[1] = spare_flops_q[1];
4222assign spare_flops_unused[0] = spare_flops_q[0];
4223
4224assign spare10_flop_d = jtss_next_instr; // ECO yyyyyy
4225assign jtss_active = spare10_flop_q ; // ECO yyyyyy
4226assign spare8_flop_d = jtss_active ; // ECO yyyyyy
4227assign jtss_active_dly = spare8_flop_q ; // ECO yyyyyy
4228
4229assign spare11_flop_d = next_state_updir; // ECO xxxxxx
4230assign active_upd_ir = spare11_flop_q ; // ECO xxxxxx
4231
4232assign spare9_flop_d = instr_sstop_csmode_din; // TLR ECO
4233assign instr_sstop_csmode = spare9_flop_q ; // TLR ECO
4234
4235// ----------------------------------------------------------------------
4236
4237// fixscan start: bypass tck_l flops
4238assign tap_scan_in = scan_in ;
4239assign ext_jtag_ll_reg_scanin = 1'b0;
4240assign bs_scan_enne_reg_scanin = 1'b0;
4241assign ucb_jtag_data_rdy_sync_reg_scanin = tap_scan_out;
4242assign jtag_csr_wr_reg_scanin = ucb_jtag_data_rdy_sync_reg_scanout;
4243assign jtag_csr_data_reg_scanin = jtag_csr_wr_reg_scanout;
4244assign bs_scan_enpe_reg_scanin = jtag_csr_data_reg_scanout;
4245assign tap_idcode_reg_scanin = bs_scan_enpe_reg_scanout ;
4246assign tap_chainsel_reg_scanin = tap_idcode_reg_scanout ;
4247assign tap_fusemode_shift_reg_scanin = tap_chainsel_reg_scanout ;
4248assign tap_fusemode_upd_reg_scanin = 1'b0;
4249assign tap_fuserowaddr_shift_reg_scanin = tap_fusemode_shift_reg_scanout;
4250assign tap_fuserowaddr_upd_reg_scanin = 1'b0;
4251assign tap_fusecoladdr_shift_reg_scanin = tap_fuserowaddr_shift_reg_scanout;
4252assign tap_fusecoladdr_upd_reg_scanin = 1'b0;
4253assign tap_fusereaden_reg_scanin = tap_fusecoladdr_shift_reg_scanout;
4254assign tap_fusedestsample_reg_scanin = tap_fusereaden_reg_scanout;
4255assign tap_fusebypass_reg_scanin = tap_fusedestsample_reg_scanout;
4256assign tap_rvclr_shift_reg_scanin = tap_fusebypass_reg_scanout;
4257assign tap_rvclr_upd_reg_scanin = tap_rvclr_shift_reg_scanout;
4258assign tap_mbibypass_shift_reg_scanin = tap_rvclr_upd_reg_scanout;
4259assign tap_mbibypass_upd_reg_scanin = tap_mbibypass_shift_reg_scanout;
4260assign tap_mbist_get_done_fail_shift_reg_scanin = tap_mbibypass_upd_reg_scanout;
4261assign tap_mbist_result_reg_scanin = tap_mbist_get_done_fail_shift_reg_scanout;
4262assign tap_mbist_mode_reg_scanin = tap_mbist_result_reg_scanout;
4263assign tap_mbist_clkstpen_reg_scanin = tap_mbist_mode_reg_scanout;
4264assign mbi_a_scan_en_reg_scanin = 1'b0;
4265assign mbi_b_scan_en_reg_scanin = tap_mbist_clkstpen_reg_scanout;
4266assign jtag_output_flops_reg_scanin = mbi_b_scan_en_reg_scanout;
4267assign tap_lbist_bypass_shift_reg_scanin = jtag_output_flops_reg_scanout;
4268assign tap_lbist_bypass_upd_reg_scanin = tap_lbist_bypass_shift_reg_scanout;
4269assign tap_lbist_mode_reg_scanin = tap_lbist_bypass_upd_reg_scanout;
4270assign tap_lbist_done_reg_scanin = tap_lbist_mode_reg_scanout;
4271assign tap_lbist_start_reg_scanin = tap_lbist_done_reg_scanout;
4272assign tap_lbist_a_scan_en_reg_scanin = 1'b0; //tap_lbist_start_reg_scanout;
4273assign tap_lbist_b_scan_en_reg_scanin = tap_lbist_start_reg_scanout;
4274assign tap_cregaddr_shift_reg_scanin = tap_lbist_b_scan_en_reg_scanout;
4275assign tap_cregwdata_reg_scanin = tap_cregaddr_shift_reg_scanout;
4276assign tap_cregrdrtrn_reg_scanin = tap_cregwdata_reg_scanout;
4277assign tap_cregaddren_reg_scanin = tap_cregrdrtrn_reg_scanout;
4278assign tap_cregwren_reg_scanin = tap_cregaddren_reg_scanout;
4279assign tap_cregrden_reg_scanin = tap_cregwren_reg_scanout;
4280assign tap_cregdataen_reg_scanin = tap_cregrden_reg_scanout;
4281assign tap_cregrdrtrnvld_reg_scanin = tap_cregdataen_reg_scanout;
4282assign tap_ucb_jtag_data_rdy_d_reg_scanin = tap_cregrdrtrnvld_reg_scanout;
4283assign tap_ucb_jtag_data_rdy_d2_reg_scanin = tap_ucb_jtag_data_rdy_d_reg_scanout;
4284assign tap_cregrdrtrnload_reg_scanin = tap_ucb_jtag_data_rdy_d2_reg_scanout;
4285assign tap_ncurd_reg_scanin = tap_cregrdrtrnload_reg_scanout;
4286assign tap_ncuraddr_reg_scanin = tap_ncurd_reg_scanout;
4287assign spcshscan_a_scan_en_reg_scanin = 1'b0;
4288assign spcshscan_b_scan_en_reg_scanin = tap_ncuraddr_reg_scanout;
4289assign l2tshscan_a_scan_en_reg_scanin = 1'b0;
4290assign l2tshscan_b_scan_en_reg_scanin = spcshscan_b_scan_en_reg_scanout;
4291 assign tap_jtagclkstop_reg_scanin = l2tshscan_b_scan_en_reg_scanout;
4292 assign tap_gen32_shift_reg_scanin = tap_jtagclkstop_reg_scanout;
4293 assign tap_gen64_shift_reg_scanin = tap_gen32_shift_reg_scanout;
4294 assign serscan_a_scan_en_reg_scanin = 1'b0; // tck_l
4295 assign serscan_b_scan_en_reg_scanin = tap_gen64_shift_reg_scanout;
4296assign tap_l2access_shift_reg_scanin = serscan_b_scan_en_reg_scanout;
4297 assign tap_clkstopdly_shift_reg_scanin = tap_l2access_shift_reg_scanout;
4298 assign tap_clkseqstat_reg_scanin = tap_clkstopdly_shift_reg_scanout;
4299 assign tap_coresel_shift_reg_scanin = tap_clkseqstat_reg_scanout;
4300 assign tap_tcudcr_shift_reg_scanin = tap_coresel_shift_reg_scanout;
4301 assign tap_dossmode_shift_reg_scanin = tap_tcudcr_shift_reg_scanout;
4302 assign tap_dossstat_shift_reg_scanin = tap_dossmode_shift_reg_scanout;
4303 assign tap_csmode_shift_reg_scanin = tap_dossstat_shift_reg_scanout;
4304 assign tap_csstat_shift_reg_scanin = tap_csmode_shift_reg_scanout;
4305 assign tap_stciaccess_reg_scanin = tap_csstat_shift_reg_scanout;
4306 assign tap_stcicfg1_reg_scanin = tap_stciaccess_reg_scanout;
4307 assign tap_dmoaccess_reg_scanin = tap_stcicfg1_reg_scanout;
4308 assign tap_dmocfg_shift_reg_scanin = tap_dmoaccess_reg_scanout;
4309 assign tap_mtaccess_reg_scanin = tap_dmocfg_shift_reg_scanout;
4310assign tap_jtporaccess_reg_scanin = tap_mtaccess_reg_scanout;
4311assign tap_jtporstat_shift_reg_scanin = tap_jtporaccess_reg_scanout;
4312assign tap_jtsckbyp_reg_scanin = tap_jtporstat_shift_reg_scanout;
4313assign tap_tpaccess_reg_scanin = tap_jtsckbyp_reg_scanout;
4314assign spare_flops_scanin = tap_tpaccess_reg_scanout;
4315
4316assign flush_scanout = spare_flops_scanout & ~flush_dly;
4317assign scan_out = io_test_mode ? spare_flops_scanout : flush_scanout;
4318
4319// fixscan end:
4320
4321endmodule
4322
4323
4324
4325
4326
4327
4328// any PARAMS parms go into naming of macro
4329
4330module tcu_jtag_ctl_l1clkhdr_ctl_macro (
4331 l2clk,
4332 l1en,
4333 pce_ov,
4334 stop,
4335 se,
4336 l1clk);
4337
4338
4339 input l2clk;
4340 input l1en;
4341 input pce_ov;
4342 input stop;
4343 input se;
4344 output l1clk;
4345
4346
4347
4348
4349
4350cl_sc1_l1hdr_8x c_0 (
4351
4352
4353 .l2clk(l2clk),
4354 .pce(l1en),
4355 .l1clk(l1clk),
4356 .se(se),
4357 .pce_ov(pce_ov),
4358 .stop(stop)
4359);
4360
4361
4362
4363endmodule
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377// any PARAMS parms go into naming of macro
4378
4379module tcu_jtag_ctl_msff_ctl_macro__width_1 (
4380 din,
4381 l1clk,
4382 scan_in,
4383 siclk,
4384 soclk,
4385 dout,
4386 scan_out);
4387wire [0:0] fdin;
4388
4389 input [0:0] din;
4390 input l1clk;
4391 input scan_in;
4392
4393
4394 input siclk;
4395 input soclk;
4396
4397 output [0:0] dout;
4398 output scan_out;
4399assign fdin[0:0] = din[0:0];
4400
4401
4402
4403
4404
4405
4406dff #(1) d0_0 (
4407.l1clk(l1clk),
4408.siclk(siclk),
4409.soclk(soclk),
4410.d(fdin[0:0]),
4411.si(scan_in),
4412.so(scan_out),
4413.q(dout[0:0])
4414);
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427endmodule
4428
4429
4430
4431
4432
4433
4434// any PARAMS parms go into naming of macro
4435
4436module tcu_jtag_ctl_msff_ctl_macro__jtag_1__width_4 (
4437 din,
4438 reset,
4439 updateclk,
4440 l1clk,
4441 scan_in,
4442 siclk,
4443 soclk,
4444 dout,
4445 scan_out);
4446wire [3:0] fdin;
4447wire [2:0] so;
4448
4449 input [3:0] din;
4450 input reset;
4451 input updateclk;
4452 input l1clk;
4453 input scan_in;
4454
4455
4456 input siclk;
4457 input soclk;
4458
4459 output [3:0] dout;
4460 output scan_out;
4461assign fdin[3:0] = din[3:0];
4462
4463
4464
4465
4466
4467
4468dff_jtag #(4) d0_0 (
4469.l1clk(l1clk),
4470.siclk(siclk),
4471.soclk(soclk),
4472.d(fdin[3:0]),
4473.si({scan_in,so[2:0]}),
4474.so({so[2:0],scan_out}),
4475.q(dout[3:0]),
4476 .reset(reset),
4477 .updateclk(updateclk)
4478);
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491endmodule
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505// any PARAMS parms go into naming of macro
4506
4507module tcu_jtag_ctl_msff_ctl_macro__fs_1__jtag_1__width_8 (
4508 din,
4509 reset,
4510 updateclk,
4511 l1clk,
4512 scan_in,
4513 siclk,
4514 soclk,
4515 dout,
4516 scan_out);
4517wire [7:0] fdin;
4518
4519 input [7:0] din;
4520 input reset;
4521 input updateclk;
4522 input l1clk;
4523 input [7:0] scan_in;
4524
4525
4526 input siclk;
4527 input soclk;
4528
4529 output [7:0] dout;
4530 output [7:0] scan_out;
4531assign fdin[7:0] = din[7:0];
4532
4533
4534
4535
4536
4537
4538dff_jtag #(8) d0_0 (
4539.l1clk(l1clk),
4540.siclk(siclk),
4541.soclk(soclk),
4542.d(fdin[7:0]),
4543.si(scan_in[7:0]),
4544.so(scan_out[7:0]),
4545.q(dout[7:0]),
4546 .reset(reset),
4547 .updateclk(updateclk)
4548);
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561endmodule
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575// any PARAMS parms go into naming of macro
4576
4577module tcu_jtag_ctl_msff_ctl_macro__jtag_1__width_1 (
4578 din,
4579 reset,
4580 updateclk,
4581 l1clk,
4582 scan_in,
4583 siclk,
4584 soclk,
4585 dout,
4586 scan_out);
4587wire [0:0] fdin;
4588
4589 input [0:0] din;
4590 input reset;
4591 input updateclk;
4592 input l1clk;
4593 input scan_in;
4594
4595
4596 input siclk;
4597 input soclk;
4598
4599 output [0:0] dout;
4600 output scan_out;
4601assign fdin[0:0] = din[0:0];
4602
4603
4604
4605
4606
4607
4608dff_jtag #(1) d0_0 (
4609.l1clk(l1clk),
4610.siclk(siclk),
4611.soclk(soclk),
4612.d(fdin[0:0]),
4613.si(scan_in),
4614.so(scan_out),
4615.q(dout[0:0]),
4616 .reset(reset),
4617 .updateclk(updateclk)
4618);
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631endmodule
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645// any PARAMS parms go into naming of macro
4646
4647module tcu_jtag_ctl_msff_ctl_macro__width_48 (
4648 din,
4649 l1clk,
4650 scan_in,
4651 siclk,
4652 soclk,
4653 dout,
4654 scan_out);
4655wire [47:0] fdin;
4656wire [46:0] so;
4657
4658 input [47:0] din;
4659 input l1clk;
4660 input scan_in;
4661
4662
4663 input siclk;
4664 input soclk;
4665
4666 output [47:0] dout;
4667 output scan_out;
4668assign fdin[47:0] = din[47:0];
4669
4670
4671
4672
4673
4674
4675dff #(48) d0_0 (
4676.l1clk(l1clk),
4677.siclk(siclk),
4678.soclk(soclk),
4679.d(fdin[47:0]),
4680.si({scan_in,so[46:0]}),
4681.so({so[46:0],scan_out}),
4682.q(dout[47:0])
4683);
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696endmodule
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710// any PARAMS parms go into naming of macro
4711
4712module tcu_jtag_ctl_msff_ctl_macro__width_32 (
4713 din,
4714 l1clk,
4715 scan_in,
4716 siclk,
4717 soclk,
4718 dout,
4719 scan_out);
4720wire [31:0] fdin;
4721wire [30:0] so;
4722
4723 input [31:0] din;
4724 input l1clk;
4725 input scan_in;
4726
4727
4728 input siclk;
4729 input soclk;
4730
4731 output [31:0] dout;
4732 output scan_out;
4733assign fdin[31:0] = din[31:0];
4734
4735
4736
4737
4738
4739
4740dff #(32) d0_0 (
4741.l1clk(l1clk),
4742.siclk(siclk),
4743.soclk(soclk),
4744.d(fdin[31:0]),
4745.si({scan_in,so[30:0]}),
4746.so({so[30:0],scan_out}),
4747.q(dout[31:0])
4748);
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761endmodule
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775// any PARAMS parms go into naming of macro
4776
4777module tcu_jtag_ctl_msff_ctl_macro__width_6 (
4778 din,
4779 l1clk,
4780 scan_in,
4781 siclk,
4782 soclk,
4783 dout,
4784 scan_out);
4785wire [5:0] fdin;
4786wire [4:0] so;
4787
4788 input [5:0] din;
4789 input l1clk;
4790 input scan_in;
4791
4792
4793 input siclk;
4794 input soclk;
4795
4796 output [5:0] dout;
4797 output scan_out;
4798assign fdin[5:0] = din[5:0];
4799
4800
4801
4802
4803
4804
4805dff #(6) d0_0 (
4806.l1clk(l1clk),
4807.siclk(siclk),
4808.soclk(soclk),
4809.d(fdin[5:0]),
4810.si({scan_in,so[4:0]}),
4811.so({so[4:0],scan_out}),
4812.q(dout[5:0])
4813);
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826endmodule
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840// any PARAMS parms go into naming of macro
4841
4842module tcu_jtag_ctl_msff_ctl_macro__width_3 (
4843 din,
4844 l1clk,
4845 scan_in,
4846 siclk,
4847 soclk,
4848 dout,
4849 scan_out);
4850wire [2:0] fdin;
4851wire [1:0] so;
4852
4853 input [2:0] din;
4854 input l1clk;
4855 input scan_in;
4856
4857
4858 input siclk;
4859 input soclk;
4860
4861 output [2:0] dout;
4862 output scan_out;
4863assign fdin[2:0] = din[2:0];
4864
4865
4866
4867
4868
4869
4870dff #(3) d0_0 (
4871.l1clk(l1clk),
4872.siclk(siclk),
4873.soclk(soclk),
4874.d(fdin[2:0]),
4875.si({scan_in,so[1:0]}),
4876.so({so[1:0],scan_out}),
4877.q(dout[2:0])
4878);
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891endmodule
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905// any PARAMS parms go into naming of macro
4906
4907module tcu_jtag_ctl_msff_ctl_macro__width_7 (
4908 din,
4909 l1clk,
4910 scan_in,
4911 siclk,
4912 soclk,
4913 dout,
4914 scan_out);
4915wire [6:0] fdin;
4916wire [5:0] so;
4917
4918 input [6:0] din;
4919 input l1clk;
4920 input scan_in;
4921
4922
4923 input siclk;
4924 input soclk;
4925
4926 output [6:0] dout;
4927 output scan_out;
4928assign fdin[6:0] = din[6:0];
4929
4930
4931
4932
4933
4934
4935dff #(7) d0_0 (
4936.l1clk(l1clk),
4937.siclk(siclk),
4938.soclk(soclk),
4939.d(fdin[6:0]),
4940.si({scan_in,so[5:0]}),
4941.so({so[5:0],scan_out}),
4942.q(dout[6:0])
4943);
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956endmodule
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970// any PARAMS parms go into naming of macro
4971
4972module tcu_jtag_ctl_msff_ctl_macro__width_5 (
4973 din,
4974 l1clk,
4975 scan_in,
4976 siclk,
4977 soclk,
4978 dout,
4979 scan_out);
4980wire [4:0] fdin;
4981wire [3:0] so;
4982
4983 input [4:0] din;
4984 input l1clk;
4985 input scan_in;
4986
4987
4988 input siclk;
4989 input soclk;
4990
4991 output [4:0] dout;
4992 output scan_out;
4993assign fdin[4:0] = din[4:0];
4994
4995
4996
4997
4998
4999
5000dff #(5) d0_0 (
5001.l1clk(l1clk),
5002.siclk(siclk),
5003.soclk(soclk),
5004.d(fdin[4:0]),
5005.si({scan_in,so[3:0]}),
5006.so({so[3:0],scan_out}),
5007.q(dout[4:0])
5008);
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021endmodule
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035// any PARAMS parms go into naming of macro
5036
5037module tcu_jtag_ctl_msff_ctl_macro__width_2 (
5038 din,
5039 l1clk,
5040 scan_in,
5041 siclk,
5042 soclk,
5043 dout,
5044 scan_out);
5045wire [1:0] fdin;
5046wire [0:0] so;
5047
5048 input [1:0] din;
5049 input l1clk;
5050 input scan_in;
5051
5052
5053 input siclk;
5054 input soclk;
5055
5056 output [1:0] dout;
5057 output scan_out;
5058assign fdin[1:0] = din[1:0];
5059
5060
5061
5062
5063
5064
5065dff #(2) d0_0 (
5066.l1clk(l1clk),
5067.siclk(siclk),
5068.soclk(soclk),
5069.d(fdin[1:0]),
5070.si({scan_in,so[0:0]}),
5071.so({so[0:0],scan_out}),
5072.q(dout[1:0])
5073);
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086endmodule
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100// any PARAMS parms go into naming of macro
5101
5102module tcu_jtag_ctl_msff_ctl_macro__width_4 (
5103 din,
5104 l1clk,
5105 scan_in,
5106 siclk,
5107 soclk,
5108 dout,
5109 scan_out);
5110wire [3:0] fdin;
5111wire [2:0] so;
5112
5113 input [3:0] din;
5114 input l1clk;
5115 input scan_in;
5116
5117
5118 input siclk;
5119 input soclk;
5120
5121 output [3:0] dout;
5122 output scan_out;
5123assign fdin[3:0] = din[3:0];
5124
5125
5126
5127
5128
5129
5130dff #(4) d0_0 (
5131.l1clk(l1clk),
5132.siclk(siclk),
5133.soclk(soclk),
5134.d(fdin[3:0]),
5135.si({scan_in,so[2:0]}),
5136.so({so[2:0],scan_out}),
5137.q(dout[3:0])
5138);
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151endmodule
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165// any PARAMS parms go into naming of macro
5166
5167module tcu_jtag_ctl_msff_ctl_macro__clr_1__en_1__width_1 (
5168 din,
5169 en,
5170 clr,
5171 l1clk,
5172 scan_in,
5173 siclk,
5174 soclk,
5175 dout,
5176 scan_out);
5177wire [0:0] fdin;
5178
5179 input [0:0] din;
5180 input en;
5181 input clr;
5182 input l1clk;
5183 input scan_in;
5184
5185
5186 input siclk;
5187 input soclk;
5188
5189 output [0:0] dout;
5190 output scan_out;
5191assign fdin[0:0] = (din[0:0] & {1{en}} & ~{1{clr}}) | (dout[0:0] & ~{1{en}} & ~{1{clr}});
5192
5193
5194
5195
5196
5197
5198dff #(1) d0_0 (
5199.l1clk(l1clk),
5200.siclk(siclk),
5201.soclk(soclk),
5202.d(fdin[0:0]),
5203.si(scan_in),
5204.so(scan_out),
5205.q(dout[0:0])
5206);
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219endmodule
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233// any PARAMS parms go into naming of macro
5234
5235module tcu_jtag_ctl_msff_ctl_macro__width_37 (
5236 din,
5237 l1clk,
5238 scan_in,
5239 siclk,
5240 soclk,
5241 dout,
5242 scan_out);
5243wire [36:0] fdin;
5244wire [35:0] so;
5245
5246 input [36:0] din;
5247 input l1clk;
5248 input scan_in;
5249
5250
5251 input siclk;
5252 input soclk;
5253
5254 output [36:0] dout;
5255 output scan_out;
5256assign fdin[36:0] = din[36:0];
5257
5258
5259
5260
5261
5262
5263dff #(37) d0_0 (
5264.l1clk(l1clk),
5265.siclk(siclk),
5266.soclk(soclk),
5267.d(fdin[36:0]),
5268.si({scan_in,so[35:0]}),
5269.so({so[35:0],scan_out}),
5270.q(dout[36:0])
5271);
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284endmodule
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298// any PARAMS parms go into naming of macro
5299
5300module tcu_jtag_ctl_msff_ctl_macro__width_8 (
5301 din,
5302 l1clk,
5303 scan_in,
5304 siclk,
5305 soclk,
5306 dout,
5307 scan_out);
5308wire [7:0] fdin;
5309wire [6:0] so;
5310
5311 input [7:0] din;
5312 input l1clk;
5313 input scan_in;
5314
5315
5316 input siclk;
5317 input soclk;
5318
5319 output [7:0] dout;
5320 output scan_out;
5321assign fdin[7:0] = din[7:0];
5322
5323
5324
5325
5326
5327
5328dff #(8) d0_0 (
5329.l1clk(l1clk),
5330.siclk(siclk),
5331.soclk(soclk),
5332.d(fdin[7:0]),
5333.si({scan_in,so[6:0]}),
5334.so({so[6:0],scan_out}),
5335.q(dout[7:0])
5336);
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349endmodule
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363// any PARAMS parms go into naming of macro
5364
5365module tcu_jtag_ctl_msff_ctl_macro__width_40 (
5366 din,
5367 l1clk,
5368 scan_in,
5369 siclk,
5370 soclk,
5371 dout,
5372 scan_out);
5373wire [39:0] fdin;
5374wire [38:0] so;
5375
5376 input [39:0] din;
5377 input l1clk;
5378 input scan_in;
5379
5380
5381 input siclk;
5382 input soclk;
5383
5384 output [39:0] dout;
5385 output scan_out;
5386assign fdin[39:0] = din[39:0];
5387
5388
5389
5390
5391
5392
5393dff #(40) d0_0 (
5394.l1clk(l1clk),
5395.siclk(siclk),
5396.soclk(soclk),
5397.d(fdin[39:0]),
5398.si({scan_in,so[38:0]}),
5399.so({so[38:0],scan_out}),
5400.q(dout[39:0])
5401);
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414endmodule
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428// any PARAMS parms go into naming of macro
5429
5430module tcu_jtag_ctl_msff_ctl_macro__width_64 (
5431 din,
5432 l1clk,
5433 scan_in,
5434 siclk,
5435 soclk,
5436 dout,
5437 scan_out);
5438wire [63:0] fdin;
5439wire [62:0] so;
5440
5441 input [63:0] din;
5442 input l1clk;
5443 input scan_in;
5444
5445
5446 input siclk;
5447 input soclk;
5448
5449 output [63:0] dout;
5450 output scan_out;
5451assign fdin[63:0] = din[63:0];
5452
5453
5454
5455
5456
5457
5458dff #(64) d0_0 (
5459.l1clk(l1clk),
5460.siclk(siclk),
5461.soclk(soclk),
5462.d(fdin[63:0]),
5463.si({scan_in,so[62:0]}),
5464.so({so[62:0],scan_out}),
5465.q(dout[63:0])
5466);
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479endmodule
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493// any PARAMS parms go into naming of macro
5494
5495module tcu_jtag_ctl_msff_ctl_macro__width_65 (
5496 din,
5497 l1clk,
5498 scan_in,
5499 siclk,
5500 soclk,
5501 dout,
5502 scan_out);
5503wire [64:0] fdin;
5504wire [63:0] so;
5505
5506 input [64:0] din;
5507 input l1clk;
5508 input scan_in;
5509
5510
5511 input siclk;
5512 input soclk;
5513
5514 output [64:0] dout;
5515 output scan_out;
5516assign fdin[64:0] = din[64:0];
5517
5518
5519
5520
5521
5522
5523dff #(65) d0_0 (
5524.l1clk(l1clk),
5525.siclk(siclk),
5526.soclk(soclk),
5527.d(fdin[64:0]),
5528.si({scan_in,so[63:0]}),
5529.so({so[63:0],scan_out}),
5530.q(dout[64:0])
5531);
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544endmodule
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558// any PARAMS parms go into naming of macro
5559
5560module tcu_jtag_ctl_msff_ctl_macro__clr_1__width_1 (
5561 din,
5562 clr,
5563 l1clk,
5564 scan_in,
5565 siclk,
5566 soclk,
5567 dout,
5568 scan_out);
5569wire [0:0] fdin;
5570
5571 input [0:0] din;
5572 input clr;
5573 input l1clk;
5574 input scan_in;
5575
5576
5577 input siclk;
5578 input soclk;
5579
5580 output [0:0] dout;
5581 output scan_out;
5582assign fdin[0:0] = din[0:0] & ~{1{clr}};
5583
5584
5585
5586
5587
5588
5589dff #(1) d0_0 (
5590.l1clk(l1clk),
5591.siclk(siclk),
5592.soclk(soclk),
5593.d(fdin[0:0]),
5594.si(scan_in),
5595.so(scan_out),
5596.q(dout[0:0])
5597);
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610endmodule
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620// Description: Spare gate macro for control blocks
5621//
5622// Param num controls the number of times the macro is added
5623// flops=0 can be used to use only combination spare logic
5624
5625
5626module tcu_jtag_ctl_spare_ctl_macro__flops_0__num_12;
5627wire spare0_buf_32x_unused;
5628wire spare0_nand3_8x_unused;
5629wire spare0_inv_8x_unused;
5630wire spare0_aoi22_4x_unused;
5631wire spare0_buf_8x_unused;
5632wire spare0_oai22_4x_unused;
5633wire spare0_inv_16x_unused;
5634wire spare0_nand2_16x_unused;
5635wire spare0_nor3_4x_unused;
5636wire spare0_nand2_8x_unused;
5637wire spare0_buf_16x_unused;
5638wire spare0_nor2_16x_unused;
5639wire spare0_inv_32x_unused;
5640wire spare1_buf_32x_unused;
5641wire spare1_nand3_8x_unused;
5642wire spare1_inv_8x_unused;
5643wire spare1_aoi22_4x_unused;
5644wire spare1_buf_8x_unused;
5645wire spare1_oai22_4x_unused;
5646wire spare1_inv_16x_unused;
5647wire spare1_nand2_16x_unused;
5648wire spare1_nor3_4x_unused;
5649wire spare1_nand2_8x_unused;
5650wire spare1_buf_16x_unused;
5651wire spare1_nor2_16x_unused;
5652wire spare1_inv_32x_unused;
5653wire spare2_buf_32x_unused;
5654wire spare2_nand3_8x_unused;
5655wire spare2_inv_8x_unused;
5656wire spare2_aoi22_4x_unused;
5657wire spare2_buf_8x_unused;
5658wire spare2_oai22_4x_unused;
5659wire spare2_inv_16x_unused;
5660wire spare2_nand2_16x_unused;
5661wire spare2_nor3_4x_unused;
5662wire spare2_nand2_8x_unused;
5663wire spare2_buf_16x_unused;
5664wire spare2_nor2_16x_unused;
5665wire spare2_inv_32x_unused;
5666wire spare3_buf_32x_unused;
5667wire spare3_nand3_8x_unused;
5668wire spare3_inv_8x_unused;
5669wire spare3_aoi22_4x_unused;
5670wire spare3_buf_8x_unused;
5671wire spare3_oai22_4x_unused;
5672wire spare3_inv_16x_unused;
5673wire spare3_nand2_16x_unused;
5674wire spare3_nor3_4x_unused;
5675wire spare3_nand2_8x_unused;
5676wire spare3_buf_16x_unused;
5677wire spare3_nor2_16x_unused;
5678wire spare3_inv_32x_unused;
5679wire spare4_buf_32x_unused;
5680wire spare4_nand3_8x_unused;
5681wire spare4_inv_8x_unused;
5682wire spare4_aoi22_4x_unused;
5683wire spare4_buf_8x_unused;
5684wire spare4_oai22_4x_unused;
5685wire spare4_inv_16x_unused;
5686wire spare4_nand2_16x_unused;
5687wire spare4_nor3_4x_unused;
5688wire spare4_nand2_8x_unused;
5689wire spare4_buf_16x_unused;
5690wire spare4_nor2_16x_unused;
5691wire spare4_inv_32x_unused;
5692wire spare5_buf_32x_unused;
5693wire spare5_nand3_8x_unused;
5694wire spare5_inv_8x_unused;
5695wire spare5_aoi22_4x_unused;
5696wire spare5_buf_8x_unused;
5697wire spare5_oai22_4x_unused;
5698wire spare5_inv_16x_unused;
5699wire spare5_nand2_16x_unused;
5700wire spare5_nor3_4x_unused;
5701wire spare5_nand2_8x_unused;
5702wire spare5_buf_16x_unused;
5703wire spare5_nor2_16x_unused;
5704wire spare5_inv_32x_unused;
5705wire spare6_buf_32x_unused;
5706wire spare6_nand3_8x_unused;
5707wire spare6_inv_8x_unused;
5708wire spare6_aoi22_4x_unused;
5709wire spare6_buf_8x_unused;
5710wire spare6_oai22_4x_unused;
5711wire spare6_inv_16x_unused;
5712wire spare6_nand2_16x_unused;
5713wire spare6_nor3_4x_unused;
5714wire spare6_nand2_8x_unused;
5715wire spare6_buf_16x_unused;
5716wire spare6_nor2_16x_unused;
5717wire spare6_inv_32x_unused;
5718wire spare7_buf_32x_unused;
5719wire spare7_nand3_8x_unused;
5720wire spare7_inv_8x_unused;
5721wire spare7_aoi22_4x_unused;
5722wire spare7_buf_8x_unused;
5723wire spare7_oai22_4x_unused;
5724wire spare7_inv_16x_unused;
5725wire spare7_nand2_16x_unused;
5726wire spare7_nor3_4x_unused;
5727wire spare7_nand2_8x_unused;
5728wire spare7_buf_16x_unused;
5729wire spare7_nor2_16x_unused;
5730wire spare7_inv_32x_unused;
5731wire spare8_buf_32x_unused;
5732wire spare8_nand3_8x_unused;
5733wire spare8_inv_8x_unused;
5734wire spare8_aoi22_4x_unused;
5735wire spare8_buf_8x_unused;
5736wire spare8_oai22_4x_unused;
5737wire spare8_inv_16x_unused;
5738wire spare8_nand2_16x_unused;
5739wire spare8_nor3_4x_unused;
5740wire spare8_nand2_8x_unused;
5741wire spare8_buf_16x_unused;
5742wire spare8_nor2_16x_unused;
5743wire spare8_inv_32x_unused;
5744wire spare9_buf_32x_unused;
5745wire spare9_nand3_8x_unused;
5746wire spare9_inv_8x_unused;
5747wire spare9_aoi22_4x_unused;
5748wire spare9_buf_8x_unused;
5749wire spare9_oai22_4x_unused;
5750wire spare9_inv_16x_unused;
5751wire spare9_nand2_16x_unused;
5752wire spare9_nor3_4x_unused;
5753wire spare9_nand2_8x_unused;
5754wire spare9_buf_16x_unused;
5755wire spare9_nor2_16x_unused;
5756wire spare9_inv_32x_unused;
5757wire spare10_buf_32x_unused;
5758wire spare10_nand3_8x_unused;
5759wire spare10_inv_8x_unused;
5760wire spare10_aoi22_4x_unused;
5761wire spare10_buf_8x_unused;
5762wire spare10_oai22_4x_unused;
5763wire spare10_inv_16x_unused;
5764wire spare10_nand2_16x_unused;
5765wire spare10_nor3_4x_unused;
5766wire spare10_nand2_8x_unused;
5767wire spare10_buf_16x_unused;
5768wire spare10_nor2_16x_unused;
5769wire spare10_inv_32x_unused;
5770wire spare11_buf_32x_unused;
5771wire spare11_nand3_8x_unused;
5772wire spare11_inv_8x_unused;
5773wire spare11_aoi22_4x_unused;
5774wire spare11_buf_8x_unused;
5775wire spare11_oai22_4x_unused;
5776wire spare11_inv_16x_unused;
5777wire spare11_nand2_16x_unused;
5778wire spare11_nor3_4x_unused;
5779wire spare11_nand2_8x_unused;
5780wire spare11_buf_16x_unused;
5781wire spare11_nor2_16x_unused;
5782wire spare11_inv_32x_unused;
5783
5784
5785cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
5786 .out(spare0_buf_32x_unused));
5787cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
5788 .in1(1'b1),
5789 .in2(1'b1),
5790 .out(spare0_nand3_8x_unused));
5791cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
5792 .out(spare0_inv_8x_unused));
5793cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
5794 .in01(1'b1),
5795 .in10(1'b1),
5796 .in11(1'b1),
5797 .out(spare0_aoi22_4x_unused));
5798cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
5799 .out(spare0_buf_8x_unused));
5800cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
5801 .in01(1'b1),
5802 .in10(1'b1),
5803 .in11(1'b1),
5804 .out(spare0_oai22_4x_unused));
5805cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
5806 .out(spare0_inv_16x_unused));
5807cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
5808 .in1(1'b1),
5809 .out(spare0_nand2_16x_unused));
5810cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
5811 .in1(1'b0),
5812 .in2(1'b0),
5813 .out(spare0_nor3_4x_unused));
5814cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
5815 .in1(1'b1),
5816 .out(spare0_nand2_8x_unused));
5817cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
5818 .out(spare0_buf_16x_unused));
5819cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
5820 .in1(1'b0),
5821 .out(spare0_nor2_16x_unused));
5822cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
5823 .out(spare0_inv_32x_unused));
5824
5825cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
5826 .out(spare1_buf_32x_unused));
5827cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
5828 .in1(1'b1),
5829 .in2(1'b1),
5830 .out(spare1_nand3_8x_unused));
5831cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
5832 .out(spare1_inv_8x_unused));
5833cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
5834 .in01(1'b1),
5835 .in10(1'b1),
5836 .in11(1'b1),
5837 .out(spare1_aoi22_4x_unused));
5838cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
5839 .out(spare1_buf_8x_unused));
5840cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
5841 .in01(1'b1),
5842 .in10(1'b1),
5843 .in11(1'b1),
5844 .out(spare1_oai22_4x_unused));
5845cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
5846 .out(spare1_inv_16x_unused));
5847cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
5848 .in1(1'b1),
5849 .out(spare1_nand2_16x_unused));
5850cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
5851 .in1(1'b0),
5852 .in2(1'b0),
5853 .out(spare1_nor3_4x_unused));
5854cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
5855 .in1(1'b1),
5856 .out(spare1_nand2_8x_unused));
5857cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
5858 .out(spare1_buf_16x_unused));
5859cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
5860 .in1(1'b0),
5861 .out(spare1_nor2_16x_unused));
5862cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
5863 .out(spare1_inv_32x_unused));
5864
5865cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
5866 .out(spare2_buf_32x_unused));
5867cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
5868 .in1(1'b1),
5869 .in2(1'b1),
5870 .out(spare2_nand3_8x_unused));
5871cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
5872 .out(spare2_inv_8x_unused));
5873cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
5874 .in01(1'b1),
5875 .in10(1'b1),
5876 .in11(1'b1),
5877 .out(spare2_aoi22_4x_unused));
5878cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
5879 .out(spare2_buf_8x_unused));
5880cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
5881 .in01(1'b1),
5882 .in10(1'b1),
5883 .in11(1'b1),
5884 .out(spare2_oai22_4x_unused));
5885cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
5886 .out(spare2_inv_16x_unused));
5887cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
5888 .in1(1'b1),
5889 .out(spare2_nand2_16x_unused));
5890cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
5891 .in1(1'b0),
5892 .in2(1'b0),
5893 .out(spare2_nor3_4x_unused));
5894cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
5895 .in1(1'b1),
5896 .out(spare2_nand2_8x_unused));
5897cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
5898 .out(spare2_buf_16x_unused));
5899cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
5900 .in1(1'b0),
5901 .out(spare2_nor2_16x_unused));
5902cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
5903 .out(spare2_inv_32x_unused));
5904
5905cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
5906 .out(spare3_buf_32x_unused));
5907cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
5908 .in1(1'b1),
5909 .in2(1'b1),
5910 .out(spare3_nand3_8x_unused));
5911cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
5912 .out(spare3_inv_8x_unused));
5913cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
5914 .in01(1'b1),
5915 .in10(1'b1),
5916 .in11(1'b1),
5917 .out(spare3_aoi22_4x_unused));
5918cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
5919 .out(spare3_buf_8x_unused));
5920cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
5921 .in01(1'b1),
5922 .in10(1'b1),
5923 .in11(1'b1),
5924 .out(spare3_oai22_4x_unused));
5925cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
5926 .out(spare3_inv_16x_unused));
5927cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
5928 .in1(1'b1),
5929 .out(spare3_nand2_16x_unused));
5930cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
5931 .in1(1'b0),
5932 .in2(1'b0),
5933 .out(spare3_nor3_4x_unused));
5934cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
5935 .in1(1'b1),
5936 .out(spare3_nand2_8x_unused));
5937cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
5938 .out(spare3_buf_16x_unused));
5939cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
5940 .in1(1'b0),
5941 .out(spare3_nor2_16x_unused));
5942cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
5943 .out(spare3_inv_32x_unused));
5944
5945cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
5946 .out(spare4_buf_32x_unused));
5947cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
5948 .in1(1'b1),
5949 .in2(1'b1),
5950 .out(spare4_nand3_8x_unused));
5951cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
5952 .out(spare4_inv_8x_unused));
5953cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
5954 .in01(1'b1),
5955 .in10(1'b1),
5956 .in11(1'b1),
5957 .out(spare4_aoi22_4x_unused));
5958cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
5959 .out(spare4_buf_8x_unused));
5960cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
5961 .in01(1'b1),
5962 .in10(1'b1),
5963 .in11(1'b1),
5964 .out(spare4_oai22_4x_unused));
5965cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
5966 .out(spare4_inv_16x_unused));
5967cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
5968 .in1(1'b1),
5969 .out(spare4_nand2_16x_unused));
5970cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
5971 .in1(1'b0),
5972 .in2(1'b0),
5973 .out(spare4_nor3_4x_unused));
5974cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
5975 .in1(1'b1),
5976 .out(spare4_nand2_8x_unused));
5977cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
5978 .out(spare4_buf_16x_unused));
5979cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
5980 .in1(1'b0),
5981 .out(spare4_nor2_16x_unused));
5982cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
5983 .out(spare4_inv_32x_unused));
5984
5985cl_u1_buf_32x spare5_buf_32x (.in(1'b1),
5986 .out(spare5_buf_32x_unused));
5987cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1),
5988 .in1(1'b1),
5989 .in2(1'b1),
5990 .out(spare5_nand3_8x_unused));
5991cl_u1_inv_8x spare5_inv_8x (.in(1'b1),
5992 .out(spare5_inv_8x_unused));
5993cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1),
5994 .in01(1'b1),
5995 .in10(1'b1),
5996 .in11(1'b1),
5997 .out(spare5_aoi22_4x_unused));
5998cl_u1_buf_8x spare5_buf_8x (.in(1'b1),
5999 .out(spare5_buf_8x_unused));
6000cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1),
6001 .in01(1'b1),
6002 .in10(1'b1),
6003 .in11(1'b1),
6004 .out(spare5_oai22_4x_unused));
6005cl_u1_inv_16x spare5_inv_16x (.in(1'b1),
6006 .out(spare5_inv_16x_unused));
6007cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1),
6008 .in1(1'b1),
6009 .out(spare5_nand2_16x_unused));
6010cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0),
6011 .in1(1'b0),
6012 .in2(1'b0),
6013 .out(spare5_nor3_4x_unused));
6014cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1),
6015 .in1(1'b1),
6016 .out(spare5_nand2_8x_unused));
6017cl_u1_buf_16x spare5_buf_16x (.in(1'b1),
6018 .out(spare5_buf_16x_unused));
6019cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0),
6020 .in1(1'b0),
6021 .out(spare5_nor2_16x_unused));
6022cl_u1_inv_32x spare5_inv_32x (.in(1'b1),
6023 .out(spare5_inv_32x_unused));
6024
6025cl_u1_buf_32x spare6_buf_32x (.in(1'b1),
6026 .out(spare6_buf_32x_unused));
6027cl_u1_nand3_8x spare6_nand3_8x (.in0(1'b1),
6028 .in1(1'b1),
6029 .in2(1'b1),
6030 .out(spare6_nand3_8x_unused));
6031cl_u1_inv_8x spare6_inv_8x (.in(1'b1),
6032 .out(spare6_inv_8x_unused));
6033cl_u1_aoi22_4x spare6_aoi22_4x (.in00(1'b1),
6034 .in01(1'b1),
6035 .in10(1'b1),
6036 .in11(1'b1),
6037 .out(spare6_aoi22_4x_unused));
6038cl_u1_buf_8x spare6_buf_8x (.in(1'b1),
6039 .out(spare6_buf_8x_unused));
6040cl_u1_oai22_4x spare6_oai22_4x (.in00(1'b1),
6041 .in01(1'b1),
6042 .in10(1'b1),
6043 .in11(1'b1),
6044 .out(spare6_oai22_4x_unused));
6045cl_u1_inv_16x spare6_inv_16x (.in(1'b1),
6046 .out(spare6_inv_16x_unused));
6047cl_u1_nand2_16x spare6_nand2_16x (.in0(1'b1),
6048 .in1(1'b1),
6049 .out(spare6_nand2_16x_unused));
6050cl_u1_nor3_4x spare6_nor3_4x (.in0(1'b0),
6051 .in1(1'b0),
6052 .in2(1'b0),
6053 .out(spare6_nor3_4x_unused));
6054cl_u1_nand2_8x spare6_nand2_8x (.in0(1'b1),
6055 .in1(1'b1),
6056 .out(spare6_nand2_8x_unused));
6057cl_u1_buf_16x spare6_buf_16x (.in(1'b1),
6058 .out(spare6_buf_16x_unused));
6059cl_u1_nor2_16x spare6_nor2_16x (.in0(1'b0),
6060 .in1(1'b0),
6061 .out(spare6_nor2_16x_unused));
6062cl_u1_inv_32x spare6_inv_32x (.in(1'b1),
6063 .out(spare6_inv_32x_unused));
6064
6065cl_u1_buf_32x spare7_buf_32x (.in(1'b1),
6066 .out(spare7_buf_32x_unused));
6067cl_u1_nand3_8x spare7_nand3_8x (.in0(1'b1),
6068 .in1(1'b1),
6069 .in2(1'b1),
6070 .out(spare7_nand3_8x_unused));
6071cl_u1_inv_8x spare7_inv_8x (.in(1'b1),
6072 .out(spare7_inv_8x_unused));
6073cl_u1_aoi22_4x spare7_aoi22_4x (.in00(1'b1),
6074 .in01(1'b1),
6075 .in10(1'b1),
6076 .in11(1'b1),
6077 .out(spare7_aoi22_4x_unused));
6078cl_u1_buf_8x spare7_buf_8x (.in(1'b1),
6079 .out(spare7_buf_8x_unused));
6080cl_u1_oai22_4x spare7_oai22_4x (.in00(1'b1),
6081 .in01(1'b1),
6082 .in10(1'b1),
6083 .in11(1'b1),
6084 .out(spare7_oai22_4x_unused));
6085cl_u1_inv_16x spare7_inv_16x (.in(1'b1),
6086 .out(spare7_inv_16x_unused));
6087cl_u1_nand2_16x spare7_nand2_16x (.in0(1'b1),
6088 .in1(1'b1),
6089 .out(spare7_nand2_16x_unused));
6090cl_u1_nor3_4x spare7_nor3_4x (.in0(1'b0),
6091 .in1(1'b0),
6092 .in2(1'b0),
6093 .out(spare7_nor3_4x_unused));
6094cl_u1_nand2_8x spare7_nand2_8x (.in0(1'b1),
6095 .in1(1'b1),
6096 .out(spare7_nand2_8x_unused));
6097cl_u1_buf_16x spare7_buf_16x (.in(1'b1),
6098 .out(spare7_buf_16x_unused));
6099cl_u1_nor2_16x spare7_nor2_16x (.in0(1'b0),
6100 .in1(1'b0),
6101 .out(spare7_nor2_16x_unused));
6102cl_u1_inv_32x spare7_inv_32x (.in(1'b1),
6103 .out(spare7_inv_32x_unused));
6104
6105cl_u1_buf_32x spare8_buf_32x (.in(1'b1),
6106 .out(spare8_buf_32x_unused));
6107cl_u1_nand3_8x spare8_nand3_8x (.in0(1'b1),
6108 .in1(1'b1),
6109 .in2(1'b1),
6110 .out(spare8_nand3_8x_unused));
6111cl_u1_inv_8x spare8_inv_8x (.in(1'b1),
6112 .out(spare8_inv_8x_unused));
6113cl_u1_aoi22_4x spare8_aoi22_4x (.in00(1'b1),
6114 .in01(1'b1),
6115 .in10(1'b1),
6116 .in11(1'b1),
6117 .out(spare8_aoi22_4x_unused));
6118cl_u1_buf_8x spare8_buf_8x (.in(1'b1),
6119 .out(spare8_buf_8x_unused));
6120cl_u1_oai22_4x spare8_oai22_4x (.in00(1'b1),
6121 .in01(1'b1),
6122 .in10(1'b1),
6123 .in11(1'b1),
6124 .out(spare8_oai22_4x_unused));
6125cl_u1_inv_16x spare8_inv_16x (.in(1'b1),
6126 .out(spare8_inv_16x_unused));
6127cl_u1_nand2_16x spare8_nand2_16x (.in0(1'b1),
6128 .in1(1'b1),
6129 .out(spare8_nand2_16x_unused));
6130cl_u1_nor3_4x spare8_nor3_4x (.in0(1'b0),
6131 .in1(1'b0),
6132 .in2(1'b0),
6133 .out(spare8_nor3_4x_unused));
6134cl_u1_nand2_8x spare8_nand2_8x (.in0(1'b1),
6135 .in1(1'b1),
6136 .out(spare8_nand2_8x_unused));
6137cl_u1_buf_16x spare8_buf_16x (.in(1'b1),
6138 .out(spare8_buf_16x_unused));
6139cl_u1_nor2_16x spare8_nor2_16x (.in0(1'b0),
6140 .in1(1'b0),
6141 .out(spare8_nor2_16x_unused));
6142cl_u1_inv_32x spare8_inv_32x (.in(1'b1),
6143 .out(spare8_inv_32x_unused));
6144
6145cl_u1_buf_32x spare9_buf_32x (.in(1'b1),
6146 .out(spare9_buf_32x_unused));
6147cl_u1_nand3_8x spare9_nand3_8x (.in0(1'b1),
6148 .in1(1'b1),
6149 .in2(1'b1),
6150 .out(spare9_nand3_8x_unused));
6151cl_u1_inv_8x spare9_inv_8x (.in(1'b1),
6152 .out(spare9_inv_8x_unused));
6153cl_u1_aoi22_4x spare9_aoi22_4x (.in00(1'b1),
6154 .in01(1'b1),
6155 .in10(1'b1),
6156 .in11(1'b1),
6157 .out(spare9_aoi22_4x_unused));
6158cl_u1_buf_8x spare9_buf_8x (.in(1'b1),
6159 .out(spare9_buf_8x_unused));
6160cl_u1_oai22_4x spare9_oai22_4x (.in00(1'b1),
6161 .in01(1'b1),
6162 .in10(1'b1),
6163 .in11(1'b1),
6164 .out(spare9_oai22_4x_unused));
6165cl_u1_inv_16x spare9_inv_16x (.in(1'b1),
6166 .out(spare9_inv_16x_unused));
6167cl_u1_nand2_16x spare9_nand2_16x (.in0(1'b1),
6168 .in1(1'b1),
6169 .out(spare9_nand2_16x_unused));
6170cl_u1_nor3_4x spare9_nor3_4x (.in0(1'b0),
6171 .in1(1'b0),
6172 .in2(1'b0),
6173 .out(spare9_nor3_4x_unused));
6174cl_u1_nand2_8x spare9_nand2_8x (.in0(1'b1),
6175 .in1(1'b1),
6176 .out(spare9_nand2_8x_unused));
6177cl_u1_buf_16x spare9_buf_16x (.in(1'b1),
6178 .out(spare9_buf_16x_unused));
6179cl_u1_nor2_16x spare9_nor2_16x (.in0(1'b0),
6180 .in1(1'b0),
6181 .out(spare9_nor2_16x_unused));
6182cl_u1_inv_32x spare9_inv_32x (.in(1'b1),
6183 .out(spare9_inv_32x_unused));
6184
6185cl_u1_buf_32x spare10_buf_32x (.in(1'b1),
6186 .out(spare10_buf_32x_unused));
6187cl_u1_nand3_8x spare10_nand3_8x (.in0(1'b1),
6188 .in1(1'b1),
6189 .in2(1'b1),
6190 .out(spare10_nand3_8x_unused));
6191cl_u1_inv_8x spare10_inv_8x (.in(1'b1),
6192 .out(spare10_inv_8x_unused));
6193cl_u1_aoi22_4x spare10_aoi22_4x (.in00(1'b1),
6194 .in01(1'b1),
6195 .in10(1'b1),
6196 .in11(1'b1),
6197 .out(spare10_aoi22_4x_unused));
6198cl_u1_buf_8x spare10_buf_8x (.in(1'b1),
6199 .out(spare10_buf_8x_unused));
6200cl_u1_oai22_4x spare10_oai22_4x (.in00(1'b1),
6201 .in01(1'b1),
6202 .in10(1'b1),
6203 .in11(1'b1),
6204 .out(spare10_oai22_4x_unused));
6205cl_u1_inv_16x spare10_inv_16x (.in(1'b1),
6206 .out(spare10_inv_16x_unused));
6207cl_u1_nand2_16x spare10_nand2_16x (.in0(1'b1),
6208 .in1(1'b1),
6209 .out(spare10_nand2_16x_unused));
6210cl_u1_nor3_4x spare10_nor3_4x (.in0(1'b0),
6211 .in1(1'b0),
6212 .in2(1'b0),
6213 .out(spare10_nor3_4x_unused));
6214cl_u1_nand2_8x spare10_nand2_8x (.in0(1'b1),
6215 .in1(1'b1),
6216 .out(spare10_nand2_8x_unused));
6217cl_u1_buf_16x spare10_buf_16x (.in(1'b1),
6218 .out(spare10_buf_16x_unused));
6219cl_u1_nor2_16x spare10_nor2_16x (.in0(1'b0),
6220 .in1(1'b0),
6221 .out(spare10_nor2_16x_unused));
6222cl_u1_inv_32x spare10_inv_32x (.in(1'b1),
6223 .out(spare10_inv_32x_unused));
6224
6225cl_u1_buf_32x spare11_buf_32x (.in(1'b1),
6226 .out(spare11_buf_32x_unused));
6227cl_u1_nand3_8x spare11_nand3_8x (.in0(1'b1),
6228 .in1(1'b1),
6229 .in2(1'b1),
6230 .out(spare11_nand3_8x_unused));
6231cl_u1_inv_8x spare11_inv_8x (.in(1'b1),
6232 .out(spare11_inv_8x_unused));
6233cl_u1_aoi22_4x spare11_aoi22_4x (.in00(1'b1),
6234 .in01(1'b1),
6235 .in10(1'b1),
6236 .in11(1'b1),
6237 .out(spare11_aoi22_4x_unused));
6238cl_u1_buf_8x spare11_buf_8x (.in(1'b1),
6239 .out(spare11_buf_8x_unused));
6240cl_u1_oai22_4x spare11_oai22_4x (.in00(1'b1),
6241 .in01(1'b1),
6242 .in10(1'b1),
6243 .in11(1'b1),
6244 .out(spare11_oai22_4x_unused));
6245cl_u1_inv_16x spare11_inv_16x (.in(1'b1),
6246 .out(spare11_inv_16x_unused));
6247cl_u1_nand2_16x spare11_nand2_16x (.in0(1'b1),
6248 .in1(1'b1),
6249 .out(spare11_nand2_16x_unused));
6250cl_u1_nor3_4x spare11_nor3_4x (.in0(1'b0),
6251 .in1(1'b0),
6252 .in2(1'b0),
6253 .out(spare11_nor3_4x_unused));
6254cl_u1_nand2_8x spare11_nand2_8x (.in0(1'b1),
6255 .in1(1'b1),
6256 .out(spare11_nand2_8x_unused));
6257cl_u1_buf_16x spare11_buf_16x (.in(1'b1),
6258 .out(spare11_buf_16x_unused));
6259cl_u1_nor2_16x spare11_nor2_16x (.in0(1'b0),
6260 .in1(1'b0),
6261 .out(spare11_nor2_16x_unused));
6262cl_u1_inv_32x spare11_inv_32x (.in(1'b1),
6263 .out(spare11_inv_32x_unused));
6264
6265
6266
6267endmodule
6268
6269
6270
6271
6272
6273
6274// any PARAMS parms go into naming of macro
6275
6276module tcu_jtag_ctl_msff_ctl_macro__scanreverse_1__width_12 (
6277 din,
6278 l1clk,
6279 scan_in,
6280 siclk,
6281 soclk,
6282 dout,
6283 scan_out);
6284wire [11:0] fdin;
6285wire [0:10] so;
6286
6287 input [11:0] din;
6288 input l1clk;
6289 input scan_in;
6290
6291
6292 input siclk;
6293 input soclk;
6294
6295 output [11:0] dout;
6296 output scan_out;
6297assign fdin[11:0] = din[11:0];
6298
6299
6300
6301
6302
6303
6304dff #(12) d0_0 (
6305.l1clk(l1clk),
6306.siclk(siclk),
6307.soclk(soclk),
6308.d(fdin[11:0]),
6309.si({so[0:10],scan_in}),
6310.so({scan_out,so[0:10]}),
6311.q(dout[11:0])
6312);
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325endmodule
6326
6327
6328
6329
6330
6331
6332
6333