Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: rst_fsm_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 | // `include "dispmonDefines.vh" (Now in :/verif/env/tcu/tcu.flist.) | |
183 | ||
184 | module rst_fsm_ctl ( | |
185 | ref_clk, | |
186 | scan_in, | |
187 | rst_fsm_ctl_scanout, | |
188 | rst_aclk, | |
189 | rst_bclk, | |
190 | rst_scan_en, | |
191 | tcu_pce_ov, | |
192 | rst_clk_stop, | |
193 | req_acpted_sys, | |
194 | rd_req_vld_sys, | |
195 | wr_req_vld_sys, | |
196 | addr_in_sys, | |
197 | data_in_sys, | |
198 | thr_id_in_sys, | |
199 | buf_id_in_sys, | |
200 | ack_busy_sys, | |
201 | rd_ack_vld_sys, | |
202 | rd_nack_vld_sys, | |
203 | data_out_sys2, | |
204 | thr_id_out_sys, | |
205 | buf_id_out_sys, | |
206 | mio_rst_pwron_rst_l, | |
207 | mio_rst_button_xir_l, | |
208 | ncu_rst_xir_done_sys, | |
209 | mio_rst_pb_rst_l, | |
210 | ccu_rst_change_cmp, | |
211 | tcu_bisx_done_cmp, | |
212 | tcu_rst_efu_done_cmp, | |
213 | tr_flush_init_ack_cmp, | |
214 | tr_flush_stop_ack_cmp, | |
215 | tr_asicflush_stop_ack_cmp, | |
216 | ncu_rst_fatal_error_cmp, | |
217 | l2t0_rst_fatal_error_cmp, | |
218 | l2t1_rst_fatal_error_cmp, | |
219 | l2t2_rst_fatal_error_cmp, | |
220 | l2t3_rst_fatal_error_cmp, | |
221 | l2t4_rst_fatal_error_cmp, | |
222 | l2t5_rst_fatal_error_cmp, | |
223 | l2t6_rst_fatal_error_cmp, | |
224 | l2t7_rst_fatal_error_cmp, | |
225 | tcu_rst_scan_mode, | |
226 | mio_rst_pb_rst_sys2_, | |
227 | tcu_test_protect_cmp, | |
228 | rst_ccu_pll_, | |
229 | rst_ccu_, | |
230 | rst_l2_por_sys2_, | |
231 | rst_l2_wmr_sys2_, | |
232 | rst_cmp_ctl_wmr_sys2_, | |
233 | rst_wmr_protect, | |
234 | rst_tcu_clk_stop_sys2, | |
235 | rst_mcu_selfrsh_sys2, | |
236 | rst_dmu_peu_por_sys2_, | |
237 | rst_dmu_peu_wmr_sys2_, | |
238 | rt_flush_init_req_sys2, | |
239 | rt_flush_stop_req_sys2, | |
240 | rt_asicflush_stop_req_sys2, | |
241 | rst_niu_mac_sys2_, | |
242 | rst_niu_wmr_sys2_, | |
243 | rst_ncu_unpark_thread_sys2, | |
244 | rst_ncu_xir_sys2_, | |
245 | rst_mio_pex_reset_l, | |
246 | rst_mio_ssi_sync_l, | |
247 | rst_mio_rst_state, | |
248 | cluster_arst_l, | |
249 | rst_dmu_async_por_, | |
250 | rst_rst_pwron_rst_l_sys2_, | |
251 | reset_gen_dbr_gen_q, | |
252 | rst_rst_por_sys2_, | |
253 | rst_rst_wmr_sys2_, | |
254 | mio_rst_pb_rst_sys_) ; | |
255 | wire scan_out; | |
256 | wire tcu_aclk; | |
257 | wire tcu_bclk; | |
258 | wire tcu_scan_en; | |
259 | wire rd_req_vld_sys2_ff_scanin; | |
260 | wire rd_req_vld_sys2_ff_scanout; | |
261 | wire mio_rst_pwron_rst_sys_; | |
262 | wire l1clk; | |
263 | wire rd_req_vld_sys2; | |
264 | wire wr_req_vld_sys2_ff_scanin; | |
265 | wire wr_req_vld_sys2_ff_scanout; | |
266 | wire wr_req_vld_sys2; | |
267 | wire rd_req_vld_sys3_ff_scanin; | |
268 | wire rd_req_vld_sys3_ff_scanout; | |
269 | wire rd_req_vld_sys3; | |
270 | wire wr_req_vld_sys3_ff_scanin; | |
271 | wire wr_req_vld_sys3_ff_scanout; | |
272 | wire wr_req_vld_sys3; | |
273 | wire rd_req_vld_trunc; | |
274 | wire rst_rst_wmr_sys_; | |
275 | wire tcu_test_protect_sys; | |
276 | wire wr_req_vld_trunc; | |
277 | wire [15:0] data_out_sys; | |
278 | wire data_out_sys2_ff_scanin; | |
279 | wire data_out_sys2_ff_scanout; | |
280 | wire ncu_rst_xir_done_sys2_ff_scanin; | |
281 | wire ncu_rst_xir_done_sys2_ff_scanout; | |
282 | wire ncu_rst_xir_done_sys2; | |
283 | wire rt_flush_init_req_sys2_ff_scanin; | |
284 | wire rt_flush_init_req_sys2_ff_scanout; | |
285 | wire rt_flush_stop_req_sys2_ff_scanin; | |
286 | wire rt_flush_stop_req_sys2_ff_scanout; | |
287 | wire rt_asicflush_stop_req_sys2_ff_scanin; | |
288 | wire rt_asicflush_stop_req_sys2_ff_scanout; | |
289 | wire rst_l2_por_sys2_ff_scanin; | |
290 | wire rst_l2_por_sys2_ff_scanout; | |
291 | wire rst_l2_wmr_sys2_ff_scanin; | |
292 | wire rst_l2_wmr_sys2_ff_scanout; | |
293 | wire rst_cmp_ctl_wmr_sys2_ff_scanin; | |
294 | wire rst_cmp_ctl_wmr_sys2_ff_scanout; | |
295 | wire rst_wmr_protect_sys2_ff_scanin; | |
296 | wire rst_wmr_protect_sys2_ff_scanout; | |
297 | wire rst_wmr_protect_sys2; | |
298 | wire mio_rst_pwron_rst_l_sys_; | |
299 | wire rst_tcu_clk_stop_sys2_ff_scanin; | |
300 | wire rst_tcu_clk_stop_sys2_ff_scanout; | |
301 | wire rst_dmu_async_por_sys_ff_scanin; | |
302 | wire rst_dmu_async_por_sys_ff_scanout; | |
303 | wire rst_dmu_async_por_sys_; | |
304 | wire rst_dmu_peu_por_sys_; | |
305 | wire rst_dmu_peu_por_sys2_ff_scanin; | |
306 | wire rst_dmu_peu_por_sys2_ff_scanout; | |
307 | wire rst_dmu_peu_wmr_sys_; | |
308 | wire rst_dmu_peu_wmr_sys2_ff_scanin; | |
309 | wire rst_dmu_peu_wmr_sys2_ff_scanout; | |
310 | wire rst_niu_mac_sys_; | |
311 | wire rst_niu_mac_sys2_ff_scanin; | |
312 | wire rst_niu_mac_sys2_ff_scanout; | |
313 | wire rst_niu_wmr_sys_; | |
314 | wire rst_niu_wmr_sys2_ff_scanin; | |
315 | wire rst_niu_wmr_sys2_ff_scanout; | |
316 | wire rst_ncu_unpark_thread_sys2_ff_scanin; | |
317 | wire rst_ncu_unpark_thread_sys2_ff_scanout; | |
318 | wire rst_ncu_xir_dout; | |
319 | wire rst_ncu_xir_sys2_ff_scanin; | |
320 | wire rst_ncu_xir_sys2_ff_scanout; | |
321 | wire rst_rst_wmr_sys_ff_scanin; | |
322 | wire rst_rst_wmr_sys_ff_scanout; | |
323 | wire rst_rst_por_sys_; | |
324 | wire rst_rst_por_sys_ff_scanin; | |
325 | wire rst_rst_por_sys_ff_scanout; | |
326 | wire tcu_rst_efu_done_sys_ff_scanin; | |
327 | wire tcu_rst_efu_done_sys_ff_scanout; | |
328 | wire tcu_rst_efu_done_sys; | |
329 | wire tcu_bisx_done_sys_ff_scanin; | |
330 | wire tcu_bisx_done_sys_ff_scanout; | |
331 | wire tcu_bisx_done_sys; | |
332 | wire ccu_rst_change_sys_ff_scanin; | |
333 | wire ccu_rst_change_sys_ff_scanout; | |
334 | wire ccu_rst_change_sys; | |
335 | wire tcu_test_protect_sys_ff_scanin; | |
336 | wire tcu_test_protect_sys_ff_scanout; | |
337 | wire ncu_rst_fatal_error_sys_ff_scanin; | |
338 | wire ncu_rst_fatal_error_sys_ff_scanout; | |
339 | wire l2t7_rst_fatal_error_sys_ff_scanin; | |
340 | wire l2t7_rst_fatal_error_sys_ff_scanout; | |
341 | wire l2t6_rst_fatal_error_sys_ff_scanin; | |
342 | wire l2t6_rst_fatal_error_sys_ff_scanout; | |
343 | wire l2t5_rst_fatal_error_sys_ff_scanin; | |
344 | wire l2t5_rst_fatal_error_sys_ff_scanout; | |
345 | wire l2t4_rst_fatal_error_sys_ff_scanin; | |
346 | wire l2t4_rst_fatal_error_sys_ff_scanout; | |
347 | wire l2t3_rst_fatal_error_sys_ff_scanin; | |
348 | wire l2t3_rst_fatal_error_sys_ff_scanout; | |
349 | wire l2t2_rst_fatal_error_sys_ff_scanin; | |
350 | wire l2t2_rst_fatal_error_sys_ff_scanout; | |
351 | wire l2t1_rst_fatal_error_sys_ff_scanin; | |
352 | wire l2t1_rst_fatal_error_sys_ff_scanout; | |
353 | wire l2t0_rst_fatal_error_sys_ff_scanin; | |
354 | wire l2t0_rst_fatal_error_sys_ff_scanout; | |
355 | wire mio_rst_pwron_rst_sys_ff_scanin; | |
356 | wire mio_rst_pwron_rst_sys_ff_scanout; | |
357 | wire cluster_arst_sm2_; | |
358 | wire rst_rst_pwron_rst_sys2_ff_scanin; | |
359 | wire rst_rst_pwron_rst_sys2_ff_scanout; | |
360 | wire rst_rst_pwron_rst_l_sys2_sync_; | |
361 | wire mio_rst_button_xir_sys_ff_scanin; | |
362 | wire mio_rst_button_xir_sys_ff_scanout; | |
363 | wire mio_rst_button_xir_sys_; | |
364 | wire mio_rst_pb_rst_sys_ff_scanin; | |
365 | wire mio_rst_pb_rst_sys_ff_scanout; | |
366 | wire rst_assert_ssi_sync_q; | |
367 | wire [39:0] addr_in_sys2; | |
368 | wire [15:0] data_in_sys2; | |
369 | wire reset_gen_dbr_gen_ff_scanin; | |
370 | wire reset_gen_dbr_gen_ff_scanout; | |
371 | wire siclk; | |
372 | wire soclk; | |
373 | wire reset_gen_xir_gen_ff_scanin; | |
374 | wire reset_gen_xir_gen_ff_scanout; | |
375 | wire reset_gen_xir_gen_q; | |
376 | wire reset_gen_wmr_gen_ff_scanin; | |
377 | wire reset_gen_wmr_gen_ff_scanout; | |
378 | wire reset_gen_wmr_gen_q; | |
379 | wire [7:0] reset_fee_q; | |
380 | wire reset_source_l2t7_fatal_ff_scanin; | |
381 | wire reset_source_l2t7_fatal_ff_scanout; | |
382 | wire reset_source_l2t7_fatal_q; | |
383 | wire reset_source_l2t6_fatal_ff_scanin; | |
384 | wire reset_source_l2t6_fatal_ff_scanout; | |
385 | wire reset_source_l2t6_fatal_q; | |
386 | wire reset_source_l2t5_fatal_ff_scanin; | |
387 | wire reset_source_l2t5_fatal_ff_scanout; | |
388 | wire reset_source_l2t5_fatal_q; | |
389 | wire reset_source_l2t4_fatal_ff_scanin; | |
390 | wire reset_source_l2t4_fatal_ff_scanout; | |
391 | wire reset_source_l2t4_fatal_q; | |
392 | wire reset_source_l2t3_fatal_ff_scanin; | |
393 | wire reset_source_l2t3_fatal_ff_scanout; | |
394 | wire reset_source_l2t3_fatal_q; | |
395 | wire reset_source_l2t2_fatal_ff_scanin; | |
396 | wire reset_source_l2t2_fatal_ff_scanout; | |
397 | wire reset_source_l2t2_fatal_q; | |
398 | wire reset_source_l2t1_fatal_ff_scanin; | |
399 | wire reset_source_l2t1_fatal_ff_scanout; | |
400 | wire reset_source_l2t1_fatal_q; | |
401 | wire reset_source_l2t0_fatal_ff_scanin; | |
402 | wire reset_source_l2t0_fatal_ff_scanout; | |
403 | wire reset_source_l2t0_fatal_q; | |
404 | wire reset_source_ncu_fatal_ff_scanin; | |
405 | wire reset_source_ncu_fatal_ff_scanout; | |
406 | wire reset_source_ncu_fatal_q; | |
407 | wire reset_source_pb_xir_ff_scanin; | |
408 | wire reset_source_pb_xir_ff_scanout; | |
409 | wire reset_source_pb_xir_q; | |
410 | wire reset_source_pb_rst_ff_scanin; | |
411 | wire reset_source_pb_rst_ff_scanout; | |
412 | wire reset_source_pb_rst_q; | |
413 | wire reset_source_pwron_ff_scanin; | |
414 | wire reset_source_pwron_ff_scanout; | |
415 | wire reset_source_pwron_q_; | |
416 | wire reset_source_dbr_gen_ff_scanin; | |
417 | wire reset_source_dbr_gen_ff_scanout; | |
418 | wire reset_source_dbr_gen_q; | |
419 | wire reset_source_xir_gen_ff_scanin; | |
420 | wire reset_source_xir_gen_ff_scanout; | |
421 | wire reset_source_xir_gen_q; | |
422 | wire reset_source_wmr_gen_ff_scanin; | |
423 | wire reset_source_wmr_gen_ff_scanout; | |
424 | wire reset_source_wmr_gen_q; | |
425 | wire rst_ccu_pll_sys_ff_scanin; | |
426 | wire rst_ccu_pll_sys_ff_scanout; | |
427 | wire rst_ccu_pll_sm2_; | |
428 | wire rst_ccu_sys_ff_scanin; | |
429 | wire rst_ccu_sys_ff_scanout; | |
430 | wire rst_ccu_sm2_; | |
431 | wire cluster_arst_sys_ff_scanin; | |
432 | wire cluster_arst_sys_ff_scanout; | |
433 | wire rst_assert_ssi_sync_ff_scanin; | |
434 | wire rst_assert_ssi_sync_ff_scanout; | |
435 | wire ssys_reset_mac_ff_scanin; | |
436 | wire ssys_reset_mac_ff_scanout; | |
437 | wire ssys_reset_mac_q; | |
438 | wire ssys_reset_mcu_q; | |
439 | wire ssys_reset_mcu_ff_scanin; | |
440 | wire ssys_reset_mcu_ff_scanout; | |
441 | wire ssys_reset_dmu_ff_scanin; | |
442 | wire ssys_reset_dmu_ff_scanout; | |
443 | wire ssys_reset_dmu_q; | |
444 | wire ssys_reset_niu_ff_scanin; | |
445 | wire ssys_reset_niu_ff_scanout; | |
446 | wire ssys_reset_niu_q; | |
447 | wire rset_stat_shadow_ff_scanin; | |
448 | wire rset_stat_shadow_ff_scanout; | |
449 | wire rset_stat_freq_ff_scanin; | |
450 | wire rset_stat_freq_ff_scanout; | |
451 | wire rset_stat_por_din_phy_; | |
452 | wire rset_stat_por_q; | |
453 | wire rset_stat_por_ff_scanin; | |
454 | wire rset_stat_por_ff_scanout; | |
455 | wire rset_stat_wmr_ff_scanin; | |
456 | wire rset_stat_wmr_ff_scanout; | |
457 | wire lock_time_ff_scanin; | |
458 | wire lock_time_ff_scanout; | |
459 | wire lock_count_ff_scanin; | |
460 | wire lock_count_ff_scanout; | |
461 | wire prop_time_ff_scanin; | |
462 | wire prop_time_ff_scanout; | |
463 | wire prop_count_ff_scanin; | |
464 | wire prop_count_ff_scanout; | |
465 | wire niu_time_ff_scanin; | |
466 | wire niu_time_ff_scanout; | |
467 | wire niu_count_ff_scanin; | |
468 | wire niu_count_ff_scanout; | |
469 | wire ccu_time_ff_scanin; | |
470 | wire ccu_time_ff_scanout; | |
471 | wire ccu_count_ff_scanin; | |
472 | wire ccu_count_ff_scanout; | |
473 | wire reset_fee_ff_scanin; | |
474 | wire reset_fee_ff_scanout; | |
475 | wire tr_flush_init_ack_sys; | |
476 | wire tr_flush_stop_ack_sys; | |
477 | wire mio_rst_pb_rst_sys3_; | |
478 | wire tr_asicflush_stop_ack_sys; | |
479 | wire state_ff_scanin; | |
480 | wire state_ff_scanout; | |
481 | wire xir_state_ff_scanin; | |
482 | wire xir_state_ff_scanout; | |
483 | wire dmu_state_ff_scanin; | |
484 | wire dmu_state_ff_scanout; | |
485 | wire niu_state_ff_scanin; | |
486 | wire niu_state_ff_scanout; | |
487 | wire ack_busy_sys2; | |
488 | wire rd_ack_vld_sys_ff_scanin; | |
489 | wire rd_ack_vld_sys_ff_scanout; | |
490 | wire rd_nack_vld_sys_ff_scanin; | |
491 | wire rd_nack_vld_sys_ff_scanout; | |
492 | wire req_acpted_orig_sys_ff_scanin; | |
493 | wire req_acpted_orig_sys_ff_scanout; | |
494 | wire req_acpted_sys_ff_scanin; | |
495 | wire req_acpted_sys_ff_scanout; | |
496 | wire mio_rst_pb_rst_sys3_ff_scanin; | |
497 | wire mio_rst_pb_rst_sys3_ff_scanout; | |
498 | wire tr_flush_init_ack_sys_ff_scanin; | |
499 | wire tr_flush_init_ack_sys_ff_scanout; | |
500 | wire tr_flush_stop_ack_sys_ff_scanin; | |
501 | wire tr_flush_stop_ack_sys_ff_scanout; | |
502 | wire tr_asicflush_stop_ack_sys_ff_scanin; | |
503 | wire tr_asicflush_stop_ack_sys_ff_scanout; | |
504 | wire addr_in_sys2_ff_scanin; | |
505 | wire addr_in_sys2_ff_scanout; | |
506 | wire data_in_sys2_ff_scanin; | |
507 | wire data_in_sys2_ff_scanout; | |
508 | wire thr_id_in_sys2_ff_scanin; | |
509 | wire thr_id_in_sys2_ff_scanout; | |
510 | wire [5:0] thr_id_in_sys2; | |
511 | wire buf_id_in_sys2_ff_scanin; | |
512 | wire buf_id_in_sys2_ff_scanout; | |
513 | wire [1:0] buf_id_in_sys2; | |
514 | wire ack_busy_sys2_ff_scanin; | |
515 | wire ack_busy_sys2_ff_scanout; | |
516 | wire thr_id_out_sys_ff_scanin; | |
517 | wire thr_id_out_sys_ff_scanout; | |
518 | wire buf_id_out_sys_ff_scanin; | |
519 | wire buf_id_out_sys_ff_scanout; | |
520 | wire spares_scanin; | |
521 | wire spares_scanout; | |
522 | ||
523 | // Globals | |
524 | input ref_clk ;// Reference clock. | |
525 | input scan_in ; | |
526 | output rst_fsm_ctl_scanout ;// Replace scan_out Mar 2 '05. | |
527 | input rst_aclk ;// Called rst_ here. | |
528 | input rst_bclk ;// to allow assign stmt. | |
529 | input rst_scan_en ;// Assign. | |
530 | input tcu_pce_ov ;// (No assign needed.) | |
531 | input rst_clk_stop ;// Assign. | |
532 | ||
533 | output req_acpted_sys ;// Acceptance of CSR write or read command. | |
534 | ||
535 | // Commands to RST, the local unit | |
536 | input rd_req_vld_sys ;// | |
537 | input wr_req_vld_sys ;// | |
538 | input [39:0] addr_in_sys ;// | |
539 | input [`RST_UCB_DATA_WIDTH-1:0] | |
540 | data_in_sys ;// | |
541 | input [ 5:0] thr_id_in_sys ;// | |
542 | input [ 1:0] buf_id_in_sys ;// | |
543 | input ack_busy_sys ;// | |
544 | // Ack-Nack from RST, the local unit | |
545 | output rd_ack_vld_sys ;// | |
546 | output rd_nack_vld_sys ;// | |
547 | ||
548 | output [`RST_UCB_DATA_WIDTH-1:0] | |
549 | data_out_sys2 ;// Return data. | |
550 | output [ 5:0] thr_id_out_sys ;// | |
551 | output [ 1:0] buf_id_out_sys ;// | |
552 | ||
553 | input mio_rst_pwron_rst_l ;// PWRON_RST_L | |
554 | input mio_rst_button_xir_l ;// | |
555 | input ncu_rst_xir_done_sys ;// Active until rst deasserts rst_ncu_xir_. | |
556 | input mio_rst_pb_rst_l ;// | |
557 | input ccu_rst_change_cmp ;// | |
558 | //put ccu_rst_sync_stable ;// Replaced by ccu_count_q. | |
559 | input tcu_bisx_done_cmp ;// Active for one clock. | |
560 | input tcu_rst_efu_done_cmp ;// | |
561 | input tr_flush_init_ack_cmp ;// Request TCU to assert se. | |
562 | input tr_flush_stop_ack_cmp ;// Request TCU to deassert se. | |
563 | input tr_asicflush_stop_ack_cmp ;// Request TCU to deassert se. | |
564 | input ncu_rst_fatal_error_cmp;// Added Mar 26 '05. | |
565 | input l2t0_rst_fatal_error_cmp;// | |
566 | input l2t1_rst_fatal_error_cmp;// | |
567 | input l2t2_rst_fatal_error_cmp;// | |
568 | input l2t3_rst_fatal_error_cmp;// | |
569 | input l2t4_rst_fatal_error_cmp;// | |
570 | input l2t5_rst_fatal_error_cmp;// | |
571 | input l2t6_rst_fatal_error_cmp;// | |
572 | input l2t7_rst_fatal_error_cmp;// | |
573 | input tcu_rst_scan_mode ;// Indicates scan is active. | |
574 | input mio_rst_pb_rst_sys2_ ;// To rst_cmp_ctl and back again. | |
575 | input tcu_test_protect_cmp ; | |
576 | // During mbist, lbist, jtag scan, trans test may want | |
577 | // to block tcu, rst and ccu from seeing random activity | |
578 | // from ucb (NCU), SPC's, etc. | |
579 | // This signal synch'd to ioclk & set via jtag id for blocking | |
580 | ||
581 | output rst_ccu_pll_ ;// Reset PLL in Clock Control Unit. | |
582 | output rst_ccu_ ;// Reset logic in Clock Control Unit. | |
583 | output rst_l2_por_sys2_ ;// Data Path Reset. | |
584 | output rst_l2_wmr_sys2_ ;// State Machine Reset. | |
585 | output rst_cmp_ctl_wmr_sys2_;// State Machine Reset. | |
586 | ||
587 | output rst_wmr_protect ; | |
588 | output rst_tcu_clk_stop_sys2; | |
589 | output rst_mcu_selfrsh_sys2 ;// MCU_SELFRFSH bit of RESET_SSYS reg. | |
590 | output rst_dmu_peu_por_sys2_; | |
591 | output rst_dmu_peu_wmr_sys2_; | |
592 | output rt_flush_init_req_sys2;// Request TCU to assert se. | |
593 | output rt_flush_stop_req_sys2;// Request TCU to deassert se. | |
594 | output rt_asicflush_stop_req_sys2; | |
595 | // Request TCU to deassert se. | |
596 | output rst_niu_mac_sys2_ ;// Formerly rst_niu_. | |
597 | output rst_niu_wmr_sys2_ ;// Formerly rst_niu_. | |
598 | output rst_ncu_unpark_thread_sys2;// | |
599 | output rst_ncu_xir_sys2_ ;// | |
600 | output rst_mio_pex_reset_l ;// Added Nov 11 '04. | |
601 | output rst_mio_ssi_sync_l ;// Takes the place of rst_mio_fatal_error. | |
602 | output [5:0] rst_mio_rst_state ;// Added Apr 26 '05. | |
603 | output cluster_arst_l ;// Added May 02 '05. | |
604 | //tput mio_rst_pwron_rst_l_sys_;// BP 7-28-05 local por clr to cmp_ctl | |
605 | output rst_dmu_async_por_ ;// BP 8-05-05 async reset to dmu for por1 | |
606 | output rst_rst_pwron_rst_l_sys2_;// BP 7-28-05 to rst_cmp_ctl then on | |
607 | // to tcu, has asyn | |
608 | output reset_gen_dbr_gen_q ;// To rst_cmp_ctl then on to tcu | |
609 | output rst_rst_por_sys2_ ;// | |
610 | output rst_rst_wmr_sys2_ ;// BP 8-19-05. Was ucb_clr_sys2_. | |
611 | output mio_rst_pb_rst_sys_ ;// To rst_cmp_ctl and back again. | |
612 | //tput tcu_clk_stop_scan_mode; | |
613 | ||
614 | //________________________________________________________________ | |
615 | ||
616 | // Local signals | |
617 | reg rst_ccu_pll_sm_ ;// Reset PLL in ccu. | |
618 | reg rst_ccu_sm_ ;// Reset logic in ccu. | |
619 | reg cluster_arst_sm_ ;// Reset logic in cluster headers. | |
620 | reg rst_rst_por_sm_ ;// | |
621 | reg rst_l2_por_sys_ ;// | |
622 | reg rst_l2_wmr_sys_ ;// | |
623 | reg rst_cmp_ctl_wmr_sys_ ;// | |
624 | reg rst_niu_mac_sm_ ;// Driven by state machine. | |
625 | reg rst_niu_wmr_sm_ ;// Driven by state machine. | |
626 | reg rst_niu_ssys_sm_ ;// | |
627 | reg rst_dmu_async_por_sm_;// | |
628 | reg rst_dmu_peu_por_sm_ ;// | |
629 | reg rst_dmu_peu_wmr_sm_ ;// | |
630 | reg rst_dmu_ssys_sm_ ;// | |
631 | reg rst_wmr_protect_sys ;// | |
632 | reg rst_tcu_clk_stop_sys ;// | |
633 | ||
634 | reg rst_ncu_unpark_thread_sys;// | |
635 | reg rst_ncu_xir_sys_ ;// | |
636 | reg rt_flush_init_req_sys ;// Request TCU to assert se. | |
637 | reg rt_flush_stop_req_sys ;// Request TCU to deassert se. | |
638 | reg rt_asicflush_stop_req_sys ;// Request TCU to deassert se. | |
639 | reg rst_WMR_done ;// Completion of WMR. | |
640 | reg rst_DBR_done ;// Completion of DBR. | |
641 | reg rst_assert_ssi_sync_en ; | |
642 | reg rst_assert_ssi_sync_din ; | |
643 | reg rset_stat_wmr_set ;// Set WMR bit in RSET_STAT. | |
644 | reg reset_source_pb_xir_set ;// Set PB_XIR bit in RESET_SOURCE. | |
645 | reg reset_source_xir_gen_set ;// Set XIR_GEN bit in RESET_SOURCE. | |
646 | reg reset_gen_xir_gen_clr ;// Clear XIR_GEN bit in RESET_GEN. | |
647 | reg reset_source_pb_rst_set ;// Set PB_RST bit in RESET_SOURCE. | |
648 | ||
649 | reg [5:0] rst_mio_rst_state ;// Added Apr 26 '05. | |
650 | //________________________________________________________________ | |
651 | ||
652 | // I've attached 2 files with changes that should make RST block | |
653 | // scannable during ATPG and other scan modes (such as jtag serial | |
654 | // scan), but not allow rst_fsm_ctl to be flushed during flush reset. | |
655 | // | |
656 | // There is one new input, sourced by TCU: "tcu_rst_scan_mode" This | |
657 | // would look a lot like io_test_mode that we had discussed using, | |
658 | // but it allows TCU to control it to cover other scan modes. | |
659 | // | |
660 | // Also, these changes make both rst_fsm_ctl and rst_ucbflow_ctl | |
661 | // scannable, this is a good thing. But as I said, rst_fsm_ctl will | |
662 | // not be flushed ever. | |
663 | // | |
664 | // We would need to drive the signal "tcu_rst_scan_mode" to "1" | |
665 | // during chaintest for it to pass. I verified it passes chaintest | |
666 | // by tying it high. | |
667 | // | |
668 | // One disclaimer, I don't know how these muxes on the scan control | |
669 | // signals will affect the composition flows, but they may cause | |
670 | // problems that we'd need to look at as they arise. | |
671 | ||
672 | // The following three lines used to be in rst.sv: | |
673 | // | |
674 | // rst_fsm_ctl(.scan_out(rst_fsm_ctl_scanout), ... | |
675 | // assign rst_ucbflow_ctl_scanin = tcu_rst_scan_mode ? rst_fsm_ctl_scanout | |
676 | // : 1'b0 ; | |
677 | // moved that logic here, to rst_fsm_ctl.sv, Mar 2 '05. | |
678 | // .scan_out output port replaced by: | |
679 | // .rst_fsm_ctl_scanout output port, which has the | |
680 | // tcu_rst_scan_mode logic already | |
681 | // performed. | |
682 | // Now, in rst.sv: | |
683 | // rst_fsm_ctl(.rst_fsm_ctl_scanout(rst_fsm_ctl_scanout), ... | |
684 | // assign rst_ucbflow_ctl_scanin = rst_fsm_ctl_scanout; | |
685 | ||
686 | assign rst_fsm_ctl_scanout | |
687 | = tcu_rst_scan_mode ? scan_out : 1'b0; | |
688 | assign tcu_aclk = tcu_rst_scan_mode ? rst_aclk : 1'b0; | |
689 | assign tcu_bclk = tcu_rst_scan_mode ? rst_bclk : 1'b0; | |
690 | assign tcu_scan_en = tcu_rst_scan_mode ? rst_scan_en : 1'b0; | |
691 | //sign tcu_clk_stop = tcu_rst_scan_mode ? rst_clk_stop : 1'b0; | |
692 | //sign tcu_clk_stop_scan_mode = tcu_clk_stop; // See Bug 107214, below: | |
693 | //________________________________________________________________ | |
694 | // | |
695 | // Short Description: clock stop goes directly to flop header in rst_fsm_ctl | |
696 | // Command Line: sims -sys=fc_mfg_scan -sunv_run -vcs_build | |
697 | // -novera_build -vcs_run -config_cpp_args=-DCORES1 | |
698 | // -vcs_run_args=+scanCapture | |
699 | // -vcs_run_args=+chainsel=00000001 | |
700 | // ====================================================================== | |
701 | // Inside the rst unit, the tcu_rst_clk_stop goes to the following mux | |
702 | // inside rst_fsm_ctl: | |
703 | // | |
704 | // assign tcu_clk_stop = tcu_rst_scan_mode ? rst_clk_stop : 1'b0; | |
705 | // | |
706 | // Because tcu_rst_clk_stop is pipelined with non-scannable flops, it will | |
707 | // be 'x' during atpg scan capture. It goes directly to the flop header | |
708 | // inside rst_fsm_ctl, which breaks scan capture for all of the flops | |
709 | // inside that macro. | |
710 | // | |
711 | // ... according to him the tcu_rst_clk_stop comes from | |
712 | // a scannable flop in the tcu and was only put in there as a "may be nice | |
713 | // to have." | |
714 | // Since the clocks to the rst unit are never stopped during functional | |
715 | // mode, and since we don't need to stop the clock during atpg mode, the | |
716 | // equation above can be changed to: | |
717 | // | |
718 | // assign tcu_clk_stop = tcu_rst_scan_mode ? 1'b0 : 1'b0; | |
719 | // | |
720 | // or just tied tcu_clk_stop to 1'b0; | |
721 | //________________________________________________________________ | |
722 | ||
723 | // ign tr_flush_init_ack_sys = tr_flush_init_ack_cmp;// (Now a flop.) | |
724 | // ign tr_flush_stop_ack_sys = tr_flush_stop_ack_cmp;// (Now a flop.) | |
725 | //sign tr_asicflush_stop_ack_sys | |
726 | // = tr_asicflush_stop_ack_cmp;//(Now a flop.) | |
727 | ||
728 | // ign rt_flush_init_req_sys2 = rt_flush_init_req_sys;// (Now a flop.) | |
729 | // ign rt_flush_stop_req_sys2 = rt_flush_stop_req_sys;// (Now a flop.) | |
730 | ||
731 | wire req_acpted_orig_sys ;// Flop TK. | |
732 | //sign req_acpted_sys = req_acpted_orig_sys ;// (Now a flop.) | |
733 | //sign rd_req_vld = rd_req_vld_sys ;// (Now a flop.) | |
734 | //sign wr_req_vld = wr_req_vld_sys ;// (Now a flop.) | |
735 | ||
736 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_req_vld_sys2_ff | |
737 | (.din (rd_req_vld_sys ), | |
738 | .scan_in (rd_req_vld_sys2_ff_scanin ), | |
739 | .scan_out(rd_req_vld_sys2_ff_scanout), | |
740 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
741 | .l1clk (l1clk ), | |
742 | .dout (rd_req_vld_sys2 ), | |
743 | .siclk(siclk), | |
744 | .soclk(soclk));// Cross from cmp_clk to sys_clk. | |
745 | ||
746 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 wr_req_vld_sys2_ff | |
747 | (.din (wr_req_vld_sys ), | |
748 | .scan_in (wr_req_vld_sys2_ff_scanin ), | |
749 | .scan_out(wr_req_vld_sys2_ff_scanout), | |
750 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
751 | .l1clk (l1clk ), | |
752 | .dout (wr_req_vld_sys2 ), | |
753 | .siclk(siclk), | |
754 | .soclk(soclk));// Cross from cmp_clk to sys_clk. | |
755 | ||
756 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_req_vld_sys3_ff | |
757 | (.din (rd_req_vld_sys2 ), | |
758 | .scan_in (rd_req_vld_sys3_ff_scanin ), | |
759 | .scan_out(rd_req_vld_sys3_ff_scanout), | |
760 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
761 | .l1clk (l1clk ), | |
762 | .dout (rd_req_vld_sys3 ), | |
763 | .siclk(siclk), | |
764 | .soclk(soclk));// Delay by one cycle. | |
765 | ||
766 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 wr_req_vld_sys3_ff | |
767 | (.din (wr_req_vld_sys2 ), | |
768 | .scan_in (wr_req_vld_sys3_ff_scanin ), | |
769 | .scan_out(wr_req_vld_sys3_ff_scanout), | |
770 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
771 | .l1clk (l1clk ), | |
772 | .dout (wr_req_vld_sys3 ), | |
773 | .siclk(siclk), | |
774 | .soclk(soclk));// Delay by one cycle. | |
775 | ||
776 | assign rd_req_vld_trunc = | |
777 | rd_req_vld_sys2 & | |
778 | ~rd_req_vld_sys3 & // Leading-edge detector. | |
779 | rst_rst_wmr_sys_ & // BP 8-22-05 | |
780 | ~tcu_test_protect_sys; // Suppress on MBist scan. | |
781 | ||
782 | assign wr_req_vld_trunc = | |
783 | wr_req_vld_sys2 & | |
784 | ~wr_req_vld_sys3 & // Leading-edge detector. | |
785 | rst_rst_wmr_sys_ & // BP 8-22-05 | |
786 | ~tcu_test_protect_sys; // Suppress on MBist scan. | |
787 | ||
788 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 data_out_sys2_ff | |
789 | ||
790 | (.din (data_out_sys [`RST_UCB_DATA_WIDTH-1:0] ), | |
791 | .scan_in (data_out_sys2_ff_scanin ), | |
792 | .scan_out(data_out_sys2_ff_scanout), | |
793 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
794 | .l1clk (l1clk ), | |
795 | .dout (data_out_sys2[`RST_UCB_DATA_WIDTH-1:0] ), | |
796 | .siclk(siclk), | |
797 | .soclk(soclk));// Cross cmp-sys. | |
798 | //________________________________________________________________ | |
799 | ||
800 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 ncu_rst_xir_done_sys2_ff | |
801 | (.din (ncu_rst_xir_done_sys ), | |
802 | .scan_in (ncu_rst_xir_done_sys2_ff_scanin ), | |
803 | .scan_out(ncu_rst_xir_done_sys2_ff_scanout), | |
804 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
805 | .l1clk (l1clk ), | |
806 | .dout (ncu_rst_xir_done_sys2 ), | |
807 | .siclk(siclk), | |
808 | .soclk(soclk));// Delay by one cycle. | |
809 | //________________________________________________________________ | |
810 | ||
811 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rt_flush_init_req_sys2_ff | |
812 | (.din (rt_flush_init_req_sys ), | |
813 | .scan_in (rt_flush_init_req_sys2_ff_scanin ), | |
814 | .scan_out(rt_flush_init_req_sys2_ff_scanout), | |
815 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
816 | .l1clk (l1clk ), | |
817 | .dout (rt_flush_init_req_sys2 ), | |
818 | .siclk(siclk), | |
819 | .soclk(soclk));// Prepare to go fr sys-cmp. | |
820 | ||
821 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rt_flush_stop_req_sys2_ff | |
822 | (.din (rt_flush_stop_req_sys ), | |
823 | .scan_in (rt_flush_stop_req_sys2_ff_scanin ), | |
824 | .scan_out(rt_flush_stop_req_sys2_ff_scanout), | |
825 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
826 | .l1clk (l1clk ), | |
827 | .dout (rt_flush_stop_req_sys2 ), | |
828 | .siclk(siclk), | |
829 | .soclk(soclk));// Prepare to go fr sys-cmp. | |
830 | ||
831 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rt_asicflush_stop_req_sys2_ff | |
832 | (.din (rt_asicflush_stop_req_sys ), | |
833 | .scan_in (rt_asicflush_stop_req_sys2_ff_scanin ), | |
834 | .scan_out(rt_asicflush_stop_req_sys2_ff_scanout), | |
835 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
836 | .l1clk (l1clk ), | |
837 | .dout (rt_asicflush_stop_req_sys2 ), | |
838 | .siclk(siclk), | |
839 | .soclk(soclk));// Prepare to go sys-cmp. | |
840 | ||
841 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_l2_por_sys2_ff | |
842 | (.din (rst_l2_por_sys_ ), | |
843 | .scan_in (rst_l2_por_sys2_ff_scanin ), | |
844 | .scan_out(rst_l2_por_sys2_ff_scanout), | |
845 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
846 | .l1clk (l1clk ), | |
847 | .dout (rst_l2_por_sys2_ ), | |
848 | .siclk(siclk), | |
849 | .soclk(soclk));// Prepare to cross from sys to cmp. | |
850 | ||
851 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_l2_wmr_sys2_ff | |
852 | (.din (rst_l2_wmr_sys_ ), | |
853 | .scan_in (rst_l2_wmr_sys2_ff_scanin ), | |
854 | .scan_out(rst_l2_wmr_sys2_ff_scanout), | |
855 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
856 | .l1clk (l1clk ), | |
857 | .dout (rst_l2_wmr_sys2_ ), | |
858 | .siclk(siclk), | |
859 | .soclk(soclk));// Prepare to cross from sys to cmp. | |
860 | ||
861 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_cmp_ctl_wmr_sys2_ff | |
862 | (.din (rst_cmp_ctl_wmr_sys_ ), | |
863 | .scan_in (rst_cmp_ctl_wmr_sys2_ff_scanin ), | |
864 | .scan_out(rst_cmp_ctl_wmr_sys2_ff_scanout), | |
865 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
866 | .l1clk (l1clk ), | |
867 | .dout (rst_cmp_ctl_wmr_sys2_ ), | |
868 | .siclk(siclk), | |
869 | .soclk(soclk));// Prepare to cross fr sys-cmp. | |
870 | ||
871 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_wmr_protect_sys2_ff | |
872 | (.din (rst_wmr_protect_sys ), | |
873 | .scan_in (rst_wmr_protect_sys2_ff_scanin ), | |
874 | .scan_out(rst_wmr_protect_sys2_ff_scanout), | |
875 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
876 | .l1clk (l1clk ), | |
877 | .dout (rst_wmr_protect_sys2 ), | |
878 | .siclk(siclk), | |
879 | .soclk(soclk));// | |
880 | ||
881 | assign rst_wmr_protect = tcu_rst_scan_mode ? | |
882 | 1'b0 : // Suppress when chip is being scanned. | |
883 | ~mio_rst_pwron_rst_l_sys_ ? // This is a TCU bug. | |
884 | 1'b0 : // Make not x when chip is in POR. | |
885 | rst_wmr_protect_sys2; | |
886 | ||
887 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_tcu_clk_stop_sys2_ff | |
888 | (.din (rst_tcu_clk_stop_sys ), | |
889 | .scan_in (rst_tcu_clk_stop_sys2_ff_scanin ), | |
890 | .scan_out(rst_tcu_clk_stop_sys2_ff_scanout), | |
891 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
892 | .l1clk (l1clk ), | |
893 | .dout (rst_tcu_clk_stop_sys2 ), | |
894 | .siclk(siclk), | |
895 | .soclk(soclk));// Prepare to cross from sys to cmp. | |
896 | ||
897 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_dmu_async_por_sys_ff | |
898 | (.din (rst_dmu_async_por_sm_ ), | |
899 | .scan_in (rst_dmu_async_por_sys_ff_scanin ), | |
900 | .scan_out(rst_dmu_async_por_sys_ff_scanout), | |
901 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
902 | .l1clk (l1clk ), | |
903 | .dout (rst_dmu_async_por_sys_ ), | |
904 | .siclk(siclk), | |
905 | .soclk(soclk));// Prepare to cross sys->cmp. | |
906 | ||
907 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_dmu_peu_por_sys2_ff | |
908 | (.din (rst_dmu_peu_por_sys_ ), | |
909 | .scan_in (rst_dmu_peu_por_sys2_ff_scanin ), | |
910 | .scan_out(rst_dmu_peu_por_sys2_ff_scanout), | |
911 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
912 | .l1clk (l1clk ), | |
913 | .dout (rst_dmu_peu_por_sys2_ ), | |
914 | .siclk(siclk), | |
915 | .soclk(soclk));// Prepare to cross from sys to cmp. | |
916 | ||
917 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_dmu_peu_wmr_sys2_ff | |
918 | (.din (rst_dmu_peu_wmr_sys_ ), | |
919 | .scan_in (rst_dmu_peu_wmr_sys2_ff_scanin ), | |
920 | .scan_out(rst_dmu_peu_wmr_sys2_ff_scanout), | |
921 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
922 | .l1clk (l1clk ), | |
923 | .dout (rst_dmu_peu_wmr_sys2_ ), | |
924 | .siclk(siclk), | |
925 | .soclk(soclk));// Prepare to cross from sys to cmp. | |
926 | ||
927 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_niu_mac_sys2_ff | |
928 | (.din (rst_niu_mac_sys_ ), | |
929 | .scan_in (rst_niu_mac_sys2_ff_scanin ), | |
930 | .scan_out(rst_niu_mac_sys2_ff_scanout), | |
931 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
932 | .l1clk (l1clk ), | |
933 | .dout (rst_niu_mac_sys2_ ), | |
934 | .siclk(siclk), | |
935 | .soclk(soclk));// Prepare to cross fr sys to cmp. | |
936 | ||
937 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_niu_wmr_sys2_ff | |
938 | (.din (rst_niu_wmr_sys_ ), | |
939 | .scan_in (rst_niu_wmr_sys2_ff_scanin ), | |
940 | .scan_out(rst_niu_wmr_sys2_ff_scanout), | |
941 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
942 | .l1clk (l1clk ), | |
943 | .dout (rst_niu_wmr_sys2_ ), | |
944 | .siclk(siclk), | |
945 | .soclk(soclk));// Prepare to cross fr sys to cmp. | |
946 | ||
947 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ncu_unpark_thread_sys2_ff | |
948 | (.din (rst_ncu_unpark_thread_sys ), | |
949 | .scan_in (rst_ncu_unpark_thread_sys2_ff_scanin ), | |
950 | .scan_out(rst_ncu_unpark_thread_sys2_ff_scanout), | |
951 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
952 | .l1clk (l1clk ), | |
953 | .dout (rst_ncu_unpark_thread_sys2 ), | |
954 | .siclk(siclk), | |
955 | .soclk(soclk));// Prepare to cross fr sys to cmp. | |
956 | ||
957 | wire rst_ncu_xir_din = ~rst_ncu_xir_sys_; | |
958 | assign rst_ncu_xir_sys2_ = ~rst_ncu_xir_dout; | |
959 | // Store as active low, so | |
960 | // resets to deasserted value. | |
961 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ncu_xir_sys2_ff | |
962 | (.din (rst_ncu_xir_din ), | |
963 | .scan_in (rst_ncu_xir_sys2_ff_scanin ), | |
964 | .scan_out(rst_ncu_xir_sys2_ff_scanout), | |
965 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
966 | .l1clk (l1clk ), | |
967 | .dout (rst_ncu_xir_dout ), | |
968 | .siclk(siclk), | |
969 | .soclk(soclk));// Prepare to cross fr sys to cmp. | |
970 | ||
971 | //BP 9-27-05 | |
972 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_rst_wmr_sys_ff | |
973 | (.din (rst_rst_wmr_sys_ ), | |
974 | .scan_in (rst_rst_wmr_sys_ff_scanin ), | |
975 | .scan_out(rst_rst_wmr_sys_ff_scanout), | |
976 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
977 | .l1clk (l1clk ), | |
978 | .dout (rst_rst_wmr_sys2_ ), | |
979 | .siclk(siclk), | |
980 | .soclk(soclk));// sys to cmp | |
981 | ||
982 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_rst_por_sys_ff | |
983 | (.din (rst_rst_por_sys_ ), | |
984 | .scan_in (rst_rst_por_sys_ff_scanin ), | |
985 | .scan_out(rst_rst_por_sys_ff_scanout), | |
986 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
987 | .l1clk (l1clk ), | |
988 | .dout (rst_rst_por_sys2_ ), | |
989 | .siclk(siclk), | |
990 | .soclk(soclk));// sys to cmp | |
991 | //________________________________________________________________ | |
992 | ||
993 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tcu_rst_efu_done_sys_ff | |
994 | (.din (tcu_rst_efu_done_cmp ), | |
995 | .scan_in (tcu_rst_efu_done_sys_ff_scanin ), | |
996 | .scan_out(tcu_rst_efu_done_sys_ff_scanout), | |
997 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
998 | .l1clk (l1clk ), | |
999 | .dout (tcu_rst_efu_done_sys ), | |
1000 | .siclk(siclk), | |
1001 | .soclk(soclk));// Cross fr cmp to sys. | |
1002 | ||
1003 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tcu_bisx_done_sys_ff | |
1004 | (.din (tcu_bisx_done_cmp ), | |
1005 | .scan_in (tcu_bisx_done_sys_ff_scanin ), | |
1006 | .scan_out(tcu_bisx_done_sys_ff_scanout), | |
1007 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1008 | .l1clk (l1clk ), | |
1009 | .dout (tcu_bisx_done_sys ), | |
1010 | .siclk(siclk), | |
1011 | .soclk(soclk));// Cross fr cmp to sys. | |
1012 | ||
1013 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 ccu_rst_change_sys_ff | |
1014 | (.din (ccu_rst_change_cmp ), | |
1015 | .scan_in (ccu_rst_change_sys_ff_scanin ), | |
1016 | .scan_out(ccu_rst_change_sys_ff_scanout), | |
1017 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1018 | .l1clk (l1clk ), | |
1019 | .dout (ccu_rst_change_sys ), | |
1020 | .siclk(siclk), | |
1021 | .soclk(soclk));// Cross fr cmp to sys. | |
1022 | ||
1023 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tcu_test_protect_sys_ff | |
1024 | (.din (tcu_test_protect_cmp ), | |
1025 | .scan_in (tcu_test_protect_sys_ff_scanin ), | |
1026 | .scan_out(tcu_test_protect_sys_ff_scanout), | |
1027 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1028 | .l1clk (l1clk ), | |
1029 | .dout (tcu_test_protect_sys ), | |
1030 | .siclk(siclk), | |
1031 | .soclk(soclk));// Cross fr cmp to sys. | |
1032 | ||
1033 | wire ncu_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1034 | wire l2t7_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1035 | wire l2t6_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1036 | wire l2t5_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1037 | wire l2t4_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1038 | wire l2t3_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1039 | wire l2t2_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1040 | wire l2t1_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1041 | wire l2t0_rst_fatal_error_sys_mbist;// Suppress during MBist scan. | |
1042 | ||
1043 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 ncu_rst_fatal_error_sys_ff | |
1044 | (.din (ncu_rst_fatal_error_cmp ), | |
1045 | .scan_in (ncu_rst_fatal_error_sys_ff_scanin ), | |
1046 | .scan_out(ncu_rst_fatal_error_sys_ff_scanout), | |
1047 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1048 | .l1clk (l1clk ), | |
1049 | .dout (ncu_rst_fatal_error_sys_mbist ), | |
1050 | .siclk(siclk), | |
1051 | .soclk(soclk));// Cross fr cmp to sys. | |
1052 | ||
1053 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t7_rst_fatal_error_sys_ff | |
1054 | (.din (l2t7_rst_fatal_error_cmp ), | |
1055 | .scan_in (l2t7_rst_fatal_error_sys_ff_scanin ), | |
1056 | .scan_out(l2t7_rst_fatal_error_sys_ff_scanout), | |
1057 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1058 | .l1clk (l1clk ), | |
1059 | .dout (l2t7_rst_fatal_error_sys_mbist ), | |
1060 | .siclk(siclk), | |
1061 | .soclk(soclk));// Cross fr cmp to sys. | |
1062 | ||
1063 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t6_rst_fatal_error_sys_ff | |
1064 | (.din (l2t6_rst_fatal_error_cmp ), | |
1065 | .scan_in (l2t6_rst_fatal_error_sys_ff_scanin ), | |
1066 | .scan_out(l2t6_rst_fatal_error_sys_ff_scanout), | |
1067 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1068 | .l1clk (l1clk ), | |
1069 | .dout (l2t6_rst_fatal_error_sys_mbist ), | |
1070 | .siclk(siclk), | |
1071 | .soclk(soclk));// Cross fr cmp to sys. | |
1072 | ||
1073 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t5_rst_fatal_error_sys_ff | |
1074 | (.din (l2t5_rst_fatal_error_cmp ), | |
1075 | .scan_in (l2t5_rst_fatal_error_sys_ff_scanin ), | |
1076 | .scan_out(l2t5_rst_fatal_error_sys_ff_scanout), | |
1077 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1078 | .l1clk (l1clk ), | |
1079 | .dout (l2t5_rst_fatal_error_sys_mbist ), | |
1080 | .siclk(siclk), | |
1081 | .soclk(soclk));// Cross fr cmp to sys. | |
1082 | ||
1083 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t4_rst_fatal_error_sys_ff | |
1084 | (.din (l2t4_rst_fatal_error_cmp ), | |
1085 | .scan_in (l2t4_rst_fatal_error_sys_ff_scanin ), | |
1086 | .scan_out(l2t4_rst_fatal_error_sys_ff_scanout), | |
1087 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1088 | .l1clk (l1clk ), | |
1089 | .dout (l2t4_rst_fatal_error_sys_mbist ), | |
1090 | .siclk(siclk), | |
1091 | .soclk(soclk));// Cross fr cmp to sys. | |
1092 | ||
1093 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t3_rst_fatal_error_sys_ff | |
1094 | (.din (l2t3_rst_fatal_error_cmp ), | |
1095 | .scan_in (l2t3_rst_fatal_error_sys_ff_scanin ), | |
1096 | .scan_out(l2t3_rst_fatal_error_sys_ff_scanout), | |
1097 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1098 | .l1clk (l1clk ), | |
1099 | .dout (l2t3_rst_fatal_error_sys_mbist ), | |
1100 | .siclk(siclk), | |
1101 | .soclk(soclk));// Cross fr cmp to sys. | |
1102 | ||
1103 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t2_rst_fatal_error_sys_ff | |
1104 | (.din (l2t2_rst_fatal_error_cmp ), | |
1105 | .scan_in (l2t2_rst_fatal_error_sys_ff_scanin ), | |
1106 | .scan_out(l2t2_rst_fatal_error_sys_ff_scanout), | |
1107 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1108 | .l1clk (l1clk ), | |
1109 | .dout (l2t2_rst_fatal_error_sys_mbist ), | |
1110 | .siclk(siclk), | |
1111 | .soclk(soclk));// Cross fr cmp to sys. | |
1112 | ||
1113 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t1_rst_fatal_error_sys_ff | |
1114 | (.din (l2t1_rst_fatal_error_cmp ), | |
1115 | .scan_in (l2t1_rst_fatal_error_sys_ff_scanin ), | |
1116 | .scan_out(l2t1_rst_fatal_error_sys_ff_scanout), | |
1117 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1118 | .l1clk (l1clk ), | |
1119 | .dout (l2t1_rst_fatal_error_sys_mbist ), | |
1120 | .siclk(siclk), | |
1121 | .soclk(soclk));// Cross fr cmp to sys. | |
1122 | ||
1123 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 l2t0_rst_fatal_error_sys_ff | |
1124 | (.din (l2t0_rst_fatal_error_cmp ), | |
1125 | .scan_in (l2t0_rst_fatal_error_sys_ff_scanin ), | |
1126 | .scan_out(l2t0_rst_fatal_error_sys_ff_scanout), | |
1127 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1128 | .l1clk (l1clk ), | |
1129 | .dout (l2t0_rst_fatal_error_sys_mbist ), | |
1130 | .siclk(siclk), | |
1131 | .soclk(soclk));// Cross fr cmp to sys. | |
1132 | ||
1133 | wire ncu_rst_fatal_error_sys = | |
1134 | ncu_rst_fatal_error_sys_mbist & | |
1135 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1136 | ||
1137 | wire l2t7_rst_fatal_error_sys = | |
1138 | l2t7_rst_fatal_error_sys_mbist& | |
1139 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1140 | ||
1141 | wire l2t6_rst_fatal_error_sys = | |
1142 | l2t6_rst_fatal_error_sys_mbist& | |
1143 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1144 | ||
1145 | wire l2t5_rst_fatal_error_sys = | |
1146 | l2t5_rst_fatal_error_sys_mbist& | |
1147 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1148 | ||
1149 | wire l2t4_rst_fatal_error_sys = | |
1150 | l2t4_rst_fatal_error_sys_mbist& | |
1151 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1152 | ||
1153 | wire l2t3_rst_fatal_error_sys = | |
1154 | l2t3_rst_fatal_error_sys_mbist& | |
1155 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1156 | ||
1157 | wire l2t2_rst_fatal_error_sys = | |
1158 | l2t2_rst_fatal_error_sys_mbist& | |
1159 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1160 | ||
1161 | wire l2t1_rst_fatal_error_sys = | |
1162 | l2t1_rst_fatal_error_sys_mbist& | |
1163 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1164 | ||
1165 | wire l2t0_rst_fatal_error_sys = | |
1166 | l2t0_rst_fatal_error_sys_mbist& | |
1167 | ~tcu_test_protect_sys ;// Suppress during MBist scan. | |
1168 | //________________________________________________________________ | |
1169 | // | |
1170 | // mio_rst_pwron_rst_l from Pins | |
1171 | //________________________________________________________________ | |
1172 | // | |
1173 | // Incoming from MIO, asynchronous | |
1174 | ||
1175 | cl_sc1_clksyncff_4x | |
1176 | mio_rst_pwron_rst_sys_ff | |
1177 | (.si (mio_rst_pwron_rst_sys_ff_scanin ), // Don't forget to re-link 3 | |
1178 | // into chain of assigns | |
1179 | .so (mio_rst_pwron_rst_sys_ff_scanout), // when rerunning fixscan. | |
1180 | .l1clk (l1clk ), | |
1181 | .d (mio_rst_pwron_rst_l ), | |
1182 | .q (mio_rst_pwron_rst_sys_ ), | |
1183 | .siclk(siclk), | |
1184 | .soclk(soclk));// Cross fr async to sys. | |
1185 | ||
1186 | assign mio_rst_pwron_rst_l_sys_ = | |
1187 | mio_rst_pwron_rst_l & // Async assert, sync deassert. | |
1188 | mio_rst_pwron_rst_sys_ ; | |
1189 | ||
1190 | wire rst_rst_pwron_rst_l_sys_ ; | |
1191 | assign rst_rst_pwron_rst_l_sys_ = // Was ccu_rdy_pwron_rst_sys_. | |
1192 | ~( ( (~mio_rst_pwron_rst_l_sys_) | // Async assert, sync deassert. | |
1193 | //(~ccu_rst_sync_stable & // | |
1194 | //(~cluster_arst_l & // Assert through iol2clk running. | |
1195 | //(~rst_l2_por_sys_ & // Assert through iol2clk running. | |
1196 | (~rst_rst_por_sm_ & // Assert through iol2clk running. | |
1197 | //(~rst_rst_por_sys_ & // Review Nov 23 '05. | |
1198 | ~rst_wmr_protect_sys ) )// Only assert when it is | |
1199 | ); // not a WMR. (POR1 only.) | |
1200 | ||
1201 | assign rst_dmu_async_por_ = // Was rst_rst_pwron_rst_l_sys_ | |
1202 | ~( ( (~mio_rst_pwron_rst_l_sys_) | // Async assert, sync deassert. | |
1203 | //(~ccu_rst_sync_stable & // | |
1204 | //(~cluster_arst_l & // Assert through iol2clk running. | |
1205 | //(~rst_l2_por_sys_ & // Assert through iol2clk running. | |
1206 | //(~rst_rst_por_sm_ & // Assert through iol2clk running. | |
1207 | (~rst_dmu_async_por_sys_ ) )// Assert through POR1. | |
1208 | ); | |
1209 | ||
1210 | assign rst_rst_wmr_sys_ = | |
1211 | cluster_arst_sm2_ & // Was: ccu_rst_sync_stable, but | |
1212 | // ccu_count_q replaced it. | |
1213 | rst_l2_wmr_sys_ & | |
1214 | mio_rst_pwron_rst_sys_ ; // BP 8-05-05 to DMU for SERDES rst | |
1215 | ||
1216 | assign rst_rst_por_sys_ = | |
1217 | rst_l2_por_sys_ & | |
1218 | mio_rst_pwron_rst_sys_ ; // BP 8-05-05 to DMU for SERDES rst | |
1219 | ||
1220 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_rst_pwron_rst_sys2_ff | |
1221 | (.din (rst_rst_pwron_rst_l_sys_ ), | |
1222 | .scan_in (rst_rst_pwron_rst_sys2_ff_scanin ), | |
1223 | .scan_out(rst_rst_pwron_rst_sys2_ff_scanout), | |
1224 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1225 | .l1clk (l1clk ), | |
1226 | .dout (rst_rst_pwron_rst_l_sys2_sync_ ), | |
1227 | .siclk(siclk), | |
1228 | .soclk(soclk));// Prepare to cross sys-cmp. | |
1229 | ||
1230 | wire rst_rst_pwron_rst_l_sys2_ ; | |
1231 | assign rst_rst_pwron_rst_l_sys2_ = // | |
1232 | //BP 2-21-06 rst_rst_pwron_rst_l_sys_ & // Async assert, | |
1233 | mio_rst_pwron_rst_l & // Async assert, | |
1234 | rst_rst_pwron_rst_l_sys2_sync_ ; // sync deassert. | |
1235 | //________________________________________________________________ | |
1236 | // | |
1237 | // mio_rst_button_xir_l from Pins | |
1238 | //________________________________________________________________ | |
1239 | // | |
1240 | // Incoming from MIO, asynchronous | |
1241 | ||
1242 | cl_sc1_clksyncff_4x | |
1243 | mio_rst_button_xir_sys_ff | |
1244 | (.si (mio_rst_button_xir_sys_ff_scanin ), // Don't forget to re-link 3 | |
1245 | // into chain of assigns | |
1246 | .so (mio_rst_button_xir_sys_ff_scanout), // when rerunning fixscan. | |
1247 | .l1clk (l1clk ), | |
1248 | .d (mio_rst_button_xir_l ), | |
1249 | .q (mio_rst_button_xir_sys_ ), | |
1250 | .siclk(siclk), | |
1251 | .soclk(soclk));// Cross fr async to sys. | |
1252 | //________________________________________________________________ | |
1253 | ||
1254 | // | |
1255 | // mio_rst_pb_rst_l from Pins | |
1256 | //________________________________________________________________ | |
1257 | // | |
1258 | // Incoming from MIO, asynchronous | |
1259 | ||
1260 | cl_sc1_clksyncff_4x | |
1261 | mio_rst_pb_rst_sys_ff | |
1262 | (.si (mio_rst_pb_rst_sys_ff_scanin ), // Don't forget to re-link 3 | |
1263 | // into chain of assign stmts | |
1264 | .so (mio_rst_pb_rst_sys_ff_scanout), // when rerunning fixscan. | |
1265 | .l1clk (l1clk ), | |
1266 | .d (mio_rst_pb_rst_l ), | |
1267 | .q (mio_rst_pb_rst_sys_ ), | |
1268 | .siclk(siclk), | |
1269 | .soclk(soclk));// Cross fr async to sys. | |
1270 | //________________________________________________________________ | |
1271 | ||
1272 | assign rst_mio_pex_reset_l = ~( // rst_pwron_sys_ better? Sep 16 '05. | |
1273 | (~mio_rst_pwron_rst_l ) | // Review. | |
1274 | (~rst_dmu_peu_wmr_sys2_ ) | |
1275 | ); | |
1276 | ||
1277 | assign rst_mio_ssi_sync_l = ~rst_assert_ssi_sync_q; | |
1278 | ||
1279 | //________________________________________________________________ | |
1280 | // | |
1281 | // RESET_GEN register, RW | |
1282 | //________________________________________________________________ | |
1283 | ||
1284 | wire reset_gen_addr = addr_in_sys2 == `IOB_CREG_RESET_GEN; | |
1285 | wire reset_gen_en = wr_req_vld_trunc & reset_gen_addr; | |
1286 | //________________________________________________________________ | |
1287 | ||
1288 | wire reset_gen_dbr_gen_en = reset_gen_en | rst_DBR_done; | |
1289 | wire reset_gen_dbr_gen_din = reset_gen_en & data_in_sys2[3] ; // | | |
1290 | // rst_DBR_done & 1'b0 (== 0) | |
1291 | // If DBR done, clear DBR_GEN bit. | |
1292 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_gen_dbr_gen_ff | |
1293 | (.din (reset_gen_dbr_gen_din ), | |
1294 | .scan_in (reset_gen_dbr_gen_ff_scanin ), | |
1295 | .scan_out(reset_gen_dbr_gen_ff_scanout), | |
1296 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1297 | .l1clk (l1clk ), | |
1298 | .en (reset_gen_dbr_gen_en ), | |
1299 | .dout (reset_gen_dbr_gen_q ), | |
1300 | .siclk(siclk), | |
1301 | .soclk(soclk)); | |
1302 | //________________________________________________________________ | |
1303 | ||
1304 | // Error: Cell 'rst_ctl': Net 'siclk' (implicitly created from | |
1305 | // connection to inst 'reset_gen_xir_gen_ff') has no driver. | |
1306 | // Error: Cell 'rst_ctl': Net 'soclk' (implicitly created from | |
1307 | // connection to inst 'reset_gen_xir_gen_ff') has no driver. | |
1308 | ||
1309 | assign siclk = tcu_aclk; // When say wire instead of assign, siclk = z. | |
1310 | // Described to Anurag Bhatnagar Feb 23 '05. | |
1311 | assign soclk = tcu_bclk; | |
1312 | // scan renames | |
1313 | //sign se = tcu_scan_en;// rst.sv2sim.log: Warning: In module <rst_fsm_ctl> | |
1314 | // the net <se> has source but no sink. | |
1315 | // end scan | |
1316 | //________________________________________________________________ | |
1317 | ||
1318 | wire reset_gen_xir_gen_en = reset_gen_en | reset_gen_xir_gen_clr; | |
1319 | wire reset_gen_xir_gen_din = data_in_sys2[1] & ~reset_gen_xir_gen_clr; | |
1320 | // If xir_done, clear xir_gen bit. | |
1321 | // To avoid collision, software should | |
1322 | // wait until Reset Unit clears prior | |
1323 | // XIR_GEN before writing to it again. | |
1324 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_gen_xir_gen_ff | |
1325 | (.din (reset_gen_xir_gen_din ), | |
1326 | .scan_in (reset_gen_xir_gen_ff_scanin ), | |
1327 | .scan_out(reset_gen_xir_gen_ff_scanout), | |
1328 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1329 | .l1clk (l1clk ), | |
1330 | .en (reset_gen_xir_gen_en ), | |
1331 | .dout (reset_gen_xir_gen_q ), | |
1332 | .siclk(siclk), | |
1333 | .soclk(soclk)); | |
1334 | //________________________________________________________________ | |
1335 | ||
1336 | wire reset_gen_wmr_gen_en = reset_gen_en | rst_WMR_done; | |
1337 | wire reset_gen_wmr_gen_din = reset_gen_en & data_in_sys2[0]; // | | |
1338 | // rst_WMR_done & 1'b0 (== 0) | |
1339 | // If WMR done, clear WMR_GEN bit. | |
1340 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_gen_wmr_gen_ff | |
1341 | (.din (reset_gen_wmr_gen_din ), | |
1342 | .scan_in (reset_gen_wmr_gen_ff_scanin ), | |
1343 | .scan_out(reset_gen_wmr_gen_ff_scanout), | |
1344 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1345 | .l1clk (l1clk ), | |
1346 | .en (reset_gen_wmr_gen_en ), | |
1347 | .dout (reset_gen_wmr_gen_q ), | |
1348 | .siclk(siclk), | |
1349 | .soclk(soclk)); | |
1350 | //________________________________________________________________ | |
1351 | ||
1352 | wire [3:0] reset_gen_q = {reset_gen_dbr_gen_q, | |
1353 | 1'b0, // Reserved. (Was reset_gen_por_gen_q.) | |
1354 | reset_gen_xir_gen_q, | |
1355 | reset_gen_wmr_gen_q}; | |
1356 | ||
1357 | ||
1358 | //________________________________________________________________ | |
1359 | // | |
1360 | // RESET_SOURCE register, RW1C | |
1361 | //________________________________________________________________ | |
1362 | ||
1363 | wire reset_source_addr = addr_in_sys2 == `IOB_CREG_RESET_SOURCE; | |
1364 | wire reset_source_en = wr_req_vld_trunc & reset_source_addr & | |
1365 | rst_cmp_ctl_wmr_sys_ ; | |
1366 | // Wait for cmp_clk to start to reset: | |
1367 | // l2t7_fatal_error_sys and: | |
1368 | // ncu_fatal_error_sys. | |
1369 | ||
1370 | // Each bit in Reset Source register is RW1C, meaning: | |
1371 | // Read, Write 1 to Clear: Writing a 0 to a bit has no effect, | |
1372 | // but writing a 1 to a bit will cause that bit to be set to 0. | |
1373 | // No need to feed data_in_sys2 to _din port of msff, because we know | |
1374 | // data_in_sys2 must be 1 for _en port to be high. (W1C) | |
1375 | //________________________________________________________________ | |
1376 | ||
1377 | wire reset_source_l2t7_fatal_en = reset_source_en & data_in_sys2[15] | | |
1378 | l2t7_rst_fatal_error_sys & reset_fee_q[7]; | |
1379 | wire reset_source_l2t7_fatal_din = // ~data_in_sys2[15] | // W1C. | |
1380 | l2t7_rst_fatal_error_sys & reset_fee_q[7]; | |
1381 | ||
1382 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t7_fatal_ff | |
1383 | (.din (reset_source_l2t7_fatal_din), | |
1384 | .scan_in (reset_source_l2t7_fatal_ff_scanin ), | |
1385 | .scan_out(reset_source_l2t7_fatal_ff_scanout), | |
1386 | .clr_ (mio_rst_pwron_rst_sys_), | |
1387 | .l1clk (l1clk ), | |
1388 | .en (reset_source_l2t7_fatal_en ), | |
1389 | .dout (reset_source_l2t7_fatal_q ), | |
1390 | .siclk(siclk), | |
1391 | .soclk(soclk)); | |
1392 | //________________________________________________________________ | |
1393 | ||
1394 | wire reset_source_l2t6_fatal_en = reset_source_en & data_in_sys2[14] | | |
1395 | l2t6_rst_fatal_error_sys & reset_fee_q[6]; | |
1396 | wire reset_source_l2t6_fatal_din = // ~data_in_sys2[14] | // W1C. | |
1397 | l2t6_rst_fatal_error_sys & reset_fee_q[6]; | |
1398 | ||
1399 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t6_fatal_ff | |
1400 | (.din (reset_source_l2t6_fatal_din ), | |
1401 | .scan_in (reset_source_l2t6_fatal_ff_scanin ), | |
1402 | .scan_out(reset_source_l2t6_fatal_ff_scanout), | |
1403 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1404 | .l1clk (l1clk ), | |
1405 | .en (reset_source_l2t6_fatal_en ), | |
1406 | .dout (reset_source_l2t6_fatal_q ), | |
1407 | .siclk(siclk), | |
1408 | .soclk(soclk)); | |
1409 | //________________________________________________________________ | |
1410 | ||
1411 | wire reset_source_l2t5_fatal_en = reset_source_en & data_in_sys2[13] | | |
1412 | l2t5_rst_fatal_error_sys & reset_fee_q[5]; | |
1413 | wire reset_source_l2t5_fatal_din = // ~data_in_sys2[13] | // W1C. | |
1414 | l2t5_rst_fatal_error_sys & reset_fee_q[5]; | |
1415 | ||
1416 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t5_fatal_ff | |
1417 | (.din (reset_source_l2t5_fatal_din ), | |
1418 | .scan_in (reset_source_l2t5_fatal_ff_scanin ), | |
1419 | .scan_out(reset_source_l2t5_fatal_ff_scanout), | |
1420 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1421 | .l1clk (l1clk ), | |
1422 | .en (reset_source_l2t5_fatal_en ), | |
1423 | .dout (reset_source_l2t5_fatal_q ), | |
1424 | .siclk(siclk), | |
1425 | .soclk(soclk)); | |
1426 | //________________________________________________________________ | |
1427 | ||
1428 | wire reset_source_l2t4_fatal_en = reset_source_en & data_in_sys2[12] | | |
1429 | l2t4_rst_fatal_error_sys & reset_fee_q[4]; | |
1430 | wire reset_source_l2t4_fatal_din = // ~data_in_sys2[12] | // W1C. | |
1431 | l2t4_rst_fatal_error_sys & reset_fee_q[4]; | |
1432 | ||
1433 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t4_fatal_ff | |
1434 | (.din (reset_source_l2t4_fatal_din ), | |
1435 | .scan_in (reset_source_l2t4_fatal_ff_scanin ), | |
1436 | .scan_out(reset_source_l2t4_fatal_ff_scanout), | |
1437 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1438 | .l1clk (l1clk ), | |
1439 | .en (reset_source_l2t4_fatal_en ), | |
1440 | .dout (reset_source_l2t4_fatal_q ), | |
1441 | .siclk(siclk), | |
1442 | .soclk(soclk)); | |
1443 | //________________________________________________________________ | |
1444 | ||
1445 | wire reset_source_l2t3_fatal_en = reset_source_en & data_in_sys2[11] | | |
1446 | l2t3_rst_fatal_error_sys & reset_fee_q[3]; | |
1447 | wire reset_source_l2t3_fatal_din = // ~data_in_sys2[11] | // W1C. | |
1448 | l2t3_rst_fatal_error_sys & reset_fee_q[3]; | |
1449 | ||
1450 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t3_fatal_ff | |
1451 | (.din (reset_source_l2t3_fatal_din ), | |
1452 | .scan_in (reset_source_l2t3_fatal_ff_scanin ), | |
1453 | .scan_out(reset_source_l2t3_fatal_ff_scanout), | |
1454 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1455 | .l1clk (l1clk ), | |
1456 | .en (reset_source_l2t3_fatal_en ), | |
1457 | .dout (reset_source_l2t3_fatal_q ), | |
1458 | .siclk(siclk), | |
1459 | .soclk(soclk)); | |
1460 | //________________________________________________________________ | |
1461 | ||
1462 | wire reset_source_l2t2_fatal_en = reset_source_en & data_in_sys2[10] | | |
1463 | l2t2_rst_fatal_error_sys & reset_fee_q[2]; | |
1464 | wire reset_source_l2t2_fatal_din = // ~data_in_sys2[10] | // W1C. | |
1465 | l2t2_rst_fatal_error_sys & reset_fee_q[2]; | |
1466 | ||
1467 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t2_fatal_ff | |
1468 | (.din (reset_source_l2t2_fatal_din ), | |
1469 | .scan_in (reset_source_l2t2_fatal_ff_scanin ), | |
1470 | .scan_out(reset_source_l2t2_fatal_ff_scanout), | |
1471 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1472 | .l1clk (l1clk ), | |
1473 | .en (reset_source_l2t2_fatal_en ), | |
1474 | .dout (reset_source_l2t2_fatal_q ), | |
1475 | .siclk(siclk), | |
1476 | .soclk(soclk)); | |
1477 | //________________________________________________________________ | |
1478 | ||
1479 | wire reset_source_l2t1_fatal_en = reset_source_en & data_in_sys2[9] | | |
1480 | l2t1_rst_fatal_error_sys & reset_fee_q[1]; | |
1481 | wire reset_source_l2t1_fatal_din = // ~data_in_sys2[9] | // W1C. | |
1482 | l2t1_rst_fatal_error_sys & reset_fee_q[1]; | |
1483 | ||
1484 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t1_fatal_ff | |
1485 | (.din (reset_source_l2t1_fatal_din ), | |
1486 | .scan_in (reset_source_l2t1_fatal_ff_scanin ), | |
1487 | .scan_out(reset_source_l2t1_fatal_ff_scanout), | |
1488 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1489 | .l1clk (l1clk ), | |
1490 | .en (reset_source_l2t1_fatal_en ), | |
1491 | .dout (reset_source_l2t1_fatal_q ), | |
1492 | .siclk(siclk), | |
1493 | .soclk(soclk)); | |
1494 | //________________________________________________________________ | |
1495 | ||
1496 | wire reset_source_l2t0_fatal_en = reset_source_en & data_in_sys2[8] | | |
1497 | l2t0_rst_fatal_error_sys & reset_fee_q[0]; | |
1498 | wire reset_source_l2t0_fatal_din = // ~data_in_sys2[8] | // W1C. | |
1499 | l2t0_rst_fatal_error_sys & reset_fee_q[0]; | |
1500 | ||
1501 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_l2t0_fatal_ff | |
1502 | (.din (reset_source_l2t0_fatal_din ), | |
1503 | .scan_in (reset_source_l2t0_fatal_ff_scanin ), | |
1504 | .scan_out(reset_source_l2t0_fatal_ff_scanout), | |
1505 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1506 | .l1clk (l1clk ), | |
1507 | .en (reset_source_l2t0_fatal_en ), | |
1508 | .dout (reset_source_l2t0_fatal_q ), | |
1509 | .siclk(siclk), | |
1510 | .soclk(soclk)); | |
1511 | //________________________________________________________________ | |
1512 | ||
1513 | wire reset_source_ncu_fatal_en = reset_source_en & data_in_sys2[7] | | |
1514 | (ncu_rst_fatal_error_sys & rst_cmp_ctl_wmr_sys_) ; | |
1515 | // ncu_rst_fatal_error_sys = x until | |
1516 | // rst_cmp_ctl_wmr_sys_ | |
1517 | // (after ccu_rst_sync_stable). | |
1518 | // ncu will keep ncu_rst_fatal_error_sys around | |
1519 | // until it has had a chance to be seen, via the | |
1520 | // rst_fatal_or signal, in RST_ARBITER state. Then, | |
1521 | // WMR will reset the WMR-exposed register FEE in | |
1522 | // ncu. | |
1523 | wire reset_source_ncu_fatal_din = | |
1524 | (reset_source_en & ~data_in_sys2[7]) | // W1C. | |
1525 | // (ncu_rst_fatal_error_sys & ccu_rst_sync_stable); | |
1526 | (ncu_rst_fatal_error_sys & cluster_arst_sm2_ ); | |
1527 | // ncu_rst_fatal_error_sys = x until sync_stable. | |
1528 | // Was: ccu_rst_sync_stable, | |
1529 | // but ccu_count_q replaced it. | |
1530 | ||
1531 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_ncu_fatal_ff | |
1532 | (.din (reset_source_ncu_fatal_din ), | |
1533 | .scan_in (reset_source_ncu_fatal_ff_scanin ), | |
1534 | .scan_out(reset_source_ncu_fatal_ff_scanout), | |
1535 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1536 | .l1clk (l1clk ), | |
1537 | .en (reset_source_ncu_fatal_en ), | |
1538 | .dout (reset_source_ncu_fatal_q ), | |
1539 | .siclk(siclk), | |
1540 | .soclk(soclk)); | |
1541 | //________________________________________________________________ | |
1542 | ||
1543 | wire reset_source_pb_xir_en = reset_source_en & data_in_sys2[6] | | |
1544 | reset_source_pb_xir_set; | |
1545 | wire reset_source_pb_xir_din = // ~data_in_sys2[6] | // W1C. | |
1546 | reset_source_pb_xir_set; | |
1547 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_pb_xir_ff | |
1548 | (.din (reset_source_pb_xir_din ), | |
1549 | .scan_in (reset_source_pb_xir_ff_scanin ), | |
1550 | .scan_out(reset_source_pb_xir_ff_scanout), | |
1551 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1552 | .l1clk (l1clk ), | |
1553 | .en (reset_source_pb_xir_en ), | |
1554 | .dout (reset_source_pb_xir_q ), | |
1555 | .siclk(siclk), | |
1556 | .soclk(soclk)); | |
1557 | //________________________________________________________________ | |
1558 | ||
1559 | wire reset_source_pb_rst_en = reset_source_en & data_in_sys2[5] | | |
1560 | reset_source_pb_rst_set; | |
1561 | wire reset_source_pb_rst_din = // ~data_in_sys2[5] | // W1C. | |
1562 | reset_source_pb_rst_set; | |
1563 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_pb_rst_ff | |
1564 | (.din (reset_source_pb_rst_din ), | |
1565 | .scan_in (reset_source_pb_rst_ff_scanin ), | |
1566 | .scan_out(reset_source_pb_rst_ff_scanout), | |
1567 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1568 | .l1clk (l1clk ), | |
1569 | .en (reset_source_pb_rst_en ), | |
1570 | .dout (reset_source_pb_rst_q ), | |
1571 | .siclk(siclk), | |
1572 | .soclk(soclk)); | |
1573 | //________________________________________________________________ | |
1574 | ||
1575 | wire reset_source_pwron_en = reset_source_en & data_in_sys2[4] | | |
1576 | reset_gen_en & data_in_sys2[4]; | |
1577 | // SW setting POR_GEN bit of | |
1578 | // RESET_GEN reg. | |
1579 | wire reset_source_pwron_din = 1'b0; | |
1580 | // = reset_source_en & ~data_in_sys2[4]; | |
1581 | // W1C, so | |
1582 | // writing a 1 will cause this bit to be | |
1583 | // set to 0. | |
1584 | wire reset_source_pwron_din_phy_ = | |
1585 | ~reset_source_pwron_din; // Initial value 1 on POR, so | |
1586 | // reset_source_pwron_q_ holds inverse. | |
1587 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_pwron_ff | |
1588 | (.din (reset_source_pwron_din_phy_ ), | |
1589 | .scan_in (reset_source_pwron_ff_scanin ), | |
1590 | .scan_out(reset_source_pwron_ff_scanout), | |
1591 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1592 | .l1clk (l1clk ), | |
1593 | .en (reset_source_pwron_en ), | |
1594 | .dout (reset_source_pwron_q_ ), | |
1595 | .siclk(siclk), | |
1596 | .soclk(soclk)); | |
1597 | //________________________________________________________________ | |
1598 | ||
1599 | wire reset_source_dbr_gen_en = reset_source_en & data_in_sys2[3] | | |
1600 | reset_gen_en & data_in_sys2[3]; | |
1601 | // SW setting DBR_GEN bit of | |
1602 | // RESET_GEN reg. | |
1603 | wire reset_source_dbr_gen_din = reset_source_en & ~data_in_sys2[3] |//W1C. | |
1604 | reset_gen_en & data_in_sys2[3]; | |
1605 | // SW setting DBR_GEN bit of | |
1606 | // RESET_GEN reg. | |
1607 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_dbr_gen_ff | |
1608 | (.din (reset_source_dbr_gen_din ), | |
1609 | .scan_in (reset_source_dbr_gen_ff_scanin ), | |
1610 | .scan_out(reset_source_dbr_gen_ff_scanout), | |
1611 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1612 | .l1clk (l1clk ), | |
1613 | .en (reset_source_dbr_gen_en ), | |
1614 | .dout (reset_source_dbr_gen_q ), | |
1615 | .siclk(siclk), | |
1616 | .soclk(soclk)); | |
1617 | //________________________________________________________________ | |
1618 | ||
1619 | // RESET_SOURCE[2] reserved. | |
1620 | // Was SW setting POR_GEN bit of | |
1621 | // RESET_GEN reg. | |
1622 | //________________________________________________________________ | |
1623 | ||
1624 | wire reset_source_xir_gen_en = reset_source_en & data_in_sys2[1] | | |
1625 | reset_source_xir_gen_set; | |
1626 | // xir_state machine servicing | |
1627 | // SW setting XIR_GEN bit of | |
1628 | // RESET_GEN reg. | |
1629 | wire reset_source_xir_gen_din = ~data_in_sys2[1] | // W1C. | |
1630 | reset_source_xir_gen_set; | |
1631 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_xir_gen_ff | |
1632 | (.din (reset_source_xir_gen_din ), | |
1633 | .scan_in (reset_source_xir_gen_ff_scanin ), | |
1634 | .scan_out(reset_source_xir_gen_ff_scanout), | |
1635 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1636 | .l1clk (l1clk ), | |
1637 | .en (reset_source_xir_gen_en ), | |
1638 | .dout (reset_source_xir_gen_q ), | |
1639 | .siclk(siclk), | |
1640 | .soclk(soclk)); | |
1641 | //________________________________________________________________ | |
1642 | ||
1643 | wire reset_source_wmr_gen_en = reset_source_en & data_in_sys2[0] | | |
1644 | reset_gen_en & data_in_sys2[0]; | |
1645 | // SW setting WMR_GEN bit of | |
1646 | // RESET_GEN reg. | |
1647 | wire reset_source_wmr_gen_din = ~data_in_sys2[0] | // W1C | |
1648 | reset_gen_en & data_in_sys2[0]; | |
1649 | // SW setting WMR_GEN bit of | |
1650 | // RESET_GEN reg. | |
1651 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 reset_source_wmr_gen_ff | |
1652 | (.din (reset_source_wmr_gen_din ), | |
1653 | .scan_in (reset_source_wmr_gen_ff_scanin ), | |
1654 | .scan_out(reset_source_wmr_gen_ff_scanout), | |
1655 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1656 | .l1clk (l1clk ), | |
1657 | .en (reset_source_wmr_gen_en ), | |
1658 | .dout (reset_source_wmr_gen_q ), | |
1659 | .siclk(siclk), | |
1660 | .soclk(soclk)); | |
1661 | //________________________________________________________________ | |
1662 | // | |
1663 | // BP 9-26-05 for bug 101377: Added flop to sm output so no | |
1664 | // combination logic between here and ccu where it | |
1665 | // uses rst_ccu_pll_ and rst_ccu_ as async flop resets. | |
1666 | ||
1667 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ccu_pll_sys_ff | |
1668 | (.din (rst_ccu_pll_sm_ ), | |
1669 | .scan_in (rst_ccu_pll_sys_ff_scanin ), | |
1670 | .scan_out(rst_ccu_pll_sys_ff_scanout), | |
1671 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1672 | .l1clk (l1clk ), | |
1673 | .dout (rst_ccu_pll_sm2_ ), | |
1674 | .siclk(siclk), | |
1675 | .soclk(soclk));// gen rst_ccu_pll_ | |
1676 | ||
1677 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rst_ccu_sys_ff | |
1678 | (.din (rst_ccu_sm_ ), | |
1679 | .scan_in (rst_ccu_sys_ff_scanin ), | |
1680 | .scan_out(rst_ccu_sys_ff_scanout), | |
1681 | .clr_ (mio_rst_pwron_rst_sys_), | |
1682 | .l1clk (l1clk ), | |
1683 | .dout (rst_ccu_sm2_ ), | |
1684 | .siclk(siclk), | |
1685 | .soclk(soclk));// gen_ccu_ | |
1686 | ||
1687 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 cluster_arst_sys_ff | |
1688 | (.din (cluster_arst_sm_ ), | |
1689 | .scan_in (cluster_arst_sys_ff_scanin ), | |
1690 | .scan_out(cluster_arst_sys_ff_scanout), | |
1691 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1692 | .l1clk (l1clk ), | |
1693 | .dout (cluster_arst_sm2_ ), | |
1694 | .siclk(siclk), | |
1695 | .soclk(soclk));// | |
1696 | //________________________________________________________________ | |
1697 | ||
1698 | wire rst_fatal_or = | |
1699 | ((l2t7_rst_fatal_error_sys == 1'b1) & (reset_fee_q[7] == 1'b1)) | | |
1700 | ((l2t6_rst_fatal_error_sys == 1'b1) & (reset_fee_q[6] == 1'b1)) | | |
1701 | ((l2t5_rst_fatal_error_sys == 1'b1) & (reset_fee_q[5] == 1'b1)) | | |
1702 | ((l2t4_rst_fatal_error_sys == 1'b1) & (reset_fee_q[4] == 1'b1)) | | |
1703 | ((l2t3_rst_fatal_error_sys == 1'b1) & (reset_fee_q[3] == 1'b1)) | | |
1704 | ((l2t2_rst_fatal_error_sys == 1'b1) & (reset_fee_q[2] == 1'b1)) | | |
1705 | ((l2t1_rst_fatal_error_sys == 1'b1) & (reset_fee_q[1] == 1'b1)) | | |
1706 | ((l2t0_rst_fatal_error_sys == 1'b1) & (reset_fee_q[0] == 1'b1)) | | |
1707 | ( ncu_rst_fatal_error_sys == 1'b1 ) ; | |
1708 | //________________________________________________________________ | |
1709 | ||
1710 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 rst_assert_ssi_sync_ff | |
1711 | (.din (rst_assert_ssi_sync_din ), | |
1712 | .scan_in (rst_assert_ssi_sync_ff_scanin ), | |
1713 | .scan_out(rst_assert_ssi_sync_ff_scanout), | |
1714 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1715 | .l1clk (l1clk ), | |
1716 | .en (rst_assert_ssi_sync_en ), | |
1717 | .dout (rst_assert_ssi_sync_q ), | |
1718 | .siclk(siclk), | |
1719 | .soclk(soclk)); | |
1720 | //________________________________________________________________ | |
1721 | ||
1722 | wire [15:0] reset_source_q = | |
1723 | {reset_source_l2t7_fatal_q, // [15] | |
1724 | reset_source_l2t6_fatal_q, // [14] | |
1725 | reset_source_l2t5_fatal_q, // [13] | |
1726 | reset_source_l2t4_fatal_q, // [12] | |
1727 | reset_source_l2t3_fatal_q, // [11] | |
1728 | reset_source_l2t2_fatal_q, // [10] | |
1729 | reset_source_l2t1_fatal_q, // [9] | |
1730 | reset_source_l2t0_fatal_q, // [8] | |
1731 | reset_source_ncu_fatal_q , // [7] | |
1732 | reset_source_pb_xir_q , // [6] | |
1733 | reset_source_pb_rst_q , // [5] | |
1734 | ~reset_source_pwron_q_ , // [4] Holds inverse. | |
1735 | reset_source_dbr_gen_q , // [3] | |
1736 | 1'b0 , // [2] Reserved | |
1737 | //reset_source_por_gen_q , // [2] // Was. | |
1738 | reset_source_xir_gen_q , // [1] | |
1739 | reset_source_wmr_gen_q };// [0] | |
1740 | ||
1741 | wire rst_ccu_pll_raw_ = | |
1742 | ~( | |
1743 | (~mio_rst_pwron_rst_l) | // Async assert, sync deassert. | |
1744 | (~rst_ccu_pll_sm2_ ) // BP 9-26-05 bug 101377: was ~rst_ccu_pll_sm_ | |
1745 | ); | |
1746 | ||
1747 | wire rst_ccu_raw_ = | |
1748 | ~( | |
1749 | (~mio_rst_pwron_rst_l) | // Async assert, sync deassert. | |
1750 | (~rst_ccu_sm2_ ) // BP 9-26-05 bug 101377: was ~rst_ccu_sm_ | |
1751 | ); | |
1752 | ||
1753 | wire cluster_arst_raw_ = | |
1754 | ~( | |
1755 | (~mio_rst_pwron_rst_l) | // Async assert, sync deassert. | |
1756 | (~cluster_arst_sm2_ ) // BP 9-26-05 bug 101377: was ~rst_ccu_sm_ | |
1757 | ); | |
1758 | ||
1759 | assign rst_ccu_pll_ = tcu_rst_scan_mode ? | |
1760 | `DEASSERT : // Suppress when chip is being scanned. | |
1761 | rst_ccu_pll_raw_; | |
1762 | ||
1763 | assign rst_ccu_ = tcu_rst_scan_mode ? | |
1764 | `DEASSERT : // Suppress when chip is being scanned. | |
1765 | rst_ccu_raw_; | |
1766 | ||
1767 | assign cluster_arst_l = tcu_rst_scan_mode ? | |
1768 | `DEASSERT : // Suppress when chip is being scanned. | |
1769 | cluster_arst_raw_; | |
1770 | ||
1771 | ||
1772 | //________________________________________________________________ | |
1773 | // | |
1774 | // SSYS_RESET register, RW | |
1775 | //________________________________________________________________ | |
1776 | ||
1777 | wire ssys_reset_addr = addr_in_sys2 == `IOB_CREG_SSYSRESET; | |
1778 | wire ssys_reset_en = wr_req_vld_trunc & ssys_reset_addr; | |
1779 | ||
1780 | //________________________________________________________________ | |
1781 | ||
1782 | wire ssys_reset_mac_en = ssys_reset_en; | |
1783 | wire ssys_reset_mac_din = data_in_sys2[6]; | |
1784 | ||
1785 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 ssys_reset_mac_ff | |
1786 | (.din (ssys_reset_mac_din ), | |
1787 | .scan_in (ssys_reset_mac_ff_scanin ), | |
1788 | .scan_out(ssys_reset_mac_ff_scanout), | |
1789 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1790 | .l1clk (l1clk ), | |
1791 | .en (ssys_reset_mac_en ), | |
1792 | .dout (ssys_reset_mac_q ), | |
1793 | .siclk(siclk), | |
1794 | .soclk(soclk));// = SSYS_RESET [MAC_PROTECT]. | |
1795 | // = ssys_reset_q[ 6]. | |
1796 | //________________________________________________________________ | |
1797 | ||
1798 | wire ssys_reset_mcu_en = ssys_reset_en; | |
1799 | wire ssys_reset_mcu_din = data_in_sys2[5]; | |
1800 | assign rst_mcu_selfrsh_sys2 = ssys_reset_mcu_q; | |
1801 | ||
1802 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 ssys_reset_mcu_ff | |
1803 | (.din (ssys_reset_mcu_din ), | |
1804 | .scan_in (ssys_reset_mcu_ff_scanin ), | |
1805 | .scan_out(ssys_reset_mcu_ff_scanout), | |
1806 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1807 | .l1clk (l1clk ), | |
1808 | .en (ssys_reset_mcu_en ), | |
1809 | .dout (ssys_reset_mcu_q ), | |
1810 | .siclk(siclk), | |
1811 | .soclk(soclk));// = SSYS_RESET [MCU_SELFRSH]. | |
1812 | // = ssys_reset_q[ 5]. | |
1813 | //________________________________________________________________ | |
1814 | // | |
1815 | // SSYS_RESET[4:2] reserved. | |
1816 | //________________________________________________________________ | |
1817 | ||
1818 | reg ssys_reset_dmu_clr ; | |
1819 | wire ssys_reset_dmu_en = ssys_reset_en | | |
1820 | ssys_reset_dmu_clr ; | |
1821 | wire ssys_reset_dmu_din = ssys_reset_dmu_clr ? 1'b0 : | |
1822 | data_in_sys2[1]; | |
1823 | ||
1824 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 ssys_reset_dmu_ff | |
1825 | (.din (ssys_reset_dmu_din ), | |
1826 | .scan_in (ssys_reset_dmu_ff_scanin ), | |
1827 | .scan_out(ssys_reset_dmu_ff_scanout), | |
1828 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1829 | .l1clk (l1clk ), | |
1830 | .en (ssys_reset_dmu_en ), | |
1831 | .dout (ssys_reset_dmu_q ), | |
1832 | .siclk(siclk), | |
1833 | .soclk(soclk));// = SSYS_RESET [ DMU_PEU]. | |
1834 | // = ssys_reset_q[ 1]. | |
1835 | //________________________________________________________________ | |
1836 | ||
1837 | reg ssys_reset_niu_clr ; | |
1838 | wire ssys_reset_niu_en = ssys_reset_en | | |
1839 | ssys_reset_niu_clr ; | |
1840 | wire ssys_reset_niu_din = ssys_reset_niu_clr ? 1'b0 : | |
1841 | data_in_sys2[0]; | |
1842 | ||
1843 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 ssys_reset_niu_ff | |
1844 | (.din (ssys_reset_niu_din ), | |
1845 | .scan_in (ssys_reset_niu_ff_scanin ), | |
1846 | .scan_out(ssys_reset_niu_ff_scanout), | |
1847 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1848 | .l1clk (l1clk ), | |
1849 | .en (ssys_reset_niu_en ), | |
1850 | .dout (ssys_reset_niu_q ), | |
1851 | .siclk(siclk), | |
1852 | .soclk(soclk));// = SSYS_RESET [ NIU]. | |
1853 | // = ssys_reset_q[ 0]. | |
1854 | //________________________________________________________________ | |
1855 | ||
1856 | assign rst_dmu_peu_por_sys_ = | |
1857 | ~( | |
1858 | (~rst_l2_por_sys_ ) | // (Independent of DBR.) | |
1859 | (~mio_rst_pwron_rst_sys_ ) | // Async assert, sync deassert. | |
1860 | (~rst_dmu_peu_por_sm_ ) | |
1861 | ); | |
1862 | ||
1863 | assign rst_dmu_peu_wmr_sys_ = | |
1864 | ~( | |
1865 | (~mio_rst_pwron_rst_sys_ ) | // Async assert, sync deassert. | |
1866 | ((~rst_dmu_peu_wmr_sm_ ) & // It is OK that this does not come from | |
1867 | // a flop, because we flop | |
1868 | // rst_dmu_peu_wmr_sys_ before using. | |
1869 | (~reset_gen_dbr_gen_q ) ) | // Don't assert rst_dmu_peu_wmr_i | |
1870 | // during DBR. | |
1871 | (~rst_dmu_ssys_sm_ ) // DMU_PEU bit of SSYS_RESET register. | |
1872 | ); // | |
1873 | ||
1874 | assign rst_niu_mac_sys_ = | |
1875 | ~( | |
1876 | (~mio_rst_pwron_rst_sys_ ) | // Async assert, sync deassert. | |
1877 | ((~rst_niu_mac_sm_ ) & // It is OK that this does not come from | |
1878 | // a flop, because we flop | |
1879 | // rst_niu_mac_sys_ before using. | |
1880 | (~reset_gen_dbr_gen_q ) ) | // Don't assert rst_niu_mac_sys_ | |
1881 | // during DBR. | |
1882 | ((~rst_niu_ssys_sm_ ) & // NIU bit of SSYS_RESET register. | |
1883 | (~ssys_reset_mac_q ) ) // MAC_PROTECT bit of SSYS_RESET register. | |
1884 | ); // | |
1885 | ||
1886 | assign rst_niu_wmr_sys_ = | |
1887 | ~( | |
1888 | (~mio_rst_pwron_rst_sys_ ) | // Async assert, sync deassert. | |
1889 | ((~rst_niu_wmr_sm_ ) & // It is OK that this does not come from | |
1890 | // a flop, because we flop | |
1891 | // rst_niu_wmr_sys_ before using. | |
1892 | (~reset_gen_dbr_gen_q ) ) | // Don't assert rst_niu_wmr_sys_ | |
1893 | // during DBR. | |
1894 | (~rst_niu_ssys_sm_ ) // NIU bit of SSYS_RESET register. | |
1895 | ); // | |
1896 | ||
1897 | wire assert_mac_during_wmr = (ccu_rst_change_sys == 1'b1) & ~ssys_reset_mac_q; | |
1898 | ||
1899 | // Set SSYS_RESET[MAC_PROTECT] (ssys_reset_mac_q) to one to | |
1900 | // suppress the assertion of rst_niu_mac_sys_ that the Reset Unit | |
1901 | // would normally generate during a WMR with ccu_rst_change_sys==1. | |
1902 | //________________________________________________________________ | |
1903 | ||
1904 | //[63:7] RSVD0 | |
1905 | wire [6:0] ssys_reset_q = {ssys_reset_mac_q , // [6] MAC_PROTECT | |
1906 | ssys_reset_mcu_q , // [5] MCU_SELFRSH | |
1907 | 1'b0 , // [4] RSVD1 | |
1908 | 2'b0 , // [3:2] RSVD2 | |
1909 | ssys_reset_dmu_q , // [1] DMU_PEU | |
1910 | ssys_reset_niu_q };// [0] NIU | |
1911 | ||
1912 | ||
1913 | //________________________________________________________________ | |
1914 | // | |
1915 | // RSET_STAT register, RW (except shadow bits are RO) | |
1916 | //________________________________________________________________ | |
1917 | ||
1918 | wire rset_stat_addr = addr_in_sys2 == `IOB_CREG_RESETSTAT; | |
1919 | wire rset_stat_en = (wr_req_vld_trunc & rset_stat_addr) | | |
1920 | rset_stat_wmr_set; | |
1921 | ||
1922 | //re rset_stat_wmr_en = reset_gen_en & data_in_sys2[0] | |
1923 | // // SW setting WMR_GEN bit of | |
1924 | // // RESET_GEN reg. | |
1925 | // | rset_stat_en | |
1926 | // | ~mio_rst_pb_rst_sys3_; | |
1927 | //________________________________________________________________ | |
1928 | // | |
1929 | // The shadow versions of the bits only have meaning after a WMR, | |
1930 | // since by definition, a reset the system controller applies after | |
1931 | // the machine has been running is a WMR. Since the system | |
1932 | // controller only applies a POR upon applying power, the shadow | |
1933 | // versions of the bits will always be 0 after a POR. | |
1934 | //________________________________________________________________ | |
1935 | ||
1936 | wire [11:0] rset_stat_q; | |
1937 | wire [ 2:0] rset_stat_shadow_din = | |
1938 | ((reset_gen_en & data_in_sys2[0]) | |
1939 | // SW setting WMR_GEN bit of | |
1940 | // RESET_GEN reg. | |
1941 | | rset_stat_wmr_set | |
1942 | ) ? rset_stat_q[3:1] : | |
1943 | rset_stat_en ? data_in_sys2[11:9] : | |
1944 | 3'h0; // ~mio_rst_pb_rst_sys3_ Review May02'05. | |
1945 | wire [ 2:0] rset_stat_shadow_q; | |
1946 | ||
1947 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_3 rset_stat_shadow_ff | |
1948 | (.din (rset_stat_shadow_din[2:0] ), | |
1949 | .scan_in (rset_stat_shadow_ff_scanin ), | |
1950 | .scan_out(rset_stat_shadow_ff_scanout), | |
1951 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1952 | .l1clk (l1clk ), | |
1953 | .en (rset_stat_en ), // Only meaningful after a WMR. | |
1954 | .dout (rset_stat_shadow_q[2:0] ), | |
1955 | .siclk(siclk), | |
1956 | .soclk(soclk)); | |
1957 | //________________________________________________________________ | |
1958 | ||
1959 | wire rset_stat_freq_din = | |
1960 | //(reset_gen_en & data_in_sys2[0] | |
1961 | // SW setting WMR_GEN bit of | |
1962 | // RESET_GEN reg. | |
1963 | (rset_stat_wmr_set | |
1964 | ) ? ccu_rst_change_sys : | |
1965 | rset_stat_en ? data_in_sys2[3] : | |
1966 | 1'h0; // ~mio_rst_pb_rst_sys3_ | |
1967 | wire rset_stat_freq_q; | |
1968 | ||
1969 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 rset_stat_freq_ff | |
1970 | (.din (rset_stat_freq_din ), | |
1971 | .scan_in (rset_stat_freq_ff_scanin ), | |
1972 | .scan_out(rset_stat_freq_ff_scanout), | |
1973 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
1974 | .l1clk (l1clk ), | |
1975 | .en (rset_stat_en ), // Only meaningful after a WMR. | |
1976 | .dout (rset_stat_freq_q ), | |
1977 | .siclk(siclk), | |
1978 | .soclk(soclk)); | |
1979 | ||
1980 | //________________________________________________________________ | |
1981 | ||
1982 | wire rset_stat_por_din = | |
1983 | rset_stat_wmr_set ? 1'b0 : | |
1984 | //(reset_gen_en & data_in_sys2[2] | |
1985 | // SW can't set POR_GEN bit of | |
1986 | // RESET_GEN reg. because there is none. | |
1987 | //) ? 1'b1 : | |
1988 | rset_stat_en ? data_in_sys2[2] : | |
1989 | 1'h0; // RST_ARBITER: rset_stat_wmr_set. | |
1990 | assign rset_stat_por_din_phy_ = ~rset_stat_por_din; | |
1991 | wire rset_stat_por_q_phy_; | |
1992 | assign rset_stat_por_q = ~rset_stat_por_q_phy_; | |
1993 | // Initial value 1 on POR, so | |
1994 | // rset_stat_por_din_, like | |
1995 | // reset_source_por_q_, holds inverse. | |
1996 | ||
1997 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 rset_stat_por_ff | |
1998 | (.din (rset_stat_por_din_phy_ ), | |
1999 | .scan_in (rset_stat_por_ff_scanin ), | |
2000 | .scan_out(rset_stat_por_ff_scanout), | |
2001 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2002 | .l1clk (l1clk ), | |
2003 | .en (rset_stat_en ), | |
2004 | .dout (rset_stat_por_q_phy_ ), | |
2005 | .siclk(siclk), | |
2006 | .soclk(soclk)); | |
2007 | ||
2008 | //________________________________________________________________ | |
2009 | ||
2010 | wire rset_stat_wmr_din = | |
2011 | rset_stat_wmr_set ? 1'b1 : | |
2012 | (reset_gen_en & data_in_sys2[0] | |
2013 | // SW setting WMR_GEN bit of | |
2014 | // RESET_GEN reg. | |
2015 | ) ? 1'b1 : | |
2016 | rset_stat_en ? data_in_sys2[1] : | |
2017 | 1'h1; // ~mio_rst_pb_rst_sys3_ | |
2018 | wire rset_stat_wmr_q; | |
2019 | ||
2020 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 rset_stat_wmr_ff | |
2021 | (.din (rset_stat_wmr_din ), | |
2022 | .scan_in (rset_stat_wmr_ff_scanin ), | |
2023 | .scan_out(rset_stat_wmr_ff_scanout), | |
2024 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2025 | .l1clk (l1clk ), | |
2026 | .en (rset_stat_en ), | |
2027 | .dout (rset_stat_wmr_q ), | |
2028 | .siclk(siclk), | |
2029 | .soclk(soclk)); | |
2030 | //________________________________________________________________ | |
2031 | ||
2032 | assign rset_stat_q[11:0] = {rset_stat_shadow_q[2:0],// [11:9] Shadow. | |
2033 | 5'b0 ,// [ 8:4] Reserved. | |
2034 | rset_stat_freq_q ,// [ 3] Freq. | |
2035 | rset_stat_por_q ,// [ 2] POR. | |
2036 | rset_stat_wmr_q ,// [ 1] WMR. | |
2037 | 1'b0 };// [ 0] Reserved. | |
2038 | ||
2039 | // xx 0in range -var {~rset_stat_por_q_, rset_stat_wmr_q} -min 0 -max 2 | |
2040 | /* xx 0in value | |
2041 | -var {~rset_stat_por_q_, rset_stat_wmr_q} | |
2042 | -val 2'b00 2'b01 2'b10 | |
2043 | -active ... (What is this?) -module ... -name ... | |
2044 | -message "POR and WMR bits in RSET_STAT are mutually exclusive." | |
2045 | */ | |
2046 | // commented out the assertion that | |
2047 | // POR and WMR bits in RSET_STAT are mutually exclusive, because, | |
2048 | // while that is true as rst operates, software can write all ones | |
2049 | // into the rset_stat register. Dec 23 '04 | |
2050 | ||
2051 | //________________________________________________________________ | |
2052 | // | |
2053 | // LOCK_TIME register, RW | |
2054 | //________________________________________________________________ | |
2055 | ||
2056 | wire lock_time_addr = addr_in_sys2 == `IOB_CREG_LOCK_TIME; | |
2057 | wire lock_time_en = wr_req_vld_trunc & lock_time_addr; | |
2058 | ||
2059 | // 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 | |
2060 | // 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 = 5k. | |
2061 | ||
2062 | wire [`RST_TIME_WIDTH-1:0] | |
2063 | lock_time_din = data_in_sys2[`RST_TIME_WIDTH-1:0]; | |
2064 | wire [`RST_TIME_WIDTH-1:0] | |
2065 | lock_time_din_phy | |
2066 | = { lock_time_din [`RST_TIME_WIDTH-1:13],// Reset to 5k=5120. | |
2067 | ~lock_time_din [ 12],// = logical 1. | |
2068 | lock_time_din [ 11],// = logical 0. | |
2069 | ~lock_time_din [ 10],// = logical 1. | |
2070 | lock_time_din [ 9:0] }; | |
2071 | wire [`RST_TIME_WIDTH-1:0] | |
2072 | lock_time_q_phy; | |
2073 | wire [`RST_TIME_WIDTH-1:0] | |
2074 | lock_time_q | |
2075 | = { lock_time_q_phy[`RST_TIME_WIDTH-1:13],// Reset to 5k=5120. | |
2076 | ~lock_time_q_phy[ 12],// = logical 1. | |
2077 | lock_time_q_phy[ 11],// = logical 0. | |
2078 | ~lock_time_q_phy[ 10],// = logical 1. | |
2079 | lock_time_q_phy[ 9:0] }; | |
2080 | ||
2081 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_16 lock_time_ff | |
2082 | ||
2083 | (.din (lock_time_din_phy[`RST_TIME_WIDTH-1:0]), | |
2084 | .scan_in (lock_time_ff_scanin ), | |
2085 | .scan_out(lock_time_ff_scanout), | |
2086 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2087 | .l1clk (l1clk ), | |
2088 | .en (lock_time_en ), | |
2089 | .dout (lock_time_q_phy [`RST_TIME_WIDTH-1:0]), | |
2090 | .siclk(siclk), | |
2091 | .soclk(soclk)); | |
2092 | ||
2093 | //________________________________________________________________ | |
2094 | // | |
2095 | // LOCK_TIME counter, internal to rst_ctl. | |
2096 | //________________________________________________________________ | |
2097 | ||
2098 | wire [`RST_TIME_WIDTH-1:0] | |
2099 | lock_count_q; | |
2100 | reg lock_count_run; // Enable LOCK_TIME counter. | |
2101 | wire [`RST_TIME_WIDTH-1:0] | |
2102 | lock_count_din | |
2103 | = lock_count_run | |
2104 | ? lock_count_q[`RST_TIME_WIDTH-1:0] - `RST_TIME_WIDTH'b1 | |
2105 | : lock_time_q [`RST_TIME_WIDTH-1:0]; | |
2106 | ||
2107 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 lock_count_ff | |
2108 | ||
2109 | (.din (lock_count_din[`RST_TIME_WIDTH-1:0]), | |
2110 | .scan_in (lock_count_ff_scanin ), | |
2111 | .scan_out(lock_count_ff_scanout), | |
2112 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2113 | .l1clk (l1clk ), | |
2114 | .dout (lock_count_q [`RST_TIME_WIDTH-1:0]), | |
2115 | .siclk(siclk), | |
2116 | .soclk(soclk)); | |
2117 | ||
2118 | //________________________________________________________________ | |
2119 | // | |
2120 | // PROP_TIME register, RW | |
2121 | //________________________________________________________________ | |
2122 | ||
2123 | wire prop_time_addr = addr_in_sys2 == `IOB_CREG_PROP_TIME; | |
2124 | wire prop_time_en = wr_req_vld_trunc & prop_time_addr; | |
2125 | ||
2126 | // 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 | |
2127 | // 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 = 3k. | |
2128 | ||
2129 | wire [`RST_TIME_WIDTH-1:0] | |
2130 | prop_time_din = data_in_sys2[`RST_TIME_WIDTH-1:0]; | |
2131 | wire [`RST_TIME_WIDTH-1:0] | |
2132 | prop_time_din_phy | |
2133 | = { prop_time_din [`RST_TIME_WIDTH-1:12],// Reset to 3k=3072. | |
2134 | ~prop_time_din [ 11:10],// = logical 1. | |
2135 | prop_time_din [ 9:0] }; | |
2136 | wire [`RST_TIME_WIDTH-1:0] | |
2137 | prop_time_q_phy; | |
2138 | wire [`RST_TIME_WIDTH-1:0] | |
2139 | prop_time_q | |
2140 | = { prop_time_q_phy[`RST_TIME_WIDTH-1:12],// Reset to 3k=3072. | |
2141 | ~prop_time_q_phy[ 11:10],// = logical 1. | |
2142 | prop_time_q_phy[ 9:0] }; | |
2143 | ||
2144 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_16 prop_time_ff | |
2145 | (.din (prop_time_din_phy[`RST_TIME_WIDTH-1:0]), | |
2146 | .scan_in (prop_time_ff_scanin ), | |
2147 | .scan_out(prop_time_ff_scanout), | |
2148 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2149 | .l1clk (l1clk ), | |
2150 | .en (prop_time_en ), | |
2151 | .dout (prop_time_q_phy[`RST_TIME_WIDTH-1:0] ), | |
2152 | .siclk(siclk), | |
2153 | .soclk(soclk)); | |
2154 | ||
2155 | //________________________________________________________________ | |
2156 | // | |
2157 | // PROP_TIME counter, internal to rst_ctl. | |
2158 | //________________________________________________________________ | |
2159 | ||
2160 | wire [`RST_TIME_WIDTH-1:0] | |
2161 | prop_count_q; | |
2162 | reg prop_count_run; // Enable PROP_TIME counter. | |
2163 | wire [`RST_TIME_WIDTH-1:0] | |
2164 | prop_count_din | |
2165 | = prop_count_run | |
2166 | ? prop_count_q[`RST_TIME_WIDTH-1:0] - `RST_TIME_WIDTH'b1 | |
2167 | : prop_time_q [`RST_TIME_WIDTH-1:0]; | |
2168 | ||
2169 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 prop_count_ff | |
2170 | ||
2171 | (.din (prop_count_din[`RST_TIME_WIDTH-1:0]), | |
2172 | .scan_in (prop_count_ff_scanin ), | |
2173 | .scan_out(prop_count_ff_scanout), | |
2174 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2175 | .l1clk (l1clk ), | |
2176 | .dout (prop_count_q [`RST_TIME_WIDTH-1:0]), | |
2177 | .siclk(siclk), | |
2178 | .soclk(soclk)); | |
2179 | ||
2180 | //________________________________________________________________ | |
2181 | // | |
2182 | // NIU_TIME register, RW | |
2183 | //________________________________________________________________ | |
2184 | ||
2185 | wire niu_time_addr = addr_in_sys2 == `IOB_CREG_NIU_TIME; | |
2186 | wire niu_time_en = wr_req_vld_trunc & niu_time_addr; | |
2187 | ||
2188 | // 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 | |
2189 | // 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 = 1.5k+64. | |
2190 | // = 1,600. | |
2191 | wire [`RST_TIME_WIDTH-1:0] | |
2192 | niu_time_din = data_in_sys2[`RST_TIME_WIDTH-1:0]; | |
2193 | wire [`RST_TIME_WIDTH-1:0] | |
2194 | niu_time_din_phy | |
2195 | = { niu_time_din [`RST_TIME_WIDTH-1:11],// Reset to 1.5k+64. | |
2196 | ~niu_time_din [ 10:9],// Physical 0 = logical 1. | |
2197 | niu_time_din [ 8:7],// | |
2198 | ~niu_time_din [ 6],// Reset to phy 0, log 1. | |
2199 | niu_time_din [ 5:0] }; | |
2200 | wire [`RST_TIME_WIDTH-1:0] | |
2201 | niu_time_q_phy; | |
2202 | wire [`RST_TIME_WIDTH-1:0] | |
2203 | niu_time_q | |
2204 | = { niu_time_q_phy[`RST_TIME_WIDTH-1:11],// Reset to 1.5k+64. | |
2205 | ~niu_time_q_phy[ 10:9],// = logical 1. | |
2206 | niu_time_q_phy[ 8:7],// | |
2207 | ~niu_time_q_phy[ 6],// = logical 1. | |
2208 | niu_time_q_phy[ 5:0] }; | |
2209 | ||
2210 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_16 niu_time_ff | |
2211 | ||
2212 | (.din (niu_time_din_phy[`RST_TIME_WIDTH-1:0]), | |
2213 | .scan_in (niu_time_ff_scanin ), | |
2214 | .scan_out(niu_time_ff_scanout), | |
2215 | .clr_ (mio_rst_pwron_rst_sys_), | |
2216 | .l1clk (l1clk ), | |
2217 | .en (niu_time_en ), | |
2218 | .dout (niu_time_q_phy [`RST_TIME_WIDTH-1:0]), | |
2219 | .siclk(siclk), | |
2220 | .soclk(soclk)); | |
2221 | ||
2222 | //________________________________________________________________ | |
2223 | // | |
2224 | // NIU_TIME counter, internal to rst_ctl. | |
2225 | //________________________________________________________________ | |
2226 | ||
2227 | wire [`RST_TIME_WIDTH-1:0] | |
2228 | niu_count_q ; | |
2229 | reg niu_count_run ; // Enable NIU_TIME counter. | |
2230 | reg niu_count_run_dmu_sm; | |
2231 | reg niu_count_run_niu_sm; // Only one SM active at a time. | |
2232 | wire [`RST_TIME_WIDTH-1:0] | |
2233 | niu_count_din | |
2234 | = (niu_count_run | | |
2235 | niu_count_run_dmu_sm | | |
2236 | niu_count_run_niu_sm ) // Only one SM active at a time. | |
2237 | ? niu_count_q[`RST_TIME_WIDTH-1:0] - `RST_TIME_WIDTH'b1 | |
2238 | : niu_time_q [`RST_TIME_WIDTH-1:0]; | |
2239 | ||
2240 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 niu_count_ff | |
2241 | ||
2242 | (.din (niu_count_din[`RST_TIME_WIDTH-1:0]), | |
2243 | .scan_in (niu_count_ff_scanin ), | |
2244 | .scan_out(niu_count_ff_scanout), | |
2245 | .clr_ (mio_rst_pwron_rst_sys_), | |
2246 | .l1clk (l1clk ), | |
2247 | .dout (niu_count_q [`RST_TIME_WIDTH-1:0]), | |
2248 | .siclk(siclk), | |
2249 | .soclk(soclk)); | |
2250 | ||
2251 | //________________________________________________________________ | |
2252 | // | |
2253 | // CCU_TIME register, RW | |
2254 | //________________________________________________________________ | |
2255 | ||
2256 | wire ccu_time_addr = addr_in_sys2 == `IOB_CREG_CCU_TIME; | |
2257 | wire ccu_time_en = wr_req_vld_trunc & ccu_time_addr; | |
2258 | ||
2259 | // 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 | |
2260 | // 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 = 32 | |
2261 | wire [`RST_TIME_WIDTH-1:0] | |
2262 | ccu_time_din = data_in_sys2[`RST_TIME_WIDTH-1:0]; | |
2263 | wire [`RST_TIME_WIDTH-1:0] | |
2264 | ccu_time_din_phy | |
2265 | = { ccu_time_din [`RST_TIME_WIDTH-1:6],// Reset to 32. | |
2266 | ~ccu_time_din [ 5],// = logical 1. | |
2267 | ccu_time_din [ 4:0] }; | |
2268 | wire [`RST_TIME_WIDTH-1:0] | |
2269 | ccu_time_q_phy; | |
2270 | wire [`RST_TIME_WIDTH-1:0] | |
2271 | ccu_time_q | |
2272 | = { ccu_time_q_phy[`RST_TIME_WIDTH-1:6],// Reset to 32. | |
2273 | ~ccu_time_q_phy[ 5],// = logical 1. | |
2274 | ccu_time_q_phy[ 4:0] }; | |
2275 | ||
2276 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_16 ccu_time_ff | |
2277 | (.din (ccu_time_din_phy[`RST_TIME_WIDTH-1:0]), | |
2278 | .scan_in (ccu_time_ff_scanin ), | |
2279 | .scan_out(ccu_time_ff_scanout), | |
2280 | .clr_ (mio_rst_pwron_rst_sys_), | |
2281 | .l1clk (l1clk ), | |
2282 | .en (ccu_time_en ), | |
2283 | .dout (ccu_time_q_phy [`RST_TIME_WIDTH-1:0]), | |
2284 | .siclk(siclk), | |
2285 | .soclk(soclk)); | |
2286 | ||
2287 | //________________________________________________________________ | |
2288 | // | |
2289 | // CCU_TIME counter, internal to rst_ctl. | |
2290 | //________________________________________________________________ | |
2291 | ||
2292 | wire [`RST_TIME_WIDTH-1:0] | |
2293 | ccu_count_q; | |
2294 | reg ccu_count_run; // Enable CCU_TIME counter. | |
2295 | wire [`RST_TIME_WIDTH-1:0] | |
2296 | ccu_count_din | |
2297 | = ccu_count_run | |
2298 | ? ccu_count_q[`RST_TIME_WIDTH-1:0] - `RST_TIME_WIDTH'b1 | |
2299 | : ccu_time_q [`RST_TIME_WIDTH-1:0]; | |
2300 | ||
2301 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 ccu_count_ff | |
2302 | ||
2303 | (.din (ccu_count_din[`RST_TIME_WIDTH-1:0]), | |
2304 | .scan_in (ccu_count_ff_scanin ), | |
2305 | .scan_out(ccu_count_ff_scanout), | |
2306 | .clr_ (mio_rst_pwron_rst_sys_), | |
2307 | .l1clk (l1clk ), | |
2308 | .dout (ccu_count_q [`RST_TIME_WIDTH-1:0]), | |
2309 | .siclk(siclk), | |
2310 | .soclk(soclk)); | |
2311 | ||
2312 | //________________________________________________________________ | |
2313 | // | |
2314 | // RESET_FEE register, Fatal Error Enable, RW | |
2315 | //________________________________________________________________ | |
2316 | ||
2317 | wire reset_fee_addr = addr_in_sys2 == `IOB_CREG_RESET_FEE; | |
2318 | wire reset_fee_en = (wr_req_vld_trunc & reset_fee_addr) | | |
2319 | rset_stat_wmr_set; // Clr on WMR. | |
2320 | wire [7:0] reset_fee_din = rset_stat_wmr_set ? 8'b0 // Clr on WMR. | |
2321 | : data_in_sys2[15:8]; | |
2322 | ||
2323 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_8 reset_fee_ff | |
2324 | (.din (reset_fee_din[7:0] ), | |
2325 | .scan_in (reset_fee_ff_scanin ), | |
2326 | .scan_out(reset_fee_ff_scanout), | |
2327 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
2328 | .l1clk (l1clk ), | |
2329 | .en (reset_fee_en ), | |
2330 | .dout (reset_fee_q[7:0] ), | |
2331 | .siclk(siclk), | |
2332 | .soclk(soclk)); | |
2333 | ||
2334 | //________________________________________________________________ | |
2335 | // | |
2336 | // Reset sequence state machine | |
2337 | //________________________________________________________________ | |
2338 | ||
2339 | //________________________________________________________________ | |
2340 | // | |
2341 | // 1.4 POR_1: RST_INIT_STATE . | |
2342 | // (POR1_FLUSH_STOP_REQ) | |
2343 | // Both rst and tcu reset. | |
2344 | // Come out of PWRON_RST_L continuing to assert rt_flush_stop_req_sys . | |
2345 | // tcu (Re-start tcu clk.) (POR1: Never stopped.) | |
2346 | // 5.4.2 tcu Deassert scan_en, wait for it to propagate. | |
2347 | // 5.4.8 tcu Deassert clk_stop in a staggered fashion. | |
2348 | // 5.4.9 tcu Conditional EFU. (Not WMR.) | |
2349 | // 5.5 Bisi1 tcu Conditional Bisi or Bist. | |
2350 | // tcu (Conditional stop clocks according to | |
2351 | // tcu asi_core_available.) (Not POR1.) | |
2352 | // 5.6 Wait for tr_flush_stop_ack_sys . POR1_FLUSH_STOP_ACK | |
2353 | // (FLUSH_POR_1 .) | |
2354 | //________________________________________________________________ | |
2355 | // | |
2356 | // 5.7 POR_2: | |
2357 | // Assert rt_flush_init_req_sys . | |
2358 | // tcu Assert clk_stop in a staggered fashion. | |
2359 | // tcu Assert scan_en, wait for it to propagate. | |
2360 | // tcu (Both rst and tcu protected from reset.) | |
2361 | // tcu Stop tcu clock, since PLL may unlock. | |
2362 | // Wait for tr_flush_init_ack_sys . POR2_FLUSH_INIT_ACK | |
2363 | // 5.8 Wait lock_time. POR2_LOCK_TIME | |
2364 | // (POR2_FLUSH_INIT_ACK .) | |
2365 | // DEASSERT_CLOCK_STOP . | |
2366 | // EFU_RUN_1 . | |
2367 | // REASSERT_CLOCK_STOP_1 | |
2368 | // BISI_RUN_1 | |
2369 | // FLUSH_POR_2 | |
2370 | // DEASSERT_SE_PROP_2 | |
2371 | // EFU_RUN_2 | |
2372 | // REASSERT_CLOCK_STOP_2 | |
2373 | // Assert rt_flush_stop_req_sys . | |
2374 | // tcu Re-start tcu clock. | |
2375 | // 5.9 tcu Deassert scan_en, wait for it to propagate. | |
2376 | // tcu Deassert clk_stop in a staggered fashion. | |
2377 | // 5.10 tcu Conditional EFU. (Not WMR.) | |
2378 | // tcu (Conditional Bisi or Bist: Suppressed.) | |
2379 | // tcu Conditional stop clocks according to | |
2380 | // tcu asi_core_available. (Not POR1.) | |
2381 | // Wait for tr_flush_stop_ack_sys . POR2_FLUSH_STOP_ACK | |
2382 | // 5.12 Assert rst_soc_run. POR2_ASSERT_RUN | |
2383 | // 5.12 Assert rst_ncu_unpark_thread_sys2. POR2_UNPARK_THREAD | |
2384 | // 8 Wait for WMR_GEN. POR2_WMR_GEN | |
2385 | // 8 Deassert rst_soc_run. WMR1_DEASSERT_RUN | |
2386 | // 9 Assert rst_l2_wmr_sys_ (POR2_RST_WMR_) | |
2387 | //________________________________________________________________ | |
2388 | // | |
2389 | // Flush WMR 1: | |
2390 | // Assert rt_flush_init_req_sys . | |
2391 | // tcu Assert clk_stop in a staggered fashion. | |
2392 | // tcu Assert scan_en, wait for it to propagate. | |
2393 | // tcu (Both rst and tcu protected from reset.) | |
2394 | // tcu Stop tcu clock, since PLL may unlock. | |
2395 | // Wait for tr_flush_init_ack_sys . WMR1_FLUSH_INIT_ACK | |
2396 | // 9.4.2 Wait lock_time. WMR1_LOCK_TIME | |
2397 | // Assert rt_flush_stop_req_sys . | |
2398 | // tcu Re-start tcu clock. | |
2399 | // tcu Deassert scan_en, wait for it to propagate. | |
2400 | // tcu Deassert clk_stop in a staggered fashion. | |
2401 | // tcu (Conditional EFU.) (Not WMR.) | |
2402 | // 9.5 Bist2 tcu Conditional Bisi or Bist. | |
2403 | // tcu Conditional stop clocks according to | |
2404 | // tcu asi_core_available. (Not POR1.) | |
2405 | // 9.6 Wait for tr_flush_stop_ack_sys . WMR1_FLUSH_STOP_ACK | |
2406 | //________________________________________________________________ | |
2407 | // | |
2408 | // Flush WMR 2: | |
2409 | // 9.7 Assert rst_wrm_. | |
2410 | // Assert rt_flush_init_req_sys . | |
2411 | // tcu Assert clk_stop in a staggered fashion. | |
2412 | // tcu Assert scan_en, wait for it to propagate. | |
2413 | // tcu (Both rst and tcu protected from reset.) | |
2414 | // tcu Stop tcu clock, since PLL may unlock. | |
2415 | // Wait for tr_flush_init_ack_sys . WMR2_FLUSH_INIT_ACK | |
2416 | // 9.8 Wait lock_time. WMR2_PROP_TIME | |
2417 | // Assert rt_flush_stop_req_sys . | |
2418 | // tcu Re-start tcu clock. | |
2419 | // tcu Deassert scan_en, wait for it to propagate. | |
2420 | // tcu Deassert clk_stop in a staggered fashion. | |
2421 | // tcu (Conditional EFU.) (Not WMR.) | |
2422 | // tcu (Conditional Bisi or Bist.) (Not WMR2.) | |
2423 | // tcu Conditional stop clocks according to | |
2424 | // tcu asi_core_available. (Not POR1.) | |
2425 | // 9.9 Wait for tr_flush_stop_ack_sys . WMR2_FLUSH_STOP_ACK | |
2426 | // 9.11 Set RSET-STATUS reg WMR bit + Freq bit | |
2427 | // 9.12 Assert rst_soc_run. | |
2428 | // 9.12 Assert rst_ncu_unpark_thread_sys2. WMR2_UNPARK_THREAD | |
2429 | //________________________________________________________________ | |
2430 | ||
2431 | // rst tcu rst tcu | |
2432 | // tcu rst tcu rst | |
2433 | // rst_ rst_ flsh flsh flsh flsh | |
2434 | // ccu_ ccu_ rst_ rst_ init init stop stop rst_ | |
2435 | // State pll_ por_ wmr_ req ack req ack niu_ | |
2436 | // ___________________ ____ ____ ____ ____ ___ ___ ___ ___ ____ | |
2437 | // | |
2438 | // RST_INIT_STATE a a a a . . . . a . | |
2439 | // POR1_LOCK_TIME a . | |
2440 | // POR1_SYNC_STABLE . . | |
2441 | // POR1_FLUSH_STOP_REQ . . a a . . . . a . | |
2442 | // POR1_FLUSH_STOP_ACK . . a a . . 1 . a . | |
2443 | // POR1_BISX_DONE . . | |
2444 | ||
2445 | // POR2_FLUSH_INIT_ACK . . . . 1 . . . . . | |
2446 | // POR2_LOCK_TIME . . a a . . . . a . | |
2447 | // POR2_FLUSH_STOP_ACK . . . . . . 1 . . . | |
2448 | // POR2_EFU_DONE . . | |
2449 | // POR2_ASSERT_RUN . . . . . . . . . . | |
2450 | // POR2_UNPARK_THREAD . . . . . . . . . . | |
2451 | ||
2452 | // WMR1_WMR_GEN . . . . . . . . . . | |
2453 | // WMR1_DEASSERT_RUN . . . . . . . . . . | |
2454 | // WMR1_FLUSH_INIT_ACK . . . . 1 . . . . . | |
2455 | // WMR1_PRE_PLL1 . . | |
2456 | // WMR1_PRE_PLL2 . . | |
2457 | // WMR1_CCU_PLL a a | |
2458 | // WMR1_LOCK_TIME a . . a . . . . a . | |
2459 | // WMR1_SYNC_STABLE . . | |
2460 | // WMR1_PROP_TIME (alt path) . | |
2461 | // WMR1_FLUSH_STOP_ACK . . . . . . 1 . . . | |
2462 | ||
2463 | // WMR2_FLUSH_INIT_ACK . . . . 1 . . . . . | |
2464 | // WMR2_PROP_TIME . . . a . . . . a . | |
2465 | // WMR2_FLUSH_STOP_ACK . . . . . . 1 . . . | |
2466 | // WMR2_ASSERT_RUN . . . . . . . . . . | |
2467 | // WMR2_UNPARK_THREAD . . . . . . . . . . | |
2468 | // RST_ARBITER . . | |
2469 | // XIR_DONE . . | |
2470 | //________________________________________________________________ | |
2471 | ||
2472 | reg [`RST_FSM_WIDTH-1:0] state_d; // Next state. | |
2473 | wire [`RST_FSM_WIDTH-1:0] state_d_phy = { | |
2474 | state_d [`RST_FSM_WIDTH-1:1], // Reset to 1. | |
2475 | ~state_d [ 0] }; | |
2476 | wire [`RST_FSM_WIDTH-1:0] state_q_phy; // Current state. | |
2477 | wire [`RST_FSM_WIDTH-1:0] state_q = { | |
2478 | state_q_phy[`RST_FSM_WIDTH-1:1], // Reset to 1. | |
2479 | ~state_q_phy[ 0] }; | |
2480 | //________________________________________________________________ | |
2481 | // | |
2482 | // Reset sequence state_q state machine (always block) | |
2483 | //________________________________________________________________ | |
2484 | ||
2485 | always @( | |
2486 | //PWRON_RST_L or // variable in sensitivity list not | |
2487 | // used in block (PWRON_RST_L) | |
2488 | state_q or | |
2489 | tr_flush_init_ack_sys or | |
2490 | tr_flush_stop_ack_sys or | |
2491 | tcu_bisx_done_sys or | |
2492 | tcu_rst_efu_done_sys or | |
2493 | lock_count_q or | |
2494 | prop_count_q or | |
2495 | niu_count_q or | |
2496 | ccu_count_q or | |
2497 | mio_rst_pb_rst_sys3_ or | |
2498 | reset_gen_wmr_gen_q or | |
2499 | reset_gen_dbr_gen_q or | |
2500 | rst_fatal_or or | |
2501 | //ccu_rst_sync_stable or | |
2502 | ccu_rst_change_sys or | |
2503 | tr_asicflush_stop_ack_sys or | |
2504 | assert_mac_during_wmr ) | |
2505 | begin // Reset sequence state machine | |
2506 | ||
2507 | lock_count_run = 1'b0; // Default value. | |
2508 | prop_count_run = 1'b0; // Default value. | |
2509 | niu_count_run = 1'b0; // Default value. | |
2510 | ccu_count_run = 1'b0; // Default value. | |
2511 | ||
2512 | rst_ccu_pll_sm_ = `DEASSERT; // Default value. | |
2513 | rst_ccu_sm_ = `DEASSERT; // Default value. | |
2514 | cluster_arst_sm_ = `DEASSERT; // Default value. | |
2515 | rst_rst_por_sm_ = `DEASSERT; // Default value. | |
2516 | rst_l2_por_sys_ = `DEASSERT; // Default value. | |
2517 | rst_l2_wmr_sys_ = `DEASSERT; // Default value. | |
2518 | rst_cmp_ctl_wmr_sys_ = `DEASSERT; // Default value. | |
2519 | rst_niu_mac_sm_ = `DEASSERT; // Default value. | |
2520 | rst_niu_wmr_sm_ = `DEASSERT; // Default value. | |
2521 | rst_dmu_async_por_sm_ = `DEASSERT; // Default value. | |
2522 | rst_dmu_peu_por_sm_ = `DEASSERT; // Default value. | |
2523 | rst_dmu_peu_wmr_sm_ = `DEASSERT; // Default value. | |
2524 | rst_wmr_protect_sys = 1'b0; // Default value. | |
2525 | rst_tcu_clk_stop_sys = 1'b0; // Default value. | |
2526 | ||
2527 | rst_ncu_unpark_thread_sys = 1'b0; // Default value. | |
2528 | rt_flush_init_req_sys = 1'b0; // Default value. | |
2529 | rt_flush_stop_req_sys = 1'b0; // Default value. | |
2530 | rt_asicflush_stop_req_sys = 1'b0; // Default value. | |
2531 | rst_WMR_done = 1'b0; // Default value. | |
2532 | rst_DBR_done = 1'b0; // Default value. | |
2533 | rst_assert_ssi_sync_en = 1'b0; // Default value. | |
2534 | rst_assert_ssi_sync_din = 1'b0; // Default value. | |
2535 | rset_stat_wmr_set = 1'b0; // Default value. | |
2536 | reset_source_pb_rst_set = 1'b0; // Default value. | |
2537 | ||
2538 | state_d = `RST_INIT_STATE; // Default value. | |
2539 | ||
2540 | /* 0in one_hot -var state_q -active mio_rst_pwron_rst_l | |
2541 | -message "RST seq state machine state violated one_hot." | |
2542 | */ | |
2543 | ||
2544 | case (state_q) // synopsys parallel_case | |
2545 | // syn-op-sys full_case not applicable since one-hot. | |
2546 | /* 0in case | |
2547 | -parallel | |
2548 | -default | |
2549 | -active (mio_rst_pwron_rst_l === 1'b1) | |
2550 | -message "Main Reset Unit state machine case bad." | |
2551 | */ | |
2552 | ||
2553 | `RST_INIT_STATE: // 17'h0001 | |
2554 | begin // Steps 1.4 and 5.4. | |
2555 | // PWRON_RST_L forces this state, because: | |
2556 | // msff state_ff(.clr_(PWRON_RST_L)); | |
2557 | // and init value of state_q = | |
2558 | // RST_INIT_STATE == 17'h0001. | |
2559 | ||
2560 | rst_ccu_pll_sm_ = `ASSERT; // Hold pll until end of PWRON_RST_L. | |
2561 | rst_ccu_sm_ = `ASSERT; // Hold ccu a few cycles more. | |
2562 | cluster_arst_sm_ = `ASSERT; // Hold ccu a few cycles more. | |
2563 | rst_rst_por_sm_ = `ASSERT; // Hold ccu a few cycles more. | |
2564 | rst_l2_por_sys_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2565 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2566 | rst_cmp_ctl_wmr_sys_ = `ASSERT; // Hold rst_cmp_ctl until sync_stable. | |
2567 | rst_niu_mac_sm_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2568 | rst_niu_wmr_sm_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2569 | rst_dmu_async_por_sm_= `ASSERT; // Hold IP blocks until stop_ack. | |
2570 | rst_dmu_peu_por_sm_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2571 | rst_dmu_peu_wmr_sm_ = `ASSERT; // Hold IP blocks until stop_ack. | |
2572 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2573 | rst_ncu_unpark_thread_sys= 1'b0;// | |
2574 | ||
2575 | state_d = `POR1_LOCK_TIME; // Move on, as soon as Service | |
2576 | // Processor releases PWRON_RST_L. | |
2577 | end | |
2578 | ||
2579 | `POR1_LOCK_TIME: // 17'h000- | |
2580 | begin // Step 5.4.2: lock time. | |
2581 | rst_ccu_pll_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2582 | rst_ccu_sm_ = `ASSERT;// Release PLL for LOCK_TIME before ccu. | |
2583 | cluster_arst_sm_ = `ASSERT;// Release PLL for LOCK_TIME before ccu. | |
2584 | rst_rst_por_sm_ = `ASSERT;// Release PLL for LOCK_TIME before ccu. | |
2585 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2586 | rst_l2_wmr_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2587 | rst_cmp_ctl_wmr_sys_ = `ASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2588 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2589 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2590 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2591 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2592 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2593 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2594 | ||
2595 | lock_count_run = 1'b1; // Allow PLLs to lock. | |
2596 | if (lock_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2597 | state_d = `POR1_ARST_TIME; // | |
2598 | else | |
2599 | state_d = `POR1_LOCK_TIME; | |
2600 | end | |
2601 | ||
2602 | `POR1_ARST_TIME: // 17'h000- | |
2603 | begin // Step 5.4.2: lock time. | |
2604 | rst_ccu_pll_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2605 | rst_ccu_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2606 | cluster_arst_sm_ = `ASSERT;// Release PLL for LOCK_TIME before ccu. | |
2607 | rst_rst_por_sm_ = `ASSERT;// Sync reset of rst sync_en flops. | |
2608 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2609 | rst_l2_wmr_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2610 | rst_cmp_ctl_wmr_sys_ = `ASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2611 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2612 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2613 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2614 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2615 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2616 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2617 | ||
2618 | ccu_count_run = 1'b1; // Deassert rst_ccu_ before cluster_arst_l. | |
2619 | if (ccu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2620 | begin | |
2621 | ccu_count_run = 1'b0; // Clear counter before use next cycle. | |
2622 | state_d = `POR1_SYNC_STABLE; | |
2623 | end | |
2624 | else | |
2625 | state_d = `POR1_ARST_TIME; | |
2626 | end | |
2627 | ||
2628 | `POR1_SYNC_STABLE: // | |
2629 | begin // | |
2630 | rst_ccu_pll_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2631 | rst_ccu_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2632 | cluster_arst_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2633 | rst_rst_por_sm_ = `ASSERT;// Sync reset of rst sync_en flops, | |
2634 | // since l2clk and iol2clk now running. | |
2635 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2636 | rst_l2_wmr_sys_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2637 | rst_cmp_ctl_wmr_sys_ = `ASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2638 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2639 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2640 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2641 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2642 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2643 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2644 | ||
2645 | ccu_count_run = 1'b1; // Allow ccu_*_sync_en signals to settle. | |
2646 | if ( | |
2647 | //ccu_rst_sync_stable == 1'b1) // Wait for ccu to say sync_en OK. | |
2648 | ccu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2649 | // Cannot use ccu_rst_sync_stable | |
2650 | // because cannot cross clock domains | |
2651 | // because need to | |
2652 | // allow ccu_*_sync_en signals to settle. | |
2653 | state_d = `POR1_ASICFLUSH_STOP_ACK; | |
2654 | else | |
2655 | state_d = `POR1_SYNC_STABLE; | |
2656 | end | |
2657 | ||
2658 | `POR1_ASICFLUSH_STOP_ACK: // Req. for tcu to stop w. stop_req. | |
2659 | begin // | |
2660 | rst_ccu_pll_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2661 | rst_ccu_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2662 | cluster_arst_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2663 | //rst_rst_por_sm_ = `ASSERT;// Hold psr config regs: rst_dmu_async_por_. | |
2664 | rst_rst_por_sm_ =`DEASSERT;// Hold psr config regs: rst_dmu_async_por_. | |
2665 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2666 | rst_l2_wmr_sys_ =`DEASSERT;// Hold IP blocks in reset until stop_ack. | |
2667 | rst_cmp_ctl_wmr_sys_ =`DEASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2668 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2669 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2670 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2671 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2672 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2673 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2674 | rt_asicflush_stop_req_sys | |
2675 | = 1'b1; // Req. for tcu to stop w. stop_req. | |
2676 | if (tr_asicflush_stop_ack_sys == 1'b1) | |
2677 | // Wait for tcu to acknowledge w. stop_ack. | |
2678 | state_d = `POR1_NIU_TIME; // tcu has finished POR 1 flush stop. | |
2679 | else | |
2680 | state_d = `POR1_ASICFLUSH_STOP_ACK; | |
2681 | end | |
2682 | ||
2683 | `POR1_NIU_TIME: // | |
2684 | begin // | |
2685 | rst_ccu_pll_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2686 | rst_ccu_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2687 | cluster_arst_sm_ =`DEASSERT;// Release PLL for LOCK_TIME before ccu. | |
2688 | //rst_rst_por_sm_ = `ASSERT;// Hold psr config regs: rst_dmu_async_por_. | |
2689 | rst_rst_por_sm_ =`DEASSERT;// Hold psr config regs: rst_dmu_async_por_. | |
2690 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2691 | rst_l2_wmr_sys_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2692 | rst_cmp_ctl_wmr_sys_ =`DEASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2693 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2694 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2695 | // To do: separate into | |
2696 | // rst_por_sm_ and | |
2697 | // rst_mac_sm_. | |
2698 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2699 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2700 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2701 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2702 | ||
2703 | niu_count_run = 1'b1; // Allow mac in niu to reset. | |
2704 | if (niu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2705 | state_d = `POR1_FLUSH_STOP_ACK; | |
2706 | else | |
2707 | state_d = `POR1_NIU_TIME; | |
2708 | end | |
2709 | ||
2710 | `POR1_FLUSH_STOP_ACK: // Req. tcu to stop w. stop_req. | |
2711 | // Wait for tcu to acknowledge w. stop_ack. | |
2712 | begin // Steps 1.4 and 5.4. | |
2713 | // Ask tcu to perform a flush reset. | |
2714 | // It will: | |
2715 | // 1) Deassert clk_stop to each of the 17 | |
2716 | // clock domains in a staggered fashion. | |
2717 | // 2) Assert se and drive the data-in at the | |
2718 | // head of each scan chain to 0. | |
2719 | // 3) Wait for se to propagate throughout | |
2720 | // the chip. | |
2721 | // 4) Wait for the reset value (0) to | |
2722 | // propagate along the length of each | |
2723 | // scan chain. | |
2724 | // 5) Deassert se. | |
2725 | // 6) Wait for se to propagate throughout | |
2726 | // the chip. | |
2727 | // 1) Reassert clk_stop to each of the 17 | |
2728 | // clock domains in a staggered fashion. | |
2729 | ||
2730 | // Tcu requires these signals to deassert. | |
2731 | rst_rst_por_sm_ =`DEASSERT;// In accord with Reset Unit spec. Fig 5. | |
2732 | rst_l2_por_sys_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2733 | rst_l2_wmr_sys_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2734 | rst_cmp_ctl_wmr_sys_ =`DEASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2735 | rst_niu_mac_sm_ = `ASSERT;// Hold IP blocks in reset for LOCK_TIME. | |
2736 | rst_niu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2737 | rst_dmu_async_por_sm_= `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2738 | rst_dmu_peu_por_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2739 | rst_dmu_peu_wmr_sm_ = `ASSERT;// Hold IP blocks in reset until stop_ack. | |
2740 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2741 | // | |
2742 | // Above 2 assertions of rst_por_, and rst_wmr_ | |
2743 | // commented out Feb 26 '05 because: | |
2744 | // EXPECT MISMATCH | |
2745 | // TIME:5612764 CYCLE: 0 | |
2746 | // Signal: rst.rst_por_.0 | |
2747 | // Exp Value: 1 : 1 | |
2748 | // Actual Value: 0 : 0 | |
2749 | // VERIFICATION ERROR: Expect mismatch Location: | |
2750 | // CALL in program tcu_top_test (tcu_top.vr, line 102, cycle 0); | |
2751 | // CALL in function tcu_diag (diag.vr, line 35, cycle 0); | |
2752 | // CALL in task SystemReset.runRstSequence (sys_reset.vr, line 141, cycle 0); | |
2753 | // WAIT_ON_EXPECT in task SystemReset.prstDeassert | |
2754 | // (sys_reset.vr, line 426, cycle 0) | |
2755 | ||
2756 | rt_flush_stop_req_sys = 1'b1; // Req. tcu to stop w. stop_req. | |
2757 | if ( | |
2758 | tr_flush_stop_ack_sys == 1'b1) // Wait for tcu to acknowledge w. stop_ack. | |
2759 | state_d = `POR1_BISX_DONE; // tcu has finished POR 1 flush stop. | |
2760 | else | |
2761 | state_d = `POR1_FLUSH_STOP_ACK; | |
2762 | end | |
2763 | ||
2764 | `POR1_BISX_DONE: // Wait for tcu_bisx_done_sys. | |
2765 | begin // Steps 1.4 and 5.4. | |
2766 | rst_l2_por_sys_ =`DEASSERT;// Start IP blocks for EFU. | |
2767 | rst_l2_wmr_sys_ =`DEASSERT;// Start IP blocks for EFU. | |
2768 | rst_cmp_ctl_wmr_sys_ =`DEASSERT;// Hold rst_cmp_ctl until sync_stable. | |
2769 | rst_niu_mac_sm_ =`DEASSERT;// Start IP blocks for EFU. | |
2770 | rst_niu_wmr_sm_ =`DEASSERT;// Start IP blocks for EFU. | |
2771 | rst_dmu_async_por_sm_=`DEASSERT;// Start IP blocks for EFU. | |
2772 | rst_dmu_peu_por_sm_ =`DEASSERT;// Start IP blocks for EFU. | |
2773 | rst_dmu_peu_wmr_sm_ =`DEASSERT;// Start IP blocks for EFU. | |
2774 | rst_wmr_protect_sys = 1'b0; // POR, not WMR. | |
2775 | ||
2776 | if (tcu_bisx_done_sys == 1'b1) // | |
2777 | state_d = `POR2_FLUSH_INIT_ACK; | |
2778 | else | |
2779 | state_d = `POR1_BISX_DONE; | |
2780 | end | |
2781 | ||
2782 | `POR2_FLUSH_INIT_ACK: // 17'h0004 | |
2783 | begin // | |
2784 | rt_flush_init_req_sys = 1'b1; // Req. tcu to init w. init_req. | |
2785 | rst_l2_por_sys_ = `DEASSERT; // Stop clks, then reset IP blocks. | |
2786 | rst_l2_wmr_sys_ = `DEASSERT; // Stop clks, then reset IP blocks. | |
2787 | rst_niu_mac_sm_ = `DEASSERT; // Stop clks, then reset IP blocks. | |
2788 | rst_niu_wmr_sm_ = `DEASSERT; // Stop clks, then reset IP blocks. | |
2789 | rst_dmu_peu_por_sm_= `DEASSERT; // Stop clks, then reset IP blocks. | |
2790 | rst_dmu_peu_wmr_sm_= `DEASSERT; // Stop clks, then reset IP blocks. | |
2791 | rst_wmr_protect_sys= 1'b0; // POR, not WMR. | |
2792 | if ( | |
2793 | tr_flush_init_ack_sys == 1'b1) // Wait for tcu to acknowledge w. init_ack. | |
2794 | state_d = `POR2_LOCK_TIME; // tcu has finished POR 2 flush init. | |
2795 | else | |
2796 | state_d = `POR2_FLUSH_INIT_ACK; | |
2797 | ||
2798 | end | |
2799 | ||
2800 | `POR2_LOCK_TIME: //make prop_time // 17'h000- | |
2801 | begin // Step 5.4.2: lock time. | |
2802 | rst_l2_por_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
2803 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
2804 | rst_niu_mac_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2805 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2806 | rst_dmu_peu_por_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
2807 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
2808 | rst_wmr_protect_sys= 1'b0; // POR, not WMR. | |
2809 | ||
2810 | prop_count_run = 1'b1; // Allow deassertion of se to prop. | |
2811 | if (prop_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2812 | state_d = `POR2_FLUSH_STOP_ACK; | |
2813 | else | |
2814 | state_d = `POR2_LOCK_TIME; | |
2815 | end | |
2816 | ||
2817 | `POR2_FLUSH_STOP_ACK: // | |
2818 | begin // Steps 1.4 and 5.4. | |
2819 | rt_flush_stop_req_sys = 1'b1; // Ask tcu to perform a flush stop. | |
2820 | rst_l2_por_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2821 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2822 | rst_niu_mac_sm_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2823 | rst_niu_wmr_sm_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2824 | rst_dmu_peu_por_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2825 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2826 | rst_wmr_protect_sys= 1'b0; // POR, not WMR. | |
2827 | ||
2828 | if (tr_flush_stop_ack_sys == 1'b1) | |
2829 | state_d = `POR2_EFU_DONE; // tcu has finished POR 2 flush stop. | |
2830 | else | |
2831 | state_d = `POR2_FLUSH_STOP_ACK; | |
2832 | end | |
2833 | ||
2834 | `POR2_EFU_DONE: | |
2835 | begin // Step 5.10. | |
2836 | if (tcu_rst_efu_done_sys == 1'b1) // | |
2837 | state_d = `POR2_ASSERT_RUN; // efu has finished. | |
2838 | else | |
2839 | state_d = `POR2_EFU_DONE; | |
2840 | end | |
2841 | ||
2842 | ||
2843 | `POR2_ASSERT_RUN: // | |
2844 | begin // Steps 1.4 and 5.4. | |
2845 | rst_ncu_unpark_thread_sys = 1'b1;// Hold for 2 cycles to catch a sync_en. | |
2846 | state_d = `POR2_UNPARK_THREAD; | |
2847 | end | |
2848 | ||
2849 | `POR2_UNPARK_THREAD: // 17'h0008 | |
2850 | begin // Step 5.4.8. | |
2851 | rst_ncu_unpark_thread_sys = 1'b1;// Hold for 2 cycles to catch a sync_en. | |
2852 | state_d = `RST_ARBITER; // End of POR. | |
2853 | end | |
2854 | ||
2855 | `WMR1_WMR_GEN: // 17'h0010 | |
2856 | begin | |
2857 | rst_wmr_protect_sys= 1'b1; // Start protecting before assert | |
2858 | // rt_flush_init_req_sys . | |
2859 | state_d = `WMR1_DEASSERT_RUN; // | |
2860 | end | |
2861 | ||
2862 | `WMR1_DEASSERT_RUN: // 17'h0020 | |
2863 | begin | |
2864 | // rst_wmr_ = 1'b1; // | |
2865 | rst_wmr_protect_sys= 1'b1; // Start protecting before assert | |
2866 | // rt_flush_init_req_sys . | |
2867 | state_d = `WMR1_FLUSH_INIT_ACK; | |
2868 | end | |
2869 | ||
2870 | `WMR1_FLUSH_INIT_ACK: // 17'h0040 | |
2871 | begin // | |
2872 | rt_flush_init_req_sys = 1'b1; // Ask tcu to perform WMR 1 flush init. | |
2873 | ||
2874 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2875 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks, then stop clks. | |
2876 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks, then stop clks. | |
2877 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2878 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks, then stop clks. | |
2879 | rst_wmr_protect_sys= 1'b1; // Start protecting before assert | |
2880 | // rt_flush_init_req_sys . | |
2881 | if (tr_flush_init_ack_sys == 1'b1) | |
2882 | begin | |
2883 | if (ccu_rst_change_sys == 1'b1)// Reset PLL and CCU. | |
2884 | begin | |
2885 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2886 | end | |
2887 | state_d = `WMR1_PRE_PLL1; // tcu has finished WMR 1 flush init. | |
2888 | end | |
2889 | else | |
2890 | state_d = `WMR1_FLUSH_INIT_ACK; | |
2891 | end | |
2892 | ||
2893 | `WMR1_PRE_PLL1: // | |
2894 | begin // Time to cross domains before rst_ccu_. | |
2895 | rst_ccu_pll_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2896 | rst_ccu_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2897 | cluster_arst_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2898 | rst_rst_por_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2899 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2900 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
2901 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
2902 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2903 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2904 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
2905 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
2906 | if (ccu_rst_change_sys == 1'b1) // Reset PLL and CCU. | |
2907 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2908 | state_d = `WMR1_PRE_PLL2; | |
2909 | end | |
2910 | ||
2911 | `WMR1_PRE_PLL2: // | |
2912 | begin // Time to cross domains before rst_ccu_. | |
2913 | rst_ccu_pll_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2914 | rst_ccu_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2915 | cluster_arst_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2916 | rst_rst_por_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2917 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2918 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
2919 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
2920 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2921 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2922 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
2923 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
2924 | if (ccu_rst_change_sys == 1'b1) // Reset PLL and CCU. | |
2925 | begin | |
2926 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2927 | state_d = `WMR1_CCU_PLL; | |
2928 | end | |
2929 | else | |
2930 | state_d = `WMR1_PROP_TIME; // Skip reset of PLL and CCU. | |
2931 | end | |
2932 | ||
2933 | `WMR1_CCU_PLL: // 17'h000- | |
2934 | begin // Step 5.4.2: lock time. | |
2935 | rst_ccu_pll_sm_ = `ASSERT; // Reset PLL for PROP_TIME. | |
2936 | rst_ccu_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2937 | cluster_arst_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2938 | rst_rst_por_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2939 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2940 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
2941 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
2942 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2943 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2944 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
2945 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
2946 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2947 | ||
2948 | prop_count_run = 1'b1; // Allow PLL to reset for PROP_TIME. | |
2949 | if (prop_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2950 | state_d = `WMR1_LOCK_TIME; | |
2951 | else | |
2952 | state_d = `WMR1_CCU_PLL; | |
2953 | end | |
2954 | ||
2955 | `WMR1_LOCK_TIME: // 17'h0080 | |
2956 | begin // Step 5.4.2: lock time. | |
2957 | rst_ccu_pll_sm_ = `DEASSERT; // Release PLL from reset for LOCK_TIME. | |
2958 | rst_ccu_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2959 | cluster_arst_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2960 | rst_rst_por_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2961 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2962 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2963 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
2964 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2965 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2966 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2967 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
2968 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2969 | ||
2970 | lock_count_run = 1'b1; // PLL lock, + flush reset, for LOCK_TIME. | |
2971 | if (lock_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2972 | state_d = `WMR1_ARST_TIME; // | |
2973 | else | |
2974 | state_d = `WMR1_LOCK_TIME; | |
2975 | end | |
2976 | ||
2977 | `WMR1_ARST_TIME: // 17'h0080 | |
2978 | begin // Step 5.4.2: lock time. | |
2979 | rst_ccu_pll_sm_ = `DEASSERT; // Release PLL from reset for LOCK_TIME. | |
2980 | rst_ccu_sm_ = `DEASSERT; // Reset PLL for LOCK_TIME. | |
2981 | cluster_arst_sm_ = `ASSERT; // Reset PLL for LOCK_TIME. | |
2982 | rst_rst_por_sm_ = `ASSERT; // Sync reset of rst sync_en flops. | |
2983 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
2984 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2985 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
2986 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
2987 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
2988 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
2989 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
2990 | rst_tcu_clk_stop_sys=1'b1; // Protect tcu from clk while PLL resets. | |
2991 | ||
2992 | ccu_count_run = 1'b1; // Deassert rst_ccu_ before cluster_arst_l. | |
2993 | if (ccu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
2994 | begin | |
2995 | ccu_count_run = 1'b0; // Clear counter before use next cycle. | |
2996 | state_d = `WMR1_SYNC_STABLE; | |
2997 | end | |
2998 | else | |
2999 | state_d = `WMR1_ARST_TIME; | |
3000 | end | |
3001 | ||
3002 | `WMR1_SYNC_STABLE: // | |
3003 | begin // | |
3004 | rst_ccu_pll_sm_ = `DEASSERT; // Wait for ccu to say sync_en OK. | |
3005 | rst_ccu_sm_ = `DEASSERT; // Wait for ccu to say sync_en OK. | |
3006 | cluster_arst_sm_ = `DEASSERT; // Wait for ccu to say sync_en OK. | |
3007 | rst_rst_por_sm_ = `DEASSERT; // Wait for ccu to say sync_en OK. | |
3008 | //rst_rst_wmr_sm_ = `ASSERT; // Sync reset of rst sync_en flops, | |
3009 | // // since l2clk and iol2clk now running. | |
3010 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3011 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3012 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3013 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
3014 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3015 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3016 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
3017 | rst_tcu_clk_stop_sys=1'b0; // Expose tcu to clk now that PLL is stable. | |
3018 | ||
3019 | ccu_count_run = 1'b1; // Allow ccu_*_sync_en signals to settle. | |
3020 | if ( | |
3021 | //ccu_rst_sync_stable == 1'b1) // Wait for ccu to say sync_en OK. | |
3022 | ccu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3023 | // Cannot use ccu_rst_sync_stable | |
3024 | // because cannot cross clock domains | |
3025 | // because need to | |
3026 | // allow ccu_*_sync_en signals to settle. | |
3027 | state_d = `WMR1_FLUSH_STOP_ACK; | |
3028 | else | |
3029 | state_d = `WMR1_SYNC_STABLE; | |
3030 | end | |
3031 | ||
3032 | `WMR1_PROP_TIME: // Skip reset of PLL and CCU. | |
3033 | // (ccu_rst_change_sys == 1'b0) | |
3034 | begin // Step 5.4.2: lock time. | |
3035 | rst_ccu_pll_sm_ = `DEASSERT; // ccu_rst_change_sys == 0. | |
3036 | rst_ccu_sm_ = `DEASSERT; // ccu_rst_change_sys == 0. | |
3037 | cluster_arst_sm_ = `DEASSERT; // ccu_rst_change_sys == 0. | |
3038 | rst_rst_por_sm_ = `DEASSERT; // ccu_rst_change_sys == 0. | |
3039 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3040 | rst_l2_wmr_sys_ = `ASSERT; // Reset IP blocks after init_ack. | |
3041 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3042 | rst_niu_wmr_sm_ = `ASSERT; // Reset IP blocks after init_ack. | |
3043 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3044 | rst_dmu_peu_wmr_sm_= `ASSERT; // Reset IP blocks after init_ack. | |
3045 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
3046 | rst_tcu_clk_stop_sys=1'b0; // Expose tcu to clk now that PLL is stable. | |
3047 | ||
3048 | prop_count_run = 1'b1; // Allow flush reset for PROP_TIME. | |
3049 | if (prop_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3050 | state_d = `WMR1_FLUSH_STOP_ACK; | |
3051 | else | |
3052 | state_d = `WMR1_PROP_TIME; | |
3053 | end | |
3054 | ||
3055 | `WMR1_FLUSH_STOP_ACK: // | |
3056 | begin // Steps 1.4 and 5.4. | |
3057 | rt_flush_stop_req_sys = 1'b1; // Ask tcu to perform WMR 1 flush stop. | |
3058 | // Replace with tr_flush_stop_ack_sys . | |
3059 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3060 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3061 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3062 | rst_niu_wmr_sm_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3063 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3064 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3065 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
3066 | ||
3067 | if (tr_flush_stop_ack_sys == 1'b1) // | |
3068 | state_d = `WMR1_BISX_DONE ;// tcu has finished WMR 1 flush stop. | |
3069 | else | |
3070 | state_d = `WMR1_FLUSH_STOP_ACK; | |
3071 | end | |
3072 | ||
3073 | `WMR1_BISX_DONE: // | |
3074 | begin // | |
3075 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3076 | rst_l2_wmr_sys_ = `DEASSERT; // Release from reset during Bist 2. | |
3077 | rst_niu_wmr_sm_ = `DEASSERT; // Release from reset during Bist 2. | |
3078 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3079 | rst_dmu_peu_wmr_sm_= `DEASSERT; // Release from reset during Bist 2. | |
3080 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
3081 | ||
3082 | if (tcu_bisx_done_sys == 1'b1) // | |
3083 | state_d = `WMR2_FLUSH_INIT_ACK;// tcu has finished Bist 2. | |
3084 | else | |
3085 | state_d = `WMR1_BISX_DONE; | |
3086 | end | |
3087 | ||
3088 | `WMR2_FLUSH_INIT_ACK: // 17'h0040 | |
3089 | begin // | |
3090 | rt_flush_init_req_sys = 1'b1; // Ask tcu to perform WMR 2 flush init. | |
3091 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3092 | rst_l2_wmr_sys_ = `DEASSERT; // Stop clks, then reset IP blocks. | |
3093 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3094 | rst_niu_wmr_sm_ = `DEASSERT; // Hold IP blocks in reset until stop_ack. | |
3095 | rst_dmu_peu_por_sm_= `DEASSERT; // Stop clks, then reset IP blocks. | |
3096 | rst_dmu_peu_wmr_sm_= `DEASSERT; // Stop clks, then reset IP blocks. | |
3097 | rst_wmr_protect_sys= 1'b1; // Protect until tr_flush_init_ack_sys . | |
3098 | ||
3099 | if (tr_flush_init_ack_sys == 1'b1) // | |
3100 | state_d = `WMR2_PROP_TIME; // tcu has finished WMR 2 flush init. | |
3101 | else | |
3102 | state_d = `WMR2_FLUSH_INIT_ACK; | |
3103 | end | |
3104 | ||
3105 | `WMR2_PROP_TIME: // 17'h0080 | |
3106 | begin // Step 5.4.2: lock time. | |
3107 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3108 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3109 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3110 | rst_niu_wmr_sm_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3111 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3112 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3113 | rst_wmr_protect_sys= 1'b1; // Protect until tr_flush_init_ack_sys . | |
3114 | // (Review.) | |
3115 | ||
3116 | prop_count_run = 1'b1; // Allow deassertion of se to prop. | |
3117 | if (prop_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3118 | state_d = `WMR2_FLUSH_STOP_ACK; | |
3119 | else | |
3120 | state_d = `WMR2_PROP_TIME; | |
3121 | end | |
3122 | ||
3123 | `WMR2_FLUSH_STOP_ACK: // | |
3124 | begin // Steps 1.4 and 5.4. | |
3125 | rt_flush_stop_req_sys = 1'b1; // Ask tcu to perform WMR 1 flush stop. | |
3126 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3127 | rst_l2_wmr_sys_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3128 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3129 | rst_niu_wmr_sm_ = `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3130 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3131 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold IP blocks in reset until stop_ack. | |
3132 | rst_wmr_protect_sys= 1'b1; // Protect until tr_flush_init_ack_sys . | |
3133 | // (Review.) | |
3134 | ||
3135 | if (tr_flush_stop_ack_sys == 1'b1) // | |
3136 | // Replace with tr_flush_stop_ack_sys . | |
3137 | if (reset_gen_dbr_gen_q == 1'b1) | |
3138 | state_d = `WMR2_ASSERT_RUN ;// DBR same as WMR, but leave NIU running. | |
3139 | else | |
3140 | state_d = `WMR2_NIU_TIME ;// tcu has finished WMR 2 flush stop. | |
3141 | else | |
3142 | state_d = `WMR2_FLUSH_STOP_ACK; | |
3143 | end | |
3144 | ||
3145 | `WMR2_NIU_TIME : // | |
3146 | begin // | |
3147 | rst_l2_por_sys_ = `DEASSERT; // WMR, not POR. | |
3148 | rst_l2_wmr_sys_ = `ASSERT; // Hold in reset along with NIU. | |
3149 | rst_niu_mac_sm_ = assert_mac_during_wmr ? `ASSERT : `DEASSERT; | |
3150 | rst_niu_wmr_sm_ = `ASSERT; // Hold NIU in reset now that clocks run. | |
3151 | rst_dmu_peu_por_sm_= `DEASSERT; // WMR, not POR. | |
3152 | rst_dmu_peu_wmr_sm_= `ASSERT; // Hold in reset along with NIU. | |
3153 | rst_wmr_protect_sys= 1'b1; // Protect during WMR. | |
3154 | ||
3155 | niu_count_run = 1'b1; // Allow mac in niu to reset now clocks run. | |
3156 | if (niu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3157 | state_d = `WMR2_ASSERT_RUN ; | |
3158 | else | |
3159 | state_d = `WMR2_NIU_TIME; | |
3160 | end | |
3161 | ||
3162 | `WMR2_ASSERT_RUN: // | |
3163 | begin // Steps 1.4 and 5.4. | |
3164 | rst_ncu_unpark_thread_sys = 1'b1;// Hold for 2 cycles to catch a sync_en. | |
3165 | state_d = `WMR2_UNPARK_THREAD; | |
3166 | end | |
3167 | ||
3168 | `WMR2_UNPARK_THREAD: // 17'h0008 | |
3169 | begin // Step 5.4.8. | |
3170 | rst_ncu_unpark_thread_sys = 1'b1;// Hold for 2 cycles to catch a sync_en. | |
3171 | if (reset_gen_wmr_gen_q == 1'b1) | |
3172 | rst_WMR_done = 1'b1;// WMR done. Clear WMR_GEN bit. | |
3173 | if (reset_gen_dbr_gen_q == 1'b1) | |
3174 | rst_DBR_done = 1'b1;// DBR done. Clear DBR_GEN bit. | |
3175 | state_d = `RST_ARBITER; | |
3176 | end | |
3177 | ||
3178 | `RST_ARBITER: | |
3179 | begin | |
3180 | rst_ncu_unpark_thread_sys = 1'b1; | |
3181 | rst_assert_ssi_sync_din = 1'b1; // Set on return to RST_ARBITER. | |
3182 | rst_assert_ssi_sync_en = 1'b1; // Set on return to RST_ARBITER. | |
3183 | if ( rst_fatal_or == 1'b1) // ncu | l2t0 | ... | l2t7 | |
3184 | begin | |
3185 | rst_assert_ssi_sync_din = 1'b0; // Until return to RST_ARBITER. | |
3186 | rset_stat_wmr_set = 1'b1; // Set WMR bit in RSET_STAT | |
3187 | // and clear RESET_FEE. | |
3188 | state_d = `WMR1_WMR_GEN; | |
3189 | end | |
3190 | else | |
3191 | if ((reset_gen_wmr_gen_q == 1'b1 ) | | |
3192 | (mio_rst_pb_rst_sys3_== `ASSERT) )// Review May01'05. | |
3193 | // No need to debounce PB_RST_L. | |
3194 | // FPGA will send it debounced. | |
3195 | begin | |
3196 | rst_assert_ssi_sync_din = 1'b0; // Until return to RST_ARBITER. | |
3197 | rset_stat_wmr_set = 1'b1; // Set WMR bit in RSET_STAT | |
3198 | // and clear RESET_FEE. | |
3199 | if (mio_rst_pb_rst_sys3_== `ASSERT) | |
3200 | reset_source_pb_rst_set = 1'b1; // Set PB_RST bit in RESET_SOURCE. | |
3201 | state_d = `WMR1_WMR_GEN; | |
3202 | end | |
3203 | else | |
3204 | if (reset_gen_dbr_gen_q == 1'b1 ) | |
3205 | begin | |
3206 | rst_assert_ssi_sync_din = 1'b0; // Until return to RST_ARBITER. | |
3207 | rset_stat_wmr_set = 1'b1; // Set WMR bit in RSET_STAT | |
3208 | // (Review Aug 3 '05) | |
3209 | // Set DBR bit in RSET_STAT? | |
3210 | // and clear RESET_FEE. | |
3211 | state_d = `WMR1_WMR_GEN; | |
3212 | end | |
3213 | else | |
3214 | state_d = `RST_ARBITER; | |
3215 | end | |
3216 | ||
3217 | default: // This clause sets all state machine outputs to unknown. | |
3218 | begin // | |
3219 | lock_count_run = 1'b0; // Unknown. | |
3220 | prop_count_run = 1'b0; // Unknown. | |
3221 | niu_count_run = 1'b0; // Unknown. | |
3222 | ccu_count_run = 1'b0; // Unknown. | |
3223 | ||
3224 | rst_ccu_pll_sm_ = 1'b0; // Unknown. | |
3225 | rst_ccu_sm_ = 1'b0; // Unknown. | |
3226 | cluster_arst_sm_ = 1'b0; // Unknown. | |
3227 | rst_rst_por_sm_ = 1'b0; // Unknown. | |
3228 | rst_l2_por_sys_ = 1'b0; // Unknown. | |
3229 | rst_l2_wmr_sys_ = 1'b0; // Unknown. | |
3230 | rst_niu_mac_sm_ = 1'b0; // Unknown. | |
3231 | rst_niu_wmr_sm_ = 1'b0; // Unknown. | |
3232 | rst_dmu_async_por_sm_ = 1'b0; // Unknown. | |
3233 | rst_dmu_peu_por_sm_ = 1'b0; // Unknown. | |
3234 | rst_dmu_peu_wmr_sm_ = 1'b0; // Unknown. | |
3235 | rst_wmr_protect_sys = 1'b0; // Unknown. | |
3236 | rst_tcu_clk_stop_sys = 1'b0; // Unknown. | |
3237 | ||
3238 | rst_ncu_unpark_thread_sys = 1'b0; // Unknown. | |
3239 | rt_flush_init_req_sys = 1'b0; // Unknown. | |
3240 | rt_flush_stop_req_sys = 1'b0; // Unknown. | |
3241 | rt_asicflush_stop_req_sys = 1'b0; // Unknown. | |
3242 | rst_WMR_done = 1'b0; // Unknown. | |
3243 | rst_DBR_done = 1'b0; // Unknown. | |
3244 | rst_assert_ssi_sync_en = 1'b0; // Unknown. | |
3245 | rst_assert_ssi_sync_din = 1'b0; // Unknown. | |
3246 | rset_stat_wmr_set = 1'b0; // Unknown. | |
3247 | reset_source_pb_rst_set = 1'b0; // Unknown. | |
3248 | ||
3249 | state_d = `RST_FSM_WIDTH'b0; // Unknown. | |
3250 | ||
3251 | // // copied the following from dmu_imu_rds_msi_addr_decode.v: | |
3252 | // // vlint flag_system_call off | |
3253 | // // synopsys translate_off | |
3254 | // if(daemon_csrbus_valid) | |
3255 | // begin // axis tbcall_region | |
3256 | // `PR_ERROR( | |
3257 | // "rst_fsm_ctl", | |
3258 | // `MON_ERROR, | |
3259 | // "ERROR: case (state_q) in module rst_fsm_ctl entered default: case."); | |
3260 | // end // end of tbcall_region | |
3261 | // // synopsys translate_on | |
3262 | // // vlint flag_system_call on | |
3263 | ||
3264 | end | |
3265 | ||
3266 | // default: // This clause mollifies the following vlint error: | |
3267 | // begin // flag_not_all_case_items_are_specified (1) : (state_q) | |
3268 | // end // missing pattern: 00000000000000000000 | |
3269 | // // Instead, this clause induces the following vlint error: | |
3270 | //*********************************************************************** | |
3271 | // flag_empty_block (1) | |
3272 | //*********************************************************************** | |
3273 | ||
3274 | // *** EMPTY BLOCK ... | |
3275 | // in module: rst_fsm_ctl | |
3276 | // in line 597754 of file | |
3277 | // /import/n2-svl-regress10/vlint_run/fc8/v.fc8/fc/rel-0.1/sunvDir/cpu.v | |
3278 | ||
3279 | endcase | |
3280 | end | |
3281 | //________________________________________________________________ | |
3282 | // | |
3283 | // end of reset sequence state_q state machine (always block) | |
3284 | //________________________________________________________________ | |
3285 | ||
3286 | reg [1:0] xir_state_d; // Next state. | |
3287 | wire [1:0] xir_state_d_phy = {xir_state_d [1], // Reset to 1. | |
3288 | ~xir_state_d [0] }; | |
3289 | wire [1:0] xir_state_q_phy; // Current state. | |
3290 | wire [1:0] xir_state_q = {xir_state_q_phy[1], // Reset to 1. | |
3291 | ~xir_state_q_phy[0] }; | |
3292 | //________________________________________________________________ | |
3293 | // | |
3294 | // xir_state_q state machine (always block) | |
3295 | //________________________________________________________________ | |
3296 | ||
3297 | always @( | |
3298 | xir_state_q or | |
3299 | state_q or | |
3300 | reset_gen_xir_gen_q or | |
3301 | mio_rst_button_xir_sys_ or | |
3302 | ncu_rst_xir_done_sys2 ) | |
3303 | begin // Reset sequence state machine | |
3304 | rst_ncu_xir_sys_ = `DEASSERT; // Default value. | |
3305 | reset_source_pb_xir_set = 1'b0; // Default value. | |
3306 | reset_source_xir_gen_set = 1'b0; // Default value. | |
3307 | reset_gen_xir_gen_clr = 1'b0; // Default value. | |
3308 | xir_state_d = `XIR_IDLE; // Default value. | |
3309 | ||
3310 | case (xir_state_q) // synopsys parallel_case | |
3311 | // syn-op-sys full_case not applicable since one-hot. | |
3312 | /* 0in case | |
3313 | -parallel | |
3314 | -default | |
3315 | -active (mio_rst_pwron_rst_l === 1'b1) | |
3316 | -message "XIR Reset Unit state machine case bad." | |
3317 | */ | |
3318 | ||
3319 | `XIR_IDLE: // Look for mio_rst_button_xir_sys_. | |
3320 | begin // No need to debounce BUTTON_XIR_L. | |
3321 | // FPGA will send it debounced. | |
3322 | if ( ((mio_rst_button_xir_sys_== `ASSERT) | | |
3323 | (reset_gen_xir_gen_q == 1'b1 ) ) & | |
3324 | ( state_q == `RST_ARBITER) )// XIR has lowest priority. | |
3325 | begin | |
3326 | rst_ncu_xir_sys_ = `ASSERT; | |
3327 | if (mio_rst_button_xir_sys_== `ASSERT) | |
3328 | reset_source_pb_xir_set = 1'b1;// Set PB_XIR bit in RESET_SOURCE. | |
3329 | else | |
3330 | reset_source_xir_gen_set = 1'b1;// Set XIR_GEN bit in RESET_SOURCE. | |
3331 | xir_state_d = `XIR_DONE;// Wait for NCU to finish XIR. | |
3332 | end | |
3333 | else | |
3334 | begin | |
3335 | rst_ncu_xir_sys_ = `DEASSERT; | |
3336 | xir_state_d = `XIR_IDLE;// Look for mio_rst_button_xir_sys_. | |
3337 | end | |
3338 | end | |
3339 | ||
3340 | `XIR_DONE: // Wait for NCU to finish XIR. | |
3341 | begin | |
3342 | if ( (ncu_rst_xir_done_sys2 == 1'b1 ) | | |
3343 | (state_q != `RST_ARBITER) ) // XIR has lowest priority. | |
3344 | begin | |
3345 | // reset_gen_xir_gen_en and | |
3346 | // reset_gen_xir_gen_din logic depends on | |
3347 | // ncu_rst_xir_done_sys2. | |
3348 | rst_ncu_xir_sys_ = `DEASSERT; | |
3349 | reset_gen_xir_gen_clr = 1'b1;// Clear XIR_GEN bit in RESET_GEN | |
3350 | // (even if we're servicing a BUTTON_XIR). | |
3351 | xir_state_d = `XIR_IDLE;// NCU has finished XIR. | |
3352 | end | |
3353 | else | |
3354 | begin | |
3355 | rst_ncu_xir_sys_ = `ASSERT; | |
3356 | xir_state_d = `XIR_DONE;// Wait for NCU to finish XIR. | |
3357 | end | |
3358 | end | |
3359 | ||
3360 | default: // This clause sets all state machine outputs to unknown. | |
3361 | begin // | |
3362 | rst_ncu_xir_sys_ = 1'b0; // Unknown. | |
3363 | reset_source_pb_xir_set = 1'b0; // Unknown. | |
3364 | reset_source_xir_gen_set = 1'b0; // Unknown. | |
3365 | reset_gen_xir_gen_clr = 1'b0; // Unknown. | |
3366 | xir_state_d = 2'b0; // Unknown. | |
3367 | ||
3368 | // // copied the following from dmu_imu_rds_msi_addr_decode.v: | |
3369 | // // vlint flag_system_call off | |
3370 | // // synopsys translate_off | |
3371 | // if(daemon_csrbus_valid) | |
3372 | // begin // axis tbcall_region | |
3373 | // `PR_ERROR( | |
3374 | // "rst_fsm_ctl", | |
3375 | // `MON_ERROR, | |
3376 | // "ERROR: State machine state_q for module rst_fsm_ctl is bad."); | |
3377 | // end // end of tbcall_region | |
3378 | // // synopsys translate_on | |
3379 | // // vlint flag_system_call on | |
3380 | ||
3381 | end | |
3382 | ||
3383 | endcase | |
3384 | end | |
3385 | //________________________________________________________________ | |
3386 | // | |
3387 | // end of xir_state_q state machine (always block) | |
3388 | //________________________________________________________________ | |
3389 | ||
3390 | reg [2:0] dmu_state_d; // Next state. | |
3391 | wire [2:0] dmu_state_d_phy = {dmu_state_d [2:1], // Reset to 1. | |
3392 | ~dmu_state_d [ 0] }; | |
3393 | wire [2:0] dmu_state_q_phy; // Current state. | |
3394 | wire [2:0] dmu_state_q = {dmu_state_q_phy[2:1], // Reset to 1. | |
3395 | ~dmu_state_q_phy[ 0] }; | |
3396 | //________________________________________________________________ | |
3397 | // | |
3398 | // dmu_state_q state machine (always block) | |
3399 | //________________________________________________________________ | |
3400 | ||
3401 | always @( | |
3402 | dmu_state_q or | |
3403 | state_q or | |
3404 | ssys_reset_dmu_q or | |
3405 | niu_count_q ) // Use 8 us niu counter twice: 15 <= 8+8 us. | |
3406 | begin // Reset sequence state machine | |
3407 | ||
3408 | niu_count_run_dmu_sm = 1'b0; // Default value. | |
3409 | ssys_reset_dmu_clr = 1'b0; // Default value. | |
3410 | rst_dmu_ssys_sm_ = `DEASSERT; // Default value. | |
3411 | dmu_state_d = `DMU_IDLE; // Default value. | |
3412 | ||
3413 | case (dmu_state_q) // synopsys parallel_case | |
3414 | // syn-op-sys full_case not applicable since one-hot. | |
3415 | /* 0in case | |
3416 | -parallel | |
3417 | -default | |
3418 | -active (mio_rst_pwron_rst_l === 1'b1) | |
3419 | -message "DMU Reset Unit state machine case bad." | |
3420 | */ | |
3421 | ||
3422 | `DMU_IDLE: // Look for DMU_PEU bit of SSYS_RESET | |
3423 | begin | |
3424 | if ( (ssys_reset_dmu_q ) & // DMU_PEU bit of SSYS_RESET | |
3425 | (state_q == `RST_ARBITER) ) // DMU-PEU has lowest priority. | |
3426 | begin | |
3427 | rst_dmu_ssys_sm_ = `ASSERT; | |
3428 | dmu_state_d = `DMU_TIME1;// Give DMU time to reset. | |
3429 | end | |
3430 | else | |
3431 | begin | |
3432 | rst_dmu_ssys_sm_ = `DEASSERT; | |
3433 | dmu_state_d = `DMU_IDLE; // Look for DMU_PEU bit of SSYS_RESET. | |
3434 | end | |
3435 | end | |
3436 | ||
3437 | `DMU_TIME1: // Give DMU time to reset, part 1. | |
3438 | begin | |
3439 | if (state_q != `RST_ARBITER) // DMU has lowest priority. | |
3440 | begin | |
3441 | rst_dmu_ssys_sm_ = `DEASSERT; | |
3442 | dmu_state_d = `DMU_IDLE;// Another, higher-priority | |
3443 | end // reset has occurred. | |
3444 | else | |
3445 | begin | |
3446 | rst_dmu_ssys_sm_ = `ASSERT; | |
3447 | ||
3448 | niu_count_run_dmu_sm = 1'b1; // Allow dmu to reset. | |
3449 | if (niu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3450 | begin | |
3451 | niu_count_run_dmu_sm = 1'b0; // Get counter ready for another go. | |
3452 | dmu_state_d = `DMU_TIME2;// Give DMU time to reset, part 2. | |
3453 | end | |
3454 | else | |
3455 | dmu_state_d = `DMU_TIME1;// Give DMU time to reset, part 1. | |
3456 | end | |
3457 | end | |
3458 | ||
3459 | `DMU_TIME2: // Give DMU time to reset, part 2. | |
3460 | begin | |
3461 | if (state_q != `RST_ARBITER) // DMU has lowest priority. | |
3462 | begin | |
3463 | rst_dmu_ssys_sm_ = `DEASSERT; | |
3464 | dmu_state_d = `DMU_IDLE; // Another, higher-priority | |
3465 | end // reset has occurred. | |
3466 | else | |
3467 | begin | |
3468 | rst_dmu_ssys_sm_ = `ASSERT; | |
3469 | ||
3470 | niu_count_run_dmu_sm = 1'b1; // Allow dmu to reset. | |
3471 | if (niu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3472 | begin | |
3473 | ssys_reset_dmu_clr = 1'b1; // Clear DMU_PEU bit of | |
3474 | // SSYS_RESET register | |
3475 | dmu_state_d = `DMU_IDLE; // DMU done resetting. | |
3476 | end | |
3477 | else | |
3478 | dmu_state_d = `DMU_TIME2;// Give DMU time to reset, part 2. | |
3479 | end | |
3480 | end | |
3481 | ||
3482 | default: // This clause sets all state machine outputs to unknown. | |
3483 | begin // | |
3484 | rst_dmu_ssys_sm_ = 1'b0; // Unknown. | |
3485 | ssys_reset_dmu_clr = 1'b0; // Unknown. | |
3486 | niu_count_run_dmu_sm = 1'b0; // Unknown. | |
3487 | dmu_state_d = 3'b0; // Unknown. | |
3488 | ||
3489 | // // copied the following from dmu_imu_rds_msi_addr_decode.v: | |
3490 | // // vlint flag_system_call off | |
3491 | // // synopsys translate_off | |
3492 | // if(daemon_csrbus_valid) | |
3493 | // begin // axis tbcall_region | |
3494 | // `PR_ERROR( | |
3495 | // "rst_fsm_ctl", | |
3496 | // `MON_ERROR, | |
3497 | // "ERROR: case (dmu_state_q) in module rst_fsm_ctl entered default: case."); | |
3498 | // end // end of tbcall_region | |
3499 | // // synopsys translate_on | |
3500 | // // vlint flag_system_call on | |
3501 | ||
3502 | end | |
3503 | ||
3504 | endcase | |
3505 | end | |
3506 | //________________________________________________________________ | |
3507 | // | |
3508 | // end of dmu_state_q state machine (always block) | |
3509 | //________________________________________________________________ | |
3510 | ||
3511 | reg [1:0] niu_state_d; // Next state. | |
3512 | wire [1:0] niu_state_d_phy = {niu_state_d [ 1], // Reset to 1. | |
3513 | ~niu_state_d [ 0] }; | |
3514 | wire [1:0] niu_state_q_phy; // Current state. | |
3515 | wire [1:0] niu_state_q = {niu_state_q_phy[ 1], // Reset to 1. | |
3516 | ~niu_state_q_phy[ 0] }; | |
3517 | //________________________________________________________________ | |
3518 | // | |
3519 | // niu_state_q state machine (always block) | |
3520 | //________________________________________________________________ | |
3521 | ||
3522 | always @( | |
3523 | niu_state_q or | |
3524 | state_q or | |
3525 | ssys_reset_niu_q or | |
3526 | niu_count_q ) // Re-use 8 us niu counter: 4 us <= 8 us. | |
3527 | begin // Reset sequence state machine | |
3528 | ||
3529 | niu_count_run_niu_sm = 1'b0; // Default value. | |
3530 | ssys_reset_niu_clr = 1'b0; // Default value. | |
3531 | rst_niu_ssys_sm_ = `DEASSERT; // Default value. | |
3532 | niu_state_d = `NIU_IDLE; // Default value. | |
3533 | ||
3534 | case (niu_state_q) // synopsys parallel_case | |
3535 | // syn-op-sys full_case not applicable since one-hot. | |
3536 | /* 0in case | |
3537 | -parallel | |
3538 | -default | |
3539 | -active (mio_rst_pwron_rst_l === 1'b1) | |
3540 | -message "NIU Reset Unit state machine case bad." | |
3541 | */ | |
3542 | ||
3543 | `NIU_IDLE: // Look for NIU bit of SSYS_RESET | |
3544 | begin | |
3545 | if ( (ssys_reset_niu_q ) & // NIU bit of SSYS_RESET | |
3546 | (state_q == `RST_ARBITER) ) // NIU has lowest priority. | |
3547 | begin | |
3548 | rst_niu_ssys_sm_ = `ASSERT; | |
3549 | niu_state_d = `NIU_TIME; // Give DMU time to reset. | |
3550 | end | |
3551 | else | |
3552 | begin | |
3553 | rst_niu_ssys_sm_ = `DEASSERT; | |
3554 | niu_state_d = `NIU_IDLE; // Look for NIU bit of SSYS_RESET. | |
3555 | end | |
3556 | end | |
3557 | ||
3558 | `NIU_TIME: // Give DMU time to reset, part 2. | |
3559 | begin | |
3560 | if (state_q != `RST_ARBITER) // DMU has lowest priority. | |
3561 | begin | |
3562 | rst_niu_ssys_sm_ = `DEASSERT; | |
3563 | niu_state_d = `NIU_IDLE; // Another, higher-priority | |
3564 | end // reset has occurred. | |
3565 | else | |
3566 | begin | |
3567 | rst_niu_ssys_sm_ = `ASSERT; | |
3568 | ||
3569 | niu_count_run_niu_sm = 1'b1; // Allow dmu to reset. | |
3570 | if (niu_count_q[`RST_TIME_WIDTH-1:0] == `RST_TIME_WIDTH'b0) | |
3571 | begin | |
3572 | ssys_reset_niu_clr = 1'b1; // Clear NIU bit of SSY_RESET. | |
3573 | niu_state_d = `NIU_IDLE; // DMU done resetting. | |
3574 | end | |
3575 | else | |
3576 | niu_state_d = `NIU_TIME; // Give DMU time to reset, part 2. | |
3577 | end | |
3578 | end | |
3579 | ||
3580 | default: // This clause sets all state machine outputs to unknown. | |
3581 | begin // | |
3582 | rst_niu_ssys_sm_ = 1'b0; // Unknown. | |
3583 | ssys_reset_niu_clr = 1'b0; // Unknown. | |
3584 | niu_count_run_niu_sm = 1'b0; // Unknown. | |
3585 | niu_state_d = 2'b0; // Unknown. | |
3586 | ||
3587 | // // copied the following from dmu_imu_rds_msi_addr_decode.v: | |
3588 | // // vlint flag_system_call off | |
3589 | // // synopsys translate_off | |
3590 | // if(daemon_csrbus_valid) | |
3591 | // begin // axis tbcall_region | |
3592 | // `PR_ERROR( | |
3593 | // "rst_fsm_ctl", | |
3594 | // `MON_ERROR, | |
3595 | // "ERROR: case (niu_state_q) in module rst_fsm_ctl entered default: case."); | |
3596 | // end // end of tbcall_region | |
3597 | // // synopsys translate_on | |
3598 | // // vlint flag_system_call on | |
3599 | ||
3600 | end | |
3601 | ||
3602 | endcase | |
3603 | end | |
3604 | //________________________________________________________________ | |
3605 | // | |
3606 | // end of niu_state_q state machine (always block) | |
3607 | //________________________________________________________________ | |
3608 | ||
3609 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_33 state_ff | |
3610 | (.din (state_d_phy[`RST_FSM_WIDTH-1:0]), | |
3611 | .scan_in (state_ff_scanin ), | |
3612 | .scan_out(state_ff_scanout), | |
3613 | .clr_ (mio_rst_pwron_rst_sys_), | |
3614 | .l1clk (l1clk ), | |
3615 | .dout (state_q_phy[`RST_FSM_WIDTH-1:0]), | |
3616 | .siclk(siclk), | |
3617 | .soclk(soclk)); | |
3618 | ||
3619 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_2 xir_state_ff | |
3620 | (.din (xir_state_d_phy[1:0]), | |
3621 | .scan_in (xir_state_ff_scanin ), | |
3622 | .scan_out(xir_state_ff_scanout), | |
3623 | .clr_ (mio_rst_pwron_rst_sys_), | |
3624 | .l1clk (l1clk ), | |
3625 | .dout (xir_state_q_phy[1:0]), | |
3626 | .siclk(siclk), | |
3627 | .soclk(soclk)); | |
3628 | ||
3629 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_3 dmu_state_ff | |
3630 | (.din (dmu_state_d_phy[2:0]), | |
3631 | .scan_in (dmu_state_ff_scanin ), | |
3632 | .scan_out(dmu_state_ff_scanout), | |
3633 | .clr_ (mio_rst_pwron_rst_sys_), | |
3634 | .l1clk (l1clk ), | |
3635 | .dout (dmu_state_q_phy[2:0]), | |
3636 | .siclk(siclk), | |
3637 | .soclk(soclk)); | |
3638 | ||
3639 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_2 niu_state_ff | |
3640 | (.din (niu_state_d_phy[1:0]), | |
3641 | .scan_in (niu_state_ff_scanin ), | |
3642 | .scan_out(niu_state_ff_scanout), | |
3643 | .clr_ (mio_rst_pwron_rst_sys_), | |
3644 | .l1clk (l1clk ), | |
3645 | .dout (niu_state_q_phy[1:0]), | |
3646 | .siclk(siclk), | |
3647 | .soclk(soclk)); | |
3648 | //________________________________________________________________ | |
3649 | ||
3650 | always @(state_q) | |
3651 | begin | |
3652 | case (state_q) // synopsys parallel_case | |
3653 | // syn-op-sys full_case not applicable since one-hot. | |
3654 | /* 0in case | |
3655 | -parallel | |
3656 | -default | |
3657 | -active (mio_rst_pwron_rst_l === 1'b1) | |
3658 | -message | |
3659 | "rst_mio_rst_state Reset Unit state machine case bad." | |
3660 | */ | |
3661 | ||
3662 | // Should never see: | |
3663 | `RST_FSM_WIDTH'h0 : rst_mio_rst_state[5:0] = 6'd63;//33'h0_0000_0000 No | |
3664 | `RST_INIT_STATE : rst_mio_rst_state[5:0] = 6'd00;//33'h0_0000_0001 | |
3665 | `POR1_LOCK_TIME : rst_mio_rst_state[5:0] = 6'd01;//33'h0_0000_0002 | |
3666 | `POR1_ARST_TIME : rst_mio_rst_state[5:0] = 6'd02;//33'h0_0000_0004 | |
3667 | `POR1_SYNC_STABLE : rst_mio_rst_state[5:0] = 6'd03;//33'h0_0000_0008 | |
3668 | `POR1_ASICFLUSH_STOP_ACK: rst_mio_rst_state[5:0] = 6'd04;//33'h0_0000_0010 | |
3669 | `POR1_NIU_TIME : rst_mio_rst_state[5:0] = 6'd05;//33'h0_0000_0020 | |
3670 | `POR1_FLUSH_STOP_ACK : rst_mio_rst_state[5:0] = 6'd06;//33'h0_0000_0040 | |
3671 | `POR1_BISX_DONE : rst_mio_rst_state[5:0] = 6'd07;//33'h0_0000_0080 | |
3672 | `POR2_FLUSH_INIT_ACK : rst_mio_rst_state[5:0] = 6'd08;//33'h0_0000_0100 | |
3673 | `POR2_LOCK_TIME : rst_mio_rst_state[5:0] = 6'd09;//33'h0_0000_0200 | |
3674 | `POR2_FLUSH_STOP_ACK : rst_mio_rst_state[5:0] = 6'd10;//33'h0_0000_0400 | |
3675 | `POR2_EFU_DONE : rst_mio_rst_state[5:0] = 6'd11;//33'h0_0000_0800 | |
3676 | `POR2_ASSERT_RUN : rst_mio_rst_state[5:0] = 6'd12;//33'h0_0000_1000 | |
3677 | `POR2_UNPARK_THREAD : rst_mio_rst_state[5:0] = 6'd13;//33'h0_0000_2000 | |
3678 | `WMR1_WMR_GEN : rst_mio_rst_state[5:0] = 6'd14;//33'h0_0000_4000 | |
3679 | `WMR1_DEASSERT_RUN : rst_mio_rst_state[5:0] = 6'd15;//33'h0_0000_8000 | |
3680 | `WMR1_FLUSH_INIT_ACK : rst_mio_rst_state[5:0] = 6'd16;//33'h0_0001_0000 | |
3681 | `WMR1_PRE_PLL1 : rst_mio_rst_state[5:0] = 6'd17;//33'h0_0002_0000 | |
3682 | `WMR1_PRE_PLL2 : rst_mio_rst_state[5:0] = 6'd18;//33'h0_0004_0000 | |
3683 | `WMR1_CCU_PLL : rst_mio_rst_state[5:0] = 6'd19;//33'h0_0008_0000 | |
3684 | `WMR1_LOCK_TIME : rst_mio_rst_state[5:0] = 6'd20;//33'h0_0010_0000 | |
3685 | `WMR1_ARST_TIME : rst_mio_rst_state[5:0] = 6'd21;//33'h0_0020_0000 | |
3686 | `WMR1_PROP_TIME : rst_mio_rst_state[5:0] = 6'd22;//33'h0_0040_0000 | |
3687 | `WMR1_SYNC_STABLE : rst_mio_rst_state[5:0] = 6'd23;//33'h0_0080_0000 | |
3688 | `WMR1_FLUSH_STOP_ACK : rst_mio_rst_state[5:0] = 6'd24;//33'h0_0100_0000 | |
3689 | `WMR1_BISX_DONE : rst_mio_rst_state[5:0] = 6'd25;//33'h0_0200_0000 | |
3690 | `WMR2_FLUSH_INIT_ACK : rst_mio_rst_state[5:0] = 6'd26;//33'h0_0400_0000 | |
3691 | `WMR2_PROP_TIME : rst_mio_rst_state[5:0] = 6'd27;//33'h0_0800_0000 | |
3692 | `WMR2_FLUSH_STOP_ACK : rst_mio_rst_state[5:0] = 6'd28;//33'h0_1000_0000 | |
3693 | `WMR2_NIU_TIME : rst_mio_rst_state[5:0] = 6'd32;//33'h1_1000_0000 | |
3694 | `WMR2_ASSERT_RUN : rst_mio_rst_state[5:0] = 6'd29;//33'h0_2000_0000 | |
3695 | `WMR2_UNPARK_THREAD : rst_mio_rst_state[5:0] = 6'd30;//33'h0_4000_0000 | |
3696 | `RST_ARBITER : rst_mio_rst_state[5:0] = 6'd31;//33'h0_8000_0000 | |
3697 | default : // Should never see: | |
3698 | begin rst_mio_rst_state[5:0] = 6'd62;//33'hx_xxxx_xxxx No | |
3699 | ||
3700 | // // copied the following from dmu_imu_rds_msi_addr_decode.v: | |
3701 | // // vlint flag_system_call off | |
3702 | // // synopsys translate_off | |
3703 | // if(daemon_csrbus_valid) | |
3704 | // begin // axis tbcall_region | |
3705 | // `PR_ERROR( | |
3706 | // "rst_fsm_ctl", | |
3707 | // `MON_ERROR, | |
3708 | // "ERROR: case (state_q) for rst_mio_rst_state[5:0] in module rst_fsm_ctl entered default: case."); | |
3709 | // end // end of tbcall_region | |
3710 | // // synopsys translate_on | |
3711 | // // vlint flag_system_call on | |
3712 | ||
3713 | end | |
3714 | ||
3715 | //default: // This clause mollifies the following vlint error: | |
3716 | //begin // flag_not_all_case_items_are_specified (1) : (state_q) | |
3717 | //end // missing pattern: 00000000000000000000 | |
3718 | // Instead, this clause induces the following vlint error: | |
3719 | //*********************************************************************** | |
3720 | // flag_empty_block (1) | |
3721 | //*********************************************************************** | |
3722 | ||
3723 | // *** EMPTY BLOCK ... | |
3724 | // in module: rst_fsm_ctl | |
3725 | // in line 597754 of file | |
3726 | // /import/n2-svl-regress10/vlint_run/fc8/v.fc8/fc/rel-0.1/sunvDir/cpu.v | |
3727 | endcase | |
3728 | ||
3729 | end // Reset Unit state output to debug port (always block) | |
3730 | ||
3731 | //________________________________________________________________ | |
3732 | // | |
3733 | // Output mux | |
3734 | //________________________________________________________________ | |
3735 | ||
3736 | assign data_out_sys[`RST_UCB_DATA_WIDTH-1:0] = | |
3737 | ||
3738 | reset_gen_addr ?{12'b0,reset_gen_q [ 3:0] }:// RESET_GEN | |
3739 | reset_source_addr?{ reset_source_q[ 15:0] }:// RESET_SOURCE | |
3740 | ssys_reset_addr ?{ 9'b0,ssys_reset_q [ 6:0] }:// SSYS_RESET | |
3741 | rset_stat_addr ?{ 4'b0,rset_stat_q [ 11:0] }:// RSET_STAT | |
3742 | lock_time_addr ?{ lock_time_q [`RST_TIME_WIDTH-1:0] }:// LOCK_TIME | |
3743 | prop_time_addr ?{ prop_time_q [`RST_TIME_WIDTH-1:0] }:// PROP_TIME | |
3744 | niu_time_addr ?{ niu_time_q [`RST_TIME_WIDTH-1:0] }:// NIU_TIME | |
3745 | ccu_time_addr ?{ ccu_time_q [`RST_TIME_WIDTH-1:0] }:// CCU_TIME | |
3746 | reset_fee_addr ?{ reset_fee_q [ 7:0], // RESET_FEE | |
3747 | 8'b0 }:// RESET_FEE | |
3748 | `RST_UCB_DATA_WIDTH'b0 ;// (default) | |
3749 | ||
3750 | wire iob_creg_addr = | |
3751 | ( | |
3752 | reset_gen_addr | // RESET_GEN | |
3753 | reset_source_addr | // RESET_SOURCE | |
3754 | ssys_reset_addr | // SSYS_RESET | |
3755 | rset_stat_addr | // RSET_STAT | |
3756 | lock_time_addr | // LOCK_TIME | |
3757 | prop_time_addr | // PROP_TIME | |
3758 | niu_time_addr | // NIU_TIME | |
3759 | ccu_time_addr | // CCU_TIME | |
3760 | reset_fee_addr // RESET_FEE | |
3761 | ); | |
3762 | ||
3763 | // "UCB Interface document", Jan 6 '04, page 3: | |
3764 | // | |
3765 | // CSR Write case: ... | |
3766 | // | |
3767 | // Write command to invalid address should be discarded silently. | |
3768 | // | |
3769 | // CSR read case: ... | |
3770 | // | |
3771 | // In the case of an unsuccessful read, CSR Register Block | |
3772 | // asserts the signal "rd_nack_vld" along with the | |
3773 | // "thr_id_out[5:0]" and | |
3774 | // "buf_id_out[1:0]" signals which came from the read message. | |
3775 | // | |
3776 | // | |
3777 | // In the case of ack_busy_sys2 signal is asserted, CSR Register | |
3778 | // Block should not assert rd_ack_vld or rd_nack_vld until | |
3779 | // ack_busy_sys2 signal is de-asserted. | |
3780 | ||
3781 | wire rd_ack_vld_din = rd_req_vld_trunc & iob_creg_addr & | |
3782 | rst_rst_wmr_sys_ & //BP 8-22-05 | |
3783 | ~ack_busy_sys2 & | |
3784 | ~rd_ack_vld_sys; | |
3785 | ||
3786 | wire rd_nack_vld_din = rd_req_vld_trunc & ~iob_creg_addr & | |
3787 | rst_rst_wmr_sys_ & //BP 8-22-05 | |
3788 | ~ack_busy_sys2 & | |
3789 | ~rd_nack_vld_sys; | |
3790 | ||
3791 | wire req_acpted_orig_sys_din | |
3792 | = ( wr_req_vld_trunc & // No iob_creg_addr term: | |
3793 | // silently discard. | |
3794 | ~req_acpted_orig_sys | |
3795 | ) | | |
3796 | rd_ack_vld_din | | |
3797 | rd_nack_vld_din; | |
3798 | ||
3799 | wire rd_wr_req_vld_sys2 | |
3800 | = (rd_req_vld_sys2 |//Current transaction is rd_req_vld. | |
3801 | rd_req_vld_sys3 )//Current transaction was rd_req_vld. | |
3802 | ? rd_req_vld_sys2 //Current transaction is rd_req_vld. | |
3803 | : wr_req_vld_sys2; //Current transaction is wr_req_vld. | |
3804 | ||
3805 | wire req_acpted_sys_din | |
3806 | // When high, fall when rd_wr_req_vld_sys2 falls. | |
3807 | = req_acpted_sys ? rd_wr_req_vld_sys2 | |
3808 | : req_acpted_orig_sys; | |
3809 | // When low, rise when req_acpted_orig_sys rises. | |
3810 | ||
3811 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_ack_vld_sys_ff | |
3812 | (.din (rd_ack_vld_din ), | |
3813 | .scan_in (rd_ack_vld_sys_ff_scanin ), | |
3814 | .scan_out(rd_ack_vld_sys_ff_scanout), | |
3815 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3816 | .l1clk (l1clk ), | |
3817 | .dout (rd_ack_vld_sys ), | |
3818 | .siclk(siclk), | |
3819 | .soclk(soclk)); | |
3820 | ||
3821 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 rd_nack_vld_sys_ff | |
3822 | (.din (rd_nack_vld_din ), | |
3823 | .scan_in (rd_nack_vld_sys_ff_scanin ), | |
3824 | .scan_out(rd_nack_vld_sys_ff_scanout), | |
3825 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3826 | .l1clk (l1clk ), | |
3827 | .dout (rd_nack_vld_sys ), | |
3828 | .siclk(siclk), | |
3829 | .soclk(soclk)); | |
3830 | ||
3831 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 req_acpted_orig_sys_ff | |
3832 | (.din (req_acpted_orig_sys_din ), | |
3833 | .scan_in (req_acpted_orig_sys_ff_scanin ), | |
3834 | .scan_out(req_acpted_orig_sys_ff_scanout), | |
3835 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3836 | .l1clk (l1clk ), | |
3837 | .dout (req_acpted_orig_sys ), | |
3838 | .siclk(siclk), | |
3839 | .soclk(soclk)); | |
3840 | ||
3841 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 req_acpted_sys_ff | |
3842 | (.din (req_acpted_sys_din ), | |
3843 | .scan_in (req_acpted_sys_ff_scanin ), | |
3844 | .scan_out(req_acpted_sys_ff_scanout), | |
3845 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3846 | .l1clk (l1clk ), | |
3847 | .dout (req_acpted_sys ), | |
3848 | .siclk(siclk), | |
3849 | .soclk(soclk)); | |
3850 | ||
3851 | //________________________________________________________________ | |
3852 | ||
3853 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 mio_rst_pb_rst_sys3_ff | |
3854 | (.din (mio_rst_pb_rst_sys2_ ), | |
3855 | .scan_in (mio_rst_pb_rst_sys3_ff_scanin ), | |
3856 | .scan_out(mio_rst_pb_rst_sys3_ff_scanout), | |
3857 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3858 | .l1clk (l1clk ), | |
3859 | .dout (mio_rst_pb_rst_sys3_ ), | |
3860 | .siclk(siclk), | |
3861 | .soclk(soclk));// Complete cross cmp to sys. | |
3862 | //________________________________________________________________ | |
3863 | ||
3864 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tr_flush_init_ack_sys_ff | |
3865 | (.din (tr_flush_init_ack_cmp ), | |
3866 | .scan_in (tr_flush_init_ack_sys_ff_scanin ), | |
3867 | .scan_out(tr_flush_init_ack_sys_ff_scanout), | |
3868 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3869 | .l1clk (l1clk ), | |
3870 | .dout (tr_flush_init_ack_sys ), | |
3871 | .siclk(siclk), | |
3872 | .soclk(soclk));// Complete cross cmp to sys. | |
3873 | ||
3874 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tr_flush_stop_ack_sys_ff | |
3875 | (.din (tr_flush_stop_ack_cmp ), | |
3876 | .scan_in (tr_flush_stop_ack_sys_ff_scanin ), | |
3877 | .scan_out(tr_flush_stop_ack_sys_ff_scanout), | |
3878 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3879 | .l1clk (l1clk ), | |
3880 | .dout (tr_flush_stop_ack_sys ), | |
3881 | .siclk(siclk), | |
3882 | .soclk(soclk));// Complete cross cmp to sys. | |
3883 | ||
3884 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 tr_asicflush_stop_ack_sys_ff | |
3885 | (.din (tr_asicflush_stop_ack_cmp ), | |
3886 | .scan_in (tr_asicflush_stop_ack_sys_ff_scanin ), | |
3887 | .scan_out(tr_asicflush_stop_ack_sys_ff_scanout), | |
3888 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3889 | .l1clk (l1clk ), | |
3890 | .dout (tr_asicflush_stop_ack_sys ), | |
3891 | .siclk(siclk), | |
3892 | .soclk(soclk));// Complete cross cmp-sys. | |
3893 | ||
3894 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_40 addr_in_sys2_ff | |
3895 | (.din (addr_in_sys[39:0] ), | |
3896 | .scan_in (addr_in_sys2_ff_scanin ), | |
3897 | .scan_out(addr_in_sys2_ff_scanout), | |
3898 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3899 | .l1clk (l1clk ), | |
3900 | .dout (addr_in_sys2[39:0] ), | |
3901 | .siclk(siclk), | |
3902 | .soclk(soclk));// Complete crossing from cmp to sys. | |
3903 | ||
3904 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 data_in_sys2_ff | |
3905 | ||
3906 | (.din (data_in_sys [`RST_UCB_DATA_WIDTH-1:0]), | |
3907 | .scan_in (data_in_sys2_ff_scanin ), | |
3908 | .scan_out(data_in_sys2_ff_scanout), | |
3909 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3910 | .l1clk (l1clk ), | |
3911 | .dout (data_in_sys2[`RST_UCB_DATA_WIDTH-1:0]), | |
3912 | .siclk(siclk), | |
3913 | .soclk(soclk));// Complete cmp to sys. | |
3914 | ||
3915 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_6 thr_id_in_sys2_ff | |
3916 | (.din (thr_id_in_sys[5:0] ), | |
3917 | .scan_in (thr_id_in_sys2_ff_scanin ), | |
3918 | .scan_out(thr_id_in_sys2_ff_scanout), | |
3919 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3920 | .l1clk (l1clk ), | |
3921 | .dout (thr_id_in_sys2[5:0] ), | |
3922 | .siclk(siclk), | |
3923 | .soclk(soclk));// Complete crossing from cmp to sys. | |
3924 | ||
3925 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_2 buf_id_in_sys2_ff | |
3926 | (.din (buf_id_in_sys[1:0] ), | |
3927 | .scan_in (buf_id_in_sys2_ff_scanin ), | |
3928 | .scan_out(buf_id_in_sys2_ff_scanout), | |
3929 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3930 | .l1clk (l1clk ), | |
3931 | .dout (buf_id_in_sys2[1:0] ), | |
3932 | .siclk(siclk), | |
3933 | .soclk(soclk));// Complete crossing from cmp to sys. | |
3934 | ||
3935 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 ack_busy_sys2_ff | |
3936 | (.din (ack_busy_sys ), | |
3937 | .scan_in (ack_busy_sys2_ff_scanin ), | |
3938 | .scan_out(ack_busy_sys2_ff_scanout), | |
3939 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3940 | .l1clk (l1clk ), | |
3941 | .dout (ack_busy_sys2 ), | |
3942 | .siclk(siclk), | |
3943 | .soclk(soclk));// Complete crossing from cmp to sys. | |
3944 | //________________________________________________________________ | |
3945 | ||
3946 | wire thr_buf_id_en = req_acpted_orig_sys_din | | |
3947 | rd_nack_vld_din; | |
3948 | ||
3949 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_6 thr_id_out_sys_ff | |
3950 | (.din (thr_id_in_sys2[5:0] ), | |
3951 | .scan_in (thr_id_out_sys_ff_scanin ), | |
3952 | .scan_out(thr_id_out_sys_ff_scanout), | |
3953 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3954 | .l1clk (l1clk ), | |
3955 | .en (thr_buf_id_en ), | |
3956 | .dout (thr_id_out_sys[5:0] ), | |
3957 | .siclk(siclk), | |
3958 | .soclk(soclk)); | |
3959 | ||
3960 | rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_2 buf_id_out_sys_ff | |
3961 | (.din (buf_id_in_sys2[1:0] ), | |
3962 | .scan_in (buf_id_out_sys_ff_scanin ), | |
3963 | .scan_out(buf_id_out_sys_ff_scanout), | |
3964 | .clr_ (mio_rst_pwron_rst_sys_ ), | |
3965 | .l1clk (l1clk ), | |
3966 | .en (thr_buf_id_en ), | |
3967 | .dout (buf_id_out_sys[1:0] ), | |
3968 | .siclk(siclk), | |
3969 | .soclk(soclk)); | |
3970 | //________________________________________________________________ | |
3971 | ||
3972 | rst_fsm_ctl_l1clkhdr_ctl_macro clkgen ( | |
3973 | .l2clk (ref_clk ), | |
3974 | .l1en (1'b1 ), | |
3975 | .pce_ov (tcu_pce_ov ), // (No assign needed.) | |
3976 | // .pce_ov (1'b0 ), pce_ov and se appear in cpu.v | |
3977 | // .stop (tcu_clk_stop), // Qualified by assign stmt. | |
3978 | .stop (1'b0 ), | |
3979 | ||
3980 | .se (tcu_scan_en ), // Qualified by assign stmt. | |
3981 | // .se (1'b0 ), | |
3982 | .l1clk (l1clk )); | |
3983 | ||
3984 | // grep "Number of cells:" rst_*_l/*/scf/dc/rpt/syn_area.rpt | |
3985 | // Number of cells/450 = spare gate macros | |
3986 | // rst_fsm_l/rst_fsm_ctl/scf/dc/rpt/syn_area.rpt: Num:1870 /450=4 | |
3987 | ||
3988 | rst_fsm_ctl_spare_ctl_macro__num_4 spares ( | |
3989 | .scan_in (spares_scanin ), | |
3990 | .scan_out(spares_scanout), | |
3991 | .l1clk (l1clk), | |
3992 | .siclk(siclk), | |
3993 | .soclk(soclk) ); | |
3994 | ||
3995 | //________________________________________________________________ | |
3996 | ||
3997 | // Don't forget to re-link 3 | |
3998 | // into chain of assign statments | |
3999 | // when rerunning fixscan. | |
4000 | // assign mio_rst_pwron_rst_sys_ff_scanin = buf_id_out_sys_ff_scanout; | |
4001 | // assign mio_rst_button_xir_sys_ff_scanin= mio_rst_pwron_rst_sys_ff_scanout; | |
4002 | // assign mio_rst_pb_rst_sys_ff_scanin = mio_rst_button_xir_sys_ff_scanout; | |
4003 | // assign spares_scanin = mio_rst_pb_rst_sys_ff_scanout ; | |
4004 | ||
4005 | // fixscan start: | |
4006 | assign rd_req_vld_sys2_ff_scanin = scan_in ; | |
4007 | assign wr_req_vld_sys2_ff_scanin = rd_req_vld_sys2_ff_scanout; | |
4008 | assign rd_req_vld_sys3_ff_scanin = wr_req_vld_sys2_ff_scanout; | |
4009 | assign wr_req_vld_sys3_ff_scanin = rd_req_vld_sys3_ff_scanout; | |
4010 | assign data_out_sys2_ff_scanin = wr_req_vld_sys3_ff_scanout; | |
4011 | assign ncu_rst_xir_done_sys2_ff_scanin = data_out_sys2_ff_scanout ; | |
4012 | assign rt_flush_init_req_sys2_ff_scanin = ncu_rst_xir_done_sys2_ff_scanout; | |
4013 | assign rt_flush_stop_req_sys2_ff_scanin = rt_flush_init_req_sys2_ff_scanout; | |
4014 | assign rt_asicflush_stop_req_sys2_ff_scanin = rt_flush_stop_req_sys2_ff_scanout; | |
4015 | assign rst_l2_por_sys2_ff_scanin = rt_asicflush_stop_req_sys2_ff_scanout; | |
4016 | assign rst_l2_wmr_sys2_ff_scanin = rst_l2_por_sys2_ff_scanout; | |
4017 | assign rst_cmp_ctl_wmr_sys2_ff_scanin = rst_l2_wmr_sys2_ff_scanout; | |
4018 | assign rst_wmr_protect_sys2_ff_scanin = rst_cmp_ctl_wmr_sys2_ff_scanout; | |
4019 | assign rst_tcu_clk_stop_sys2_ff_scanin = rst_wmr_protect_sys2_ff_scanout; | |
4020 | assign rst_dmu_async_por_sys_ff_scanin = rst_tcu_clk_stop_sys2_ff_scanout; | |
4021 | assign rst_dmu_peu_por_sys2_ff_scanin = rst_dmu_async_por_sys_ff_scanout; | |
4022 | assign rst_dmu_peu_wmr_sys2_ff_scanin = rst_dmu_peu_por_sys2_ff_scanout; | |
4023 | assign rst_niu_mac_sys2_ff_scanin = rst_dmu_peu_wmr_sys2_ff_scanout; | |
4024 | assign rst_niu_wmr_sys2_ff_scanin = rst_niu_mac_sys2_ff_scanout; | |
4025 | assign rst_ncu_unpark_thread_sys2_ff_scanin = rst_niu_wmr_sys2_ff_scanout; | |
4026 | assign rst_ncu_xir_sys2_ff_scanin = rst_ncu_unpark_thread_sys2_ff_scanout; | |
4027 | assign rst_rst_wmr_sys_ff_scanin = rst_ncu_xir_sys2_ff_scanout; | |
4028 | assign rst_rst_por_sys_ff_scanin = rst_rst_wmr_sys_ff_scanout; | |
4029 | assign tcu_rst_efu_done_sys_ff_scanin = rst_rst_por_sys_ff_scanout; | |
4030 | assign tcu_bisx_done_sys_ff_scanin = tcu_rst_efu_done_sys_ff_scanout; | |
4031 | assign ccu_rst_change_sys_ff_scanin = tcu_bisx_done_sys_ff_scanout; | |
4032 | assign tcu_test_protect_sys_ff_scanin = ccu_rst_change_sys_ff_scanout; | |
4033 | assign ncu_rst_fatal_error_sys_ff_scanin = tcu_test_protect_sys_ff_scanout; | |
4034 | assign l2t7_rst_fatal_error_sys_ff_scanin = ncu_rst_fatal_error_sys_ff_scanout; | |
4035 | assign l2t6_rst_fatal_error_sys_ff_scanin = l2t7_rst_fatal_error_sys_ff_scanout; | |
4036 | assign l2t5_rst_fatal_error_sys_ff_scanin = l2t6_rst_fatal_error_sys_ff_scanout; | |
4037 | assign l2t4_rst_fatal_error_sys_ff_scanin = l2t5_rst_fatal_error_sys_ff_scanout; | |
4038 | assign l2t3_rst_fatal_error_sys_ff_scanin = l2t4_rst_fatal_error_sys_ff_scanout; | |
4039 | assign l2t2_rst_fatal_error_sys_ff_scanin = l2t3_rst_fatal_error_sys_ff_scanout; | |
4040 | assign l2t1_rst_fatal_error_sys_ff_scanin = l2t2_rst_fatal_error_sys_ff_scanout; | |
4041 | assign l2t0_rst_fatal_error_sys_ff_scanin = l2t1_rst_fatal_error_sys_ff_scanout; | |
4042 | assign rst_rst_pwron_rst_sys2_ff_scanin = l2t0_rst_fatal_error_sys_ff_scanout; | |
4043 | assign reset_gen_dbr_gen_ff_scanin = rst_rst_pwron_rst_sys2_ff_scanout; | |
4044 | assign reset_gen_xir_gen_ff_scanin = reset_gen_dbr_gen_ff_scanout; | |
4045 | assign reset_gen_wmr_gen_ff_scanin = reset_gen_xir_gen_ff_scanout; | |
4046 | assign reset_source_l2t7_fatal_ff_scanin = reset_gen_wmr_gen_ff_scanout; | |
4047 | assign reset_source_l2t6_fatal_ff_scanin = reset_source_l2t7_fatal_ff_scanout; | |
4048 | assign reset_source_l2t5_fatal_ff_scanin = reset_source_l2t6_fatal_ff_scanout; | |
4049 | assign reset_source_l2t4_fatal_ff_scanin = reset_source_l2t5_fatal_ff_scanout; | |
4050 | assign reset_source_l2t3_fatal_ff_scanin = reset_source_l2t4_fatal_ff_scanout; | |
4051 | assign reset_source_l2t2_fatal_ff_scanin = reset_source_l2t3_fatal_ff_scanout; | |
4052 | assign reset_source_l2t1_fatal_ff_scanin = reset_source_l2t2_fatal_ff_scanout; | |
4053 | assign reset_source_l2t0_fatal_ff_scanin = reset_source_l2t1_fatal_ff_scanout; | |
4054 | assign reset_source_ncu_fatal_ff_scanin = reset_source_l2t0_fatal_ff_scanout; | |
4055 | assign reset_source_pb_xir_ff_scanin = reset_source_ncu_fatal_ff_scanout; | |
4056 | assign reset_source_pb_rst_ff_scanin = reset_source_pb_xir_ff_scanout; | |
4057 | assign reset_source_pwron_ff_scanin = reset_source_pb_rst_ff_scanout; | |
4058 | assign reset_source_dbr_gen_ff_scanin = reset_source_pwron_ff_scanout; | |
4059 | assign reset_source_xir_gen_ff_scanin = reset_source_dbr_gen_ff_scanout; | |
4060 | assign reset_source_wmr_gen_ff_scanin = reset_source_xir_gen_ff_scanout; | |
4061 | assign rst_ccu_pll_sys_ff_scanin = reset_source_wmr_gen_ff_scanout; | |
4062 | assign rst_ccu_sys_ff_scanin = rst_ccu_pll_sys_ff_scanout; | |
4063 | assign cluster_arst_sys_ff_scanin = rst_ccu_sys_ff_scanout ; | |
4064 | assign rst_assert_ssi_sync_ff_scanin = cluster_arst_sys_ff_scanout; | |
4065 | assign ssys_reset_mac_ff_scanin = rst_assert_ssi_sync_ff_scanout; | |
4066 | assign ssys_reset_mcu_ff_scanin = ssys_reset_mac_ff_scanout; | |
4067 | assign ssys_reset_dmu_ff_scanin = ssys_reset_mcu_ff_scanout; | |
4068 | assign ssys_reset_niu_ff_scanin = ssys_reset_dmu_ff_scanout; | |
4069 | assign rset_stat_shadow_ff_scanin = ssys_reset_niu_ff_scanout; | |
4070 | assign rset_stat_freq_ff_scanin = rset_stat_shadow_ff_scanout; | |
4071 | assign rset_stat_por_ff_scanin = rset_stat_freq_ff_scanout; | |
4072 | assign rset_stat_wmr_ff_scanin = rset_stat_por_ff_scanout ; | |
4073 | assign lock_time_ff_scanin = rset_stat_wmr_ff_scanout ; | |
4074 | assign lock_count_ff_scanin = lock_time_ff_scanout ; | |
4075 | assign prop_time_ff_scanin = lock_count_ff_scanout ; | |
4076 | assign prop_count_ff_scanin = prop_time_ff_scanout ; | |
4077 | assign niu_time_ff_scanin = prop_count_ff_scanout ; | |
4078 | assign niu_count_ff_scanin = niu_time_ff_scanout ; | |
4079 | assign ccu_time_ff_scanin = niu_count_ff_scanout ; | |
4080 | assign ccu_count_ff_scanin = ccu_time_ff_scanout ; | |
4081 | assign reset_fee_ff_scanin = ccu_count_ff_scanout ; | |
4082 | assign state_ff_scanin = reset_fee_ff_scanout ; | |
4083 | assign xir_state_ff_scanin = state_ff_scanout ; | |
4084 | assign dmu_state_ff_scanin = xir_state_ff_scanout ; | |
4085 | assign niu_state_ff_scanin = dmu_state_ff_scanout ; | |
4086 | assign rd_ack_vld_sys_ff_scanin = niu_state_ff_scanout ; | |
4087 | assign rd_nack_vld_sys_ff_scanin = rd_ack_vld_sys_ff_scanout; | |
4088 | assign req_acpted_orig_sys_ff_scanin = rd_nack_vld_sys_ff_scanout; | |
4089 | assign req_acpted_sys_ff_scanin = req_acpted_orig_sys_ff_scanout; | |
4090 | assign mio_rst_pb_rst_sys3_ff_scanin = req_acpted_sys_ff_scanout; | |
4091 | assign tr_flush_init_ack_sys_ff_scanin = mio_rst_pb_rst_sys3_ff_scanout; | |
4092 | assign tr_flush_stop_ack_sys_ff_scanin = tr_flush_init_ack_sys_ff_scanout; | |
4093 | assign tr_asicflush_stop_ack_sys_ff_scanin = tr_flush_stop_ack_sys_ff_scanout; | |
4094 | assign addr_in_sys2_ff_scanin = tr_asicflush_stop_ack_sys_ff_scanout; | |
4095 | assign data_in_sys2_ff_scanin = addr_in_sys2_ff_scanout ; | |
4096 | assign thr_id_in_sys2_ff_scanin = data_in_sys2_ff_scanout ; | |
4097 | assign buf_id_in_sys2_ff_scanin = thr_id_in_sys2_ff_scanout; | |
4098 | assign ack_busy_sys2_ff_scanin = buf_id_in_sys2_ff_scanout; | |
4099 | assign thr_id_out_sys_ff_scanin = ack_busy_sys2_ff_scanout ; | |
4100 | assign buf_id_out_sys_ff_scanin = thr_id_out_sys_ff_scanout; | |
4101 | //sign spares_scanin = buf_id_out_sys_ff_scanout; | |
4102 | ||
4103 | // Don't forget to re-link 3 | |
4104 | // into chain of assign statments | |
4105 | // when rerunning fixscan. | |
4106 | assign mio_rst_pwron_rst_sys_ff_scanin = buf_id_out_sys_ff_scanout; | |
4107 | assign mio_rst_button_xir_sys_ff_scanin= mio_rst_pwron_rst_sys_ff_scanout; | |
4108 | assign mio_rst_pb_rst_sys_ff_scanin = mio_rst_button_xir_sys_ff_scanout; | |
4109 | assign spares_scanin = mio_rst_pb_rst_sys_ff_scanout ; | |
4110 | ||
4111 | assign scan_out = spares_scanout ; | |
4112 | // fixscan end: | |
4113 | endmodule // rst_ctl | |
4114 | ||
4115 | ||
4116 | ||
4117 | ||
4118 | ||
4119 | ||
4120 | // any PARAMS parms go into naming of macro | |
4121 | ||
4122 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_1 ( | |
4123 | din, | |
4124 | clr_, | |
4125 | l1clk, | |
4126 | scan_in, | |
4127 | siclk, | |
4128 | soclk, | |
4129 | dout, | |
4130 | scan_out); | |
4131 | wire [0:0] fdin; | |
4132 | ||
4133 | input [0:0] din; | |
4134 | input clr_; | |
4135 | input l1clk; | |
4136 | input scan_in; | |
4137 | ||
4138 | ||
4139 | input siclk; | |
4140 | input soclk; | |
4141 | ||
4142 | output [0:0] dout; | |
4143 | output scan_out; | |
4144 | assign fdin[0:0] = din[0:0] & ~{1{(~clr_)}}; | |
4145 | ||
4146 | ||
4147 | ||
4148 | ||
4149 | ||
4150 | ||
4151 | dff #(1) d0_0 ( | |
4152 | .l1clk(l1clk), | |
4153 | .siclk(siclk), | |
4154 | .soclk(soclk), | |
4155 | .d(fdin[0:0]), | |
4156 | .si(scan_in), | |
4157 | .so(scan_out), | |
4158 | .q(dout[0:0]) | |
4159 | ); | |
4160 | ||
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | ||
4170 | ||
4171 | ||
4172 | endmodule | |
4173 | ||
4174 | ||
4175 | ||
4176 | ||
4177 | ||
4178 | ||
4179 | ||
4180 | ||
4181 | ||
4182 | ||
4183 | ||
4184 | ||
4185 | ||
4186 | // any PARAMS parms go into naming of macro | |
4187 | ||
4188 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_16 ( | |
4189 | din, | |
4190 | clr_, | |
4191 | l1clk, | |
4192 | scan_in, | |
4193 | siclk, | |
4194 | soclk, | |
4195 | dout, | |
4196 | scan_out); | |
4197 | wire [15:0] fdin; | |
4198 | wire [14:0] so; | |
4199 | ||
4200 | input [15:0] din; | |
4201 | input clr_; | |
4202 | input l1clk; | |
4203 | input scan_in; | |
4204 | ||
4205 | ||
4206 | input siclk; | |
4207 | input soclk; | |
4208 | ||
4209 | output [15:0] dout; | |
4210 | output scan_out; | |
4211 | assign fdin[15:0] = din[15:0] & ~{16{(~clr_)}}; | |
4212 | ||
4213 | ||
4214 | ||
4215 | ||
4216 | ||
4217 | ||
4218 | dff #(16) d0_0 ( | |
4219 | .l1clk(l1clk), | |
4220 | .siclk(siclk), | |
4221 | .soclk(soclk), | |
4222 | .d(fdin[15:0]), | |
4223 | .si({scan_in,so[14:0]}), | |
4224 | .so({so[14:0],scan_out}), | |
4225 | .q(dout[15:0]) | |
4226 | ); | |
4227 | ||
4228 | ||
4229 | ||
4230 | ||
4231 | ||
4232 | ||
4233 | ||
4234 | ||
4235 | ||
4236 | ||
4237 | ||
4238 | ||
4239 | endmodule | |
4240 | ||
4241 | ||
4242 | ||
4243 | ||
4244 | ||
4245 | ||
4246 | ||
4247 | ||
4248 | ||
4249 | ||
4250 | ||
4251 | ||
4252 | ||
4253 | // any PARAMS parms go into naming of macro | |
4254 | ||
4255 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_1 ( | |
4256 | din, | |
4257 | en, | |
4258 | clr_, | |
4259 | l1clk, | |
4260 | scan_in, | |
4261 | siclk, | |
4262 | soclk, | |
4263 | dout, | |
4264 | scan_out); | |
4265 | wire [0:0] fdin; | |
4266 | ||
4267 | input [0:0] din; | |
4268 | input en; | |
4269 | input clr_; | |
4270 | input l1clk; | |
4271 | input scan_in; | |
4272 | ||
4273 | ||
4274 | input siclk; | |
4275 | input soclk; | |
4276 | ||
4277 | output [0:0] dout; | |
4278 | output scan_out; | |
4279 | assign fdin[0:0] = (din[0:0] & {1{en}} & ~{1{(~clr_)}}) | (dout[0:0] & ~{1{en}} & ~{1{(~clr_)}}); | |
4280 | ||
4281 | ||
4282 | ||
4283 | ||
4284 | ||
4285 | ||
4286 | dff #(1) d0_0 ( | |
4287 | .l1clk(l1clk), | |
4288 | .siclk(siclk), | |
4289 | .soclk(soclk), | |
4290 | .d(fdin[0:0]), | |
4291 | .si(scan_in), | |
4292 | .so(scan_out), | |
4293 | .q(dout[0:0]) | |
4294 | ); | |
4295 | ||
4296 | ||
4297 | ||
4298 | ||
4299 | ||
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | ||
4306 | ||
4307 | endmodule | |
4308 | ||
4309 | ||
4310 | ||
4311 | ||
4312 | ||
4313 | ||
4314 | ||
4315 | ||
4316 | ||
4317 | ||
4318 | ||
4319 | ||
4320 | ||
4321 | // any PARAMS parms go into naming of macro | |
4322 | ||
4323 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_3 ( | |
4324 | din, | |
4325 | en, | |
4326 | clr_, | |
4327 | l1clk, | |
4328 | scan_in, | |
4329 | siclk, | |
4330 | soclk, | |
4331 | dout, | |
4332 | scan_out); | |
4333 | wire [2:0] fdin; | |
4334 | wire [1:0] so; | |
4335 | ||
4336 | input [2:0] din; | |
4337 | input en; | |
4338 | input clr_; | |
4339 | input l1clk; | |
4340 | input scan_in; | |
4341 | ||
4342 | ||
4343 | input siclk; | |
4344 | input soclk; | |
4345 | ||
4346 | output [2:0] dout; | |
4347 | output scan_out; | |
4348 | assign fdin[2:0] = (din[2:0] & {3{en}} & ~{3{(~clr_)}}) | (dout[2:0] & ~{3{en}} & ~{3{(~clr_)}}); | |
4349 | ||
4350 | ||
4351 | ||
4352 | ||
4353 | ||
4354 | ||
4355 | dff #(3) d0_0 ( | |
4356 | .l1clk(l1clk), | |
4357 | .siclk(siclk), | |
4358 | .soclk(soclk), | |
4359 | .d(fdin[2:0]), | |
4360 | .si({scan_in,so[1:0]}), | |
4361 | .so({so[1:0],scan_out}), | |
4362 | .q(dout[2:0]) | |
4363 | ); | |
4364 | ||
4365 | ||
4366 | ||
4367 | ||
4368 | ||
4369 | ||
4370 | ||
4371 | ||
4372 | ||
4373 | ||
4374 | ||
4375 | ||
4376 | endmodule | |
4377 | ||
4378 | ||
4379 | ||
4380 | ||
4381 | ||
4382 | ||
4383 | ||
4384 | ||
4385 | ||
4386 | ||
4387 | ||
4388 | ||
4389 | ||
4390 | // any PARAMS parms go into naming of macro | |
4391 | ||
4392 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_16 ( | |
4393 | din, | |
4394 | en, | |
4395 | clr_, | |
4396 | l1clk, | |
4397 | scan_in, | |
4398 | siclk, | |
4399 | soclk, | |
4400 | dout, | |
4401 | scan_out); | |
4402 | wire [15:0] fdin; | |
4403 | wire [14:0] so; | |
4404 | ||
4405 | input [15:0] din; | |
4406 | input en; | |
4407 | input clr_; | |
4408 | input l1clk; | |
4409 | input scan_in; | |
4410 | ||
4411 | ||
4412 | input siclk; | |
4413 | input soclk; | |
4414 | ||
4415 | output [15:0] dout; | |
4416 | output scan_out; | |
4417 | assign fdin[15:0] = (din[15:0] & {16{en}} & ~{16{(~clr_)}}) | (dout[15:0] & ~{16{en}} & ~{16{(~clr_)}}); | |
4418 | ||
4419 | ||
4420 | ||
4421 | ||
4422 | ||
4423 | ||
4424 | dff #(16) d0_0 ( | |
4425 | .l1clk(l1clk), | |
4426 | .siclk(siclk), | |
4427 | .soclk(soclk), | |
4428 | .d(fdin[15:0]), | |
4429 | .si({scan_in,so[14:0]}), | |
4430 | .so({so[14:0],scan_out}), | |
4431 | .q(dout[15:0]) | |
4432 | ); | |
4433 | ||
4434 | ||
4435 | ||
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | ||
4441 | ||
4442 | ||
4443 | ||
4444 | ||
4445 | endmodule | |
4446 | ||
4447 | ||
4448 | ||
4449 | ||
4450 | ||
4451 | ||
4452 | ||
4453 | ||
4454 | ||
4455 | ||
4456 | ||
4457 | ||
4458 | ||
4459 | // any PARAMS parms go into naming of macro | |
4460 | ||
4461 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_8 ( | |
4462 | din, | |
4463 | en, | |
4464 | clr_, | |
4465 | l1clk, | |
4466 | scan_in, | |
4467 | siclk, | |
4468 | soclk, | |
4469 | dout, | |
4470 | scan_out); | |
4471 | wire [7:0] fdin; | |
4472 | wire [6:0] so; | |
4473 | ||
4474 | input [7:0] din; | |
4475 | input en; | |
4476 | input clr_; | |
4477 | input l1clk; | |
4478 | input scan_in; | |
4479 | ||
4480 | ||
4481 | input siclk; | |
4482 | input soclk; | |
4483 | ||
4484 | output [7:0] dout; | |
4485 | output scan_out; | |
4486 | assign fdin[7:0] = (din[7:0] & {8{en}} & ~{8{(~clr_)}}) | (dout[7:0] & ~{8{en}} & ~{8{(~clr_)}}); | |
4487 | ||
4488 | ||
4489 | ||
4490 | ||
4491 | ||
4492 | ||
4493 | dff #(8) d0_0 ( | |
4494 | .l1clk(l1clk), | |
4495 | .siclk(siclk), | |
4496 | .soclk(soclk), | |
4497 | .d(fdin[7:0]), | |
4498 | .si({scan_in,so[6:0]}), | |
4499 | .so({so[6:0],scan_out}), | |
4500 | .q(dout[7:0]) | |
4501 | ); | |
4502 | ||
4503 | ||
4504 | ||
4505 | ||
4506 | ||
4507 | ||
4508 | ||
4509 | ||
4510 | ||
4511 | ||
4512 | ||
4513 | ||
4514 | endmodule | |
4515 | ||
4516 | ||
4517 | ||
4518 | ||
4519 | ||
4520 | ||
4521 | ||
4522 | ||
4523 | ||
4524 | ||
4525 | ||
4526 | ||
4527 | ||
4528 | // any PARAMS parms go into naming of macro | |
4529 | ||
4530 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_33 ( | |
4531 | din, | |
4532 | clr_, | |
4533 | l1clk, | |
4534 | scan_in, | |
4535 | siclk, | |
4536 | soclk, | |
4537 | dout, | |
4538 | scan_out); | |
4539 | wire [32:0] fdin; | |
4540 | wire [31:0] so; | |
4541 | ||
4542 | input [32:0] din; | |
4543 | input clr_; | |
4544 | input l1clk; | |
4545 | input scan_in; | |
4546 | ||
4547 | ||
4548 | input siclk; | |
4549 | input soclk; | |
4550 | ||
4551 | output [32:0] dout; | |
4552 | output scan_out; | |
4553 | assign fdin[32:0] = din[32:0] & ~{33{(~clr_)}}; | |
4554 | ||
4555 | ||
4556 | ||
4557 | ||
4558 | ||
4559 | ||
4560 | dff #(33) d0_0 ( | |
4561 | .l1clk(l1clk), | |
4562 | .siclk(siclk), | |
4563 | .soclk(soclk), | |
4564 | .d(fdin[32:0]), | |
4565 | .si({scan_in,so[31:0]}), | |
4566 | .so({so[31:0],scan_out}), | |
4567 | .q(dout[32:0]) | |
4568 | ); | |
4569 | ||
4570 | ||
4571 | ||
4572 | ||
4573 | ||
4574 | ||
4575 | ||
4576 | ||
4577 | ||
4578 | ||
4579 | ||
4580 | ||
4581 | endmodule | |
4582 | ||
4583 | ||
4584 | ||
4585 | ||
4586 | ||
4587 | ||
4588 | ||
4589 | ||
4590 | ||
4591 | ||
4592 | ||
4593 | ||
4594 | ||
4595 | // any PARAMS parms go into naming of macro | |
4596 | ||
4597 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_2 ( | |
4598 | din, | |
4599 | clr_, | |
4600 | l1clk, | |
4601 | scan_in, | |
4602 | siclk, | |
4603 | soclk, | |
4604 | dout, | |
4605 | scan_out); | |
4606 | wire [1:0] fdin; | |
4607 | wire [0:0] so; | |
4608 | ||
4609 | input [1:0] din; | |
4610 | input clr_; | |
4611 | input l1clk; | |
4612 | input scan_in; | |
4613 | ||
4614 | ||
4615 | input siclk; | |
4616 | input soclk; | |
4617 | ||
4618 | output [1:0] dout; | |
4619 | output scan_out; | |
4620 | assign fdin[1:0] = din[1:0] & ~{2{(~clr_)}}; | |
4621 | ||
4622 | ||
4623 | ||
4624 | ||
4625 | ||
4626 | ||
4627 | dff #(2) d0_0 ( | |
4628 | .l1clk(l1clk), | |
4629 | .siclk(siclk), | |
4630 | .soclk(soclk), | |
4631 | .d(fdin[1:0]), | |
4632 | .si({scan_in,so[0:0]}), | |
4633 | .so({so[0:0],scan_out}), | |
4634 | .q(dout[1:0]) | |
4635 | ); | |
4636 | ||
4637 | ||
4638 | ||
4639 | ||
4640 | ||
4641 | ||
4642 | ||
4643 | ||
4644 | ||
4645 | ||
4646 | ||
4647 | ||
4648 | endmodule | |
4649 | ||
4650 | ||
4651 | ||
4652 | ||
4653 | ||
4654 | ||
4655 | ||
4656 | ||
4657 | ||
4658 | ||
4659 | ||
4660 | ||
4661 | ||
4662 | // any PARAMS parms go into naming of macro | |
4663 | ||
4664 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_3 ( | |
4665 | din, | |
4666 | clr_, | |
4667 | l1clk, | |
4668 | scan_in, | |
4669 | siclk, | |
4670 | soclk, | |
4671 | dout, | |
4672 | scan_out); | |
4673 | wire [2:0] fdin; | |
4674 | wire [1:0] so; | |
4675 | ||
4676 | input [2:0] din; | |
4677 | input clr_; | |
4678 | input l1clk; | |
4679 | input scan_in; | |
4680 | ||
4681 | ||
4682 | input siclk; | |
4683 | input soclk; | |
4684 | ||
4685 | output [2:0] dout; | |
4686 | output scan_out; | |
4687 | assign fdin[2:0] = din[2:0] & ~{3{(~clr_)}}; | |
4688 | ||
4689 | ||
4690 | ||
4691 | ||
4692 | ||
4693 | ||
4694 | dff #(3) d0_0 ( | |
4695 | .l1clk(l1clk), | |
4696 | .siclk(siclk), | |
4697 | .soclk(soclk), | |
4698 | .d(fdin[2:0]), | |
4699 | .si({scan_in,so[1:0]}), | |
4700 | .so({so[1:0],scan_out}), | |
4701 | .q(dout[2:0]) | |
4702 | ); | |
4703 | ||
4704 | ||
4705 | ||
4706 | ||
4707 | ||
4708 | ||
4709 | ||
4710 | ||
4711 | ||
4712 | ||
4713 | ||
4714 | ||
4715 | endmodule | |
4716 | ||
4717 | ||
4718 | ||
4719 | ||
4720 | ||
4721 | ||
4722 | ||
4723 | ||
4724 | ||
4725 | ||
4726 | ||
4727 | ||
4728 | ||
4729 | // any PARAMS parms go into naming of macro | |
4730 | ||
4731 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_40 ( | |
4732 | din, | |
4733 | clr_, | |
4734 | l1clk, | |
4735 | scan_in, | |
4736 | siclk, | |
4737 | soclk, | |
4738 | dout, | |
4739 | scan_out); | |
4740 | wire [39:0] fdin; | |
4741 | wire [38:0] so; | |
4742 | ||
4743 | input [39:0] din; | |
4744 | input clr_; | |
4745 | input l1clk; | |
4746 | input scan_in; | |
4747 | ||
4748 | ||
4749 | input siclk; | |
4750 | input soclk; | |
4751 | ||
4752 | output [39:0] dout; | |
4753 | output scan_out; | |
4754 | assign fdin[39:0] = din[39:0] & ~{40{(~clr_)}}; | |
4755 | ||
4756 | ||
4757 | ||
4758 | ||
4759 | ||
4760 | ||
4761 | dff #(40) d0_0 ( | |
4762 | .l1clk(l1clk), | |
4763 | .siclk(siclk), | |
4764 | .soclk(soclk), | |
4765 | .d(fdin[39:0]), | |
4766 | .si({scan_in,so[38:0]}), | |
4767 | .so({so[38:0],scan_out}), | |
4768 | .q(dout[39:0]) | |
4769 | ); | |
4770 | ||
4771 | ||
4772 | ||
4773 | ||
4774 | ||
4775 | ||
4776 | ||
4777 | ||
4778 | ||
4779 | ||
4780 | ||
4781 | ||
4782 | endmodule | |
4783 | ||
4784 | ||
4785 | ||
4786 | ||
4787 | ||
4788 | ||
4789 | ||
4790 | ||
4791 | ||
4792 | ||
4793 | ||
4794 | ||
4795 | ||
4796 | // any PARAMS parms go into naming of macro | |
4797 | ||
4798 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_0__width_6 ( | |
4799 | din, | |
4800 | clr_, | |
4801 | l1clk, | |
4802 | scan_in, | |
4803 | siclk, | |
4804 | soclk, | |
4805 | dout, | |
4806 | scan_out); | |
4807 | wire [5:0] fdin; | |
4808 | wire [4:0] so; | |
4809 | ||
4810 | input [5:0] din; | |
4811 | input clr_; | |
4812 | input l1clk; | |
4813 | input scan_in; | |
4814 | ||
4815 | ||
4816 | input siclk; | |
4817 | input soclk; | |
4818 | ||
4819 | output [5:0] dout; | |
4820 | output scan_out; | |
4821 | assign fdin[5:0] = din[5:0] & ~{6{(~clr_)}}; | |
4822 | ||
4823 | ||
4824 | ||
4825 | ||
4826 | ||
4827 | ||
4828 | dff #(6) d0_0 ( | |
4829 | .l1clk(l1clk), | |
4830 | .siclk(siclk), | |
4831 | .soclk(soclk), | |
4832 | .d(fdin[5:0]), | |
4833 | .si({scan_in,so[4:0]}), | |
4834 | .so({so[4:0],scan_out}), | |
4835 | .q(dout[5:0]) | |
4836 | ); | |
4837 | ||
4838 | ||
4839 | ||
4840 | ||
4841 | ||
4842 | ||
4843 | ||
4844 | ||
4845 | ||
4846 | ||
4847 | ||
4848 | ||
4849 | endmodule | |
4850 | ||
4851 | ||
4852 | ||
4853 | ||
4854 | ||
4855 | ||
4856 | ||
4857 | ||
4858 | ||
4859 | ||
4860 | ||
4861 | ||
4862 | ||
4863 | // any PARAMS parms go into naming of macro | |
4864 | ||
4865 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_6 ( | |
4866 | din, | |
4867 | en, | |
4868 | clr_, | |
4869 | l1clk, | |
4870 | scan_in, | |
4871 | siclk, | |
4872 | soclk, | |
4873 | dout, | |
4874 | scan_out); | |
4875 | wire [5:0] fdin; | |
4876 | wire [4:0] so; | |
4877 | ||
4878 | input [5:0] din; | |
4879 | input en; | |
4880 | input clr_; | |
4881 | input l1clk; | |
4882 | input scan_in; | |
4883 | ||
4884 | ||
4885 | input siclk; | |
4886 | input soclk; | |
4887 | ||
4888 | output [5:0] dout; | |
4889 | output scan_out; | |
4890 | assign fdin[5:0] = (din[5:0] & {6{en}} & ~{6{(~clr_)}}) | (dout[5:0] & ~{6{en}} & ~{6{(~clr_)}}); | |
4891 | ||
4892 | ||
4893 | ||
4894 | ||
4895 | ||
4896 | ||
4897 | dff #(6) d0_0 ( | |
4898 | .l1clk(l1clk), | |
4899 | .siclk(siclk), | |
4900 | .soclk(soclk), | |
4901 | .d(fdin[5:0]), | |
4902 | .si({scan_in,so[4:0]}), | |
4903 | .so({so[4:0],scan_out}), | |
4904 | .q(dout[5:0]) | |
4905 | ); | |
4906 | ||
4907 | ||
4908 | ||
4909 | ||
4910 | ||
4911 | ||
4912 | ||
4913 | ||
4914 | ||
4915 | ||
4916 | ||
4917 | ||
4918 | endmodule | |
4919 | ||
4920 | ||
4921 | ||
4922 | ||
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | ||
4928 | ||
4929 | ||
4930 | ||
4931 | ||
4932 | // any PARAMS parms go into naming of macro | |
4933 | ||
4934 | module rst_fsm_ctl_msff_ctl_macro__clr__1__en_1__width_2 ( | |
4935 | din, | |
4936 | en, | |
4937 | clr_, | |
4938 | l1clk, | |
4939 | scan_in, | |
4940 | siclk, | |
4941 | soclk, | |
4942 | dout, | |
4943 | scan_out); | |
4944 | wire [1:0] fdin; | |
4945 | wire [0:0] so; | |
4946 | ||
4947 | input [1:0] din; | |
4948 | input en; | |
4949 | input clr_; | |
4950 | input l1clk; | |
4951 | input scan_in; | |
4952 | ||
4953 | ||
4954 | input siclk; | |
4955 | input soclk; | |
4956 | ||
4957 | output [1:0] dout; | |
4958 | output scan_out; | |
4959 | assign fdin[1:0] = (din[1:0] & {2{en}} & ~{2{(~clr_)}}) | (dout[1:0] & ~{2{en}} & ~{2{(~clr_)}}); | |
4960 | ||
4961 | ||
4962 | ||
4963 | ||
4964 | ||
4965 | ||
4966 | dff #(2) d0_0 ( | |
4967 | .l1clk(l1clk), | |
4968 | .siclk(siclk), | |
4969 | .soclk(soclk), | |
4970 | .d(fdin[1:0]), | |
4971 | .si({scan_in,so[0:0]}), | |
4972 | .so({so[0:0],scan_out}), | |
4973 | .q(dout[1:0]) | |
4974 | ); | |
4975 | ||
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | ||
4985 | ||
4986 | ||
4987 | endmodule | |
4988 | ||
4989 | ||
4990 | ||
4991 | ||
4992 | ||
4993 | ||
4994 | ||
4995 | ||
4996 | ||
4997 | ||
4998 | ||
4999 | ||
5000 | ||
5001 | // any PARAMS parms go into naming of macro | |
5002 | ||
5003 | module rst_fsm_ctl_l1clkhdr_ctl_macro ( | |
5004 | l2clk, | |
5005 | l1en, | |
5006 | pce_ov, | |
5007 | stop, | |
5008 | se, | |
5009 | l1clk); | |
5010 | ||
5011 | ||
5012 | input l2clk; | |
5013 | input l1en; | |
5014 | input pce_ov; | |
5015 | input stop; | |
5016 | input se; | |
5017 | output l1clk; | |
5018 | ||
5019 | ||
5020 | ||
5021 | ||
5022 | ||
5023 | cl_sc1_l1hdr_8x c_0 ( | |
5024 | ||
5025 | ||
5026 | .l2clk(l2clk), | |
5027 | .pce(l1en), | |
5028 | .l1clk(l1clk), | |
5029 | .se(se), | |
5030 | .pce_ov(pce_ov), | |
5031 | .stop(stop) | |
5032 | ); | |
5033 | ||
5034 | ||
5035 | ||
5036 | endmodule | |
5037 | ||
5038 | ||
5039 | ||
5040 | ||
5041 | ||
5042 | ||
5043 | ||
5044 | ||
5045 | ||
5046 | // Description: Spare gate macro for control blocks | |
5047 | // | |
5048 | // Param num controls the number of times the macro is added | |
5049 | // flops=0 can be used to use only combination spare logic | |
5050 | ||
5051 | ||
5052 | module rst_fsm_ctl_spare_ctl_macro__num_4 ( | |
5053 | l1clk, | |
5054 | scan_in, | |
5055 | siclk, | |
5056 | soclk, | |
5057 | scan_out); | |
5058 | wire si_0; | |
5059 | wire so_0; | |
5060 | wire spare0_flop_unused; | |
5061 | wire spare0_buf_32x_unused; | |
5062 | wire spare0_nand3_8x_unused; | |
5063 | wire spare0_inv_8x_unused; | |
5064 | wire spare0_aoi22_4x_unused; | |
5065 | wire spare0_buf_8x_unused; | |
5066 | wire spare0_oai22_4x_unused; | |
5067 | wire spare0_inv_16x_unused; | |
5068 | wire spare0_nand2_16x_unused; | |
5069 | wire spare0_nor3_4x_unused; | |
5070 | wire spare0_nand2_8x_unused; | |
5071 | wire spare0_buf_16x_unused; | |
5072 | wire spare0_nor2_16x_unused; | |
5073 | wire spare0_inv_32x_unused; | |
5074 | wire si_1; | |
5075 | wire so_1; | |
5076 | wire spare1_flop_unused; | |
5077 | wire spare1_buf_32x_unused; | |
5078 | wire spare1_nand3_8x_unused; | |
5079 | wire spare1_inv_8x_unused; | |
5080 | wire spare1_aoi22_4x_unused; | |
5081 | wire spare1_buf_8x_unused; | |
5082 | wire spare1_oai22_4x_unused; | |
5083 | wire spare1_inv_16x_unused; | |
5084 | wire spare1_nand2_16x_unused; | |
5085 | wire spare1_nor3_4x_unused; | |
5086 | wire spare1_nand2_8x_unused; | |
5087 | wire spare1_buf_16x_unused; | |
5088 | wire spare1_nor2_16x_unused; | |
5089 | wire spare1_inv_32x_unused; | |
5090 | wire si_2; | |
5091 | wire so_2; | |
5092 | wire spare2_flop_unused; | |
5093 | wire spare2_buf_32x_unused; | |
5094 | wire spare2_nand3_8x_unused; | |
5095 | wire spare2_inv_8x_unused; | |
5096 | wire spare2_aoi22_4x_unused; | |
5097 | wire spare2_buf_8x_unused; | |
5098 | wire spare2_oai22_4x_unused; | |
5099 | wire spare2_inv_16x_unused; | |
5100 | wire spare2_nand2_16x_unused; | |
5101 | wire spare2_nor3_4x_unused; | |
5102 | wire spare2_nand2_8x_unused; | |
5103 | wire spare2_buf_16x_unused; | |
5104 | wire spare2_nor2_16x_unused; | |
5105 | wire spare2_inv_32x_unused; | |
5106 | wire si_3; | |
5107 | wire so_3; | |
5108 | wire spare3_flop_unused; | |
5109 | wire spare3_buf_32x_unused; | |
5110 | wire spare3_nand3_8x_unused; | |
5111 | wire spare3_inv_8x_unused; | |
5112 | wire spare3_aoi22_4x_unused; | |
5113 | wire spare3_buf_8x_unused; | |
5114 | wire spare3_oai22_4x_unused; | |
5115 | wire spare3_inv_16x_unused; | |
5116 | wire spare3_nand2_16x_unused; | |
5117 | wire spare3_nor3_4x_unused; | |
5118 | wire spare3_nand2_8x_unused; | |
5119 | wire spare3_buf_16x_unused; | |
5120 | wire spare3_nor2_16x_unused; | |
5121 | wire spare3_inv_32x_unused; | |
5122 | ||
5123 | ||
5124 | input l1clk; | |
5125 | input scan_in; | |
5126 | input siclk; | |
5127 | input soclk; | |
5128 | output scan_out; | |
5129 | ||
5130 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
5131 | .siclk(siclk), | |
5132 | .soclk(soclk), | |
5133 | .si(si_0), | |
5134 | .so(so_0), | |
5135 | .d(1'b0), | |
5136 | .q(spare0_flop_unused)); | |
5137 | assign si_0 = scan_in; | |
5138 | ||
5139 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
5140 | .out(spare0_buf_32x_unused)); | |
5141 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
5142 | .in1(1'b1), | |
5143 | .in2(1'b1), | |
5144 | .out(spare0_nand3_8x_unused)); | |
5145 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
5146 | .out(spare0_inv_8x_unused)); | |
5147 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
5148 | .in01(1'b1), | |
5149 | .in10(1'b1), | |
5150 | .in11(1'b1), | |
5151 | .out(spare0_aoi22_4x_unused)); | |
5152 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
5153 | .out(spare0_buf_8x_unused)); | |
5154 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
5155 | .in01(1'b1), | |
5156 | .in10(1'b1), | |
5157 | .in11(1'b1), | |
5158 | .out(spare0_oai22_4x_unused)); | |
5159 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
5160 | .out(spare0_inv_16x_unused)); | |
5161 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
5162 | .in1(1'b1), | |
5163 | .out(spare0_nand2_16x_unused)); | |
5164 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
5165 | .in1(1'b0), | |
5166 | .in2(1'b0), | |
5167 | .out(spare0_nor3_4x_unused)); | |
5168 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
5169 | .in1(1'b1), | |
5170 | .out(spare0_nand2_8x_unused)); | |
5171 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
5172 | .out(spare0_buf_16x_unused)); | |
5173 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
5174 | .in1(1'b0), | |
5175 | .out(spare0_nor2_16x_unused)); | |
5176 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
5177 | .out(spare0_inv_32x_unused)); | |
5178 | ||
5179 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
5180 | .siclk(siclk), | |
5181 | .soclk(soclk), | |
5182 | .si(si_1), | |
5183 | .so(so_1), | |
5184 | .d(1'b0), | |
5185 | .q(spare1_flop_unused)); | |
5186 | assign si_1 = so_0; | |
5187 | ||
5188 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
5189 | .out(spare1_buf_32x_unused)); | |
5190 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
5191 | .in1(1'b1), | |
5192 | .in2(1'b1), | |
5193 | .out(spare1_nand3_8x_unused)); | |
5194 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
5195 | .out(spare1_inv_8x_unused)); | |
5196 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
5197 | .in01(1'b1), | |
5198 | .in10(1'b1), | |
5199 | .in11(1'b1), | |
5200 | .out(spare1_aoi22_4x_unused)); | |
5201 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
5202 | .out(spare1_buf_8x_unused)); | |
5203 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
5204 | .in01(1'b1), | |
5205 | .in10(1'b1), | |
5206 | .in11(1'b1), | |
5207 | .out(spare1_oai22_4x_unused)); | |
5208 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
5209 | .out(spare1_inv_16x_unused)); | |
5210 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
5211 | .in1(1'b1), | |
5212 | .out(spare1_nand2_16x_unused)); | |
5213 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
5214 | .in1(1'b0), | |
5215 | .in2(1'b0), | |
5216 | .out(spare1_nor3_4x_unused)); | |
5217 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
5218 | .in1(1'b1), | |
5219 | .out(spare1_nand2_8x_unused)); | |
5220 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
5221 | .out(spare1_buf_16x_unused)); | |
5222 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
5223 | .in1(1'b0), | |
5224 | .out(spare1_nor2_16x_unused)); | |
5225 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
5226 | .out(spare1_inv_32x_unused)); | |
5227 | ||
5228 | cl_sc1_msff_8x spare2_flop (.l1clk(l1clk), | |
5229 | .siclk(siclk), | |
5230 | .soclk(soclk), | |
5231 | .si(si_2), | |
5232 | .so(so_2), | |
5233 | .d(1'b0), | |
5234 | .q(spare2_flop_unused)); | |
5235 | assign si_2 = so_1; | |
5236 | ||
5237 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
5238 | .out(spare2_buf_32x_unused)); | |
5239 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
5240 | .in1(1'b1), | |
5241 | .in2(1'b1), | |
5242 | .out(spare2_nand3_8x_unused)); | |
5243 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
5244 | .out(spare2_inv_8x_unused)); | |
5245 | cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1), | |
5246 | .in01(1'b1), | |
5247 | .in10(1'b1), | |
5248 | .in11(1'b1), | |
5249 | .out(spare2_aoi22_4x_unused)); | |
5250 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
5251 | .out(spare2_buf_8x_unused)); | |
5252 | cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1), | |
5253 | .in01(1'b1), | |
5254 | .in10(1'b1), | |
5255 | .in11(1'b1), | |
5256 | .out(spare2_oai22_4x_unused)); | |
5257 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
5258 | .out(spare2_inv_16x_unused)); | |
5259 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
5260 | .in1(1'b1), | |
5261 | .out(spare2_nand2_16x_unused)); | |
5262 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
5263 | .in1(1'b0), | |
5264 | .in2(1'b0), | |
5265 | .out(spare2_nor3_4x_unused)); | |
5266 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
5267 | .in1(1'b1), | |
5268 | .out(spare2_nand2_8x_unused)); | |
5269 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
5270 | .out(spare2_buf_16x_unused)); | |
5271 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
5272 | .in1(1'b0), | |
5273 | .out(spare2_nor2_16x_unused)); | |
5274 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
5275 | .out(spare2_inv_32x_unused)); | |
5276 | ||
5277 | cl_sc1_msff_8x spare3_flop (.l1clk(l1clk), | |
5278 | .siclk(siclk), | |
5279 | .soclk(soclk), | |
5280 | .si(si_3), | |
5281 | .so(so_3), | |
5282 | .d(1'b0), | |
5283 | .q(spare3_flop_unused)); | |
5284 | assign si_3 = so_2; | |
5285 | ||
5286 | cl_u1_buf_32x spare3_buf_32x (.in(1'b1), | |
5287 | .out(spare3_buf_32x_unused)); | |
5288 | cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1), | |
5289 | .in1(1'b1), | |
5290 | .in2(1'b1), | |
5291 | .out(spare3_nand3_8x_unused)); | |
5292 | cl_u1_inv_8x spare3_inv_8x (.in(1'b1), | |
5293 | .out(spare3_inv_8x_unused)); | |
5294 | cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1), | |
5295 | .in01(1'b1), | |
5296 | .in10(1'b1), | |
5297 | .in11(1'b1), | |
5298 | .out(spare3_aoi22_4x_unused)); | |
5299 | cl_u1_buf_8x spare3_buf_8x (.in(1'b1), | |
5300 | .out(spare3_buf_8x_unused)); | |
5301 | cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1), | |
5302 | .in01(1'b1), | |
5303 | .in10(1'b1), | |
5304 | .in11(1'b1), | |
5305 | .out(spare3_oai22_4x_unused)); | |
5306 | cl_u1_inv_16x spare3_inv_16x (.in(1'b1), | |
5307 | .out(spare3_inv_16x_unused)); | |
5308 | cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1), | |
5309 | .in1(1'b1), | |
5310 | .out(spare3_nand2_16x_unused)); | |
5311 | cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0), | |
5312 | .in1(1'b0), | |
5313 | .in2(1'b0), | |
5314 | .out(spare3_nor3_4x_unused)); | |
5315 | cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1), | |
5316 | .in1(1'b1), | |
5317 | .out(spare3_nand2_8x_unused)); | |
5318 | cl_u1_buf_16x spare3_buf_16x (.in(1'b1), | |
5319 | .out(spare3_buf_16x_unused)); | |
5320 | cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0), | |
5321 | .in1(1'b0), | |
5322 | .out(spare3_nor2_16x_unused)); | |
5323 | cl_u1_inv_32x spare3_inv_32x (.in(1'b1), | |
5324 | .out(spare3_inv_32x_unused)); | |
5325 | assign scan_out = so_3; | |
5326 | ||
5327 | ||
5328 | ||
5329 | endmodule | |
5330 |