Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / fgu / rtl / fgu_fpc_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: fgu_fpc_ctl.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_fpc_ctl (
36 fpc_fpd_ieee_trap_fb,
37 fpc_fpx_unfin_fb,
38 fpc_fpd_unfin_fb,
39 fgu_fpx_ieee_trap_fw,
40 fgu_fpd_ieee_trap_fw,
41 fgu_fpx_unfin_fw,
42 fgu_fpd_unfin_fw,
43 fgu_fpd_idiv0_trap_fw,
44 fgu_predict_fx2,
45 lsu_fgu_exception_w,
46 lsu_block_store_m,
47 exu_fgu_flush_m,
48 exu_fgu_gsr_m,
49 fgu_exu_icc_fx5,
50 fgu_exu_xcc_fx5,
51 fad_rs1_fx1,
52 fad_rs2_fx1,
53 fad_fsr_rd_fx1,
54 fad_fsr_tem_fx1,
55 fad_fsr_ns_fx1,
56 fad_rs1_fmt_fx1_b62,
57 fad_rs2_fmt_fx1_b62,
58 fad_gsr_imirnd_fx1,
59 fpc_w1_vld_fb,
60 fpc_w1_ul_vld_fb,
61 fpc_fsr_w1_vld_fx5,
62 fpc_fsr_w1_result_fw,
63 fpc_fsr_w2_result_fw,
64 fpc_fpd_exp_res,
65 fpc_fpd_sign_res,
66 fpc_fpd_const_sel,
67 fpc_fcc_fw,
68 fpf_b_gteq_a_fx2,
69 fpf_b_eq_a_fx2,
70 fgu_cmp_fcc_fx3,
71 fgu_cmp_fcc_vld_fx3,
72 fpf_hi_aof_fx1,
73 fpf_lo_aof_fx1,
74 fpf_azf_fx1,
75 fpf_bzf_fx1,
76 fpf_aoe_fx1,
77 fpf_boe_fx1,
78 fpf_aze_fx1,
79 fpf_bze_fx1,
80 fpf_ma_sum_fx4,
81 fpf_ma_cout_fx4,
82 fpf_cmp_swap_blta_fx2,
83 fpf_align_sticky_fx4_l,
84 fpf_byte_unsure_x_sp_fx3,
85 fpf_byte_unsure_x_dp_fx3,
86 fpf_rcout_fb,
87 fpf_implied_bit_fx5,
88 fpc_result_sel_fx5,
89 fpc_ovf_if_rcout_fx5,
90 fpc_vis_cmp_result_fx5,
91 fpc_int_res_sel_fx4,
92 fpc_ma_fmt_sel_fx4,
93 fpc_int_sel_fx5,
94 fpc_fconst_sel_fx5,
95 fpc_fp_cin00_fx2,
96 fpc_cin00_fx2,
97 fpc_cin16_48_fx2,
98 fpc_cin32_fx2,
99 fpc_prop16_48_fx2,
100 fpc_prop32_fx2,
101 fpc_mle_sel_fx2,
102 fpc_mse_sel_fx2,
103 fpc_sign_fx5,
104 fpc_sign_fb,
105 fpc_rd_mode_fx3,
106 fpc_emin_fx3,
107 fpc_sp_dest_fx4,
108 fpc_fadd_eac_enable_fx2,
109 fpc_i2f_sel_fx1,
110 fpc_rinc_sel_fx5,
111 fpc_qthenan_fx4,
112 fpc_den2nor_sp_fb,
113 fpc_den2nor_dp_fb,
114 fpe_aux_rs2_fmt_fx1_b0,
115 fpe_aux_eint_fx1,
116 fpe_align_sel_fx2,
117 fpe_rs1_fmt_fx1,
118 fpe_rs2_fmt_fx1,
119 fpe_einty_adj_cout_fx5,
120 fpe_einty_eq_eadj_fx5,
121 fpc_exp_sel_mul_fx5,
122 fpc_eintx_sel_fx2,
123 fpc_eadjx_sel_fx2,
124 fpc_q_rinc_sel_fx5,
125 fac_tlu_flush_fx3,
126 fac_tid_e,
127 fac_dec_valid_fx1,
128 fac_fpx_itype_fx1,
129 fac_fpx_dtype_fx1,
130 fac_fpx_stype_fx1,
131 fac_fpx_sign_instr_fx1,
132 fac_fpx_rnd_trunc_fx1,
133 fac_fcmpe_fx1,
134 fac_fpx_mulscc_fx1,
135 fac_fpx_saverestore_fx1,
136 fac_fgx_pdist_fx1,
137 fac_fgx_popc_fx2,
138 fac_fgx_mvcond_fx2,
139 fac_fgx_mvucond_fx2,
140 fac_fgx_abs_fx2,
141 fac_fgx_neg_fx2,
142 fac_fpx_nv_vld_fx1,
143 fac_fpx_of_vld_fx1,
144 fac_fpx_uf_vld_fx1,
145 fac_fpx_dz_vld_fx1,
146 fac_fpx_nx_vld_fx1,
147 fac_fpx_unfin_vld_fx1,
148 fac_fgx_instr_fx4,
149 fac_w1_vld_fx1,
150 fac_w1_odd32b_fx1,
151 fac_opf_fx2,
152 fac_fgx_siam_fx2,
153 fac_div_valid_fx1,
154 fac_divq_valid_fx1,
155 fac_fsr_store_fx2,
156 fac_gsr_asr_tid_fx2,
157 fac_rng_wr_gsr_3f,
158 fac_gsr_w_vld_fx2,
159 fac_dec_valid_noflush_fx5,
160 fac_exu_src_e,
161 main_clken,
162 coreon_clken,
163 fpc_fcc_vld_fx5,
164 fpc_stfsr_en_fx3to5,
165 fic_norm_eadj_fx5,
166 fic_mulscc_iccz_fx4,
167 fic_mulscc_xccz_fx4,
168 fic_convert_sticky_fx4,
169 fic_fxtod_sticky_fx4,
170 fic_ftoi_nx_fx4,
171 fic_ftox_nx_fx4,
172 fic_bzf31msb_fx2,
173 fic_bzf32lsb_fx2,
174 fic_bof22msb_fx2,
175 fpc_lzd_override_fx4,
176 fpc_sp_source_fx3,
177 fdc_finish_fltd_early,
178 fdc_finish_flts_early,
179 fdc_finish_int_early,
180 fdc_flt_inexact,
181 fdc_xicc_z_early,
182 fdc_icc_v_early,
183 fdc_dec_exp_early,
184 fpc_pre_div_flush_fx2,
185 fpc_div_default_res_fx2,
186 fdd_result,
187 fdd_pte_cla_early_b63,
188 fgu_mul_result_fx5,
189 fpy_sticky_dp_fx5,
190 fpy_sticky_sp_fx5,
191 fpy_xicc_z_fx5,
192 dec_frf_r1_odd32b_d,
193 dec_frf_r2_odd32b_d,
194 dec_flush_f1,
195 dec_flush_f2,
196 dec_fgu_fmov_vld_m,
197 dec_valid_e,
198 dec_frf_store_d,
199 fec_cecc_fx2,
200 fec_uecc_fx2,
201 fpc_frf_store_vld_fx1,
202 fpc_gsr0_mask_sel_fx3,
203 fpc_gsr1_mask_sel_fx3,
204 fpc_gsr2_mask_sel_fx3,
205 fpc_gsr3_mask_sel_fx3,
206 fpc_gsr4_mask_sel_fx3,
207 fpc_gsr5_mask_sel_fx3,
208 fpc_gsr6_mask_sel_fx3,
209 fpc_gsr7_mask_sel_fx3,
210 fpc_gsr_scale_fx4,
211 fpc_gsr_align_fx4,
212 fpc_gsr_asr_11bits_fx4,
213 l2clk,
214 scan_in,
215 spc_aclk_wmr,
216 wmr_scan_in,
217 tcu_pce_ov,
218 spc_aclk,
219 spc_bclk,
220 tcu_scan_en,
221 mbi_run,
222 in_rngl_cdbus,
223 scan_out,
224 wmr_scan_out);
225wire pce_ov;
226wire stop;
227wire siclk;
228wire soclk;
229wire se;
230wire l1clk_pm2;
231wire l1clk_pm1;
232wire spares_scanin;
233wire spares_scanout;
234wire e_00_scanin;
235wire e_00_scanout;
236wire r1_odd32b_e;
237wire r2_odd32b_e;
238wire frf_store_e;
239wire fx1_00_scanin;
240wire fx1_00_scanout;
241wire [1:0] i_fst_valid_fx1;
242wire fx1_01_scanin;
243wire fx1_01_scanout;
244wire r1_odd32b_fx1;
245wire r2_odd32b_fx1;
246wire [2:0] tid_fx1;
247wire frf_store_fx1;
248wire exu_src_fx1;
249wire mbist_run_1f;
250wire fst_valid_fx1;
251wire int_rs2_zero_fx1;
252wire idiv0_trap_fx1;
253wire [3:0] eintx_sel_fx1;
254wire fp_dual_source_fx1;
255wire fp_source_fx1;
256wire [2:0] eadjx_sel_fx1;
257wire [1:0] rd_mode_fx1;
258wire gsr_im_fx3;
259wire [1:0] gsr_irnd_fx3;
260wire ns_mode_fx1;
261wire rs1_sign_fx1;
262wire rs2_sign_fx1;
263wire fadd_logical_sub_fx1;
264wire logical_sub_fx1;
265wire fadd_logical_add_fx1;
266wire aux_enable_ovf_fx1;
267wire fmul_enable_ovf_predict_fx1;
268wire aux_eint_ovf_fx1;
269wire aux_eint_emax_fx1;
270wire aux_eint_emaxp1_fx1;
271wire fadd_ovf_predict_fx1;
272wire fdtos_ovf_predict_fx1;
273wire fdtos_ovf_detect_fx1;
274wire fmul_ovf_predict_fx1;
275wire fmul_ovf_detect_fx1;
276wire fdiv_ovf_predict_fx1;
277wire fdiv_ovf_detect_fx1;
278wire aux_enable_unf_fx1;
279wire fdiv_enable_unf_predict_fx1;
280wire aux_eint_unf_fx1;
281wire aux_eint_emin_fx1;
282wire aux_eint_eminm1_fx1;
283wire aux_eint_eminm2_fx1;
284wire fdtos_guf_detect_fx1;
285wire fmul_guf_detect_fx1;
286wire fdiv_guf_detect_fx1;
287wire fdtos_unf_predict_fx1;
288wire fdtos_unf_detect_fx1;
289wire fmul_unf_predict_fx1;
290wire fmul_unf_detect_fx1;
291wire fdiv_unf_predict_fx1;
292wire fdiv_unf_detect_fx1;
293wire snan_or_inf_fx1;
294wire nan_or_inf_fx1;
295wire large_maxint_predict_fx1;
296wire fadd_unf_predict_fx1;
297wire fadd_fcvt_denorm_detect_fx1;
298wire fmul_denorm_detect_fx1;
299wire q_fmul_unf_predict_fx1;
300wire i_predict_fx1;
301wire fx2_00_scanin;
302wire fx2_00_scanout;
303wire [2:0] itype_fx2;
304wire [2:0] dtype_fx2;
305wire [1:0] stype_fx2;
306wire sign_instr_fx2;
307wire i_idiv0_trap_fx2;
308wire dec_flush_fx2;
309wire dec_valid_fx2;
310wire fmov_vld_fx2;
311wire div_valid_fx2;
312wire divq_valid_fx2;
313wire [0:0] aux_rs2_fmt_fx2;
314wire fpx_nv_vld_fx2;
315wire fpx_of_vld_fx2;
316wire fpx_uf_vld_fx2;
317wire fpx_dz_vld_fx2;
318wire fpx_nx_vld_fx2;
319wire fpx_unfin_vld_fx2;
320wire fcmpe_fx2;
321wire fp_source_fx2;
322wire fp_dual_source_fx2;
323wire rs1_sign_fx2;
324wire rs2_sign_fx2;
325wire fadd_logical_sub_fx2;
326wire logical_sub_fx2;
327wire fadd_logical_add_fx2;
328wire hi_aof_fx2;
329wire lo_aof_fx2;
330wire aux_eint_eminm1_fx2;
331wire aux_eint_eminm2_fx2;
332wire aux_enable_unf_fx2;
333wire [1:0] rd_mode_fx2;
334wire ns_mode_fx2;
335wire fst_valid_fx2;
336wire [2:0] gsr_imirnd_fx2;
337wire fgx_pdist_fx2;
338wire exu_src_fx2;
339wire fx2_01_scanin;
340wire fx2_01_scanout;
341wire mulscc_fx2;
342wire mulscc_y_src_fx2_b0;
343wire [10:0] rs2_exp_fx2;
344wire saverestore_fx2;
345wire fx2_02_scanin;
346wire fx2_02_scanout;
347wire [1:0] i_w1_vld_fx2;
348wire w1_odd32b_fx2;
349wire [10:0] aux_eint_fx2;
350wire [2:0] tid_fx2;
351wire fx2_03_scanin;
352wire fx2_03_scanout;
353wire rs1_fx2_b63;
354wire rs1_fx2_b47;
355wire rs1_fx2_b31;
356wire rs1_fx2_b15;
357wire fx2_04_scanin;
358wire fx2_04_scanout;
359wire rs2_fx2_b63;
360wire rs2_fx2_b47;
361wire rs2_fx2_b31;
362wire rs2_fx2_b15;
363wire fx2_05_scanin;
364wire fx2_05_scanout;
365wire azf_fx2;
366wire bzf_fx2;
367wire aoe_fx2;
368wire boe_fx2;
369wire aze_fx2;
370wire bze_fx2;
371wire fx2_06_scanin;
372wire fx2_06_scanout;
373wire [4:0] fsr_tem_fx2;
374wire [62:62] rs1_fmt_fx2;
375wire [62:62] rs2_fmt_fx2;
376wire fx2_07_scanin;
377wire fx2_07_scanout;
378wire fadd_ovf_predict_fx2;
379wire fdtos_ovf_predict_fx2;
380wire fdtos_ovf_detect_fx2;
381wire fmul_ovf_predict_fx2;
382wire fmul_ovf_detect_fx2;
383wire fdiv_ovf_predict_fx2;
384wire fdiv_ovf_detect_fx2;
385wire fdtos_unf_predict_fx2;
386wire fdtos_unf_detect_fx2;
387wire fmul_unf_predict_fx2;
388wire fmul_unf_detect_fx2;
389wire fdiv_unf_predict_fx2;
390wire fdiv_unf_detect_fx2;
391wire fdtos_guf_detect_fx2;
392wire fmul_guf_detect_fx2;
393wire fdiv_guf_detect_fx2;
394wire i_predict_fx2;
395wire fmul_denorm_detect_fx2;
396wire q_fmul_unf_predict_fx2;
397wire fadd_fcvt_denorm_detect_fx2;
398wire fx2_08_scanin;
399wire fx2_08_scanout;
400wire [27:0] in_rngl_cdbus_1f;
401wire exu_flush_fx2;
402wire [2:0] gsr_align_fx2;
403wire [1:0] w1_vld_fx2;
404wire [1:0] fsr_w1_vld_fx2;
405wire [1:0] gsr_w_vld_fx2;
406wire fgx_siam_fx2;
407wire sign_nan_fx2;
408wire nan_rs2prop_fx2;
409wire nan_rs1prop_fx2;
410wire [4:0] sign_inter_sel_fx2;
411wire a_nan_fx2;
412wire b_nan_fx2;
413wire sign_inter_fx2;
414wire sp_odd_exp_fx2;
415wire sp_even_exp_fx2;
416wire dp_odd_exp_fx2;
417wire dp_even_exp_fx2;
418wire [10:0] fpd_eint_fx2;
419wire [3:0] fcmpgt16_fx2;
420wire [1:0] gt32_fx2;
421wire [1:0] fcmpgt32_fx2;
422wire [3:0] fcmple16_fx2;
423wire [1:0] le32_fx2;
424wire [1:0] fcmple32_fx2;
425wire [3:0] fcmpeq16_fx2;
426wire [1:0] fcmpeq32_fx2;
427wire [3:0] fcmpne16_fx2;
428wire [1:0] fcmpne32_fx2;
429wire fcmpgt16_sel_fx2;
430wire fcmpgt32_sel_fx2;
431wire fcmple16_sel_fx2;
432wire fcmple32_sel_fx2;
433wire fcmpne16_sel_fx2;
434wire fcmpne32_sel_fx2;
435wire fcmpeq16_sel_fx2;
436wire fcmpeq32_sel_fx2;
437wire [3:0] vis_cmp_result_fx2;
438wire a_zero_fx2;
439wire a_denorm_fx2;
440wire a_inf_fx2;
441wire a_snan_fx2;
442wire b_zero_fx2;
443wire b_denorm_fx2;
444wire b_inf_fx2;
445wire b_snan_fx2;
446wire b_qnan_fx2;
447wire unfin_src_fx2;
448wire inf_src_result_fx2;
449wire zero_src_result_fx2;
450wire inf_maxint_result_fx2;
451wire nan_maxint_result_fx2;
452wire nan_default_result_fx2;
453wire fpx_dzc_fx2;
454wire i_fxp_nvc_fx2;
455wire fcmp_nvc_fx2;
456wire local_predict_fx2;
457wire qthenan_fx2;
458wire rm_near_dp_fx2;
459wire rm_directed_dp_fx2;
460wire rm_near_sp_fx2;
461wire rm_directed_sp_fx2;
462wire fdiv_aof_bzf_fx2;
463wire fmul_den2nor_m2_predict_fx2;
464wire fdiv_den2nor_m1_predict_fx2;
465wire fdiv_den2nor_sp_fx2;
466wire fdiv_den2nor_dp_fx2;
467wire mse_zeros_fx2;
468wire mse_ones_fx2;
469wire mle_zeros_fx2;
470wire mass_align_fx2;
471wire mass_align_sticky_fx2;
472wire [5:1] int_res_sel_fx2;
473wire i_pre_div_flush_fx2;
474wire idiv0_trap_fx2;
475wire aboe_fx2;
476wire abze_fx2;
477wire [1:0] gsr0_mask_sel_fx2;
478wire [1:0] gsr1_mask_sel_fx2;
479wire [1:0] gsr2_mask_sel_fx2;
480wire [1:0] gsr3_mask_sel_fx2;
481wire [1:0] gsr4_mask_sel_fx2;
482wire [1:0] gsr5_mask_sel_fx2;
483wire [1:0] gsr6_mask_sel_fx2;
484wire [1:0] gsr7_mask_sel_fx2;
485wire sp_source_fx2;
486wire ecc_trap_fx2;
487wire fx3_00_scanin;
488wire fx3_00_scanout;
489wire [1:0] i_w1_vld_fx3;
490wire [2:0] itype_fx3;
491wire [2:0] dtype_fx3;
492wire [1:0] stype_fx3;
493wire [2:0] tid_fx3;
494wire fx3_01_scanin;
495wire fx3_01_scanout;
496wire [3:0] vis_cmp_result_fx3;
497wire [5:1] int_res_sel_fx3;
498wire [10:0] fpd_eint_fx3;
499wire fx3_02_scanin;
500wire fx3_02_scanout;
501wire rs1_fx3_b31;
502wire rs2_fx3_b31;
503wire [10:0] rs2_exp_fx3;
504wire fx3_03_scanin;
505wire fx3_03_scanout;
506wire bzf_fx3;
507wire bze_fx3;
508wire a_nan_fx3;
509wire b_nan_fx3;
510wire fx3_04_scanin;
511wire fx3_04_scanout;
512wire [4:0] fsr_tem_fx3;
513wire fx3_05_scanin;
514wire fx3_05_scanout;
515wire inf_src_result_fx3;
516wire zero_src_result_fx3;
517wire inf_maxint_result_fx3;
518wire nan_maxint_result_fx3;
519wire nan_default_result_fx3;
520wire qthenan_fx3;
521wire bzf31msb_fx3;
522wire fmul_den2nor_m2_predict_fx3;
523wire fdiv_den2nor_sp_fx3;
524wire fdiv_den2nor_dp_fx3;
525wire fx3_06_scanin;
526wire fx3_06_scanout;
527wire i_idiv0_trap_fx3;
528wire dec_flush_fx3;
529wire sign_inter_fx3;
530wire div_valid_fx3;
531wire divq_valid_fx3;
532wire logical_sub_fx3;
533wire [1:0] i_fsr_w1_vld_fx3;
534wire w1_odd32b_fx3;
535wire mass_align_sticky_fx3;
536wire fadd_logical_sub_fx3;
537wire fsr_store_fx3;
538wire i_fgx_siam_fx3;
539wire [1:1] i_gsr_w_vld_fx3;
540wire [2:0] gsr_asr_tid_fx3;
541wire rm_near_sp_fx3;
542wire rm_near_dp_fx3;
543wire rm_directed_sp_fx3;
544wire rm_directed_dp_fx3;
545wire aboe_fx3;
546wire abze_fx3;
547wire div_default_res_fx3;
548wire fgx_pdist_fx3;
549wire fx3_07_scanin;
550wire fx3_07_scanout;
551wire fadd_ovf_predict_fx3;
552wire fdtos_ovf_predict_fx3;
553wire fdtos_ovf_detect_fx3;
554wire fmul_ovf_predict_fx3;
555wire fmul_ovf_detect_fx3;
556wire fdiv_ovf_predict_fx3;
557wire fdiv_ovf_detect_fx3;
558wire fdtos_unf_predict_fx3;
559wire fdtos_unf_detect_fx3;
560wire fmul_unf_predict_fx3;
561wire fmul_unf_detect_fx3;
562wire fdiv_unf_predict_fx3;
563wire fdiv_unf_detect_fx3;
564wire bof22msb_fx3;
565wire fdtos_guf_detect_fx3;
566wire fmul_guf_detect_fx3;
567wire fdiv_guf_detect_fx3;
568wire unfin_src_fx3;
569wire fx3_08_scanin;
570wire fx3_08_scanout;
571wire [1:0] gsr0_mask_sel_fx3;
572wire [1:0] gsr1_mask_sel_fx3;
573wire [1:0] gsr2_mask_sel_fx3;
574wire [1:0] gsr3_mask_sel_fx3;
575wire [1:0] gsr4_mask_sel_fx3;
576wire [1:0] gsr5_mask_sel_fx3;
577wire [1:0] gsr6_mask_sel_fx3;
578wire [1:0] gsr7_mask_sel_fx3;
579wire fx3_09_scanin;
580wire fx3_09_scanout;
581wire [2:0] in_rngl_cdbus_2f_b27_25;
582wire [7:0] in_rngl_cdbus_2f;
583wire [2:0] gsr_align_fx3;
584wire [2:0] gsr_imirnd_fx3;
585wire fx3_10_scanin;
586wire fx3_10_scanout;
587wire fpx_unfin_vld_fx3;
588wire ns_mode_fx3;
589wire fpx_of_vld_fx3;
590wire fpx_uf_vld_fx3;
591wire fpx_nx_vld_fx3;
592wire ecc_trap_fx3;
593wire fpx_dzc_fx3;
594wire i_fxp_nvc_fx3;
595wire rng_wr_gsr_4f;
596wire [1:1] gsr_w_vld_fx3;
597wire fgx_siam_fx3;
598wire idiv0_trap_fx3;
599wire [1:0] w1_vld_fx3;
600wire [1:0] fsr_w1_vld_fx3;
601wire lzd_override_fx3;
602wire div_dec_issue_fx3;
603wire div_divq_issue_fx3;
604wire div_divq_load_fx3;
605wire div_hold_fx3;
606wire fdiv_ovf_predict_inf_fx3;
607wire fdiv_ovf_predict_max_fx3;
608wire [18:0] div_eint_in_fx3;
609wire [18:0] divq_eint_fx4;
610wire [18:0] div_eint_fx4;
611wire [18:0] divq_eint_in_fx3;
612wire dpint_zero_fx3;
613wire spint_zero_fx3;
614wire fpint_zero_fx3;
615wire dp_large_maxint_result_fx3;
616wire sp_large_maxint_result_fx3;
617wire maxint_result_fx3;
618wire fpx_nvc_fx3;
619wire [10:0] gsr0_11bits_fx3;
620wire [2:0] in_rngl_cdbus_3f_b27_25;
621wire [7:0] in_rngl_cdbus_3f;
622wire [10:0] gsr0_11bits_fx4;
623wire [10:0] gsr1_11bits_fx3;
624wire [10:0] gsr1_11bits_fx4;
625wire [10:0] gsr2_11bits_fx3;
626wire [10:0] gsr2_11bits_fx4;
627wire [10:0] gsr3_11bits_fx3;
628wire [10:0] gsr3_11bits_fx4;
629wire [10:0] gsr4_11bits_fx3;
630wire [10:0] gsr4_11bits_fx4;
631wire [10:0] gsr5_11bits_fx3;
632wire [10:0] gsr5_11bits_fx4;
633wire [10:0] gsr6_11bits_fx3;
634wire [10:0] gsr6_11bits_fx4;
635wire [10:0] gsr7_11bits_fx3;
636wire [10:0] gsr7_11bits_fx4;
637wire [7:0] gsr_11bits_fx3;
638wire [10:0] gsr_asr_11bits_fx3;
639wire [2:0] gsr_imirnd_held_fx3;
640wire siam_1ahead_sel_fx3;
641wire siam_2ahead_sel_fx3;
642wire siam_none_sel_fx3;
643wire fx4_00_scanin;
644wire fx4_00_scanout;
645wire rs1_fx4_b31;
646wire rs2_fx4_b31;
647wire [1:0] rd_mode_fx4;
648wire fx4_01_scanin;
649wire fx4_01_scanout;
650wire [1:0] i_w1_vld_fx4;
651wire [1:0] fcc_fx4;
652wire [3:0] fcc_vld_fx4;
653wire idiv0_trap_fx4;
654wire sign_inter_fx4;
655wire logical_sub_fx4;
656wire fpint_zero_fx4;
657wire [1:0] i_fsr_w1_vld_fx4;
658wire a_nan_fx4;
659wire b_nan_fx4;
660wire [1:0] byte_unsure_x_dp_fx4;
661wire [1:0] byte_unsure_x_sp_fx4;
662wire w1_odd32b_fx4;
663wire mass_align_sticky_fx4;
664wire fadd_logical_sub_fx4;
665wire fsr_store_fx4;
666wire fmul_den2nor_m2_predict_fx4;
667wire fdiv_den2nor_sp_fx4;
668wire fdiv_den2nor_dp_fx4;
669wire rm_near_sp_fx4;
670wire rm_near_dp_fx4;
671wire rm_directed_sp_fx4;
672wire rm_directed_dp_fx4;
673wire aboe_fx4;
674wire abze_fx4;
675wire div_default_res_fx4;
676wire dec_flush_fx4;
677wire tlu_flush_fgu_fx4;
678wire fx4_02_scanin;
679wire fx4_02_scanout;
680wire [3:0] vis_cmp_result_fx4;
681wire [2:0] itype_fx4;
682wire [2:0] dtype_fx4;
683wire fx4_03_scanin;
684wire fx4_03_scanout;
685wire fx4_04_scanin;
686wire fx4_04_scanout;
687wire [4:0] fsr_tem_fx4;
688wire fx4_05_scanin;
689wire fx4_05_scanout;
690wire inf_src_result_fx4;
691wire zero_src_result_fx4;
692wire nan_default_result_fx4;
693wire maxint_result_fx4;
694wire fx4_06_scanin;
695wire fx4_06_scanout;
696wire fadd_ovf_predict_fx4;
697wire fdtos_ovf_predict_fx4;
698wire fdtos_ovf_detect_fx4;
699wire fmul_ovf_predict_fx4;
700wire fmul_ovf_detect_fx4;
701wire fdiv_ovf_detect_fx4;
702wire fdtos_unf_predict_fx4;
703wire fdtos_unf_detect_fx4;
704wire fmul_unf_predict_fx4;
705wire fmul_unf_detect_fx4;
706wire fdiv_unf_detect_fx4;
707wire bof22msb_fx4;
708wire fdtos_guf_detect_fx4;
709wire fmul_guf_detect_fx4;
710wire fdiv_guf_detect_fx4;
711wire unfin_src_fx4;
712wire fx4_07_wmr_scanin;
713wire fx4_07_wmr_scanout;
714wire fx4_08_scanin;
715wire fx4_08_scanout;
716wire fpx_unfin_vld_fx4;
717wire ns_mode_fx4;
718wire fpx_of_vld_fx4;
719wire fpx_uf_vld_fx4;
720wire fpx_nx_vld_fx4;
721wire ecc_trap_fx4;
722wire fpx_dzc_fx4;
723wire fpx_nvc_fx4;
724wire fx4_09_scanin;
725wire fx4_09_scanout;
726wire fx4_10_scanin;
727wire fx4_10_scanout;
728wire stfsr_exception_fx4;
729wire fx4_11_scanin;
730wire fx4_11_scanout;
731wire maxpos_result_fx4;
732wire maxneg_result_fx4;
733wire [3:0] int_sel_fx4;
734wire mulscc_iccn_fx4;
735wire mulscc_iccc_fx4;
736wire mulscc_iccv_fx4;
737wire exp_sel_mul_fx4;
738wire [1:0] fpd_const_sel;
739wire [10:0] fpd_exp_res;
740wire sign_retain_zero_fx4;
741wire sign_zero_fx4;
742wire add_ma_cout_fx4;
743wire convert_fmt_1xx_fx4;
744wire convert_fmt_01x_fx4;
745wire fxtod_fmt_1xx_fx4;
746wire fxtod_fmt_01x_fx4;
747wire add_fmt_1xx_fx4;
748wire add_fmt_01x_fx4;
749wire add_fmt_001_fx4;
750wire aln_fmt_1xx_fx4;
751wire aln_fmt_01x_fx4;
752wire add_lsb_bit_dp_fx4;
753wire add_g_bit_dp_fx4;
754wire add_lsb_bit_sp_fx4;
755wire add_g_bit_sp_fx4;
756wire align_x_bit_dp_fx4;
757wire align_x_bit_sp_fx4;
758wire convert_x_bit_sp_fx4;
759wire fxtod_x_bit_dp_fx4;
760wire add_x_bit_dp_fx4;
761wire add_x_bit_sp_fx4;
762wire fpint_nxc_i_fx4;
763wire fpint_nxc_x_fx4;
764wire fpint_nxc_fx4;
765wire fdtos_den2nor_fx4;
766wire fdiv_fdtos_den2nor_sp_fx4;
767wire [1:0] w1_vld_fx4;
768wire [1:0] fsr_w1_vld_fx4;
769wire fx5_00_scanin;
770wire fx5_00_scanout;
771wire [1:0] w1_vld_fx5;
772wire [1:0] fcc_fx5;
773wire fx5_01_scanin;
774wire fx5_01_scanout;
775wire [2:0] itype_fx5;
776wire [2:0] dtype_fx5;
777wire [1:0] rd_mode_fx5;
778wire fx5_02_scanin;
779wire fx5_02_scanout;
780wire int_res_sel_fx5_b2;
781wire ma_fmt_sel_fx5_b0;
782wire idiv0_trap_fx5;
783wire mulscc_iccn_fx5;
784wire mulscc_iccz_fx5;
785wire mulscc_iccv_fx5;
786wire mulscc_iccc_fx5;
787wire mulscc_xccz_fx5;
788wire idiv_xccz_fx5;
789wire idiv_iccz_fx5;
790wire idiv_iccv_fx5;
791wire sign_inter_fx5;
792wire sign_zero_fx5;
793wire ma_sum_fx5_b10;
794wire fgx_instr_fx5;
795wire w1_odd32b_fx5;
796wire ma_cout_fx5;
797wire fadd_logical_sub_fx5;
798wire fsr_store_fx5;
799wire fmul_den2nor_m2_predict_fx5;
800wire fdiv_fdtos_den2nor_sp_fx5;
801wire fdiv_den2nor_dp_fx5;
802wire aboe_fx5;
803wire fpint_nxc_fx5;
804wire fx5_04_scanin;
805wire fx5_04_scanout;
806wire [4:0] fsr_tem_fx5;
807wire fx5_05_scanin;
808wire fx5_05_scanout;
809wire rm_near_dp_fx5;
810wire rm_near_sp_fx5;
811wire rm_directed_dp_fx5;
812wire rm_directed_sp_fx5;
813wire fx5_06_scanin;
814wire fx5_06_scanout;
815wire add_g_bit_sp_fx5;
816wire add_g_bit_dp_fx5;
817wire add_lsb_bit_sp_fx5;
818wire add_lsb_bit_dp_fx5;
819wire add_x_bit_sp_fx5;
820wire add_x_bit_dp_fx5;
821wire fx5_07_scanin;
822wire fx5_07_scanout;
823wire inf_src_result_fx5;
824wire zero_src_result_fx5;
825wire nan_default_result_fx5;
826wire maxint_result_fx5;
827wire fx5_08_scanin;
828wire fx5_08_scanout;
829wire fadd_ovf_predict_fx5;
830wire fdtos_ovf_predict_fx5;
831wire fdtos_ovf_detect_fx5;
832wire fmul_ovf_predict_fx5;
833wire fmul_ovf_detect_fx5;
834wire fdiv_ovf_detect_fx5;
835wire fdtos_unf_predict_fx5;
836wire fdtos_unf_detect_fx5;
837wire fmul_unf_predict_fx5;
838wire fmul_unf_detect_fx5;
839wire fdiv_unf_detect_fx5;
840wire fdtos_guf_detect_fx5;
841wire fmul_guf_detect_fx5;
842wire fdiv_guf_detect_fx5;
843wire unfin_src_fx5;
844wire fx5_09_scanin;
845wire fx5_09_scanout;
846wire fpx_unfin_vld_fx5;
847wire ns_mode_fx5;
848wire fpx_of_vld_fx5;
849wire fpx_uf_vld_fx5;
850wire fpx_nx_vld_fx5;
851wire ecc_trap_fx5;
852wire fpx_dzc_fx5;
853wire fpx_nvc_fx5;
854wire dp_zero_mant_fx5;
855wire sp_zero_mant_fx5;
856wire zero_mant_fx5;
857wire ovf_detect_inf_fx5;
858wire ovf_predict_inf_fx5;
859wire ovf_detect_max_fx5;
860wire ovf_predict_max_fx5;
861wire unf_detect_fx5;
862wire unf_predict_fx5;
863wire unfin_early_fx5;
864wire fpd_unfin_fx5;
865wire fdiv_den2nor_m0_fx5;
866wire i_fpx_ofc_fx5;
867wire i_fpx_ufc_fx5;
868wire eadj_unf_if_norcout_fx5;
869wire mul_fmt_1xx_fx5;
870wire mul_fmt_01x_fx5;
871wire mul_fmt_m2_fx5;
872wire mul_lsb_bit_dp_fx5;
873wire mul_g_bit_dp_fx5;
874wire mul_x_bit_dp_fx5;
875wire mul_lsb_bit_sp_fx5;
876wire mul_g_bit_sp_fx5;
877wire mul_x_bit_sp_fx5;
878wire mul_rinc_dp_fx5;
879wire mul_rinc_sp_fx5;
880wire mul_rinc_sel_fx5;
881wire add_rinc_dp_fx5;
882wire add_rinc_sp_fx5;
883wire add_rinc_sel_fx5;
884wire ovf_if_rcout_fx5;
885wire fmul_unf_if_nocorl_fx5;
886wire fmul_unf_if_nocorl_sp_fx5;
887wire fmul_unf_if_nocorl_dp_fx5;
888wire i_fpx_nxc_fx5;
889wire div_finish_int_fb;
890wire fb_00_scanin;
891wire fb_00_scanout;
892wire [1:0] fcc_fb;
893wire idiv0_trap_fb;
894wire ovf_if_rcout_fb;
895wire fmul_unf_if_nocorl_sp_fb;
896wire fmul_unf_if_nocorl_dp_fb;
897wire fmul_unf_if_nocorl_fb;
898wire eadj_unf_if_norcout_fb;
899wire implied_bit_fb;
900wire fsr_store_fb;
901wire dec_valid_noflush_fb;
902wire sp_zero_mant_fb;
903wire dp_zero_mant_fb;
904wire div_finish_fltd_fb;
905wire div_finish_flts_fb;
906wire fb_01_scanin;
907wire fb_01_scanout;
908wire [1:0] i_w1_vld_fb;
909wire fb_03_scanin;
910wire fb_03_scanout;
911wire fpx_unfin_vld_fb;
912wire ns_mode_fb;
913wire unfin_early_fb;
914wire fpx_of_vld_fb;
915wire fpx_uf_vld_fb;
916wire ecc_trap_fb;
917wire fpx_dzc_fb;
918wire fpx_nvc_fb;
919wire i_fpx_ofc_fb;
920wire i_fpx_ufc_fb;
921wire i_fpx_nxc_fb;
922wire fdiv_fdtos_den2nor_sp_fb;
923wire fdiv_den2nor_dp_fb;
924wire fdiv_den2nor_m0_fb;
925wire div_dec_exp_fb;
926wire fb_04_scanin;
927wire fb_04_scanout;
928wire [4:0] fsr_tem_fb;
929wire fb_05_scanin;
930wire fb_05_scanout;
931wire i_fpc_fpd_exp_res_b0;
932wire fpd_fsr_ofm_fb;
933wire fpd_fsr_ufm_fb;
934wire fpd_fsr_nxm_fb;
935wire fpx_ofc_fb;
936wire fpx_ufc_fb;
937wire fpx_nxc_fb;
938wire fpd_ofc_fb;
939wire fpd_ufc_fb;
940wire fpd_nxc_fb;
941wire fpx_ieee_trap_fb;
942wire [1:0] fpx_ftt_fb;
943wire [1:0] fpd_ftt_fb;
944wire [4:0] fpx_aexc_fb;
945wire [4:0] fpd_aexc_fb;
946wire [11:0] fsr_w1_result_fb;
947wire [11:0] fsr_w2_result_fb;
948wire fw_00_scanin;
949wire fw_00_scanout;
950
951
952
953// ----------------------------------------------------------------------------
954// Interface with TLU
955// ----------------------------------------------------------------------------
956
957output fpc_fpd_ieee_trap_fb;
958output fpc_fpx_unfin_fb;
959output fpc_fpd_unfin_fb;
960
961output fgu_fpx_ieee_trap_fw;
962output fgu_fpd_ieee_trap_fw;
963output fgu_fpx_unfin_fw;
964output fgu_fpd_unfin_fw;
965output fgu_fpd_idiv0_trap_fw;
966output fgu_predict_fx2; // exception trap predicted
967
968// ----------------------------------------------------------------------------
969// Interface with LSU
970// ----------------------------------------------------------------------------
971
972input lsu_fgu_exception_w; // store exception detected
973input lsu_block_store_m; // block store in progress
974
975// ----------------------------------------------------------------------------
976// Interface with EXU
977// ----------------------------------------------------------------------------
978
979input exu_fgu_flush_m; // EXU{1,0} src has bad ECC or exception, FGU must flush instr
980input [2:0] exu_fgu_gsr_m; // GSR.align data:
981 // [31:3] = don't care
982 // [2:0] = GSR.align
983 // GSR.mask data:
984 // [31:0] = GSR.mask
985
986output [3:0] fgu_exu_icc_fx5;
987output [1:0] fgu_exu_xcc_fx5;
988
989// ----------------------------------------------------------------------------
990// Interface with FAD
991// ----------------------------------------------------------------------------
992
993input [63:15] fad_rs1_fx1; // rs1 unformatted
994input [63:15] fad_rs2_fx1; // rs2 unformatted
995input [1:0] fad_fsr_rd_fx1;
996input [4:0] fad_fsr_tem_fx1;
997input fad_fsr_ns_fx1;
998input fad_rs1_fmt_fx1_b62;
999input fad_rs2_fmt_fx1_b62;
1000input [2:0] fad_gsr_imirnd_fx1; // {GSR.im,GSR.irnd[1:0]}
1001
1002output [1:0] fpc_w1_vld_fb; // FRF w1 write valid (qualified), [63:32],[31:0]
1003output fpc_w1_ul_vld_fb; // FRF w1 write valid (qualified), upper or lower
1004output [1:0] fpc_fsr_w1_vld_fx5; // FSR w1 write valid
1005output [11:0] fpc_fsr_w1_result_fw; // FSR w1 write data {ftt,aexc,cexc}
1006output [11:0] fpc_fsr_w2_result_fw; // FSR w2 write data {ftt,aexc,cexc}
1007output [10:0] fpc_fpd_exp_res; // FPD exponent result
1008output fpc_fpd_sign_res; // FPD sign result
1009output [1:0] fpc_fpd_const_sel; // 10=ones frac, 01=fdd frac, 00=zero frac
1010output [1:0] fpc_fcc_fw;
1011
1012// ----------------------------------------------------------------------------
1013// Interface with FPF
1014// ----------------------------------------------------------------------------
1015
1016input [3:0] fpf_b_gteq_a_fx2; // FCMP (B-A) cout, doesn't account for MSB
1017input [3:0] fpf_b_eq_a_fx2; // FCMP (B=A), doesn't account for MSB
1018input [1:0] fgu_cmp_fcc_fx3; // fcmp fcc data {fccX[1:0]}
1019input [3:0] fgu_cmp_fcc_vld_fx3; // fcmp fcc data valid {fcc3, fcc2, fcc1, fcc0}
1020input fpf_hi_aof_fx1;
1021input fpf_lo_aof_fx1;
1022input fpf_azf_fx1; // rs1[62:0]==63'b0, must acct for rs1[63]
1023input fpf_bzf_fx1; // rs2[62:0]==63'b0, must acct for rs2[63]
1024input fpf_aoe_fx1;
1025input fpf_boe_fx1;
1026input fpf_aze_fx1;
1027input fpf_bze_fx1;
1028input [63:9] fpf_ma_sum_fx4; // main adder sum
1029input fpf_ma_cout_fx4; // main adder cout
1030input fpf_cmp_swap_blta_fx2;
1031input fpf_align_sticky_fx4_l;
1032input [1:0] fpf_byte_unsure_x_sp_fx3;
1033input [1:0] fpf_byte_unsure_x_dp_fx3;
1034input fpf_rcout_fb;
1035input fpf_implied_bit_fx5;
1036
1037output [5:0] fpc_result_sel_fx5; // result select
1038output [1:0] fpc_ovf_if_rcout_fx5; // result select qualification for rcout
1039output [3:0] fpc_vis_cmp_result_fx5; // vis cmp result data
1040output [5:1] fpc_int_res_sel_fx4; // select result for EXU{1,0}
1041output [4:0] fpc_ma_fmt_sel_fx4;
1042output [3:0] fpc_int_sel_fx5; // 10=vis paritioned add or F(s,d)TO(i,x), 01=F(s,d)TO(i,x) zero result
1043output [4:0] fpc_fconst_sel_fx5;
1044output fpc_fp_cin00_fx2; // main adder control
1045output fpc_cin00_fx2; // main adder control
1046output fpc_cin16_48_fx2; // main adder control
1047output fpc_cin32_fx2; // main adder control
1048output fpc_prop16_48_fx2; // main adder control
1049output fpc_prop32_fx2; // main adder control
1050output fpc_mle_sel_fx2;
1051output [2:0] fpc_mse_sel_fx2;
1052output fpc_sign_fx5; // result sign
1053output fpc_sign_fb; // result sign
1054output [1:0] fpc_rd_mode_fx3; // merged GSR.irnd, FSR.rd
1055output fpc_emin_fx3; // FDIV Eint=Emin
1056output fpc_sp_dest_fx4; // SP result dest
1057output fpc_fadd_eac_enable_fx2;
1058output [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
1059output fpc_rinc_sel_fx5;
1060output fpc_qthenan_fx4; // quiet the propagating NaN, set frac MSB=1
1061output fpc_den2nor_sp_fb; // denorm intermediate result rounded to norm
1062output fpc_den2nor_dp_fb; // denorm intermediate result rounded to norm
1063
1064// ----------------------------------------------------------------------------
1065// Interface with FPE
1066// ----------------------------------------------------------------------------
1067
1068input fpe_aux_rs2_fmt_fx1_b0;
1069input [11:0] fpe_aux_eint_fx1;
1070input [10:0] fpe_align_sel_fx2;
1071input [10:0] fpe_rs1_fmt_fx1;
1072input [10:0] fpe_rs2_fmt_fx1;
1073input fpe_einty_adj_cout_fx5;
1074input fpe_einty_eq_eadj_fx5;
1075output fpc_exp_sel_mul_fx5;
1076output [3:0] fpc_eintx_sel_fx2; // FxTOs|FiTOs=001, FxTOd|FiTOd=010, F(s)MUL(s,d)=100
1077output [2:0] fpc_eadjx_sel_fx2; // F(i,x)TO(s,d)=001, FsTOd=010, FdTOs=100
1078output fpc_q_rinc_sel_fx5; // rinc_sel and ~logical_sub 00.1X
1079
1080// ----------------------------------------------------------------------------
1081// Interface with FAC
1082// ----------------------------------------------------------------------------
1083
1084input fac_tlu_flush_fx3;
1085input [2:0] fac_tid_e;
1086input fac_dec_valid_fx1;
1087input [2:0] fac_fpx_itype_fx1; // instr type:
1088 // add=000, fpfp=001, fpint=010, intfp=011, cmp=100, mul=101, div=110, sqrt=111
1089input [2:0] fac_fpx_dtype_fx1; // destination type:
1090 // sp=000, dp=001, 16bit=010, 32bit=011, 64bit=100
1091input [1:0] fac_fpx_stype_fx1; // source type (for conversions & FsMULd/FMULd):
1092 // sp=00, dp=01, 32bit=10, 64bit=11
1093input fac_fpx_sign_instr_fx1; // sign of the instr (1 if: FSUB(s,d),
1094 // FPSUB{16,32}{s})
1095input fac_fpx_rnd_trunc_fx1; // force rnd mode to truncate
1096 // (1 if: F(s,d)TOi, F(s,d)TOx,
1097 // FPADD{16,32}{s}, FPSUB{16,32}{s},
1098 // IMUL, IDIV, MULScc, 8x16 mul, SAVE, RESTORE
1099input fac_fcmpe_fx1; // FCMPE, not FCMP
1100input fac_fpx_mulscc_fx1; // MULScc
1101input fac_fpx_saverestore_fx1;// SAVE or RESTORE
1102input fac_fgx_pdist_fx1; // PDIST
1103input fac_fgx_popc_fx2; // POPC
1104input fac_fgx_mvcond_fx2; // FMOV (conditional upon cc or r)
1105input fac_fgx_mvucond_fx2; // FMOV (unconditional)
1106input fac_fgx_abs_fx2; // FABS
1107input fac_fgx_neg_fx2; // FNEG
1108input fac_fpx_nv_vld_fx1; // set if instr updates invalid exception flag
1109input fac_fpx_of_vld_fx1; // set if instr updates overflow exception flag
1110input fac_fpx_uf_vld_fx1; // set if instr updates underflow exception flag
1111input fac_fpx_dz_vld_fx1; // set if instr updates divide by zero exception flag
1112input fac_fpx_nx_vld_fx1; // set if instr updates inexact exception flag
1113input fac_fpx_unfin_vld_fx1; // set if instr can generate unfinished_FPop
1114
1115input fac_fgx_instr_fx4; // FGX instr decoded
1116input [1:0] fac_w1_vld_fx1;
1117input fac_w1_odd32b_fx1;
1118
1119input [3:1] fac_opf_fx2; // instr opf field
1120input fac_fgx_siam_fx2; // SIAM
1121input fac_div_valid_fx1;
1122input fac_divq_valid_fx1;
1123input fac_fsr_store_fx2;
1124
1125input [2:0] fac_gsr_asr_tid_fx2;
1126input fac_rng_wr_gsr_3f; // ASR GSR write valid
1127input [1:0] fac_gsr_w_vld_fx2;
1128input fac_dec_valid_noflush_fx5;
1129input fac_exu_src_e;
1130
1131input main_clken; // main clken
1132input coreon_clken; // controls all "free running" flops
1133
1134output [3:0] fpc_fcc_vld_fx5;
1135output fpc_stfsr_en_fx3to5; // store FSR clears ftt
1136
1137// ----------------------------------------------------------------------------
1138// Interface with FIC
1139// ----------------------------------------------------------------------------
1140
1141input [5:0] fic_norm_eadj_fx5;
1142input fic_mulscc_iccz_fx4;
1143input fic_mulscc_xccz_fx4;
1144input fic_convert_sticky_fx4; // sticky for FxTOs, FiTOs, FdTOs
1145input fic_fxtod_sticky_fx4; // sticky for FxTOd
1146input fic_ftoi_nx_fx4; // inexact for FsTOi, FdTOi
1147input fic_ftox_nx_fx4; // inexact for FsTOx, FdTOx
1148input fic_bzf31msb_fx2; // rs2 frac 31 MSBs all zeros
1149input fic_bzf32lsb_fx2; // rs2 frac 32 LSBs all zeros
1150input fic_bof22msb_fx2; // rs2 frac 22 MSBs all ones
1151output fpc_lzd_override_fx4;
1152output fpc_sp_source_fx3;
1153
1154// ----------------------------------------------------------------------------
1155// Interface with FDC
1156// ----------------------------------------------------------------------------
1157
1158input fdc_finish_fltd_early;
1159input fdc_finish_flts_early;
1160input fdc_finish_int_early;
1161input fdc_flt_inexact;
1162input [1:0] fdc_xicc_z_early; // {xcc.z, icc.z} (one cyc before result data)
1163input fdc_icc_v_early; // icc.v (one cyc before result data)
1164input fdc_dec_exp_early; // decrement Eint (one cyc before result data)
1165output fpc_pre_div_flush_fx2;
1166output fpc_div_default_res_fx2; // fdiv/fsqrt default result
1167
1168// ----------------------------------------------------------------------------
1169// Interface with FDD
1170// ----------------------------------------------------------------------------
1171
1172input [63:31] fdd_result;
1173input fdd_pte_cla_early_b63;
1174
1175// ----------------------------------------------------------------------------
1176// Interface with FPY
1177// ----------------------------------------------------------------------------
1178
1179input [63:9] fgu_mul_result_fx5;
1180input fpy_sticky_dp_fx5;
1181input fpy_sticky_sp_fx5;
1182input [1:0] fpy_xicc_z_fx5; // {xcc.z, icc.z}
1183
1184// ----------------------------------------------------------------------------
1185// Interface with DEC
1186// ----------------------------------------------------------------------------
1187
1188input dec_frf_r1_odd32b_d;
1189input dec_frf_r2_odd32b_d;
1190input dec_flush_f1; // flush fx2 (xmit in fx1/m)
1191input dec_flush_f2; // flush fx3 (xmit in fx2/b)
1192input dec_fgu_fmov_vld_m; // FMOV condition is true
1193input [1:0] dec_valid_e; // used by FGU to qual store FSR update of FSR.ftt
1194input dec_frf_store_d;
1195
1196// ----------------------------------------------------------------------------
1197// Interface with FEC
1198// ----------------------------------------------------------------------------
1199
1200input fec_cecc_fx2;
1201input fec_uecc_fx2;
1202output fpc_frf_store_vld_fx1;
1203
1204// ----------------------------------------------------------------------------
1205// Interface with FGD
1206// ----------------------------------------------------------------------------
1207
1208output [1:0] fpc_gsr0_mask_sel_fx3;
1209output [1:0] fpc_gsr1_mask_sel_fx3;
1210output [1:0] fpc_gsr2_mask_sel_fx3;
1211output [1:0] fpc_gsr3_mask_sel_fx3;
1212output [1:0] fpc_gsr4_mask_sel_fx3;
1213output [1:0] fpc_gsr5_mask_sel_fx3;
1214output [1:0] fpc_gsr6_mask_sel_fx3;
1215output [1:0] fpc_gsr7_mask_sel_fx3;
1216output [4:0] fpc_gsr_scale_fx4;
1217output [2:0] fpc_gsr_align_fx4;
1218output [10:0] fpc_gsr_asr_11bits_fx4;
1219
1220// ----------------------------------------------------------------------------
1221// Global Signals
1222// ----------------------------------------------------------------------------
1223
1224input l2clk; // clock input
1225input scan_in;
1226input spc_aclk_wmr;
1227input wmr_scan_in;
1228input tcu_pce_ov; // scan signals
1229input spc_aclk;
1230input spc_bclk;
1231input tcu_scan_en;
1232input mbi_run; // MBIST
1233input [27:0] in_rngl_cdbus; // ASI local ring
1234
1235output scan_out;
1236output wmr_scan_out;
1237
1238
1239// scan renames
1240assign pce_ov = tcu_pce_ov;
1241assign stop = 1'b0;
1242assign siclk = spc_aclk;
1243assign soclk = spc_bclk;
1244assign se = tcu_scan_en;
1245// end scan
1246
1247
1248fgu_fpc_ctl_l1clkhdr_ctl_macro clkgen_coreon (
1249 .l2clk(l2clk),
1250 .l1en (coreon_clken),
1251 .l1clk(l1clk_pm2),
1252 .pce_ov(pce_ov),
1253 .stop(stop),
1254 .se(se)
1255 );
1256
1257fgu_fpc_ctl_l1clkhdr_ctl_macro clkgen_main (
1258 .l2clk(l2clk),
1259 .l1en (main_clken),
1260 .l1clk(l1clk_pm1),
1261 .pce_ov(pce_ov),
1262 .stop(stop),
1263 .se(se)
1264 );
1265
1266fgu_fpc_ctl_spare_ctl_macro__num_9 spares ( // spares: 13 gates + 1 flop for each "num"
1267 .scan_in(spares_scanin),
1268 .scan_out(spares_scanout),
1269 .l1clk(l1clk_pm2),
1270 .siclk(siclk),
1271 .soclk(soclk)
1272 );
1273
1274
1275// ----------------------------------------------------------------------------
1276// E stage
1277// ----------------------------------------------------------------------------
1278
1279fgu_fpc_ctl_msff_ctl_macro__width_3 e_00 (
1280 .scan_in(e_00_scanin),
1281 .scan_out(e_00_scanout),
1282 .l1clk(l1clk_pm2),
1283 .din ({dec_frf_r1_odd32b_d, // requires free running clk or dec_fgu_decode_d en
1284 dec_frf_r2_odd32b_d, // requires free running clk or dec_fgu_decode_d en
1285 dec_frf_store_d}), // requires free running clk or dec_fgu_decode_d en
1286 .dout({ r1_odd32b_e,
1287 r2_odd32b_e,
1288 frf_store_e}),
1289 .siclk(siclk),
1290 .soclk(soclk)
1291 );
1292
1293
1294// ----------------------------------------------------------------------------
1295// FX1 stage
1296// ----------------------------------------------------------------------------
1297
1298fgu_fpc_ctl_msff_ctl_macro__width_2 fx1_00 (
1299 .scan_in(fx1_00_scanin),
1300 .scan_out(fx1_00_scanout),
1301 .l1clk(l1clk_pm1),
1302 .din (dec_valid_e[1:0] ),
1303 .dout(i_fst_valid_fx1[1:0]),
1304 .siclk(siclk),
1305 .soclk(soclk)
1306 );
1307
1308fgu_fpc_ctl_msff_ctl_macro__width_8 fx1_01 (
1309 .scan_in(fx1_01_scanin),
1310 .scan_out(fx1_01_scanout),
1311 .l1clk(l1clk_pm1),
1312 .din ({r1_odd32b_e,
1313 r2_odd32b_e,
1314 fac_tid_e[2:0],
1315 frf_store_e,
1316 fac_exu_src_e,
1317 mbi_run}),
1318 .dout({r1_odd32b_fx1,
1319 r2_odd32b_fx1,
1320 tid_fx1[2:0],
1321 frf_store_fx1,
1322 exu_src_fx1,
1323 mbist_run_1f}),
1324 .siclk(siclk),
1325 .soclk(soclk)
1326 );
1327
1328assign fst_valid_fx1 =
1329 (i_fst_valid_fx1[0] & (tid_fx1[2:0] <= 3'd3)) |
1330 (i_fst_valid_fx1[1] & (tid_fx1[2:0] >= 3'd4)) ;
1331
1332assign fpc_frf_store_vld_fx1 = (fst_valid_fx1 | lsu_block_store_m) & frf_store_fx1;
1333
1334assign int_rs2_zero_fx1 = fpf_bzf_fx1 & ~fad_rs2_fx1[63];
1335
1336assign idiv0_trap_fx1 =
1337 fac_dec_valid_fx1 &
1338 int_rs2_zero_fx1 &
1339 (fac_fpx_itype_fx1[2:1] == 2'b11) & // div/sqrt
1340 ((fac_fpx_dtype_fx1[2:0] == 3'b011) |
1341 (fac_fpx_dtype_fx1[2:0] == 3'b100) ); // (32/64b dest)
1342
1343assign eintx_sel_fx1[3] = // F(s)MUL(s,d)
1344 (fac_fpx_itype_fx1[2:0] == 3'b101);
1345
1346assign eintx_sel_fx1[2] = // F(i,x)TOd
1347 (fac_fpx_itype_fx1[2:0] == 3'b011) &
1348 (fac_fpx_dtype_fx1[0] == 1'b1 ) ;
1349
1350assign eintx_sel_fx1[1] = // F(i,x)TOs
1351 (fac_fpx_itype_fx1[2:0] == 3'b011) &
1352 (fac_fpx_dtype_fx1[0] == 1'b0 ) ;
1353
1354assign eintx_sel_fx1[0] = // NaN (or inf)
1355 (fp_dual_source_fx1 & fpf_aoe_fx1) |
1356 (fp_source_fx1 & fpf_boe_fx1) ;
1357
1358assign eadjx_sel_fx1[2] = // FdTOs
1359 (fac_fpx_itype_fx1[2:0] == 3'b001) &
1360 (fac_fpx_dtype_fx1[0] == 1'b0 ) &
1361 (~fpf_boe_fx1 ) ; // don't adj exp if NaN (or inf)
1362
1363assign eadjx_sel_fx1[1] = // FsTOd
1364 (fac_fpx_itype_fx1[2:0] == 3'b001) &
1365 (fac_fpx_dtype_fx1[0] == 1'b1 ) &
1366 (~fpf_boe_fx1 ) ; // don't adj exp if NaN (or inf)
1367
1368assign eadjx_sel_fx1[0] = // F(i,x)TO(s,d)
1369 (fac_fpx_itype_fx1[2:0] == 3'b011) ;
1370
1371assign fpc_i2f_sel_fx1[2] = // F(i,x)TO(s,d) not 2's comp
1372 ~((~r2_odd32b_fx1 & fad_rs2_fx1[63]) |
1373 ( r2_odd32b_fx1 & fad_rs2_fx1[31]) ) &
1374 (fac_fpx_itype_fx1[2:0] == 3'b011);
1375
1376assign fpc_i2f_sel_fx1[3] = // F(i,x)TO(s,d) 2's comp
1377 ((~r2_odd32b_fx1 & fad_rs2_fx1[63]) |
1378 ( r2_odd32b_fx1 & fad_rs2_fx1[31]) ) &
1379 (fac_fpx_itype_fx1[2:0] == 3'b011);
1380
1381assign fp_source_fx1 =
1382 ((fac_fpx_itype_fx1[2:0] == 3'b000) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // add/sub
1383 ((fac_fpx_itype_fx1[2:0] == 3'b100) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // cmp
1384 ((fac_fpx_itype_fx1[2:0] == 3'b110) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // div
1385 ((fac_fpx_itype_fx1[2:0] == 3'b111) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // sqrt
1386 ((fac_fpx_itype_fx1[2:0] == 3'b101) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // mul
1387 ((fac_fpx_itype_fx1[2:0] == 3'b001) ) | // fpfp
1388 ((fac_fpx_itype_fx1[2:0] == 3'b010) ) ; // fpint
1389
1390assign fp_dual_source_fx1 =
1391 ((fac_fpx_itype_fx1[2:0] == 3'b000) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // add/sub
1392 ((fac_fpx_itype_fx1[2:0] == 3'b100) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // cmp
1393 ((fac_fpx_itype_fx1[2:0] == 3'b110) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) | // div
1394 ((fac_fpx_itype_fx1[2:0] == 3'b101) & (fac_fpx_dtype_fx1[2:1] == 2'b00)) ; // mul
1395
1396// ------------------------------------
1397// Merge GSR.irnd, FSR.rd
1398// - force round mode to truncate (2'b01) if rnd_trunc
1399// ------------------------------------
1400
1401assign rd_mode_fx1[1:0] =
1402 ({2{ fac_fpx_rnd_trunc_fx1 }} & (2'b01 )) |
1403 ({2{~fac_fpx_rnd_trunc_fx1 & gsr_im_fx3}} & (gsr_irnd_fx3[1:0] )) |
1404 ({2{~fac_fpx_rnd_trunc_fx1 & ~gsr_im_fx3}} & (fad_fsr_rd_fx1[1:0])) ;
1405
1406assign ns_mode_fx1 = // mask FSR.ns if GSR.im=1
1407 ~gsr_im_fx3 & fad_fsr_ns_fx1;
1408
1409// ------------------------------------
1410// logical subtract (effective subtract)
1411// = ((Sa xor Sb) xor Si) and SP add/sub or DP add/sub
1412// OR fpint and negative source
1413// OR intfp and negative source
1414// OR partitioned subtract
1415// ------------------------------------
1416
1417assign rs1_sign_fx1 =
1418 (~r1_odd32b_fx1 & fad_rs1_fx1[63]) |
1419 ( r1_odd32b_fx1 & fad_rs1_fx1[31]) ;
1420
1421assign rs2_sign_fx1 =
1422 (~r2_odd32b_fx1 & fad_rs2_fx1[63]) |
1423 ( r2_odd32b_fx1 & fad_rs2_fx1[31]) ;
1424
1425assign fadd_logical_sub_fx1 =
1426 ((fac_fpx_itype_fx1[2:0] == 3'b000) &
1427 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) & // SP/DP add/sub
1428 ((rs1_sign_fx1 ^ rs2_sign_fx1) ^ fac_fpx_sign_instr_fx1));
1429
1430assign logical_sub_fx1 =
1431 fadd_logical_sub_fx1 |
1432 ((fac_fpx_itype_fx1[2:1] == 2'b01 ) & // fpint/intfp
1433 rs2_sign_fx1 ) |
1434 ((fac_fpx_itype_fx1[2:0] == 3'b000) &
1435 (fac_fpx_dtype_fx1[2:1] == 2'b01 ) & // 16/32b add/sub
1436 fac_fpx_sign_instr_fx1 );
1437
1438assign fadd_logical_add_fx1 =
1439 ((fac_fpx_itype_fx1[2:0] == 3'b000) &
1440 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) & // SP/DP add/sub
1441 ~((rs1_sign_fx1 ^ rs2_sign_fx1) ^ fac_fpx_sign_instr_fx1));
1442
1443// ------------------------------------
1444// Exponent overflow prediction FADD/FSUB, FdTOs
1445// Exponent overflow detection FdTOs
1446// Exponent overflow prediction FMUL
1447// Exponent overflow detection FMUL
1448// Note: FDIV is not required to participate in exception trap prediction
1449// Exponent overflow prediction FDIV
1450// Exponent overflow detection FDIV
1451// ------------------------------------
1452
1453assign aux_enable_ovf_fx1 = // ensure overflow, not underflow
1454 (fad_rs1_fx1[62] & ~r1_odd32b_fx1) |
1455 (fad_rs1_fx1[30] & r1_odd32b_fx1) ;
1456
1457assign fmul_enable_ovf_predict_fx1 = // ensure overflow, not underflow
1458 ((fad_rs1_fx1[62:52] == 11'b01111111111) & fac_fpx_dtype_fx1[0] ) |
1459 ((fad_rs1_fx1[62:55] == 8'b01111111 ) & ~fac_fpx_dtype_fx1[0] & ~r1_odd32b_fx1) |
1460 ((fad_rs1_fx1[30:23] == 8'b01111111 ) & ~fac_fpx_dtype_fx1[0] & r1_odd32b_fx1) ;
1461
1462assign aux_eint_ovf_fx1 = // FDIV/FMUL overflow detection
1463 aux_enable_ovf_fx1 &
1464 (( fpe_aux_eint_fx1[8] & ~fac_fpx_dtype_fx1[0]) | // sp eint cout
1465 ( fpe_aux_eint_fx1[11] & fac_fpx_dtype_fx1[0]) ) & // dp eint cout
1466 ((~fpe_aux_eint_fx1[7] & ~fac_fpx_dtype_fx1[0]) | // sp
1467 (~fpe_aux_eint_fx1[10] & fac_fpx_dtype_fx1[0]) ) ; // dp
1468
1469assign aux_eint_emax_fx1 =
1470 ((fpe_aux_eint_fx1[7:0] == 8'b11111110 ) & ~fac_fpx_dtype_fx1[0]) | // sp eint Emax
1471 ((fpe_aux_eint_fx1[10:0] == 11'b11111111110) & fac_fpx_dtype_fx1[0]) ; // dp eint Emax
1472
1473assign aux_eint_emaxp1_fx1 =
1474 ((fpe_aux_eint_fx1[7:0] == 8'b11111111 ) & ~fac_fpx_dtype_fx1[0]) | // sp eint Emax+1
1475 ((fpe_aux_eint_fx1[10:0] == 11'b11111111111) & fac_fpx_dtype_fx1[0]) ; // dp eint Emax+1
1476
1477assign fadd_ovf_predict_fx1 =
1478 fadd_logical_add_fx1 & // req. for correct dpmax-dpmax=0 result
1479 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf), req. for correct ofc result
1480 ~(fpf_boe_fx1 ) & // Eb != (nan | inf), req. for correct ofc result
1481 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1482 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1483 (((~fac_fpx_dtype_fx1[0] | (&fpe_rs1_fmt_fx1[10:8])) &
1484 (fpe_rs1_fmt_fx1[7:0] == 8'b11111110) ) | // FADD/FSUB Ea=Emax
1485 ((~fac_fpx_dtype_fx1[0] | (&fpe_rs2_fmt_fx1[10:8])) &
1486 (fpe_rs2_fmt_fx1[7:0] == 8'b11111110) ) ); // FADD/FSUB Eb=Emax
1487
1488// 0in bits_on -max 1 -var {fadd_ovf_predict_fx1, fdtos_ovf_predict_fx1, fdtos_ovf_detect_fx1, fmul_ovf_predict_fx1, fmul_ovf_detect_fx1, fdiv_ovf_predict_fx1, fdiv_ovf_detect_fx1, fdtos_unf_detect_fx1, fmul_unf_predict_fx1, fmul_unf_detect_fx1, fdiv_unf_predict_fx1, fdiv_unf_detect_fx1} -active (fac_dec_valid_fx1 & fp_source_fx1)
1489
1490assign fdtos_ovf_predict_fx1 =
1491 (fpe_rs2_fmt_fx1[10:0] == 11'b10001111110) & // 2^(Emax_sp+896=1150)
1492 (fac_fpx_itype_fx1[2:0] == 3'b001 ) ; // fpfp
1493
1494assign fdtos_ovf_detect_fx1 =
1495 (fpe_rs2_fmt_fx1[10:0] > 11'b10001111110) & // 2^(Emax_sp+896>1150)
1496 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1497 (fac_fpx_itype_fx1[2:0] == 3'b001 ) ; // fpfp
1498
1499assign fmul_ovf_predict_fx1 =
1500 (aux_eint_emax_fx1 ) & // FMUL Eint=Emax
1501 (aux_enable_ovf_fx1 | fmul_enable_ovf_predict_fx1) & // ensure overflow, not underflow
1502 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1503 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1504 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1505 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1506 (fac_fpx_itype_fx1[2:0] == 3'b101 ) ; // mul
1507
1508assign fmul_ovf_detect_fx1 =
1509 (aux_eint_emaxp1_fx1 | // FMUL Eint=Emax+1
1510 aux_eint_ovf_fx1 ) & // FMUL Eint>Emax+1
1511 (aux_enable_ovf_fx1 ) & // ensure overflow, not underflow
1512 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1513 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1514 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1515 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1516 (fac_fpx_itype_fx1[2:0] == 3'b101 ) ; // mul
1517
1518assign fdiv_ovf_predict_fx1 =
1519 (aux_eint_emaxp1_fx1 ) & // FDIV Eint=Emax+1
1520 (aux_enable_ovf_fx1 ) & // ensure overflow, not underflow
1521 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1522 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1523 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1524 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1525 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ; // div
1526
1527assign fdiv_ovf_detect_fx1 =
1528 ( (aux_eint_ovf_fx1 ) & // FDIV Eint>Emax+1
1529 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1530 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1531 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1532 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1533 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ) | // div
1534// Note: norm divided by denorm will never produce 0.XX frac, thus Eint=Emax+1
1535// prediction based on 0.XX frac is not required
1536 ( (fpf_bze_fx1 & ~fpf_bzf_fx1 & ~ns_mode_fx1) & // FDIV Eb=den
1537 (fpe_rs1_fmt_fx1[10:0] >= 11'b10000000001) & // Ea = 11'h401
1538 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1539 (fac_fpx_dtype_fx1[0] == 1'b1 ) & // dp
1540 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ) | // div
1541 ( (fpf_bze_fx1 & ~fpf_bzf_fx1 & ~ns_mode_fx1) & // FDIV Eb=den
1542 (fpe_rs1_fmt_fx1[7:0] >= 8'b10000001 ) & // Ea = 8'h81
1543 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1544 (fac_fpx_dtype_fx1[0] == 1'b0 ) & // sp
1545 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ) ; // div
1546
1547// ------------------------------------
1548// Exponent underflow prediction FdTOs
1549// Exponent underflow detection FdTOs
1550// Exponent gross underflow detection FdTOs
1551// Exponent underflow prediction FMUL
1552// Exponent underflow detection FMUL
1553// Note: FDIV is not required to participate in exception trap prediction
1554// Exponent underflow prediction FDIV
1555// Exponent underflow detection FDIV
1556// ------------------------------------
1557
1558assign aux_enable_unf_fx1 = // ensure underflow, not overflow
1559 (~fad_rs1_fx1[62] & ~r1_odd32b_fx1) |
1560 (~fad_rs1_fx1[30] & r1_odd32b_fx1) ;
1561
1562assign fdiv_enable_unf_predict_fx1 = // ensure underflow, not overflow
1563 ((fad_rs1_fx1[62:52] == 11'b10000000000) & fac_fpx_dtype_fx1[0] ) |
1564 ((fad_rs1_fx1[62:55] == 8'b10000000 ) & ~fac_fpx_dtype_fx1[0] & ~r1_odd32b_fx1) |
1565 ((fad_rs1_fx1[30:23] == 8'b10000000 ) & ~fac_fpx_dtype_fx1[0] & r1_odd32b_fx1) ;
1566
1567assign aux_eint_unf_fx1 = // FDIV/FMUL underflow detection
1568 aux_enable_unf_fx1 &
1569 ((~fpe_aux_eint_fx1[8] & ~fac_fpx_dtype_fx1[0]) | // sp eint ~cout
1570 (~fpe_aux_eint_fx1[11] & fac_fpx_dtype_fx1[0]) ) & // dp eint ~cout
1571 (( fpe_aux_eint_fx1[7] & ~fac_fpx_dtype_fx1[0]) | // sp
1572 ( fpe_aux_eint_fx1[10] & fac_fpx_dtype_fx1[0]) ) ; // dp
1573
1574assign aux_eint_emin_fx1 =
1575 ((fpe_aux_eint_fx1[7:0] == 8'b00000001 ) & ~fac_fpx_dtype_fx1[0]) | // sp eint Emin
1576 ((fpe_aux_eint_fx1[10:0] == 11'b00000000001) & fac_fpx_dtype_fx1[0]) ; // dp eint Emin
1577
1578assign aux_eint_eminm1_fx1 =
1579 ((fpe_aux_eint_fx1[7:0] == 8'b00000000 ) & ~fac_fpx_dtype_fx1[0]) | // sp eint Emin-1
1580 ((fpe_aux_eint_fx1[10:0] == 11'b00000000000) & fac_fpx_dtype_fx1[0]) ; // dp eint Emin-1
1581
1582assign aux_eint_eminm2_fx1 =
1583 aux_eint_unf_fx1 &
1584 (((fpe_aux_eint_fx1[7:0] == 8'b11111111 ) & ~fac_fpx_dtype_fx1[0]) | // sp eint Emin-2
1585 ((fpe_aux_eint_fx1[10:0] == 11'b11111111111) & fac_fpx_dtype_fx1[0]) ); // dp eint Emin-2
1586
1587// Gross underflow detection:
1588// - Unnorm Eint is used for guf detection
1589// - For guf calculation, denorm Ea/Eb is treated as zero, not Emin
1590// - For fmul guf calculation, 1X.XX intermediate format has no effect
1591// - fdiv: Eint=Ea-Eb+bias-1
1592// - fmul: Eint=Ea+Eb-bias
1593// - fdtos: Eint=Eb-896
1594// - gross unf (sp exp <= -25, dp exp <= -54)
1595
1596assign fdtos_guf_detect_fx1 =
1597 (fpe_rs2_fmt_fx1[10:0] < 11'b01101101000 ) & // 2^(872), 871-896=-25
1598 ~((fpe_rs2_fmt_fx1[10:0] == 11'b00000000000) & fpf_bzf_fx1) & // ~zero src
1599 ~((rd_mode_fx1[1:0] == 2'b10) & ~fad_rs2_fx1[63] ) & // ~(pos. & rnd=+inf)
1600 ~((rd_mode_fx1[1:0] == 2'b11) & fad_rs2_fx1[63] ) & // ~(neg. & rnd=-inf)
1601 ~(ns_mode_fx1 ) &
1602 (fac_fpx_itype_fx1[2:0] == 3'b001 ) & // fpfp
1603 (fac_fpx_dtype_fx1[0] == 1'b0 ) ; // sp
1604
1605assign fmul_guf_detect_fx1 =
1606 aux_eint_unf_fx1 & // Eint<Emin-1
1607 (fac_fpx_itype_fx1[2:0] == 3'b101) & // mul
1608 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) & // sp/dp
1609 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1610 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1611 ~(fpf_aze_fx1 & fpf_azf_fx1 ) & // a != zero
1612 ~(fpf_bze_fx1 & fpf_bzf_fx1 ) & // b != zero
1613 ~((rd_mode_fx1[1:0] == 2'b10) & ~(rs1_sign_fx1 ^ rs2_sign_fx1)) & // ~(pos. & rnd=+inf)
1614 ~((rd_mode_fx1[1:0] == 2'b11) & (rs1_sign_fx1 ^ rs2_sign_fx1)) & // ~(neg. & rnd=-inf)
1615 ~(ns_mode_fx1 ) &
1616 (((fpe_aux_eint_fx1[7:0] <= 8'b11100111 ) & ~fac_fpx_dtype_fx1[0]) | // sp Eint<=-25 (Eint=Ea+Eb-bias)
1617 ((fpe_aux_eint_fx1[10:0] <= 11'b11111001010) & fac_fpx_dtype_fx1[0]) ); // dp Eint<=-54 (Eint=Ea+Eb-bias)
1618
1619assign fdiv_guf_detect_fx1 =
1620 aux_eint_unf_fx1 & // Eint<Emin-1
1621 (fac_fpx_itype_fx1[2:0] == 3'b110) & // div
1622 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) & // sp/dp
1623 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1624 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1625 ~(fpf_aze_fx1 & fpf_azf_fx1 ) & // a != zero
1626 ~(fpf_bze_fx1 & fpf_bzf_fx1 ) & // b != zero
1627 ~((rd_mode_fx1[1:0] == 2'b10) & ~(rs1_sign_fx1 ^ rs2_sign_fx1)) & // ~(pos. & rnd=+inf)
1628 ~((rd_mode_fx1[1:0] == 2'b11) & (rs1_sign_fx1 ^ rs2_sign_fx1)) & // ~(neg. & rnd=-inf)
1629 ~(ns_mode_fx1 ) &
1630 (((fpe_aux_eint_fx1[7:0] <= 8'b11101000 ) & ~fac_fpx_dtype_fx1[0]) | // sp Eint<=-24 (Eint=Ea-Eb+bias-1)
1631 ((fpe_aux_eint_fx1[10:0] <= 11'b11111001011) & fac_fpx_dtype_fx1[0]) ); // dp Eint<=-53 (Eint=Ea-Eb+bias-1)
1632
1633assign fdtos_unf_predict_fx1 =
1634 (fpe_rs2_fmt_fx1[10:0] == 11'b01110000000) & // 2^(896)
1635 (fac_fpx_itype_fx1[2:0] == 3'b001 ) ; // fpfp
1636
1637assign fdtos_unf_detect_fx1 =
1638 (fpe_rs2_fmt_fx1[10:0] < 11'b01110000000) & // 2^(896)
1639 ~(fpe_rs2_fmt_fx1[10:0] == 11'b00000000000) & // ~(zero|denorm)
1640 (fac_fpx_itype_fx1[2:0] == 3'b001 ) & // fpfp
1641 (fac_fpx_dtype_fx1[0] == 1'b0 ) ; // sp
1642
1643assign fmul_unf_predict_fx1 =
1644 (aux_eint_eminm1_fx1 ) & // FMUL Eint=Emin-1
1645 (aux_enable_unf_fx1 ) & // ensure underflow, not overflow
1646 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1647 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1648 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1649 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1650 (fac_fpx_itype_fx1[2:0] == 3'b101) & // mul
1651 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) ; // sp/dp
1652
1653assign fmul_unf_detect_fx1 =
1654 (aux_eint_unf_fx1 ) & // FMUL Eint<Emin-1
1655 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1656 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1657 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1658 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1659 (fac_fpx_itype_fx1[2:0] == 3'b101) & // mul
1660 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) ; // sp/dp
1661
1662assign fdiv_unf_predict_fx1 =
1663 (aux_eint_emin_fx1 ) & // FDIV Eint=Emin
1664 (aux_enable_unf_fx1 | fdiv_enable_unf_predict_fx1) & // ensure underflow, not overflow
1665 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1666 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1667 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1668 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1669 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ; // div
1670
1671assign fdiv_unf_detect_fx1 =
1672 (aux_eint_eminm1_fx1 | // FDIV Eint=Emin-1
1673 aux_eint_unf_fx1 ) & // FDIV Eint<Emin-1
1674 (aux_enable_unf_fx1 ) & // ensure underflow, not overflow
1675 ~(fpf_aoe_fx1 ) & // Ea != (nan | inf)
1676 ~(fpf_boe_fx1 ) & // Eb != (nan | inf)
1677 ~(fpf_aze_fx1 ) & // Ea != (zero| den)
1678 ~(fpf_bze_fx1 ) & // Eb != (zero| den)
1679 (fac_fpx_itype_fx1[2:0] == 3'b110 ) ; // div
1680
1681// ------------------------------------
1682// Exception trap prediction
1683// - IDIV, FDIV, FSQRT do not participate in exception trap prediction.
1684// Once an FPD instr has been issued, no other instr from that thread
1685// can be issued until the older FPD instr has completed or has been flushed.
1686// ------------------------------------
1687
1688assign snan_or_inf_fx1 =
1689 (fpf_aoe_fx1 & fp_dual_source_fx1 & ~fad_rs1_fmt_fx1_b62) |
1690 (fpf_boe_fx1 & ~fad_rs2_fmt_fx1_b62) ;
1691
1692assign nan_or_inf_fx1 =
1693 (fac_fcmpe_fx1 &
1694 (fac_fpx_itype_fx1[2:0] == 3'b100) & (fac_fpx_dtype_fx1[2:1] == 2'b00) & // FCMPE(s,d)
1695 (fpf_aoe_fx1 | fpf_boe_fx1) ) |
1696 ((fac_fpx_itype_fx1[2:0] == 3'b010) & fpf_boe_fx1 ) ; // F(s,d)TO(i,x)
1697
1698assign large_maxint_predict_fx1 =
1699
1700 ((fpe_rs2_fmt_fx1[10:0] >= 11'b10000111110) & // 2^(63+1023)
1701 (fac_fpx_itype_fx1[2:0] == 3'b010) &
1702 (fac_fpx_stype_fx1[1:0] == 2'b01 ) &
1703 (fac_fpx_dtype_fx1[2:0] == 3'b100) ) | // FdTOx
1704
1705 ((fpe_rs2_fmt_fx1[7:0] >= 8'b10111110) & // 2^(63+ 127)
1706 (fac_fpx_itype_fx1[2:0] == 3'b010) &
1707 (fac_fpx_stype_fx1[1:0] == 2'b00 ) &
1708 (fac_fpx_dtype_fx1[2:0] == 3'b100) ) | // FsTOx
1709
1710 ((fpe_rs2_fmt_fx1[10:0] >= 11'b10000011110) & // 2^(31+1023)
1711 (fac_fpx_itype_fx1[2:0] == 3'b010) &
1712 (fac_fpx_stype_fx1[1:0] == 2'b01 ) &
1713 (fac_fpx_dtype_fx1[2:0] == 3'b011) ) | // FdTOi
1714
1715 ((fpe_rs2_fmt_fx1[7:0] >= 8'b10011110) & // 2^(31+ 127)
1716 (fac_fpx_itype_fx1[2:0] == 3'b010) &
1717 (fac_fpx_stype_fx1[1:0] == 2'b00 ) &
1718 (fac_fpx_dtype_fx1[2:0] == 3'b011) ) ; // FsTOi
1719
1720assign fadd_unf_predict_fx1 =
1721
1722 fadd_logical_sub_fx1 &
1723 ~fpf_aze_fx1 & // Ea != (zero| den)
1724 ~fpf_bze_fx1 & // Eb != (zero| den)
1725
1726 (( fpe_rs1_fmt_fx1[10:1] ==
1727 fpe_rs2_fmt_fx1[10:1] ) | // shift count (SC) = 0 (or possibly 1)
1728 ((fpe_rs1_fmt_fx1[10:0] + 11'd1) ==
1729 fpe_rs2_fmt_fx1[10:0] ) | // Ea+1=Eb (SC) = 1
1730 ((fpe_rs2_fmt_fx1[10:0] + 11'd1) ==
1731 fpe_rs1_fmt_fx1[10:0] ) ) & // Eb+1=Ea (SC) = 1
1732
1733 ((~fac_fpx_dtype_fx1[0] & // SP
1734 ~(fpe_rs1_fmt_fx1[7:0] >= 8'd25) & // Ea !>=25
1735 ~(fpe_rs2_fmt_fx1[7:0] >= 8'd25) ) | // Eb !>=25
1736
1737 ( fac_fpx_dtype_fx1[0] & // DP
1738 ~(fpe_rs1_fmt_fx1[10:0] >= 11'd54) & // Ea !>=54
1739 ~(fpe_rs2_fmt_fx1[10:0] >= 11'd54) ) ) ; // Eb !>=54
1740
1741assign fadd_fcvt_denorm_detect_fx1 =
1742 ~ns_mode_fx1 &
1743
1744 ((((fpf_aze_fx1 & ~fpf_azf_fx1) | (fpf_bze_fx1 & ~fpf_bzf_fx1)) & // denorm a or b
1745 (fac_fpx_itype_fx1[2:0] == 3'b000) &
1746 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) & // FADD/FSUB
1747 fac_fpx_unfin_vld_fx1 ) | // must not include FMOV/FABS/FNEG
1748
1749 ( (fpf_bze_fx1 & ~fpf_bzf_fx1) & // denorm b
1750 (fac_fpx_itype_fx1[2:0] == 3'b010) ) | // F(s,d)TO(i,x)
1751
1752 ( (fpf_bze_fx1 & ~fpf_bzf_fx1) & // denorm b
1753 ~(~fad_fsr_tem_fx1[2] & fdtos_guf_detect_fx1) & // ~(gross_unf and UFM=0)
1754 (fac_fpx_itype_fx1[2:0] == 3'b001) )); // F(s,d)TO(d,s)
1755
1756assign fmul_denorm_detect_fx1 =
1757 ~ns_mode_fx1 &
1758 ( ((fpf_aze_fx1 & ~fpf_azf_fx1) | (fpf_bze_fx1 & ~fpf_bzf_fx1)) & // denorm a or b
1759 ~(~fad_fsr_tem_fx1[2] & fmul_guf_detect_fx1 ) & // ~(gross_unf & UFM=0)
1760 ~((fpf_aze_fx1 & fpf_azf_fx1) | (fpf_bze_fx1 & fpf_bzf_fx1)) & // ~(zero a or b)
1761 (fac_fpx_itype_fx1[2:0] == 3'b101) & // note: FsMULd never underflows
1762 (fac_fpx_dtype_fx1[2:1] == 2'b00 ) ); // FsMULd, FMUL(s,d)
1763
1764assign q_fmul_unf_predict_fx1 =
1765 ( ( fad_fsr_tem_fx1[2] | ~ns_mode_fx1)
1766 & (fmul_unf_predict_fx1 | fmul_unf_detect_fx1)
1767 & ~(~fad_fsr_tem_fx1[2] & fmul_guf_detect_fx1 ) ) ;
1768
1769assign i_predict_fx1 =
1770
1771 ( fac_fpx_nv_vld_fx1 & ~(fac_fpx_itype_fx1[2:1] == 2'b11) // not div/sqrt
1772 & fad_fsr_tem_fx1[4] & snan_or_inf_fx1 ) |
1773 ( fad_fsr_tem_fx1[4] & nan_or_inf_fx1 ) |
1774 ( fad_fsr_tem_fx1[4] & large_maxint_predict_fx1 ) |
1775
1776 ( fac_fpx_of_vld_fx1 & fad_fsr_tem_fx1[3] & fadd_ovf_predict_fx1 ) |
1777 ( fac_fpx_of_vld_fx1 & fad_fsr_tem_fx1[3] & fmul_ovf_predict_fx1 ) |
1778 ( fac_fpx_of_vld_fx1 & fad_fsr_tem_fx1[3] & fmul_ovf_detect_fx1 ) |
1779 ( fac_fpx_of_vld_fx1 & fad_fsr_tem_fx1[3] & fdtos_ovf_predict_fx1 ) |
1780 ( fac_fpx_of_vld_fx1 & fad_fsr_tem_fx1[3] & fdtos_ovf_detect_fx1 ) |
1781
1782 ( fac_fpx_uf_vld_fx1 & ( fad_fsr_tem_fx1[2] | ~ns_mode_fx1)
1783 & fadd_unf_predict_fx1 ) |
1784 ( ( fad_fsr_tem_fx1[2] | ~ns_mode_fx1)
1785 & fdtos_unf_predict_fx1 ) |
1786 (( ( fad_fsr_tem_fx1[2] | ~ns_mode_fx1)
1787 & fdtos_unf_detect_fx1 )
1788 & ~(~fad_fsr_tem_fx1[2] & fdtos_guf_detect_fx1) ) |
1789
1790//( fac_fpx_dz_vld_fx1 & fad_fsr_tem_fx1[1] ) |
1791
1792 ( fac_fpx_nx_vld_fx1 & ~( fac_fpx_itype_fx1[2:1] == 2'b11 ) // not div/sqrt
1793 & ~((fac_fpx_itype_fx1[2:0] == 3'b001) &
1794 (fac_fpx_dtype_fx1[0] == 1'b1 )) // not FsTOd
1795 & ~((fac_fpx_itype_fx1[2:0] == 3'b101) &
1796 (fac_fpx_stype_fx1[1:0] == 2'b00 ) &
1797 (fac_fpx_dtype_fx1[2:0] == 3'b001)) // not FsMULd
1798 & fad_fsr_tem_fx1[0] ) |
1799 ( fac_fpx_nx_vld_fx1 & (( fpf_bze_fx1 &
1800 (fac_fpx_itype_fx1[2:0] == 3'b001) &
1801 (fac_fpx_dtype_fx1[0] == 1'b1 )) | // FsTOd
1802 ((fpf_aze_fx1 | fpf_bze_fx1 ) &
1803 (fac_fpx_itype_fx1[2:0] == 3'b101) &
1804 (fac_fpx_stype_fx1[1:0] == 2'b00 ) &
1805 (fac_fpx_dtype_fx1[2:0] == 3'b001)) ) // FsMULd
1806 & fad_fsr_tem_fx1[0] & ns_mode_fx1 );
1807
1808
1809// ----------------------------------------------------------------------------
1810// FX2 stage
1811// ----------------------------------------------------------------------------
1812
1813fgu_fpc_ctl_msff_ctl_macro__width_51 fx2_00 (
1814 .scan_in(fx2_00_scanin),
1815 .scan_out(fx2_00_scanout),
1816 .l1clk(l1clk_pm1),
1817 .din ({fac_fpx_itype_fx1[2:0],
1818 fac_fpx_dtype_fx1[2:0],
1819 fac_fpx_stype_fx1[1:0],
1820 fac_fpx_sign_instr_fx1,
1821 idiv0_trap_fx1,
1822 dec_flush_f1,
1823 fac_dec_valid_fx1,
1824 dec_fgu_fmov_vld_m,
1825 fac_div_valid_fx1,
1826 fac_divq_valid_fx1,
1827 fpe_aux_rs2_fmt_fx1_b0,
1828 eintx_sel_fx1[3:0],
1829 eadjx_sel_fx1[2:0],
1830 fac_fpx_nv_vld_fx1,
1831 fac_fpx_of_vld_fx1,
1832 fac_fpx_uf_vld_fx1,
1833 fac_fpx_dz_vld_fx1,
1834 fac_fpx_nx_vld_fx1,
1835 fac_fpx_unfin_vld_fx1,
1836 fac_fcmpe_fx1,
1837 fp_source_fx1,
1838 fp_dual_source_fx1,
1839 rs1_sign_fx1,
1840 rs2_sign_fx1,
1841 fadd_logical_sub_fx1,
1842 logical_sub_fx1,
1843 fadd_logical_add_fx1,
1844 fpf_hi_aof_fx1,
1845 fpf_lo_aof_fx1,
1846 aux_eint_eminm1_fx1,
1847 aux_eint_eminm2_fx1,
1848 aux_enable_unf_fx1,
1849 rd_mode_fx1[1:0],
1850 ns_mode_fx1,
1851 fst_valid_fx1,
1852 fad_gsr_imirnd_fx1[2:0],
1853 fac_fgx_pdist_fx1,
1854 exu_src_fx1}),
1855 .dout({ itype_fx2[2:0],
1856 dtype_fx2[2:0],
1857 stype_fx2[1:0],
1858 sign_instr_fx2,
1859 i_idiv0_trap_fx2,
1860 dec_flush_fx2,
1861 dec_valid_fx2,
1862 fmov_vld_fx2,
1863 div_valid_fx2,
1864 divq_valid_fx2,
1865 aux_rs2_fmt_fx2[0],
1866 fpc_eintx_sel_fx2[3:0],
1867 fpc_eadjx_sel_fx2[2:0],
1868 fpx_nv_vld_fx2,
1869 fpx_of_vld_fx2,
1870 fpx_uf_vld_fx2,
1871 fpx_dz_vld_fx2,
1872 fpx_nx_vld_fx2,
1873 fpx_unfin_vld_fx2,
1874 fcmpe_fx2,
1875 fp_source_fx2,
1876 fp_dual_source_fx2,
1877 rs1_sign_fx2,
1878 rs2_sign_fx2,
1879 fadd_logical_sub_fx2,
1880 logical_sub_fx2,
1881 fadd_logical_add_fx2,
1882 hi_aof_fx2,
1883 lo_aof_fx2,
1884 aux_eint_eminm1_fx2,
1885 aux_eint_eminm2_fx2,
1886 aux_enable_unf_fx2,
1887 rd_mode_fx2[1:0],
1888 ns_mode_fx2,
1889 fst_valid_fx2,
1890 gsr_imirnd_fx2[2:0],
1891 fgx_pdist_fx2,
1892 exu_src_fx2}),
1893 .siclk(siclk),
1894 .soclk(soclk)
1895 );
1896
1897fgu_fpc_ctl_msff_ctl_macro__width_14 fx2_01 (
1898 .scan_in(fx2_01_scanin),
1899 .scan_out(fx2_01_scanout),
1900 .l1clk(l1clk_pm1),
1901 .din ({fac_fpx_mulscc_fx1,
1902 fad_rs1_fx1[33],
1903 fpe_rs2_fmt_fx1[10:0],
1904 fac_fpx_saverestore_fx1}),
1905 .dout({ mulscc_fx2,
1906 mulscc_y_src_fx2_b0,
1907 rs2_exp_fx2[10:0],
1908 saverestore_fx2}),
1909 .siclk(siclk),
1910 .soclk(soclk)
1911 );
1912
1913fgu_fpc_ctl_msff_ctl_macro__width_17 fx2_02 (
1914 .scan_in(fx2_02_scanin),
1915 .scan_out(fx2_02_scanout),
1916 .l1clk(l1clk_pm1),
1917 .din ({fac_w1_vld_fx1[1:0], fac_w1_odd32b_fx1, fpe_aux_eint_fx1[10:0], tid_fx1[2:0]}),
1918 .dout({ i_w1_vld_fx2[1:0], w1_odd32b_fx2, aux_eint_fx2[10:0], tid_fx2[2:0]}),
1919 .siclk(siclk),
1920 .soclk(soclk)
1921 );
1922
1923fgu_fpc_ctl_msff_ctl_macro__width_4 fx2_03 (
1924 .scan_in(fx2_03_scanin),
1925 .scan_out(fx2_03_scanout),
1926 .l1clk(l1clk_pm1),
1927 .din ({fad_rs1_fx1[63], fad_rs1_fx1[47], fad_rs1_fx1[31], fad_rs1_fx1[15]}),
1928 .dout({ rs1_fx2_b63, rs1_fx2_b47, rs1_fx2_b31, rs1_fx2_b15}),
1929 .siclk(siclk),
1930 .soclk(soclk)
1931 );
1932
1933fgu_fpc_ctl_msff_ctl_macro__width_4 fx2_04 (
1934 .scan_in(fx2_04_scanin),
1935 .scan_out(fx2_04_scanout),
1936 .l1clk(l1clk_pm1),
1937 .din ({fad_rs2_fx1[63], fad_rs2_fx1[47], fad_rs2_fx1[31], fad_rs2_fx1[15]}),
1938 .dout({ rs2_fx2_b63, rs2_fx2_b47, rs2_fx2_b31, rs2_fx2_b15}),
1939 .siclk(siclk),
1940 .soclk(soclk)
1941 );
1942
1943fgu_fpc_ctl_msff_ctl_macro__width_6 fx2_05 (
1944 .scan_in(fx2_05_scanin),
1945 .scan_out(fx2_05_scanout),
1946 .l1clk(l1clk_pm1),
1947 .din ({fpf_azf_fx1, fpf_bzf_fx1, fpf_aoe_fx1, fpf_boe_fx1, fpf_aze_fx1, fpf_bze_fx1}),
1948 .dout({ azf_fx2, bzf_fx2, aoe_fx2, boe_fx2, aze_fx2, bze_fx2}),
1949 .siclk(siclk),
1950 .soclk(soclk)
1951 );
1952
1953fgu_fpc_ctl_msff_ctl_macro__width_7 fx2_06 (
1954 .scan_in(fx2_06_scanin),
1955 .scan_out(fx2_06_scanout),
1956 .l1clk(l1clk_pm1),
1957 .din ({fad_fsr_tem_fx1[4:0],
1958 fad_rs1_fmt_fx1_b62,
1959 fad_rs2_fmt_fx1_b62}),
1960 .dout({ fsr_tem_fx2[4:0],
1961 rs1_fmt_fx2[62],
1962 rs2_fmt_fx2[62]}),
1963 .siclk(siclk),
1964 .soclk(soclk)
1965 );
1966
1967fgu_fpc_ctl_msff_ctl_macro__width_20 fx2_07 (
1968 .scan_in(fx2_07_scanin),
1969 .scan_out(fx2_07_scanout),
1970 .l1clk(l1clk_pm1),
1971 .din ({fadd_ovf_predict_fx1,
1972 fdtos_ovf_predict_fx1,
1973 fdtos_ovf_detect_fx1,
1974 fmul_ovf_predict_fx1,
1975 fmul_ovf_detect_fx1,
1976 fdiv_ovf_predict_fx1,
1977 fdiv_ovf_detect_fx1,
1978 fdtos_unf_predict_fx1,
1979 fdtos_unf_detect_fx1,
1980 fmul_unf_predict_fx1,
1981 fmul_unf_detect_fx1,
1982 fdiv_unf_predict_fx1,
1983 fdiv_unf_detect_fx1,
1984 fdtos_guf_detect_fx1,
1985 fmul_guf_detect_fx1,
1986 fdiv_guf_detect_fx1,
1987 i_predict_fx1,
1988 fmul_denorm_detect_fx1,
1989 q_fmul_unf_predict_fx1,
1990 fadd_fcvt_denorm_detect_fx1}),
1991 .dout({fadd_ovf_predict_fx2,
1992 fdtos_ovf_predict_fx2,
1993 fdtos_ovf_detect_fx2,
1994 fmul_ovf_predict_fx2,
1995 fmul_ovf_detect_fx2,
1996 fdiv_ovf_predict_fx2,
1997 fdiv_ovf_detect_fx2,
1998 fdtos_unf_predict_fx2,
1999 fdtos_unf_detect_fx2,
2000 fmul_unf_predict_fx2,
2001 fmul_unf_detect_fx2,
2002 fdiv_unf_predict_fx2,
2003 fdiv_unf_detect_fx2,
2004 fdtos_guf_detect_fx2,
2005 fmul_guf_detect_fx2,
2006 fdiv_guf_detect_fx2,
2007 i_predict_fx2,
2008 fmul_denorm_detect_fx2,
2009 q_fmul_unf_predict_fx2,
2010 fadd_fcvt_denorm_detect_fx2}),
2011 .siclk(siclk),
2012 .soclk(soclk)
2013 );
2014
2015fgu_fpc_ctl_msff_ctl_macro__width_15 fx2_08 (
2016 .scan_in(fx2_08_scanin),
2017 .scan_out(fx2_08_scanout),
2018 .l1clk(l1clk_pm2),
2019 .din ({in_rngl_cdbus[27:25], // requires free running clk or rng_data_1f[63] en
2020 in_rngl_cdbus[7:0], // requires free running clk or rng_data_1f[63] en
2021 exu_fgu_flush_m, // requires free running clk
2022 exu_fgu_gsr_m[2:0]}), // requires free running clk
2023 .dout({in_rngl_cdbus_1f[27:25],
2024 in_rngl_cdbus_1f[7:0],
2025 exu_flush_fx2,
2026 gsr_align_fx2[2:0]}),
2027 .siclk(siclk),
2028 .soclk(soclk)
2029 );
2030
2031assign w1_vld_fx2[1:0] =
2032 i_w1_vld_fx2[1:0] &
2033 {2{~(fac_fgx_mvcond_fx2 & ~fmov_vld_fx2)}} &
2034 {2{~dec_flush_fx2}} &
2035 {2{~exu_flush_fx2}} & // required for conditional FMOV
2036 {2{~(fec_uecc_fx2 | fec_cecc_fx2)}};
2037
2038assign fsr_w1_vld_fx2[0] = // fsr write valid, not cleared for mvcond with cond=false
2039 dec_valid_fx2 &
2040 ~(itype_fx2 == 3'b100) & // ~FCMP(E)
2041 (fpx_nv_vld_fx2 |
2042 fpx_of_vld_fx2 |
2043 fpx_uf_vld_fx2 |
2044 fpx_dz_vld_fx2 |
2045 fpx_nx_vld_fx2 |
2046 fpx_unfin_vld_fx2 |
2047 fac_fgx_mvcond_fx2 |
2048 fac_fgx_mvucond_fx2 |
2049 (itype_fx2 == 3'b011) | // ensure FiTOd is included
2050 fac_fgx_abs_fx2 |
2051 fac_fgx_neg_fx2 ) &
2052 ~dec_flush_fx2 &
2053 ~exu_flush_fx2 & // required for conditional FMOV
2054 ~(fec_uecc_fx2 | fec_cecc_fx2);
2055
2056assign fsr_w1_vld_fx2[1] =
2057 fst_valid_fx2 & // store FSR 32/64b clears ftt in fw stage via w1
2058 fac_fsr_store_fx2 &
2059 ~dec_flush_fx2 &
2060 ~exu_flush_fx2 & // required for conditional FMOV
2061 ~(fec_uecc_fx2 | fec_cecc_fx2);
2062
2063// 0in custom -fire (((fac_fsr_store_fx2 & fst_valid_fx2) & ($0in_delay(dec_valid_fx2,1)) & (tid_fx2[2:0]==tid_fx3[2:0])) | ((fac_fsr_store_fx2 & fst_valid_fx2) & ($0in_delay(dec_valid_fx2,2)) & (tid_fx2[2:0]==($0in_delay(tid_fx3[2:0],1)))) | ((fac_fsr_store_fx2 & fst_valid_fx2) & ($0in_delay(dec_valid_fx2,3)) & (tid_fx2[2:0]==($0in_delay(tid_fx3[2:0],2)))) | ((fac_fsr_store_fx2 & fst_valid_fx2) & ($0in_delay(dec_valid_fx2,4)) & (tid_fx2[2:0]==($0in_delay(tid_fx3[2:0],3))))) -message "STFSR collision with FPop"
2064
2065assign gsr_w_vld_fx2[1:0] = // gsr write valids
2066 fac_gsr_w_vld_fx2[1:0] &
2067 {2{~dec_flush_fx2}} &
2068//{2{~dec_flush_f2}} &
2069//{2{~tlu_flush_fgu_b}} &
2070 {2{~exu_flush_fx2}} ;
2071
2072assign fgx_siam_fx2 = // gsr write valids
2073 fac_fgx_siam_fx2 &
2074 ~dec_flush_fx2 &
2075// ~dec_flush_f2 &
2076// ~tlu_flush_fgu_b &
2077 ~exu_flush_fx2 ;
2078
2079// ------------------------------------
2080// floating point intermediate sign
2081// Note:
2082// (1) intermediate sign for sqrt is always 1'b0, unless rs2 is
2083// -0 or -denorm
2084// (2) rs1 - rs2 = +norm - +nan = -nan is incorrect, must pass rs2[63,31]
2085// if rs1 or rs2 is a nan
2086// (3) pass rs2[63,31] if fpfp instr (needed for rs2=0 case)
2087// ------------------------------------
2088
2089assign sign_nan_fx2 =
2090 (nan_rs2prop_fx2 & rs2_sign_fx2) |
2091 (nan_rs1prop_fx2 & rs1_sign_fx2) ;
2092
2093assign sign_inter_sel_fx2[0] =
2094 ~(itype_fx2[2:0] == 3'b101) & // mul
2095 ~(itype_fx2[2:0] == 3'b110) & // div
2096 ~(itype_fx2[2:0] == 3'b111) & // sqrt
2097 ~(a_nan_fx2 | b_nan_fx2) &
2098 (~fpf_cmp_swap_blta_fx2 | (itype_fx2[2:0] == 3'b001) // fpfp
2099 | (itype_fx2[2:0] == 3'b010) // fpint
2100 | (itype_fx2[2:0] == 3'b011)); // intfp
2101
2102assign sign_inter_sel_fx2[1] =
2103 ~(itype_fx2[2:0] == 3'b101) & // mul
2104 ~(itype_fx2[2:0] == 3'b110) & // div
2105 ~(itype_fx2[2:0] == 3'b111) & // sqrt
2106 ~(a_nan_fx2 | b_nan_fx2) &
2107 ( fpf_cmp_swap_blta_fx2 & ~(itype_fx2[2:0] == 3'b001) // fpfp
2108 & ~(itype_fx2[2:0] == 3'b010) // fpint
2109 & ~(itype_fx2[2:0] == 3'b011)); // intfp
2110
2111assign sign_inter_sel_fx2[2] =
2112 ((itype_fx2[2:0] == 3'b101) | // mul
2113 (itype_fx2[2:0] == 3'b110) ) & // div
2114 ~(a_nan_fx2 | b_nan_fx2);
2115
2116assign sign_inter_sel_fx2[3] =
2117 (itype_fx2[2:0] == 3'b111) & // sqrt
2118 ~(a_nan_fx2 | b_nan_fx2);
2119
2120assign sign_inter_sel_fx2[4] =
2121 (a_nan_fx2 | b_nan_fx2);
2122
2123assign sign_inter_fx2 =
2124 (sign_inter_sel_fx2[0] & (rs2_sign_fx2 ^ sign_instr_fx2)) |
2125 (sign_inter_sel_fx2[1] & (rs1_sign_fx2 )) |
2126 (sign_inter_sel_fx2[2] & (rs1_sign_fx2 ^ rs2_sign_fx2 )) |
2127 (sign_inter_sel_fx2[3] & (rs2_sign_fx2 & bze_fx2 )) |
2128 (sign_inter_sel_fx2[4] & (sign_nan_fx2 )) ; // 0in bits_on -max 1 -var sign_inter_sel_fx2[4:0] -active dec_valid_fx2
2129
2130// ------------------------------------
2131// Final FSQRT intermediate exponent (Eint) calculation, and mux with FDIV Eint
2132// ------------------------------------
2133
2134assign sp_odd_exp_fx2 = itype_fx2[0] & ~dtype_fx2[0] & ~aux_rs2_fmt_fx2[0]; // fsqrts odd exp
2135assign sp_even_exp_fx2 = itype_fx2[0] & ~dtype_fx2[0] & aux_rs2_fmt_fx2[0]; // fsqrts even exp
2136assign dp_odd_exp_fx2 = itype_fx2[0] & dtype_fx2[0] & ~aux_rs2_fmt_fx2[0]; // fsqrtd odd exp
2137assign dp_even_exp_fx2 = itype_fx2[0] & dtype_fx2[0] & aux_rs2_fmt_fx2[0]; // fsqrtd even exp
2138
2139assign fpd_eint_fx2[10:0] =
2140 ({11{dp_even_exp_fx2}} & ({ aux_eint_fx2[10], aux_eint_fx2[10:1]} + 11'b01111111111)) | // fsqrt +bias
2141 ({11{dp_odd_exp_fx2 }} & ({ aux_eint_fx2[10], aux_eint_fx2[10:1]} + 11'b10000000000)) | // fsqrt +bias+1
2142 ({11{sp_even_exp_fx2}} & ({3'b000, aux_eint_fx2[7], aux_eint_fx2[7:1]} + 11'b00001111111)) | // fsqrt +bias
2143 ({11{sp_odd_exp_fx2 }} & ({3'b000, aux_eint_fx2[7], aux_eint_fx2[7:1]} + 11'b00010000000)) | // fsqrt +bias+1
2144 ({11{~itype_fx2[0] }} & ( aux_eint_fx2[10:0] )) ; // fdiv
2145
2146// ------------------------------------
2147// VIS partitioned compares:
2148// FCMPEQ(16,32), FCMPGT(16,32), FCMPLE(16,32), FCMPNE(16,32)
2149//
2150// gt if rs1 > rs2
2151// le if rs1 <= rs2
2152// ne if rs1 != rs2
2153// eq if rs1 = rs2
2154//
2155// Where rs1 and rs2 are signed values.
2156//
2157// Note: fpf_b_gteq_a_fx2[3] and fpf_b_eq_a_fx2[3] don't yet
2158// account for rs1[63] and rs2[63]
2159// ------------------------------------
2160
2161// ------------------------------------
2162// gt16, gt32
2163// ------------------------------------
2164
2165assign fcmpgt16_fx2[3] =
2166 (~rs1_fx2_b63 & rs2_fx2_b63 ) |
2167 ( rs1_fx2_b63 & rs2_fx2_b63 & ~fpf_b_gteq_a_fx2[3]) |
2168 (~rs1_fx2_b63 & ~rs2_fx2_b63 & ~fpf_b_gteq_a_fx2[3]) ;
2169
2170assign fcmpgt16_fx2[2] =
2171 (~rs1_fx2_b47 & rs2_fx2_b47 ) |
2172 ( rs1_fx2_b47 & rs2_fx2_b47 & ~fpf_b_gteq_a_fx2[2]) |
2173 (~rs1_fx2_b47 & ~rs2_fx2_b47 & ~fpf_b_gteq_a_fx2[2]) ;
2174
2175assign fcmpgt16_fx2[1] =
2176 (~rs1_fx2_b31 & rs2_fx2_b31 ) |
2177 ( rs1_fx2_b31 & rs2_fx2_b31 & ~fpf_b_gteq_a_fx2[1]) |
2178 (~rs1_fx2_b31 & ~rs2_fx2_b31 & ~fpf_b_gteq_a_fx2[1]) ;
2179
2180assign fcmpgt16_fx2[0] =
2181 (~rs1_fx2_b15 & rs2_fx2_b15 ) |
2182 ( rs1_fx2_b15 & rs2_fx2_b15 & ~fpf_b_gteq_a_fx2[0]) |
2183 (~rs1_fx2_b15 & ~rs2_fx2_b15 & ~fpf_b_gteq_a_fx2[0]) ;
2184
2185assign gt32_fx2[1] =
2186 ~fpf_b_gteq_a_fx2[3] | (fpf_b_eq_a_fx2[3] & ~fpf_b_gteq_a_fx2[2]);
2187
2188assign gt32_fx2[0] =
2189 ~fpf_b_gteq_a_fx2[1] | (fpf_b_eq_a_fx2[1] & ~fpf_b_gteq_a_fx2[0]);
2190
2191assign fcmpgt32_fx2[1] =
2192 (~rs1_fx2_b63 & rs2_fx2_b63 ) |
2193 ( rs1_fx2_b63 & rs2_fx2_b63 & gt32_fx2[1]) |
2194 (~rs1_fx2_b63 & ~rs2_fx2_b63 & gt32_fx2[1]) ;
2195
2196assign fcmpgt32_fx2[0] =
2197 (~rs1_fx2_b31 & rs2_fx2_b31 ) |
2198 ( rs1_fx2_b31 & rs2_fx2_b31 & gt32_fx2[0]) |
2199 (~rs1_fx2_b31 & ~rs2_fx2_b31 & gt32_fx2[0]) ;
2200
2201// ------------------------------------
2202// le16, le32
2203// ------------------------------------
2204
2205assign fcmple16_fx2[3] =
2206 ( rs1_fx2_b63 & ~rs2_fx2_b63 ) |
2207 ( rs1_fx2_b63 & rs2_fx2_b63 & fpf_b_gteq_a_fx2[3]) |
2208 (~rs1_fx2_b63 & ~rs2_fx2_b63 & fpf_b_gteq_a_fx2[3]) ;
2209
2210assign fcmple16_fx2[2] =
2211 ( rs1_fx2_b47 & ~rs2_fx2_b47 ) |
2212 ( rs1_fx2_b47 & rs2_fx2_b47 & fpf_b_gteq_a_fx2[2]) |
2213 (~rs1_fx2_b47 & ~rs2_fx2_b47 & fpf_b_gteq_a_fx2[2]) ;
2214
2215assign fcmple16_fx2[1] =
2216 ( rs1_fx2_b31 & ~rs2_fx2_b31 ) |
2217 ( rs1_fx2_b31 & rs2_fx2_b31 & fpf_b_gteq_a_fx2[1]) |
2218 (~rs1_fx2_b31 & ~rs2_fx2_b31 & fpf_b_gteq_a_fx2[1]) ;
2219
2220assign fcmple16_fx2[0] =
2221 ( rs1_fx2_b15 & ~rs2_fx2_b15 ) |
2222 ( rs1_fx2_b15 & rs2_fx2_b15 & fpf_b_gteq_a_fx2[0]) |
2223 (~rs1_fx2_b15 & ~rs2_fx2_b15 & fpf_b_gteq_a_fx2[0]) ;
2224
2225assign le32_fx2[1] =
2226 fpf_b_gteq_a_fx2[3] & (~fpf_b_eq_a_fx2[3] |
2227 (fpf_b_eq_a_fx2[3] & fpf_b_gteq_a_fx2[2]));
2228
2229assign le32_fx2[0] =
2230 fpf_b_gteq_a_fx2[1] & (~fpf_b_eq_a_fx2[1] |
2231 (fpf_b_eq_a_fx2[1] & fpf_b_gteq_a_fx2[0]));
2232
2233assign fcmple32_fx2[1] =
2234 ( rs1_fx2_b63 & ~rs2_fx2_b63 ) |
2235 ( rs1_fx2_b63 & rs2_fx2_b63 & le32_fx2[1]) |
2236 (~rs1_fx2_b63 & ~rs2_fx2_b63 & le32_fx2[1]) ;
2237
2238assign fcmple32_fx2[0] =
2239 ( rs1_fx2_b31 & ~rs2_fx2_b31 ) |
2240 ( rs1_fx2_b31 & rs2_fx2_b31 & le32_fx2[0]) |
2241 (~rs1_fx2_b31 & ~rs2_fx2_b31 & le32_fx2[0]) ;
2242
2243// ------------------------------------
2244// eq16, eq32
2245// ------------------------------------
2246
2247assign fcmpeq16_fx2[3] = fpf_b_eq_a_fx2[3] &
2248 (rs1_fx2_b63 == rs2_fx2_b63);
2249assign fcmpeq16_fx2[2] = fpf_b_eq_a_fx2[2];
2250assign fcmpeq16_fx2[1] = fpf_b_eq_a_fx2[1];
2251assign fcmpeq16_fx2[0] = fpf_b_eq_a_fx2[0];
2252
2253assign fcmpeq32_fx2[1] = fpf_b_eq_a_fx2[3] & fpf_b_eq_a_fx2[2] &
2254 (rs1_fx2_b63 == rs2_fx2_b63);
2255assign fcmpeq32_fx2[0] = fpf_b_eq_a_fx2[1] & fpf_b_eq_a_fx2[0];
2256
2257// ------------------------------------
2258// ne16, ne32
2259// ------------------------------------
2260
2261assign fcmpne16_fx2[3] = ~fcmpeq16_fx2[3];
2262assign fcmpne16_fx2[2] = ~fcmpeq16_fx2[2];
2263assign fcmpne16_fx2[1] = ~fcmpeq16_fx2[1];
2264assign fcmpne16_fx2[0] = ~fcmpeq16_fx2[0];
2265
2266assign fcmpne32_fx2[1] = ~fcmpeq32_fx2[1];
2267assign fcmpne32_fx2[0] = ~fcmpeq32_fx2[0];
2268
2269// ------------------------------------
2270// mux vis compre results
2271// ------------------------------------
2272
2273assign fcmpgt16_sel_fx2 = (fac_opf_fx2[3:1] == 3'b100);
2274assign fcmpgt32_sel_fx2 = (fac_opf_fx2[3:1] == 3'b110);
2275assign fcmple16_sel_fx2 = (fac_opf_fx2[3:1] == 3'b000);
2276assign fcmple32_sel_fx2 = (fac_opf_fx2[3:1] == 3'b010);
2277assign fcmpne16_sel_fx2 = (fac_opf_fx2[3:1] == 3'b001);
2278assign fcmpne32_sel_fx2 = (fac_opf_fx2[3:1] == 3'b011);
2279assign fcmpeq16_sel_fx2 = (fac_opf_fx2[3:1] == 3'b101);
2280assign fcmpeq32_sel_fx2 = (fac_opf_fx2[3:1] == 3'b111);
2281
2282assign vis_cmp_result_fx2[3:0] =
2283 ({4{fcmpgt16_sel_fx2}} & fcmpgt16_fx2[3:0] ) |
2284 ({4{fcmpgt32_sel_fx2}} & {2'b0, fcmpgt32_fx2[1:0]}) |
2285 ({4{fcmple16_sel_fx2}} & fcmple16_fx2[3:0] ) |
2286 ({4{fcmple32_sel_fx2}} & {2'b0, fcmple32_fx2[1:0]}) |
2287 ({4{fcmpne16_sel_fx2}} & fcmpne16_fx2[3:0] ) |
2288 ({4{fcmpne32_sel_fx2}} & {2'b0, fcmpne32_fx2[1:0]}) |
2289 ({4{fcmpeq16_sel_fx2}} & fcmpeq16_fx2[3:0] ) |
2290 ({4{fcmpeq32_sel_fx2}} & {2'b0, fcmpeq32_fx2[1:0]}) ;
2291
2292// ------------------------------------
2293// Detect infinity result, NaN result,
2294// zero source, denorm source,
2295// unfinished_FPop due to denorm source
2296// - given from exp: AZE, BZE, AOE, BOE
2297// - given from mant: AZF, BZF
2298// ------------------------------------
2299
2300assign a_zero_fx2 = (aze_fx2 & azf_fx2 & fp_dual_source_fx2 ) |
2301 (aze_fx2 & fp_dual_source_fx2 & ns_mode_fx2 ) ;
2302assign a_denorm_fx2 = (aze_fx2 & ~azf_fx2 & fp_dual_source_fx2 & ~ns_mode_fx2 ) ;
2303assign a_inf_fx2 = (aoe_fx2 & azf_fx2 & fp_dual_source_fx2 ) ;
2304assign a_nan_fx2 = (aoe_fx2 & ~azf_fx2 & fp_dual_source_fx2 ) ;
2305assign a_snan_fx2 = (aoe_fx2 & ~azf_fx2 & fp_dual_source_fx2 & ~rs1_fmt_fx2[62]) ;
2306
2307assign b_zero_fx2 = (bze_fx2 & bzf_fx2 & fp_source_fx2 ) |
2308 (bze_fx2 & fp_source_fx2 & ns_mode_fx2 ) ;
2309assign b_denorm_fx2 = (bze_fx2 & ~bzf_fx2 & fp_source_fx2 & ~ns_mode_fx2 ) ;
2310assign b_inf_fx2 = (boe_fx2 & bzf_fx2 & fp_source_fx2 ) ;
2311assign b_nan_fx2 = (boe_fx2 & ~bzf_fx2 & fp_source_fx2 ) ;
2312assign b_snan_fx2 = (boe_fx2 & ~bzf_fx2 & fp_source_fx2 & ~rs2_fmt_fx2[62]) ;
2313assign b_qnan_fx2 = (boe_fx2 & fp_source_fx2 & rs2_fmt_fx2[62]) ;
2314
2315// ------------------------------------
2316// Detect "unfinished source"
2317// - unfin_src will set unfinished_FPop if ~ns_mode and ~guf
2318// - unfin_src will set inexact flag if ~unfinished_FPop, independent of ns_mode
2319// ------------------------------------
2320
2321assign unfin_src_fx2 =
2322
2323 ( (itype_fx2[2:0] == 3'b000) & // FSUB(s,d),FADD(s,d)
2324 (dtype_fx2[2:1] == 2'b00 ) &
2325 ( (a_denorm_fx2 | b_denorm_fx2) &
2326 ~(a_inf_fx2 | b_inf_fx2 | // not unifn if denrom +/- nan or inf
2327 a_nan_fx2 | b_nan_fx2 ) )) |
2328
2329 ( (itype_fx2[2:0] == 3'b000) & // FSUB(s,d),FADD(s,d)
2330 (dtype_fx2[2:1] == 2'b00 ) &
2331 ~(a_inf_fx2 | b_inf_fx2 | // not inexact if rs1/rs2 is nan or inf
2332 a_nan_fx2 | b_nan_fx2 ) &
2333 ((aze_fx2 & ~azf_fx2 & ns_mode_fx2) |
2334 (bze_fx2 & ~bzf_fx2 & ns_mode_fx2) )) | // denorm rs1/rs2 in ns_mode may set inexact
2335
2336 ( ((itype_fx2[2:0] == 3'b010) | // fpint
2337 (itype_fx2[2:0] == 3'b001) ) & // fpfp
2338 ~fdtos_guf_detect_fx2 &
2339 b_denorm_fx2 ) |
2340
2341 ( ((itype_fx2[2:0] == 3'b010) | // fpint
2342 (itype_fx2[2:0] == 3'b001) ) & // fpfp
2343 ( bze_fx2 & ~bzf_fx2 & ns_mode_fx2) ) | // denorm rs2 in ns_mode sets inexact
2344
2345 ( (itype_fx2[2:0] == 3'b101) & // f(s)mul
2346 (dtype_fx2[2:1] == 2'b00 ) &
2347 ~fmul_guf_detect_fx2 &
2348 ( (a_denorm_fx2 | b_denorm_fx2) &
2349 ~(a_inf_fx2 | b_inf_fx2 | // not unifn if denrom * nan or inf or zero
2350 a_nan_fx2 | b_nan_fx2 |
2351 a_zero_fx2 | b_zero_fx2 ) )) |
2352
2353 ( (itype_fx2[2:0] == 3'b101) & // f(s)mul
2354 (dtype_fx2[2:1] == 2'b00 ) &
2355 ~(a_inf_fx2 | b_inf_fx2 | // not inexact if rs1/rs2 is zero, nan, or inf
2356 a_nan_fx2 | b_nan_fx2 |
2357 (aze_fx2 & azf_fx2) |
2358 (bze_fx2 & bzf_fx2) ) &
2359 ((aze_fx2 & ~azf_fx2 & ns_mode_fx2) |
2360 (bze_fx2 & ~bzf_fx2 & ns_mode_fx2) )) | // denorm rs1/rs2 in ns_mode may set inexact
2361
2362 ( (itype_fx2[2:0] == 3'b110) & // fdiv
2363 (dtype_fx2[2:1] == 2'b00 ) &
2364 ~fdiv_guf_detect_fx2 &
2365 ~(fdiv_ovf_detect_fx2 |
2366 fdiv_ovf_predict_fx2 ) & // not fdiv overflow
2367 ( (a_denorm_fx2 | b_denorm_fx2) &
2368 ~(a_inf_fx2 | b_inf_fx2 | // not unifn if nan, inf or zero src
2369 a_nan_fx2 | b_nan_fx2 |
2370 a_zero_fx2 | b_zero_fx2 ) )) |
2371
2372 ( (itype_fx2[2:0] == 3'b110) & // fdiv
2373 (dtype_fx2[2:1] == 2'b00 ) &
2374 ~(b_zero_fx2 | b_nan_fx2 | b_inf_fx2) & // not inexact if rs2 is zero, denorm, nan, or inf
2375 (aze_fx2 & ~azf_fx2 & ns_mode_fx2)) | // denorm rs1 in ns_mode may set inexact
2376
2377 ( (itype_fx2[2:0] == 3'b111) & // fsqrt
2378 ((b_denorm_fx2 & ~rs2_sign_fx2) | // +denorm may signal unfin
2379 (bze_fx2 & ~bzf_fx2 & ns_mode_fx2))); // +/-denorm in ns_mode must set inexact
2380
2381// 0in bits_on -max 1 -var {(unfin_src_fx2 | zero_src_result_fx2), inf_src_result_fx2, inf_maxint_result_fx2, nan_maxint_result_fx2, nan_default_result_fx2, fmul_den2nor_m2_predict_fx2, fdiv_den2nor_m1_predict_fx2} -active dec_valid_fx2
2382
2383assign inf_src_result_fx2 =
2384
2385 ( ((itype_fx2[2:0] == 3'b000) | // add/sub
2386 (itype_fx2[2:0] == 3'b001) ) & // fpfp
2387 (a_inf_fx2 | b_inf_fx2 ) &
2388 ~(a_inf_fx2 & b_inf_fx2 & logical_sub_fx2) & // inf - inf = nan (default)
2389 ~(a_nan_fx2 | b_nan_fx2 ) ) | // inf +/- nan = nan
2390
2391 ( (itype_fx2[2:0] == 3'b101) & // mul
2392 (a_inf_fx2 | b_inf_fx2 ) &
2393 ~(a_zero_fx2 | b_zero_fx2 ) & // inf * 0 = nan (default)
2394 ~(a_nan_fx2 | b_nan_fx2 ) ) | // inf * nan = nan
2395
2396 ( (itype_fx2[2:0] == 3'b110) & // div
2397 (a_inf_fx2 ) & // inf / b = inf
2398 ~( b_inf_fx2 ) & // inf / inf = nan (default)
2399 ~( b_nan_fx2 ) ) | // inf / nan = nan
2400
2401 ( (itype_fx2[2:0] == 3'b110) & // div
2402 ( b_zero_fx2 ) & // a / 0 = inf
2403 ~(a_zero_fx2 ) & // 0 / 0 = nan (default)
2404 ~(a_nan_fx2 ) ) | // nan / 0 = nan
2405
2406 ( (itype_fx2[2:0] == 3'b111) & // sqrt
2407 ( b_inf_fx2 ) &
2408 ~( rs2_sign_fx2 ) ) ; // sqrt -inf = nan (default)
2409
2410assign zero_src_result_fx2 =
2411
2412 ( (itype_fx2[2:0] == 3'b011) & // FxTO(s,d)
2413 (stype_fx2[1:0] == 2'b11 ) &
2414 (bze_fx2 & bzf_fx2 & ~rs2_fx2_b63 ) ) | //
2415
2416 ( (itype_fx2[2:0] == 3'b011) & // FiTO(s,d)
2417 (stype_fx2[1:0] == 2'b10 ) &
2418 (fic_bzf32lsb_fx2 ) ) | //
2419
2420 ( (itype_fx2[2:0] == 3'b110) & // div
2421 ( b_inf_fx2 ) & // a / inf = 0
2422 ~(a_inf_fx2 ) & // inf / inf = nan (default)
2423 ~(a_nan_fx2 ) ) | // nan / inf = nan
2424
2425 ( (itype_fx2[2:0] == 3'b110) & // div
2426 (a_zero_fx2 ) & // 0 / b = 0
2427 ~( b_zero_fx2 ) & // 0 / 0 = nan (default)
2428 ~( b_nan_fx2 ) ) | // 0 / nan = nan
2429
2430 ( (itype_fx2[2:0] == 3'b110) & // div
2431 (a_denorm_fx2 | b_denorm_fx2 ) & //
2432 ~(a_nan_fx2 | b_nan_fx2 ) & // den / nan = nan
2433 ~(a_inf_fx2 ) & // inf / den = inf
2434 ~( b_zero_fx2 ) & // den / 0 = inf
2435 ~(fdiv_ovf_detect_fx2 |
2436 fdiv_ovf_predict_fx2 ) ) | // not fdiv overflow
2437
2438 ( (itype_fx2[2:0] == 3'b101) & // mul
2439 (a_zero_fx2 | b_zero_fx2 ) & //
2440 ~(a_nan_fx2 | b_nan_fx2 ) & // 0 * nan = nan
2441 ~(a_inf_fx2 | b_inf_fx2 ) ) | // 0 * inf = nan (default)
2442
2443 ( (itype_fx2[2:0] == 3'b101) & // mul
2444 (a_denorm_fx2 | b_denorm_fx2 ) & //
2445 ~(a_nan_fx2 | b_nan_fx2 ) & // den * nan = nan
2446 ~(a_inf_fx2 | b_inf_fx2 ) ) | // den * inf = inf
2447
2448 ( (itype_fx2[2:0] == 3'b111) & // sqrt
2449 ( b_zero_fx2 ) ) |
2450
2451 ( (itype_fx2[2:0] == 3'b111) & // sqrt
2452 ( b_denorm_fx2 & ~rs2_sign_fx2) ) ;
2453
2454assign inf_maxint_result_fx2 =
2455 (itype_fx2[2:0] == 3'b011) & // fpint
2456 (b_inf_fx2 ) ; // rs2 = inf
2457
2458assign nan_maxint_result_fx2 =
2459 (itype_fx2[2:0] == 3'b011) & // fpint
2460 (b_nan_fx2 ) ; // rs2 = nan
2461
2462assign nan_default_result_fx2 =
2463
2464 ( (itype_fx2[2:0] == 3'b000) & // add/sub
2465 (a_inf_fx2 & b_inf_fx2 & logical_sub_fx2) ) | // inf - inf = nan (default)
2466
2467 ( (itype_fx2[2:0] == 3'b101) & // mul
2468 (a_inf_fx2 | b_inf_fx2 ) &
2469 (a_zero_fx2 | b_zero_fx2 ) ) | // inf * 0 = nan (default)
2470
2471 ( (itype_fx2[2:0] == 3'b110) & // div
2472 ((a_inf_fx2 & b_inf_fx2 ) | // inf / inf = nan (default)
2473 (a_zero_fx2 & b_zero_fx2) ) ) | // 0 / 0 = nan (default)
2474
2475 ( (itype_fx2[2:0] == 3'b111) & // sqrt
2476 (~b_nan_fx2 & ~b_zero_fx2 & rs2_sign_fx2 ) ) ; // sqrt -src = nan (default)
2477
2478assign nan_rs1prop_fx2 =
2479 (a_nan_fx2 & ~b_nan_fx2 ) | // rs1 = nan, rs2 != nan
2480 (a_snan_fx2 & ~b_snan_fx2) ; // rs1 = snan, rs2 != snan
2481
2482assign nan_rs2prop_fx2 =
2483 (b_snan_fx2 ) | // rs2 = snan
2484 (b_qnan_fx2 & ~a_snan_fx2) ; // rs2 = qnan, rs1 != snan
2485
2486// ------------------------------------
2487// floating point exception fields {cexc}
2488// ------------------------------------
2489
2490assign fpx_dzc_fx2 =
2491 fpx_dz_vld_fx2 &
2492 b_zero_fx2 &
2493 ~a_zero_fx2 &
2494 ~a_nan_fx2 &
2495 ~a_inf_fx2 ;
2496
2497assign i_fxp_nvc_fx2 =
2498 fcmp_nvc_fx2 |
2499 (fpx_nv_vld_fx2 &
2500 (a_snan_fx2 |
2501 b_snan_fx2 |
2502 nan_default_result_fx2));
2503
2504// ------------------------------------
2505// Exception trap prediction
2506// ------------------------------------
2507
2508assign local_predict_fx2 =
2509 dec_valid_fx2 &
2510 (i_predict_fx2 | fmul_denorm_detect_fx2 | q_fmul_unf_predict_fx2 | fadd_fcvt_denorm_detect_fx2) &
2511 ~dec_flush_fx2 ;
2512
2513assign fgu_predict_fx2 = local_predict_fx2;
2514
2515// Note: needs 0-In fix again? V2.1c fails vector FAIL_0in.tvo.
2516// zeroin assert_leader -leader local_predict_fx2 -follower ((fgu_fpx_ieee_trap_fw | fgu_fpx_unfin_fw) & $0in_delay((~(itype_fx5[2:1]==2'b11)),2)) -min 4 -max 4 -message "FP exception trap (non-FPD) w/out prediction"
2517
2518// 0in assert -var $0in_delay(local_predict_fx2,5) -active ($0in_delay((~(itype_fx5[2:1]==2'b11)),2) & (fgu_fpx_ieee_trap_fw | fgu_fpx_unfin_fw)) -message "FP exception trap (non-FPD) w/out prediction"
2519
2520// 0in assert -var $0in_delay((~local_predict_fx2),5) -active ($0in_delay((itype_fx5[2:1]==2'b11),2) & (fgu_fpx_ieee_trap_fw | fgu_fpx_unfin_fw | fgu_fpd_ieee_trap_fw | fgu_fpd_unfin_fw | fgu_fpd_idiv0_trap_fw)) -message "IDIV/FDIV/FSQRT exception trap w/ prediction"
2521
2522// ------------------------------------
2523// Determine if the mantissa must quiet the
2524// propagating NaN (set frac MSB=1)
2525// ------------------------------------
2526
2527assign qthenan_fx2 = a_nan_fx2 | b_nan_fx2;
2528
2529// ------------------------------------
2530// Round mode calculation
2531// - must force round mode to truncate if nan, otherwise
2532// a propagating nan may attempt to round
2533// ------------------------------------
2534
2535assign rm_near_dp_fx2 =
2536 (dtype_fx2[2:0] == 3'b001 ) & // dp
2537 ~(a_nan_fx2 | b_nan_fx2 ) & // ~nan
2538 ~(a_zero_fx2 | b_zero_fx2 ) & // ~zero
2539 ~(a_denorm_fx2 | b_denorm_fx2) & // ~denorm
2540 (rd_mode_fx2[1:0] == 2'b00 ) ; // nearest
2541
2542assign rm_directed_dp_fx2 =
2543 (dtype_fx2[2:0] == 3'b001 ) & // dp
2544 ~(a_nan_fx2 | b_nan_fx2 ) & // ~nan
2545 ~(a_zero_fx2 | b_zero_fx2 ) & // ~zero
2546 ~(a_denorm_fx2 | b_denorm_fx2) & // ~denorm
2547 (((rd_mode_fx2[1:0] == 2'b10) & ~sign_inter_fx2) | // +inf
2548 ((rd_mode_fx2[1:0] == 2'b11) & sign_inter_fx2) ); // -inf
2549
2550assign rm_near_sp_fx2 =
2551 (dtype_fx2[2:0] == 3'b000 ) & // sp
2552 ~(a_nan_fx2 | b_nan_fx2 ) & // ~nan
2553 ~(a_zero_fx2 | b_zero_fx2 ) & // ~zero
2554 ~(a_denorm_fx2 | b_denorm_fx2) & // ~denorm
2555 (rd_mode_fx2[1:0] == 2'b00 ) ; // nearest
2556
2557assign rm_directed_sp_fx2 =
2558 (dtype_fx2[2:0] == 3'b000 ) & // sp
2559 ~(a_nan_fx2 | b_nan_fx2 ) & // ~nan
2560 ~(a_zero_fx2 | b_zero_fx2 ) & // ~zero
2561 ~(a_denorm_fx2 | b_denorm_fx2) & // ~denorm
2562 (((rd_mode_fx2[1:0] == 2'b10) & ~sign_inter_fx2) | // +inf
2563 ((rd_mode_fx2[1:0] == 2'b11) & sign_inter_fx2) ); // -inf
2564
2565// ------------------------------------
2566// Detect if denorm fmul/fdiv intermediate
2567// result may round to norm
2568// ------------------------------------
2569
2570assign fdiv_aof_bzf_fx2 =
2571 ((dtype_fx2[2:0] == 3'b000) &
2572 (hi_aof_fx2 & bzf_fx2 ) ) | // sp
2573 ((dtype_fx2[2:0] == 3'b001) &
2574 (hi_aof_fx2 & lo_aof_fx2 & bzf_fx2)) ; // dp
2575
2576assign fmul_den2nor_m2_predict_fx2 =
2577 (aux_eint_eminm2_fx2 ) & // FMUL Eint=Emin-2
2578 ~(aoe_fx2 ) & // Ea != (nan | inf)
2579 ~(boe_fx2 ) & // Eb != (nan | inf)
2580 ~(aze_fx2 ) & // Ea != (zero| den)
2581 ~(bze_fx2 ) & // Eb != (zero| den)
2582 (itype_fx2[2:0] == 3'b101) & // fmul
2583 (dtype_fx2[2:1] == 2'b00 ) ;
2584
2585assign fdiv_den2nor_m1_predict_fx2 =
2586 (aux_eint_eminm1_fx2 ) & // FDIV Eint=Emin-1
2587 (fdiv_aof_bzf_fx2 ) & // FDIV ones frac / zero frac
2588 (aux_enable_unf_fx2 ) & // ensure underflow, not overflow
2589 ~(aoe_fx2 ) & // Ea != (nan | inf)
2590 ~(boe_fx2 ) & // Eb != (nan | inf)
2591 ~(aze_fx2 ) & // Ea != (zero| den)
2592 ~(bze_fx2 ) & // Eb != (zero| den)
2593 (itype_fx2[2:0] == 3'b110) ; // div
2594
2595assign fdiv_den2nor_sp_fx2 =
2596 (fdiv_den2nor_m1_predict_fx2 & rm_near_sp_fx2 ) |
2597 (fdiv_den2nor_m1_predict_fx2 & rm_directed_sp_fx2) ;
2598
2599assign fdiv_den2nor_dp_fx2 =
2600 (fdiv_den2nor_m1_predict_fx2 & rm_near_dp_fx2 ) |
2601 (fdiv_den2nor_m1_predict_fx2 & rm_directed_dp_fx2) ;
2602
2603// ------------------------------------
2604// Force zero into Mle/Mse for zero/denorm source, or nan propagation
2605// set m{l,s}e_{zeros,ones}
2606// Note: (1) a non-fp source will always have a non-zero (1'b1) exponent
2607// (2) a propagating NaN will enter the aligner (as Mse) only if
2608// Ea=Eb=b'111...111', in which case SC=0.
2609// (3) if rs1=rs2=NaN, the only case in which rs1 is chosen for the
2610// propagating NaN (and not rs2) is if rs1=SNaN and rs2=QNaN.
2611// See SPARC V9 manual section B.2.
2612// ------------------------------------
2613
2614assign mse_zeros_fx2 =
2615 (bze_fx2 & fp_source_fx2 & ~logical_sub_fx2 & fpf_cmp_swap_blta_fx2) |
2616 (aze_fx2 & fp_dual_source_fx2 & ~logical_sub_fx2 & ~fpf_cmp_swap_blta_fx2) |
2617 (nan_rs2prop_fx2 & ~logical_sub_fx2 & ~fpf_cmp_swap_blta_fx2) |
2618 (nan_rs1prop_fx2 & ~logical_sub_fx2 & fpf_cmp_swap_blta_fx2) ;
2619
2620assign mse_ones_fx2 =
2621 (bze_fx2 & fp_source_fx2 & logical_sub_fx2 & fpf_cmp_swap_blta_fx2) |
2622 (aze_fx2 & fp_dual_source_fx2 & logical_sub_fx2 & ~fpf_cmp_swap_blta_fx2) |
2623 (nan_rs2prop_fx2 & logical_sub_fx2 & ~fpf_cmp_swap_blta_fx2) |
2624 (nan_rs1prop_fx2 & logical_sub_fx2 & fpf_cmp_swap_blta_fx2) ;
2625
2626assign mle_zeros_fx2 =
2627 (bze_fx2 & fp_source_fx2 & ~fpf_cmp_swap_blta_fx2) |
2628 (aze_fx2 & fp_dual_source_fx2 & fpf_cmp_swap_blta_fx2) |
2629 (nan_rs2prop_fx2 & fpf_cmp_swap_blta_fx2) |
2630 (nan_rs1prop_fx2 & ~fpf_cmp_swap_blta_fx2) ;
2631
2632// ------------------------------------
2633// Mle/Mse format mux selects
2634// - logical subtract (fp,vis)
2635// - massive alignment shift
2636// (entire mantissa shifted past G bit, actually we use past R bit due to 0.1X case)
2637// - NaN,zero handling
2638// - MULScc and Y[0]=0
2639// - SP/DP pad LSBs to prop. main adder cin
2640//
2641// Massive alignment shift detection is also used by align sticky calculation
2642// to force align sticky to one. However, if exp is zero then align sticky will
2643// not be one. If either exp is zero we know a zero mantissa proceeds thru aligner,
2644// and align sticky will not be one.
2645//
2646// Detect when the alignment sticky bit will be zero due to zero/denorm or nan
2647// source (even though a massive alignment shift may occur). Inf source is
2648// a don't care.
2649// ------------------------------------
2650
2651assign mass_align_fx2 =
2652 (~(itype_fx2[2:0] == 3'b011) & // ~intfp
2653 (dtype_fx2[2:0] == 3'b000) & (fpe_align_sel_fx2[10:0] > 11'd25)) | // sp
2654 (~(itype_fx2[2:0] == 3'b011) & // ~intfp
2655 (dtype_fx2[2:0] == 3'b001) & (fpe_align_sel_fx2[10:0] > 11'd54)) ; // dp
2656
2657assign mass_align_sticky_fx2 =
2658 mass_align_fx2 &
2659 ~(itype_fx2[2:0] == 3'b001) & // ~fpfp
2660 ~(aze_fx2 | bze_fx2 |
2661 aoe_fx2 | boe_fx2 );
2662
2663assign fpc_fadd_eac_enable_fx2 =
2664 fadd_logical_add_fx2 | // required for proper sticky bit calculation
2665 (fadd_logical_sub_fx2 &
2666 ~(mass_align_fx2 & mass_align_sticky_fx2)); // 0in custom -fire (fadd_logical_sub_fx4 & ~fpf_ma_cout_fx4 & ~(a_nan_fx4 | b_nan_fx4) & ~fac_fgx_instr_fx4 & (|w1_vld_fx4[1:0]))
2667
2668assign fpc_mse_sel_fx2[0] = // force Mse to zero
2669 mse_zeros_fx2 | // zero/denorm source or nan propagation
2670 (mulscc_fx2 & ~mulscc_y_src_fx2_b0) | // MULScc and Y[0]=0
2671 (~logical_sub_fx2 & mass_align_fx2) ; // add massive align shift
2672
2673assign fpc_mse_sel_fx2[1] = // force Mse to one
2674 mse_ones_fx2 | // zero/denorm source or nan propagation
2675 ( logical_sub_fx2 & mass_align_fx2) ; // sub massive align shift
2676
2677assign fpc_mse_sel_fx2[2] = // pass inv aligner data thru
2678 logical_sub_fx2 & // logical subtract
2679 ~(itype_fx2[2:0] == 3'b011) & // ~intfp
2680 ~(a_nan_fx2 | b_nan_fx2); // ~NaN
2681
2682assign fpc_mle_sel_fx2 = // force Mle to zero
2683 mle_zeros_fx2; // zero/denorm source or nan propagation
2684
2685// ------------------------------------
2686// Main adder control
2687//
2688// For FADD/FSUB:
2689// EAC = logical_subtract & cout & ~align_sticky
2690// because a full exp and frac compare is performed, cout=1 if logical_subtract
2691// ------------------------------------
2692
2693assign fpc_fp_cin00_fx2 =
2694 (fadd_logical_sub_fx2 & (a_nan_fx2 | b_nan_fx2)) | // FADD/FSUB logical_sub with nan propagation
2695 (fadd_logical_sub_fx2 & (aze_fx2 | bze_fx2 )) | // FADD/FSUB logical_sub with zero source
2696 (logical_sub_fx2 &
2697 ~((itype_fx2[2:0] == 3'b000) & (dtype_fx2[2:1] == 2'b00 ))); // ~FADD/FSUB
2698
2699assign fpc_cin00_fx2 =
2700 logical_sub_fx2 &
2701 ~((itype_fx2[2:0] == 3'b010) & (dtype_fx2[2:0] == 3'b011)); // ~F(s,d)TOi
2702
2703assign fpc_cin16_48_fx2 = logical_sub_fx2 & (dtype_fx2[2:0] == 3'b010); // 16b sub
2704assign fpc_cin32_fx2 = logical_sub_fx2 & (dtype_fx2[2:1] == 2'b01 ); // 16/32b dest, incl. F(s,d)TOi
2705
2706assign fpc_prop16_48_fx2 = ~(dtype_fx2[2:0] == 3'b010); // ~16b operation
2707assign fpc_prop32_fx2 = ~(dtype_fx2[2:1] == 2'b01 ); // ~16/32b operation
2708
2709// ------------------------------------
2710// FCMP(E) invalid detection
2711// ------------------------------------
2712
2713assign fcmp_nvc_fx2 =
2714 ((a_snan_fx2 | b_snan_fx2) &
2715 (itype_fx2[2:0] == 3'b100) & (dtype_fx2[2:1] == 2'b00 ) & ~fcmpe_fx2) | // FCMP(s,d)
2716 ((a_nan_fx2 | b_nan_fx2 ) &
2717 (itype_fx2[2:0] == 3'b100) & (dtype_fx2[2:1] == 2'b00 ) & fcmpe_fx2) ; // FCMPE(s,d)
2718
2719assign int_res_sel_fx2[1] = saverestore_fx2 & dec_valid_fx2; // pwr mgmt: aomux free zeros
2720assign int_res_sel_fx2[2] = mulscc_fx2 & dec_valid_fx2; // pwr mgmt: aomux free zeros
2721assign int_res_sel_fx2[3] = fac_fgx_popc_fx2 & dec_valid_fx2; // pwr mgmt: aomux free zeros
2722
2723 // pwr mgmt: aomux free zeros
2724assign int_res_sel_fx2[4] = // vis cmp
2725 (itype_fx2[2:0] == 3'b100) & // cmp
2726 (dtype_fx2[2:1] == 2'b01 ) & // 16bit or 32bit
2727 dec_valid_fx2 ;
2728
2729 // pwr mgmt: aomux free zeros
2730assign int_res_sel_fx2[5] = // imul
2731 (itype_fx2[2:0] == 3'b101) & // mul
2732 dec_valid_fx2 &
2733 exu_src_fx2 ;
2734
2735assign i_pre_div_flush_fx2 =
2736 dec_flush_fx2 |
2737 (fec_uecc_fx2 | fec_cecc_fx2) |
2738 exu_flush_fx2 ;
2739
2740assign idiv0_trap_fx2 =
2741 i_idiv0_trap_fx2 &
2742 ~dec_flush_fx2 &
2743 ~exu_flush_fx2 ;
2744
2745assign fpc_pre_div_flush_fx2 =
2746 idiv0_trap_fx2 |
2747 ((itype_fx2[2:1] == 2'b11) &
2748 dec_valid_fx2 &
2749 i_pre_div_flush_fx2 ) |
2750 ((itype_fx2[2:1] == 2'b11) & // fdiv/fsqrt qualified unfin_src
2751 dec_valid_fx2 &
2752 fpx_unfin_vld_fx2 &
2753 unfin_src_fx2 &
2754 ~ns_mode_fx2 ) |
2755 ((itype_fx2[2:1] == 2'b11) & // fdiv/fsqrt qualified unfin_early
2756 dec_valid_fx2 &
2757 fpx_unfin_vld_fx2 &
2758 fdiv_unf_detect_fx2 &
2759 ~fdiv_guf_detect_fx2 &
2760 ~fdiv_den2nor_sp_fx2 &
2761 ~fdiv_den2nor_dp_fx2 &
2762 ~ns_mode_fx2 ) ;
2763
2764assign fpc_div_default_res_fx2 =
2765 (itype_fx2[2:1] == 2'b11) &
2766 dec_valid_fx2 &
2767 ~i_pre_div_flush_fx2 &
2768 ((fp_source_fx2 &
2769 (inf_src_result_fx2 |
2770 nan_default_result_fx2 | zero_src_result_fx2 |
2771 nan_rs1prop_fx2 | nan_rs2prop_fx2 |
2772 fdiv_ovf_detect_fx2 | fdiv_unf_detect_fx2 |
2773 fdiv_guf_detect_fx2 )) | idiv0_trap_fx2);
2774
2775assign aboe_fx2 = (aoe_fx2 & fp_dual_source_fx2) | boe_fx2;
2776assign abze_fx2 = (aze_fx2 & fp_dual_source_fx2) | bze_fx2;
2777
2778// ------------------------------------
2779// GSR.mask flop selects/enables
2780// ------------------------------------
2781
2782assign gsr0_mask_sel_fx2[0] =
2783 (( tid_fx2[2:0] == 3'd0) & gsr_w_vld_fx2[0] ) ;
2784
2785assign gsr1_mask_sel_fx2[0] =
2786 (( tid_fx2[2:0] == 3'd1) & gsr_w_vld_fx2[0] ) ;
2787
2788assign gsr2_mask_sel_fx2[0] =
2789 (( tid_fx2[2:0] == 3'd2) & gsr_w_vld_fx2[0] ) ;
2790
2791assign gsr3_mask_sel_fx2[0] =
2792 (( tid_fx2[2:0] == 3'd3) & gsr_w_vld_fx2[0] ) ;
2793
2794assign gsr4_mask_sel_fx2[0] =
2795 (( tid_fx2[2:0] == 3'd4) & gsr_w_vld_fx2[0] ) ;
2796
2797assign gsr5_mask_sel_fx2[0] =
2798 (( tid_fx2[2:0] == 3'd5) & gsr_w_vld_fx2[0] ) ;
2799
2800assign gsr6_mask_sel_fx2[0] =
2801 (( tid_fx2[2:0] == 3'd6) & gsr_w_vld_fx2[0] ) ;
2802
2803assign gsr7_mask_sel_fx2[0] =
2804 (( tid_fx2[2:0] == 3'd7) & gsr_w_vld_fx2[0] ) ;
2805
2806assign gsr0_mask_sel_fx2[1] =
2807 ((fac_gsr_asr_tid_fx2[2:0] == 3'd0) & fac_rng_wr_gsr_3f) |
2808 (( tid_fx2[2:0] == 3'd0) & gsr_w_vld_fx2[0] ) ;
2809
2810assign gsr1_mask_sel_fx2[1] =
2811 ((fac_gsr_asr_tid_fx2[2:0] == 3'd1) & fac_rng_wr_gsr_3f) |
2812 (( tid_fx2[2:0] == 3'd1) & gsr_w_vld_fx2[0] ) ;
2813
2814assign gsr2_mask_sel_fx2[1] =
2815 ((fac_gsr_asr_tid_fx2[2:0] == 3'd2) & fac_rng_wr_gsr_3f) |
2816 (( tid_fx2[2:0] == 3'd2) & gsr_w_vld_fx2[0] ) ;
2817
2818assign gsr3_mask_sel_fx2[1] =
2819 ((fac_gsr_asr_tid_fx2[2:0] == 3'd3) & fac_rng_wr_gsr_3f) |
2820 (( tid_fx2[2:0] == 3'd3) & gsr_w_vld_fx2[0] ) ;
2821
2822assign gsr4_mask_sel_fx2[1] =
2823 ((fac_gsr_asr_tid_fx2[2:0] == 3'd4) & fac_rng_wr_gsr_3f) |
2824 (( tid_fx2[2:0] == 3'd4) & gsr_w_vld_fx2[0] ) ;
2825
2826assign gsr5_mask_sel_fx2[1] =
2827 ((fac_gsr_asr_tid_fx2[2:0] == 3'd5) & fac_rng_wr_gsr_3f) |
2828 (( tid_fx2[2:0] == 3'd5) & gsr_w_vld_fx2[0] ) ;
2829
2830assign gsr6_mask_sel_fx2[1] =
2831 ((fac_gsr_asr_tid_fx2[2:0] == 3'd6) & fac_rng_wr_gsr_3f) |
2832 (( tid_fx2[2:0] == 3'd6) & gsr_w_vld_fx2[0] ) ;
2833
2834assign gsr7_mask_sel_fx2[1] =
2835 ((fac_gsr_asr_tid_fx2[2:0] == 3'd7) & fac_rng_wr_gsr_3f) |
2836 (( tid_fx2[2:0] == 3'd7) & gsr_w_vld_fx2[0] ) ;
2837
2838assign sp_source_fx2 = (stype_fx2[1:0] == 2'b00);
2839
2840assign ecc_trap_fx2 = (fec_uecc_fx2 | fec_cecc_fx2);
2841
2842
2843// ----------------------------------------------------------------------------
2844// FX3 stage
2845// ----------------------------------------------------------------------------
2846
2847fgu_fpc_ctl_msff_ctl_macro__width_13 fx3_00 (
2848 .scan_in(fx3_00_scanin),
2849 .scan_out(fx3_00_scanout),
2850 .l1clk(l1clk_pm1),
2851 .din ({ w1_vld_fx2[1:0], itype_fx2[2:0], dtype_fx2[2:0], stype_fx2[1:0], tid_fx2[2:0]}),
2852 .dout({i_w1_vld_fx3[1:0], itype_fx3[2:0], dtype_fx3[2:0], stype_fx3[1:0], tid_fx3[2:0]}),
2853 .siclk(siclk),
2854 .soclk(soclk)
2855 );
2856
2857fgu_fpc_ctl_msff_ctl_macro__width_20 fx3_01 (
2858 .scan_in(fx3_01_scanin),
2859 .scan_out(fx3_01_scanout),
2860 .l1clk(l1clk_pm1),
2861 .din ({vis_cmp_result_fx2[3:0], int_res_sel_fx2[5:1], fpd_eint_fx2[10:0]}),
2862 .dout({vis_cmp_result_fx3[3:0], int_res_sel_fx3[5:1], fpd_eint_fx3[10:0]}),
2863 .siclk(siclk),
2864 .soclk(soclk)
2865 );
2866
2867fgu_fpc_ctl_msff_ctl_macro__width_13 fx3_02 (
2868 .scan_in(fx3_02_scanin),
2869 .scan_out(fx3_02_scanout),
2870 .l1clk(l1clk_pm1),
2871 .din ({rs1_fx2_b31, rs2_fx2_b31, rs2_exp_fx2[10:0]}),
2872 .dout({rs1_fx3_b31, rs2_fx3_b31, rs2_exp_fx3[10:0]}),
2873 .siclk(siclk),
2874 .soclk(soclk)
2875 );
2876
2877fgu_fpc_ctl_msff_ctl_macro__width_4 fx3_03 (
2878 .scan_in(fx3_03_scanin),
2879 .scan_out(fx3_03_scanout),
2880 .l1clk(l1clk_pm1),
2881 .din ({bzf_fx2,
2882 bze_fx2,
2883 a_nan_fx2,
2884 b_nan_fx2}),
2885 .dout({bzf_fx3,
2886 bze_fx3,
2887 a_nan_fx3,
2888 b_nan_fx3}),
2889 .siclk(siclk),
2890 .soclk(soclk)
2891 );
2892
2893fgu_fpc_ctl_msff_ctl_macro__width_5 fx3_04 (
2894 .scan_in(fx3_04_scanin),
2895 .scan_out(fx3_04_scanout),
2896 .l1clk(l1clk_pm1),
2897 .din (fsr_tem_fx2[4:0]),
2898 .dout(fsr_tem_fx3[4:0]),
2899 .siclk(siclk),
2900 .soclk(soclk)
2901 );
2902
2903fgu_fpc_ctl_msff_ctl_macro__width_10 fx3_05 (
2904 .scan_in(fx3_05_scanin),
2905 .scan_out(fx3_05_scanout),
2906 .l1clk(l1clk_pm1),
2907 .din ({inf_src_result_fx2,
2908 zero_src_result_fx2,
2909 inf_maxint_result_fx2,
2910 nan_maxint_result_fx2,
2911 nan_default_result_fx2,
2912 qthenan_fx2,
2913 fic_bzf31msb_fx2,
2914 fmul_den2nor_m2_predict_fx2,
2915 fdiv_den2nor_sp_fx2,
2916 fdiv_den2nor_dp_fx2}),
2917 .dout({inf_src_result_fx3,
2918 zero_src_result_fx3,
2919 inf_maxint_result_fx3,
2920 nan_maxint_result_fx3,
2921 nan_default_result_fx3,
2922 qthenan_fx3,
2923 bzf31msb_fx3,
2924 fmul_den2nor_m2_predict_fx3,
2925 fdiv_den2nor_sp_fx3,
2926 fdiv_den2nor_dp_fx3}),
2927 .siclk(siclk),
2928 .soclk(soclk)
2929 );
2930
2931fgu_fpc_ctl_msff_ctl_macro__width_28 fx3_06 (
2932 .scan_in(fx3_06_scanin),
2933 .scan_out(fx3_06_scanout),
2934 .l1clk(l1clk_pm1),
2935 .din ({idiv0_trap_fx2,
2936 dec_flush_f2,
2937 sign_inter_fx2,
2938 div_valid_fx2,
2939 divq_valid_fx2,
2940 logical_sub_fx2,
2941 fsr_w1_vld_fx2[1:0],
2942 w1_odd32b_fx2,
2943 mass_align_sticky_fx2,
2944 fadd_logical_sub_fx2,
2945 fac_fsr_store_fx2,
2946 fgx_siam_fx2,
2947 gsr_w_vld_fx2[1],
2948 fac_gsr_asr_tid_fx2[2:0],
2949 rd_mode_fx2[1:0],
2950 rm_near_sp_fx2,
2951 rm_near_dp_fx2,
2952 rm_directed_sp_fx2,
2953 rm_directed_dp_fx2,
2954 aboe_fx2,
2955 abze_fx2,
2956 sp_source_fx2,
2957 fpc_div_default_res_fx2,
2958 fgx_pdist_fx2}),
2959 .dout({i_idiv0_trap_fx3,
2960 dec_flush_fx3,
2961 sign_inter_fx3,
2962 div_valid_fx3,
2963 divq_valid_fx3,
2964 logical_sub_fx3,
2965 i_fsr_w1_vld_fx3[1:0],
2966 w1_odd32b_fx3,
2967 mass_align_sticky_fx3,
2968 fadd_logical_sub_fx3,
2969 fsr_store_fx3,
2970 i_fgx_siam_fx3,
2971 i_gsr_w_vld_fx3[1],
2972 gsr_asr_tid_fx3[2:0],
2973 fpc_rd_mode_fx3[1:0],
2974 rm_near_sp_fx3,
2975 rm_near_dp_fx3,
2976 rm_directed_sp_fx3,
2977 rm_directed_dp_fx3,
2978 aboe_fx3,
2979 abze_fx3,
2980 fpc_sp_source_fx3,
2981 div_default_res_fx3,
2982 fgx_pdist_fx3}),
2983 .siclk(siclk),
2984 .soclk(soclk)
2985 );
2986
2987fgu_fpc_ctl_msff_ctl_macro__width_18 fx3_07 (
2988 .scan_in(fx3_07_scanin),
2989 .scan_out(fx3_07_scanout),
2990 .l1clk(l1clk_pm1),
2991 .din ({fadd_ovf_predict_fx2,
2992 fdtos_ovf_predict_fx2,
2993 fdtos_ovf_detect_fx2,
2994 fmul_ovf_predict_fx2,
2995 fmul_ovf_detect_fx2,
2996 fdiv_ovf_predict_fx2,
2997 fdiv_ovf_detect_fx2,
2998 fdtos_unf_predict_fx2,
2999 fdtos_unf_detect_fx2,
3000 fmul_unf_predict_fx2,
3001 fmul_unf_detect_fx2,
3002 fdiv_unf_predict_fx2,
3003 fdiv_unf_detect_fx2,
3004 fic_bof22msb_fx2,
3005 fdtos_guf_detect_fx2,
3006 fmul_guf_detect_fx2,
3007 fdiv_guf_detect_fx2,
3008 unfin_src_fx2}),
3009 .dout({fadd_ovf_predict_fx3,
3010 fdtos_ovf_predict_fx3,
3011 fdtos_ovf_detect_fx3,
3012 fmul_ovf_predict_fx3,
3013 fmul_ovf_detect_fx3,
3014 fdiv_ovf_predict_fx3,
3015 fdiv_ovf_detect_fx3,
3016 fdtos_unf_predict_fx3,
3017 fdtos_unf_detect_fx3,
3018 fmul_unf_predict_fx3,
3019 fmul_unf_detect_fx3,
3020 fdiv_unf_predict_fx3,
3021 fdiv_unf_detect_fx3,
3022 bof22msb_fx3,
3023 fdtos_guf_detect_fx3,
3024 fmul_guf_detect_fx3,
3025 fdiv_guf_detect_fx3,
3026 unfin_src_fx3}),
3027 .siclk(siclk),
3028 .soclk(soclk)
3029 );
3030
3031fgu_fpc_ctl_msff_ctl_macro__width_16 fx3_08 (
3032 .scan_in(fx3_08_scanin),
3033 .scan_out(fx3_08_scanout),
3034 .l1clk(l1clk_pm1),
3035 .din ({gsr0_mask_sel_fx2[1:0],
3036 gsr1_mask_sel_fx2[1:0],
3037 gsr2_mask_sel_fx2[1:0],
3038 gsr3_mask_sel_fx2[1:0],
3039 gsr4_mask_sel_fx2[1:0],
3040 gsr5_mask_sel_fx2[1:0],
3041 gsr6_mask_sel_fx2[1:0],
3042 gsr7_mask_sel_fx2[1:0]}),
3043 .dout({gsr0_mask_sel_fx3[1:0],
3044 gsr1_mask_sel_fx3[1:0],
3045 gsr2_mask_sel_fx3[1:0],
3046 gsr3_mask_sel_fx3[1:0],
3047 gsr4_mask_sel_fx3[1:0],
3048 gsr5_mask_sel_fx3[1:0],
3049 gsr6_mask_sel_fx3[1:0],
3050 gsr7_mask_sel_fx3[1:0]}),
3051 .siclk(siclk),
3052 .soclk(soclk)
3053 );
3054
3055fgu_fpc_ctl_msff_ctl_macro__width_17 fx3_09 (
3056 .scan_in(fx3_09_scanin),
3057 .scan_out(fx3_09_scanout),
3058 .l1clk(l1clk_pm1),
3059 .din ({in_rngl_cdbus_1f[27:25],
3060 in_rngl_cdbus_1f[7:0],
3061 gsr_align_fx2[2:0],
3062 gsr_imirnd_fx2[2:0]}),
3063 .dout({in_rngl_cdbus_2f_b27_25[2:0],
3064 in_rngl_cdbus_2f[7:0],
3065 gsr_align_fx3[2:0],
3066 gsr_imirnd_fx3[2:0]}),
3067 .siclk(siclk),
3068 .soclk(soclk)
3069 );
3070
3071fgu_fpc_ctl_msff_ctl_macro__width_8 fx3_10 (
3072 .scan_in(fx3_10_scanin),
3073 .scan_out(fx3_10_scanout),
3074 .l1clk(l1clk_pm1),
3075 .din ({fpx_unfin_vld_fx2,
3076 ns_mode_fx2,
3077 fpx_of_vld_fx2,
3078 fpx_uf_vld_fx2,
3079 fpx_nx_vld_fx2,
3080 ecc_trap_fx2,
3081 fpx_dzc_fx2,
3082 i_fxp_nvc_fx2}),
3083 .dout({fpx_unfin_vld_fx3,
3084 ns_mode_fx3,
3085 fpx_of_vld_fx3,
3086 fpx_uf_vld_fx3,
3087 fpx_nx_vld_fx3,
3088 ecc_trap_fx3,
3089 fpx_dzc_fx3,
3090 i_fxp_nvc_fx3}),
3091 .siclk(siclk),
3092 .soclk(soclk)
3093 );
3094
3095assign fpc_emin_fx3 = fdiv_unf_predict_fx3;
3096
3097assign fpc_gsr0_mask_sel_fx3[1:0] =
3098 gsr0_mask_sel_fx3[1:0] &
3099 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd0)))}};
3100
3101assign fpc_gsr1_mask_sel_fx3[1:0] =
3102 gsr1_mask_sel_fx3[1:0] &
3103 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd1)))}};
3104
3105assign fpc_gsr2_mask_sel_fx3[1:0] =
3106 gsr2_mask_sel_fx3[1:0] &
3107 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd2)))}};
3108
3109assign fpc_gsr3_mask_sel_fx3[1:0] =
3110 gsr3_mask_sel_fx3[1:0] &
3111 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd3)))}};
3112
3113assign fpc_gsr4_mask_sel_fx3[1:0] =
3114 gsr4_mask_sel_fx3[1:0] &
3115 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd4)))}};
3116
3117assign fpc_gsr5_mask_sel_fx3[1:0] =
3118 gsr5_mask_sel_fx3[1:0] &
3119 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd5)))}};
3120
3121assign fpc_gsr6_mask_sel_fx3[1:0] =
3122 gsr6_mask_sel_fx3[1:0] &
3123 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd6)))}};
3124
3125assign fpc_gsr7_mask_sel_fx3[1:0] =
3126 gsr7_mask_sel_fx3[1:0] &
3127 {2{~((fac_tlu_flush_fx3 | dec_flush_fx3) & (~rng_wr_gsr_4f | (gsr_asr_tid_fx3[2:0] != 3'd7)))}};
3128
3129assign gsr_w_vld_fx3[1] = i_gsr_w_vld_fx3[1] & ~fac_tlu_flush_fx3 & ~dec_flush_fx3;
3130assign fgx_siam_fx3 = i_fgx_siam_fx3 & ~fac_tlu_flush_fx3 & ~dec_flush_fx3;
3131
3132assign idiv0_trap_fx3 =
3133 i_idiv0_trap_fx3 &
3134 ~dec_flush_fx3 &
3135 ~fac_tlu_flush_fx3 ;
3136
3137assign w1_vld_fx3[1:0] =
3138 i_w1_vld_fx3[1:0] &
3139 {2{~dec_flush_fx3}} &
3140 {2{~fac_tlu_flush_fx3}} &
3141 {2{~((fec_uecc_fx2 | fec_cecc_fx2) & fgx_pdist_fx3)}}; // pdist 2nd beat ecc error
3142
3143assign fsr_w1_vld_fx3[0] =
3144 i_fsr_w1_vld_fx3[0] &
3145 ~dec_flush_fx3 &
3146 ~fac_tlu_flush_fx3 ;
3147
3148assign fsr_w1_vld_fx3[1] =
3149 i_fsr_w1_vld_fx3[1] &
3150 ~dec_flush_fx3 &
3151 ~fac_tlu_flush_fx3 ;
3152
3153assign lzd_override_fx3 =
3154 (~logical_sub_fx3 & // covers mul and logical_add with 1X.XX
3155 ~(itype_fx3[2:0] == 3'b001)) | // never override if fpfp
3156 (itype_fx3[2:0] == 3'b011); // intfp (prevent zero_mant detection due to 10.00 case.
3157 // intfp 10.00 may result from 2's comp)
3158
3159// ------------------------------------
3160// FDIV/FSQRT intermediate exponent (Eint) capture
3161// result sign capture
3162// ------------------------------------
3163
3164assign div_dec_issue_fx3 = div_valid_fx3 & ~divq_valid_fx3;
3165assign div_divq_issue_fx3 = div_valid_fx3 & divq_valid_fx3;
3166assign div_divq_load_fx3 = ~div_valid_fx3 & divq_valid_fx3;
3167assign div_hold_fx3 = ~div_dec_issue_fx3 & ~div_divq_issue_fx3;
3168
3169assign fdiv_ovf_predict_inf_fx3 =
3170 fdiv_ovf_predict_fx3 &
3171 ( (fpc_rd_mode_fx3[1:0] == 2'b00) | // nearest
3172 ((fpc_rd_mode_fx3[1:0] == 2'b10) & ~sign_inter_fx3) | // +inf
3173 ((fpc_rd_mode_fx3[1:0] == 2'b11) & sign_inter_fx3) ); // -inf
3174
3175assign fdiv_ovf_predict_max_fx3 =
3176 fdiv_ovf_predict_fx3 &
3177 ( (fpc_rd_mode_fx3[1:0] == 2'b01) | // trunc
3178 ((fpc_rd_mode_fx3[1:0] == 2'b10) & sign_inter_fx3) | // +inf
3179 ((fpc_rd_mode_fx3[1:0] == 2'b11) & ~sign_inter_fx3) ); // -inf
3180
3181// ------------
3182// capture data for instr that is entering the div engine
3183// ------------
3184
3185assign div_eint_in_fx3[18:0] =
3186 ({19{div_dec_issue_fx3 }} & {fsr_tem_fx3[3], fsr_tem_fx3[2], fsr_tem_fx3[0],
3187 ns_mode_fx3,
3188 fdiv_ovf_predict_inf_fx3,
3189 fdiv_ovf_predict_max_fx3,
3190 fdiv_unf_predict_fx3,
3191 sign_inter_fx3,
3192 fpd_eint_fx3[10:0]}) | // load from DEC issue
3193 ({19{div_divq_issue_fx3}} & divq_eint_fx4[18:0] ) | // load from divq issue
3194 ({19{div_hold_fx3 }} & div_eint_fx4[18:0] ) ; // hold
3195
3196// ------------
3197// capture data for instr that is entering the div queue
3198// ------------
3199
3200assign divq_eint_in_fx3[18:0] =
3201 ({19{ div_divq_load_fx3}} & {fsr_tem_fx3[3], fsr_tem_fx3[2], fsr_tem_fx3[0],
3202 ns_mode_fx3,
3203 fdiv_ovf_predict_inf_fx3,
3204 fdiv_ovf_predict_max_fx3,
3205 fdiv_unf_predict_fx3,
3206 sign_inter_fx3,
3207 fpd_eint_fx3[10:0]}) | // load from DEC issue
3208 ({19{~div_divq_load_fx3}} & divq_eint_fx4[18:0] ) ; // hold
3209
3210// ------------------------------------
3211// Exponent fpint detection
3212// - fpint "small source" detection
3213// If DP exp is < 11'h3ff, or SP exp is < 8'h7f
3214// then fpint result must be forced to zero
3215// - fpint "large source" detection
3216// max +DP source = (2^63)-1
3217// max +SP source = (2^31)-1
3218// max -DP source = -(2^63)
3219// max -SP source = -(2^31)
3220// ------------------------------------
3221
3222assign dpint_zero_fx3 =
3223 ~rs2_exp_fx3[10] &
3224 ~(rs2_exp_fx3[10:0] == 11'b01111111111) &
3225 ~(bze_fx3 & bzf_fx3 ) & // ~zero src (simplifies inexact eq. later)
3226 (itype_fx3[2:0] == 3'b010 ) &
3227 // FdTO(i,x)
3228 (stype_fx3[0] == 1'b1 ) ; // 0in bits_on -max 1 -var {dpint_zero_fx3, spint_zero_fx3, dp_large_maxint_result_fx3, sp_large_maxint_result_fx3} -active (|w1_vld_fx3[1:0])
3229
3230assign spint_zero_fx3 =
3231 ~rs2_exp_fx3[7] &
3232 ~(rs2_exp_fx3[7:0] == 8'b01111111 ) &
3233 ~(bze_fx3 & bzf_fx3 ) & // ~zero src (simplifies inexact eq. later)
3234 (itype_fx3[2:0] == 3'b010 ) &
3235 (stype_fx3[0] == 1'b0 ) ; // FsTO(i,x)
3236
3237assign fpint_zero_fx3 = dpint_zero_fx3 | spint_zero_fx3;
3238
3239assign dp_large_maxint_result_fx3 =
3240
3241 ((((rs2_exp_fx3[10:0] > 11'b10000111110) ) | // 2^(63+1023)
3242 ((rs2_exp_fx3[10:0] == 11'b10000111110) & ~sign_inter_fx3) | // 2^(63+1023)
3243 ((rs2_exp_fx3[10:0] == 11'b10000111110) & sign_inter_fx3 // 2^(63+1023)
3244 & ~bzf_fx3 ) ) &
3245 ((itype_fx3[2:0] == 3'b010) &
3246 (stype_fx3[1:0] == 2'b01 ) &
3247 (dtype_fx3[2:0] == 3'b100) ) ) | // FdTOx
3248
3249 ((((rs2_exp_fx3[7:0] > 8'b10111110) ) | // 2^(63+ 127)
3250 ((rs2_exp_fx3[7:0] == 8'b10111110) & ~sign_inter_fx3) | // 2^(63+ 127)
3251 ((rs2_exp_fx3[7:0] == 8'b10111110) & sign_inter_fx3 // 2^(63+ 127)
3252 & ~bzf_fx3 ) ) &
3253 ((itype_fx3[2:0] == 3'b010) &
3254 (stype_fx3[1:0] == 2'b00 ) &
3255 (dtype_fx3[2:0] == 3'b100) ) ) | // FsTOx
3256
3257 ((((rs2_exp_fx3[10:0] > 11'b10000011110) ) | // 2^(31+1023)
3258 ((rs2_exp_fx3[10:0] == 11'b10000011110) & ~sign_inter_fx3) | // 2^(31+1023)
3259 ((rs2_exp_fx3[10:0] == 11'b10000011110) & sign_inter_fx3 // 2^(31+1023)
3260// Note: must return inexact (not invalid) as long as most signif 31-bits of frac are zero
3261 & ~bzf31msb_fx3 ) ) &
3262 ((itype_fx3[2:0] == 3'b010) &
3263 (stype_fx3[1:0] == 2'b01 ) &
3264 (dtype_fx3[2:0] == 3'b011) ) ) ; // FdTOi
3265
3266assign sp_large_maxint_result_fx3 =
3267
3268 ((((rs2_exp_fx3[7:0] > 8'b10011110) ) | // 2^(31+ 127)
3269 ((rs2_exp_fx3[7:0] == 8'b10011110) & ~sign_inter_fx3) | // 2^(31+ 127)
3270 ((rs2_exp_fx3[7:0] == 8'b10011110) & sign_inter_fx3 // 2^(31+ 127)
3271 & ~bzf_fx3 ) ) &
3272 ((itype_fx3[2:0] == 3'b010) &
3273 (stype_fx3[1:0] == 2'b00 ) &
3274 (dtype_fx3[2:0] == 3'b011) ) ) ; // FsTOi
3275
3276assign maxint_result_fx3 =
3277 (nan_maxint_result_fx3 | inf_maxint_result_fx3 |
3278 dp_large_maxint_result_fx3 | sp_large_maxint_result_fx3);
3279
3280assign fpx_nvc_fx3 = i_fxp_nvc_fx3 | maxint_result_fx3;
3281
3282// ------------------------------------
3283// GSR{im,irnd,scale,align} ASR/SIAM/ALIGNADDRESS/hold mux
3284//
3285// - architected GSR is an fx4 flop
3286// - the ASR/SIAM/ALIGNADDRESS/hold mux function is done in fx3
3287// - the instr performing the read uses the fx4 data during fx3
3288// ------------------------------------
3289
3290assign gsr0_11bits_fx3[10:0] =
3291 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd0)}} // ASR
3292 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3293 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd0)}} // SIAM
3294 & {gsr_imirnd_fx3[2:0], gsr0_11bits_fx4[7:3], gsr0_11bits_fx4[2:0] }) |
3295 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd0)}} // ALIGNADDRESS
3296 & {gsr0_11bits_fx4[10:8], gsr0_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3297 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd0))) &
3298 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd0)))}} // hold
3299 & {gsr0_11bits_fx4[10:8], gsr0_11bits_fx4[7:3], gsr0_11bits_fx4[2:0] }) ;
3300
3301assign gsr1_11bits_fx3[10:0] =
3302 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd1)}} // ASR
3303 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3304 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd1)}} // SIAM
3305 & {gsr_imirnd_fx3[2:0], gsr1_11bits_fx4[7:3], gsr1_11bits_fx4[2:0] }) |
3306 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd1)}} // ALIGNADDRESS
3307 & {gsr1_11bits_fx4[10:8], gsr1_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3308 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd1))) &
3309 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd1)))}} // hold
3310 & {gsr1_11bits_fx4[10:8], gsr1_11bits_fx4[7:3], gsr1_11bits_fx4[2:0] }) ;
3311
3312assign gsr2_11bits_fx3[10:0] =
3313 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd2)}} // ASR
3314 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3315 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd2)}} // SIAM
3316 & {gsr_imirnd_fx3[2:0], gsr2_11bits_fx4[7:3], gsr2_11bits_fx4[2:0] }) |
3317 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd2)}} // ALIGNADDRESS
3318 & {gsr2_11bits_fx4[10:8], gsr2_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3319 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd2))) &
3320 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd2)))}} // hold
3321 & {gsr2_11bits_fx4[10:8], gsr2_11bits_fx4[7:3], gsr2_11bits_fx4[2:0] }) ;
3322
3323assign gsr3_11bits_fx3[10:0] =
3324 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd3)}} // ASR
3325 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3326 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd3)}} // SIAM
3327 & {gsr_imirnd_fx3[2:0], gsr3_11bits_fx4[7:3], gsr3_11bits_fx4[2:0] }) |
3328 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd3)}} // ALIGNADDRESS
3329 & {gsr3_11bits_fx4[10:8], gsr3_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3330 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd3))) &
3331 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd3)))}} // hold
3332 & {gsr3_11bits_fx4[10:8], gsr3_11bits_fx4[7:3], gsr3_11bits_fx4[2:0] }) ;
3333
3334assign gsr4_11bits_fx3[10:0] =
3335 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd4)}} // ASR
3336 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3337 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd4)}} // SIAM
3338 & {gsr_imirnd_fx3[2:0], gsr4_11bits_fx4[7:3], gsr4_11bits_fx4[2:0] }) |
3339 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd4)}} // ALIGNADDRESS
3340 & {gsr4_11bits_fx4[10:8], gsr4_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3341 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd4))) &
3342 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd4)))}} // hold
3343 & {gsr4_11bits_fx4[10:8], gsr4_11bits_fx4[7:3], gsr4_11bits_fx4[2:0] }) ;
3344
3345assign gsr5_11bits_fx3[10:0] =
3346 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd5)}} // ASR
3347 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3348 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd5)}} // SIAM
3349 & {gsr_imirnd_fx3[2:0], gsr5_11bits_fx4[7:3], gsr5_11bits_fx4[2:0] }) |
3350 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd5)}} // ALIGNADDRESS
3351 & {gsr5_11bits_fx4[10:8], gsr5_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3352 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd5))) &
3353 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd5)))}} // hold
3354 & {gsr5_11bits_fx4[10:8], gsr5_11bits_fx4[7:3], gsr5_11bits_fx4[2:0] }) ;
3355
3356assign gsr6_11bits_fx3[10:0] =
3357 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd6)}} // ASR
3358 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3359 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd6)}} // SIAM
3360 & {gsr_imirnd_fx3[2:0], gsr6_11bits_fx4[7:3], gsr6_11bits_fx4[2:0] }) |
3361 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd6)}} // ALIGNADDRESS
3362 & {gsr6_11bits_fx4[10:8], gsr6_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3363 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd6))) &
3364 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd6)))}} // hold
3365 & {gsr6_11bits_fx4[10:8], gsr6_11bits_fx4[7:3], gsr6_11bits_fx4[2:0] }) ;
3366
3367assign gsr7_11bits_fx3[10:0] =
3368 ({11{rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] == 3'd7)}} // ASR
3369 & {in_rngl_cdbus_3f_b27_25[2:0], in_rngl_cdbus_3f[7:3], in_rngl_cdbus_3f[2:0] }) |
3370 ({11{fgx_siam_fx3 & ( tid_fx3[2:0] == 3'd7)}} // SIAM
3371 & {gsr_imirnd_fx3[2:0], gsr7_11bits_fx4[7:3], gsr7_11bits_fx4[2:0] }) |
3372 ({11{gsr_w_vld_fx3[1] & ( tid_fx3[2:0] == 3'd7)}} // ALIGNADDRESS
3373 & {gsr7_11bits_fx4[10:8], gsr7_11bits_fx4[7:3], gsr_align_fx3[2:0] }) |
3374 ({11{(~rng_wr_gsr_4f | (rng_wr_gsr_4f & (gsr_asr_tid_fx3[2:0] != 3'd7))) &
3375 ((~fgx_siam_fx3 & ~gsr_w_vld_fx3[1]) | ((fgx_siam_fx3 | gsr_w_vld_fx3[1]) & (tid_fx3[2:0] != 3'd7)))}} // hold
3376 & {gsr7_11bits_fx4[10:8], gsr7_11bits_fx4[7:3], gsr7_11bits_fx4[2:0] }) ;
3377
3378assign gsr_11bits_fx3[7:0] =
3379 ({ 8{( tid_fx2[2:0] == 3'd0)}} & gsr0_11bits_fx3[7:0] ) |
3380 ({ 8{( tid_fx2[2:0] == 3'd1)}} & gsr1_11bits_fx3[7:0] ) |
3381 ({ 8{( tid_fx2[2:0] == 3'd2)}} & gsr2_11bits_fx3[7:0] ) |
3382 ({ 8{( tid_fx2[2:0] == 3'd3)}} & gsr3_11bits_fx3[7:0] ) |
3383 ({ 8{( tid_fx2[2:0] == 3'd4)}} & gsr4_11bits_fx3[7:0] ) |
3384 ({ 8{( tid_fx2[2:0] == 3'd5)}} & gsr5_11bits_fx3[7:0] ) |
3385 ({ 8{( tid_fx2[2:0] == 3'd6)}} & gsr6_11bits_fx3[7:0] ) |
3386 ({ 8{( tid_fx2[2:0] == 3'd7)}} & gsr7_11bits_fx3[7:0] ) ;
3387
3388assign gsr_asr_11bits_fx3[10:0] =
3389 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd0)}} & gsr0_11bits_fx3[10:0]) |
3390 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd1)}} & gsr1_11bits_fx3[10:0]) |
3391 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd2)}} & gsr2_11bits_fx3[10:0]) |
3392 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd3)}} & gsr3_11bits_fx3[10:0]) |
3393 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd4)}} & gsr4_11bits_fx3[10:0]) |
3394 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd5)}} & gsr5_11bits_fx3[10:0]) |
3395 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd6)}} & gsr6_11bits_fx3[10:0]) |
3396 ({11{(fac_gsr_asr_tid_fx2[2:0] == 3'd7)}} & gsr7_11bits_fx3[10:0]) ;
3397
3398assign gsr_imirnd_held_fx3[2:0] =
3399 ({ 3{( tid_fx1[2:0] == 3'd0)}} & gsr0_11bits_fx4[10:8]) |
3400 ({ 3{( tid_fx1[2:0] == 3'd1)}} & gsr1_11bits_fx4[10:8]) |
3401 ({ 3{( tid_fx1[2:0] == 3'd2)}} & gsr2_11bits_fx4[10:8]) |
3402 ({ 3{( tid_fx1[2:0] == 3'd3)}} & gsr3_11bits_fx4[10:8]) |
3403 ({ 3{( tid_fx1[2:0] == 3'd4)}} & gsr4_11bits_fx4[10:8]) |
3404 ({ 3{( tid_fx1[2:0] == 3'd5)}} & gsr5_11bits_fx4[10:8]) |
3405 ({ 3{( tid_fx1[2:0] == 3'd6)}} & gsr6_11bits_fx4[10:8]) |
3406 ({ 3{( tid_fx1[2:0] == 3'd7)}} & gsr7_11bits_fx4[10:8]) ;
3407
3408assign siam_1ahead_sel_fx3 =
3409 fac_fgx_siam_fx2 & (tid_fx1[2:0] == tid_fx2[2:0]); // note: this siam not qual by flushes
3410
3411assign siam_2ahead_sel_fx3 =
3412 ~siam_1ahead_sel_fx3 &
3413 fgx_siam_fx3 & (tid_fx1[2:0] == tid_fx3[2:0]);
3414
3415assign siam_none_sel_fx3 =
3416 ~siam_1ahead_sel_fx3 &
3417 ~siam_2ahead_sel_fx3 ;
3418
3419assign {gsr_im_fx3, gsr_irnd_fx3[1:0]} =
3420 ({3{siam_1ahead_sel_fx3}} & gsr_imirnd_fx2[2:0] ) |
3421 ({3{siam_2ahead_sel_fx3}} & gsr_imirnd_fx3[2:0] ) |
3422 ({3{siam_none_sel_fx3 }} & gsr_imirnd_held_fx3[2:0]) ;
3423
3424
3425// ----------------------------------------------------------------------------
3426// FX4 stage
3427// ----------------------------------------------------------------------------
3428
3429fgu_fpc_ctl_msff_ctl_macro__width_4 fx4_00 (
3430 .scan_in(fx4_00_scanin),
3431 .scan_out(fx4_00_scanout),
3432 .l1clk(l1clk_pm1),
3433 .din ({rs1_fx3_b31, rs2_fx3_b31, fpc_rd_mode_fx3[1:0]}),
3434 .dout({rs1_fx4_b31, rs2_fx4_b31, rd_mode_fx4[1:0]}),
3435 .siclk(siclk),
3436 .soclk(soclk)
3437 );
3438
3439fgu_fpc_ctl_msff_ctl_macro__width_37 fx4_01 (
3440 .scan_in(fx4_01_scanin),
3441 .scan_out(fx4_01_scanout),
3442 .l1clk(l1clk_pm1),
3443 .din ({w1_vld_fx3[1:0],
3444 fgu_cmp_fcc_fx3[1:0],
3445 fgu_cmp_fcc_vld_fx3[3:0],
3446 idiv0_trap_fx3,
3447 sign_inter_fx3,
3448 lzd_override_fx3,
3449 logical_sub_fx3,
3450 fpint_zero_fx3,
3451 fsr_w1_vld_fx3[1:0],
3452 a_nan_fx3,
3453 b_nan_fx3,
3454 fpf_byte_unsure_x_dp_fx3[1:0],
3455 fpf_byte_unsure_x_sp_fx3[1:0],
3456 w1_odd32b_fx3,
3457 mass_align_sticky_fx3,
3458 fadd_logical_sub_fx3,
3459 fsr_store_fx3,
3460 fmul_den2nor_m2_predict_fx3,
3461 fdiv_den2nor_sp_fx3,
3462 fdiv_den2nor_dp_fx3,
3463 rm_near_sp_fx3,
3464 rm_near_dp_fx3,
3465 rm_directed_sp_fx3,
3466 rm_directed_dp_fx3,
3467 aboe_fx3,
3468 abze_fx3,
3469 div_default_res_fx3,
3470 dec_flush_fx3,
3471 fac_tlu_flush_fx3}),
3472 .dout({i_w1_vld_fx4[1:0],
3473 fcc_fx4[1:0],
3474 fcc_vld_fx4[3:0],
3475 idiv0_trap_fx4,
3476 sign_inter_fx4,
3477 fpc_lzd_override_fx4,
3478 logical_sub_fx4,
3479 fpint_zero_fx4,
3480 i_fsr_w1_vld_fx4[1:0],
3481 a_nan_fx4,
3482 b_nan_fx4,
3483 byte_unsure_x_dp_fx4[1:0],
3484 byte_unsure_x_sp_fx4[1:0],
3485 w1_odd32b_fx4,
3486 mass_align_sticky_fx4,
3487 fadd_logical_sub_fx4,
3488 fsr_store_fx4,
3489 fmul_den2nor_m2_predict_fx4,
3490 fdiv_den2nor_sp_fx4,
3491 fdiv_den2nor_dp_fx4,
3492 rm_near_sp_fx4,
3493 rm_near_dp_fx4,
3494 rm_directed_sp_fx4,
3495 rm_directed_dp_fx4,
3496 aboe_fx4,
3497 abze_fx4,
3498 div_default_res_fx4,
3499 dec_flush_fx4,
3500 tlu_flush_fgu_fx4}),
3501 .siclk(siclk),
3502 .soclk(soclk)
3503 );
3504
3505fgu_fpc_ctl_msff_ctl_macro__width_15 fx4_02 (
3506 .scan_in(fx4_02_scanin),
3507 .scan_out(fx4_02_scanout),
3508 .l1clk(l1clk_pm1),
3509 .din ({vis_cmp_result_fx3[3:0], int_res_sel_fx3[5:1], itype_fx3[2:0], dtype_fx3[2:0]}),
3510 .dout({vis_cmp_result_fx4[3:0], fpc_int_res_sel_fx4[5:1], itype_fx4[2:0], dtype_fx4[2:0]}),
3511 .siclk(siclk),
3512 .soclk(soclk)
3513 );
3514
3515fgu_fpc_ctl_msff_ctl_macro__width_38 fx4_03 (
3516 .scan_in(fx4_03_scanin),
3517 .scan_out(fx4_03_scanout),
3518 .l1clk(l1clk_pm1),
3519 .din ({div_eint_in_fx3[18:0], divq_eint_in_fx3[18:0]}),
3520 .dout({div_eint_fx4[18:0], divq_eint_fx4[18:0] }),
3521 .siclk(siclk),
3522 .soclk(soclk)
3523 );
3524
3525fgu_fpc_ctl_msff_ctl_macro__width_5 fx4_04 (
3526 .scan_in(fx4_04_scanin),
3527 .scan_out(fx4_04_scanout),
3528 .l1clk(l1clk_pm1),
3529 .din (fsr_tem_fx3[4:0]),
3530 .dout(fsr_tem_fx4[4:0]),
3531 .siclk(siclk),
3532 .soclk(soclk)
3533 );
3534
3535fgu_fpc_ctl_msff_ctl_macro__width_5 fx4_05 (
3536 .scan_in(fx4_05_scanin),
3537 .scan_out(fx4_05_scanout),
3538 .l1clk(l1clk_pm1),
3539 .din ({inf_src_result_fx3,
3540 zero_src_result_fx3,
3541 nan_default_result_fx3,
3542 qthenan_fx3,
3543 maxint_result_fx3}),
3544 .dout({inf_src_result_fx4,
3545 zero_src_result_fx4,
3546 nan_default_result_fx4,
3547 fpc_qthenan_fx4,
3548 maxint_result_fx4}),
3549 .siclk(siclk),
3550 .soclk(soclk)
3551 );
3552
3553fgu_fpc_ctl_msff_ctl_macro__width_16 fx4_06 (
3554 .scan_in(fx4_06_scanin),
3555 .scan_out(fx4_06_scanout),
3556 .l1clk(l1clk_pm1),
3557 .din ({fadd_ovf_predict_fx3,
3558 fdtos_ovf_predict_fx3,
3559 fdtos_ovf_detect_fx3,
3560 fmul_ovf_predict_fx3,
3561 fmul_ovf_detect_fx3,
3562 fdiv_ovf_detect_fx3,
3563 fdtos_unf_predict_fx3,
3564 fdtos_unf_detect_fx3,
3565 fmul_unf_predict_fx3,
3566 fmul_unf_detect_fx3,
3567 fdiv_unf_detect_fx3,
3568 bof22msb_fx3,
3569 fdtos_guf_detect_fx3,
3570 fmul_guf_detect_fx3,
3571 fdiv_guf_detect_fx3,
3572 unfin_src_fx3}),
3573 .dout({fadd_ovf_predict_fx4,
3574 fdtos_ovf_predict_fx4,
3575 fdtos_ovf_detect_fx4,
3576 fmul_ovf_predict_fx4,
3577 fmul_ovf_detect_fx4,
3578 fdiv_ovf_detect_fx4,
3579 fdtos_unf_predict_fx4,
3580 fdtos_unf_detect_fx4,
3581 fmul_unf_predict_fx4,
3582 fmul_unf_detect_fx4,
3583 fdiv_unf_detect_fx4,
3584 bof22msb_fx4,
3585 fdtos_guf_detect_fx4,
3586 fmul_guf_detect_fx4,
3587 fdiv_guf_detect_fx4,
3588 unfin_src_fx4}),
3589 .siclk(siclk),
3590 .soclk(soclk)
3591 );
3592
3593fgu_fpc_ctl_msff_ctl_macro__width_88 fx4_07 ( // FS:wmr_protect
3594 .scan_in(fx4_07_wmr_scanin),
3595 .scan_out(fx4_07_wmr_scanout),
3596 .siclk(spc_aclk_wmr),
3597 .l1clk(l1clk_pm1),
3598 .din ({gsr0_11bits_fx3[10:0],
3599 gsr1_11bits_fx3[10:0],
3600 gsr2_11bits_fx3[10:0],
3601 gsr3_11bits_fx3[10:0],
3602 gsr4_11bits_fx3[10:0],
3603 gsr5_11bits_fx3[10:0],
3604 gsr6_11bits_fx3[10:0],
3605 gsr7_11bits_fx3[10:0]}),
3606 .dout({gsr0_11bits_fx4[10:0],
3607 gsr1_11bits_fx4[10:0],
3608 gsr2_11bits_fx4[10:0],
3609 gsr3_11bits_fx4[10:0],
3610 gsr4_11bits_fx4[10:0],
3611 gsr5_11bits_fx4[10:0],
3612 gsr6_11bits_fx4[10:0],
3613 gsr7_11bits_fx4[10:0]}),
3614 .soclk(soclk)
3615 );
3616
3617fgu_fpc_ctl_msff_ctl_macro__width_8 fx4_08 (
3618 .scan_in(fx4_08_scanin),
3619 .scan_out(fx4_08_scanout),
3620 .l1clk(l1clk_pm1),
3621 .din ({fpx_unfin_vld_fx3,
3622 ns_mode_fx3,
3623 fpx_of_vld_fx3,
3624 fpx_uf_vld_fx3,
3625 fpx_nx_vld_fx3,
3626 ecc_trap_fx3,
3627 fpx_dzc_fx3,
3628 fpx_nvc_fx3}),
3629 .dout({fpx_unfin_vld_fx4,
3630 ns_mode_fx4,
3631 fpx_of_vld_fx4,
3632 fpx_uf_vld_fx4,
3633 fpx_nx_vld_fx4,
3634 ecc_trap_fx4,
3635 fpx_dzc_fx4,
3636 fpx_nvc_fx4}),
3637 .siclk(siclk),
3638 .soclk(soclk)
3639 );
3640
3641fgu_fpc_ctl_msff_ctl_macro__width_11 fx4_09 (
3642 .scan_in(fx4_09_scanin),
3643 .scan_out(fx4_09_scanout),
3644 .l1clk(l1clk_pm1),
3645 .din ({in_rngl_cdbus_2f_b27_25[2:0],
3646 in_rngl_cdbus_2f[7:0]}),
3647 .dout({in_rngl_cdbus_3f_b27_25[2:0],
3648 in_rngl_cdbus_3f[7:0]}),
3649 .siclk(siclk),
3650 .soclk(soclk)
3651 );
3652
3653fgu_fpc_ctl_msff_ctl_macro__width_1 fx4_10 (
3654 .scan_in(fx4_10_scanin),
3655 .scan_out(fx4_10_scanout),
3656 .l1clk(l1clk_pm2),
3657 .din ({lsu_fgu_exception_w}), // requires free running clk
3658 .dout({stfsr_exception_fx4}),
3659 .siclk(siclk),
3660 .soclk(soclk)
3661 );
3662
3663fgu_fpc_ctl_msff_ctl_macro__width_19 fx4_11 (
3664 .scan_in(fx4_11_scanin),
3665 .scan_out(fx4_11_scanout),
3666 .l1clk(l1clk_pm1),
3667 .din ({gsr_11bits_fx3[7:0],
3668 gsr_asr_11bits_fx3[10:0]}),
3669 .dout({fpc_gsr_scale_fx4[4:0], fpc_gsr_align_fx4[2:0],
3670 fpc_gsr_asr_11bits_fx4[10:0]}),
3671 .siclk(siclk),
3672 .soclk(soclk)
3673 );
3674
3675// ------------------------------------
3676// Main adder output format mux selects
3677// ------------------------------------
3678
3679assign fpc_ma_fmt_sel_fx4[0] = // logical_sub 00.1X, not possible for logical_add
3680 ( logical_sub_fx4 ) &
3681 (itype_fx4[2:0] == 3'b000) &
3682 (dtype_fx4[2:1] == 2'b00 ) &
3683 (fpf_ma_sum_fx4[63:62] == 2'b01);
3684
3685assign fpc_ma_fmt_sel_fx4[1] =
3686 ((~logical_sub_fx4 ) & // logical_add 1X.XX
3687 (itype_fx4[2:0] == 3'b000) &
3688 (dtype_fx4[2:1] == 2'b00 ) &
3689 (fpf_ma_cout_fx4 ) ) |
3690 ((itype_fx4[2:0] == 3'b011) & // intfp 10.00 (may result from 2's comp)
3691 (fpf_ma_cout_fx4 ) ) ;
3692
3693assign fpc_ma_fmt_sel_fx4[2] = // default for non fmul
3694 fpc_qthenan_fx4 | // ensure nan propagation for fmul, fdiv, fsqrt
3695 ~(itype_fx4[2:0] == 3'b101); // ~mul
3696
3697assign fpc_ma_fmt_sel_fx4[3] =
3698 fmul_den2nor_m2_predict_fx4; // fmul 11.XX, Eint=Emin-2, denorm inter. result may rnd to norm
3699
3700assign fpc_ma_fmt_sel_fx4[4] =
3701 fmul_unf_predict_fx4; // fmul 01.XX, Eint=Emin-1, denorm inter. result may rnd to norm
3702
3703// ------------------------------------
3704// Integer output constant mux selects
3705// ------------------------------------
3706
3707assign maxpos_result_fx4 = maxint_result_fx4 & ~sign_inter_fx4;
3708assign maxneg_result_fx4 = maxint_result_fx4 & sign_inter_fx4;
3709
3710assign int_sel_fx4[0] = // 64'h0000000000000000
3711 (itype_fx4[2:0] == 3'b010) & // F(s,d)TO(i,x)
3712 fpint_zero_fx4; // zero result
3713
3714assign int_sel_fx4[1] = maxneg_result_fx4; // 64'h8000000000000000
3715
3716assign int_sel_fx4[2] = // 64'h7fffffffffffffff
3717 nan_default_result_fx4 | maxpos_result_fx4;
3718
3719assign int_sel_fx4[3] =
3720 ((itype_fx4[2:0] == 3'b000) & (dtype_fx4[2:1] == 2'b01)) | // vis partitioned add
3721 ((itype_fx4[2:0] == 3'b010) ) ; // F(s,d)TO(i,x)
3722
3723assign mulscc_iccn_fx4 = fpf_ma_sum_fx4[31];
3724assign mulscc_iccc_fx4 = fpf_ma_sum_fx4[32];
3725
3726// overflow if both oprands have same sign and sign of sum is different
3727assign mulscc_iccv_fx4 =
3728 ( rs1_fx4_b31 & rs2_fx4_b31 & ~fpf_ma_sum_fx4[31]) |
3729 (~rs1_fx4_b31 & ~rs2_fx4_b31 & fpf_ma_sum_fx4[31]) ;
3730
3731assign exp_sel_mul_fx4 = (itype_fx4[2:0] == 3'b101) & ~(a_nan_fx4 | b_nan_fx4); // mul
3732assign fpc_sp_dest_fx4 = (dtype_fx4[2:0] == 3'b000); // sp
3733
3734// ------------------------------------
3735// FDIV/FSQRT result exponent (Eresult)
3736// Eresult=Eint-Eadj
3737// ------------------------------------
3738
3739assign fpc_fpd_sign_res = div_eint_fx4[11];
3740
3741assign fpd_const_sel[0] = // select fdd frac and not fdiv underflow/overflow
3742 ~( div_eint_fx4[12] & fdc_dec_exp_early) & // ~(fdiv_unf_predict => detect)
3743 ~(|div_eint_fx4[14:13] & ~fdc_dec_exp_early) ; // ~(fdiv_ovf_predict => detect)
3744
3745assign fpd_const_sel[1] = // select fdiv overflow +/-max (frac=ff..ff)
3746 ( div_eint_fx4[13] & ~fdc_dec_exp_early) ; // (fdiv_ovf_predict => detect)
3747
3748// 0in bits_on -max 1 -var fpd_const_sel[1:0]
3749
3750assign fpd_exp_res[10:0] =
3751 ({11{~fdc_dec_exp_early & fpd_const_sel[0]}} & (div_eint_fx4[10:0] )) | // Eresult=Eint-0
3752 ({11{ fdc_dec_exp_early & fpd_const_sel[0]}} & (div_eint_fx4[10:0] + 11'b11111111111)) | // Eresult=Eint-1
3753 ({11{~(|fpd_const_sel[1:0]) & div_eint_fx4[12]}} & ( 11'b00000000000)) | // Eresult=zero
3754 ({11{~(|fpd_const_sel[1:0]) & div_eint_fx4[14]}} & ( 11'b11111111111)) | // Eresult=inf
3755 ({11{ fpd_const_sel[1] }} & ( 11'b11111111110)) ; // Eresult=max
3756
3757// ------------------------------------
3758// floating point zero sign
3759// ------------------------------------
3760
3761assign sign_retain_zero_fx4 = ~logical_sub_fx4;
3762
3763assign sign_zero_fx4 =
3764 (~sign_retain_zero_fx4 & (rd_mode_fx4[1:0] == 2'b11)) | // rnd -inf
3765 ( sign_retain_zero_fx4 & sign_inter_fx4 ) ;
3766
3767// ------------------------------------
3768// Add pipe Rinc calculation
3769// - FADD(s,d), FSUB(s,d), FiTOs, FxTO(s,d), FdTOs
3770// - Determine if LSB should be inc due to round
3771//
3772// Rounding equations:
3773//
3774// Rinc =
3775// (near & G & (LSB | X)) |
3776// (+inf & ~sign & (G | X)) |
3777// (-inf & sign & (G | X)) ;
3778//
3779// directed =
3780// (+inf & ~sign) |
3781// (-inf & sign) ;
3782//
3783// Rinc = // nand3-nand4 delay
3784// (near & G & LSB) |
3785// (near & G & X ) |
3786// (directed & G ) |
3787// (directed & X ) ;
3788//
3789// ------------------------------------
3790
3791// ignore cout if logical_sub
3792assign add_ma_cout_fx4 = ~(logical_sub_fx4 & (itype_fx4 == 3'b000)) & fpf_ma_cout_fx4;
3793
3794assign convert_fmt_1xx_fx4 =
3795 fpf_ma_cout_fx4 & // 1X.XX
3796 (((itype_fx4[2:0] == 3'b011) | // FxTOs, FiTOs, FdTOs
3797 (itype_fx4[2:0] == 3'b001) ) &
3798 (dtype_fx4 == 3'b000) );
3799
3800assign convert_fmt_01x_fx4 =
3801 ~fpf_ma_cout_fx4 & // 01.XX
3802 (((itype_fx4[2:0] == 3'b011) | // FxTOs, FiTOs, FdTOs
3803 (itype_fx4[2:0] == 3'b001) ) &
3804 (dtype_fx4 == 3'b000) );
3805
3806assign fxtod_fmt_1xx_fx4 =
3807 fpf_ma_cout_fx4 & // 1X.XX
3808 ((itype_fx4[2:0] == 3'b011) & // FxTOd
3809 (dtype_fx4 == 3'b001) );
3810
3811assign fxtod_fmt_01x_fx4 =
3812 ~fpf_ma_cout_fx4 & // 01.XX
3813 ((itype_fx4[2:0] == 3'b011) & // FxTOd
3814 (dtype_fx4 == 3'b001) );
3815
3816assign add_fmt_1xx_fx4 =
3817 convert_fmt_1xx_fx4 | fxtod_fmt_1xx_fx4 | // FxTOs, FiTOs, FdTOs, FxTOd
3818 (({add_ma_cout_fx4 } == 1'b1 ) & // 1X.XX
3819 (itype_fx4[2:0] == 3'b000) ); // add
3820
3821assign add_fmt_01x_fx4 =
3822 convert_fmt_01x_fx4 | fxtod_fmt_01x_fx4 | // FxTOs, FiTOs, FdTOs, FxTOd
3823 (({add_ma_cout_fx4, fpf_ma_sum_fx4[63] } == 2'b01 ) & // 01.XX
3824 (itype_fx4[2:0] == 3'b000) ); // add
3825
3826assign add_fmt_001_fx4 =
3827 (({add_ma_cout_fx4, fpf_ma_sum_fx4[63:62]} == 3'b001) & // 00.1X
3828 (itype_fx4[2:0] == 3'b000) ); // add
3829
3830assign aln_fmt_1xx_fx4 =
3831 (({add_ma_cout_fx4 } == 1'b1 ) & // 1X.XX
3832 (itype_fx4[2:0] == 3'b000) ); // add
3833
3834assign aln_fmt_01x_fx4 =
3835 (({add_ma_cout_fx4, fpf_ma_sum_fx4[63] } == 2'b01 ) & // 01.XX
3836 (itype_fx4[2:0] == 3'b000) ); // add
3837
3838assign add_lsb_bit_dp_fx4 =
3839 (add_fmt_1xx_fx4 & fpf_ma_sum_fx4[12] ) | // 1X.XX
3840 (add_fmt_01x_fx4 & fpf_ma_sum_fx4[11] ) | // 01.XX
3841 (add_fmt_001_fx4 & fpf_ma_sum_fx4[10] ) ; // 00.1X
3842
3843assign add_g_bit_dp_fx4 =
3844 (add_fmt_1xx_fx4 & fpf_ma_sum_fx4[11] ) | // 1X.XX
3845 (add_fmt_01x_fx4 & fpf_ma_sum_fx4[10] ) | // 01.XX
3846 (add_fmt_001_fx4 & fpf_ma_sum_fx4[9] ) ; // 00.1X
3847
3848assign add_lsb_bit_sp_fx4 =
3849 (add_fmt_1xx_fx4 & fpf_ma_sum_fx4[41] ) | // 1X.XX
3850 (add_fmt_01x_fx4 & fpf_ma_sum_fx4[40] ) | // 01.XX
3851 (add_fmt_001_fx4 & fpf_ma_sum_fx4[39] ) ; // 00.1X
3852
3853assign add_g_bit_sp_fx4 =
3854 (add_fmt_1xx_fx4 & fpf_ma_sum_fx4[40] ) | // 1X.XX
3855 (add_fmt_01x_fx4 & fpf_ma_sum_fx4[39] ) | // 01.XX
3856 (add_fmt_001_fx4 & fpf_ma_sum_fx4[38] ) ; // 00.1X
3857
3858assign align_x_bit_dp_fx4 =
3859 (aln_fmt_1xx_fx4 & ( byte_unsure_x_dp_fx4[1] | // 1X.XX
3860 byte_unsure_x_dp_fx4[0] |
3861 fpf_ma_sum_fx4[10] |
3862 fpf_ma_sum_fx4[9] |
3863 ~fpf_align_sticky_fx4_l)) |
3864 (aln_fmt_01x_fx4 & ( mass_align_sticky_fx4 | // 01.XX
3865 byte_unsure_x_dp_fx4[0] |
3866 fpf_ma_sum_fx4[9] |
3867 (~fpf_align_sticky_fx4_l & ~abze_fx4))) | // ignore sticky if zero exp (must be fmt_01x)
3868 (add_fmt_001_fx4 & (~fpf_align_sticky_fx4_l)) ; // 00.1X
3869
3870assign align_x_bit_sp_fx4 =
3871 (aln_fmt_1xx_fx4 & ( byte_unsure_x_sp_fx4[1] | // 1X.XX
3872 byte_unsure_x_sp_fx4[0] |
3873 fpf_ma_sum_fx4[39] |
3874 fpf_ma_sum_fx4[38] |
3875 ~fpf_align_sticky_fx4_l)) |
3876 (aln_fmt_01x_fx4 & ( mass_align_sticky_fx4 | // 01.XX
3877 byte_unsure_x_sp_fx4[0] |
3878 fpf_ma_sum_fx4[38] |
3879 (~fpf_align_sticky_fx4_l & ~abze_fx4))) | // ignore sticky if zero exp (must be fmt_01x)
3880 (add_fmt_001_fx4 & (~fpf_align_sticky_fx4_l)) ; // 00.1X
3881
3882assign convert_x_bit_sp_fx4 =
3883 (convert_fmt_1xx_fx4 & (fpf_ma_sum_fx4[39] | // 1X.XX
3884 fic_convert_sticky_fx4)) |
3885 (convert_fmt_01x_fx4 & (fic_convert_sticky_fx4)) ; // 01.XX
3886
3887assign fxtod_x_bit_dp_fx4 =
3888 (fxtod_fmt_1xx_fx4 & (fpf_ma_sum_fx4[10] | // 1X.XX
3889 fic_fxtod_sticky_fx4 )) |
3890 (fxtod_fmt_01x_fx4 & (fic_fxtod_sticky_fx4 )) ; // 01.XX
3891
3892assign add_x_bit_dp_fx4 = align_x_bit_dp_fx4 | fxtod_x_bit_dp_fx4;
3893assign add_x_bit_sp_fx4 = align_x_bit_sp_fx4 | convert_x_bit_sp_fx4;
3894
3895// ------------------------------------
3896// fpint inexact result calculation
3897// - inexact = G | (R | X)
3898// - set inexact for fpint "small source" detection
3899// If DP exp is < 11'h3ff, or SP exp is < 8'h7f
3900// then fpint result must be forced to zero and
3901// inexact set
3902// ------------------------------------
3903
3904assign fpint_nxc_i_fx4 =
3905 ~maxint_result_fx4 & // ~invalid (nan,inf,large)
3906 (dtype_fx4[2:0] == 3'b011) &
3907 (itype_fx4[2:0] == 3'b010) & // FsTOi, FdTOi
3908 fic_ftoi_nx_fx4 ;
3909
3910assign fpint_nxc_x_fx4 =
3911 ~maxint_result_fx4 & // ~invalid (nan,inf,large)
3912 (dtype_fx4[2:0] == 3'b100) &
3913 (itype_fx4[2:0] == 3'b010) & // FsTOx, FdTOx
3914 fic_ftox_nx_fx4 ;
3915
3916assign fpint_nxc_fx4 =
3917 fpint_nxc_i_fx4 |
3918 fpint_nxc_x_fx4 |
3919 fpint_zero_fx4; // fpint "small source"
3920
3921// ------------------------------------
3922// Detect all cases where intermediate denorm rounds to norm
3923// ------------------------------------
3924
3925assign fdtos_den2nor_fx4 =
3926 fdtos_unf_predict_fx4 &
3927 // post-denorm LSB is included in bof22msb
3928 ((rm_near_sp_fx4 & (bof22msb_fx4 & fpf_ma_sum_fx4[40] )) |
3929 (rm_directed_sp_fx4 & (bof22msb_fx4 & (|fpf_ma_sum_fx4[40:39] | fic_convert_sticky_fx4))) );
3930
3931assign fdiv_fdtos_den2nor_sp_fx4 = fdiv_den2nor_sp_fx4 | fdtos_den2nor_fx4;
3932
3933assign w1_vld_fx4[1:0] =
3934 i_w1_vld_fx4[1:0] &
3935 ({2{~(itype_fx4[2:1] == 2'b11) | // ~div/sqrt
3936 ((itype_fx4[2:1] == 2'b11) &
3937 div_default_res_fx4 &
3938 ~dec_flush_fx4 &
3939 ~tlu_flush_fgu_fx4 )}}); // div/sqrt and default result
3940
3941assign fsr_w1_vld_fx4[0] =
3942 i_fsr_w1_vld_fx4[0] &
3943 ( ~(itype_fx4[2:1] == 2'b11) | // ~div/sqrt
3944 ((itype_fx4[2:1] == 2'b11) &
3945 div_default_res_fx4 &
3946 ~dec_flush_fx4 &
3947 ~tlu_flush_fgu_fx4 ) ); // div/sqrt and default result
3948
3949assign fsr_w1_vld_fx4[1] =
3950 i_fsr_w1_vld_fx4[1] &
3951 ~(fsr_store_fx4 & stfsr_exception_fx4); // ensure stfsr completes without error
3952
3953
3954// ----------------------------------------------------------------------------
3955// FX5 stage
3956// ----------------------------------------------------------------------------
3957
3958fgu_fpc_ctl_msff_ctl_macro__width_8 fx5_00 (
3959 .scan_in(fx5_00_scanin),
3960 .scan_out(fx5_00_scanout),
3961 .l1clk(l1clk_pm1),
3962 .din ({w1_vld_fx4[1:0], fcc_fx4[1:0], fcc_vld_fx4[3:0]}),
3963 .dout({w1_vld_fx5[1:0], fcc_fx5[1:0], fpc_fcc_vld_fx5[3:0]}),
3964 .siclk(siclk),
3965 .soclk(soclk)
3966 );
3967
3968fgu_fpc_ctl_msff_ctl_macro__width_8 fx5_01 (
3969 .scan_in(fx5_01_scanin),
3970 .scan_out(fx5_01_scanout),
3971 .l1clk(l1clk_pm1),
3972 .din ({itype_fx4[2:0], dtype_fx4[2:0], rd_mode_fx4[1:0]}),
3973 .dout({itype_fx5[2:0], dtype_fx5[2:0], rd_mode_fx5[1:0]}),
3974 .siclk(siclk),
3975 .soclk(soclk)
3976 );
3977
3978fgu_fpc_ctl_msff_ctl_macro__width_36 fx5_02 (
3979 .scan_in(fx5_02_scanin),
3980 .scan_out(fx5_02_scanout),
3981 .l1clk(l1clk_pm1),
3982 .din ({ int_sel_fx4[3:0],
3983 vis_cmp_result_fx4[3:0],
3984 fpc_int_res_sel_fx4[2],
3985 fpc_ma_fmt_sel_fx4[0],
3986 idiv0_trap_fx4,
3987 mulscc_iccn_fx4,
3988 fic_mulscc_iccz_fx4,
3989 mulscc_iccv_fx4,
3990 mulscc_iccc_fx4,
3991 fic_mulscc_xccz_fx4,
3992 fdc_xicc_z_early[1:0],
3993 fdc_icc_v_early,
3994 exp_sel_mul_fx4,
3995 sign_inter_fx4,
3996 sign_zero_fx4,
3997 fpf_ma_sum_fx4[10],
3998 fsr_w1_vld_fx4[1:0],
3999 fac_fgx_instr_fx4,
4000 w1_odd32b_fx4,
4001 fpf_ma_cout_fx4,
4002 fadd_logical_sub_fx4,
4003 fsr_store_fx4,
4004 fmul_den2nor_m2_predict_fx4,
4005 fdiv_fdtos_den2nor_sp_fx4,
4006 fdiv_den2nor_dp_fx4,
4007 aboe_fx4,
4008 fpint_nxc_fx4,
4009 fac_rng_wr_gsr_3f}),
4010 .dout({fpc_int_sel_fx5[3:0],
4011 fpc_vis_cmp_result_fx5[3:0],
4012 int_res_sel_fx5_b2,
4013 ma_fmt_sel_fx5_b0,
4014 idiv0_trap_fx5,
4015 mulscc_iccn_fx5,
4016 mulscc_iccz_fx5,
4017 mulscc_iccv_fx5,
4018 mulscc_iccc_fx5,
4019 mulscc_xccz_fx5,
4020 idiv_xccz_fx5, idiv_iccz_fx5,
4021 idiv_iccv_fx5,
4022 fpc_exp_sel_mul_fx5,
4023 sign_inter_fx5,
4024 sign_zero_fx5,
4025 ma_sum_fx5_b10,
4026 fpc_fsr_w1_vld_fx5[1:0],
4027 fgx_instr_fx5,
4028 w1_odd32b_fx5,
4029 ma_cout_fx5,
4030 fadd_logical_sub_fx5,
4031 fsr_store_fx5,
4032 fmul_den2nor_m2_predict_fx5,
4033 fdiv_fdtos_den2nor_sp_fx5,
4034 fdiv_den2nor_dp_fx5,
4035 aboe_fx5,
4036 fpint_nxc_fx5,
4037 rng_wr_gsr_4f}),
4038 .siclk(siclk),
4039 .soclk(soclk)
4040 );
4041
4042fgu_fpc_ctl_msff_ctl_macro__width_5 fx5_04 (
4043 .scan_in(fx5_04_scanin),
4044 .scan_out(fx5_04_scanout),
4045 .l1clk(l1clk_pm1),
4046 .din (fsr_tem_fx4[4:0]),
4047 .dout(fsr_tem_fx5[4:0]),
4048 .siclk(siclk),
4049 .soclk(soclk)
4050 );
4051
4052fgu_fpc_ctl_msff_ctl_macro__width_4 fx5_05 (
4053 .scan_in(fx5_05_scanin),
4054 .scan_out(fx5_05_scanout),
4055 .l1clk(l1clk_pm1),
4056 .din ({rm_near_dp_fx4, rm_near_sp_fx4, rm_directed_dp_fx4, rm_directed_sp_fx4}),
4057 .dout({rm_near_dp_fx5, rm_near_sp_fx5, rm_directed_dp_fx5, rm_directed_sp_fx5}),
4058 .siclk(siclk),
4059 .soclk(soclk)
4060 );
4061
4062fgu_fpc_ctl_msff_ctl_macro__width_6 fx5_06 (
4063 .scan_in(fx5_06_scanin),
4064 .scan_out(fx5_06_scanout),
4065 .l1clk(l1clk_pm1),
4066 .din ({add_g_bit_sp_fx4,
4067 add_g_bit_dp_fx4,
4068 add_lsb_bit_sp_fx4,
4069 add_lsb_bit_dp_fx4,
4070 add_x_bit_sp_fx4,
4071 add_x_bit_dp_fx4}),
4072 .dout({add_g_bit_sp_fx5,
4073 add_g_bit_dp_fx5,
4074 add_lsb_bit_sp_fx5,
4075 add_lsb_bit_dp_fx5,
4076 add_x_bit_sp_fx5,
4077 add_x_bit_dp_fx5}),
4078 .siclk(siclk),
4079 .soclk(soclk)
4080 );
4081
4082fgu_fpc_ctl_msff_ctl_macro__width_4 fx5_07 (
4083 .scan_in(fx5_07_scanin),
4084 .scan_out(fx5_07_scanout),
4085 .l1clk(l1clk_pm1),
4086 .din ({inf_src_result_fx4,
4087 zero_src_result_fx4,
4088 nan_default_result_fx4,
4089 maxint_result_fx4}),
4090 .dout({inf_src_result_fx5,
4091 zero_src_result_fx5,
4092 nan_default_result_fx5,
4093 maxint_result_fx5}),
4094 .siclk(siclk),
4095 .soclk(soclk)
4096 );
4097
4098fgu_fpc_ctl_msff_ctl_macro__width_15 fx5_08 (
4099 .scan_in(fx5_08_scanin),
4100 .scan_out(fx5_08_scanout),
4101 .l1clk(l1clk_pm1),
4102 .din ({fadd_ovf_predict_fx4,
4103 fdtos_ovf_predict_fx4,
4104 fdtos_ovf_detect_fx4,
4105 fmul_ovf_predict_fx4,
4106 fmul_ovf_detect_fx4,
4107 fdiv_ovf_detect_fx4,
4108 fdtos_unf_predict_fx4,
4109 fdtos_unf_detect_fx4,
4110 fmul_unf_predict_fx4,
4111 fmul_unf_detect_fx4,
4112 fdiv_unf_detect_fx4,
4113 fdtos_guf_detect_fx4,
4114 fmul_guf_detect_fx4,
4115 fdiv_guf_detect_fx4,
4116 unfin_src_fx4}),
4117 .dout({fadd_ovf_predict_fx5,
4118 fdtos_ovf_predict_fx5,
4119 fdtos_ovf_detect_fx5,
4120 fmul_ovf_predict_fx5,
4121 fmul_ovf_detect_fx5,
4122 fdiv_ovf_detect_fx5,
4123 fdtos_unf_predict_fx5,
4124 fdtos_unf_detect_fx5,
4125 fmul_unf_predict_fx5,
4126 fmul_unf_detect_fx5,
4127 fdiv_unf_detect_fx5,
4128 fdtos_guf_detect_fx5,
4129 fmul_guf_detect_fx5,
4130 fdiv_guf_detect_fx5,
4131 unfin_src_fx5}),
4132 .siclk(siclk),
4133 .soclk(soclk)
4134 );
4135
4136fgu_fpc_ctl_msff_ctl_macro__width_8 fx5_09 (
4137 .scan_in(fx5_09_scanin),
4138 .scan_out(fx5_09_scanout),
4139 .l1clk(l1clk_pm1),
4140 .din ({fpx_unfin_vld_fx4,
4141 ns_mode_fx4,
4142 fpx_of_vld_fx4,
4143 fpx_uf_vld_fx4,
4144 fpx_nx_vld_fx4,
4145 ecc_trap_fx4,
4146 fpx_dzc_fx4,
4147 fpx_nvc_fx4}),
4148 .dout({fpx_unfin_vld_fx5,
4149 ns_mode_fx5,
4150 fpx_of_vld_fx5,
4151 fpx_uf_vld_fx5,
4152 fpx_nx_vld_fx5,
4153 ecc_trap_fx5,
4154 fpx_dzc_fx5,
4155 fpx_nvc_fx5}),
4156 .siclk(siclk),
4157 .soclk(soclk)
4158 );
4159
4160assign fpc_stfsr_en_fx3to5 =
4161 fsr_store_fx3 | i_fsr_w1_vld_fx4[1] | fpc_fsr_w1_vld_fx5[1];
4162
4163// ------------------------------------
4164// Determine if zero result
4165// - exponent related detection won't apply to fmul/fdiv/fsqrt
4166// because eadj is forced to zero
4167// ------------------------------------
4168
4169assign dp_zero_mant_fx5 =
4170 ( dtype_fx5[2:0] == 3'b001) & // DP
4171 ( fic_norm_eadj_fx5[5:4] == 2'b11 ) &
4172 ( fic_norm_eadj_fx5[2] ) &
4173 ( fic_norm_eadj_fx5[0] ) & // massive norm shift, mant bits C,63:11 are 0
4174 (~ma_sum_fx5_b10 ) & // mantissa bit 10 is zero (G)
4175 (~nan_default_result_fx5 ) & // avoid improper inf-inf=0
4176 (~inf_src_result_fx5 ) ; // avoid improper max-inf=0
4177
4178assign sp_zero_mant_fx5 =
4179 ( dtype_fx5[2:0] == 3'b000) & // SP
4180 ( fic_norm_eadj_fx5[5:0] > 6'd24 ) & // massive norm shift, mant bits C,63:40,G are 0
4181 (~nan_default_result_fx5 ) & // avoid improper inf-inf=0
4182 (~inf_src_result_fx5 ) ; // avoid improper max-inf=0
4183
4184assign zero_mant_fx5 =
4185 zero_src_result_fx5 | dp_zero_mant_fx5 | sp_zero_mant_fx5;
4186
4187// ------------------------------------
4188// floating point result sign
4189// ------------------------------------
4190
4191assign fpc_sign_fx5 =
4192 (~zero_mant_fx5 & sign_inter_fx5) |
4193 ( zero_mant_fx5 & sign_zero_fx5 ) ;
4194
4195// ------------------------------------
4196// Exponent overflow prediction & detection
4197// - does not include Rcout qualification
4198// ------------------------------------
4199
4200assign ovf_detect_inf_fx5 =
4201 ((fadd_ovf_predict_fx5 & ma_cout_fx5 ) |
4202 (fmul_ovf_predict_fx5 & fgu_mul_result_fx5[63]) |
4203 fdtos_ovf_detect_fx5 | fmul_ovf_detect_fx5 | fdiv_ovf_detect_fx5) &
4204 ( (rd_mode_fx5[1:0] == 2'b00) | // nearest
4205 ((rd_mode_fx5[1:0] == 2'b10) & ~sign_inter_fx5) | // +inf
4206 ((rd_mode_fx5[1:0] == 2'b11) & sign_inter_fx5) ); // -inf
4207
4208assign ovf_predict_inf_fx5 =
4209 (fadd_ovf_predict_fx5 | fdtos_ovf_predict_fx5 | fmul_ovf_predict_fx5) &
4210 ( (rd_mode_fx5[1:0] == 2'b00) | // nearest
4211 ((rd_mode_fx5[1:0] == 2'b10) & ~sign_inter_fx5) | // +inf
4212 ((rd_mode_fx5[1:0] == 2'b11) & sign_inter_fx5) ); // -inf
4213
4214assign ovf_detect_max_fx5 =
4215 ((fadd_ovf_predict_fx5 & ma_cout_fx5 ) |
4216 (fmul_ovf_predict_fx5 & fgu_mul_result_fx5[63]) |
4217 fdtos_ovf_detect_fx5 | fmul_ovf_detect_fx5 | fdiv_ovf_detect_fx5) &
4218 ( (rd_mode_fx5[1:0] == 2'b01) | // trunc
4219 ((rd_mode_fx5[1:0] == 2'b10) & sign_inter_fx5) | // +inf
4220 ((rd_mode_fx5[1:0] == 2'b11) & ~sign_inter_fx5) ); // -inf
4221
4222assign ovf_predict_max_fx5 =
4223 (fadd_ovf_predict_fx5 | fdtos_ovf_predict_fx5 | fmul_ovf_predict_fx5) &
4224 ( (rd_mode_fx5[1:0] == 2'b01) | // trunc
4225 ((rd_mode_fx5[1:0] == 2'b10) & sign_inter_fx5) | // +inf
4226 ((rd_mode_fx5[1:0] == 2'b11) & ~sign_inter_fx5) ); // -inf
4227
4228assign unf_detect_fx5 =
4229 fdtos_unf_detect_fx5 |
4230 fmul_unf_detect_fx5 | fdiv_unf_detect_fx5 |
4231 fdtos_guf_detect_fx5 | fmul_guf_detect_fx5 |
4232 fdiv_guf_detect_fx5;
4233
4234assign unf_predict_fx5 =
4235 fdtos_unf_predict_fx5 |
4236 (fmul_unf_predict_fx5 & ~fgu_mul_result_fx5[63]) | // FMUL Eint=Emin-1
4237 (fmul_den2nor_m2_predict_fx5 ) ; // FMUL Eint=Emin-2
4238
4239assign unfin_early_fx5 =
4240
4241 unfin_src_fx5 |
4242
4243 (fmul_unf_predict_fx5 & ~fgu_mul_result_fx5[63] & ~fpc_rinc_sel_fx5 ) | // fmul
4244 (fmul_unf_detect_fx5 & ~fmul_guf_detect_fx5 // fmul
4245 & ~fmul_den2nor_m2_predict_fx5 ) |
4246 (fmul_den2nor_m2_predict_fx5 & ~fpc_rinc_sel_fx5 ) | // fmul
4247
4248 ((fdtos_unf_predict_fx5 | fdtos_unf_detect_fx5) & // fdtos
4249 ~fdtos_guf_detect_fx5 &
4250 ~fdiv_fdtos_den2nor_sp_fx5 ) |
4251
4252 (fdiv_unf_detect_fx5 & // fdiv
4253 ~fdiv_guf_detect_fx5 &
4254 ~fdiv_fdtos_den2nor_sp_fx5 &
4255 ~fdiv_den2nor_dp_fx5 ) |
4256
4257 (~(dp_zero_mant_fx5 | sp_zero_mant_fx5) &
4258 ((~fpe_einty_adj_cout_fx5 & fadd_logical_sub_fx5 ) | // fadd/fsub eadj unf
4259 ( fpe_einty_eq_eadj_fx5 & ~fpc_rinc_sel_fx5 & fadd_logical_sub_fx5 ) )) ; // fadd/fsub eadj unf
4260
4261assign fpd_unfin_fx5 = // if (Eint=Emin & 0.1X intermediate result & 1.XX rounded result & fdiv) then override fpd_unfin
4262 div_eint_fx4[12] & // unf_predict (Eint=Emin)
4263 fdc_dec_exp_early & // decrement exp (0.1X intermediate result)
4264 ~fdd_pte_cla_early_b63 & // ~(1.XX rounded result)
4265 (fdc_finish_fltd_early | fdc_finish_flts_early) & // FDIV finished
4266 ~div_eint_fx4[15] ; // ~ns_mode
4267
4268// ------------------------------------
4269// Detect if denorm fdiv intermediate
4270// result rounds to norm
4271// ------------------------------------
4272
4273assign fdiv_den2nor_m0_fx5 =
4274 div_eint_fx4[12] & // unf_predict (Eint=Emin)
4275 fdc_dec_exp_early & // decrement exp (0.1X intermediate result)
4276 fdd_pte_cla_early_b63 & // (1.XX rounded result)
4277 (fdc_finish_fltd_early | fdc_finish_flts_early); // FDIV finished
4278
4279// ------------------------------------
4280// floating point exception fields {cexc}
4281// ------------------------------------
4282
4283assign i_fpx_ofc_fx5 = ovf_detect_inf_fx5 | ovf_detect_max_fx5;
4284
4285assign i_fpx_ufc_fx5 =
4286 unf_detect_fx5 |
4287 unf_predict_fx5 | // ufc is detected before round
4288 (~(dp_zero_mant_fx5 | sp_zero_mant_fx5) &
4289 (eadj_unf_if_norcout_fx5 | // fadd/fsub eadj unf detected before round
4290 (~fpe_einty_adj_cout_fx5 & fadd_logical_sub_fx5))); // fadd/fsub eadj unf
4291
4292// ------------------------------------
4293// Integer/Float_Constant mux selects
4294// ------------------------------------
4295
4296assign fpc_fconst_sel_fx5[0] = // SP inf
4297 (inf_src_result_fx5 |
4298 ovf_detect_inf_fx5 |
4299 ovf_predict_inf_fx5 ) & (dtype_fx5[2:0] == 3'b000);
4300
4301assign fpc_fconst_sel_fx5[1] = // DP inf
4302 (inf_src_result_fx5 |
4303 ovf_detect_inf_fx5 |
4304 ovf_predict_inf_fx5 ) & (dtype_fx5[2:0] == 3'b001);
4305
4306assign fpc_fconst_sel_fx5[2] = // SP max
4307 (ovf_detect_max_fx5 |
4308 ovf_predict_max_fx5 ) & (dtype_fx5[2:0] == 3'b000);
4309
4310assign fpc_fconst_sel_fx5[3] = // DP max
4311 (ovf_detect_max_fx5 |
4312 ovf_predict_max_fx5 ) & (dtype_fx5[2:0] == 3'b001);
4313
4314assign fpc_fconst_sel_fx5[4] = // SP/DP zero
4315 zero_mant_fx5 | unf_detect_fx5 | unf_predict_fx5 |
4316 (fadd_logical_sub_fx5 & ~fpc_int_sel_fx5[2]); // choose zero fconst in case
4317 // of eadj unf, unless default NaN
4318
4319// ------------------------------------
4320// Final result mux selects
4321// ------------------------------------
4322
4323assign fpc_result_sel_fx5[0] = fgx_instr_fx5 & w1_odd32b_fx5;
4324assign fpc_result_sel_fx5[1] = fgx_instr_fx5;
4325
4326// Note: fpc_result_sel_fx5[2] must still be conditioned during fb stage as follows:
4327// i_result_sel_fb[2] | (rcout_fb & ovf_if_rcout_fb & w1_odd32b_fb);
4328assign fpc_result_sel_fx5[2] =
4329 ((dtype_fx5[2:1] == 2'b01 ) & w1_odd32b_fx5) | // odd 32b int/const (non-float) result
4330 ( inf_src_result_fx5 & w1_odd32b_fx5) | // odd SP inf result
4331 ( nan_default_result_fx5 & w1_odd32b_fx5) | // odd SP nan result
4332 ( zero_mant_fx5 & w1_odd32b_fx5) | // odd SP zero result
4333 ( maxint_result_fx5 & w1_odd32b_fx5) | // odd maxint result
4334 ( ovf_detect_inf_fx5 & w1_odd32b_fx5) | // odd SP inf result
4335 ( ovf_detect_max_fx5 & w1_odd32b_fx5) | // odd SP max result
4336 ( unf_detect_fx5 & w1_odd32b_fx5) | // odd SP zero result
4337 ( unf_predict_fx5 & w1_odd32b_fx5) | // odd SP min result (or unfin/dont_care)
4338 ( eadj_unf_if_norcout_fx5 & w1_odd32b_fx5) | // odd SP min result (or unfin/dont_care)
4339 (~fpe_einty_adj_cout_fx5 &
4340 fadd_logical_sub_fx5 & w1_odd32b_fx5) | // odd SP zero result (eadj unf)
4341 ( fpe_einty_eq_eadj_fx5 &
4342 ~fpc_rinc_sel_fx5 &
4343 fadd_logical_sub_fx5 & w1_odd32b_fx5) ; // odd SP zero result (eadj unf)
4344
4345assign fpc_result_sel_fx5[3] =
4346 (dtype_fx5[2:0] == 3'b000) & w1_odd32b_fx5; // odd SP result
4347
4348// Note: fpc_result_sel_fx5[4] must still be conditioned during fb stage as follows:
4349// i_result_sel_fb[4] | (rcout_fb & ovf_if_rcout_fb);
4350assign fpc_result_sel_fx5[4] =
4351 ((dtype_fx5[2:1] == 2'b01) |
4352 (dtype_fx5[2:1] == 2'b10) ) | // 32b or 64b int/const (non-float) result
4353 ( inf_src_result_fx5 ) | // SP/DP inf result
4354 ( nan_default_result_fx5 ) | // SP/DP nan result
4355 ( zero_mant_fx5 ) | // SP/DP zero result
4356 ( maxint_result_fx5 ) | // maxint result
4357 ( ovf_detect_inf_fx5 ) | // SP/DP inf result
4358 ( ovf_detect_max_fx5 ) | // SP/DP max result
4359 ( unf_detect_fx5 ) | // SP/DP zero result
4360 ( unf_predict_fx5 ) | // SP/DP min result (or unfin/dont_care)
4361 ( eadj_unf_if_norcout_fx5 ) | // SP/DP min result (or unfin/dont_care)
4362 (~fpe_einty_adj_cout_fx5 &
4363 fadd_logical_sub_fx5 ) | // SP/DP zero result (eadj unf)
4364 ( fpe_einty_eq_eadj_fx5 &
4365 ~fpc_rinc_sel_fx5 &
4366 fadd_logical_sub_fx5 ) ; // SP/DP zero result (eadj unf)
4367
4368assign fpc_result_sel_fx5[5] = (dtype_fx5[2:0] == 3'b001); // DP
4369
4370// ------------------------------------
4371// Mul pipe Rinc calculation
4372// - FMUL(s,d), FsMULd
4373// - Determine if LSB should be inc due to round
4374//
4375// Rounding equations:
4376//
4377// Rinc =
4378// (near & G & (LSB | X)) |
4379// (+inf & ~sign & (G | X)) |
4380// (-inf & sign & (G | X)) ;
4381//
4382// directed =
4383// (+inf & ~sign) |
4384// (-inf & sign) ;
4385//
4386// Rinc = // nand3-nand4 delay
4387// (near & G & LSB) |
4388// (near & G & X ) |
4389// (directed & G ) |
4390// (directed & X ) ;
4391//
4392// ------------------------------------
4393
4394assign mul_fmt_1xx_fx5 =
4395 (fgu_mul_result_fx5[63] | // 1X.XX
4396 fmul_unf_predict_fx5) & // 01.XX, Eint=Emin-1, denorm inter. result may rnd to norm
4397 (itype_fx5[2:0] == 3'b101); // mul
4398
4399assign mul_fmt_01x_fx5 = // 01.XX
4400 ~fgu_mul_result_fx5[63] &
4401 ~fmul_unf_predict_fx5 &
4402 (itype_fx5[2:0] == 3'b101); // mul
4403
4404assign mul_fmt_m2_fx5 = // 11.XX, Eint=Emin-2, denorm inter. result may rnd to norm
4405 fmul_den2nor_m2_predict_fx5;
4406
4407assign mul_lsb_bit_dp_fx5 =
4408 (mul_fmt_m2_fx5 & fgu_mul_result_fx5[12] ) | // Eint=Emin-2
4409 (mul_fmt_1xx_fx5 & fgu_mul_result_fx5[11] ) | // 1X.XX or Eint=Emin-1
4410 (mul_fmt_01x_fx5 & fgu_mul_result_fx5[10] ) ; // 01.XX
4411
4412assign mul_g_bit_dp_fx5 =
4413 (mul_fmt_m2_fx5 & fgu_mul_result_fx5[11] ) | // Eint=Emin-2
4414 (mul_fmt_1xx_fx5 & fgu_mul_result_fx5[10] ) | // 1X.XX or Eint=Emin-1
4415 (mul_fmt_01x_fx5 & fgu_mul_result_fx5[9] ) ; // 01.XX
4416
4417assign mul_x_bit_dp_fx5 =
4418 (mul_fmt_m2_fx5 & ( fgu_mul_result_fx5[10] | // Eint=Emin-2
4419 fgu_mul_result_fx5[9] |
4420 fpy_sticky_dp_fx5 )) |
4421 (mul_fmt_1xx_fx5 & ( fgu_mul_result_fx5[9] | // 1X.XX or Eint=Emin-1
4422 fpy_sticky_dp_fx5 )) |
4423 (mul_fmt_01x_fx5 & ( fpy_sticky_dp_fx5 )) ; // 01.XX
4424
4425assign mul_lsb_bit_sp_fx5 =
4426 (mul_fmt_m2_fx5 & fgu_mul_result_fx5[41] ) | // Eint=Emin-2
4427 (mul_fmt_1xx_fx5 & fgu_mul_result_fx5[40] ) | // 1X.XX or Eint=Emin-1
4428 (mul_fmt_01x_fx5 & fgu_mul_result_fx5[39] ) ; // 01.XX
4429
4430assign mul_g_bit_sp_fx5 =
4431 (mul_fmt_m2_fx5 & fgu_mul_result_fx5[40] ) | // Eint=Emin-2
4432 (mul_fmt_1xx_fx5 & fgu_mul_result_fx5[39] ) | // 1X.XX or Eint=Emin-1
4433 (mul_fmt_01x_fx5 & fgu_mul_result_fx5[38] ) ; // 01.XX
4434
4435assign mul_x_bit_sp_fx5 =
4436 (mul_fmt_m2_fx5 & ( fgu_mul_result_fx5[39] | // Eint=Emin-2
4437 fgu_mul_result_fx5[38] |
4438 fpy_sticky_sp_fx5 )) |
4439 (mul_fmt_1xx_fx5 & ( fgu_mul_result_fx5[38] | // 1X.XX or Eint=Emin-1
4440 fpy_sticky_sp_fx5 )) |
4441 (mul_fmt_01x_fx5 & ( fpy_sticky_sp_fx5 )) ; // 01.XX
4442
4443assign mul_rinc_dp_fx5 =
4444 (rm_near_dp_fx5 & mul_g_bit_dp_fx5 & mul_lsb_bit_dp_fx5) |
4445 (rm_near_dp_fx5 & mul_g_bit_dp_fx5 & mul_x_bit_dp_fx5) |
4446 (rm_directed_dp_fx5 & mul_g_bit_dp_fx5 ) |
4447 (rm_directed_dp_fx5 & mul_x_bit_dp_fx5) ;
4448
4449assign mul_rinc_sp_fx5 =
4450 (rm_near_sp_fx5 & mul_g_bit_sp_fx5 & mul_lsb_bit_sp_fx5) |
4451 (rm_near_sp_fx5 & mul_g_bit_sp_fx5 & mul_x_bit_sp_fx5) |
4452 (rm_directed_sp_fx5 & mul_g_bit_sp_fx5 ) |
4453 (rm_directed_sp_fx5 & mul_x_bit_sp_fx5) ;
4454
4455assign mul_rinc_sel_fx5 = mul_rinc_dp_fx5 | mul_rinc_sp_fx5;
4456
4457// ------------------------------------
4458// Add pipe Rinc calculation
4459// - FADD(s,d), FSUB(s,d), FiTOs, FxTO(s,d), FdTOs
4460// - Determine if LSB should be inc due to round
4461//
4462// Rounding equations:
4463//
4464// Rinc =
4465// (near & G & (LSB | X)) |
4466// (+inf & ~sign & (G | X)) |
4467// (-inf & sign & (G | X)) ;
4468//
4469// directed =
4470// (+inf & ~sign) |
4471// (-inf & sign) ;
4472//
4473// Rinc = // nand3-nand4 delay
4474// (near & G & LSB) |
4475// (near & G & X ) |
4476// (directed & G ) |
4477// (directed & X ) ;
4478//
4479// ------------------------------------
4480
4481assign add_rinc_dp_fx5 =
4482 (rm_near_dp_fx5 & add_g_bit_dp_fx5 & add_lsb_bit_dp_fx5) |
4483 (rm_near_dp_fx5 & add_g_bit_dp_fx5 & add_x_bit_dp_fx5) |
4484 (rm_directed_dp_fx5 & add_g_bit_dp_fx5 ) |
4485 (rm_directed_dp_fx5 & add_x_bit_dp_fx5) ;
4486
4487assign add_rinc_sp_fx5 =
4488 (rm_near_sp_fx5 & add_g_bit_sp_fx5 & add_lsb_bit_sp_fx5) |
4489 (rm_near_sp_fx5 & add_g_bit_sp_fx5 & add_x_bit_sp_fx5) |
4490 (rm_directed_sp_fx5 & add_g_bit_sp_fx5 ) |
4491 (rm_directed_sp_fx5 & add_x_bit_sp_fx5) ;
4492
4493assign add_rinc_sel_fx5 = add_rinc_dp_fx5 | add_rinc_sp_fx5;
4494
4495assign fpc_rinc_sel_fx5 = add_rinc_sel_fx5 | mul_rinc_sel_fx5;
4496
4497assign fpc_q_rinc_sel_fx5 =
4498 mul_rinc_sel_fx5 |
4499 (add_rinc_sel_fx5 & ~ma_fmt_sel_fx5_b0); // ~logical_sub 00.1X
4500
4501assign ovf_if_rcout_fx5 =
4502 fpc_rinc_sel_fx5 &
4503 (fadd_ovf_predict_fx5 |
4504 fdtos_ovf_predict_fx5 |
4505 fmul_ovf_predict_fx5 );
4506
4507assign fpc_ovf_if_rcout_fx5[1] = ovf_if_rcout_fx5;
4508assign fpc_ovf_if_rcout_fx5[0] = ovf_if_rcout_fx5 & w1_odd32b_fx5;
4509
4510assign fmul_unf_if_nocorl_fx5 = // No C or L, where C=Rcout, L=implied_bit
4511 (fmul_unf_predict_fx5 & ~fgu_mul_result_fx5[63]) | fmul_den2nor_m2_predict_fx5;
4512
4513assign fmul_unf_if_nocorl_sp_fx5 =
4514 fmul_unf_if_nocorl_fx5 & ~dtype_fx5[0] & fpc_rinc_sel_fx5;
4515
4516assign fmul_unf_if_nocorl_dp_fx5 =
4517 fmul_unf_if_nocorl_fx5 & dtype_fx5[0] & fpc_rinc_sel_fx5;
4518
4519assign eadj_unf_if_norcout_fx5 =
4520 fpe_einty_eq_eadj_fx5 & fadd_logical_sub_fx5;
4521
4522// ------------------------------------
4523// Inexact result calculation
4524// - inexact = G | (R | X)
4525// - must force inexact to zero if nan, otherwise
4526// a propagating nan may signal inexact
4527// - must force inexact to zero if inf source, otherwise
4528// inexact may by improperly signaled
4529// - unfin_src will set inexact flag if ~unfinished_FPop, independent of ns_mode
4530// ------------------------------------
4531
4532assign i_fpx_nxc_fx5 =
4533
4534 fpx_nx_vld_fx5 &
4535 ~(aboe_fx5 & ~(itype_fx5[2:0] == 3'b011)) & // sources aren't ones exp (inf or nan) if ~intfp
4536
4537 (((dtype_fx5[2:0] == 3'b000) & // sp
4538 (add_g_bit_sp_fx5 | add_x_bit_sp_fx5 | mul_g_bit_sp_fx5 | mul_x_bit_sp_fx5)) |
4539 ((dtype_fx5[2:0] == 3'b001) & // dp
4540 (add_g_bit_dp_fx5 | add_x_bit_dp_fx5 | mul_g_bit_dp_fx5 | mul_x_bit_dp_fx5)) |
4541
4542 fdtos_guf_detect_fx5 | fmul_guf_detect_fx5 | fdiv_guf_detect_fx5 |
4543 unfin_src_fx5 |
4544 fpint_nxc_fx5);
4545
4546// ------------------------------------
4547// icc/xcc final result mux
4548// ------------------------------------
4549
4550assign fgu_exu_icc_fx5[3:0] = // icc cond code {N,Z,V,C}
4551 ({4{ div_finish_int_fb}} & {fdd_result[31], // idiv icc.n
4552 idiv_iccz_fx5, // idiv icc.z
4553 idiv_iccv_fx5, // idiv icc.v
4554 1'b0 }) | // idiv icc.c
4555 ({4{~div_finish_int_fb &
4556 int_res_sel_fx5_b2}} & {mulscc_iccn_fx5, // mulscc icc.n
4557 mulscc_iccz_fx5, // mulscc icc.z
4558 mulscc_iccv_fx5, // mulscc icc.v
4559 mulscc_iccc_fx5 }) | // mulscc icc.c
4560 ({4{~div_finish_int_fb &
4561 ~int_res_sel_fx5_b2}} & {fgu_mul_result_fx5[31], // imul icc.n
4562 fpy_xicc_z_fx5[0], // imul icc.z
4563 1'b0, // imul icc.v
4564 1'b0 }) ; // imul icc.c
4565
4566assign fgu_exu_xcc_fx5[1:0] = // xcc cond code {N,Z}
4567 ({2{ div_finish_int_fb}} & {fdd_result[63], // idiv xcc.n
4568 idiv_xccz_fx5 }) | // idiv xcc.z
4569 ({2{~div_finish_int_fb &
4570 int_res_sel_fx5_b2}} & {1'b0, // mulscc xcc.n
4571 mulscc_xccz_fx5 }) | // mulscc xcc.z
4572 ({2{~div_finish_int_fb &
4573 ~int_res_sel_fx5_b2}} & {fgu_mul_result_fx5[63], // imul xcc.n
4574 fpy_xicc_z_fx5[1] }) ; // imul xcc.z
4575
4576
4577// ----------------------------------------------------------------------------
4578// FB stage
4579// ----------------------------------------------------------------------------
4580
4581fgu_fpc_ctl_msff_ctl_macro__width_16 fb_00 (
4582 .scan_in(fb_00_scanin),
4583 .scan_out(fb_00_scanout),
4584 .l1clk(l1clk_pm1),
4585 .din ({fcc_fx5[1:0],
4586 idiv0_trap_fx5,
4587 ovf_if_rcout_fx5,
4588 fmul_unf_if_nocorl_sp_fx5,
4589 fmul_unf_if_nocorl_dp_fx5,
4590 fmul_unf_if_nocorl_fx5,
4591 eadj_unf_if_norcout_fx5,
4592 fpf_implied_bit_fx5,
4593 fsr_store_fx5,
4594 fac_dec_valid_noflush_fx5,
4595 sp_zero_mant_fx5,
4596 dp_zero_mant_fx5,
4597 fdc_finish_fltd_early,
4598 fdc_finish_flts_early,
4599 fdc_finish_int_early}),
4600 .dout({fcc_fb[1:0],
4601 idiv0_trap_fb,
4602 ovf_if_rcout_fb,
4603 fmul_unf_if_nocorl_sp_fb,
4604 fmul_unf_if_nocorl_dp_fb,
4605 fmul_unf_if_nocorl_fb,
4606 eadj_unf_if_norcout_fb,
4607 implied_bit_fb,
4608 fsr_store_fb,
4609 dec_valid_noflush_fb,
4610 sp_zero_mant_fb,
4611 dp_zero_mant_fb,
4612 div_finish_fltd_fb,
4613 div_finish_flts_fb,
4614 div_finish_int_fb}),
4615 .siclk(siclk),
4616 .soclk(soclk)
4617 );
4618
4619fgu_fpc_ctl_msff_ctl_macro__width_3 fb_01 (
4620 .scan_in(fb_01_scanin),
4621 .scan_out(fb_01_scanout),
4622 .l1clk(l1clk_pm1),
4623 .din ({ w1_vld_fx5[1:0], fpc_sign_fx5}),
4624 .dout({i_w1_vld_fb[1:0], fpc_sign_fb }),
4625 .siclk(siclk),
4626 .soclk(soclk)
4627 );
4628
4629fgu_fpc_ctl_msff_ctl_macro__width_16 fb_03 (
4630 .scan_in(fb_03_scanin),
4631 .scan_out(fb_03_scanout),
4632 .l1clk(l1clk_pm1),
4633 .din ({fpx_unfin_vld_fx5,
4634 ns_mode_fx5,
4635 unfin_early_fx5,
4636 fpd_unfin_fx5,
4637 fpx_of_vld_fx5,
4638 fpx_uf_vld_fx5,
4639 ecc_trap_fx5,
4640 fpx_dzc_fx5,
4641 fpx_nvc_fx5,
4642 i_fpx_ofc_fx5,
4643 i_fpx_ufc_fx5,
4644 i_fpx_nxc_fx5,
4645 fdiv_fdtos_den2nor_sp_fx5,
4646 fdiv_den2nor_dp_fx5,
4647 fdiv_den2nor_m0_fx5,
4648 fdc_dec_exp_early}),
4649 .dout({fpx_unfin_vld_fb,
4650 ns_mode_fb,
4651 unfin_early_fb,
4652 fpc_fpd_unfin_fb,
4653 fpx_of_vld_fb,
4654 fpx_uf_vld_fb,
4655 ecc_trap_fb,
4656 fpx_dzc_fb,
4657 fpx_nvc_fb,
4658 i_fpx_ofc_fb,
4659 i_fpx_ufc_fb,
4660 i_fpx_nxc_fb,
4661 fdiv_fdtos_den2nor_sp_fb,
4662 fdiv_den2nor_dp_fb,
4663 fdiv_den2nor_m0_fb,
4664 div_dec_exp_fb}),
4665 .siclk(siclk),
4666 .soclk(soclk)
4667 );
4668
4669fgu_fpc_ctl_msff_ctl_macro__width_5 fb_04 (
4670 .scan_in(fb_04_scanin),
4671 .scan_out(fb_04_scanout),
4672 .l1clk(l1clk_pm1),
4673 .din (fsr_tem_fx5[4:0]),
4674 .dout(fsr_tem_fb[4:0]),
4675 .siclk(siclk),
4676 .soclk(soclk)
4677 );
4678
4679fgu_fpc_ctl_msff_ctl_macro__width_13 fb_05 (
4680 .scan_in(fb_05_scanin),
4681 .scan_out(fb_05_scanout),
4682 .l1clk(l1clk_pm1),
4683 .din ({ fpd_exp_res[10:1], fpd_exp_res[0], fpd_const_sel[1:0]}),
4684 .dout({fpc_fpd_exp_res[10:1], i_fpc_fpd_exp_res_b0, fpc_fpd_const_sel[1:0]}),
4685 .siclk(siclk),
4686 .soclk(soclk)
4687 );
4688
4689assign fpc_fpd_exp_res[0] = i_fpc_fpd_exp_res_b0 | fdiv_den2nor_m0_fb;
4690
4691assign fpc_den2nor_sp_fb = // 32b min result
4692 fdiv_fdtos_den2nor_sp_fb |
4693 ((fpf_rcout_fb | implied_bit_fb) & fmul_unf_if_nocorl_sp_fb);
4694
4695assign fpc_den2nor_dp_fb = // 64b min result
4696 fdiv_den2nor_dp_fb |
4697 ((fpf_rcout_fb | implied_bit_fb) & fmul_unf_if_nocorl_dp_fb);
4698
4699// ------------------------------------
4700// Determine if unfinished_FPop trap
4701// ------------------------------------
4702
4703assign fpc_fpx_unfin_fb =
4704 ~ecc_trap_fb &
4705 dec_valid_noflush_fb &
4706 fpx_unfin_vld_fb &
4707 ~ns_mode_fb &
4708 (unfin_early_fb |
4709 (~fpf_rcout_fb & ~implied_bit_fb & fmul_unf_if_nocorl_fb) | // fmul
4710 (~fpf_rcout_fb & eadj_unf_if_norcout_fb & // fadd/fsub eadj unf
4711 ~(dp_zero_mant_fb | sp_zero_mant_fb)) );
4712
4713// ------------------------------------
4714// floating point exception fields {ftt,aexc,cexc}
4715// - must clear FSR.ofc (FSR.ufc) if overflow (underflow) exception traps
4716// and FSR.OFM (FSR.UFM) is not set and FSR.NXM is set
4717// - must clear FSR.nxc if overflow (underflow) exception does trap
4718// because FSR.OFM (FSR.UFM) is set, regardless of whether FSR.NXM is set
4719// ------------------------------------
4720
4721assign fpd_fsr_ofm_fb = div_eint_fx4[18];
4722assign fpd_fsr_ufm_fb = div_eint_fx4[17];
4723assign fpd_fsr_nxm_fb = div_eint_fx4[16];
4724
4725assign fpx_ofc_fb =
4726 ~(~fsr_tem_fb[3] & fsr_tem_fb[0]) & // disabled of and enabled nx
4727 fpx_of_vld_fb &
4728 (i_fpx_ofc_fb | (fpf_rcout_fb & ovf_if_rcout_fb));
4729
4730assign fpx_ufc_fb =
4731 ~(~fsr_tem_fb[2] & fsr_tem_fb[0]) & // disabled uf and enabled nx
4732 fpx_uf_vld_fb &
4733 ~fpc_fpx_unfin_fb &
4734 i_fpx_ufc_fb;
4735
4736assign fpx_nxc_fb =
4737 ~((fpx_ofc_fb & fsr_tem_fb[3]) | (fpx_ufc_fb & fsr_tem_fb[2])) & // enabled of or enabled uf
4738 ((~fpc_fpx_unfin_fb & i_fpx_nxc_fb) | // inexact
4739 (fpx_of_vld_fb & // of
4740 (i_fpx_ofc_fb | (fpf_rcout_fb & ovf_if_rcout_fb))) |
4741 (fpx_uf_vld_fb & // uf
4742 ~fpc_fpx_unfin_fb &
4743 i_fpx_ufc_fb) );
4744
4745assign fpd_ofc_fb = // fdiv_ovf_predict => detect
4746 ~(~fpd_fsr_ofm_fb & fpd_fsr_nxm_fb) & // disabled of and enabled nx
4747 ((|div_eint_fx4[14:13] & ~div_dec_exp_fb) & (div_finish_fltd_fb | div_finish_flts_fb));
4748
4749assign fpd_ufc_fb = // fdiv_unf_predict => detect
4750 ~(~fpd_fsr_ufm_fb & fpd_fsr_nxm_fb) & // disabled of and enabled nx
4751 ~fpc_fpd_unfin_fb &
4752 (( div_eint_fx4[12] & div_dec_exp_fb) & (div_finish_fltd_fb | div_finish_flts_fb));
4753
4754assign fpd_nxc_fb =
4755 ~((fpd_ofc_fb & fpd_fsr_ofm_fb) | (fpd_ufc_fb & fpd_fsr_ufm_fb)) & // enabled of or enabled uf
4756 ~fpc_fpd_unfin_fb &
4757 ((fdc_flt_inexact & (div_finish_fltd_fb | div_finish_flts_fb)) | // inexact
4758 ((|div_eint_fx4[14:13] & ~div_dec_exp_fb) & (div_finish_fltd_fb | div_finish_flts_fb)) | // of
4759 (( div_eint_fx4[12] & div_dec_exp_fb) & (div_finish_fltd_fb | div_finish_flts_fb)) ); // uf
4760
4761assign fpx_ieee_trap_fb = // FPX enabled ieee 754 exception detected
4762 ~ecc_trap_fb &
4763 dec_valid_noflush_fb &
4764 (( fsr_tem_fb[4] & fpx_nvc_fb) |
4765 ( fsr_tem_fb[3] & fpx_ofc_fb) |
4766 ( fsr_tem_fb[2] & fpx_ufc_fb) |
4767 ( fsr_tem_fb[1] & fpx_dzc_fb) |
4768 ( fsr_tem_fb[0] & fpx_nxc_fb) );
4769
4770assign fpc_fpd_ieee_trap_fb = // FPD enabled ieee 754 exception detected
4771 ((fpd_fsr_ofm_fb & fpd_ofc_fb) |
4772 (fpd_fsr_ufm_fb & fpd_ufc_fb) |
4773 (fpd_fsr_nxm_fb & fpd_nxc_fb) );
4774
4775// 0in bits_on -max 1 -var { fpx_ieee_trap_fb, fpc_fpx_unfin_fb}
4776// 0in bits_on -max 1 -var {fpc_fpd_ieee_trap_fb, fpc_fpd_unfin_fb}
4777
4778assign fpx_ftt_fb[1:0] =
4779 ({2{ fpx_ieee_trap_fb}} & 2'd1) | // IEEE_754_exception
4780 ({2{fpc_fpx_unfin_fb }} & 2'd2) ; // unfinished_FPop
4781
4782assign fpd_ftt_fb[1:0] =
4783 ({2{fpc_fpd_ieee_trap_fb}} & 2'd1) | // IEEE_754_exception
4784 ({2{fpc_fpd_unfin_fb }} & 2'd2) ; // unfinished_FPop
4785
4786assign fpx_aexc_fb[4:0] =
4787 {( ~fsr_tem_fb[4] & fpx_nvc_fb), // nva
4788 ( ~fsr_tem_fb[3] & fpx_ofc_fb), // ofa
4789 ( ~fsr_tem_fb[2] & fpx_ufc_fb), // ufa
4790 ( ~fsr_tem_fb[1] & fpx_dzc_fb), // dza
4791 ( ~fsr_tem_fb[0] & fpx_nxc_fb) }; // nxa
4792
4793assign fpd_aexc_fb[4:0] =
4794 {1'b0, // nva
4795 (~fpd_fsr_ofm_fb & fpd_ofc_fb), // ofa
4796 (~fpd_fsr_ufm_fb & fpd_ufc_fb), // ufa
4797 1'b0, // dza
4798 (~fpd_fsr_nxm_fb & fpd_nxc_fb) }; // nxa
4799
4800assign fsr_w1_result_fb[11:0] =
4801 // ST(X)FSR clears ftt, {aexc,cexc} aren't written by ST(X)FSR because those enables are off
4802 {(fpx_ftt_fb[1:0] & {2{~fsr_store_fb}}),
4803 fpx_aexc_fb[4:0],
4804 fpx_nvc_fb,
4805 fpx_ofc_fb,
4806 fpx_ufc_fb,
4807 fpx_dzc_fb,
4808 fpx_nxc_fb};
4809
4810assign fsr_w2_result_fb[11:0] =
4811 {fpd_ftt_fb[1:0],
4812 fpd_aexc_fb[4:0],
4813 1'b0, // fpd nvc always uses w1 port
4814 fpd_ofc_fb,
4815 fpd_ufc_fb,
4816 1'b0, // fpd dzc always uses w1 port
4817 fpd_nxc_fb};
4818
4819assign fpc_w1_vld_fb[1:0] =
4820 {2{~mbist_run_1f &
4821 ~fpx_ieee_trap_fb &
4822 ~fpc_fpx_unfin_fb }} & i_w1_vld_fb[1:0];
4823
4824// 0in custom -fire ((|fpc_w1_vld_fb[1:0]) & (fpx_ieee_trap_fb | fpc_fpx_unfin_fb)) -message "FRF written during FP trap"
4825// 0in custom -fire (($0in_delay((|fpc_fcc_vld_fx5[3:0]),1)) & (fpx_ieee_trap_fb | fpc_fpx_unfin_fb)) -message "FSR.fcc written during FP trap"
4826
4827assign fpc_w1_ul_vld_fb = |fpc_w1_vld_fb[1:0];
4828
4829
4830// ----------------------------------------------------------------------------
4831// FW stage
4832// ----------------------------------------------------------------------------
4833
4834fgu_fpc_ctl_msff_ctl_macro__width_31 fw_00 (
4835 .scan_in(fw_00_scanin),
4836 .scan_out(fw_00_scanout),
4837 .l1clk(l1clk_pm1),
4838 .din ({ fpx_ieee_trap_fb,
4839 fpc_fpd_ieee_trap_fb,
4840 fpc_fpx_unfin_fb,
4841 fpc_fpd_unfin_fb,
4842 idiv0_trap_fb,
4843 fcc_fb[1:0],
4844 fsr_w1_result_fb[11:0],
4845 fsr_w2_result_fb[11:0]}),
4846 .dout({fgu_fpx_ieee_trap_fw,
4847 fgu_fpd_ieee_trap_fw,
4848 fgu_fpx_unfin_fw,
4849 fgu_fpd_unfin_fw,
4850 fgu_fpd_idiv0_trap_fw,
4851 fpc_fcc_fw[1:0],
4852 fpc_fsr_w1_result_fw[11:0],
4853 fpc_fsr_w2_result_fw[11:0]}),
4854 .siclk(siclk),
4855 .soclk(soclk)
4856 );
4857
4858
4859supply0 vss;
4860supply1 vdd;
4861// fixscan start:
4862assign spares_scanin = scan_in ;
4863assign e_00_scanin = spares_scanout ;
4864assign fx1_00_scanin = e_00_scanout ;
4865assign fx1_01_scanin = fx1_00_scanout ;
4866assign fx2_00_scanin = fx1_01_scanout ;
4867assign fx2_01_scanin = fx2_00_scanout ;
4868assign fx2_02_scanin = fx2_01_scanout ;
4869assign fx2_03_scanin = fx2_02_scanout ;
4870assign fx2_04_scanin = fx2_03_scanout ;
4871assign fx2_05_scanin = fx2_04_scanout ;
4872assign fx2_06_scanin = fx2_05_scanout ;
4873assign fx2_07_scanin = fx2_06_scanout ;
4874assign fx2_08_scanin = fx2_07_scanout ;
4875assign fx3_00_scanin = fx2_08_scanout ;
4876assign fx3_01_scanin = fx3_00_scanout ;
4877assign fx3_02_scanin = fx3_01_scanout ;
4878assign fx3_03_scanin = fx3_02_scanout ;
4879assign fx3_04_scanin = fx3_03_scanout ;
4880assign fx3_05_scanin = fx3_04_scanout ;
4881assign fx3_06_scanin = fx3_05_scanout ;
4882assign fx3_07_scanin = fx3_06_scanout ;
4883assign fx3_08_scanin = fx3_07_scanout ;
4884assign fx3_09_scanin = fx3_08_scanout ;
4885assign fx3_10_scanin = fx3_09_scanout ;
4886assign fx4_00_scanin = fx3_10_scanout ;
4887assign fx4_01_scanin = fx4_00_scanout ;
4888assign fx4_02_scanin = fx4_01_scanout ;
4889assign fx4_03_scanin = fx4_02_scanout ;
4890assign fx4_04_scanin = fx4_03_scanout ;
4891assign fx4_05_scanin = fx4_04_scanout ;
4892assign fx4_06_scanin = fx4_05_scanout ;
4893assign fx4_08_scanin = fx4_06_scanout ;
4894assign fx4_09_scanin = fx4_08_scanout ;
4895assign fx4_10_scanin = fx4_09_scanout ;
4896assign fx4_11_scanin = fx4_10_scanout ;
4897assign fx5_00_scanin = fx4_11_scanout ;
4898assign fx5_01_scanin = fx5_00_scanout ;
4899assign fx5_02_scanin = fx5_01_scanout ;
4900assign fx5_04_scanin = fx5_02_scanout ;
4901assign fx5_05_scanin = fx5_04_scanout ;
4902assign fx5_06_scanin = fx5_05_scanout ;
4903assign fx5_07_scanin = fx5_06_scanout ;
4904assign fx5_08_scanin = fx5_07_scanout ;
4905assign fx5_09_scanin = fx5_08_scanout ;
4906assign fb_00_scanin = fx5_09_scanout ;
4907assign fb_01_scanin = fb_00_scanout ;
4908assign fb_03_scanin = fb_01_scanout ;
4909assign fb_04_scanin = fb_03_scanout ;
4910assign fb_05_scanin = fb_04_scanout ;
4911assign fw_00_scanin = fb_05_scanout ;
4912assign scan_out = fw_00_scanout ;
4913
4914assign fx4_07_wmr_scanin = wmr_scan_in ;
4915assign wmr_scan_out = fx4_07_wmr_scanout ;
4916// fixscan end:
4917endmodule // fgu_fpc_ctl
4918
4919
4920
4921
4922
4923
4924// any PARAMS parms go into naming of macro
4925
4926module fgu_fpc_ctl_l1clkhdr_ctl_macro (
4927 l2clk,
4928 l1en,
4929 pce_ov,
4930 stop,
4931 se,
4932 l1clk);
4933
4934
4935 input l2clk;
4936 input l1en;
4937 input pce_ov;
4938 input stop;
4939 input se;
4940 output l1clk;
4941
4942
4943
4944
4945
4946cl_sc1_l1hdr_8x c_0 (
4947
4948
4949 .l2clk(l2clk),
4950 .pce(l1en),
4951 .l1clk(l1clk),
4952 .se(se),
4953 .pce_ov(pce_ov),
4954 .stop(stop)
4955);
4956
4957
4958
4959endmodule
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969// Description: Spare gate macro for control blocks
4970//
4971// Param num controls the number of times the macro is added
4972// flops=0 can be used to use only combination spare logic
4973
4974
4975module fgu_fpc_ctl_spare_ctl_macro__num_9 (
4976 l1clk,
4977 scan_in,
4978 siclk,
4979 soclk,
4980 scan_out);
4981wire si_0;
4982wire so_0;
4983wire spare0_flop_unused;
4984wire spare0_buf_32x_unused;
4985wire spare0_nand3_8x_unused;
4986wire spare0_inv_8x_unused;
4987wire spare0_aoi22_4x_unused;
4988wire spare0_buf_8x_unused;
4989wire spare0_oai22_4x_unused;
4990wire spare0_inv_16x_unused;
4991wire spare0_nand2_16x_unused;
4992wire spare0_nor3_4x_unused;
4993wire spare0_nand2_8x_unused;
4994wire spare0_buf_16x_unused;
4995wire spare0_nor2_16x_unused;
4996wire spare0_inv_32x_unused;
4997wire si_1;
4998wire so_1;
4999wire spare1_flop_unused;
5000wire spare1_buf_32x_unused;
5001wire spare1_nand3_8x_unused;
5002wire spare1_inv_8x_unused;
5003wire spare1_aoi22_4x_unused;
5004wire spare1_buf_8x_unused;
5005wire spare1_oai22_4x_unused;
5006wire spare1_inv_16x_unused;
5007wire spare1_nand2_16x_unused;
5008wire spare1_nor3_4x_unused;
5009wire spare1_nand2_8x_unused;
5010wire spare1_buf_16x_unused;
5011wire spare1_nor2_16x_unused;
5012wire spare1_inv_32x_unused;
5013wire si_2;
5014wire so_2;
5015wire spare2_flop_unused;
5016wire spare2_buf_32x_unused;
5017wire spare2_nand3_8x_unused;
5018wire spare2_inv_8x_unused;
5019wire spare2_aoi22_4x_unused;
5020wire spare2_buf_8x_unused;
5021wire spare2_oai22_4x_unused;
5022wire spare2_inv_16x_unused;
5023wire spare2_nand2_16x_unused;
5024wire spare2_nor3_4x_unused;
5025wire spare2_nand2_8x_unused;
5026wire spare2_buf_16x_unused;
5027wire spare2_nor2_16x_unused;
5028wire spare2_inv_32x_unused;
5029wire si_3;
5030wire so_3;
5031wire spare3_flop_unused;
5032wire spare3_buf_32x_unused;
5033wire spare3_nand3_8x_unused;
5034wire spare3_inv_8x_unused;
5035wire spare3_aoi22_4x_unused;
5036wire spare3_buf_8x_unused;
5037wire spare3_oai22_4x_unused;
5038wire spare3_inv_16x_unused;
5039wire spare3_nand2_16x_unused;
5040wire spare3_nor3_4x_unused;
5041wire spare3_nand2_8x_unused;
5042wire spare3_buf_16x_unused;
5043wire spare3_nor2_16x_unused;
5044wire spare3_inv_32x_unused;
5045wire si_4;
5046wire so_4;
5047wire spare4_flop_unused;
5048wire spare4_buf_32x_unused;
5049wire spare4_nand3_8x_unused;
5050wire spare4_inv_8x_unused;
5051wire spare4_aoi22_4x_unused;
5052wire spare4_buf_8x_unused;
5053wire spare4_oai22_4x_unused;
5054wire spare4_inv_16x_unused;
5055wire spare4_nand2_16x_unused;
5056wire spare4_nor3_4x_unused;
5057wire spare4_nand2_8x_unused;
5058wire spare4_buf_16x_unused;
5059wire spare4_nor2_16x_unused;
5060wire spare4_inv_32x_unused;
5061wire si_5;
5062wire so_5;
5063wire spare5_flop_unused;
5064wire spare5_buf_32x_unused;
5065wire spare5_nand3_8x_unused;
5066wire spare5_inv_8x_unused;
5067wire spare5_aoi22_4x_unused;
5068wire spare5_buf_8x_unused;
5069wire spare5_oai22_4x_unused;
5070wire spare5_inv_16x_unused;
5071wire spare5_nand2_16x_unused;
5072wire spare5_nor3_4x_unused;
5073wire spare5_nand2_8x_unused;
5074wire spare5_buf_16x_unused;
5075wire spare5_nor2_16x_unused;
5076wire spare5_inv_32x_unused;
5077wire si_6;
5078wire so_6;
5079wire spare6_flop_unused;
5080wire spare6_buf_32x_unused;
5081wire spare6_nand3_8x_unused;
5082wire spare6_inv_8x_unused;
5083wire spare6_aoi22_4x_unused;
5084wire spare6_buf_8x_unused;
5085wire spare6_oai22_4x_unused;
5086wire spare6_inv_16x_unused;
5087wire spare6_nand2_16x_unused;
5088wire spare6_nor3_4x_unused;
5089wire spare6_nand2_8x_unused;
5090wire spare6_buf_16x_unused;
5091wire spare6_nor2_16x_unused;
5092wire spare6_inv_32x_unused;
5093wire si_7;
5094wire so_7;
5095wire spare7_flop_unused;
5096wire spare7_buf_32x_unused;
5097wire spare7_nand3_8x_unused;
5098wire spare7_inv_8x_unused;
5099wire spare7_aoi22_4x_unused;
5100wire spare7_buf_8x_unused;
5101wire spare7_oai22_4x_unused;
5102wire spare7_inv_16x_unused;
5103wire spare7_nand2_16x_unused;
5104wire spare7_nor3_4x_unused;
5105wire spare7_nand2_8x_unused;
5106wire spare7_buf_16x_unused;
5107wire spare7_nor2_16x_unused;
5108wire spare7_inv_32x_unused;
5109wire si_8;
5110wire so_8;
5111wire spare8_flop_unused;
5112wire spare8_buf_32x_unused;
5113wire spare8_nand3_8x_unused;
5114wire spare8_inv_8x_unused;
5115wire spare8_aoi22_4x_unused;
5116wire spare8_buf_8x_unused;
5117wire spare8_oai22_4x_unused;
5118wire spare8_inv_16x_unused;
5119wire spare8_nand2_16x_unused;
5120wire spare8_nor3_4x_unused;
5121wire spare8_nand2_8x_unused;
5122wire spare8_buf_16x_unused;
5123wire spare8_nor2_16x_unused;
5124wire spare8_inv_32x_unused;
5125
5126
5127input l1clk;
5128input scan_in;
5129input siclk;
5130input soclk;
5131output scan_out;
5132
5133cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
5134 .siclk(siclk),
5135 .soclk(soclk),
5136 .si(si_0),
5137 .so(so_0),
5138 .d(1'b0),
5139 .q(spare0_flop_unused));
5140assign si_0 = scan_in;
5141
5142cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
5143 .out(spare0_buf_32x_unused));
5144cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
5145 .in1(1'b1),
5146 .in2(1'b1),
5147 .out(spare0_nand3_8x_unused));
5148cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
5149 .out(spare0_inv_8x_unused));
5150cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
5151 .in01(1'b1),
5152 .in10(1'b1),
5153 .in11(1'b1),
5154 .out(spare0_aoi22_4x_unused));
5155cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
5156 .out(spare0_buf_8x_unused));
5157cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
5158 .in01(1'b1),
5159 .in10(1'b1),
5160 .in11(1'b1),
5161 .out(spare0_oai22_4x_unused));
5162cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
5163 .out(spare0_inv_16x_unused));
5164cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
5165 .in1(1'b1),
5166 .out(spare0_nand2_16x_unused));
5167cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
5168 .in1(1'b0),
5169 .in2(1'b0),
5170 .out(spare0_nor3_4x_unused));
5171cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
5172 .in1(1'b1),
5173 .out(spare0_nand2_8x_unused));
5174cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
5175 .out(spare0_buf_16x_unused));
5176cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
5177 .in1(1'b0),
5178 .out(spare0_nor2_16x_unused));
5179cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
5180 .out(spare0_inv_32x_unused));
5181
5182cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
5183 .siclk(siclk),
5184 .soclk(soclk),
5185 .si(si_1),
5186 .so(so_1),
5187 .d(1'b0),
5188 .q(spare1_flop_unused));
5189assign si_1 = so_0;
5190
5191cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
5192 .out(spare1_buf_32x_unused));
5193cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
5194 .in1(1'b1),
5195 .in2(1'b1),
5196 .out(spare1_nand3_8x_unused));
5197cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
5198 .out(spare1_inv_8x_unused));
5199cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
5200 .in01(1'b1),
5201 .in10(1'b1),
5202 .in11(1'b1),
5203 .out(spare1_aoi22_4x_unused));
5204cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
5205 .out(spare1_buf_8x_unused));
5206cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
5207 .in01(1'b1),
5208 .in10(1'b1),
5209 .in11(1'b1),
5210 .out(spare1_oai22_4x_unused));
5211cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
5212 .out(spare1_inv_16x_unused));
5213cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
5214 .in1(1'b1),
5215 .out(spare1_nand2_16x_unused));
5216cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
5217 .in1(1'b0),
5218 .in2(1'b0),
5219 .out(spare1_nor3_4x_unused));
5220cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
5221 .in1(1'b1),
5222 .out(spare1_nand2_8x_unused));
5223cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
5224 .out(spare1_buf_16x_unused));
5225cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
5226 .in1(1'b0),
5227 .out(spare1_nor2_16x_unused));
5228cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
5229 .out(spare1_inv_32x_unused));
5230
5231cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
5232 .siclk(siclk),
5233 .soclk(soclk),
5234 .si(si_2),
5235 .so(so_2),
5236 .d(1'b0),
5237 .q(spare2_flop_unused));
5238assign si_2 = so_1;
5239
5240cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
5241 .out(spare2_buf_32x_unused));
5242cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
5243 .in1(1'b1),
5244 .in2(1'b1),
5245 .out(spare2_nand3_8x_unused));
5246cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
5247 .out(spare2_inv_8x_unused));
5248cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
5249 .in01(1'b1),
5250 .in10(1'b1),
5251 .in11(1'b1),
5252 .out(spare2_aoi22_4x_unused));
5253cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
5254 .out(spare2_buf_8x_unused));
5255cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
5256 .in01(1'b1),
5257 .in10(1'b1),
5258 .in11(1'b1),
5259 .out(spare2_oai22_4x_unused));
5260cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
5261 .out(spare2_inv_16x_unused));
5262cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
5263 .in1(1'b1),
5264 .out(spare2_nand2_16x_unused));
5265cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
5266 .in1(1'b0),
5267 .in2(1'b0),
5268 .out(spare2_nor3_4x_unused));
5269cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
5270 .in1(1'b1),
5271 .out(spare2_nand2_8x_unused));
5272cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
5273 .out(spare2_buf_16x_unused));
5274cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
5275 .in1(1'b0),
5276 .out(spare2_nor2_16x_unused));
5277cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
5278 .out(spare2_inv_32x_unused));
5279
5280cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
5281 .siclk(siclk),
5282 .soclk(soclk),
5283 .si(si_3),
5284 .so(so_3),
5285 .d(1'b0),
5286 .q(spare3_flop_unused));
5287assign si_3 = so_2;
5288
5289cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
5290 .out(spare3_buf_32x_unused));
5291cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
5292 .in1(1'b1),
5293 .in2(1'b1),
5294 .out(spare3_nand3_8x_unused));
5295cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
5296 .out(spare3_inv_8x_unused));
5297cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
5298 .in01(1'b1),
5299 .in10(1'b1),
5300 .in11(1'b1),
5301 .out(spare3_aoi22_4x_unused));
5302cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
5303 .out(spare3_buf_8x_unused));
5304cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
5305 .in01(1'b1),
5306 .in10(1'b1),
5307 .in11(1'b1),
5308 .out(spare3_oai22_4x_unused));
5309cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
5310 .out(spare3_inv_16x_unused));
5311cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
5312 .in1(1'b1),
5313 .out(spare3_nand2_16x_unused));
5314cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
5315 .in1(1'b0),
5316 .in2(1'b0),
5317 .out(spare3_nor3_4x_unused));
5318cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
5319 .in1(1'b1),
5320 .out(spare3_nand2_8x_unused));
5321cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
5322 .out(spare3_buf_16x_unused));
5323cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
5324 .in1(1'b0),
5325 .out(spare3_nor2_16x_unused));
5326cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
5327 .out(spare3_inv_32x_unused));
5328
5329cl_sc1_msff_8x spare4_flop (.l1clk(l1clk),
5330 .siclk(siclk),
5331 .soclk(soclk),
5332 .si(si_4),
5333 .so(so_4),
5334 .d(1'b0),
5335 .q(spare4_flop_unused));
5336assign si_4 = so_3;
5337
5338cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
5339 .out(spare4_buf_32x_unused));
5340cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
5341 .in1(1'b1),
5342 .in2(1'b1),
5343 .out(spare4_nand3_8x_unused));
5344cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
5345 .out(spare4_inv_8x_unused));
5346cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
5347 .in01(1'b1),
5348 .in10(1'b1),
5349 .in11(1'b1),
5350 .out(spare4_aoi22_4x_unused));
5351cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
5352 .out(spare4_buf_8x_unused));
5353cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
5354 .in01(1'b1),
5355 .in10(1'b1),
5356 .in11(1'b1),
5357 .out(spare4_oai22_4x_unused));
5358cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
5359 .out(spare4_inv_16x_unused));
5360cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
5361 .in1(1'b1),
5362 .out(spare4_nand2_16x_unused));
5363cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
5364 .in1(1'b0),
5365 .in2(1'b0),
5366 .out(spare4_nor3_4x_unused));
5367cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
5368 .in1(1'b1),
5369 .out(spare4_nand2_8x_unused));
5370cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
5371 .out(spare4_buf_16x_unused));
5372cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
5373 .in1(1'b0),
5374 .out(spare4_nor2_16x_unused));
5375cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
5376 .out(spare4_inv_32x_unused));
5377
5378cl_sc1_msff_8x spare5_flop (.l1clk(l1clk),
5379 .siclk(siclk),
5380 .soclk(soclk),
5381 .si(si_5),
5382 .so(so_5),
5383 .d(1'b0),
5384 .q(spare5_flop_unused));
5385assign si_5 = so_4;
5386
5387cl_u1_buf_32x spare5_buf_32x (.in(1'b1),
5388 .out(spare5_buf_32x_unused));
5389cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1),
5390 .in1(1'b1),
5391 .in2(1'b1),
5392 .out(spare5_nand3_8x_unused));
5393cl_u1_inv_8x spare5_inv_8x (.in(1'b1),
5394 .out(spare5_inv_8x_unused));
5395cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1),
5396 .in01(1'b1),
5397 .in10(1'b1),
5398 .in11(1'b1),
5399 .out(spare5_aoi22_4x_unused));
5400cl_u1_buf_8x spare5_buf_8x (.in(1'b1),
5401 .out(spare5_buf_8x_unused));
5402cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1),
5403 .in01(1'b1),
5404 .in10(1'b1),
5405 .in11(1'b1),
5406 .out(spare5_oai22_4x_unused));
5407cl_u1_inv_16x spare5_inv_16x (.in(1'b1),
5408 .out(spare5_inv_16x_unused));
5409cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1),
5410 .in1(1'b1),
5411 .out(spare5_nand2_16x_unused));
5412cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0),
5413 .in1(1'b0),
5414 .in2(1'b0),
5415 .out(spare5_nor3_4x_unused));
5416cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1),
5417 .in1(1'b1),
5418 .out(spare5_nand2_8x_unused));
5419cl_u1_buf_16x spare5_buf_16x (.in(1'b1),
5420 .out(spare5_buf_16x_unused));
5421cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0),
5422 .in1(1'b0),
5423 .out(spare5_nor2_16x_unused));
5424cl_u1_inv_32x spare5_inv_32x (.in(1'b1),
5425 .out(spare5_inv_32x_unused));
5426
5427cl_sc1_msff_8x spare6_flop (.l1clk(l1clk),
5428 .siclk(siclk),
5429 .soclk(soclk),
5430 .si(si_6),
5431 .so(so_6),
5432 .d(1'b0),
5433 .q(spare6_flop_unused));
5434assign si_6 = so_5;
5435
5436cl_u1_buf_32x spare6_buf_32x (.in(1'b1),
5437 .out(spare6_buf_32x_unused));
5438cl_u1_nand3_8x spare6_nand3_8x (.in0(1'b1),
5439 .in1(1'b1),
5440 .in2(1'b1),
5441 .out(spare6_nand3_8x_unused));
5442cl_u1_inv_8x spare6_inv_8x (.in(1'b1),
5443 .out(spare6_inv_8x_unused));
5444cl_u1_aoi22_4x spare6_aoi22_4x (.in00(1'b1),
5445 .in01(1'b1),
5446 .in10(1'b1),
5447 .in11(1'b1),
5448 .out(spare6_aoi22_4x_unused));
5449cl_u1_buf_8x spare6_buf_8x (.in(1'b1),
5450 .out(spare6_buf_8x_unused));
5451cl_u1_oai22_4x spare6_oai22_4x (.in00(1'b1),
5452 .in01(1'b1),
5453 .in10(1'b1),
5454 .in11(1'b1),
5455 .out(spare6_oai22_4x_unused));
5456cl_u1_inv_16x spare6_inv_16x (.in(1'b1),
5457 .out(spare6_inv_16x_unused));
5458cl_u1_nand2_16x spare6_nand2_16x (.in0(1'b1),
5459 .in1(1'b1),
5460 .out(spare6_nand2_16x_unused));
5461cl_u1_nor3_4x spare6_nor3_4x (.in0(1'b0),
5462 .in1(1'b0),
5463 .in2(1'b0),
5464 .out(spare6_nor3_4x_unused));
5465cl_u1_nand2_8x spare6_nand2_8x (.in0(1'b1),
5466 .in1(1'b1),
5467 .out(spare6_nand2_8x_unused));
5468cl_u1_buf_16x spare6_buf_16x (.in(1'b1),
5469 .out(spare6_buf_16x_unused));
5470cl_u1_nor2_16x spare6_nor2_16x (.in0(1'b0),
5471 .in1(1'b0),
5472 .out(spare6_nor2_16x_unused));
5473cl_u1_inv_32x spare6_inv_32x (.in(1'b1),
5474 .out(spare6_inv_32x_unused));
5475
5476cl_sc1_msff_8x spare7_flop (.l1clk(l1clk),
5477 .siclk(siclk),
5478 .soclk(soclk),
5479 .si(si_7),
5480 .so(so_7),
5481 .d(1'b0),
5482 .q(spare7_flop_unused));
5483assign si_7 = so_6;
5484
5485cl_u1_buf_32x spare7_buf_32x (.in(1'b1),
5486 .out(spare7_buf_32x_unused));
5487cl_u1_nand3_8x spare7_nand3_8x (.in0(1'b1),
5488 .in1(1'b1),
5489 .in2(1'b1),
5490 .out(spare7_nand3_8x_unused));
5491cl_u1_inv_8x spare7_inv_8x (.in(1'b1),
5492 .out(spare7_inv_8x_unused));
5493cl_u1_aoi22_4x spare7_aoi22_4x (.in00(1'b1),
5494 .in01(1'b1),
5495 .in10(1'b1),
5496 .in11(1'b1),
5497 .out(spare7_aoi22_4x_unused));
5498cl_u1_buf_8x spare7_buf_8x (.in(1'b1),
5499 .out(spare7_buf_8x_unused));
5500cl_u1_oai22_4x spare7_oai22_4x (.in00(1'b1),
5501 .in01(1'b1),
5502 .in10(1'b1),
5503 .in11(1'b1),
5504 .out(spare7_oai22_4x_unused));
5505cl_u1_inv_16x spare7_inv_16x (.in(1'b1),
5506 .out(spare7_inv_16x_unused));
5507cl_u1_nand2_16x spare7_nand2_16x (.in0(1'b1),
5508 .in1(1'b1),
5509 .out(spare7_nand2_16x_unused));
5510cl_u1_nor3_4x spare7_nor3_4x (.in0(1'b0),
5511 .in1(1'b0),
5512 .in2(1'b0),
5513 .out(spare7_nor3_4x_unused));
5514cl_u1_nand2_8x spare7_nand2_8x (.in0(1'b1),
5515 .in1(1'b1),
5516 .out(spare7_nand2_8x_unused));
5517cl_u1_buf_16x spare7_buf_16x (.in(1'b1),
5518 .out(spare7_buf_16x_unused));
5519cl_u1_nor2_16x spare7_nor2_16x (.in0(1'b0),
5520 .in1(1'b0),
5521 .out(spare7_nor2_16x_unused));
5522cl_u1_inv_32x spare7_inv_32x (.in(1'b1),
5523 .out(spare7_inv_32x_unused));
5524
5525cl_sc1_msff_8x spare8_flop (.l1clk(l1clk),
5526 .siclk(siclk),
5527 .soclk(soclk),
5528 .si(si_8),
5529 .so(so_8),
5530 .d(1'b0),
5531 .q(spare8_flop_unused));
5532assign si_8 = so_7;
5533
5534cl_u1_buf_32x spare8_buf_32x (.in(1'b1),
5535 .out(spare8_buf_32x_unused));
5536cl_u1_nand3_8x spare8_nand3_8x (.in0(1'b1),
5537 .in1(1'b1),
5538 .in2(1'b1),
5539 .out(spare8_nand3_8x_unused));
5540cl_u1_inv_8x spare8_inv_8x (.in(1'b1),
5541 .out(spare8_inv_8x_unused));
5542cl_u1_aoi22_4x spare8_aoi22_4x (.in00(1'b1),
5543 .in01(1'b1),
5544 .in10(1'b1),
5545 .in11(1'b1),
5546 .out(spare8_aoi22_4x_unused));
5547cl_u1_buf_8x spare8_buf_8x (.in(1'b1),
5548 .out(spare8_buf_8x_unused));
5549cl_u1_oai22_4x spare8_oai22_4x (.in00(1'b1),
5550 .in01(1'b1),
5551 .in10(1'b1),
5552 .in11(1'b1),
5553 .out(spare8_oai22_4x_unused));
5554cl_u1_inv_16x spare8_inv_16x (.in(1'b1),
5555 .out(spare8_inv_16x_unused));
5556cl_u1_nand2_16x spare8_nand2_16x (.in0(1'b1),
5557 .in1(1'b1),
5558 .out(spare8_nand2_16x_unused));
5559cl_u1_nor3_4x spare8_nor3_4x (.in0(1'b0),
5560 .in1(1'b0),
5561 .in2(1'b0),
5562 .out(spare8_nor3_4x_unused));
5563cl_u1_nand2_8x spare8_nand2_8x (.in0(1'b1),
5564 .in1(1'b1),
5565 .out(spare8_nand2_8x_unused));
5566cl_u1_buf_16x spare8_buf_16x (.in(1'b1),
5567 .out(spare8_buf_16x_unused));
5568cl_u1_nor2_16x spare8_nor2_16x (.in0(1'b0),
5569 .in1(1'b0),
5570 .out(spare8_nor2_16x_unused));
5571cl_u1_inv_32x spare8_inv_32x (.in(1'b1),
5572 .out(spare8_inv_32x_unused));
5573assign scan_out = so_8;
5574
5575
5576
5577endmodule
5578
5579
5580
5581
5582
5583
5584// any PARAMS parms go into naming of macro
5585
5586module fgu_fpc_ctl_msff_ctl_macro__width_3 (
5587 din,
5588 l1clk,
5589 scan_in,
5590 siclk,
5591 soclk,
5592 dout,
5593 scan_out);
5594wire [2:0] fdin;
5595wire [1:0] so;
5596
5597 input [2:0] din;
5598 input l1clk;
5599 input scan_in;
5600
5601
5602 input siclk;
5603 input soclk;
5604
5605 output [2:0] dout;
5606 output scan_out;
5607assign fdin[2:0] = din[2:0];
5608
5609
5610
5611
5612
5613
5614dff #(3) d0_0 (
5615.l1clk(l1clk),
5616.siclk(siclk),
5617.soclk(soclk),
5618.d(fdin[2:0]),
5619.si({scan_in,so[1:0]}),
5620.so({so[1:0],scan_out}),
5621.q(dout[2:0])
5622);
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635endmodule
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649// any PARAMS parms go into naming of macro
5650
5651module fgu_fpc_ctl_msff_ctl_macro__width_2 (
5652 din,
5653 l1clk,
5654 scan_in,
5655 siclk,
5656 soclk,
5657 dout,
5658 scan_out);
5659wire [1:0] fdin;
5660wire [0:0] so;
5661
5662 input [1:0] din;
5663 input l1clk;
5664 input scan_in;
5665
5666
5667 input siclk;
5668 input soclk;
5669
5670 output [1:0] dout;
5671 output scan_out;
5672assign fdin[1:0] = din[1:0];
5673
5674
5675
5676
5677
5678
5679dff #(2) d0_0 (
5680.l1clk(l1clk),
5681.siclk(siclk),
5682.soclk(soclk),
5683.d(fdin[1:0]),
5684.si({scan_in,so[0:0]}),
5685.so({so[0:0],scan_out}),
5686.q(dout[1:0])
5687);
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700endmodule
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714// any PARAMS parms go into naming of macro
5715
5716module fgu_fpc_ctl_msff_ctl_macro__width_8 (
5717 din,
5718 l1clk,
5719 scan_in,
5720 siclk,
5721 soclk,
5722 dout,
5723 scan_out);
5724wire [7:0] fdin;
5725wire [6:0] so;
5726
5727 input [7:0] din;
5728 input l1clk;
5729 input scan_in;
5730
5731
5732 input siclk;
5733 input soclk;
5734
5735 output [7:0] dout;
5736 output scan_out;
5737assign fdin[7:0] = din[7:0];
5738
5739
5740
5741
5742
5743
5744dff #(8) d0_0 (
5745.l1clk(l1clk),
5746.siclk(siclk),
5747.soclk(soclk),
5748.d(fdin[7:0]),
5749.si({scan_in,so[6:0]}),
5750.so({so[6:0],scan_out}),
5751.q(dout[7:0])
5752);
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765endmodule
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779// any PARAMS parms go into naming of macro
5780
5781module fgu_fpc_ctl_msff_ctl_macro__width_51 (
5782 din,
5783 l1clk,
5784 scan_in,
5785 siclk,
5786 soclk,
5787 dout,
5788 scan_out);
5789wire [50:0] fdin;
5790wire [49:0] so;
5791
5792 input [50:0] din;
5793 input l1clk;
5794 input scan_in;
5795
5796
5797 input siclk;
5798 input soclk;
5799
5800 output [50:0] dout;
5801 output scan_out;
5802assign fdin[50:0] = din[50:0];
5803
5804
5805
5806
5807
5808
5809dff #(51) d0_0 (
5810.l1clk(l1clk),
5811.siclk(siclk),
5812.soclk(soclk),
5813.d(fdin[50:0]),
5814.si({scan_in,so[49:0]}),
5815.so({so[49:0],scan_out}),
5816.q(dout[50:0])
5817);
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830endmodule
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844// any PARAMS parms go into naming of macro
5845
5846module fgu_fpc_ctl_msff_ctl_macro__width_14 (
5847 din,
5848 l1clk,
5849 scan_in,
5850 siclk,
5851 soclk,
5852 dout,
5853 scan_out);
5854wire [13:0] fdin;
5855wire [12:0] so;
5856
5857 input [13:0] din;
5858 input l1clk;
5859 input scan_in;
5860
5861
5862 input siclk;
5863 input soclk;
5864
5865 output [13:0] dout;
5866 output scan_out;
5867assign fdin[13:0] = din[13:0];
5868
5869
5870
5871
5872
5873
5874dff #(14) d0_0 (
5875.l1clk(l1clk),
5876.siclk(siclk),
5877.soclk(soclk),
5878.d(fdin[13:0]),
5879.si({scan_in,so[12:0]}),
5880.so({so[12:0],scan_out}),
5881.q(dout[13:0])
5882);
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895endmodule
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909// any PARAMS parms go into naming of macro
5910
5911module fgu_fpc_ctl_msff_ctl_macro__width_17 (
5912 din,
5913 l1clk,
5914 scan_in,
5915 siclk,
5916 soclk,
5917 dout,
5918 scan_out);
5919wire [16:0] fdin;
5920wire [15:0] so;
5921
5922 input [16:0] din;
5923 input l1clk;
5924 input scan_in;
5925
5926
5927 input siclk;
5928 input soclk;
5929
5930 output [16:0] dout;
5931 output scan_out;
5932assign fdin[16:0] = din[16:0];
5933
5934
5935
5936
5937
5938
5939dff #(17) d0_0 (
5940.l1clk(l1clk),
5941.siclk(siclk),
5942.soclk(soclk),
5943.d(fdin[16:0]),
5944.si({scan_in,so[15:0]}),
5945.so({so[15:0],scan_out}),
5946.q(dout[16:0])
5947);
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960endmodule
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974// any PARAMS parms go into naming of macro
5975
5976module fgu_fpc_ctl_msff_ctl_macro__width_4 (
5977 din,
5978 l1clk,
5979 scan_in,
5980 siclk,
5981 soclk,
5982 dout,
5983 scan_out);
5984wire [3:0] fdin;
5985wire [2:0] so;
5986
5987 input [3:0] din;
5988 input l1clk;
5989 input scan_in;
5990
5991
5992 input siclk;
5993 input soclk;
5994
5995 output [3:0] dout;
5996 output scan_out;
5997assign fdin[3:0] = din[3:0];
5998
5999
6000
6001
6002
6003
6004dff #(4) d0_0 (
6005.l1clk(l1clk),
6006.siclk(siclk),
6007.soclk(soclk),
6008.d(fdin[3:0]),
6009.si({scan_in,so[2:0]}),
6010.so({so[2:0],scan_out}),
6011.q(dout[3:0])
6012);
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025endmodule
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039// any PARAMS parms go into naming of macro
6040
6041module fgu_fpc_ctl_msff_ctl_macro__width_6 (
6042 din,
6043 l1clk,
6044 scan_in,
6045 siclk,
6046 soclk,
6047 dout,
6048 scan_out);
6049wire [5:0] fdin;
6050wire [4:0] so;
6051
6052 input [5:0] din;
6053 input l1clk;
6054 input scan_in;
6055
6056
6057 input siclk;
6058 input soclk;
6059
6060 output [5:0] dout;
6061 output scan_out;
6062assign fdin[5:0] = din[5:0];
6063
6064
6065
6066
6067
6068
6069dff #(6) d0_0 (
6070.l1clk(l1clk),
6071.siclk(siclk),
6072.soclk(soclk),
6073.d(fdin[5:0]),
6074.si({scan_in,so[4:0]}),
6075.so({so[4:0],scan_out}),
6076.q(dout[5:0])
6077);
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090endmodule
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104// any PARAMS parms go into naming of macro
6105
6106module fgu_fpc_ctl_msff_ctl_macro__width_7 (
6107 din,
6108 l1clk,
6109 scan_in,
6110 siclk,
6111 soclk,
6112 dout,
6113 scan_out);
6114wire [6:0] fdin;
6115wire [5:0] so;
6116
6117 input [6:0] din;
6118 input l1clk;
6119 input scan_in;
6120
6121
6122 input siclk;
6123 input soclk;
6124
6125 output [6:0] dout;
6126 output scan_out;
6127assign fdin[6:0] = din[6:0];
6128
6129
6130
6131
6132
6133
6134dff #(7) d0_0 (
6135.l1clk(l1clk),
6136.siclk(siclk),
6137.soclk(soclk),
6138.d(fdin[6:0]),
6139.si({scan_in,so[5:0]}),
6140.so({so[5:0],scan_out}),
6141.q(dout[6:0])
6142);
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155endmodule
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169// any PARAMS parms go into naming of macro
6170
6171module fgu_fpc_ctl_msff_ctl_macro__width_20 (
6172 din,
6173 l1clk,
6174 scan_in,
6175 siclk,
6176 soclk,
6177 dout,
6178 scan_out);
6179wire [19:0] fdin;
6180wire [18:0] so;
6181
6182 input [19:0] din;
6183 input l1clk;
6184 input scan_in;
6185
6186
6187 input siclk;
6188 input soclk;
6189
6190 output [19:0] dout;
6191 output scan_out;
6192assign fdin[19:0] = din[19:0];
6193
6194
6195
6196
6197
6198
6199dff #(20) d0_0 (
6200.l1clk(l1clk),
6201.siclk(siclk),
6202.soclk(soclk),
6203.d(fdin[19:0]),
6204.si({scan_in,so[18:0]}),
6205.so({so[18:0],scan_out}),
6206.q(dout[19:0])
6207);
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220endmodule
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234// any PARAMS parms go into naming of macro
6235
6236module fgu_fpc_ctl_msff_ctl_macro__width_15 (
6237 din,
6238 l1clk,
6239 scan_in,
6240 siclk,
6241 soclk,
6242 dout,
6243 scan_out);
6244wire [14:0] fdin;
6245wire [13:0] so;
6246
6247 input [14:0] din;
6248 input l1clk;
6249 input scan_in;
6250
6251
6252 input siclk;
6253 input soclk;
6254
6255 output [14:0] dout;
6256 output scan_out;
6257assign fdin[14:0] = din[14:0];
6258
6259
6260
6261
6262
6263
6264dff #(15) d0_0 (
6265.l1clk(l1clk),
6266.siclk(siclk),
6267.soclk(soclk),
6268.d(fdin[14:0]),
6269.si({scan_in,so[13:0]}),
6270.so({so[13:0],scan_out}),
6271.q(dout[14:0])
6272);
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285endmodule
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299// any PARAMS parms go into naming of macro
6300
6301module fgu_fpc_ctl_msff_ctl_macro__width_13 (
6302 din,
6303 l1clk,
6304 scan_in,
6305 siclk,
6306 soclk,
6307 dout,
6308 scan_out);
6309wire [12:0] fdin;
6310wire [11:0] so;
6311
6312 input [12:0] din;
6313 input l1clk;
6314 input scan_in;
6315
6316
6317 input siclk;
6318 input soclk;
6319
6320 output [12:0] dout;
6321 output scan_out;
6322assign fdin[12:0] = din[12:0];
6323
6324
6325
6326
6327
6328
6329dff #(13) d0_0 (
6330.l1clk(l1clk),
6331.siclk(siclk),
6332.soclk(soclk),
6333.d(fdin[12:0]),
6334.si({scan_in,so[11:0]}),
6335.so({so[11:0],scan_out}),
6336.q(dout[12:0])
6337);
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350endmodule
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364// any PARAMS parms go into naming of macro
6365
6366module fgu_fpc_ctl_msff_ctl_macro__width_5 (
6367 din,
6368 l1clk,
6369 scan_in,
6370 siclk,
6371 soclk,
6372 dout,
6373 scan_out);
6374wire [4:0] fdin;
6375wire [3:0] so;
6376
6377 input [4:0] din;
6378 input l1clk;
6379 input scan_in;
6380
6381
6382 input siclk;
6383 input soclk;
6384
6385 output [4:0] dout;
6386 output scan_out;
6387assign fdin[4:0] = din[4:0];
6388
6389
6390
6391
6392
6393
6394dff #(5) d0_0 (
6395.l1clk(l1clk),
6396.siclk(siclk),
6397.soclk(soclk),
6398.d(fdin[4:0]),
6399.si({scan_in,so[3:0]}),
6400.so({so[3:0],scan_out}),
6401.q(dout[4:0])
6402);
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415endmodule
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429// any PARAMS parms go into naming of macro
6430
6431module fgu_fpc_ctl_msff_ctl_macro__width_10 (
6432 din,
6433 l1clk,
6434 scan_in,
6435 siclk,
6436 soclk,
6437 dout,
6438 scan_out);
6439wire [9:0] fdin;
6440wire [8:0] so;
6441
6442 input [9:0] din;
6443 input l1clk;
6444 input scan_in;
6445
6446
6447 input siclk;
6448 input soclk;
6449
6450 output [9:0] dout;
6451 output scan_out;
6452assign fdin[9:0] = din[9:0];
6453
6454
6455
6456
6457
6458
6459dff #(10) d0_0 (
6460.l1clk(l1clk),
6461.siclk(siclk),
6462.soclk(soclk),
6463.d(fdin[9:0]),
6464.si({scan_in,so[8:0]}),
6465.so({so[8:0],scan_out}),
6466.q(dout[9:0])
6467);
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480endmodule
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494// any PARAMS parms go into naming of macro
6495
6496module fgu_fpc_ctl_msff_ctl_macro__width_28 (
6497 din,
6498 l1clk,
6499 scan_in,
6500 siclk,
6501 soclk,
6502 dout,
6503 scan_out);
6504wire [27:0] fdin;
6505wire [26:0] so;
6506
6507 input [27:0] din;
6508 input l1clk;
6509 input scan_in;
6510
6511
6512 input siclk;
6513 input soclk;
6514
6515 output [27:0] dout;
6516 output scan_out;
6517assign fdin[27:0] = din[27:0];
6518
6519
6520
6521
6522
6523
6524dff #(28) d0_0 (
6525.l1clk(l1clk),
6526.siclk(siclk),
6527.soclk(soclk),
6528.d(fdin[27:0]),
6529.si({scan_in,so[26:0]}),
6530.so({so[26:0],scan_out}),
6531.q(dout[27:0])
6532);
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545endmodule
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559// any PARAMS parms go into naming of macro
6560
6561module fgu_fpc_ctl_msff_ctl_macro__width_18 (
6562 din,
6563 l1clk,
6564 scan_in,
6565 siclk,
6566 soclk,
6567 dout,
6568 scan_out);
6569wire [17:0] fdin;
6570wire [16:0] so;
6571
6572 input [17:0] din;
6573 input l1clk;
6574 input scan_in;
6575
6576
6577 input siclk;
6578 input soclk;
6579
6580 output [17:0] dout;
6581 output scan_out;
6582assign fdin[17:0] = din[17:0];
6583
6584
6585
6586
6587
6588
6589dff #(18) d0_0 (
6590.l1clk(l1clk),
6591.siclk(siclk),
6592.soclk(soclk),
6593.d(fdin[17:0]),
6594.si({scan_in,so[16:0]}),
6595.so({so[16:0],scan_out}),
6596.q(dout[17:0])
6597);
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610endmodule
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624// any PARAMS parms go into naming of macro
6625
6626module fgu_fpc_ctl_msff_ctl_macro__width_16 (
6627 din,
6628 l1clk,
6629 scan_in,
6630 siclk,
6631 soclk,
6632 dout,
6633 scan_out);
6634wire [15:0] fdin;
6635wire [14:0] so;
6636
6637 input [15:0] din;
6638 input l1clk;
6639 input scan_in;
6640
6641
6642 input siclk;
6643 input soclk;
6644
6645 output [15:0] dout;
6646 output scan_out;
6647assign fdin[15:0] = din[15:0];
6648
6649
6650
6651
6652
6653
6654dff #(16) d0_0 (
6655.l1clk(l1clk),
6656.siclk(siclk),
6657.soclk(soclk),
6658.d(fdin[15:0]),
6659.si({scan_in,so[14:0]}),
6660.so({so[14:0],scan_out}),
6661.q(dout[15:0])
6662);
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675endmodule
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689// any PARAMS parms go into naming of macro
6690
6691module fgu_fpc_ctl_msff_ctl_macro__width_37 (
6692 din,
6693 l1clk,
6694 scan_in,
6695 siclk,
6696 soclk,
6697 dout,
6698 scan_out);
6699wire [36:0] fdin;
6700wire [35:0] so;
6701
6702 input [36:0] din;
6703 input l1clk;
6704 input scan_in;
6705
6706
6707 input siclk;
6708 input soclk;
6709
6710 output [36:0] dout;
6711 output scan_out;
6712assign fdin[36:0] = din[36:0];
6713
6714
6715
6716
6717
6718
6719dff #(37) d0_0 (
6720.l1clk(l1clk),
6721.siclk(siclk),
6722.soclk(soclk),
6723.d(fdin[36:0]),
6724.si({scan_in,so[35:0]}),
6725.so({so[35:0],scan_out}),
6726.q(dout[36:0])
6727);
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740endmodule
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754// any PARAMS parms go into naming of macro
6755
6756module fgu_fpc_ctl_msff_ctl_macro__width_38 (
6757 din,
6758 l1clk,
6759 scan_in,
6760 siclk,
6761 soclk,
6762 dout,
6763 scan_out);
6764wire [37:0] fdin;
6765wire [36:0] so;
6766
6767 input [37:0] din;
6768 input l1clk;
6769 input scan_in;
6770
6771
6772 input siclk;
6773 input soclk;
6774
6775 output [37:0] dout;
6776 output scan_out;
6777assign fdin[37:0] = din[37:0];
6778
6779
6780
6781
6782
6783
6784dff #(38) d0_0 (
6785.l1clk(l1clk),
6786.siclk(siclk),
6787.soclk(soclk),
6788.d(fdin[37:0]),
6789.si({scan_in,so[36:0]}),
6790.so({so[36:0],scan_out}),
6791.q(dout[37:0])
6792);
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805endmodule
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819// any PARAMS parms go into naming of macro
6820
6821module fgu_fpc_ctl_msff_ctl_macro__width_88 (
6822 din,
6823 l1clk,
6824 scan_in,
6825 siclk,
6826 soclk,
6827 dout,
6828 scan_out);
6829wire [87:0] fdin;
6830wire [86:0] so;
6831
6832 input [87:0] din;
6833 input l1clk;
6834 input scan_in;
6835
6836
6837 input siclk;
6838 input soclk;
6839
6840 output [87:0] dout;
6841 output scan_out;
6842assign fdin[87:0] = din[87:0];
6843
6844
6845
6846
6847
6848
6849dff #(88) d0_0 (
6850.l1clk(l1clk),
6851.siclk(siclk),
6852.soclk(soclk),
6853.d(fdin[87:0]),
6854.si({scan_in,so[86:0]}),
6855.so({so[86:0],scan_out}),
6856.q(dout[87:0])
6857);
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870endmodule
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884// any PARAMS parms go into naming of macro
6885
6886module fgu_fpc_ctl_msff_ctl_macro__width_11 (
6887 din,
6888 l1clk,
6889 scan_in,
6890 siclk,
6891 soclk,
6892 dout,
6893 scan_out);
6894wire [10:0] fdin;
6895wire [9:0] so;
6896
6897 input [10:0] din;
6898 input l1clk;
6899 input scan_in;
6900
6901
6902 input siclk;
6903 input soclk;
6904
6905 output [10:0] dout;
6906 output scan_out;
6907assign fdin[10:0] = din[10:0];
6908
6909
6910
6911
6912
6913
6914dff #(11) d0_0 (
6915.l1clk(l1clk),
6916.siclk(siclk),
6917.soclk(soclk),
6918.d(fdin[10:0]),
6919.si({scan_in,so[9:0]}),
6920.so({so[9:0],scan_out}),
6921.q(dout[10:0])
6922);
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935endmodule
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949// any PARAMS parms go into naming of macro
6950
6951module fgu_fpc_ctl_msff_ctl_macro__width_1 (
6952 din,
6953 l1clk,
6954 scan_in,
6955 siclk,
6956 soclk,
6957 dout,
6958 scan_out);
6959wire [0:0] fdin;
6960
6961 input [0:0] din;
6962 input l1clk;
6963 input scan_in;
6964
6965
6966 input siclk;
6967 input soclk;
6968
6969 output [0:0] dout;
6970 output scan_out;
6971assign fdin[0:0] = din[0:0];
6972
6973
6974
6975
6976
6977
6978dff #(1) d0_0 (
6979.l1clk(l1clk),
6980.siclk(siclk),
6981.soclk(soclk),
6982.d(fdin[0:0]),
6983.si(scan_in),
6984.so(scan_out),
6985.q(dout[0:0])
6986);
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999endmodule
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013// any PARAMS parms go into naming of macro
7014
7015module fgu_fpc_ctl_msff_ctl_macro__width_19 (
7016 din,
7017 l1clk,
7018 scan_in,
7019 siclk,
7020 soclk,
7021 dout,
7022 scan_out);
7023wire [18:0] fdin;
7024wire [17:0] so;
7025
7026 input [18:0] din;
7027 input l1clk;
7028 input scan_in;
7029
7030
7031 input siclk;
7032 input soclk;
7033
7034 output [18:0] dout;
7035 output scan_out;
7036assign fdin[18:0] = din[18:0];
7037
7038
7039
7040
7041
7042
7043dff #(19) d0_0 (
7044.l1clk(l1clk),
7045.siclk(siclk),
7046.soclk(soclk),
7047.d(fdin[18:0]),
7048.si({scan_in,so[17:0]}),
7049.so({so[17:0],scan_out}),
7050.q(dout[18:0])
7051);
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064endmodule
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078// any PARAMS parms go into naming of macro
7079
7080module fgu_fpc_ctl_msff_ctl_macro__width_36 (
7081 din,
7082 l1clk,
7083 scan_in,
7084 siclk,
7085 soclk,
7086 dout,
7087 scan_out);
7088wire [35:0] fdin;
7089wire [34:0] so;
7090
7091 input [35:0] din;
7092 input l1clk;
7093 input scan_in;
7094
7095
7096 input siclk;
7097 input soclk;
7098
7099 output [35:0] dout;
7100 output scan_out;
7101assign fdin[35:0] = din[35:0];
7102
7103
7104
7105
7106
7107
7108dff #(36) d0_0 (
7109.l1clk(l1clk),
7110.siclk(siclk),
7111.soclk(soclk),
7112.d(fdin[35:0]),
7113.si({scan_in,so[34:0]}),
7114.so({so[34:0],scan_out}),
7115.q(dout[35:0])
7116);
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129endmodule
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143// any PARAMS parms go into naming of macro
7144
7145module fgu_fpc_ctl_msff_ctl_macro__width_31 (
7146 din,
7147 l1clk,
7148 scan_in,
7149 siclk,
7150 soclk,
7151 dout,
7152 scan_out);
7153wire [30:0] fdin;
7154wire [29:0] so;
7155
7156 input [30:0] din;
7157 input l1clk;
7158 input scan_in;
7159
7160
7161 input siclk;
7162 input soclk;
7163
7164 output [30:0] dout;
7165 output scan_out;
7166assign fdin[30:0] = din[30:0];
7167
7168
7169
7170
7171
7172
7173dff #(31) d0_0 (
7174.l1clk(l1clk),
7175.siclk(siclk),
7176.soclk(soclk),
7177.d(fdin[30:0]),
7178.si({scan_in,so[29:0]}),
7179.so({so[29:0],scan_out}),
7180.q(dout[30:0])
7181);
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194endmodule
7195
7196
7197
7198
7199
7200
7201
7202