Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: spc_lb_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 SHFT_LENGTH 15'b010_0000_0000_0000 // (Longest) Shift Length | |
36 | `define VECT_COUNT 16'b0000_0000_0000_0011 // Vector Count | |
37 | `define PRPG_SEED 24'h111111 // PRPG Seed (non-zero) | |
38 | `define CH_BYP 16'b0000_0000_0000_0000 // Bypass Channels (Outputs) | |
39 | ||
40 | module spc_lb_ctl ( | |
41 | l2clk, | |
42 | tcu_pce_ov, | |
43 | scan_in, | |
44 | scan_out, | |
45 | aclk, | |
46 | bclk, | |
47 | scan_en, | |
48 | se_scancollar_in, | |
49 | se_scancollar_out, | |
50 | clk_stop, | |
51 | test_mode, | |
52 | wmr_protect, | |
53 | array_wr_inhibit, | |
54 | io_si, | |
55 | mbist_si, | |
56 | io_so, | |
57 | mbist_so, | |
58 | lbist_start, | |
59 | lbist_pgm, | |
60 | lbist_done, | |
61 | lbist_run, | |
62 | channel_so, | |
63 | mb_channel_so, | |
64 | channel_si, | |
65 | mb_channel_si, | |
66 | core_aclk, | |
67 | core_bclk, | |
68 | core_scan_en, | |
69 | core_scan_en_wmr, | |
70 | core_se_sc_in, | |
71 | core_se_sc_out, | |
72 | core_clk_stop, | |
73 | core_awi, | |
74 | slow_cmp_sync_en, | |
75 | core_isolate); | |
76 | wire pce_ov; | |
77 | wire stop; | |
78 | wire lb_int_clk_stop; | |
79 | wire se; | |
80 | wire siclk; | |
81 | wire soclk; | |
82 | wire clock_enable; | |
83 | wire [4:0] lbcontrol_out; | |
84 | wire lbl2clk; | |
85 | wire l1clk_pm1; | |
86 | wire frl1clk; | |
87 | wire lb_clkstop_reg_scanin; | |
88 | wire lb_clkstop_reg_scanout; | |
89 | wire lb_iocmpsyncen_reg_scanin; | |
90 | wire lb_iocmpsyncen_reg_scanout; | |
91 | wire io_cmp_sync_en_local; | |
92 | wire lb_control_reg_scanin; | |
93 | wire lb_control_reg_scanout; | |
94 | wire [4:0] lbcontrol_new; | |
95 | wire reset; | |
96 | wire lb_done; | |
97 | wire load_default; | |
98 | wire load_pgm; | |
99 | wire capclk_done; | |
100 | wire init_done; | |
101 | wire init_cycle; | |
102 | wire vect_count_equal; | |
103 | wire capture_mode; | |
104 | wire vect_unload_done; | |
105 | wire lb_shftpgm_reg_scanin; | |
106 | wire lb_shftpgm_reg_scanout; | |
107 | wire [14:0] shft_pgm_new; | |
108 | wire [14:0] shft_pgm_out; | |
109 | wire lb_shftcnt_reg_scanin; | |
110 | wire lb_shftcnt_reg_scanout; | |
111 | wire [18:0] shft_cnt_new; | |
112 | wire [18:0] shft_cnt_out; | |
113 | wire shift_chains; | |
114 | wire shft_count_equal; | |
115 | wire capclk_cycle; | |
116 | wire lb_capclkcnt_reg_scanin; | |
117 | wire lb_capclkcnt_reg_scanout; | |
118 | wire [4:0] capclk_cnt_new; | |
119 | wire [4:0] capclk_cnt_out; | |
120 | wire lb_vectpgm_reg_scanin; | |
121 | wire lb_vectpgm_reg_scanout; | |
122 | wire [15:0] vect_pgm_new; | |
123 | wire [15:0] vect_pgm_out; | |
124 | wire lb_vectorcnt_reg_scanin; | |
125 | wire lb_vectorcnt_reg_scanout; | |
126 | wire [15:0] vect_cnt_new; | |
127 | wire [15:0] vect_cnt_out; | |
128 | wire increase_vect_cnt; | |
129 | wire lb_clk_stop; | |
130 | wire lb_scan_en; | |
131 | wire lb_aclk; | |
132 | wire lb_bclk; | |
133 | wire lb_prpg_reg_scanin; | |
134 | wire lb_prpg_reg_scanout; | |
135 | wire [23:0] prpg_new; | |
136 | wire [23:0] prpg_out; | |
137 | wire prpg_run; | |
138 | wire [23:0] prpg_calc; | |
139 | wire prpg_xor7_out; | |
140 | wire prpg_xor2_out; | |
141 | wire prpg_xor1_out; | |
142 | wire lb_misr_reg_scanin; | |
143 | wire lb_misr_reg_scanout; | |
144 | wire [23:0] misr_new; | |
145 | wire [23:0] misr_out; | |
146 | wire misr_run; | |
147 | wire [23:0] misr_calc; | |
148 | wire misr_xor7_out; | |
149 | wire [15:0] misr_ch; | |
150 | wire misr_xor2_out; | |
151 | wire misr_xor1_out; | |
152 | wire [15:0] ch_byp; | |
153 | wire lb_cb_reg_scanin; | |
154 | wire lb_cb_reg_scanout; | |
155 | wire [15:0] cb_new; | |
156 | wire [15:0] cb_out; | |
157 | wire lb_done_reg_scanin; | |
158 | wire lb_done_reg_scanout; | |
159 | wire spare_scanin; | |
160 | wire spare_scanout; | |
161 | ||
162 | ||
163 | input l2clk; | |
164 | input tcu_pce_ov; | |
165 | ||
166 | // Scan input/output for this block | |
167 | input scan_in; | |
168 | output scan_out; | |
169 | ||
170 | // Scan Controls for Core & this block (LBIST) are shared | |
171 | input aclk; // Core aclk from TCU | |
172 | input bclk; // Core bclk from TCU | |
173 | input scan_en; // Core scan_en from TCU | |
174 | input se_scancollar_in; | |
175 | input se_scancollar_out; | |
176 | input clk_stop; // Core clk_stop from TCU; must be low | |
177 | // to run Logic BIST | |
178 | input test_mode; // From TCU, indicates ATPG mode | |
179 | input wmr_protect; // From cluster header, protect warm scan outputs | |
180 | input array_wr_inhibit; // From TCU | |
181 | ||
182 | input [1:0] io_si; // From pins: Core scan chain for ATPG | |
183 | input mbist_si; // From TCU: To core's mbist scan chain | |
184 | output [1:0] io_so; // To pins: Core scan chain for ATPG | |
185 | output mbist_so; // To TCU: From core's mbist scan chain | |
186 | ||
187 | // Logic BIST Control Signals | |
188 | input lbist_start; // Drive high and hold to run Logic BIST | |
189 | input lbist_pgm; // Use programmed values, not defaults | |
190 | // Logic BIST Status Signals | |
191 | output lbist_done; // Indicates Logic BIST is done | |
192 | output lbist_run; // Indicates Logic BIST is running | |
193 | ||
194 | input [15:0] channel_so; // Receives so from core scan chains | |
195 | input mb_channel_so; // Receives so from core mbist chain | |
196 | output [15:0] channel_si; // Feeds si of Core scan chains | |
197 | output mb_channel_si; // Feeds si of core's mbist chain | |
198 | ||
199 | output core_aclk; // aclk to Core scan chains | |
200 | output core_bclk; // bclk to Core scan chains | |
201 | output core_scan_en; // scan_en to Core scan chains | |
202 | output core_scan_en_wmr; // scan_en to Core scan chains, wmr protect version | |
203 | output core_se_sc_in; // se_scancollar_in to Core scan chains | |
204 | output core_se_sc_out; // se_scancollar_out to Core scan chains | |
205 | output core_clk_stop; // clk_stop to Core scan chains | |
206 | output core_awi; // array write inhibit to cluster header | |
207 | ||
208 | // Sync Enable | |
209 | input slow_cmp_sync_en; // io_cmp_sync_en from cluster header | |
210 | ||
211 | // Signal to isolate SPC from CCX | |
212 | output core_isolate; // Blocks requests to CCX | |
213 | ||
214 | // ******************************************************************** | |
215 | // Scan reassigns | |
216 | // ******************************************************************** | |
217 | assign pce_ov = tcu_pce_ov; | |
218 | assign stop = lb_int_clk_stop; // this must be free-running | |
219 | assign se = scan_en; | |
220 | assign siclk = aclk; | |
221 | assign soclk = bclk; | |
222 | ||
223 | ||
224 | assign clock_enable = lbist_start | lbcontrol_out[1] | lbist_done; | |
225 | ||
226 | `ifndef FPGA | |
227 | // synopsys translate_off | |
228 | spc_lb_ctll1clkhdr_ctl_macro lbist_clkgen | |
229 | (.l2clk (lbl2clk), | |
230 | .l1en (clock_enable), | |
231 | .l1clk (l1clk_pm1), | |
232 | .pce_ov(pce_ov), | |
233 | .stop(stop), | |
234 | .se(se) ); | |
235 | ||
236 | // ******************************************************************** | |
237 | // Buffer Clock for LBIST to flop headers & Add Staging Flop for | |
238 | // LBIST internal clock stop with its own Flop Header | |
239 | // ******************************************************************** | |
240 | cl_u1_buf_4x lbist_clkbuf // instantiated at back-end request to | |
241 | (.in (l2clk), // isolate clock | |
242 | .out (lbl2clk) ); | |
243 | ||
244 | spc_lb_ctll1clkhdr_ctl_macro lbist_frclkgen | |
245 | (.l2clk (lbl2clk), | |
246 | .l1en (1'b1), | |
247 | .stop (1'b0), | |
248 | .l1clk (frl1clk), | |
249 | .pce_ov(pce_ov), | |
250 | .se(se) ); // free-run clock only to clk_stop staging flop | |
251 | ||
252 | // synopsys translate_on | |
253 | `endif | |
254 | spc_lb_ctlmsff_ctl_macro__width_1 lb_clkstop_reg | |
255 | ( | |
256 | .scan_in(lb_clkstop_reg_scanin), | |
257 | .scan_out(lb_clkstop_reg_scanout), | |
258 | .l1clk (frl1clk), | |
259 | .din (clk_stop), | |
260 | .dout (lb_int_clk_stop), | |
261 | .siclk(siclk), | |
262 | .soclk(soclk) // internal clock stop | |
263 | ); | |
264 | ||
265 | // ******************************************************************** | |
266 | // Flop io_cmp_sync_en | |
267 | // ******************************************************************** | |
268 | spc_lb_ctlmsff_ctl_macro__width_1 lb_iocmpsyncen_reg | |
269 | ( | |
270 | .scan_in(lb_iocmpsyncen_reg_scanin), | |
271 | .scan_out(lb_iocmpsyncen_reg_scanout), | |
272 | .l1clk (l1clk_pm1), | |
273 | .din (slow_cmp_sync_en), | |
274 | .dout (io_cmp_sync_en_local), | |
275 | .siclk(siclk), | |
276 | .soclk(soclk) | |
277 | ); | |
278 | ||
279 | // ******************************************************************** | |
280 | // Control Register | |
281 | // Drive lbist_pgm to prevent reset updates to registers, allows | |
282 | // programmed values to be used instead of defaults | |
283 | // ******************************************************************** | |
284 | spc_lb_ctlmsff_ctl_macro__width_5 lb_control_reg | |
285 | ( | |
286 | .scan_in(lb_control_reg_scanin), | |
287 | .scan_out(lb_control_reg_scanout), | |
288 | .l1clk (l1clk_pm1), | |
289 | .din (lbcontrol_new[4:0]), | |
290 | .dout (lbcontrol_out[4:0]), | |
291 | .siclk(siclk), | |
292 | .soclk(soclk) | |
293 | ); | |
294 | ||
295 | // Generate reset, run signals off of start | |
296 | assign lbcontrol_new[0] = io_cmp_sync_en_local ? lbist_start : lbcontrol_out[0]; | |
297 | assign lbcontrol_new[1] = lbcontrol_out[0]; | |
298 | assign reset = lbcontrol_out[0] & ~lbcontrol_out[1]; | |
299 | ||
300 | // Allow clk_stop to core to override lbist control of core_clk_stop for scan dumps | |
301 | assign lbist_run = lbcontrol_out[1] & ~lb_done & ~test_mode;// & ~clk_stop; | |
302 | ||
303 | // User drives this bit to use programmed values | |
304 | assign lbcontrol_new[2] = lbist_pgm; | |
305 | assign load_default = reset & ~lbcontrol_out[2]; | |
306 | assign load_pgm = reset & lbcontrol_out[2]; | |
307 | ||
308 | // bits [3] & [4] used for control | |
309 | assign lbcontrol_new[3] = reset ? 1'b0 | |
310 | : capclk_done ? 1'b1 | |
311 | : lbcontrol_out[3]; | |
312 | assign init_done = lbcontrol_out[1] & lbcontrol_out[3]; | |
313 | assign init_cycle = lbist_run & ~init_done; | |
314 | ||
315 | assign lbcontrol_new[4] = reset ? 1'b0 | |
316 | : vect_count_equal & capture_mode ? 1'b1 | |
317 | : lbcontrol_out[4]; | |
318 | assign vect_unload_done = lbcontrol_out[4]; | |
319 | ||
320 | // ******************************************************************** | |
321 | // Shift Counter | |
322 | // ******************************************************************** | |
323 | spc_lb_ctlmsff_ctl_macro__width_15 lb_shftpgm_reg | |
324 | ( | |
325 | .scan_in(lb_shftpgm_reg_scanin), | |
326 | .scan_out(lb_shftpgm_reg_scanout), | |
327 | .l1clk (l1clk_pm1), | |
328 | .din (shft_pgm_new[14:0]), | |
329 | .dout (shft_pgm_out[14:0]), | |
330 | .siclk(siclk), | |
331 | .soclk(soclk) | |
332 | ); | |
333 | // Hard-coded default shift count equal to length of longest core scan chain during LBist | |
334 | assign shft_pgm_new[14:0] = load_default ? `SHFT_LENGTH | |
335 | : shft_pgm_out[14:0]; | |
336 | ||
337 | spc_lb_ctlmsff_ctl_macro__width_19 lb_shftcnt_reg | |
338 | ( | |
339 | .scan_in(lb_shftcnt_reg_scanin), | |
340 | .scan_out(lb_shftcnt_reg_scanout), | |
341 | .l1clk (l1clk_pm1), | |
342 | .din (shft_cnt_new[18:0]), | |
343 | .dout (shft_cnt_out[18:0]), | |
344 | .siclk(siclk), | |
345 | .soclk(soclk) | |
346 | ); | |
347 | assign shft_cnt_new[18:0] = load_default ? {`SHFT_LENGTH,4'b0000} | |
348 | : load_pgm ? {shft_pgm_out[14:0],4'b0000} | |
349 | : shift_chains ? (shft_cnt_out[18:0] + 19'b1) | |
350 | : capclk_done ? 19'b0 | |
351 | : shft_cnt_out[18:0]; | |
352 | ||
353 | // 4 lsb's are used to generate and separate a, bclks during lbist | |
354 | // to provide 7 cycles between aclk to bclk changes and bclk to aclk changes | |
355 | assign shft_count_equal = (shft_cnt_out[18:4] == shft_pgm_out[14:0]); | |
356 | assign shift_chains = lbist_run & ~shft_count_equal & ~capclk_cycle; | |
357 | ||
358 | // ******************************************************************** | |
359 | // Capture Clock Counter | |
360 | // ******************************************************************** | |
361 | spc_lb_ctlmsff_ctl_macro__width_5 lb_capclkcnt_reg | |
362 | ( | |
363 | .scan_in(lb_capclkcnt_reg_scanin), | |
364 | .scan_out(lb_capclkcnt_reg_scanout), | |
365 | .l1clk (l1clk_pm1), | |
366 | .din (capclk_cnt_new[4:0]), | |
367 | .dout (capclk_cnt_out[4:0]), | |
368 | .siclk(siclk), | |
369 | .soclk(soclk) | |
370 | ); | |
371 | ||
372 | assign capclk_cnt_new[4:0] = reset ? 5'b10010 | |
373 | : capclk_cycle ? (capclk_cnt_out[4:0] + 5'b1) | |
374 | : capclk_cnt_out[4:0]; | |
375 | ||
376 | assign capclk_cycle = (shft_count_equal | (reset & shft_count_equal)) & lbist_run; | |
377 | assign capclk_done = (capclk_cnt_out[4:0] == 5'b11111); | |
378 | ||
379 | // ******************************************************************** | |
380 | // Vector Counter | |
381 | // ******************************************************************** | |
382 | spc_lb_ctlmsff_ctl_macro__width_16 lb_vectpgm_reg | |
383 | ( | |
384 | .scan_in(lb_vectpgm_reg_scanin), | |
385 | .scan_out(lb_vectpgm_reg_scanout), | |
386 | .l1clk (l1clk_pm1), | |
387 | .din (vect_pgm_new[15:0]), | |
388 | .dout (vect_pgm_out[15:0]), | |
389 | .siclk(siclk), | |
390 | .soclk(soclk) | |
391 | ); | |
392 | // Hard-coded default vector count equal to 2^^15 | |
393 | // msb used to indicate done | |
394 | assign vect_pgm_new[15:0] = load_default ? `VECT_COUNT | |
395 | : vect_pgm_out[15:0]; | |
396 | ||
397 | spc_lb_ctlmsff_ctl_macro__width_16 lb_vectorcnt_reg | |
398 | ( | |
399 | .scan_in(lb_vectorcnt_reg_scanin), | |
400 | .scan_out(lb_vectorcnt_reg_scanout), | |
401 | .l1clk (l1clk_pm1), | |
402 | .din (vect_cnt_new[15:0]), | |
403 | .dout (vect_cnt_out[15:0]), | |
404 | .siclk(siclk), | |
405 | .soclk(soclk) | |
406 | ); | |
407 | ||
408 | // Set vector count equal to number of vector patterns desired; user can define also | |
409 | assign vect_count_equal = (vect_cnt_out[15:0] == vect_pgm_out[15:0]); | |
410 | ||
411 | assign vect_cnt_new[15:0] = reset ? 16'b0 | |
412 | : increase_vect_cnt ? (vect_cnt_out[15:0] + 16'b1) | |
413 | : vect_cnt_out[15:0]; | |
414 | ||
415 | assign lb_done = (vect_cnt_out[15] | vect_unload_done) & lbcontrol_out[1]; | |
416 | ||
417 | assign increase_vect_cnt = lbist_run & capclk_done & ~init_cycle; | |
418 | ||
419 | // ******************************************************************** | |
420 | // Generate Scan Controls for Core | |
421 | // Logic BIST Mode: LBist drives signals | |
422 | // Else: Signals sourced externally to Core | |
423 | // LBIST can't drive scan controls when test_mode driven 'high' | |
424 | // When clk_stop is 'high', lbist loses control of scan | |
425 | // Note: | |
426 | // Bclk, Scan_En and Clk_Stop are separated to insure minimum multi-cycle paths | |
427 | // are met; bclk to scan_en = 3 cycles; scan_en to bclk = 3 cycles; | |
428 | // bclk to clk_stop = 3 cycles; clk_stop to bclk = 1 cycle (clk_stop timed) | |
429 | // ******************************************************************** | |
430 | ||
431 | assign core_clk_stop = (lbist_run & lb_clk_stop) | clk_stop; | |
432 | assign core_scan_en = lbist_run ? lb_scan_en : scan_en; | |
433 | assign core_scan_en_wmr = wmr_protect ? 1'b0 : core_scan_en; | |
434 | assign core_se_sc_in = lbist_run ? lb_scan_en : se_scancollar_in; | |
435 | assign core_se_sc_out = lbist_run ? 1'b1 : se_scancollar_out; | |
436 | assign core_awi = (lbist_run & capclk_cycle) | array_wr_inhibit; | |
437 | ||
438 | // Clock stop occurs out of cluster header with 4-cycle latency | |
439 | assign lb_clk_stop = ~(capclk_cnt_out[4:0] == 5'b10001) // ~h11 to effect h15 | |
440 | & ~(capclk_cnt_out[4:0] == 5'b10010); // ~h12 to effect h16 | |
441 | ||
442 | assign core_aclk = lbist_run ? lb_aclk : aclk; | |
443 | assign core_bclk = lbist_run ? lb_bclk : bclk; | |
444 | ||
445 | assign lb_aclk = (shft_cnt_out[3:0] == 4'b0111); // h7 | |
446 | assign lb_bclk = ~(shft_cnt_out[3:0] == 4'b1111) // hF | |
447 | & ~(capclk_cnt_out[4:0] == 5'b01110) // ~h0E | |
448 | & ~(capclk_cnt_out[4:0] == 5'b01111) // ~h0F | |
449 | & ~(capclk_cnt_out[4:0] == 5'b10000) // ~h10 | |
450 | & ~(capclk_cnt_out[4:0] == 5'b10001) // ~h11 | |
451 | & ~(capclk_cnt_out[4:0] == 5'b10010) // ~h12 | |
452 | & ~(capclk_cnt_out[4:0] == 5'b10011) // ~h13 | |
453 | & ~(capclk_cnt_out[4:0] == 5'b10100) // ~h14 | |
454 | & ~(capclk_cnt_out[4:0] == 5'b10101) // ~h15 | |
455 | & ~(capclk_cnt_out[4:0] == 5'b10110) // ~h16 | |
456 | & ~(capclk_cnt_out[4:0] == 5'b10111);// ~h17 | |
457 | ||
458 | // Note: exit scan shift mode, first turn off scan_en, then turn off bclk | |
459 | assign lb_scan_en = ~(capclk_cnt_out[4:0] == 5'b00111) // ~h07 | |
460 | & ~(capclk_cnt_out[4:0] == 5'b01000) // ~h08 | |
461 | & ~(capclk_cnt_out[4:0] == 5'b01001) // ~h09 | |
462 | & ~(capclk_cnt_out[4:0] == 5'b01010) // ~h0A | |
463 | & ~(capclk_cnt_out[4:0] == 5'b01011) // ~h0B | |
464 | & ~(capclk_cnt_out[4:0] == 5'b01100) // ~h0C | |
465 | & ~(capclk_cnt_out[4:0] == 5'b01101) // ~h0D | |
466 | & ~(capclk_cnt_out[4:0] == 5'b01110) // ~h0E | |
467 | & ~(capclk_cnt_out[4:0] == 5'b01111) // ~h0F | |
468 | & ~(capclk_cnt_out[4:0] == 5'b10000) // ~h10 | |
469 | & ~(capclk_cnt_out[4:0] == 5'b10001) // ~h11 | |
470 | & ~(capclk_cnt_out[4:0] == 5'b10010) // ~h12 | |
471 | & ~(capclk_cnt_out[4:0] == 5'b10011) // ~h13 | |
472 | & ~(capclk_cnt_out[4:0] == 5'b10100) // ~h14 | |
473 | & ~(capclk_cnt_out[4:0] == 5'b10101) // ~h15 | |
474 | & ~(capclk_cnt_out[4:0] == 5'b10110) // ~h16 | |
475 | & ~(capclk_cnt_out[4:0] == 5'b10111) // ~h17 | |
476 | & ~(capclk_cnt_out[4:0] == 5'b11000) // ~h18 | |
477 | & ~(capclk_cnt_out[4:0] == 5'b11001) // ~h19 | |
478 | & ~(capclk_cnt_out[4:0] == 5'b11010) // ~h1A | |
479 | & ~(capclk_cnt_out[4:0] == 5'b11011) // ~h1B | |
480 | & ~(capclk_cnt_out[4:0] == 5'b11100) // ~h1C | |
481 | & ~(capclk_cnt_out[4:0] == 5'b11101) // ~h1D | |
482 | & ~(capclk_cnt_out[4:0] == 5'b11110) // ~h1E | |
483 | & ~(capclk_cnt_out[4:0] == 5'b11111);// ~h1F | |
484 | ||
485 | assign capture_mode = ~lb_aclk & ~lb_bclk & ~lb_scan_en & ~lb_clk_stop; | |
486 | ||
487 | // ******************************************************************** | |
488 | // Psuedo-Random Pattern Generator - updates on bclk | |
489 | // ******************************************************************** | |
490 | spc_lb_ctlmsff_ctl_macro__width_24 lb_prpg_reg | |
491 | ( | |
492 | .scan_in(lb_prpg_reg_scanin), | |
493 | .scan_out(lb_prpg_reg_scanout), | |
494 | .l1clk (l1clk_pm1), | |
495 | .din (prpg_new[23:0]), | |
496 | .dout (prpg_out[23:0]), | |
497 | .siclk(siclk), | |
498 | .soclk(soclk) | |
499 | ); | |
500 | ||
501 | // Hard-coded default Seed can be overridden; Seed must not be zero | |
502 | assign prpg_new[23:0] = load_default ? `PRPG_SEED | |
503 | : load_pgm ? prpg_out[23:0] | |
504 | : prpg_run ? prpg_calc[23:0] | |
505 | : prpg_out[23:0]; | |
506 | ||
507 | // f(x) = x^^24 + x^^7 + x^^2 + x^^1 + 1 | |
508 | assign prpg_calc[23] = prpg_xor7_out; | |
509 | assign prpg_calc[22:0] = prpg_out[23:1]; | |
510 | ||
511 | assign prpg_xor7_out = prpg_out[7] ^ prpg_xor2_out; | |
512 | assign prpg_xor2_out = prpg_out[2] ^ prpg_xor1_out; | |
513 | assign prpg_xor1_out = prpg_out[1] ^ prpg_out[0]; | |
514 | ||
515 | assign prpg_run = ~core_bclk & lbist_run | |
516 | & init_done & ~capclk_cycle; | |
517 | ||
518 | // ******************************************************************** | |
519 | // Pattern Compactor - updates on aclk | |
520 | // ******************************************************************** | |
521 | spc_lb_ctlmsff_ctl_macro__width_24 lb_misr_reg | |
522 | ( | |
523 | .scan_in(lb_misr_reg_scanin), | |
524 | .scan_out(lb_misr_reg_scanout), | |
525 | .l1clk (l1clk_pm1), | |
526 | .din (misr_new[23:0]), | |
527 | .dout (misr_out[23:0]), | |
528 | .siclk(siclk), | |
529 | .soclk(soclk) | |
530 | ); | |
531 | ||
532 | assign misr_new[23:0] = reset ? 24'b0 | |
533 | : misr_run ? misr_calc[23:0] | |
534 | : misr_out[23:0]; | |
535 | ||
536 | assign misr_run = core_aclk & lbist_run | |
537 | & init_done & ~capclk_cycle | |
538 | & (|(vect_cnt_out[15:0])); | |
539 | ||
540 | // f(x) = x^^24 + x^^7 + x^^2 + x^^1 + 1 | |
541 | assign misr_calc[23] = misr_xor7_out; | |
542 | assign misr_calc[22:16] = misr_out[23:17]; | |
543 | assign misr_calc[15] = misr_out[16] ^ misr_ch[15]; | |
544 | assign misr_calc[14] = misr_out[15] ^ misr_ch[14]; | |
545 | assign misr_calc[13] = misr_out[14] ^ misr_ch[13]; | |
546 | assign misr_calc[12] = misr_out[13] ^ misr_ch[12]; | |
547 | assign misr_calc[11] = misr_out[12] ^ misr_ch[11]; | |
548 | assign misr_calc[10] = misr_out[11] ^ misr_ch[10]; | |
549 | assign misr_calc[9] = misr_out[10] ^ misr_ch[9]; | |
550 | assign misr_calc[8] = misr_out[9] ^ misr_ch[8]; | |
551 | assign misr_calc[7] = misr_out[8] ^ misr_ch[7]; | |
552 | assign misr_calc[6] = misr_out[7] ^ misr_ch[6]; | |
553 | assign misr_calc[5] = misr_out[6] ^ misr_ch[5]; | |
554 | assign misr_calc[4] = misr_out[5] ^ misr_ch[4]; | |
555 | assign misr_calc[3] = misr_out[4] ^ misr_ch[3]; | |
556 | assign misr_calc[2] = misr_out[3] ^ misr_ch[2]; | |
557 | assign misr_calc[1] = misr_out[2] ^ misr_ch[1]; | |
558 | assign misr_calc[0] = misr_out[1] ^ misr_ch[0]; | |
559 | ||
560 | assign misr_xor7_out = misr_out[7] ^ misr_xor2_out; | |
561 | assign misr_xor2_out = misr_out[2] ^ misr_xor1_out; | |
562 | assign misr_xor1_out = misr_out[1] ^ misr_out[0]; | |
563 | ||
564 | // ******************************************************************** | |
565 | // Drive Channels to Core | |
566 | // ******************************************************************** | |
567 | // These feed the scan_in of the channels in the core | |
568 | // Outputs to Core Scan Chains (16 Channels + mbist) | |
569 | // Channel 15 is the warm reset protected scan-out from the SPC | |
570 | // assign channel_si[15] = lbist_run ? prpg_out[15] : 1'b0; | |
571 | // assign channel_si[14] = lbist_run ? prpg_out[14] : io_si[1]; | |
572 | assign channel_si[15] = lbist_run ? prpg_out[15] : io_si[1]; | |
573 | assign channel_si[14] = lbist_run ? prpg_out[14] : wmr_protect ? 1'b0 : channel_so[15]; | |
574 | assign channel_si[13] = lbist_run ? prpg_out[13] : channel_so[14]; | |
575 | assign channel_si[12] = lbist_run ? prpg_out[12] : channel_so[13]; | |
576 | assign channel_si[11] = lbist_run ? prpg_out[11] : channel_so[12]; | |
577 | assign channel_si[10] = lbist_run ? prpg_out[10] : channel_so[11]; | |
578 | assign channel_si[9] = lbist_run ? prpg_out[9] : channel_so[10]; | |
579 | assign channel_si[8] = lbist_run ? prpg_out[8] : channel_so[9]; | |
580 | assign channel_si[7] = lbist_run ? prpg_out[7] : channel_so[8]; | |
581 | assign channel_si[6] = lbist_run ? prpg_out[6] : channel_so[7]; | |
582 | assign channel_si[5] = lbist_run ? prpg_out[5] : channel_so[6]; | |
583 | assign channel_si[4] = lbist_run ? prpg_out[4] : channel_so[5]; | |
584 | assign channel_si[3] = lbist_run ? prpg_out[3] : io_si[0]; | |
585 | assign channel_si[2] = lbist_run ? prpg_out[2] : channel_so[3]; | |
586 | assign channel_si[1] = lbist_run ? prpg_out[1] : channel_so[2]; | |
587 | assign channel_si[0] = lbist_run ? prpg_out[0] : channel_so[1]; | |
588 | assign mb_channel_si = lbist_run ? channel_so[0] : mbist_si; | |
589 | ||
590 | // ******************************************************************** | |
591 | // Receive Channels from Core | |
592 | // ******************************************************************** | |
593 | // Inputs from Core Scan Chains (16 Channels + mbist) | |
594 | ||
595 | // 0in known_driven -var (channel_so[15:0] & ~ch_byp[15:0]) -clock l2clk -active misr_run -group zin_core_lbist -message "LBIST : X's detected on channel_so" | |
596 | ||
597 | assign misr_ch[15] = channel_so[15] & ~ch_byp[15]; | |
598 | assign misr_ch[14] = channel_so[14] & ~ch_byp[14]; | |
599 | assign misr_ch[13] = channel_so[13] & ~ch_byp[13]; | |
600 | assign misr_ch[12] = channel_so[12] & ~ch_byp[12]; | |
601 | assign misr_ch[11] = channel_so[11] & ~ch_byp[11]; | |
602 | assign misr_ch[10] = channel_so[10] & ~ch_byp[10]; | |
603 | assign misr_ch[9] = channel_so[9] & ~ch_byp[9]; | |
604 | assign misr_ch[8] = channel_so[8] & ~ch_byp[8]; | |
605 | assign misr_ch[7] = channel_so[7] & ~ch_byp[7]; | |
606 | assign misr_ch[6] = channel_so[6] & ~ch_byp[6]; | |
607 | assign misr_ch[5] = channel_so[5] & ~ch_byp[5]; | |
608 | assign misr_ch[4] = channel_so[4] & ~ch_byp[4]; | |
609 | assign misr_ch[3] = channel_so[3] & ~ch_byp[3]; | |
610 | assign misr_ch[2] = channel_so[2] & ~ch_byp[2]; | |
611 | assign misr_ch[1] = channel_so[1] & ~ch_byp[1]; | |
612 | assign misr_ch[0] = mb_channel_so & ~ch_byp[0]; | |
613 | ||
614 | ||
615 | assign io_so[1] = channel_so[4]; | |
616 | assign io_so[0] = channel_so[0]; | |
617 | assign mbist_so = mb_channel_so; | |
618 | ||
619 | // ******************************************************************** | |
620 | // Pattern Disable & Channel Bypass | |
621 | // ******************************************************************** | |
622 | spc_lb_ctlmsff_ctl_macro__width_16 lb_cb_reg | |
623 | ( | |
624 | .scan_in(lb_cb_reg_scanin), | |
625 | .scan_out(lb_cb_reg_scanout), | |
626 | .l1clk (l1clk_pm1), | |
627 | .din (cb_new[15:0]), | |
628 | .dout (cb_out[15:0]), | |
629 | .siclk(siclk), | |
630 | .soclk(soclk) | |
631 | ); | |
632 | // Default is no channel bypass (16'b0) | |
633 | assign cb_new[15:0] = load_default ? `CH_BYP | |
634 | : load_pgm ? cb_out[15:0] | |
635 | : cb_out[15:0]; | |
636 | assign ch_byp[15:0] = cb_out[15:0]; | |
637 | ||
638 | // ******************************************************************** | |
639 | // Generate LBist Done on IO Clock Domain | |
640 | // ******************************************************************** | |
641 | spc_lb_ctlmsff_ctl_macro__en_1__width_1 lb_done_reg | |
642 | ( | |
643 | .scan_in(lb_done_reg_scanin), | |
644 | .scan_out(lb_done_reg_scanout), | |
645 | .l1clk (l1clk_pm1), | |
646 | .en (io_cmp_sync_en_local), | |
647 | .din (lb_done), | |
648 | .dout (lbist_done), | |
649 | .siclk(siclk), | |
650 | .soclk(soclk) | |
651 | ); | |
652 | ||
653 | // ******************************************************************** | |
654 | // Signal to isolate SPC from CCX; Blocks requests to CCX | |
655 | // during either ATPG or JTAG scan, or during LBIST | |
656 | // ******************************************************************** | |
657 | assign core_isolate = scan_en | lbist_run; | |
658 | ||
659 | spc_lb_ctlspare_ctl_macro__num_3 spare | |
660 | ( | |
661 | .l1clk (l1clk_pm1 ), | |
662 | .scan_in (spare_scanin ), | |
663 | .scan_out (spare_scanout ), | |
664 | .siclk(siclk), | |
665 | .soclk(soclk) | |
666 | ); | |
667 | ||
668 | // fixscan start:lb_clkstop_reg_scanin | |
669 | assign lb_clkstop_reg_scanin = scan_in ; | |
670 | assign lb_iocmpsyncen_reg_scanin = lb_clkstop_reg_scanout ; | |
671 | assign lb_control_reg_scanin = lb_iocmpsyncen_reg_scanout ; | |
672 | assign lb_shftpgm_reg_scanin = lb_control_reg_scanout ; | |
673 | assign lb_shftcnt_reg_scanin = lb_shftpgm_reg_scanout ; | |
674 | assign lb_capclkcnt_reg_scanin = lb_shftcnt_reg_scanout ; | |
675 | assign lb_vectpgm_reg_scanin = lb_capclkcnt_reg_scanout ; | |
676 | assign lb_vectorcnt_reg_scanin = lb_vectpgm_reg_scanout ; | |
677 | assign lb_prpg_reg_scanin = lb_vectorcnt_reg_scanout ; | |
678 | assign lb_misr_reg_scanin = lb_prpg_reg_scanout ; | |
679 | assign lb_cb_reg_scanin = lb_misr_reg_scanout ; | |
680 | assign lb_done_reg_scanin = lb_cb_reg_scanout ; | |
681 | assign spare_scanin = lb_done_reg_scanout ; | |
682 | assign scan_out = spare_scanout ; | |
683 | // fixscan end: | |
684 | endmodule | |
685 | ||
686 | ||
687 | ||
688 | ||
689 | ||
690 | ||
691 | // any PARAMS parms go into naming of macro | |
692 | ||
693 | module spc_lb_ctll1clkhdr_ctl_macro ( | |
694 | l2clk, | |
695 | l1en, | |
696 | pce_ov, | |
697 | stop, | |
698 | se, | |
699 | l1clk); | |
700 | ||
701 | ||
702 | input l2clk; | |
703 | input l1en; | |
704 | input pce_ov; | |
705 | input stop; | |
706 | input se; | |
707 | output l1clk; | |
708 | ||
709 | ||
710 | ||
711 | ||
712 | ||
713 | cl_sc1_l1hdr_8x c_0 ( | |
714 | ||
715 | ||
716 | .l2clk(l2clk), | |
717 | .pce(l1en), | |
718 | .l1clk(l1clk), | |
719 | .se(se), | |
720 | .pce_ov(pce_ov), | |
721 | .stop(stop) | |
722 | ); | |
723 | ||
724 | ||
725 | ||
726 | endmodule | |
727 | ||
728 | ||
729 | ||
730 | ||
731 | ||
732 | ||
733 | ||
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | ||
740 | // any PARAMS parms go into naming of macro | |
741 | ||
742 | module spc_lb_ctlmsff_ctl_macro__width_1 ( | |
743 | din, | |
744 | l1clk, | |
745 | scan_in, | |
746 | siclk, | |
747 | soclk, | |
748 | dout, | |
749 | scan_out); | |
750 | wire [0:0] fdin; | |
751 | ||
752 | input [0:0] din; | |
753 | input l1clk; | |
754 | input scan_in; | |
755 | ||
756 | ||
757 | input siclk; | |
758 | input soclk; | |
759 | ||
760 | output [0:0] dout; | |
761 | output scan_out; | |
762 | assign fdin[0:0] = din[0:0]; | |
763 | ||
764 | ||
765 | ||
766 | ||
767 | ||
768 | ||
769 | dff #(1) d0_0 ( | |
770 | .l1clk(l1clk), | |
771 | .siclk(siclk), | |
772 | .soclk(soclk), | |
773 | .d(fdin[0:0]), | |
774 | .si(scan_in), | |
775 | .so(scan_out), | |
776 | .q(dout[0:0]) | |
777 | ); | |
778 | ||
779 | ||
780 | ||
781 | ||
782 | ||
783 | ||
784 | ||
785 | ||
786 | ||
787 | ||
788 | ||
789 | ||
790 | endmodule | |
791 | ||
792 | ||
793 | ||
794 | ||
795 | ||
796 | ||
797 | ||
798 | ||
799 | ||
800 | ||
801 | ||
802 | ||
803 | ||
804 | // any PARAMS parms go into naming of macro | |
805 | ||
806 | module spc_lb_ctlmsff_ctl_macro__width_5 ( | |
807 | din, | |
808 | l1clk, | |
809 | scan_in, | |
810 | siclk, | |
811 | soclk, | |
812 | dout, | |
813 | scan_out); | |
814 | wire [4:0] fdin; | |
815 | wire [3:0] so; | |
816 | ||
817 | input [4:0] din; | |
818 | input l1clk; | |
819 | input scan_in; | |
820 | ||
821 | ||
822 | input siclk; | |
823 | input soclk; | |
824 | ||
825 | output [4:0] dout; | |
826 | output scan_out; | |
827 | assign fdin[4:0] = din[4:0]; | |
828 | ||
829 | ||
830 | ||
831 | ||
832 | ||
833 | ||
834 | dff #(5) d0_0 ( | |
835 | .l1clk(l1clk), | |
836 | .siclk(siclk), | |
837 | .soclk(soclk), | |
838 | .d(fdin[4:0]), | |
839 | .si({scan_in,so[3:0]}), | |
840 | .so({so[3:0],scan_out}), | |
841 | .q(dout[4:0]) | |
842 | ); | |
843 | ||
844 | ||
845 | ||
846 | ||
847 | ||
848 | ||
849 | ||
850 | ||
851 | ||
852 | ||
853 | ||
854 | ||
855 | endmodule | |
856 | ||
857 | ||
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | ||
864 | ||
865 | ||
866 | ||
867 | ||
868 | ||
869 | // any PARAMS parms go into naming of macro | |
870 | ||
871 | module spc_lb_ctlmsff_ctl_macro__width_15 ( | |
872 | din, | |
873 | l1clk, | |
874 | scan_in, | |
875 | siclk, | |
876 | soclk, | |
877 | dout, | |
878 | scan_out); | |
879 | wire [14:0] fdin; | |
880 | wire [13:0] so; | |
881 | ||
882 | input [14:0] din; | |
883 | input l1clk; | |
884 | input scan_in; | |
885 | ||
886 | ||
887 | input siclk; | |
888 | input soclk; | |
889 | ||
890 | output [14:0] dout; | |
891 | output scan_out; | |
892 | assign fdin[14:0] = din[14:0]; | |
893 | ||
894 | ||
895 | ||
896 | ||
897 | ||
898 | ||
899 | dff #(15) d0_0 ( | |
900 | .l1clk(l1clk), | |
901 | .siclk(siclk), | |
902 | .soclk(soclk), | |
903 | .d(fdin[14:0]), | |
904 | .si({scan_in,so[13:0]}), | |
905 | .so({so[13:0],scan_out}), | |
906 | .q(dout[14:0]) | |
907 | ); | |
908 | ||
909 | ||
910 | ||
911 | ||
912 | ||
913 | ||
914 | ||
915 | ||
916 | ||
917 | ||
918 | ||
919 | ||
920 | endmodule | |
921 | ||
922 | ||
923 | ||
924 | ||
925 | ||
926 | ||
927 | ||
928 | ||
929 | ||
930 | ||
931 | ||
932 | ||
933 | ||
934 | // any PARAMS parms go into naming of macro | |
935 | ||
936 | module spc_lb_ctlmsff_ctl_macro__width_19 ( | |
937 | din, | |
938 | l1clk, | |
939 | scan_in, | |
940 | siclk, | |
941 | soclk, | |
942 | dout, | |
943 | scan_out); | |
944 | wire [18:0] fdin; | |
945 | wire [17:0] so; | |
946 | ||
947 | input [18:0] din; | |
948 | input l1clk; | |
949 | input scan_in; | |
950 | ||
951 | ||
952 | input siclk; | |
953 | input soclk; | |
954 | ||
955 | output [18:0] dout; | |
956 | output scan_out; | |
957 | assign fdin[18:0] = din[18:0]; | |
958 | ||
959 | ||
960 | ||
961 | ||
962 | ||
963 | ||
964 | dff #(19) d0_0 ( | |
965 | .l1clk(l1clk), | |
966 | .siclk(siclk), | |
967 | .soclk(soclk), | |
968 | .d(fdin[18:0]), | |
969 | .si({scan_in,so[17:0]}), | |
970 | .so({so[17:0],scan_out}), | |
971 | .q(dout[18:0]) | |
972 | ); | |
973 | ||
974 | ||
975 | ||
976 | ||
977 | ||
978 | ||
979 | ||
980 | ||
981 | ||
982 | ||
983 | ||
984 | ||
985 | endmodule | |
986 | ||
987 | ||
988 | ||
989 | ||
990 | ||
991 | ||
992 | ||
993 | ||
994 | ||
995 | ||
996 | ||
997 | ||
998 | ||
999 | // any PARAMS parms go into naming of macro | |
1000 | ||
1001 | module spc_lb_ctlmsff_ctl_macro__width_16 ( | |
1002 | din, | |
1003 | l1clk, | |
1004 | scan_in, | |
1005 | siclk, | |
1006 | soclk, | |
1007 | dout, | |
1008 | scan_out); | |
1009 | wire [15:0] fdin; | |
1010 | wire [14:0] so; | |
1011 | ||
1012 | input [15:0] din; | |
1013 | input l1clk; | |
1014 | input scan_in; | |
1015 | ||
1016 | ||
1017 | input siclk; | |
1018 | input soclk; | |
1019 | ||
1020 | output [15:0] dout; | |
1021 | output scan_out; | |
1022 | assign fdin[15:0] = din[15:0]; | |
1023 | ||
1024 | ||
1025 | ||
1026 | ||
1027 | ||
1028 | ||
1029 | dff #(16) d0_0 ( | |
1030 | .l1clk(l1clk), | |
1031 | .siclk(siclk), | |
1032 | .soclk(soclk), | |
1033 | .d(fdin[15:0]), | |
1034 | .si({scan_in,so[14:0]}), | |
1035 | .so({so[14:0],scan_out}), | |
1036 | .q(dout[15:0]) | |
1037 | ); | |
1038 | ||
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | ||
1044 | ||
1045 | ||
1046 | ||
1047 | ||
1048 | ||
1049 | ||
1050 | endmodule | |
1051 | ||
1052 | ||
1053 | ||
1054 | ||
1055 | ||
1056 | ||
1057 | ||
1058 | ||
1059 | ||
1060 | ||
1061 | ||
1062 | ||
1063 | ||
1064 | // any PARAMS parms go into naming of macro | |
1065 | ||
1066 | module spc_lb_ctlmsff_ctl_macro__width_24 ( | |
1067 | din, | |
1068 | l1clk, | |
1069 | scan_in, | |
1070 | siclk, | |
1071 | soclk, | |
1072 | dout, | |
1073 | scan_out); | |
1074 | wire [23:0] fdin; | |
1075 | wire [22:0] so; | |
1076 | ||
1077 | input [23:0] din; | |
1078 | input l1clk; | |
1079 | input scan_in; | |
1080 | ||
1081 | ||
1082 | input siclk; | |
1083 | input soclk; | |
1084 | ||
1085 | output [23:0] dout; | |
1086 | output scan_out; | |
1087 | assign fdin[23:0] = din[23:0]; | |
1088 | ||
1089 | ||
1090 | ||
1091 | ||
1092 | ||
1093 | ||
1094 | dff #(24) d0_0 ( | |
1095 | .l1clk(l1clk), | |
1096 | .siclk(siclk), | |
1097 | .soclk(soclk), | |
1098 | .d(fdin[23:0]), | |
1099 | .si({scan_in,so[22:0]}), | |
1100 | .so({so[22:0],scan_out}), | |
1101 | .q(dout[23:0]) | |
1102 | ); | |
1103 | ||
1104 | ||
1105 | ||
1106 | ||
1107 | ||
1108 | ||
1109 | ||
1110 | ||
1111 | ||
1112 | ||
1113 | ||
1114 | ||
1115 | endmodule | |
1116 | ||
1117 | ||
1118 | ||
1119 | ||
1120 | ||
1121 | ||
1122 | ||
1123 | ||
1124 | ||
1125 | ||
1126 | ||
1127 | ||
1128 | ||
1129 | // any PARAMS parms go into naming of macro | |
1130 | ||
1131 | module spc_lb_ctlmsff_ctl_macro__en_1__width_1 ( | |
1132 | din, | |
1133 | en, | |
1134 | l1clk, | |
1135 | scan_in, | |
1136 | siclk, | |
1137 | soclk, | |
1138 | dout, | |
1139 | scan_out); | |
1140 | wire [0:0] fdin; | |
1141 | ||
1142 | input [0:0] din; | |
1143 | input en; | |
1144 | input l1clk; | |
1145 | input scan_in; | |
1146 | ||
1147 | ||
1148 | input siclk; | |
1149 | input soclk; | |
1150 | ||
1151 | output [0:0] dout; | |
1152 | output scan_out; | |
1153 | assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}}); | |
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | ||
1159 | ||
1160 | dff #(1) d0_0 ( | |
1161 | .l1clk(l1clk), | |
1162 | .siclk(siclk), | |
1163 | .soclk(soclk), | |
1164 | .d(fdin[0:0]), | |
1165 | .si(scan_in), | |
1166 | .so(scan_out), | |
1167 | .q(dout[0:0]) | |
1168 | ); | |
1169 | ||
1170 | ||
1171 | ||
1172 | ||
1173 | ||
1174 | ||
1175 | ||
1176 | ||
1177 | ||
1178 | ||
1179 | ||
1180 | ||
1181 | endmodule | |
1182 | ||
1183 | ||
1184 | ||
1185 | ||
1186 | ||
1187 | ||
1188 | ||
1189 | ||
1190 | ||
1191 | // Description: Spare gate macro for control blocks | |
1192 | // | |
1193 | // Param num controls the number of times the macro is added | |
1194 | // flops=0 can be used to use only combination spare logic | |
1195 | ||
1196 | ||
1197 | module spc_lb_ctlspare_ctl_macro__num_3 ( | |
1198 | l1clk, | |
1199 | scan_in, | |
1200 | siclk, | |
1201 | soclk, | |
1202 | scan_out); | |
1203 | wire si_0; | |
1204 | wire so_0; | |
1205 | wire spare0_flop_unused; | |
1206 | wire spare0_buf_32x_unused; | |
1207 | wire spare0_nand3_8x_unused; | |
1208 | wire spare0_inv_8x_unused; | |
1209 | wire spare0_aoi22_4x_unused; | |
1210 | wire spare0_buf_8x_unused; | |
1211 | wire spare0_oai22_4x_unused; | |
1212 | wire spare0_inv_16x_unused; | |
1213 | wire spare0_nand2_16x_unused; | |
1214 | wire spare0_nor3_4x_unused; | |
1215 | wire spare0_nand2_8x_unused; | |
1216 | wire spare0_buf_16x_unused; | |
1217 | wire spare0_nor2_16x_unused; | |
1218 | wire spare0_inv_32x_unused; | |
1219 | wire si_1; | |
1220 | wire so_1; | |
1221 | wire spare1_flop_unused; | |
1222 | wire spare1_buf_32x_unused; | |
1223 | wire spare1_nand3_8x_unused; | |
1224 | wire spare1_inv_8x_unused; | |
1225 | wire spare1_aoi22_4x_unused; | |
1226 | wire spare1_buf_8x_unused; | |
1227 | wire spare1_oai22_4x_unused; | |
1228 | wire spare1_inv_16x_unused; | |
1229 | wire spare1_nand2_16x_unused; | |
1230 | wire spare1_nor3_4x_unused; | |
1231 | wire spare1_nand2_8x_unused; | |
1232 | wire spare1_buf_16x_unused; | |
1233 | wire spare1_nor2_16x_unused; | |
1234 | wire spare1_inv_32x_unused; | |
1235 | wire si_2; | |
1236 | wire so_2; | |
1237 | wire spare2_flop_unused; | |
1238 | wire spare2_buf_32x_unused; | |
1239 | wire spare2_nand3_8x_unused; | |
1240 | wire spare2_inv_8x_unused; | |
1241 | wire spare2_aoi22_4x_unused; | |
1242 | wire spare2_buf_8x_unused; | |
1243 | wire spare2_oai22_4x_unused; | |
1244 | wire spare2_inv_16x_unused; | |
1245 | wire spare2_nand2_16x_unused; | |
1246 | wire spare2_nor3_4x_unused; | |
1247 | wire spare2_nand2_8x_unused; | |
1248 | wire spare2_buf_16x_unused; | |
1249 | wire spare2_nor2_16x_unused; | |
1250 | wire spare2_inv_32x_unused; | |
1251 | ||
1252 | ||
1253 | input l1clk; | |
1254 | input scan_in; | |
1255 | input siclk; | |
1256 | input soclk; | |
1257 | output scan_out; | |
1258 | ||
1259 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
1260 | .siclk(siclk), | |
1261 | .soclk(soclk), | |
1262 | .si(si_0), | |
1263 | .so(so_0), | |
1264 | .d(1'b0), | |
1265 | .q(spare0_flop_unused)); | |
1266 | assign si_0 = scan_in; | |
1267 | ||
1268 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
1269 | .out(spare0_buf_32x_unused)); | |
1270 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
1271 | .in1(1'b1), | |
1272 | .in2(1'b1), | |
1273 | .out(spare0_nand3_8x_unused)); | |
1274 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
1275 | .out(spare0_inv_8x_unused)); | |
1276 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
1277 | .in01(1'b1), | |
1278 | .in10(1'b1), | |
1279 | .in11(1'b1), | |
1280 | .out(spare0_aoi22_4x_unused)); | |
1281 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
1282 | .out(spare0_buf_8x_unused)); | |
1283 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
1284 | .in01(1'b1), | |
1285 | .in10(1'b1), | |
1286 | .in11(1'b1), | |
1287 | .out(spare0_oai22_4x_unused)); | |
1288 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
1289 | .out(spare0_inv_16x_unused)); | |
1290 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
1291 | .in1(1'b1), | |
1292 | .out(spare0_nand2_16x_unused)); | |
1293 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
1294 | .in1(1'b0), | |
1295 | .in2(1'b0), | |
1296 | .out(spare0_nor3_4x_unused)); | |
1297 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
1298 | .in1(1'b1), | |
1299 | .out(spare0_nand2_8x_unused)); | |
1300 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
1301 | .out(spare0_buf_16x_unused)); | |
1302 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
1303 | .in1(1'b0), | |
1304 | .out(spare0_nor2_16x_unused)); | |
1305 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
1306 | .out(spare0_inv_32x_unused)); | |
1307 | ||
1308 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
1309 | .siclk(siclk), | |
1310 | .soclk(soclk), | |
1311 | .si(si_1), | |
1312 | .so(so_1), | |
1313 | .d(1'b0), | |
1314 | .q(spare1_flop_unused)); | |
1315 | assign si_1 = so_0; | |
1316 | ||
1317 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
1318 | .out(spare1_buf_32x_unused)); | |
1319 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
1320 | .in1(1'b1), | |
1321 | .in2(1'b1), | |
1322 | .out(spare1_nand3_8x_unused)); | |
1323 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
1324 | .out(spare1_inv_8x_unused)); | |
1325 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
1326 | .in01(1'b1), | |
1327 | .in10(1'b1), | |
1328 | .in11(1'b1), | |
1329 | .out(spare1_aoi22_4x_unused)); | |
1330 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
1331 | .out(spare1_buf_8x_unused)); | |
1332 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
1333 | .in01(1'b1), | |
1334 | .in10(1'b1), | |
1335 | .in11(1'b1), | |
1336 | .out(spare1_oai22_4x_unused)); | |
1337 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
1338 | .out(spare1_inv_16x_unused)); | |
1339 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
1340 | .in1(1'b1), | |
1341 | .out(spare1_nand2_16x_unused)); | |
1342 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
1343 | .in1(1'b0), | |
1344 | .in2(1'b0), | |
1345 | .out(spare1_nor3_4x_unused)); | |
1346 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
1347 | .in1(1'b1), | |
1348 | .out(spare1_nand2_8x_unused)); | |
1349 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
1350 | .out(spare1_buf_16x_unused)); | |
1351 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
1352 | .in1(1'b0), | |
1353 | .out(spare1_nor2_16x_unused)); | |
1354 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
1355 | .out(spare1_inv_32x_unused)); | |
1356 | ||
1357 | cl_sc1_msff_8x spare2_flop (.l1clk(l1clk), | |
1358 | .siclk(siclk), | |
1359 | .soclk(soclk), | |
1360 | .si(si_2), | |
1361 | .so(so_2), | |
1362 | .d(1'b0), | |
1363 | .q(spare2_flop_unused)); | |
1364 | assign si_2 = so_1; | |
1365 | ||
1366 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
1367 | .out(spare2_buf_32x_unused)); | |
1368 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
1369 | .in1(1'b1), | |
1370 | .in2(1'b1), | |
1371 | .out(spare2_nand3_8x_unused)); | |
1372 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
1373 | .out(spare2_inv_8x_unused)); | |
1374 | cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1), | |
1375 | .in01(1'b1), | |
1376 | .in10(1'b1), | |
1377 | .in11(1'b1), | |
1378 | .out(spare2_aoi22_4x_unused)); | |
1379 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
1380 | .out(spare2_buf_8x_unused)); | |
1381 | cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1), | |
1382 | .in01(1'b1), | |
1383 | .in10(1'b1), | |
1384 | .in11(1'b1), | |
1385 | .out(spare2_oai22_4x_unused)); | |
1386 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
1387 | .out(spare2_inv_16x_unused)); | |
1388 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
1389 | .in1(1'b1), | |
1390 | .out(spare2_nand2_16x_unused)); | |
1391 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
1392 | .in1(1'b0), | |
1393 | .in2(1'b0), | |
1394 | .out(spare2_nor3_4x_unused)); | |
1395 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
1396 | .in1(1'b1), | |
1397 | .out(spare2_nand2_8x_unused)); | |
1398 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
1399 | .out(spare2_buf_16x_unused)); | |
1400 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
1401 | .in1(1'b0), | |
1402 | .out(spare2_nor2_16x_unused)); | |
1403 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
1404 | .out(spare2_inv_32x_unused)); | |
1405 | assign scan_out = so_2; | |
1406 | ||
1407 | ||
1408 | ||
1409 | endmodule | |
1410 |