Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: tlu_sse_dp.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 | module tlu_sse_dp ( | |
36 | l2clk, | |
37 | tcu_pce_ov, | |
38 | spc_aclk, | |
39 | spc_bclk, | |
40 | tcu_scan_en, | |
41 | scan_in, | |
42 | tcu_shscan_clk_stop, | |
43 | trl1_shscanid_2, | |
44 | fls_ss_update_pc_w, | |
45 | pct0_shadow_pc_d, | |
46 | pct1_shadow_pc_d, | |
47 | fls0_spc_hardstop_request, | |
48 | fls0_spc_softstop_request, | |
49 | fls0_spc_trigger_pulse, | |
50 | fls1_spc_hardstop_request, | |
51 | fls1_spc_softstop_request, | |
52 | fls1_spc_trigger_pulse, | |
53 | scan_out, | |
54 | sse_shscan_clk_stop, | |
55 | sse_shadow_pc, | |
56 | tlu_hardstop_request, | |
57 | tlu_softstop_request, | |
58 | tlu_trigger_pulse); | |
59 | wire stop; | |
60 | wire en; | |
61 | wire clk; | |
62 | wire pce_ov; | |
63 | wire se; | |
64 | wire siclk; | |
65 | wire soclk; | |
66 | wire pc_e_lat_scanin; | |
67 | wire pc_e_lat_scanout; | |
68 | wire [47:2] pc_e; | |
69 | wire pc_m_lat_scanin; | |
70 | wire pc_m_lat_scanout; | |
71 | wire [47:2] pc_m; | |
72 | wire pc_b_lat_scanin; | |
73 | wire pc_b_lat_scanout; | |
74 | wire shscan_clk_stop_in; | |
75 | wire [47:2] pc_b; | |
76 | wire pc_w_lat_scanin; | |
77 | wire pc_w_lat_scanout; | |
78 | ||
79 | ||
80 | ||
81 | input l2clk; | |
82 | input tcu_pce_ov; | |
83 | input spc_aclk; | |
84 | input spc_bclk; | |
85 | input tcu_scan_en; | |
86 | ||
87 | input scan_in; | |
88 | ||
89 | input tcu_shscan_clk_stop; // To be synchronized | |
90 | ||
91 | input trl1_shscanid_2; | |
92 | ||
93 | input [1:0] fls_ss_update_pc_w; | |
94 | ||
95 | input [47:2] pct0_shadow_pc_d; | |
96 | input [47:2] pct1_shadow_pc_d; | |
97 | ||
98 | // NOT SHADOW SCAN, but debug | |
99 | input fls0_spc_hardstop_request; | |
100 | input fls0_spc_softstop_request; | |
101 | input fls0_spc_trigger_pulse; | |
102 | input fls1_spc_hardstop_request; | |
103 | input fls1_spc_softstop_request; | |
104 | input fls1_spc_trigger_pulse; | |
105 | ||
106 | ||
107 | ||
108 | output scan_out; | |
109 | ||
110 | output sse_shscan_clk_stop; | |
111 | ||
112 | output [47:2] sse_shadow_pc; | |
113 | ||
114 | output tlu_hardstop_request; | |
115 | output tlu_softstop_request; | |
116 | output tlu_trigger_pulse; | |
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ////////////////////////////////////////////////////////////////////// | |
123 | ||
124 | assign stop = 1'b0; | |
125 | assign en = 1'b1; | |
126 | assign clk = l2clk; | |
127 | ||
128 | tlu_sse_dp_buff_macro__width_4 clk_control_buf ( | |
129 | .din ({tcu_pce_ov , | |
130 | tcu_scan_en , | |
131 | spc_aclk , | |
132 | spc_bclk }), | |
133 | .dout ({pce_ov , | |
134 | se , | |
135 | siclk , | |
136 | soclk }) | |
137 | ); | |
138 | ||
139 | ||
140 | ||
141 | ////////////////////////////////////////////////////////////////////// | |
142 | // | |
143 | // Stage PC to W | |
144 | // | |
145 | ||
146 | tlu_sse_dp_msff_macro__left_14__mux_aope__ports_2__stack_60c__width_46 pc_e_lat ( | |
147 | .scan_in(pc_e_lat_scanin), | |
148 | .scan_out(pc_e_lat_scanout), | |
149 | .din1 (pct0_shadow_pc_d [47:2] ), | |
150 | .din0 (pct1_shadow_pc_d [47:2] ), | |
151 | .sel0 (trl1_shscanid_2 ), | |
152 | .dout (pc_e [47:2] ), | |
153 | .clk(clk), | |
154 | .en(en), | |
155 | .se(se), | |
156 | .siclk(siclk), | |
157 | .soclk(soclk), | |
158 | .pce_ov(pce_ov), | |
159 | .stop(stop) | |
160 | ); | |
161 | ||
162 | tlu_sse_dp_msff_macro__left_14__stack_60c__width_46 pc_m_lat ( | |
163 | .scan_in(pc_m_lat_scanin), | |
164 | .scan_out(pc_m_lat_scanout), | |
165 | .din (pc_e [47:2] ), | |
166 | .dout (pc_m [47:2] ), | |
167 | .clk(clk), | |
168 | .en(en), | |
169 | .se(se), | |
170 | .siclk(siclk), | |
171 | .soclk(soclk), | |
172 | .pce_ov(pce_ov), | |
173 | .stop(stop) | |
174 | ); | |
175 | ||
176 | tlu_sse_dp_msff_macro__left_12__stack_60c__width_48 pc_b_lat ( | |
177 | .scan_in(pc_b_lat_scanin), | |
178 | .scan_out(pc_b_lat_scanout), | |
179 | .din ({pc_m [47:2], | |
180 | tcu_shscan_clk_stop , | |
181 | shscan_clk_stop_in }), | |
182 | .dout ({pc_b [47:2], | |
183 | shscan_clk_stop_in , | |
184 | sse_shscan_clk_stop }), | |
185 | .clk(clk), | |
186 | .en(en), | |
187 | .se(se), | |
188 | .siclk(siclk), | |
189 | .soclk(soclk), | |
190 | .pce_ov(pce_ov), | |
191 | .stop(stop) | |
192 | ); | |
193 | ||
194 | tlu_sse_dp_msff_macro__left_14__mux_aope__ports_3__stack_60c__width_46 pc_w_lat ( | |
195 | .scan_in(pc_w_lat_scanin), | |
196 | .scan_out(pc_w_lat_scanout), | |
197 | .din0 (pc_b [47:2] ), | |
198 | .din1 (pc_b [47:2] ), | |
199 | .din2 (sse_shadow_pc [47:2] ), | |
200 | .sel0 (fls_ss_update_pc_w [0 ] ), | |
201 | .sel1 (fls_ss_update_pc_w [1 ] ), | |
202 | .dout (sse_shadow_pc [47:2] ), | |
203 | .clk(clk), | |
204 | .en(en), | |
205 | .se(se), | |
206 | .siclk(siclk), | |
207 | .soclk(soclk), | |
208 | .pce_ov(pce_ov), | |
209 | .stop(stop) | |
210 | ); | |
211 | ||
212 | ||
213 | ||
214 | ////////////////////////////////////////////////////////////////////////////// | |
215 | // OR the stop requests and trigger pulses | |
216 | // | |
217 | ||
218 | tlu_sse_dp_or_macro__ports_2__stack_60c__width_3 debug_or ( | |
219 | .din0 ({fls0_spc_hardstop_request , | |
220 | fls0_spc_softstop_request , | |
221 | fls0_spc_trigger_pulse }), | |
222 | .din1 ({fls1_spc_hardstop_request , | |
223 | fls1_spc_softstop_request , | |
224 | fls1_spc_trigger_pulse }), | |
225 | .dout ({tlu_hardstop_request , | |
226 | tlu_softstop_request , | |
227 | tlu_trigger_pulse }) | |
228 | ); | |
229 | ||
230 | ||
231 | ||
232 | ||
233 | // fixscan start: | |
234 | assign pc_e_lat_scanin = scan_in ; | |
235 | assign pc_m_lat_scanin = pc_e_lat_scanout ; | |
236 | assign pc_b_lat_scanin = pc_m_lat_scanout ; | |
237 | assign pc_w_lat_scanin = pc_b_lat_scanout ; | |
238 | assign scan_out = pc_w_lat_scanout ; | |
239 | // fixscan end: | |
240 | endmodule | |
241 | ||
242 | ||
243 | ||
244 | ||
245 | // | |
246 | // buff macro | |
247 | // | |
248 | // | |
249 | ||
250 | ||
251 | ||
252 | ||
253 | ||
254 | module tlu_sse_dp_buff_macro__width_4 ( | |
255 | din, | |
256 | dout); | |
257 | input [3:0] din; | |
258 | output [3:0] dout; | |
259 | ||
260 | ||
261 | ||
262 | ||
263 | ||
264 | ||
265 | buff #(4) d0_0 ( | |
266 | .in(din[3:0]), | |
267 | .out(dout[3:0]) | |
268 | ); | |
269 | ||
270 | ||
271 | ||
272 | ||
273 | ||
274 | ||
275 | ||
276 | ||
277 | endmodule | |
278 | ||
279 | ||
280 | ||
281 | ||
282 | ||
283 | ||
284 | ||
285 | ||
286 | ||
287 | // any PARAMS parms go into naming of macro | |
288 | ||
289 | module tlu_sse_dp_msff_macro__left_14__mux_aope__ports_2__stack_60c__width_46 ( | |
290 | din0, | |
291 | din1, | |
292 | sel0, | |
293 | clk, | |
294 | en, | |
295 | se, | |
296 | scan_in, | |
297 | siclk, | |
298 | soclk, | |
299 | pce_ov, | |
300 | stop, | |
301 | dout, | |
302 | scan_out); | |
303 | wire psel0; | |
304 | wire psel1; | |
305 | wire [45:0] muxout; | |
306 | wire l1clk; | |
307 | wire siclk_out; | |
308 | wire soclk_out; | |
309 | wire [44:0] so; | |
310 | ||
311 | input [45:0] din0; | |
312 | input [45:0] din1; | |
313 | input sel0; | |
314 | ||
315 | ||
316 | input clk; | |
317 | input en; | |
318 | input se; | |
319 | input scan_in; | |
320 | input siclk; | |
321 | input soclk; | |
322 | input pce_ov; | |
323 | input stop; | |
324 | ||
325 | ||
326 | ||
327 | output [45:0] dout; | |
328 | ||
329 | ||
330 | output scan_out; | |
331 | ||
332 | ||
333 | ||
334 | ||
335 | cl_dp1_penc2_8x c1_0 ( | |
336 | .sel0(sel0), | |
337 | .psel0(psel0), | |
338 | .psel1(psel1) | |
339 | ); | |
340 | ||
341 | mux2s #(46) d1_0 ( | |
342 | .sel0(psel0), | |
343 | .sel1(psel1), | |
344 | .in0(din0[45:0]), | |
345 | .in1(din1[45:0]), | |
346 | .dout(muxout[45:0]) | |
347 | ); | |
348 | cl_dp1_l1hdr_8x c0_0 ( | |
349 | .l2clk(clk), | |
350 | .pce(en), | |
351 | .aclk(siclk), | |
352 | .bclk(soclk), | |
353 | .l1clk(l1clk), | |
354 | .se(se), | |
355 | .pce_ov(pce_ov), | |
356 | .stop(stop), | |
357 | .siclk_out(siclk_out), | |
358 | .soclk_out(soclk_out) | |
359 | ); | |
360 | dff #(46) d0_0 ( | |
361 | .l1clk(l1clk), | |
362 | .siclk(siclk_out), | |
363 | .soclk(soclk_out), | |
364 | .d(muxout[45:0]), | |
365 | .si({scan_in,so[44:0]}), | |
366 | .so({so[44:0],scan_out}), | |
367 | .q(dout[45:0]) | |
368 | ); | |
369 | ||
370 | ||
371 | ||
372 | ||
373 | ||
374 | ||
375 | ||
376 | ||
377 | ||
378 | ||
379 | ||
380 | ||
381 | ||
382 | ||
383 | ||
384 | ||
385 | ||
386 | ||
387 | ||
388 | ||
389 | endmodule | |
390 | ||
391 | ||
392 | ||
393 | ||
394 | ||
395 | ||
396 | ||
397 | ||
398 | ||
399 | ||
400 | ||
401 | ||
402 | ||
403 | // any PARAMS parms go into naming of macro | |
404 | ||
405 | module tlu_sse_dp_msff_macro__left_14__stack_60c__width_46 ( | |
406 | din, | |
407 | clk, | |
408 | en, | |
409 | se, | |
410 | scan_in, | |
411 | siclk, | |
412 | soclk, | |
413 | pce_ov, | |
414 | stop, | |
415 | dout, | |
416 | scan_out); | |
417 | wire l1clk; | |
418 | wire siclk_out; | |
419 | wire soclk_out; | |
420 | wire [44:0] so; | |
421 | ||
422 | input [45:0] din; | |
423 | ||
424 | ||
425 | input clk; | |
426 | input en; | |
427 | input se; | |
428 | input scan_in; | |
429 | input siclk; | |
430 | input soclk; | |
431 | input pce_ov; | |
432 | input stop; | |
433 | ||
434 | ||
435 | ||
436 | output [45:0] dout; | |
437 | ||
438 | ||
439 | output scan_out; | |
440 | ||
441 | ||
442 | ||
443 | ||
444 | cl_dp1_l1hdr_8x c0_0 ( | |
445 | .l2clk(clk), | |
446 | .pce(en), | |
447 | .aclk(siclk), | |
448 | .bclk(soclk), | |
449 | .l1clk(l1clk), | |
450 | .se(se), | |
451 | .pce_ov(pce_ov), | |
452 | .stop(stop), | |
453 | .siclk_out(siclk_out), | |
454 | .soclk_out(soclk_out) | |
455 | ); | |
456 | dff #(46) d0_0 ( | |
457 | .l1clk(l1clk), | |
458 | .siclk(siclk_out), | |
459 | .soclk(soclk_out), | |
460 | .d(din[45:0]), | |
461 | .si({scan_in,so[44:0]}), | |
462 | .so({so[44:0],scan_out}), | |
463 | .q(dout[45:0]) | |
464 | ); | |
465 | ||
466 | ||
467 | ||
468 | ||
469 | ||
470 | ||
471 | ||
472 | ||
473 | ||
474 | ||
475 | ||
476 | ||
477 | ||
478 | ||
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | endmodule | |
486 | ||
487 | ||
488 | ||
489 | ||
490 | ||
491 | ||
492 | ||
493 | ||
494 | ||
495 | ||
496 | ||
497 | ||
498 | ||
499 | // any PARAMS parms go into naming of macro | |
500 | ||
501 | module tlu_sse_dp_msff_macro__left_12__stack_60c__width_48 ( | |
502 | din, | |
503 | clk, | |
504 | en, | |
505 | se, | |
506 | scan_in, | |
507 | siclk, | |
508 | soclk, | |
509 | pce_ov, | |
510 | stop, | |
511 | dout, | |
512 | scan_out); | |
513 | wire l1clk; | |
514 | wire siclk_out; | |
515 | wire soclk_out; | |
516 | wire [46:0] so; | |
517 | ||
518 | input [47:0] din; | |
519 | ||
520 | ||
521 | input clk; | |
522 | input en; | |
523 | input se; | |
524 | input scan_in; | |
525 | input siclk; | |
526 | input soclk; | |
527 | input pce_ov; | |
528 | input stop; | |
529 | ||
530 | ||
531 | ||
532 | output [47:0] dout; | |
533 | ||
534 | ||
535 | output scan_out; | |
536 | ||
537 | ||
538 | ||
539 | ||
540 | cl_dp1_l1hdr_8x c0_0 ( | |
541 | .l2clk(clk), | |
542 | .pce(en), | |
543 | .aclk(siclk), | |
544 | .bclk(soclk), | |
545 | .l1clk(l1clk), | |
546 | .se(se), | |
547 | .pce_ov(pce_ov), | |
548 | .stop(stop), | |
549 | .siclk_out(siclk_out), | |
550 | .soclk_out(soclk_out) | |
551 | ); | |
552 | dff #(48) d0_0 ( | |
553 | .l1clk(l1clk), | |
554 | .siclk(siclk_out), | |
555 | .soclk(soclk_out), | |
556 | .d(din[47:0]), | |
557 | .si({scan_in,so[46:0]}), | |
558 | .so({so[46:0],scan_out}), | |
559 | .q(dout[47:0]) | |
560 | ); | |
561 | ||
562 | ||
563 | ||
564 | ||
565 | ||
566 | ||
567 | ||
568 | ||
569 | ||
570 | ||
571 | ||
572 | ||
573 | ||
574 | ||
575 | ||
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | endmodule | |
582 | ||
583 | ||
584 | ||
585 | ||
586 | ||
587 | ||
588 | ||
589 | ||
590 | ||
591 | ||
592 | ||
593 | ||
594 | ||
595 | // any PARAMS parms go into naming of macro | |
596 | ||
597 | module tlu_sse_dp_msff_macro__left_14__mux_aope__ports_3__stack_60c__width_46 ( | |
598 | din0, | |
599 | din1, | |
600 | din2, | |
601 | sel0, | |
602 | sel1, | |
603 | clk, | |
604 | en, | |
605 | se, | |
606 | scan_in, | |
607 | siclk, | |
608 | soclk, | |
609 | pce_ov, | |
610 | stop, | |
611 | dout, | |
612 | scan_out); | |
613 | wire psel0; | |
614 | wire psel1; | |
615 | wire psel2; | |
616 | wire [45:0] muxout; | |
617 | wire l1clk; | |
618 | wire siclk_out; | |
619 | wire soclk_out; | |
620 | wire [44:0] so; | |
621 | ||
622 | input [45:0] din0; | |
623 | input [45:0] din1; | |
624 | input [45:0] din2; | |
625 | input sel0; | |
626 | input sel1; | |
627 | ||
628 | ||
629 | input clk; | |
630 | input en; | |
631 | input se; | |
632 | input scan_in; | |
633 | input siclk; | |
634 | input soclk; | |
635 | input pce_ov; | |
636 | input stop; | |
637 | ||
638 | ||
639 | ||
640 | output [45:0] dout; | |
641 | ||
642 | ||
643 | output scan_out; | |
644 | ||
645 | ||
646 | ||
647 | ||
648 | cl_dp1_penc3_8x c1_0 ( | |
649 | .test(1'b1), | |
650 | .sel0(sel0), | |
651 | .sel1(sel1), | |
652 | .psel0(psel0), | |
653 | .psel1(psel1), | |
654 | .psel2(psel2) | |
655 | ); | |
656 | ||
657 | mux3s #(46) d1_0 ( | |
658 | .sel0(psel0), | |
659 | .sel1(psel1), | |
660 | .sel2(psel2), | |
661 | .in0(din0[45:0]), | |
662 | .in1(din1[45:0]), | |
663 | .in2(din2[45:0]), | |
664 | .dout(muxout[45:0]) | |
665 | ); | |
666 | cl_dp1_l1hdr_8x c0_0 ( | |
667 | .l2clk(clk), | |
668 | .pce(en), | |
669 | .aclk(siclk), | |
670 | .bclk(soclk), | |
671 | .l1clk(l1clk), | |
672 | .se(se), | |
673 | .pce_ov(pce_ov), | |
674 | .stop(stop), | |
675 | .siclk_out(siclk_out), | |
676 | .soclk_out(soclk_out) | |
677 | ); | |
678 | dff #(46) d0_0 ( | |
679 | .l1clk(l1clk), | |
680 | .siclk(siclk_out), | |
681 | .soclk(soclk_out), | |
682 | .d(muxout[45:0]), | |
683 | .si({scan_in,so[44:0]}), | |
684 | .so({so[44:0],scan_out}), | |
685 | .q(dout[45:0]) | |
686 | ); | |
687 | ||
688 | ||
689 | ||
690 | ||
691 | ||
692 | ||
693 | ||
694 | ||
695 | ||
696 | ||
697 | ||
698 | ||
699 | ||
700 | ||
701 | ||
702 | ||
703 | ||
704 | ||
705 | ||
706 | ||
707 | endmodule | |
708 | ||
709 | ||
710 | ||
711 | ||
712 | ||
713 | ||
714 | ||
715 | ||
716 | ||
717 | // | |
718 | // or macro for ports = 2,3 | |
719 | // | |
720 | // | |
721 | ||
722 | ||
723 | ||
724 | ||
725 | ||
726 | module tlu_sse_dp_or_macro__ports_2__stack_60c__width_3 ( | |
727 | din0, | |
728 | din1, | |
729 | dout); | |
730 | input [2:0] din0; | |
731 | input [2:0] din1; | |
732 | output [2:0] dout; | |
733 | ||
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | or2 #(3) d0_0 ( | |
740 | .in0(din0[2:0]), | |
741 | .in1(din1[2:0]), | |
742 | .out(dout[2:0]) | |
743 | ); | |
744 | ||
745 | ||
746 | ||
747 | ||
748 | ||
749 | ||
750 | ||
751 | ||
752 | ||
753 | endmodule | |
754 | ||
755 | ||
756 | ||
757 |