Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / tlu / rtl / tlu_pct_dp.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tlu_pct_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_pct_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 tcu_wmr_vec_mask,
48 dec_flush_b,
49 dec_inst_cnt,
50 dec_raw_pick_p,
51 exu_address_m,
52 exu_oor_va_m,
53 mmu_itte_tag_data,
54 asi_rd_pc,
55 asi_rd_iaw,
56 asi_wr_iaw,
57 asi_wr_data,
58 fls_tid_dec_b,
59 fls_tid_dec_w,
60 fls_pc_sel_npc,
61 fls_pc_sel_npc_plus_4,
62 fls_npc_sel_npc_plus_4,
63 fls_npc_sel_npc_plus_8,
64 fls_npc_sel_target,
65 fls_npc_b_sel_npc,
66 fls_pc_is_npc,
67 fls_pstate_am_d_,
68 fls_pstate_am_b_,
69 fls_pstate_am_w_,
70 fls_npc_if_cnt_eq_1_d,
71 fls_npc_if_cnt_eq_2_d,
72 fls_npc_if_cnt_eq_3_d,
73 fls_pct_pc_en,
74 fls_pct_npc_en,
75 trl_pc_sel_trap_pc,
76 trl_npc_sel_trap_npc,
77 trl_npc_sel_tnpc,
78 trl_trap_type,
79 trl_pc_thread_sel,
80 trl_pc_pstate_am_,
81 trl_pc_sel_pc,
82 trl_pc_sel_npc,
83 trl_pc_sel_trap,
84 trl_pc_sel_reset,
85 trl_pc_done,
86 trl_pc_retry,
87 trl_pc_tte,
88 trl_pct_trap_pc_en,
89 trl_pct_tnpc_en,
90 tsd_tba,
91 tsd_tpc,
92 tsd_tpc_oor_va,
93 tsd_tnpc,
94 tsd_tnpc_oor_va,
95 tsd_tnpc_nonseq,
96 tsd_asi_data_,
97 tsd_pstate_am,
98 scan_out,
99 wmr_scan_out,
100 pct_asi_data,
101 pct_npc_0_w,
102 pct_npc_1_w,
103 pct_npc_2_w,
104 pct_npc_3_w,
105 pct_tsa_pc,
106 pct_tsa_pc_oor_va,
107 pct_tsa_npc,
108 pct_tsa_npc_oor_va,
109 pct_tsa_npc_nonseq,
110 pct_npc_is_nonseq,
111 pct_pc_oor_va_e,
112 pct_iaw_exc_e,
113 pct_shadow_pc_d,
114 pct_npc_w,
115 pct_target_b,
116 pct_trl_wr_data,
117 tsd_pc_w,
118 tlu_pc_d,
119 tlu_pc_w,
120 tlu_trap_pc);
121wire en;
122wire clk;
123wire stop;
124wire test;
125wire pce_ov;
126wire se;
127wire siclk;
128wire soclk;
129wire target_b_lat_scanin;
130wire target_b_lat_scanout;
131wire wmr_vec_mask;
132wire oor_va_b;
133wire [47:2] target_b;
134wire flush_b;
135wire pc_3_w_lat_scanin;
136wire pc_3_w_lat_scanout;
137wire trap_pc_oor_va;
138wire [47:0] trap_pc;
139wire pc_3_oor_va_w;
140wire [47:2] pc_3_w;
141wire [47:2] npc_plus_4_noncrit_b;
142wire npc_oor_va_b;
143wire [47:2] npc_noncrit_b;
144wire pc_2_w_lat_scanin;
145wire pc_2_w_lat_scanout;
146wire pc_2_oor_va_w;
147wire [47:2] pc_2_w;
148wire pc_1_w_lat_scanin;
149wire pc_1_w_lat_scanout;
150wire pc_1_oor_va_w;
151wire [47:2] pc_1_w;
152wire pc_0_w_lat_scanin;
153wire pc_0_w_lat_scanout;
154wire pc_0_oor_va_w;
155wire [47:2] pc_0_w;
156wire tnpc_lat_scanin;
157wire tnpc_lat_scanout;
158wire tnpc_nonseq;
159wire tnpc_oor_va;
160wire [47:2] tnpc;
161wire npc_3_w_lat_scanin;
162wire npc_3_w_lat_scanout;
163wire npc_3_nonseq;
164wire npc_3_oor_va_w;
165wire [47:2] npc_3_w;
166wire [47:2] npc_plus_8_b;
167wire [3:2] npc_3_crit_w;
168wire npc_2_w_lat_scanin;
169wire npc_2_w_lat_scanout;
170wire npc_2_nonseq;
171wire npc_2_oor_va_w;
172wire [47:2] npc_2_w;
173wire [3:2] npc_2_crit_w;
174wire npc_1_w_lat_scanin;
175wire npc_1_w_lat_scanout;
176wire npc_1_nonseq;
177wire npc_1_oor_va_w;
178wire [47:2] npc_1_w;
179wire [3:2] npc_1_crit_w;
180wire npc_0_w_lat_scanin;
181wire npc_0_w_lat_scanout;
182wire npc_0_nonseq;
183wire npc_0_oor_va_w;
184wire [47:2] npc_0_w;
185wire [3:2] npc_0_crit_w;
186wire [47:2] npc_b;
187wire [47:2] npc_plus_4_b;
188wire npc_33_02_plus_4_cout_b;
189wire [49:48] npc_plus_4_b_unused;
190wire npc_49_34_plus_4_cout_b_unused;
191wire npc_34_03_plus_8_cout_b;
192wire [50:48] npc_plus_8_b_unused;
193wire npc_50_35_plus_8_cout_b_unused;
194wire npc_b_mux_scanin;
195wire npc_b_mux_scanout;
196wire tsa_pc_oor_va_w;
197wire [47:2] tsa_pc_unmasked_w;
198wire [47:32] tsa_pc_w;
199wire npc_nonseq;
200wire tsa_npc_oor_va_w;
201wire [47:2] tsa_npc_unmasked_w;
202wire [47:32] tsa_npc_w;
203wire [47:2] any_trap_pc;
204wire [4:0] wmr_vec_mask_;
205wire [47:2] reset_pc;
206wire trap_pc_lat_scanin;
207wire trap_pc_lat_scanout;
208wire [47:5] piped_pc_w;
209wire [31:5] piped_pc_pre_buf_w;
210wire [12:11] piped_pc_pre_buf_w_unused;
211wire [12:11] piped_pc_w_unused;
212wire [47:32] masked_pc_w;
213wire [3:0] tid_dec_buf_d;
214wire pre_pc_oor_va_d;
215wire [47:2] pre_pc_d;
216wire [3:0] pstate_am_;
217wire rd_pc_pstate_am_in;
218wire tid_d_lat_scanin;
219wire tid_d_lat_scanout;
220wire prd_pc_pstate_am;
221wire rd_iaw;
222wire [3:0] rd_pc;
223wire [3:0] tid_dec_d;
224wire rd_iaw_;
225wire rd_pc_pstate_am_;
226wire pre_npc_oor_va_d;
227wire [47:2] pre_npc_d;
228wire [47:2] pre_npc_noncrit_d;
229wire [63:22] npc_inc_unused;
230wire [47:2] npc_inc_d;
231wire npc_inc_cout_d_unused;
232wire inst_cnt_nz;
233wire [1:0] inst_cnt_;
234wire [4:2] npc_inc_0_d;
235wire [4:2] npc_inc_1_d;
236wire [4:2] npc_inc_2_d;
237wire [4:2] npc_inc_3_d;
238wire pc_4_carry_d;
239wire tcu_muxtest_rep3;
240wire pc_oor_va_d;
241wire [47:2] pc_d;
242wire [47:2] pc_noncrit_d;
243wire masked_pc_oor_va_d;
244wire [47:32] masked_pc_d;
245wire pc_e_lat_scanin;
246wire pc_e_lat_scanout;
247wire pc_oor_va_e;
248wire [47:2] pc_e;
249wire iaw_lat_wmr_scanin;
250wire iaw_lat_wmr_scanout;
251wire iaw_en;
252wire [47:2] iaw_va;
253wire [48:2] asi_data;
254wire [48:2] asi_data_0_;
255
256
257
258
259input l2clk;
260input scan_in;
261input tcu_pce_ov;
262input spc_aclk;
263input spc_bclk;
264input tcu_scan_en;
265input tcu_dectest;
266input tcu_muxtest;
267
268input tcu_scan_en_wmr;
269input spc_aclk_wmr; // Warm reset (non)scan
270input wmr_scan_in;
271
272// RSTVADDR (POR address) control
273input tcu_wmr_vec_mask; // PINDEF:BOT
274
275input dec_flush_b;
276input [1:0] dec_inst_cnt; // Count of instructions in E, M, B
277input [3:0] dec_raw_pick_p; // Decoded TID at P
278
279input [47:2] exu_address_m; // Target for taken branches
280input exu_oor_va_m;
281
282input [47:0] mmu_itte_tag_data;
283
284input [3:0] asi_rd_pc;
285input asi_rd_iaw;
286input asi_wr_iaw;
287input [47:0] asi_wr_data;
288
289input [3:0] fls_tid_dec_b;
290input [3:0] fls_tid_dec_w;
291input [3:0] fls_pc_sel_npc; // Sequential flow
292input [3:0] fls_pc_sel_npc_plus_4; // Branch taken or(not taken with annul)
293input [3:0] fls_npc_sel_npc_plus_4; // Sequential flow
294input [3:0] fls_npc_sel_npc_plus_8; // Branch not taken with annul
295input [3:0] fls_npc_sel_target; // Branch taken
296input fls_npc_b_sel_npc; // NPC is invalid (but going valid)
297input fls_pc_is_npc; // PC reg actually holds NPC, not PC
298input fls_pstate_am_d_; // For instruction watchpoint
299input fls_pstate_am_b_; // For dsfar
300input fls_pstate_am_w_; // For itlb_tag_access
301input [4:2] fls_npc_if_cnt_eq_1_d;
302input [4:2] fls_npc_if_cnt_eq_2_d;
303input [4:2] fls_npc_if_cnt_eq_3_d;
304input [3:0] fls_pct_pc_en; // Power managment for PC flops
305input [3:0] fls_pct_npc_en; // Power managment for NPC flops
306
307input [3:0] trl_pc_sel_trap_pc; // Trap, retry, or done taken; update PC
308input [3:0] trl_npc_sel_trap_npc; // Trap taken; update NPC
309input [3:0] trl_npc_sel_tnpc; // Retry or done taken; update NPC
310input [8:0] trl_trap_type; // Trap type
311input [3:0] trl_pc_thread_sel; // Which thread is trapping
312input trl_pc_pstate_am_;
313input trl_pc_sel_pc; // Retry the excepting instruction
314input trl_pc_sel_npc; // Advance to the next instruction
315input trl_pc_sel_trap; // Select the trap PC
316input trl_pc_sel_reset; // Select the reset PC
317input trl_pc_done; // Select the NPC from the stack
318input trl_pc_retry; // Select the PC from the stack
319input trl_pc_tte; // Select the TTE for ITLB write
320input trl_pct_trap_pc_en; // Power management
321input trl_pct_tnpc_en;
322
323input [47:14] tsd_tba; // Trap Base Address
324input [47:2] tsd_tpc;
325input tsd_tpc_oor_va;
326input [47:2] tsd_tnpc;
327input tsd_tnpc_oor_va;
328input tsd_tnpc_nonseq;
329input [47:2] tsd_asi_data_;
330input [3:0] tsd_pstate_am;
331
332
333output scan_out;
334
335output wmr_scan_out; // Warm reset (non)scan
336
337output [48:2] pct_asi_data;
338
339output [3:2] pct_npc_0_w;
340output [3:2] pct_npc_1_w;
341output [3:2] pct_npc_2_w;
342output [3:2] pct_npc_3_w;
343
344output [47:2] pct_tsa_pc;
345output pct_tsa_pc_oor_va;
346output [47:2] pct_tsa_npc;
347output pct_tsa_npc_oor_va;
348output pct_tsa_npc_nonseq;
349output [3:0] pct_npc_is_nonseq;
350output pct_pc_oor_va_e;
351
352output [1:0] pct_iaw_exc_e;
353
354output [47:2] pct_shadow_pc_d;
355
356output [47:2] pct_npc_w;
357
358output [47:2] pct_target_b;
359
360output [16:0] pct_trl_wr_data;
361
362output [10:5] tsd_pc_w;
363
364output [47:2] tlu_pc_d;
365output [47:13] tlu_pc_w;
366output [47:0] tlu_trap_pc;
367
368
369
370////////////////////////////////////////////////////////////////////////////////
371
372assign en = 1'b1;
373assign clk = l2clk;
374assign stop = 1'b0;
375assign test = tcu_dectest;
376
377tlu_pct_dp_buff_macro__width_4 clk_control_buf (
378 .din ({tcu_pce_ov ,
379 tcu_scan_en ,
380 spc_aclk ,
381 spc_bclk }),
382 .dout ({pce_ov ,
383 se ,
384 siclk ,
385 soclk })
386);
387
388
389
390////////////////////////////////////////////////////////////////////////////////
391// Pass target from M to B
392
393tlu_pct_dp_msff_macro__stack_48c__width_48 target_b_lat (
394 .scan_in(target_b_lat_scanin),
395 .scan_out(target_b_lat_scanout),
396 .din ({tcu_wmr_vec_mask ,
397 exu_oor_va_m ,
398 exu_address_m [47:2]}),
399 .dout ({wmr_vec_mask ,
400 oor_va_b ,
401 target_b [47:2]}),
402 .clk(clk),
403 .en(en),
404 .se(se),
405 .siclk(siclk),
406 .soclk(soclk),
407 .pce_ov(pce_ov),
408 .stop(stop)
409);
410
411tlu_pct_dp_and_macro__ports_2__stack_48c__width_46 target_b_buf (
412 .din0 (target_b [47:2] ),
413 .din1 ({{16 {fls_pstate_am_b_}} ,
414 {30 {1'b1}} }),
415 .dout (pct_target_b [47:2] )
416);
417
418
419
420////////////////////////////////////////////////////////////////////////////////
421// Save each thread's PC and NPC
422
423// Have to use trap_pc because it merges any_trap_pc and reset_trap_pc
424// Also already has TPC and TNPC merged in...
425// PC update to trap vector value should happen concurrently with TSA update
426
427tlu_pct_dp_buff_macro__stack_48c__width_1 flush_b_buf (
428 .din (dec_flush_b ),
429 .dout (flush_b )
430);
431
432tlu_pct_dp_msff_macro__mux_aope__ports_5__stack_48c__width_47 pc_3_w_lat (
433 .scan_in(pc_3_w_lat_scanin),
434 .scan_out(pc_3_w_lat_scanout),
435 .din0 ({trap_pc_oor_va ,
436 trap_pc [47:2]}),
437 .din1 ({pc_3_oor_va_w ,
438 pc_3_w [47:2]}),
439 .din2 ({1'b0 ,
440 npc_plus_4_noncrit_b [47:2]}),
441 .din3 ({npc_oor_va_b ,
442 npc_noncrit_b [47:2]}),
443 .din4 ({pc_3_oor_va_w ,
444 pc_3_w [47:2]}),
445 .sel0 (trl_pc_sel_trap_pc [3 ] ),
446 .sel1 (flush_b ),
447 .sel2 (fls_pc_sel_npc_plus_4 [3 ] ),
448 .sel3 (fls_pc_sel_npc [3 ] ),
449 .en (fls_pct_pc_en [3 ] ),
450 .dout ({pc_3_oor_va_w ,
451 pc_3_w [47:2]}),
452 .clk(clk),
453 .se(se),
454 .siclk(siclk),
455 .soclk(soclk),
456 .pce_ov(pce_ov),
457 .stop(stop)
458);
459
460tlu_pct_dp_msff_macro__mux_aope__ports_5__stack_48c__width_47 pc_2_w_lat (
461 .scan_in(pc_2_w_lat_scanin),
462 .scan_out(pc_2_w_lat_scanout),
463 .din0 ({trap_pc_oor_va ,
464 trap_pc [47:2]}),
465 .din1 ({pc_2_oor_va_w ,
466 pc_2_w [47:2]}),
467 .din2 ({1'b0 ,
468 npc_plus_4_noncrit_b [47:2]}),
469 .din3 ({npc_oor_va_b ,
470 npc_noncrit_b [47:2]}),
471 .din4 ({pc_2_oor_va_w ,
472 pc_2_w [47:2]}),
473 .sel0 (trl_pc_sel_trap_pc [2 ] ),
474 .sel1 (flush_b ),
475 .sel2 (fls_pc_sel_npc_plus_4 [2 ] ),
476 .sel3 (fls_pc_sel_npc [2 ] ),
477 .en (fls_pct_pc_en [2 ] ),
478 .dout ({pc_2_oor_va_w ,
479 pc_2_w [47:2]}),
480 .clk(clk),
481 .se(se),
482 .siclk(siclk),
483 .soclk(soclk),
484 .pce_ov(pce_ov),
485 .stop(stop)
486);
487
488tlu_pct_dp_msff_macro__mux_aope__ports_5__stack_48c__width_47 pc_1_w_lat (
489 .scan_in(pc_1_w_lat_scanin),
490 .scan_out(pc_1_w_lat_scanout),
491 .din0 ({trap_pc_oor_va ,
492 trap_pc [47:2]}),
493 .din1 ({pc_1_oor_va_w ,
494 pc_1_w [47:2]}),
495 .din2 ({1'b0 ,
496 npc_plus_4_noncrit_b [47:2]}),
497 .din3 ({npc_oor_va_b ,
498 npc_noncrit_b [47:2]}),
499 .din4 ({pc_1_oor_va_w ,
500 pc_1_w [47:2]}),
501 .sel0 (trl_pc_sel_trap_pc [1 ] ),
502 .sel1 (flush_b ),
503 .sel2 (fls_pc_sel_npc_plus_4 [1 ] ),
504 .sel3 (fls_pc_sel_npc [1 ] ),
505 .en (fls_pct_pc_en [1 ] ),
506 .dout ({pc_1_oor_va_w ,
507 pc_1_w [47:2]}),
508 .clk(clk),
509 .se(se),
510 .siclk(siclk),
511 .soclk(soclk),
512 .pce_ov(pce_ov),
513 .stop(stop)
514);
515
516tlu_pct_dp_msff_macro__mux_aope__ports_5__stack_48c__width_47 pc_0_w_lat (
517 .scan_in(pc_0_w_lat_scanin),
518 .scan_out(pc_0_w_lat_scanout),
519 .din0 ({trap_pc_oor_va ,
520 trap_pc [47:2]}),
521 .din1 ({pc_0_oor_va_w ,
522 pc_0_w [47:2]}),
523 .din2 ({1'b0 ,
524 npc_plus_4_noncrit_b [47:2]}),
525 .din3 ({npc_oor_va_b ,
526 npc_noncrit_b [47:2]}),
527 .din4 ({pc_0_oor_va_w ,
528 pc_0_w [47:2]}),
529 .sel0 (trl_pc_sel_trap_pc [0 ] ),
530 .sel1 (flush_b ),
531 .sel2 (fls_pc_sel_npc_plus_4 [0 ] ),
532 .sel3 (fls_pc_sel_npc [0 ] ),
533 .en (fls_pct_pc_en [0 ] ),
534 .dout ({pc_0_oor_va_w ,
535 pc_0_w [47:2]}),
536 .clk(clk),
537 .se(se),
538 .siclk(siclk),
539 .soclk(soclk),
540 .pce_ov(pce_ov),
541 .stop(stop)
542);
543
544// Hold tsd_tnpc for one cycle to allow for ECC check of TSA
545tlu_pct_dp_msff_macro__minbuff_1__stack_48c__width_48 tnpc_lat (
546 .scan_in(tnpc_lat_scanin),
547 .scan_out(tnpc_lat_scanout),
548 .din ({tsd_tnpc_nonseq ,
549 tsd_tnpc_oor_va ,
550 tsd_tnpc [47:2]}),
551 .en (trl_pct_tnpc_en ),
552 .dout ({tnpc_nonseq ,
553 tnpc_oor_va ,
554 tnpc [47:2]}),
555 .clk(clk),
556 .se(se),
557 .siclk(siclk),
558 .soclk(soclk),
559 .pce_ov(pce_ov),
560 .stop(stop)
561);
562
563tlu_pct_dp_msff_macro__mux_aope__ports_7__stack_48c__width_48 npc_3_w_lat (
564 .scan_in(npc_3_w_lat_scanin),
565 .scan_out(npc_3_w_lat_scanout),
566 .din0 ({1'b0 ,
567 trap_pc_oor_va ,
568 trap_pc [47:3],
569 1'b1 }),
570 .din1 ({tnpc_nonseq ,
571 tnpc_oor_va ,
572 tnpc [47:2]}),
573 .din2 ({npc_3_nonseq ,
574 npc_3_oor_va_w ,
575 npc_3_w [47:2]}),
576 .din3 ({1'b1 ,
577 oor_va_b ,
578 target_b [47:2]}),
579 .din4 ({{2 {1'b0}} ,
580 npc_plus_8_b [47:2]}),
581 .din5 ({{2 {1'b0}} ,
582 npc_plus_4_noncrit_b [47:2]}),
583 .din6 ({npc_3_nonseq ,
584 npc_3_oor_va_w ,
585 npc_3_w [47:2]}),
586 .sel0 (trl_npc_sel_trap_npc [3 ] ),
587 .sel1 (trl_npc_sel_tnpc [3 ] ),
588 .sel2 (flush_b ),
589 .sel3 (fls_npc_sel_target [3 ] ),
590 .sel4 (fls_npc_sel_npc_plus_8 [3 ] ),
591 .sel5 (fls_npc_sel_npc_plus_4 [3 ] ),
592 .en (fls_pct_npc_en [3 ] ),
593 .dout ({npc_3_nonseq ,
594 npc_3_oor_va_w ,
595 npc_3_w [47:4],
596 npc_3_crit_w [3:2]}),
597 .clk(clk),
598 .se(se),
599 .siclk(siclk),
600 .soclk(soclk),
601 .pce_ov(pce_ov),
602 .stop(stop)
603);
604
605tlu_pct_dp_buff_macro__stack_48c__width_2 npc_3_w_buf (
606 .din (npc_3_crit_w [3:2] ),
607 .dout (npc_3_w [3:2] )
608);
609
610tlu_pct_dp_msff_macro__mux_aope__ports_7__stack_48c__width_48 npc_2_w_lat (
611 .scan_in(npc_2_w_lat_scanin),
612 .scan_out(npc_2_w_lat_scanout),
613 .din0 ({1'b0 ,
614 trap_pc_oor_va ,
615 trap_pc [47:3],
616 1'b1 }),
617 .din1 ({tnpc_nonseq ,
618 tnpc_oor_va ,
619 tnpc [47:2]}),
620 .din2 ({npc_2_nonseq ,
621 npc_2_oor_va_w ,
622 npc_2_w [47:2]}),
623 .din3 ({1'b1 ,
624 oor_va_b ,
625 target_b [47:2]}),
626 .din4 ({{2 {1'b0}} ,
627 npc_plus_8_b [47:2]}),
628 .din5 ({{2 {1'b0}} ,
629 npc_plus_4_noncrit_b [47:2]}),
630 .din6 ({npc_2_nonseq ,
631 npc_2_oor_va_w ,
632 npc_2_w [47:2]}),
633 .sel0 (trl_npc_sel_trap_npc [2 ] ),
634 .sel1 (trl_npc_sel_tnpc [2 ] ),
635 .sel2 (flush_b ),
636 .sel3 (fls_npc_sel_target [2 ] ),
637 .sel4 (fls_npc_sel_npc_plus_8 [2 ] ),
638 .sel5 (fls_npc_sel_npc_plus_4 [2 ] ),
639 .en (fls_pct_npc_en [2 ] ),
640 .dout ({npc_2_nonseq ,
641 npc_2_oor_va_w ,
642 npc_2_w [47:4],
643 npc_2_crit_w [3:2]}),
644 .clk(clk),
645 .se(se),
646 .siclk(siclk),
647 .soclk(soclk),
648 .pce_ov(pce_ov),
649 .stop(stop)
650);
651
652tlu_pct_dp_buff_macro__stack_48c__width_2 npc_2_w_buf (
653 .din (npc_2_crit_w [3:2] ),
654 .dout (npc_2_w [3:2] )
655);
656
657tlu_pct_dp_msff_macro__mux_aope__ports_7__stack_48c__width_48 npc_1_w_lat (
658 .scan_in(npc_1_w_lat_scanin),
659 .scan_out(npc_1_w_lat_scanout),
660 .din0 ({1'b0 ,
661 trap_pc_oor_va ,
662 trap_pc [47:3],
663 1'b1 }),
664 .din1 ({tnpc_nonseq ,
665 tnpc_oor_va ,
666 tnpc [47:2]}),
667 .din2 ({npc_1_nonseq ,
668 npc_1_oor_va_w ,
669 npc_1_w [47:2]}),
670 .din3 ({1'b1 ,
671 oor_va_b ,
672 target_b [47:2]}),
673 .din4 ({{2 {1'b0}} ,
674 npc_plus_8_b [47:2]}),
675 .din5 ({{2 {1'b0}} ,
676 npc_plus_4_noncrit_b [47:2]}),
677 .din6 ({npc_1_nonseq ,
678 npc_1_oor_va_w ,
679 npc_1_w [47:2]}),
680 .sel0 (trl_npc_sel_trap_npc [1 ] ),
681 .sel1 (trl_npc_sel_tnpc [1 ] ),
682 .sel2 (flush_b ),
683 .sel3 (fls_npc_sel_target [1 ] ),
684 .sel4 (fls_npc_sel_npc_plus_8 [1 ] ),
685 .sel5 (fls_npc_sel_npc_plus_4 [1 ] ),
686 .en (fls_pct_npc_en [1 ] ),
687 .dout ({npc_1_nonseq ,
688 npc_1_oor_va_w ,
689 npc_1_w [47:4],
690 npc_1_crit_w [3:2]}),
691 .clk(clk),
692 .se(se),
693 .siclk(siclk),
694 .soclk(soclk),
695 .pce_ov(pce_ov),
696 .stop(stop)
697);
698
699tlu_pct_dp_buff_macro__stack_48c__width_2 npc_1_w_buf (
700 .din (npc_1_crit_w [3:2] ),
701 .dout (npc_1_w [3:2] )
702);
703
704tlu_pct_dp_msff_macro__mux_aope__ports_7__stack_48c__width_48 npc_0_w_lat (
705 .scan_in(npc_0_w_lat_scanin),
706 .scan_out(npc_0_w_lat_scanout),
707 .din0 ({1'b0 ,
708 trap_pc_oor_va ,
709 trap_pc [47:3],
710 1'b1 }),
711 .din1 ({tnpc_nonseq ,
712 tnpc_oor_va ,
713 tnpc [47:2]}),
714 .din2 ({npc_0_nonseq ,
715 npc_0_oor_va_w ,
716 npc_0_w [47:2]}),
717 .din3 ({1'b1 ,
718 oor_va_b ,
719 target_b [47:2]}),
720 .din4 ({{2 {1'b0}} ,
721 npc_plus_8_b [47:2]}),
722 .din5 ({{2 {1'b0}} ,
723 npc_plus_4_noncrit_b [47:2]}),
724 .din6 ({npc_0_nonseq ,
725 npc_0_oor_va_w ,
726 npc_0_w [47:2]}),
727 .sel0 (trl_npc_sel_trap_npc [0 ] ),
728 .sel1 (trl_npc_sel_tnpc [0 ] ),
729 .sel2 (flush_b ),
730 .sel3 (fls_npc_sel_target [0 ] ),
731 .sel4 (fls_npc_sel_npc_plus_8 [0 ] ),
732 .sel5 (fls_npc_sel_npc_plus_4 [0 ] ),
733 .en (fls_pct_npc_en [0 ] ),
734 .dout ({npc_0_nonseq ,
735 npc_0_oor_va_w ,
736 npc_0_w [47:4],
737 npc_0_crit_w [3:2]}),
738 .clk(clk),
739 .se(se),
740 .siclk(siclk),
741 .soclk(soclk),
742 .pce_ov(pce_ov),
743 .stop(stop)
744);
745
746tlu_pct_dp_buff_macro__stack_48c__width_2 npc_0_w_buf (
747 .din (npc_0_crit_w [3:2] ),
748 .dout (npc_0_w [3:2] )
749);
750
751
752assign pct_npc_is_nonseq[3:0] =
753 {npc_3_nonseq, npc_2_nonseq, npc_1_nonseq, npc_0_nonseq};
754
755
756
757////////////////////////////////////////////////////////////////////////////////
758// Generate NPC
759
760tlu_pct_dp_mux_macro__dmux_8x__mux_aonpe__ports_4__stack_48c__width_47 npc_incr_mux (
761 .din0 ({npc_0_oor_va_w ,
762 npc_0_w [47:2]}),
763 .din1 ({npc_1_oor_va_w ,
764 npc_1_w [47:2]}),
765 .din2 ({npc_2_oor_va_w ,
766 npc_2_w [47:2]}),
767 .din3 ({npc_3_oor_va_w ,
768 npc_3_w [47:2]}),
769 .sel0 (fls_tid_dec_b [0 ] ),
770 .sel1 (fls_tid_dec_b [1 ] ),
771 .sel2 (fls_tid_dec_b [2 ] ),
772 .sel3 (fls_tid_dec_b [3 ] ),
773 .dout ({npc_oor_va_b ,
774 npc_b [47:2]})
775);
776
777tlu_pct_dp_buff_macro__stack_48c__width_46 npc_buf (
778 .din (npc_b [47:2] ),
779 .dout (npc_noncrit_b [47:2] )
780);
781
782tlu_pct_dp_increment_macro__width_32 npc_33_02_plus_4_b_inc (
783 .din (npc_b [33:2] ),
784 .cin (1'b1 ),
785 .dout (npc_plus_4_b [33:2] ),
786 .cout (npc_33_02_plus_4_cout_b )
787);
788
789tlu_pct_dp_increment_macro__width_16 npc_plus_4_u_b_inc (
790 .din ({2'b00 ,
791 npc_b [47:34]}),
792 .cin (npc_33_02_plus_4_cout_b ),
793 .dout ({npc_plus_4_b_unused [49:48],
794 npc_plus_4_b [47:34]}),
795 .cout (npc_49_34_plus_4_cout_b_unused )
796);
797
798tlu_pct_dp_buff_macro__stack_48c__width_46 npc_plus_4_noncrit_b_buf (
799 .din (npc_plus_4_b [47:2] ),
800 .dout (npc_plus_4_noncrit_b [47:2] )
801);
802
803tlu_pct_dp_increment_macro__width_32 npc_34_03_plus_8_b_inc (
804 .din (npc_b [34:3] ),
805 .cin (1'b1 ),
806 .dout (npc_plus_8_b [34:3] ),
807 .cout (npc_34_03_plus_8_cout_b )
808);
809
810assign npc_plus_8_b[2] = npc_noncrit_b[2];
811
812tlu_pct_dp_increment_macro__width_16 npc_47_35_plus_8_b_inc (
813 .din ({3'b000 ,
814 npc_b [47:35]}),
815 .cin (npc_34_03_plus_8_cout_b ),
816 .dout ({npc_plus_8_b_unused [50:48],
817 npc_plus_8_b [47:35]}),
818 .cout (npc_50_35_plus_8_cout_b_unused )
819);
820
821// Generate NPC for instruction in W for load sync case for fetch
822// Only has to be correct for loads that are not flushed
823tlu_pct_dp_msff_macro__mux_pgpe__ports_2__stack_48c__width_46 npc_w_lat (
824 .scan_in(npc_b_mux_scanin),
825 .scan_out(npc_b_mux_scanout),
826 .din0 (npc_noncrit_b [47:2] ),
827 .din1 (npc_plus_4_b [47:2] ),
828 .sel0 (fls_npc_b_sel_npc ),
829 .dout (pct_npc_w [47:2] ),
830 .clk(clk),
831 .en(en),
832 .se(se),
833 .siclk(siclk),
834 .soclk(soclk),
835 .pce_ov(pce_ov),
836 .stop(stop)
837);
838
839
840
841
842////////////////////////////////////////////////////////////////////////////////
843// Generate trap PC, NPC
844
845tlu_pct_dp_mux_macro__mux_aonpe__ports_4__stack_48c__width_47 pc_mux (
846 .din0 ({pc_0_oor_va_w ,
847 pc_0_w [47:2]}),
848 .din1 ({pc_1_oor_va_w ,
849 pc_1_w [47:2]}),
850 .din2 ({pc_2_oor_va_w ,
851 pc_2_w [47:2]}),
852 .din3 ({pc_3_oor_va_w ,
853 pc_3_w [47:2]}),
854 .sel0 (trl_pc_thread_sel [0 ] ),
855 .sel1 (trl_pc_thread_sel [1 ] ),
856 .sel2 (trl_pc_thread_sel [2 ] ),
857 .sel3 (trl_pc_thread_sel [3 ] ),
858 .dout ({tsa_pc_oor_va_w ,
859 tsa_pc_unmasked_w [47:2]})
860);
861
862tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_16 tsa_pc_w_and (
863 .din0 (tsa_pc_unmasked_w [47:32] ),
864 .din1 ({16 {trl_pc_pstate_am_}} ),
865 .dout (tsa_pc_w [47:32] )
866);
867
868assign pct_tsa_pc[47:2] =
869 {tsa_pc_w [47:32],
870 tsa_pc_unmasked_w [31:2]};
871
872assign pct_tsa_pc_oor_va =
873 tsa_pc_oor_va_w;
874
875tlu_pct_dp_mux_macro__mux_aonpe__ports_4__stack_48c__width_48 npc_mux (
876 .din0 ({npc_0_nonseq ,
877 npc_0_oor_va_w ,
878 npc_0_w [47:2]}),
879 .din1 ({npc_1_nonseq ,
880 npc_1_oor_va_w ,
881 npc_1_w [47:2]}),
882 .din2 ({npc_2_nonseq ,
883 npc_2_oor_va_w ,
884 npc_2_w [47:2]}),
885 .din3 ({npc_3_nonseq ,
886 npc_3_oor_va_w ,
887 npc_3_w [47:2]}),
888 .sel0 (trl_pc_thread_sel [0 ] ),
889 .sel1 (trl_pc_thread_sel [1 ] ),
890 .sel2 (trl_pc_thread_sel [2 ] ),
891 .sel3 (trl_pc_thread_sel [3 ] ),
892 .dout ({npc_nonseq ,
893 tsa_npc_oor_va_w ,
894 tsa_npc_unmasked_w [47:2]})
895);
896
897tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_16 tsa_npc_w_and (
898 .din0 (tsa_npc_unmasked_w [47:32] ),
899 .din1 ({16 {trl_pc_pstate_am_}} ),
900 .dout (tsa_npc_w [47:32] )
901);
902
903assign pct_tsa_npc[47:2] =
904 {tsa_npc_w [47:32],
905 tsa_npc_unmasked_w [31:2]};
906
907assign pct_tsa_npc_oor_va =
908 tsa_npc_oor_va_w;
909
910assign pct_tsa_npc_nonseq =
911 npc_nonseq;
912
913assign any_trap_pc[47:14] =
914 tsd_tba[47:14];
915
916assign any_trap_pc[13:5] =
917 trl_trap_type[8:0];
918
919assign any_trap_pc[4:2] =
920 3'b000;
921
922// Select RSTVADDR == 48'hfffff0000000 or == 0
923// Create a tree to prevent overloading of flop
924
925tlu_pct_dp_inv_macro__stack_48c__width_5 reset_pc_inv (
926 .din ({5 {wmr_vec_mask}} ),
927 .dout (wmr_vec_mask_ [4:0] )
928);
929
930assign reset_pc[47:8] =
931 {{ 4 {wmr_vec_mask_[4]}},
932 { 4 {wmr_vec_mask_[3]}},
933 { 4 {wmr_vec_mask_[2]}},
934 { 4 {wmr_vec_mask_[1]}},
935 { 4 {wmr_vec_mask_[0]}},
936 {20 {1'b0}}};
937
938assign reset_pc[7:5] =
939 trl_trap_type[2:0];
940
941assign reset_pc[4:2] =
942 3'b000;
943
944// Selects are checked with 0in inside trl
945tlu_pct_dp_msff_macro__mux_aope__ports_8__stack_48c__width_48 trap_pc_lat (
946 .scan_in(trap_pc_lat_scanin),
947 .scan_out(trap_pc_lat_scanout),
948 .din0 ({tsa_pc_unmasked_w [47:2],
949 tsa_pc_oor_va_w ,
950 {1 {1'b0}} }),
951 .din1 ({tsa_npc_unmasked_w [47:2],
952 tsa_npc_oor_va_w ,
953 {1 {1'b0}} }),
954 .din2 ({any_trap_pc [47:2],
955 {2 {1'b0}} }),
956 .din3 ({reset_pc [47:2],
957 {2 {1'b0}} }),
958 .din4 ({tsd_tpc [47:2],
959 tsd_tpc_oor_va ,
960 {1 {1'b0}} }),
961 .din5 ({tsd_tnpc [47:2],
962 tsd_tnpc_oor_va ,
963 {1 {1'b0}} }),
964 .din6 (mmu_itte_tag_data [47:0] ),
965 .din7 (trap_pc [47:0] ),
966 .sel0 (trl_pc_sel_pc ),
967 .sel1 (trl_pc_sel_npc ),
968 .sel2 (trl_pc_sel_trap ),
969 .sel3 (trl_pc_sel_reset ),
970 .sel4 (trl_pc_retry ),
971 .sel5 (trl_pc_done ),
972 .sel6 (trl_pc_tte ),
973 .en (trl_pct_trap_pc_en ),
974 .dout (trap_pc [47:0] ),
975 .clk(clk),
976 .se(se),
977 .siclk(siclk),
978 .soclk(soclk),
979 .pce_ov(pce_ov),
980 .stop(stop)
981);
982
983
984assign tlu_trap_pc[47:0] =
985 trap_pc[47:0];
986
987assign trap_pc_oor_va =
988 trap_pc[1];
989
990
991
992////////////////////////////////////////////////////////////////////////////////
993// Pass PC in W for tag_access reg
994// and for DESR
995
996tlu_pct_dp_mux_macro__left_3__mux_aonpe__ports_4__stack_48c__width_43 piped_pc_w_mux (
997 .din0 (pc_0_w [47:5] ),
998 .din1 (pc_1_w [47:5] ),
999 .din2 (pc_2_w [47:5] ),
1000 .din3 (pc_3_w [47:5] ),
1001 .sel0 (fls_tid_dec_w [0 ] ),
1002 .sel1 (fls_tid_dec_w [1 ] ),
1003 .sel2 (fls_tid_dec_w [2 ] ),
1004 .sel3 (fls_tid_dec_w [3 ] ),
1005 .dout ({piped_pc_w [47:32],
1006 piped_pc_pre_buf_w [31:5]})
1007);
1008
1009tlu_pct_dp_buff_macro__left_3__rep_1__stack_48c__width_27 piped_pc_w_buf (
1010 .din (piped_pc_pre_buf_w [31:5] ),
1011 .dout (piped_pc_w [31:5] )
1012);
1013
1014assign tsd_pc_w[10:5] =
1015 piped_pc_w[10:5];
1016
1017assign piped_pc_pre_buf_w_unused[12:11] =
1018 piped_pc_pre_buf_w[12:11];
1019
1020assign piped_pc_w_unused[12:11] =
1021 piped_pc_w[12:11];
1022
1023tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_16 masked_pc_w_and (
1024 .din0 (piped_pc_w [47:32] ),
1025 .din1 ({16 {fls_pstate_am_w_}} ),
1026 .dout (masked_pc_w [47:32] )
1027);
1028
1029assign tlu_pc_w[47:13] =
1030 {masked_pc_w[47:32], piped_pc_w[31:13]};
1031
1032
1033
1034////////////////////////////////////////////////////////////////////////////////
1035// Mux PC for shadow scan
1036
1037
1038
1039////////////////////////////////////////////////////////////////////////////////
1040// Generate PC for instruction in D
1041
1042assign pct_npc_3_w[3:2] =
1043 npc_3_crit_w[3:2];
1044assign pct_npc_2_w[3:2] =
1045 npc_2_crit_w[3:2];
1046assign pct_npc_1_w[3:2] =
1047 npc_1_crit_w[3:2];
1048assign pct_npc_0_w[3:2] =
1049 npc_0_crit_w[3:2];
1050
1051tlu_pct_dp_mux_macro__dmux_8x__mux_aonpe__ports_4__stack_48c__width_47 pre_pc_d_mux (
1052 .din0 ({pc_0_oor_va_w ,
1053 pc_0_w [47:2]}),
1054 .din1 ({pc_1_oor_va_w ,
1055 pc_1_w [47:2]}),
1056 .din2 ({pc_2_oor_va_w ,
1057 pc_2_w [47:2]}),
1058 .din3 ({pc_3_oor_va_w ,
1059 pc_3_w [47:2]}),
1060 .sel0 (tid_dec_buf_d [0] ),
1061 .sel1 (tid_dec_buf_d [1] ),
1062 .sel2 (tid_dec_buf_d [2] ),
1063 .sel3 (tid_dec_buf_d [3] ),
1064 .dout ({pre_pc_oor_va_d ,
1065 pre_pc_d [47:2]})
1066);
1067
1068// Muxing down PSTATE.am for PC reads. However, if reading
1069// instruction VA watchpoint, then masking must NOT occur
1070
1071tlu_pct_dp_nand_macro__ports_2__width_4 pstate_am_b_nand (
1072 .din0 (asi_rd_pc [3:0] ),
1073 .din1 (tsd_pstate_am [3:0] ),
1074 .dout (pstate_am_ [3:0] )
1075);
1076
1077tlu_pct_dp_nand_macro__ports_4__width_1 rd_pc_pstate_am_in_nand (
1078 .din0 (pstate_am_ [0 ] ),
1079 .din1 (pstate_am_ [1 ] ),
1080 .din2 (pstate_am_ [2 ] ),
1081 .din3 (pstate_am_ [3 ] ),
1082 .dout (rd_pc_pstate_am_in )
1083);
1084
1085tlu_pct_dp_msff_macro__left_20__stack_48c__width_10 tid_d_lat (
1086 .scan_in(tid_d_lat_scanin),
1087 .scan_out(tid_d_lat_scanout),
1088 .din ({rd_pc_pstate_am_in ,
1089 asi_rd_iaw ,
1090 asi_rd_pc [3:0],
1091 dec_raw_pick_p [3:0]}),
1092 .dout ({prd_pc_pstate_am ,
1093 rd_iaw ,
1094 rd_pc [3:0],
1095 tid_dec_d [3:0]}),
1096 .clk(clk),
1097 .en(en),
1098 .se(se),
1099 .siclk(siclk),
1100 .soclk(soclk),
1101 .pce_ov(pce_ov),
1102 .stop(stop)
1103);
1104
1105tlu_pct_dp_inv_macro__width_1 rd_iaw_b_inv (
1106 .din (rd_iaw ),
1107 .dout (rd_iaw_ )
1108);
1109
1110tlu_pct_dp_nand_macro__ports_2__width_1 rd_pc_pstate_am_b_nand (
1111 .din0 (rd_iaw_ ),
1112 .din1 (prd_pc_pstate_am ),
1113 .dout (rd_pc_pstate_am_ )
1114);
1115
1116tlu_pct_dp_buff_macro__stack_48c__width_4 tid_d_buf (
1117 .din (tid_dec_d [3:0] ),
1118 .dout (tid_dec_buf_d [3:0] )
1119);
1120
1121tlu_pct_dp_mux_macro__dmux_8x__mux_aonpe__ports_4__stack_48c__width_47 pre_npc_d_mux (
1122 .din0 ({npc_0_oor_va_w ,
1123 npc_0_w [47:2]}),
1124 .din1 ({npc_1_oor_va_w ,
1125 npc_1_w [47:2]}),
1126 .din2 ({npc_2_oor_va_w ,
1127 npc_2_w [47:2]}),
1128 .din3 ({npc_3_oor_va_w ,
1129 npc_3_w [47:2]}),
1130 .sel0 (tid_dec_d [0] ),
1131 .sel1 (tid_dec_d [1] ),
1132 .sel2 (tid_dec_d [2] ),
1133 .sel3 (tid_dec_d [3] ),
1134 .dout ({pre_npc_oor_va_d ,
1135 pre_npc_d [47:2]})
1136);
1137
1138tlu_pct_dp_buff_macro__stack_48c__width_46 pre_npc_noncrit_d_buf (
1139 .din (pre_npc_d [47:2] ),
1140 .dout (pre_npc_noncrit_d [47:2] )
1141);
1142
1143// The increment can be before the mux because you have to use the
1144// NPC if the count is nonzero
1145// Bits are separated to account for alignment with 48c stack and
1146// that the lower two bits are not used
1147tlu_pct_dp_increment_macro__width_64 pc_d_47_04_inc (
1148 .cin (1'b1 ),
1149 .din ({12'h000 ,
1150 pre_npc_d [47:26],
1151 8'hff ,
1152 pre_npc_d [25:4]}),
1153 .dout ({npc_inc_unused [63:52],
1154 npc_inc_d [47:26],
1155 npc_inc_unused [29:22],
1156 npc_inc_d [25:4]}),
1157 .cout (npc_inc_cout_d_unused )
1158);
1159
1160// Must take PC if PC actually holds NPC
1161// If a branch in the delay slot of another branch is at decode
1162// (signified by dec_inst_cnt[01:00] being nonzero), then the PC is no longer
1163// the NPC.
1164
1165tlu_pct_dp_or_macro__stack_48c__width_1 inst_cnt_nz_or (
1166 .din0 (dec_inst_cnt [1 ] ),
1167 .din1 (dec_inst_cnt [0 ] ),
1168 .dout (inst_cnt_nz )
1169);
1170
1171tlu_pct_dp_inv_macro__width_2 inst_cnt_inv_inv (
1172 .din (dec_inst_cnt [1:0] ),
1173 .dout (inst_cnt_ [1:0] )
1174);
1175
1176tlu_pct_dp_nand_macro__ports_3__width_3 npc_inc_0_d_nand (
1177 .din0 ({1'b0 ,
1178 pre_npc_d [3:2]}),
1179 .din1 ({3 {inst_cnt_[1]}} ),
1180 .din2 ({3 {inst_cnt_[0]}} ),
1181 .dout (npc_inc_0_d [4:2] )
1182);
1183
1184tlu_pct_dp_nand_macro__ports_3__width_3 npc_inc_1_d_nand (
1185 .din0 (fls_npc_if_cnt_eq_1_d [4:2] ),
1186 .din1 ({3 {inst_cnt_[1]}} ),
1187 .din2 ({3 {dec_inst_cnt[0]}} ),
1188 .dout (npc_inc_1_d [4:2] )
1189);
1190
1191tlu_pct_dp_nand_macro__ports_3__width_3 npc_inc_2_d_nand (
1192 .din0 (fls_npc_if_cnt_eq_2_d [4:2] ),
1193 .din1 ({3 {dec_inst_cnt[1]}} ),
1194 .din2 ({3 {inst_cnt_[0]}} ),
1195 .dout (npc_inc_2_d [4:2] )
1196);
1197
1198tlu_pct_dp_nand_macro__ports_3__width_3 npc_inc_3_d_nand (
1199 .din0 (fls_npc_if_cnt_eq_3_d [4:2] ),
1200 .din1 ({3 {dec_inst_cnt[1]}} ),
1201 .din2 ({3 {dec_inst_cnt[0]}} ),
1202 .dout (npc_inc_3_d [4:2] )
1203);
1204
1205tlu_pct_dp_nand_macro__ports_4__width_3 npc_inc_d_nand (
1206 .din0 (npc_inc_0_d [4:2] ),
1207 .din1 (npc_inc_1_d [4:2] ),
1208 .din2 (npc_inc_2_d [4:2] ),
1209 .din3 (npc_inc_3_d [4:2] ),
1210 .dout ({pc_4_carry_d ,
1211 npc_inc_d [3:2]})
1212);
1213
1214
1215tlu_pct_dp_buff_macro__dbuff_48x__width_1 tst_mux_rep3 (
1216 .din (tcu_muxtest ),
1217 .dout (tcu_muxtest_rep3 )
1218);
1219
1220tlu_pct_dp_mux_macro__mux_pgpe__ports_4__stack_48c__width_47 pc_d_mux (
1221 .din0 ({pre_npc_oor_va_d ,
1222 npc_inc_d [47:2]}),
1223 .din1 ({pre_npc_oor_va_d ,
1224 pre_npc_noncrit_d [47:4],
1225 npc_inc_d [3:2]}),
1226 .din2 ({pre_pc_oor_va_d ,
1227 pre_pc_d [47:2]}),
1228 .din3 ({pre_npc_oor_va_d ,
1229 pre_npc_noncrit_d [47:2]}),
1230 .sel0 (pc_4_carry_d ),
1231 .sel1 (inst_cnt_nz ),
1232 .sel2 (fls_pc_is_npc ),
1233 .muxtst (tcu_muxtest_rep3 ),
1234 .dout ({pc_oor_va_d ,
1235 pc_d [47:2]}),
1236 .test(test)
1237);
1238
1239assign tlu_pc_d[47:2] =
1240 pc_d[47:2];
1241
1242tlu_pct_dp_buff_macro__rep_1__stack_48c__width_46 pc_noncrit_d_buf (
1243 .din (pc_d [47:2] ),
1244 .dout (pc_noncrit_d [47:2] )
1245);
1246
1247assign pct_shadow_pc_d[47:2] =
1248 pc_noncrit_d[47:2];
1249
1250
1251
1252////////////////////////////////////////////////////////////////////////////////
1253// Compare instruction watchpoint in E
1254
1255tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_17 am_and (
1256 .din0 ({pc_oor_va_d ,
1257 pc_noncrit_d [47:32]}),
1258 .din1 ({17 {fls_pstate_am_d_}} ),
1259 .dout ({masked_pc_oor_va_d ,
1260 masked_pc_d [47:32]})
1261);
1262
1263tlu_pct_dp_msff_macro__stack_48c__width_47 pc_e_lat (
1264 .scan_in(pc_e_lat_scanin),
1265 .scan_out(pc_e_lat_scanout),
1266 .din ({masked_pc_oor_va_d ,
1267 masked_pc_d [47:32],
1268 pc_noncrit_d [31:2]}),
1269 .dout ({pc_oor_va_e ,
1270 pc_e [47:2]}),
1271 .clk(clk),
1272 .en(en),
1273 .se(se),
1274 .siclk(siclk),
1275 .soclk(soclk),
1276 .pce_ov(pce_ov),
1277 .stop(stop)
1278);
1279
1280assign pct_pc_oor_va_e =
1281 pc_oor_va_e;
1282
1283tlu_pct_dp_msff_macro__stack_48c__width_47 iaw_lat ( // FS:wmr_protect
1284 .scan_in(iaw_lat_wmr_scanin),
1285 .scan_out(iaw_lat_wmr_scanout),
1286 .se (tcu_scan_en_wmr ),
1287 .siclk (spc_aclk_wmr ),
1288 .en (asi_wr_iaw ),
1289 .din ({asi_wr_data [0 ],
1290 asi_wr_data [47:2]}),
1291 .dout ({iaw_en ,
1292 iaw_va [47:2]}),
1293 .clk(clk),
1294 .soclk(soclk),
1295 .pce_ov(pce_ov),
1296 .stop(stop)
1297);
1298
1299tlu_pct_dp_buff_macro__rep_1__stack_48c__width_17 wr_data_buf (
1300 .din ({asi_wr_data [1:0],
1301 asi_wr_data [16:2]}),
1302 .dout ({pct_trl_wr_data [1:0],
1303 pct_trl_wr_data [16:2]})
1304);
1305
1306tlu_pct_dp_cmp_macro__width_16 iaw_47_34_cmp (
1307 .din0 ({1'b0 ,
1308 1'b1 ,
1309 pc_e [47:34]}),
1310 .din1 ({1'b0 ,
1311 iaw_en ,
1312 iaw_va [47:34]}),
1313 .dout (pct_iaw_exc_e [1 ] )
1314);
1315
1316tlu_pct_dp_cmp_macro__width_32 iaw_33_02_cmp (
1317 .din0 (pc_e [33:2] ),
1318 .din1 (iaw_va [33:2] ),
1319 .dout (pct_iaw_exc_e [0 ] )
1320);
1321
1322
1323
1324////////////////////////////////////////////////////////////////////////////////
1325// Mux PC for ASI reads
1326
1327tlu_pct_dp_mux_macro__mux_aonpe__ports_5__stack_48c__width_47 asi_pc_mux (
1328 .din0 ({1'b0, pc_0_w [47:2]}),
1329 .din1 ({1'b0, pc_1_w [47:2]}),
1330 .din2 ({1'b0, pc_2_w [47:2]}),
1331 .din3 ({1'b0, pc_3_w [47:2]}),
1332 .din4 ({iaw_en, iaw_va [47:2]}),
1333 .sel0 (rd_pc [0 ] ),
1334 .sel1 (rd_pc [1 ] ),
1335 .sel2 (rd_pc [2 ] ),
1336 .sel3 (rd_pc [3 ] ),
1337 .sel4 (rd_iaw ),
1338 .dout (asi_data [48:2] )
1339);
1340
1341tlu_pct_dp_nand_macro__ports_2__stack_48c__width_47 asi_data_0_b_nand (
1342 .din0 ({{17 {rd_pc_pstate_am_}} ,
1343 {30 {1'b1}} }),
1344 .din1 (asi_data [48:2] ),
1345 .dout (asi_data_0_ [48:2] )
1346);
1347
1348tlu_pct_dp_nand_macro__ports_2__stack_48c__width_47 asi_data_nand (
1349 .din0 ({1'b1, tsd_asi_data_ [47:2]}),
1350 .din1 (asi_data_0_ [48:2] ),
1351 .dout (pct_asi_data [48:2] )
1352);
1353
1354
1355
1356
1357
1358// fixscan start:
1359assign target_b_lat_scanin = scan_in ;
1360assign pc_3_w_lat_scanin = target_b_lat_scanout ;
1361assign pc_2_w_lat_scanin = pc_3_w_lat_scanout ;
1362assign pc_1_w_lat_scanin = pc_2_w_lat_scanout ;
1363assign pc_0_w_lat_scanin = pc_1_w_lat_scanout ;
1364assign tnpc_lat_scanin = pc_0_w_lat_scanout ;
1365assign npc_3_w_lat_scanin = tnpc_lat_scanout ;
1366assign npc_2_w_lat_scanin = npc_3_w_lat_scanout ;
1367assign npc_1_w_lat_scanin = npc_2_w_lat_scanout ;
1368assign npc_0_w_lat_scanin = npc_1_w_lat_scanout ;
1369assign npc_b_mux_scanin = npc_0_w_lat_scanout ;
1370assign trap_pc_lat_scanin = npc_b_mux_scanout ;
1371assign tid_d_lat_scanin = trap_pc_lat_scanout ;
1372assign pc_e_lat_scanin = tid_d_lat_scanout ;
1373assign scan_out = pc_e_lat_scanout ;
1374
1375assign iaw_lat_wmr_scanin = wmr_scan_in ;
1376assign wmr_scan_out = iaw_lat_wmr_scanout ;
1377// fixscan end:
1378endmodule
1379
1380
1381//
1382// buff macro
1383//
1384//
1385
1386
1387
1388
1389
1390module tlu_pct_dp_buff_macro__width_4 (
1391 din,
1392 dout);
1393 input [3:0] din;
1394 output [3:0] dout;
1395
1396
1397
1398
1399
1400
1401buff #(4) d0_0 (
1402.in(din[3:0]),
1403.out(dout[3:0])
1404);
1405
1406
1407
1408
1409
1410
1411
1412
1413endmodule
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423// any PARAMS parms go into naming of macro
1424
1425module tlu_pct_dp_msff_macro__stack_48c__width_48 (
1426 din,
1427 clk,
1428 en,
1429 se,
1430 scan_in,
1431 siclk,
1432 soclk,
1433 pce_ov,
1434 stop,
1435 dout,
1436 scan_out);
1437wire l1clk;
1438wire siclk_out;
1439wire soclk_out;
1440wire [46:0] so;
1441
1442 input [47:0] din;
1443
1444
1445 input clk;
1446 input en;
1447 input se;
1448 input scan_in;
1449 input siclk;
1450 input soclk;
1451 input pce_ov;
1452 input stop;
1453
1454
1455
1456 output [47:0] dout;
1457
1458
1459 output scan_out;
1460
1461
1462
1463
1464cl_dp1_l1hdr_8x c0_0 (
1465.l2clk(clk),
1466.pce(en),
1467.aclk(siclk),
1468.bclk(soclk),
1469.l1clk(l1clk),
1470 .se(se),
1471 .pce_ov(pce_ov),
1472 .stop(stop),
1473 .siclk_out(siclk_out),
1474 .soclk_out(soclk_out)
1475);
1476dff #(48) d0_0 (
1477.l1clk(l1clk),
1478.siclk(siclk_out),
1479.soclk(soclk_out),
1480.d(din[47:0]),
1481.si({scan_in,so[46:0]}),
1482.so({so[46:0],scan_out}),
1483.q(dout[47:0])
1484);
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505endmodule
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515//
1516// and macro for ports = 2,3,4
1517//
1518//
1519
1520
1521
1522
1523
1524module tlu_pct_dp_and_macro__ports_2__stack_48c__width_46 (
1525 din0,
1526 din1,
1527 dout);
1528 input [45:0] din0;
1529 input [45:0] din1;
1530 output [45:0] dout;
1531
1532
1533
1534
1535
1536
1537and2 #(46) d0_0 (
1538.in0(din0[45:0]),
1539.in1(din1[45:0]),
1540.out(dout[45:0])
1541);
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551endmodule
1552
1553
1554
1555
1556
1557//
1558// buff macro
1559//
1560//
1561
1562
1563
1564
1565
1566module tlu_pct_dp_buff_macro__stack_48c__width_1 (
1567 din,
1568 dout);
1569 input [0:0] din;
1570 output [0:0] dout;
1571
1572
1573
1574
1575
1576
1577buff #(1) d0_0 (
1578.in(din[0:0]),
1579.out(dout[0:0])
1580);
1581
1582
1583
1584
1585
1586
1587
1588
1589endmodule
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599// any PARAMS parms go into naming of macro
1600
1601module tlu_pct_dp_msff_macro__mux_aope__ports_5__stack_48c__width_47 (
1602 din0,
1603 din1,
1604 din2,
1605 din3,
1606 din4,
1607 sel0,
1608 sel1,
1609 sel2,
1610 sel3,
1611 clk,
1612 en,
1613 se,
1614 scan_in,
1615 siclk,
1616 soclk,
1617 pce_ov,
1618 stop,
1619 dout,
1620 scan_out);
1621wire psel0;
1622wire psel1;
1623wire psel2;
1624wire psel3;
1625wire psel4;
1626wire [46:0] muxout;
1627wire l1clk;
1628wire siclk_out;
1629wire soclk_out;
1630wire [45:0] so;
1631
1632 input [46:0] din0;
1633 input [46:0] din1;
1634 input [46:0] din2;
1635 input [46:0] din3;
1636 input [46:0] din4;
1637 input sel0;
1638 input sel1;
1639 input sel2;
1640 input sel3;
1641
1642
1643 input clk;
1644 input en;
1645 input se;
1646 input scan_in;
1647 input siclk;
1648 input soclk;
1649 input pce_ov;
1650 input stop;
1651
1652
1653
1654 output [46:0] dout;
1655
1656
1657 output scan_out;
1658
1659
1660
1661
1662cl_dp1_penc5_8x c1_0 (
1663 .test(1'b1),
1664 .sel0(sel0),
1665 .sel1(sel1),
1666 .sel2(sel2),
1667 .sel3(sel3),
1668 .psel0(psel0),
1669 .psel1(psel1),
1670 .psel2(psel2),
1671 .psel3(psel3),
1672 .psel4(psel4)
1673);
1674
1675mux5s #(47) d1_0 (
1676 .sel0(psel0),
1677 .sel1(psel1),
1678 .sel2(psel2),
1679 .sel3(psel3),
1680 .sel4(psel4),
1681 .in0(din0[46:0]),
1682 .in1(din1[46:0]),
1683 .in2(din2[46:0]),
1684 .in3(din3[46:0]),
1685 .in4(din4[46:0]),
1686.dout(muxout[46:0])
1687);
1688cl_dp1_l1hdr_8x c0_0 (
1689.l2clk(clk),
1690.pce(en),
1691.aclk(siclk),
1692.bclk(soclk),
1693.l1clk(l1clk),
1694 .se(se),
1695 .pce_ov(pce_ov),
1696 .stop(stop),
1697 .siclk_out(siclk_out),
1698 .soclk_out(soclk_out)
1699);
1700dff #(47) d0_0 (
1701.l1clk(l1clk),
1702.siclk(siclk_out),
1703.soclk(soclk_out),
1704.d(muxout[46:0]),
1705.si({scan_in,so[45:0]}),
1706.so({so[45:0],scan_out}),
1707.q(dout[46:0])
1708);
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729endmodule
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743// any PARAMS parms go into naming of macro
1744
1745module tlu_pct_dp_msff_macro__minbuff_1__stack_48c__width_48 (
1746 din,
1747 clk,
1748 en,
1749 se,
1750 scan_in,
1751 siclk,
1752 soclk,
1753 pce_ov,
1754 stop,
1755 dout,
1756 scan_out);
1757wire l1clk;
1758wire siclk_out;
1759wire soclk_out;
1760wire [46:0] so;
1761
1762 input [47:0] din;
1763
1764
1765 input clk;
1766 input en;
1767 input se;
1768 input scan_in;
1769 input siclk;
1770 input soclk;
1771 input pce_ov;
1772 input stop;
1773
1774
1775
1776 output [47:0] dout;
1777
1778
1779 output scan_out;
1780
1781
1782
1783
1784cl_dp1_l1hdr_8x c0_0 (
1785.l2clk(clk),
1786.pce(en),
1787.aclk(siclk),
1788.bclk(soclk),
1789.l1clk(l1clk),
1790 .se(se),
1791 .pce_ov(pce_ov),
1792 .stop(stop),
1793 .siclk_out(siclk_out),
1794 .soclk_out(soclk_out)
1795);
1796dff #(48) d0_0 (
1797.l1clk(l1clk),
1798.siclk(siclk_out),
1799.soclk(soclk_out),
1800.d(din[47:0]),
1801.si({scan_in,so[46:0]}),
1802.so({so[46:0],scan_out}),
1803.q(dout[47:0])
1804);
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825endmodule
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839// any PARAMS parms go into naming of macro
1840
1841module tlu_pct_dp_msff_macro__mux_aope__ports_7__stack_48c__width_48 (
1842 din0,
1843 din1,
1844 din2,
1845 din3,
1846 din4,
1847 din5,
1848 din6,
1849 sel0,
1850 sel1,
1851 sel2,
1852 sel3,
1853 sel4,
1854 sel5,
1855 clk,
1856 en,
1857 se,
1858 scan_in,
1859 siclk,
1860 soclk,
1861 pce_ov,
1862 stop,
1863 dout,
1864 scan_out);
1865wire psel0;
1866wire psel1;
1867wire psel2;
1868wire psel3;
1869wire psel4;
1870wire psel5;
1871wire psel6;
1872wire [47:0] muxout;
1873wire l1clk;
1874wire siclk_out;
1875wire soclk_out;
1876wire [46:0] so;
1877
1878 input [47:0] din0;
1879 input [47:0] din1;
1880 input [47:0] din2;
1881 input [47:0] din3;
1882 input [47:0] din4;
1883 input [47:0] din5;
1884 input [47:0] din6;
1885 input sel0;
1886 input sel1;
1887 input sel2;
1888 input sel3;
1889 input sel4;
1890 input sel5;
1891
1892
1893 input clk;
1894 input en;
1895 input se;
1896 input scan_in;
1897 input siclk;
1898 input soclk;
1899 input pce_ov;
1900 input stop;
1901
1902
1903
1904 output [47:0] dout;
1905
1906
1907 output scan_out;
1908
1909
1910
1911
1912cl_dp1_penc7_8x c1_0 (
1913 .test(1'b1),
1914 .sel0(sel0),
1915 .sel1(sel1),
1916 .sel2(sel2),
1917 .sel3(sel3),
1918 .sel4(sel4),
1919 .sel5(sel5),
1920 .psel0(psel0),
1921 .psel1(psel1),
1922 .psel2(psel2),
1923 .psel3(psel3),
1924 .psel4(psel4),
1925 .psel5(psel5),
1926 .psel6(psel6)
1927);
1928
1929mux7s #(48) d1_0 (
1930 .sel0(psel0),
1931 .sel1(psel1),
1932 .sel2(psel2),
1933 .sel3(psel3),
1934 .sel4(psel4),
1935 .sel5(psel5),
1936 .sel6(psel6),
1937 .in0(din0[47:0]),
1938 .in1(din1[47:0]),
1939 .in2(din2[47:0]),
1940 .in3(din3[47:0]),
1941 .in4(din4[47:0]),
1942 .in5(din5[47:0]),
1943 .in6(din6[47:0]),
1944.dout(muxout[47:0])
1945);
1946cl_dp1_l1hdr_8x c0_0 (
1947.l2clk(clk),
1948.pce(en),
1949.aclk(siclk),
1950.bclk(soclk),
1951.l1clk(l1clk),
1952 .se(se),
1953 .pce_ov(pce_ov),
1954 .stop(stop),
1955 .siclk_out(siclk_out),
1956 .soclk_out(soclk_out)
1957);
1958dff #(48) d0_0 (
1959.l1clk(l1clk),
1960.siclk(siclk_out),
1961.soclk(soclk_out),
1962.d(muxout[47:0]),
1963.si({scan_in,so[46:0]}),
1964.so({so[46:0],scan_out}),
1965.q(dout[47:0])
1966);
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987endmodule
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997//
1998// buff macro
1999//
2000//
2001
2002
2003
2004
2005
2006module tlu_pct_dp_buff_macro__stack_48c__width_2 (
2007 din,
2008 dout);
2009 input [1:0] din;
2010 output [1:0] dout;
2011
2012
2013
2014
2015
2016
2017buff #(2) d0_0 (
2018.in(din[1:0]),
2019.out(dout[1:0])
2020);
2021
2022
2023
2024
2025
2026
2027
2028
2029endmodule
2030
2031
2032
2033
2034
2035// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2036// also for pass-gate with decoder
2037
2038
2039
2040
2041
2042// any PARAMS parms go into naming of macro
2043
2044module tlu_pct_dp_mux_macro__dmux_8x__mux_aonpe__ports_4__stack_48c__width_47 (
2045 din0,
2046 sel0,
2047 din1,
2048 sel1,
2049 din2,
2050 sel2,
2051 din3,
2052 sel3,
2053 dout);
2054wire buffout0;
2055wire buffout1;
2056wire buffout2;
2057wire buffout3;
2058
2059 input [46:0] din0;
2060 input sel0;
2061 input [46:0] din1;
2062 input sel1;
2063 input [46:0] din2;
2064 input sel2;
2065 input [46:0] din3;
2066 input sel3;
2067 output [46:0] dout;
2068
2069
2070
2071
2072
2073cl_dp1_muxbuff4_8x c0_0 (
2074 .in0(sel0),
2075 .in1(sel1),
2076 .in2(sel2),
2077 .in3(sel3),
2078 .out0(buffout0),
2079 .out1(buffout1),
2080 .out2(buffout2),
2081 .out3(buffout3)
2082);
2083mux4s #(47) d0_0 (
2084 .sel0(buffout0),
2085 .sel1(buffout1),
2086 .sel2(buffout2),
2087 .sel3(buffout3),
2088 .in0(din0[46:0]),
2089 .in1(din1[46:0]),
2090 .in2(din2[46:0]),
2091 .in3(din3[46:0]),
2092.dout(dout[46:0])
2093);
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107endmodule
2108
2109
2110//
2111// buff macro
2112//
2113//
2114
2115
2116
2117
2118
2119module tlu_pct_dp_buff_macro__stack_48c__width_46 (
2120 din,
2121 dout);
2122 input [45:0] din;
2123 output [45:0] dout;
2124
2125
2126
2127
2128
2129
2130buff #(46) d0_0 (
2131.in(din[45:0]),
2132.out(dout[45:0])
2133);
2134
2135
2136
2137
2138
2139
2140
2141
2142endmodule
2143
2144
2145
2146
2147
2148//
2149// increment macro
2150//
2151//
2152
2153
2154
2155
2156
2157module tlu_pct_dp_increment_macro__width_32 (
2158 din,
2159 cin,
2160 dout,
2161 cout);
2162 input [31:0] din;
2163 input cin;
2164 output [31:0] dout;
2165 output cout;
2166
2167
2168
2169
2170
2171
2172incr #(32) m0_0 (
2173.cin(cin),
2174.in(din[31:0]),
2175.out(dout[31:0]),
2176.cout(cout)
2177);
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189endmodule
2190
2191
2192
2193
2194
2195//
2196// increment macro
2197//
2198//
2199
2200
2201
2202
2203
2204module tlu_pct_dp_increment_macro__width_16 (
2205 din,
2206 cin,
2207 dout,
2208 cout);
2209 input [15:0] din;
2210 input cin;
2211 output [15:0] dout;
2212 output cout;
2213
2214
2215
2216
2217
2218
2219incr #(16) m0_0 (
2220.cin(cin),
2221.in(din[15:0]),
2222.out(dout[15:0]),
2223.cout(cout)
2224);
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236endmodule
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246// any PARAMS parms go into naming of macro
2247
2248module tlu_pct_dp_msff_macro__mux_pgpe__ports_2__stack_48c__width_46 (
2249 din0,
2250 din1,
2251 sel0,
2252 clk,
2253 en,
2254 se,
2255 scan_in,
2256 siclk,
2257 soclk,
2258 pce_ov,
2259 stop,
2260 dout,
2261 scan_out);
2262wire psel0_unused;
2263wire psel1;
2264wire [45:0] muxout;
2265wire l1clk;
2266wire siclk_out;
2267wire soclk_out;
2268wire [44:0] so;
2269
2270 input [45:0] din0;
2271 input [45:0] din1;
2272 input sel0;
2273
2274
2275 input clk;
2276 input en;
2277 input se;
2278 input scan_in;
2279 input siclk;
2280 input soclk;
2281 input pce_ov;
2282 input stop;
2283
2284
2285
2286 output [45:0] dout;
2287
2288
2289 output scan_out;
2290
2291
2292
2293
2294cl_dp1_penc2_8x c1_0 (
2295 .sel0(sel0),
2296 .psel0(psel0_unused),
2297 .psel1(psel1)
2298);
2299
2300mux2e #(46) d1_0 (
2301 .sel(psel1),
2302 .in0(din0[45:0]),
2303 .in1(din1[45:0]),
2304.dout(muxout[45:0])
2305);
2306cl_dp1_l1hdr_8x c0_0 (
2307.l2clk(clk),
2308.pce(en),
2309.aclk(siclk),
2310.bclk(soclk),
2311.l1clk(l1clk),
2312 .se(se),
2313 .pce_ov(pce_ov),
2314 .stop(stop),
2315 .siclk_out(siclk_out),
2316 .soclk_out(soclk_out)
2317);
2318dff #(46) d0_0 (
2319.l1clk(l1clk),
2320.siclk(siclk_out),
2321.soclk(soclk_out),
2322.d(muxout[45:0]),
2323.si({scan_in,so[44:0]}),
2324.so({so[44:0],scan_out}),
2325.q(dout[45:0])
2326);
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347endmodule
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2358// also for pass-gate with decoder
2359
2360
2361
2362
2363
2364// any PARAMS parms go into naming of macro
2365
2366module tlu_pct_dp_mux_macro__mux_aonpe__ports_4__stack_48c__width_47 (
2367 din0,
2368 sel0,
2369 din1,
2370 sel1,
2371 din2,
2372 sel2,
2373 din3,
2374 sel3,
2375 dout);
2376wire buffout0;
2377wire buffout1;
2378wire buffout2;
2379wire buffout3;
2380
2381 input [46:0] din0;
2382 input sel0;
2383 input [46:0] din1;
2384 input sel1;
2385 input [46:0] din2;
2386 input sel2;
2387 input [46:0] din3;
2388 input sel3;
2389 output [46:0] dout;
2390
2391
2392
2393
2394
2395cl_dp1_muxbuff4_8x c0_0 (
2396 .in0(sel0),
2397 .in1(sel1),
2398 .in2(sel2),
2399 .in3(sel3),
2400 .out0(buffout0),
2401 .out1(buffout1),
2402 .out2(buffout2),
2403 .out3(buffout3)
2404);
2405mux4s #(47) d0_0 (
2406 .sel0(buffout0),
2407 .sel1(buffout1),
2408 .sel2(buffout2),
2409 .sel3(buffout3),
2410 .in0(din0[46:0]),
2411 .in1(din1[46:0]),
2412 .in2(din2[46:0]),
2413 .in3(din3[46:0]),
2414.dout(dout[46:0])
2415);
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429endmodule
2430
2431
2432//
2433// and macro for ports = 2,3,4
2434//
2435//
2436
2437
2438
2439
2440
2441module tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_16 (
2442 din0,
2443 din1,
2444 dout);
2445 input [15:0] din0;
2446 input [15:0] din1;
2447 output [15:0] dout;
2448
2449
2450
2451
2452
2453
2454and2 #(16) d0_0 (
2455.in0(din0[15:0]),
2456.in1(din1[15:0]),
2457.out(dout[15:0])
2458);
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468endmodule
2469
2470
2471
2472
2473
2474// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2475// also for pass-gate with decoder
2476
2477
2478
2479
2480
2481// any PARAMS parms go into naming of macro
2482
2483module tlu_pct_dp_mux_macro__mux_aonpe__ports_4__stack_48c__width_48 (
2484 din0,
2485 sel0,
2486 din1,
2487 sel1,
2488 din2,
2489 sel2,
2490 din3,
2491 sel3,
2492 dout);
2493wire buffout0;
2494wire buffout1;
2495wire buffout2;
2496wire buffout3;
2497
2498 input [47:0] din0;
2499 input sel0;
2500 input [47:0] din1;
2501 input sel1;
2502 input [47:0] din2;
2503 input sel2;
2504 input [47:0] din3;
2505 input sel3;
2506 output [47:0] dout;
2507
2508
2509
2510
2511
2512cl_dp1_muxbuff4_8x c0_0 (
2513 .in0(sel0),
2514 .in1(sel1),
2515 .in2(sel2),
2516 .in3(sel3),
2517 .out0(buffout0),
2518 .out1(buffout1),
2519 .out2(buffout2),
2520 .out3(buffout3)
2521);
2522mux4s #(48) d0_0 (
2523 .sel0(buffout0),
2524 .sel1(buffout1),
2525 .sel2(buffout2),
2526 .sel3(buffout3),
2527 .in0(din0[47:0]),
2528 .in1(din1[47:0]),
2529 .in2(din2[47:0]),
2530 .in3(din3[47:0]),
2531.dout(dout[47:0])
2532);
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546endmodule
2547
2548
2549//
2550// invert macro
2551//
2552//
2553
2554
2555
2556
2557
2558module tlu_pct_dp_inv_macro__stack_48c__width_5 (
2559 din,
2560 dout);
2561 input [4:0] din;
2562 output [4:0] dout;
2563
2564
2565
2566
2567
2568
2569inv #(5) d0_0 (
2570.in(din[4:0]),
2571.out(dout[4:0])
2572);
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582endmodule
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592// any PARAMS parms go into naming of macro
2593
2594module tlu_pct_dp_msff_macro__mux_aope__ports_8__stack_48c__width_48 (
2595 din0,
2596 din1,
2597 din2,
2598 din3,
2599 din4,
2600 din5,
2601 din6,
2602 din7,
2603 sel0,
2604 sel1,
2605 sel2,
2606 sel3,
2607 sel4,
2608 sel5,
2609 sel6,
2610 clk,
2611 en,
2612 se,
2613 scan_in,
2614 siclk,
2615 soclk,
2616 pce_ov,
2617 stop,
2618 dout,
2619 scan_out);
2620wire psel0;
2621wire psel1;
2622wire psel2;
2623wire psel3;
2624wire psel4;
2625wire psel5;
2626wire psel6;
2627wire psel7;
2628wire [47:0] muxout;
2629wire l1clk;
2630wire siclk_out;
2631wire soclk_out;
2632wire [46:0] so;
2633
2634 input [47:0] din0;
2635 input [47:0] din1;
2636 input [47:0] din2;
2637 input [47:0] din3;
2638 input [47:0] din4;
2639 input [47:0] din5;
2640 input [47:0] din6;
2641 input [47:0] din7;
2642 input sel0;
2643 input sel1;
2644 input sel2;
2645 input sel3;
2646 input sel4;
2647 input sel5;
2648 input sel6;
2649
2650
2651 input clk;
2652 input en;
2653 input se;
2654 input scan_in;
2655 input siclk;
2656 input soclk;
2657 input pce_ov;
2658 input stop;
2659
2660
2661
2662 output [47:0] dout;
2663
2664
2665 output scan_out;
2666
2667
2668
2669
2670cl_dp1_penc8_8x c1_0 (
2671 .test(1'b1),
2672 .sel0(sel0),
2673 .sel1(sel1),
2674 .sel2(sel2),
2675 .sel3(sel3),
2676 .sel4(sel4),
2677 .sel5(sel5),
2678 .sel6(sel6),
2679 .psel0(psel0),
2680 .psel1(psel1),
2681 .psel2(psel2),
2682 .psel3(psel3),
2683 .psel4(psel4),
2684 .psel5(psel5),
2685 .psel6(psel6),
2686 .psel7(psel7)
2687);
2688
2689mux8s #(48) d1_0 (
2690 .sel0(psel0),
2691 .sel1(psel1),
2692 .sel2(psel2),
2693 .sel3(psel3),
2694 .sel4(psel4),
2695 .sel5(psel5),
2696 .sel6(psel6),
2697 .sel7(psel7),
2698 .in0(din0[47:0]),
2699 .in1(din1[47:0]),
2700 .in2(din2[47:0]),
2701 .in3(din3[47:0]),
2702 .in4(din4[47:0]),
2703 .in5(din5[47:0]),
2704 .in6(din6[47:0]),
2705 .in7(din7[47:0]),
2706.dout(muxout[47:0])
2707);
2708cl_dp1_l1hdr_8x c0_0 (
2709.l2clk(clk),
2710.pce(en),
2711.aclk(siclk),
2712.bclk(soclk),
2713.l1clk(l1clk),
2714 .se(se),
2715 .pce_ov(pce_ov),
2716 .stop(stop),
2717 .siclk_out(siclk_out),
2718 .soclk_out(soclk_out)
2719);
2720dff #(48) d0_0 (
2721.l1clk(l1clk),
2722.siclk(siclk_out),
2723.soclk(soclk_out),
2724.d(muxout[47:0]),
2725.si({scan_in,so[46:0]}),
2726.so({so[46:0],scan_out}),
2727.q(dout[47:0])
2728);
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749endmodule
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2760// also for pass-gate with decoder
2761
2762
2763
2764
2765
2766// any PARAMS parms go into naming of macro
2767
2768module tlu_pct_dp_mux_macro__left_3__mux_aonpe__ports_4__stack_48c__width_43 (
2769 din0,
2770 sel0,
2771 din1,
2772 sel1,
2773 din2,
2774 sel2,
2775 din3,
2776 sel3,
2777 dout);
2778wire buffout0;
2779wire buffout1;
2780wire buffout2;
2781wire buffout3;
2782
2783 input [42:0] din0;
2784 input sel0;
2785 input [42:0] din1;
2786 input sel1;
2787 input [42:0] din2;
2788 input sel2;
2789 input [42:0] din3;
2790 input sel3;
2791 output [42:0] dout;
2792
2793
2794
2795
2796
2797cl_dp1_muxbuff4_8x c0_0 (
2798 .in0(sel0),
2799 .in1(sel1),
2800 .in2(sel2),
2801 .in3(sel3),
2802 .out0(buffout0),
2803 .out1(buffout1),
2804 .out2(buffout2),
2805 .out3(buffout3)
2806);
2807mux4s #(43) d0_0 (
2808 .sel0(buffout0),
2809 .sel1(buffout1),
2810 .sel2(buffout2),
2811 .sel3(buffout3),
2812 .in0(din0[42:0]),
2813 .in1(din1[42:0]),
2814 .in2(din2[42:0]),
2815 .in3(din3[42:0]),
2816.dout(dout[42:0])
2817);
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831endmodule
2832
2833
2834//
2835// buff macro
2836//
2837//
2838
2839
2840
2841
2842
2843module tlu_pct_dp_buff_macro__left_3__rep_1__stack_48c__width_27 (
2844 din,
2845 dout);
2846 input [26:0] din;
2847 output [26:0] dout;
2848
2849
2850
2851
2852
2853
2854buff #(27) d0_0 (
2855.in(din[26:0]),
2856.out(dout[26:0])
2857);
2858
2859
2860
2861
2862
2863
2864
2865
2866endmodule
2867
2868
2869
2870
2871
2872//
2873// nand macro for ports = 2,3,4
2874//
2875//
2876
2877
2878
2879
2880
2881module tlu_pct_dp_nand_macro__ports_2__width_4 (
2882 din0,
2883 din1,
2884 dout);
2885 input [3:0] din0;
2886 input [3:0] din1;
2887 output [3:0] dout;
2888
2889
2890
2891
2892
2893
2894nand2 #(4) d0_0 (
2895.in0(din0[3:0]),
2896.in1(din1[3:0]),
2897.out(dout[3:0])
2898);
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908endmodule
2909
2910
2911
2912
2913
2914//
2915// nand macro for ports = 2,3,4
2916//
2917//
2918
2919
2920
2921
2922
2923module tlu_pct_dp_nand_macro__ports_4__width_1 (
2924 din0,
2925 din1,
2926 din2,
2927 din3,
2928 dout);
2929 input [0:0] din0;
2930 input [0:0] din1;
2931 input [0:0] din2;
2932 input [0:0] din3;
2933 output [0:0] dout;
2934
2935
2936
2937
2938
2939
2940nand4 #(1) d0_0 (
2941.in0(din0[0:0]),
2942.in1(din1[0:0]),
2943.in2(din2[0:0]),
2944.in3(din3[0:0]),
2945.out(dout[0:0])
2946);
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956endmodule
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966// any PARAMS parms go into naming of macro
2967
2968module tlu_pct_dp_msff_macro__left_20__stack_48c__width_10 (
2969 din,
2970 clk,
2971 en,
2972 se,
2973 scan_in,
2974 siclk,
2975 soclk,
2976 pce_ov,
2977 stop,
2978 dout,
2979 scan_out);
2980wire l1clk;
2981wire siclk_out;
2982wire soclk_out;
2983wire [8:0] so;
2984
2985 input [9:0] din;
2986
2987
2988 input clk;
2989 input en;
2990 input se;
2991 input scan_in;
2992 input siclk;
2993 input soclk;
2994 input pce_ov;
2995 input stop;
2996
2997
2998
2999 output [9:0] dout;
3000
3001
3002 output scan_out;
3003
3004
3005
3006
3007cl_dp1_l1hdr_8x c0_0 (
3008.l2clk(clk),
3009.pce(en),
3010.aclk(siclk),
3011.bclk(soclk),
3012.l1clk(l1clk),
3013 .se(se),
3014 .pce_ov(pce_ov),
3015 .stop(stop),
3016 .siclk_out(siclk_out),
3017 .soclk_out(soclk_out)
3018);
3019dff #(10) d0_0 (
3020.l1clk(l1clk),
3021.siclk(siclk_out),
3022.soclk(soclk_out),
3023.d(din[9:0]),
3024.si({scan_in,so[8:0]}),
3025.so({so[8:0],scan_out}),
3026.q(dout[9:0])
3027);
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048endmodule
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058//
3059// invert macro
3060//
3061//
3062
3063
3064
3065
3066
3067module tlu_pct_dp_inv_macro__width_1 (
3068 din,
3069 dout);
3070 input [0:0] din;
3071 output [0:0] dout;
3072
3073
3074
3075
3076
3077
3078inv #(1) d0_0 (
3079.in(din[0:0]),
3080.out(dout[0:0])
3081);
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091endmodule
3092
3093
3094
3095
3096
3097//
3098// nand macro for ports = 2,3,4
3099//
3100//
3101
3102
3103
3104
3105
3106module tlu_pct_dp_nand_macro__ports_2__width_1 (
3107 din0,
3108 din1,
3109 dout);
3110 input [0:0] din0;
3111 input [0:0] din1;
3112 output [0:0] dout;
3113
3114
3115
3116
3117
3118
3119nand2 #(1) d0_0 (
3120.in0(din0[0:0]),
3121.in1(din1[0:0]),
3122.out(dout[0:0])
3123);
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133endmodule
3134
3135
3136
3137
3138
3139//
3140// buff macro
3141//
3142//
3143
3144
3145
3146
3147
3148module tlu_pct_dp_buff_macro__stack_48c__width_4 (
3149 din,
3150 dout);
3151 input [3:0] din;
3152 output [3:0] dout;
3153
3154
3155
3156
3157
3158
3159buff #(4) d0_0 (
3160.in(din[3:0]),
3161.out(dout[3:0])
3162);
3163
3164
3165
3166
3167
3168
3169
3170
3171endmodule
3172
3173
3174
3175
3176
3177//
3178// increment macro
3179//
3180//
3181
3182
3183
3184
3185
3186module tlu_pct_dp_increment_macro__width_64 (
3187 din,
3188 cin,
3189 dout,
3190 cout);
3191 input [63:0] din;
3192 input cin;
3193 output [63:0] dout;
3194 output cout;
3195
3196
3197
3198
3199
3200
3201incr #(64) m0_0 (
3202.cin(cin),
3203.in(din[63:0]),
3204.out(dout[63:0]),
3205.cout(cout)
3206);
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218endmodule
3219
3220
3221
3222
3223
3224//
3225// or macro for ports = 2,3
3226//
3227//
3228
3229
3230
3231
3232
3233module tlu_pct_dp_or_macro__stack_48c__width_1 (
3234 din0,
3235 din1,
3236 dout);
3237 input [0:0] din0;
3238 input [0:0] din1;
3239 output [0:0] dout;
3240
3241
3242
3243
3244
3245
3246or2 #(1) d0_0 (
3247.in0(din0[0:0]),
3248.in1(din1[0:0]),
3249.out(dout[0:0])
3250);
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260endmodule
3261
3262
3263
3264
3265
3266//
3267// invert macro
3268//
3269//
3270
3271
3272
3273
3274
3275module tlu_pct_dp_inv_macro__width_2 (
3276 din,
3277 dout);
3278 input [1:0] din;
3279 output [1:0] dout;
3280
3281
3282
3283
3284
3285
3286inv #(2) d0_0 (
3287.in(din[1:0]),
3288.out(dout[1:0])
3289);
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299endmodule
3300
3301
3302
3303
3304
3305//
3306// nand macro for ports = 2,3,4
3307//
3308//
3309
3310
3311
3312
3313
3314module tlu_pct_dp_nand_macro__ports_3__width_3 (
3315 din0,
3316 din1,
3317 din2,
3318 dout);
3319 input [2:0] din0;
3320 input [2:0] din1;
3321 input [2:0] din2;
3322 output [2:0] dout;
3323
3324
3325
3326
3327
3328
3329nand3 #(3) d0_0 (
3330.in0(din0[2:0]),
3331.in1(din1[2:0]),
3332.in2(din2[2:0]),
3333.out(dout[2:0])
3334);
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344endmodule
3345
3346
3347
3348
3349
3350//
3351// nand macro for ports = 2,3,4
3352//
3353//
3354
3355
3356
3357
3358
3359module tlu_pct_dp_nand_macro__ports_4__width_3 (
3360 din0,
3361 din1,
3362 din2,
3363 din3,
3364 dout);
3365 input [2:0] din0;
3366 input [2:0] din1;
3367 input [2:0] din2;
3368 input [2:0] din3;
3369 output [2:0] dout;
3370
3371
3372
3373
3374
3375
3376nand4 #(3) d0_0 (
3377.in0(din0[2:0]),
3378.in1(din1[2:0]),
3379.in2(din2[2:0]),
3380.in3(din3[2:0]),
3381.out(dout[2:0])
3382);
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392endmodule
3393
3394
3395
3396
3397
3398//
3399// buff macro
3400//
3401//
3402
3403
3404
3405
3406
3407module tlu_pct_dp_buff_macro__dbuff_48x__width_1 (
3408 din,
3409 dout);
3410 input [0:0] din;
3411 output [0:0] dout;
3412
3413
3414
3415
3416
3417
3418buff #(1) d0_0 (
3419.in(din[0:0]),
3420.out(dout[0:0])
3421);
3422
3423
3424
3425
3426
3427
3428
3429
3430endmodule
3431
3432
3433
3434
3435
3436// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3437// also for pass-gate with decoder
3438
3439
3440
3441
3442
3443// any PARAMS parms go into naming of macro
3444
3445module tlu_pct_dp_mux_macro__mux_pgpe__ports_4__stack_48c__width_47 (
3446 din0,
3447 din1,
3448 din2,
3449 din3,
3450 sel0,
3451 sel1,
3452 sel2,
3453 muxtst,
3454 test,
3455 dout);
3456wire psel0;
3457wire psel1;
3458wire psel2;
3459wire psel3;
3460
3461 input [46:0] din0;
3462 input [46:0] din1;
3463 input [46:0] din2;
3464 input [46:0] din3;
3465 input sel0;
3466 input sel1;
3467 input sel2;
3468 input muxtst;
3469 input test;
3470 output [46:0] dout;
3471
3472
3473
3474
3475
3476cl_dp1_penc4_8x c0_0 (
3477 .sel0(sel0),
3478 .sel1(sel1),
3479 .sel2(sel2),
3480 .psel0(psel0),
3481 .psel1(psel1),
3482 .psel2(psel2),
3483 .psel3(psel3),
3484 .test(test)
3485);
3486
3487mux4 #(47) d0_0 (
3488 .sel0(psel0),
3489 .sel1(psel1),
3490 .sel2(psel2),
3491 .sel3(psel3),
3492 .in0(din0[46:0]),
3493 .in1(din1[46:0]),
3494 .in2(din2[46:0]),
3495 .in3(din3[46:0]),
3496.dout(dout[46:0]),
3497 .muxtst(muxtst)
3498);
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512endmodule
3513
3514
3515//
3516// buff macro
3517//
3518//
3519
3520
3521
3522
3523
3524module tlu_pct_dp_buff_macro__rep_1__stack_48c__width_46 (
3525 din,
3526 dout);
3527 input [45:0] din;
3528 output [45:0] dout;
3529
3530
3531
3532
3533
3534
3535buff #(46) d0_0 (
3536.in(din[45:0]),
3537.out(dout[45:0])
3538);
3539
3540
3541
3542
3543
3544
3545
3546
3547endmodule
3548
3549
3550
3551
3552
3553//
3554// and macro for ports = 2,3,4
3555//
3556//
3557
3558
3559
3560
3561
3562module tlu_pct_dp_and_macro__left_30__ports_2__stack_48c__width_17 (
3563 din0,
3564 din1,
3565 dout);
3566 input [16:0] din0;
3567 input [16:0] din1;
3568 output [16:0] dout;
3569
3570
3571
3572
3573
3574
3575and2 #(17) d0_0 (
3576.in0(din0[16:0]),
3577.in1(din1[16:0]),
3578.out(dout[16:0])
3579);
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589endmodule
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599// any PARAMS parms go into naming of macro
3600
3601module tlu_pct_dp_msff_macro__stack_48c__width_47 (
3602 din,
3603 clk,
3604 en,
3605 se,
3606 scan_in,
3607 siclk,
3608 soclk,
3609 pce_ov,
3610 stop,
3611 dout,
3612 scan_out);
3613wire l1clk;
3614wire siclk_out;
3615wire soclk_out;
3616wire [45:0] so;
3617
3618 input [46:0] din;
3619
3620
3621 input clk;
3622 input en;
3623 input se;
3624 input scan_in;
3625 input siclk;
3626 input soclk;
3627 input pce_ov;
3628 input stop;
3629
3630
3631
3632 output [46:0] dout;
3633
3634
3635 output scan_out;
3636
3637
3638
3639
3640cl_dp1_l1hdr_8x c0_0 (
3641.l2clk(clk),
3642.pce(en),
3643.aclk(siclk),
3644.bclk(soclk),
3645.l1clk(l1clk),
3646 .se(se),
3647 .pce_ov(pce_ov),
3648 .stop(stop),
3649 .siclk_out(siclk_out),
3650 .soclk_out(soclk_out)
3651);
3652dff #(47) d0_0 (
3653.l1clk(l1clk),
3654.siclk(siclk_out),
3655.soclk(soclk_out),
3656.d(din[46:0]),
3657.si({scan_in,so[45:0]}),
3658.so({so[45:0],scan_out}),
3659.q(dout[46:0])
3660);
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681endmodule
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691//
3692// buff macro
3693//
3694//
3695
3696
3697
3698
3699
3700module tlu_pct_dp_buff_macro__rep_1__stack_48c__width_17 (
3701 din,
3702 dout);
3703 input [16:0] din;
3704 output [16:0] dout;
3705
3706
3707
3708
3709
3710
3711buff #(17) d0_0 (
3712.in(din[16:0]),
3713.out(dout[16:0])
3714);
3715
3716
3717
3718
3719
3720
3721
3722
3723endmodule
3724
3725
3726
3727
3728
3729//
3730// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
3731//
3732//
3733
3734
3735
3736
3737
3738module tlu_pct_dp_cmp_macro__width_16 (
3739 din0,
3740 din1,
3741 dout);
3742 input [15:0] din0;
3743 input [15:0] din1;
3744 output dout;
3745
3746
3747
3748
3749
3750
3751cmp #(16) m0_0 (
3752.in0(din0[15:0]),
3753.in1(din1[15:0]),
3754.out(dout)
3755);
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766endmodule
3767
3768
3769
3770
3771
3772//
3773// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
3774//
3775//
3776
3777
3778
3779
3780
3781module tlu_pct_dp_cmp_macro__width_32 (
3782 din0,
3783 din1,
3784 dout);
3785 input [31:0] din0;
3786 input [31:0] din1;
3787 output dout;
3788
3789
3790
3791
3792
3793
3794cmp #(32) m0_0 (
3795.in0(din0[31:0]),
3796.in1(din1[31:0]),
3797.out(dout)
3798);
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809endmodule
3810
3811
3812
3813
3814
3815// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3816// also for pass-gate with decoder
3817
3818
3819
3820
3821
3822// any PARAMS parms go into naming of macro
3823
3824module tlu_pct_dp_mux_macro__mux_aonpe__ports_5__stack_48c__width_47 (
3825 din0,
3826 sel0,
3827 din1,
3828 sel1,
3829 din2,
3830 sel2,
3831 din3,
3832 sel3,
3833 din4,
3834 sel4,
3835 dout);
3836wire buffout0;
3837wire buffout1;
3838wire buffout2;
3839wire buffout3;
3840wire buffout4;
3841
3842 input [46:0] din0;
3843 input sel0;
3844 input [46:0] din1;
3845 input sel1;
3846 input [46:0] din2;
3847 input sel2;
3848 input [46:0] din3;
3849 input sel3;
3850 input [46:0] din4;
3851 input sel4;
3852 output [46:0] dout;
3853
3854
3855
3856
3857
3858cl_dp1_muxbuff5_8x c0_0 (
3859 .in0(sel0),
3860 .in1(sel1),
3861 .in2(sel2),
3862 .in3(sel3),
3863 .in4(sel4),
3864 .out0(buffout0),
3865 .out1(buffout1),
3866 .out2(buffout2),
3867 .out3(buffout3),
3868 .out4(buffout4)
3869);
3870mux5s #(47) d0_0 (
3871 .sel0(buffout0),
3872 .sel1(buffout1),
3873 .sel2(buffout2),
3874 .sel3(buffout3),
3875 .sel4(buffout4),
3876 .in0(din0[46:0]),
3877 .in1(din1[46:0]),
3878 .in2(din2[46:0]),
3879 .in3(din3[46:0]),
3880 .in4(din4[46:0]),
3881.dout(dout[46:0])
3882);
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896endmodule
3897
3898
3899//
3900// nand macro for ports = 2,3,4
3901//
3902//
3903
3904
3905
3906
3907
3908module tlu_pct_dp_nand_macro__ports_2__stack_48c__width_47 (
3909 din0,
3910 din1,
3911 dout);
3912 input [46:0] din0;
3913 input [46:0] din1;
3914 output [46:0] dout;
3915
3916
3917
3918
3919
3920
3921nand2 #(47) d0_0 (
3922.in0(din0[46:0]),
3923.in1(din1[46:0]),
3924.out(dout[46:0])
3925);
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935endmodule
3936
3937
3938
3939