Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / rst / rtl / rst_io_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: rst_io_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 ASSERT 1'b0 // For active low signal.
36`define DEASSERT 1'b1 // For active low signal.
37
38`define INFO 20
39 // (Origin:)
40`define IOB_CREG_RESET_GEN 40'h89_0000_0808 //Adr of RESET_GEN reg (Fire.)
41`define IOB_CREG_RESET_SOURCE 40'h89_0000_0818 //Adr of RESET_SOURCE reg (Fire.)
42`define IOB_CREG_SSYSRESET 40'h89_0000_0838 //Adr of SSYS_RESET reg (N1.)
43`define IOB_CREG_RESETSTAT 40'h89_0000_0810 //Adr of RSET_STAT reg (N1.)
44`define IOB_CREG_CCU_TIME 40'h89_0000_0860 //Adr of CCU_TIME reg (N2.)
45`define IOB_CREG_LOCK_TIME 40'h89_0000_0870 //Adr of LOCK_TIME reg (N2.)
46`define IOB_CREG_PROP_TIME 40'h89_0000_0880 //Adr of PROP_TIME reg (N2.)
47`define IOB_CREG_NIU_TIME 40'h89_0000_0890 //Adr of NIU_TIME reg (N2.)
48`define IOB_CREG_RESET_FEE 40'h89_0000_0820 //Adr of RESET_FEE reg (N2.)
49//________________________________________________________________
50
51`define RST_FSM_WIDTH 33
52`define RST_INIT_STATE 33'h0_0000_0001
53`define POR1_LOCK_TIME 33'h0_0000_0002
54`define POR1_ARST_TIME 33'h0_0000_0004
55`define POR1_SYNC_STABLE 33'h0_0000_0008
56`define POR1_ASICFLUSH_STOP_ACK 33'h0_0000_0010
57`define POR1_NIU_TIME 33'h0_0000_0020
58`define POR1_FLUSH_STOP_ACK 33'h0_0000_0040
59`define POR1_BISX_DONE 33'h0_0000_0080
60`define POR2_FLUSH_INIT_ACK 33'h0_0000_0100
61`define POR2_LOCK_TIME 33'h0_0000_0200
62`define POR2_FLUSH_STOP_ACK 33'h0_0000_0400
63`define POR2_EFU_DONE 33'h0_0000_0800
64`define POR2_ASSERT_RUN 33'h0_0000_1000
65`define POR2_UNPARK_THREAD 33'h0_0000_2000
66`define WMR1_WMR_GEN 33'h0_0000_4000
67`define WMR1_DEASSERT_RUN 33'h0_0000_8000
68`define WMR1_FLUSH_INIT_ACK 33'h0_0001_0000
69`define WMR1_PRE_PLL1 33'h0_0002_0000
70`define WMR1_PRE_PLL2 33'h0_0004_0000
71`define WMR1_CCU_PLL 33'h0_0008_0000
72`define WMR1_LOCK_TIME 33'h0_0010_0000
73`define WMR1_ARST_TIME 33'h0_0020_0000
74`define WMR1_PROP_TIME 33'h0_0040_0000
75`define WMR1_SYNC_STABLE 33'h0_0080_0000
76`define WMR1_FLUSH_STOP_ACK 33'h0_0100_0000
77`define WMR1_BISX_DONE 33'h0_0200_0000
78`define WMR2_FLUSH_INIT_ACK 33'h0_0400_0000
79`define WMR2_PROP_TIME 33'h0_0800_0000
80`define WMR2_FLUSH_STOP_ACK 33'h0_1000_0000
81`define WMR2_NIU_TIME 33'h1_0000_0000
82`define WMR2_ASSERT_RUN 33'h0_2000_0000
83`define WMR2_UNPARK_THREAD 33'h0_4000_0000
84`define RST_ARBITER 33'h0_8000_0000
85
86`define XIR_IDLE 2'h1
87`define XIR_DONE 2'h2
88
89`define DMU_IDLE 3'h1
90`define DMU_TIME1 3'h2
91`define DMU_TIME2 3'h4
92
93`define NIU_IDLE 2'h1
94`define NIU_TIME 2'h2
95//________________________________________________________________
96
97// Already taken addresses, in address order:
98// sort -t "'" -k 2 /home/jl148824/project/NCU/include/iop.h:
99
100//`define IOB_CREG_INTMAN 32'h00000000
101//`define IOB_CREG_INTSTAT 32'h00000000
102//`define IOB_CREG_INTCTL 32'h00000400
103//`define IOB_CREG_MDATA0 32'h00000400
104//`define IOB_CREG_MDATA1 32'h00000500
105//`define IOB_CREG_MDATA0_ALIAS 32'h00000600
106//`define IOB_CREG_MDATA1_ALIAS 32'h00000700
107//`define IOB_CREG_INTVECDISP 32'h00000800
108// 32'h00000808 // Adr of RESET_GEN reg.
109// Bill Bryg removed the CHIP_RESET reg from the Niagara 1 spec Feb 4 '03.
110//`define IOB_CREG_RESETSTAT 32'h00000810 // Adr of RSET_STAT reg.
111//`define IOB_CREG_SERNUM 32'h00000820
112//`define IOB_CREG_TMSTATCTRL 32'h00000828
113//`define IOB_CREG_COREAVAIL 32'h00000830
114//`define IOB_CREG_SSYSRESET 32'h00000838 // Adr of SSYS_RESET reg.
115//`define IOB_CREG_FUSESTAT 32'h00000840
116//`define IOB_CREG_MARGIN 32'h00000850
117//`define IOB_CREG_MBUSY 32'h00000900
118//`define IOB_CREG_JINTV 32'h00000a00
119//`define IOB_CREG_MBUSY_ALIAS 32'h00000b00
120//`define IOB_CREG_DBG_IOBVIS_CTRL 32'h00001000
121//`define IOB_CREG_DBG_L2VIS_CTRL 32'h00001800
122//`define IOB_CREG_DBG_L2VIS_MASKA 32'h00001820
123//`define IOB_CREG_DBG_L2VIS_MASKB 32'h00001828
124//`define IOB_CREG_DBG_L2VIS_CMPA 32'h00001830
125//`define IOB_CREG_DBG_L2VIS_CMPB 32'h00001838
126//`define IOB_CREG_DBG_L2VIS_TRIG 32'h00001840
127//`define IOB_CREG_DBG_ENET_CTRL 32'h00002000
128//`define IOB_CREG_DBG_ENET_IDLEVAL 32'h00002008
129//`define IOB_CREG_DBG_JBUS_CTRL 32'h00002100
130//`define IOB_CREG_DBG_JBUS_LO_MASK0 32'h00002140
131//`define IOB_CREG_DBG_JBUS_LO_CMP0 32'h00002148
132//`define IOB_CREG_DBG_JBUS_LO_CNT0 32'h00002150
133//`define IOB_CREG_DBG_JBUS_LO_MASK1 32'h00002160
134//`define IOB_CREG_DBG_JBUS_LO_CMP1 32'h00002168
135//`define IOB_CREG_DBG_JBUS_LO_CNT1 32'h00002170
136//`define IOB_CREG_DBG_JBUS_HI_MASK0 32'h00002180
137//`define IOB_CREG_DBG_JBUS_HI_CMP0 32'h00002188
138//`define IOB_CREG_DBG_JBUS_HI_CNT0 32'h00002190
139//`define IOB_CREG_DBG_JBUS_HI_MASK1 32'h000021a0
140//`define IOB_CREG_DBG_JBUS_HI_CMP1 32'h000021a8
141//`define IOB_CREG_DBG_JBUS_HI_CNT1 32'h000021b0
142//________________________________________________________________
143
144// Verilog define statements for:
145// rst_ucbbusin4_ctl.sv and:
146// rst_ucbbusout4_ctl.sv:
147
148`define UCB_BUS_WIDTH 4
149`define UCB_BUS_WIDTH_M1 3
150`define CYC_NUM 32
151`define CYC_NUM_M1 31
152
153`define RST_UCB_DATA_WIDTH 16
154// Width of:
155// data_in_io ;// Convert from io to cmp to sys.
156// data_in_sys ;// Convert from io to cmp to sys.
157// data_out_sys2 ;// Convert from sys to cmp.
158// data_out_cmp2 ;// Convert from sys to cmp to io.
159// The following stay 64 bits wide:
160// data_in ;// Convert from io to cmp to sys.
161// data_out ;// Converted from cmp to io.
162// If you modify RST_UCB_DATA_WIDTH, adjust the width of x'b0 in
163// the following two concatenations:
164// assign data_out [ 63:0] =
165// assign data_out_sys[`RST_UCB_DATA_WIDTH-1:0] =
166
167`define RST_TIME_WIDTH 16
168// Width of:
169// lock_time_addr ? {32'b0, lock_time_q [31:0] }:// LOCK_TIME
170// prop_time_addr ? {32'b0, prop_time_q [31:0] }:// PROP_TIME
171// niu_time_addr ? {32'b0, niu_time_q [31:0] }:// NIU_TIME
172// msff_ctl_macro lock_time_ff (width=32,en=1,clr_=1)
173// msff_ctl_macro lock_count_ff (width=32,en=0,clr_=1)
174// msff_ctl_macro prop_time_ff (width=32,en=1,clr_=1)
175// msff_ctl_macro prop_count_ff (width=32,en=0,clr_=1)
176// msff_ctl_macro niu_time_ff (width=32,en=1,clr_=1)
177// msff_ctl_macro niu_count_ff (width=32,en=0,clr_=1)
178// msff_ctl_macro dmu_time_ff (width=32,en=1,clr_=1)
179// msff_ctl_macro dmu_count_ff (width=32,en=0,clr_=1)
180
181
182
183module rst_io_ctl (
184 iol2clk,
185 scan_in,
186 scan_out,
187 rst_aclk,
188 rst_bclk,
189 tcu_scan_en,
190 tcu_pce_ov,
191 rst_clk_stop,
192 tcu_rst_scan_mode,
193 rst_rst_por_io0_,
194 rst_rst_wmr_io0_,
195 rd_req_vld,
196 wr_req_vld,
197 req_acpted_cmp2,
198 rd_ack_vld_cmp2,
199 rd_nack_vld_cmp2,
200 addr_in,
201 data_in,
202 thr_id_in,
203 buf_id_in,
204 ack_busy,
205 data_out_cmp2,
206 thr_id_out_cmp2,
207 buf_id_out_cmp2,
208 rst_ncu_unpark_thread_cmp2,
209 rst_ncu_xir_cmp2_,
210 ncu_rst_xir_done,
211 ccu_rst_change,
212 l2t0_rst_fatal_error,
213 l2t1_rst_fatal_error,
214 l2t2_rst_fatal_error,
215 l2t3_rst_fatal_error,
216 l2t4_rst_fatal_error,
217 l2t5_rst_fatal_error,
218 l2t6_rst_fatal_error,
219 l2t7_rst_fatal_error,
220 ncu_rst_fatal_error,
221 tcu_test_protect,
222 rst_mcu_selfrsh_cmp2,
223 rst_rst_pwron_rst_l_io0_,
224 rd_req_vld_io,
225 wr_req_vld_io,
226 req_acpted,
227 rd_ack_vld,
228 rd_nack_vld,
229 addr_in_io,
230 data_in_io,
231 thr_id_in_io,
232 buf_id_in_io,
233 ack_busy_io,
234 data_out,
235 thr_id_out,
236 buf_id_out,
237 rst_ncu_unpark_thread,
238 rst_ncu_xir_,
239 ncu_rst_xir_done_io,
240 ccu_rst_change_io,
241 l2ta_rst_fatal_error_io,
242 ncu_rst_fatal_error_io,
243 tcu_test_protect_io,
244 rst_rst_wmr_io_,
245 rst_mcu_selfrsh);
246wire int_aclk;
247wire int_bclk;
248wire int_scan_en;
249wire int_clk_stop;
250wire siclk;
251wire soclk;
252wire rd_req_vld_io_din;
253wire rd_req_vld_io_ff_scanin;
254wire rd_req_vld_io_ff_scanout;
255wire l1clk;
256wire wr_req_vld_io_din;
257wire wr_req_vld_io_ff_scanin;
258wire wr_req_vld_io_ff_scanout;
259wire req_acpted_io_ff_scanin;
260wire req_acpted_io_ff_scanout;
261wire req_acpted_io2_ff_scanin;
262wire req_acpted_io2_ff_scanout;
263wire rd_ack_vld_io;
264wire rd_ack_vld_ff_scanin;
265wire rd_ack_vld_ff_scanout;
266wire rd_ack_vld_io2_ff_scanin;
267wire rd_ack_vld_io2_ff_scanout;
268wire rd_nack_vld_io;
269wire rd_nack_vld_ff_scanin;
270wire rd_nack_vld_ff_scanout;
271wire rd_nack_vld_io2_ff_scanin;
272wire rd_nack_vld_io2_ff_scanout;
273wire addr_in_io_ff_scanin;
274wire addr_in_io_ff_scanout;
275wire data_in_io_ff_scanin;
276wire data_in_io_ff_scanout;
277wire thr_id_in_io_ff_scanin;
278wire thr_id_in_io_ff_scanout;
279wire buf_id_in_io_ff_scanin;
280wire buf_id_in_io_ff_scanout;
281wire ack_busy_io_ff_scanin;
282wire ack_busy_io_ff_scanout;
283wire data_out_ff_scanin;
284wire data_out_ff_scanout;
285wire [15:0] data_out_used;
286wire thr_id_out_ff_scanin;
287wire thr_id_out_ff_scanout;
288wire buf_id_out_ff_scanin;
289wire buf_id_out_ff_scanout;
290wire rst_rst_pwron_rst_l_io_ff_scanin;
291wire rst_rst_pwron_rst_l_io_ff_scanout;
292wire rst_rst_pwron_rst_l_io1_;
293wire rst_rst_pwron_rst_l_io_;
294wire rst_ncu_unpark_thread_io_ff_scanin;
295wire rst_ncu_unpark_thread_io_ff_scanout;
296wire rst_ncu_unpark_thread_io;
297wire rst_ncu_unpark_thread_ff_scanin;
298wire rst_ncu_unpark_thread_ff_scanout;
299wire rst_ncu_unpark_thread_io2;
300wire rst_ncu_unpark_thread_edge;
301wire rst_ncu_xir_dout;
302wire rst_ncu_xir_io_ff_scanin;
303wire rst_ncu_xir_io_ff_scanout;
304wire ccu_rst_change_io_ff_scanin;
305wire ccu_rst_change_io_ff_scanout;
306wire [7:0] l2ta_rst_fatal_error;
307wire l2ta_rst_fatal_error_io_ff_scanin;
308wire l2ta_rst_fatal_error_io_ff_scanout;
309wire ncu_rst_fatal_error_io_ff_scanin;
310wire ncu_rst_fatal_error_io_ff_scanout;
311wire ncu_rst_xir_done_io_ff_scanin;
312wire ncu_rst_xir_done_io_ff_scanout;
313wire tcu_test_protect_io_ff_scanin;
314wire tcu_test_protect_io_ff_scanout;
315wire rst_rst_wmr_io_ff_scanin;
316wire rst_rst_wmr_io_ff_scanout;
317wire rst_rst_por_io_ff_scanin;
318wire rst_rst_por_io_ff_scanout;
319wire rst_mcu_selfrsh_io_ff_scanin;
320wire rst_mcu_selfrsh_io_ff_scanout;
321wire spares_scanin;
322wire spares_scanout;
323
324input iol2clk ;// From clkgen_rst_cmp.
325input scan_in ;// rst_fsm_ctl_scanin? rst_cmp_ctl_scanin?
326output scan_out ;//
327//output rst_fsm_ctl_scanout ;
328input rst_aclk ;// Called rst_ here.
329input rst_bclk ;// to allow assign stmt.
330//put rst_scan_en ;// Assign.
331input tcu_scan_en ;// Don't protect rst_io_ctl from flush,
332 // so pass tcu_scan_en.
333input tcu_pce_ov ;// (No assign needed.)
334input rst_clk_stop ;// Assign.
335input tcu_rst_scan_mode ;// Indicates scan is active.
336//put mio_rst_pwron_rst_l ;
337input rst_rst_por_io0_ ;
338input rst_rst_wmr_io0_ ;
339
340input rd_req_vld ;// Convert from io to cmp.
341input wr_req_vld ;// Convert from io to cmp.
342input req_acpted_cmp2 ;// Convert from cmp to io.
343input rd_ack_vld_cmp2 ;// Convert from cmp to io.
344input rd_nack_vld_cmp2 ;// Convert from cmp to io.
345input[39:0] addr_in ;// Convert from io to cmp to sys.
346input[63:0] data_in ;// Convert from io to cmp to sys.
347input[ 5:0] thr_id_in ;// Convert from io to cmp to sys.
348input[ 1:0] buf_id_in ;// Convert from io to cmp to sys.
349input ack_busy ;// Convert from io to cmp to sys.
350input[`RST_UCB_DATA_WIDTH-1:0]
351 data_out_cmp2 ;// Convert from cmp to io.
352input[ 5:0] thr_id_out_cmp2 ;// Convert from cmp to io.
353input[ 1:0] buf_id_out_cmp2 ;// Convert from cmp to io.
354input rst_ncu_unpark_thread_cmp2
355 ;// Convert from cmp to io.
356input rst_ncu_xir_cmp2_ ;// Convert from cmp to io.
357input ncu_rst_xir_done ;// Convert from io to cmp.
358input ccu_rst_change ;// Convert from io to cmp.
359input l2t0_rst_fatal_error ;// Convert from io to cmp.
360input l2t1_rst_fatal_error ;// Convert from io to cmp.
361input l2t2_rst_fatal_error ;// Convert from io to cmp.
362input l2t3_rst_fatal_error ;// Convert from io to cmp.
363input l2t4_rst_fatal_error ;// Convert from io to cmp.
364input l2t5_rst_fatal_error ;// Convert from io to cmp.
365input l2t6_rst_fatal_error ;// Convert from io to cmp.
366input l2t7_rst_fatal_error ;// Convert from io to cmp.
367input ncu_rst_fatal_error ;// Convert from io to cmp.
368input tcu_test_protect ;// Convert from io to cmp.
369input rst_mcu_selfrsh_cmp2 ;// Convert from cmp to io.
370input rst_rst_pwron_rst_l_io0_; // Gate outputs before sync reset.
371
372output rd_req_vld_io ;// Converting from io to cmp.
373output wr_req_vld_io ;// Converting from io to cmp.
374output req_acpted ;// Converted from cmp to io.
375output rd_ack_vld ;// Converted from cmp to io.
376output rd_nack_vld ;// Converted from cmp to io.
377output[39:0] addr_in_io ;// Convert from io to cmp to sys.
378output[`RST_UCB_DATA_WIDTH-1:0]
379 data_in_io ;// Convert from io to cmp to sys.
380output[ 5:0] thr_id_in_io ;// Convert from io to cmp to sys.
381output[ 1:0] buf_id_in_io ;// Convert from io to cmp to sys.
382output ack_busy_io ;// Convert from io to cmp to sys.
383output[63:0] data_out ;// Converted from cmp to io.
384output[ 5:0] thr_id_out ;// Converted from cmp to io.
385output[ 1:0] buf_id_out ;// Converted from cmp to io.
386output rst_ncu_unpark_thread ;// Converted from cmp to io.
387output rst_ncu_xir_ ;// Converted from cmp to io.
388output ncu_rst_xir_done_io ;// Convert from io to cmp.
389output ccu_rst_change_io ;// Convert from io to cmp.
390output[ 7:0] l2ta_rst_fatal_error_io; // Convert from io to cmp.
391output ncu_rst_fatal_error_io;// Convert from io to cmp.
392output tcu_test_protect_io ;// Convert from io to cmp.
393output rst_rst_wmr_io_ ;// Converted from cmp to io.
394output rst_mcu_selfrsh ;// Convert from cmp to io.
395//________________________________________________________________
396
397// Shield rst_io_ctl from flush reset. We wish control signals
398// to maintain their values across reset. To initially reset
399// this block, we reset the blocks that drive its inputs, and
400// allow the input values to shift in.
401
402//sign rst_fsm_ctl_scanout
403// = (~mio_rst_pwron_rst_l) ? scan_out : 1'b0;
404assign int_aclk = (tcu_rst_scan_mode) ? rst_aclk : 1'b0;
405assign int_bclk = (tcu_rst_scan_mode) ? rst_bclk : 1'b0;
406assign int_scan_en = (tcu_rst_scan_mode) ? tcu_scan_en : 1'b0;
407assign int_clk_stop = (tcu_rst_scan_mode) ? rst_clk_stop : 1'b0;
408
409assign siclk = int_aclk; // When say wire instead of assign, siclk = z.
410 // Described to Anurag Bhatnagar Feb 23 '05.
411assign soclk = int_bclk;
412//________________________________________________________________
413
414wire req_acpted_io ;//req_acpted_cmp2 retimed to io_clk.
415
416assign rd_req_vld_io_din =
417 rd_req_vld & ~req_acpted_io;
418 // Force a rising edge for back-to-back reads.
419
420rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_req_vld_io_ff
421 (.din (rd_req_vld_io_din ),
422 .scan_in (rd_req_vld_io_ff_scanin ),
423 .scan_out(rd_req_vld_io_ff_scanout),
424 .clr_ (rst_rst_wmr_io_ ),
425 .l1clk (l1clk ),
426 .dout (rd_req_vld_io ),
427 .siclk(siclk),
428 .soclk(soclk));// Cross from io_clk to cmp_clk.
429
430assign wr_req_vld_io_din =
431 wr_req_vld & ~req_acpted_io;
432 // Force a rising edge for back-to-back writes.
433
434rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 wr_req_vld_io_ff
435 (.din (wr_req_vld_io_din ),
436 .scan_in (wr_req_vld_io_ff_scanin ),
437 .scan_out(wr_req_vld_io_ff_scanout),
438 .clr_ (rst_rst_wmr_io_ ),
439 .l1clk (l1clk ),
440 .dout (wr_req_vld_io ),
441 .siclk(siclk),
442 .soclk(soclk));// Cross from io_clk to cmp_clk.
443//________________________________________________________________
444
445wire req_acpted_io2 ;//req_acpted_io delayed one cycle.
446assign req_acpted = req_acpted_io &
447 ~req_acpted_io2;// Rising edge.
448
449rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 req_acpted_io_ff
450 (.din (req_acpted_cmp2 ),
451 .scan_in (req_acpted_io_ff_scanin ),
452 .scan_out(req_acpted_io_ff_scanout),
453 .clr_ (rst_rst_wmr_io_ ),
454 .l1clk (l1clk ),
455 .dout (req_acpted_io ),
456 .siclk(siclk),
457 .soclk(soclk));
458
459rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 req_acpted_io2_ff
460 (.din (req_acpted_io ),
461 .scan_in (req_acpted_io2_ff_scanin ),
462 .scan_out(req_acpted_io2_ff_scanout),
463 .clr_ (rst_rst_wmr_io_ ),
464 .l1clk (l1clk ),
465 .dout (req_acpted_io2 ),
466 .siclk(siclk),
467 .soclk(soclk));
468//________________________________________________________________
469
470wire rd_ack_vld_io2 ;//rd_ack_vld_io delayed one cycle.
471assign rd_ack_vld = rd_ack_vld_io &
472 ~rd_ack_vld_io2;// Rising edge.
473
474rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_ack_vld_ff
475 (.din (rd_ack_vld_cmp2 ),
476 .scan_in (rd_ack_vld_ff_scanin ),
477 .scan_out(rd_ack_vld_ff_scanout),
478 .clr_ (rst_rst_wmr_io_ ),
479 .l1clk (l1clk ),
480 .dout (rd_ack_vld_io ),
481 .siclk(siclk),
482 .soclk(soclk));
483
484rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_ack_vld_io2_ff
485 (.din (rd_ack_vld_io ),
486 .scan_in (rd_ack_vld_io2_ff_scanin ),
487 .scan_out(rd_ack_vld_io2_ff_scanout),
488 .clr_ (rst_rst_wmr_io_ ),
489 .l1clk (l1clk ),
490 .dout (rd_ack_vld_io2 ),
491 .siclk(siclk),
492 .soclk(soclk));
493//________________________________________________________________
494
495wire rd_nack_vld_io2 ;//rd_nack_vld_io delayed one cycle.
496assign rd_nack_vld = rd_nack_vld_io &
497 ~rd_nack_vld_io2;// Rising edge.
498
499rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_nack_vld_ff
500 (.din (rd_nack_vld_cmp2 ),
501 .scan_in (rd_nack_vld_ff_scanin ),
502 .scan_out(rd_nack_vld_ff_scanout),
503 .clr_ (rst_rst_wmr_io_ ),
504 .l1clk (l1clk ),
505 .dout (rd_nack_vld_io ),
506 .siclk(siclk),
507 .soclk(soclk));
508
509rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_nack_vld_io2_ff
510 (.din (rd_nack_vld_io ),
511 .scan_in (rd_nack_vld_io2_ff_scanin ),
512 .scan_out(rd_nack_vld_io2_ff_scanout),
513 .clr_ (rst_rst_wmr_io_ ),
514 .l1clk (l1clk ),
515 .dout (rd_nack_vld_io2 ),
516 .siclk(siclk),
517 .soclk(soclk));
518//________________________________________________________________
519
520rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_40 addr_in_io_ff
521 (.din (addr_in[39:0] ),
522 .scan_in (addr_in_io_ff_scanin ),
523 .scan_out(addr_in_io_ff_scanout),
524 .clr_ (rst_rst_wmr_io_ ),
525 .l1clk (l1clk ),
526 .dout (addr_in_io[39:0] ),
527 .siclk(siclk),
528 .soclk(soclk));// Get ready to cross from io to cmp.
529
530rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_16 data_in_io_ff
531
532 // data_in[63:`RST_UCB_DATA_WIDTH] not connected.
533 (.din (data_in [`RST_UCB_DATA_WIDTH-1:0]),
534 .scan_in (data_in_io_ff_scanin ),
535 .scan_out(data_in_io_ff_scanout),
536 .clr_ (rst_rst_wmr_io_ ),
537 .l1clk (l1clk ),
538 .dout (data_in_io[`RST_UCB_DATA_WIDTH-1:0]),
539 .siclk(siclk),
540 .soclk(soclk));// Get ready to go io-cmp.
541
542rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_6 thr_id_in_io_ff
543 (.din (thr_id_in[5:0] ),
544 .scan_in (thr_id_in_io_ff_scanin ),
545 .scan_out(thr_id_in_io_ff_scanout),
546 .clr_ (rst_rst_wmr_io_ ),
547 .l1clk (l1clk ),
548 .dout (thr_id_in_io[5:0] ),
549 .siclk(siclk),
550 .soclk(soclk));// Get ready to cross from io to cmp.
551
552rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_2 buf_id_in_io_ff
553 (.din (buf_id_in[1:0] ),
554 .scan_in (buf_id_in_io_ff_scanin ),
555 .scan_out(buf_id_in_io_ff_scanout),
556 .clr_ (rst_rst_wmr_io_ ),
557 .l1clk (l1clk ),
558 .dout (buf_id_in_io[1:0] ),
559 .siclk(siclk),
560 .soclk(soclk));// Get ready to cross from io to cmp.
561
562rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 ack_busy_io_ff
563 (.din (ack_busy ),
564 .scan_in (ack_busy_io_ff_scanin ),
565 .scan_out(ack_busy_io_ff_scanout),
566 .clr_ (rst_rst_wmr_io_ ),
567 .l1clk (l1clk ),
568 .dout (ack_busy_io ),
569 .siclk(siclk),
570 .soclk(soclk));// Get ready to cross from io to cmp.
571//________________________________________________________________
572
573rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_16 data_out_ff
574
575 (.din (data_out_cmp2[`RST_UCB_DATA_WIDTH-1:0]),
576 .scan_in (data_out_ff_scanin ),
577 .scan_out(data_out_ff_scanout),
578 .clr_ (rst_rst_wmr_io_ ),
579 .l1clk (l1clk ),
580 .dout (data_out_used[`RST_UCB_DATA_WIDTH-1:0]),
581 .siclk(siclk),
582 .soclk(soclk));
583assign data_out [ 63:0] =
584 {48'b0,
585 data_out_used[`RST_UCB_DATA_WIDTH-1:0]};
586
587rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_6 thr_id_out_ff
588 (.din (thr_id_out_cmp2[ 5:0]),
589 .scan_in (thr_id_out_ff_scanin ),
590 .scan_out(thr_id_out_ff_scanout),
591 .clr_ (rst_rst_wmr_io_ ),
592 .l1clk (l1clk ),
593 .dout (thr_id_out[ 5:0] ),
594 .siclk(siclk),
595 .soclk(soclk));
596
597rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_2 buf_id_out_ff
598 (.din (buf_id_out_cmp2[ 1:0]),
599 .scan_in (buf_id_out_ff_scanin ),
600 .scan_out(buf_id_out_ff_scanout),
601 .clr_ (rst_rst_wmr_io_ ),
602 .l1clk (l1clk ),
603 .dout (buf_id_out[ 1:0] ),
604 .siclk(siclk),
605 .soclk(soclk));
606//________________________________________________________________
607
608rst_io_ctl_msff_ctl_macro__clr__0__en_0__width_1 rst_rst_pwron_rst_l_io_ff
609 (.din (rst_rst_pwron_rst_l_io0_ ),
610// .clr_ (rst_rst_wmr_io_ ),// Must be able to come out.
611 .scan_in (rst_rst_pwron_rst_l_io_ff_scanin ),
612 .scan_out(rst_rst_pwron_rst_l_io_ff_scanout),
613 .l1clk (l1clk ),
614 .dout (rst_rst_pwron_rst_l_io1_ ),
615 .siclk(siclk),
616 .soclk(soclk));//Crossed from cmp to io.
617
618assign rst_rst_pwron_rst_l_io_ =
619 rst_rst_pwron_rst_l_io0_ & //
620 rst_rst_pwron_rst_l_io1_ ; // Async assert, io-sync deassert.
621//________________________________________________________________
622
623rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ncu_unpark_thread_io_ff
624 (.din (rst_ncu_unpark_thread_cmp2 ),
625 .scan_in (rst_ncu_unpark_thread_io_ff_scanin ),
626 .scan_out(rst_ncu_unpark_thread_io_ff_scanout),
627 .clr_ (rst_rst_wmr_io_ ),
628 .l1clk (l1clk ),
629 .dout (rst_ncu_unpark_thread_io ),
630 .siclk(siclk),
631 .soclk(soclk));//Crossed from cmp to io.
632
633rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ncu_unpark_thread_ff
634 (.din (rst_ncu_unpark_thread_io ),
635 .scan_in (rst_ncu_unpark_thread_ff_scanin ),
636 .scan_out(rst_ncu_unpark_thread_ff_scanout),
637 .clr_ (rst_rst_wmr_io_ ),
638 .l1clk (l1clk ),
639 .dout (rst_ncu_unpark_thread_io2 ),
640 .siclk(siclk),
641 .soclk(soclk));//Crossed from cmp to io.
642
643assign rst_ncu_unpark_thread_edge = rst_ncu_unpark_thread_io &
644 ~rst_ncu_unpark_thread_io2;
645 // Rising edge.
646
647 // Flops in this block will be unknown until iol2clk starts,
648 // so need to gate this output to ncu.
649assign rst_ncu_unpark_thread =
650 rst_ncu_unpark_thread_edge & rst_rst_pwron_rst_l_io_;
651//________________________________________________________________
652
653wire rst_ncu_xir_din = ~rst_ncu_xir_cmp2_;
654wire rst_ncu_xir_safe = rst_ncu_xir_dout &
655 rst_rst_pwron_rst_l_io_;
656assign rst_ncu_xir_ = ~rst_ncu_xir_safe;
657 // Store as active low, so
658 // resets to deasserted value.
659rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ncu_xir_io_ff
660 (.din (rst_ncu_xir_din ),
661 .scan_in (rst_ncu_xir_io_ff_scanin ),
662 .scan_out(rst_ncu_xir_io_ff_scanout),
663 .clr_ (rst_rst_wmr_io_ ),
664 .l1clk (l1clk ),
665 .dout (rst_ncu_xir_dout ),
666 .siclk(siclk),
667 .soclk(soclk));//Crossed from cmp to io.
668//________________________________________________________________
669
670rst_io_ctl_msff_ctl_macro__clr__0__en_0__width_1 ccu_rst_change_io_ff
671 (.din (ccu_rst_change ),
672// .clr_ (rst_rst_wmr_io_ ), Review Dec 15 '05.
673 .scan_in (ccu_rst_change_io_ff_scanin ),
674 .scan_out(ccu_rst_change_io_ff_scanout),
675 .l1clk (l1clk ),
676 .dout (ccu_rst_change_io ),
677 .siclk(siclk),
678 .soclk(soclk));//Cross from io to cmp.
679//________________________________________________________________
680
681assign l2ta_rst_fatal_error[7:0] = // l2t all in one array.
682 {l2t7_rst_fatal_error ,
683 l2t6_rst_fatal_error ,
684 l2t5_rst_fatal_error ,
685 l2t4_rst_fatal_error ,
686 l2t3_rst_fatal_error ,
687 l2t2_rst_fatal_error ,
688 l2t1_rst_fatal_error ,
689 l2t0_rst_fatal_error };
690
691rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_8 l2ta_rst_fatal_error_io_ff
692 (.din (l2ta_rst_fatal_error[7:0] ),
693 .scan_in (l2ta_rst_fatal_error_io_ff_scanin ),
694 .scan_out(l2ta_rst_fatal_error_io_ff_scanout),
695 .clr_ (rst_rst_wmr_io_ ),
696 .l1clk (l1clk ),
697 .dout (l2ta_rst_fatal_error_io[7:0] ),
698 .siclk(siclk),
699 .soclk(soclk));//Crossing io->cmp.
700
701rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 ncu_rst_fatal_error_io_ff
702 (.din (ncu_rst_fatal_error ),
703 .scan_in (ncu_rst_fatal_error_io_ff_scanin ),
704 .scan_out(ncu_rst_fatal_error_io_ff_scanout),
705 .clr_ (rst_rst_wmr_io_ ),
706 .l1clk (l1clk ),
707 .dout (ncu_rst_fatal_error_io ),
708 .siclk(siclk),
709 .soclk(soclk));//Crossing io->cmp.
710//________________________________________________________________
711
712rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 ncu_rst_xir_done_io_ff
713 (.din (ncu_rst_xir_done ),
714 .scan_in (ncu_rst_xir_done_io_ff_scanin ),
715 .scan_out(ncu_rst_xir_done_io_ff_scanout),
716 .clr_ (rst_rst_wmr_io_ ),
717 .l1clk (l1clk ),
718 .dout (ncu_rst_xir_done_io ),
719 .siclk(siclk),
720 .soclk(soclk));//Crossing cmp->io.
721
722rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 tcu_test_protect_io_ff
723 (.din (tcu_test_protect ),
724 .scan_in (tcu_test_protect_io_ff_scanin ),
725 .scan_out(tcu_test_protect_io_ff_scanout),
726 .clr_ (rst_rst_wmr_io_ ),
727 .l1clk (l1clk ),
728 .dout (tcu_test_protect_io ),
729 .siclk(siclk),
730 .soclk(soclk));//Crossing cmp->io.
731//________________________________________________________________
732
733rst_io_ctl_msff_ctl_macro__clr__0__en_0__width_1 rst_rst_wmr_io_ff
734 (.din (rst_rst_wmr_io0_ ),
735// .clr_ (rst_rst_wmr_io_ ), Review Oct 16 '05.
736 .scan_in (rst_rst_wmr_io_ff_scanin ),
737 .scan_out(rst_rst_wmr_io_ff_scanout),
738 .l1clk (l1clk ),
739 .dout (rst_rst_wmr_io_ ),
740 .siclk(siclk),
741 .soclk(soclk));//Crossed from cmp to io.
742
743wire rst_rst_por_io_;
744rst_io_ctl_msff_ctl_macro__clr__0__en_0__width_1 rst_rst_por_io_ff
745 (.din (rst_rst_por_io0_ ),
746// .clr_ (rst_rst_por_io_ ), Review Oct 16 '05.
747 .scan_in (rst_rst_por_io_ff_scanin ),
748 .scan_out(rst_rst_por_io_ff_scanout),
749 .l1clk (l1clk ),
750 .dout (rst_rst_por_io_ ),
751 .siclk(siclk),
752 .soclk(soclk));//Crossed from cmp to io.
753
754rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_mcu_selfrsh_io_ff
755 (.din (rst_mcu_selfrsh_cmp2 ),
756 .scan_in (rst_mcu_selfrsh_io_ff_scanin ),
757 .scan_out(rst_mcu_selfrsh_io_ff_scanout),
758 .clr_ (rst_rst_por_io_ ),
759 .l1clk (l1clk ),
760 .dout (rst_mcu_selfrsh ),
761 .siclk(siclk),
762 .soclk(soclk));//Crossed from cmp to io.
763//________________________________________________________________
764
765rst_io_ctl_l1clkhdr_ctl_macro clkgen (
766 .l2clk (iol2clk ),
767 .l1en (1'b1 ),
768 .pce_ov (tcu_pce_ov ), // (No assign needed.)
769 .stop (int_clk_stop), // Qualified by assign stmt.
770 .se (int_scan_en ), // Qualified by assign stmt.
771 .l1clk (l1clk ));
772
773// grep "Number of cells:" rst_*_l/*/scf/dc/rpt/syn_area.rpt
774// Number of cells/450 = spare gate macros
775// rst_io_l/rst_io_ctl/scf/dc/rpt/syn_area.rpt: Num: 21 /450=1
776
777rst_io_ctl_spare_ctl_macro__num_1 spares (
778 .scan_in (spares_scanin ),
779 .scan_out(spares_scanout),
780 .l1clk (l1clk),
781 .siclk(siclk),
782 .soclk(soclk) );
783//________________________________________________________________
784
785// fixscan start:
786assign rd_req_vld_io_ff_scanin = scan_in ;
787assign wr_req_vld_io_ff_scanin = rd_req_vld_io_ff_scanout ;
788assign req_acpted_io_ff_scanin = wr_req_vld_io_ff_scanout ;
789assign req_acpted_io2_ff_scanin = req_acpted_io_ff_scanout ;
790assign rd_ack_vld_ff_scanin = req_acpted_io2_ff_scanout;
791assign rd_ack_vld_io2_ff_scanin = rd_ack_vld_ff_scanout ;
792assign rd_nack_vld_ff_scanin = rd_ack_vld_io2_ff_scanout;
793assign rd_nack_vld_io2_ff_scanin = rd_nack_vld_ff_scanout ;
794assign addr_in_io_ff_scanin = rd_nack_vld_io2_ff_scanout;
795assign data_in_io_ff_scanin = addr_in_io_ff_scanout ;
796assign thr_id_in_io_ff_scanin = data_in_io_ff_scanout ;
797assign buf_id_in_io_ff_scanin = thr_id_in_io_ff_scanout ;
798assign ack_busy_io_ff_scanin = buf_id_in_io_ff_scanout ;
799assign data_out_ff_scanin = ack_busy_io_ff_scanout ;
800assign thr_id_out_ff_scanin = data_out_ff_scanout ;
801assign buf_id_out_ff_scanin = thr_id_out_ff_scanout ;
802assign rst_rst_pwron_rst_l_io_ff_scanin = buf_id_out_ff_scanout ;
803assign rst_ncu_unpark_thread_io_ff_scanin = rst_rst_pwron_rst_l_io_ff_scanout;
804assign rst_ncu_unpark_thread_ff_scanin = rst_ncu_unpark_thread_io_ff_scanout;
805assign rst_ncu_xir_io_ff_scanin = rst_ncu_unpark_thread_ff_scanout;
806assign ccu_rst_change_io_ff_scanin = rst_ncu_xir_io_ff_scanout;
807assign l2ta_rst_fatal_error_io_ff_scanin = ccu_rst_change_io_ff_scanout;
808assign ncu_rst_fatal_error_io_ff_scanin = l2ta_rst_fatal_error_io_ff_scanout;
809assign ncu_rst_xir_done_io_ff_scanin = ncu_rst_fatal_error_io_ff_scanout;
810assign tcu_test_protect_io_ff_scanin = ncu_rst_xir_done_io_ff_scanout;
811assign rst_rst_wmr_io_ff_scanin = tcu_test_protect_io_ff_scanout;
812assign rst_rst_por_io_ff_scanin = rst_rst_wmr_io_ff_scanout;
813assign rst_mcu_selfrsh_io_ff_scanin = rst_rst_por_io_ff_scanout;
814assign spares_scanin = rst_mcu_selfrsh_io_ff_scanout;
815assign scan_out = spares_scanout ;
816// fixscan end:
817endmodule // rst_io_ctl
818
819
820
821
822
823
824// any PARAMS parms go into naming of macro
825
826module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_1 (
827 din,
828 clr_,
829 l1clk,
830 scan_in,
831 siclk,
832 soclk,
833 dout,
834 scan_out);
835wire [0:0] fdin;
836
837 input [0:0] din;
838 input clr_;
839 input l1clk;
840 input scan_in;
841
842
843 input siclk;
844 input soclk;
845
846 output [0:0] dout;
847 output scan_out;
848assign fdin[0:0] = din[0:0] & ~{1{(~clr_)}};
849
850
851
852
853
854
855dff #(1) d0_0 (
856.l1clk(l1clk),
857.siclk(siclk),
858.soclk(soclk),
859.d(fdin[0:0]),
860.si(scan_in),
861.so(scan_out),
862.q(dout[0:0])
863);
864
865
866
867
868
869
870
871
872
873
874
875
876endmodule
877
878
879
880
881
882
883
884
885
886
887
888
889
890// any PARAMS parms go into naming of macro
891
892module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_40 (
893 din,
894 clr_,
895 l1clk,
896 scan_in,
897 siclk,
898 soclk,
899 dout,
900 scan_out);
901wire [39:0] fdin;
902wire [38:0] so;
903
904 input [39:0] din;
905 input clr_;
906 input l1clk;
907 input scan_in;
908
909
910 input siclk;
911 input soclk;
912
913 output [39:0] dout;
914 output scan_out;
915assign fdin[39:0] = din[39:0] & ~{40{(~clr_)}};
916
917
918
919
920
921
922dff #(40) d0_0 (
923.l1clk(l1clk),
924.siclk(siclk),
925.soclk(soclk),
926.d(fdin[39:0]),
927.si({scan_in,so[38:0]}),
928.so({so[38:0],scan_out}),
929.q(dout[39:0])
930);
931
932
933
934
935
936
937
938
939
940
941
942
943endmodule
944
945
946
947
948
949
950
951
952
953
954
955
956
957// any PARAMS parms go into naming of macro
958
959module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_16 (
960 din,
961 clr_,
962 l1clk,
963 scan_in,
964 siclk,
965 soclk,
966 dout,
967 scan_out);
968wire [15:0] fdin;
969wire [14:0] so;
970
971 input [15:0] din;
972 input clr_;
973 input l1clk;
974 input scan_in;
975
976
977 input siclk;
978 input soclk;
979
980 output [15:0] dout;
981 output scan_out;
982assign fdin[15:0] = din[15:0] & ~{16{(~clr_)}};
983
984
985
986
987
988
989dff #(16) d0_0 (
990.l1clk(l1clk),
991.siclk(siclk),
992.soclk(soclk),
993.d(fdin[15:0]),
994.si({scan_in,so[14:0]}),
995.so({so[14:0],scan_out}),
996.q(dout[15:0])
997);
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010endmodule
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024// any PARAMS parms go into naming of macro
1025
1026module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_6 (
1027 din,
1028 clr_,
1029 l1clk,
1030 scan_in,
1031 siclk,
1032 soclk,
1033 dout,
1034 scan_out);
1035wire [5:0] fdin;
1036wire [4:0] so;
1037
1038 input [5:0] din;
1039 input clr_;
1040 input l1clk;
1041 input scan_in;
1042
1043
1044 input siclk;
1045 input soclk;
1046
1047 output [5:0] dout;
1048 output scan_out;
1049assign fdin[5:0] = din[5:0] & ~{6{(~clr_)}};
1050
1051
1052
1053
1054
1055
1056dff #(6) d0_0 (
1057.l1clk(l1clk),
1058.siclk(siclk),
1059.soclk(soclk),
1060.d(fdin[5:0]),
1061.si({scan_in,so[4:0]}),
1062.so({so[4:0],scan_out}),
1063.q(dout[5:0])
1064);
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077endmodule
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091// any PARAMS parms go into naming of macro
1092
1093module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_2 (
1094 din,
1095 clr_,
1096 l1clk,
1097 scan_in,
1098 siclk,
1099 soclk,
1100 dout,
1101 scan_out);
1102wire [1:0] fdin;
1103wire [0:0] so;
1104
1105 input [1:0] din;
1106 input clr_;
1107 input l1clk;
1108 input scan_in;
1109
1110
1111 input siclk;
1112 input soclk;
1113
1114 output [1:0] dout;
1115 output scan_out;
1116assign fdin[1:0] = din[1:0] & ~{2{(~clr_)}};
1117
1118
1119
1120
1121
1122
1123dff #(2) d0_0 (
1124.l1clk(l1clk),
1125.siclk(siclk),
1126.soclk(soclk),
1127.d(fdin[1:0]),
1128.si({scan_in,so[0:0]}),
1129.so({so[0:0],scan_out}),
1130.q(dout[1:0])
1131);
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144endmodule
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158// any PARAMS parms go into naming of macro
1159
1160module rst_io_ctl_msff_ctl_macro__clr__0__en_0__width_1 (
1161 din,
1162 l1clk,
1163 scan_in,
1164 siclk,
1165 soclk,
1166 dout,
1167 scan_out);
1168wire [0:0] fdin;
1169
1170 input [0:0] din;
1171 input l1clk;
1172 input scan_in;
1173
1174
1175 input siclk;
1176 input soclk;
1177
1178 output [0:0] dout;
1179 output scan_out;
1180assign fdin[0:0] = din[0:0];
1181
1182
1183
1184
1185
1186
1187dff #(1) d0_0 (
1188.l1clk(l1clk),
1189.siclk(siclk),
1190.soclk(soclk),
1191.d(fdin[0:0]),
1192.si(scan_in),
1193.so(scan_out),
1194.q(dout[0:0])
1195);
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208endmodule
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222// any PARAMS parms go into naming of macro
1223
1224module rst_io_ctl_msff_ctl_macro__clr__1__en_0__width_8 (
1225 din,
1226 clr_,
1227 l1clk,
1228 scan_in,
1229 siclk,
1230 soclk,
1231 dout,
1232 scan_out);
1233wire [7:0] fdin;
1234wire [6:0] so;
1235
1236 input [7:0] din;
1237 input clr_;
1238 input l1clk;
1239 input scan_in;
1240
1241
1242 input siclk;
1243 input soclk;
1244
1245 output [7:0] dout;
1246 output scan_out;
1247assign fdin[7:0] = din[7:0] & ~{8{(~clr_)}};
1248
1249
1250
1251
1252
1253
1254dff #(8) d0_0 (
1255.l1clk(l1clk),
1256.siclk(siclk),
1257.soclk(soclk),
1258.d(fdin[7:0]),
1259.si({scan_in,so[6:0]}),
1260.so({so[6:0],scan_out}),
1261.q(dout[7:0])
1262);
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275endmodule
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289// any PARAMS parms go into naming of macro
1290
1291module rst_io_ctl_l1clkhdr_ctl_macro (
1292 l2clk,
1293 l1en,
1294 pce_ov,
1295 stop,
1296 se,
1297 l1clk);
1298
1299
1300 input l2clk;
1301 input l1en;
1302 input pce_ov;
1303 input stop;
1304 input se;
1305 output l1clk;
1306
1307
1308
1309
1310
1311cl_sc1_l1hdr_8x c_0 (
1312
1313
1314 .l2clk(l2clk),
1315 .pce(l1en),
1316 .l1clk(l1clk),
1317 .se(se),
1318 .pce_ov(pce_ov),
1319 .stop(stop)
1320);
1321
1322
1323
1324endmodule
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334// Description: Spare gate macro for control blocks
1335//
1336// Param num controls the number of times the macro is added
1337// flops=0 can be used to use only combination spare logic
1338
1339
1340module rst_io_ctl_spare_ctl_macro__num_1 (
1341 l1clk,
1342 scan_in,
1343 siclk,
1344 soclk,
1345 scan_out);
1346wire si_0;
1347wire so_0;
1348wire spare0_flop_unused;
1349wire spare0_buf_32x_unused;
1350wire spare0_nand3_8x_unused;
1351wire spare0_inv_8x_unused;
1352wire spare0_aoi22_4x_unused;
1353wire spare0_buf_8x_unused;
1354wire spare0_oai22_4x_unused;
1355wire spare0_inv_16x_unused;
1356wire spare0_nand2_16x_unused;
1357wire spare0_nor3_4x_unused;
1358wire spare0_nand2_8x_unused;
1359wire spare0_buf_16x_unused;
1360wire spare0_nor2_16x_unused;
1361wire spare0_inv_32x_unused;
1362
1363
1364input l1clk;
1365input scan_in;
1366input siclk;
1367input soclk;
1368output scan_out;
1369
1370cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
1371 .siclk(siclk),
1372 .soclk(soclk),
1373 .si(si_0),
1374 .so(so_0),
1375 .d(1'b0),
1376 .q(spare0_flop_unused));
1377assign si_0 = scan_in;
1378
1379cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
1380 .out(spare0_buf_32x_unused));
1381cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
1382 .in1(1'b1),
1383 .in2(1'b1),
1384 .out(spare0_nand3_8x_unused));
1385cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
1386 .out(spare0_inv_8x_unused));
1387cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
1388 .in01(1'b1),
1389 .in10(1'b1),
1390 .in11(1'b1),
1391 .out(spare0_aoi22_4x_unused));
1392cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
1393 .out(spare0_buf_8x_unused));
1394cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
1395 .in01(1'b1),
1396 .in10(1'b1),
1397 .in11(1'b1),
1398 .out(spare0_oai22_4x_unused));
1399cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
1400 .out(spare0_inv_16x_unused));
1401cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
1402 .in1(1'b1),
1403 .out(spare0_nand2_16x_unused));
1404cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
1405 .in1(1'b0),
1406 .in2(1'b0),
1407 .out(spare0_nor3_4x_unused));
1408cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
1409 .in1(1'b1),
1410 .out(spare0_nand2_8x_unused));
1411cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
1412 .out(spare0_buf_16x_unused));
1413cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
1414 .in1(1'b0),
1415 .out(spare0_nor2_16x_unused));
1416cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
1417 .out(spare0_inv_32x_unused));
1418assign scan_out = so_0;
1419
1420
1421
1422endmodule
1423