Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / mcu / rtl / mcu_ibist_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: mcu_ibist_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 mcu_ibist_ctl (
36 ibist_txdata,
37 ibtx_done,
38 ibrx_done,
39 ibrx_rxerrstat,
40 ibrx_errcnt,
41 ibrx_errlnnum,
42 ibrx_errstat,
43 fbdic_sbfibportctl,
44 fbdic_sbfibpgctl,
45 fbdic_sbfibpattbuf1,
46 fbdic_sbfibtxmsk,
47 fbdic_sbfibtxshft,
48 fbdic_sbfibpattbuf2,
49 fbdic_sbfibpatt2en,
50 fbdic_txstart,
51 fbdic_nbfibportctl,
52 fbdic_nbfibpgctl,
53 fbdic_nbfibpattbuf1,
54 fbdic_nbfibrxmsk,
55 fbdic_nbfibrxshft,
56 fbdic_nbfibrxlnerr,
57 fbdic_nbfibpattbuf2,
58 fbdic_nbfibpatt2en,
59 fbdic_rxstart,
60 fbdic_ibrx_start_ld,
61 fbdic_nbfibportctl_en,
62 fbdic_errcnt_clr,
63 fbdic_errstat_clr,
64 ibist_rxdata,
65 l1clk,
66 scan_in,
67 scan_out,
68 tcu_aclk,
69 tcu_bclk,
70 tcu_scan_en);
71wire siclk;
72wire soclk;
73wire se;
74wire u_ibtx_scanin;
75wire u_ibtx_scanout;
76wire u_ibrx_scanin;
77wire u_ibrx_scanout;
78
79
80output [119:0] ibist_txdata;
81output ibtx_done;
82
83output ibrx_done;
84output [13:0] ibrx_rxerrstat;
85output [9:0] ibrx_errcnt;
86output [3:0] ibrx_errlnnum;
87output [1:0] ibrx_errstat;
88
89input [23:0] fbdic_sbfibportctl;
90input [31:0] fbdic_sbfibpgctl;
91input [23:0] fbdic_sbfibpattbuf1;
92input [9:0] fbdic_sbfibtxmsk;
93input [9:0] fbdic_sbfibtxshft;
94input [23:0] fbdic_sbfibpattbuf2;
95input [9:0] fbdic_sbfibpatt2en;
96input fbdic_txstart;
97
98input [23:0] fbdic_nbfibportctl;
99input [31:0] fbdic_nbfibpgctl;
100input [23:0] fbdic_nbfibpattbuf1;
101input [13:0] fbdic_nbfibrxmsk;
102input [13:0] fbdic_nbfibrxshft;
103input [13:0] fbdic_nbfibrxlnerr;
104input [23:0] fbdic_nbfibpattbuf2;
105input [13:0] fbdic_nbfibpatt2en;
106input fbdic_rxstart;
107
108input fbdic_ibrx_start_ld;
109input fbdic_nbfibportctl_en;
110input [9:0] fbdic_errcnt_clr;
111input [1:0] fbdic_errstat_clr;
112
113input [167:0] ibist_rxdata;
114
115input l1clk ;
116input scan_in ;
117output scan_out ;
118
119input tcu_aclk ;
120input tcu_bclk ;
121input tcu_scan_en ;
122
123// Code
124assign siclk = tcu_aclk;
125assign soclk = tcu_bclk;
126assign se = tcu_scan_en;
127
128mcu_ibtx_ctl u_ibtx (
129 .scan_in(u_ibtx_scanin),
130 .scan_out(u_ibtx_scanout),
131 .l1clk(l1clk),
132 .ibist_txdata(ibist_txdata[119:0]),
133 .ibtx_done(ibtx_done),
134 .fbdic_sbfibportctl(fbdic_sbfibportctl[23:0]),
135 .fbdic_sbfibpgctl(fbdic_sbfibpgctl[31:0]),
136 .fbdic_sbfibpattbuf1(fbdic_sbfibpattbuf1[23:0]),
137 .fbdic_sbfibtxmsk(fbdic_sbfibtxmsk[9:0]),
138 .fbdic_sbfibtxshft(fbdic_sbfibtxshft[9:0]),
139 .fbdic_sbfibpattbuf2(fbdic_sbfibpattbuf2[23:0]),
140 .fbdic_sbfibpatt2en(fbdic_sbfibpatt2en[9:0]),
141 .fbdic_txstart(fbdic_txstart),
142 .tcu_aclk(tcu_aclk),
143 .tcu_bclk(tcu_bclk),
144 .tcu_scan_en(tcu_scan_en)
145 );
146
147mcu_ibrx_ctl u_ibrx (
148 .scan_in(u_ibrx_scanin),
149 .scan_out(u_ibrx_scanout),
150 .l1clk(l1clk),
151 .ibrx_done(ibrx_done),
152 .ibrx_rxerrstat(ibrx_rxerrstat[13:0]),
153 .ibrx_errcnt(ibrx_errcnt[9:0]),
154 .ibrx_errlnnum(ibrx_errlnnum[3:0]),
155 .ibrx_errstat(ibrx_errstat[1:0]),
156 .fbdic_nbfibportctl(fbdic_nbfibportctl[23:0]),
157 .fbdic_nbfibpgctl(fbdic_nbfibpgctl[31:0]),
158 .fbdic_nbfibpattbuf1(fbdic_nbfibpattbuf1[23:0]),
159 .fbdic_nbfibrxmsk(fbdic_nbfibrxmsk[13:0]),
160 .fbdic_nbfibrxshft(fbdic_nbfibrxshft[13:0]),
161 .fbdic_nbfibrxlnerr(fbdic_nbfibrxlnerr[13:0]),
162 .fbdic_nbfibpattbuf2(fbdic_nbfibpattbuf2[23:0]),
163 .fbdic_nbfibpatt2en(fbdic_nbfibpatt2en[13:0]),
164 .fbdic_rxstart(fbdic_rxstart),
165 .fbdic_ibrx_start_ld(fbdic_ibrx_start_ld),
166 .fbdic_nbfibportctl_en(fbdic_nbfibportctl_en),
167 .fbdic_errcnt_clr(fbdic_errcnt_clr[9:0]),
168 .fbdic_errstat_clr(fbdic_errstat_clr[1:0]),
169 .ibist_rxdata(ibist_rxdata[167:0]),
170 .tcu_aclk(tcu_aclk),
171 .tcu_bclk(tcu_bclk),
172 .tcu_scan_en(tcu_scan_en)
173 );
174
175// fixscan start:
176assign u_ibtx_scanin = scan_in ;
177assign u_ibrx_scanin = u_ibtx_scanout ;
178assign scan_out = u_ibrx_scanout ;
179// fixscan end:
180endmodule
181
182
183
184// any PARAMS parms go into naming of macro
185
186module mcu_ibist_ctl_msff_ctl_macro__width_6 (
187 din,
188 l1clk,
189 scan_in,
190 siclk,
191 soclk,
192 dout,
193 scan_out);
194wire [5:0] fdin;
195wire [4:0] so;
196
197 input [5:0] din;
198 input l1clk;
199 input scan_in;
200
201
202 input siclk;
203 input soclk;
204
205 output [5:0] dout;
206 output scan_out;
207assign fdin[5:0] = din[5:0];
208
209
210
211
212
213
214dff #(6) d0_0 (
215.l1clk(l1clk),
216.siclk(siclk),
217.soclk(soclk),
218.d(fdin[5:0]),
219.si({scan_in,so[4:0]}),
220.so({so[4:0],scan_out}),
221.q(dout[5:0])
222);
223
224
225
226
227
228
229
230
231
232
233
234
235endmodule
236
237
238
239
240
241
242
243
244
245
246
247
248
249// any PARAMS parms go into naming of macro
250
251module mcu_ibist_ctl_msff_ctl_macro__width_5 (
252 din,
253 l1clk,
254 scan_in,
255 siclk,
256 soclk,
257 dout,
258 scan_out);
259wire [4:0] fdin;
260wire [3:0] so;
261
262 input [4:0] din;
263 input l1clk;
264 input scan_in;
265
266
267 input siclk;
268 input soclk;
269
270 output [4:0] dout;
271 output scan_out;
272assign fdin[4:0] = din[4:0];
273
274
275
276
277
278
279dff #(5) d0_0 (
280.l1clk(l1clk),
281.siclk(siclk),
282.soclk(soclk),
283.d(fdin[4:0]),
284.si({scan_in,so[3:0]}),
285.so({so[3:0],scan_out}),
286.q(dout[4:0])
287);
288
289
290
291
292
293
294
295
296
297
298
299
300endmodule
301
302
303
304
305
306
307
308
309
310
311
312
313
314// any PARAMS parms go into naming of macro
315
316module mcu_ibist_ctl_msff_ctl_macro__width_7 (
317 din,
318 l1clk,
319 scan_in,
320 siclk,
321 soclk,
322 dout,
323 scan_out);
324wire [6:0] fdin;
325wire [5:0] so;
326
327 input [6:0] din;
328 input l1clk;
329 input scan_in;
330
331
332 input siclk;
333 input soclk;
334
335 output [6:0] dout;
336 output scan_out;
337assign fdin[6:0] = din[6:0];
338
339
340
341
342
343
344dff #(7) d0_0 (
345.l1clk(l1clk),
346.siclk(siclk),
347.soclk(soclk),
348.d(fdin[6:0]),
349.si({scan_in,so[5:0]}),
350.so({so[5:0],scan_out}),
351.q(dout[6:0])
352);
353
354
355
356
357
358
359
360
361
362
363
364
365endmodule
366
367
368
369
370
371
372
373
374
375
376
377
378
379// any PARAMS parms go into naming of macro
380
381module mcu_ibist_ctl_msff_ctl_macro__width_2 (
382 din,
383 l1clk,
384 scan_in,
385 siclk,
386 soclk,
387 dout,
388 scan_out);
389wire [1:0] fdin;
390wire [0:0] so;
391
392 input [1:0] din;
393 input l1clk;
394 input scan_in;
395
396
397 input siclk;
398 input soclk;
399
400 output [1:0] dout;
401 output scan_out;
402assign fdin[1:0] = din[1:0];
403
404
405
406
407
408
409dff #(2) d0_0 (
410.l1clk(l1clk),
411.siclk(siclk),
412.soclk(soclk),
413.d(fdin[1:0]),
414.si({scan_in,so[0:0]}),
415.so({so[0:0],scan_out}),
416.q(dout[1:0])
417);
418
419
420
421
422
423
424
425
426
427
428
429
430endmodule
431
432
433
434
435
436
437
438
439
440
441
442
443
444// any PARAMS parms go into naming of macro
445
446module mcu_ibist_ctl_msff_ctl_macro (
447 din,
448 l1clk,
449 scan_in,
450 siclk,
451 soclk,
452 dout,
453 scan_out);
454wire [0:0] fdin;
455
456 input [0:0] din;
457 input l1clk;
458 input scan_in;
459
460
461 input siclk;
462 input soclk;
463
464 output [0:0] dout;
465 output scan_out;
466assign fdin[0:0] = din[0:0];
467
468
469
470
471
472
473dff #(1) d0_0 (
474.l1clk(l1clk),
475.siclk(siclk),
476.soclk(soclk),
477.d(fdin[0:0]),
478.si(scan_in),
479.so(scan_out),
480.q(dout[0:0])
481);
482
483
484
485
486
487
488
489
490
491
492
493
494endmodule
495
496
497
498
499
500
501
502
503
504
505
506
507
508// any PARAMS parms go into naming of macro
509
510module mcu_ibist_ctl_msff_ctl_macro__width_4 (
511 din,
512 l1clk,
513 scan_in,
514 siclk,
515 soclk,
516 dout,
517 scan_out);
518wire [3:0] fdin;
519wire [2:0] so;
520
521 input [3:0] din;
522 input l1clk;
523 input scan_in;
524
525
526 input siclk;
527 input soclk;
528
529 output [3:0] dout;
530 output scan_out;
531assign fdin[3:0] = din[3:0];
532
533
534
535
536
537
538dff #(4) d0_0 (
539.l1clk(l1clk),
540.siclk(siclk),
541.soclk(soclk),
542.d(fdin[3:0]),
543.si({scan_in,so[2:0]}),
544.so({so[2:0],scan_out}),
545.q(dout[3:0])
546);
547
548
549
550
551
552
553
554
555
556
557
558
559endmodule
560
561
562
563
564
565
566
567
568
569
570
571
572
573// any PARAMS parms go into naming of macro
574
575module mcu_ibist_ctl_msff_ctl_macro__width_10 (
576 din,
577 l1clk,
578 scan_in,
579 siclk,
580 soclk,
581 dout,
582 scan_out);
583wire [9:0] fdin;
584wire [8:0] so;
585
586 input [9:0] din;
587 input l1clk;
588 input scan_in;
589
590
591 input siclk;
592 input soclk;
593
594 output [9:0] dout;
595 output scan_out;
596assign fdin[9:0] = din[9:0];
597
598
599
600
601
602
603dff #(10) d0_0 (
604.l1clk(l1clk),
605.siclk(siclk),
606.soclk(soclk),
607.d(fdin[9:0]),
608.si({scan_in,so[8:0]}),
609.so({so[8:0],scan_out}),
610.q(dout[9:0])
611);
612
613
614endmodule
615
616
617
618
619// any PARAMS parms go into naming of macro
620
621module mcu_ibist_ctl_msff_ctl_macro__width_14 (
622 din,
623 l1clk,
624 scan_in,
625 siclk,
626 soclk,
627 dout,
628 scan_out);
629wire [13:0] fdin;
630wire [12:0] so;
631
632 input [13:0] din;
633 input l1clk;
634 input scan_in;
635
636
637 input siclk;
638 input soclk;
639
640 output [13:0] dout;
641 output scan_out;
642assign fdin[13:0] = din[13:0];
643
644
645
646
647
648
649dff #(14) d0_0 (
650.l1clk(l1clk),
651.siclk(siclk),
652.soclk(soclk),
653.d(fdin[13:0]),
654.si({scan_in,so[12:0]}),
655.so({so[12:0],scan_out}),
656.q(dout[13:0])
657);
658
659
660
661
662
663
664
665
666
667
668
669
670endmodule
671
672
673
674
675
676
677
678