Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / fgu / rtl / fgu_fpf_dp.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: fgu_fpf_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 fgu_fpf_dp (
36 fad_rs1_fmt_fx1,
37 fad_rs2_fmt_fx1,
38 fad_rs1_fx1,
39 fad_rs2_fx1,
40 fad_r1_odd32b_fx1,
41 fad_fsr_tem_fx1_b4,
42 fpf_w1_result_fb,
43 fgu_exu_result_fx5,
44 fgd_result_fx5,
45 fpc_int_res_sel_fx4,
46 fpc_vis_cmp_result_fx5,
47 fpc_result_sel_fx5,
48 fpc_ovf_if_rcout_fx5,
49 fpc_ma_fmt_sel_fx4,
50 fpc_int_sel_fx5,
51 fpc_fconst_sel_fx5,
52 fpc_fp_cin00_fx2,
53 fpc_cin00_fx2,
54 fpc_cin16_48_fx2,
55 fpc_cin32_fx2,
56 fpc_prop16_48_fx2,
57 fpc_prop32_fx2,
58 fpc_mle_sel_fx2,
59 fpc_mse_sel_fx2,
60 fpc_sign_fx5,
61 fpc_sign_fb,
62 fpc_sp_dest_fx4,
63 fpc_fadd_eac_enable_fx2,
64 fpc_i2f_sel_fx1,
65 fpc_rinc_sel_fx5,
66 fpc_qthenan_fx4,
67 fpc_den2nor_sp_fb,
68 fpc_den2nor_dp_fb,
69 fpf_b_gteq_a_fx2,
70 fpf_b_eq_a_fx2,
71 fpf_hi_aof_fx1,
72 fpf_hi_bof_fx1,
73 fpf_lo_aof_fx1,
74 fpf_lo_bof_fx1,
75 fpf_azf0_fx1,
76 fpf_bzf0_fx1,
77 fpf_aoe0_fx1,
78 fpf_boe0_fx1,
79 fpf_aze0_fx1,
80 fpf_bze0_fx1,
81 fpf_ma_sum_fx4,
82 fpf_ma_cout_fx4,
83 fpf_cmp_swap_blta_fx2,
84 fpf_align_sticky_fx4_l,
85 fpf_byte_unsure_x_sp_fx3,
86 fpf_byte_unsure_x_dp_fx3,
87 fic_norm_eadj_fx5,
88 fic_i2f_align_sel_fx2,
89 fpf_rs2_cmp_din_fx1,
90 fpf_man_se_byte_fx3_b38_32,
91 fpf_man_se_byte_fx3_b6_0,
92 fgu_cmp_fcc_fx3,
93 fgu_cmp_fcc_vld_fx3,
94 fac_tlu_flush_fx3,
95 fac_fpx_sp_dest_fx1,
96 fac_fpx_sp_src_fx1,
97 fac_pre_fcc_vld_fx2,
98 fac_fcmpe_fx1,
99 fac_rs2_rotate_sel_e,
100 fac_i2f_sel_e,
101 fac_force_swap_blta_fx1,
102 fac_force_noswap_blta_fx1,
103 main_clken,
104 fgu_mul_result_fx5,
105 fpy_fp_result_fx4_b63,
106 fdc_finish_int_early,
107 fdd_result,
108 fpf_sa_xor_sb_fx1,
109 fpe_exp_res_fb,
110 fpe_align_sel_fx2,
111 fpf_rcout_fx5,
112 fpf_rcout_fb,
113 fpf_implied_bit_fx5,
114 fec_w1_ecc_inject_fb,
115 fpf_w1_synd_fb,
116 l2clk,
117 scan_in,
118 tcu_pce_ov,
119 spc_aclk,
120 spc_bclk,
121 tcu_dectest,
122 tcu_muxtest,
123 tcu_scan_en,
124 scan_out);
125wire stop;
126wire test;
127wire se;
128wire pce_ov;
129wire siclk;
130wire soclk;
131wire [63:32] rs1_cmp_din_fx1;
132wire fad_rs20_fx1_b63;
133wire fad_rs20_fx1_b31;
134wire [4:0] rs2_rotate_sel_fx1;
135wire [63:0] rs2_cmp_din_fx1;
136wire [63:0] rs1_cmp_din_fx1_;
137wire fac_force_swap_blta_fx1_;
138wire [15:0] cmp_bma3_unused;
139wire cmp_bma_cout3_fx1;
140wire [15:0] cmp_bma2_unused;
141wire cmp_bma_cout2_fx1;
142wire [15:0] cmp_bma1_unused;
143wire cmp_bma_cout1_fx1;
144wire [15:0] cmp_bma0_unused;
145wire cmp_bma_cout0_fx1;
146wire cmp_eq3_fx1;
147wire cmp_eq2_fx1;
148wire cmp_eq1_fx1;
149wire cmp_eq0_fx1;
150wire [2:0] cmp_i0_fx1;
151wire cmp_eq30_fx1;
152wire [2:0] cmp_i1_fx1;
153wire cmp_swap_blta_fx1;
154wire q_sign_beqa_fx1;
155wire [1:0] cmp_i3_fx1;
156wire cmp_i4_fx1;
157wire cmp_beqa_fx1;
158wire azf_fx1;
159wire bzf_fx1;
160wire bze_fx1;
161wire boe_fx1;
162wire aze_fx1;
163wire aoe_fx1;
164wire fpf_azf0_fx1_;
165wire fpf_bzf0_fx1_;
166wire fac_fpx_sp_src_fx1_;
167wire fad_rs1_fmt_fx1_b62_;
168wire fad_rs2_fmt_fx1_b62_;
169wire [54:52] rs2_exp_qual1_fx1;
170wire [54:52] rs1_exp_qual1_fx1;
171wire [54:52] rs2_exp_qual0_fx1;
172wire [54:52] rs1_exp_qual0_fx1;
173wire i_rs1_snan_src_fx1;
174wire i_rs2_snan_src_fx1;
175wire nan_src_fx1;
176wire snan_src_fx1;
177wire zero_eq_zero_fx1_;
178wire cmp_swap_blta_fx1_;
179wire fcmpe_fx1_;
180wire [63:63] fpf_rs2_cmp_din_fx1_;
181wire cmp_i7_1_fx1;
182wire cmp_i8_fx1;
183wire cmp_i7_0_fx1;
184wire cmp_blta_fx1;
185wire cmp_bgta_fx1;
186wire fx2_swp_le_scanin;
187wire fx2_swp_le_scanout;
188wire [63:0] man_le_fx2;
189wire fx2_swp_se_scanin;
190wire fx2_swp_se_scanout;
191wire [63:0] man_se_fx2;
192wire fx2_fcc_scanin;
193wire fx2_fcc_scanout;
194wire [1:0] i2f_sel_fx1;
195wire nan_src_fx2;
196wire cmp_blta_fx2;
197wire cmp_bgta_fx2;
198wire zero_eq_zero_fx2_;
199wire fcmpe_fx2_;
200wire snan_src_fx2;
201wire fsr_tem_nvm_fx2;
202wire fcmpe_fx2;
203wire [3:0] i2f_sel_fx2;
204wire sp_dest_fx2;
205wire [1:0] fcc_fx2;
206wire fcmp_nv_trap_fx2_;
207wire fcmpe_nv_trap_fx2_;
208wire v9cmp_nv_trap_fx2;
209wire [63:0] man_se_byte_fx2;
210wire [6:0] man_se_byte_fx2_;
211wire [55:0] man_se_fx2_;
212wire [6:0] q_man_se_byte_fx2;
213wire [55:0] q_man_se_fx2;
214wire [5:0] asel_i0_fx2;
215wire [5:0] asel_i1_fx2;
216wire [5:0] merged_align_sel_fx2;
217wire tcu_muxtest_b_rep0;
218wire [63:0] man_se_bit_fx2;
219wire [63:40] q2_man_se_fx2;
220wire [44:38] q2_man_se_byte_fx2;
221wire [52:0] man_se_byte_sticky_fx2;
222wire [1:0] byte_unsure_x_sp_fx2;
223wire [1:0] byte_unsure_x_dp_fx2;
224wire tcu_muxtest_c_rep0;
225wire [13:0] man_se_bit_sticky_fx2;
226wire add_byte_sticky_fx2_l;
227wire fx3_mle_scanin;
228wire fx3_mle_scanout;
229wire [63:0] man_le_fx3;
230wire fx3_mse_scanin;
231wire fx3_mse_scanout;
232wire [63:0] man_se_bit_fx3;
233wire fx3_fcc_scanin;
234wire fx3_fcc_scanout;
235wire ma_cout_fx3;
236wire prop32_fx3;
237wire align_sticky_fx3_l;
238wire fadd_eac_enable_fx3;
239wire fp_cin00_fx3;
240wire cin00_fx3;
241wire cin16_48_fx3;
242wire cin32_fx3;
243wire prop16_48_fx3;
244wire prop32_fx4;
245wire mle_sel_fx3;
246wire [2:0] mse_sel_fx3;
247wire [3:0] pre_fcc_vld_fx3;
248wire v9cmp_nv_trap_fx3;
249wire add_byte_sticky_fx3_l;
250wire [13:0] man_se_bit_sticky_fx3;
251wire v9cmp_nv_trap_fx3_;
252wire fac_tlu_flush_fx3_;
253wire [63:0] man_se_bit_fx3_;
254wire [63:0] final_man_le_fx3;
255wire tcu_muxtest_d_rep0;
256wire [63:0] final_man_se_fx3;
257wire final_fp_cin00_fx3;
258wire ma16_cout07_fx3;
259wire final_cin16_48_i0_fx3;
260wire ma16_cout47_fx3;
261wire final_cin16_48_i2_fx3;
262wire final_cin16_48_i1_fx3;
263wire final_cin16_48_i3_fx3;
264wire final_cin16_fx3;
265wire final_cin48_fx3;
266wire [63:0] ma16_sum_fx3;
267wire ma16_cout31_unused;
268wire ma16_cout63_unused;
269wire [63:0] ma64_sum_fx3;
270wire fx4_ma64_sum_scanin;
271wire fx4_ma64_sum_scanout;
272wire fx4_ma16_sum_scanin;
273wire fx4_ma16_sum_scanout;
274wire [63:0] ma16_sum_fx4;
275wire [63:0] final_ma_sum_fx4;
276wire [62:62] ma_sum_quiet_fx4;
277wire fx5_sum_scanin;
278wire fx5_sum_scanout;
279wire [63:0] ma_sum_fx5;
280wire fx5_ma_fmt_sel_scanin;
281wire fx5_ma_fmt_sel_scanout;
282wire [5:0] int_res_sel_fx5;
283wire [4:0] ma_fmt_sel_fx5;
284wire fp_result_fx5_b63;
285wire sp_dest_fx5;
286wire tcu_muxtest_e_rep0;
287wire [63:0] unnorm_inter_res_fx5;
288wire tcu_muxtest_f_rep0;
289wire [39:11] pad_inc_fx5;
290wire tcu_muxtest_g_rep0;
291wire [62:4] norm_byte_fx5;
292wire tcu_muxtest_h_rep0;
293wire [62:11] norm_bit_fx5;
294wire [10:0] minc_unused;
295wire [51:0] inc_inter_res_fx5;
296wire [62:11] nrd_res_fx5;
297wire [63:0] int_data_fx5;
298wire fb_int_fconst_scanin;
299wire fb_int_fconst_scanout;
300wire [63:0] int_fconst_res_fb;
301wire [63:0] int_result_fx5;
302wire [63:0] int_result0_fx5;
303wire [4:2] q_result_sel_fx5;
304wire fb_nrd_scanin;
305wire fb_nrd_scanout;
306wire [5:0] result_sel_fb;
307wire [62:11] nrd_res_fb;
308wire fb_fgd_scanin;
309wire fb_fgd_scanout;
310wire [63:0] fgd_result_fb;
311wire emin_sp_fb;
312wire emin_dp_fb;
313wire tcu_muxtest_i_rep0;
314wire [63:0] w1_result_fb;
315wire [13:0] w1_synd_fb;
316
317
318
319// ----------------------------------------------------------------------------
320// Interface with FAD
321// ----------------------------------------------------------------------------
322
323input [63:0] fad_rs1_fmt_fx1; // rs1 formatted
324input [63:0] fad_rs2_fmt_fx1; // rs2 formatted
325input [63:0] fad_rs1_fx1; // rs1 unformatted
326input [63:0] fad_rs2_fx1; // rs2 unformatted
327input fad_r1_odd32b_fx1;
328input fad_fsr_tem_fx1_b4; // NVM
329
330output [63:0] fpf_w1_result_fb; // FPX result
331
332// ----------------------------------------------------------------------------
333// Interface with EXU
334// ----------------------------------------------------------------------------
335
336output [63:0] fgu_exu_result_fx5; // FGU result for EXU{1,0}
337
338// ----------------------------------------------------------------------------
339// Interface with FGD
340// ----------------------------------------------------------------------------
341
342input [63:0] fgd_result_fx5; // FGX result
343
344// ----------------------------------------------------------------------------
345// Interface with FPC
346// ----------------------------------------------------------------------------
347
348input [5:1] fpc_int_res_sel_fx4;
349input [3:0] fpc_vis_cmp_result_fx5; // vis cmp result data
350input [5:0] fpc_result_sel_fx5; // result select
351input [1:0] fpc_ovf_if_rcout_fx5; // result select qualification for rcout
352input [4:0] fpc_ma_fmt_sel_fx4;
353input [3:0] fpc_int_sel_fx5;
354input [4:0] fpc_fconst_sel_fx5;
355input fpc_fp_cin00_fx2; // main adder control
356input fpc_cin00_fx2; // main adder control
357input fpc_cin16_48_fx2; // main adder control
358input fpc_cin32_fx2; // main adder control
359input fpc_prop16_48_fx2; // main adder control
360input fpc_prop32_fx2; // main adder control
361input fpc_mle_sel_fx2;
362input [2:0] fpc_mse_sel_fx2;
363input fpc_sign_fx5; // result sign
364input fpc_sign_fb; // result sign
365input fpc_sp_dest_fx4; // SP result dest
366input fpc_fadd_eac_enable_fx2;
367input [3:2] fpc_i2f_sel_fx1; // 10=F(i,x)TO(s,d) 2's comp, 01=F(i,x)TO(s,d) not 2's comp
368input fpc_rinc_sel_fx5;
369input fpc_qthenan_fx4; // quiet the propagating NaN, set frac MSB=1
370input fpc_den2nor_sp_fb; // denorm intermediate result rounded to norm
371input fpc_den2nor_dp_fb; // denorm intermediate result rounded to norm
372output [3:0] fpf_b_gteq_a_fx2; // FCMP (B-A) cout, doesn't account for MSB
373output [3:0] fpf_b_eq_a_fx2; // FCMP (B=A), doesn't account for MSB
374output fpf_hi_aof_fx1;
375output fpf_hi_bof_fx1;
376output fpf_lo_aof_fx1;
377output fpf_lo_bof_fx1;
378output fpf_azf0_fx1; // rs1[62:0]==63'b0, must acct for rs1[63]
379output fpf_bzf0_fx1; // rs2[62:0]==63'b0, must acct for rs2[63]
380output fpf_aoe0_fx1;
381output fpf_boe0_fx1;
382output fpf_aze0_fx1;
383output fpf_bze0_fx1;
384output [63:0] fpf_ma_sum_fx4; // main adder sum
385output fpf_ma_cout_fx4; // main adder cout
386output fpf_cmp_swap_blta_fx2;
387output fpf_align_sticky_fx4_l;
388output [1:0] fpf_byte_unsure_x_sp_fx3;
389output [1:0] fpf_byte_unsure_x_dp_fx3;
390
391// ----------------------------------------------------------------------------
392// Interface with FIC
393// ----------------------------------------------------------------------------
394
395input [5:0] fic_norm_eadj_fx5;
396input [5:0] fic_i2f_align_sel_fx2;
397output [63:0] fpf_rs2_cmp_din_fx1; // rt. justified rs2 for F(i,x)TO(s,d)
398output [38:32] fpf_man_se_byte_fx3_b38_32;
399output [6:0] fpf_man_se_byte_fx3_b6_0;
400
401// ----------------------------------------------------------------------------
402// Interface with DEC
403// ----------------------------------------------------------------------------
404
405output [1:0] fgu_cmp_fcc_fx3; // fcc data {fcc3, fcc2, fcc1, fcc0}
406output [3:0] fgu_cmp_fcc_vld_fx3; // fcc data valid
407
408// ----------------------------------------------------------------------------
409// Interface with FAC
410// ----------------------------------------------------------------------------
411
412input fac_tlu_flush_fx3;
413input fac_fpx_sp_dest_fx1; // SP result dest
414input fac_fpx_sp_src_fx1; // SP source
415input [3:0] fac_pre_fcc_vld_fx2; // must clear fcc_vld if (nv & TEM) | flush
416input fac_fcmpe_fx1; // FCMPE, not FCMP
417input [4:0] fac_rs2_rotate_sel_e; // 00001=odd FiTO(s,d), 00010=even FiTO(s,d), 00100=FiTO(s,d), 01000=rs2_odd32b, 10000=~rs2_odd32b
418input [1:0] fac_i2f_sel_e; // 01=F(i,x)TO(s,d), 10=~F(i,x)TO(s,d)
419input fac_force_swap_blta_fx1; // force the swap_blta condition
420input fac_force_noswap_blta_fx1; // force the ~swap_blta condition
421
422input main_clken; // main clken
423
424// ----------------------------------------------------------------------------
425// Interface with FPY
426// ----------------------------------------------------------------------------
427
428input [63:0] fgu_mul_result_fx5;
429input fpy_fp_result_fx4_b63;
430
431// ----------------------------------------------------------------------------
432// Interface with FDC
433// ----------------------------------------------------------------------------
434
435input fdc_finish_int_early;
436
437// ----------------------------------------------------------------------------
438// Interface with FDD
439// ----------------------------------------------------------------------------
440
441input [63:0] fdd_result;
442output fpf_sa_xor_sb_fx1;
443
444// ----------------------------------------------------------------------------
445// Interface with FPE
446// ----------------------------------------------------------------------------
447
448input [10:0] fpe_exp_res_fb;
449input [5:0] fpe_align_sel_fx2;
450output fpf_rcout_fx5;
451output fpf_rcout_fb;
452output fpf_implied_bit_fx5;
453
454// ----------------------------------------------------------------------------
455// Interface with FEC
456// ----------------------------------------------------------------------------
457
458input [6:0] fec_w1_ecc_inject_fb; // ECC error injection
459
460// ----------------------------------------------------------------------------
461// Interface with FRF
462// ----------------------------------------------------------------------------
463
464output [13:0] fpf_w1_synd_fb; // ECC generation for w1 result
465
466// ----------------------------------------------------------------------------
467// Global Signals
468// ----------------------------------------------------------------------------
469
470input l2clk; // clock input
471input scan_in;
472input tcu_pce_ov; // scan signals
473input spc_aclk;
474input spc_bclk;
475input tcu_dectest;
476input tcu_muxtest;
477input tcu_scan_en;
478
479output scan_out;
480
481// scan renames
482assign stop = 1'b0;
483assign test = tcu_dectest;
484// end scan
485
486fgu_fpf_dp_buff_macro__dbuff_32x__rep_1__width_4 test_rep0 (
487 .din ({tcu_scan_en, tcu_pce_ov, spc_aclk, spc_bclk}),
488 .dout({se, pce_ov, siclk, soclk })
489 );
490
491
492// ----------------------------------------------------------------------------
493// FX1 stage
494// ----------------------------------------------------------------------------
495
496// ------------------------------------
497// rs1/rs2 compare logic
498// - V9 fp compares (generate fcc): FCMP(s,d), FCMPE(s,d)
499// - VIS partitioned compares: FCMPEQ(16,32), FCMPGT(16,32), FCMPLE(16,32), FCMPNE(16,32)
500// - V9 swap determination
501// ------------------------------------
502
503fgu_fpf_dp_mux_macro__mux_pgpe__ports_2__width_32 rs1_rotate (
504 .din0(fad_rs1_fx1[31:0]),
505 .din1(fad_rs1_fx1[63:32]),
506 .sel0(fad_r1_odd32b_fx1),
507 .dout(rs1_cmp_din_fx1[63:32])
508 );
509
510fgu_fpf_dp_buff_macro__width_2 buf_sign (
511 .din ({fad_rs2_fx1[63], fad_rs2_fx1[31] }),
512 .dout({fad_rs20_fx1_b63, fad_rs20_fx1_b31})
513 );
514
515fgu_fpf_dp_mux_macro__dmux_6x__mux_aonpe__ports_4__width_64 rs2_rotate (
516 .din0({{32{fad_rs20_fx1_b31}}, fad_rs2_fx1[31:0]}), // odd FiTO(s,d), rt. justified & sign extended rs2
517 .din1({{32{fad_rs20_fx1_b63}}, fad_rs2_fx1[63:32]}), // even FiTO(s,d), rt. justified & sign extended rs2
518 .din2({fad_rs2_fx1[31:0], 32'b0}),
519 .din3( fad_rs2_fx1[63:0] ),
520 .sel0(rs2_rotate_sel_fx1[0]),
521 .sel1(rs2_rotate_sel_fx1[1]),
522 .sel2(rs2_rotate_sel_fx1[3]),
523 .sel3(rs2_rotate_sel_fx1[4]),
524 .dout( rs2_cmp_din_fx1[63:0])
525 );
526
527fgu_fpf_dp_buff_macro__width_64 buf_rs2_rotate (
528 .din ( rs2_cmp_din_fx1[63:0]),
529 .dout(fpf_rs2_cmp_din_fx1[63:0])
530 );
531
532fgu_fpf_dp_inv_macro__width_64 inv_rs1 (
533 .din ({rs1_cmp_din_fx1[63:32], fad_rs1_fx1[31:0]}),
534 .dout(rs1_cmp_din_fx1_[63:0])
535 );
536
537fgu_fpf_dp_cla_macro__width_16 cmp_bma3 (
538 .din0({fac_force_swap_blta_fx1_, rs1_cmp_din_fx1_[62:48]}), // ignore sign bit for swap calculation
539 .din1({fac_force_noswap_blta_fx1, fpf_rs2_cmp_din_fx1[62:48] }), // ignore sign bit for swap calculation
540 .cin (1'b1),
541 .dout(cmp_bma3_unused[15:0]),
542 .cout(cmp_bma_cout3_fx1)
543 );
544
545fgu_fpf_dp_cla_macro__width_16 cmp_bma2 (
546 .din0( rs1_cmp_din_fx1_[47:32]),
547 .din1(fpf_rs2_cmp_din_fx1[47:32] ),
548 .cin (1'b1),
549 .dout(cmp_bma2_unused[15:0]),
550 .cout(cmp_bma_cout2_fx1)
551 );
552
553fgu_fpf_dp_cla_macro__width_16 cmp_bma1 (
554 .din0(rs1_cmp_din_fx1_[31:16]),
555 .din1(fad_rs2_fx1[31:16] ),
556 .cin (1'b1),
557 .dout(cmp_bma1_unused[15:0]),
558 .cout(cmp_bma_cout1_fx1)
559 );
560
561fgu_fpf_dp_cla_macro__width_16 cmp_bma0 (
562 .din0(rs1_cmp_din_fx1_[15:0]),
563 .din1(fad_rs2_fx1[15:0] ),
564 .cin (1'b1),
565 .dout(cmp_bma0_unused[15:0]),
566 .cout(cmp_bma_cout0_fx1)
567 );
568
569fgu_fpf_dp_cmp_macro__width_16 cmp_eq3 (
570 .din0({fac_force_swap_blta_fx1, rs1_cmp_din_fx1[62:48]}), // ignore sign bit for swap calculation
571 .din1({fac_force_noswap_blta_fx1, fpf_rs2_cmp_din_fx1[62:48]}), // ignore sign bit for swap calculation
572 .dout(cmp_eq3_fx1)
573 );
574
575fgu_fpf_dp_cmp_macro__width_16 cmp_eq2 (
576 .din0( rs1_cmp_din_fx1[47:32]),
577 .din1(fpf_rs2_cmp_din_fx1[47:32]),
578 .dout(cmp_eq2_fx1)
579 );
580
581fgu_fpf_dp_cmp_macro__width_16 cmp_eq1 (
582 .din0(fad_rs1_fx1[31:16]),
583 .din1(fad_rs2_fx1[31:16]),
584 .dout(cmp_eq1_fx1)
585 );
586
587fgu_fpf_dp_cmp_macro__width_16 cmp_eq0 (
588 .din0(fad_rs1_fx1[15:0]),
589 .din1(fad_rs2_fx1[15:0]),
590 .dout(cmp_eq0_fx1)
591 );
592
593// ------------------------------------
594// V9 swap determination (B<A)
595// - doesn't account for sign bits or nan source(s)
596// ------------------------------------
597
598fgu_fpf_dp_nor_macro__ports_2__width_3 cmp_i0 (
599 .din0({1'b0, fac_fpx_sp_dest_fx1, fac_fpx_sp_dest_fx1}),
600 .din1({cmp_bma_cout2_fx1, cmp_bma_cout1_fx1, cmp_bma_cout0_fx1 }),
601 .dout(cmp_i0_fx1[2:0])
602 );
603
604fgu_fpf_dp_nand_macro__ports_4__width_4 cmp_i1 (
605 .din0({cmp_bma_cout3_fx1, cmp_eq30_fx1, cmp_eq30_fx1, cmp_eq30_fx1 }),
606 .din1({cmp_i1_fx1[0], cmp_i0_fx1[2], cmp_eq2_fx1, cmp_eq2_fx1 }),
607 .din2({cmp_i1_fx1[1], 1'b1, cmp_i0_fx1[1], cmp_eq1_fx1 }),
608 .din3({cmp_i1_fx1[2], 1'b1, 1'b1, cmp_i0_fx1[0]}),
609 .dout({cmp_swap_blta_fx1, // not yet qual w/ sign bits and nan source(s)
610 cmp_i1_fx1[2:0]})
611 );
612
613// ------------------------------------
614// V9 equal determination (A=B)
615// - doesn't account nan source(s)
616// ------------------------------------
617
618fgu_fpf_dp_xnor_macro__ports_2__width_1 cmp_i2 (
619 .din0( rs1_cmp_din_fx1[63]),
620 .din1(fpf_rs2_cmp_din_fx1[63]),
621 .dout(q_sign_beqa_fx1)
622 );
623
624fgu_fpf_dp_inv_macro__width_1 div_i1 (
625 .din (q_sign_beqa_fx1),
626 .dout(fpf_sa_xor_sb_fx1) // required by fdd
627 );
628
629fgu_fpf_dp_or_macro__ports_2__width_2 cmp_i3 (
630 .din0({cmp_eq1_fx1, cmp_eq0_fx1 }),
631 .din1({fac_fpx_sp_dest_fx1, fac_fpx_sp_dest_fx1}),
632 .dout(cmp_i3_fx1[1:0])
633 );
634
635fgu_fpf_dp_and_macro__ports_4__width_2 cmp_i4 (
636 .din0({cmp_eq2_fx1, cmp_i3_fx1[0] }),
637 .din1({cmp_eq30_fx1, cmp_i3_fx1[1] }),
638 .din2({1'b1, cmp_i4_fx1 }),
639 .din3({1'b1, q_sign_beqa_fx1}),
640 .dout({cmp_i4_fx1, cmp_beqa_fx1 }) // not yet qual w/ nan source(s)
641 );
642
643// ------------------------------------
644// Detect all zeros fraction (OF) (for intermediate denorm round to norm cases only)
645// all zeros fraction (ZF)
646// all ones exponent (OE)
647// all zeros exponent (ZE)
648// for each source (rs1,rs2)
649// ------------------------------------
650
651fgu_fpf_dp_cmp_macro__width_32 hi_aof (
652 .din0({fad_rs1_fmt_fx1[62:40], 9'b0}), // exclude implied bit
653 .din1({23'h7fffff, 9'b0}),
654 .dout(fpf_hi_aof_fx1)
655 );
656
657fgu_fpf_dp_cmp_macro__width_32 hi_bof (
658 .din0({fad_rs2_fmt_fx1[62:40], 9'b0}), // exclude implied bit
659 .din1({23'h7fffff, 9'b0}),
660 .dout(fpf_hi_bof_fx1)
661 );
662
663fgu_fpf_dp_cmp_macro__width_32 lo_aof (
664 .din0({fad_rs1_fmt_fx1[39:11], 3'b0}), // exclude implied bit
665 .din1({29'h1fffffff, 3'b0}),
666 .dout(fpf_lo_aof_fx1)
667 );
668
669fgu_fpf_dp_cmp_macro__width_32 lo_bof (
670 .din0({fad_rs2_fmt_fx1[39:11], 3'b0}), // exclude implied bit
671 .din1({29'h1fffffff, 3'b0}),
672 .dout(fpf_lo_bof_fx1)
673 );
674
675fgu_fpf_dp_zero_macro__width_64 azf (
676 .din ({1'b0, fad_rs1_fmt_fx1[62:0]}), // exclude implied bit
677 .dout(azf_fx1)
678 );
679
680fgu_fpf_dp_zero_macro__width_64 bzf (
681 .din ({1'b0, fad_rs2_fmt_fx1[62:0]}), // exclude implied bit
682 .dout(bzf_fx1)
683 );
684
685fgu_fpf_dp_buff_macro__width_7 buff_cmp (
686 .din ({ bze_fx1, boe_fx1, bzf_fx1, aze_fx1, aoe_fx1, azf_fx1, cmp_eq3_fx1 }),
687 .dout({fpf_bze0_fx1, fpf_boe0_fx1, fpf_bzf0_fx1, fpf_aze0_fx1, fpf_aoe0_fx1, fpf_azf0_fx1, cmp_eq30_fx1})
688 );
689
690fgu_fpf_dp_inv_macro__width_6 inv_zf (
691 .din ({fpf_azf0_fx1,
692 fpf_bzf0_fx1,
693 fac_fpx_sp_src_fx1,
694 fac_force_swap_blta_fx1,
695 fad_rs1_fmt_fx1[62],
696 fad_rs2_fmt_fx1[62]}),
697 .dout({fpf_azf0_fx1_,
698 fpf_bzf0_fx1_,
699 fac_fpx_sp_src_fx1_,
700 fac_force_swap_blta_fx1_,
701 fad_rs1_fmt_fx1_b62_,
702 fad_rs2_fmt_fx1_b62_})
703 );
704
705fgu_fpf_dp_or_macro__ports_2__width_6 cmp_i5a ( // set 3 exponent LSBs to 3'b111 if SP
706 .din0({fpf_rs2_cmp_din_fx1[54:52], rs1_cmp_din_fx1[54:52] }),
707 .din1({6{fac_fpx_sp_src_fx1} }),
708 .dout({rs2_exp_qual1_fx1[54:52], rs1_exp_qual1_fx1[54:52]})
709 );
710
711fgu_fpf_dp_cmp_macro__width_12 aoe (
712 .din0({1'b1, rs1_cmp_din_fx1[62:55], rs1_exp_qual1_fx1[54:52]}),
713 .din1(12'b111111111111),
714 .dout(aoe_fx1)
715 );
716
717fgu_fpf_dp_cmp_macro__width_12 boe (
718 .din0({1'b1, fpf_rs2_cmp_din_fx1[62:55], rs2_exp_qual1_fx1[54:52]}),
719 .din1(12'b111111111111),
720 .dout(boe_fx1)
721 );
722
723fgu_fpf_dp_and_macro__ports_2__width_8 cmp_i5b ( // set 3 exponent LSBs to 3'b000 if SP
724 .din0({fpf_rs2_cmp_din_fx1[54:52], rs1_cmp_din_fx1[54:52], fad_rs1_fmt_fx1_b62_, fad_rs2_fmt_fx1_b62_}),
725 .din1({{6{fac_fpx_sp_src_fx1_}}, fpf_aoe0_fx1, fpf_boe0_fx1 }),
726 .dout({rs2_exp_qual0_fx1[54:52], rs1_exp_qual0_fx1[54:52], i_rs1_snan_src_fx1, i_rs2_snan_src_fx1 })
727 );
728
729fgu_fpf_dp_zero_macro__width_12 aze (
730 .din ({1'b0, rs1_cmp_din_fx1[62:55], rs1_exp_qual0_fx1[54:52]}),
731 .dout(aze_fx1)
732 );
733
734fgu_fpf_dp_zero_macro__width_12 bze (
735 .din ({1'b0, fpf_rs2_cmp_din_fx1[62:55], rs2_exp_qual0_fx1[54:52]}),
736 .dout(bze_fx1)
737 );
738
739fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_1 nan (
740 .din0(fpf_aoe0_fx1),
741 .din1(fpf_boe0_fx1),
742 .sel0(fpf_azf0_fx1_),
743 .sel1(fpf_bzf0_fx1_),
744 .dout(nan_src_fx1)
745 );
746
747fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_1 qnan (
748 .din0(fpf_azf0_fx1_),
749 .din1(fpf_bzf0_fx1_),
750 .sel0(i_rs1_snan_src_fx1),
751 .sel1(i_rs2_snan_src_fx1),
752 .dout(snan_src_fx1)
753 );
754
755fgu_fpf_dp_nand_macro__ports_4__width_1 twozeros (
756 .din0(fpf_azf0_fx1),
757 .din1(fpf_bzf0_fx1),
758 .din2(fpf_aze0_fx1),
759 .din3(fpf_bze0_fx1),
760 .dout(zero_eq_zero_fx1_)
761 );
762
763// ------------------------------------
764// V9 fp compares (generate fcc)
765//
766// fcc[1:0] relation
767// -------------------
768// 00 rs1=rs2 (A=B)
769// 01 rs1<rs2 (A<B, B>A)
770// 10 rs1>rs2 (A>B, B<A)
771// 11 NaN source(s)
772//
773// first qualify V9 swap determination (swap_blta) with sign bits (Sa,Sb)
774// to generate true B<A (blta) for fcc usage
775//
776// Sb Sa beqa swap_blta blta
777// -----------------------------
778// 0 0 x 0 0
779// 0 1 0* 0 0
780// 1 0 0* 0 1 (set blta if Sb>Sa)
781// 1 1 0 0 1 (flip swap_blta if Sa=Sb=1 & B!=A)
782// 1 1 1 0 0
783// 0 0 x 1 1
784// 0 1 0* 1 0 (clear blta if Sb not >= Sa)
785// 1 0 0* 1 1
786// 1 1 x 1 0 (flip swap_blta if Sa=Sb=1)
787//
788// * must be 0 by definition of beqa
789// ------------------------------------
790
791fgu_fpf_dp_inv_macro__width_3 cmp_i6 (
792 .din ({cmp_swap_blta_fx1,
793 fac_fcmpe_fx1,
794 fpf_rs2_cmp_din_fx1[63]}),
795 .dout({cmp_swap_blta_fx1_,
796 fcmpe_fx1_,
797 fpf_rs2_cmp_din_fx1_[63]})
798 );
799
800fgu_fpf_dp_nand_macro__ports_2__width_3 cmp_i7 ( // equiv function: width=1,ports=2,mux=aonpe,buffsel=none
801 .din0({cmp_swap_blta_fx1_, cmp_swap_blta_fx1, cmp_i7_1_fx1}),
802 .din1({cmp_i8_fx1, rs1_cmp_din_fx1_[63], cmp_i7_0_fx1}),
803 .dout({cmp_i7_1_fx1, cmp_i7_0_fx1, cmp_blta_fx1})
804 );
805
806fgu_fpf_dp_nor_macro__ports_2__width_2 cmp_i8 (
807 .din0({cmp_blta_fx1, fpf_rs2_cmp_din_fx1_[63]}),
808 .din1({cmp_beqa_fx1, cmp_beqa_fx1 }),
809 .dout({cmp_bgta_fx1, // B>A = ~(B<A) & ~(B=A), not yet qual w/ nan source(s)
810 cmp_i8_fx1})
811 );
812
813// ------------------------------------
814// Mantissa swap muxes
815// ------------------------------------
816
817// produce mantissa with larger exp (man_le)
818
819fgu_fpf_dp_msff_macro__mux_aope__ports_2__width_64 fx2_swp_le (
820 .scan_in(fx2_swp_le_scanin),
821 .scan_out(fx2_swp_le_scanout),
822 .clk (l2clk),
823 .en (main_clken),
824 .din0(fad_rs1_fmt_fx1[63:0]),
825 .din1(fad_rs2_fmt_fx1[63:0]),
826 .sel0(cmp_swap_blta_fx1), // if (B<A) then rs1=man_le
827 .dout(man_le_fx2[63:0]),
828 .se(se),
829 .siclk(siclk),
830 .soclk(soclk),
831 .pce_ov(pce_ov),
832 .stop(stop)
833 );
834
835// produce mantissa with smaller exp (man_se)
836fgu_fpf_dp_msff_macro__mux_aope__ports_3__width_64 fx2_swp_se (
837 .scan_in(fx2_swp_se_scanin),
838 .scan_out(fx2_swp_se_scanout),
839 .clk (l2clk),
840 .en (main_clken),
841 .din0(fpf_rs2_cmp_din_fx1[63:0]),
842 .din1(fad_rs2_fmt_fx1[63:0]),
843 .din2(fad_rs1_fmt_fx1[63:0]),
844 .sel0(rs2_rotate_sel_fx1[2]), // FiTO(s,d) selects rt. justified rs2
845 .sel1(cmp_swap_blta_fx1), // if (B<A) then rs2=man_se
846 .dout(man_se_fx2[63:0]),
847 .se(se),
848 .siclk(siclk),
849 .soclk(soclk),
850 .pce_ov(pce_ov),
851 .stop(stop)
852 );
853
854// ----------------------------------------------------------------------------
855// FX2 stage
856// ----------------------------------------------------------------------------
857
858fgu_fpf_dp_msff_macro__width_29 fx2_fcc (
859 .scan_in(fx2_fcc_scanin),
860 .scan_out(fx2_fcc_scanout),
861 .clk (l2clk),
862 .en (main_clken),
863 .din ({cmp_bma_cout3_fx1, cmp_bma_cout2_fx1, cmp_bma_cout1_fx1, cmp_bma_cout0_fx1,
864 cmp_eq30_fx1, cmp_eq2_fx1, cmp_eq1_fx1, cmp_eq0_fx1,
865 nan_src_fx1, cmp_blta_fx1, cmp_bgta_fx1,
866 zero_eq_zero_fx1_,
867 fcmpe_fx1_, snan_src_fx1, fad_fsr_tem_fx1_b4, fac_fcmpe_fx1,
868 i2f_sel_fx1[1:0], fpc_i2f_sel_fx1[3:2], cmp_swap_blta_fx1,
869 fac_fpx_sp_dest_fx1, fac_i2f_sel_e[1:0], fac_rs2_rotate_sel_e[4:0]}),
870 .dout({fpf_b_gteq_a_fx2[3:0],
871 fpf_b_eq_a_fx2[3:0],
872 nan_src_fx2, cmp_blta_fx2, cmp_bgta_fx2,
873 zero_eq_zero_fx2_,
874 fcmpe_fx2_, snan_src_fx2, fsr_tem_nvm_fx2, fcmpe_fx2,
875 i2f_sel_fx2[1:0], i2f_sel_fx2[3:2], fpf_cmp_swap_blta_fx2,
876 sp_dest_fx2, i2f_sel_fx1[1:0], rs2_rotate_sel_fx1[4:0]}),
877 .se(se),
878 .siclk(siclk),
879 .soclk(soclk),
880 .pce_ov(pce_ov),
881 .stop(stop)
882 );
883
884// ------------------------------------
885// generate final V9 fp compares data result and valid
886// - clear fcc valid if (nv & TEM)
887// - clear fcc valid if flush (handled in FAC)
888// ------------------------------------
889
890fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_2 cmp_fcc (
891 .din0({nan_src_fx2, nan_src_fx2 }), // NaN source(s) detected
892 .din1({cmp_blta_fx2, cmp_bgta_fx2}), // fcmp data
893 .sel0(zero_eq_zero_fx2_), // must clear fcc[1:0] if A=B=0 (+0=-0)
894 .sel1(zero_eq_zero_fx2_), // must clear fcc[1:0] if A=B=0 (+0=-0)
895 .dout(fcc_fx2[1:0])
896 );
897
898fgu_fpf_dp_nand_macro__ports_4__width_3 cmp_i10 (
899 .din0({fcmpe_fx2_, fcmpe_fx2, fcmp_nv_trap_fx2_ }),
900 .din1({nan_src_fx2, nan_src_fx2, fcmpe_nv_trap_fx2_}),
901 .din2({snan_src_fx2, 1'b1, 1'b1 }),
902 .din3({fsr_tem_nvm_fx2, fsr_tem_nvm_fx2, 1'b1 }),
903 .dout({fcmp_nv_trap_fx2_, fcmpe_nv_trap_fx2_, v9cmp_nv_trap_fx2 })
904 );
905
906// ------------------------------------
907// Aligner
908//
909// Note: i2f uses aligner to perform a left shift
910// by organizing the aligner as a rotator.
911// If i2f then bring shifted off bits into msb.
912// If not i2f then shift 0s into msb.
913// ------------------------------------
914
915fgu_fpf_dp_inv_macro__width_63 inv_i2f (
916 .din ({man_se_byte_fx2[6:0], man_se_fx2[55:0] }),
917 .dout({man_se_byte_fx2_[6:0], man_se_fx2_[55:0]})
918 );
919
920fgu_fpf_dp_mux_macro__dmux_6x__mux_aonpe__ports_2__width_63 mux_i2f (
921 .din0({ man_se_byte_fx2[6:0], man_se_fx2[55:0] }),
922 .din1({ man_se_byte_fx2_[6:0], man_se_fx2_[55:0]}),
923 .sel0(i2f_sel_fx2[2]),
924 .sel1(i2f_sel_fx2[3]),
925 .dout({q_man_se_byte_fx2[6:0], q_man_se_fx2[55:0] })
926 );
927
928fgu_fpf_dp_nand_macro__ports_2__width_18 asel ( // equiv function: width=6,ports=2,mux=aonpe,buffsel=none
929 .din0({fpe_align_sel_fx2[5:0], fic_i2f_align_sel_fx2[5:0], asel_i0_fx2[5:0] }),
930 .din1({{6{i2f_sel_fx2[1]}}, {6{i2f_sel_fx2[0]}}, asel_i1_fx2[5:0] }),
931 .dout({asel_i0_fx2[5:0], asel_i1_fx2[5:0], merged_align_sel_fx2[5:0]})
932 );
933
934fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_b_rep0 (
935 .din (tcu_muxtest ),
936 .dout(tcu_muxtest_b_rep0)
937 );
938
939// byte mux
940fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_64 abyte (
941 .muxtst(tcu_muxtest_b_rep0),
942 .din0( man_se_fx2[63:0] ), // shift 0-bits
943 .din1({q_man_se_fx2[7:0], man_se_fx2[63:8]}), // shift 8-bits
944 .din2({q_man_se_fx2[15:0], man_se_fx2[63:16]}), // shift 16-bits
945 .din3({q_man_se_fx2[23:0], man_se_fx2[63:24]}), // shift 24-bits
946 .din4({q_man_se_fx2[31:0], man_se_fx2[63:32]}), // shift 32-bits
947 .din5({q_man_se_fx2[39:0], man_se_fx2[63:40]}), // shift 40-bits
948 .din6({q_man_se_fx2[47:0], man_se_fx2[63:48]}), // shift 48-bits
949 .din7({q_man_se_fx2[55:0], man_se_fx2[63:56]}), // shift 56-bits
950 .sel (merged_align_sel_fx2[5:3]),
951 .dout(man_se_byte_fx2[63:0]),
952 .test(test)
953 );
954
955// bit mux
956fgu_fpf_dp_mux_macro__mux_aodec__ports_8__width_64 abit (
957 .din0( man_se_byte_fx2[63:0] ), // shift 0-bits
958 .din1({q_man_se_byte_fx2[0], man_se_byte_fx2[63:1]}), // shift 1-bits
959 .din2({q_man_se_byte_fx2[1:0], man_se_byte_fx2[63:2]}), // shift 2-bits
960 .din3({q_man_se_byte_fx2[2:0], man_se_byte_fx2[63:3]}), // shift 3-bits
961 .din4({q_man_se_byte_fx2[3:0], man_se_byte_fx2[63:4]}), // shift 4-bits
962 .din5({q_man_se_byte_fx2[4:0], man_se_byte_fx2[63:5]}), // shift 5-bits
963 .din6({q_man_se_byte_fx2[5:0], man_se_byte_fx2[63:6]}), // shift 6-bits
964 .din7({q_man_se_byte_fx2[6:0], man_se_byte_fx2[63:7]}), // shift 7-bits
965 .sel (merged_align_sel_fx2[2:0]),
966 .dout(man_se_bit_fx2[63:0])
967 );
968
969//--------------------
970// Aligner sticky
971// - Must not capture G bit
972// SP format 1X.XX G bit is [40]
973// SP format 01.XX G bit is [39]
974// SP format 00.1X G bit is [38]
975// DP format 1X.XX G bit is [11]
976// DP format 01.XX G bit is [10]
977// DP format 00.1X G bit is [09]
978//--------------------
979
980fgu_fpf_dp_and_macro__ports_2__width_31 and_abyte_sticky (
981 .din0({ man_se_fx2[63:40], man_se_byte_fx2[44:38]}),
982 .din1({31{sp_dest_fx2}}),
983 .dout({q2_man_se_fx2[63:40], q2_man_se_byte_fx2[44:38]})
984 );
985
986// byte sticky mux
987fgu_fpf_dp_mux_macro__mux_aodec__ports_8__width_57 abyte_sticky (
988// SP uncertain G bits DP uncertain G bits //
989 .din0({53'b0, 2'b0, 2'b0 }), // shift 0-bits
990 .din1({41'b0, q2_man_se_fx2[45:40], man_se_fx2[16:11], q2_man_se_fx2[47:46], man_se_fx2[18:17]}), // shift 8-bits
991 .din2({25'b0, q2_man_se_fx2[53:40], man_se_fx2[24:11], q2_man_se_fx2[55:54], man_se_fx2[26:25]}), // shift 16-bits
992 .din3({ 9'b0, q2_man_se_fx2[61:40], man_se_fx2[32:11], q2_man_se_fx2[63:62], man_se_fx2[34:33]}), // shift 24-bits
993 .din4({ q2_man_se_fx2[63:41], man_se_fx2[40:11], 2'b0, man_se_fx2[42:41]}), // shift 32-bits
994 .din5({ q2_man_se_fx2[63:49], man_se_fx2[48:11], 2'b0, man_se_fx2[50:49]}), // shift 40-bits
995 .din6({ q2_man_se_fx2[63:57], man_se_fx2[56:11], 2'b0, man_se_fx2[58:57]}), // shift 48-bits
996 .din7({ man_se_fx2[63:11], 2'b0, 2'b0 }), // shift 56-bits
997 .sel (fpe_align_sel_fx2[5:3]),
998 .dout({man_se_byte_sticky_fx2[52:0], byte_unsure_x_sp_fx2[1:0], byte_unsure_x_dp_fx2[1:0]})
999 );
1000
1001fgu_fpf_dp_buff_macro__dbuff_32x__width_1 muxtest_c_rep0 (
1002 .din (tcu_muxtest ),
1003 .dout(tcu_muxtest_c_rep0)
1004 );
1005
1006// bit sticky mux
1007fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_14 abit_sticky (
1008 .muxtst(tcu_muxtest_c_rep0),
1009 .din0( 14'b0 ), // shift 0-bits
1010 .din1({12'b0, q2_man_se_byte_fx2[38:38], man_se_byte_fx2[9:9]}), // shift 1-bits
1011 .din2({10'b0, q2_man_se_byte_fx2[39:38], man_se_byte_fx2[10:9]}), // shift 2-bits
1012 .din3({ 8'b0, q2_man_se_byte_fx2[40:38], man_se_byte_fx2[11:9]}), // shift 3-bits
1013 .din4({ 6'b0, q2_man_se_byte_fx2[41:38], man_se_byte_fx2[12:9]}), // shift 4-bits
1014 .din5({ 4'b0, q2_man_se_byte_fx2[42:38], man_se_byte_fx2[13:9]}), // shift 5-bits
1015 .din6({ 2'b0, q2_man_se_byte_fx2[43:38], man_se_byte_fx2[14:9]}), // shift 6-bits
1016 .din7({ q2_man_se_byte_fx2[44:38], man_se_byte_fx2[15:9]}), // shift 7-bits
1017 .sel (fpe_align_sel_fx2[2:0]),
1018 .dout(man_se_bit_sticky_fx2[13:0]),
1019 .test(test)
1020 );
1021
1022fgu_fpf_dp_zero_macro__width_64 cmp_byte_sticky (
1023 .din ({11'h000, man_se_byte_sticky_fx2[52:0]}),
1024 .dout(add_byte_sticky_fx2_l)
1025 );
1026
1027
1028// ----------------------------------------------------------------------------
1029// FX3 stage
1030// ----------------------------------------------------------------------------
1031
1032fgu_fpf_dp_msff_macro__width_64 fx3_mle (
1033 .scan_in(fx3_mle_scanin),
1034 .scan_out(fx3_mle_scanout),
1035 .clk (l2clk),
1036 .en (main_clken),
1037 .din (man_le_fx2[63:0]),
1038 .dout(man_le_fx3[63:0]),
1039 .se(se),
1040 .siclk(siclk),
1041 .soclk(soclk),
1042 .pce_ov(pce_ov),
1043 .stop(stop)
1044 );
1045
1046fgu_fpf_dp_msff_macro__width_64 fx3_mse (
1047 .scan_in(fx3_mse_scanin),
1048 .scan_out(fx3_mse_scanout),
1049 .clk (l2clk),
1050 .en (main_clken),
1051 .din (man_se_bit_fx2[63:0]),
1052 .dout(man_se_bit_fx3[63:0]),
1053 .se(se),
1054 .siclk(siclk),
1055 .soclk(soclk),
1056 .pce_ov(pce_ov),
1057 .stop(stop)
1058 );
1059
1060fgu_fpf_dp_msff_macro__width_54 fx3_fcc (
1061 .scan_in(fx3_fcc_scanin),
1062 .scan_out(fx3_fcc_scanout),
1063 .clk (l2clk),
1064 .en (main_clken),
1065 .din ({ ma_cout_fx3,
1066 fpc_fadd_eac_enable_fx2,
1067 fpc_fp_cin00_fx2,
1068 fpc_cin00_fx2,
1069 fpc_cin16_48_fx2,
1070 fpc_cin32_fx2,
1071 fpc_prop16_48_fx2,
1072 fpc_prop32_fx2,
1073 prop32_fx3,
1074 man_se_byte_fx2[38:32],
1075 align_sticky_fx3_l,
1076 fcc_fx2[1:0],
1077 fpc_mle_sel_fx2,
1078 fpc_mse_sel_fx2[2:0],
1079 fac_pre_fcc_vld_fx2[3:0],
1080 v9cmp_nv_trap_fx2,
1081 add_byte_sticky_fx2_l,
1082 man_se_bit_sticky_fx2[13:0],
1083 byte_unsure_x_sp_fx2[1:0],
1084 byte_unsure_x_dp_fx2[1:0],
1085 man_se_byte_fx2[6:0]}),
1086 .dout({fpf_ma_cout_fx4,
1087 fadd_eac_enable_fx3,
1088 fp_cin00_fx3,
1089 cin00_fx3,
1090 cin16_48_fx3,
1091 cin32_fx3,
1092 prop16_48_fx3,
1093 prop32_fx3,
1094 prop32_fx4,
1095 fpf_man_se_byte_fx3_b38_32[38:32],
1096 fpf_align_sticky_fx4_l,
1097 fgu_cmp_fcc_fx3[1:0],
1098 mle_sel_fx3,
1099 mse_sel_fx3[2:0],
1100 pre_fcc_vld_fx3[3:0],
1101 v9cmp_nv_trap_fx3,
1102 add_byte_sticky_fx3_l,
1103 man_se_bit_sticky_fx3[13:0],
1104 fpf_byte_unsure_x_sp_fx3[1:0],
1105 fpf_byte_unsure_x_dp_fx3[1:0],
1106 fpf_man_se_byte_fx3_b6_0[6:0]}),
1107 .se(se),
1108 .siclk(siclk),
1109 .soclk(soclk),
1110 .pce_ov(pce_ov),
1111 .stop(stop)
1112 );
1113
1114fgu_fpf_dp_inv_macro__width_2 cmp_i12 (
1115 .din ({v9cmp_nv_trap_fx3, fac_tlu_flush_fx3 }),
1116 .dout({v9cmp_nv_trap_fx3_, fac_tlu_flush_fx3_})
1117 );
1118
1119// Note: for timing improvement this and_macro can be changed to a nor_macro,
1120// however, be careful to avoid an unwanted assertion of fcc_vld_fx3 right after por
1121fgu_fpf_dp_and_macro__ports_3__width_4 cmp_i11 (
1122 .din0( pre_fcc_vld_fx3[3:0] ),
1123 .din1({4{ v9cmp_nv_trap_fx3_ }}),
1124 .din2({4{ fac_tlu_flush_fx3_ }}),
1125 .dout(fgu_cmp_fcc_vld_fx3[3:0] )
1126 );
1127
1128// ------------------------------------
1129// Mle/Mse format muxes
1130// ------------------------------------
1131
1132fgu_fpf_dp_inv_macro__width_64 inv_mse (
1133 .din (man_se_bit_fx3[63:0]),
1134 .dout(man_se_bit_fx3_[63:0])
1135 );
1136
1137fgu_fpf_dp_mux_macro__mux_pgpe__ports_2__width_64 mux_mle (
1138 .din0(64'b0),
1139 .din1(man_le_fx3[63:0]),
1140 .sel0(mle_sel_fx3),
1141 .dout(final_man_le_fx3[63:0])
1142 );
1143
1144fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_d_rep0 (
1145 .din (tcu_muxtest ),
1146 .dout(tcu_muxtest_d_rep0)
1147 );
1148
1149fgu_fpf_dp_mux_macro__mux_pgpe__ports_4__width_64 mux_mse (
1150 .muxtst(tcu_muxtest_d_rep0),
1151 .din0(64'b0),
1152 .din1(64'hffffffffffffffff),
1153 .din2(man_se_bit_fx3_[63:0]),
1154 .din3(man_se_bit_fx3[63:0]),
1155 .sel0(mse_sel_fx3[0]),
1156 .sel1(mse_sel_fx3[1]),
1157 .sel2(mse_sel_fx3[2]),
1158 .dout(final_man_se_fx3[63:0]),
1159 .test(test)
1160 );
1161
1162// Note: can optimize to zero detect for improved timing
1163fgu_fpf_dp_cmp_macro__width_16 cmp_bit_sticky (
1164 .din0({1'b1, 1'b1, 14'b0 }),
1165 .din1({fadd_eac_enable_fx3, add_byte_sticky_fx3_l, man_se_bit_sticky_fx3[13:0]}),
1166 .dout(align_sticky_fx3_l)
1167 );
1168
1169fgu_fpf_dp_or_macro__ports_2__width_1 eac (
1170 .din0(fp_cin00_fx3),
1171 .din1(align_sticky_fx3_l),
1172 .dout(final_fp_cin00_fx3)
1173 );
1174
1175fgu_fpf_dp_nand_macro__ports_2__width_6 nand_final_cin16_48 (
1176 .din0({ma16_cout07_fx3, cin16_48_fx3, final_cin16_48_i0_fx3, ma16_cout47_fx3, cin16_48_fx3, final_cin16_48_i2_fx3}),
1177 .din1({prop16_48_fx3, 1'b1, final_cin16_48_i1_fx3, prop16_48_fx3, 1'b1, final_cin16_48_i3_fx3}),
1178 .dout({final_cin16_48_i0_fx3, final_cin16_48_i1_fx3, final_cin16_fx3, final_cin16_48_i2_fx3, final_cin16_48_i3_fx3, final_cin48_fx3 })
1179 );
1180
1181// ------------------------------------
1182// Main adder
1183// ------------------------------------
1184
1185//fgu_ffa_cust ma (
1186// .din0 (final_man_se_fx3[63:0]),
1187// .din1 (final_man_le_fx3[63:0]),
1188// .cin00 (final_fp_cin00_fx3 ),
1189// .cin16_48 ( cin16_48_fx3 ),
1190// .cin32 ( cin32_fx3 ),
1191// .prop16_48 ( prop16_48_fx3 ),
1192// .prop32 ( prop32_fx3 ),
1193// .dout (ma_sum_fx3[63:0] ),
1194// .cout64 (ma_cout_fx3 )
1195// );
1196
1197fgu_fpf_dp_cla_macro__width_16 ma16_0 (
1198 .din0(final_man_se_fx3[15:0]),
1199 .din1(final_man_le_fx3[15:0]),
1200 .cin (cin00_fx3),
1201 .dout(ma16_sum_fx3[15:0]),
1202 .cout(ma16_cout07_fx3)
1203 );
1204
1205fgu_fpf_dp_cla_macro__width_16 ma16_1 (
1206 .din0(final_man_se_fx3[31:16]),
1207 .din1(final_man_le_fx3[31:16]),
1208 .cin (final_cin16_fx3),
1209 .dout(ma16_sum_fx3[31:16]),
1210 .cout(ma16_cout31_unused)
1211 );
1212
1213fgu_fpf_dp_cla_macro__width_16 ma16_2 (
1214 .din0(final_man_se_fx3[47:32]),
1215 .din1(final_man_le_fx3[47:32]),
1216 .cin (cin32_fx3),
1217 .dout(ma16_sum_fx3[47:32]),
1218 .cout(ma16_cout47_fx3)
1219 );
1220
1221fgu_fpf_dp_cla_macro__width_16 ma16_3 (
1222 .din0(final_man_se_fx3[63:48]),
1223 .din1(final_man_le_fx3[63:48]),
1224 .cin (final_cin48_fx3),
1225 .dout(ma16_sum_fx3[63:48]),
1226 .cout(ma16_cout63_unused)
1227 );
1228
1229fgu_fpf_dp_cla_macro__width_64 ma64 (
1230 .din0(final_man_se_fx3[63:0]),
1231 .din1(final_man_le_fx3[63:0]),
1232 .cin (final_fp_cin00_fx3),
1233 .dout(ma64_sum_fx3[63:0]),
1234 .cout(ma_cout_fx3)
1235 );
1236
1237// ----------------------------------------------------------------------------
1238// FX4 stage
1239// ----------------------------------------------------------------------------
1240
1241fgu_fpf_dp_msff_macro__width_64 fx4_ma64_sum (
1242 .scan_in(fx4_ma64_sum_scanin),
1243 .scan_out(fx4_ma64_sum_scanout),
1244 .clk (l2clk),
1245 .en (main_clken),
1246 .din (ma64_sum_fx3[63:0]),
1247 .dout(fpf_ma_sum_fx4[63:0]),
1248 .se(se),
1249 .siclk(siclk),
1250 .soclk(soclk),
1251 .pce_ov(pce_ov),
1252 .stop(stop)
1253 );
1254
1255fgu_fpf_dp_msff_macro__width_64 fx4_ma16_sum (
1256 .scan_in(fx4_ma16_sum_scanin),
1257 .scan_out(fx4_ma16_sum_scanout),
1258 .clk (l2clk),
1259 .en (main_clken),
1260 .din (ma16_sum_fx3[63:0]),
1261 .dout(ma16_sum_fx4[63:0]),
1262 .se(se),
1263 .siclk(siclk),
1264 .soclk(soclk),
1265 .pce_ov(pce_ov),
1266 .stop(stop)
1267 );
1268
1269fgu_fpf_dp_mux_macro__mux_pgpe__ports_2__width_64 mux_ma_sum (
1270 .din0(fpf_ma_sum_fx4[63:0]),
1271 .din1(ma16_sum_fx4[63:0]),
1272 .sel0(prop32_fx4),
1273 .dout(final_ma_sum_fx4[63:0])
1274 );
1275
1276// ------------------------------------
1277// quiet the propagating NaN (set frac MSB=1)
1278// ------------------------------------
1279
1280fgu_fpf_dp_or_macro__ports_2__width_1 qthenan (
1281 .din0(final_ma_sum_fx4[62]),
1282 .din1(fpc_qthenan_fx4),
1283 .dout(ma_sum_quiet_fx4[62])
1284 );
1285
1286// ----------------------------------------------------------------------------
1287// FX5 stage
1288// ----------------------------------------------------------------------------
1289
1290fgu_fpf_dp_msff_macro__width_64 fx5_sum (
1291 .scan_in(fx5_sum_scanin),
1292 .scan_out(fx5_sum_scanout),
1293 .clk (l2clk),
1294 .en (main_clken),
1295 .din ({final_ma_sum_fx4[63], ma_sum_quiet_fx4[62], final_ma_sum_fx4[61:0]}),
1296 .dout(ma_sum_fx5[63:0]),
1297 .se(se),
1298 .siclk(siclk),
1299 .soclk(soclk),
1300 .pce_ov(pce_ov),
1301 .stop(stop)
1302 );
1303
1304fgu_fpf_dp_msff_macro__width_14 fx5_ma_fmt_sel (
1305 .scan_in(fx5_ma_fmt_sel_scanin),
1306 .scan_out(fx5_ma_fmt_sel_scanout),
1307 .clk (l2clk),
1308 .en (main_clken),
1309 .din ({fpf_rcout_fx5, fpc_int_res_sel_fx4[5:1], fdc_finish_int_early, fpc_ma_fmt_sel_fx4[4:0], fpy_fp_result_fx4_b63, fpc_sp_dest_fx4}),
1310 .dout({fpf_rcout_fb, int_res_sel_fx5[5:1], int_res_sel_fx5[0], ma_fmt_sel_fx5[4:0], fp_result_fx5_b63, sp_dest_fx5}),
1311 .se(se),
1312 .siclk(siclk),
1313 .soclk(soclk),
1314 .pce_ov(pce_ov),
1315 .stop(stop)
1316 );
1317
1318// ------------------------------------
1319// Main adder output format mux
1320// - FPY fmul result enters norm/rnd here
1321// - SP inc position 40,
1322// must pad bits [39:11] to propagate inc cin
1323// ------------------------------------
1324
1325fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_e_rep0 (
1326 .din (tcu_muxtest ),
1327 .dout(tcu_muxtest_e_rep0)
1328 );
1329
1330fgu_fpf_dp_mux_macro__mux_pgpe__ports_7__width_64 ma_fmt (
1331 .muxtst(tcu_muxtest_e_rep0),
1332 .din0({ ma_sum_fx5[62:0], 1'b0 }),
1333 .din1({1'b1, ma_sum_fx5[63:1] }),
1334 .din2( ma_sum_fx5[63:0] ),
1335 .din3({1'b0, fgu_mul_result_fx5[63:12], 11'b0}),
1336 .din4({ fgu_mul_result_fx5[63:11], 11'b0}),
1337 .din5({ fgu_mul_result_fx5[63:11], 11'b0}),
1338 .din6({ fgu_mul_result_fx5[62:10], 11'b0}),
1339 .sel0(ma_fmt_sel_fx5[0] ), // fadd/fsub 00.1X
1340 .sel1(ma_fmt_sel_fx5[1] ), // fadd/fsub 1X.XX
1341 .sel2(ma_fmt_sel_fx5[2] ), // default for non fmul
1342 .sel3(ma_fmt_sel_fx5[3] ), // fmul 11.XX, Eint=Emin-2, denorm inter. result may rnd to norm
1343 .sel4(ma_fmt_sel_fx5[4] ), // fmul 01.XX, Eint=Emin-1, denorm inter. result may rnd to norm
1344 .sel5(fp_result_fx5_b63 ), // fmul 1X.XX
1345 .dout(unnorm_inter_res_fx5[63:0] ),
1346 .test(test) // X.XX
1347 );
1348
1349fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_f_rep0 (
1350 .din (tcu_muxtest ),
1351 .dout(tcu_muxtest_f_rep0)
1352 );
1353
1354fgu_fpf_dp_mux_macro__mux_pgpe__ports_8__width_29 ma_fmt_pad (
1355 .muxtst(tcu_muxtest_f_rep0),
1356 .din0({1'b1, 28'hfffffff }),
1357 .din1( ma_sum_fx5[38:10] ),
1358 .din2( ma_sum_fx5[40:12] ),
1359 .din3( ma_sum_fx5[39:11] ),
1360 .din4( fgu_mul_result_fx5[40:12] ),
1361 .din5( fgu_mul_result_fx5[39:11] ),
1362 .din6( fgu_mul_result_fx5[39:11] ),
1363 .din7( fgu_mul_result_fx5[38:10] ),
1364 .sel0(sp_dest_fx5 ), // SP, pad bits [39:11]
1365 .sel1(ma_fmt_sel_fx5[0] ), // fadd/fsub 00.1X
1366 .sel2(ma_fmt_sel_fx5[1] ), // fadd/fsub 1X.XX
1367 .sel3(ma_fmt_sel_fx5[2] ), // default for non fmul
1368 .sel4(ma_fmt_sel_fx5[3] ), // fmul 11.XX, Eint=Emin-2, denorm inter. result may rnd to norm
1369 .sel5(ma_fmt_sel_fx5[4] ), // fmul 01.XX, Eint=Emin-1, denorm inter. result may rnd to norm
1370 .sel6(fp_result_fx5_b63 ), // fmul 1X.XX
1371 .dout(pad_inc_fx5[39:11] ),
1372 .test(test)
1373 );
1374
1375// ------------------------------------
1376// Normalizer
1377// ------------------------------------
1378
1379fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_g_rep0 (
1380 .din (tcu_muxtest ),
1381 .dout(tcu_muxtest_g_rep0)
1382 );
1383
1384// byte mux
1385fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_59 nbyte (
1386 .muxtst(tcu_muxtest_g_rep0),
1387 .din0( unnorm_inter_res_fx5[62:4] ), // shift 0-bits
1388 .din1({unnorm_inter_res_fx5[54:0], 4'b0}), // shift 8-bits
1389 .din2({unnorm_inter_res_fx5[46:0], 12'b0}), // shift 16-bits
1390 .din3({unnorm_inter_res_fx5[38:0], 20'b0}), // shift 24-bits
1391 .din4({unnorm_inter_res_fx5[30:0], 28'b0}), // shift 32-bits
1392 .din5({unnorm_inter_res_fx5[22:0], 36'b0}), // shift 40-bits
1393 .din6({unnorm_inter_res_fx5[14:0], 44'b0}), // shift 48-bits
1394 .din7( 59'b0 ), // unused
1395 .sel (fic_norm_eadj_fx5[5:3]),
1396 .dout(norm_byte_fx5[62:4]),
1397 .test(test)
1398 );
1399
1400fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_h_rep0 (
1401 .din (tcu_muxtest ),
1402 .dout(tcu_muxtest_h_rep0)
1403 );
1404
1405// bit mux
1406fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_52 nbit (
1407 .muxtst(tcu_muxtest_h_rep0),
1408 .din0(norm_byte_fx5[62:11]), // shift 0-bits
1409 .din1(norm_byte_fx5[61:10]), // shift 1-bits
1410 .din2(norm_byte_fx5[60:9]), // shift 2-bits
1411 .din3(norm_byte_fx5[59:8]), // shift 3-bits
1412 .din4(norm_byte_fx5[58:7]), // shift 4-bits
1413 .din5(norm_byte_fx5[57:6]), // shift 5-bits
1414 .din6(norm_byte_fx5[56:5]), // shift 6-bits
1415 .din7(norm_byte_fx5[55:4]), // shift 7-bits
1416 .sel (fic_norm_eadj_fx5[2:0]),
1417 .dout(norm_bit_fx5[62:11]),
1418 .test(test)
1419 );
1420
1421// ------------------------------------
1422// Incrementer
1423//
1424// DP inc position 11
1425// SP inc position 40,
1426// must pad bits [39:11] to propagate inc cin
1427// ------------------------------------
1428
1429fgu_fpf_dp_increment_macro__width_64 minc (
1430 .din ({11'b0, unnorm_inter_res_fx5[63:40], pad_inc_fx5[39:11]}),
1431 .cin ( 1'b1),
1432 .dout({minc_unused[9:0], fpf_rcout_fx5, fpf_implied_bit_fx5, inc_inter_res_fx5[51:0]}),
1433 .cout( minc_unused[10])
1434 );
1435
1436// ------------------------------------
1437// Norm/Round selection
1438// ------------------------------------
1439
1440fgu_fpf_dp_mux_macro__mux_aope__ports_2__width_52 mux_nrd (
1441 .din0(inc_inter_res_fx5[51:0]),
1442 .din1(norm_bit_fx5[62:11]),
1443 .sel0(fpc_rinc_sel_fx5),
1444 .dout(nrd_res_fx5[62:11])
1445 );
1446
1447// ------------------------------------
1448// Integer output constant mux
1449// - FPY 8x16 result enters here
1450// ------------------------------------
1451
1452fgu_fpf_dp_mux_macro__mux_aope__ports_5__width_64 idata (
1453 .din0(64'h0000000000000000 ),
1454 .din1(64'h8000000000000000 ),
1455 .din2(64'h7fffffffffffffff ),
1456 .din3(unnorm_inter_res_fx5[63:0]), // vis parititioned add, F(s,d)TO(i,x)
1457 .din4(fgu_mul_result_fx5[63:0] ), // vis 8x16
1458 .sel0(fpc_int_sel_fx5[0] ),
1459 .sel1(fpc_int_sel_fx5[1] ),
1460 .sel2(fpc_int_sel_fx5[2] ),
1461 .sel3(fpc_int_sel_fx5[3] ),
1462 .dout(int_data_fx5[63:0] )
1463 );
1464
1465// ------------------------------------
1466// Integer/Float_Constant mux
1467// ------------------------------------
1468
1469fgu_fpf_dp_msff_macro__mux_aope__ports_6__width_64 fb_int_fconst (
1470 .scan_in(fb_int_fconst_scanin),
1471 .scan_out(fb_int_fconst_scanout),
1472 .clk (l2clk),
1473 .en (main_clken),
1474 .din0({fpc_sign_fx5, 8'hff, 55'b0 }), // SP inf
1475 .din1({fpc_sign_fx5, 11'b11111111111, 52'b0 }), // DP inf
1476 .din2({fpc_sign_fx5, 8'hfe, 55'h7fffffffffffff}), // SP max
1477 .din3({fpc_sign_fx5, 11'b11111111110, 52'hfffffffffffff }), // DP max
1478 .din4({fpc_sign_fx5, 63'b0 }), // SP/DP zero
1479 .din5( int_data_fx5[63:0] ),
1480 .sel0(fpc_fconst_sel_fx5[0]),
1481 .sel1(fpc_fconst_sel_fx5[1]),
1482 .sel2(fpc_fconst_sel_fx5[2]),
1483 .sel3(fpc_fconst_sel_fx5[3]),
1484 .sel4(fpc_fconst_sel_fx5[4]),
1485 .dout(int_fconst_res_fb[63:0]),
1486 .se(se),
1487 .siclk(siclk),
1488 .soclk(soclk),
1489 .pce_ov(pce_ov),
1490 .stop(stop)
1491 );
1492
1493// ------------------------------------
1494// EXU final result mux
1495// - FPY imul result enters here
1496// - FDD idiv result enters here
1497// ------------------------------------
1498
1499fgu_fpf_dp_mux_macro__mux_aonpe__ports_6__width_64 exu_res (
1500 .din0(fdd_result[63:0] ), // idiv result
1501 .din1(ma_sum_fx5[63:0] ), // save/restore 64b add result
1502 .din2({31'b0, ma_sum_fx5[32:0] }), // mulscc result
1503 .din3({57'b0, fgd_result_fx5[6:0] }), // popc result
1504 .din4({60'b0, fpc_vis_cmp_result_fx5[3:0]}), // vis fcmp result
1505 .din5(fgu_mul_result_fx5[63:0] ), // imul result
1506 .sel0(int_res_sel_fx5[0] ), // idiv
1507 .sel1(int_res_sel_fx5[1] ), // save/restore
1508 .sel2(int_res_sel_fx5[2] ), // mulscc
1509 .sel3(int_res_sel_fx5[3] ), // popc
1510 .sel4(int_res_sel_fx5[4] ), // vis fcmp
1511 .sel5(int_res_sel_fx5[5] ), // imul
1512 .dout(int_result_fx5[63:0] ) // pwr mgmt: aomux free zeros
1513 );
1514
1515fgu_fpf_dp_buff_macro__width_64 buf_exu_res0 (
1516 .din ( int_result_fx5[63:0] ),
1517 .dout( int_result0_fx5[63:0])
1518 );
1519
1520fgu_fpf_dp_buff_macro__rep_1__width_64 buf_exu_res1 (
1521 .din ( int_result0_fx5[63:0]),
1522 .dout(fgu_exu_result_fx5[63:0] )
1523 );
1524
1525fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_2 sel_res (
1526 .din0({fpc_ovf_if_rcout_fx5[1], fpc_ovf_if_rcout_fx5[0]}),
1527 .din1({fpc_result_sel_fx5[4], fpc_result_sel_fx5[2] }),
1528 .sel0(fpf_rcout_fx5),
1529 .sel1(1'b1),
1530 .dout({q_result_sel_fx5[4], q_result_sel_fx5[2] })
1531 );
1532
1533
1534// ----------------------------------------------------------------------------
1535// FB stage
1536// ----------------------------------------------------------------------------
1537
1538fgu_fpf_dp_msff_macro__width_58 fb_nrd (
1539 .scan_in(fb_nrd_scanin),
1540 .scan_out(fb_nrd_scanout),
1541 .clk (l2clk),
1542 .en (main_clken),
1543 .din ({fpc_result_sel_fx5[5], q_result_sel_fx5[4], fpc_result_sel_fx5[3], q_result_sel_fx5[2], fpc_result_sel_fx5[1:0],
1544 nrd_res_fx5[62:11]}),
1545 .dout({result_sel_fb[5:0],
1546 nrd_res_fb[62:11]}),
1547 .se(se),
1548 .siclk(siclk),
1549 .soclk(soclk),
1550 .pce_ov(pce_ov),
1551 .stop(stop)
1552 );
1553
1554fgu_fpf_dp_msff_macro__width_64 fb_fgd (
1555 .scan_in(fb_fgd_scanin),
1556 .scan_out(fb_fgd_scanout),
1557 .clk (l2clk),
1558 .en (main_clken),
1559 .din (fgd_result_fx5[63:0]),
1560 .dout(fgd_result_fb[63:0]),
1561 .se(se),
1562 .siclk(siclk),
1563 .soclk(soclk),
1564 .pce_ov(pce_ov),
1565 .stop(stop)
1566 );
1567
1568fgu_fpf_dp_or_macro__ports_2__width_2 or_min ( // force result to min norm if needed
1569 .din0({fpc_den2nor_sp_fb, fpc_den2nor_dp_fb }),
1570 .din1({int_fconst_res_fb[55], int_fconst_res_fb[52]}),
1571 .dout({emin_sp_fb, emin_dp_fb })
1572 );
1573
1574fgu_fpf_dp_buff_macro__dbuff_48x__width_1 muxtest_i_rep0 (
1575 .din (tcu_muxtest ),
1576 .dout(tcu_muxtest_i_rep0)
1577 );
1578
1579fgu_fpf_dp_mux_macro__mux_pgpe__ports_7__width_64 fb_res (
1580 .muxtst(tcu_muxtest_i_rep0),
1581 .din0({32'b0, fgd_result_fb[63:32] }),
1582 .din1( fgd_result_fb[63:0] ),
1583 .din2({32'b0, int_fconst_res_fb[63:56], emin_sp_fb, int_fconst_res_fb[54:32]}),
1584 .din3({32'b0, fpc_sign_fb, fpe_exp_res_fb[7:0], nrd_res_fb[62:40] }),
1585 .din4({ int_fconst_res_fb[63:56], emin_sp_fb, int_fconst_res_fb[54:53], emin_dp_fb, int_fconst_res_fb[51:0]}),
1586 .din5({ fpc_sign_fb, fpe_exp_res_fb[10:0], nrd_res_fb[62:11] }),
1587 .din6({ fpc_sign_fb, fpe_exp_res_fb[7:0], nrd_res_fb[62:40], 32'b0 }),
1588 .sel0(result_sel_fb[0]), // FGA rotate
1589 .sel1(result_sel_fb[1]), // FGA
1590 .sel2(result_sel_fb[2]), // 32b int/const rotate
1591 .sel3(result_sel_fb[3]), // SP rotate
1592 .sel4(result_sel_fb[4]), // 64b/32b int/const
1593 .sel5(result_sel_fb[5]), // DP
1594 // else: SP no rotate
1595 .dout(w1_result_fb[63:0]),
1596 .test(test)
1597 );
1598
1599fgu_fpf_dp_buff_macro__width_64 buf_w1_result (
1600 .din ( w1_result_fb[63:0]),
1601 .dout(fpf_w1_result_fb[63:0])
1602 );
1603
1604// ------------------------------------
1605// ECC generation for w1 result (even word)
1606// ------------------------------------
1607
1608fgu_fpf_dp_prty_macro__width_32 ecc_s1e7 (
1609 .din({1'b0,
1610 w1_result_fb[62],
1611 1'b0,
1612 w1_result_fb[60],
1613 1'b0,
1614 w1_result_fb[58:57],
1615 1'b0,
1616 w1_result_fb[55],
1617 1'b0,
1618 w1_result_fb[53],
1619 1'b0,
1620 w1_result_fb[51],
1621 1'b0,
1622 w1_result_fb[49],
1623 1'b0,
1624 w1_result_fb[47],
1625 1'b0,
1626 w1_result_fb[45],
1627 1'b0,
1628 w1_result_fb[43:42],
1629 1'b0,
1630 w1_result_fb[40],
1631 1'b0,
1632 w1_result_fb[38],
1633 1'b0,
1634 w1_result_fb[36:35],
1635 fec_w1_ecc_inject_fb[0],
1636 w1_result_fb[33:32]}),
1637 .dout(w1_synd_fb[7])
1638 );
1639
1640fgu_fpf_dp_prty_macro__width_32 ecc_s1e8 (
1641 .din({w1_result_fb[63],
1642 2'b0,
1643 w1_result_fb[60:59],
1644 1'b0,
1645 w1_result_fb[57:56],
1646 2'b0,
1647 w1_result_fb[53:52],
1648 2'b0,
1649 w1_result_fb[49:48],
1650 2'b0,
1651 w1_result_fb[45:44],
1652 1'b0,
1653 w1_result_fb[42:41],
1654 2'b0,
1655 w1_result_fb[38:37],
1656 1'b0,
1657 w1_result_fb[35:34],
1658 fec_w1_ecc_inject_fb[1],
1659 w1_result_fb[32]}),
1660 .dout(w1_synd_fb[8])
1661 );
1662
1663fgu_fpf_dp_prty_macro__width_32 ecc_s1e9 (
1664 .din({w1_result_fb[63:61],
1665 3'b0,
1666 w1_result_fb[57:54],
1667 4'b0,
1668 w1_result_fb[49:46],
1669 3'b0,
1670 w1_result_fb[42:39],
1671 3'b0,
1672 w1_result_fb[35:33],
1673 fec_w1_ecc_inject_fb[2]}),
1674 .dout(w1_synd_fb[9])
1675 );
1676
1677fgu_fpf_dp_prty_macro__width_16 ecc_s1e10 (
1678 .din({fec_w1_ecc_inject_fb[3],
1679 w1_result_fb[57:50],
1680 w1_result_fb[42:36]}),
1681 .dout(w1_synd_fb[10])
1682 );
1683
1684fgu_fpf_dp_prty_macro__width_16 ecc_s1e11 (
1685 .din({fec_w1_ecc_inject_fb[4],
1686 w1_result_fb[57:43]}),
1687 .dout(w1_synd_fb[11])
1688 );
1689
1690fgu_fpf_dp_prty_macro__width_8 ecc_s1e12 (
1691 .din({w1_result_fb[63:58],
1692 1'b0,
1693 fec_w1_ecc_inject_fb[5]}),
1694 .dout(w1_synd_fb[12])
1695 );
1696
1697fgu_fpf_dp_prty_macro__width_32 ecc_s1e13 (
1698 .din({2'b0,
1699 w1_result_fb[61],
1700 1'b0,
1701 w1_result_fb[59:58],
1702 1'b0,
1703 w1_result_fb[56:55],
1704 1'b0,
1705 w1_result_fb[53],
1706 2'b0,
1707 w1_result_fb[50:49],
1708 2'b0,
1709 w1_result_fb[46],
1710 1'b0,
1711 w1_result_fb[44:42],
1712 2'b0,
1713 w1_result_fb[39],
1714 1'b0,
1715 w1_result_fb[37:36],
1716 fec_w1_ecc_inject_fb[6],
1717 w1_result_fb[34:32]}),
1718 .dout(w1_synd_fb[13])
1719 );
1720
1721fgu_fpf_dp_buff_macro__width_7 buf_ecce (
1722 .din ( w1_synd_fb[13:7]),
1723 .dout(fpf_w1_synd_fb[13:7])
1724 );
1725
1726// ------------------------------------
1727// ECC generation for w1 result (odd word)
1728// ------------------------------------
1729
1730fgu_fpf_dp_prty_macro__width_32 ecc_s1o0 (
1731 .din({fec_w1_ecc_inject_fb[0],
1732 w1_result_fb[30],
1733 1'b0,
1734 w1_result_fb[28],
1735 1'b0,
1736 w1_result_fb[26:25],
1737 1'b0,
1738 w1_result_fb[23],
1739 1'b0,
1740 w1_result_fb[21],
1741 1'b0,
1742 w1_result_fb[19],
1743 1'b0,
1744 w1_result_fb[17],
1745 1'b0,
1746 w1_result_fb[15],
1747 1'b0,
1748 w1_result_fb[13],
1749 1'b0,
1750 w1_result_fb[11:10],
1751 1'b0,
1752 w1_result_fb[8],
1753 1'b0,
1754 w1_result_fb[6],
1755 1'b0,
1756 w1_result_fb[4:3],
1757 1'b0,
1758 w1_result_fb[1:0]}),
1759 .dout(w1_synd_fb[0])
1760 );
1761
1762fgu_fpf_dp_prty_macro__width_32 ecc_s1o1 (
1763 .din({w1_result_fb[31],
1764 fec_w1_ecc_inject_fb[1],
1765 1'b0,
1766 w1_result_fb[28:27],
1767 1'b0,
1768 w1_result_fb[25:24],
1769 2'b0,
1770 w1_result_fb[21:20],
1771 2'b0,
1772 w1_result_fb[17:16],
1773 2'b0,
1774 w1_result_fb[13:12],
1775 1'b0,
1776 w1_result_fb[10:9],
1777 2'b0,
1778 w1_result_fb[6:5],
1779 1'b0,
1780 w1_result_fb[3:2],
1781 1'b0,
1782 w1_result_fb[0]}),
1783 .dout(w1_synd_fb[1])
1784 );
1785
1786fgu_fpf_dp_prty_macro__width_32 ecc_s1o2 (
1787 .din({w1_result_fb[31:29],
1788 fec_w1_ecc_inject_fb[2],
1789 2'b0,
1790 w1_result_fb[25:22],
1791 4'b0,
1792 w1_result_fb[17:14],
1793 3'b0,
1794 w1_result_fb[10:7],
1795 3'b0,
1796 w1_result_fb[3:1],
1797 1'b0}),
1798 .dout(w1_synd_fb[2])
1799 );
1800
1801fgu_fpf_dp_prty_macro__width_16 ecc_s1o3 (
1802 .din({fec_w1_ecc_inject_fb[3],
1803 w1_result_fb[25:18],
1804 w1_result_fb[10:4]}),
1805 .dout(w1_synd_fb[3])
1806 );
1807
1808fgu_fpf_dp_prty_macro__width_16 ecc_s1o4 (
1809 .din({fec_w1_ecc_inject_fb[4],
1810 w1_result_fb[25:11]}),
1811 .dout(w1_synd_fb[4])
1812 );
1813
1814fgu_fpf_dp_prty_macro__width_8 ecc_s1o5 (
1815 .din({fec_w1_ecc_inject_fb[5],
1816 1'b0,
1817 w1_result_fb[31:26]}),
1818 .dout(w1_synd_fb[5])
1819 );
1820
1821fgu_fpf_dp_prty_macro__width_32 ecc_s1o6 (
1822 .din({fec_w1_ecc_inject_fb[6],
1823 1'b0,
1824 w1_result_fb[29],
1825 1'b0,
1826 w1_result_fb[27:26],
1827 1'b0,
1828 w1_result_fb[24:23],
1829 1'b0,
1830 w1_result_fb[21],
1831 2'b0,
1832 w1_result_fb[18:17],
1833 2'b0,
1834 w1_result_fb[14],
1835 1'b0,
1836 w1_result_fb[12:10],
1837 2'b0,
1838 w1_result_fb[7],
1839 1'b0,
1840 w1_result_fb[5:4],
1841 1'b0,
1842 w1_result_fb[2:0]}),
1843 .dout(w1_synd_fb[6])
1844 );
1845
1846fgu_fpf_dp_buff_macro__width_7 buf_ecco (
1847 .din ( w1_synd_fb[6:0]),
1848 .dout(fpf_w1_synd_fb[6:0])
1849 );
1850
1851
1852// fixscan start:
1853assign fx2_swp_le_scanin = scan_in ;
1854assign fx2_swp_se_scanin = fx2_swp_le_scanout ;
1855assign fx2_fcc_scanin = fx2_swp_se_scanout ;
1856assign fx3_mle_scanin = fx2_fcc_scanout ;
1857assign fx3_mse_scanin = fx3_mle_scanout ;
1858assign fx3_fcc_scanin = fx3_mse_scanout ;
1859assign fx4_ma64_sum_scanin = fx3_fcc_scanout ;
1860assign fx4_ma16_sum_scanin = fx4_ma64_sum_scanout ;
1861assign fx5_sum_scanin = fx4_ma16_sum_scanout ;
1862assign fx5_ma_fmt_sel_scanin = fx5_sum_scanout ;
1863assign fb_nrd_scanin = fx5_ma_fmt_sel_scanout ;
1864assign fb_int_fconst_scanin = fb_nrd_scanout ;
1865assign fb_fgd_scanin = fb_int_fconst_scanout ;
1866assign scan_out = fb_fgd_scanout ;
1867// fixscan end:
1868endmodule // fgu_fpf_dp
1869
1870
1871//
1872// buff macro
1873//
1874//
1875
1876
1877
1878
1879
1880module fgu_fpf_dp_buff_macro__dbuff_32x__rep_1__width_4 (
1881 din,
1882 dout);
1883 input [3:0] din;
1884 output [3:0] dout;
1885
1886
1887
1888
1889
1890
1891buff #(4) d0_0 (
1892.in(din[3:0]),
1893.out(dout[3:0])
1894);
1895
1896
1897
1898
1899
1900
1901
1902
1903endmodule
1904
1905
1906
1907
1908
1909// general mux macro for pass-gate and and-or muxes with/wout priority encoders
1910// also for pass-gate with decoder
1911
1912
1913
1914
1915
1916// any PARAMS parms go into naming of macro
1917
1918module fgu_fpf_dp_mux_macro__mux_pgpe__ports_2__width_32 (
1919 din0,
1920 din1,
1921 sel0,
1922 dout);
1923wire psel0_unused;
1924wire psel1;
1925
1926 input [31:0] din0;
1927 input [31:0] din1;
1928 input sel0;
1929 output [31:0] dout;
1930
1931
1932
1933
1934
1935cl_dp1_penc2_8x c0_0 (
1936 .sel0(sel0),
1937 .psel0(psel0_unused),
1938 .psel1(psel1)
1939);
1940
1941mux2e #(32) d0_0 (
1942 .sel(psel1),
1943 .in0(din0[31:0]),
1944 .in1(din1[31:0]),
1945.dout(dout[31:0])
1946);
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960endmodule
1961
1962
1963//
1964// buff macro
1965//
1966//
1967
1968
1969
1970
1971
1972module fgu_fpf_dp_buff_macro__width_2 (
1973 din,
1974 dout);
1975 input [1:0] din;
1976 output [1:0] dout;
1977
1978
1979
1980
1981
1982
1983buff #(2) d0_0 (
1984.in(din[1:0]),
1985.out(dout[1:0])
1986);
1987
1988
1989
1990
1991
1992
1993
1994
1995endmodule
1996
1997
1998
1999
2000
2001// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2002// also for pass-gate with decoder
2003
2004
2005
2006
2007
2008// any PARAMS parms go into naming of macro
2009
2010module fgu_fpf_dp_mux_macro__dmux_6x__mux_aonpe__ports_4__width_64 (
2011 din0,
2012 sel0,
2013 din1,
2014 sel1,
2015 din2,
2016 sel2,
2017 din3,
2018 sel3,
2019 dout);
2020wire buffout0;
2021wire buffout1;
2022wire buffout2;
2023wire buffout3;
2024
2025 input [63:0] din0;
2026 input sel0;
2027 input [63:0] din1;
2028 input sel1;
2029 input [63:0] din2;
2030 input sel2;
2031 input [63:0] din3;
2032 input sel3;
2033 output [63:0] dout;
2034
2035
2036
2037
2038
2039cl_dp1_muxbuff4_8x c0_0 (
2040 .in0(sel0),
2041 .in1(sel1),
2042 .in2(sel2),
2043 .in3(sel3),
2044 .out0(buffout0),
2045 .out1(buffout1),
2046 .out2(buffout2),
2047 .out3(buffout3)
2048);
2049mux4s #(64) d0_0 (
2050 .sel0(buffout0),
2051 .sel1(buffout1),
2052 .sel2(buffout2),
2053 .sel3(buffout3),
2054 .in0(din0[63:0]),
2055 .in1(din1[63:0]),
2056 .in2(din2[63:0]),
2057 .in3(din3[63:0]),
2058.dout(dout[63:0])
2059);
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073endmodule
2074
2075
2076//
2077// buff macro
2078//
2079//
2080
2081
2082
2083
2084
2085module fgu_fpf_dp_buff_macro__width_64 (
2086 din,
2087 dout);
2088 input [63:0] din;
2089 output [63:0] dout;
2090
2091
2092
2093
2094
2095
2096buff #(64) d0_0 (
2097.in(din[63:0]),
2098.out(dout[63:0])
2099);
2100
2101
2102
2103
2104
2105
2106
2107
2108endmodule
2109
2110
2111
2112
2113
2114//
2115// invert macro
2116//
2117//
2118
2119
2120
2121
2122
2123module fgu_fpf_dp_inv_macro__width_64 (
2124 din,
2125 dout);
2126 input [63:0] din;
2127 output [63:0] dout;
2128
2129
2130
2131
2132
2133
2134inv #(64) d0_0 (
2135.in(din[63:0]),
2136.out(dout[63:0])
2137);
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147endmodule
2148
2149
2150
2151
2152
2153//
2154// cla macro
2155//
2156//
2157
2158
2159
2160
2161
2162module fgu_fpf_dp_cla_macro__width_16 (
2163 cin,
2164 din0,
2165 din1,
2166 dout,
2167 cout);
2168 input cin;
2169 input [15:0] din0;
2170 input [15:0] din1;
2171 output [15:0] dout;
2172 output cout;
2173
2174
2175
2176
2177
2178
2179
2180cla #(16) m0_0 (
2181.cin(cin),
2182.in0(din0[15:0]),
2183.in1(din1[15:0]),
2184.out(dout[15:0]),
2185.cout(cout)
2186);
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199endmodule
2200
2201
2202
2203
2204
2205//
2206// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
2207//
2208//
2209
2210
2211
2212
2213
2214module fgu_fpf_dp_cmp_macro__width_16 (
2215 din0,
2216 din1,
2217 dout);
2218 input [15:0] din0;
2219 input [15:0] din1;
2220 output dout;
2221
2222
2223
2224
2225
2226
2227cmp #(16) m0_0 (
2228.in0(din0[15:0]),
2229.in1(din1[15:0]),
2230.out(dout)
2231);
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242endmodule
2243
2244
2245
2246
2247
2248//
2249// nor macro for ports = 2,3
2250//
2251//
2252
2253
2254
2255
2256
2257module fgu_fpf_dp_nor_macro__ports_2__width_3 (
2258 din0,
2259 din1,
2260 dout);
2261 input [2:0] din0;
2262 input [2:0] din1;
2263 output [2:0] dout;
2264
2265
2266
2267
2268
2269
2270nor2 #(3) d0_0 (
2271.in0(din0[2:0]),
2272.in1(din1[2:0]),
2273.out(dout[2:0])
2274);
2275
2276
2277
2278
2279
2280
2281
2282endmodule
2283
2284
2285
2286
2287
2288//
2289// nand macro for ports = 2,3,4
2290//
2291//
2292
2293
2294
2295
2296
2297module fgu_fpf_dp_nand_macro__ports_4__width_4 (
2298 din0,
2299 din1,
2300 din2,
2301 din3,
2302 dout);
2303 input [3:0] din0;
2304 input [3:0] din1;
2305 input [3:0] din2;
2306 input [3:0] din3;
2307 output [3:0] dout;
2308
2309
2310
2311
2312
2313
2314nand4 #(4) d0_0 (
2315.in0(din0[3:0]),
2316.in1(din1[3:0]),
2317.in2(din2[3:0]),
2318.in3(din3[3:0]),
2319.out(dout[3:0])
2320);
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330endmodule
2331
2332
2333
2334
2335
2336//
2337// xnor macro for ports = 2,3
2338//
2339//
2340
2341
2342
2343
2344
2345module fgu_fpf_dp_xnor_macro__ports_2__width_1 (
2346 din0,
2347 din1,
2348 dout);
2349 input [0:0] din0;
2350 input [0:0] din1;
2351 output [0:0] dout;
2352
2353
2354
2355
2356
2357
2358xnor2 #(1) d0_0 (
2359.in0(din0[0:0]),
2360.in1(din1[0:0]),
2361.out(dout[0:0])
2362);
2363
2364
2365
2366
2367
2368
2369
2370endmodule
2371
2372
2373
2374
2375
2376//
2377// invert macro
2378//
2379//
2380
2381
2382
2383
2384
2385module fgu_fpf_dp_inv_macro__width_1 (
2386 din,
2387 dout);
2388 input [0:0] din;
2389 output [0:0] dout;
2390
2391
2392
2393
2394
2395
2396inv #(1) d0_0 (
2397.in(din[0:0]),
2398.out(dout[0:0])
2399);
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409endmodule
2410
2411
2412
2413
2414
2415//
2416// or macro for ports = 2,3
2417//
2418//
2419
2420
2421
2422
2423
2424module fgu_fpf_dp_or_macro__ports_2__width_2 (
2425 din0,
2426 din1,
2427 dout);
2428 input [1:0] din0;
2429 input [1:0] din1;
2430 output [1:0] dout;
2431
2432
2433
2434
2435
2436
2437or2 #(2) d0_0 (
2438.in0(din0[1:0]),
2439.in1(din1[1:0]),
2440.out(dout[1:0])
2441);
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451endmodule
2452
2453
2454
2455
2456
2457//
2458// and macro for ports = 2,3,4
2459//
2460//
2461
2462
2463
2464
2465
2466module fgu_fpf_dp_and_macro__ports_4__width_2 (
2467 din0,
2468 din1,
2469 din2,
2470 din3,
2471 dout);
2472 input [1:0] din0;
2473 input [1:0] din1;
2474 input [1:0] din2;
2475 input [1:0] din3;
2476 output [1:0] dout;
2477
2478
2479
2480
2481
2482
2483and4 #(2) d0_0 (
2484.in0(din0[1:0]),
2485.in1(din1[1:0]),
2486.in2(din2[1:0]),
2487.in3(din3[1:0]),
2488.out(dout[1:0])
2489);
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499endmodule
2500
2501
2502
2503
2504
2505//
2506// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
2507//
2508//
2509
2510
2511
2512
2513
2514module fgu_fpf_dp_cmp_macro__width_32 (
2515 din0,
2516 din1,
2517 dout);
2518 input [31:0] din0;
2519 input [31:0] din1;
2520 output dout;
2521
2522
2523
2524
2525
2526
2527cmp #(32) m0_0 (
2528.in0(din0[31:0]),
2529.in1(din1[31:0]),
2530.out(dout)
2531);
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542endmodule
2543
2544
2545
2546
2547
2548//
2549// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
2550//
2551//
2552
2553
2554
2555
2556
2557module fgu_fpf_dp_zero_macro__width_64 (
2558 din,
2559 dout);
2560 input [63:0] din;
2561 output dout;
2562
2563
2564
2565
2566
2567
2568zero #(64) m0_0 (
2569.in(din[63:0]),
2570.out(dout)
2571);
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582endmodule
2583
2584
2585
2586
2587
2588//
2589// buff macro
2590//
2591//
2592
2593
2594
2595
2596
2597module fgu_fpf_dp_buff_macro__width_7 (
2598 din,
2599 dout);
2600 input [6:0] din;
2601 output [6:0] dout;
2602
2603
2604
2605
2606
2607
2608buff #(7) d0_0 (
2609.in(din[6:0]),
2610.out(dout[6:0])
2611);
2612
2613
2614
2615
2616
2617
2618
2619
2620endmodule
2621
2622
2623
2624
2625
2626//
2627// invert macro
2628//
2629//
2630
2631
2632
2633
2634
2635module fgu_fpf_dp_inv_macro__width_6 (
2636 din,
2637 dout);
2638 input [5:0] din;
2639 output [5:0] dout;
2640
2641
2642
2643
2644
2645
2646inv #(6) d0_0 (
2647.in(din[5:0]),
2648.out(dout[5:0])
2649);
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659endmodule
2660
2661
2662
2663
2664
2665//
2666// or macro for ports = 2,3
2667//
2668//
2669
2670
2671
2672
2673
2674module fgu_fpf_dp_or_macro__ports_2__width_6 (
2675 din0,
2676 din1,
2677 dout);
2678 input [5:0] din0;
2679 input [5:0] din1;
2680 output [5:0] dout;
2681
2682
2683
2684
2685
2686
2687or2 #(6) d0_0 (
2688.in0(din0[5:0]),
2689.in1(din1[5:0]),
2690.out(dout[5:0])
2691);
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701endmodule
2702
2703
2704
2705
2706
2707//
2708// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
2709//
2710//
2711
2712
2713
2714
2715
2716module fgu_fpf_dp_cmp_macro__width_12 (
2717 din0,
2718 din1,
2719 dout);
2720 input [11:0] din0;
2721 input [11:0] din1;
2722 output dout;
2723
2724
2725
2726
2727
2728
2729cmp #(12) m0_0 (
2730.in0(din0[11:0]),
2731.in1(din1[11:0]),
2732.out(dout)
2733);
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744endmodule
2745
2746
2747
2748
2749
2750//
2751// and macro for ports = 2,3,4
2752//
2753//
2754
2755
2756
2757
2758
2759module fgu_fpf_dp_and_macro__ports_2__width_8 (
2760 din0,
2761 din1,
2762 dout);
2763 input [7:0] din0;
2764 input [7:0] din1;
2765 output [7:0] dout;
2766
2767
2768
2769
2770
2771
2772and2 #(8) d0_0 (
2773.in0(din0[7:0]),
2774.in1(din1[7:0]),
2775.out(dout[7:0])
2776);
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786endmodule
2787
2788
2789
2790
2791
2792//
2793// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
2794//
2795//
2796
2797
2798
2799
2800
2801module fgu_fpf_dp_zero_macro__width_12 (
2802 din,
2803 dout);
2804 input [11:0] din;
2805 output dout;
2806
2807
2808
2809
2810
2811
2812zero #(12) m0_0 (
2813.in(din[11:0]),
2814.out(dout)
2815);
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826endmodule
2827
2828
2829
2830
2831
2832// general mux macro for pass-gate and and-or muxes with/wout priority encoders
2833// also for pass-gate with decoder
2834
2835
2836
2837
2838
2839// any PARAMS parms go into naming of macro
2840
2841module fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_1 (
2842 din0,
2843 sel0,
2844 din1,
2845 sel1,
2846 dout);
2847 input [0:0] din0;
2848 input sel0;
2849 input [0:0] din1;
2850 input sel1;
2851 output [0:0] dout;
2852
2853
2854
2855
2856
2857mux2s #(1) d0_0 (
2858 .sel0(sel0),
2859 .sel1(sel1),
2860 .in0(din0[0:0]),
2861 .in1(din1[0:0]),
2862.dout(dout[0:0])
2863);
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877endmodule
2878
2879
2880//
2881// nand macro for ports = 2,3,4
2882//
2883//
2884
2885
2886
2887
2888
2889module fgu_fpf_dp_nand_macro__ports_4__width_1 (
2890 din0,
2891 din1,
2892 din2,
2893 din3,
2894 dout);
2895 input [0:0] din0;
2896 input [0:0] din1;
2897 input [0:0] din2;
2898 input [0:0] din3;
2899 output [0:0] dout;
2900
2901
2902
2903
2904
2905
2906nand4 #(1) d0_0 (
2907.in0(din0[0:0]),
2908.in1(din1[0:0]),
2909.in2(din2[0:0]),
2910.in3(din3[0:0]),
2911.out(dout[0:0])
2912);
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922endmodule
2923
2924
2925
2926
2927
2928//
2929// invert macro
2930//
2931//
2932
2933
2934
2935
2936
2937module fgu_fpf_dp_inv_macro__width_3 (
2938 din,
2939 dout);
2940 input [2:0] din;
2941 output [2:0] dout;
2942
2943
2944
2945
2946
2947
2948inv #(3) d0_0 (
2949.in(din[2:0]),
2950.out(dout[2:0])
2951);
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961endmodule
2962
2963
2964
2965
2966
2967//
2968// nand macro for ports = 2,3,4
2969//
2970//
2971
2972
2973
2974
2975
2976module fgu_fpf_dp_nand_macro__ports_2__width_3 (
2977 din0,
2978 din1,
2979 dout);
2980 input [2:0] din0;
2981 input [2:0] din1;
2982 output [2:0] dout;
2983
2984
2985
2986
2987
2988
2989nand2 #(3) d0_0 (
2990.in0(din0[2:0]),
2991.in1(din1[2:0]),
2992.out(dout[2:0])
2993);
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003endmodule
3004
3005
3006
3007
3008
3009//
3010// nor macro for ports = 2,3
3011//
3012//
3013
3014
3015
3016
3017
3018module fgu_fpf_dp_nor_macro__ports_2__width_2 (
3019 din0,
3020 din1,
3021 dout);
3022 input [1:0] din0;
3023 input [1:0] din1;
3024 output [1:0] dout;
3025
3026
3027
3028
3029
3030
3031nor2 #(2) d0_0 (
3032.in0(din0[1:0]),
3033.in1(din1[1:0]),
3034.out(dout[1:0])
3035);
3036
3037
3038
3039
3040
3041
3042
3043endmodule
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053// any PARAMS parms go into naming of macro
3054
3055module fgu_fpf_dp_msff_macro__mux_aope__ports_2__width_64 (
3056 din0,
3057 din1,
3058 sel0,
3059 clk,
3060 en,
3061 se,
3062 scan_in,
3063 siclk,
3064 soclk,
3065 pce_ov,
3066 stop,
3067 dout,
3068 scan_out);
3069wire psel0;
3070wire psel1;
3071wire [63:0] muxout;
3072wire l1clk;
3073wire siclk_out;
3074wire soclk_out;
3075wire [62:0] so;
3076
3077 input [63:0] din0;
3078 input [63:0] din1;
3079 input sel0;
3080
3081
3082 input clk;
3083 input en;
3084 input se;
3085 input scan_in;
3086 input siclk;
3087 input soclk;
3088 input pce_ov;
3089 input stop;
3090
3091
3092
3093 output [63:0] dout;
3094
3095
3096 output scan_out;
3097
3098
3099
3100
3101cl_dp1_penc2_8x c1_0 (
3102 .sel0(sel0),
3103 .psel0(psel0),
3104 .psel1(psel1)
3105);
3106
3107mux2s #(64) d1_0 (
3108 .sel0(psel0),
3109 .sel1(psel1),
3110 .in0(din0[63:0]),
3111 .in1(din1[63:0]),
3112.dout(muxout[63:0])
3113);
3114cl_dp1_l1hdr_8x c0_0 (
3115.l2clk(clk),
3116.pce(en),
3117.aclk(siclk),
3118.bclk(soclk),
3119.l1clk(l1clk),
3120 .se(se),
3121 .pce_ov(pce_ov),
3122 .stop(stop),
3123 .siclk_out(siclk_out),
3124 .soclk_out(soclk_out)
3125);
3126dff #(64) d0_0 (
3127.l1clk(l1clk),
3128.siclk(siclk_out),
3129.soclk(soclk_out),
3130.d(muxout[63:0]),
3131.si({scan_in,so[62:0]}),
3132.so({so[62:0],scan_out}),
3133.q(dout[63:0])
3134);
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155endmodule
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169// any PARAMS parms go into naming of macro
3170
3171module fgu_fpf_dp_msff_macro__mux_aope__ports_3__width_64 (
3172 din0,
3173 din1,
3174 din2,
3175 sel0,
3176 sel1,
3177 clk,
3178 en,
3179 se,
3180 scan_in,
3181 siclk,
3182 soclk,
3183 pce_ov,
3184 stop,
3185 dout,
3186 scan_out);
3187wire psel0;
3188wire psel1;
3189wire psel2;
3190wire [63:0] muxout;
3191wire l1clk;
3192wire siclk_out;
3193wire soclk_out;
3194wire [62:0] so;
3195
3196 input [63:0] din0;
3197 input [63:0] din1;
3198 input [63:0] din2;
3199 input sel0;
3200 input sel1;
3201
3202
3203 input clk;
3204 input en;
3205 input se;
3206 input scan_in;
3207 input siclk;
3208 input soclk;
3209 input pce_ov;
3210 input stop;
3211
3212
3213
3214 output [63:0] dout;
3215
3216
3217 output scan_out;
3218
3219
3220
3221
3222cl_dp1_penc3_8x c1_0 (
3223 .test(1'b1),
3224 .sel0(sel0),
3225 .sel1(sel1),
3226 .psel0(psel0),
3227 .psel1(psel1),
3228 .psel2(psel2)
3229);
3230
3231mux3s #(64) d1_0 (
3232 .sel0(psel0),
3233 .sel1(psel1),
3234 .sel2(psel2),
3235 .in0(din0[63:0]),
3236 .in1(din1[63:0]),
3237 .in2(din2[63:0]),
3238.dout(muxout[63:0])
3239);
3240cl_dp1_l1hdr_8x c0_0 (
3241.l2clk(clk),
3242.pce(en),
3243.aclk(siclk),
3244.bclk(soclk),
3245.l1clk(l1clk),
3246 .se(se),
3247 .pce_ov(pce_ov),
3248 .stop(stop),
3249 .siclk_out(siclk_out),
3250 .soclk_out(soclk_out)
3251);
3252dff #(64) d0_0 (
3253.l1clk(l1clk),
3254.siclk(siclk_out),
3255.soclk(soclk_out),
3256.d(muxout[63:0]),
3257.si({scan_in,so[62:0]}),
3258.so({so[62:0],scan_out}),
3259.q(dout[63:0])
3260);
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281endmodule
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295// any PARAMS parms go into naming of macro
3296
3297module fgu_fpf_dp_msff_macro__width_29 (
3298 din,
3299 clk,
3300 en,
3301 se,
3302 scan_in,
3303 siclk,
3304 soclk,
3305 pce_ov,
3306 stop,
3307 dout,
3308 scan_out);
3309wire l1clk;
3310wire siclk_out;
3311wire soclk_out;
3312wire [27:0] so;
3313
3314 input [28:0] din;
3315
3316
3317 input clk;
3318 input en;
3319 input se;
3320 input scan_in;
3321 input siclk;
3322 input soclk;
3323 input pce_ov;
3324 input stop;
3325
3326
3327
3328 output [28:0] dout;
3329
3330
3331 output scan_out;
3332
3333
3334
3335
3336cl_dp1_l1hdr_8x c0_0 (
3337.l2clk(clk),
3338.pce(en),
3339.aclk(siclk),
3340.bclk(soclk),
3341.l1clk(l1clk),
3342 .se(se),
3343 .pce_ov(pce_ov),
3344 .stop(stop),
3345 .siclk_out(siclk_out),
3346 .soclk_out(soclk_out)
3347);
3348dff #(29) d0_0 (
3349.l1clk(l1clk),
3350.siclk(siclk_out),
3351.soclk(soclk_out),
3352.d(din[28:0]),
3353.si({scan_in,so[27:0]}),
3354.so({so[27:0],scan_out}),
3355.q(dout[28:0])
3356);
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377endmodule
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3388// also for pass-gate with decoder
3389
3390
3391
3392
3393
3394// any PARAMS parms go into naming of macro
3395
3396module fgu_fpf_dp_mux_macro__buffsel_none__mux_aonpe__ports_2__width_2 (
3397 din0,
3398 sel0,
3399 din1,
3400 sel1,
3401 dout);
3402 input [1:0] din0;
3403 input sel0;
3404 input [1:0] din1;
3405 input sel1;
3406 output [1:0] dout;
3407
3408
3409
3410
3411
3412mux2s #(2) d0_0 (
3413 .sel0(sel0),
3414 .sel1(sel1),
3415 .in0(din0[1:0]),
3416 .in1(din1[1:0]),
3417.dout(dout[1:0])
3418);
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432endmodule
3433
3434
3435//
3436// nand macro for ports = 2,3,4
3437//
3438//
3439
3440
3441
3442
3443
3444module fgu_fpf_dp_nand_macro__ports_4__width_3 (
3445 din0,
3446 din1,
3447 din2,
3448 din3,
3449 dout);
3450 input [2:0] din0;
3451 input [2:0] din1;
3452 input [2:0] din2;
3453 input [2:0] din3;
3454 output [2:0] dout;
3455
3456
3457
3458
3459
3460
3461nand4 #(3) d0_0 (
3462.in0(din0[2:0]),
3463.in1(din1[2:0]),
3464.in2(din2[2:0]),
3465.in3(din3[2:0]),
3466.out(dout[2:0])
3467);
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477endmodule
3478
3479
3480
3481
3482
3483//
3484// invert macro
3485//
3486//
3487
3488
3489
3490
3491
3492module fgu_fpf_dp_inv_macro__width_63 (
3493 din,
3494 dout);
3495 input [62:0] din;
3496 output [62:0] dout;
3497
3498
3499
3500
3501
3502
3503inv #(63) d0_0 (
3504.in(din[62:0]),
3505.out(dout[62:0])
3506);
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516endmodule
3517
3518
3519
3520
3521
3522// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3523// also for pass-gate with decoder
3524
3525
3526
3527
3528
3529// any PARAMS parms go into naming of macro
3530
3531module fgu_fpf_dp_mux_macro__dmux_6x__mux_aonpe__ports_2__width_63 (
3532 din0,
3533 sel0,
3534 din1,
3535 sel1,
3536 dout);
3537wire buffout0;
3538wire buffout1;
3539
3540 input [62:0] din0;
3541 input sel0;
3542 input [62:0] din1;
3543 input sel1;
3544 output [62:0] dout;
3545
3546
3547
3548
3549
3550cl_dp1_muxbuff2_8x c0_0 (
3551 .in0(sel0),
3552 .in1(sel1),
3553 .out0(buffout0),
3554 .out1(buffout1)
3555);
3556mux2s #(63) d0_0 (
3557 .sel0(buffout0),
3558 .sel1(buffout1),
3559 .in0(din0[62:0]),
3560 .in1(din1[62:0]),
3561.dout(dout[62:0])
3562);
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576endmodule
3577
3578
3579//
3580// nand macro for ports = 2,3,4
3581//
3582//
3583
3584
3585
3586
3587
3588module fgu_fpf_dp_nand_macro__ports_2__width_18 (
3589 din0,
3590 din1,
3591 dout);
3592 input [17:0] din0;
3593 input [17:0] din1;
3594 output [17:0] dout;
3595
3596
3597
3598
3599
3600
3601nand2 #(18) d0_0 (
3602.in0(din0[17:0]),
3603.in1(din1[17:0]),
3604.out(dout[17:0])
3605);
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615endmodule
3616
3617
3618
3619
3620
3621//
3622// buff macro
3623//
3624//
3625
3626
3627
3628
3629
3630module fgu_fpf_dp_buff_macro__dbuff_48x__width_1 (
3631 din,
3632 dout);
3633 input [0:0] din;
3634 output [0:0] dout;
3635
3636
3637
3638
3639
3640
3641buff #(1) d0_0 (
3642.in(din[0:0]),
3643.out(dout[0:0])
3644);
3645
3646
3647
3648
3649
3650
3651
3652
3653endmodule
3654
3655
3656
3657
3658
3659// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3660// also for pass-gate with decoder
3661
3662
3663
3664
3665
3666// any PARAMS parms go into naming of macro
3667
3668module fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_64 (
3669 din0,
3670 din1,
3671 din2,
3672 din3,
3673 din4,
3674 din5,
3675 din6,
3676 din7,
3677 sel,
3678 muxtst,
3679 test,
3680 dout);
3681wire psel0;
3682wire psel1;
3683wire psel2;
3684wire psel3;
3685wire psel4;
3686wire psel5;
3687wire psel6;
3688wire psel7;
3689
3690 input [63:0] din0;
3691 input [63:0] din1;
3692 input [63:0] din2;
3693 input [63:0] din3;
3694 input [63:0] din4;
3695 input [63:0] din5;
3696 input [63:0] din6;
3697 input [63:0] din7;
3698 input [2:0] sel;
3699 input muxtst;
3700 input test;
3701 output [63:0] dout;
3702
3703
3704
3705
3706
3707cl_dp1_pdec8_8x c0_0 (
3708 .sel0(sel[0]),
3709 .sel1(sel[1]),
3710 .sel2(sel[2]),
3711 .psel0(psel0),
3712 .psel1(psel1),
3713 .psel2(psel2),
3714 .psel3(psel3),
3715 .psel4(psel4),
3716 .psel5(psel5),
3717 .psel6(psel6),
3718 .psel7(psel7),
3719 .test(test)
3720);
3721
3722mux8 #(64) d0_0 (
3723 .sel0(psel0),
3724 .sel1(psel1),
3725 .sel2(psel2),
3726 .sel3(psel3),
3727 .sel4(psel4),
3728 .sel5(psel5),
3729 .sel6(psel6),
3730 .sel7(psel7),
3731 .in0(din0[63:0]),
3732 .in1(din1[63:0]),
3733 .in2(din2[63:0]),
3734 .in3(din3[63:0]),
3735 .in4(din4[63:0]),
3736 .in5(din5[63:0]),
3737 .in6(din6[63:0]),
3738 .in7(din7[63:0]),
3739.dout(dout[63:0]),
3740 .muxtst(muxtst)
3741);
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755endmodule
3756
3757
3758// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3759// also for pass-gate with decoder
3760
3761
3762
3763
3764
3765// any PARAMS parms go into naming of macro
3766
3767module fgu_fpf_dp_mux_macro__mux_aodec__ports_8__width_64 (
3768 din0,
3769 din1,
3770 din2,
3771 din3,
3772 din4,
3773 din5,
3774 din6,
3775 din7,
3776 sel,
3777 dout);
3778wire psel0;
3779wire psel1;
3780wire psel2;
3781wire psel3;
3782wire psel4;
3783wire psel5;
3784wire psel6;
3785wire psel7;
3786
3787 input [63:0] din0;
3788 input [63:0] din1;
3789 input [63:0] din2;
3790 input [63:0] din3;
3791 input [63:0] din4;
3792 input [63:0] din5;
3793 input [63:0] din6;
3794 input [63:0] din7;
3795 input [2:0] sel;
3796 output [63:0] dout;
3797
3798
3799
3800
3801
3802cl_dp1_pdec8_8x c0_0 (
3803 .test(1'b1),
3804 .sel0(sel[0]),
3805 .sel1(sel[1]),
3806 .sel2(sel[2]),
3807 .psel0(psel0),
3808 .psel1(psel1),
3809 .psel2(psel2),
3810 .psel3(psel3),
3811 .psel4(psel4),
3812 .psel5(psel5),
3813 .psel6(psel6),
3814 .psel7(psel7)
3815);
3816
3817mux8s #(64) d0_0 (
3818 .sel0(psel0),
3819 .sel1(psel1),
3820 .sel2(psel2),
3821 .sel3(psel3),
3822 .sel4(psel4),
3823 .sel5(psel5),
3824 .sel6(psel6),
3825 .sel7(psel7),
3826 .in0(din0[63:0]),
3827 .in1(din1[63:0]),
3828 .in2(din2[63:0]),
3829 .in3(din3[63:0]),
3830 .in4(din4[63:0]),
3831 .in5(din5[63:0]),
3832 .in6(din6[63:0]),
3833 .in7(din7[63:0]),
3834.dout(dout[63:0])
3835);
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849endmodule
3850
3851
3852//
3853// and macro for ports = 2,3,4
3854//
3855//
3856
3857
3858
3859
3860
3861module fgu_fpf_dp_and_macro__ports_2__width_31 (
3862 din0,
3863 din1,
3864 dout);
3865 input [30:0] din0;
3866 input [30:0] din1;
3867 output [30:0] dout;
3868
3869
3870
3871
3872
3873
3874and2 #(31) d0_0 (
3875.in0(din0[30:0]),
3876.in1(din1[30:0]),
3877.out(dout[30:0])
3878);
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888endmodule
3889
3890
3891
3892
3893
3894// general mux macro for pass-gate and and-or muxes with/wout priority encoders
3895// also for pass-gate with decoder
3896
3897
3898
3899
3900
3901// any PARAMS parms go into naming of macro
3902
3903module fgu_fpf_dp_mux_macro__mux_aodec__ports_8__width_57 (
3904 din0,
3905 din1,
3906 din2,
3907 din3,
3908 din4,
3909 din5,
3910 din6,
3911 din7,
3912 sel,
3913 dout);
3914wire psel0;
3915wire psel1;
3916wire psel2;
3917wire psel3;
3918wire psel4;
3919wire psel5;
3920wire psel6;
3921wire psel7;
3922
3923 input [56:0] din0;
3924 input [56:0] din1;
3925 input [56:0] din2;
3926 input [56:0] din3;
3927 input [56:0] din4;
3928 input [56:0] din5;
3929 input [56:0] din6;
3930 input [56:0] din7;
3931 input [2:0] sel;
3932 output [56:0] dout;
3933
3934
3935
3936
3937
3938cl_dp1_pdec8_8x c0_0 (
3939 .test(1'b1),
3940 .sel0(sel[0]),
3941 .sel1(sel[1]),
3942 .sel2(sel[2]),
3943 .psel0(psel0),
3944 .psel1(psel1),
3945 .psel2(psel2),
3946 .psel3(psel3),
3947 .psel4(psel4),
3948 .psel5(psel5),
3949 .psel6(psel6),
3950 .psel7(psel7)
3951);
3952
3953mux8s #(57) d0_0 (
3954 .sel0(psel0),
3955 .sel1(psel1),
3956 .sel2(psel2),
3957 .sel3(psel3),
3958 .sel4(psel4),
3959 .sel5(psel5),
3960 .sel6(psel6),
3961 .sel7(psel7),
3962 .in0(din0[56:0]),
3963 .in1(din1[56:0]),
3964 .in2(din2[56:0]),
3965 .in3(din3[56:0]),
3966 .in4(din4[56:0]),
3967 .in5(din5[56:0]),
3968 .in6(din6[56:0]),
3969 .in7(din7[56:0]),
3970.dout(dout[56:0])
3971);
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985endmodule
3986
3987
3988//
3989// buff macro
3990//
3991//
3992
3993
3994
3995
3996
3997module fgu_fpf_dp_buff_macro__dbuff_32x__width_1 (
3998 din,
3999 dout);
4000 input [0:0] din;
4001 output [0:0] dout;
4002
4003
4004
4005
4006
4007
4008buff #(1) d0_0 (
4009.in(din[0:0]),
4010.out(dout[0:0])
4011);
4012
4013
4014
4015
4016
4017
4018
4019
4020endmodule
4021
4022
4023
4024
4025
4026// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4027// also for pass-gate with decoder
4028
4029
4030
4031
4032
4033// any PARAMS parms go into naming of macro
4034
4035module fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_14 (
4036 din0,
4037 din1,
4038 din2,
4039 din3,
4040 din4,
4041 din5,
4042 din6,
4043 din7,
4044 sel,
4045 muxtst,
4046 test,
4047 dout);
4048wire psel0;
4049wire psel1;
4050wire psel2;
4051wire psel3;
4052wire psel4;
4053wire psel5;
4054wire psel6;
4055wire psel7;
4056
4057 input [13:0] din0;
4058 input [13:0] din1;
4059 input [13:0] din2;
4060 input [13:0] din3;
4061 input [13:0] din4;
4062 input [13:0] din5;
4063 input [13:0] din6;
4064 input [13:0] din7;
4065 input [2:0] sel;
4066 input muxtst;
4067 input test;
4068 output [13:0] dout;
4069
4070
4071
4072
4073
4074cl_dp1_pdec8_8x c0_0 (
4075 .sel0(sel[0]),
4076 .sel1(sel[1]),
4077 .sel2(sel[2]),
4078 .psel0(psel0),
4079 .psel1(psel1),
4080 .psel2(psel2),
4081 .psel3(psel3),
4082 .psel4(psel4),
4083 .psel5(psel5),
4084 .psel6(psel6),
4085 .psel7(psel7),
4086 .test(test)
4087);
4088
4089mux8 #(14) d0_0 (
4090 .sel0(psel0),
4091 .sel1(psel1),
4092 .sel2(psel2),
4093 .sel3(psel3),
4094 .sel4(psel4),
4095 .sel5(psel5),
4096 .sel6(psel6),
4097 .sel7(psel7),
4098 .in0(din0[13:0]),
4099 .in1(din1[13:0]),
4100 .in2(din2[13:0]),
4101 .in3(din3[13:0]),
4102 .in4(din4[13:0]),
4103 .in5(din5[13:0]),
4104 .in6(din6[13:0]),
4105 .in7(din7[13:0]),
4106.dout(dout[13:0]),
4107 .muxtst(muxtst)
4108);
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122endmodule
4123
4124
4125
4126
4127
4128
4129// any PARAMS parms go into naming of macro
4130
4131module fgu_fpf_dp_msff_macro__width_64 (
4132 din,
4133 clk,
4134 en,
4135 se,
4136 scan_in,
4137 siclk,
4138 soclk,
4139 pce_ov,
4140 stop,
4141 dout,
4142 scan_out);
4143wire l1clk;
4144wire siclk_out;
4145wire soclk_out;
4146wire [62:0] so;
4147
4148 input [63:0] din;
4149
4150
4151 input clk;
4152 input en;
4153 input se;
4154 input scan_in;
4155 input siclk;
4156 input soclk;
4157 input pce_ov;
4158 input stop;
4159
4160
4161
4162 output [63:0] dout;
4163
4164
4165 output scan_out;
4166
4167
4168
4169
4170cl_dp1_l1hdr_8x c0_0 (
4171.l2clk(clk),
4172.pce(en),
4173.aclk(siclk),
4174.bclk(soclk),
4175.l1clk(l1clk),
4176 .se(se),
4177 .pce_ov(pce_ov),
4178 .stop(stop),
4179 .siclk_out(siclk_out),
4180 .soclk_out(soclk_out)
4181);
4182dff #(64) d0_0 (
4183.l1clk(l1clk),
4184.siclk(siclk_out),
4185.soclk(soclk_out),
4186.d(din[63:0]),
4187.si({scan_in,so[62:0]}),
4188.so({so[62:0],scan_out}),
4189.q(dout[63:0])
4190);
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211endmodule
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225// any PARAMS parms go into naming of macro
4226
4227module fgu_fpf_dp_msff_macro__width_54 (
4228 din,
4229 clk,
4230 en,
4231 se,
4232 scan_in,
4233 siclk,
4234 soclk,
4235 pce_ov,
4236 stop,
4237 dout,
4238 scan_out);
4239wire l1clk;
4240wire siclk_out;
4241wire soclk_out;
4242wire [52:0] so;
4243
4244 input [53:0] din;
4245
4246
4247 input clk;
4248 input en;
4249 input se;
4250 input scan_in;
4251 input siclk;
4252 input soclk;
4253 input pce_ov;
4254 input stop;
4255
4256
4257
4258 output [53:0] dout;
4259
4260
4261 output scan_out;
4262
4263
4264
4265
4266cl_dp1_l1hdr_8x c0_0 (
4267.l2clk(clk),
4268.pce(en),
4269.aclk(siclk),
4270.bclk(soclk),
4271.l1clk(l1clk),
4272 .se(se),
4273 .pce_ov(pce_ov),
4274 .stop(stop),
4275 .siclk_out(siclk_out),
4276 .soclk_out(soclk_out)
4277);
4278dff #(54) d0_0 (
4279.l1clk(l1clk),
4280.siclk(siclk_out),
4281.soclk(soclk_out),
4282.d(din[53:0]),
4283.si({scan_in,so[52:0]}),
4284.so({so[52:0],scan_out}),
4285.q(dout[53:0])
4286);
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307endmodule
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317//
4318// invert macro
4319//
4320//
4321
4322
4323
4324
4325
4326module fgu_fpf_dp_inv_macro__width_2 (
4327 din,
4328 dout);
4329 input [1:0] din;
4330 output [1:0] dout;
4331
4332
4333
4334
4335
4336
4337inv #(2) d0_0 (
4338.in(din[1:0]),
4339.out(dout[1:0])
4340);
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350endmodule
4351
4352
4353
4354
4355
4356//
4357// and macro for ports = 2,3,4
4358//
4359//
4360
4361
4362
4363
4364
4365module fgu_fpf_dp_and_macro__ports_3__width_4 (
4366 din0,
4367 din1,
4368 din2,
4369 dout);
4370 input [3:0] din0;
4371 input [3:0] din1;
4372 input [3:0] din2;
4373 output [3:0] dout;
4374
4375
4376
4377
4378
4379
4380and3 #(4) d0_0 (
4381.in0(din0[3:0]),
4382.in1(din1[3:0]),
4383.in2(din2[3:0]),
4384.out(dout[3:0])
4385);
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395endmodule
4396
4397
4398
4399
4400
4401// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4402// also for pass-gate with decoder
4403
4404
4405
4406
4407
4408// any PARAMS parms go into naming of macro
4409
4410module fgu_fpf_dp_mux_macro__mux_pgpe__ports_2__width_64 (
4411 din0,
4412 din1,
4413 sel0,
4414 dout);
4415wire psel0_unused;
4416wire psel1;
4417
4418 input [63:0] din0;
4419 input [63:0] din1;
4420 input sel0;
4421 output [63:0] dout;
4422
4423
4424
4425
4426
4427cl_dp1_penc2_8x c0_0 (
4428 .sel0(sel0),
4429 .psel0(psel0_unused),
4430 .psel1(psel1)
4431);
4432
4433mux2e #(64) d0_0 (
4434 .sel(psel1),
4435 .in0(din0[63:0]),
4436 .in1(din1[63:0]),
4437.dout(dout[63:0])
4438);
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452endmodule
4453
4454
4455// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4456// also for pass-gate with decoder
4457
4458
4459
4460
4461
4462// any PARAMS parms go into naming of macro
4463
4464module fgu_fpf_dp_mux_macro__mux_pgpe__ports_4__width_64 (
4465 din0,
4466 din1,
4467 din2,
4468 din3,
4469 sel0,
4470 sel1,
4471 sel2,
4472 muxtst,
4473 test,
4474 dout);
4475wire psel0;
4476wire psel1;
4477wire psel2;
4478wire psel3;
4479
4480 input [63:0] din0;
4481 input [63:0] din1;
4482 input [63:0] din2;
4483 input [63:0] din3;
4484 input sel0;
4485 input sel1;
4486 input sel2;
4487 input muxtst;
4488 input test;
4489 output [63:0] dout;
4490
4491
4492
4493
4494
4495cl_dp1_penc4_8x c0_0 (
4496 .sel0(sel0),
4497 .sel1(sel1),
4498 .sel2(sel2),
4499 .psel0(psel0),
4500 .psel1(psel1),
4501 .psel2(psel2),
4502 .psel3(psel3),
4503 .test(test)
4504);
4505
4506mux4 #(64) d0_0 (
4507 .sel0(psel0),
4508 .sel1(psel1),
4509 .sel2(psel2),
4510 .sel3(psel3),
4511 .in0(din0[63:0]),
4512 .in1(din1[63:0]),
4513 .in2(din2[63:0]),
4514 .in3(din3[63:0]),
4515.dout(dout[63:0]),
4516 .muxtst(muxtst)
4517);
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531endmodule
4532
4533
4534//
4535// or macro for ports = 2,3
4536//
4537//
4538
4539
4540
4541
4542
4543module fgu_fpf_dp_or_macro__ports_2__width_1 (
4544 din0,
4545 din1,
4546 dout);
4547 input [0:0] din0;
4548 input [0:0] din1;
4549 output [0:0] dout;
4550
4551
4552
4553
4554
4555
4556or2 #(1) d0_0 (
4557.in0(din0[0:0]),
4558.in1(din1[0:0]),
4559.out(dout[0:0])
4560);
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570endmodule
4571
4572
4573
4574
4575
4576//
4577// nand macro for ports = 2,3,4
4578//
4579//
4580
4581
4582
4583
4584
4585module fgu_fpf_dp_nand_macro__ports_2__width_6 (
4586 din0,
4587 din1,
4588 dout);
4589 input [5:0] din0;
4590 input [5:0] din1;
4591 output [5:0] dout;
4592
4593
4594
4595
4596
4597
4598nand2 #(6) d0_0 (
4599.in0(din0[5:0]),
4600.in1(din1[5:0]),
4601.out(dout[5:0])
4602);
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612endmodule
4613
4614
4615
4616
4617
4618//
4619// cla macro
4620//
4621//
4622
4623
4624
4625
4626
4627module fgu_fpf_dp_cla_macro__width_64 (
4628 cin,
4629 din0,
4630 din1,
4631 dout,
4632 cout);
4633 input cin;
4634 input [63:0] din0;
4635 input [63:0] din1;
4636 output [63:0] dout;
4637 output cout;
4638
4639
4640
4641
4642
4643
4644
4645cla #(64) m0_0 (
4646.cin(cin),
4647.in0(din0[63:0]),
4648.in1(din1[63:0]),
4649.out(dout[63:0]),
4650.cout(cout)
4651);
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664endmodule
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674// any PARAMS parms go into naming of macro
4675
4676module fgu_fpf_dp_msff_macro__width_14 (
4677 din,
4678 clk,
4679 en,
4680 se,
4681 scan_in,
4682 siclk,
4683 soclk,
4684 pce_ov,
4685 stop,
4686 dout,
4687 scan_out);
4688wire l1clk;
4689wire siclk_out;
4690wire soclk_out;
4691wire [12:0] so;
4692
4693 input [13:0] din;
4694
4695
4696 input clk;
4697 input en;
4698 input se;
4699 input scan_in;
4700 input siclk;
4701 input soclk;
4702 input pce_ov;
4703 input stop;
4704
4705
4706
4707 output [13:0] dout;
4708
4709
4710 output scan_out;
4711
4712
4713
4714
4715cl_dp1_l1hdr_8x c0_0 (
4716.l2clk(clk),
4717.pce(en),
4718.aclk(siclk),
4719.bclk(soclk),
4720.l1clk(l1clk),
4721 .se(se),
4722 .pce_ov(pce_ov),
4723 .stop(stop),
4724 .siclk_out(siclk_out),
4725 .soclk_out(soclk_out)
4726);
4727dff #(14) d0_0 (
4728.l1clk(l1clk),
4729.siclk(siclk_out),
4730.soclk(soclk_out),
4731.d(din[13:0]),
4732.si({scan_in,so[12:0]}),
4733.so({so[12:0],scan_out}),
4734.q(dout[13:0])
4735);
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756endmodule
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4767// also for pass-gate with decoder
4768
4769
4770
4771
4772
4773// any PARAMS parms go into naming of macro
4774
4775module fgu_fpf_dp_mux_macro__mux_pgpe__ports_7__width_64 (
4776 din0,
4777 din1,
4778 din2,
4779 din3,
4780 din4,
4781 din5,
4782 din6,
4783 sel0,
4784 sel1,
4785 sel2,
4786 sel3,
4787 sel4,
4788 sel5,
4789 muxtst,
4790 test,
4791 dout);
4792wire psel0;
4793wire psel1;
4794wire psel2;
4795wire psel3;
4796wire psel4;
4797wire psel5;
4798wire psel6;
4799
4800 input [63:0] din0;
4801 input [63:0] din1;
4802 input [63:0] din2;
4803 input [63:0] din3;
4804 input [63:0] din4;
4805 input [63:0] din5;
4806 input [63:0] din6;
4807 input sel0;
4808 input sel1;
4809 input sel2;
4810 input sel3;
4811 input sel4;
4812 input sel5;
4813 input muxtst;
4814 input test;
4815 output [63:0] dout;
4816
4817
4818
4819
4820
4821cl_dp1_penc7_8x c0_0 (
4822 .sel0(sel0),
4823 .sel1(sel1),
4824 .sel2(sel2),
4825 .sel3(sel3),
4826 .sel4(sel4),
4827 .sel5(sel5),
4828 .psel0(psel0),
4829 .psel1(psel1),
4830 .psel2(psel2),
4831 .psel3(psel3),
4832 .psel4(psel4),
4833 .psel5(psel5),
4834 .psel6(psel6),
4835 .test(test)
4836);
4837
4838mux7 #(64) d0_0 (
4839 .sel0(psel0),
4840 .sel1(psel1),
4841 .sel2(psel2),
4842 .sel3(psel3),
4843 .sel4(psel4),
4844 .sel5(psel5),
4845 .sel6(psel6),
4846 .in0(din0[63:0]),
4847 .in1(din1[63:0]),
4848 .in2(din2[63:0]),
4849 .in3(din3[63:0]),
4850 .in4(din4[63:0]),
4851 .in5(din5[63:0]),
4852 .in6(din6[63:0]),
4853.dout(dout[63:0]),
4854 .muxtst(muxtst)
4855);
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869endmodule
4870
4871
4872// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4873// also for pass-gate with decoder
4874
4875
4876
4877
4878
4879// any PARAMS parms go into naming of macro
4880
4881module fgu_fpf_dp_mux_macro__mux_pgpe__ports_8__width_29 (
4882 din0,
4883 din1,
4884 din2,
4885 din3,
4886 din4,
4887 din5,
4888 din6,
4889 din7,
4890 sel0,
4891 sel1,
4892 sel2,
4893 sel3,
4894 sel4,
4895 sel5,
4896 sel6,
4897 muxtst,
4898 test,
4899 dout);
4900wire psel0;
4901wire psel1;
4902wire psel2;
4903wire psel3;
4904wire psel4;
4905wire psel5;
4906wire psel6;
4907wire psel7;
4908
4909 input [28:0] din0;
4910 input [28:0] din1;
4911 input [28:0] din2;
4912 input [28:0] din3;
4913 input [28:0] din4;
4914 input [28:0] din5;
4915 input [28:0] din6;
4916 input [28:0] din7;
4917 input sel0;
4918 input sel1;
4919 input sel2;
4920 input sel3;
4921 input sel4;
4922 input sel5;
4923 input sel6;
4924 input muxtst;
4925 input test;
4926 output [28:0] dout;
4927
4928
4929
4930
4931
4932cl_dp1_penc8_8x c0_0 (
4933 .sel0(sel0),
4934 .sel1(sel1),
4935 .sel2(sel2),
4936 .sel3(sel3),
4937 .sel4(sel4),
4938 .sel5(sel5),
4939 .sel6(sel6),
4940 .psel0(psel0),
4941 .psel1(psel1),
4942 .psel2(psel2),
4943 .psel3(psel3),
4944 .psel4(psel4),
4945 .psel5(psel5),
4946 .psel6(psel6),
4947 .psel7(psel7),
4948 .test(test)
4949);
4950
4951mux8 #(29) d0_0 (
4952 .sel0(psel0),
4953 .sel1(psel1),
4954 .sel2(psel2),
4955 .sel3(psel3),
4956 .sel4(psel4),
4957 .sel5(psel5),
4958 .sel6(psel6),
4959 .sel7(psel7),
4960 .in0(din0[28:0]),
4961 .in1(din1[28:0]),
4962 .in2(din2[28:0]),
4963 .in3(din3[28:0]),
4964 .in4(din4[28:0]),
4965 .in5(din5[28:0]),
4966 .in6(din6[28:0]),
4967 .in7(din7[28:0]),
4968.dout(dout[28:0]),
4969 .muxtst(muxtst)
4970);
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984endmodule
4985
4986
4987// general mux macro for pass-gate and and-or muxes with/wout priority encoders
4988// also for pass-gate with decoder
4989
4990
4991
4992
4993
4994// any PARAMS parms go into naming of macro
4995
4996module fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_59 (
4997 din0,
4998 din1,
4999 din2,
5000 din3,
5001 din4,
5002 din5,
5003 din6,
5004 din7,
5005 sel,
5006 muxtst,
5007 test,
5008 dout);
5009wire psel0;
5010wire psel1;
5011wire psel2;
5012wire psel3;
5013wire psel4;
5014wire psel5;
5015wire psel6;
5016wire psel7;
5017
5018 input [58:0] din0;
5019 input [58:0] din1;
5020 input [58:0] din2;
5021 input [58:0] din3;
5022 input [58:0] din4;
5023 input [58:0] din5;
5024 input [58:0] din6;
5025 input [58:0] din7;
5026 input [2:0] sel;
5027 input muxtst;
5028 input test;
5029 output [58:0] dout;
5030
5031
5032
5033
5034
5035cl_dp1_pdec8_8x c0_0 (
5036 .sel0(sel[0]),
5037 .sel1(sel[1]),
5038 .sel2(sel[2]),
5039 .psel0(psel0),
5040 .psel1(psel1),
5041 .psel2(psel2),
5042 .psel3(psel3),
5043 .psel4(psel4),
5044 .psel5(psel5),
5045 .psel6(psel6),
5046 .psel7(psel7),
5047 .test(test)
5048);
5049
5050mux8 #(59) d0_0 (
5051 .sel0(psel0),
5052 .sel1(psel1),
5053 .sel2(psel2),
5054 .sel3(psel3),
5055 .sel4(psel4),
5056 .sel5(psel5),
5057 .sel6(psel6),
5058 .sel7(psel7),
5059 .in0(din0[58:0]),
5060 .in1(din1[58:0]),
5061 .in2(din2[58:0]),
5062 .in3(din3[58:0]),
5063 .in4(din4[58:0]),
5064 .in5(din5[58:0]),
5065 .in6(din6[58:0]),
5066 .in7(din7[58:0]),
5067.dout(dout[58:0]),
5068 .muxtst(muxtst)
5069);
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083endmodule
5084
5085
5086// general mux macro for pass-gate and and-or muxes with/wout priority encoders
5087// also for pass-gate with decoder
5088
5089
5090
5091
5092
5093// any PARAMS parms go into naming of macro
5094
5095module fgu_fpf_dp_mux_macro__mux_pgdec__ports_8__width_52 (
5096 din0,
5097 din1,
5098 din2,
5099 din3,
5100 din4,
5101 din5,
5102 din6,
5103 din7,
5104 sel,
5105 muxtst,
5106 test,
5107 dout);
5108wire psel0;
5109wire psel1;
5110wire psel2;
5111wire psel3;
5112wire psel4;
5113wire psel5;
5114wire psel6;
5115wire psel7;
5116
5117 input [51:0] din0;
5118 input [51:0] din1;
5119 input [51:0] din2;
5120 input [51:0] din3;
5121 input [51:0] din4;
5122 input [51:0] din5;
5123 input [51:0] din6;
5124 input [51:0] din7;
5125 input [2:0] sel;
5126 input muxtst;
5127 input test;
5128 output [51:0] dout;
5129
5130
5131
5132
5133
5134cl_dp1_pdec8_8x c0_0 (
5135 .sel0(sel[0]),
5136 .sel1(sel[1]),
5137 .sel2(sel[2]),
5138 .psel0(psel0),
5139 .psel1(psel1),
5140 .psel2(psel2),
5141 .psel3(psel3),
5142 .psel4(psel4),
5143 .psel5(psel5),
5144 .psel6(psel6),
5145 .psel7(psel7),
5146 .test(test)
5147);
5148
5149mux8 #(52) d0_0 (
5150 .sel0(psel0),
5151 .sel1(psel1),
5152 .sel2(psel2),
5153 .sel3(psel3),
5154 .sel4(psel4),
5155 .sel5(psel5),
5156 .sel6(psel6),
5157 .sel7(psel7),
5158 .in0(din0[51:0]),
5159 .in1(din1[51:0]),
5160 .in2(din2[51:0]),
5161 .in3(din3[51:0]),
5162 .in4(din4[51:0]),
5163 .in5(din5[51:0]),
5164 .in6(din6[51:0]),
5165 .in7(din7[51:0]),
5166.dout(dout[51:0]),
5167 .muxtst(muxtst)
5168);
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182endmodule
5183
5184
5185//
5186// increment macro
5187//
5188//
5189
5190
5191
5192
5193
5194module fgu_fpf_dp_increment_macro__width_64 (
5195 din,
5196 cin,
5197 dout,
5198 cout);
5199 input [63:0] din;
5200 input cin;
5201 output [63:0] dout;
5202 output cout;
5203
5204
5205
5206
5207
5208
5209incr #(64) m0_0 (
5210.cin(cin),
5211.in(din[63:0]),
5212.out(dout[63:0]),
5213.cout(cout)
5214);
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226endmodule
5227
5228
5229
5230
5231
5232// general mux macro for pass-gate and and-or muxes with/wout priority encoders
5233// also for pass-gate with decoder
5234
5235
5236
5237
5238
5239// any PARAMS parms go into naming of macro
5240
5241module fgu_fpf_dp_mux_macro__mux_aope__ports_2__width_52 (
5242 din0,
5243 din1,
5244 sel0,
5245 dout);
5246wire psel0;
5247wire psel1;
5248
5249 input [51:0] din0;
5250 input [51:0] din1;
5251 input sel0;
5252 output [51:0] dout;
5253
5254
5255
5256
5257
5258cl_dp1_penc2_8x c0_0 (
5259 .sel0(sel0),
5260 .psel0(psel0),
5261 .psel1(psel1)
5262);
5263
5264mux2s #(52) d0_0 (
5265 .sel0(psel0),
5266 .sel1(psel1),
5267 .in0(din0[51:0]),
5268 .in1(din1[51:0]),
5269.dout(dout[51:0])
5270);
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284endmodule
5285
5286
5287// general mux macro for pass-gate and and-or muxes with/wout priority encoders
5288// also for pass-gate with decoder
5289
5290
5291
5292
5293
5294// any PARAMS parms go into naming of macro
5295
5296module fgu_fpf_dp_mux_macro__mux_aope__ports_5__width_64 (
5297 din0,
5298 din1,
5299 din2,
5300 din3,
5301 din4,
5302 sel0,
5303 sel1,
5304 sel2,
5305 sel3,
5306 dout);
5307wire psel0;
5308wire psel1;
5309wire psel2;
5310wire psel3;
5311wire psel4;
5312
5313 input [63:0] din0;
5314 input [63:0] din1;
5315 input [63:0] din2;
5316 input [63:0] din3;
5317 input [63:0] din4;
5318 input sel0;
5319 input sel1;
5320 input sel2;
5321 input sel3;
5322 output [63:0] dout;
5323
5324
5325
5326
5327
5328cl_dp1_penc5_8x c0_0 (
5329 .test(1'b1),
5330 .sel0(sel0),
5331 .sel1(sel1),
5332 .sel2(sel2),
5333 .sel3(sel3),
5334 .psel0(psel0),
5335 .psel1(psel1),
5336 .psel2(psel2),
5337 .psel3(psel3),
5338 .psel4(psel4)
5339);
5340
5341mux5s #(64) d0_0 (
5342 .sel0(psel0),
5343 .sel1(psel1),
5344 .sel2(psel2),
5345 .sel3(psel3),
5346 .sel4(psel4),
5347 .in0(din0[63:0]),
5348 .in1(din1[63:0]),
5349 .in2(din2[63:0]),
5350 .in3(din3[63:0]),
5351 .in4(din4[63:0]),
5352.dout(dout[63:0])
5353);
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367endmodule
5368
5369
5370
5371
5372
5373
5374// any PARAMS parms go into naming of macro
5375
5376module fgu_fpf_dp_msff_macro__mux_aope__ports_6__width_64 (
5377 din0,
5378 din1,
5379 din2,
5380 din3,
5381 din4,
5382 din5,
5383 sel0,
5384 sel1,
5385 sel2,
5386 sel3,
5387 sel4,
5388 clk,
5389 en,
5390 se,
5391 scan_in,
5392 siclk,
5393 soclk,
5394 pce_ov,
5395 stop,
5396 dout,
5397 scan_out);
5398wire psel0;
5399wire psel1;
5400wire psel2;
5401wire psel3;
5402wire psel4;
5403wire psel5;
5404wire [63:0] muxout;
5405wire l1clk;
5406wire siclk_out;
5407wire soclk_out;
5408wire [62:0] so;
5409
5410 input [63:0] din0;
5411 input [63:0] din1;
5412 input [63:0] din2;
5413 input [63:0] din3;
5414 input [63:0] din4;
5415 input [63:0] din5;
5416 input sel0;
5417 input sel1;
5418 input sel2;
5419 input sel3;
5420 input sel4;
5421
5422
5423 input clk;
5424 input en;
5425 input se;
5426 input scan_in;
5427 input siclk;
5428 input soclk;
5429 input pce_ov;
5430 input stop;
5431
5432
5433
5434 output [63:0] dout;
5435
5436
5437 output scan_out;
5438
5439
5440
5441
5442cl_dp1_penc6_8x c1_0 (
5443 .test(1'b1),
5444 .sel0(sel0),
5445 .sel1(sel1),
5446 .sel2(sel2),
5447 .sel3(sel3),
5448 .sel4(sel4),
5449 .psel0(psel0),
5450 .psel1(psel1),
5451 .psel2(psel2),
5452 .psel3(psel3),
5453 .psel4(psel4),
5454 .psel5(psel5)
5455);
5456
5457mux6s #(64) d1_0 (
5458 .sel0(psel0),
5459 .sel1(psel1),
5460 .sel2(psel2),
5461 .sel3(psel3),
5462 .sel4(psel4),
5463 .sel5(psel5),
5464 .in0(din0[63:0]),
5465 .in1(din1[63:0]),
5466 .in2(din2[63:0]),
5467 .in3(din3[63:0]),
5468 .in4(din4[63:0]),
5469 .in5(din5[63:0]),
5470.dout(muxout[63:0])
5471);
5472cl_dp1_l1hdr_8x c0_0 (
5473.l2clk(clk),
5474.pce(en),
5475.aclk(siclk),
5476.bclk(soclk),
5477.l1clk(l1clk),
5478 .se(se),
5479 .pce_ov(pce_ov),
5480 .stop(stop),
5481 .siclk_out(siclk_out),
5482 .soclk_out(soclk_out)
5483);
5484dff #(64) d0_0 (
5485.l1clk(l1clk),
5486.siclk(siclk_out),
5487.soclk(soclk_out),
5488.d(muxout[63:0]),
5489.si({scan_in,so[62:0]}),
5490.so({so[62:0],scan_out}),
5491.q(dout[63:0])
5492);
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513endmodule
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523// general mux macro for pass-gate and and-or muxes with/wout priority encoders
5524// also for pass-gate with decoder
5525
5526
5527
5528
5529
5530// any PARAMS parms go into naming of macro
5531
5532module fgu_fpf_dp_mux_macro__mux_aonpe__ports_6__width_64 (
5533 din0,
5534 sel0,
5535 din1,
5536 sel1,
5537 din2,
5538 sel2,
5539 din3,
5540 sel3,
5541 din4,
5542 sel4,
5543 din5,
5544 sel5,
5545 dout);
5546wire buffout0;
5547wire buffout1;
5548wire buffout2;
5549wire buffout3;
5550wire buffout4;
5551wire buffout5;
5552
5553 input [63:0] din0;
5554 input sel0;
5555 input [63:0] din1;
5556 input sel1;
5557 input [63:0] din2;
5558 input sel2;
5559 input [63:0] din3;
5560 input sel3;
5561 input [63:0] din4;
5562 input sel4;
5563 input [63:0] din5;
5564 input sel5;
5565 output [63:0] dout;
5566
5567
5568
5569
5570
5571cl_dp1_muxbuff6_8x c0_0 (
5572 .in0(sel0),
5573 .in1(sel1),
5574 .in2(sel2),
5575 .in3(sel3),
5576 .in4(sel4),
5577 .in5(sel5),
5578 .out0(buffout0),
5579 .out1(buffout1),
5580 .out2(buffout2),
5581 .out3(buffout3),
5582 .out4(buffout4),
5583 .out5(buffout5)
5584);
5585mux6s #(64) d0_0 (
5586 .sel0(buffout0),
5587 .sel1(buffout1),
5588 .sel2(buffout2),
5589 .sel3(buffout3),
5590 .sel4(buffout4),
5591 .sel5(buffout5),
5592 .in0(din0[63:0]),
5593 .in1(din1[63:0]),
5594 .in2(din2[63:0]),
5595 .in3(din3[63:0]),
5596 .in4(din4[63:0]),
5597 .in5(din5[63:0]),
5598.dout(dout[63:0])
5599);
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613endmodule
5614
5615
5616//
5617// buff macro
5618//
5619//
5620
5621
5622
5623
5624
5625module fgu_fpf_dp_buff_macro__rep_1__width_64 (
5626 din,
5627 dout);
5628 input [63:0] din;
5629 output [63:0] dout;
5630
5631
5632
5633
5634
5635
5636buff #(64) d0_0 (
5637.in(din[63:0]),
5638.out(dout[63:0])
5639);
5640
5641
5642
5643
5644
5645
5646
5647
5648endmodule
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658// any PARAMS parms go into naming of macro
5659
5660module fgu_fpf_dp_msff_macro__width_58 (
5661 din,
5662 clk,
5663 en,
5664 se,
5665 scan_in,
5666 siclk,
5667 soclk,
5668 pce_ov,
5669 stop,
5670 dout,
5671 scan_out);
5672wire l1clk;
5673wire siclk_out;
5674wire soclk_out;
5675wire [56:0] so;
5676
5677 input [57:0] din;
5678
5679
5680 input clk;
5681 input en;
5682 input se;
5683 input scan_in;
5684 input siclk;
5685 input soclk;
5686 input pce_ov;
5687 input stop;
5688
5689
5690
5691 output [57:0] dout;
5692
5693
5694 output scan_out;
5695
5696
5697
5698
5699cl_dp1_l1hdr_8x c0_0 (
5700.l2clk(clk),
5701.pce(en),
5702.aclk(siclk),
5703.bclk(soclk),
5704.l1clk(l1clk),
5705 .se(se),
5706 .pce_ov(pce_ov),
5707 .stop(stop),
5708 .siclk_out(siclk_out),
5709 .soclk_out(soclk_out)
5710);
5711dff #(58) d0_0 (
5712.l1clk(l1clk),
5713.siclk(siclk_out),
5714.soclk(soclk_out),
5715.d(din[57:0]),
5716.si({scan_in,so[56:0]}),
5717.so({so[56:0],scan_out}),
5718.q(dout[57:0])
5719);
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740endmodule
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750//
5751// parity macro (even parity)
5752//
5753//
5754
5755
5756
5757
5758
5759module fgu_fpf_dp_prty_macro__width_32 (
5760 din,
5761 dout);
5762 input [31:0] din;
5763 output dout;
5764
5765
5766
5767
5768
5769
5770
5771prty #(32) m0_0 (
5772.in(din[31:0]),
5773.out(dout)
5774);
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785endmodule
5786
5787
5788
5789
5790
5791//
5792// parity macro (even parity)
5793//
5794//
5795
5796
5797
5798
5799
5800module fgu_fpf_dp_prty_macro__width_16 (
5801 din,
5802 dout);
5803 input [15:0] din;
5804 output dout;
5805
5806
5807
5808
5809
5810
5811
5812prty #(16) m0_0 (
5813.in(din[15:0]),
5814.out(dout)
5815);
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826endmodule
5827
5828
5829
5830
5831
5832//
5833// parity macro (even parity)
5834//
5835//
5836
5837
5838
5839
5840
5841module fgu_fpf_dp_prty_macro__width_8 (
5842 din,
5843 dout);
5844 input [7:0] din;
5845 output dout;
5846
5847
5848
5849
5850
5851
5852
5853prty #(8) m0_0 (
5854.in(din[7:0]),
5855.out(dout)
5856);
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867endmodule
5868
5869
5870
5871