Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / tlu / rtl / tlu_cth_dp.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tlu_cth_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 ============================================
35module tlu_cth_dp (
36 l2clk,
37 scan_in,
38 tcu_pce_ov,
39 spc_aclk,
40 spc_bclk,
41 tcu_scan_en,
42 tcu_dectest,
43 tcu_muxtest,
44 tcu_scan_en_wmr,
45 spc_aclk_wmr,
46 wmr_scan_in,
47 lsu_rngf_cdbus,
48 cxi_wr_int_dis,
49 cxi_int_dis_vec,
50 asi_wr_int_rec,
51 asi_rd_inc_vec_2,
52 asi_int_rec_mux_sel_in,
53 asi_rd_int_rec,
54 asi_rd_inc_vec,
55 asi_wr_any_int_rec,
56 asi_wr_data,
57 asi_rd_stage_1,
58 dfd_asi_data,
59 dfd_asi_desr,
60 scan_out,
61 wmr_scan_out,
62 cth_wr_data,
63 cth_asi_data,
64 cth_irl_cleared);
65wire clk;
66wire en;
67wire stop;
68wire test;
69wire pce_ov;
70wire se;
71wire siclk;
72wire soclk;
73wire [7:0] irl_en;
74wire any_irl_en_0_2;
75wire any_irl_en_3_5;
76wire any_irl_en_6_7;
77wire any_irl_en;
78wire interrupt_receive7_lat_wmr_scanin;
79wire interrupt_receive7_lat_wmr_scanout;
80wire [63:0] int_dis;
81wire [63:0] int_rec;
82wire [63:0] inc_vec;
83wire [63:0] int_rec7;
84wire interrupt_receive6_lat_wmr_scanin;
85wire interrupt_receive6_lat_wmr_scanout;
86wire [63:0] int_rec6;
87wire interrupt_receive5_lat_wmr_scanin;
88wire interrupt_receive5_lat_wmr_scanout;
89wire [63:0] int_rec5;
90wire interrupt_receive4_lat_wmr_scanin;
91wire interrupt_receive4_lat_wmr_scanout;
92wire [63:0] int_rec4;
93wire interrupt_receive3_lat_wmr_scanin;
94wire interrupt_receive3_lat_wmr_scanout;
95wire [63:0] int_rec3;
96wire interrupt_receive2_lat_wmr_scanin;
97wire interrupt_receive2_lat_wmr_scanout;
98wire [63:0] int_rec2;
99wire interrupt_receive1_lat_wmr_scanin;
100wire interrupt_receive1_lat_wmr_scanout;
101wire [63:0] int_rec1;
102wire interrupt_receive0_lat_wmr_scanin;
103wire interrupt_receive0_lat_wmr_scanout;
104wire [63:0] int_rec0;
105wire int_rec_mux_sel_lat_scanin;
106wire int_rec_mux_sel_lat_scanout;
107wire [2:0] int_rec_mux_sel;
108wire [63:59] rngf_cdbus_unused;
109wire [63:0] int_rec_muxed;
110wire [2:0] ivr_63_56;
111wire [2:0] ivr_55_48;
112wire [2:0] ivr_47_40;
113wire [2:0] ivr_39_32;
114wire [2:0] ivr_31_24;
115wire [2:0] ivr_23_16;
116wire [2:0] ivr_15_08;
117wire [2:0] ivr_07_00;
118wire [31:4] ivl_sel;
119wire [7:1] incoming_vector_mux_sel;
120wire [5:0] incoming_vector_in;
121wire incoming_vector_lat_scanin;
122wire incoming_vector_lat_scanout;
123wire [5:0] incoming_vector;
124wire [7:0] dec_inc_vec_first;
125wire [63:0] dec_inc_vec;
126wire [63:0] int_rec_muxed_;
127wire [63:0] int_rec_dis_muxed;
128wire wr_int_rec;
129wire rd_inc_vec_2;
130wire set_clear_same_thread;
131wire s_c_idvw_irw_;
132wire s_c_idvw_irw;
133wire s_c_idvw_ivr_;
134wire s_c_idvw_ivr;
135wire neither_match;
136wire tcu_muxtest_rep0;
137wire [7:0] dec_int_dis_first;
138wire tcu_muxtest_rep1;
139wire [63:0] dec_int_dis;
140wire asi_lat_scanin;
141wire asi_lat_scanout;
142wire [63:0] asi_data;
143wire irl_cleared_lat_scanin;
144wire irl_cleared_lat_scanout;
145
146
147input l2clk;
148input scan_in;
149input tcu_pce_ov;
150input spc_aclk;
151input spc_bclk;
152input tcu_scan_en;
153input tcu_dectest;
154input tcu_muxtest;
155
156input tcu_scan_en_wmr;
157input spc_aclk_wmr; // Warm reset (non)scan
158input wmr_scan_in;
159
160input [64:56] lsu_rngf_cdbus;
161
162input [7:0] cxi_wr_int_dis; // Interrupt Vector Dispatch packet
163input [5:0] cxi_int_dis_vec; // from gasket
164
165input [7:0] asi_wr_int_rec; // Write Interrupt Receive Register
166input [7:0] asi_rd_inc_vec_2; // Update Interrupt Vector Register
167input [2:0] asi_int_rec_mux_sel_in;
168input asi_rd_int_rec; // Read for any thread
169input asi_rd_inc_vec; // Read for any thread
170input asi_wr_any_int_rec; // Write of any int_rec
171input [63:0] asi_wr_data;
172
173input asi_rd_stage_1; // Power management
174
175input [47:0] dfd_asi_data;
176input [18:0] dfd_asi_desr;
177
178
179output scan_out;
180
181output wmr_scan_out; // Warm reset (non)scan
182
183output [61:0] cth_wr_data; // Buffered version of asi_wr_data
184output [63:0] cth_asi_data;
185output [63:0] cth_irl_cleared; // Copy of IRR after clearing operations
186
187
188
189
190////////////////////////////////////////////////////////////////////////////////
191
192assign clk = l2clk;
193assign en = 1'b1;
194assign stop = 1'b0;
195assign test = tcu_dectest;
196
197tlu_cth_dp_buff_macro__width_4 clk_control_buf (
198 .din ({tcu_pce_ov ,
199 tcu_scan_en ,
200 spc_aclk ,
201 spc_bclk }),
202 .dout ({pce_ov ,
203 se ,
204 siclk ,
205 soclk })
206);
207
208
209
210//////////////////////////////////////////////////////////////////////////////
211//
212// Power management
213//
214
215tlu_cth_dp_or_macro__ports_3__width_8 irl_en_or (
216 .din0 (cxi_wr_int_dis [7:0] ),
217 .din1 (asi_wr_int_rec [7:0] ),
218 .din2 (asi_rd_inc_vec_2 [7:0] ),
219 .dout (irl_en [7:0] )
220);
221
222tlu_cth_dp_or_macro__ports_3__width_1 any_irl_0_2_en_or (
223 .din0 (irl_en [ 0] ),
224 .din1 (irl_en [ 1] ),
225 .din2 (irl_en [ 2] ),
226 .dout (any_irl_en_0_2 )
227);
228
229tlu_cth_dp_or_macro__ports_3__width_1 any_irl_3_5_en_or (
230 .din0 (irl_en [ 3] ),
231 .din1 (irl_en [ 4] ),
232 .din2 (irl_en [ 5] ),
233 .dout (any_irl_en_3_5 )
234);
235
236tlu_cth_dp_or_macro__ports_2__width_1 any_irl_6_7_en_or (
237 .din0 (irl_en [ 6] ),
238 .din1 (irl_en [ 7] ),
239 .dout (any_irl_en_6_7 )
240);
241
242tlu_cth_dp_or_macro__ports_3__width_1 any_irl_en_or (
243 .din0 (any_irl_en_0_2 ),
244 .din1 (any_irl_en_3_5 ),
245 .din2 (any_irl_en_6_7 ),
246 .dout (any_irl_en )
247);
248
249
250
251////////////////////////////////////////////////////////////////////////////////
252//
253// Interrupt Receive Registers
254//
255
256tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive7_lat ( // FS:wmr_protect
257 .scan_in(interrupt_receive7_lat_wmr_scanin),
258 .scan_out(interrupt_receive7_lat_wmr_scanout),
259 .se (tcu_scan_en_wmr ),
260 .siclk (spc_aclk_wmr ),
261 .din0 (int_dis [63:0] ),
262 .din1 (int_rec [63:0] ),
263 .din2 (inc_vec [63:0] ),
264 .sel0 (cxi_wr_int_dis [7 ] ),
265 .sel1 (asi_wr_int_rec [7 ] ),
266 .en (irl_en [7 ] ),
267 .dout (int_rec7 [63:0] ),
268 .clk(clk),
269 .soclk(soclk),
270 .pce_ov(pce_ov),
271 .stop(stop)
272);
273
274tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive6_lat ( // FS:wmr_protect
275 .scan_in(interrupt_receive6_lat_wmr_scanin),
276 .scan_out(interrupt_receive6_lat_wmr_scanout),
277 .se (tcu_scan_en_wmr ),
278 .siclk (spc_aclk_wmr ),
279 .din0 (int_dis [63:0] ),
280 .din1 (int_rec [63:0] ),
281 .din2 (inc_vec [63:0] ),
282 .sel0 (cxi_wr_int_dis [6 ] ),
283 .sel1 (asi_wr_int_rec [6 ] ),
284 .en (irl_en [6 ] ),
285 .dout (int_rec6 [63:0] ),
286 .clk(clk),
287 .soclk(soclk),
288 .pce_ov(pce_ov),
289 .stop(stop)
290);
291
292tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive5_lat ( // FS:wmr_protect
293 .scan_in(interrupt_receive5_lat_wmr_scanin),
294 .scan_out(interrupt_receive5_lat_wmr_scanout),
295 .se (tcu_scan_en_wmr ),
296 .siclk (spc_aclk_wmr ),
297 .din0 (int_dis [63:0] ),
298 .din1 (int_rec [63:0] ),
299 .din2 (inc_vec [63:0] ),
300 .sel0 (cxi_wr_int_dis [5 ] ),
301 .sel1 (asi_wr_int_rec [5 ] ),
302 .en (irl_en [5 ] ),
303 .dout (int_rec5 [63:0] ),
304 .clk(clk),
305 .soclk(soclk),
306 .pce_ov(pce_ov),
307 .stop(stop)
308);
309
310tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive4_lat ( // FS:wmr_protect
311 .scan_in(interrupt_receive4_lat_wmr_scanin),
312 .scan_out(interrupt_receive4_lat_wmr_scanout),
313 .se (tcu_scan_en_wmr ),
314 .siclk (spc_aclk_wmr ),
315 .din0 (int_dis [63:0] ),
316 .din1 (int_rec [63:0] ),
317 .din2 (inc_vec [63:0] ),
318 .sel0 (cxi_wr_int_dis [4 ] ),
319 .sel1 (asi_wr_int_rec [4 ] ),
320 .en (irl_en [4 ] ),
321 .dout (int_rec4 [63:0] ),
322 .clk(clk),
323 .soclk(soclk),
324 .pce_ov(pce_ov),
325 .stop(stop)
326);
327
328tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive3_lat ( // FS:wmr_protect
329 .scan_in(interrupt_receive3_lat_wmr_scanin),
330 .scan_out(interrupt_receive3_lat_wmr_scanout),
331 .se (tcu_scan_en_wmr ),
332 .siclk (spc_aclk_wmr ),
333 .din0 (int_dis [63:0] ),
334 .din1 (int_rec [63:0] ),
335 .din2 (inc_vec [63:0] ),
336 .sel0 (cxi_wr_int_dis [3 ] ),
337 .sel1 (asi_wr_int_rec [3 ] ),
338 .en (irl_en [3 ] ),
339 .dout (int_rec3 [63:0] ),
340 .clk(clk),
341 .soclk(soclk),
342 .pce_ov(pce_ov),
343 .stop(stop)
344);
345
346tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive2_lat ( // FS:wmr_protect
347 .scan_in(interrupt_receive2_lat_wmr_scanin),
348 .scan_out(interrupt_receive2_lat_wmr_scanout),
349 .se (tcu_scan_en_wmr ),
350 .siclk (spc_aclk_wmr ),
351 .din0 (int_dis [63:0] ),
352 .din1 (int_rec [63:0] ),
353 .din2 (inc_vec [63:0] ),
354 .sel0 (cxi_wr_int_dis [2 ] ),
355 .sel1 (asi_wr_int_rec [2 ] ),
356 .en (irl_en [2 ] ),
357 .dout (int_rec2 [63:0] ),
358 .clk(clk),
359 .soclk(soclk),
360 .pce_ov(pce_ov),
361 .stop(stop)
362);
363
364tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive1_lat ( // FS:wmr_protect
365 .scan_in(interrupt_receive1_lat_wmr_scanin),
366 .scan_out(interrupt_receive1_lat_wmr_scanout),
367 .se (tcu_scan_en_wmr ),
368 .siclk (spc_aclk_wmr ),
369 .din0 (int_dis [63:0] ),
370 .din1 (int_rec [63:0] ),
371 .din2 (inc_vec [63:0] ),
372 .sel0 (cxi_wr_int_dis [1 ] ),
373 .sel1 (asi_wr_int_rec [1 ] ),
374 .en (irl_en [1 ] ),
375 .dout (int_rec1 [63:0] ),
376 .clk(clk),
377 .soclk(soclk),
378 .pce_ov(pce_ov),
379 .stop(stop)
380);
381
382tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 interrupt_receive0_lat ( // FS:wmr_protect
383 .scan_in(interrupt_receive0_lat_wmr_scanin),
384 .scan_out(interrupt_receive0_lat_wmr_scanout),
385 .se (tcu_scan_en_wmr ),
386 .siclk (spc_aclk_wmr ),
387 .din0 (int_dis [63:0] ),
388 .din1 (int_rec [63:0] ),
389 .din2 (inc_vec [63:0] ),
390 .sel0 (cxi_wr_int_dis [0 ] ),
391 .sel1 (asi_wr_int_rec [0 ] ),
392 .en (irl_en [0 ] ),
393 .dout (int_rec0 [63:0] ),
394 .clk(clk),
395 .soclk(soclk),
396 .pce_ov(pce_ov),
397 .stop(stop)
398);
399
400
401
402////////////////////////////////////////////////////////////////////////////////
403//
404// Mux the Interrupt Receive Registers to either
405// write (clear bits that are set in write data) or
406// read (encode and clear the MSB)
407//
408
409tlu_cth_dp_msff_macro__dmux_8x__left_29__mux_aope__ports_2__width_3 int_rec_mux_sel_lat (
410 .scan_in(int_rec_mux_sel_lat_scanin),
411 .scan_out(int_rec_mux_sel_lat_scanout),
412 .din0 (lsu_rngf_cdbus [58:56] ),
413 .din1 (asi_int_rec_mux_sel_in [2:0] ),
414 .sel0 (lsu_rngf_cdbus [64 ] ),
415 .en (1'b1 ),
416 .dout (int_rec_mux_sel [2:0] ),
417 .clk(clk),
418 .se(se),
419 .siclk(siclk),
420 .soclk(soclk),
421 .pce_ov(pce_ov),
422 .stop(stop)
423);
424
425assign rngf_cdbus_unused[63:59] =
426 lsu_rngf_cdbus[63:59];
427
428tlu_cth_dp_mux_macro__dmux_8x__mux_aodec__ports_8__width_64 int_rec_mux (
429 .din0 (int_rec0 [63:0] ),
430 .din1 (int_rec1 [63:0] ),
431 .din2 (int_rec2 [63:0] ),
432 .din3 (int_rec3 [63:0] ),
433 .din4 (int_rec4 [63:0] ),
434 .din5 (int_rec5 [63:0] ),
435 .din6 (int_rec6 [63:0] ),
436 .din7 (int_rec7 [63:0] ),
437 .sel (int_rec_mux_sel [2:0] ),
438 .dout (int_rec_muxed [63:0] )
439);
440
441
442
443////////////////////////////////////////////////////////////////////////////////
444//
445// Clear bits that are set in write data on write to Interrupt Receive Reg
446//
447
448tlu_cth_dp_buff_macro__width_62 wr_data_buf (
449 .din (asi_wr_data [61:0] ),
450 .dout (cth_wr_data [61:0] )
451);
452
453tlu_cth_dp_and_macro__ports_2__width_64 int_rec_and (
454 .din0 (int_rec_muxed [63:0] ),
455 .din1 ({asi_wr_data [63:62],
456 cth_wr_data [61:0]}),
457 .dout (int_rec [63:0] )
458);
459
460
461
462////////////////////////////////////////////////////////////////////////////////
463//
464// Encode and clear the MSB on reads from Incoming Vector Register
465//
466
467tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_63_56_mux (
468 .din0 (3'b111 ),
469 .din1 (3'b110 ),
470 .din2 (3'b101 ),
471 .din3 (3'b100 ),
472 .din4 (3'b011 ),
473 .din5 (3'b010 ),
474 .din6 (3'b001 ),
475 .din7 (3'b000 ),
476 .sel0 (int_rec_muxed [63 ] ),
477 .sel1 (int_rec_muxed [62 ] ),
478 .sel2 (int_rec_muxed [61 ] ),
479 .sel3 (int_rec_muxed [60 ] ),
480 .sel4 (int_rec_muxed [59 ] ),
481 .sel5 (int_rec_muxed [58 ] ),
482 .sel6 (int_rec_muxed [57 ] ),
483 .dout (ivr_63_56 [2:0] )
484);
485
486tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_55_48_mux (
487 .din0 (3'b111 ),
488 .din1 (3'b110 ),
489 .din2 (3'b101 ),
490 .din3 (3'b100 ),
491 .din4 (3'b011 ),
492 .din5 (3'b010 ),
493 .din6 (3'b001 ),
494 .din7 (3'b000 ),
495 .sel0 (int_rec_muxed [55 ] ),
496 .sel1 (int_rec_muxed [54 ] ),
497 .sel2 (int_rec_muxed [53 ] ),
498 .sel3 (int_rec_muxed [52 ] ),
499 .sel4 (int_rec_muxed [51 ] ),
500 .sel5 (int_rec_muxed [50 ] ),
501 .sel6 (int_rec_muxed [49 ] ),
502 .dout (ivr_55_48 [2:0] )
503);
504
505tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_47_40_mux (
506 .din0 (3'b111 ),
507 .din1 (3'b110 ),
508 .din2 (3'b101 ),
509 .din3 (3'b100 ),
510 .din4 (3'b011 ),
511 .din5 (3'b010 ),
512 .din6 (3'b001 ),
513 .din7 (3'b000 ),
514 .sel0 (int_rec_muxed [47 ] ),
515 .sel1 (int_rec_muxed [46 ] ),
516 .sel2 (int_rec_muxed [45 ] ),
517 .sel3 (int_rec_muxed [44 ] ),
518 .sel4 (int_rec_muxed [43 ] ),
519 .sel5 (int_rec_muxed [42 ] ),
520 .sel6 (int_rec_muxed [41 ] ),
521 .dout (ivr_47_40 [2:0] )
522);
523
524tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_39_32_mux (
525 .din0 (3'b111 ),
526 .din1 (3'b110 ),
527 .din2 (3'b101 ),
528 .din3 (3'b100 ),
529 .din4 (3'b011 ),
530 .din5 (3'b010 ),
531 .din6 (3'b001 ),
532 .din7 (3'b000 ),
533 .sel0 (int_rec_muxed [39 ] ),
534 .sel1 (int_rec_muxed [38 ] ),
535 .sel2 (int_rec_muxed [37 ] ),
536 .sel3 (int_rec_muxed [36 ] ),
537 .sel4 (int_rec_muxed [35 ] ),
538 .sel5 (int_rec_muxed [34 ] ),
539 .sel6 (int_rec_muxed [33 ] ),
540 .dout (ivr_39_32 [2:0] )
541);
542
543tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_31_24_mux (
544 .din0 (3'b111 ),
545 .din1 (3'b110 ),
546 .din2 (3'b101 ),
547 .din3 (3'b100 ),
548 .din4 (3'b011 ),
549 .din5 (3'b010 ),
550 .din6 (3'b001 ),
551 .din7 (3'b000 ),
552 .sel0 (int_rec_muxed [31 ] ),
553 .sel1 (int_rec_muxed [30 ] ),
554 .sel2 (int_rec_muxed [29 ] ),
555 .sel3 (int_rec_muxed [28 ] ),
556 .sel4 (int_rec_muxed [27 ] ),
557 .sel5 (int_rec_muxed [26 ] ),
558 .sel6 (int_rec_muxed [25 ] ),
559 .dout (ivr_31_24 [2:0] )
560);
561
562tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_23_16_mux (
563 .din0 (3'b111 ),
564 .din1 (3'b110 ),
565 .din2 (3'b101 ),
566 .din3 (3'b100 ),
567 .din4 (3'b011 ),
568 .din5 (3'b010 ),
569 .din6 (3'b001 ),
570 .din7 (3'b000 ),
571 .sel0 (int_rec_muxed [23 ] ),
572 .sel1 (int_rec_muxed [22 ] ),
573 .sel2 (int_rec_muxed [21 ] ),
574 .sel3 (int_rec_muxed [20 ] ),
575 .sel4 (int_rec_muxed [19 ] ),
576 .sel5 (int_rec_muxed [18 ] ),
577 .sel6 (int_rec_muxed [17 ] ),
578 .dout (ivr_23_16 [2:0] )
579);
580
581tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_15_08_mux (
582 .din0 (3'b111 ),
583 .din1 (3'b110 ),
584 .din2 (3'b101 ),
585 .din3 (3'b100 ),
586 .din4 (3'b011 ),
587 .din5 (3'b010 ),
588 .din6 (3'b001 ),
589 .din7 (3'b000 ),
590 .sel0 (int_rec_muxed [15 ] ),
591 .sel1 (int_rec_muxed [14 ] ),
592 .sel2 (int_rec_muxed [13 ] ),
593 .sel3 (int_rec_muxed [12 ] ),
594 .sel4 (int_rec_muxed [11 ] ),
595 .sel5 (int_rec_muxed [10 ] ),
596 .sel6 (int_rec_muxed [9 ] ),
597 .dout (ivr_15_08 [2:0] )
598);
599
600tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 ivr_07_00_mux (
601 .din0 (3'b111 ),
602 .din1 (3'b110 ),
603 .din2 (3'b101 ),
604 .din3 (3'b100 ),
605 .din4 (3'b011 ),
606 .din5 (3'b010 ),
607 .din6 (3'b001 ),
608 .din7 (3'b000 ),
609 .sel0 (int_rec_muxed [7 ] ),
610 .sel1 (int_rec_muxed [6 ] ),
611 .sel2 (int_rec_muxed [5 ] ),
612 .sel3 (int_rec_muxed [4 ] ),
613 .sel4 (int_rec_muxed [3 ] ),
614 .sel5 (int_rec_muxed [2 ] ),
615 .sel6 (int_rec_muxed [1 ] ),
616 .dout (ivr_07_00 [2:0] )
617);
618
619tlu_cth_dp_nor_macro__ports_2__width_28 ivr_nor
620( .din0 ({int_rec_muxed [63:60],
621 int_rec_muxed [55:52],
622 int_rec_muxed [47:44],
623 int_rec_muxed [39:36],
624 int_rec_muxed [31:28],
625 int_rec_muxed [23:20],
626 int_rec_muxed [15:12]}),
627 .din1 ({int_rec_muxed [59:56],
628 int_rec_muxed [51:48],
629 int_rec_muxed [43:40],
630 int_rec_muxed [35:32],
631 int_rec_muxed [27:24],
632 int_rec_muxed [19:16],
633 int_rec_muxed [11:8]}),
634 .dout (ivl_sel [31:4] )
635);
636
637tlu_cth_dp_nand_macro__ports_4__width_7 ivr_nand (
638 .din0 ({ivl_sel [31 ],
639 ivl_sel [27 ],
640 ivl_sel [23 ],
641 ivl_sel [19 ],
642 ivl_sel [15 ],
643 ivl_sel [11 ],
644 ivl_sel [7 ]}),
645 .din1 ({ivl_sel [30 ],
646 ivl_sel [26 ],
647 ivl_sel [22 ],
648 ivl_sel [18 ],
649 ivl_sel [14 ],
650 ivl_sel [10 ],
651 ivl_sel [6 ]}),
652 .din2 ({ivl_sel [29 ],
653 ivl_sel [25 ],
654 ivl_sel [21 ],
655 ivl_sel [17 ],
656 ivl_sel [13 ],
657 ivl_sel [9 ],
658 ivl_sel [5 ]}),
659 .din3 ({ivl_sel [28 ],
660 ivl_sel [24 ],
661 ivl_sel [20 ],
662 ivl_sel [16 ],
663 ivl_sel [12 ],
664 ivl_sel [8 ],
665 ivl_sel [4 ]}),
666 .dout (incoming_vector_mux_sel[7:1] )
667);
668
669tlu_cth_dp_mux_macro__dmux_6x__mux_aope__ports_8__width_6 incoming_vector_mux (
670 .din0 ({3'b111 ,
671 ivr_63_56 [2:0]}),
672 .din1 ({3'b110 ,
673 ivr_55_48 [2:0]}),
674 .din2 ({3'b101 ,
675 ivr_47_40 [2:0]}),
676 .din3 ({3'b100 ,
677 ivr_39_32 [2:0]}),
678 .din4 ({3'b011 ,
679 ivr_31_24 [2:0]}),
680 .din5 ({3'b010 ,
681 ivr_23_16 [2:0]}),
682 .din6 ({3'b001 ,
683 ivr_15_08 [2:0]}),
684 .din7 ({3'b000 ,
685 ivr_07_00 [2:0]}),
686 .sel0 (incoming_vector_mux_sel[7 ] ),
687 .sel1 (incoming_vector_mux_sel[6 ] ),
688 .sel2 (incoming_vector_mux_sel[5 ] ),
689 .sel3 (incoming_vector_mux_sel[4 ] ),
690 .sel4 (incoming_vector_mux_sel[3 ] ),
691 .sel5 (incoming_vector_mux_sel[2 ] ),
692 .sel6 (incoming_vector_mux_sel[1 ] ),
693 .dout (incoming_vector_in [5:0] )
694);
695
696tlu_cth_dp_msff_macro__width_6 incoming_vector_lat (
697 .scan_in(incoming_vector_lat_scanin),
698 .scan_out(incoming_vector_lat_scanout),
699 .din (incoming_vector_in [5:0] ),
700 .dout (incoming_vector [5:0] ),
701 .clk(clk),
702 .en(en),
703 .se(se),
704 .siclk(siclk),
705 .soclk(soclk),
706 .pce_ov(pce_ov),
707 .stop(stop)
708);
709
710// Now decode
711
712tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_8 enc_inc_vec_first_mux (
713 .din0 (8'h01 ),
714 .din1 (8'h02 ),
715 .din2 (8'h04 ),
716 .din3 (8'h08 ),
717 .din4 (8'h10 ),
718 .din5 (8'h20 ),
719 .din6 (8'h40 ),
720 .din7 (8'h80 ),
721 .sel (incoming_vector [2:0] ),
722 .dout (dec_inc_vec_first [7:0] )
723);
724
725tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_64 dec_inc_vec_mux (
726 .din0 ({56'h00000000000000 ,
727 dec_inc_vec_first [7:0]}),
728 .din1 ({48'h000000000000 ,
729 dec_inc_vec_first [7:0],
730 8'h00 }),
731 .din2 ({40'h0000000000 ,
732 dec_inc_vec_first [7:0],
733 16'h0000 }),
734 .din3 ({32'h00000000 ,
735 dec_inc_vec_first [7:0],
736 24'h000000 }),
737 .din4 ({24'h000000 ,
738 dec_inc_vec_first [7:0],
739 32'h00000000 }),
740 .din5 ({16'h0000 ,
741 dec_inc_vec_first [7:0],
742 40'h0000000000 }),
743 .din6 ({8'h00 ,
744 dec_inc_vec_first [7:0],
745 48'h000000000000 }),
746 .din7 ({dec_inc_vec_first [7:0],
747 56'h00000000000000 }),
748 .sel (incoming_vector [5:3] ),
749 .dout (dec_inc_vec [63:0] )
750);
751
752// Now mask
753tlu_cth_dp_inv_macro__width_64 int_rec_muxed_inv (
754 .din (int_rec_muxed [63:0] ),
755 .dout (int_rec_muxed_ [63:0] )
756);
757
758tlu_cth_dp_nor_macro__ports_2__width_64 inc_vec_nor (
759 .din0 (dec_inc_vec [63:0] ),
760 .din1 (int_rec_muxed_ [63:0] ),
761 .dout (inc_vec [63:0] )
762);
763
764
765
766////////////////////////////////////////////////////////////////////////////////
767//
768// Decode the Interrupt Dispatch Vector register for write
769// and OR into existing register
770//
771
772tlu_cth_dp_mux_macro__mux_aonpe__ports_8__width_64 int_rec_dis_mux (
773 .din0 (int_rec0 [63:0] ),
774 .din1 (int_rec1 [63:0] ),
775 .din2 (int_rec2 [63:0] ),
776 .din3 (int_rec3 [63:0] ),
777 .din4 (int_rec4 [63:0] ),
778 .din5 (int_rec5 [63:0] ),
779 .din6 (int_rec6 [63:0] ),
780 .din7 (int_rec7 [63:0] ),
781 .sel0 (cxi_wr_int_dis [0 ] ),
782 .sel1 (cxi_wr_int_dis [1 ] ),
783 .sel2 (cxi_wr_int_dis [2 ] ),
784 .sel3 (cxi_wr_int_dis [3 ] ),
785 .sel4 (cxi_wr_int_dis [4 ] ),
786 .sel5 (cxi_wr_int_dis [5 ] ),
787 .sel6 (cxi_wr_int_dis [6 ] ),
788 .sel7 (cxi_wr_int_dis [7 ] ),
789 .dout (int_rec_dis_muxed [63:0] )
790);
791
792// BUT, still have to clear the bits due to Interrupt Receive write or
793// Incoming Vector dispatch
794//
795
796// First figure out if the same thread is involved
797
798tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_3 set_clear_same_thread_mux (
799 .din0 ({asi_wr_int_rec [0 ],
800 asi_rd_inc_vec_2 [0 ],
801 cxi_wr_int_dis [0 ]}),
802 .din1 ({asi_wr_int_rec [1 ],
803 asi_rd_inc_vec_2 [1 ],
804 cxi_wr_int_dis [1 ]}),
805 .din2 ({asi_wr_int_rec [2 ],
806 asi_rd_inc_vec_2 [2 ],
807 cxi_wr_int_dis [2 ]}),
808 .din3 ({asi_wr_int_rec [3 ],
809 asi_rd_inc_vec_2 [3 ],
810 cxi_wr_int_dis [3 ]}),
811 .din4 ({asi_wr_int_rec [4 ],
812 asi_rd_inc_vec_2 [4 ],
813 cxi_wr_int_dis [4 ]}),
814 .din5 ({asi_wr_int_rec [5 ],
815 asi_rd_inc_vec_2 [5 ],
816 cxi_wr_int_dis [5 ]}),
817 .din6 ({asi_wr_int_rec [6 ],
818 asi_rd_inc_vec_2 [6 ],
819 cxi_wr_int_dis [6 ]}),
820 .din7 ({asi_wr_int_rec [7 ],
821 asi_rd_inc_vec_2 [7 ],
822 cxi_wr_int_dis [7 ]}),
823 .sel (int_rec_mux_sel [2:0] ),
824 .dout ({wr_int_rec ,
825 rd_inc_vec_2 ,
826 set_clear_same_thread })
827);
828
829// Generate a select for Interrupt Receive write
830
831tlu_cth_dp_nand_macro__ports_2__width_1 s_c_idvw_irw_b_nand (
832 .din0 (wr_int_rec ),
833 .din1 (set_clear_same_thread ),
834 .dout (s_c_idvw_irw_ )
835);
836
837tlu_cth_dp_inv_macro__width_1 s_c_idvw_irw_inv (
838 .din (s_c_idvw_irw_ ),
839 .dout (s_c_idvw_irw )
840);
841
842// Generate a select for Incoming Vector read
843
844tlu_cth_dp_nand_macro__ports_2__width_1 s_c_idvw_ivr_b_nand (
845 .din0 (rd_inc_vec_2 ),
846 .din1 (set_clear_same_thread ),
847 .dout (s_c_idvw_ivr_ )
848);
849
850tlu_cth_dp_inv_macro__width_1 s_c_idvw_ivr_inv (
851 .din (s_c_idvw_ivr_ ),
852 .dout (s_c_idvw_ivr )
853);
854
855// Generate a select for neither matching or for neither write occurring
856
857tlu_cth_dp_and_macro__ports_2__width_1 neither_match_and (
858 .din0 (s_c_idvw_irw_ ),
859 .din1 (s_c_idvw_ivr_ ),
860 .dout (neither_match )
861);
862
863
864tlu_cth_dp_buff_macro__dbuff_32x__width_1 tst_mux_rep0 (
865 .din (tcu_muxtest ),
866 .dout (tcu_muxtest_rep0 )
867);
868
869tlu_cth_dp_mux_macro__mux_pgdec__ports_8__width_8 enc_int_dis_first_mux (
870 .din0 (8'h01 ),
871 .din1 (8'h02 ),
872 .din2 (8'h04 ),
873 .din3 (8'h08 ),
874 .din4 (8'h10 ),
875 .din5 (8'h20 ),
876 .din6 (8'h40 ),
877 .din7 (8'h80 ),
878 .sel (cxi_int_dis_vec [2:0] ),
879 .muxtst (tcu_muxtest_rep0 ),
880 .dout (dec_int_dis_first [7:0] ),
881 .test(test)
882);
883
884tlu_cth_dp_buff_macro__dbuff_48x__width_1 tst_mux_rep1 (
885 .din (tcu_muxtest ),
886 .dout (tcu_muxtest_rep1 )
887);
888
889tlu_cth_dp_mux_macro__mux_pgdec__ports_8__width_64 dec_int_dis_mux (
890 .din0 ({56'h00000000000000 ,
891 dec_int_dis_first [7:0]}),
892 .din1 ({48'h000000000000 ,
893 dec_int_dis_first [7:0],
894 8'h00 }),
895 .din2 ({40'h0000000000 ,
896 dec_int_dis_first [7:0],
897 16'h0000 }),
898 .din3 ({32'h00000000 ,
899 dec_int_dis_first [7:0],
900 24'h000000 }),
901 .din4 ({24'h000000 ,
902 dec_int_dis_first [7:0],
903 32'h00000000 }),
904 .din5 ({16'h0000 ,
905 dec_int_dis_first [7:0],
906 40'h0000000000 }),
907 .din6 ({8'h00 ,
908 dec_int_dis_first [7:0],
909 48'h000000000000 }),
910 .din7 ({dec_int_dis_first [7:0],
911 56'h00000000000000 }),
912 .sel (cxi_int_dis_vec [5:3] ),
913 .muxtst (tcu_muxtest_rep1 ),
914 .dout (dec_int_dis [63:0] ),
915 .test(test)
916);
917
918// Mux the cleared registers with the base register and
919// OR the new vector in (saves gate levels...)
920
921tlu_cth_dp_mux_macro__mux_aonpe__ports_4__width_64 int_rec_dis_muxed_mux (
922 .din0 (dec_int_dis [63:0] ),
923 .din1 (int_rec [63:0] ),
924 .din2 (inc_vec [63:0] ),
925 .din3 (int_rec_dis_muxed [63:0] ),
926 .sel0 (1'b1 ),
927 .sel1 (s_c_idvw_irw ),
928 .sel2 (s_c_idvw_ivr ),
929 .sel3 (neither_match ),
930 .dout (int_dis [63:0] )
931);
932
933
934
935
936////////////////////////////////////////////////////////////////////////////////
937//
938// ASI muxing
939//
940
941tlu_cth_dp_msff_macro__mux_aonpe__ports_2__width_64 asi_lat (
942 .scan_in(asi_lat_scanin),
943 .scan_out(asi_lat_scanout),
944 .din0 (int_rec_muxed [63:0] ),
945 .din1 ({58'h000000000000000 ,
946 incoming_vector_in [5:0]}),
947 .sel0 (asi_rd_int_rec ),
948 .sel1 (asi_rd_inc_vec ),
949 .en (asi_rd_stage_1 ),
950 .dout (asi_data [63:0] ),
951 .clk(clk),
952 .se(se),
953 .siclk(siclk),
954 .soclk(soclk),
955 .pce_ov(pce_ov),
956 .stop(stop)
957);
958
959tlu_cth_dp_or_macro__ports_3__width_64 asi_data_or (
960 .din0 ({{16 {1'b0}} ,
961 dfd_asi_data [47:0]}),
962 .din1 ({{45 {1'b0}} ,
963 dfd_asi_desr [18:0]}),
964 .din2 (asi_data [63:0] ),
965 .dout (cth_asi_data [63:0] )
966);
967
968
969
970////////////////////////////////////////////////////////////////////////////////
971//
972// Check if the register has any bits set after clear operations
973//
974
975tlu_cth_dp_msff_macro__mux_aope__ports_2__width_64 irl_cleared_lat (
976 .scan_in(irl_cleared_lat_scanin),
977 .scan_out(irl_cleared_lat_scanout),
978 .din0 (int_rec [63:0] ),
979 .din1 (inc_vec [63:0] ),
980 .sel0 (asi_wr_any_int_rec ),
981 .en (any_irl_en ),
982 .dout (cth_irl_cleared [63:0] ),
983 .clk(clk),
984 .se(se),
985 .siclk(siclk),
986 .soclk(soclk),
987 .pce_ov(pce_ov),
988 .stop(stop)
989);
990
991
992
993
994// fixscan start:
995assign int_rec_mux_sel_lat_scanin = scan_in ;
996assign incoming_vector_lat_scanin = int_rec_mux_sel_lat_scanout;
997assign asi_lat_scanin = incoming_vector_lat_scanout;
998assign irl_cleared_lat_scanin = asi_lat_scanout ;
999assign scan_out = irl_cleared_lat_scanout ;
1000
1001assign interrupt_receive7_lat_wmr_scanin = wmr_scan_in ;
1002assign interrupt_receive6_lat_wmr_scanin = interrupt_receive7_lat_wmr_scanout;
1003assign interrupt_receive5_lat_wmr_scanin = interrupt_receive6_lat_wmr_scanout;
1004assign interrupt_receive4_lat_wmr_scanin = interrupt_receive5_lat_wmr_scanout;
1005assign interrupt_receive3_lat_wmr_scanin = interrupt_receive4_lat_wmr_scanout;
1006assign interrupt_receive2_lat_wmr_scanin = interrupt_receive3_lat_wmr_scanout;
1007assign interrupt_receive1_lat_wmr_scanin = interrupt_receive2_lat_wmr_scanout;
1008assign interrupt_receive0_lat_wmr_scanin = interrupt_receive1_lat_wmr_scanout;
1009assign wmr_scan_out = interrupt_receive0_lat_wmr_scanout;
1010// fixscan end:
1011endmodule
1012
1013
1014//
1015// buff macro
1016//
1017//
1018
1019
1020
1021
1022
1023module tlu_cth_dp_buff_macro__width_4 (
1024 din,
1025 dout);
1026 input [3:0] din;
1027 output [3:0] dout;
1028
1029
1030
1031
1032
1033
1034buff #(4) d0_0 (
1035.in(din[3:0]),
1036.out(dout[3:0])
1037);
1038
1039
1040
1041
1042
1043
1044
1045
1046endmodule
1047
1048
1049
1050
1051
1052//
1053// or macro for ports = 2,3
1054//
1055//
1056
1057
1058
1059
1060
1061module tlu_cth_dp_or_macro__ports_3__width_8 (
1062 din0,
1063 din1,
1064 din2,
1065 dout);
1066 input [7:0] din0;
1067 input [7:0] din1;
1068 input [7:0] din2;
1069 output [7:0] dout;
1070
1071
1072
1073
1074
1075
1076or3 #(8) d0_0 (
1077.in0(din0[7:0]),
1078.in1(din1[7:0]),
1079.in2(din2[7:0]),
1080.out(dout[7:0])
1081);
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091endmodule
1092
1093
1094
1095
1096
1097//
1098// or macro for ports = 2,3
1099//
1100//
1101
1102
1103
1104
1105
1106module tlu_cth_dp_or_macro__ports_3__width_1 (
1107 din0,
1108 din1,
1109 din2,
1110 dout);
1111 input [0:0] din0;
1112 input [0:0] din1;
1113 input [0:0] din2;
1114 output [0:0] dout;
1115
1116
1117
1118
1119
1120
1121or3 #(1) d0_0 (
1122.in0(din0[0:0]),
1123.in1(din1[0:0]),
1124.in2(din2[0:0]),
1125.out(dout[0:0])
1126);
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136endmodule
1137
1138
1139
1140
1141
1142//
1143// or macro for ports = 2,3
1144//
1145//
1146
1147
1148
1149
1150
1151module tlu_cth_dp_or_macro__ports_2__width_1 (
1152 din0,
1153 din1,
1154 dout);
1155 input [0:0] din0;
1156 input [0:0] din1;
1157 output [0:0] dout;
1158
1159
1160
1161
1162
1163
1164or2 #(1) d0_0 (
1165.in0(din0[0:0]),
1166.in1(din1[0:0]),
1167.out(dout[0:0])
1168);
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178endmodule
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188// any PARAMS parms go into naming of macro
1189
1190module tlu_cth_dp_msff_macro__mux_aope__ports_3__width_64 (
1191 din0,
1192 din1,
1193 din2,
1194 sel0,
1195 sel1,
1196 clk,
1197 en,
1198 se,
1199 scan_in,
1200 siclk,
1201 soclk,
1202 pce_ov,
1203 stop,
1204 dout,
1205 scan_out);
1206wire psel0;
1207wire psel1;
1208wire psel2;
1209wire [63:0] muxout;
1210wire l1clk;
1211wire siclk_out;
1212wire soclk_out;
1213wire [62:0] so;
1214
1215 input [63:0] din0;
1216 input [63:0] din1;
1217 input [63:0] din2;
1218 input sel0;
1219 input sel1;
1220
1221
1222 input clk;
1223 input en;
1224 input se;
1225 input scan_in;
1226 input siclk;
1227 input soclk;
1228 input pce_ov;
1229 input stop;
1230
1231
1232
1233 output [63:0] dout;
1234
1235
1236 output scan_out;
1237
1238
1239
1240
1241cl_dp1_penc3_8x c1_0 (
1242 .test(1'b1),
1243 .sel0(sel0),
1244 .sel1(sel1),
1245 .psel0(psel0),
1246 .psel1(psel1),
1247 .psel2(psel2)
1248);
1249
1250mux3s #(64) d1_0 (
1251 .sel0(psel0),
1252 .sel1(psel1),
1253 .sel2(psel2),
1254 .in0(din0[63:0]),
1255 .in1(din1[63:0]),
1256 .in2(din2[63:0]),
1257.dout(muxout[63:0])
1258);
1259cl_dp1_l1hdr_8x c0_0 (
1260.l2clk(clk),
1261.pce(en),
1262.aclk(siclk),
1263.bclk(soclk),
1264.l1clk(l1clk),
1265 .se(se),
1266 .pce_ov(pce_ov),
1267 .stop(stop),
1268 .siclk_out(siclk_out),
1269 .soclk_out(soclk_out)
1270);
1271dff #(64) d0_0 (
1272.l1clk(l1clk),
1273.siclk(siclk_out),
1274.soclk(soclk_out),
1275.d(muxout[63:0]),
1276.si({scan_in,so[62:0]}),
1277.so({so[62:0],scan_out}),
1278.q(dout[63:0])
1279);
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300endmodule
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314// any PARAMS parms go into naming of macro
1315
1316module tlu_cth_dp_msff_macro__dmux_8x__left_29__mux_aope__ports_2__width_3 (
1317 din0,
1318 din1,
1319 sel0,
1320 clk,
1321 en,
1322 se,
1323 scan_in,
1324 siclk,
1325 soclk,
1326 pce_ov,
1327 stop,
1328 dout,
1329 scan_out);
1330wire psel0;
1331wire psel1;
1332wire [2:0] muxout;
1333wire l1clk;
1334wire siclk_out;
1335wire soclk_out;
1336wire [1:0] so;
1337
1338 input [2:0] din0;
1339 input [2:0] din1;
1340 input sel0;
1341
1342
1343 input clk;
1344 input en;
1345 input se;
1346 input scan_in;
1347 input siclk;
1348 input soclk;
1349 input pce_ov;
1350 input stop;
1351
1352
1353
1354 output [2:0] dout;
1355
1356
1357 output scan_out;
1358
1359
1360
1361
1362cl_dp1_penc2_8x c1_0 (
1363 .sel0(sel0),
1364 .psel0(psel0),
1365 .psel1(psel1)
1366);
1367
1368mux2s #(3) d1_0 (
1369 .sel0(psel0),
1370 .sel1(psel1),
1371 .in0(din0[2:0]),
1372 .in1(din1[2:0]),
1373.dout(muxout[2:0])
1374);
1375cl_dp1_l1hdr_8x c0_0 (
1376.l2clk(clk),
1377.pce(en),
1378.aclk(siclk),
1379.bclk(soclk),
1380.l1clk(l1clk),
1381 .se(se),
1382 .pce_ov(pce_ov),
1383 .stop(stop),
1384 .siclk_out(siclk_out),
1385 .soclk_out(soclk_out)
1386);
1387dff #(3) d0_0 (
1388.l1clk(l1clk),
1389.siclk(siclk_out),
1390.soclk(soclk_out),
1391.d(muxout[2:0]),
1392.si({scan_in,so[1:0]}),
1393.so({so[1:0],scan_out}),
1394.q(dout[2:0])
1395);
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416endmodule
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1427// also for pass-gate with decoder
1428
1429
1430
1431
1432
1433// any PARAMS parms go into naming of macro
1434
1435module tlu_cth_dp_mux_macro__dmux_8x__mux_aodec__ports_8__width_64 (
1436 din0,
1437 din1,
1438 din2,
1439 din3,
1440 din4,
1441 din5,
1442 din6,
1443 din7,
1444 sel,
1445 dout);
1446wire psel0;
1447wire psel1;
1448wire psel2;
1449wire psel3;
1450wire psel4;
1451wire psel5;
1452wire psel6;
1453wire psel7;
1454
1455 input [63:0] din0;
1456 input [63:0] din1;
1457 input [63:0] din2;
1458 input [63:0] din3;
1459 input [63:0] din4;
1460 input [63:0] din5;
1461 input [63:0] din6;
1462 input [63:0] din7;
1463 input [2:0] sel;
1464 output [63:0] dout;
1465
1466
1467
1468
1469
1470cl_dp1_pdec8_8x c0_0 (
1471 .test(1'b1),
1472 .sel0(sel[0]),
1473 .sel1(sel[1]),
1474 .sel2(sel[2]),
1475 .psel0(psel0),
1476 .psel1(psel1),
1477 .psel2(psel2),
1478 .psel3(psel3),
1479 .psel4(psel4),
1480 .psel5(psel5),
1481 .psel6(psel6),
1482 .psel7(psel7)
1483);
1484
1485mux8s #(64) d0_0 (
1486 .sel0(psel0),
1487 .sel1(psel1),
1488 .sel2(psel2),
1489 .sel3(psel3),
1490 .sel4(psel4),
1491 .sel5(psel5),
1492 .sel6(psel6),
1493 .sel7(psel7),
1494 .in0(din0[63:0]),
1495 .in1(din1[63:0]),
1496 .in2(din2[63:0]),
1497 .in3(din3[63:0]),
1498 .in4(din4[63:0]),
1499 .in5(din5[63:0]),
1500 .in6(din6[63:0]),
1501 .in7(din7[63:0]),
1502.dout(dout[63:0])
1503);
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517endmodule
1518
1519
1520//
1521// buff macro
1522//
1523//
1524
1525
1526
1527
1528
1529module tlu_cth_dp_buff_macro__width_62 (
1530 din,
1531 dout);
1532 input [61:0] din;
1533 output [61:0] dout;
1534
1535
1536
1537
1538
1539
1540buff #(62) d0_0 (
1541.in(din[61:0]),
1542.out(dout[61:0])
1543);
1544
1545
1546
1547
1548
1549
1550
1551
1552endmodule
1553
1554
1555
1556
1557
1558//
1559// and macro for ports = 2,3,4
1560//
1561//
1562
1563
1564
1565
1566
1567module tlu_cth_dp_and_macro__ports_2__width_64 (
1568 din0,
1569 din1,
1570 dout);
1571 input [63:0] din0;
1572 input [63:0] din1;
1573 output [63:0] dout;
1574
1575
1576
1577
1578
1579
1580and2 #(64) d0_0 (
1581.in0(din0[63:0]),
1582.in1(din1[63:0]),
1583.out(dout[63:0])
1584);
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594endmodule
1595
1596
1597
1598
1599
1600// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1601// also for pass-gate with decoder
1602
1603
1604
1605
1606
1607// any PARAMS parms go into naming of macro
1608
1609module tlu_cth_dp_mux_macro__mux_aope__ports_8__width_3 (
1610 din0,
1611 din1,
1612 din2,
1613 din3,
1614 din4,
1615 din5,
1616 din6,
1617 din7,
1618 sel0,
1619 sel1,
1620 sel2,
1621 sel3,
1622 sel4,
1623 sel5,
1624 sel6,
1625 dout);
1626wire psel0;
1627wire psel1;
1628wire psel2;
1629wire psel3;
1630wire psel4;
1631wire psel5;
1632wire psel6;
1633wire psel7;
1634
1635 input [2:0] din0;
1636 input [2:0] din1;
1637 input [2:0] din2;
1638 input [2:0] din3;
1639 input [2:0] din4;
1640 input [2:0] din5;
1641 input [2:0] din6;
1642 input [2:0] din7;
1643 input sel0;
1644 input sel1;
1645 input sel2;
1646 input sel3;
1647 input sel4;
1648 input sel5;
1649 input sel6;
1650 output [2:0] dout;
1651
1652
1653
1654
1655
1656cl_dp1_penc8_8x c0_0 (
1657 .test(1'b1),
1658 .sel0(sel0),
1659 .sel1(sel1),
1660 .sel2(sel2),
1661 .sel3(sel3),
1662 .sel4(sel4),
1663 .sel5(sel5),
1664 .sel6(sel6),
1665 .psel0(psel0),
1666 .psel1(psel1),
1667 .psel2(psel2),
1668 .psel3(psel3),
1669 .psel4(psel4),
1670 .psel5(psel5),
1671 .psel6(psel6),
1672 .psel7(psel7)
1673);
1674
1675mux8s #(3) d0_0 (
1676 .sel0(psel0),
1677 .sel1(psel1),
1678 .sel2(psel2),
1679 .sel3(psel3),
1680 .sel4(psel4),
1681 .sel5(psel5),
1682 .sel6(psel6),
1683 .sel7(psel7),
1684 .in0(din0[2:0]),
1685 .in1(din1[2:0]),
1686 .in2(din2[2:0]),
1687 .in3(din3[2:0]),
1688 .in4(din4[2:0]),
1689 .in5(din5[2:0]),
1690 .in6(din6[2:0]),
1691 .in7(din7[2:0]),
1692.dout(dout[2:0])
1693);
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707endmodule
1708
1709
1710//
1711// nor macro for ports = 2,3
1712//
1713//
1714
1715
1716
1717
1718
1719module tlu_cth_dp_nor_macro__ports_2__width_28 (
1720 din0,
1721 din1,
1722 dout);
1723 input [27:0] din0;
1724 input [27:0] din1;
1725 output [27:0] dout;
1726
1727
1728
1729
1730
1731
1732nor2 #(28) d0_0 (
1733.in0(din0[27:0]),
1734.in1(din1[27:0]),
1735.out(dout[27:0])
1736);
1737
1738
1739
1740
1741
1742
1743
1744endmodule
1745
1746
1747
1748
1749
1750//
1751// nand macro for ports = 2,3,4
1752//
1753//
1754
1755
1756
1757
1758
1759module tlu_cth_dp_nand_macro__ports_4__width_7 (
1760 din0,
1761 din1,
1762 din2,
1763 din3,
1764 dout);
1765 input [6:0] din0;
1766 input [6:0] din1;
1767 input [6:0] din2;
1768 input [6:0] din3;
1769 output [6:0] dout;
1770
1771
1772
1773
1774
1775
1776nand4 #(7) d0_0 (
1777.in0(din0[6:0]),
1778.in1(din1[6:0]),
1779.in2(din2[6:0]),
1780.in3(din3[6:0]),
1781.out(dout[6:0])
1782);
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792endmodule
1793
1794
1795
1796
1797
1798// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1799// also for pass-gate with decoder
1800
1801
1802
1803
1804
1805// any PARAMS parms go into naming of macro
1806
1807module tlu_cth_dp_mux_macro__dmux_6x__mux_aope__ports_8__width_6 (
1808 din0,
1809 din1,
1810 din2,
1811 din3,
1812 din4,
1813 din5,
1814 din6,
1815 din7,
1816 sel0,
1817 sel1,
1818 sel2,
1819 sel3,
1820 sel4,
1821 sel5,
1822 sel6,
1823 dout);
1824wire psel0;
1825wire psel1;
1826wire psel2;
1827wire psel3;
1828wire psel4;
1829wire psel5;
1830wire psel6;
1831wire psel7;
1832
1833 input [5:0] din0;
1834 input [5:0] din1;
1835 input [5:0] din2;
1836 input [5:0] din3;
1837 input [5:0] din4;
1838 input [5:0] din5;
1839 input [5:0] din6;
1840 input [5:0] din7;
1841 input sel0;
1842 input sel1;
1843 input sel2;
1844 input sel3;
1845 input sel4;
1846 input sel5;
1847 input sel6;
1848 output [5:0] dout;
1849
1850
1851
1852
1853
1854cl_dp1_penc8_8x c0_0 (
1855 .test(1'b1),
1856 .sel0(sel0),
1857 .sel1(sel1),
1858 .sel2(sel2),
1859 .sel3(sel3),
1860 .sel4(sel4),
1861 .sel5(sel5),
1862 .sel6(sel6),
1863 .psel0(psel0),
1864 .psel1(psel1),
1865 .psel2(psel2),
1866 .psel3(psel3),
1867 .psel4(psel4),
1868 .psel5(psel5),
1869 .psel6(psel6),
1870 .psel7(psel7)
1871);
1872
1873mux8s #(6) d0_0 (
1874 .sel0(psel0),
1875 .sel1(psel1),
1876 .sel2(psel2),
1877 .sel3(psel3),
1878 .sel4(psel4),
1879 .sel5(psel5),
1880 .sel6(psel6),
1881 .sel7(psel7),
1882 .in0(din0[5:0]),
1883 .in1(din1[5:0]),
1884 .in2(din2[5:0]),
1885 .in3(din3[5:0]),
1886 .in4(din4[5:0]),
1887 .in5(din5[5:0]),
1888 .in6(din6[5:0]),
1889 .in7(din7[5:0]),
1890.dout(dout[5:0])
1891);
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905endmodule
1906
1907
1908
1909
1910
1911
1912// any PARAMS parms go into naming of macro
1913
1914module tlu_cth_dp_msff_macro__width_6 (
1915 din,
1916 clk,
1917 en,
1918 se,
1919 scan_in,
1920 siclk,
1921 soclk,
1922 pce_ov,
1923 stop,
1924 dout,
1925 scan_out);
1926wire l1clk;
1927wire siclk_out;
1928wire soclk_out;
1929wire [4:0] so;
1930
1931 input [5:0] din;
1932
1933
1934 input clk;
1935 input en;
1936 input se;
1937 input scan_in;
1938 input siclk;
1939 input soclk;
1940 input pce_ov;
1941 input stop;
1942
1943
1944
1945 output [5:0] dout;
1946
1947
1948 output scan_out;
1949
1950
1951
1952
1953cl_dp1_l1hdr_8x c0_0 (
1954.l2clk(clk),
1955.pce(en),
1956.aclk(siclk),
1957.bclk(soclk),
1958.l1clk(l1clk),
1959 .se(se),
1960 .pce_ov(pce_ov),
1961 .stop(stop),
1962 .siclk_out(siclk_out),
1963 .soclk_out(soclk_out)
1964);
1965dff #(6) d0_0 (
1966.l1clk(l1clk),
1967.siclk(siclk_out),
1968.soclk(soclk_out),
1969.d(din[5:0]),
1970.si({scan_in,so[4:0]}),
1971.so({so[4:0],scan_out}),
1972.q(dout[5:0])
1973);
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994endmodule
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2005// also for pass-gate with decoder
2006
2007
2008
2009
2010
2011// any PARAMS parms go into naming of macro
2012
2013module tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_8 (
2014 din0,
2015 din1,
2016 din2,
2017 din3,
2018 din4,
2019 din5,
2020 din6,
2021 din7,
2022 sel,
2023 dout);
2024wire psel0;
2025wire psel1;
2026wire psel2;
2027wire psel3;
2028wire psel4;
2029wire psel5;
2030wire psel6;
2031wire psel7;
2032
2033 input [7:0] din0;
2034 input [7:0] din1;
2035 input [7:0] din2;
2036 input [7:0] din3;
2037 input [7:0] din4;
2038 input [7:0] din5;
2039 input [7:0] din6;
2040 input [7:0] din7;
2041 input [2:0] sel;
2042 output [7:0] dout;
2043
2044
2045
2046
2047
2048cl_dp1_pdec8_8x c0_0 (
2049 .test(1'b1),
2050 .sel0(sel[0]),
2051 .sel1(sel[1]),
2052 .sel2(sel[2]),
2053 .psel0(psel0),
2054 .psel1(psel1),
2055 .psel2(psel2),
2056 .psel3(psel3),
2057 .psel4(psel4),
2058 .psel5(psel5),
2059 .psel6(psel6),
2060 .psel7(psel7)
2061);
2062
2063mux8s #(8) d0_0 (
2064 .sel0(psel0),
2065 .sel1(psel1),
2066 .sel2(psel2),
2067 .sel3(psel3),
2068 .sel4(psel4),
2069 .sel5(psel5),
2070 .sel6(psel6),
2071 .sel7(psel7),
2072 .in0(din0[7:0]),
2073 .in1(din1[7:0]),
2074 .in2(din2[7:0]),
2075 .in3(din3[7:0]),
2076 .in4(din4[7:0]),
2077 .in5(din5[7:0]),
2078 .in6(din6[7:0]),
2079 .in7(din7[7:0]),
2080.dout(dout[7:0])
2081);
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095endmodule
2096
2097
2098// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2099// also for pass-gate with decoder
2100
2101
2102
2103
2104
2105// any PARAMS parms go into naming of macro
2106
2107module tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_64 (
2108 din0,
2109 din1,
2110 din2,
2111 din3,
2112 din4,
2113 din5,
2114 din6,
2115 din7,
2116 sel,
2117 dout);
2118wire psel0;
2119wire psel1;
2120wire psel2;
2121wire psel3;
2122wire psel4;
2123wire psel5;
2124wire psel6;
2125wire psel7;
2126
2127 input [63:0] din0;
2128 input [63:0] din1;
2129 input [63:0] din2;
2130 input [63:0] din3;
2131 input [63:0] din4;
2132 input [63:0] din5;
2133 input [63:0] din6;
2134 input [63:0] din7;
2135 input [2:0] sel;
2136 output [63:0] dout;
2137
2138
2139
2140
2141
2142cl_dp1_pdec8_8x c0_0 (
2143 .test(1'b1),
2144 .sel0(sel[0]),
2145 .sel1(sel[1]),
2146 .sel2(sel[2]),
2147 .psel0(psel0),
2148 .psel1(psel1),
2149 .psel2(psel2),
2150 .psel3(psel3),
2151 .psel4(psel4),
2152 .psel5(psel5),
2153 .psel6(psel6),
2154 .psel7(psel7)
2155);
2156
2157mux8s #(64) d0_0 (
2158 .sel0(psel0),
2159 .sel1(psel1),
2160 .sel2(psel2),
2161 .sel3(psel3),
2162 .sel4(psel4),
2163 .sel5(psel5),
2164 .sel6(psel6),
2165 .sel7(psel7),
2166 .in0(din0[63:0]),
2167 .in1(din1[63:0]),
2168 .in2(din2[63:0]),
2169 .in3(din3[63:0]),
2170 .in4(din4[63:0]),
2171 .in5(din5[63:0]),
2172 .in6(din6[63:0]),
2173 .in7(din7[63:0]),
2174.dout(dout[63:0])
2175);
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189endmodule
2190
2191
2192//
2193// invert macro
2194//
2195//
2196
2197
2198
2199
2200
2201module tlu_cth_dp_inv_macro__width_64 (
2202 din,
2203 dout);
2204 input [63:0] din;
2205 output [63:0] dout;
2206
2207
2208
2209
2210
2211
2212inv #(64) d0_0 (
2213.in(din[63:0]),
2214.out(dout[63:0])
2215);
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225endmodule
2226
2227
2228
2229
2230
2231//
2232// nor macro for ports = 2,3
2233//
2234//
2235
2236
2237
2238
2239
2240module tlu_cth_dp_nor_macro__ports_2__width_64 (
2241 din0,
2242 din1,
2243 dout);
2244 input [63:0] din0;
2245 input [63:0] din1;
2246 output [63:0] dout;
2247
2248
2249
2250
2251
2252
2253nor2 #(64) d0_0 (
2254.in0(din0[63:0]),
2255.in1(din1[63:0]),
2256.out(dout[63:0])
2257);
2258
2259
2260
2261
2262
2263
2264
2265endmodule
2266
2267
2268
2269
2270
2271// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2272// also for pass-gate with decoder
2273
2274
2275
2276
2277
2278// any PARAMS parms go into naming of macro
2279
2280module tlu_cth_dp_mux_macro__mux_aonpe__ports_8__width_64 (
2281 din0,
2282 sel0,
2283 din1,
2284 sel1,
2285 din2,
2286 sel2,
2287 din3,
2288 sel3,
2289 din4,
2290 sel4,
2291 din5,
2292 sel5,
2293 din6,
2294 sel6,
2295 din7,
2296 sel7,
2297 dout);
2298wire buffout0;
2299wire buffout1;
2300wire buffout2;
2301wire buffout3;
2302wire buffout4;
2303wire buffout5;
2304wire buffout6;
2305wire buffout7;
2306
2307 input [63:0] din0;
2308 input sel0;
2309 input [63:0] din1;
2310 input sel1;
2311 input [63:0] din2;
2312 input sel2;
2313 input [63:0] din3;
2314 input sel3;
2315 input [63:0] din4;
2316 input sel4;
2317 input [63:0] din5;
2318 input sel5;
2319 input [63:0] din6;
2320 input sel6;
2321 input [63:0] din7;
2322 input sel7;
2323 output [63:0] dout;
2324
2325
2326
2327
2328
2329cl_dp1_muxbuff8_8x c0_0 (
2330 .in0(sel0),
2331 .in1(sel1),
2332 .in2(sel2),
2333 .in3(sel3),
2334 .in4(sel4),
2335 .in5(sel5),
2336 .in6(sel6),
2337 .in7(sel7),
2338 .out0(buffout0),
2339 .out1(buffout1),
2340 .out2(buffout2),
2341 .out3(buffout3),
2342 .out4(buffout4),
2343 .out5(buffout5),
2344 .out6(buffout6),
2345 .out7(buffout7)
2346);
2347mux8s #(64) d0_0 (
2348 .sel0(buffout0),
2349 .sel1(buffout1),
2350 .sel2(buffout2),
2351 .sel3(buffout3),
2352 .sel4(buffout4),
2353 .sel5(buffout5),
2354 .sel6(buffout6),
2355 .sel7(buffout7),
2356 .in0(din0[63:0]),
2357 .in1(din1[63:0]),
2358 .in2(din2[63:0]),
2359 .in3(din3[63:0]),
2360 .in4(din4[63:0]),
2361 .in5(din5[63:0]),
2362 .in6(din6[63:0]),
2363 .in7(din7[63:0]),
2364.dout(dout[63:0])
2365);
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379endmodule
2380
2381
2382// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2383// also for pass-gate with decoder
2384
2385
2386
2387
2388
2389// any PARAMS parms go into naming of macro
2390
2391module tlu_cth_dp_mux_macro__mux_aodec__ports_8__width_3 (
2392 din0,
2393 din1,
2394 din2,
2395 din3,
2396 din4,
2397 din5,
2398 din6,
2399 din7,
2400 sel,
2401 dout);
2402wire psel0;
2403wire psel1;
2404wire psel2;
2405wire psel3;
2406wire psel4;
2407wire psel5;
2408wire psel6;
2409wire psel7;
2410
2411 input [2:0] din0;
2412 input [2:0] din1;
2413 input [2:0] din2;
2414 input [2:0] din3;
2415 input [2:0] din4;
2416 input [2:0] din5;
2417 input [2:0] din6;
2418 input [2:0] din7;
2419 input [2:0] sel;
2420 output [2:0] dout;
2421
2422
2423
2424
2425
2426cl_dp1_pdec8_8x c0_0 (
2427 .test(1'b1),
2428 .sel0(sel[0]),
2429 .sel1(sel[1]),
2430 .sel2(sel[2]),
2431 .psel0(psel0),
2432 .psel1(psel1),
2433 .psel2(psel2),
2434 .psel3(psel3),
2435 .psel4(psel4),
2436 .psel5(psel5),
2437 .psel6(psel6),
2438 .psel7(psel7)
2439);
2440
2441mux8s #(3) d0_0 (
2442 .sel0(psel0),
2443 .sel1(psel1),
2444 .sel2(psel2),
2445 .sel3(psel3),
2446 .sel4(psel4),
2447 .sel5(psel5),
2448 .sel6(psel6),
2449 .sel7(psel7),
2450 .in0(din0[2:0]),
2451 .in1(din1[2:0]),
2452 .in2(din2[2:0]),
2453 .in3(din3[2:0]),
2454 .in4(din4[2:0]),
2455 .in5(din5[2:0]),
2456 .in6(din6[2:0]),
2457 .in7(din7[2:0]),
2458.dout(dout[2:0])
2459);
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473endmodule
2474
2475
2476//
2477// nand macro for ports = 2,3,4
2478//
2479//
2480
2481
2482
2483
2484
2485module tlu_cth_dp_nand_macro__ports_2__width_1 (
2486 din0,
2487 din1,
2488 dout);
2489 input [0:0] din0;
2490 input [0:0] din1;
2491 output [0:0] dout;
2492
2493
2494
2495
2496
2497
2498nand2 #(1) d0_0 (
2499.in0(din0[0:0]),
2500.in1(din1[0:0]),
2501.out(dout[0:0])
2502);
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512endmodule
2513
2514
2515
2516
2517
2518//
2519// invert macro
2520//
2521//
2522
2523
2524
2525
2526
2527module tlu_cth_dp_inv_macro__width_1 (
2528 din,
2529 dout);
2530 input [0:0] din;
2531 output [0:0] dout;
2532
2533
2534
2535
2536
2537
2538inv #(1) d0_0 (
2539.in(din[0:0]),
2540.out(dout[0:0])
2541);
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551endmodule
2552
2553
2554
2555
2556
2557//
2558// and macro for ports = 2,3,4
2559//
2560//
2561
2562
2563
2564
2565
2566module tlu_cth_dp_and_macro__ports_2__width_1 (
2567 din0,
2568 din1,
2569 dout);
2570 input [0:0] din0;
2571 input [0:0] din1;
2572 output [0:0] dout;
2573
2574
2575
2576
2577
2578
2579and2 #(1) d0_0 (
2580.in0(din0[0:0]),
2581.in1(din1[0:0]),
2582.out(dout[0:0])
2583);
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593endmodule
2594
2595
2596
2597
2598
2599//
2600// buff macro
2601//
2602//
2603
2604
2605
2606
2607
2608module tlu_cth_dp_buff_macro__dbuff_32x__width_1 (
2609 din,
2610 dout);
2611 input [0:0] din;
2612 output [0:0] dout;
2613
2614
2615
2616
2617
2618
2619buff #(1) d0_0 (
2620.in(din[0:0]),
2621.out(dout[0:0])
2622);
2623
2624
2625
2626
2627
2628
2629
2630
2631endmodule
2632
2633
2634
2635
2636
2637// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2638// also for pass-gate with decoder
2639
2640
2641
2642
2643
2644// any PARAMS parms go into naming of macro
2645
2646module tlu_cth_dp_mux_macro__mux_pgdec__ports_8__width_8 (
2647 din0,
2648 din1,
2649 din2,
2650 din3,
2651 din4,
2652 din5,
2653 din6,
2654 din7,
2655 sel,
2656 muxtst,
2657 test,
2658 dout);
2659wire psel0;
2660wire psel1;
2661wire psel2;
2662wire psel3;
2663wire psel4;
2664wire psel5;
2665wire psel6;
2666wire psel7;
2667
2668 input [7:0] din0;
2669 input [7:0] din1;
2670 input [7:0] din2;
2671 input [7:0] din3;
2672 input [7:0] din4;
2673 input [7:0] din5;
2674 input [7:0] din6;
2675 input [7:0] din7;
2676 input [2:0] sel;
2677 input muxtst;
2678 input test;
2679 output [7:0] dout;
2680
2681
2682
2683
2684
2685cl_dp1_pdec8_8x c0_0 (
2686 .sel0(sel[0]),
2687 .sel1(sel[1]),
2688 .sel2(sel[2]),
2689 .psel0(psel0),
2690 .psel1(psel1),
2691 .psel2(psel2),
2692 .psel3(psel3),
2693 .psel4(psel4),
2694 .psel5(psel5),
2695 .psel6(psel6),
2696 .psel7(psel7),
2697 .test(test)
2698);
2699
2700mux8 #(8) d0_0 (
2701 .sel0(psel0),
2702 .sel1(psel1),
2703 .sel2(psel2),
2704 .sel3(psel3),
2705 .sel4(psel4),
2706 .sel5(psel5),
2707 .sel6(psel6),
2708 .sel7(psel7),
2709 .in0(din0[7:0]),
2710 .in1(din1[7:0]),
2711 .in2(din2[7:0]),
2712 .in3(din3[7:0]),
2713 .in4(din4[7:0]),
2714 .in5(din5[7:0]),
2715 .in6(din6[7:0]),
2716 .in7(din7[7:0]),
2717.dout(dout[7:0]),
2718 .muxtst(muxtst)
2719);
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733endmodule
2734
2735
2736//
2737// buff macro
2738//
2739//
2740
2741
2742
2743
2744
2745module tlu_cth_dp_buff_macro__dbuff_48x__width_1 (
2746 din,
2747 dout);
2748 input [0:0] din;
2749 output [0:0] dout;
2750
2751
2752
2753
2754
2755
2756buff #(1) d0_0 (
2757.in(din[0:0]),
2758.out(dout[0:0])
2759);
2760
2761
2762
2763
2764
2765
2766
2767
2768endmodule
2769
2770
2771
2772
2773
2774// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2775// also for pass-gate with decoder
2776
2777
2778
2779
2780
2781// any PARAMS parms go into naming of macro
2782
2783module tlu_cth_dp_mux_macro__mux_pgdec__ports_8__width_64 (
2784 din0,
2785 din1,
2786 din2,
2787 din3,
2788 din4,
2789 din5,
2790 din6,
2791 din7,
2792 sel,
2793 muxtst,
2794 test,
2795 dout);
2796wire psel0;
2797wire psel1;
2798wire psel2;
2799wire psel3;
2800wire psel4;
2801wire psel5;
2802wire psel6;
2803wire psel7;
2804
2805 input [63:0] din0;
2806 input [63:0] din1;
2807 input [63:0] din2;
2808 input [63:0] din3;
2809 input [63:0] din4;
2810 input [63:0] din5;
2811 input [63:0] din6;
2812 input [63:0] din7;
2813 input [2:0] sel;
2814 input muxtst;
2815 input test;
2816 output [63:0] dout;
2817
2818
2819
2820
2821
2822cl_dp1_pdec8_8x c0_0 (
2823 .sel0(sel[0]),
2824 .sel1(sel[1]),
2825 .sel2(sel[2]),
2826 .psel0(psel0),
2827 .psel1(psel1),
2828 .psel2(psel2),
2829 .psel3(psel3),
2830 .psel4(psel4),
2831 .psel5(psel5),
2832 .psel6(psel6),
2833 .psel7(psel7),
2834 .test(test)
2835);
2836
2837mux8 #(64) d0_0 (
2838 .sel0(psel0),
2839 .sel1(psel1),
2840 .sel2(psel2),
2841 .sel3(psel3),
2842 .sel4(psel4),
2843 .sel5(psel5),
2844 .sel6(psel6),
2845 .sel7(psel7),
2846 .in0(din0[63:0]),
2847 .in1(din1[63:0]),
2848 .in2(din2[63:0]),
2849 .in3(din3[63:0]),
2850 .in4(din4[63:0]),
2851 .in5(din5[63:0]),
2852 .in6(din6[63:0]),
2853 .in7(din7[63:0]),
2854.dout(dout[63:0]),
2855 .muxtst(muxtst)
2856);
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870endmodule
2871
2872
2873// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2874// also for pass-gate with decoder
2875
2876
2877
2878
2879
2880// any PARAMS parms go into naming of macro
2881
2882module tlu_cth_dp_mux_macro__mux_aonpe__ports_4__width_64 (
2883 din0,
2884 sel0,
2885 din1,
2886 sel1,
2887 din2,
2888 sel2,
2889 din3,
2890 sel3,
2891 dout);
2892wire buffout0;
2893wire buffout1;
2894wire buffout2;
2895wire buffout3;
2896
2897 input [63:0] din0;
2898 input sel0;
2899 input [63:0] din1;
2900 input sel1;
2901 input [63:0] din2;
2902 input sel2;
2903 input [63:0] din3;
2904 input sel3;
2905 output [63:0] dout;
2906
2907
2908
2909
2910
2911cl_dp1_muxbuff4_8x c0_0 (
2912 .in0(sel0),
2913 .in1(sel1),
2914 .in2(sel2),
2915 .in3(sel3),
2916 .out0(buffout0),
2917 .out1(buffout1),
2918 .out2(buffout2),
2919 .out3(buffout3)
2920);
2921mux4s #(64) d0_0 (
2922 .sel0(buffout0),
2923 .sel1(buffout1),
2924 .sel2(buffout2),
2925 .sel3(buffout3),
2926 .in0(din0[63:0]),
2927 .in1(din1[63:0]),
2928 .in2(din2[63:0]),
2929 .in3(din3[63:0]),
2930.dout(dout[63:0])
2931);
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945endmodule
2946
2947
2948
2949
2950
2951
2952// any PARAMS parms go into naming of macro
2953
2954module tlu_cth_dp_msff_macro__mux_aonpe__ports_2__width_64 (
2955 din0,
2956 sel0,
2957 din1,
2958 sel1,
2959 clk,
2960 en,
2961 se,
2962 scan_in,
2963 siclk,
2964 soclk,
2965 pce_ov,
2966 stop,
2967 dout,
2968 scan_out);
2969wire buffout0;
2970wire buffout1;
2971wire [63:0] muxout;
2972wire l1clk;
2973wire siclk_out;
2974wire soclk_out;
2975wire [62:0] so;
2976
2977 input [63:0] din0;
2978 input sel0;
2979 input [63:0] din1;
2980 input sel1;
2981
2982
2983 input clk;
2984 input en;
2985 input se;
2986 input scan_in;
2987 input siclk;
2988 input soclk;
2989 input pce_ov;
2990 input stop;
2991
2992
2993
2994 output [63:0] dout;
2995
2996
2997 output scan_out;
2998
2999
3000
3001
3002cl_dp1_muxbuff2_8x c1_0 (
3003 .in0(sel0),
3004 .in1(sel1),
3005 .out0(buffout0),
3006 .out1(buffout1)
3007);
3008mux2s #(64) d1_0 (
3009 .sel0(buffout0),
3010 .sel1(buffout1),
3011 .in0(din0[63:0]),
3012 .in1(din1[63:0]),
3013.dout(muxout[63:0])
3014);
3015cl_dp1_l1hdr_8x c0_0 (
3016.l2clk(clk),
3017.pce(en),
3018.aclk(siclk),
3019.bclk(soclk),
3020.l1clk(l1clk),
3021 .se(se),
3022 .pce_ov(pce_ov),
3023 .stop(stop),
3024 .siclk_out(siclk_out),
3025 .soclk_out(soclk_out)
3026);
3027dff #(64) d0_0 (
3028.l1clk(l1clk),
3029.siclk(siclk_out),
3030.soclk(soclk_out),
3031.d(muxout[63:0]),
3032.si({scan_in,so[62:0]}),
3033.so({so[62:0],scan_out}),
3034.q(dout[63:0])
3035);
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056endmodule
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066//
3067// or macro for ports = 2,3
3068//
3069//
3070
3071
3072
3073
3074
3075module tlu_cth_dp_or_macro__ports_3__width_64 (
3076 din0,
3077 din1,
3078 din2,
3079 dout);
3080 input [63:0] din0;
3081 input [63:0] din1;
3082 input [63:0] din2;
3083 output [63:0] dout;
3084
3085
3086
3087
3088
3089
3090or3 #(64) d0_0 (
3091.in0(din0[63:0]),
3092.in1(din1[63:0]),
3093.in2(din2[63:0]),
3094.out(dout[63:0])
3095);
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105endmodule
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115// any PARAMS parms go into naming of macro
3116
3117module tlu_cth_dp_msff_macro__mux_aope__ports_2__width_64 (
3118 din0,
3119 din1,
3120 sel0,
3121 clk,
3122 en,
3123 se,
3124 scan_in,
3125 siclk,
3126 soclk,
3127 pce_ov,
3128 stop,
3129 dout,
3130 scan_out);
3131wire psel0;
3132wire psel1;
3133wire [63:0] muxout;
3134wire l1clk;
3135wire siclk_out;
3136wire soclk_out;
3137wire [62:0] so;
3138
3139 input [63:0] din0;
3140 input [63:0] din1;
3141 input sel0;
3142
3143
3144 input clk;
3145 input en;
3146 input se;
3147 input scan_in;
3148 input siclk;
3149 input soclk;
3150 input pce_ov;
3151 input stop;
3152
3153
3154
3155 output [63:0] dout;
3156
3157
3158 output scan_out;
3159
3160
3161
3162
3163cl_dp1_penc2_8x c1_0 (
3164 .sel0(sel0),
3165 .psel0(psel0),
3166 .psel1(psel1)
3167);
3168
3169mux2s #(64) d1_0 (
3170 .sel0(psel0),
3171 .sel1(psel1),
3172 .in0(din0[63:0]),
3173 .in1(din1[63:0]),
3174.dout(muxout[63:0])
3175);
3176cl_dp1_l1hdr_8x c0_0 (
3177.l2clk(clk),
3178.pce(en),
3179.aclk(siclk),
3180.bclk(soclk),
3181.l1clk(l1clk),
3182 .se(se),
3183 .pce_ov(pce_ov),
3184 .stop(stop),
3185 .siclk_out(siclk_out),
3186 .soclk_out(soclk_out)
3187);
3188dff #(64) d0_0 (
3189.l1clk(l1clk),
3190.siclk(siclk_out),
3191.soclk(soclk_out),
3192.d(muxout[63:0]),
3193.si({scan_in,so[62:0]}),
3194.so({so[62:0],scan_out}),
3195.q(dout[63:0])
3196);
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217endmodule
3218
3219
3220
3221
3222
3223
3224
3225