Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / ifu / rtl / ifu_ftu_itd_dp.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ifu_ftu_itd_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 ifu_ftu_itd_dp (
36 tcu_scan_en,
37 tcu_muxtest,
38 tcu_dectest,
39 l2clk,
40 scan_in,
41 tcu_pce_ov,
42 spc_aclk,
43 spc_bclk,
44 default_pid,
45 default_r,
46 default_context_0,
47 default_context_1,
48 write_context_0,
49 write_context_1,
50 itc_sel_trap_pc_0,
51 itc_sel_trap_pc_1,
52 itc_sel_demap_tag_d,
53 itc_sel_demap_tag_c0,
54 itc_sel_demap_tag_c1,
55 itc_sel_write_tag,
56 itc_sel_default,
57 itc_sel_write_tag_indexed,
58 itc_tag_error_inj,
59 itc_data_error_inj,
60 ifu_agd_pc_bf,
61 tlu_trap_pc_0,
62 tlu_trap_pc_1,
63 mmu_index,
64 ftp_thr0_pid_data,
65 ftp_thr1_pid_data,
66 ftp_thr2_pid_data,
67 ftp_thr3_pid_data,
68 ftp_thr4_pid_data,
69 ftp_thr5_pid_data,
70 ftp_thr6_pid_data,
71 ftp_thr7_pid_data,
72 asi_addr_bf,
73 mbi_addr,
74 mbi_wdata,
75 mbi_run,
76 mbi_cambist_run,
77 mbi_cambist_shift,
78 mbi_init_to_zero,
79 itc_sel_mbist,
80 itc_write_next,
81 scan_out,
82 itd_tag,
83 itd_data,
84 itd_index_valid_in,
85 itd_rw_index,
86 itd_prty_256m,
87 itd_prty_4m,
88 itd_prty_64k,
89 itd_prty_8k,
90 itd_prty_ctxt0,
91 itd_prty_ctxt1);
92wire stop;
93wire en;
94wire test;
95wire se;
96wire pce_ov;
97wire siclk;
98wire soclk;
99wire [54:0] tlu_tte;
100wire tte0_lat_scanin;
101wire tte0_lat_scanout;
102wire init_or_shift;
103wire [54:0] tte0;
104wire init_or_shift_bf;
105wire tte1_lat_scanin;
106wire tte1_lat_scanout;
107wire [54:0] tte1;
108wire not_init_and_run;
109wire not_init_nor_run;
110wire [54:0] tte2;
111wire not_init_and_run_bf;
112wire not_init_nor_run_bf;
113wire [2:0] partition_id1_to_buf;
114wire [2:0] partition_id1;
115wire [68:0] tag_to_demap_d;
116wire [68:0] tag_to_demap_c0;
117wire [12:0] write_context_0_ff;
118wire [68:0] tag_to_demap_c1;
119wire [12:0] write_context_1_ff;
120wire prty_tte0_ctxt_;
121wire sel_write_tag_c0;
122wire sel_write_tag_c1;
123wire [13:0] context_to_write_in;
124wire [68:0] tag_to_write;
125wire [13:0] context_to_write;
126wire [2:0] partition_id2;
127wire context_to_write_prty;
128wire mask_va_27_22_;
129wire mask_va_21_16_;
130wire mask_va_15_13_;
131wire mask_context_;
132wire [27:13] masked_va;
133wire masked_ctxt_parity;
134wire [68:0] access_tag_f;
135wire wrdata_sel;
136wire [51:13] tag_for_parity;
137wire mux_masked_ctxt_parity;
138wire tag_parity_unmasked;
139wire tag_parity_masked;
140wire tag_parity;
141wire [7:0] mbist_wdata_bf;
142wire mbist_run;
143wire tag_parity_out;
144wire prty_256m;
145wire prty_8k_lower;
146wire prty_va_27_22;
147wire prty_4m;
148wire prty_va_27_16;
149wire prty_64k;
150wire prty_8k;
151wire prty_ctxt0;
152wire prty_ctxt1;
153wire [68:0] access_tag_in;
154wire access_tag_reg_scanin;
155wire access_tag_reg_scanout;
156wire access_tag_reg0_scanin;
157wire access_tag_reg0_scanout;
158wire write_context_0_reg_scanin;
159wire write_context_0_reg_scanout;
160wire write_context_1_reg_scanin;
161wire write_context_1_reg_scanout;
162wire context_to_write_reg_scanin;
163wire context_to_write_reg_scanout;
164wire tte2_lat_scanin;
165wire tte2_lat_scanout;
166wire [52:0] tte2_out;
167wire [3:0] atm_unused;
168wire [6:0] tte2_unused;
169wire tte1_unused;
170wire [68:0] mbist_wdata;
171wire [7:0] mbist_wdata_dup;
172wire [37:0] data_mbist_wdata;
173wire [68:0] mbist_camdata;
174wire [68:0] mbist_camdata_shift;
175wire [68:0] bist_wdata;
176wire [68:0] itd_tag_to_buf;
177wire [5:0] mbist_index;
178wire [5:0] itd_rw_index_to_buf;
179wire mbist_in_reg_scanin;
180wire mbist_in_reg_scanout;
181wire [5:0] mbist_index_to_buf;
182wire [7:0] mbist_wdata_to_buf;
183wire mbist_run_to_buf;
184wire cambist_run_bf;
185wire mbist_in_dup_reg_scanin;
186wire mbist_in_dup_reg_scanout;
187wire tcu_muxtest_rep0;
188wire [37:0] data_to_write;
189wire [36:0] itd_data_to_buf;
190wire data_parity;
191wire data_parity_0;
192wire data_parity_1;
193wire init_or_shift_nor;
194wire [1:0] itd_demap_control1;
195wire demap_control1_0_;
196
197
198
199
200input tcu_scan_en ;
201input tcu_muxtest;
202input tcu_dectest;
203input l2clk;
204input scan_in;
205input tcu_pce_ov;
206input spc_aclk;
207input spc_bclk;
208
209input [2:0] default_pid;
210input default_r;
211input [12:0] default_context_0;
212input [12:0] default_context_1;
213input [13:0] write_context_0;
214input [13:0] write_context_1;
215
216input itc_sel_trap_pc_0;
217input itc_sel_trap_pc_1;
218input itc_sel_demap_tag_d;
219input itc_sel_demap_tag_c0;
220input itc_sel_demap_tag_c1;
221input itc_sel_write_tag;
222input itc_sel_default;
223input itc_sel_write_tag_indexed;
224input itc_tag_error_inj;
225input itc_data_error_inj;
226
227input [47:13] ifu_agd_pc_bf;
228
229input [47:0] tlu_trap_pc_0;
230input [47:0] tlu_trap_pc_1;
231input [6:0] mmu_index; // valid and index from data_access
232
233input [2:0] ftp_thr0_pid_data;
234input [2:0] ftp_thr1_pid_data;
235input [2:0] ftp_thr2_pid_data;
236input [2:0] ftp_thr3_pid_data;
237input [2:0] ftp_thr4_pid_data;
238input [2:0] ftp_thr5_pid_data;
239input [2:0] ftp_thr6_pid_data;
240input [2:0] ftp_thr7_pid_data;
241
242input [8:3] asi_addr_bf;
243input [5:0] mbi_addr;
244input [7:0] mbi_wdata;
245input mbi_run;
246input mbi_cambist_run;
247input mbi_cambist_shift;
248input mbi_init_to_zero;
249
250input itc_sel_mbist;
251input itc_write_next;
252
253output scan_out;
254
255output [68:0] itd_tag;
256output [37:0] itd_data;
257// output [02:00] itd_demap_control1;
258output itd_index_valid_in;
259output [5:0] itd_rw_index;
260output itd_prty_256m;
261output itd_prty_4m;
262output itd_prty_64k;
263output itd_prty_8k;
264output itd_prty_ctxt0;
265output itd_prty_ctxt1;
266
267
268
269// assign pce_ov = tcu_pce_ov;
270assign stop = 1'b0;
271// assign siclk = spc_aclk;
272// assign soclk = spc_bclk;
273assign en = 1'b1;
274// assign clk = l2clk;
275assign test = tcu_dectest;
276
277ifu_ftu_itd_dp_buff_macro__dbuff_32x__stack_none__width_4 test_rep0 (
278 .din ({tcu_scan_en,tcu_pce_ov,spc_aclk,spc_bclk}),
279 .dout({se,pce_ov,siclk,soclk})
280);
281
282
283
284///////////////////////////////////////////////////////////////////////////////
285// Flop the TTE from TLU
286
287// First cycle of transfer
288// (part of tag, data, controls)
289// 45 Demap valid
290// 44:43 Demap / context type
291// 42 PS_GT_64K
292// 41:39 VA[15:13]
293// 38 PS_GT_8K
294// 37:35 Thread ID
295// 34 Real bit
296// 33:22 PA[39:28]
297// 21:16 PA[27:22]
298// 15:10 PA[21:16]
299// 09:07 PA[15:13]
300// 06 Valid bit
301// 05 NFO bit
302// 04 IE bit
303// 03 CP bit
304// 02 X bit
305// 01 P bit
306// 00 W bit
307// Second cycle of transfer
308// (rest of tag)
309// 47:28 VA[47:28]
310// 27:22 VA[27:22]
311// 21 PS_EQ_256M
312// 20 Valid
313// 19 Lock
314// 18:13 VA[21:16]
315// 12:00 Context
316
317ifu_ftu_itd_dp_mux_macro__mux_aonpe__ports_2__stack_60c__width_55 tte_mux (
318 .din0 ({mmu_index [6:0],
319 tlu_trap_pc_0 [47:0]}),
320 .din1 ({mmu_index [6:0],
321 tlu_trap_pc_1 [47:0]}),
322 .sel0 (itc_sel_trap_pc_0 ),
323 .sel1 (itc_sel_trap_pc_1 ),
324 .dout (tlu_tte [54:0] )
325
326);
327
328ifu_ftu_itd_dp_msff_macro__stack_60c__width_56 tte0_lat (
329 .scan_in(tte0_lat_scanin),
330 .scan_out(tte0_lat_scanout),
331 .clk ( l2clk ),
332 .din ({tlu_tte [54:0] ,init_or_shift }),
333 .dout ({tte0 [54:0] ,init_or_shift_bf}),
334 .en(en),
335 .se(se),
336 .siclk(siclk),
337 .soclk(soclk),
338 .pce_ov(pce_ov),
339 .stop(stop)
340);
341
342ifu_ftu_itd_dp_msff_macro__stack_60c__width_59 tte1_lat (
343 .scan_in(tte1_lat_scanin),
344 .scan_out(tte1_lat_scanout),
345 .clk ( l2clk ),
346 .din ({tte0[54:0], tte1[37:36],not_init_and_run , not_init_nor_run} ),
347 .dout ({tte1[54:0], tte2[37:36],not_init_and_run_bf , not_init_nor_run_bf } ),
348 .en(en),
349 .se(se),
350 .siclk(siclk),
351 .soclk(soclk),
352 .pce_ov(pce_ov),
353 .stop(stop)
354);
355
356
357
358
359
360///////////////////////////TTE tag///////////////////////////////////////////////
361
362// First must capture partition ID for both cycles
363ifu_ftu_itd_dp_mux_macro__mux_aodec__ports_8__stack_4r__width_3 mx_pid1 (
364 .din0 (ftp_thr0_pid_data[2:0]),
365 .din1 (ftp_thr1_pid_data[2:0]),
366 .din2 (ftp_thr2_pid_data[2:0]),
367 .din3 (ftp_thr3_pid_data[2:0]),
368 .din4 (ftp_thr4_pid_data[2:0]),
369 .din5 (ftp_thr5_pid_data[2:0]),
370 .din6 (ftp_thr6_pid_data[2:0]),
371 .din7 (ftp_thr7_pid_data[2:0]),
372 .sel (tte1[37:35]),
373 .dout (partition_id1_to_buf[2:0])
374);
375
376ifu_ftu_itd_dp_buff_macro__stack_4c__width_3 mx_pid1_buf (
377 .din(partition_id1_to_buf[2:0]),
378 .dout(partition_id1[2:0]));
379
380// Now build tag for the two cycles
381// Demap with specified context
382assign tag_to_demap_d[68:0] =
383 {tte0 [12:0], // Context
384 partition_id1 [2:0], // PID
385 tte1 [34 ], // R
386 tte0 [47:28], // VA[47:28]
387 tte0 [27:22], // VA[27:22]
388 tte0 [21 ], // 27_22_V
389 tte0 [20 ], // V
390 tte0 [18:13], // VA[21:16]
391 tte1 [42 ], // 21_16_V
392 tte1 [41:39], // VA[15:13]
393 tte1 [38 ], // 15_13_V
394 tte0 [12:0]}; // Context[12:00]
395
396// Demap with context 0
397assign tag_to_demap_c0[68:0] =
398 {write_context_0_ff [12:0], // Context[12:00]
399 partition_id1 [2:0], // PID
400 tte1 [34 ], // R
401 tte0 [47:28], // VA[47:28]
402 tte0 [27:22], // VA[27:22]
403 tte0 [21 ], // 27_22_V
404 tte0 [20 ], // V
405 tte0 [18:13], // VA[21:16]
406 tte1 [42 ], // 21_16_V
407 tte1 [41:39], // VA[15:13]
408 tte1 [38 ], // 15_13_V
409 write_context_0_ff [12:0]}; // Context[12:00]
410
411// Demap with context 1
412assign tag_to_demap_c1[68:0] =
413 {write_context_1_ff [12:0], // Context[12:00]
414 partition_id1 [2:0], // PID
415 tte1 [34 ], // R
416 tte0 [47:28], // VA[47:28]
417 tte0 [27:22], // VA[27:22]
418 tte0 [21 ], // 27_22_V
419 tte0 [20 ], // V
420 tte0 [18:13], // VA[21:16]
421 tte1 [42 ], // 21_16_V
422 tte1 [41:39], // VA[15:13]
423 tte1 [38 ], // 15_13_V
424 write_context_1_ff [12:0]}; // Context[12:00]
425
426// Mux context for write tag
427ifu_ftu_itd_dp_mux_macro__mux_aope__ports_3__stack_14r__width_14 context_to_write_mux (
428 .din0 (write_context_0 [13:0] ),
429 .din1 (write_context_1 [13:0] ),
430 .din2 ({prty_tte0_ctxt_, tte0 [12:0]}),
431 .sel0 (sel_write_tag_c0 ),
432 .sel1 (sel_write_tag_c1 ),
433 .dout (context_to_write_in [13:0] )
434);
435
436// buff_macro context_to_write_buf (width=14, stack=14r) (
437// .din(context_to_write_to_buf[13:0]),
438// .dout(context_to_write[13:0]));
439
440// Write with muxed context
441assign tag_to_write[68:0] =
442 {context_to_write[12:0], // Context 68:56
443 partition_id2 [2:0], // PID 55:53
444 tte2 [34 ], // R 52
445 tte1 [47:28], // VA[47:28] 51:32
446 tte1 [27:22], // VA[27:22] 31:26
447 tte1 [21 ], // 27_22_V 25
448 tte1 [20 ], // V 24
449 tte1 [18:13], // VA[21:16] 23:18
450 tte2 [42 ], // 21_16_V 17
451 tte2 [41:39], // VA[15:13] 16:14
452 tte2 [38 ], // 15_13_V 13
453 context_to_write[12:0] // Context[12:00] 12:00
454 };
455
456assign context_to_write_prty = context_to_write[13] ;
457
458///////////////////////////////////////////////
459// Parity generation for tte_tag
460///////////////////////////////////////////////
461
462// Mask the appropriate address/context bits based on page size and RA or VA trans type.
463
464ifu_ftu_itd_dp_inv_macro__width_3 pg_mask_va (
465 .din ({tag_to_write[25],tag_to_write[17],tag_to_write[13]}),
466 .dout ({mask_va_27_22_, mask_va_21_16_, mask_va_15_13_})
467);
468ifu_ftu_itd_dp_inv_macro__width_1 pg_mask_ctxt (
469 .din (tag_to_write[52]),
470 .dout (mask_context_)
471);
472
473ifu_ftu_itd_dp_and_macro__ports_2__stack_16l__width_16 mask_tag (
474 .din0 ({tag_to_write[31:26],
475 tag_to_write[23:18],
476 tag_to_write[16:14],
477 context_to_write_prty}),
478 .din1 ({{6{mask_va_27_22_}},
479 {6{mask_va_21_16_}},
480 {3{mask_va_15_13_}},
481 mask_context_}),
482 .dout ({masked_va[27:22],
483 masked_va[21:16],
484 masked_va[15:13],
485 masked_ctxt_parity})
486);
487
488ifu_ftu_itd_dp_mux_macro__left_2__mux_pgpe__ports_2__stack_60c__width_40 parity_mux (
489 .din0 ({ tag_to_write[55:53],
490 tag_to_write[52],
491 tag_to_write[51:32],
492 masked_va [27:22],
493 masked_va [21:16],
494 masked_va [15:13],
495 masked_ctxt_parity}),
496 .din1 ({ access_tag_f[55:53],
497 access_tag_f[52],
498 access_tag_f[51:26],
499 access_tag_f[23:18],
500 access_tag_f[16:14],
501 1'b0}),
502 .sel0 (wrdata_sel ),
503 .dout ({ tag_for_parity[51:13], mux_masked_ctxt_parity})
504);
505
506ifu_ftu_itd_dp_prty_macro__width_32 tag_pgen0 (
507 .din ({itc_tag_error_inj,1'b0,tag_for_parity[51:28],6'b0}),
508 .dout (tag_parity_unmasked)
509);
510ifu_ftu_itd_dp_prty_macro__width_16 tag_pgen1 (
511 .din ({tag_for_parity[27:13],mux_masked_ctxt_parity}),
512 .dout (tag_parity_masked)
513);
514// inv_macro inv_tag_par (width=2) (
515// .din ({tag_parity_unmasked ,tag_parity_masked}),
516// .dout ({tag_parity_unmasked_,tag_parity_masked_}),
517// );
518ifu_ftu_itd_dp_xor_macro__ports_2__width_1 pgen_tag (
519 .din0 (tag_parity_unmasked),
520 .din1 (tag_parity_masked),
521 .dout (tag_parity)
522);
523// inv_macro write_inv (width=1) (
524// .din (itc_write_next ),
525// .dout (write_next_))
526// ;
527ifu_ftu_itd_dp_mux_macro__mux_pgpe__ports_2__stack_2r__width_1 tag_pmux (
528 .din0 (mbist_wdata_bf[5]),
529 .din1 (tag_parity),
530 .sel0 (mbist_run),
531 .dout (tag_parity_out)
532);
533// buff_macro tag_pbuf (width=1) (
534// .din (tag_parity_out),
535// .dout (tld_data[37])
536// );
537
538// Additional logic needed to complete parity detection.
539// tag_parity_unmasked is valid for all page sizes (it's complete for 256m)
540// tag_parity_masked represents the addtional parity for 8k pages
541
542
543assign prty_256m = tag_parity_unmasked ;
544assign prty_8k_lower = tag_parity_masked ;
545
546ifu_ftu_itd_dp_prty_macro__width_8 pgen_va_27_22 (
547 .din ({access_tag_f[31:26],2'b00}),
548 .dout (prty_va_27_22)
549);
550ifu_ftu_itd_dp_xor_macro__ports_2__width_1 pgen_4m (
551 .din0 (prty_256m),
552 .din1 (prty_va_27_22),
553 .dout (prty_4m)
554);
555
556ifu_ftu_itd_dp_prty_macro__width_16 pgen_va_27_16 (
557 .din ({access_tag_f[31:26],4'b0000,access_tag_f[23:18]}),
558 .dout (prty_va_27_16)
559);
560ifu_ftu_itd_dp_xor_macro__ports_2__width_1 pgen_64k (
561 .din0 (prty_256m),
562 .din1 (prty_va_27_16),
563 .dout (prty_64k)
564);
565
566ifu_ftu_itd_dp_xor_macro__ports_2__width_1 pgen_8k (
567 .din0 (prty_256m),
568 .din1 (prty_8k_lower),
569 .dout (prty_8k)
570);
571
572 ifu_ftu_itd_dp_prty_macro__width_16 pgen_ctxt0 (
573 .din ({access_tag_f[12:0],3'b000}),
574 .dout (prty_ctxt0)
575 );
576 ifu_ftu_itd_dp_prty_macro__width_16 pgen_ctxt1 (
577 .din ({3'b000,access_tag_f[68:56]}),
578 .dout (prty_ctxt1)
579 );
580
581ifu_ftu_itd_dp_buff_macro__width_6 prty_buf (
582 .din ({ prty_256m, prty_4m, prty_64k, prty_8k, prty_ctxt0, prty_ctxt1}),
583 .dout ({itd_prty_256m,itd_prty_4m,itd_prty_64k,itd_prty_8k,itd_prty_ctxt0,itd_prty_ctxt1})
584);
585
586/////////////////////////////////////////////////////////////////////////////////////////////////////////////
587
588
589 ifu_ftu_itd_dp_prty_macro__width_16 pgen_tte0_ctxt (
590 .din ({1'b0,tte0[12:0],2'b00}),
591 .dout (prty_tte0_ctxt_)
592 );
593
594
595assign access_tag_in[68:0] = {itd_tag[68:52],ifu_agd_pc_bf[47:22],itd_tag[25:24],
596 ifu_agd_pc_bf[21:16],itd_tag[17],ifu_agd_pc_bf[15:13],itd_tag[13:0]};
597
598ifu_ftu_itd_dp_msff_macro__stack_60c__width_56 access_tag_reg (
599 .scan_in(access_tag_reg_scanin),
600 .scan_out(access_tag_reg_scanout),
601 .clk ( l2clk ),
602 .en ( 1'b1 ),
603 .din ( access_tag_in[55:0]),
604 .dout( access_tag_f[55:0] ),
605 .se(se),
606 .siclk(siclk),
607 .soclk(soclk),
608 .pce_ov(pce_ov),
609 .stop(stop));
610
611ifu_ftu_itd_dp_msff_macro__stack_14c__width_13 access_tag_reg0 (
612 .scan_in(access_tag_reg0_scanin),
613 .scan_out(access_tag_reg0_scanout),
614 .clk ( l2clk ),
615 .en ( 1'b1 ),
616 .din ( access_tag_in[68:56]),
617 .dout( access_tag_f[68:56] ),
618 .se(se),
619 .siclk(siclk),
620 .soclk(soclk),
621 .pce_ov(pce_ov),
622 .stop(stop));
623
624ifu_ftu_itd_dp_msff_macro__stack_14c__width_13 write_context_0_reg (
625 .scan_in(write_context_0_reg_scanin),
626 .scan_out(write_context_0_reg_scanout),
627 .clk ( l2clk ),
628 .en ( 1'b1 ),
629 .din ( write_context_0[12:0]),
630 .dout( write_context_0_ff[12:0] ),
631 .se(se),
632 .siclk(siclk),
633 .soclk(soclk),
634 .pce_ov(pce_ov),
635 .stop(stop));
636
637ifu_ftu_itd_dp_msff_macro__stack_14c__width_14 write_context_1_reg (
638 .scan_in(write_context_1_reg_scanin),
639 .scan_out(write_context_1_reg_scanout),
640 .clk ( l2clk ),
641 .en ( 1'b1 ),
642 .din ( {itc_write_next,write_context_1[12:0]}),
643 .dout( {wrdata_sel,write_context_1_ff[12:0] } ),
644 .se(se),
645 .siclk(siclk),
646 .soclk(soclk),
647 .pce_ov(pce_ov),
648 .stop(stop));
649
650ifu_ftu_itd_dp_msff_macro__stack_14c__width_14 context_to_write_reg (
651 .scan_in(context_to_write_reg_scanin),
652 .scan_out(context_to_write_reg_scanout),
653 .clk ( l2clk ),
654 .en ( 1'b1 ),
655 .din ( context_to_write_in[13:0]),
656 .dout( context_to_write[13:0] ),
657 .se(se),
658 .siclk(siclk),
659 .soclk(soclk),
660 .pce_ov(pce_ov),
661 .stop(stop));
662
663// msff_macro tte2_lat (width=52, stack=70c, mux=aope, ports=4) (
664// .scan_in(tte2_lat_scanin),
665// .scan_out(tte2_lat_scanout),
666// .din0 ({51'b0,1'b1}),
667// .din1 ({tte2_lat_out[50:0],1'b0}),
668// .din2 ({tte1[54:47],partition_id1[2:0],tte1[42:38],1'b1,1'b0,tte1[34:7],tte1[5:0]}),
669// .din3 ({tld_tag[55:52],12'b0,1'b0,1'b1,7'b0,tgd_tag_c1[12:00],tgd_tag_c0[12:0],1'b0}),
670// .sel0 (mbi_init_to_zero),
671// .sel1 (mbi_cambist_shift),
672// .sel2 (tlc_write_next),
673// .dout (tte2_lat_out[51:0]),
674// .en (tlc_tte2_clken)
675// );
676
677ifu_ftu_itd_dp_msff_macro__mux_aope__ports_3__stack_60c__width_53 tte2_lat (
678 .scan_in(tte2_lat_scanin),
679 .scan_out(tte2_lat_scanout),
680 .clk(l2clk),
681 .din0 ({52'b0,1'b1}),
682 .din1 ({tte2_out[51:0],1'b0}),
683 .din2 ({tte1[54:46],partition_id1[2:0],tte1[44:38],tte1[34:28],tte1[27:7],tte1[5:0]}),
684 .sel0 (mbi_init_to_zero ),
685 .sel1 (mbi_cambist_shift),
686 .dout ({tte2[54:46],partition_id2[2:0],tte2[44:38],tte2[34:28],tte2[27:7],tte2[5:0]}),
687 .en (1'b1),
688 .se(se),
689 .siclk(siclk),
690 .soclk(soclk),
691 .pce_ov(pce_ov),
692 .stop(stop)
693);
694
695
696assign tte2_out[52:0] = ({tte2[54:46],partition_id2[2:0],tte2[44:38],tte2[34:28],tte2[27:7],tte2[5:0]});
697assign itd_index_valid_in = tte1[54];
698
699assign atm_unused[3:0] = {access_tag_f[25:24],access_tag_f[17],access_tag_f[13]};
700assign tte2_unused[6:0] = {tte2[47:46],tte2[44:43],tte2[37:36], tte1[35]} ;
701assign tte1_unused = tte1[6] ;
702
703
704
705
706///////////////////////////////////////////////
707// Mux bist test data //
708///////////////////////////////////////////////
709// mbist_wdata[68:0] = { mbist_wdata_bf[2:0], mbist_wdata_bf[7:0],mbist_wdata_bf[7:6], // [68:56]
710// mbist_wdata_bf[4:2], // [55:53]
711// 1'b0, // [52]
712// mbist_wdata_bf[0],{3{mbist_wdata_bf[7:0]}},mbist_wdata_bf[7], // [51:26]
713// 1'b0, // [25]
714// mbist_wdata_bf[6:0], // [24:18]
715// 1'b0, // [17]
716// mbist_wdata_bf[7:5], // [16:14]
717// 1'b0, // [13]
718// mbist_wdata_bf[4:0],mbist_wdata_bf[7:0]}; // [12:0]
719//
720//
721//
722
723// Page mask and real bits must be zero for bist to avoid masking lower address and context bits.
724assign mbist_wdata[68:0] = { mbist_wdata_dup[1:0],mbist_wdata_dup[7:0], mbist_wdata_dup[7:5], // [68:56]
725 mbist_wdata_dup[4:2], // [55:53]
726 1'b0, // [52]
727 mbist_wdata_dup[0],{3{mbist_wdata_dup[7:0]}},mbist_wdata_dup[7], // [51:26]
728 1'b0, // [25]
729 mbist_wdata_dup[6:0], // [24:18]
730 1'b0, // [17]
731 mbist_wdata_dup[7:5], // [16:14]
732 1'b0, // [13]
733 mbist_wdata_dup[4:0],mbist_wdata_dup[7:0]}; // [12:0]
734
735
736assign data_mbist_wdata[37:0] = { mbist_wdata_bf[5:0],mbist_wdata_bf[7:2], // [37:26]
737 mbist_wdata_bf[1], // [25]
738 mbist_wdata_bf[0],mbist_wdata_bf[7:2], // [24:18]
739 mbist_wdata_bf[1], // [17]
740 mbist_wdata_bf[0], mbist_wdata_bf[7:6], // [16:14]
741 mbist_wdata_bf[5], // [13]
742 mbist_wdata_bf[4:0],mbist_wdata_bf[7:0]}; // [12:0]
743
744
745// correct this
746assign mbist_camdata[68:0] = ({{13{mbist_wdata_dup[2]}},{3{mbist_wdata_dup[1]}},mbist_wdata_dup[5],
747 {26{mbist_wdata_dup[0]}},1'b0,mbist_wdata_dup[4],{6{mbist_wdata_dup[0]}}, 1'b0,
748 {3{mbist_wdata_dup[0]}},1'b0,{13{mbist_wdata_dup[3]}}}); // CAMBIST match/write data
749
750// correct this
751assign mbist_camdata_shift[68:0] = ({tte2_out[12:0],tte2_out[51:49],tte2_out[48],
752 tte2_out[47:22],1'b0,1'b1,tte2_out[21:16], 1'b0,
753 tte2_out[15:13],1'b0,tte2_out[12:0]}); // CAMBIST shift data
754
755
756ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_3__stack_58c__width_56 test_data_mux0 (
757 .din0 (mbist_camdata_shift[55:0]), // CAMBIST shift data
758 .din1 (mbist_camdata[55:0]), // CAMBIST match/write data
759 .din2 (mbist_wdata[55:0]), // MEMBIST data
760 .sel0 (init_or_shift_bf),
761 .sel1 (not_init_and_run_bf),
762 .sel2 (not_init_nor_run_bf),
763 .dout (bist_wdata[55:0])
764);
765
766ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_3__stack_14r__width_13 test_data_mux1 (
767 .din0 (mbist_camdata_shift[68:56]), // CAMBIST shift data
768 .din1 (mbist_camdata[68:56]), // CAMBIST match/write data
769 .din2 (mbist_wdata[68:56]), // MEMBIST data
770 .sel0 (init_or_shift_bf),
771 .sel1 (not_init_and_run_bf),
772 .sel2 (not_init_nor_run_bf),
773 .dout (bist_wdata[68:56])
774);
775
776///////////////////////////////////////////////
777// Parity generation for tte_tag
778///////////////////////////////////////////////
779
780
781// VA muxing done in ifu_ftu_agd_dp, and other "middle" parts of
782// tag are not used in match
783ifu_ftu_itd_dp_mux_macro__dmux_8x__mux_aonpe__ports_7__stack_58c__width_56 mx_tag0_d (
784 .din0 (tag_to_demap_d [55:0] ),
785 .din1 (tag_to_demap_c0 [55:0] ),
786 .din2 (tag_to_demap_c1 [55:0] ),
787 .din3 (tag_to_write [55:0] ),
788 .din4 (tag_to_write [55:0] ),
789 .din5 (bist_wdata [55:0] ),
790 .din6 ({default_pid [2:0],
791 default_r ,
792 {39 {1'b0}} ,
793 default_context_0 [12:0]}),
794 .sel0 (itc_sel_demap_tag_d ),
795 .sel1 (itc_sel_demap_tag_c0 ),
796 .sel2 (itc_sel_demap_tag_c1 ),
797 .sel3 (itc_sel_write_tag ),
798 .sel4 (itc_sel_write_tag_indexed ),
799 .sel5 (itc_sel_mbist ),
800 .sel6 (itc_sel_default ),
801 .dout (itd_tag_to_buf [55:0] )
802);
803
804assign itd_tag[55:0] = itd_tag_to_buf[55:0];
805
806// buff_macro mx_tag0_d_buf (width=58, stack=60c) (
807// .din (itd_tag_to_buf [57:00] ),
808// .dout (itd_tag [57:00] ));
809
810ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_7__stack_20r__width_19 mx_tag1_d (
811 .din0 ({6'd0,tag_to_demap_d[68:56]}),
812 .din1 ({6'd0,tag_to_demap_c0[68:56]}),
813 .din2 ({6'd0,tag_to_demap_c1[68:56]}),
814 .din3 ({6'd0,tag_to_write[68:56]}),
815 .din4 ({tte2[53:48],tag_to_write[68:56]}),
816 .din5 ({mbist_index[5:0],bist_wdata[68:56]}),
817 .din6 ({asi_addr_bf[8:3],default_context_1[12:0]}),
818 .sel0 (itc_sel_demap_tag_d),
819 .sel1 (itc_sel_demap_tag_c0),
820 .sel2 (itc_sel_demap_tag_c1),
821 .sel3 (itc_sel_write_tag),
822 .sel4 (itc_sel_write_tag_indexed),
823 .sel5 (itc_sel_mbist ),
824 .sel6 (itc_sel_default ),
825 .dout ({itd_rw_index_to_buf[5:0],itd_tag_to_buf[68:56]})
826);
827
828// buff_macro mx_tag1_d_buf (width=20, stack=20c) (
829// .din ( {prty_ctxt1_to_buf_,itd_rw_index_to_buf[5:0],itd_tag_to_buf[68:56]}),
830// .dout({prty_ctxt1_,itd_rw_index[5:0],itd_tag[68:56]}) ) ;
831
832// assign prty_ctxt1_ = prty_ctxt1_to_buf_;
833assign itd_rw_index[5:0] = itd_rw_index_to_buf[5:0] ;
834assign itd_tag[68:56] = itd_tag_to_buf[68:56] ;
835
836ifu_ftu_itd_dp_msff_macro__stack_16r__width_16 mbist_in_reg (
837 .scan_in(mbist_in_reg_scanin),
838 .scan_out(mbist_in_reg_scanout),
839 .clk ( l2clk ),
840 .en ( 1'b1 ),
841 .din ( {mbi_addr[5:0],mbi_wdata[7:0],mbi_run,mbi_cambist_run}),
842 .dout( {mbist_index_to_buf[5:0],mbist_wdata_to_buf[7:0],mbist_run_to_buf,cambist_run_bf} ),
843 .se(se),
844 .siclk(siclk),
845 .soclk(soclk),
846 .pce_ov(pce_ov),
847 .stop(stop));
848
849ifu_ftu_itd_dp_msff_macro__stack_8c__width_8 mbist_in_dup_reg (
850 .scan_in(mbist_in_dup_reg_scanin),
851 .scan_out(mbist_in_dup_reg_scanout),
852 .clk ( l2clk ),
853 .en ( 1'b1 ),
854 .din ( mbi_wdata[7:0]),
855 .dout( mbist_wdata_dup[7:0]),
856 .se(se),
857 .siclk(siclk),
858 .soclk(soclk),
859 .pce_ov(pce_ov),
860 .stop(stop));
861
862ifu_ftu_itd_dp_buff_macro__stack_16r__width_15 mbist_in_buf (
863 .din( {mbist_index_to_buf[5:0],mbist_wdata_to_buf[7:0],mbist_run_to_buf} ),
864 .dout( {mbist_index[5:0],mbist_wdata_bf[7:0],mbist_run} ));
865
866
867///////////////////////////TTE data////////////////////////////////////////////
868
869
870ifu_ftu_itd_dp_buff_macro__dbuff_48x__width_1 tst_mux_rep0 (
871 .din ( tcu_muxtest ),
872 .dout( tcu_muxtest_rep0 ));
873
874
875// Data is only needed for write, need a mux only for bist
876ifu_ftu_itd_dp_mux_macro__mux_pgpe__ports_3__stack_38c__width_37 mx_itd_data (
877 .din0 ({31'b0,mbist_index[5:0]}), //CAM write data
878 .din1 (data_mbist_wdata[36:0]), //MBIST write data
879 .din2 (data_to_write[36:0]), //Functional write data
880 .muxtst (tcu_muxtest_rep0),
881 .sel0 (cambist_run_bf),
882 .sel1 (mbist_run),
883 .dout (itd_data_to_buf[36:0]),
884 .test(test)
885);
886
887assign itd_data[37:0] = {data_to_write[37], itd_data_to_buf[36:0]} ;
888
889// buff_macro mx_itd_data_buf (width=39, stack=60c) (
890// .din (itd_data_to_buf[38:0]),
891// .dout (itd_data[38:0]));
892
893assign data_to_write[37:0] =
894 {tag_parity_out , // Parity for tag
895 data_parity , // Parity
896 tte2 [33:22], // PA[39:28]
897 tte2 [21:16], // PA[27:22]
898 tte1 [21 ], // 27_22_V, PS_EQ_256M
899 tte2 [15:10], // PA[21:16]
900 tte2 [42 ], // 21_16_V, PS_GT_64K
901 tte2 [9:7], // VA[15:13]
902 tte2 [38 ], // 15_13_V, PS_GT_8K
903 tte2 [5:0] // NFO, IE, CP, E, P, W
904 };
905
906
907 ifu_ftu_itd_dp_prty_macro__width_32 dprty0 (
908 .din (data_to_write[31:0]),
909 .dout (data_parity_0)
910);
911ifu_ftu_itd_dp_prty_macro__width_8 dprty1 (
912 .din ({2'b00,data_to_write[35:32],itc_data_error_inj,1'b0}),
913 .dout (data_parity_1)
914);
915
916ifu_ftu_itd_dp_xor_macro__ports_2__width_1 pgen_data_xor (
917 .din0 (data_parity_0),
918 .din1 (data_parity_1),
919 .dout (data_parity)
920);
921
922ifu_ftu_itd_dp_nor_macro__ports_2__width_1 shift_or_init (
923 .din0 (mbi_init_to_zero),
924 .din1 (mbi_cambist_shift),
925 .dout (init_or_shift_nor)
926);
927
928ifu_ftu_itd_dp_inv_macro__width_1 shift_or_init_inv (
929 .din (init_or_shift_nor),
930 .dout (init_or_shift)
931 );
932
933ifu_ftu_itd_dp_nor_macro__ports_2__width_1 not_init_nor_run_nor (
934 .din0 (init_or_shift),
935 .din1 (mbi_cambist_run),
936 .dout (not_init_nor_run)
937);
938
939ifu_ftu_itd_dp_and_macro__ports_2__width_1 not_init_and_run_and (
940 .din0 (init_or_shift_nor),
941 .din1 (mbi_cambist_run),
942 .dout (not_init_and_run)
943);
944
945// buff_macro dprty_buf (width=1) (
946// .din (data_parity),
947// .dout (data_parity_buf)
948// );
949
950
951assign itd_demap_control1[1:0] =
952 tte1[44:43];
953
954// Write context 0 if a write with use_context_0 on
955// assign itc_sel_write_tag_c0 =
956// (wr_vld & demap_c2[00]) ;
957//
958// Write context 1 if a write with use_context_1 on
959// assign itc_sel_write_tag_c1 =
960// (wr_vld & demap_c2[01] & ~demap_c2[00]) ;
961
962
963ifu_ftu_itd_dp_and_macro__ports_2__stack_2l__width_1 write_tag_c0_and (
964 .din0 (itc_write_next),
965 .din1 (itd_demap_control1[0]),
966 .dout (sel_write_tag_c0)
967);
968
969ifu_ftu_itd_dp_and_macro__ports_3__stack_4l__width_1 write_tag_c1_and (
970 .din0 (itc_write_next),
971 .din1 (demap_control1_0_),
972 .din2 (itd_demap_control1[1]),
973 .dout (sel_write_tag_c1)
974);
975
976// assign sel_write_tag_t1 = write_next_ ;
977//
978 ifu_ftu_itd_dp_inv_macro__width_1 sel_write_inv (
979 .din (itd_demap_control1[0]),
980 .dout (demap_control1_0_)
981 );
982
983
984
985
986// assign se = tcu_scan_en ;
987// fixscan start:
988assign tte0_lat_scanin = scan_in ;
989assign tte1_lat_scanin = tte0_lat_scanout ;
990assign access_tag_reg_scanin = tte1_lat_scanout ;
991assign access_tag_reg0_scanin = access_tag_reg_scanout ;
992assign write_context_0_reg_scanin = access_tag_reg0_scanout ;
993assign write_context_1_reg_scanin = write_context_0_reg_scanout;
994assign context_to_write_reg_scanin = write_context_1_reg_scanout;
995assign tte2_lat_scanin = context_to_write_reg_scanout;
996assign mbist_in_reg_scanin = tte2_lat_scanout ;
997assign mbist_in_dup_reg_scanin = mbist_in_reg_scanout ;
998assign scan_out = mbist_in_dup_reg_scanout ;
999// fixscan end:
1000endmodule
1001
1002
1003
1004
1005//
1006// buff macro
1007//
1008//
1009
1010
1011
1012
1013
1014module ifu_ftu_itd_dp_buff_macro__dbuff_32x__stack_none__width_4 (
1015 din,
1016 dout);
1017 input [3:0] din;
1018 output [3:0] dout;
1019
1020
1021
1022
1023
1024
1025buff #(4) d0_0 (
1026.in(din[3:0]),
1027.out(dout[3:0])
1028);
1029
1030
1031
1032
1033
1034
1035
1036
1037endmodule
1038
1039
1040
1041
1042
1043// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1044// also for pass-gate with decoder
1045
1046
1047
1048
1049
1050// any PARAMS parms go into naming of macro
1051
1052module ifu_ftu_itd_dp_mux_macro__mux_aonpe__ports_2__stack_60c__width_55 (
1053 din0,
1054 sel0,
1055 din1,
1056 sel1,
1057 dout);
1058wire buffout0;
1059wire buffout1;
1060
1061 input [54:0] din0;
1062 input sel0;
1063 input [54:0] din1;
1064 input sel1;
1065 output [54:0] dout;
1066
1067
1068
1069
1070
1071cl_dp1_muxbuff2_8x c0_0 (
1072 .in0(sel0),
1073 .in1(sel1),
1074 .out0(buffout0),
1075 .out1(buffout1)
1076);
1077mux2s #(55) d0_0 (
1078 .sel0(buffout0),
1079 .sel1(buffout1),
1080 .in0(din0[54:0]),
1081 .in1(din1[54:0]),
1082.dout(dout[54:0])
1083);
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097endmodule
1098
1099
1100
1101
1102
1103
1104// any PARAMS parms go into naming of macro
1105
1106module ifu_ftu_itd_dp_msff_macro__stack_60c__width_56 (
1107 din,
1108 clk,
1109 en,
1110 se,
1111 scan_in,
1112 siclk,
1113 soclk,
1114 pce_ov,
1115 stop,
1116 dout,
1117 scan_out);
1118wire l1clk;
1119wire siclk_out;
1120wire soclk_out;
1121wire [54:0] so;
1122
1123 input [55:0] din;
1124
1125
1126 input clk;
1127 input en;
1128 input se;
1129 input scan_in;
1130 input siclk;
1131 input soclk;
1132 input pce_ov;
1133 input stop;
1134
1135
1136
1137 output [55:0] dout;
1138
1139
1140 output scan_out;
1141
1142
1143
1144
1145cl_dp1_l1hdr_8x c0_0 (
1146.l2clk(clk),
1147.pce(en),
1148.aclk(siclk),
1149.bclk(soclk),
1150.l1clk(l1clk),
1151 .se(se),
1152 .pce_ov(pce_ov),
1153 .stop(stop),
1154 .siclk_out(siclk_out),
1155 .soclk_out(soclk_out)
1156);
1157dff #(56) d0_0 (
1158.l1clk(l1clk),
1159.siclk(siclk_out),
1160.soclk(soclk_out),
1161.d(din[55:0]),
1162.si({scan_in,so[54:0]}),
1163.so({so[54:0],scan_out}),
1164.q(dout[55:0])
1165);
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186endmodule
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200// any PARAMS parms go into naming of macro
1201
1202module ifu_ftu_itd_dp_msff_macro__stack_60c__width_59 (
1203 din,
1204 clk,
1205 en,
1206 se,
1207 scan_in,
1208 siclk,
1209 soclk,
1210 pce_ov,
1211 stop,
1212 dout,
1213 scan_out);
1214wire l1clk;
1215wire siclk_out;
1216wire soclk_out;
1217wire [57:0] so;
1218
1219 input [58:0] din;
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 [58:0] dout;
1234
1235
1236 output scan_out;
1237
1238
1239
1240
1241cl_dp1_l1hdr_8x c0_0 (
1242.l2clk(clk),
1243.pce(en),
1244.aclk(siclk),
1245.bclk(soclk),
1246.l1clk(l1clk),
1247 .se(se),
1248 .pce_ov(pce_ov),
1249 .stop(stop),
1250 .siclk_out(siclk_out),
1251 .soclk_out(soclk_out)
1252);
1253dff #(59) d0_0 (
1254.l1clk(l1clk),
1255.siclk(siclk_out),
1256.soclk(soclk_out),
1257.d(din[58:0]),
1258.si({scan_in,so[57:0]}),
1259.so({so[57:0],scan_out}),
1260.q(dout[58:0])
1261);
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282endmodule
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1293// also for pass-gate with decoder
1294
1295
1296
1297
1298
1299// any PARAMS parms go into naming of macro
1300
1301module ifu_ftu_itd_dp_mux_macro__mux_aodec__ports_8__stack_4r__width_3 (
1302 din0,
1303 din1,
1304 din2,
1305 din3,
1306 din4,
1307 din5,
1308 din6,
1309 din7,
1310 sel,
1311 dout);
1312wire psel0;
1313wire psel1;
1314wire psel2;
1315wire psel3;
1316wire psel4;
1317wire psel5;
1318wire psel6;
1319wire psel7;
1320
1321 input [2:0] din0;
1322 input [2:0] din1;
1323 input [2:0] din2;
1324 input [2:0] din3;
1325 input [2:0] din4;
1326 input [2:0] din5;
1327 input [2:0] din6;
1328 input [2:0] din7;
1329 input [2:0] sel;
1330 output [2:0] dout;
1331
1332
1333
1334
1335
1336cl_dp1_pdec8_8x c0_0 (
1337 .test(1'b1),
1338 .sel0(sel[0]),
1339 .sel1(sel[1]),
1340 .sel2(sel[2]),
1341 .psel0(psel0),
1342 .psel1(psel1),
1343 .psel2(psel2),
1344 .psel3(psel3),
1345 .psel4(psel4),
1346 .psel5(psel5),
1347 .psel6(psel6),
1348 .psel7(psel7)
1349);
1350
1351mux8s #(3) d0_0 (
1352 .sel0(psel0),
1353 .sel1(psel1),
1354 .sel2(psel2),
1355 .sel3(psel3),
1356 .sel4(psel4),
1357 .sel5(psel5),
1358 .sel6(psel6),
1359 .sel7(psel7),
1360 .in0(din0[2:0]),
1361 .in1(din1[2:0]),
1362 .in2(din2[2:0]),
1363 .in3(din3[2:0]),
1364 .in4(din4[2:0]),
1365 .in5(din5[2:0]),
1366 .in6(din6[2:0]),
1367 .in7(din7[2:0]),
1368.dout(dout[2:0])
1369);
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383endmodule
1384
1385
1386//
1387// buff macro
1388//
1389//
1390
1391
1392
1393
1394
1395module ifu_ftu_itd_dp_buff_macro__stack_4c__width_3 (
1396 din,
1397 dout);
1398 input [2:0] din;
1399 output [2:0] dout;
1400
1401
1402
1403
1404
1405
1406buff #(3) d0_0 (
1407.in(din[2:0]),
1408.out(dout[2:0])
1409);
1410
1411
1412
1413
1414
1415
1416
1417
1418endmodule
1419
1420
1421
1422
1423
1424// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1425// also for pass-gate with decoder
1426
1427
1428
1429
1430
1431// any PARAMS parms go into naming of macro
1432
1433module ifu_ftu_itd_dp_mux_macro__mux_aope__ports_3__stack_14r__width_14 (
1434 din0,
1435 din1,
1436 din2,
1437 sel0,
1438 sel1,
1439 dout);
1440wire psel0;
1441wire psel1;
1442wire psel2;
1443
1444 input [13:0] din0;
1445 input [13:0] din1;
1446 input [13:0] din2;
1447 input sel0;
1448 input sel1;
1449 output [13:0] dout;
1450
1451
1452
1453
1454
1455cl_dp1_penc3_8x c0_0 (
1456 .test(1'b1),
1457 .sel0(sel0),
1458 .sel1(sel1),
1459 .psel0(psel0),
1460 .psel1(psel1),
1461 .psel2(psel2)
1462);
1463
1464mux3s #(14) d0_0 (
1465 .sel0(psel0),
1466 .sel1(psel1),
1467 .sel2(psel2),
1468 .in0(din0[13:0]),
1469 .in1(din1[13:0]),
1470 .in2(din2[13:0]),
1471.dout(dout[13:0])
1472);
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486endmodule
1487
1488
1489//
1490// invert macro
1491//
1492//
1493
1494
1495
1496
1497
1498module ifu_ftu_itd_dp_inv_macro__width_3 (
1499 din,
1500 dout);
1501 input [2:0] din;
1502 output [2:0] dout;
1503
1504
1505
1506
1507
1508
1509inv #(3) d0_0 (
1510.in(din[2:0]),
1511.out(dout[2:0])
1512);
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522endmodule
1523
1524
1525
1526
1527
1528//
1529// invert macro
1530//
1531//
1532
1533
1534
1535
1536
1537module ifu_ftu_itd_dp_inv_macro__width_1 (
1538 din,
1539 dout);
1540 input [0:0] din;
1541 output [0:0] dout;
1542
1543
1544
1545
1546
1547
1548inv #(1) d0_0 (
1549.in(din[0:0]),
1550.out(dout[0:0])
1551);
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561endmodule
1562
1563
1564
1565
1566
1567//
1568// and macro for ports = 2,3,4
1569//
1570//
1571
1572
1573
1574
1575
1576module ifu_ftu_itd_dp_and_macro__ports_2__stack_16l__width_16 (
1577 din0,
1578 din1,
1579 dout);
1580 input [15:0] din0;
1581 input [15:0] din1;
1582 output [15:0] dout;
1583
1584
1585
1586
1587
1588
1589and2 #(16) d0_0 (
1590.in0(din0[15:0]),
1591.in1(din1[15:0]),
1592.out(dout[15:0])
1593);
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603endmodule
1604
1605
1606
1607
1608
1609// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1610// also for pass-gate with decoder
1611
1612
1613
1614
1615
1616// any PARAMS parms go into naming of macro
1617
1618module ifu_ftu_itd_dp_mux_macro__left_2__mux_pgpe__ports_2__stack_60c__width_40 (
1619 din0,
1620 din1,
1621 sel0,
1622 dout);
1623wire psel0_unused;
1624wire psel1;
1625
1626 input [39:0] din0;
1627 input [39:0] din1;
1628 input sel0;
1629 output [39:0] dout;
1630
1631
1632
1633
1634
1635cl_dp1_penc2_8x c0_0 (
1636 .sel0(sel0),
1637 .psel0(psel0_unused),
1638 .psel1(psel1)
1639);
1640
1641mux2e #(40) d0_0 (
1642 .sel(psel1),
1643 .in0(din0[39:0]),
1644 .in1(din1[39:0]),
1645.dout(dout[39:0])
1646);
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660endmodule
1661
1662
1663//
1664// parity macro (even parity)
1665//
1666//
1667
1668
1669
1670
1671
1672module ifu_ftu_itd_dp_prty_macro__width_32 (
1673 din,
1674 dout);
1675 input [31:0] din;
1676 output dout;
1677
1678
1679
1680
1681
1682
1683
1684prty #(32) m0_0 (
1685.in(din[31:0]),
1686.out(dout)
1687);
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698endmodule
1699
1700
1701
1702
1703
1704//
1705// parity macro (even parity)
1706//
1707//
1708
1709
1710
1711
1712
1713module ifu_ftu_itd_dp_prty_macro__width_16 (
1714 din,
1715 dout);
1716 input [15:0] din;
1717 output dout;
1718
1719
1720
1721
1722
1723
1724
1725prty #(16) m0_0 (
1726.in(din[15:0]),
1727.out(dout)
1728);
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739endmodule
1740
1741
1742
1743
1744
1745//
1746// xor macro for ports = 2,3
1747//
1748//
1749
1750
1751
1752
1753
1754module ifu_ftu_itd_dp_xor_macro__ports_2__width_1 (
1755 din0,
1756 din1,
1757 dout);
1758 input [0:0] din0;
1759 input [0:0] din1;
1760 output [0:0] dout;
1761
1762
1763
1764
1765
1766xor2 #(1) d0_0 (
1767.in0(din0[0:0]),
1768.in1(din1[0:0]),
1769.out(dout[0:0])
1770);
1771
1772
1773
1774
1775
1776
1777
1778
1779endmodule
1780
1781
1782
1783
1784
1785// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1786// also for pass-gate with decoder
1787
1788
1789
1790
1791
1792// any PARAMS parms go into naming of macro
1793
1794module ifu_ftu_itd_dp_mux_macro__mux_pgpe__ports_2__stack_2r__width_1 (
1795 din0,
1796 din1,
1797 sel0,
1798 dout);
1799wire psel0_unused;
1800wire psel1;
1801
1802 input [0:0] din0;
1803 input [0:0] din1;
1804 input sel0;
1805 output [0:0] dout;
1806
1807
1808
1809
1810
1811cl_dp1_penc2_8x c0_0 (
1812 .sel0(sel0),
1813 .psel0(psel0_unused),
1814 .psel1(psel1)
1815);
1816
1817mux2e #(1) d0_0 (
1818 .sel(psel1),
1819 .in0(din0[0:0]),
1820 .in1(din1[0:0]),
1821.dout(dout[0:0])
1822);
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836endmodule
1837
1838
1839//
1840// parity macro (even parity)
1841//
1842//
1843
1844
1845
1846
1847
1848module ifu_ftu_itd_dp_prty_macro__width_8 (
1849 din,
1850 dout);
1851 input [7:0] din;
1852 output dout;
1853
1854
1855
1856
1857
1858
1859
1860prty #(8) m0_0 (
1861.in(din[7:0]),
1862.out(dout)
1863);
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874endmodule
1875
1876
1877
1878
1879
1880//
1881// buff macro
1882//
1883//
1884
1885
1886
1887
1888
1889module ifu_ftu_itd_dp_buff_macro__width_6 (
1890 din,
1891 dout);
1892 input [5:0] din;
1893 output [5:0] dout;
1894
1895
1896
1897
1898
1899
1900buff #(6) d0_0 (
1901.in(din[5:0]),
1902.out(dout[5:0])
1903);
1904
1905
1906
1907
1908
1909
1910
1911
1912endmodule
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922// any PARAMS parms go into naming of macro
1923
1924module ifu_ftu_itd_dp_msff_macro__stack_14c__width_13 (
1925 din,
1926 clk,
1927 en,
1928 se,
1929 scan_in,
1930 siclk,
1931 soclk,
1932 pce_ov,
1933 stop,
1934 dout,
1935 scan_out);
1936wire l1clk;
1937wire siclk_out;
1938wire soclk_out;
1939wire [11:0] so;
1940
1941 input [12:0] din;
1942
1943
1944 input clk;
1945 input en;
1946 input se;
1947 input scan_in;
1948 input siclk;
1949 input soclk;
1950 input pce_ov;
1951 input stop;
1952
1953
1954
1955 output [12:0] dout;
1956
1957
1958 output scan_out;
1959
1960
1961
1962
1963cl_dp1_l1hdr_8x c0_0 (
1964.l2clk(clk),
1965.pce(en),
1966.aclk(siclk),
1967.bclk(soclk),
1968.l1clk(l1clk),
1969 .se(se),
1970 .pce_ov(pce_ov),
1971 .stop(stop),
1972 .siclk_out(siclk_out),
1973 .soclk_out(soclk_out)
1974);
1975dff #(13) d0_0 (
1976.l1clk(l1clk),
1977.siclk(siclk_out),
1978.soclk(soclk_out),
1979.d(din[12:0]),
1980.si({scan_in,so[11:0]}),
1981.so({so[11:0],scan_out}),
1982.q(dout[12:0])
1983);
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004endmodule
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018// any PARAMS parms go into naming of macro
2019
2020module ifu_ftu_itd_dp_msff_macro__stack_14c__width_14 (
2021 din,
2022 clk,
2023 en,
2024 se,
2025 scan_in,
2026 siclk,
2027 soclk,
2028 pce_ov,
2029 stop,
2030 dout,
2031 scan_out);
2032wire l1clk;
2033wire siclk_out;
2034wire soclk_out;
2035wire [12:0] so;
2036
2037 input [13:0] din;
2038
2039
2040 input clk;
2041 input en;
2042 input se;
2043 input scan_in;
2044 input siclk;
2045 input soclk;
2046 input pce_ov;
2047 input stop;
2048
2049
2050
2051 output [13:0] dout;
2052
2053
2054 output scan_out;
2055
2056
2057
2058
2059cl_dp1_l1hdr_8x c0_0 (
2060.l2clk(clk),
2061.pce(en),
2062.aclk(siclk),
2063.bclk(soclk),
2064.l1clk(l1clk),
2065 .se(se),
2066 .pce_ov(pce_ov),
2067 .stop(stop),
2068 .siclk_out(siclk_out),
2069 .soclk_out(soclk_out)
2070);
2071dff #(14) d0_0 (
2072.l1clk(l1clk),
2073.siclk(siclk_out),
2074.soclk(soclk_out),
2075.d(din[13:0]),
2076.si({scan_in,so[12:0]}),
2077.so({so[12:0],scan_out}),
2078.q(dout[13:0])
2079);
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100endmodule
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114// any PARAMS parms go into naming of macro
2115
2116module ifu_ftu_itd_dp_msff_macro__mux_aope__ports_3__stack_60c__width_53 (
2117 din0,
2118 din1,
2119 din2,
2120 sel0,
2121 sel1,
2122 clk,
2123 en,
2124 se,
2125 scan_in,
2126 siclk,
2127 soclk,
2128 pce_ov,
2129 stop,
2130 dout,
2131 scan_out);
2132wire psel0;
2133wire psel1;
2134wire psel2;
2135wire [52:0] muxout;
2136wire l1clk;
2137wire siclk_out;
2138wire soclk_out;
2139wire [51:0] so;
2140
2141 input [52:0] din0;
2142 input [52:0] din1;
2143 input [52:0] din2;
2144 input sel0;
2145 input sel1;
2146
2147
2148 input clk;
2149 input en;
2150 input se;
2151 input scan_in;
2152 input siclk;
2153 input soclk;
2154 input pce_ov;
2155 input stop;
2156
2157
2158
2159 output [52:0] dout;
2160
2161
2162 output scan_out;
2163
2164
2165
2166
2167cl_dp1_penc3_8x c1_0 (
2168 .test(1'b1),
2169 .sel0(sel0),
2170 .sel1(sel1),
2171 .psel0(psel0),
2172 .psel1(psel1),
2173 .psel2(psel2)
2174);
2175
2176mux3s #(53) d1_0 (
2177 .sel0(psel0),
2178 .sel1(psel1),
2179 .sel2(psel2),
2180 .in0(din0[52:0]),
2181 .in1(din1[52:0]),
2182 .in2(din2[52:0]),
2183.dout(muxout[52:0])
2184);
2185cl_dp1_l1hdr_8x c0_0 (
2186.l2clk(clk),
2187.pce(en),
2188.aclk(siclk),
2189.bclk(soclk),
2190.l1clk(l1clk),
2191 .se(se),
2192 .pce_ov(pce_ov),
2193 .stop(stop),
2194 .siclk_out(siclk_out),
2195 .soclk_out(soclk_out)
2196);
2197dff #(53) d0_0 (
2198.l1clk(l1clk),
2199.siclk(siclk_out),
2200.soclk(soclk_out),
2201.d(muxout[52:0]),
2202.si({scan_in,so[51:0]}),
2203.so({so[51:0],scan_out}),
2204.q(dout[52:0])
2205);
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226endmodule
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2237// also for pass-gate with decoder
2238
2239
2240
2241
2242
2243// any PARAMS parms go into naming of macro
2244
2245module ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_3__stack_58c__width_56 (
2246 din0,
2247 sel0,
2248 din1,
2249 sel1,
2250 din2,
2251 sel2,
2252 dout);
2253wire buffout0;
2254wire buffout1;
2255wire buffout2;
2256
2257 input [55:0] din0;
2258 input sel0;
2259 input [55:0] din1;
2260 input sel1;
2261 input [55:0] din2;
2262 input sel2;
2263 output [55:0] dout;
2264
2265
2266
2267
2268
2269cl_dp1_muxbuff3_8x c0_0 (
2270 .in0(sel0),
2271 .in1(sel1),
2272 .in2(sel2),
2273 .out0(buffout0),
2274 .out1(buffout1),
2275 .out2(buffout2)
2276);
2277mux3s #(56) d0_0 (
2278 .sel0(buffout0),
2279 .sel1(buffout1),
2280 .sel2(buffout2),
2281 .in0(din0[55:0]),
2282 .in1(din1[55:0]),
2283 .in2(din2[55:0]),
2284.dout(dout[55:0])
2285);
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299endmodule
2300
2301
2302// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2303// also for pass-gate with decoder
2304
2305
2306
2307
2308
2309// any PARAMS parms go into naming of macro
2310
2311module ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_3__stack_14r__width_13 (
2312 din0,
2313 sel0,
2314 din1,
2315 sel1,
2316 din2,
2317 sel2,
2318 dout);
2319wire buffout0;
2320wire buffout1;
2321wire buffout2;
2322
2323 input [12:0] din0;
2324 input sel0;
2325 input [12:0] din1;
2326 input sel1;
2327 input [12:0] din2;
2328 input sel2;
2329 output [12:0] dout;
2330
2331
2332
2333
2334
2335cl_dp1_muxbuff3_8x c0_0 (
2336 .in0(sel0),
2337 .in1(sel1),
2338 .in2(sel2),
2339 .out0(buffout0),
2340 .out1(buffout1),
2341 .out2(buffout2)
2342);
2343mux3s #(13) d0_0 (
2344 .sel0(buffout0),
2345 .sel1(buffout1),
2346 .sel2(buffout2),
2347 .in0(din0[12:0]),
2348 .in1(din1[12:0]),
2349 .in2(din2[12:0]),
2350.dout(dout[12:0])
2351);
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365endmodule
2366
2367
2368// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2369// also for pass-gate with decoder
2370
2371
2372
2373
2374
2375// any PARAMS parms go into naming of macro
2376
2377module ifu_ftu_itd_dp_mux_macro__dmux_8x__mux_aonpe__ports_7__stack_58c__width_56 (
2378 din0,
2379 sel0,
2380 din1,
2381 sel1,
2382 din2,
2383 sel2,
2384 din3,
2385 sel3,
2386 din4,
2387 sel4,
2388 din5,
2389 sel5,
2390 din6,
2391 sel6,
2392 dout);
2393wire buffout0;
2394wire buffout1;
2395wire buffout2;
2396wire buffout3;
2397wire buffout4;
2398wire buffout5;
2399wire buffout6;
2400
2401 input [55:0] din0;
2402 input sel0;
2403 input [55:0] din1;
2404 input sel1;
2405 input [55:0] din2;
2406 input sel2;
2407 input [55:0] din3;
2408 input sel3;
2409 input [55:0] din4;
2410 input sel4;
2411 input [55:0] din5;
2412 input sel5;
2413 input [55:0] din6;
2414 input sel6;
2415 output [55:0] dout;
2416
2417
2418
2419
2420
2421cl_dp1_muxbuff7_8x c0_0 (
2422 .in0(sel0),
2423 .in1(sel1),
2424 .in2(sel2),
2425 .in3(sel3),
2426 .in4(sel4),
2427 .in5(sel5),
2428 .in6(sel6),
2429 .out0(buffout0),
2430 .out1(buffout1),
2431 .out2(buffout2),
2432 .out3(buffout3),
2433 .out4(buffout4),
2434 .out5(buffout5),
2435 .out6(buffout6)
2436);
2437mux7s #(56) d0_0 (
2438 .sel0(buffout0),
2439 .sel1(buffout1),
2440 .sel2(buffout2),
2441 .sel3(buffout3),
2442 .sel4(buffout4),
2443 .sel5(buffout5),
2444 .sel6(buffout6),
2445 .in0(din0[55:0]),
2446 .in1(din1[55:0]),
2447 .in2(din2[55:0]),
2448 .in3(din3[55:0]),
2449 .in4(din4[55:0]),
2450 .in5(din5[55:0]),
2451 .in6(din6[55:0]),
2452.dout(dout[55:0])
2453);
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467endmodule
2468
2469
2470// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2471// also for pass-gate with decoder
2472
2473
2474
2475
2476
2477// any PARAMS parms go into naming of macro
2478
2479module ifu_ftu_itd_dp_mux_macro__dmux_6x__mux_aonpe__ports_7__stack_20r__width_19 (
2480 din0,
2481 sel0,
2482 din1,
2483 sel1,
2484 din2,
2485 sel2,
2486 din3,
2487 sel3,
2488 din4,
2489 sel4,
2490 din5,
2491 sel5,
2492 din6,
2493 sel6,
2494 dout);
2495wire buffout0;
2496wire buffout1;
2497wire buffout2;
2498wire buffout3;
2499wire buffout4;
2500wire buffout5;
2501wire buffout6;
2502
2503 input [18:0] din0;
2504 input sel0;
2505 input [18:0] din1;
2506 input sel1;
2507 input [18:0] din2;
2508 input sel2;
2509 input [18:0] din3;
2510 input sel3;
2511 input [18:0] din4;
2512 input sel4;
2513 input [18:0] din5;
2514 input sel5;
2515 input [18:0] din6;
2516 input sel6;
2517 output [18:0] dout;
2518
2519
2520
2521
2522
2523cl_dp1_muxbuff7_8x c0_0 (
2524 .in0(sel0),
2525 .in1(sel1),
2526 .in2(sel2),
2527 .in3(sel3),
2528 .in4(sel4),
2529 .in5(sel5),
2530 .in6(sel6),
2531 .out0(buffout0),
2532 .out1(buffout1),
2533 .out2(buffout2),
2534 .out3(buffout3),
2535 .out4(buffout4),
2536 .out5(buffout5),
2537 .out6(buffout6)
2538);
2539mux7s #(19) d0_0 (
2540 .sel0(buffout0),
2541 .sel1(buffout1),
2542 .sel2(buffout2),
2543 .sel3(buffout3),
2544 .sel4(buffout4),
2545 .sel5(buffout5),
2546 .sel6(buffout6),
2547 .in0(din0[18:0]),
2548 .in1(din1[18:0]),
2549 .in2(din2[18:0]),
2550 .in3(din3[18:0]),
2551 .in4(din4[18:0]),
2552 .in5(din5[18:0]),
2553 .in6(din6[18:0]),
2554.dout(dout[18:0])
2555);
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569endmodule
2570
2571
2572
2573
2574
2575
2576// any PARAMS parms go into naming of macro
2577
2578module ifu_ftu_itd_dp_msff_macro__stack_16r__width_16 (
2579 din,
2580 clk,
2581 en,
2582 se,
2583 scan_in,
2584 siclk,
2585 soclk,
2586 pce_ov,
2587 stop,
2588 dout,
2589 scan_out);
2590wire l1clk;
2591wire siclk_out;
2592wire soclk_out;
2593wire [14:0] so;
2594
2595 input [15:0] din;
2596
2597
2598 input clk;
2599 input en;
2600 input se;
2601 input scan_in;
2602 input siclk;
2603 input soclk;
2604 input pce_ov;
2605 input stop;
2606
2607
2608
2609 output [15:0] dout;
2610
2611
2612 output scan_out;
2613
2614
2615
2616
2617cl_dp1_l1hdr_8x c0_0 (
2618.l2clk(clk),
2619.pce(en),
2620.aclk(siclk),
2621.bclk(soclk),
2622.l1clk(l1clk),
2623 .se(se),
2624 .pce_ov(pce_ov),
2625 .stop(stop),
2626 .siclk_out(siclk_out),
2627 .soclk_out(soclk_out)
2628);
2629dff #(16) d0_0 (
2630.l1clk(l1clk),
2631.siclk(siclk_out),
2632.soclk(soclk_out),
2633.d(din[15:0]),
2634.si({scan_in,so[14:0]}),
2635.so({so[14:0],scan_out}),
2636.q(dout[15:0])
2637);
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658endmodule
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672// any PARAMS parms go into naming of macro
2673
2674module ifu_ftu_itd_dp_msff_macro__stack_8c__width_8 (
2675 din,
2676 clk,
2677 en,
2678 se,
2679 scan_in,
2680 siclk,
2681 soclk,
2682 pce_ov,
2683 stop,
2684 dout,
2685 scan_out);
2686wire l1clk;
2687wire siclk_out;
2688wire soclk_out;
2689wire [6:0] so;
2690
2691 input [7:0] din;
2692
2693
2694 input clk;
2695 input en;
2696 input se;
2697 input scan_in;
2698 input siclk;
2699 input soclk;
2700 input pce_ov;
2701 input stop;
2702
2703
2704
2705 output [7:0] dout;
2706
2707
2708 output scan_out;
2709
2710
2711
2712
2713cl_dp1_l1hdr_8x c0_0 (
2714.l2clk(clk),
2715.pce(en),
2716.aclk(siclk),
2717.bclk(soclk),
2718.l1clk(l1clk),
2719 .se(se),
2720 .pce_ov(pce_ov),
2721 .stop(stop),
2722 .siclk_out(siclk_out),
2723 .soclk_out(soclk_out)
2724);
2725dff #(8) d0_0 (
2726.l1clk(l1clk),
2727.siclk(siclk_out),
2728.soclk(soclk_out),
2729.d(din[7:0]),
2730.si({scan_in,so[6:0]}),
2731.so({so[6:0],scan_out}),
2732.q(dout[7:0])
2733);
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754endmodule
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764//
2765// buff macro
2766//
2767//
2768
2769
2770
2771
2772
2773module ifu_ftu_itd_dp_buff_macro__stack_16r__width_15 (
2774 din,
2775 dout);
2776 input [14:0] din;
2777 output [14:0] dout;
2778
2779
2780
2781
2782
2783
2784buff #(15) d0_0 (
2785.in(din[14:0]),
2786.out(dout[14:0])
2787);
2788
2789
2790
2791
2792
2793
2794
2795
2796endmodule
2797
2798
2799
2800
2801
2802//
2803// buff macro
2804//
2805//
2806
2807
2808
2809
2810
2811module ifu_ftu_itd_dp_buff_macro__dbuff_48x__width_1 (
2812 din,
2813 dout);
2814 input [0:0] din;
2815 output [0:0] dout;
2816
2817
2818
2819
2820
2821
2822buff #(1) d0_0 (
2823.in(din[0:0]),
2824.out(dout[0:0])
2825);
2826
2827
2828
2829
2830
2831
2832
2833
2834endmodule
2835
2836
2837
2838
2839
2840// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2841// also for pass-gate with decoder
2842
2843
2844
2845
2846
2847// any PARAMS parms go into naming of macro
2848
2849module ifu_ftu_itd_dp_mux_macro__mux_pgpe__ports_3__stack_38c__width_37 (
2850 din0,
2851 din1,
2852 din2,
2853 sel0,
2854 sel1,
2855 muxtst,
2856 test,
2857 dout);
2858wire psel0;
2859wire psel1;
2860wire psel2;
2861
2862 input [36:0] din0;
2863 input [36:0] din1;
2864 input [36:0] din2;
2865 input sel0;
2866 input sel1;
2867 input muxtst;
2868 input test;
2869 output [36:0] dout;
2870
2871
2872
2873
2874
2875cl_dp1_penc3_8x c0_0 (
2876 .sel0(sel0),
2877 .sel1(sel1),
2878 .psel0(psel0),
2879 .psel1(psel1),
2880 .psel2(psel2),
2881 .test(test)
2882);
2883
2884mux3 #(37) d0_0 (
2885 .sel0(psel0),
2886 .sel1(psel1),
2887 .sel2(psel2),
2888 .in0(din0[36:0]),
2889 .in1(din1[36:0]),
2890 .in2(din2[36:0]),
2891.dout(dout[36:0]),
2892 .muxtst(muxtst)
2893);
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907endmodule
2908
2909
2910//
2911// nor macro for ports = 2,3
2912//
2913//
2914
2915
2916
2917
2918
2919module ifu_ftu_itd_dp_nor_macro__ports_2__width_1 (
2920 din0,
2921 din1,
2922 dout);
2923 input [0:0] din0;
2924 input [0:0] din1;
2925 output [0:0] dout;
2926
2927
2928
2929
2930
2931
2932nor2 #(1) d0_0 (
2933.in0(din0[0:0]),
2934.in1(din1[0:0]),
2935.out(dout[0:0])
2936);
2937
2938
2939
2940
2941
2942
2943
2944endmodule
2945
2946
2947
2948
2949
2950//
2951// and macro for ports = 2,3,4
2952//
2953//
2954
2955
2956
2957
2958
2959module ifu_ftu_itd_dp_and_macro__ports_2__width_1 (
2960 din0,
2961 din1,
2962 dout);
2963 input [0:0] din0;
2964 input [0:0] din1;
2965 output [0:0] dout;
2966
2967
2968
2969
2970
2971
2972and2 #(1) d0_0 (
2973.in0(din0[0:0]),
2974.in1(din1[0:0]),
2975.out(dout[0:0])
2976);
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986endmodule
2987
2988
2989
2990
2991
2992//
2993// and macro for ports = 2,3,4
2994//
2995//
2996
2997
2998
2999
3000
3001module ifu_ftu_itd_dp_and_macro__ports_2__stack_2l__width_1 (
3002 din0,
3003 din1,
3004 dout);
3005 input [0:0] din0;
3006 input [0:0] din1;
3007 output [0:0] dout;
3008
3009
3010
3011
3012
3013
3014and2 #(1) d0_0 (
3015.in0(din0[0:0]),
3016.in1(din1[0:0]),
3017.out(dout[0:0])
3018);
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028endmodule
3029
3030
3031
3032
3033
3034//
3035// and macro for ports = 2,3,4
3036//
3037//
3038
3039
3040
3041
3042
3043module ifu_ftu_itd_dp_and_macro__ports_3__stack_4l__width_1 (
3044 din0,
3045 din1,
3046 din2,
3047 dout);
3048 input [0:0] din0;
3049 input [0:0] din1;
3050 input [0:0] din2;
3051 output [0:0] dout;
3052
3053
3054
3055
3056
3057
3058and3 #(1) d0_0 (
3059.in0(din0[0:0]),
3060.in1(din1[0:0]),
3061.in2(din2[0:0]),
3062.out(dout[0:0])
3063);
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073endmodule
3074
3075
3076
3077