Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / rtl / spc_mb1_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: spc_mb1_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 ============================================
35module spc_mb1_ctl (
36 scan_out,
37 mb1_done,
38 mb1_run,
39 mb1_addr,
40 mb1_cmpsel,
41 mb1_write_data,
42 mb1_tsa0_read_en,
43 mb1_tsa0_write_en,
44 mb1_tsa1_read_en,
45 mb1_tsa1_write_en,
46 mb1_tca_read_en,
47 mb1_tca_write_en,
48 mb1_scp0_read_en,
49 mb1_scp0_write_en,
50 mb1_scp1_read_en,
51 mb1_scp1_write_en,
52 mb1_mra0_read_en,
53 mb1_mra0_write_en,
54 mb1_mra1_read_en,
55 mb1_mra1_write_en,
56 mb1_mbist_fail,
57 l2clk,
58 scan_in,
59 tcu_pce_ov,
60 tcu_clk_stop,
61 tcu_aclk,
62 tcu_bclk,
63 tcu_scan_en,
64 mb2_misc_pmen,
65 mbist_start,
66 mbist_bisi_mode,
67 mbist_user_mode,
68 mmu_mbi_mra0_fail,
69 mmu_mbi_mra1_fail,
70 mmu_mbi_scp0_fail,
71 mmu_mbi_scp1_fail,
72 tlu_mbi_tsa0_fail,
73 tlu_mbi_tsa1_fail,
74 tlu_mbi_tca_fail);
75wire pce_ov;
76wire stop;
77wire siclk;
78wire soclk;
79wire se;
80wire l1clk;
81wire pmen_scanin;
82wire pmen_scanout;
83wire start_in;
84wire misc_pmen_;
85wire pmem_unused;
86wire clock_enable;
87wire l1clk_pm1;
88wire input_signals_reg_scanin;
89wire input_signals_reg_scanout;
90wire bisi_mode;
91wire user_mode;
92wire mb_enable_reg_scanin;
93wire mb_enable_reg_scanout;
94wire mb_enable;
95wire mb_enable_out;
96wire start;
97wire config_reg_scanin;
98wire config_reg_scanout;
99wire [1:0] config_in;
100wire [1:0] config_out;
101wire start_transition;
102wire end_transition;
103wire reset_engine;
104wire loop_again;
105wire run;
106wire loop_again_reg_scanin;
107wire loop_again_reg_scanout;
108wire stop_engine_l;
109wire stop_engine_l_q;
110wire mb_user_loop_mode;
111wire array_usr_reg_scanin;
112wire array_usr_reg_scanout;
113wire [3:0] user_array_in;
114wire [3:0] user_array;
115wire user_addr_mode_reg_scanin;
116wire user_addr_mode_reg_scanout;
117wire user_addr_mode_in;
118wire user_addr_mode;
119wire user_start_addr_reg_scanin;
120wire user_start_addr_reg_scanout;
121wire [4:0] user_start_addr_in;
122wire [4:0] user_start_addr;
123wire user_stop_addr_reg_scanin;
124wire user_stop_addr_reg_scanout;
125wire [4:0] user_stop_addr_in;
126wire [4:0] user_stop_addr;
127wire user_incr_addr_reg_scanin;
128wire user_incr_addr_reg_scanout;
129wire [4:0] user_incr_addr_in;
130wire [4:0] user_incr_addr;
131wire user_data_mode_reg_scanin;
132wire user_data_mode_reg_scanout;
133wire user_data_mode_in;
134wire user_data_mode;
135wire user_data_reg_scanin;
136wire user_data_reg_scanout;
137wire [7:0] user_data_in;
138wire [7:0] user_data;
139wire user_cmpselinc_hold_reg_scanin;
140wire user_cmpselinc_hold_reg_scanout;
141wire user_cmpselinc_hold_in;
142wire user_cmpselinc_hold;
143wire user_cmpsel_reg_scanin;
144wire user_cmpsel_reg_scanout;
145wire [2:0] user_cmpsel_in;
146wire [2:0] user_cmpsel;
147wire user_loop_mode_reg_scanin;
148wire user_loop_mode_reg_scanout;
149wire user_loop_mode_in;
150wire user_loop_mode;
151wire ten_n_mode_reg_scanin;
152wire ten_n_mode_reg_scanout;
153wire ten_n_mode_in;
154wire ten_n_mode;
155wire user_bisi_wr_mode_reg_scanin;
156wire user_bisi_wr_mode_reg_scanout;
157wire user_bisi_wr_mode_in;
158wire user_bisi_wr_mode;
159wire user_bisi_rd_mode_reg_scanin;
160wire user_bisi_rd_mode_reg_scanout;
161wire user_bisi_rd_mode_in;
162wire user_bisi_rd_mode;
163wire mb_user_data_mode;
164wire mb_user_addr_mode;
165wire mb_user_cmpselinc_hold;
166wire mb_ten_n_mode;
167wire mb_user_bisi_wr_mode;
168wire mb_user_bisi_rd_mode;
169wire mb_user_bisi_rw_mode;
170wire mb_default_bisi;
171wire cntl_reg_scanin;
172wire cntl_reg_scanout;
173wire [34:0] cntl_in;
174wire [34:0] cntl_out;
175wire run3;
176wire [15:0] cntl_algr;
177wire [15:0] next_algr;
178wire sel_nextaddr_reset;
179wire sel_nextaddr_restart;
180wire overflow;
181wire sel_nextaddr_incred;
182wire cout_rw;
183wire sel_nextaddr_same;
184wire [4:0] start_addr;
185wire [4:0] restart_addr;
186wire [4:0] incred_addr;
187wire [4:0] cntl_addr;
188wire [2:0] cntl_rw;
189wire [2:0] next_rw;
190wire cntl_msb;
191wire cntl_bisi;
192wire [3:0] cntl_array_sel;
193wire last_array;
194wire [2:0] cntl_cmp_sel;
195wire sel_cmp_pass;
196wire [1:0] cntl_data_sel;
197wire cntl_addr_mix;
198wire addr_mix;
199wire [3:0] cntl_march_element;
200wire sel_march_1_pass;
201wire cout_addr;
202wire upaddr;
203wire march_0;
204wire march_1;
205wire march_2;
206wire march_6;
207wire march_7;
208wire [3:0] march_element_pre;
209wire march_pre_0;
210wire march_pre_1;
211wire march_pre_2;
212wire march_pre_6;
213wire march_pre_7;
214wire upaddr_pre;
215wire [4:0] incr_addr;
216wire [4:0] stop_addr;
217wire sel_rw_pass;
218wire one_cycle_march;
219wire march_5;
220wire five_cycle_march;
221wire march_8;
222wire two_cycle_march;
223wire mem_wr_pbi;
224wire march_3;
225wire march_4;
226wire rw_1;
227wire rw_0;
228wire rw_4;
229wire mem_wr;
230wire bisi_wr_mode;
231wire bisi_rd_mode;
232wire mem_rd_pbi;
233wire mem_rd;
234wire [4:0] adj_addr;
235wire rw_3;
236wire [4:0] mem_addr1;
237wire true_data_l;
238wire rw_2;
239wire true_data;
240wire [7:0] data_pat_sel;
241wire [7:0] mem_data;
242wire array_0;
243wire array_1;
244wire array_2;
245wire array_3;
246wire array_4;
247wire array_5;
248wire array_6;
249wire [4:0] mem_addr;
250wire [3:0] array_sel;
251wire cmp_2;
252wire [2:0] cmp_sel;
253wire cmp_3;
254wire cmp_4;
255wire [3:0] march_element;
256wire [2:0] rw;
257wire [3:0] array_sel_cntl_out;
258wire array_sel_reg_scanin;
259wire array_sel_reg_scanout;
260wire [3:0] array_sel_out;
261wire [2:0] cmp_sel_cntl_out;
262wire cmp_sel_reg_scanin;
263wire cmp_sel_reg_scanout;
264wire [2:0] cmp_sel_out;
265wire [3:0] march_element_cntl_out;
266wire marche_element_reg_scanin;
267wire marche_element_reg_scanout;
268wire [3:0] march_element_out;
269wire sel_rw_1_pass;
270wire sel_rw_2_pass;
271wire sel_rw_5_pass;
272wire cmp_decoded_arrays;
273wire [4:0] mb_cmp_sel;
274wire [4:0] mb_addr;
275wire [7:0] mb_write_data;
276wire mb_array_0_rd;
277wire mb_array_1_rd;
278wire mb_array_2_rd;
279wire mb_array_3_rd;
280wire mb_array_4_rd;
281wire mb_array_5_rd;
282wire mb_array_6_rd;
283wire mb_array_0_wr;
284wire mb_array_1_wr;
285wire mb_array_2_wr;
286wire mb_array_3_wr;
287wire mb_array_4_wr;
288wire mb_array_5_wr;
289wire mb_array_6_wr;
290wire mb_run;
291wire msb_latch_scanin;
292wire msb_latch_scanout;
293wire msb_in;
294wire msb_out;
295wire mb_done;
296wire [4:0] done_delay;
297wire run3_transition_reg_scanin;
298wire run3_transition_reg_scanout;
299wire run3_out;
300wire run3_transition;
301wire done_delay_reg_scanin;
302wire done_delay_reg_scanout;
303wire [4:0] done_delay_in;
304wire mra0_fail;
305wire mra0_fail_sticky;
306wire mra1_fail;
307wire mra1_fail_sticky;
308wire scp0_fail;
309wire scp0_fail_sticky;
310wire scp1_fail;
311wire scp1_fail_sticky;
312wire tsa0_fail;
313wire tsa0_fail_sticky;
314wire tsa1_fail;
315wire tsa1_fail_sticky;
316wire tca_fail;
317wire tca_fail_sticky;
318wire fail_reg_scanin;
319wire fail_reg_scanout;
320wire mbist_fail_sticky;
321wire mbist_fail_array;
322wire valid_fail;
323wire mb_fail;
324wire out_mb_tcu_done_reg_scanin;
325wire out_mb_tcu_done_reg_scanout;
326wire mb_done_out;
327wire out_mb_tcu_fail_reg_scanin;
328wire out_mb_tcu_fail_reg_scanout;
329wire mb_fail_out;
330wire out_cmp_sel_reg_scanin;
331wire out_cmp_sel_reg_scanout;
332wire [4:0] mb_cmpsel_out;
333wire out_run_mb_arrays_reg_scanin;
334wire out_run_mb_arrays_reg_scanout;
335wire mb_run_out;
336wire out_data_mb_arrays_reg_scanin;
337wire out_data_mb_arrays_reg_scanout;
338wire [7:0] mb_write_data_out;
339wire out_addr_mb_arrays_reg_scanin;
340wire out_addr_mb_arrays_reg_scanout;
341wire [4:0] mb_addr_out;
342wire out_wr_mb_arrays_reg_scanin;
343wire out_wr_mb_arrays_reg_scanout;
344wire mb_array_0_wr_out;
345wire mb_array_1_wr_out;
346wire mb_array_2_wr_out;
347wire mb_array_3_wr_out;
348wire mb_array_4_wr_out;
349wire mb_array_5_wr_out;
350wire mb_array_6_wr_out;
351wire out_rd_mb_arrays_reg_scanin;
352wire out_rd_mb_arrays_reg_scanout;
353wire mb_array_0_rd_out;
354wire mb_array_1_rd_out;
355wire mb_array_2_rd_out;
356wire mb_array_3_rd_out;
357wire mb_array_4_rd_out;
358wire mb_array_5_rd_out;
359wire mb_array_6_rd_out;
360wire spares_scanin;
361wire spares_scanout;
362
363
364
365
366
367// /////////////////////////////////////////////////////////////////////////////
368// Outputs
369// /////////////////////////////////////////////////////////////////////////////
370
371 output scan_out;
372 output mb1_done;
373 output mb1_run;
374 output [15:0] mb1_addr;
375 output [4:0] mb1_cmpsel;
376 output [7:0] mb1_write_data;
377
378 output mb1_tsa0_read_en;
379 output mb1_tsa0_write_en;
380 output mb1_tsa1_read_en;
381 output mb1_tsa1_write_en;
382 output mb1_tca_read_en;
383 output mb1_tca_write_en;
384 output mb1_scp0_read_en;
385 output mb1_scp0_write_en;
386 output mb1_scp1_read_en;
387 output mb1_scp1_write_en;
388 output mb1_mra0_read_en;
389 output mb1_mra0_write_en;
390 output mb1_mra1_read_en;
391 output mb1_mra1_write_en;
392
393 output mb1_mbist_fail;
394
395// /////////////////////////////////////////////////////////////////////////////
396// Inputs
397// /////////////////////////////////////////////////////////////////////////////
398
399 input l2clk;
400 input scan_in;
401 input tcu_pce_ov; // scan signals
402 input tcu_clk_stop;
403 input tcu_aclk;
404 input tcu_bclk;
405 input tcu_scan_en;
406 input mb2_misc_pmen; // Power management enable
407
408 input mbist_start;
409 input mbist_bisi_mode;
410 input mbist_user_mode;
411
412// membist fail
413
414 input mmu_mbi_mra0_fail;
415 input mmu_mbi_mra1_fail;
416 input mmu_mbi_scp0_fail;
417 input mmu_mbi_scp1_fail;
418 input tlu_mbi_tsa0_fail;
419 input tlu_mbi_tsa1_fail;
420 input tlu_mbi_tca_fail;
421
422
423
424// /////////////////////////////////////////////////////////////////////////////
425// Scan Renames
426// /////////////////////////////////////////////////////////////////////////////
427
428assign pce_ov = tcu_pce_ov;
429assign stop = tcu_clk_stop;
430assign siclk = tcu_aclk;
431assign soclk = tcu_bclk;
432assign se = tcu_scan_en;
433
434
435
436////////////////////////////////////////////////////////////////////////////////
437// Clock header
438////////////////////////////////////////////////////////////////////////////////
439
440spc_mb1_ctll1clkhdr_ctl_macro clkgen (
441 .l2clk (l2clk ),
442 .l1en (1'b1 ),
443 .l1clk (l1clk ),
444 .pce_ov(pce_ov),
445 .stop(stop),
446 .se(se));
447
448spc_mb1_ctlmsff_ctl_macro__width_3 pmen (
449 .scan_in(pmen_scanin),
450 .scan_out(pmen_scanout),
451 .l1clk ( l1clk ), // Must be connected to a free running clock
452 .din ({mbist_start, ~mb2_misc_pmen , 1'b0} ),
453 .dout ({start_in , misc_pmen_ , pmem_unused} ),
454 .siclk(siclk),
455 .soclk(soclk));
456
457
458assign clock_enable = start_in | mb1_done | mb1_run | mb1_mbist_fail | misc_pmen_;
459
460spc_mb1_ctll1clkhdr_ctl_macro clkgen_pm1 (
461 .l2clk (l2clk ),
462 .l1en (clock_enable ),
463 .l1clk (l1clk_pm1 ),
464 .pce_ov(pce_ov),
465 .stop(stop),
466 .se(se));
467
468
469//////////////////////////////////// ////////////////////////////////////
470// START LOGIC
471//////////////////////////////////// ////////////////////////////////////
472
473
474// /////////////////////////////////////////////////////////////////////////////
475//
476// MBIST Config Register
477//
478// /////////////////////////////////////////////////////////////////////////////
479//
480// A low to high transition on mbist_start will reset and start the engine.
481// mbist_start must remain active high for the duration of MBIST.
482// If mbist_start deasserts the engine will stop but not reset.
483// Once MBIST has completed mb0_done will assert and the fail status
484// signals will be valid.
485// To run MBIST again the mbist_start signal must transition low then high.
486//
487// Loop on Address will disable the address mix function.
488//
489// /////////////////////////////////////////////////////////////////////////////
490
491
492 // flop incoming signals:
493
494 spc_mb1_ctlmsff_ctl_macro__width_2 input_signals_reg (
495 .scan_in(input_signals_reg_scanin),
496 .scan_out(input_signals_reg_scanout),
497 .l1clk ( l1clk ),
498 .din ( {mbist_bisi_mode,mbist_user_mode} ),
499 .dout ( {bisi_mode ,user_mode} ),
500 .siclk(siclk),
501 .soclk(soclk));
502
503 // default : mb_enable=0
504 // bisi : mb_enable=0
505 // user_mode : mb_enable=depend on programmed value
506
507 spc_mb1_ctlmsff_ctl_macro__width_1 mb_enable_reg (
508 .scan_in(mb_enable_reg_scanin),
509 .scan_out(mb_enable_reg_scanout),
510 .l1clk ( l1clk_pm1 ),
511 .din ( mb_enable ),
512 .dout ( mb_enable_out ),
513 .siclk(siclk),
514 .soclk(soclk));
515
516
517//assign mb_enable = user_mode ? mb_enable_out : 1'b0;
518 assign mb_enable = mb_enable_out;
519
520
521 assign start = user_mode ? (mb_enable_out & start_in) :
522 start_in;
523
524
525
526 spc_mb1_ctlmsff_ctl_macro__width_2 config_reg (
527 .scan_in(config_reg_scanin),
528 .scan_out(config_reg_scanout),
529 .l1clk ( l1clk_pm1 ),
530 .din ( config_in[1:0] ),
531 .dout ( config_out[1:0] ),
532 .siclk(siclk),
533 .soclk(soclk));
534
535
536 assign config_in[0] = start;
537 assign config_in[1] = config_out[0];
538 assign start_transition = config_out[0] & ~config_out[1];
539 assign end_transition = ~config_out[0] & config_out[1];
540 assign reset_engine = start_transition | loop_again | end_transition;
541 assign run = config_out[1] ;
542
543
544
545
546
547 spc_mb1_ctlmsff_ctl_macro__width_1 loop_again_reg (
548 .scan_in(loop_again_reg_scanin),
549 .scan_out(loop_again_reg_scanout),
550 .l1clk ( l1clk_pm1 ),
551 .din ( stop_engine_l ),
552 .dout ( stop_engine_l_q ),
553 .siclk(siclk),
554 .soclk(soclk));
555
556
557assign loop_again=mb_user_loop_mode ? (stop_engine_l & ~stop_engine_l_q): 1'b0;
558
559
560
561//////////////////////////////////// ////////////////////////////////////
562// USER MODE REGISTER (CONFIG)
563//////////////////////////////////// ////////////////////////////////////
564
565
566////////////////////////////////////////////////////////////////////////////////
567// user control registers
568// size
569// - user_array 4
570// - user_addr_mode 1
571// - user_start_addr 15
572// - user_stop_addr 15
573// - user_inc_addr 15
574// - user_data_mode 1
575// - user_data 8
576// - user_cmpselinc_mode 1
577// - user_cmpselinc 3
578// - user_loop_mode 1
579
580 spc_mb1_ctlmsff_ctl_macro__width_4 array_usr_reg (
581 .scan_in(array_usr_reg_scanin),
582 .scan_out(array_usr_reg_scanout),
583 .l1clk ( l1clk_pm1 ),
584 .din ( user_array_in[3:0] ),
585 .dout ( user_array[3:0] ),
586 .siclk(siclk),
587 .soclk(soclk));
588
589 assign user_array_in[3:0]=user_array[3:0];
590
591
592 // user address mode
593
594 spc_mb1_ctlmsff_ctl_macro__width_1 user_addr_mode_reg (
595 .scan_in(user_addr_mode_reg_scanin),
596 .scan_out(user_addr_mode_reg_scanout),
597 .l1clk ( l1clk_pm1 ),
598 .din ( user_addr_mode_in ),
599 .dout ( user_addr_mode ),
600 .siclk(siclk),
601 .soclk(soclk));
602
603 assign user_addr_mode_in=user_addr_mode;
604
605
606 // user start address
607
608 spc_mb1_ctlmsff_ctl_macro__width_5 user_start_addr_reg (
609 .scan_in(user_start_addr_reg_scanin),
610 .scan_out(user_start_addr_reg_scanout),
611 .l1clk ( l1clk_pm1 ),
612 .din ( user_start_addr_in[4:0] ),
613 .dout ( user_start_addr[4:0] ),
614 .siclk(siclk),
615 .soclk(soclk));
616
617
618 assign user_start_addr_in[4:0]=user_start_addr[4:0];
619
620 // user stop address
621
622 spc_mb1_ctlmsff_ctl_macro__width_5 user_stop_addr_reg (
623 .scan_in(user_stop_addr_reg_scanin),
624 .scan_out(user_stop_addr_reg_scanout),
625 .l1clk ( l1clk_pm1 ),
626 .din ( user_stop_addr_in[4:0] ),
627 .dout ( user_stop_addr[4:0] ),
628 .siclk(siclk),
629 .soclk(soclk));
630
631
632 assign user_stop_addr_in[4:0]=user_stop_addr[4:0];
633
634
635 // user increment address
636
637 spc_mb1_ctlmsff_ctl_macro__width_5 user_incr_addr_reg (
638 .scan_in(user_incr_addr_reg_scanin),
639 .scan_out(user_incr_addr_reg_scanout),
640 .l1clk ( l1clk_pm1 ),
641 .din ( user_incr_addr_in[4:0] ),
642 .dout ( user_incr_addr[4:0] ),
643 .siclk(siclk),
644 .soclk(soclk));
645
646
647 assign user_incr_addr_in[4:0]=user_incr_addr[4:0];
648
649 // user data mode
650
651 spc_mb1_ctlmsff_ctl_macro__width_1 user_data_mode_reg (
652 .scan_in(user_data_mode_reg_scanin),
653 .scan_out(user_data_mode_reg_scanout),
654 .l1clk ( l1clk_pm1 ),
655 .din ( user_data_mode_in ),
656 .dout ( user_data_mode ),
657 .siclk(siclk),
658 .soclk(soclk));
659
660
661 assign user_data_mode_in=user_data_mode;
662
663 // user data select
664
665 spc_mb1_ctlmsff_ctl_macro__width_8 user_data_reg (
666 .scan_in(user_data_reg_scanin),
667 .scan_out(user_data_reg_scanout),
668 .l1clk ( l1clk_pm1 ),
669 .din ( user_data_in[7:0] ),
670 .dout ( user_data[7:0] ),
671 .siclk(siclk),
672 .soclk(soclk));
673
674
675 assign user_data_in[7:0] = user_data[7:0];
676
677 // user cmp sel inc
678 // if its one, user need to program the cmpselinc register
679 // otherwise it will loop all cmpsel
680
681 spc_mb1_ctlmsff_ctl_macro__width_1 user_cmpselinc_hold_reg (
682 .scan_in(user_cmpselinc_hold_reg_scanin),
683 .scan_out(user_cmpselinc_hold_reg_scanout),
684 .l1clk ( l1clk_pm1 ),
685 .din ( user_cmpselinc_hold_in ),
686 .dout ( user_cmpselinc_hold ),
687 .siclk(siclk),
688 .soclk(soclk));
689
690
691 assign user_cmpselinc_hold_in=user_cmpselinc_hold;
692
693
694
695 // user cmp sel reg
696
697 spc_mb1_ctlmsff_ctl_macro__width_3 user_cmpsel_reg (
698 .scan_in(user_cmpsel_reg_scanin),
699 .scan_out(user_cmpsel_reg_scanout),
700 .l1clk ( l1clk_pm1 ),
701 .din ( user_cmpsel_in[2:0] ),
702 .dout ( user_cmpsel[2:0] ),
703 .siclk(siclk),
704 .soclk(soclk));
705
706 assign user_cmpsel_in[2:0]=user_cmpsel[2:0];
707
708
709 // user loop mode
710
711 spc_mb1_ctlmsff_ctl_macro__width_1 user_loop_mode_reg (
712 .scan_in(user_loop_mode_reg_scanin),
713 .scan_out(user_loop_mode_reg_scanout),
714 .l1clk ( l1clk_pm1 ),
715 .din ( user_loop_mode_in ),
716 .dout ( user_loop_mode ),
717 .siclk(siclk),
718 .soclk(soclk));
719
720
721 assign user_loop_mode_in=user_loop_mode;
722
723
724
725 // 10N Algorithm for bit mapping
726
727 spc_mb1_ctlmsff_ctl_macro__width_1 ten_n_mode_reg (
728 .scan_in(ten_n_mode_reg_scanin),
729 .scan_out(ten_n_mode_reg_scanout),
730 .l1clk ( l1clk_pm1 ),
731 .din ( ten_n_mode_in ),
732 .dout ( ten_n_mode ),
733 .siclk(siclk),
734 .soclk(soclk));
735
736
737 assign ten_n_mode_in=ten_n_mode;
738
739
740 spc_mb1_ctlmsff_ctl_macro__width_1 user_bisi_wr_mode_reg (
741 .scan_in(user_bisi_wr_mode_reg_scanin),
742 .scan_out(user_bisi_wr_mode_reg_scanout),
743 .l1clk ( l1clk_pm1 ),
744 .din ( user_bisi_wr_mode_in ),
745 .dout ( user_bisi_wr_mode ),
746 .siclk(siclk),
747 .soclk(soclk));
748
749 assign user_bisi_wr_mode_in=user_bisi_wr_mode;
750
751 spc_mb1_ctlmsff_ctl_macro__width_1 user_bisi_rd_mode_reg (
752 .scan_in(user_bisi_rd_mode_reg_scanin),
753 .scan_out(user_bisi_rd_mode_reg_scanout),
754 .l1clk ( l1clk_pm1 ),
755 .din ( user_bisi_rd_mode_in ),
756 .dout ( user_bisi_rd_mode ),
757 .siclk(siclk),
758 .soclk(soclk));
759
760 assign user_bisi_rd_mode_in=user_bisi_rd_mode;
761
762
763
764
765 assign mb_user_data_mode = user_mode & user_data_mode;
766 assign mb_user_addr_mode = user_mode & user_addr_mode;
767 assign mb_user_cmpselinc_hold = user_mode & user_cmpselinc_hold;
768 assign mb_ten_n_mode = user_mode & ten_n_mode;
769 assign mb_user_loop_mode = user_mode & user_loop_mode;
770
771
772
773 assign mb_user_bisi_wr_mode = user_mode & user_bisi_wr_mode & bisi_mode;
774 assign mb_user_bisi_rd_mode = user_mode & user_bisi_rd_mode & bisi_mode;
775
776 assign mb_user_bisi_rw_mode = ((~user_bisi_wr_mode & ~user_bisi_rd_mode) | (user_bisi_wr_mode & user_bisi_rd_mode)) & bisi_mode;
777
778 assign mb_default_bisi = bisi_mode & ~user_mode;
779
780
781
782//////////////////////////////////// ////////////////////////////////////
783// CONTROL REG:
784//////////////////////////////////// ////////////////////////////////////
785
786
787 spc_mb1_ctlmsff_ctl_macro__width_24 cntl_reg (
788 .scan_in(cntl_reg_scanin),
789 .scan_out(cntl_reg_scanout),
790 .l1clk ( l1clk_pm1 ),
791 .din ({cntl_in[34:19] ,cntl_in[7:0]} ),
792 .dout ({cntl_out[34:19],cntl_out[7:0]}),
793 .siclk(siclk),
794 .soclk(soclk));
795
796
797 assign cntl_in[34:19] = reset_engine ? {16'b0000_0000000000}:
798 ~run3 ? cntl_algr[15:0]:
799 next_algr[15:0];
800
801
802 // reset_engine run3 overflow cout_rw output
803 // ---------------------------------------------------------
804 // 1 x x x start_addr
805 // 0 0 x x cntl_addr
806 // 0 1 1 x restart_addr
807 // 0 1 0 1 incred_addr
808 // 0 1 0 0 cntl_addr
809
810
811 assign sel_nextaddr_reset = reset_engine;
812 assign sel_nextaddr_restart = ~reset_engine & run3 & overflow;
813 assign sel_nextaddr_incred = ~reset_engine & run3 & ~overflow & cout_rw;
814 assign sel_nextaddr_same = ~(sel_nextaddr_reset | sel_nextaddr_restart | sel_nextaddr_incred);
815
816
817 assign cntl_in[7:3] = ({5{sel_nextaddr_reset }} & start_addr[4:0]) |
818 ({5{sel_nextaddr_restart}} & restart_addr[4:0]) |
819 ({5{sel_nextaddr_incred }} & incred_addr[4:0]) |
820 ({5{sel_nextaddr_same }} & cntl_addr[4:0]);
821
822
823 assign cntl_in[2:0] = reset_engine ? 3'b000 :
824 ~run3 ? cntl_rw[2:0]:
825 next_rw[2:0];
826
827//////////////////////////////////// ////////////////////////////////////
828// NEXT ALGR
829//////////////////////////////////// ////////////////////////////////////
830
831 // msb
832 assign cntl_msb = start_in & cntl_out[34]; // done selection
833
834 assign cntl_bisi = mb_default_bisi | mb_user_bisi_rw_mode ? cntl_out[33] :
835 1'b1;
836 // array
837 assign cntl_array_sel[3:0] = (last_array | user_mode) ? 4'b1111:
838 cntl_out[32:29]; // array selection
839 // cmp
840 assign cntl_cmp_sel[2:0] = sel_cmp_pass ? {3'b111} :
841 cntl_out[28:26];
842
843 // data
844 assign cntl_data_sel[1:0] = (bisi_mode | mb_user_data_mode) ? 2'b11 : cntl_out[25:24]; // data selection
845
846 // address mix
847 assign cntl_addr_mix = (mb_user_addr_mode | bisi_mode) ? 1'b1 : cntl_out[23]; // address mix
848 assign addr_mix = (mb_user_addr_mode | bisi_mode) ? 1'b0 : cntl_out[23];
849
850 assign cntl_march_element[3:0] = sel_march_1_pass ? 4'b1111:
851 cntl_out[22:19]; // march element
852
853
854 assign cntl_algr[15:0] = {cntl_msb,
855 cntl_bisi,
856 cntl_array_sel[3:0],
857 cntl_cmp_sel[2:0],
858 cntl_data_sel[1:0],
859 cntl_addr_mix,
860 cntl_march_element[3:0]};
861
862 assign next_algr[15:0] = cout_addr ? cntl_algr[15:0] + 16'h1 : cntl_algr[15:0]; // mbist control
863
864
865//////////////////////////////////// ////////////////////////////////////
866// NEXT ADDR
867//////////////////////////////////// ////////////////////////////////////
868
869
870 /////////////////////////
871 // address engine
872 /////////////////////////
873
874
875 assign upaddr = march_0 | march_1 | march_2 | march_6 | march_7 | bisi_mode ;
876
877
878 assign march_element_pre[3:0]=next_algr[3:0];
879
880 assign march_pre_0 = march_element_pre[3:0]==4'h0;
881 assign march_pre_1 = march_element_pre[3:0]==4'h1;
882 assign march_pre_2 = march_element_pre[3:0]==4'h2;
883 assign march_pre_6 = march_element_pre[3:0]==4'h6;
884 assign march_pre_7 = march_element_pre[3:0]==4'h7;
885
886 assign upaddr_pre = march_pre_0 | march_pre_1 | march_pre_2 | march_pre_6 | march_pre_7;
887
888
889 assign incr_addr[4:0] = mb_user_addr_mode ? user_incr_addr[4:0] : 5'b00001;
890
891 assign start_addr[4:0] = mb_user_addr_mode ? user_start_addr[4:0] : 5'b00000;
892
893
894// assign next_addr_out[7:0] = cout_rw ? cntl_addr[7:0] + incr_addr[7:0] : cntl_addr[7:0]; // next address
895
896
897 assign incred_addr[4:0] = cntl_addr[4:0] + incr_addr[4:0];
898
899
900 assign overflow = upaddr ? ( cntl_addr[4:0] == stop_addr[4:0]) & (cntl_rw[2:0]==3'b111):
901 (~cntl_addr[4:0] == start_addr[4:0]) & (cntl_rw[2:0]==3'b111);
902
903
904// assign next_addr[7:0]= overflow ? restart_addr[7:0] : next_addr_out[7:0];
905
906 assign restart_addr[4:0] = upaddr_pre ? start_addr[4:0] : ~stop_addr[4:0];
907
908 assign cout_addr = overflow;
909
910
911//////////////////////////////////// ////////////////////////////////////
912// NEXT RW
913//////////////////////////////////// ////////////////////////////////////
914
915
916 assign cntl_rw[2:0] = sel_rw_pass ? 3'b111:
917 cntl_out[ 2: 0]; // read write control
918
919 assign next_rw[2:0] = cntl_rw[2:0]+3'b001 ;
920
921 assign cout_rw = &cntl_rw[2:0]; // carry over for rw
922
923
924//////////////////////////////////// ////////////////////////////////////
925// MBIST CONTROL SIGNAL
926// - mem_wr
927//////////////////////////////////// ////////////////////////////////////
928
929
930 assign one_cycle_march = march_0 | march_5 | march_7;
931 assign five_cycle_march = march_6 | march_8;
932 assign two_cycle_march = ~(one_cycle_march | five_cycle_march);
933
934
935 /////////////////////////
936 // membist write enable
937 /////////////////////////
938
939
940 assign mem_wr_pbi = run3 & (
941 march_0 |
942 ((march_1 | march_2 | march_3 | march_4 ) & rw_1) |
943 (march_6 & (rw_0 | rw_1 | rw_4)) |
944 march_7 |
945 (march_8 & (rw_0 | rw_1 | rw_4))
946 );
947
948 assign mem_wr = bisi_wr_mode ? 1'b1 :
949 bisi_rd_mode ? 1'b0 :
950 mem_wr_pbi;
951
952 /////////////////////////
953 // membist read enable
954 /////////////////////////
955
956
957
958 assign mem_rd_pbi = run3 & ~mem_wr;
959
960 assign mem_rd= bisi_rd_mode ? 1'b1 : mem_rd_pbi;
961
962 /////////////////////
963 // membist address:
964 ////////////////////
965
966 assign cntl_addr[4:0] = cntl_out[7:3];
967
968 assign adj_addr[4:0] = (five_cycle_march & (rw_1 | rw_3)) ? {cntl_addr[4:1],~cntl_addr[0]}:
969 cntl_addr[4:0] ;
970
971 assign mem_addr1[4:0] = upaddr ? adj_addr[4:0]: ~adj_addr[4:0];
972
973
974
975 /////////////////////
976 // true data
977 ////////////////////
978
979 assign true_data_l = bisi_mode |
980 march_0 |
981 (march_1 & rw_0) |
982 (march_2 & rw_1) |
983 (march_3 & rw_0) |
984 (march_4 & rw_1) |
985 (march_5) |
986 (march_6 & (rw_1 | rw_3 | rw_4)) |
987 (march_8 & (rw_0 | rw_2));
988
989 assign true_data=~true_data_l;
990
991 /////////////////////
992 // membist data:
993 ////////////////////
994
995 assign data_pat_sel[7:0] = (mb_user_data_mode) ? user_data[7:0]:
996 bisi_mode ? 8'hFF:
997 (cntl_data_sel[1:0] == 2'h0) ? 8'hAA:
998 (cntl_data_sel[1:0] == 2'h1) ? 8'h99:
999 (cntl_data_sel[1:0] == 2'h2) ? 8'hCC:
1000 8'h00;
1001 assign mem_data[7:0] = true_data ? data_pat_sel[7:0] : ~data_pat_sel[7:0];
1002
1003//////////////////////////////////// ////////////////////////////////////
1004// STOP ADDR
1005//////////////////////////////////// ////////////////////////////////////
1006
1007 assign stop_addr[4:0] = mb_user_addr_mode ? user_stop_addr[4:0] :
1008 array_0 ? 5'b1_1111: // tsa0
1009 array_1 ? 5'b1_1111: // tsa1
1010 array_2 ? 5'b1_1111: // tca
1011 array_3 ? 5'b1_1111: // scp0
1012 array_4 ? 5'b1_1111: // scp1
1013 array_5 ? 5'b1_1111: // mra0
1014 array_6 ? 5'b1_1111: // mra1
1015 5'b1_1111;
1016
1017
1018
1019
1020//////////////////////////////////// ////////////////////////////////////
1021// ADDR MIX
1022//////////////////////////////////// ////////////////////////////////////
1023
1024 assign mem_addr[4:0] = (addr_mix) ?
1025 {mem_addr1[0],mem_addr1[4:1]} :
1026 mem_addr1[4:0];
1027
1028
1029
1030
1031//////////////////////////////////// ////////////////////////////////////
1032// SEQ selection
1033//////////////////////////////////// ////////////////////////////////////
1034
1035 // array
1036 assign array_0 = array_sel[3:0]==4'h0;
1037 assign array_1 = array_sel[3:0]==4'h1;
1038 assign array_2 = array_sel[3:0]==4'h2;
1039 assign array_3 = array_sel[3:0]==4'h3;
1040 assign array_4 = array_sel[3:0]==4'h4;
1041 assign array_5 = array_sel[3:0]==4'h5;
1042 assign array_6 = array_sel[3:0]==4'h6;
1043
1044
1045 assign last_array= array_6;
1046
1047 // cmp
1048// assign cmp_0 = cmp_sel[2:0]==3'b000;
1049 assign cmp_2 = cmp_sel[2:0]==3'b010;
1050 assign cmp_3 = cmp_sel[2:0]==3'b011;
1051 assign cmp_4 = cmp_sel[2:0]==3'b100;
1052
1053 // march
1054
1055 assign march_0 = (march_element[3:0]==4'h0);
1056 assign march_1 = (march_element[3:0]==4'h1);
1057 assign march_2 = (march_element[3:0]==4'h2);
1058 assign march_3 = (march_element[3:0]==4'h3);
1059 assign march_4 = (march_element[3:0]==4'h4);
1060 assign march_5 = (march_element[3:0]==4'h5);
1061 assign march_6 = (march_element[3:0]==4'h6);
1062 assign march_7 = (march_element[3:0]==4'h7);
1063 assign march_8 = (march_element[3:0]==4'h8);
1064
1065 // rw
1066
1067 assign rw_0 = (rw[2:0]==3'b000);
1068 assign rw_1 = (rw[2:0]==3'b001);
1069 assign rw_2 = (rw[2:0]==3'b010);
1070 assign rw_3 = (rw[2:0]==3'b011);
1071 assign rw_4 = (rw[2:0]==3'b100);
1072// assign rw_5 = (rw[2:0]==3'b101);
1073// assign rw_6 = (rw[2:0]==3'b110);
1074// assign rw_7 = (rw[2:0]==3'b111);
1075
1076
1077//////////////////////////////////// ////////////////////////////////////
1078// SEQ logic
1079//////////////////////////////////// ////////////////////////////////////
1080
1081
1082 // array logic
1083
1084 assign array_sel_cntl_out[3:0]=cntl_out[32:29];
1085
1086
1087 spc_mb1_ctlmsff_ctl_macro__width_4 array_sel_reg (
1088 .scan_in(array_sel_reg_scanin),
1089 .scan_out(array_sel_reg_scanout),
1090 .l1clk ( l1clk_pm1 ),
1091 .din ( array_sel[3:0] ),
1092 .dout ( array_sel_out[3:0] ),
1093 .siclk(siclk),
1094 .soclk(soclk));
1095
1096 assign array_sel[3:0]=(&array_sel_cntl_out[3:0]) ? array_sel_out[3:0] :
1097 user_mode ? user_array[3:0] :
1098 array_sel_cntl_out[3:0];
1099
1100
1101
1102 // cmp logic
1103
1104 assign cmp_sel_cntl_out[2:0] = cntl_out[28:26];
1105
1106 spc_mb1_ctlmsff_ctl_macro__width_3 cmp_sel_reg (
1107 .scan_in(cmp_sel_reg_scanin),
1108 .scan_out(cmp_sel_reg_scanout),
1109 .l1clk ( l1clk_pm1 ),
1110 .din ( cmp_sel[2:0] ),
1111 .dout ( cmp_sel_out[2:0] ),
1112 .siclk(siclk),
1113 .soclk(soclk));
1114
1115 assign cmp_sel[2:0]=(&cmp_sel_cntl_out[2:0]) ? cmp_sel_out[2:0] :
1116 mb_user_cmpselinc_hold ? user_cmpsel[2:0] :
1117 cmp_sel_cntl_out[2:0];
1118
1119
1120 // march logic
1121
1122 assign march_element_cntl_out[3:0]=cntl_out[22:19];
1123
1124
1125 spc_mb1_ctlmsff_ctl_macro__width_4 marche_element_reg (
1126 .scan_in(marche_element_reg_scanin),
1127 .scan_out(marche_element_reg_scanout),
1128 .l1clk ( l1clk_pm1 ),
1129 .din ( march_element[3:0] ),
1130 .dout ( march_element_out ),
1131 .siclk(siclk),
1132 .soclk(soclk));
1133
1134 assign march_element[3:0]=(&march_element_cntl_out[3:0]) ? march_element_out[3:0] :
1135 march_element_cntl_out[3:0];
1136
1137
1138 // rw
1139 assign rw[2:0]=cntl_out[2:0];
1140
1141
1142//////////////////////////////////////////////////////////////////
1143// SEL_PASS LOGIC
1144//////////////////////////////////////////////////////////////////
1145
1146
1147
1148
1149
1150
1151 // pass logic:
1152
1153 // march
1154 assign sel_march_1_pass = bisi_mode | (mb_ten_n_mode & march_5) | march_8;
1155
1156
1157
1158 assign bisi_wr_mode = mb_default_bisi | mb_user_bisi_rw_mode ? ~cntl_bisi & run3 :
1159 mb_user_bisi_wr_mode & run3;
1160
1161 assign bisi_rd_mode =mb_default_bisi | mb_user_bisi_rw_mode ? cntl_bisi & run3 :
1162 mb_user_bisi_rd_mode & run3;
1163
1164
1165
1166 // cmp
1167
1168 assign sel_cmp_pass= (mb_user_cmpselinc_hold | bisi_wr_mode) |
1169 (array_0 & cmp_4) | // tsa0 5
1170 (array_1 & cmp_4) | // tsa1 5
1171 (array_2 & cmp_2) | // tca 3
1172 (array_3 & cmp_2) | // scp0 3
1173 (array_4 & cmp_2) | // scp1 3
1174 (array_5 & cmp_3) | // mra0 4
1175 (array_6 & cmp_3) ; // mra1 4
1176
1177
1178
1179 // rw
1180 assign sel_rw_1_pass = bisi_mode | one_cycle_march ;
1181
1182 assign sel_rw_2_pass = two_cycle_march;
1183 assign sel_rw_5_pass = five_cycle_march;
1184
1185 assign sel_rw_pass = (run3 & sel_rw_1_pass & rw_0) |
1186 (run3 & sel_rw_2_pass & rw_1) |
1187 (run3 & sel_rw_5_pass & rw_4) ;
1188
1189
1190
1191
1192
1193//////////////////////////////////// ////////////////////////////////////
1194// membist control assignment
1195//////////////////////////////////// ////////////////////////////////////
1196
1197
1198 // TSA0, TSA1, and TCA are fully decoded for cmp signals
1199 // extra logic for cmp
1200 assign cmp_decoded_arrays= array_0 | array_1 | array_2 ;
1201
1202 assign mb_cmp_sel[4:0] = cmp_decoded_arrays & (cmp_sel[2:0] == 3'b000) ? 5'b00001 :
1203 cmp_decoded_arrays & (cmp_sel[2:0] == 3'b001) ? 5'b00010 :
1204 cmp_decoded_arrays & (cmp_sel[2:0] == 3'b010) ? 5'b00100 :
1205 cmp_decoded_arrays & (cmp_sel[2:0] == 3'b011) ? 5'b01000 :
1206 cmp_decoded_arrays & (cmp_sel[2:0] == 3'b100) ? 5'b10000 :
1207 {2'b00,cmp_sel[2:0]};
1208
1209
1210 assign mb_addr[4:0]=mem_addr[4:0];
1211 assign mb_write_data[7:0]=mem_data[7:0];
1212
1213
1214 // only one array read signal should be active
1215
1216 assign mb_array_0_rd= array_0 && mem_rd;
1217 assign mb_array_1_rd= array_1 && mem_rd;
1218 assign mb_array_2_rd= array_2 && mem_rd;
1219 assign mb_array_3_rd= array_3 && mem_rd;
1220 assign mb_array_4_rd= array_4 && mem_rd;
1221 assign mb_array_5_rd= array_5 && mem_rd;
1222 assign mb_array_6_rd= array_6 && mem_rd;
1223
1224
1225
1226 assign mb_array_0_wr= array_0 && mem_wr;
1227 assign mb_array_1_wr= array_1 && mem_wr;
1228 assign mb_array_2_wr= array_2 && mem_wr;
1229 assign mb_array_3_wr= array_3 && mem_wr;
1230 assign mb_array_4_wr= array_4 && mem_wr;
1231 assign mb_array_5_wr= array_5 && mem_wr;
1232 assign mb_array_6_wr= array_6 && mem_wr;
1233
1234
1235 assign mb_run = run;
1236
1237
1238
1239//////////////////////////////////// ////////////////////////////////////
1240// DONE LOGIC
1241//////////////////////////////////// ////////////////////////////////////
1242
1243
1244 spc_mb1_ctlmsff_ctl_macro__width_1 msb_latch (
1245 .scan_in(msb_latch_scanin),
1246 .scan_out(msb_latch_scanout),
1247 .l1clk ( l1clk_pm1 ),
1248 .din ( msb_in ),
1249 .dout ( msb_out ),
1250 .siclk(siclk),
1251 .soclk(soclk));
1252
1253 assign msb_in= (~start_in ) | (mb_user_loop_mode & mb_done) ? 1'b0 :
1254 (cntl_msb) ? 1'b1 :
1255 msb_out;
1256
1257
1258 assign stop_engine_l = start_in & cntl_msb;
1259
1260
1261 assign mb_done=msb_out & (done_delay[4:0]==5'b11110);
1262
1263 assign run3 = &done_delay[4:1] & ~stop_engine_l & start_in;
1264
1265
1266 spc_mb1_ctlmsff_ctl_macro__width_1 run3_transition_reg (
1267 .scan_in(run3_transition_reg_scanin),
1268 .scan_out(run3_transition_reg_scanout),
1269 .l1clk ( l1clk_pm1 ),
1270 .din ( run3 ),
1271 .dout ( run3_out ),
1272 .siclk(siclk),
1273 .soclk(soclk));
1274
1275 assign run3_transition = run3 & ~run3_out;
1276
1277 spc_mb1_ctlmsff_ctl_macro__width_5 done_delay_reg (
1278 .scan_in(done_delay_reg_scanin),
1279 .scan_out(done_delay_reg_scanout),
1280 .l1clk ( l1clk_pm1 ),
1281 .din ( done_delay_in[4:0] ),
1282 .dout ( done_delay[4:0] ),
1283 .siclk(siclk),
1284 .soclk(soclk));
1285
1286
1287
1288 assign done_delay_in[4:0] = run3 ? 5'b11111 :
1289 mb_done ? 5'b11110 :
1290 (run & ~run3) ? done_delay[4:0] + 5'b00001 :
1291 5'b00000;
1292
1293
1294
1295
1296
1297//////////////////////////////////// ////////////////////////////////////
1298// FAIL LOGIC
1299//////////////////////////////////// ////////////////////////////////////
1300
1301
1302
1303assign mra0_fail=run3_transition ? 1'b0 : (mmu_mbi_mra0_fail | mra0_fail_sticky);
1304assign mra1_fail=run3_transition ? 1'b0 : (mmu_mbi_mra1_fail | mra1_fail_sticky);
1305assign scp0_fail=run3_transition ? 1'b0 : (mmu_mbi_scp0_fail | scp0_fail_sticky);
1306assign scp1_fail=run3_transition ? 1'b0 : (mmu_mbi_scp1_fail | scp1_fail_sticky);
1307assign tsa0_fail=run3_transition ? 1'b0 : (tlu_mbi_tsa0_fail | tsa0_fail_sticky);
1308assign tsa1_fail=run3_transition ? 1'b0 : (tlu_mbi_tsa1_fail | tsa1_fail_sticky);
1309assign tca_fail =run3_transition ? 1'b0 : (tlu_mbi_tca_fail | tca_fail_sticky);
1310
1311
1312
1313spc_mb1_ctlmsff_ctl_macro__width_7 fail_reg (
1314 .scan_in(fail_reg_scanin),
1315 .scan_out(fail_reg_scanout),
1316 .l1clk( l1clk_pm1 ),
1317 .din ({mra0_fail ,
1318 mra1_fail ,
1319 scp0_fail ,
1320 scp1_fail ,
1321 tsa0_fail ,
1322 tsa1_fail ,
1323 tca_fail} ),
1324 .dout ({mra0_fail_sticky ,
1325 mra1_fail_sticky ,
1326 scp0_fail_sticky ,
1327 scp1_fail_sticky ,
1328 tsa0_fail_sticky ,
1329 tsa1_fail_sticky ,
1330 tca_fail_sticky} ),
1331 .siclk(siclk),
1332 .soclk(soclk));
1333
1334
1335
1336
1337assign mbist_fail_sticky = mra0_fail_sticky |
1338 mra1_fail_sticky |
1339 scp0_fail_sticky |
1340 scp1_fail_sticky |
1341 tsa0_fail_sticky |
1342 tsa1_fail_sticky |
1343 tca_fail_sticky;
1344
1345
1346assign mbist_fail_array = mmu_mbi_mra0_fail |
1347 mmu_mbi_mra1_fail |
1348 mmu_mbi_scp0_fail |
1349 mmu_mbi_scp1_fail |
1350 tlu_mbi_tsa0_fail |
1351 tlu_mbi_tsa1_fail |
1352 tlu_mbi_tca_fail ;
1353
1354assign valid_fail=run3 | (stop_engine_l & ~mb_done);
1355
1356
1357assign mb_fail = mb_done ? mbist_fail_sticky : mbist_fail_array & valid_fail;
1358
1359
1360//////////////////////////////////////////////////////////////////
1361// OUTPUT FLOP:
1362//////////////////////////////////////////////////////////////////
1363
1364// mb_done
1365
1366
1367spc_mb1_ctlmsff_ctl_macro__width_1 out_mb_tcu_done_reg (
1368 .scan_in(out_mb_tcu_done_reg_scanin),
1369 .scan_out(out_mb_tcu_done_reg_scanout),
1370 .l1clk ( l1clk_pm1 ),
1371 .din ( mb_done ),
1372 .dout ( mb_done_out ),
1373 .siclk(siclk),
1374 .soclk(soclk));
1375
1376
1377// mb_fail
1378
1379
1380spc_mb1_ctlmsff_ctl_macro__width_1 out_mb_tcu_fail_reg (
1381 .scan_in(out_mb_tcu_fail_reg_scanin),
1382 .scan_out(out_mb_tcu_fail_reg_scanout),
1383 .l1clk ( l1clk_pm1 ),
1384 .din ( mb_fail ),
1385 .dout ( mb_fail_out ),
1386 .siclk(siclk),
1387 .soclk(soclk));
1388
1389
1390
1391
1392// out cmpsel
1393
1394
1395spc_mb1_ctlmsff_ctl_macro__width_5 out_cmp_sel_reg (
1396 .scan_in(out_cmp_sel_reg_scanin),
1397 .scan_out(out_cmp_sel_reg_scanout),
1398 .l1clk( l1clk_pm1 ),
1399 .din ( mb_cmp_sel[4:0] ),
1400 .dout ( mb_cmpsel_out[4:0] ),
1401 .siclk(siclk),
1402 .soclk(soclk));
1403
1404
1405
1406// thes are all the output flops to arrays
1407// for the following signals:
1408//
1409// - run
1410// - data
1411// - address
1412
1413
1414spc_mb1_ctlmsff_ctl_macro__width_1 out_run_mb_arrays_reg (
1415 .scan_in(out_run_mb_arrays_reg_scanin),
1416 .scan_out(out_run_mb_arrays_reg_scanout),
1417 .l1clk( l1clk_pm1 ),
1418 .din ( mb_run ),
1419 .dout ( mb_run_out ),
1420 .siclk(siclk),
1421 .soclk(soclk));
1422
1423// data 8 bits
1424
1425spc_mb1_ctlmsff_ctl_macro__width_8 out_data_mb_arrays_reg (
1426 .scan_in(out_data_mb_arrays_reg_scanin),
1427 .scan_out(out_data_mb_arrays_reg_scanout),
1428 .l1clk( l1clk_pm1 ),
1429 .din ( mb_write_data[7:0] ),
1430 .dout ( mb_write_data_out[7:0] ),
1431 .siclk(siclk),
1432 .soclk(soclk));
1433
1434
1435// address 16 bits
1436
1437
1438spc_mb1_ctlmsff_ctl_macro__width_5 out_addr_mb_arrays_reg (
1439 .scan_in(out_addr_mb_arrays_reg_scanin),
1440 .scan_out(out_addr_mb_arrays_reg_scanout),
1441 .l1clk( l1clk_pm1 ),
1442 .din ( mb_addr[4:0] ),
1443 .dout ( mb_addr_out[4:0] ),
1444 .siclk(siclk),
1445 .soclk(soclk));
1446
1447
1448//
1449// write enable
1450
1451spc_mb1_ctlmsff_ctl_macro__width_7 out_wr_mb_arrays_reg (
1452 .scan_in(out_wr_mb_arrays_reg_scanin),
1453 .scan_out(out_wr_mb_arrays_reg_scanout),
1454 .l1clk( l1clk_pm1 ),
1455 .din ( {mb_array_0_wr,
1456 mb_array_1_wr,
1457 mb_array_2_wr,
1458 mb_array_3_wr,
1459 mb_array_4_wr,
1460 mb_array_5_wr,
1461 mb_array_6_wr} ),
1462 .dout ({ mb_array_0_wr_out,
1463 mb_array_1_wr_out,
1464 mb_array_2_wr_out,
1465 mb_array_3_wr_out,
1466 mb_array_4_wr_out,
1467 mb_array_5_wr_out,
1468 mb_array_6_wr_out} ),
1469 .siclk(siclk),
1470 .soclk(soclk));
1471
1472
1473// read enable
1474
1475spc_mb1_ctlmsff_ctl_macro__width_7 out_rd_mb_arrays_reg (
1476 .scan_in(out_rd_mb_arrays_reg_scanin),
1477 .scan_out(out_rd_mb_arrays_reg_scanout),
1478 .l1clk( l1clk_pm1 ),
1479 .din ( {mb_array_0_rd,
1480 mb_array_1_rd,
1481 mb_array_2_rd,
1482 mb_array_3_rd,
1483 mb_array_4_rd,
1484 mb_array_5_rd,
1485 mb_array_6_rd} ),
1486 .dout ({ mb_array_0_rd_out,
1487 mb_array_1_rd_out,
1488 mb_array_2_rd_out,
1489 mb_array_3_rd_out,
1490 mb_array_4_rd_out,
1491 mb_array_5_rd_out,
1492 mb_array_6_rd_out} ),
1493 .siclk(siclk),
1494 .soclk(soclk));
1495
1496
1497// port name re-assignment
1498
1499
1500 assign mb1_run =mb_run_out;
1501 assign mb1_write_data[7:0] =mb_write_data_out[7:0];
1502 assign mb1_addr[15:0] ={11'b000_0000_0000,mb_addr_out[4:0]};
1503 assign mb1_cmpsel[4:0] =mb_cmpsel_out[4:0];
1504 assign mb1_mbist_fail = mb_fail_out;
1505 assign mb1_done = mb_done_out;
1506
1507 assign mb1_tsa0_write_en=mb_array_0_wr_out;
1508 assign mb1_tsa1_write_en=mb_array_1_wr_out;
1509 assign mb1_tca_write_en =mb_array_2_wr_out;
1510 assign mb1_scp0_write_en=mb_array_3_wr_out;
1511 assign mb1_scp1_write_en=mb_array_4_wr_out;
1512 assign mb1_mra0_write_en=mb_array_5_wr_out;
1513 assign mb1_mra1_write_en=mb_array_6_wr_out;
1514
1515
1516 assign mb1_tsa0_read_en=mb_array_0_rd_out;
1517 assign mb1_tsa1_read_en=mb_array_1_rd_out;
1518 assign mb1_tca_read_en =mb_array_2_rd_out;
1519 assign mb1_scp0_read_en=mb_array_3_rd_out;
1520 assign mb1_scp1_read_en=mb_array_4_rd_out;
1521 assign mb1_mra0_read_en=mb_array_5_rd_out;
1522 assign mb1_mra1_read_en=mb_array_6_rd_out;
1523
1524
1525
1526
1527
1528// spare gate
1529
1530spc_mb1_ctlspare_ctl_macro__num_2 spares (
1531 .scan_in(spares_scanin),
1532 .scan_out(spares_scanout),
1533 .l1clk (l1clk_pm1),
1534 .siclk(siclk),
1535 .soclk(soclk)
1536);
1537
1538
1539
1540supply0 vss; // <- port for ground
1541supply1 vdd; // <- port for power
1542// /////////////////////////////////////////////////////////////////////////////
1543// fixscan start:
1544assign pmen_scanin = scan_in ;
1545assign input_signals_reg_scanin = pmen_scanout ;
1546assign mb_enable_reg_scanin = input_signals_reg_scanout;
1547assign config_reg_scanin = mb_enable_reg_scanout ;
1548assign loop_again_reg_scanin = config_reg_scanout ;
1549assign array_usr_reg_scanin = loop_again_reg_scanout ;
1550assign user_addr_mode_reg_scanin = array_usr_reg_scanout ;
1551assign user_start_addr_reg_scanin = user_addr_mode_reg_scanout;
1552assign user_stop_addr_reg_scanin = user_start_addr_reg_scanout;
1553assign user_incr_addr_reg_scanin = user_stop_addr_reg_scanout;
1554assign user_data_mode_reg_scanin = user_incr_addr_reg_scanout;
1555assign user_data_reg_scanin = user_data_mode_reg_scanout;
1556assign user_cmpselinc_hold_reg_scanin = user_data_reg_scanout ;
1557assign user_cmpsel_reg_scanin = user_cmpselinc_hold_reg_scanout;
1558assign user_loop_mode_reg_scanin = user_cmpsel_reg_scanout ;
1559assign ten_n_mode_reg_scanin = user_loop_mode_reg_scanout;
1560assign user_bisi_wr_mode_reg_scanin = ten_n_mode_reg_scanout ;
1561assign user_bisi_rd_mode_reg_scanin = user_bisi_wr_mode_reg_scanout;
1562assign cntl_reg_scanin = user_bisi_rd_mode_reg_scanout;
1563assign array_sel_reg_scanin = cntl_reg_scanout ;
1564assign cmp_sel_reg_scanin = array_sel_reg_scanout ;
1565assign marche_element_reg_scanin = cmp_sel_reg_scanout ;
1566assign msb_latch_scanin = marche_element_reg_scanout;
1567assign run3_transition_reg_scanin = msb_latch_scanout ;
1568assign done_delay_reg_scanin = run3_transition_reg_scanout;
1569assign fail_reg_scanin = done_delay_reg_scanout ;
1570assign out_mb_tcu_done_reg_scanin = fail_reg_scanout ;
1571assign out_mb_tcu_fail_reg_scanin = out_mb_tcu_done_reg_scanout;
1572assign out_cmp_sel_reg_scanin = out_mb_tcu_fail_reg_scanout;
1573assign out_run_mb_arrays_reg_scanin = out_cmp_sel_reg_scanout ;
1574assign out_data_mb_arrays_reg_scanin = out_run_mb_arrays_reg_scanout;
1575assign out_addr_mb_arrays_reg_scanin = out_data_mb_arrays_reg_scanout;
1576assign out_wr_mb_arrays_reg_scanin = out_addr_mb_arrays_reg_scanout;
1577assign out_rd_mb_arrays_reg_scanin = out_wr_mb_arrays_reg_scanout;
1578assign spares_scanin = out_rd_mb_arrays_reg_scanout;
1579assign scan_out = spares_scanout ;
1580// fixscan end:
1581endmodule
1582// /////////////////////////////////////////////////////////////////////////////
1583
1584
1585
1586
1587
1588
1589// any PARAMS parms go into naming of macro
1590
1591module spc_mb1_ctll1clkhdr_ctl_macro (
1592 l2clk,
1593 l1en,
1594 pce_ov,
1595 stop,
1596 se,
1597 l1clk);
1598
1599
1600 input l2clk;
1601 input l1en;
1602 input pce_ov;
1603 input stop;
1604 input se;
1605 output l1clk;
1606
1607
1608
1609
1610
1611cl_sc1_l1hdr_8x c_0 (
1612
1613
1614 .l2clk(l2clk),
1615 .pce(l1en),
1616 .l1clk(l1clk),
1617 .se(se),
1618 .pce_ov(pce_ov),
1619 .stop(stop)
1620);
1621
1622
1623
1624endmodule
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638// any PARAMS parms go into naming of macro
1639
1640module spc_mb1_ctlmsff_ctl_macro__width_3 (
1641 din,
1642 l1clk,
1643 scan_in,
1644 siclk,
1645 soclk,
1646 dout,
1647 scan_out);
1648wire [2:0] fdin;
1649wire [1:0] so;
1650
1651 input [2:0] din;
1652 input l1clk;
1653 input scan_in;
1654
1655
1656 input siclk;
1657 input soclk;
1658
1659 output [2:0] dout;
1660 output scan_out;
1661assign fdin[2:0] = din[2:0];
1662
1663
1664
1665
1666
1667
1668dff #(3) d0_0 (
1669.l1clk(l1clk),
1670.siclk(siclk),
1671.soclk(soclk),
1672.d(fdin[2:0]),
1673.si({scan_in,so[1:0]}),
1674.so({so[1:0],scan_out}),
1675.q(dout[2:0])
1676);
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689endmodule
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703// any PARAMS parms go into naming of macro
1704
1705module spc_mb1_ctlmsff_ctl_macro__width_2 (
1706 din,
1707 l1clk,
1708 scan_in,
1709 siclk,
1710 soclk,
1711 dout,
1712 scan_out);
1713wire [1:0] fdin;
1714wire [0:0] so;
1715
1716 input [1:0] din;
1717 input l1clk;
1718 input scan_in;
1719
1720
1721 input siclk;
1722 input soclk;
1723
1724 output [1:0] dout;
1725 output scan_out;
1726assign fdin[1:0] = din[1:0];
1727
1728
1729
1730
1731
1732
1733dff #(2) d0_0 (
1734.l1clk(l1clk),
1735.siclk(siclk),
1736.soclk(soclk),
1737.d(fdin[1:0]),
1738.si({scan_in,so[0:0]}),
1739.so({so[0:0],scan_out}),
1740.q(dout[1:0])
1741);
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754endmodule
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768// any PARAMS parms go into naming of macro
1769
1770module spc_mb1_ctlmsff_ctl_macro__width_1 (
1771 din,
1772 l1clk,
1773 scan_in,
1774 siclk,
1775 soclk,
1776 dout,
1777 scan_out);
1778wire [0:0] fdin;
1779
1780 input [0:0] din;
1781 input l1clk;
1782 input scan_in;
1783
1784
1785 input siclk;
1786 input soclk;
1787
1788 output [0:0] dout;
1789 output scan_out;
1790assign fdin[0:0] = din[0:0];
1791
1792
1793
1794
1795
1796
1797dff #(1) d0_0 (
1798.l1clk(l1clk),
1799.siclk(siclk),
1800.soclk(soclk),
1801.d(fdin[0:0]),
1802.si(scan_in),
1803.so(scan_out),
1804.q(dout[0:0])
1805);
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818endmodule
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832// any PARAMS parms go into naming of macro
1833
1834module spc_mb1_ctlmsff_ctl_macro__width_4 (
1835 din,
1836 l1clk,
1837 scan_in,
1838 siclk,
1839 soclk,
1840 dout,
1841 scan_out);
1842wire [3:0] fdin;
1843wire [2:0] so;
1844
1845 input [3:0] din;
1846 input l1clk;
1847 input scan_in;
1848
1849
1850 input siclk;
1851 input soclk;
1852
1853 output [3:0] dout;
1854 output scan_out;
1855assign fdin[3:0] = din[3:0];
1856
1857
1858
1859
1860
1861
1862dff #(4) d0_0 (
1863.l1clk(l1clk),
1864.siclk(siclk),
1865.soclk(soclk),
1866.d(fdin[3:0]),
1867.si({scan_in,so[2:0]}),
1868.so({so[2:0],scan_out}),
1869.q(dout[3:0])
1870);
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883endmodule
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897// any PARAMS parms go into naming of macro
1898
1899module spc_mb1_ctlmsff_ctl_macro__width_5 (
1900 din,
1901 l1clk,
1902 scan_in,
1903 siclk,
1904 soclk,
1905 dout,
1906 scan_out);
1907wire [4:0] fdin;
1908wire [3:0] so;
1909
1910 input [4:0] din;
1911 input l1clk;
1912 input scan_in;
1913
1914
1915 input siclk;
1916 input soclk;
1917
1918 output [4:0] dout;
1919 output scan_out;
1920assign fdin[4:0] = din[4:0];
1921
1922
1923
1924
1925
1926
1927dff #(5) d0_0 (
1928.l1clk(l1clk),
1929.siclk(siclk),
1930.soclk(soclk),
1931.d(fdin[4:0]),
1932.si({scan_in,so[3:0]}),
1933.so({so[3:0],scan_out}),
1934.q(dout[4:0])
1935);
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948endmodule
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962// any PARAMS parms go into naming of macro
1963
1964module spc_mb1_ctlmsff_ctl_macro__width_8 (
1965 din,
1966 l1clk,
1967 scan_in,
1968 siclk,
1969 soclk,
1970 dout,
1971 scan_out);
1972wire [7:0] fdin;
1973wire [6:0] so;
1974
1975 input [7:0] din;
1976 input l1clk;
1977 input scan_in;
1978
1979
1980 input siclk;
1981 input soclk;
1982
1983 output [7:0] dout;
1984 output scan_out;
1985assign fdin[7:0] = din[7:0];
1986
1987
1988
1989
1990
1991
1992dff #(8) d0_0 (
1993.l1clk(l1clk),
1994.siclk(siclk),
1995.soclk(soclk),
1996.d(fdin[7:0]),
1997.si({scan_in,so[6:0]}),
1998.so({so[6:0],scan_out}),
1999.q(dout[7:0])
2000);
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013endmodule
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027// any PARAMS parms go into naming of macro
2028
2029module spc_mb1_ctlmsff_ctl_macro__width_24 (
2030 din,
2031 l1clk,
2032 scan_in,
2033 siclk,
2034 soclk,
2035 dout,
2036 scan_out);
2037wire [23:0] fdin;
2038wire [22:0] so;
2039
2040 input [23:0] din;
2041 input l1clk;
2042 input scan_in;
2043
2044
2045 input siclk;
2046 input soclk;
2047
2048 output [23:0] dout;
2049 output scan_out;
2050assign fdin[23:0] = din[23:0];
2051
2052
2053
2054
2055
2056
2057dff #(24) d0_0 (
2058.l1clk(l1clk),
2059.siclk(siclk),
2060.soclk(soclk),
2061.d(fdin[23:0]),
2062.si({scan_in,so[22:0]}),
2063.so({so[22:0],scan_out}),
2064.q(dout[23:0])
2065);
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078endmodule
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092// any PARAMS parms go into naming of macro
2093
2094module spc_mb1_ctlmsff_ctl_macro__width_7 (
2095 din,
2096 l1clk,
2097 scan_in,
2098 siclk,
2099 soclk,
2100 dout,
2101 scan_out);
2102wire [6:0] fdin;
2103wire [5:0] so;
2104
2105 input [6:0] din;
2106 input l1clk;
2107 input scan_in;
2108
2109
2110 input siclk;
2111 input soclk;
2112
2113 output [6:0] dout;
2114 output scan_out;
2115assign fdin[6:0] = din[6:0];
2116
2117
2118
2119
2120
2121
2122dff #(7) d0_0 (
2123.l1clk(l1clk),
2124.siclk(siclk),
2125.soclk(soclk),
2126.d(fdin[6:0]),
2127.si({scan_in,so[5:0]}),
2128.so({so[5:0],scan_out}),
2129.q(dout[6:0])
2130);
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143endmodule
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153// Description: Spare gate macro for control blocks
2154//
2155// Param num controls the number of times the macro is added
2156// flops=0 can be used to use only combination spare logic
2157
2158
2159module spc_mb1_ctlspare_ctl_macro__num_2 (
2160 l1clk,
2161 scan_in,
2162 siclk,
2163 soclk,
2164 scan_out);
2165wire si_0;
2166wire so_0;
2167wire spare0_flop_unused;
2168wire spare0_buf_32x_unused;
2169wire spare0_nand3_8x_unused;
2170wire spare0_inv_8x_unused;
2171wire spare0_aoi22_4x_unused;
2172wire spare0_buf_8x_unused;
2173wire spare0_oai22_4x_unused;
2174wire spare0_inv_16x_unused;
2175wire spare0_nand2_16x_unused;
2176wire spare0_nor3_4x_unused;
2177wire spare0_nand2_8x_unused;
2178wire spare0_buf_16x_unused;
2179wire spare0_nor2_16x_unused;
2180wire spare0_inv_32x_unused;
2181wire si_1;
2182wire so_1;
2183wire spare1_flop_unused;
2184wire spare1_buf_32x_unused;
2185wire spare1_nand3_8x_unused;
2186wire spare1_inv_8x_unused;
2187wire spare1_aoi22_4x_unused;
2188wire spare1_buf_8x_unused;
2189wire spare1_oai22_4x_unused;
2190wire spare1_inv_16x_unused;
2191wire spare1_nand2_16x_unused;
2192wire spare1_nor3_4x_unused;
2193wire spare1_nand2_8x_unused;
2194wire spare1_buf_16x_unused;
2195wire spare1_nor2_16x_unused;
2196wire spare1_inv_32x_unused;
2197
2198
2199input l1clk;
2200input scan_in;
2201input siclk;
2202input soclk;
2203output scan_out;
2204
2205cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
2206 .siclk(siclk),
2207 .soclk(soclk),
2208 .si(si_0),
2209 .so(so_0),
2210 .d(1'b0),
2211 .q(spare0_flop_unused));
2212assign si_0 = scan_in;
2213
2214cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
2215 .out(spare0_buf_32x_unused));
2216cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
2217 .in1(1'b1),
2218 .in2(1'b1),
2219 .out(spare0_nand3_8x_unused));
2220cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
2221 .out(spare0_inv_8x_unused));
2222cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
2223 .in01(1'b1),
2224 .in10(1'b1),
2225 .in11(1'b1),
2226 .out(spare0_aoi22_4x_unused));
2227cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
2228 .out(spare0_buf_8x_unused));
2229cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
2230 .in01(1'b1),
2231 .in10(1'b1),
2232 .in11(1'b1),
2233 .out(spare0_oai22_4x_unused));
2234cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
2235 .out(spare0_inv_16x_unused));
2236cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
2237 .in1(1'b1),
2238 .out(spare0_nand2_16x_unused));
2239cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
2240 .in1(1'b0),
2241 .in2(1'b0),
2242 .out(spare0_nor3_4x_unused));
2243cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
2244 .in1(1'b1),
2245 .out(spare0_nand2_8x_unused));
2246cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
2247 .out(spare0_buf_16x_unused));
2248cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
2249 .in1(1'b0),
2250 .out(spare0_nor2_16x_unused));
2251cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
2252 .out(spare0_inv_32x_unused));
2253
2254cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
2255 .siclk(siclk),
2256 .soclk(soclk),
2257 .si(si_1),
2258 .so(so_1),
2259 .d(1'b0),
2260 .q(spare1_flop_unused));
2261assign si_1 = so_0;
2262
2263cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
2264 .out(spare1_buf_32x_unused));
2265cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
2266 .in1(1'b1),
2267 .in2(1'b1),
2268 .out(spare1_nand3_8x_unused));
2269cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
2270 .out(spare1_inv_8x_unused));
2271cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
2272 .in01(1'b1),
2273 .in10(1'b1),
2274 .in11(1'b1),
2275 .out(spare1_aoi22_4x_unused));
2276cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
2277 .out(spare1_buf_8x_unused));
2278cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
2279 .in01(1'b1),
2280 .in10(1'b1),
2281 .in11(1'b1),
2282 .out(spare1_oai22_4x_unused));
2283cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
2284 .out(spare1_inv_16x_unused));
2285cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
2286 .in1(1'b1),
2287 .out(spare1_nand2_16x_unused));
2288cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
2289 .in1(1'b0),
2290 .in2(1'b0),
2291 .out(spare1_nor3_4x_unused));
2292cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
2293 .in1(1'b1),
2294 .out(spare1_nand2_8x_unused));
2295cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
2296 .out(spare1_buf_16x_unused));
2297cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
2298 .in1(1'b0),
2299 .out(spare1_nor2_16x_unused));
2300cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
2301 .out(spare1_inv_32x_unused));
2302assign scan_out = so_1;
2303
2304
2305
2306endmodule
2307