Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: lsu_asd_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 lsu_asd_dp ( | |
36 | l2clk, | |
37 | scan_in, | |
38 | tcu_pce_ov, | |
39 | tcu_scan_en, | |
40 | spc_aclk, | |
41 | spc_bclk, | |
42 | scan_out, | |
43 | pid_asi_pkt, | |
44 | asc_ring_ctl, | |
45 | asc_ring_data, | |
46 | asc_ring_local, | |
47 | asc_ring_fast, | |
48 | lsu_asi_clken, | |
49 | lsu_ring_ctl, | |
50 | asd_p2a_vld, | |
51 | asd_p2a_fast, | |
52 | lsu_rngf_cdbus, | |
53 | lsu_rngl_cdbus, | |
54 | lsu_ifu_ctxt_data, | |
55 | asd_ring_ctl, | |
56 | asd_ring_asi, | |
57 | asd_ring_addr); | |
58 | wire stop; | |
59 | wire se; | |
60 | wire pce_ov; | |
61 | wire siclk; | |
62 | wire soclk; | |
63 | wire i_pid_pkt_d2_reg_scanin; | |
64 | wire i_pid_pkt_d2_reg_scanout; | |
65 | wire [63:0] asdl_data_2f; | |
66 | wire asdl_rngl_b63; | |
67 | wire asdl_rngf_b63; | |
68 | wire [62:0] asdl_ring_pkt; | |
69 | wire i_rng_pkt_reg_scanin; | |
70 | wire i_rng_pkt_reg_scanout; | |
71 | wire asd_rngl_b63; | |
72 | wire asd_rngf_b63; | |
73 | wire [62:0] asd_ring_pkt; | |
74 | wire lsu_rngl_cdbus_b63; | |
75 | wire lsu_rngf_cdbus_b63; | |
76 | wire [62:0] lsu_ring_cdbus; | |
77 | ||
78 | ||
79 | // globals | |
80 | input l2clk; | |
81 | input scan_in; | |
82 | input tcu_pce_ov; // scan signals | |
83 | input tcu_scan_en; | |
84 | input spc_aclk; | |
85 | input spc_bclk; | |
86 | output scan_out; | |
87 | ||
88 | ||
89 | input [127:0] pid_asi_pkt; // 127:0, 128 bit packet coming from pid to ASI block | |
90 | // 127 - Valid | |
91 | // 126 - Fast/Slow | |
92 | // 125:124 - 00-ASI, 01-ASR, 10-PR, 11-HPR | |
93 | // 123 - rd/wrx | |
94 | // 122:120 - Thread ID | |
95 | // 119:112 - ASI Field | |
96 | // 111:64 - Virtual address | |
97 | // 63:0 - Data | |
98 | ||
99 | input asc_ring_ctl; // ring control bit from asc | |
100 | input asc_ring_data; // ring data bit from asc | |
101 | input asc_ring_local; // local ring sending | |
102 | input asc_ring_fast; // fast ring sending | |
103 | ||
104 | input lsu_asi_clken; | |
105 | input lsu_ring_ctl; | |
106 | ||
107 | output asd_p2a_vld; // valid packet from pid | |
108 | output asd_p2a_fast; // packet from pid is destined for fast bus | |
109 | ||
110 | ||
111 | output [64:0] lsu_rngf_cdbus; | |
112 | output [64:0] lsu_rngl_cdbus; | |
113 | ||
114 | output [12:0] lsu_ifu_ctxt_data; | |
115 | ||
116 | output [63:56] asd_ring_ctl; | |
117 | output [7:0] asd_ring_asi; | |
118 | output [8:3] asd_ring_addr; | |
119 | ||
120 | // scan renames | |
121 | assign stop = 1'b0; | |
122 | // end scan | |
123 | ||
124 | lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 test_rep0 ( | |
125 | .din ({tcu_scan_en,tcu_pce_ov,spc_aclk,spc_bclk}), | |
126 | .dout({se,pce_ov,siclk,soclk}) | |
127 | ); | |
128 | ||
129 | /////////////////////////////////////////////////////////////////// | |
130 | // PROCESS DATA FROM PID AND SEND IT OVER APPROPRIATE RING | |
131 | /////////////////////////////////////////////////////////////////// | |
132 | // | |
133 | // | |
134 | // rename valid and Fast signal coming from the pid and send it to asc | |
135 | assign asd_p2a_vld = pid_asi_pkt[127]; | |
136 | assign asd_p2a_fast = pid_asi_pkt[126]; | |
137 | ||
138 | // pipe data packet for one more cycle | |
139 | // ctl and data packets are sent on the ring over two cycles | |
140 | lsu_asd_dp_msff_macro__stack_66c__width_64 i_pid_pkt_d2_reg | |
141 | ( | |
142 | .scan_in(i_pid_pkt_d2_reg_scanin), | |
143 | .scan_out(i_pid_pkt_d2_reg_scanout), | |
144 | .clk (l2clk), | |
145 | .en (lsu_asi_clken), | |
146 | .din (pid_asi_pkt[63:0]), | |
147 | .dout(asdl_data_2f[63:0]), | |
148 | .se(se), | |
149 | .siclk(siclk), | |
150 | .soclk(soclk), | |
151 | .pce_ov(pce_ov), | |
152 | .stop(stop) | |
153 | ); | |
154 | ||
155 | // Mux between the data and control packet | |
156 | ||
157 | lsu_asd_dp_mux_macro__mux_aonpe__ports_2__stack_66c__width_65 i_rng_pkt_mux | |
158 | ( | |
159 | .din0( {asc_ring_local, asc_ring_fast, 1'b0,pid_asi_pkt[125:64]}), | |
160 | .din1( {asdl_data_2f[63],asdl_data_2f[63],asdl_data_2f[62:0]}), | |
161 | .sel0( asc_ring_ctl), | |
162 | .sel1( asc_ring_data), | |
163 | .dout( {asdl_rngl_b63,asdl_rngf_b63,asdl_ring_pkt[62:0]}) | |
164 | ); | |
165 | ||
166 | lsu_asd_dp_msff_macro__stack_66c__width_65 i_rng_pkt_reg | |
167 | ( | |
168 | .scan_in(i_rng_pkt_reg_scanin), | |
169 | .scan_out(i_rng_pkt_reg_scanout), | |
170 | .clk (l2clk), | |
171 | .en (lsu_asi_clken), | |
172 | .din ({asdl_rngl_b63,asdl_rngf_b63,asdl_ring_pkt[62:0]}), | |
173 | .dout({asd_rngl_b63, asd_rngf_b63, asd_ring_pkt[62:0]}), | |
174 | .se(se), | |
175 | .siclk(siclk), | |
176 | .soclk(soclk), | |
177 | .pce_ov(pce_ov), | |
178 | .stop(stop) | |
179 | ); | |
180 | ||
181 | assign asd_ring_ctl[63:56] = {asd_rngf_b63,asd_ring_pkt[62:56]}; | |
182 | assign asd_ring_asi[7:0] = asd_ring_pkt[55:48]; | |
183 | assign asd_ring_addr[8:3] = asd_ring_pkt[8:3]; | |
184 | ||
185 | lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_13 ifu_rngf_buf ( | |
186 | .din (asd_ring_pkt[12:0]), | |
187 | .dout (lsu_ifu_ctxt_data[12:0]) | |
188 | ); | |
189 | ||
190 | // send packet over the ring | |
191 | lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_65 ring_buf ( | |
192 | .din ({asd_rngl_b63, asd_rngf_b63, asd_ring_pkt[62:0]}), | |
193 | .dout ({lsu_rngl_cdbus_b63,lsu_rngf_cdbus_b63,lsu_ring_cdbus[62:0]}) | |
194 | ); | |
195 | ||
196 | lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_65 rngf_buf ( | |
197 | .din ({lsu_ring_ctl, lsu_rngf_cdbus_b63, lsu_ring_cdbus[62:0]}), | |
198 | .dout (lsu_rngf_cdbus[64:0]) | |
199 | ); | |
200 | lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_none__width_65 rngl_buf ( | |
201 | .din ({lsu_ring_ctl, lsu_rngl_cdbus_b63, lsu_ring_cdbus[62:0]}), | |
202 | .dout (lsu_rngl_cdbus[64:0]) | |
203 | ); | |
204 | ||
205 | ||
206 | // fixscan start: | |
207 | assign i_pid_pkt_d2_reg_scanin = scan_in ; | |
208 | assign i_rng_pkt_reg_scanin = i_pid_pkt_d2_reg_scanout ; | |
209 | assign scan_out = i_rng_pkt_reg_scanout ; | |
210 | // fixscan end: | |
211 | endmodule | |
212 | ||
213 | ||
214 | ||
215 | // | |
216 | // buff macro | |
217 | // | |
218 | // | |
219 | ||
220 | ||
221 | ||
222 | ||
223 | ||
224 | module lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 ( | |
225 | din, | |
226 | dout); | |
227 | input [3:0] din; | |
228 | output [3:0] dout; | |
229 | ||
230 | ||
231 | ||
232 | ||
233 | ||
234 | ||
235 | buff #(4) d0_0 ( | |
236 | .in(din[3:0]), | |
237 | .out(dout[3:0]) | |
238 | ); | |
239 | ||
240 | ||
241 | ||
242 | ||
243 | ||
244 | ||
245 | ||
246 | ||
247 | endmodule | |
248 | ||
249 | ||
250 | ||
251 | ||
252 | ||
253 | ||
254 | ||
255 | ||
256 | ||
257 | // any PARAMS parms go into naming of macro | |
258 | ||
259 | module lsu_asd_dp_msff_macro__stack_66c__width_64 ( | |
260 | din, | |
261 | clk, | |
262 | en, | |
263 | se, | |
264 | scan_in, | |
265 | siclk, | |
266 | soclk, | |
267 | pce_ov, | |
268 | stop, | |
269 | dout, | |
270 | scan_out); | |
271 | wire l1clk; | |
272 | wire siclk_out; | |
273 | wire soclk_out; | |
274 | wire [62:0] so; | |
275 | ||
276 | input [63:0] din; | |
277 | ||
278 | ||
279 | input clk; | |
280 | input en; | |
281 | input se; | |
282 | input scan_in; | |
283 | input siclk; | |
284 | input soclk; | |
285 | input pce_ov; | |
286 | input stop; | |
287 | ||
288 | ||
289 | ||
290 | output [63:0] dout; | |
291 | ||
292 | ||
293 | output scan_out; | |
294 | ||
295 | ||
296 | ||
297 | ||
298 | cl_dp1_l1hdr_8x c0_0 ( | |
299 | .l2clk(clk), | |
300 | .pce(en), | |
301 | .aclk(siclk), | |
302 | .bclk(soclk), | |
303 | .l1clk(l1clk), | |
304 | .se(se), | |
305 | .pce_ov(pce_ov), | |
306 | .stop(stop), | |
307 | .siclk_out(siclk_out), | |
308 | .soclk_out(soclk_out) | |
309 | ); | |
310 | dff #(64) d0_0 ( | |
311 | .l1clk(l1clk), | |
312 | .siclk(siclk_out), | |
313 | .soclk(soclk_out), | |
314 | .d(din[63:0]), | |
315 | .si({scan_in,so[62:0]}), | |
316 | .so({so[62:0],scan_out}), | |
317 | .q(dout[63:0]) | |
318 | ); | |
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | ||
326 | ||
327 | ||
328 | ||
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | ||
335 | ||
336 | ||
337 | ||
338 | ||
339 | endmodule | |
340 | ||
341 | ||
342 | ||
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | ||
349 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
350 | // also for pass-gate with decoder | |
351 | ||
352 | ||
353 | ||
354 | ||
355 | ||
356 | // any PARAMS parms go into naming of macro | |
357 | ||
358 | module lsu_asd_dp_mux_macro__mux_aonpe__ports_2__stack_66c__width_65 ( | |
359 | din0, | |
360 | sel0, | |
361 | din1, | |
362 | sel1, | |
363 | dout); | |
364 | wire buffout0; | |
365 | wire buffout1; | |
366 | ||
367 | input [64:0] din0; | |
368 | input sel0; | |
369 | input [64:0] din1; | |
370 | input sel1; | |
371 | output [64:0] dout; | |
372 | ||
373 | ||
374 | ||
375 | ||
376 | ||
377 | cl_dp1_muxbuff2_8x c0_0 ( | |
378 | .in0(sel0), | |
379 | .in1(sel1), | |
380 | .out0(buffout0), | |
381 | .out1(buffout1) | |
382 | ); | |
383 | mux2s #(65) d0_0 ( | |
384 | .sel0(buffout0), | |
385 | .sel1(buffout1), | |
386 | .in0(din0[64:0]), | |
387 | .in1(din1[64:0]), | |
388 | .dout(dout[64:0]) | |
389 | ); | |
390 | ||
391 | ||
392 | ||
393 | ||
394 | ||
395 | ||
396 | ||
397 | ||
398 | ||
399 | ||
400 | ||
401 | ||
402 | ||
403 | endmodule | |
404 | ||
405 | ||
406 | ||
407 | ||
408 | ||
409 | ||
410 | // any PARAMS parms go into naming of macro | |
411 | ||
412 | module lsu_asd_dp_msff_macro__stack_66c__width_65 ( | |
413 | din, | |
414 | clk, | |
415 | en, | |
416 | se, | |
417 | scan_in, | |
418 | siclk, | |
419 | soclk, | |
420 | pce_ov, | |
421 | stop, | |
422 | dout, | |
423 | scan_out); | |
424 | wire l1clk; | |
425 | wire siclk_out; | |
426 | wire soclk_out; | |
427 | wire [63:0] so; | |
428 | ||
429 | input [64:0] din; | |
430 | ||
431 | ||
432 | input clk; | |
433 | input en; | |
434 | input se; | |
435 | input scan_in; | |
436 | input siclk; | |
437 | input soclk; | |
438 | input pce_ov; | |
439 | input stop; | |
440 | ||
441 | ||
442 | ||
443 | output [64:0] dout; | |
444 | ||
445 | ||
446 | output scan_out; | |
447 | ||
448 | ||
449 | ||
450 | ||
451 | cl_dp1_l1hdr_8x c0_0 ( | |
452 | .l2clk(clk), | |
453 | .pce(en), | |
454 | .aclk(siclk), | |
455 | .bclk(soclk), | |
456 | .l1clk(l1clk), | |
457 | .se(se), | |
458 | .pce_ov(pce_ov), | |
459 | .stop(stop), | |
460 | .siclk_out(siclk_out), | |
461 | .soclk_out(soclk_out) | |
462 | ); | |
463 | dff #(65) d0_0 ( | |
464 | .l1clk(l1clk), | |
465 | .siclk(siclk_out), | |
466 | .soclk(soclk_out), | |
467 | .d(din[64:0]), | |
468 | .si({scan_in,so[63:0]}), | |
469 | .so({so[63:0],scan_out}), | |
470 | .q(dout[64:0]) | |
471 | ); | |
472 | ||
473 | ||
474 | ||
475 | ||
476 | ||
477 | ||
478 | ||
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | ||
486 | ||
487 | ||
488 | ||
489 | ||
490 | ||
491 | ||
492 | endmodule | |
493 | ||
494 | ||
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | ||
501 | ||
502 | // | |
503 | // buff macro | |
504 | // | |
505 | // | |
506 | ||
507 | ||
508 | ||
509 | ||
510 | ||
511 | module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_13 ( | |
512 | din, | |
513 | dout); | |
514 | input [12:0] din; | |
515 | output [12:0] dout; | |
516 | ||
517 | ||
518 | ||
519 | ||
520 | ||
521 | ||
522 | buff #(13) d0_0 ( | |
523 | .in(din[12:0]), | |
524 | .out(dout[12:0]) | |
525 | ); | |
526 | ||
527 | ||
528 | ||
529 | ||
530 | ||
531 | ||
532 | ||
533 | ||
534 | endmodule | |
535 | ||
536 | ||
537 | ||
538 | ||
539 | ||
540 | // | |
541 | // buff macro | |
542 | // | |
543 | // | |
544 | ||
545 | ||
546 | ||
547 | ||
548 | ||
549 | module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_65 ( | |
550 | din, | |
551 | dout); | |
552 | input [64:0] din; | |
553 | output [64:0] dout; | |
554 | ||
555 | ||
556 | ||
557 | ||
558 | ||
559 | ||
560 | buff #(65) d0_0 ( | |
561 | .in(din[64:0]), | |
562 | .out(dout[64:0]) | |
563 | ); | |
564 | ||
565 | ||
566 | ||
567 | ||
568 | ||
569 | ||
570 | ||
571 | ||
572 | endmodule | |
573 | ||
574 | ||
575 | ||
576 | ||
577 | ||
578 | // | |
579 | // buff macro | |
580 | // | |
581 | // | |
582 | ||
583 | ||
584 | ||
585 | ||
586 | ||
587 | module lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_65 ( | |
588 | din, | |
589 | dout); | |
590 | input [64:0] din; | |
591 | output [64:0] dout; | |
592 | ||
593 | ||
594 | ||
595 | ||
596 | ||
597 | ||
598 | buff #(65) d0_0 ( | |
599 | .in(din[64:0]), | |
600 | .out(dout[64:0]) | |
601 | ); | |
602 | ||
603 | ||
604 | ||
605 | ||
606 | ||
607 | ||
608 | ||
609 | ||
610 | endmodule | |
611 | ||
612 | ||
613 | ||
614 | ||
615 | ||
616 | // | |
617 | // buff macro | |
618 | // | |
619 | // | |
620 | ||
621 | ||
622 | ||
623 | ||
624 | ||
625 | module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_none__width_65 ( | |
626 | din, | |
627 | dout); | |
628 | input [64:0] din; | |
629 | output [64:0] dout; | |
630 | ||
631 | ||
632 | ||
633 | ||
634 | ||
635 | ||
636 | buff #(65) d0_0 ( | |
637 | .in(din[64:0]), | |
638 | .out(dout[64:0]) | |
639 | ); | |
640 | ||
641 | ||
642 | ||
643 | ||
644 | ||
645 | ||
646 | ||
647 | ||
648 | endmodule | |
649 | ||
650 | ||
651 | ||
652 |