Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / tcu / rtl / tcu_ucb_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tcu_ucb_ctl.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35`define CNT_ADDR_HI 14
36`define CNT_ADDR_LO 12
37`define IAB_ADDR_HI 11
38`define IAB_ADDR_LO 9
39`define DAB_ADDR_HI 8
40`define DAB_ADDR_LO 6
41`define EXT_ADDR_HI 5
42`define EXT_ADDR_LO 3
43`define AE_ADDR_HI 2
44`define AE_ADDR_LO 0
45
46//debug event codes
47`define WATCH_POINT 2'b00
48`define HARD_STOP 2'b01
49`define SOFT_STOP 2'b10
50`define START_COUNT 2'b11
51
52//debug event status bit location
53`define CNT 4
54`define IAB 3
55`define DAB 2
56`define EXT 1
57`define AE 0
58
59// UCB defines, copied from Niagara iop/include/sys.h or iop.h
60`define UCB_BUF_HI 11 // (2) buffer ID
61`define UCB_BUF_LO 10
62`define UCB_THR_HI 9 // (6) cpu/thread ID
63`define UCB_THR_LO 4
64`define UCB_DATA_HI 127 // (64) data
65`define UCB_DATA_LO 64
66`define UCB_PKT_HI 3 // (4) packet type
67`define UCB_PKT_LO 0
68`define UCB_READ_ACK 4'b0001
69`define UCB_READ_REQ 4'b0100 // req types
70`define UCB_WRITE_ACK 4'b0010
71`define UCB_WRITE_REQ 4'b0101
72`define UCB_SIZE_HI 14 // (3) request size
73`define UCB_SIZE_LO 12
74`define UCB_BID_TAP 2'b01
75`define UCB_ADDR_HI 54 // (40) bit address
76`define UCB_ADDR_LO 15
77`define PCX_SZ_8B 3'b011 // encoding for 8B access
78
79// MBIST Defines
80`define NUM_TOTAL_MBIST_M1 47
81`define NUM_TOTAL_MBIST 48
82
83`define NUM_TOTAL_LBIST 8
84`define NUM_TOTAL_LBIST_M1 7
85
86`define MBIST_IDLE 4'd0
87`define POR_CLR_DF 4'd1
88`define POR_START 4'd2
89`define POR_CLR_START 4'd3
90`define POR_END_WAIT 4'd4
91`define WMR_DUMMY 4'd5
92`define WMR_CLR_DF 4'd6
93`define WMR_START 4'd7
94`define WMR_CLR_START 4'd8
95`define WMR_END_WAIT 4'd9
96`define BISX_CLR_DF 4'd10
97`define BISX_START 4'd11
98`define BISX_CLR_START 4'd12
99
100
101
102module tcu_ucb_ctl (
103 iol2clk,
104 scan_in,
105 scan_out,
106 tcu_int_aclk,
107 tcu_int_bclk,
108 tcu_int_se,
109 tcu_int_ce_ucb,
110 tcu_pce_ov,
111 tcu_tp_sync_2io,
112 ac_test_mode,
113 tcu_test_protect,
114 jtag_creg_addr,
115 jtag_creg_data,
116 jtag_creg_rd_en,
117 jtag_creg_wr_en,
118 jtag_creg_addr_en,
119 jtag_creg_data_en,
120 ucb_data_out,
121 ucb_jtag_data_rdy,
122 jtag_ucb_data_ack,
123 csr_ucb_data,
124 ucb_csr_wr,
125 ucb_csr_addr,
126 dbg_creg_access,
127 dbg_creg_addr,
128 dbg_creg_data,
129 dbg_creg_wr_en,
130 dbg_creg_addr_en,
131 dbg_creg_data_en,
132 tcu_ncu_stall,
133 ncu_tcu_vld,
134 ncu_tcu_data,
135 tcu_ncu_vld,
136 tcu_ncu_data,
137 ncu_tcu_stall);
138wire tcu_int_ce;
139wire l1en;
140wire pce_ov;
141wire stop;
142wire se;
143wire siclk;
144wire soclk;
145wire l1clk;
146wire jtag_creg_addr_en_sync;
147wire [39:0] creg_addr;
148wire creg_addr_reg_scanin;
149wire creg_addr_reg_scanout;
150wire jtag_creg_data_en_sync;
151wire [63:0] creg_data;
152wire creg_data_reg_scanin;
153wire creg_data_reg_scanout;
154wire ucbbusout8_ctl_scanin;
155wire ucbbusout8_ctl_scanout;
156wire [127:0] ucbout_buf;
157wire [15:0] ucbout_vec;
158wire ucbout_outdata_wr;
159wire ncu_tcu_stall_mission;
160wire ucbout_outdata_busy;
161wire jtag_rd_en_sync_d1_reg_scanin;
162wire jtag_rd_en_sync_d1_reg_scanout;
163wire jtag_rd_en_sync;
164wire jtag_rd_en_sync_d1;
165wire jtag_rd_req_din;
166wire req_acpt;
167wire jtag_rd_req;
168wire jtag_rd_req_reg_scanin;
169wire jtag_rd_req_reg_scanout;
170wire wr_en_sync_d1_din;
171wire jtag_creg_wr_en_sync;
172wire wr_en_sync_d1_reg_scanin;
173wire wr_en_sync_d1_reg_scanout;
174wire wr_en_sync_d1;
175wire wr_req_din;
176wire wr_req;
177wire wr_req_reg_scanin;
178wire wr_req_reg_scanout;
179wire jtag_rd_pend_din;
180wire ncu_rd_ack;
181wire jtag_rd_pend;
182wire jtag_rd_pend_reg_scanin;
183wire jtag_rd_pend_reg_scanout;
184wire ucbout_rd_pulse;
185wire csr_ack_req;
186wire ucbout_wr_pulse;
187wire ucbout_ack_pulse;
188wire ack_acpt;
189wire ncu_rd_req_d2;
190wire [3:0] ucbout_packet_type;
191wire [63:0] ucbout_data;
192wire [39:0] ucbout_addr;
193wire [2:0] ucbout_size;
194wire [1:0] ucbout_buf_id;
195wire [1:0] csr_buf_id;
196wire [5:0] ucbout_thr_id;
197wire [5:0] csr_thr_id;
198wire ncu_tcu_vld_mission;
199wire test_protect_reg_scanin;
200wire test_protect_reg_scanout;
201wire tcu_tp_io;
202wire ucbbusin8_ctl_scanin;
203wire ucbbusin8_ctl_scanout;
204wire ucbin_buf_vld;
205wire [127:0] ucbin_buf;
206wire [3:0] ucbin_request;
207wire [39:0] ucbin_address;
208wire [63:0] ucbin_data;
209wire ucbin_sel_tcu;
210wire ncu_wr_req;
211wire ncu_rd_req;
212wire ucb_csr_wr_reg_scanin;
213wire ucb_csr_wr_reg_scanout;
214wire ucb_csr_addr_reg_scanin;
215wire ucb_csr_addr_reg_scanout;
216wire ucb_jtag_data_rdy_din;
217wire jtag_ucb_data_ack_sync;
218wire ucb_jtag_data_rdy_reg_scanin;
219wire ucb_jtag_data_rdy_reg_scanout;
220wire ucb_data_out_en;
221wire [63:0] ucb_data_out_din;
222wire ucb_data_out_reg_scanin;
223wire ucb_data_out_reg_scanout;
224wire ncu_rd_req_d_reg_scanin;
225wire ncu_rd_req_d_reg_scanout;
226wire ncu_rd_req_d;
227wire ncu_rd_req_d2_reg_scanin;
228wire ncu_rd_req_d2_reg_scanout;
229wire csr_thr_id_en;
230wire [5:0] csr_thr_id_din;
231wire csr_thr_id_reg_scanin;
232wire csr_thr_id_reg_scanout;
233wire csr_buf_id_en;
234wire [1:0] csr_buf_id_din;
235wire csr_buf_id_reg_scanin;
236wire csr_buf_id_reg_scanout;
237wire csr_ack_req_din;
238wire csr_ack_req_reg_scanin;
239wire csr_ack_req_reg_scanout;
240wire jtag_rd_req_sync_reg_scanin;
241wire jtag_rd_req_sync_reg_scanout;
242wire jtag_creg_wr_en_sync_reg_scanin;
243wire jtag_creg_wr_en_sync_reg_scanout;
244wire jtag_creg_addr_en_sync_reg_scanin;
245wire jtag_creg_addr_en_sync_reg_scanout;
246wire jtag_creg_data_en_sync_reg_scanin;
247wire jtag_creg_data_en_sync_reg_scanout;
248wire jtag_ucb_data_ack_sync_reg_scanin;
249wire jtag_ucb_data_ack_sync_reg_scanout;
250wire spare_scanin;
251wire spare_scanout;
252
253
254//global
255input iol2clk;
256input scan_in;
257output scan_out;
258input tcu_int_aclk;
259input tcu_int_bclk;
260input tcu_int_se;
261input tcu_int_ce_ucb; // ECO A
262input tcu_pce_ov;
263
264// Protection during various test modes
265input tcu_tp_sync_2io;
266input ac_test_mode;
267output tcu_test_protect;
268
269//JTAG interface
270input [39:0] jtag_creg_addr;
271input [63:0] jtag_creg_data;
272input jtag_creg_rd_en;
273input jtag_creg_wr_en;
274input jtag_creg_addr_en;
275input jtag_creg_data_en;
276output [63:0] ucb_data_out;
277output ucb_jtag_data_rdy;
278input jtag_ucb_data_ack;
279
280// mbist_ctl Interface
281input [63:0] csr_ucb_data;
282output ucb_csr_wr;
283output [5:0] ucb_csr_addr;
284
285// Debug Soft Stop Interface
286input dbg_creg_access;
287input [39:0] dbg_creg_addr;
288input [63:0] dbg_creg_data; // for Parking Cores
289input dbg_creg_wr_en;
290input dbg_creg_addr_en;
291input dbg_creg_data_en;
292
293//NCU interface
294output tcu_ncu_stall;
295input ncu_tcu_vld;
296input [7:0] ncu_tcu_data;
297
298output tcu_ncu_vld;
299output [7:0] tcu_ncu_data;
300input ncu_tcu_stall;
301
302// Scan reassigns
303assign tcu_int_ce = tcu_int_ce_ucb; // ECO A
304assign l1en = tcu_int_ce; //1'b1; // this is "ce" or "pce"
305assign pce_ov = tcu_pce_ov; //1'b1;
306assign stop = 1'b0;
307assign se = tcu_int_se;
308assign siclk = tcu_int_aclk;
309assign soclk = tcu_int_bclk;
310
311//============================================================
312// L1 header for main UCB function
313//============================================================
314tcu_ucb_ctl_l1clkhdr_ctl_macro ucb_io_clkgen (
315 .l2clk ( iol2clk ),
316 .l1clk ( l1clk ),
317 .l1en(l1en),
318 .pce_ov(pce_ov),
319 .stop(stop),
320 .se(se));
321
322//============================================================
323// CREG Address Register
324//============================================================
325// jbus_clk (assume tck period always longer than jbus_clk - no handshake needed)
326// Only addr_en is synchronized, and the addr bus will be stable by then
327reg [39:0] creg_addr_din;
328
329always @(dbg_creg_access or dbg_creg_addr_en or dbg_creg_addr[39:0] or
330 jtag_creg_addr_en_sync or jtag_creg_addr[39:0] or creg_addr[39:0])
331begin
332 if (dbg_creg_access)
333 if (dbg_creg_addr_en)
334 creg_addr_din[39:0] = dbg_creg_addr[39:0];
335 else
336 creg_addr_din[39:0] = creg_addr[39:0];
337 else
338 if (jtag_creg_addr_en_sync)
339 creg_addr_din[39:0] = jtag_creg_addr[39:0];
340 else
341 creg_addr_din[39:0] = creg_addr[39:0];
342end
343
344tcu_ucb_ctl_msff_ctl_macro__width_40 creg_addr_reg (
345 .scan_in ( creg_addr_reg_scanin ),
346 .scan_out ( creg_addr_reg_scanout ),
347 .l1clk ( l1clk ),
348 .din ( creg_addr_din[39:0] ),
349 .dout ( creg_addr[39:0] ),
350 .siclk(siclk),
351 .soclk(soclk));
352
353//============================================================
354// CREG Data Register
355//============================================================
356// jbus_clk (assume tck period always longer than jbus_clk - no handshake needed)
357// Only data_en is synchronized, and the data bus will be stable by then
358reg [63:0] creg_data_din;
359
360always @(dbg_creg_access or dbg_creg_data_en or dbg_creg_data[63:0] or
361 jtag_creg_data_en_sync or jtag_creg_data[63:0] or creg_data[63:0])
362begin
363 if (dbg_creg_access)
364 if (dbg_creg_data_en)
365 creg_data_din[63:0] = dbg_creg_data[63:0];
366 else
367 creg_data_din[63:0] = creg_data[63:0];
368 else
369 if (jtag_creg_data_en_sync)
370 creg_data_din[63:0] = jtag_creg_data[63:0];
371 else
372 creg_data_din[63:0] = creg_data[63:0];
373end
374
375tcu_ucb_ctl_msff_ctl_macro__width_64 creg_data_reg (
376 .scan_in ( creg_data_reg_scanin ),
377 .scan_out ( creg_data_reg_scanout ),
378 .l1clk ( l1clk ),
379 .din ( creg_data_din[63:0] ),
380 .dout ( creg_data[63:0] ),
381 .siclk(siclk),
382 .soclk(soclk));
383
384
385//============================================================
386// Outbound UCB - Going From TCU to NCU
387//============================================================
388tcu_ucbbusout8_ctl ucbbusout8_ctl (
389 // scan, clocks
390 .scan_in ( ucbbusout8_ctl_scanin ),
391 .scan_out ( ucbbusout8_ctl_scanout ),
392 .iol2clk ( iol2clk ),
393 .tcu_pce_ov ( pce_ov ),
394 .tcu_clk_stop ( stop ),
395 .tcu_siclk_in ( tcu_int_aclk ),
396 .tcu_soclk_in ( tcu_int_bclk ),
397 .tcu_scan_en ( se ),
398 // inputs
399 .outdata_buf_in ( ucbout_buf[127:0] ),
400 .outdata_vec_in ( ucbout_vec[15:0] ),
401 .outdata_buf_wr ( ucbout_outdata_wr ),
402 .stall ( ncu_tcu_stall_mission ),
403 //outputs
404 .vld ( tcu_ncu_vld ),
405 .data ( tcu_ncu_data ),
406 .outdata_buf_busy ( ucbout_outdata_busy ),
407 .tcu_int_ce(tcu_int_ce));
408
409//********************************************************************
410// jtag request
411//********************************************************************
412
413// CREG Read Enable
414// jtag_creg_rd_en input is synchronized then used
415tcu_ucb_ctl_msff_ctl_macro__width_1 jtag_rd_en_sync_d1_reg (
416 .scan_in ( jtag_rd_en_sync_d1_reg_scanin ),
417 .scan_out ( jtag_rd_en_sync_d1_reg_scanout ),
418 .l1clk ( l1clk ),
419 .din ( jtag_rd_en_sync ),
420 .dout ( jtag_rd_en_sync_d1 ),
421 .siclk(siclk),
422 .soclk(soclk));
423
424assign jtag_rd_req_din = (jtag_rd_en_sync && !jtag_rd_en_sync_d1) ? 1'b1 :
425 req_acpt ? 1'b0 :
426 jtag_rd_req;
427
428tcu_ucb_ctl_msff_ctl_macro__width_1 jtag_rd_req_reg (
429 .scan_in ( jtag_rd_req_reg_scanin ),
430 .scan_out ( jtag_rd_req_reg_scanout ),
431 .l1clk ( l1clk ),
432 .din ( jtag_rd_req_din ),
433 .dout ( jtag_rd_req ),
434 .siclk(siclk),
435 .soclk(soclk));
436
437// CREG Write Enable
438// jtag_creg_wr_en input is synchronized then used
439assign wr_en_sync_d1_din = dbg_creg_access ? dbg_creg_wr_en : jtag_creg_wr_en_sync;
440
441tcu_ucb_ctl_msff_ctl_macro__width_1 wr_en_sync_d1_reg (
442 .scan_in ( wr_en_sync_d1_reg_scanin ),
443 .scan_out ( wr_en_sync_d1_reg_scanout ),
444 .l1clk ( l1clk ),
445 .din ( wr_en_sync_d1_din ),
446 .dout ( wr_en_sync_d1 ),
447 .siclk(siclk),
448 .soclk(soclk));
449
450assign wr_req_din = (wr_en_sync_d1_din && !wr_en_sync_d1) ? 1'b1 :
451 req_acpt ? 1'b0 :
452 wr_req;
453
454tcu_ucb_ctl_msff_ctl_macro__width_1 wr_req_reg (
455 .scan_in ( wr_req_reg_scanin ),
456 .scan_out ( wr_req_reg_scanout ),
457 .l1clk ( l1clk ),
458 .din ( wr_req_din ),
459 .dout ( wr_req ),
460 .siclk(siclk),
461 .soclk(soclk));
462
463// CREG Read Pending
464assign jtag_rd_pend_din = (jtag_rd_req && req_acpt) ? 1'b1 :
465 ncu_rd_ack ? 1'b0 :
466 jtag_rd_pend;
467
468tcu_ucb_ctl_msff_ctl_macro__width_1 jtag_rd_pend_reg
469(
470 .scan_in ( jtag_rd_pend_reg_scanin ),
471 .scan_out ( jtag_rd_pend_reg_scanout ),
472 .l1clk ( l1clk ),
473 .din ( jtag_rd_pend_din ),
474 .dout ( jtag_rd_pend ),
475 .siclk(siclk),
476 .soclk(soclk));
477
478// generate read or write valid pulse if busy signal unasserted and not servicing iob read request
479
480assign ucbout_rd_pulse = ~ucbout_outdata_busy &
481 ~csr_ack_req &
482 jtag_rd_req;
483
484assign ucbout_wr_pulse = ~ucbout_outdata_busy &
485 ~csr_ack_req &
486 wr_req;
487
488assign ucbout_ack_pulse = ~ucbout_outdata_busy & csr_ack_req;
489
490// accept request - assume never running jtag and ramtest mode concurrently
491assign req_acpt = ucbout_rd_pulse | ucbout_wr_pulse;
492assign ack_acpt = ucbout_ack_pulse;
493
494// issue request
495assign ucbout_outdata_wr = ucbout_rd_pulse || ucbout_wr_pulse || ncu_rd_req_d2;
496
497assign ucbout_vec[15:0] = ucbout_outdata_wr ? 16'hffff : 16'h00ff;
498
499assign ucbout_packet_type[3:0] = ncu_rd_req_d2 ?
500 `UCB_READ_ACK :
501 ucbout_wr_pulse ?
502 `UCB_WRITE_REQ :
503 `UCB_READ_REQ;
504
505assign ucbout_data[63:0] = ncu_rd_req_d2 ? csr_ucb_data : creg_data;
506assign ucbout_addr[39:0] = creg_addr;
507assign ucbout_size[2:0] = `PCX_SZ_8B;
508assign ucbout_buf_id[1:0] = ncu_rd_req_d2 ? csr_buf_id[1:0] : `UCB_BID_TAP;
509assign ucbout_thr_id[5:0] = ncu_rd_req_d2 ? csr_thr_id[5:0] : 6'b000000;
510
511assign ucbout_buf[127:0] = {
512 ucbout_data[63:0],
513 //9'h0,
514 5'h0,
515 ucbout_packet_type[0],
516 ucbout_packet_type[0],
517 1'b1,
518 ucbout_packet_type[0],
519 ucbout_addr[39:0],
520 ucbout_size[2:0],
521 ucbout_buf_id[1:0],
522 ucbout_thr_id[5:0],
523 ucbout_packet_type[3:0]};
524
525assign ncu_tcu_vld_mission = ncu_tcu_vld & ~tcu_tp_sync_2io; // protected during mbist, etc.
526assign ncu_tcu_stall_mission = ncu_tcu_stall & ~tcu_tp_sync_2io; // protected during mbist, etc.
527// if test_protect is set via jtag; intended to block ucb activity if scanning SOC causes
528// ucb requests to TCU
529tcu_ucb_ctl_msff_ctl_macro__width_1 test_protect_reg
530(
531 .scan_in ( test_protect_reg_scanin ),
532 .scan_out ( test_protect_reg_scanout ),
533 .l1clk ( l1clk ),
534 .din ( tcu_tp_sync_2io ),
535 .dout ( tcu_tp_io ),
536 .siclk(siclk),
537 .soclk(soclk));
538
539assign tcu_test_protect = ac_test_mode | tcu_tp_io; // protected during mbist, etc.
540// Note: even though ac_test_mode comes from cmp domain, it changes only when we enter Transition
541// Test (TT), and so before entering TT we will set test_protect via JTAG so no transition
542// occurs on tcu_test_protect due to ac_test_mode going high
543
544//============================================================
545// Inbound UCB - Coming From NCU to TCU
546//============================================================
547tcu_ucbbusin8_ctl ucbbusin8_ctl
548 (
549 // scan, clocks
550 .scan_in ( ucbbusin8_ctl_scanin ),
551 .scan_out ( ucbbusin8_ctl_scanout ),
552 .iol2clk ( iol2clk ),
553 .tcu_pce_ov ( pce_ov ),
554 .tcu_clk_stop ( stop ),
555 .tcu_siclk_in ( tcu_int_aclk ),
556 .tcu_soclk_in ( tcu_int_bclk ),
557 .tcu_scan_en ( se ),
558 // inputs
559 .vld ( ncu_tcu_vld_mission ),
560 .data ( ncu_tcu_data ),
561 .stall_a1 ( csr_ack_req ),
562 // outputs
563 .stall ( tcu_ncu_stall ),
564 .indata_buf_vld ( ucbin_buf_vld ),
565 .indata_buf ( ucbin_buf[127:0] ),
566 .tcu_int_ce(tcu_int_ce));
567
568
569//========================================
570// Incoming Request Decoding
571//========================================
572assign ucbin_request[3:0] = ucbin_buf[`UCB_PKT_HI:`UCB_PKT_LO];
573assign ucbin_address[39:0] = ucbin_buf[`UCB_ADDR_HI:`UCB_ADDR_LO];
574assign ucbin_data = ucbin_buf[`UCB_DATA_HI:`UCB_DATA_LO];
575assign ucbin_sel_tcu = (ucbin_address[39:32] == 8'h85);
576
577assign ncu_rd_ack = jtag_rd_pend && ucbin_buf_vld && (ucbin_request == `UCB_READ_ACK);
578assign ncu_wr_req = ucbin_sel_tcu && ucbin_buf_vld && (ucbin_request == `UCB_WRITE_REQ);
579assign ncu_rd_req = ucbin_sel_tcu && ucbin_buf_vld && (ucbin_request == `UCB_READ_REQ);
580
581//================================================================================
582// Write from NCU is sent to BOTH mbist_ctl and jtag_ctl
583// It will write into specified registers in both modules
584//================================================================================
585tcu_ucb_ctl_msff_ctl_macro__width_1 ucb_csr_wr_reg (
586 .scan_in ( ucb_csr_wr_reg_scanin ),
587 .scan_out ( ucb_csr_wr_reg_scanout ),
588 .l1clk ( l1clk ),
589 .din ( ncu_wr_req ),
590 .dout ( ucb_csr_wr ),
591 .siclk(siclk),
592 .soclk(soclk));
593
594//================================================================================
595// Read/Write Index
596// Sent to BOTH mbist_ctl and jtag_ctl
597//================================================================================
598tcu_ucb_ctl_msff_ctl_macro__en_1__width_6 ucb_csr_addr_reg ( // replace with SYNCHRONIZER
599 .scan_in ( ucb_csr_addr_reg_scanin ),
600 .scan_out ( ucb_csr_addr_reg_scanout ),
601 .l1clk ( l1clk ),
602 .en ( ucbin_buf_vld ),
603 .din ( ucbin_address[8:3] ),
604 .dout ( ucb_csr_addr[5:0] ),
605 .siclk(siclk),
606 .soclk(soclk));
607
608// following need to have ce inputs synchronized before sending data to TCK domain;
609// the output flops need to be clocked with TCK
610
611//============================================================
612// Handshake Protocol for jbus_clk -> tck domain
613// ---------------------------------------------
614// Since the write enable in jbus_clk will go away before the logic at tck
615// is able to flop it and do anything with it. Therefore, at jbus_clk, we execute
616// a handshake protocol:
617// - writing the rdrtrn_reg register sets the valid bit (jbus_clk)
618// which is cleared when jtag has finished reading it (tck)
619// - similar thing is done for scratch_reg
620//============================================================
621//============================================================
622// Data from UCB to JTAG
623// This bus is used by both write request and read ack data
624//============================================================
625assign ucb_jtag_data_rdy_din = jtag_ucb_data_ack_sync ? 1'b0 :
626 ncu_rd_ack ? 1'b1 :
627 ucb_jtag_data_rdy;
628
629tcu_ucb_ctl_msff_ctl_macro__width_1 ucb_jtag_data_rdy_reg (
630 .scan_in ( ucb_jtag_data_rdy_reg_scanin ),
631 .scan_out ( ucb_jtag_data_rdy_reg_scanout ),
632 .l1clk ( l1clk ),
633 .din ( ucb_jtag_data_rdy_din ),
634 .dout ( ucb_jtag_data_rdy ),
635 .siclk(siclk),
636 .soclk(soclk));
637
638
639assign ucb_data_out_en = ncu_rd_ack || ncu_wr_req;
640assign ucb_data_out_din[63:0] = ucb_data_out_en ? ucbin_data[63:0] : ucb_data_out[63:0];
641
642tcu_ucb_ctl_msff_ctl_macro__width_64 ucb_data_out_reg (
643 .scan_in ( ucb_data_out_reg_scanin ),
644 .scan_out ( ucb_data_out_reg_scanout ),
645 .l1clk ( l1clk ),
646 .din ( ucb_data_out_din[63:0] ),
647 .dout ( ucb_data_out[63:0] ),
648 .siclk(siclk),
649 .soclk(soclk));
650
651//============================================================
652// Logic for read return to iob
653//============================================================
654tcu_ucb_ctl_msff_ctl_macro__width_1 ncu_rd_req_d_reg (
655 .scan_in ( ncu_rd_req_d_reg_scanin ),
656 .scan_out ( ncu_rd_req_d_reg_scanout ),
657 .l1clk ( l1clk ),
658 .din ( ncu_rd_req ),
659 .dout ( ncu_rd_req_d ),
660 .siclk(siclk),
661 .soclk(soclk));
662
663tcu_ucb_ctl_msff_ctl_macro__width_1 ncu_rd_req_d2_reg (
664 .scan_in ( ncu_rd_req_d2_reg_scanin ),
665 .scan_out ( ncu_rd_req_d2_reg_scanout ),
666 .l1clk ( l1clk ),
667 .din ( ncu_rd_req_d ),
668 .dout ( ncu_rd_req_d2 ),
669 .siclk(siclk),
670 .soclk(soclk));
671
672assign csr_thr_id_en = ncu_rd_req;
673assign csr_thr_id_din[5:0] = ucbin_buf[`UCB_THR_HI:`UCB_THR_LO];
674
675tcu_ucb_ctl_msff_ctl_macro__en_1__width_6 csr_thr_id_reg (
676 .scan_in ( csr_thr_id_reg_scanin ),
677 .scan_out ( csr_thr_id_reg_scanout ),
678 .l1clk ( l1clk ),
679 .en ( csr_thr_id_en ),
680 .din ( csr_thr_id_din[5:0] ),
681 .dout ( csr_thr_id[5:0] ),
682 .siclk(siclk),
683 .soclk(soclk));
684
685assign csr_buf_id_en = ncu_rd_req;
686assign csr_buf_id_din[1:0] = ucbin_buf[`UCB_BUF_HI:`UCB_BUF_LO];
687
688tcu_ucb_ctl_msff_ctl_macro__en_1__width_2 csr_buf_id_reg (
689 .scan_in ( csr_buf_id_reg_scanin ),
690 .scan_out ( csr_buf_id_reg_scanout ),
691 .l1clk ( l1clk ),
692 .en ( csr_buf_id_en ),
693 .din ( csr_buf_id_din[1:0] ),
694 .dout ( csr_buf_id[1:0] ),
695 .siclk(siclk),
696 .soclk(soclk));
697
698assign csr_ack_req_din = ncu_rd_req || (csr_ack_req && !ack_acpt);
699
700tcu_ucb_ctl_msff_ctl_macro__width_1 csr_ack_req_reg (
701 .scan_in ( csr_ack_req_reg_scanin ),
702 .scan_out ( csr_ack_req_reg_scanout ),
703 .l1clk ( l1clk ),
704 .din ( csr_ack_req_din ),
705 .dout ( csr_ack_req ),
706 .siclk(siclk),
707 .soclk(soclk));
708
709//============================================================
710// Synchronizers: TCK Domain ==> l1clk (jbus_clk) Domain
711//============================================================
712cl_sc1_clksyncff_4x jtag_rd_req_sync_reg (
713 .si ( jtag_rd_req_sync_reg_scanin ),
714 .so ( jtag_rd_req_sync_reg_scanout ),
715 .l1clk ( l1clk ),
716 .d ( jtag_creg_rd_en ),
717 .q ( jtag_rd_en_sync ),
718 .siclk(siclk),
719 .soclk(soclk));
720
721cl_sc1_clksyncff_4x jtag_creg_wr_en_sync_reg (
722 .si ( jtag_creg_wr_en_sync_reg_scanin ),
723 .so ( jtag_creg_wr_en_sync_reg_scanout ),
724 .l1clk ( l1clk ),
725 .d ( jtag_creg_wr_en ),
726 .q ( jtag_creg_wr_en_sync ),
727 .siclk(siclk),
728 .soclk(soclk));
729
730cl_sc1_clksyncff_4x jtag_creg_addr_en_sync_reg (
731 .si ( jtag_creg_addr_en_sync_reg_scanin ),
732 .so ( jtag_creg_addr_en_sync_reg_scanout ),
733 .l1clk ( l1clk ),
734 .d ( jtag_creg_addr_en ),
735 .q ( jtag_creg_addr_en_sync ),
736 .siclk(siclk),
737 .soclk(soclk));
738
739cl_sc1_clksyncff_4x jtag_creg_data_en_reg (
740 .si ( jtag_creg_data_en_sync_reg_scanin ),
741 .so ( jtag_creg_data_en_sync_reg_scanout ),
742 .l1clk ( l1clk ),
743 .d ( jtag_creg_data_en ),
744 .q ( jtag_creg_data_en_sync ),
745 .siclk(siclk),
746 .soclk(soclk));
747
748cl_sc1_clksyncff_4x jtag_ucb_data_ack_sync_reg (
749 .si ( jtag_ucb_data_ack_sync_reg_scanin ),
750 .so ( jtag_ucb_data_ack_sync_reg_scanout ),
751 .l1clk ( l1clk ),
752 .d ( jtag_ucb_data_ack ),
753 .q ( jtag_ucb_data_ack_sync ),
754 .siclk(siclk),
755 .soclk(soclk));
756
757
758tcu_ucb_ctl_spare_ctl_macro__num_6 spare (
759 .l1clk ( l1clk ),
760 .scan_in ( spare_scanin ),
761 .scan_out ( spare_scanout ),
762 .siclk(siclk),
763 .soclk(soclk));
764
765
766// fixscan start:
767assign creg_addr_reg_scanin = scan_in;
768assign creg_data_reg_scanin = creg_addr_reg_scanout;
769assign ucbbusout8_ctl_scanin = creg_data_reg_scanout;
770assign jtag_rd_en_sync_d1_reg_scanin = ucbbusout8_ctl_scanout;
771assign jtag_rd_req_reg_scanin = jtag_rd_en_sync_d1_reg_scanout;
772assign wr_en_sync_d1_reg_scanin = jtag_rd_req_reg_scanout;
773assign wr_req_reg_scanin = wr_en_sync_d1_reg_scanout;
774assign jtag_rd_pend_reg_scanin = wr_req_reg_scanout;
775assign test_protect_reg_scanin = jtag_rd_pend_reg_scanout;
776assign ucbbusin8_ctl_scanin = test_protect_reg_scanout;
777assign ucb_csr_wr_reg_scanin = ucbbusin8_ctl_scanout;
778assign ucb_csr_addr_reg_scanin = ucb_csr_wr_reg_scanout;
779assign ucb_jtag_data_rdy_reg_scanin = ucb_csr_addr_reg_scanout;
780assign ucb_data_out_reg_scanin = ucb_jtag_data_rdy_reg_scanout;
781assign ncu_rd_req_d_reg_scanin = ucb_data_out_reg_scanout;
782assign ncu_rd_req_d2_reg_scanin = ncu_rd_req_d_reg_scanout;
783assign csr_thr_id_reg_scanin = ncu_rd_req_d2_reg_scanout;
784assign csr_buf_id_reg_scanin = csr_thr_id_reg_scanout;
785assign csr_ack_req_reg_scanin = csr_buf_id_reg_scanout;
786assign jtag_rd_req_sync_reg_scanin = csr_ack_req_reg_scanout;
787assign jtag_creg_wr_en_sync_reg_scanin = jtag_rd_req_sync_reg_scanout;
788assign jtag_creg_addr_en_sync_reg_scanin = jtag_creg_wr_en_sync_reg_scanout;
789assign jtag_creg_data_en_sync_reg_scanin = jtag_creg_addr_en_sync_reg_scanout;
790assign jtag_ucb_data_ack_sync_reg_scanin = jtag_creg_data_en_sync_reg_scanout;
791assign spare_scanin = jtag_ucb_data_ack_sync_reg_scanout;
792assign scan_out = spare_scanout;
793// fixscan end:
794
795endmodule
796
797
798
799
800
801
802// any PARAMS parms go into naming of macro
803
804module tcu_ucb_ctl_l1clkhdr_ctl_macro (
805 l2clk,
806 l1en,
807 pce_ov,
808 stop,
809 se,
810 l1clk);
811
812
813 input l2clk;
814 input l1en;
815 input pce_ov;
816 input stop;
817 input se;
818 output l1clk;
819
820
821
822
823
824cl_sc1_l1hdr_8x c_0 (
825
826
827 .l2clk(l2clk),
828 .pce(l1en),
829 .l1clk(l1clk),
830 .se(se),
831 .pce_ov(pce_ov),
832 .stop(stop)
833);
834
835
836
837endmodule
838
839
840
841
842
843
844
845
846
847
848
849
850
851// any PARAMS parms go into naming of macro
852
853module tcu_ucb_ctl_msff_ctl_macro__width_40 (
854 din,
855 l1clk,
856 scan_in,
857 siclk,
858 soclk,
859 dout,
860 scan_out);
861wire [39:0] fdin;
862wire [38:0] so;
863
864 input [39:0] din;
865 input l1clk;
866 input scan_in;
867
868
869 input siclk;
870 input soclk;
871
872 output [39:0] dout;
873 output scan_out;
874assign fdin[39:0] = din[39:0];
875
876
877
878
879
880
881dff #(40) d0_0 (
882.l1clk(l1clk),
883.siclk(siclk),
884.soclk(soclk),
885.d(fdin[39:0]),
886.si({scan_in,so[38:0]}),
887.so({so[38:0],scan_out}),
888.q(dout[39:0])
889);
890
891
892
893
894
895
896
897
898
899
900
901
902endmodule
903
904
905
906
907
908
909
910
911
912
913
914
915
916// any PARAMS parms go into naming of macro
917
918module tcu_ucb_ctl_msff_ctl_macro__width_64 (
919 din,
920 l1clk,
921 scan_in,
922 siclk,
923 soclk,
924 dout,
925 scan_out);
926wire [63:0] fdin;
927wire [62:0] so;
928
929 input [63:0] din;
930 input l1clk;
931 input scan_in;
932
933
934 input siclk;
935 input soclk;
936
937 output [63:0] dout;
938 output scan_out;
939assign fdin[63:0] = din[63:0];
940
941
942
943
944
945
946dff #(64) d0_0 (
947.l1clk(l1clk),
948.siclk(siclk),
949.soclk(soclk),
950.d(fdin[63:0]),
951.si({scan_in,so[62:0]}),
952.so({so[62:0],scan_out}),
953.q(dout[63:0])
954);
955
956
957
958
959
960
961
962
963
964
965
966
967endmodule
968
969
970
971
972
973
974
975// any PARAMS parms go into naming of macro
976
977module tcu_ucb_ctl_msff_ctl_macro__width_1 (
978 din,
979 l1clk,
980 scan_in,
981 siclk,
982 soclk,
983 dout,
984 scan_out);
985wire [0:0] fdin;
986
987 input [0:0] din;
988 input l1clk;
989 input scan_in;
990
991
992 input siclk;
993 input soclk;
994
995 output [0:0] dout;
996 output scan_out;
997assign fdin[0:0] = din[0:0];
998
999
1000
1001
1002
1003
1004dff #(1) d0_0 (
1005.l1clk(l1clk),
1006.siclk(siclk),
1007.soclk(soclk),
1008.d(fdin[0:0]),
1009.si(scan_in),
1010.so(scan_out),
1011.q(dout[0:0])
1012);
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025endmodule
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039// any PARAMS parms go into naming of macro
1040
1041module tcu_ucb_ctl_msff_ctl_macro__width_16 (
1042 din,
1043 l1clk,
1044 scan_in,
1045 siclk,
1046 soclk,
1047 dout,
1048 scan_out);
1049wire [15:0] fdin;
1050wire [14:0] so;
1051
1052 input [15:0] din;
1053 input l1clk;
1054 input scan_in;
1055
1056
1057 input siclk;
1058 input soclk;
1059
1060 output [15:0] dout;
1061 output scan_out;
1062assign fdin[15:0] = din[15:0];
1063
1064
1065
1066
1067
1068
1069dff #(16) d0_0 (
1070.l1clk(l1clk),
1071.siclk(siclk),
1072.soclk(soclk),
1073.d(fdin[15:0]),
1074.si({scan_in,so[14:0]}),
1075.so({so[14:0],scan_out}),
1076.q(dout[15:0])
1077);
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090endmodule
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104// any PARAMS parms go into naming of macro
1105
1106module tcu_ucb_ctl_msff_ctl_macro__width_128 (
1107 din,
1108 l1clk,
1109 scan_in,
1110 siclk,
1111 soclk,
1112 dout,
1113 scan_out);
1114wire [127:0] fdin;
1115wire [126:0] so;
1116
1117 input [127:0] din;
1118 input l1clk;
1119 input scan_in;
1120
1121
1122 input siclk;
1123 input soclk;
1124
1125 output [127:0] dout;
1126 output scan_out;
1127assign fdin[127:0] = din[127:0];
1128
1129
1130
1131
1132
1133
1134dff #(128) d0_0 (
1135.l1clk(l1clk),
1136.siclk(siclk),
1137.soclk(soclk),
1138.d(fdin[127:0]),
1139.si({scan_in,so[126:0]}),
1140.so({so[126:0],scan_out}),
1141.q(dout[127:0])
1142);
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155endmodule
1156
1157
1158
1159
1160
1161
1162// any PARAMS parms go into naming of macro
1163
1164module tcu_ucb_ctl_msff_ctl_macro__en_1__width_1 (
1165 din,
1166 en,
1167 l1clk,
1168 scan_in,
1169 siclk,
1170 soclk,
1171 dout,
1172 scan_out);
1173wire [0:0] fdin;
1174
1175 input [0:0] din;
1176 input en;
1177 input l1clk;
1178 input scan_in;
1179
1180
1181 input siclk;
1182 input soclk;
1183
1184 output [0:0] dout;
1185 output scan_out;
1186assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}});
1187
1188
1189
1190
1191
1192
1193dff #(1) d0_0 (
1194.l1clk(l1clk),
1195.siclk(siclk),
1196.soclk(soclk),
1197.d(fdin[0:0]),
1198.si(scan_in),
1199.so(scan_out),
1200.q(dout[0:0])
1201);
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214endmodule
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228// any PARAMS parms go into naming of macro
1229
1230module tcu_ucb_ctl_msff_ctl_macro__en_1__width_8 (
1231 din,
1232 en,
1233 l1clk,
1234 scan_in,
1235 siclk,
1236 soclk,
1237 dout,
1238 scan_out);
1239wire [7:0] fdin;
1240wire [6:0] so;
1241
1242 input [7:0] din;
1243 input en;
1244 input l1clk;
1245 input scan_in;
1246
1247
1248 input siclk;
1249 input soclk;
1250
1251 output [7:0] dout;
1252 output scan_out;
1253assign fdin[7:0] = (din[7:0] & {8{en}}) | (dout[7:0] & ~{8{en}});
1254
1255
1256
1257
1258
1259
1260dff #(8) d0_0 (
1261.l1clk(l1clk),
1262.siclk(siclk),
1263.soclk(soclk),
1264.d(fdin[7:0]),
1265.si({scan_in,so[6:0]}),
1266.so({so[6:0],scan_out}),
1267.q(dout[7:0])
1268);
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281endmodule
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295// any PARAMS parms go into naming of macro
1296
1297module tcu_ucb_ctl_msff_ctl_macro__en_1__width_16 (
1298 din,
1299 en,
1300 l1clk,
1301 scan_in,
1302 siclk,
1303 soclk,
1304 dout,
1305 scan_out);
1306wire [15:0] fdin;
1307wire [14:0] so;
1308
1309 input [15:0] din;
1310 input en;
1311 input l1clk;
1312 input scan_in;
1313
1314
1315 input siclk;
1316 input soclk;
1317
1318 output [15:0] dout;
1319 output scan_out;
1320assign fdin[15:0] = (din[15:0] & {16{en}}) | (dout[15:0] & ~{16{en}});
1321
1322
1323
1324
1325
1326
1327dff #(16) d0_0 (
1328.l1clk(l1clk),
1329.siclk(siclk),
1330.soclk(soclk),
1331.d(fdin[15:0]),
1332.si({scan_in,so[14:0]}),
1333.so({so[14:0],scan_out}),
1334.q(dout[15:0])
1335);
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348endmodule
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362// any PARAMS parms go into naming of macro
1363
1364module tcu_ucb_ctl_msff_ctl_macro__en_1__width_128 (
1365 din,
1366 en,
1367 l1clk,
1368 scan_in,
1369 siclk,
1370 soclk,
1371 dout,
1372 scan_out);
1373wire [127:0] fdin;
1374wire [126:0] so;
1375
1376 input [127:0] din;
1377 input en;
1378 input l1clk;
1379 input scan_in;
1380
1381
1382 input siclk;
1383 input soclk;
1384
1385 output [127:0] dout;
1386 output scan_out;
1387assign fdin[127:0] = (din[127:0] & {128{en}}) | (dout[127:0] & ~{128{en}});
1388
1389
1390
1391
1392
1393
1394dff #(128) d0_0 (
1395.l1clk(l1clk),
1396.siclk(siclk),
1397.soclk(soclk),
1398.d(fdin[127:0]),
1399.si({scan_in,so[126:0]}),
1400.so({so[126:0],scan_out}),
1401.q(dout[127:0])
1402);
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415endmodule
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429// any PARAMS parms go into naming of macro
1430
1431module tcu_ucb_ctl_msff_ctl_macro__en_1__width_6 (
1432 din,
1433 en,
1434 l1clk,
1435 scan_in,
1436 siclk,
1437 soclk,
1438 dout,
1439 scan_out);
1440wire [5:0] fdin;
1441wire [4:0] so;
1442
1443 input [5:0] din;
1444 input en;
1445 input l1clk;
1446 input scan_in;
1447
1448
1449 input siclk;
1450 input soclk;
1451
1452 output [5:0] dout;
1453 output scan_out;
1454assign fdin[5:0] = (din[5:0] & {6{en}}) | (dout[5:0] & ~{6{en}});
1455
1456
1457
1458
1459
1460
1461dff #(6) d0_0 (
1462.l1clk(l1clk),
1463.siclk(siclk),
1464.soclk(soclk),
1465.d(fdin[5:0]),
1466.si({scan_in,so[4:0]}),
1467.so({so[4:0],scan_out}),
1468.q(dout[5:0])
1469);
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482endmodule
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496// any PARAMS parms go into naming of macro
1497
1498module tcu_ucb_ctl_msff_ctl_macro__en_1__width_2 (
1499 din,
1500 en,
1501 l1clk,
1502 scan_in,
1503 siclk,
1504 soclk,
1505 dout,
1506 scan_out);
1507wire [1:0] fdin;
1508wire [0:0] so;
1509
1510 input [1:0] din;
1511 input en;
1512 input l1clk;
1513 input scan_in;
1514
1515
1516 input siclk;
1517 input soclk;
1518
1519 output [1:0] dout;
1520 output scan_out;
1521assign fdin[1:0] = (din[1:0] & {2{en}}) | (dout[1:0] & ~{2{en}});
1522
1523
1524
1525
1526
1527
1528dff #(2) d0_0 (
1529.l1clk(l1clk),
1530.siclk(siclk),
1531.soclk(soclk),
1532.d(fdin[1:0]),
1533.si({scan_in,so[0:0]}),
1534.so({so[0:0],scan_out}),
1535.q(dout[1:0])
1536);
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549endmodule
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559// Description: Spare gate macro for control blocks
1560//
1561// Param num controls the number of times the macro is added
1562// flops=0 can be used to use only combination spare logic
1563
1564
1565module tcu_ucb_ctl_spare_ctl_macro__num_6 (
1566 l1clk,
1567 scan_in,
1568 siclk,
1569 soclk,
1570 scan_out);
1571wire si_0;
1572wire so_0;
1573wire spare0_flop_unused;
1574wire spare0_buf_32x_unused;
1575wire spare0_nand3_8x_unused;
1576wire spare0_inv_8x_unused;
1577wire spare0_aoi22_4x_unused;
1578wire spare0_buf_8x_unused;
1579wire spare0_oai22_4x_unused;
1580wire spare0_inv_16x_unused;
1581wire spare0_nand2_16x_unused;
1582wire spare0_nor3_4x_unused;
1583wire spare0_nand2_8x_unused;
1584wire spare0_buf_16x_unused;
1585wire spare0_nor2_16x_unused;
1586wire spare0_inv_32x_unused;
1587wire si_1;
1588wire so_1;
1589wire spare1_flop_unused;
1590wire spare1_buf_32x_unused;
1591wire spare1_nand3_8x_unused;
1592wire spare1_inv_8x_unused;
1593wire spare1_aoi22_4x_unused;
1594wire spare1_buf_8x_unused;
1595wire spare1_oai22_4x_unused;
1596wire spare1_inv_16x_unused;
1597wire spare1_nand2_16x_unused;
1598wire spare1_nor3_4x_unused;
1599wire spare1_nand2_8x_unused;
1600wire spare1_buf_16x_unused;
1601wire spare1_nor2_16x_unused;
1602wire spare1_inv_32x_unused;
1603wire si_2;
1604wire so_2;
1605wire spare2_flop_unused;
1606wire spare2_buf_32x_unused;
1607wire spare2_nand3_8x_unused;
1608wire spare2_inv_8x_unused;
1609wire spare2_aoi22_4x_unused;
1610wire spare2_buf_8x_unused;
1611wire spare2_oai22_4x_unused;
1612wire spare2_inv_16x_unused;
1613wire spare2_nand2_16x_unused;
1614wire spare2_nor3_4x_unused;
1615wire spare2_nand2_8x_unused;
1616wire spare2_buf_16x_unused;
1617wire spare2_nor2_16x_unused;
1618wire spare2_inv_32x_unused;
1619wire si_3;
1620wire so_3;
1621wire spare3_flop_unused;
1622wire spare3_buf_32x_unused;
1623wire spare3_nand3_8x_unused;
1624wire spare3_inv_8x_unused;
1625wire spare3_aoi22_4x_unused;
1626wire spare3_buf_8x_unused;
1627wire spare3_oai22_4x_unused;
1628wire spare3_inv_16x_unused;
1629wire spare3_nand2_16x_unused;
1630wire spare3_nor3_4x_unused;
1631wire spare3_nand2_8x_unused;
1632wire spare3_buf_16x_unused;
1633wire spare3_nor2_16x_unused;
1634wire spare3_inv_32x_unused;
1635wire si_4;
1636wire so_4;
1637wire spare4_flop_unused;
1638wire spare4_buf_32x_unused;
1639wire spare4_nand3_8x_unused;
1640wire spare4_inv_8x_unused;
1641wire spare4_aoi22_4x_unused;
1642wire spare4_buf_8x_unused;
1643wire spare4_oai22_4x_unused;
1644wire spare4_inv_16x_unused;
1645wire spare4_nand2_16x_unused;
1646wire spare4_nor3_4x_unused;
1647wire spare4_nand2_8x_unused;
1648wire spare4_buf_16x_unused;
1649wire spare4_nor2_16x_unused;
1650wire spare4_inv_32x_unused;
1651wire si_5;
1652wire so_5;
1653wire spare5_flop_unused;
1654wire spare5_buf_32x_unused;
1655wire spare5_nand3_8x_unused;
1656wire spare5_inv_8x_unused;
1657wire spare5_aoi22_4x_unused;
1658wire spare5_buf_8x_unused;
1659wire spare5_oai22_4x_unused;
1660wire spare5_inv_16x_unused;
1661wire spare5_nand2_16x_unused;
1662wire spare5_nor3_4x_unused;
1663wire spare5_nand2_8x_unused;
1664wire spare5_buf_16x_unused;
1665wire spare5_nor2_16x_unused;
1666wire spare5_inv_32x_unused;
1667
1668
1669input l1clk;
1670input scan_in;
1671input siclk;
1672input soclk;
1673output scan_out;
1674
1675cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
1676 .siclk(siclk),
1677 .soclk(soclk),
1678 .si(si_0),
1679 .so(so_0),
1680 .d(1'b0),
1681 .q(spare0_flop_unused));
1682assign si_0 = scan_in;
1683
1684cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
1685 .out(spare0_buf_32x_unused));
1686cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
1687 .in1(1'b1),
1688 .in2(1'b1),
1689 .out(spare0_nand3_8x_unused));
1690cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
1691 .out(spare0_inv_8x_unused));
1692cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
1693 .in01(1'b1),
1694 .in10(1'b1),
1695 .in11(1'b1),
1696 .out(spare0_aoi22_4x_unused));
1697cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
1698 .out(spare0_buf_8x_unused));
1699cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
1700 .in01(1'b1),
1701 .in10(1'b1),
1702 .in11(1'b1),
1703 .out(spare0_oai22_4x_unused));
1704cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
1705 .out(spare0_inv_16x_unused));
1706cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
1707 .in1(1'b1),
1708 .out(spare0_nand2_16x_unused));
1709cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
1710 .in1(1'b0),
1711 .in2(1'b0),
1712 .out(spare0_nor3_4x_unused));
1713cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
1714 .in1(1'b1),
1715 .out(spare0_nand2_8x_unused));
1716cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
1717 .out(spare0_buf_16x_unused));
1718cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
1719 .in1(1'b0),
1720 .out(spare0_nor2_16x_unused));
1721cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
1722 .out(spare0_inv_32x_unused));
1723
1724cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
1725 .siclk(siclk),
1726 .soclk(soclk),
1727 .si(si_1),
1728 .so(so_1),
1729 .d(1'b0),
1730 .q(spare1_flop_unused));
1731assign si_1 = so_0;
1732
1733cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
1734 .out(spare1_buf_32x_unused));
1735cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
1736 .in1(1'b1),
1737 .in2(1'b1),
1738 .out(spare1_nand3_8x_unused));
1739cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
1740 .out(spare1_inv_8x_unused));
1741cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
1742 .in01(1'b1),
1743 .in10(1'b1),
1744 .in11(1'b1),
1745 .out(spare1_aoi22_4x_unused));
1746cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
1747 .out(spare1_buf_8x_unused));
1748cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
1749 .in01(1'b1),
1750 .in10(1'b1),
1751 .in11(1'b1),
1752 .out(spare1_oai22_4x_unused));
1753cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
1754 .out(spare1_inv_16x_unused));
1755cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
1756 .in1(1'b1),
1757 .out(spare1_nand2_16x_unused));
1758cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
1759 .in1(1'b0),
1760 .in2(1'b0),
1761 .out(spare1_nor3_4x_unused));
1762cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
1763 .in1(1'b1),
1764 .out(spare1_nand2_8x_unused));
1765cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
1766 .out(spare1_buf_16x_unused));
1767cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
1768 .in1(1'b0),
1769 .out(spare1_nor2_16x_unused));
1770cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
1771 .out(spare1_inv_32x_unused));
1772
1773cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
1774 .siclk(siclk),
1775 .soclk(soclk),
1776 .si(si_2),
1777 .so(so_2),
1778 .d(1'b0),
1779 .q(spare2_flop_unused));
1780assign si_2 = so_1;
1781
1782cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
1783 .out(spare2_buf_32x_unused));
1784cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
1785 .in1(1'b1),
1786 .in2(1'b1),
1787 .out(spare2_nand3_8x_unused));
1788cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
1789 .out(spare2_inv_8x_unused));
1790cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
1791 .in01(1'b1),
1792 .in10(1'b1),
1793 .in11(1'b1),
1794 .out(spare2_aoi22_4x_unused));
1795cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
1796 .out(spare2_buf_8x_unused));
1797cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
1798 .in01(1'b1),
1799 .in10(1'b1),
1800 .in11(1'b1),
1801 .out(spare2_oai22_4x_unused));
1802cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
1803 .out(spare2_inv_16x_unused));
1804cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
1805 .in1(1'b1),
1806 .out(spare2_nand2_16x_unused));
1807cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
1808 .in1(1'b0),
1809 .in2(1'b0),
1810 .out(spare2_nor3_4x_unused));
1811cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
1812 .in1(1'b1),
1813 .out(spare2_nand2_8x_unused));
1814cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
1815 .out(spare2_buf_16x_unused));
1816cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
1817 .in1(1'b0),
1818 .out(spare2_nor2_16x_unused));
1819cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
1820 .out(spare2_inv_32x_unused));
1821
1822cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
1823 .siclk(siclk),
1824 .soclk(soclk),
1825 .si(si_3),
1826 .so(so_3),
1827 .d(1'b0),
1828 .q(spare3_flop_unused));
1829assign si_3 = so_2;
1830
1831cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
1832 .out(spare3_buf_32x_unused));
1833cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
1834 .in1(1'b1),
1835 .in2(1'b1),
1836 .out(spare3_nand3_8x_unused));
1837cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
1838 .out(spare3_inv_8x_unused));
1839cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
1840 .in01(1'b1),
1841 .in10(1'b1),
1842 .in11(1'b1),
1843 .out(spare3_aoi22_4x_unused));
1844cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
1845 .out(spare3_buf_8x_unused));
1846cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
1847 .in01(1'b1),
1848 .in10(1'b1),
1849 .in11(1'b1),
1850 .out(spare3_oai22_4x_unused));
1851cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
1852 .out(spare3_inv_16x_unused));
1853cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
1854 .in1(1'b1),
1855 .out(spare3_nand2_16x_unused));
1856cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
1857 .in1(1'b0),
1858 .in2(1'b0),
1859 .out(spare3_nor3_4x_unused));
1860cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
1861 .in1(1'b1),
1862 .out(spare3_nand2_8x_unused));
1863cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
1864 .out(spare3_buf_16x_unused));
1865cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
1866 .in1(1'b0),
1867 .out(spare3_nor2_16x_unused));
1868cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
1869 .out(spare3_inv_32x_unused));
1870
1871cl_sc1_msff_8x spare4_flop (.l1clk(l1clk),
1872 .siclk(siclk),
1873 .soclk(soclk),
1874 .si(si_4),
1875 .so(so_4),
1876 .d(1'b0),
1877 .q(spare4_flop_unused));
1878assign si_4 = so_3;
1879
1880cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
1881 .out(spare4_buf_32x_unused));
1882cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
1883 .in1(1'b1),
1884 .in2(1'b1),
1885 .out(spare4_nand3_8x_unused));
1886cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
1887 .out(spare4_inv_8x_unused));
1888cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
1889 .in01(1'b1),
1890 .in10(1'b1),
1891 .in11(1'b1),
1892 .out(spare4_aoi22_4x_unused));
1893cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
1894 .out(spare4_buf_8x_unused));
1895cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
1896 .in01(1'b1),
1897 .in10(1'b1),
1898 .in11(1'b1),
1899 .out(spare4_oai22_4x_unused));
1900cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
1901 .out(spare4_inv_16x_unused));
1902cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
1903 .in1(1'b1),
1904 .out(spare4_nand2_16x_unused));
1905cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
1906 .in1(1'b0),
1907 .in2(1'b0),
1908 .out(spare4_nor3_4x_unused));
1909cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
1910 .in1(1'b1),
1911 .out(spare4_nand2_8x_unused));
1912cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
1913 .out(spare4_buf_16x_unused));
1914cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
1915 .in1(1'b0),
1916 .out(spare4_nor2_16x_unused));
1917cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
1918 .out(spare4_inv_32x_unused));
1919
1920cl_sc1_msff_8x spare5_flop (.l1clk(l1clk),
1921 .siclk(siclk),
1922 .soclk(soclk),
1923 .si(si_5),
1924 .so(so_5),
1925 .d(1'b0),
1926 .q(spare5_flop_unused));
1927assign si_5 = so_4;
1928
1929cl_u1_buf_32x spare5_buf_32x (.in(1'b1),
1930 .out(spare5_buf_32x_unused));
1931cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1),
1932 .in1(1'b1),
1933 .in2(1'b1),
1934 .out(spare5_nand3_8x_unused));
1935cl_u1_inv_8x spare5_inv_8x (.in(1'b1),
1936 .out(spare5_inv_8x_unused));
1937cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1),
1938 .in01(1'b1),
1939 .in10(1'b1),
1940 .in11(1'b1),
1941 .out(spare5_aoi22_4x_unused));
1942cl_u1_buf_8x spare5_buf_8x (.in(1'b1),
1943 .out(spare5_buf_8x_unused));
1944cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1),
1945 .in01(1'b1),
1946 .in10(1'b1),
1947 .in11(1'b1),
1948 .out(spare5_oai22_4x_unused));
1949cl_u1_inv_16x spare5_inv_16x (.in(1'b1),
1950 .out(spare5_inv_16x_unused));
1951cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1),
1952 .in1(1'b1),
1953 .out(spare5_nand2_16x_unused));
1954cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0),
1955 .in1(1'b0),
1956 .in2(1'b0),
1957 .out(spare5_nor3_4x_unused));
1958cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1),
1959 .in1(1'b1),
1960 .out(spare5_nand2_8x_unused));
1961cl_u1_buf_16x spare5_buf_16x (.in(1'b1),
1962 .out(spare5_buf_16x_unused));
1963cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0),
1964 .in1(1'b0),
1965 .out(spare5_nor2_16x_unused));
1966cl_u1_inv_32x spare5_inv_32x (.in(1'b1),
1967 .out(spare5_inv_32x_unused));
1968assign scan_out = so_5;
1969
1970
1971
1972endmodule
1973