Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: fgu_fac_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 ============================================ | |
35 | module fgu_fac_ctl ( | |
36 | dec_frf_r1_addr_d, | |
37 | dec_frf_r1_vld_d, | |
38 | dec_frf_r2_vld_d, | |
39 | dec_frf_r1_32b_d, | |
40 | dec_frf_r2_32b_d, | |
41 | dec_frf_r1_odd32b_d, | |
42 | dec_frf_r2_odd32b_d, | |
43 | dec_frf_w_vld_d, | |
44 | dec_frf_w_addr_d, | |
45 | dec_frf_w_32b_d, | |
46 | dec_frf_w_odd32b_d, | |
47 | dec_fgu_valid_e, | |
48 | dec_exu_src_vld_d, | |
49 | dec_irf_w_addr_d, | |
50 | dec_spu_grant_d, | |
51 | dec_frf_store_d, | |
52 | dec_fsr_store_d, | |
53 | dec_flush_f1, | |
54 | dec_flush_f2, | |
55 | dec_fgu_op3_d, | |
56 | dec_fgu_opf_d, | |
57 | dec_fgu_decode_d, | |
58 | dec_fgu_tid_d, | |
59 | fgu_cmp_fcc_tid_fx2, | |
60 | fgu_fld_fcc_vld_fx3, | |
61 | fgu_fprs_fef, | |
62 | fgu_divide_completion, | |
63 | tlu_flush_fgu_b, | |
64 | tlu_ceter_pscce, | |
65 | tlu_cerer_frf, | |
66 | spc_core_running_status, | |
67 | fgu_fpx_trap_tid_fw, | |
68 | fgu_fpd_trap_tid_fw, | |
69 | fpc_pre_div_flush_fx2, | |
70 | fpc_div_default_res_fx2, | |
71 | fpc_fsr_w1_vld_fx5, | |
72 | fpc_fcc_vld_fx5, | |
73 | fpc_fpx_unfin_fb, | |
74 | fpc_fpd_unfin_fb, | |
75 | fpc_stfsr_en_fx3to5, | |
76 | fac_tlu_flush_fx3, | |
77 | fac_dec_valid_fx1, | |
78 | fac_fpx_itype_fx1, | |
79 | fac_fpx_dtype_fx1, | |
80 | fac_fpx_stype_fx1, | |
81 | fac_fpx_sign_instr_fx1, | |
82 | fac_fpx_rnd_trunc_fx1, | |
83 | fac_fpx_mulscc_fx1, | |
84 | fac_fpx_saverestore_fx1, | |
85 | fac_fpx_nv_vld_fx1, | |
86 | fac_fpx_of_vld_fx1, | |
87 | fac_fpx_uf_vld_fx1, | |
88 | fac_fpx_dz_vld_fx1, | |
89 | fac_fpx_nx_vld_fx1, | |
90 | fac_fpx_unfin_vld_fx1, | |
91 | fac_fpx_sp_dest_fx1, | |
92 | fac_fpx_sp_src_fx1, | |
93 | fac_fgx_instr_fx4, | |
94 | fac_w1_vld_fx1, | |
95 | fac_w1_odd32b_fx1, | |
96 | fac_gsr_w_vld_fx2, | |
97 | fac_dec_valid_noflush_fx5, | |
98 | fgd_gsr_asr_mask_fx4_b31, | |
99 | fac_fgx_mvcond_fx2, | |
100 | fac_fgx_mvucond_fx2, | |
101 | fac_fgx_abs_fx2, | |
102 | fac_fgx_neg_fx2, | |
103 | fac_fgx_logical_fx2, | |
104 | fac_fgx_expand_fx2, | |
105 | fac_fgx_merge_fx2, | |
106 | fac_fgx_align_fx2, | |
107 | fac_fgx_shuffle_fx2, | |
108 | fac_fgx_pack16_fx2, | |
109 | fac_fgx_pack32_fx2, | |
110 | fac_fgx_packfix_fx2, | |
111 | fac_fgx_pdist_fx1, | |
112 | fac_fgx_popc_fx2, | |
113 | fac_fgx_siam_fx2, | |
114 | fac_fgx_pack_sel_fx2, | |
115 | fac_opf_fx2, | |
116 | fac_gsr_asr_tid_fx2, | |
117 | fac_tid_fx2, | |
118 | fac_rng_fprs, | |
119 | fac_rng_rd_fprs_4f, | |
120 | fac_rng_wr_gsr_3f, | |
121 | fac_rng_rd_gsr_4f, | |
122 | fac_rng_rd_ecc_4f, | |
123 | fac_rng_rd_or_wr_3f, | |
124 | fad_w1_tid_fw, | |
125 | fad_w1_vld_fw, | |
126 | fad_w2_addr_fw1_b4, | |
127 | fad_w2_tid_fw1, | |
128 | fad_w2_vld_fw1, | |
129 | fac_frf_r1_addr_e, | |
130 | fac_tid_e, | |
131 | fac_aman_fmt_sel_e, | |
132 | fac_bman_fmt_sel_e, | |
133 | fac_fst_fmt_sel_fx1, | |
134 | fac_w1_addr_fb, | |
135 | fac_fpd_addr_fb, | |
136 | fac_w1_32b_fb, | |
137 | fac_fpd_32b_fb, | |
138 | fac_w1_odd32b_fb, | |
139 | fac_fpd_odd32b_fb, | |
140 | fac_w1_tid_fb, | |
141 | fac_fpd_tid_fb, | |
142 | fac_fsr_store_fx2, | |
143 | fac_exu_src_e, | |
144 | fac_fsr0_sel_fw, | |
145 | fac_fsr1_sel_fw, | |
146 | fac_fsr2_sel_fw, | |
147 | fac_fsr3_sel_fw, | |
148 | fac_fsr4_sel_fw, | |
149 | fac_fsr5_sel_fw, | |
150 | fac_fsr6_sel_fw, | |
151 | fac_fsr7_sel_fw, | |
152 | fac_pre_fcc_vld_fx2, | |
153 | fac_fcmpe_fx1, | |
154 | fac_rs2_rotate_sel_e, | |
155 | fac_i2f_sel_e, | |
156 | fac_force_swap_blta_fx1, | |
157 | fac_force_noswap_blta_fx1, | |
158 | fac_xr_mode_fx1, | |
159 | fac_rs1_sel_fx1, | |
160 | fac_rs2_sel_fx1, | |
161 | fac_8x16_rnd_fx3, | |
162 | fac_scff_sel_fx3, | |
163 | fac_accum_sel_fx3, | |
164 | fac_result_sel_fx4, | |
165 | fac_ma_result_en_fx4, | |
166 | fdc_finish_int_early, | |
167 | fdc_finish_fltd_early, | |
168 | fdc_finish_flts_early, | |
169 | fac_div_flush_fx3, | |
170 | fac_div_valid_fx1, | |
171 | fac_divq_valid_fx1, | |
172 | fac_div_control_fx1, | |
173 | fac_aexp_fmt_sel_e, | |
174 | fac_bexp_fmt_sel_e, | |
175 | fac_aux_cin_fx1, | |
176 | lsu_fgu_fld_vld_w, | |
177 | lsu_fgu_fld_b, | |
178 | lsu_fgu_fld_tid_b, | |
179 | lsu_fgu_fld_32b_b, | |
180 | lsu_fgu_fsr_load_b, | |
181 | lsu_fgu_pmen, | |
182 | lsu_asi_clken, | |
183 | exu_fgu_gsr_vld_m, | |
184 | exu_fgu_flush_m, | |
185 | fgu_result_tid_fx5, | |
186 | fgu_irf_w_addr_fx5, | |
187 | fgu_exu_cc_vld_fx5, | |
188 | fgu_exu_w_vld_fx5, | |
189 | fec_cecc_fx2, | |
190 | fec_uecc_fx2, | |
191 | fac_r1_vld_fx1, | |
192 | fac_r2_vld_fx1, | |
193 | fac_ecc_trap_en_fx1, | |
194 | fac_tid_d, | |
195 | fac_frf_r1_addr_d, | |
196 | fac_frf_r1_vld_d, | |
197 | spu_fgu_fpy_ctl_d, | |
198 | main_clken, | |
199 | main_clken0, | |
200 | mul_clken, | |
201 | div_clken, | |
202 | vis_clken, | |
203 | asi_clken, | |
204 | coreon_clken, | |
205 | l2clk, | |
206 | scan_in, | |
207 | spc_aclk_wmr, | |
208 | wmr_scan_in, | |
209 | tcu_pce_ov, | |
210 | spc_aclk, | |
211 | spc_bclk, | |
212 | tcu_scan_en, | |
213 | mbi_frf_read_en, | |
214 | mbi_addr, | |
215 | mbi_run, | |
216 | in_rngl_cdbus, | |
217 | fac_mbist_addr_1f, | |
218 | fgu_rngl_cdbus_b64, | |
219 | fgu_rngl_cdbus_b63, | |
220 | scan_out, | |
221 | wmr_scan_out); | |
222 | wire pce_ov; | |
223 | wire stop; | |
224 | wire siclk; | |
225 | wire soclk; | |
226 | wire se; | |
227 | wire l1clk; | |
228 | wire l1clk_pm2; | |
229 | wire main_clken_local; | |
230 | wire l1clk_pm1; | |
231 | wire spares_scanin; | |
232 | wire spares_scanout; | |
233 | wire fgu_pmen_e; | |
234 | wire mbist_run_1f; | |
235 | wire [7:0] core_running_status_1f; | |
236 | wire fgu_decode_e; | |
237 | wire spu_grant_e; | |
238 | wire frf_store_fx1; | |
239 | wire frf_store_fx2; | |
240 | wire fsr_store_fx1; | |
241 | wire fpc_stfsr_en_fb; | |
242 | wire fpc_stfsr_en_fw; | |
243 | wire fgu_fld_fx3; | |
244 | wire fgu_fld_fx4; | |
245 | wire fgu_fld_fx5; | |
246 | wire fgu_fld_fb; | |
247 | wire fgu_decode_fx1; | |
248 | wire gsr_w_vld_fx2; | |
249 | wire gsr_w_vld_fx3; | |
250 | wire gsr_w_vld_fx4; | |
251 | wire rng_rd_or_wr_1f; | |
252 | wire rng_rd_or_wr_2f; | |
253 | wire rng_rd_or_wr_4f; | |
254 | wire rng_rd_or_wr_5f; | |
255 | wire dec_valid_fx2; | |
256 | wire dec_valid_fx3; | |
257 | wire dec_valid_noflush_fx4; | |
258 | wire dec_valid_noflush_fb; | |
259 | wire dec_valid_noflush_fw; | |
260 | wire dec_valid_noflush_fw1; | |
261 | wire dec_valid_noflush_fw2; | |
262 | wire spu_grant_fx1; | |
263 | wire spu_grant_fx2; | |
264 | wire spu_grant_fx3; | |
265 | wire spu_grant_fx4; | |
266 | wire spu_grant_fx5; | |
267 | wire div_engine_busy_fx1; | |
268 | wire div_engine_busy_fx2; | |
269 | wire divq_occupied_fx1; | |
270 | wire div_finish_fb; | |
271 | wire div_finish_fw; | |
272 | wire div_finish_fw1; | |
273 | wire div_finish_fw2; | |
274 | wire div_finish_fw3; | |
275 | wire fpx_itype_mul_e; | |
276 | wire itype_mul_fx1; | |
277 | wire itype_mul_fx2; | |
278 | wire itype_mul_fx3; | |
279 | wire dec_valid_imul_noflush_fx4; | |
280 | wire dec_valid_imul_noflush_fx5; | |
281 | wire dec_valid_imul_noflush_fb; | |
282 | wire dec_valid_imul_noflush_fw; | |
283 | wire dec_valid_imul_noflush_fw1; | |
284 | wire dec_valid_imul_noflush_fw2; | |
285 | wire fpx_itype_div_e; | |
286 | wire fgx_instr_e; | |
287 | wire fgx_instr_fx1; | |
288 | wire fgx_instr_fx2; | |
289 | wire fgx_instr_fx3; | |
290 | wire fgx_instr_fx5; | |
291 | wire fgx_instr_fb; | |
292 | wire fgx_instr_fw; | |
293 | wire fgx_instr_fw1; | |
294 | wire fgx_instr_fw2; | |
295 | wire global_asi_clken; | |
296 | wire rng_rd_ecc_2f; | |
297 | wire [2:0] rng_wr_tid_2f; | |
298 | wire [7:0] rng_data_2f_b7_0; | |
299 | wire mbist_frf_read_en_1f; | |
300 | wire e_00_scanin; | |
301 | wire e_00_scanout; | |
302 | wire e_01_scanin; | |
303 | wire e_01_scanout; | |
304 | wire [5:0] op3_e; | |
305 | wire [7:0] opf_e; | |
306 | wire r1_vld_e; | |
307 | wire r2_vld_e; | |
308 | wire r1_32b_e; | |
309 | wire r2_32b_e; | |
310 | wire r1_odd32b_e; | |
311 | wire r2_odd32b_e; | |
312 | wire frf_store_e; | |
313 | wire fsr_store_e; | |
314 | wire [4:0] irf_w_addr_e; | |
315 | wire [6:0] spu_fpy_ctl_e; | |
316 | wire e_02_scanin; | |
317 | wire e_02_scanout; | |
318 | wire w1_vld_e; | |
319 | wire [4:0] w1_addr_e; | |
320 | wire w1_32b_e; | |
321 | wire w1_odd32b_e; | |
322 | wire exu_w_vld_e; | |
323 | wire e_03_scanin; | |
324 | wire e_03_scanout; | |
325 | wire [24:5] i; | |
326 | wire [4:0] aman_fmt_sel_e; | |
327 | wire [3:0] bman_fmt_sel_e; | |
328 | wire [9:0] aexp_fmt_sel_e; | |
329 | wire [7:0] bexp_fmt_sel_e; | |
330 | wire [2:0] fpx_itype_e; | |
331 | wire [2:0] fpx_dtype_e; | |
332 | wire [1:0] fpx_stype_e; | |
333 | wire fpx_sign_instr_e; | |
334 | wire fpx_rnd_trunc_e; | |
335 | wire fpx_mulscc_e; | |
336 | wire fpx_saverestore_e; | |
337 | wire fpx_int_cc_vld_e; | |
338 | wire fpx_fmul8x16_e; | |
339 | wire fpx_fmul8x16au_e; | |
340 | wire fpx_fmul8x16al_e; | |
341 | wire fpx_fmul8sux16_e; | |
342 | wire fpx_fmul8ulx16_e; | |
343 | wire fpx_fmuld8sux16_e; | |
344 | wire fpx_fmuld8ulx16_e; | |
345 | wire fpx_nv_vld_e; | |
346 | wire fpx_of_vld_e; | |
347 | wire fpx_uf_vld_e; | |
348 | wire fpx_dz_vld_e; | |
349 | wire fpx_nx_vld_e; | |
350 | wire fpx_unfin_vld_e; | |
351 | wire fgx_mvcond_e; | |
352 | wire fgx_mvucond_e; | |
353 | wire fgx_abs_e; | |
354 | wire fgx_neg_e; | |
355 | wire fgx_logical_e; | |
356 | wire fgx_expand_e; | |
357 | wire fgx_merge_e; | |
358 | wire fgx_align_e; | |
359 | wire fgx_shuffle_e; | |
360 | wire fgx_pack16_e; | |
361 | wire fgx_pack32_e; | |
362 | wire fgx_packfix_e; | |
363 | wire fgx_pdist_e; | |
364 | wire fgx_popc_e; | |
365 | wire fgx_siam_e; | |
366 | wire q_fgx_pdist_e; | |
367 | wire [3:0] fst_fmt_sel_e; | |
368 | wire [4:1] q_aman_fmt_sel_e; | |
369 | wire [3:0] q_bman_fmt_sel_e; | |
370 | wire [8:1] q_aexp_fmt_sel_e; | |
371 | wire [3:1] q_bexp_fmt_sel_e; | |
372 | wire fpx_sp_dest_e; | |
373 | wire [1:0] q_w1_vld_e; | |
374 | wire [1:0] cc_target_e; | |
375 | wire [3:0] pre_fcc_vld_e; | |
376 | wire [2:0] i_fsr_w2_vld_fb; | |
377 | wire div_finish_fltd_fb; | |
378 | wire div_finish_flts_fb; | |
379 | wire fsr_w1_qvld_fb; | |
380 | wire [1:0] fsr_w1_vld_fb; | |
381 | wire pre_fcc_vld_fb; | |
382 | wire [3:0] fcc_vld_fb; | |
383 | wire fsr_w2_qvld_fb; | |
384 | wire [5:0] fsr0_sel_fb; | |
385 | wire [5:0] fsr1_sel_fb; | |
386 | wire [5:0] fsr2_sel_fb; | |
387 | wire [5:0] fsr3_sel_fb; | |
388 | wire [5:0] fsr4_sel_fb; | |
389 | wire [5:0] fsr5_sel_fb; | |
390 | wire [5:0] fsr6_sel_fb; | |
391 | wire [5:0] fsr7_sel_fb; | |
392 | wire [1:0] q_r1_vld_e; | |
393 | wire [1:0] q_r2_vld_e; | |
394 | wire force_swap_blta_e; | |
395 | wire force_noswap_blta_e; | |
396 | wire xr_mode_e; | |
397 | wire [4:0] rs1_sel_e; | |
398 | wire [3:0] rs2_sel_e; | |
399 | wire [1:0] rnd_8x16_e; | |
400 | wire [5:0] result_sel_e; | |
401 | wire div_valid_e; | |
402 | wire pre_div_flush_fx3; | |
403 | wire div_dec_issue_fx3; | |
404 | wire divq_valid_e; | |
405 | wire div_engine_busy_e; | |
406 | wire div_finish_early; | |
407 | wire div_dec_issue_e; | |
408 | wire div_divq_issue_e; | |
409 | wire div_divq_load_e; | |
410 | wire div_hold_e; | |
411 | wire divq_occupied_e; | |
412 | wire [2:0] div_tid_in_e; | |
413 | wire [2:0] divq_tid_fx1; | |
414 | wire [2:0] div_tid_fx1; | |
415 | wire [4:0] div_irf_addr_in_e; | |
416 | wire [4:0] divq_irf_addr_fx1; | |
417 | wire [4:0] div_irf_addr_fx1; | |
418 | wire div_cc_vld_in_e; | |
419 | wire divq_cc_vld_fx1; | |
420 | wire div_cc_vld_fx1; | |
421 | wire div_odd32b_in_e; | |
422 | wire divq_odd32b_fx1; | |
423 | wire div_odd32b_fx1; | |
424 | wire div_32b_in_e; | |
425 | wire divq_32b_fx1; | |
426 | wire div_32b_fx1; | |
427 | wire [4:0] div_frf_addr_in_e; | |
428 | wire [4:0] divq_frf_addr_fx1; | |
429 | wire [4:0] div_frf_addr_fx1; | |
430 | wire [2:0] divq_tid_in_e; | |
431 | wire [4:0] divq_irf_addr_in_e; | |
432 | wire divq_cc_vld_in_e; | |
433 | wire divq_odd32b_in_e; | |
434 | wire divq_32b_in_e; | |
435 | wire [4:0] divq_frf_addr_in_e; | |
436 | wire [4:0] div_control_e; | |
437 | wire fx1_00_scanin; | |
438 | wire fx1_00_scanout; | |
439 | wire [4:1] opf_fx1; | |
440 | wire fpx_int_cc_vld_fx1; | |
441 | wire fgx_mvcond_fx1; | |
442 | wire fgx_mvucond_fx1; | |
443 | wire fgx_abs_fx1; | |
444 | wire fgx_neg_fx1; | |
445 | wire fgx_logical_fx1; | |
446 | wire fgx_expand_fx1; | |
447 | wire fgx_merge_fx1; | |
448 | wire fgx_align_fx1; | |
449 | wire fgx_shuffle_fx1; | |
450 | wire fgx_pack16_fx1; | |
451 | wire fgx_pack32_fx1; | |
452 | wire fgx_packfix_fx1; | |
453 | wire fgx_popc_fx1; | |
454 | wire i_fgx_siam_fx1; | |
455 | wire [1:0] rnd_8x16_fx1; | |
456 | wire [5:0] result_sel_fx1; | |
457 | wire i_exu_w_vld_fx1; | |
458 | wire [4:0] irf_w_addr_fx1; | |
459 | wire div_dec_issue_fx1; | |
460 | wire div_divq_issue_fx1; | |
461 | wire [5:0] spu_fpy_ctl_fx1; | |
462 | wire fx1_01_scanin; | |
463 | wire fx1_01_scanout; | |
464 | wire [4:0] w1_addr_fx1; | |
465 | wire w1_32b_fx1; | |
466 | wire [2:0] tid_fx1; | |
467 | wire [1:0] q_w1_vld_fx1; | |
468 | wire cerer_frf_fx1; | |
469 | wire [7:0] ceter_pscce_fx1; | |
470 | wire fx1_02_scanin; | |
471 | wire fx1_02_scanout; | |
472 | wire [3:0] pre_fcc_vld_fx1; | |
473 | wire fgx_pack_sel_fx1; | |
474 | wire fgx_moves_fx1; | |
475 | wire fgx_siam_fx1; | |
476 | wire exu_w_vld_fx1; | |
477 | wire q_div_default_res_fx3; | |
478 | wire div_default_res_fx3; | |
479 | wire dec_flush_fx3; | |
480 | wire [7:0] divide_completion_fx1; | |
481 | wire [2:0] tid_fx3; | |
482 | wire fx2_00_scanin; | |
483 | wire fx2_00_scanout; | |
484 | wire [4:0] w1_addr_fx2; | |
485 | wire w1_32b_fx2; | |
486 | wire w1_odd32b_fx2; | |
487 | wire [2:0] tid_fx2; | |
488 | wire i_exu_w_vld_fx2; | |
489 | wire [4:0] irf_w_addr_fx2; | |
490 | wire fx2_01_scanin; | |
491 | wire fx2_01_scanout; | |
492 | wire [1:0] rnd_8x16_fx2; | |
493 | wire [5:0] result_sel_fx2; | |
494 | wire fpx_int_cc_vld_fx2; | |
495 | wire dec_flush_fx2; | |
496 | wire [3:0] i_pre_fcc_vld_fx2; | |
497 | wire div_dec_issue_fx2; | |
498 | wire div_divq_issue_fx2; | |
499 | wire [2:0] itype_fx2; | |
500 | wire [5:0] spu_fpy_ctl_fx2; | |
501 | wire rs2_sel_fx2_b2; | |
502 | wire fx2_02_scanin; | |
503 | wire fx2_02_scanout; | |
504 | wire exu_flush_fx2; | |
505 | wire [2:0] rng_wr_tid_3f; | |
506 | wire dec_valid_noflush_fx2; | |
507 | wire exu_w_vld_fx2; | |
508 | wire pre_fcc_vld_fx2; | |
509 | wire [1:0] i_fld_fcc_vld_fx2; | |
510 | wire [3:0] scff_sel_fx2; | |
511 | wire [6:0] accum_sel_fx2; | |
512 | wire fx3_00_scanin; | |
513 | wire fx3_00_scanout; | |
514 | wire [4:0] w1_addr_fx3; | |
515 | wire w1_32b_fx3; | |
516 | wire w1_odd32b_fx3; | |
517 | wire [5:0] result_sel_fx3; | |
518 | wire i_exu_w_vld_fx3; | |
519 | wire [4:0] irf_w_addr_fx3; | |
520 | wire fpx_int_cc_vld_fx3; | |
521 | wire i_pre_div_flush_fx3; | |
522 | wire [2:0] itype_fx3; | |
523 | wire [5:5] spu_fpy_ctl_fx3; | |
524 | wire i_pre_fcc_vld_fx3; | |
525 | wire i_dec_valid_noflush_fx3; | |
526 | wire fx3_01_scanin; | |
527 | wire fx3_01_scanout; | |
528 | wire pre_fcc_vld_fx3; | |
529 | wire dec_valid_noflush_fx3; | |
530 | wire dec_valid_imul_noflush_fx3; | |
531 | wire exu_w_vld_fx3; | |
532 | wire fx4_00_scanin; | |
533 | wire fx4_00_scanout; | |
534 | wire [4:0] w1_addr_fx4; | |
535 | wire w1_32b_fx4; | |
536 | wire w1_odd32b_fx4; | |
537 | wire [2:0] tid_fx4; | |
538 | wire exu_w_vld_fx4; | |
539 | wire [4:0] i_irf_w_addr_fx4; | |
540 | wire i_int_cc_vld_fx4; | |
541 | wire [5:5] spu_fpy_ctl_fx4; | |
542 | wire pre_fcc_vld_fx4; | |
543 | wire [2:0] irf_result_tid_fx4; | |
544 | wire [4:0] irf_w_addr_fx4; | |
545 | wire exu_cc_vld_fx4; | |
546 | wire fx5_00_scanin; | |
547 | wire fx5_00_scanout; | |
548 | wire [4:0] w1_addr_fx5; | |
549 | wire w1_32b_fx5; | |
550 | wire w1_odd32b_fx5; | |
551 | wire [2:0] tid_fx5; | |
552 | wire i_exu_w_vld_fx5; | |
553 | wire irf_result_tid_fx5_b2; | |
554 | wire exu_cc_vld_fx5; | |
555 | wire pre_fcc_vld_fx5; | |
556 | wire div_finish_int_fb; | |
557 | wire fb_00_scanin; | |
558 | wire fb_00_scanout; | |
559 | wire fw_00_scanin; | |
560 | wire fw_00_scanout; | |
561 | wire w1_addr_fw_b4; | |
562 | wire fw_01_scanin; | |
563 | wire fw_01_scanout; | |
564 | wire [3:0] i_fsr0_sel_fw; | |
565 | wire [3:0] i_fsr1_sel_fw; | |
566 | wire [3:0] i_fsr2_sel_fw; | |
567 | wire [3:0] i_fsr3_sel_fw; | |
568 | wire [3:0] i_fsr4_sel_fw; | |
569 | wire [3:0] i_fsr5_sel_fw; | |
570 | wire [3:0] i_fsr6_sel_fw; | |
571 | wire [3:0] i_fsr7_sel_fw; | |
572 | wire [2:0] lsu_fgu_fld_tid_fw; | |
573 | wire [1:0] i_fsr_w2_vld_fw; | |
574 | wire [1:0] fsr_w2_vld_fw; | |
575 | wire fprs_frf_ctl_scanin; | |
576 | wire fprs_frf_ctl_scanout; | |
577 | wire [4:4] fprs_w1_addr; | |
578 | wire [2:0] fprs_w1_tid; | |
579 | wire [1:0] fprs_w1_vld; | |
580 | wire [4:4] fprs_w2_addr; | |
581 | wire [2:0] fprs_w2_tid; | |
582 | wire [1:0] fprs_w2_vld; | |
583 | wire [3:0] fprs_tid0_sel; | |
584 | wire rng_wr_fprs_3f; | |
585 | wire [2:0] din_fprs_tid0; | |
586 | wire [2:0] fprs_tid0; | |
587 | wire fprstid0_wmr_scanin; | |
588 | wire fprstid0_wmr_scanout; | |
589 | wire [2:2] fprs_tid0_; | |
590 | wire [3:0] fprs_tid1_sel; | |
591 | wire [2:0] din_fprs_tid1; | |
592 | wire [2:0] fprs_tid1; | |
593 | wire fprstid1_wmr_scanin; | |
594 | wire fprstid1_wmr_scanout; | |
595 | wire [2:2] fprs_tid1_; | |
596 | wire [3:0] fprs_tid2_sel; | |
597 | wire [2:0] din_fprs_tid2; | |
598 | wire [2:0] fprs_tid2; | |
599 | wire fprstid2_wmr_scanin; | |
600 | wire fprstid2_wmr_scanout; | |
601 | wire [2:2] fprs_tid2_; | |
602 | wire [3:0] fprs_tid3_sel; | |
603 | wire [2:0] din_fprs_tid3; | |
604 | wire [2:0] fprs_tid3; | |
605 | wire fprstid3_wmr_scanin; | |
606 | wire fprstid3_wmr_scanout; | |
607 | wire [2:2] fprs_tid3_; | |
608 | wire [3:0] fprs_tid4_sel; | |
609 | wire [2:0] din_fprs_tid4; | |
610 | wire [2:0] fprs_tid4; | |
611 | wire fprstid4_wmr_scanin; | |
612 | wire fprstid4_wmr_scanout; | |
613 | wire [2:2] fprs_tid4_; | |
614 | wire [3:0] fprs_tid5_sel; | |
615 | wire [2:0] din_fprs_tid5; | |
616 | wire [2:0] fprs_tid5; | |
617 | wire fprstid5_wmr_scanin; | |
618 | wire fprstid5_wmr_scanout; | |
619 | wire [2:2] fprs_tid5_; | |
620 | wire [3:0] fprs_tid6_sel; | |
621 | wire [2:0] din_fprs_tid6; | |
622 | wire [2:0] fprs_tid6; | |
623 | wire fprstid6_wmr_scanin; | |
624 | wire fprstid6_wmr_scanout; | |
625 | wire [2:2] fprs_tid6_; | |
626 | wire [3:0] fprs_tid7_sel; | |
627 | wire [2:0] din_fprs_tid7; | |
628 | wire [2:0] fprs_tid7; | |
629 | wire fprstid7_wmr_scanin; | |
630 | wire fprstid7_wmr_scanout; | |
631 | wire [2:2] fprs_tid7_; | |
632 | wire [2:0] din_rng_fprs; | |
633 | wire fprs_rng_scanin; | |
634 | wire fprs_rng_scanout; | |
635 | wire rng_stg1_scanin; | |
636 | wire rng_stg1_scanout; | |
637 | wire rng_ctl_1f; | |
638 | wire rng_valid_1f; | |
639 | wire [62:48] rng_data_1f; | |
640 | wire [7:0] rng_data_1f_b7_0; | |
641 | wire rng_rd_1f; | |
642 | wire rng_wr_1f; | |
643 | wire rng_rd_gsr_1f; | |
644 | wire rng_wr_gsr_1f; | |
645 | wire rng_rd_fprs_1f; | |
646 | wire rng_wr_fprs_1f; | |
647 | wire rng_rd_ecc_1f; | |
648 | wire rng_stg2_scanin; | |
649 | wire rng_stg2_scanout; | |
650 | wire rng_wr_gsr_2f; | |
651 | wire rng_rd_gsr_2f; | |
652 | wire rng_rd_fprs_2f; | |
653 | wire rng_wr_fprs_2f; | |
654 | wire rng_6463_scanin; | |
655 | wire rng_6463_scanout; | |
656 | wire rng_ctl_2f; | |
657 | wire rng_valid_2f; | |
658 | wire rng_ctl_3f; | |
659 | wire rng_cdbus_3f_b63; | |
660 | wire rng_valid_3f; | |
661 | wire rng_stg3_scanin; | |
662 | wire rng_stg3_scanout; | |
663 | wire rng_rd_gsr_3f; | |
664 | wire rng_rd_fprs_3f; | |
665 | wire rng_rd_ecc_3f; | |
666 | wire rng_b64_default_sel; | |
667 | wire rng_stg4_scanin; | |
668 | wire rng_stg4_scanout; | |
669 | ||
670 | ||
671 | ||
672 | // ---------------------------------------------------------------------------- | |
673 | // Interface with DEC | |
674 | // ---------------------------------------------------------------------------- | |
675 | ||
676 | input [4:0] dec_frf_r1_addr_d; | |
677 | input dec_frf_r1_vld_d; | |
678 | input dec_frf_r2_vld_d; | |
679 | input dec_frf_r1_32b_d; | |
680 | input dec_frf_r2_32b_d; | |
681 | input dec_frf_r1_odd32b_d; | |
682 | input dec_frf_r2_odd32b_d; | |
683 | ||
684 | input dec_frf_w_vld_d; | |
685 | input [4:0] dec_frf_w_addr_d; | |
686 | input dec_frf_w_32b_d; | |
687 | input dec_frf_w_odd32b_d; | |
688 | ||
689 | input dec_fgu_valid_e; | |
690 | input dec_exu_src_vld_d; | |
691 | input [4:0] dec_irf_w_addr_d; | |
692 | ||
693 | input dec_spu_grant_d; | |
694 | input dec_frf_store_d; | |
695 | input dec_fsr_store_d; | |
696 | ||
697 | input dec_flush_f1; // flush fx2 (xmit in fx1/m) | |
698 | input dec_flush_f2; // flush fx3 (xmit in fx2/b) | |
699 | ||
700 | input [5:0] dec_fgu_op3_d; | |
701 | input [7:0] dec_fgu_opf_d; | |
702 | input dec_fgu_decode_d; // FGU instr issue valid (d stage) | |
703 | input [2:0] dec_fgu_tid_d; | |
704 | ||
705 | output [2:0] fgu_cmp_fcc_tid_fx2; // fcmp fcc data TID | |
706 | output [1:0] fgu_fld_fcc_vld_fx3; // ldfsr fcc data valid {fcc3, fcc2, fcc1}, fcc0 | |
707 | output [7:0] fgu_fprs_fef; // FPRS.fef for each TID | |
708 | ||
709 | output [7:0] fgu_divide_completion; // FPD completion/TID | |
710 | ||
711 | // ---------------------------------------------------------------------------- | |
712 | // Interface with TLU | |
713 | // ---------------------------------------------------------------------------- | |
714 | ||
715 | input tlu_flush_fgu_b; // flush fx3, non-load (xmit in fx2/b) | |
716 | input [7:0] tlu_ceter_pscce; // core error trap enable reg precise enable | |
717 | input tlu_cerer_frf; // FRF ecc error trap enable | |
718 | input [7:0] spc_core_running_status; // thread active | |
719 | ||
720 | output [2:0] fgu_fpx_trap_tid_fw; | |
721 | output [2:0] fgu_fpd_trap_tid_fw; | |
722 | ||
723 | // ---------------------------------------------------------------------------- | |
724 | // Interface with FPC | |
725 | // ---------------------------------------------------------------------------- | |
726 | ||
727 | input fpc_pre_div_flush_fx2; | |
728 | input fpc_div_default_res_fx2; // fdiv/fsqrt default result | |
729 | input [1:0] fpc_fsr_w1_vld_fx5; // FSR w1 write valid | |
730 | input [3:0] fpc_fcc_vld_fx5; | |
731 | input fpc_fpx_unfin_fb; | |
732 | input fpc_fpd_unfin_fb; | |
733 | input fpc_stfsr_en_fx3to5; // store FSR clears ftt | |
734 | ||
735 | output fac_tlu_flush_fx3; | |
736 | output fac_dec_valid_fx1; | |
737 | output [2:0] fac_fpx_itype_fx1; // instr type: | |
738 | // add=000, fpfp=001, fpint=010, intfp=011, cmp=100, mul=101, div=110, sqrt=111 | |
739 | output [2:0] fac_fpx_dtype_fx1; // destination type: | |
740 | // sp=000, dp=001, 16bit=010, 32bit=011, 64bit=100 | |
741 | output [1:0] fac_fpx_stype_fx1; // source type (for conversions & FsMULd/FMULd): | |
742 | // sp=00, dp=01, 32bit=10, 64bit=11 | |
743 | output fac_fpx_sign_instr_fx1; // sign of the instr (1 if: FSUB(s,d), | |
744 | // FPSUB{16,32}{s}) | |
745 | output fac_fpx_rnd_trunc_fx1; // force rnd mode to truncate | |
746 | // (1 if: F(s,d)TOi, F(s,d)TOx, | |
747 | // FPADD{16,32}{s}, FPSUB{16,32}{s}, | |
748 | // IMUL, IDIV, MULScc, 8x16 mul, SAVE, RESTORE | |
749 | output fac_fpx_mulscc_fx1; // MULScc | |
750 | output fac_fpx_saverestore_fx1;// SAVE or RESTORE | |
751 | output fac_fpx_nv_vld_fx1; // set if instr updates invalid exception flag | |
752 | output fac_fpx_of_vld_fx1; // set if instr updates overflow exception flag | |
753 | output fac_fpx_uf_vld_fx1; // set if instr updates underflow exception flag | |
754 | output fac_fpx_dz_vld_fx1; // set if instr updates divide by zero exception flag | |
755 | output fac_fpx_nx_vld_fx1; // set if instr updates inexact exception flag | |
756 | output fac_fpx_unfin_vld_fx1; // set if instr can generate unfinished_FPop | |
757 | ||
758 | output fac_fpx_sp_dest_fx1; // sp destination | |
759 | output fac_fpx_sp_src_fx1; // sp source | |
760 | output fac_fgx_instr_fx4; // FGX instr decoded | |
761 | output [1:0] fac_w1_vld_fx1; | |
762 | output fac_w1_odd32b_fx1; | |
763 | output [1:0] fac_gsr_w_vld_fx2; | |
764 | output fac_dec_valid_noflush_fx5; | |
765 | ||
766 | // ---------------------------------------------------------------------------- | |
767 | // Interface with FGD | |
768 | // ---------------------------------------------------------------------------- | |
769 | ||
770 | input fgd_gsr_asr_mask_fx4_b31; | |
771 | ||
772 | output fac_fgx_mvcond_fx2; // FMOV (conditional upon cc or r) | |
773 | output fac_fgx_mvucond_fx2; // FMOV (unconditional) | |
774 | output fac_fgx_abs_fx2; // FABS | |
775 | output fac_fgx_neg_fx2; // FNEG | |
776 | output fac_fgx_logical_fx2; // logical instructions | |
777 | output fac_fgx_expand_fx2; // FEXPAND | |
778 | output fac_fgx_merge_fx2; // FPMERGE | |
779 | output fac_fgx_align_fx2; // FALIGNDATA | |
780 | output fac_fgx_shuffle_fx2; // BSHUFFLE | |
781 | output fac_fgx_pack16_fx2; // FPACK16 | |
782 | output fac_fgx_pack32_fx2; // FPACK32 | |
783 | output fac_fgx_packfix_fx2; // FPACKFIX | |
784 | output fac_fgx_pdist_fx1; // PDIST | |
785 | output fac_fgx_popc_fx2; // POPC | |
786 | output fac_fgx_siam_fx2; // SIAM | |
787 | ||
788 | output fac_fgx_pack_sel_fx2; // FPACK16,FPACK32,FPACKFIX | |
789 | ||
790 | output [4:1] fac_opf_fx2; // instr opf field | |
791 | output [2:0] fac_gsr_asr_tid_fx2; | |
792 | output [2:0] fac_tid_fx2; | |
793 | ||
794 | output [2:0] fac_rng_fprs; // ASR FPRS read data | |
795 | output fac_rng_rd_fprs_4f; // ASR FPRS read | |
796 | output fac_rng_wr_gsr_3f; // ASR GSR write valid | |
797 | output fac_rng_rd_gsr_4f; // ASR GSR read | |
798 | output fac_rng_rd_ecc_4f; // ASI FRF ECC read | |
799 | output fac_rng_rd_or_wr_3f; // ASR GSR/FPRS read or write decoded | |
800 | ||
801 | // ---------------------------------------------------------------------------- | |
802 | // Interface with FAD | |
803 | // ---------------------------------------------------------------------------- | |
804 | ||
805 | input [2:0] fad_w1_tid_fw; // FRF w1 write TID | |
806 | input [1:0] fad_w1_vld_fw; // FRF w1 write valid (qualified) | |
807 | input fad_w2_addr_fw1_b4; // FRF w2 write addr | |
808 | input [2:0] fad_w2_tid_fw1; // FRF w2 write TID | |
809 | input [1:0] fad_w2_vld_fw1; // FRF w2 write valid (qualified) | |
810 | ||
811 | output [4:0] fac_frf_r1_addr_e; | |
812 | output [2:0] fac_tid_e; | |
813 | output [4:0] fac_aman_fmt_sel_e; // aop mantissa format mux select | |
814 | output [4:0] fac_bman_fmt_sel_e; // bop mantissa format mux select | |
815 | output [3:0] fac_fst_fmt_sel_fx1; // store format mux select | |
816 | ||
817 | output [4:0] fac_w1_addr_fb; // FRF w1 write addr | |
818 | output [4:0] fac_fpd_addr_fb; // FRF w2 write addr (div/sqrt) | |
819 | output fac_w1_32b_fb; // FRF w1 is 32-bit dest | |
820 | output fac_fpd_32b_fb; // FRF w2 is 32-bit dest (div/sqrt) | |
821 | output fac_w1_odd32b_fb; // FRF w1 is odd 32-bit dest (32 LSBs) | |
822 | output fac_fpd_odd32b_fb; // FRF w2 is odd 32-bit dest (32 LSBs) (div/sqrt) | |
823 | ||
824 | output [2:0] fac_w1_tid_fb; // FRF w1 TID | |
825 | output [2:0] fac_fpd_tid_fb; // FRF w2 TID (div/sqrt) | |
826 | ||
827 | output fac_fsr_store_fx2; | |
828 | ||
829 | output fac_exu_src_e; | |
830 | ||
831 | output [5:0] fac_fsr0_sel_fw; | |
832 | output [5:0] fac_fsr1_sel_fw; | |
833 | output [5:0] fac_fsr2_sel_fw; | |
834 | output [5:0] fac_fsr3_sel_fw; | |
835 | output [5:0] fac_fsr4_sel_fw; | |
836 | output [5:0] fac_fsr5_sel_fw; | |
837 | output [5:0] fac_fsr6_sel_fw; | |
838 | output [5:0] fac_fsr7_sel_fw; | |
839 | ||
840 | // ---------------------------------------------------------------------------- | |
841 | // Interface with FPF | |
842 | // ---------------------------------------------------------------------------- | |
843 | ||
844 | output [3:0] fac_pre_fcc_vld_fx2; // must clear fcc_vld if (nv & TEM) | |
845 | output fac_fcmpe_fx1; // FCMPE, not FCMP | |
846 | output [4:0] fac_rs2_rotate_sel_e; // 001=odd FiTO(s,d), 010=even FiTO(s,d), 100=FiTO(s,d) | |
847 | output [1:0] fac_i2f_sel_e; // 01=F(i,x)TO(s,d), 10=~F(i,x)TO(s,d) | |
848 | output fac_force_swap_blta_fx1; // force the swap_blta condition | |
849 | output fac_force_noswap_blta_fx1; // force the ~swap_blta condition | |
850 | ||
851 | // ---------------------------------------------------------------------------- | |
852 | // Interface with FPY | |
853 | // ---------------------------------------------------------------------------- | |
854 | ||
855 | output fac_xr_mode_fx1; // 0 : Int or Float | |
856 | // 1 : XOR mult | |
857 | ||
858 | output [4:0] fac_rs1_sel_fx1; // [0] : FMUL8SUx16 or FMULD8SUx16 | |
859 | // [1] : FMUL8x16 or FMUL8x16AU or FMUL8x16AL | |
860 | // [2] : FMUL8ULx16 or FMULD8ULx16 | |
861 | // [3] : MA Int / XOR forward of last MA result | |
862 | // [4] : MA Int / XOR unforwarded | |
863 | // Def : 64 * 64 Multiply | |
864 | ||
865 | output [3:0] fac_rs2_sel_fx1; // [0] : FMUL8x16AU | |
866 | // [1] : FMUL8x16AL | |
867 | // [2] : all 8x16 | |
868 | // [3] : MA Int / XOR | |
869 | // Def : 64 * 64 Multiply | |
870 | ||
871 | output [1:0] fac_8x16_rnd_fx3; // [0] : FMUL8x16 or FMUL8x16AU or FMUL8x16AL or FMUL8SUx16 | |
872 | // [1] : FMUL8ULx16 | |
873 | ||
874 | output [3:0] fac_scff_sel_fx3; // [0] : Int, Float, MA Int | |
875 | // [1] : all 8x16 | |
876 | // [2] : MA Int * 2 | |
877 | // [3] : XOR mult | |
878 | // Def : XOR mult * 2 | |
879 | ||
880 | output [6:0] fac_accum_sel_fx3; // [0] : Write ACCUM with result | |
881 | // [1] : Add ACCUM to Mult product | |
882 | // [2] : XOR Mult w/ ACCUM | |
883 | // [3] : XOR Mult w/ ACCUM >> 64 | |
884 | // [4] : XOR Mult w/o ACCUM | |
885 | // [5] : XOR Mult w/o ACCUM >> 64 | |
886 | // [6] : Int Mult w/ or w/o ACCUM | |
887 | // Def : Int Mult w/ or w/o ACCUM >> 64 | |
888 | ||
889 | output [5:0] fac_result_sel_fx4; // [0] : FMUL8x16 or FMUL8x16AU or FMUL8x16AL or FMUL8SUx16 | |
890 | // [1] : FMUL8ULx16 | |
891 | // [2] : FMULD8SUx16 | |
892 | // [3] : FMULD8ULx16 | |
893 | // [4] : XOR multiply w/ ACCUMUMATE | |
894 | // [5] : Float | |
895 | // Def : Integer, MA Integer w/ and w/o ACCUMULATE, XOR w/o ACCUMULATE | |
896 | ||
897 | output fac_ma_result_en_fx4; // 1 : Save last MA result in shadow flop | |
898 | ||
899 | // ---------------------------------------------------------------------------- | |
900 | // Interface with FDC | |
901 | // ---------------------------------------------------------------------------- | |
902 | ||
903 | input fdc_finish_int_early; | |
904 | input fdc_finish_fltd_early; | |
905 | input fdc_finish_flts_early; | |
906 | output fac_div_flush_fx3; | |
907 | output fac_div_valid_fx1; | |
908 | output fac_divq_valid_fx1; | |
909 | output [4:0] fac_div_control_fx1; // [4:0] : | |
910 | // 0000 : Float Divide Single | |
911 | // 0010 : Float Divide Double | |
912 | // 0100 : Integer Unsigned - 32 bit | |
913 | // 0101 : Integer Signed - 32 bit | |
914 | // 0110 : Integer Unsigned - 64 bit | |
915 | // 0111 : Integer Signed - 64 bit | |
916 | // 1000 : Float SQRT Single | |
917 | // 1010 : Float SQRT Double | |
918 | ||
919 | // ---------------------------------------------------------------------------- | |
920 | // Interface with FPE | |
921 | // ---------------------------------------------------------------------------- | |
922 | ||
923 | output [9:0] fac_aexp_fmt_sel_e; // aop exponent format mux select | |
924 | output [7:0] fac_bexp_fmt_sel_e; // bop exponent format mux select | |
925 | output fac_aux_cin_fx1; // aux exp adder cin | |
926 | ||
927 | // ---------------------------------------------------------------------------- | |
928 | // Interface with LSU | |
929 | // ---------------------------------------------------------------------------- | |
930 | ||
931 | input lsu_fgu_fld_vld_w; | |
932 | input lsu_fgu_fld_b; // FRF load data (unqualified) | |
933 | input [2:0] lsu_fgu_fld_tid_b; | |
934 | input lsu_fgu_fld_32b_b; | |
935 | input lsu_fgu_fsr_load_b; | |
936 | input lsu_fgu_pmen; | |
937 | input lsu_asi_clken; | |
938 | ||
939 | // ---------------------------------------------------------------------------- | |
940 | // Interface with EXU | |
941 | // ---------------------------------------------------------------------------- | |
942 | ||
943 | input [1:0] exu_fgu_gsr_vld_m; // GSR data valid {align,mask} | |
944 | input exu_fgu_flush_m; // EXU{1,0} src has bad ECC or exception, FGU must flush instr | |
945 | output [1:0] fgu_result_tid_fx5; | |
946 | output [4:0] fgu_irf_w_addr_fx5; | |
947 | output fgu_exu_cc_vld_fx5; | |
948 | output [1:0] fgu_exu_w_vld_fx5; | |
949 | ||
950 | // ---------------------------------------------------------------------------- | |
951 | // Interface with FEC | |
952 | // ---------------------------------------------------------------------------- | |
953 | ||
954 | input fec_cecc_fx2; | |
955 | input fec_uecc_fx2; | |
956 | output [1:0] fac_r1_vld_fx1; // FRF r1 read valid (unqualified) | |
957 | output [1:0] fac_r2_vld_fx1; // FRF r2 read valid (unqualified) | |
958 | output fac_ecc_trap_en_fx1; | |
959 | ||
960 | // ---------------------------------------------------------------------------- | |
961 | // Interface with FRF | |
962 | // ---------------------------------------------------------------------------- | |
963 | ||
964 | output [2:0] fac_tid_d; | |
965 | output [4:0] fac_frf_r1_addr_d; | |
966 | output fac_frf_r1_vld_d; | |
967 | ||
968 | // ---------------------------------------------------------------------------- | |
969 | // Interface with SPU | |
970 | // ---------------------------------------------------------------------------- | |
971 | ||
972 | input [6:0] spu_fgu_fpy_ctl_d; // Mult control | |
973 | ||
974 | // ---------------------------------------------------------------------------- | |
975 | // Power Management Signals | |
976 | // ---------------------------------------------------------------------------- | |
977 | ||
978 | output main_clken; // main clken: controls fad,fec,fpf,fpe,fac,fic,fpc | |
979 | output main_clken0; // main clken: controls fad,fec,fpf,fpe,fac,fic,fpc | |
980 | output mul_clken; // multiply clken: controls fpy | |
981 | output div_clken; // divide clken: controls fdc,fdd | |
982 | output vis_clken; // vis clken: controls fgd | |
983 | output asi_clken; // asi clken: controls ASI ring stage flops in fgd | |
984 | output coreon_clken; // coreon_clken: controls all "free running" flops in fac,fec,fpc,fad,fgd | |
985 | ||
986 | // ---------------------------------------------------------------------------- | |
987 | // Global Signals | |
988 | // ---------------------------------------------------------------------------- | |
989 | ||
990 | input l2clk; // clock input | |
991 | input scan_in; | |
992 | input spc_aclk_wmr; | |
993 | input wmr_scan_in; | |
994 | input tcu_pce_ov; // scan signals | |
995 | input spc_aclk; | |
996 | input spc_bclk; | |
997 | input tcu_scan_en; | |
998 | input mbi_frf_read_en; // MBIST | |
999 | input [7:0] mbi_addr; // MBIST | |
1000 | input mbi_run; // MBIST | |
1001 | input [64:0] in_rngl_cdbus; // ASI local ring | |
1002 | ||
1003 | output [7:0] fac_mbist_addr_1f; // MBIST | |
1004 | output fgu_rngl_cdbus_b64; // ASI local ring | |
1005 | output fgu_rngl_cdbus_b63; // ASI local ring | |
1006 | output scan_out; | |
1007 | output wmr_scan_out; | |
1008 | ||
1009 | // scan renames | |
1010 | assign pce_ov = tcu_pce_ov; | |
1011 | assign stop = 1'b0; | |
1012 | assign siclk = spc_aclk; | |
1013 | assign soclk = spc_bclk; | |
1014 | assign se = tcu_scan_en; | |
1015 | // end scan | |
1016 | ||
1017 | ||
1018 | fgu_fac_ctl_l1clkhdr_ctl_macro clkgen_freerun ( | |
1019 | .l2clk(l2clk), | |
1020 | .l1en (1'b1), | |
1021 | .l1clk(l1clk), | |
1022 | .pce_ov(pce_ov), | |
1023 | .stop(stop), | |
1024 | .se(se) | |
1025 | ); | |
1026 | ||
1027 | fgu_fac_ctl_l1clkhdr_ctl_macro clkgen_coreon ( | |
1028 | .l2clk(l2clk), | |
1029 | .l1en (coreon_clken), | |
1030 | .l1clk(l1clk_pm2), | |
1031 | .pce_ov(pce_ov), | |
1032 | .stop(stop), | |
1033 | .se(se) | |
1034 | ); | |
1035 | ||
1036 | fgu_fac_ctl_l1clkhdr_ctl_macro clkgen_main ( | |
1037 | .l2clk(l2clk), | |
1038 | .l1en (main_clken_local), | |
1039 | .l1clk(l1clk_pm1), | |
1040 | .pce_ov(pce_ov), | |
1041 | .stop(stop), | |
1042 | .se(se) | |
1043 | ); | |
1044 | ||
1045 | fgu_fac_ctl_spare_ctl_macro__num_5 spares ( // spares: 13 gates + 1 flop for each "num" | |
1046 | .scan_in(spares_scanin), | |
1047 | .scan_out(spares_scanout), | |
1048 | .l1clk(l1clk), | |
1049 | .siclk(siclk), | |
1050 | .soclk(soclk) | |
1051 | ); | |
1052 | ||
1053 | ||
1054 | // ------------------------------------ | |
1055 | // Power management | |
1056 | // Wakeup conditions: | |
1057 | // - DEC issues FGU instr (includes frf_store, fsr_store) | |
1058 | // - DEC grants SPU access to FGU | |
1059 | // - LSU presents frf_load or fsr_load data | |
1060 | // - EXU presents bmask or alignaddress data | |
1061 | // - ASI ring accesses FGU resource (FPRS, GSR, FRF ECC check bits) | |
1062 | // - WARNING - wakeup for MBIST, Macro Test, other? | |
1063 | // Remain active conditions: | |
1064 | // - FGU instr active in any pipe stage | |
1065 | // - SPU instr active in any pipe stage | |
1066 | // - divide engine is busy (incl pre and post engine) | |
1067 | // - ASI ring bypassing non-FGU ctl/data | |
1068 | // Note: Generally, clks are allowed to remain active for 1 more cyc | |
1069 | // than the min solution to ensure that any state which controls | |
1070 | // the update of an architected facility is allowed to clear. | |
1071 | // Otherwise, when clks are re-enabled, an extra write of the | |
1072 | // architected facility may occur (but would write that same data). | |
1073 | // ------------------------------------ | |
1074 | ||
1075 | // coreon_clken: controls all "free running" flops in fac,fec,fpc,fad,fgd | |
1076 | ||
1077 | assign coreon_clken = | |
1078 | ||
1079 | ~fgu_pmen_e | // force clken=1 if FGU global power management isn't enabled | |
1080 | mbist_run_1f | // MBIST | |
1081 | (|core_running_status_1f[7:0]); // any of the 8 threads are active | |
1082 | ||
1083 | // 0in custom -fire ((mul_clken | div_clken | vis_clken) & ~main_clken) -message "Invalid FGU power management state" | |
1084 | ||
1085 | // main clken: controls fad,fec,fpf,fpe,fac,fic,fpc | |
1086 | ||
1087 | assign main_clken = // may be used to turn on fx1 flops | |
1088 | ||
1089 | ~fgu_pmen_e | // force clken=1 if FGU global power management isn't enabled | |
1090 | ||
1091 | mbist_run_1f | // MBIST | |
1092 | ||
1093 | fgu_decode_e | // includes frf_store, fsr_store, bmask, alignaddress | |
1094 | spu_grant_e | | |
1095 | ||
1096 | frf_store_fx1 | // active 1 xtra cyc | |
1097 | frf_store_fx2 | // active 2nd xtra cyc to allow fgu_{u,c}ecc_fx2 to clear | |
1098 | ||
1099 | fsr_store_fx1 | | |
1100 | fac_fsr_store_fx2 | | |
1101 | fpc_stfsr_en_fx3to5 | // store FSR clears ftt | |
1102 | fpc_stfsr_en_fb | // allow FSR update | |
1103 | fpc_stfsr_en_fw | // active 1 xtra cyc | |
1104 | ||
1105 | fgu_fld_fx3 | // frf_load doesn't need to turn on bypass flops because the | |
1106 | // instr in E needing the bypass will take care of that. | |
1107 | // fsr_load needs clks on the cyc following lsu_fgu_fsr_load_b | |
1108 | // so the arch fsr is captured. | |
1109 | fgu_fld_fx4 | // allow FPRS update | |
1110 | fgu_fld_fx5 | // allow FPRS update | |
1111 | fgu_fld_fb | // active 1 xtra cyc | |
1112 | ||
1113 | fgu_decode_fx1 | // bmask or alignaddress | |
1114 | gsr_w_vld_fx2 | // exu_fgu_gsr_vld_m[1:0] needs fx3 and fx4 flop clks on so the | |
1115 | gsr_w_vld_fx3 | // arch gsr (fx4 flop) is captured | |
1116 | gsr_w_vld_fx4 | // active 1 xtra cyc | |
1117 | ||
1118 | rng_rd_or_wr_1f | // ASI ring accesses FGU resource | |
1119 | rng_rd_or_wr_2f | | |
1120 | fac_rng_rd_or_wr_3f | // FRF ECC check bits rd/wr occurs during 3f | |
1121 | rng_rd_or_wr_4f | | |
1122 | rng_rd_or_wr_5f | // active 1 xtra cyc | |
1123 | ||
1124 | fac_dec_valid_fx1 | // E stage is covered in this eq. by fgu_decode_e | |
1125 | dec_valid_fx2 | | |
1126 | dec_valid_fx3 | | |
1127 | dec_valid_noflush_fx4 | | |
1128 | fac_dec_valid_noflush_fx5 | | |
1129 | dec_valid_noflush_fb | | |
1130 | dec_valid_noflush_fw | // allow FPRS update | |
1131 | dec_valid_noflush_fw1 | // allow FPRS update | |
1132 | dec_valid_noflush_fw2 | // active 1 xtra cyc | |
1133 | ||
1134 | spu_grant_fx1 | // E stage is covered in this eq. by spu_grant_e | |
1135 | spu_grant_fx2 | | |
1136 | spu_grant_fx3 | | |
1137 | spu_grant_fx4 | | |
1138 | spu_grant_fx5 | // active 1 xtra cyc | |
1139 | ||
1140 | div_engine_busy_fx1 | // cyc prior to engine_busy are covered in this eq. by fgu_decode_e | |
1141 | div_engine_busy_fx2 | // ensure fdc internal engine_running_lth has 1 cyc to clear | |
1142 | divq_occupied_fx1 | | |
1143 | div_finish_fb | | |
1144 | div_finish_fw | | |
1145 | div_finish_fw1 | // allow FPRS update | |
1146 | div_finish_fw2 | // allow FPRS update | |
1147 | div_finish_fw3 ; // active 1 xtra cyc | |
1148 | ||
1149 | assign main_clken0 = main_clken; | |
1150 | assign main_clken_local = main_clken; | |
1151 | ||
1152 | // multiply clken: controls fpy | |
1153 | ||
1154 | assign mul_clken = | |
1155 | ||
1156 | ~fgu_pmen_e | // force clken=1 if FGU global power management isn't enabled | |
1157 | ||
1158 | (fgu_decode_e & fpx_itype_mul_e ) | | |
1159 | (fac_dec_valid_fx1 & itype_mul_fx1) | | |
1160 | (dec_valid_fx2 & itype_mul_fx2) | | |
1161 | (dec_valid_fx3 & itype_mul_fx3) | | |
1162 | dec_valid_imul_noflush_fx4 | | |
1163 | dec_valid_imul_noflush_fx5 | | |
1164 | dec_valid_imul_noflush_fb | | |
1165 | dec_valid_imul_noflush_fw | // allow FPRS update | |
1166 | dec_valid_imul_noflush_fw1 | // allow FPRS update | |
1167 | dec_valid_imul_noflush_fw2 | // active 1 xtra cyc | |
1168 | ||
1169 | spu_grant_e | | |
1170 | spu_grant_fx1 | | |
1171 | spu_grant_fx2 | | |
1172 | spu_grant_fx3 | | |
1173 | spu_grant_fx4 | | |
1174 | spu_grant_fx5 ; // active 1 xtra cyc | |
1175 | ||
1176 | // divide clken: controls fdc,fdd | |
1177 | ||
1178 | assign div_clken = | |
1179 | ||
1180 | ~fgu_pmen_e | // force clken=1 if FGU global power management isn't enabled | |
1181 | ||
1182 | (fgu_decode_e & fpx_itype_div_e ) | | |
1183 | div_engine_busy_fx1 | | |
1184 | div_engine_busy_fx2 | // ensure fdc internal engine_running_lth has 1 cyc to clear | |
1185 | divq_occupied_fx1 | | |
1186 | div_finish_fb | | |
1187 | div_finish_fw | | |
1188 | div_finish_fw1 | // allow FPRS update | |
1189 | div_finish_fw2 | // allow FPRS update | |
1190 | div_finish_fw3 ; // active 1 xtra cyc | |
1191 | ||
1192 | // vis clken: controls fgd | |
1193 | ||
1194 | assign vis_clken = | |
1195 | ||
1196 | ~fgu_pmen_e | // force clken=1 if FGU global power management isn't enabled | |
1197 | ||
1198 | fgu_decode_fx1 | // bmask or alignaddress | |
1199 | gsr_w_vld_fx2 | // exu_fgu_gsr_vld_m[1:0] needs fx3 and fx4 flop clks on so the | |
1200 | gsr_w_vld_fx3 | // arch gsr (fx4 flop) is captured | |
1201 | gsr_w_vld_fx4 | // active 1 xtra cyc | |
1202 | ||
1203 | rng_rd_or_wr_1f | // ASI ring accesses FGU resource | |
1204 | rng_rd_or_wr_2f | | |
1205 | fac_rng_rd_or_wr_3f | // FRF ECC check bits rd/wr occurs during 3f | |
1206 | rng_rd_or_wr_4f | | |
1207 | rng_rd_or_wr_5f | // active 1 xtra cyc | |
1208 | ||
1209 | (fgu_decode_e & fgx_instr_e ) | | |
1210 | (fac_dec_valid_fx1 & fgx_instr_fx1 ) | | |
1211 | (dec_valid_fx2 & fgx_instr_fx2 ) | | |
1212 | (dec_valid_fx3 & fgx_instr_fx3 ) | | |
1213 | (dec_valid_noflush_fx4 & fac_fgx_instr_fx4 ) | | |
1214 | (fac_dec_valid_noflush_fx5 & fgx_instr_fx5 ) | | |
1215 | (dec_valid_noflush_fb & fgx_instr_fb ) | | |
1216 | (dec_valid_noflush_fw & fgx_instr_fw ) | // allow FPRS update | |
1217 | (dec_valid_noflush_fw1 & fgx_instr_fw1 ) | // allow FPRS update | |
1218 | (dec_valid_noflush_fw2 & fgx_instr_fw2 ) ; // active 1 xtra cyc | |
1219 | ||
1220 | ||
1221 | // ASI clken: controls ASI ring stage flops in fgd | |
1222 | ||
1223 | assign asi_clken = global_asi_clken; // can be forced active via ASI_SPARC_PWR_MGMT.misc | |
1224 | ||
1225 | ||
1226 | // ---------------------------------------------------------------------------- | |
1227 | // D stage | |
1228 | // ---------------------------------------------------------------------------- | |
1229 | ||
1230 | assign fac_tid_d[2:0] = | |
1231 | ({3{ mbist_run_1f }} & fac_mbist_addr_1f[7:5]) | // MBIST | |
1232 | ({3{~mbist_run_1f & rng_rd_ecc_2f}} & rng_wr_tid_2f[2:0] ) | // ASI | |
1233 | ({3{~mbist_run_1f & ~rng_rd_ecc_2f}} & dec_fgu_tid_d[2:0] ) ; // functional | |
1234 | ||
1235 | assign fac_frf_r1_addr_d[4:0] = | |
1236 | ({5{ mbist_run_1f }} & fac_mbist_addr_1f[4:0]) | // MBIST | |
1237 | ({5{~mbist_run_1f & rng_rd_ecc_2f}} & rng_data_2f_b7_0[7:3] ) | // ASI | |
1238 | ({5{~mbist_run_1f & ~rng_rd_ecc_2f}} & dec_frf_r1_addr_d[4:0]) ; // functional | |
1239 | ||
1240 | assign fac_frf_r1_vld_d = | |
1241 | ( mbist_run_1f & mbist_frf_read_en_1f ) | // MBIST | |
1242 | ( ~mbist_run_1f & rng_rd_ecc_2f ) | // ASI | |
1243 | ( ~mbist_run_1f & ~rng_rd_ecc_2f & dec_frf_r1_vld_d ) ; // functional | |
1244 | ||
1245 | // 0in custom -fire (rng_rd_ecc_2f & (dec_frf_r1_vld_d | dec_frf_r2_vld_d) & (dec_fgu_decode_d | dec_frf_store_d | (fgx_pdist_e & dec_fgu_valid_e))) -message "FRF_ECC ASI collision with FPop" | |
1246 | ||
1247 | ||
1248 | // ---------------------------------------------------------------------------- | |
1249 | // E stage | |
1250 | // ---------------------------------------------------------------------------- | |
1251 | ||
1252 | fgu_fac_ctl_msff_ctl_macro__width_10 e_00 ( | |
1253 | .scan_in(e_00_scanin), | |
1254 | .scan_out(e_00_scanout), | |
1255 | .l1clk(l1clk), | |
1256 | .din ({mbi_run, spc_core_running_status[7:0], lsu_fgu_pmen }), // requires free running clk | |
1257 | .dout({mbist_run_1f, core_running_status_1f[7:0], fgu_pmen_e}), | |
1258 | .siclk(siclk), | |
1259 | .soclk(soclk) // requires free running clk | |
1260 | ); | |
1261 | ||
1262 | fgu_fac_ctl_msff_ctl_macro__width_37 e_01 ( | |
1263 | .scan_in(e_01_scanin), | |
1264 | .scan_out(e_01_scanout), | |
1265 | .l1clk(l1clk_pm2), | |
1266 | .din ({dec_fgu_op3_d[5:0], // requires free running clk or dec_fgu_decode_d en | |
1267 | dec_fgu_opf_d[7:0], // requires free running clk or dec_fgu_decode_d en | |
1268 | dec_frf_r1_vld_d, // requires free running clk or dec_fgu_decode_d en | |
1269 | dec_frf_r2_vld_d, // requires free running clk or dec_fgu_decode_d en | |
1270 | dec_frf_r1_32b_d, // requires free running clk or dec_fgu_decode_d en | |
1271 | dec_frf_r2_32b_d, // requires free running clk or dec_fgu_decode_d en | |
1272 | dec_frf_r1_odd32b_d, // requires free running clk or dec_fgu_decode_d en | |
1273 | dec_frf_r2_odd32b_d, // requires free running clk or dec_fgu_decode_d en | |
1274 | dec_frf_store_d, // requires free running clk or dec_fgu_decode_d en | |
1275 | dec_fsr_store_d, // requires free running clk or dec_fgu_decode_d en | |
1276 | dec_irf_w_addr_d[4:0], // requires free running clk or dec_fgu_decode_d en | |
1277 | dec_spu_grant_d, // requires free running clk or dec_fgu_decode_d en | |
1278 | spu_fgu_fpy_ctl_d[6:0], // requires free running clk or dec_fgu_decode_d en | |
1279 | dec_fgu_decode_d, // requires free running clk or dec_fgu_decode_d en | |
1280 | lsu_asi_clken}), // requires free running clk | |
1281 | .dout({ op3_e[5:0], | |
1282 | opf_e[7:0], | |
1283 | r1_vld_e, | |
1284 | r2_vld_e, | |
1285 | r1_32b_e, | |
1286 | r2_32b_e, | |
1287 | r1_odd32b_e, | |
1288 | r2_odd32b_e, | |
1289 | frf_store_e, | |
1290 | fsr_store_e, | |
1291 | irf_w_addr_e[4:0], | |
1292 | spu_grant_e, | |
1293 | spu_fpy_ctl_e[6:0], | |
1294 | fgu_decode_e, | |
1295 | global_asi_clken}), | |
1296 | .siclk(siclk), | |
1297 | .soclk(soclk) | |
1298 | ); | |
1299 | ||
1300 | fgu_fac_ctl_msff_ctl_macro__width_17 e_02 ( | |
1301 | .scan_in(e_02_scanin), | |
1302 | .scan_out(e_02_scanout), | |
1303 | .l1clk(l1clk_pm2), | |
1304 | .din ({dec_frf_w_vld_d, // requires free running clk or dec_fgu_decode_d en | |
1305 | dec_frf_w_addr_d[4:0], // requires free running clk or dec_fgu_decode_d en | |
1306 | dec_frf_w_32b_d, // requires free running clk or dec_fgu_decode_d en | |
1307 | dec_frf_w_odd32b_d, // requires free running clk or dec_fgu_decode_d en | |
1308 | dec_fgu_tid_d[2:0], // requires free running clk or dec_fgu_decode_d en | |
1309 | dec_frf_r1_addr_d[4:0], // requires free running clk or dec_fgu_decode_d en | |
1310 | dec_exu_src_vld_d}), // requires free running clk or dec_fgu_decode_d en | |
1311 | .dout({ w1_vld_e, | |
1312 | w1_addr_e[4:0], | |
1313 | w1_32b_e, | |
1314 | w1_odd32b_e, | |
1315 | fac_tid_e[2:0], | |
1316 | fac_frf_r1_addr_e[4:0], | |
1317 | exu_w_vld_e}), | |
1318 | .siclk(siclk), | |
1319 | .soclk(soclk) | |
1320 | ); | |
1321 | ||
1322 | fgu_fac_ctl_msff_ctl_macro__width_9 e_03 ( | |
1323 | .scan_in(e_03_scanin), | |
1324 | .scan_out(e_03_scanout), | |
1325 | .l1clk(l1clk_pm1), | |
1326 | .din ({mbi_frf_read_en, mbi_addr[7:0] }), | |
1327 | .dout({mbist_frf_read_en_1f, fac_mbist_addr_1f[7:0]}), | |
1328 | .siclk(siclk), | |
1329 | .soclk(soclk) | |
1330 | ); | |
1331 | ||
1332 | assign i[24:19] = op3_e[5:0]; | |
1333 | assign i[12:5] = opf_e[7:0]; | |
1334 | ||
1335 | // ------------------------------------ | |
1336 | // Begin auto/program generated code | |
1337 | // ------------------------------------ | |
1338 | ||
1339 | assign aman_fmt_sel_e[4] = (!i[12]&!i[11]&!i[10]) | (i[22]) | (i[19]&!i[9]) | ( | |
1340 | i[20]) | (!i[23]); | |
1341 | ||
1342 | assign aman_fmt_sel_e[3] = (!i[22]&i[20]&!i[11]&i[9]&!i[7]&!i[6]) | (i[23]&!i[22] | |
1343 | &!i[12]&!i[11]&!i[10]&i[5]) | (!i[22]&i[19]&!i[9]&i[5]) | (!i[22] | |
1344 | &i[20]&i[11]&i[10]&i[5]) | (!i[22]&i[20]&!i[8]&i[7]&!i[6]&i[5]) | ( | |
1345 | !i[22]&i[20]&i[11]&i[6]&i[5]) | (!i[22]&i[20]&!i[12]&!i[8]&!i[7]&i[5]); | |
1346 | ||
1347 | assign aman_fmt_sel_e[2] = (!i[22]&i[19]&i[9]&i[5]) | (i[23]&!i[22]&!i[20]&!i[19] | |
1348 | &!i[12]&i[11]&i[5]); | |
1349 | ||
1350 | assign aman_fmt_sel_e[1] = (!i[22]&i[19]&i[9]&i[5]) | (i[23]&!i[22]&!i[20]&!i[19] | |
1351 | &!i[12]&i[11]&i[5]); | |
1352 | ||
1353 | assign aman_fmt_sel_e[0] = (!i[22]&i[19]&i[9]&!i[5]) | (i[23]&!i[22]&!i[20] | |
1354 | &!i[19]&!i[12]&i[11]&!i[5]); | |
1355 | ||
1356 | // assign bman_fmt_sel_e[4] = (!i[6]&!i[5]) | (!i[12]&!i[11]&!i[10]) | (i[22]) | ( | |
1357 | // i[19]&!i[9]) | (i[20]) | (!i[23]); | |
1358 | ||
1359 | assign bman_fmt_sel_e[3] = (!i[22]&i[20]&!i[8]&!i[7]&i[6]&i[5]) | (i[23]&!i[22] | |
1360 | &i[12]&i[11]&!i[6]&!i[5]) | (!i[22]&i[20]&!i[8]&i[7]&!i[6]&i[5]) | ( | |
1361 | !i[22]&i[20]&!i[11]&i[9]&i[8]&!i[7]&!i[6]) | (i[23]&!i[22]&!i[12] | |
1362 | &!i[11]&!i[10]&i[5]) | (!i[22]&i[19]&!i[9]&i[5]) | (!i[22]&i[20] | |
1363 | &i[11]&i[5]); | |
1364 | ||
1365 | assign bman_fmt_sel_e[2] = (!i[22]&i[19]&i[9]&i[5]) | (i[23]&!i[22]&!i[20]&!i[19] | |
1366 | &i[12]&i[5]) | (i[23]&!i[22]&!i[20]&i[10]&!i[7]&i[5]) | (i[23]&!i[22] | |
1367 | &!i[20]&!i[19]&i[11]&i[5]); | |
1368 | ||
1369 | assign bman_fmt_sel_e[1] = (!i[22]&i[19]&i[9]&i[5]) | (i[23]&!i[22]&!i[20]&!i[19] | |
1370 | &i[12]&i[5]) | (i[23]&!i[22]&!i[20]&i[10]&!i[7]&i[5]) | (i[23]&!i[22] | |
1371 | &!i[20]&!i[19]&i[11]&i[5]); | |
1372 | ||
1373 | assign bman_fmt_sel_e[0] = (!i[22]&i[19]&i[9]&!i[5]) | (i[23]&!i[22]&!i[20] | |
1374 | &i[10]&!i[7]&!i[5]) | (i[23]&!i[22]&!i[19]&i[12]&i[6]) | (i[23]&!i[22] | |
1375 | &!i[20]&!i[19]&i[11]&i[6]); | |
1376 | ||
1377 | assign aexp_fmt_sel_e[6] = (!i[6]); | |
1378 | ||
1379 | assign aexp_fmt_sel_e[5] = (!i[11]&i[6]); | |
1380 | ||
1381 | assign aexp_fmt_sel_e[4] = (!i[11]&i[5]); | |
1382 | ||
1383 | assign aexp_fmt_sel_e[3] = (!i[12]); | |
1384 | ||
1385 | assign aexp_fmt_sel_e[2] = (!i[12]&i[5]); | |
1386 | ||
1387 | assign aexp_fmt_sel_e[1] = (!i[12]&i[5]); | |
1388 | ||
1389 | assign aexp_fmt_sel_e[0] = (i[12]&i[7]&i[6]) | (i[12]&i[8]&i[5]) | (i[22]) | ( | |
1390 | i[19]&!i[9]) | (i[20]) | (!i[12]&!i[11]) | (!i[23]); | |
1391 | ||
1392 | assign bexp_fmt_sel_e[2] = (i[5]); | |
1393 | ||
1394 | assign bexp_fmt_sel_e[1] = (i[5]); | |
1395 | ||
1396 | assign bexp_fmt_sel_e[0] = (!i[6]&!i[5]) | (!i[12]&!i[11]&!i[10]) | (i[22]) | ( | |
1397 | i[19]&!i[9]) | (i[20]) | (!i[23]); | |
1398 | ||
1399 | assign fpx_itype_e[2] = (!i[22]&i[19]&i[9]) | (i[23]&i[20]&!i[11]&i[9]&!i[7] | |
1400 | &!i[6]) | (i[23]&i[20]&!i[11]&i[9]&!i[8]) | (i[23]&!i[22]&!i[20] | |
1401 | &!i[12]&i[11]&i[8]) | (!i[23]&i[19]) | (i[23]&!i[22]&!i[19]&!i[11] | |
1402 | &i[10]&!i[9]) | (!i[24]); | |
1403 | ||
1404 | assign fpx_itype_e[1] = (i[23]&!i[22]&!i[20]&!i[11]&i[10]&!i[7]) | (i[23]&!i[22] | |
1405 | &i[12]&!i[6]&!i[5]) | (i[23]&!i[22]&!i[20]&!i[19]&i[12]&!i[8]&!i[7]) | ( | |
1406 | !i[23]&i[21]&i[19]) | (i[23]&!i[22]&!i[20]&i[8]&i[7]) | (!i[24]&i[21]); | |
1407 | ||
1408 | assign fpx_itype_e[0] = (i[23]&!i[22]&!i[19]&i[12]&i[7]) | (!i[22]&i[20]&!i[11] | |
1409 | &i[9]&!i[7]&!i[6]) | (i[23]&!i[22]&i[12]&!i[6]&!i[5]) | (!i[22]&i[20] | |
1410 | &!i[11]&i[9]&!i[8]) | (i[23]&!i[22]&!i[20]&i[10]&!i[7]) | (i[23] | |
1411 | &!i[22]&!i[20]&i[11]&i[8]&!i[7]) | (!i[21]); | |
1412 | ||
1413 | assign fpx_dtype_e[2] = (!i[20]&!i[11]&!i[8]&!i[7]) | (!i[22]&i[10]&i[9]) | ( | |
1414 | !i[23]&!i[20]) | (i[22]&!i[20]) | (!i[21]); | |
1415 | ||
1416 | assign fpx_dtype_e[1] = (i[23]&!i[22]&!i[19]&!i[10]&i[9]) | (i[22]&i[21]&i[20]) | ( | |
1417 | i[21]&i[20]&!i[9]); | |
1418 | ||
1419 | assign fpx_dtype_e[0] = (!i[22]&i[20]&!i[9]&i[7]) | (i[23]&!i[22]&i[12]&i[11] | |
1420 | &!i[7]) | (i[23]&!i[22]&!i[12]&!i[10]&i[6]) | (i[23]&!i[22]&!i[20] | |
1421 | &i[8]&!i[5]) | (i[22]&i[21]&i[20]) | (i[23]&!i[22]&i[11]&i[10]); | |
1422 | ||
1423 | assign fpx_stype_e[1] = (!i[6]&!i[5]); | |
1424 | ||
1425 | assign fpx_stype_e[0] = (!i[11]&!i[5]) | (i[6]); | |
1426 | ||
1427 | assign fpx_sign_instr_e = (i[23]&!i[22]&!i[19]&!i[12]&!i[10]&i[7]); | |
1428 | ||
1429 | assign fpx_rnd_trunc_e = (i[12]&!i[8]&!i[7]) | (!i[12]&!i[11]&!i[10]) | (i[22]) | ( | |
1430 | i[19]) | (i[20]) | (!i[23]); | |
1431 | ||
1432 | assign fpx_mulscc_e = (!i[23]&!i[22]); | |
1433 | ||
1434 | assign fpx_saverestore_e = (i[23]&i[22]&!i[20]); | |
1435 | ||
1436 | assign fpx_int_cc_vld_e = (!i[23]&!i[22]) | (!i[24]&i[23]); | |
1437 | ||
1438 | assign fpx_fmul8x16_e = (!i[22]&i[20]&!i[11]&i[9]&!i[8]&!i[7]&!i[6]); | |
1439 | ||
1440 | assign fpx_fmul8x16au_e = (!i[22]&i[20]&!i[11]&!i[8]&!i[7]&i[6]&i[5]); | |
1441 | ||
1442 | assign fpx_fmul8x16al_e = (!i[22]&i[20]&!i[11]&i[9]&!i[8]&i[7]&!i[6]); | |
1443 | ||
1444 | assign fpx_fmul8sux16_e = (!i[22]&i[20]&!i[11]&i[9]&!i[8]&!i[5]); | |
1445 | ||
1446 | assign fpx_fmul8ulx16_e = (!i[22]&i[20]&!i[11]&i[7]&i[6]&i[5]); | |
1447 | ||
1448 | assign fpx_fmuld8sux16_e = (!i[22]&i[20]&!i[11]&i[9]&!i[6]&!i[5]); | |
1449 | ||
1450 | assign fpx_fmuld8ulx16_e = (!i[22]&i[20]&!i[11]&i[8]&!i[7]&!i[6]&i[5]); | |
1451 | ||
1452 | assign fpx_nv_vld_e = (!i[22]&i[19]&i[9]) | (i[23]&!i[22]&!i[20]&i[10]&!i[7]) | ( | |
1453 | i[23]&!i[22]&!i[20]&!i[19]&i[11]&i[6]) | (i[23]&!i[22]&!i[20]&!i[19] | |
1454 | &i[11]&i[5]) | (i[23]&!i[22]&!i[20]&!i[19]&i[12]&!i[8]&!i[7]); | |
1455 | ||
1456 | assign fpx_of_vld_e = (i[23]&!i[22]&!i[20]&!i[19]&!i[12]&i[11]&!i[10]) | (i[23] | |
1457 | &!i[22]&!i[20]&!i[19]&i[11]&!i[9]&i[6]); | |
1458 | ||
1459 | assign fpx_uf_vld_e = (i[23]&!i[22]&!i[20]&!i[19]&!i[12]&i[11]&!i[10]) | (i[23] | |
1460 | &!i[22]&!i[20]&!i[19]&i[11]&!i[9]&i[6]); | |
1461 | ||
1462 | assign fpx_dz_vld_e = (i[23]&!i[22]&!i[20]&i[8]&i[7]); | |
1463 | ||
1464 | assign fpx_nx_vld_e = (i[23]&!i[22]&i[12]&i[8]&i[5]) | (i[23]&!i[22]&!i[20] | |
1465 | &i[10]&!i[7]) | (i[23]&!i[22]&!i[20]&!i[19]&i[12]&!i[11]) | (i[23] | |
1466 | &!i[22]&!i[20]&!i[19]&i[11]&!i[8]) | (i[23]&!i[22]&!i[20]&!i[12] | |
1467 | &i[11]&i[8]); | |
1468 | ||
1469 | assign fpx_unfin_vld_e = (i[23]&!i[22]&!i[20]&i[10]&!i[7]) | (i[23]&!i[22]&!i[20] | |
1470 | &!i[19]&i[11]&i[6]) | (i[23]&!i[22]&!i[20]&!i[19]&i[12]&!i[8]&!i[7]) | ( | |
1471 | i[23]&!i[22]&!i[20]&!i[19]&i[11]&i[5]); | |
1472 | ||
1473 | assign fgx_mvcond_e = (!i[22]&i[19]&!i[9]); | |
1474 | ||
1475 | assign fgx_mvucond_e = (i[23]&!i[22]&!i[19]&!i[12]&!i[11]&!i[10]&!i[8]&!i[7]); | |
1476 | ||
1477 | assign fgx_abs_e = (i[23]&!i[22]&!i[12]&!i[11]&!i[10]&i[8]); | |
1478 | ||
1479 | assign fgx_neg_e = (i[23]&!i[22]&!i[12]&!i[11]&!i[10]&i[7]); | |
1480 | ||
1481 | assign fgx_logical_e = (!i[22]&i[20]&i[11]&i[10]); | |
1482 | ||
1483 | assign fgx_expand_e = (!i[22]&i[20]&!i[10]&i[8]&!i[6]&i[5]); | |
1484 | ||
1485 | assign fgx_merge_e = (!i[22]&i[20]&!i[10]&i[8]&i[6]); | |
1486 | ||
1487 | assign fgx_align_e = (!i[22]&i[20]&!i[10]&i[8]&!i[7]&!i[5]); | |
1488 | ||
1489 | assign fgx_shuffle_e = (!i[22]&i[20]&!i[10]&i[8]&i[7]&!i[5]); | |
1490 | ||
1491 | assign fgx_pack16_e = (!i[22]&i[20]&!i[11]&i[8]&i[6]&i[5]); | |
1492 | ||
1493 | assign fgx_pack32_e = (!i[22]&i[20]&!i[11]&i[9]&!i[7]&i[6]&!i[5]); | |
1494 | ||
1495 | assign fgx_packfix_e = (!i[22]&i[20]&!i[11]&i[8]&i[7]&i[5]); | |
1496 | ||
1497 | assign fgx_pdist_e = (!i[22]&i[20]&!i[11]&i[9]&i[8]&i[7]&!i[5]); | |
1498 | ||
1499 | assign fgx_popc_e = (i[24]&i[22]&i[20]); | |
1500 | ||
1501 | assign fgx_siam_e = (!i[22]&i[20]&i[12]); | |
1502 | ||
1503 | assign fpx_itype_mul_e = (!i[22]&i[20]&!i[11]&i[9]&!i[7]&!i[6]) | (i[23]&!i[22] | |
1504 | &!i[20]&!i[12]&i[11]&i[8]&!i[7]) | (!i[22]&i[20]&!i[11]&i[9]&!i[8]) | ( | |
1505 | !i[21]); | |
1506 | ||
1507 | assign fpx_itype_div_e = (i[23]&!i[22]&!i[20]&!i[11]&i[10]&!i[7]) | (!i[23] | |
1508 | &i[21]&i[19]) | (i[23]&!i[22]&!i[20]&i[8]&i[7]) | (!i[24]&i[21]); | |
1509 | ||
1510 | assign fgx_instr_e = (i[24]&i[22]&i[20]) | (!i[22]&i[20]&i[9]&i[8]&i[7]) | ( | |
1511 | !i[22]&i[20]&i[9]&i[8]&i[6]) | (i[23]&!i[22]&!i[12]&!i[11]&!i[10]) | ( | |
1512 | !i[22]&i[20]&i[11]&i[10]) | (!i[22]&i[20]&!i[10]&!i[9]) | (!i[22] | |
1513 | &i[19]&!i[9]); | |
1514 | ||
1515 | // ------------------------------------ | |
1516 | // End auto/program generated code | |
1517 | // ------------------------------------ | |
1518 | ||
1519 | // For single source (or no source) fgu ops that read frf | |
1520 | // ensure that unneeded frf read port isn't enabled by DEC | |
1521 | // Note: | |
1522 | // dec_spu_grant_d, dec_exu_src_vld_d have no frf source | |
1523 | // dec_frf_store_d, dec_fsr_store_d have rs2 only | |
1524 | // | |
1525 | // rs1 only: FSRC1{s}, FNOT1{s} | |
1526 | // rs2 only: FABS(s,d), FiTO(s,d), FMOV(s,d), FMOV(s,d)cc, FMOV(s,d)r, FNEG(s,d), FSQRT(s,d), F(s,d)TOi, | |
1527 | // F(s,d)TO(d,s), F(s,d)TOx, FxTO(s,d), FSRC2{s}, FNOT2{s}, FEXPAND, FPACK16, FPACKFIX, PDIST(beat2) | |
1528 | // no frf source: FZERO{s}, FONE{s}, SIAM | |
1529 | // | |
1530 | // 0in custom -fire ( dec_fgu_valid_e & r2_vld_e & ((fgx_logical_e & (opf_e[7:1]==7'b0111010)) | (fgx_logical_e & (opf_e[7:1]==7'b0110101)) )) -message "Invalid FRF rs2 read enable" | |
1531 | // | |
1532 | // 0in custom -fire ( dec_fgu_valid_e & r1_vld_e & (fgx_abs_e | fgx_neg_e | fgx_mvcond_e | fgx_mvucond_e | (fpx_itype_e[2:0]==3'b001) | (fpx_itype_e[2:0]==3'b010) | (fpx_itype_e[2:0]==3'b011) | (fpx_itype_e[2:0]==3'b111) | fgx_expand_e | fgx_pack16_e | fgx_packfix_e | (fgx_logical_e & (opf_e[7:1]==7'b0111100)) | (fgx_logical_e & (opf_e[7:1]==7'b0110011)) )) -message "Invalid FRF rs1 read enable" | |
1533 | // | |
1534 | // 0in custom -fire ($0in_delay(fac_fgx_pdist_fx1,1) & dec_valid_fx2 & $0in_delay(r1_vld_e,1)) -message "Invalid FRF rs1 read enable during PDIST 2nd beat" | |
1535 | // | |
1536 | // 0in custom -fire ( dec_fgu_valid_e & (r1_vld_e | r2_vld_e) & ( fgx_siam_e | (fgx_logical_e & (opf_e[7:1]==7'b0110000)) | (fgx_logical_e & (opf_e[7:1]==7'b0111111)) )) -message "Invalid FRF rs1 or rs2 read enable" | |
1537 | // | |
1538 | // 0in custom -fire (exu_w_vld_e & dec_fgu_valid_e & (r1_vld_e | r2_vld_e)) -message "Invalid FRF read enable during EXU op" | |
1539 | // | |
1540 | // 0in custom -fire (spu_grant_e & (r1_vld_e | r2_vld_e)) -message "Invalid FRF read enable during SPU op" | |
1541 | ||
1542 | assign fac_exu_src_e = exu_w_vld_e & ~mbist_run_1f; | |
1543 | ||
1544 | assign q_fgx_pdist_e = fgx_pdist_e & fgu_decode_e; // pdist 2nd beat has fgu_decode_e=1'b0 | |
1545 | ||
1546 | assign fst_fmt_sel_e[0] = frf_store_e & r2_odd32b_e & fgu_decode_e; // pwr mgmt: aomux free zeros | |
1547 | assign fst_fmt_sel_e[1] = frf_store_e & ~r2_odd32b_e & fgu_decode_e; // pwr mgmt: aomux free zeros | |
1548 | assign fst_fmt_sel_e[2] = fsr_store_e & ~r2_32b_e & fgu_decode_e; // pwr mgmt: aomux free zeros | |
1549 | assign fst_fmt_sel_e[3] = fsr_store_e & r2_32b_e & fgu_decode_e; // pwr mgmt: aomux free zeros | |
1550 | ||
1551 | // odd address and store handling equations | |
1552 | // these equations use predecode signals to qualify the auto/program generated format selects | |
1553 | ||
1554 | assign q_aman_fmt_sel_e[1] = aman_fmt_sel_e[1] & r1_odd32b_e; | |
1555 | assign q_aman_fmt_sel_e[2] = aman_fmt_sel_e[2] & ~r1_odd32b_e; | |
1556 | assign q_aman_fmt_sel_e[3] = aman_fmt_sel_e[3] & r1_odd32b_e; | |
1557 | assign q_aman_fmt_sel_e[4] = aman_fmt_sel_e[4] & ~r1_odd32b_e; | |
1558 | ||
1559 | assign q_bman_fmt_sel_e[0] = | |
1560 | fgu_decode_e & // pdist 2nd beat has fgu_decode_e=1'b0 | |
1561 | bman_fmt_sel_e[0]; | |
1562 | ||
1563 | assign q_bman_fmt_sel_e[1] = | |
1564 | fgu_decode_e & // pdist 2nd beat has fgu_decode_e=1'b0 | |
1565 | bman_fmt_sel_e[1] & r2_odd32b_e; | |
1566 | ||
1567 | assign q_bman_fmt_sel_e[2] = | |
1568 | fgu_decode_e & // pdist 2nd beat has fgu_decode_e=1'b0 | |
1569 | bman_fmt_sel_e[2] & ~r2_odd32b_e; | |
1570 | ||
1571 | assign q_bman_fmt_sel_e[3] = | |
1572 | fgu_decode_e & // pdist 2nd beat has fgu_decode_e=1'b0 | |
1573 | bman_fmt_sel_e[3] & r2_odd32b_e; | |
1574 | ||
1575 | assign fac_aman_fmt_sel_e[4:0] = {q_aman_fmt_sel_e[4:1], aman_fmt_sel_e[0]}; | |
1576 | assign fac_bman_fmt_sel_e[3:0] = q_bman_fmt_sel_e[3:0]; | |
1577 | assign fac_bman_fmt_sel_e[4] = ~(|fac_bman_fmt_sel_e[3:0]); | |
1578 | ||
1579 | assign q_aexp_fmt_sel_e[1] = aexp_fmt_sel_e[1] & r1_odd32b_e; | |
1580 | assign q_bexp_fmt_sel_e[1] = bexp_fmt_sel_e[1] & r2_odd32b_e; | |
1581 | ||
1582 | assign aexp_fmt_sel_e[7] = (fpx_itype_e[2:0] == 3'b001); // FdTOs | |
1583 | ||
1584 | assign q_aexp_fmt_sel_e[8] = | |
1585 | aexp_fmt_sel_e[1] & r1_odd32b_e & (opf_e[6:5] == 2'b11); // FsMULd | |
1586 | ||
1587 | assign aexp_fmt_sel_e[9] = | |
1588 | aexp_fmt_sel_e[2] & (opf_e[6:5] == 2'b11); // FsMULd | |
1589 | ||
1590 | assign fac_aexp_fmt_sel_e[9:0] = | |
1591 | { aexp_fmt_sel_e[9], | |
1592 | q_aexp_fmt_sel_e[8], | |
1593 | aexp_fmt_sel_e[7:2], | |
1594 | q_aexp_fmt_sel_e[1], | |
1595 | aexp_fmt_sel_e[0] }; | |
1596 | ||
1597 | assign q_bexp_fmt_sel_e[3] = | |
1598 | bexp_fmt_sel_e[1] & r2_odd32b_e & (fpx_itype_e[2:0] == 3'b110); // FDIV | |
1599 | ||
1600 | assign bexp_fmt_sel_e[4] = | |
1601 | bexp_fmt_sel_e[2] & (fpx_itype_e[2:0] == 3'b110); // FDIV | |
1602 | ||
1603 | assign bexp_fmt_sel_e[5] = (fpx_itype_e[2:0] == 3'b110); // FDIV | |
1604 | ||
1605 | assign bexp_fmt_sel_e[6] = | |
1606 | bexp_fmt_sel_e[1] & r2_odd32b_e & (opf_e[6:5] == 2'b11); // FsMULd | |
1607 | ||
1608 | assign bexp_fmt_sel_e[7] = | |
1609 | bexp_fmt_sel_e[2] & (opf_e[6:5] == 2'b11); // FsMULd | |
1610 | ||
1611 | assign fac_bexp_fmt_sel_e[7:0] = | |
1612 | { bexp_fmt_sel_e[7:4], | |
1613 | q_bexp_fmt_sel_e[3], | |
1614 | bexp_fmt_sel_e[2], | |
1615 | q_bexp_fmt_sel_e[1], | |
1616 | bexp_fmt_sel_e[0] }; | |
1617 | ||
1618 | assign fpx_sp_dest_e = | |
1619 | (fpx_dtype_e[2:0] == 3'b000) | // sp | |
1620 | (fpx_dtype_e[2:0] == 3'b011) ; // 32-bit | |
1621 | ||
1622 | assign q_w1_vld_e[0] = w1_vld_e & (~w1_32b_e | (w1_32b_e & w1_odd32b_e)); | |
1623 | assign q_w1_vld_e[1] = w1_vld_e & (~w1_32b_e | (w1_32b_e & ~w1_odd32b_e)); | |
1624 | ||
1625 | // for FCMP: w1_addr_e[4]=cc[0], w1_addr_e[0]=cc[1] | |
1626 | assign cc_target_e[1:0] = {w1_addr_e[0], w1_addr_e[4]}; | |
1627 | ||
1628 | // must later clear fcc_vld if (nv & TEM) | flush | |
1629 | ||
1630 | assign pre_fcc_vld_e[3] = | |
1631 | dec_fgu_valid_e & | |
1632 | (cc_target_e[1:0] == 2'b11) & | |
1633 | (fpx_itype_e[2:0] == 3'b100) & (fpx_dtype_e[2:1] == 2'b00); // FCMP,FCMPE | |
1634 | ||
1635 | assign pre_fcc_vld_e[2] = | |
1636 | dec_fgu_valid_e & | |
1637 | (cc_target_e[1:0] == 2'b10) & | |
1638 | (fpx_itype_e[2:0] == 3'b100) & (fpx_dtype_e[2:1] == 2'b00); // FCMP,FCMPE | |
1639 | ||
1640 | assign pre_fcc_vld_e[1] = | |
1641 | dec_fgu_valid_e & | |
1642 | (cc_target_e[1:0] == 2'b01) & | |
1643 | (fpx_itype_e[2:0] == 3'b100) & (fpx_dtype_e[2:1] == 2'b00); // FCMP,FCMPE | |
1644 | ||
1645 | assign pre_fcc_vld_e[0] = | |
1646 | dec_fgu_valid_e & | |
1647 | (cc_target_e[1:0] == 2'b00) & | |
1648 | (fpx_itype_e[2:0] == 3'b100) & (fpx_dtype_e[2:1] == 2'b00); // FCMP,FCMPE | |
1649 | ||
1650 | assign i_fsr_w2_vld_fb[0] = // load FSR 32b | |
1651 | lsu_fgu_fsr_load_b & lsu_fgu_fld_32b_b; | |
1652 | ||
1653 | assign i_fsr_w2_vld_fb[1] = // load FSR 64b | |
1654 | lsu_fgu_fsr_load_b & ~lsu_fgu_fld_32b_b; | |
1655 | ||
1656 | assign i_fsr_w2_vld_fb[2] = | |
1657 | div_finish_fltd_fb | div_finish_flts_fb; // div/sqrt, load FSR doesn't update ftt | |
1658 | ||
1659 | // 0in custom -fire ((lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & div_engine_busy_e & (lsu_fgu_fld_tid_b[2:0]==div_tid_in_e[2:0])),1))) | (lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & (div_finish_fltd_fb | div_finish_flts_fb) & (lsu_fgu_fld_tid_b[2:0]==fac_fpd_tid_fb[2:0])),1))) | (lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & dec_fgu_valid_e & (lsu_fgu_fld_tid_b[2:0]==fac_tid_e[2:0])),1))) | (lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & fac_dec_valid_fx1 & (lsu_fgu_fld_tid_b[2:0]==tid_fx1[2:0])),1))) | (lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & dec_valid_fx2 & (lsu_fgu_fld_tid_b[2:0]==tid_fx2[2:0])),1))) | (lsu_fgu_fld_vld_w & ($0in_delay((lsu_fgu_fsr_load_b & dec_valid_fx3 & (lsu_fgu_fld_tid_b[2:0]==tid_fx3[2:0])),1)))) -message "LDFSR collision with FPop" | |
1660 | ||
1661 | assign fsr_w1_qvld_fb = // other FPop w1 or fcmp with trap, not unfin | |
1662 | ~fpc_fpx_unfin_fb & | |
1663 | (fsr_w1_vld_fb[0] | (pre_fcc_vld_fb & ~(|fcc_vld_fb[3:0]))); | |
1664 | ||
1665 | assign fsr_w2_qvld_fb = | |
1666 | ~fpc_fpd_unfin_fb & | |
1667 | i_fsr_w2_vld_fb[2]; | |
1668 | ||
1669 | // ---------------- | |
1670 | // FSR tid0 selects | |
1671 | // ---------------- | |
1672 | ||
1673 | assign fsr0_sel_fb[5] = | |
1674 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd0); | |
1675 | ||
1676 | assign fsr0_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1677 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd0); | |
1678 | ||
1679 | assign fsr0_sel_fb[3] = // enable flop | |
1680 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd0)) | | |
1681 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd0)) ; | |
1682 | ||
1683 | assign fsr0_sel_fb[2:0] = | |
1684 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd2) | // ST(X)FSR | |
1685 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd2) | // unfin w1 | |
1686 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd0))}} & 3'd2) | // unfin FDIV/FSQRT | |
1687 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd3) | // FCMP(E) fcc0 | |
1688 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd4) | // FCMP(E) fcc1 | |
1689 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd5) | // FCMP(E) fcc2 | |
1690 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd6) | // FCMP(E) fcc3 | |
1691 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd0))}} & 3'd7) | // other FPop w1 | |
1692 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd0))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1693 | ||
1694 | // ---------------- | |
1695 | // FSR tid1 selects | |
1696 | // ---------------- | |
1697 | ||
1698 | assign fsr1_sel_fb[5] = | |
1699 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd1); | |
1700 | ||
1701 | assign fsr1_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1702 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd1); | |
1703 | ||
1704 | assign fsr1_sel_fb[3] = // enable flop | |
1705 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd1)) | | |
1706 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd1)) ; | |
1707 | ||
1708 | assign fsr1_sel_fb[2:0] = | |
1709 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd2) | // ST(X)FSR | |
1710 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd2) | // unfin w1 | |
1711 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd1))}} & 3'd2) | // unfin FDIV/FSQRT | |
1712 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd3) | // FCMP(E) fcc0 | |
1713 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd4) | // FCMP(E) fcc1 | |
1714 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd5) | // FCMP(E) fcc2 | |
1715 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd6) | // FCMP(E) fcc3 | |
1716 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd1))}} & 3'd7) | // other FPop w1 | |
1717 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd1))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1718 | ||
1719 | // ---------------- | |
1720 | // FSR tid2 selects | |
1721 | // ---------------- | |
1722 | ||
1723 | assign fsr2_sel_fb[5] = | |
1724 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd2); | |
1725 | ||
1726 | assign fsr2_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1727 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd2); | |
1728 | ||
1729 | assign fsr2_sel_fb[3] = // enable flop | |
1730 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd2)) | | |
1731 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd2)) ; | |
1732 | ||
1733 | assign fsr2_sel_fb[2:0] = | |
1734 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd2) | // ST(X)FSR | |
1735 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd2) | // unfin w1 | |
1736 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd2))}} & 3'd2) | // unfin FDIV/FSQRT | |
1737 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd3) | // FCMP(E) fcc0 | |
1738 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd4) | // FCMP(E) fcc1 | |
1739 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd5) | // FCMP(E) fcc2 | |
1740 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd6) | // FCMP(E) fcc3 | |
1741 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd2))}} & 3'd7) | // other FPop w1 | |
1742 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd2))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1743 | ||
1744 | // ---------------- | |
1745 | // FSR tid3 selects | |
1746 | // ---------------- | |
1747 | ||
1748 | assign fsr3_sel_fb[5] = | |
1749 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd3); | |
1750 | ||
1751 | assign fsr3_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1752 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd3); | |
1753 | ||
1754 | assign fsr3_sel_fb[3] = // enable flop | |
1755 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd3)) | | |
1756 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd3)) ; | |
1757 | ||
1758 | assign fsr3_sel_fb[2:0] = | |
1759 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd2) | // ST(X)FSR | |
1760 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd2) | // unfin w1 | |
1761 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd3))}} & 3'd2) | // unfin FDIV/FSQRT | |
1762 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd3) | // FCMP(E) fcc0 | |
1763 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd4) | // FCMP(E) fcc1 | |
1764 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd5) | // FCMP(E) fcc2 | |
1765 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd6) | // FCMP(E) fcc3 | |
1766 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd3))}} & 3'd7) | // other FPop w1 | |
1767 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd3))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1768 | ||
1769 | // ---------------- | |
1770 | // FSR tid4 selects | |
1771 | // ---------------- | |
1772 | ||
1773 | assign fsr4_sel_fb[5] = | |
1774 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd4); | |
1775 | ||
1776 | assign fsr4_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1777 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd4); | |
1778 | ||
1779 | assign fsr4_sel_fb[3] = // enable flop | |
1780 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd4)) | | |
1781 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd4)) ; | |
1782 | ||
1783 | assign fsr4_sel_fb[2:0] = | |
1784 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd2) | // ST(X)FSR | |
1785 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd2) | // unfin w1 | |
1786 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd4))}} & 3'd2) | // unfin FDIV/FSQRT | |
1787 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd3) | // FCMP(E) fcc0 | |
1788 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd4) | // FCMP(E) fcc1 | |
1789 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd5) | // FCMP(E) fcc2 | |
1790 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd6) | // FCMP(E) fcc3 | |
1791 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd4))}} & 3'd7) | // other FPop w1 | |
1792 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd4))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1793 | ||
1794 | // ---------------- | |
1795 | // FSR tid5 selects | |
1796 | // ---------------- | |
1797 | ||
1798 | assign fsr5_sel_fb[5] = | |
1799 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd5); | |
1800 | ||
1801 | assign fsr5_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1802 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd5); | |
1803 | ||
1804 | assign fsr5_sel_fb[3] = // enable flop | |
1805 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd5)) | | |
1806 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd5)) ; | |
1807 | ||
1808 | assign fsr5_sel_fb[2:0] = | |
1809 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd2) | // ST(X)FSR | |
1810 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd2) | // unfin w1 | |
1811 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd5))}} & 3'd2) | // unfin FDIV/FSQRT | |
1812 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd3) | // FCMP(E) fcc0 | |
1813 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd4) | // FCMP(E) fcc1 | |
1814 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd5) | // FCMP(E) fcc2 | |
1815 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd6) | // FCMP(E) fcc3 | |
1816 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd5))}} & 3'd7) | // other FPop w1 | |
1817 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd5))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1818 | ||
1819 | // ---------------- | |
1820 | // FSR tid6 selects | |
1821 | // ---------------- | |
1822 | ||
1823 | assign fsr6_sel_fb[5] = | |
1824 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd6); | |
1825 | ||
1826 | assign fsr6_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1827 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd6); | |
1828 | ||
1829 | assign fsr6_sel_fb[3] = // enable flop | |
1830 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd6)) | | |
1831 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd6)) ; | |
1832 | ||
1833 | assign fsr6_sel_fb[2:0] = | |
1834 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd2) | // ST(X)FSR | |
1835 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd2) | // unfin w1 | |
1836 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd6))}} & 3'd2) | // unfin FDIV/FSQRT | |
1837 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd3) | // FCMP(E) fcc0 | |
1838 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd4) | // FCMP(E) fcc1 | |
1839 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd5) | // FCMP(E) fcc2 | |
1840 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd6) | // FCMP(E) fcc3 | |
1841 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd6))}} & 3'd7) | // other FPop w1 | |
1842 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd6))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1843 | ||
1844 | // ---------------- | |
1845 | // FSR tid7 selects | |
1846 | // ---------------- | |
1847 | ||
1848 | assign fsr7_sel_fb[5] = | |
1849 | i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd7); | |
1850 | ||
1851 | assign fsr7_sel_fb[4] = // select w1 {ftt,aexc,cexc}, not fpd {ftt,aexc,cexc} | |
1852 | (( |fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd7); | |
1853 | ||
1854 | assign fsr7_sel_fb[3] = // enable flop | |
1855 | ( i_fsr_w2_vld_fb[2] & (fac_fpd_tid_fb[2:0] == 3'd7)) | | |
1856 | (((|fsr_w1_vld_fb[1:0]) | pre_fcc_vld_fb) & (fac_w1_tid_fb[2:0] == 3'd7)) ; | |
1857 | ||
1858 | assign fsr7_sel_fb[2:0] = | |
1859 | ({3{(fsr_w1_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd2) | // ST(X)FSR | |
1860 | ({3{(fpc_fpx_unfin_fb & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd2) | // unfin w1 | |
1861 | ({3{(fpc_fpd_unfin_fb & (fac_fpd_tid_fb[2:0] == 3'd7))}} & 3'd2) | // unfin FDIV/FSQRT | |
1862 | ({3{(fcc_vld_fb[0] & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd3) | // FCMP(E) fcc0 | |
1863 | ({3{(fcc_vld_fb[1] & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd4) | // FCMP(E) fcc1 | |
1864 | ({3{(fcc_vld_fb[2] & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd5) | // FCMP(E) fcc2 | |
1865 | ({3{(fcc_vld_fb[3] & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd6) | // FCMP(E) fcc3 | |
1866 | ({3{(fsr_w1_qvld_fb & (fac_w1_tid_fb[2:0] == 3'd7))}} & 3'd7) | // other FPop w1 | |
1867 | ({3{(fsr_w2_qvld_fb & (fac_fpd_tid_fb[2:0] == 3'd7))}} & 3'd7) ; // other FPop FDIV/FSQRT | |
1868 | ||
1869 | assign q_r1_vld_e[0] = r1_vld_e & (~r1_32b_e | (r1_32b_e & r1_odd32b_e)); | |
1870 | assign q_r1_vld_e[1] = r1_vld_e & (~r1_32b_e | (r1_32b_e & ~r1_odd32b_e)); | |
1871 | assign q_r2_vld_e[0] = r2_vld_e & (~r2_32b_e | (r2_32b_e & r2_odd32b_e)); | |
1872 | assign q_r2_vld_e[1] = r2_vld_e & (~r2_32b_e | (r2_32b_e & ~r2_odd32b_e)); | |
1873 | ||
1874 | assign fac_rs2_rotate_sel_e[0] = // odd FiTO(s,d) | |
1875 | (fpx_itype_e[2:0] == 3'b011) & (fpx_stype_e[1:0] == 2'b10) & r2_odd32b_e; | |
1876 | ||
1877 | assign fac_rs2_rotate_sel_e[1] = // even FiTO(s,d) | |
1878 | (fpx_itype_e[2:0] == 3'b011) & (fpx_stype_e[1:0] == 2'b10) & ~r2_odd32b_e; | |
1879 | ||
1880 | assign fac_rs2_rotate_sel_e[2] = // FiTO(s,d) | |
1881 | (fpx_itype_e[2:0] == 3'b011) & (fpx_stype_e[1:0] == 2'b10); | |
1882 | ||
1883 | assign fac_rs2_rotate_sel_e[3] = // odd | |
1884 | ~fac_rs2_rotate_sel_e[2] & r2_odd32b_e; | |
1885 | ||
1886 | assign fac_rs2_rotate_sel_e[4] = // even | |
1887 | ~fac_rs2_rotate_sel_e[2] & ~r2_odd32b_e; | |
1888 | ||
1889 | assign fac_i2f_sel_e[0] = // F(i,x)TO(s,d) | |
1890 | (fpx_itype_e[2:0] == 3'b011); | |
1891 | ||
1892 | assign fac_i2f_sel_e[1] = // ~F(i,x)TO(s,d) | |
1893 | ~(fpx_itype_e[2:0] == 3'b011); | |
1894 | ||
1895 | // ------------------------------------ | |
1896 | // Instructions which depend on appropriate steering | |
1897 | // of rs1/rs2 thru Mse/Mle: | |
1898 | // | |
1899 | // instr desired behavior default behavior | |
1900 | // --------------------------------------------------- | |
1901 | // F(i,x)TO(s,d) rs2=Mse (B<A) ~(B<A) ??? <= rs1 is unknown | |
1902 | // F(s,d)TO(i,x) rs2=Mse (B<A) ~(B<A) ??? <= rs1 is unknown | |
1903 | // MULScc rs2=Mse (B<A) ~(B<A) | |
1904 | // SAVE rs2=Mse (B<A) ~(B<A) | |
1905 | // RESTORE rs2=Mse (B<A) ~(B<A) | |
1906 | // FPSUB{16,32}{s} rs2=Mse (B<A) ~(B<A) | |
1907 | // F(s,d)TO(d,s) rs2=Mle ~(B<A) ~(B<A) ??? <= rs1 is unknown | |
1908 | // FADD(s,d) src dependent <= no action required | |
1909 | // FSUB(s,d) src dependent <= no action required | |
1910 | // | |
1911 | // These required for NaN steering only: | |
1912 | // FsMULd src dependent <= no action required | |
1913 | // FMUL(s,d) src dependent <= no action required | |
1914 | // FDIV(s,d) src dependent <= no action required | |
1915 | // FSQRT(s,d) rs2=Mle ~(B<A) ~(B<A) ??? <= rs1 is unknown | |
1916 | // | |
1917 | // ------------------------------------ | |
1918 | ||
1919 | assign force_swap_blta_e = | |
1920 | (fpx_itype_e[2:0] == 3'b010) | // F(s,d)TO(i,x) | |
1921 | (fpx_itype_e[2:0] == 3'b011) | // F(i,x)TO(s,d) | |
1922 | (fpx_mulscc_e ) | // MULScc | |
1923 | (fpx_saverestore_e ) | // SAVE or RESTORE | |
1924 | ((fpx_dtype_e[2:1] == 2'b01) & fpx_sign_instr_e); // FPSUB{16,32}{s} | |
1925 | ||
1926 | assign force_noswap_blta_e = | |
1927 | (fpx_itype_e[2:0] == 3'b001) | // F(s,d)TO(d,s) | |
1928 | (fpx_itype_e[2:0] == 3'b111) ; // FSQRT(s,d) | |
1929 | ||
1930 | // ------------------------------------ | |
1931 | // FPY control | |
1932 | // ------------------------------------ | |
1933 | ||
1934 | // spu_fgu_fpy_ctl_d[6:0]: | |
1935 | // | |
1936 | // [0] [1] [2] [3] [4] [5] [6] | |
1937 | // --- ------------ -------------- ----------- ----- ----------------------- -------------------- | |
1938 | // if == 1 XOR Add Accum Write Accum 2*(rs1*rs2) >> 64 write MA result flop bypass result to rs1 | |
1939 | // if == 0 Int No Add Accum No Write Accum (rs1*rs2) >> 0 no write MA result flop no bypass result | |
1940 | ||
1941 | assign xr_mode_e = spu_grant_e & spu_fpy_ctl_e[0]; | |
1942 | ||
1943 | assign rs1_sel_e[0] = ~spu_grant_e & (fpx_fmul8sux16_e | fpx_fmuld8sux16_e); | |
1944 | assign rs1_sel_e[1] = ~spu_grant_e & (fpx_fmul8x16_e | fpx_fmul8x16au_e | fpx_fmul8x16al_e); | |
1945 | assign rs1_sel_e[2] = ~spu_grant_e & (fpx_fmul8ulx16_e | fpx_fmuld8ulx16_e); | |
1946 | assign rs1_sel_e[3] = spu_grant_e & spu_fpy_ctl_e[6]; | |
1947 | assign rs1_sel_e[4] = spu_grant_e; | |
1948 | ||
1949 | assign rs2_sel_e[0] = ~spu_grant_e & fpx_fmul8x16au_e; | |
1950 | assign rs2_sel_e[1] = ~spu_grant_e & fpx_fmul8x16al_e; | |
1951 | ||
1952 | assign rs2_sel_e[2] = // all 8x16 | |
1953 | ~spu_grant_e & | |
1954 | (fpx_fmul8x16_e | fpx_fmul8x16au_e | fpx_fmul8x16al_e | | |
1955 | fpx_fmul8sux16_e | fpx_fmul8ulx16_e | fpx_fmuld8sux16_e | fpx_fmuld8ulx16_e); | |
1956 | ||
1957 | assign rs2_sel_e[3] = spu_grant_e; | |
1958 | ||
1959 | assign rnd_8x16_e[0] = | |
1960 | ~spu_grant_e & | |
1961 | (fpx_fmul8x16_e | fpx_fmul8x16au_e | fpx_fmul8x16al_e | fpx_fmul8sux16_e); | |
1962 | ||
1963 | assign rnd_8x16_e[1] = ~spu_grant_e & fpx_fmul8ulx16_e; | |
1964 | ||
1965 | assign result_sel_e[0] = | |
1966 | ~spu_grant_e & | |
1967 | (fpx_fmul8x16_e | fpx_fmul8x16au_e | fpx_fmul8x16al_e | | |
1968 | fpx_fmul8sux16_e); | |
1969 | ||
1970 | assign result_sel_e[1] = ~spu_grant_e & fpx_fmul8ulx16_e; | |
1971 | assign result_sel_e[2] = ~spu_grant_e & fpx_fmuld8sux16_e; | |
1972 | assign result_sel_e[3] = ~spu_grant_e & fpx_fmuld8ulx16_e; | |
1973 | assign result_sel_e[4] = spu_grant_e & spu_fpy_ctl_e[0] & spu_fpy_ctl_e[1]; // XOR mult w/ ACCUM | |
1974 | assign result_sel_e[5] = ~spu_grant_e & (fpx_dtype_e[2:1] == 2'b00); // dp or sp float | |
1975 | ||
1976 | // ------------------------------------ | |
1977 | // FPD control | |
1978 | // ------------------------------------ | |
1979 | ||
1980 | assign div_valid_e = // start div engine | |
1981 | (~div_engine_busy_fx1 & | |
1982 | (fpx_itype_e[2:1] == 2'b11) & dec_fgu_valid_e) | // DEC issued div/sqrt | |
1983 | (~div_engine_busy_fx1 & divq_occupied_fx1 & // divq issued div/sqrt | |
1984 | ~(pre_div_flush_fx3 & ~div_dec_issue_fx3) ) ; // and divq not flushed | |
1985 | ||
1986 | assign divq_valid_e = // load divq or start div engine from divq | |
1987 | ( div_engine_busy_fx1 & | |
1988 | (fpx_itype_e[2:1] == 2'b11) & dec_fgu_valid_e) | // divq load | |
1989 | (~div_engine_busy_fx1 & divq_occupied_fx1 & // divq issued div/sqrt | |
1990 | ~(pre_div_flush_fx3 & ~div_dec_issue_fx3) ) ; // and divq not flushed | |
1991 | ||
1992 | assign div_engine_busy_e = | |
1993 | ( div_valid_e ) | // set (DEC/divq issued div/sqrt) | |
1994 | ((~div_finish_early & // clear (if finish) | |
1995 | // clear (if flush) | |
1996 | ~fac_div_flush_fx3 ) & div_engine_busy_fx1 ) ; | |
1997 | ||
1998 | // 0in assert_timer -var div_engine_busy_e -max 50 -message "Divide engine busy > 50 cycles"; custom -fire ((dec_fgu_decode_d & div_engine_busy_e & (dec_fgu_tid_d[2:0]==div_tid_in_e[2:0])) | (dec_fgu_decode_d & (div_finish_fltd_fb | div_finish_flts_fb) & (dec_fgu_tid_d[2:0]==fac_fpd_tid_fb[2:0]))) -message "Divide engine collision with other FPop" | |
1999 | ||
2000 | assign div_dec_issue_e = div_valid_e & ~divq_valid_e; | |
2001 | assign div_divq_issue_e = div_valid_e & divq_valid_e; | |
2002 | assign div_divq_load_e = ~div_valid_e & divq_valid_e; | |
2003 | assign div_hold_e = ~div_dec_issue_e & ~div_divq_issue_e; | |
2004 | ||
2005 | assign divq_occupied_e = | |
2006 | ( div_engine_busy_fx1 & | |
2007 | (fpx_itype_e[2:1] == 2'b11) & dec_fgu_valid_e) | // set (divq load) | |
2008 | ((~div_divq_issue_e & // clear (if divq issued div/sqrt) | |
2009 | // clear (if flush divq) | |
2010 | ~(pre_div_flush_fx3 & ~div_dec_issue_fx3)) & divq_occupied_fx1); | |
2011 | ||
2012 | // 0in custom -fire ((dec_fgu_decode_d & divq_occupied_e & (dec_fgu_tid_d[2:0]==divq_tid_in_e[2:0]))) -message "Divide queue collision with other FPop" | |
2013 | ||
2014 | // ------------ | |
2015 | // capture data for instr that is entering the div engine | |
2016 | // ------------ | |
2017 | ||
2018 | assign div_tid_in_e[2:0] = | |
2019 | ( {3{div_dec_issue_e }} & fac_tid_e[2:0] ) | // load from DEC issue | |
2020 | ( {3{div_divq_issue_e}} & divq_tid_fx1[2:0] ) | // load from divq issue | |
2021 | ( {3{div_hold_e }} & div_tid_fx1[2:0] ) ; // hold | |
2022 | ||
2023 | assign div_irf_addr_in_e[4:0] = | |
2024 | ( {5{div_dec_issue_e }} & irf_w_addr_e[4:0] ) | // load from DEC issue | |
2025 | ( {5{div_divq_issue_e}} & divq_irf_addr_fx1[4:0]) | // load from divq issue | |
2026 | ( {5{div_hold_e }} & div_irf_addr_fx1[4:0] ) ; // hold | |
2027 | ||
2028 | assign div_cc_vld_in_e = | |
2029 | ( div_dec_issue_e & fpx_int_cc_vld_e ) | // load from DEC issue | |
2030 | ( div_divq_issue_e & divq_cc_vld_fx1 ) | // load from divq issue | |
2031 | ( div_hold_e & div_cc_vld_fx1 ) ; // hold | |
2032 | ||
2033 | assign div_odd32b_in_e = | |
2034 | ( div_dec_issue_e & w1_odd32b_e ) | // load from DEC issue | |
2035 | ( div_divq_issue_e & divq_odd32b_fx1 ) | // load from divq issue | |
2036 | ( div_hold_e & div_odd32b_fx1 ) ; // hold | |
2037 | ||
2038 | assign div_32b_in_e = | |
2039 | ( div_dec_issue_e & w1_32b_e ) | // load from DEC issue | |
2040 | ( div_divq_issue_e & divq_32b_fx1 ) | // load from divq issue | |
2041 | ( div_hold_e & div_32b_fx1 ) ; // hold | |
2042 | ||
2043 | assign div_frf_addr_in_e[4:0] = | |
2044 | ( {5{div_dec_issue_e }} & w1_addr_e[4:0] ) | // load from DEC issue | |
2045 | ( {5{div_divq_issue_e}} & divq_frf_addr_fx1[4:0]) | // load from divq issue | |
2046 | ( {5{div_hold_e }} & div_frf_addr_fx1[4:0] ) ; // hold | |
2047 | ||
2048 | // ------------ | |
2049 | // capture data for instr that is entering the div queue | |
2050 | // ------------ | |
2051 | ||
2052 | assign divq_tid_in_e[2:0] = | |
2053 | ( {3{ div_divq_load_e}} & fac_tid_e[2:0] ) | // load from DEC issue | |
2054 | ( {3{~div_divq_load_e}} & divq_tid_fx1[2:0] ) ; // hold | |
2055 | ||
2056 | assign divq_irf_addr_in_e[4:0] = | |
2057 | ( {5{ div_divq_load_e}} & irf_w_addr_e[4:0] ) | // load from DEC issue | |
2058 | ( {5{~div_divq_load_e}} & divq_irf_addr_fx1[4:0]) ; // hold | |
2059 | ||
2060 | assign divq_cc_vld_in_e = | |
2061 | ( div_divq_load_e & fpx_int_cc_vld_e ) | // load from DEC issue | |
2062 | ( ~div_divq_load_e & divq_cc_vld_fx1 ) ; // hold | |
2063 | ||
2064 | assign divq_odd32b_in_e = | |
2065 | ( div_divq_load_e & w1_odd32b_e ) | // load from DEC issue | |
2066 | ( ~div_divq_load_e & divq_odd32b_fx1 ) ; // hold | |
2067 | ||
2068 | assign divq_32b_in_e = | |
2069 | ( div_divq_load_e & w1_32b_e ) | // load from DEC issue | |
2070 | ( ~div_divq_load_e & divq_32b_fx1 ) ; // hold | |
2071 | ||
2072 | assign divq_frf_addr_in_e[4:0] = | |
2073 | ( {5{ div_divq_load_e}} & w1_addr_e[4:0] ) | // load from DEC issue | |
2074 | ( {5{~div_divq_load_e}} & divq_frf_addr_fx1[4:0]) ; // hold | |
2075 | ||
2076 | // ------------ | |
2077 | // FDC captures and holds these controls in the div queue as needed | |
2078 | // ------------ | |
2079 | ||
2080 | assign div_control_e[4] = fac_tid_e[2]; | |
2081 | ||
2082 | assign div_control_e[3] = (fpx_itype_e[2:0] == 3'b111); // sqrt | |
2083 | ||
2084 | assign div_control_e[2] = | |
2085 | (fpx_dtype_e[2:0] == 3'b100) | | |
2086 | (fpx_dtype_e[2:0] == 3'b011) ; // idiv (32/64b dest) | |
2087 | ||
2088 | assign div_control_e[1] = | |
2089 | (fpx_dtype_e[2:0] == 3'b001) | | |
2090 | (fpx_dtype_e[2:0] == 3'b100) ; // DP/64b dest | |
2091 | ||
2092 | assign div_control_e[0] = | |
2093 | ((fpx_dtype_e[2:0] == 3'b011) & op3_e[0]) | // sdiv (32b dest) | |
2094 | ((fpx_dtype_e[2:0] == 3'b100) & op3_e[5]) ; // sdivx (64b dest) | |
2095 | ||
2096 | ||
2097 | // ---------------------------------------------------------------------------- | |
2098 | // FX1 stage | |
2099 | // ---------------------------------------------------------------------------- | |
2100 | ||
2101 | fgu_fac_ctl_msff_ctl_macro__width_128 fx1_00 ( | |
2102 | .scan_in(fx1_00_scanin), | |
2103 | .scan_out(fx1_00_scanout), | |
2104 | .l1clk(l1clk_pm1), | |
2105 | .din ({opf_e[4:1], | |
2106 | dec_fgu_valid_e, | |
2107 | fpx_itype_e[2:0], | |
2108 | fpx_dtype_e[2:0], | |
2109 | fpx_stype_e[1:0], | |
2110 | fpx_itype_mul_e, | |
2111 | fpx_sign_instr_e, | |
2112 | fpx_rnd_trunc_e, | |
2113 | fpx_mulscc_e, | |
2114 | fpx_saverestore_e, | |
2115 | fpx_int_cc_vld_e, | |
2116 | fpx_nv_vld_e, | |
2117 | fpx_of_vld_e, | |
2118 | fpx_uf_vld_e, | |
2119 | fpx_dz_vld_e, | |
2120 | fpx_nx_vld_e, | |
2121 | fpx_unfin_vld_e, | |
2122 | fgx_mvcond_e, | |
2123 | fgx_mvucond_e, | |
2124 | fgx_abs_e, | |
2125 | fgx_neg_e, | |
2126 | fgx_logical_e, | |
2127 | fgx_expand_e, | |
2128 | fgx_merge_e, | |
2129 | fgx_align_e, | |
2130 | fgx_shuffle_e, | |
2131 | fgx_pack16_e, | |
2132 | fgx_pack32_e, | |
2133 | fgx_packfix_e, | |
2134 | q_fgx_pdist_e, | |
2135 | fgx_popc_e, | |
2136 | fgx_siam_e, | |
2137 | fpx_sp_dest_e, | |
2138 | rs1_sel_e[4:0], | |
2139 | rs2_sel_e[3:0], | |
2140 | rnd_8x16_e[1:0], | |
2141 | result_sel_e[5:0], | |
2142 | exu_w_vld_e, | |
2143 | irf_w_addr_e[4:0], | |
2144 | q_r1_vld_e[1:0], | |
2145 | q_r2_vld_e[1:0], | |
2146 | spu_grant_e, | |
2147 | div_valid_e, | |
2148 | divq_valid_e, | |
2149 | divq_occupied_e, | |
2150 | div_control_e[4:0], | |
2151 | div_tid_in_e[2:0], | |
2152 | div_irf_addr_in_e[4:0], | |
2153 | div_frf_addr_in_e[4:0], | |
2154 | div_cc_vld_in_e, | |
2155 | div_odd32b_in_e, | |
2156 | div_32b_in_e, | |
2157 | divq_tid_in_e[2:0], | |
2158 | divq_irf_addr_in_e[4:0], | |
2159 | divq_frf_addr_in_e[4:0], | |
2160 | divq_cc_vld_in_e, | |
2161 | divq_odd32b_in_e, | |
2162 | divq_32b_in_e, | |
2163 | div_engine_busy_e, | |
2164 | div_dec_issue_e, | |
2165 | div_divq_issue_e, | |
2166 | force_swap_blta_e, | |
2167 | force_noswap_blta_e, | |
2168 | fsr_store_e, | |
2169 | xr_mode_e, | |
2170 | spu_fpy_ctl_e[5:0], | |
2171 | frf_store_e, | |
2172 | fst_fmt_sel_e[3:0], | |
2173 | fgu_decode_e}), | |
2174 | .dout({opf_fx1[4:1], | |
2175 | fac_dec_valid_fx1, | |
2176 | fac_fpx_itype_fx1[2:0], | |
2177 | fac_fpx_dtype_fx1[2:0], | |
2178 | fac_fpx_stype_fx1[1:0], | |
2179 | itype_mul_fx1, | |
2180 | fac_fpx_sign_instr_fx1, | |
2181 | fac_fpx_rnd_trunc_fx1, | |
2182 | fac_fpx_mulscc_fx1, | |
2183 | fac_fpx_saverestore_fx1, | |
2184 | fpx_int_cc_vld_fx1, | |
2185 | fac_fpx_nv_vld_fx1, | |
2186 | fac_fpx_of_vld_fx1, | |
2187 | fac_fpx_uf_vld_fx1, | |
2188 | fac_fpx_dz_vld_fx1, | |
2189 | fac_fpx_nx_vld_fx1, | |
2190 | fac_fpx_unfin_vld_fx1, | |
2191 | fgx_mvcond_fx1, | |
2192 | fgx_mvucond_fx1, | |
2193 | fgx_abs_fx1, | |
2194 | fgx_neg_fx1, | |
2195 | fgx_logical_fx1, | |
2196 | fgx_expand_fx1, | |
2197 | fgx_merge_fx1, | |
2198 | fgx_align_fx1, | |
2199 | fgx_shuffle_fx1, | |
2200 | fgx_pack16_fx1, | |
2201 | fgx_pack32_fx1, | |
2202 | fgx_packfix_fx1, | |
2203 | fac_fgx_pdist_fx1, | |
2204 | fgx_popc_fx1, | |
2205 | i_fgx_siam_fx1, | |
2206 | fac_fpx_sp_dest_fx1, | |
2207 | fac_rs1_sel_fx1[4:0], | |
2208 | fac_rs2_sel_fx1[3:0], | |
2209 | rnd_8x16_fx1[1:0], | |
2210 | result_sel_fx1[5:0], | |
2211 | i_exu_w_vld_fx1, | |
2212 | irf_w_addr_fx1[4:0], | |
2213 | fac_r1_vld_fx1[1:0], | |
2214 | fac_r2_vld_fx1[1:0], | |
2215 | spu_grant_fx1, | |
2216 | fac_div_valid_fx1, | |
2217 | fac_divq_valid_fx1, | |
2218 | divq_occupied_fx1, | |
2219 | fac_div_control_fx1[4:0], | |
2220 | div_tid_fx1[2:0], | |
2221 | div_irf_addr_fx1[4:0], | |
2222 | div_frf_addr_fx1[4:0], | |
2223 | div_cc_vld_fx1, | |
2224 | div_odd32b_fx1, | |
2225 | div_32b_fx1, | |
2226 | divq_tid_fx1[2:0], | |
2227 | divq_irf_addr_fx1[4:0], | |
2228 | divq_frf_addr_fx1[4:0], | |
2229 | divq_cc_vld_fx1, | |
2230 | divq_odd32b_fx1, | |
2231 | divq_32b_fx1, | |
2232 | div_engine_busy_fx1, | |
2233 | div_dec_issue_fx1, | |
2234 | div_divq_issue_fx1, | |
2235 | fac_force_swap_blta_fx1, | |
2236 | fac_force_noswap_blta_fx1, | |
2237 | fsr_store_fx1, | |
2238 | fac_xr_mode_fx1, | |
2239 | spu_fpy_ctl_fx1[5:0], | |
2240 | frf_store_fx1, | |
2241 | fac_fst_fmt_sel_fx1[3:0], | |
2242 | fgu_decode_fx1}), | |
2243 | .siclk(siclk), | |
2244 | .soclk(soclk) | |
2245 | ); | |
2246 | ||
2247 | fgu_fac_ctl_msff_ctl_macro__width_21 fx1_01 ( | |
2248 | .scan_in(fx1_01_scanin), | |
2249 | .scan_out(fx1_01_scanout), | |
2250 | .l1clk(l1clk_pm1), | |
2251 | .din ({w1_addr_e[4:0], | |
2252 | w1_32b_e, | |
2253 | w1_odd32b_e, | |
2254 | fac_tid_e[2:0], | |
2255 | q_w1_vld_e[1:0], | |
2256 | tlu_cerer_frf, | |
2257 | tlu_ceter_pscce[7:0]}), | |
2258 | .dout({w1_addr_fx1[4:0], | |
2259 | w1_32b_fx1, | |
2260 | fac_w1_odd32b_fx1, | |
2261 | tid_fx1[2:0], | |
2262 | q_w1_vld_fx1[1:0], | |
2263 | cerer_frf_fx1, | |
2264 | ceter_pscce_fx1[7:0]}), | |
2265 | .siclk(siclk), | |
2266 | .soclk(soclk) | |
2267 | ); | |
2268 | ||
2269 | fgu_fac_ctl_msff_ctl_macro__width_4 fx1_02 ( | |
2270 | .scan_in(fx1_02_scanin), | |
2271 | .scan_out(fx1_02_scanout), | |
2272 | .l1clk(l1clk_pm1), | |
2273 | .din (pre_fcc_vld_e[3:0] ), | |
2274 | .dout(pre_fcc_vld_fx1[3:0]), | |
2275 | .siclk(siclk), | |
2276 | .soclk(soclk) | |
2277 | ); | |
2278 | ||
2279 | assign fgx_instr_fx1 = // note: this eq. doesn't include siam | |
2280 | fgx_logical_fx1 | | |
2281 | fgx_expand_fx1 | | |
2282 | fgx_merge_fx1 | | |
2283 | fgx_align_fx1 | | |
2284 | fgx_shuffle_fx1 | | |
2285 | fac_fgx_pdist_fx1 | | |
2286 | fgx_pack_sel_fx1 | | |
2287 | fgx_moves_fx1 | | |
2288 | fgx_popc_fx1 ; | |
2289 | ||
2290 | assign fac_ecc_trap_en_fx1 = | |
2291 | cerer_frf_fx1 & | |
2292 | (((tid_fx1[2:0] == 3'd0) & ceter_pscce_fx1[0]) | | |
2293 | ((tid_fx1[2:0] == 3'd1) & ceter_pscce_fx1[1]) | | |
2294 | ((tid_fx1[2:0] == 3'd2) & ceter_pscce_fx1[2]) | | |
2295 | ((tid_fx1[2:0] == 3'd3) & ceter_pscce_fx1[3]) | | |
2296 | ((tid_fx1[2:0] == 3'd4) & ceter_pscce_fx1[4]) | | |
2297 | ((tid_fx1[2:0] == 3'd5) & ceter_pscce_fx1[5]) | | |
2298 | ((tid_fx1[2:0] == 3'd6) & ceter_pscce_fx1[6]) | | |
2299 | ((tid_fx1[2:0] == 3'd7) & ceter_pscce_fx1[7]) ); | |
2300 | ||
2301 | assign fgx_siam_fx1 = i_fgx_siam_fx1 & fac_dec_valid_fx1; | |
2302 | ||
2303 | assign fac_w1_vld_fx1[1:0] = q_w1_vld_fx1[1:0] & {2{fac_dec_valid_fx1}}; | |
2304 | ||
2305 | assign exu_w_vld_fx1 = | |
2306 | fac_dec_valid_fx1 & | |
2307 | (fgx_popc_fx1 | // popc | |
2308 | fac_fpx_mulscc_fx1 | // mulscc | |
2309 | fac_fpx_saverestore_fx1 | // save or restore | |
2310 | ((fac_fpx_itype_fx1[2:0] == 3'b101) & i_exu_w_vld_fx1) | // imul | |
2311 | ((fac_fpx_itype_fx1[2:0] == 3'b100) & | |
2312 | (fac_fpx_dtype_fx1[2:1] == 2'b01 ) ) ); // vis fcmp | |
2313 | ||
2314 | assign fac_fcmpe_fx1 = opf_fx1[2]; // FCMPE, not FCMP | |
2315 | ||
2316 | assign fac_fpx_sp_src_fx1 = | |
2317 | ((fac_fpx_dtype_fx1[2:0] == 3'b000) & | |
2318 | ~((fac_fpx_itype_fx1[2:0] == 3'b001) & // ~FdTOs | |
2319 | (fac_fpx_stype_fx1[1:0] == 2'b01 )) ) | | |
2320 | ((fac_fpx_itype_fx1[2:0] == 3'b001) & | |
2321 | (fac_fpx_dtype_fx1[2:0] == 3'b001) ) | // FsTOd | |
2322 | ((fac_fpx_itype_fx1[2:0] == 3'b101) & | |
2323 | (fac_fpx_stype_fx1[1:0] == 2'b00 ) & | |
2324 | (fac_fpx_dtype_fx1[2:0] == 3'b001) ) | // FsMULd | |
2325 | ((fac_fpx_itype_fx1[2:0] == 3'b010) & | |
2326 | (fac_fpx_stype_fx1[1:0] == 2'b00 ) ) ; // FsTO(i,x) | |
2327 | ||
2328 | assign fgx_moves_fx1 = fgx_mvcond_fx1 | fgx_mvucond_fx1 | fgx_abs_fx1 | fgx_neg_fx1; | |
2329 | assign fgx_pack_sel_fx1 = fgx_pack16_fx1 | fgx_pack32_fx1 | fgx_packfix_fx1; | |
2330 | ||
2331 | ||
2332 | // ------------------------------------ | |
2333 | // FPD control | |
2334 | // ------------------------------------ | |
2335 | ||
2336 | assign fac_aux_cin_fx1 = ~(fac_fpx_itype_fx1[2:0] == 3'b110); // ~div | |
2337 | ||
2338 | assign q_div_default_res_fx3 = | |
2339 | div_default_res_fx3 & | |
2340 | ~dec_flush_fx3 & | |
2341 | ~fac_tlu_flush_fx3 ; | |
2342 | ||
2343 | assign div_finish_early = | |
2344 | fdc_finish_flts_early | fdc_finish_fltd_early | fdc_finish_int_early; | |
2345 | ||
2346 | assign divide_completion_fx1[0] = | |
2347 | ((div_tid_fx1[2:0] == 3'b000) & div_finish_early ) | | |
2348 | (( tid_fx3[2:0] == 3'b000) & q_div_default_res_fx3) ; | |
2349 | ||
2350 | assign divide_completion_fx1[1] = | |
2351 | ((div_tid_fx1[2:0] == 3'b001) & div_finish_early ) | | |
2352 | (( tid_fx3[2:0] == 3'b001) & q_div_default_res_fx3) ; | |
2353 | ||
2354 | assign divide_completion_fx1[2] = | |
2355 | ((div_tid_fx1[2:0] == 3'b010) & div_finish_early ) | | |
2356 | (( tid_fx3[2:0] == 3'b010) & q_div_default_res_fx3) ; | |
2357 | ||
2358 | assign divide_completion_fx1[3] = | |
2359 | ((div_tid_fx1[2:0] == 3'b011) & div_finish_early ) | | |
2360 | (( tid_fx3[2:0] == 3'b011) & q_div_default_res_fx3) ; | |
2361 | ||
2362 | assign divide_completion_fx1[4] = | |
2363 | ((div_tid_fx1[2:0] == 3'b100) & div_finish_early ) | | |
2364 | (( tid_fx3[2:0] == 3'b100) & q_div_default_res_fx3) ; | |
2365 | ||
2366 | assign divide_completion_fx1[5] = | |
2367 | ((div_tid_fx1[2:0] == 3'b101) & div_finish_early ) | | |
2368 | (( tid_fx3[2:0] == 3'b101) & q_div_default_res_fx3) ; | |
2369 | ||
2370 | assign divide_completion_fx1[6] = | |
2371 | ((div_tid_fx1[2:0] == 3'b110) & div_finish_early ) | | |
2372 | (( tid_fx3[2:0] == 3'b110) & q_div_default_res_fx3) ; | |
2373 | ||
2374 | assign divide_completion_fx1[7] = | |
2375 | ((div_tid_fx1[2:0] == 3'b111) & div_finish_early ) | | |
2376 | (( tid_fx3[2:0] == 3'b111) & q_div_default_res_fx3) ; | |
2377 | ||
2378 | ||
2379 | // ---------------------------------------------------------------------------- | |
2380 | // FX2 stage | |
2381 | // ---------------------------------------------------------------------------- | |
2382 | ||
2383 | fgu_fac_ctl_msff_ctl_macro__width_16 fx2_00 ( | |
2384 | .scan_in(fx2_00_scanin), | |
2385 | .scan_out(fx2_00_scanout), | |
2386 | .l1clk(l1clk_pm1), | |
2387 | .din ({w1_addr_fx1[4:0], | |
2388 | w1_32b_fx1, | |
2389 | fac_w1_odd32b_fx1, | |
2390 | tid_fx1[2:0], | |
2391 | exu_w_vld_fx1, | |
2392 | irf_w_addr_fx1[4:0]}), | |
2393 | .dout({w1_addr_fx2[4:0], | |
2394 | w1_32b_fx2, | |
2395 | w1_odd32b_fx2, | |
2396 | tid_fx2[2:0], | |
2397 | i_exu_w_vld_fx2, | |
2398 | irf_w_addr_fx2[4:0]}), | |
2399 | .siclk(siclk), | |
2400 | .soclk(soclk) | |
2401 | ); | |
2402 | ||
2403 | fgu_fac_ctl_msff_ctl_macro__width_60 fx2_01 ( | |
2404 | .scan_in(fx2_01_scanin), | |
2405 | .scan_out(fx2_01_scanout), | |
2406 | .l1clk(l1clk_pm1), | |
2407 | .din ({opf_fx1[4:1], | |
2408 | fgx_mvcond_fx1, | |
2409 | fgx_mvucond_fx1, | |
2410 | fgx_abs_fx1, | |
2411 | fgx_neg_fx1, | |
2412 | fgx_logical_fx1, | |
2413 | fgx_expand_fx1, | |
2414 | fgx_merge_fx1, | |
2415 | fgx_align_fx1, | |
2416 | fgx_shuffle_fx1, | |
2417 | fgx_pack16_fx1, | |
2418 | fgx_pack32_fx1, | |
2419 | fgx_packfix_fx1, | |
2420 | fgx_popc_fx1, | |
2421 | fgx_siam_fx1, | |
2422 | fgx_pack_sel_fx1, | |
2423 | rnd_8x16_fx1[1:0], | |
2424 | result_sel_fx1[5:0], | |
2425 | divide_completion_fx1[7:0], | |
2426 | fpx_int_cc_vld_fx1, | |
2427 | dec_flush_f1, | |
2428 | pre_fcc_vld_fx1[3:0], | |
2429 | div_dec_issue_fx1, | |
2430 | div_divq_issue_fx1, | |
2431 | fac_dec_valid_fx1, | |
2432 | fac_fpx_itype_fx1[2:0], | |
2433 | itype_mul_fx1, | |
2434 | fsr_store_fx1, | |
2435 | spu_grant_fx1, | |
2436 | spu_fpy_ctl_fx1[5:0], | |
2437 | fac_rs2_sel_fx1[2], | |
2438 | fgx_instr_fx1, | |
2439 | div_engine_busy_fx1, | |
2440 | frf_store_fx1}), | |
2441 | .dout({fac_opf_fx2[4:1], | |
2442 | fac_fgx_mvcond_fx2, | |
2443 | fac_fgx_mvucond_fx2, | |
2444 | fac_fgx_abs_fx2, | |
2445 | fac_fgx_neg_fx2, | |
2446 | fac_fgx_logical_fx2, | |
2447 | fac_fgx_expand_fx2, | |
2448 | fac_fgx_merge_fx2, | |
2449 | fac_fgx_align_fx2, | |
2450 | fac_fgx_shuffle_fx2, | |
2451 | fac_fgx_pack16_fx2, | |
2452 | fac_fgx_pack32_fx2, | |
2453 | fac_fgx_packfix_fx2, | |
2454 | fac_fgx_popc_fx2, | |
2455 | fac_fgx_siam_fx2, | |
2456 | fac_fgx_pack_sel_fx2, | |
2457 | rnd_8x16_fx2[1:0], | |
2458 | result_sel_fx2[5:0], | |
2459 | fgu_divide_completion[7:0], | |
2460 | fpx_int_cc_vld_fx2, | |
2461 | dec_flush_fx2, | |
2462 | i_pre_fcc_vld_fx2[3:0], | |
2463 | div_dec_issue_fx2, | |
2464 | div_divq_issue_fx2, | |
2465 | dec_valid_fx2, | |
2466 | itype_fx2[2:0], | |
2467 | itype_mul_fx2, | |
2468 | fac_fsr_store_fx2, | |
2469 | spu_grant_fx2, | |
2470 | spu_fpy_ctl_fx2[5:0], | |
2471 | rs2_sel_fx2_b2, | |
2472 | fgx_instr_fx2, | |
2473 | div_engine_busy_fx2, | |
2474 | frf_store_fx2}), | |
2475 | .siclk(siclk), | |
2476 | .soclk(soclk) | |
2477 | ); | |
2478 | ||
2479 | fgu_fac_ctl_msff_ctl_macro__width_3 fx2_02 ( | |
2480 | .scan_in(fx2_02_scanin), | |
2481 | .scan_out(fx2_02_scanout), | |
2482 | .l1clk(l1clk_pm2), | |
2483 | .din ({exu_fgu_flush_m, // requires free running clk | |
2484 | exu_fgu_gsr_vld_m[1:0]}), // requires free running clk | |
2485 | .dout({exu_flush_fx2, | |
2486 | fac_gsr_w_vld_fx2[1:0]}), | |
2487 | .siclk(siclk), | |
2488 | .soclk(soclk) | |
2489 | ); | |
2490 | ||
2491 | assign fac_gsr_asr_tid_fx2[2:0] = rng_wr_tid_3f[2:0]; | |
2492 | assign fac_tid_fx2[2:0] = tid_fx2[2:0]; | |
2493 | assign gsr_w_vld_fx2 = |fac_gsr_w_vld_fx2[1:0]; | |
2494 | ||
2495 | assign dec_valid_noflush_fx2 = | |
2496 | dec_valid_fx2 & | |
2497 | ~dec_flush_fx2 ; | |
2498 | ||
2499 | // 0in custom -fire ($0in_delay(fac_fgx_pdist_fx1,1) & dec_valid_fx2 & fac_dec_valid_fx1) -message "PDIST 2nd beat collision with other FPop" | |
2500 | ||
2501 | assign exu_w_vld_fx2 = | |
2502 | i_exu_w_vld_fx2 & | |
2503 | ~dec_flush_fx2 & | |
2504 | ~exu_flush_fx2 & | |
2505 | ~(fec_uecc_fx2 | fec_cecc_fx2); | |
2506 | ||
2507 | assign fac_pre_fcc_vld_fx2[3] = | |
2508 | i_pre_fcc_vld_fx2[3] & | |
2509 | ~dec_flush_fx2 & | |
2510 | ~exu_flush_fx2 & | |
2511 | ~dec_flush_f2 & | |
2512 | //~tlu_flush_fgu_b & | |
2513 | ~(fec_uecc_fx2 | fec_cecc_fx2); | |
2514 | ||
2515 | assign fac_pre_fcc_vld_fx2[2] = | |
2516 | i_pre_fcc_vld_fx2[2] & | |
2517 | ~dec_flush_fx2 & | |
2518 | ~exu_flush_fx2 & | |
2519 | ~dec_flush_f2 & | |
2520 | //~tlu_flush_fgu_b & | |
2521 | ~(fec_uecc_fx2 | fec_cecc_fx2); | |
2522 | ||
2523 | assign fac_pre_fcc_vld_fx2[1] = | |
2524 | i_pre_fcc_vld_fx2[1] & | |
2525 | ~dec_flush_fx2 & | |
2526 | ~exu_flush_fx2 & | |
2527 | ~dec_flush_f2 & | |
2528 | //~tlu_flush_fgu_b & | |
2529 | ~(fec_uecc_fx2 | fec_cecc_fx2); | |
2530 | ||
2531 | assign fac_pre_fcc_vld_fx2[0] = | |
2532 | i_pre_fcc_vld_fx2[0] & | |
2533 | ~dec_flush_fx2 & | |
2534 | ~exu_flush_fx2 & | |
2535 | ~dec_flush_f2 & | |
2536 | //~tlu_flush_fgu_b & | |
2537 | ~(fec_uecc_fx2 | fec_cecc_fx2); | |
2538 | ||
2539 | assign pre_fcc_vld_fx2 = |fac_pre_fcc_vld_fx2[3:0]; | |
2540 | ||
2541 | assign i_fld_fcc_vld_fx2[1] = // load FSR 64b | |
2542 | lsu_fgu_fsr_load_b & | |
2543 | ~lsu_fgu_fld_32b_b ; | |
2544 | ||
2545 | assign i_fld_fcc_vld_fx2[0] = // load FSR 32/64b | |
2546 | lsu_fgu_fsr_load_b; | |
2547 | ||
2548 | // ------------------------------------ | |
2549 | // FPY control | |
2550 | // ------------------------------------ | |
2551 | ||
2552 | // spu_fgu_fpy_ctl_d[6:0]: | |
2553 | // | |
2554 | // [0] [1] [2] [3] [4] [5] [6] | |
2555 | // --- ------------ -------------- ----------- ----- ----------------------- -------------------- | |
2556 | // if == 1 XOR Add Accum Write Accum 2*(rs1*rs2) >> 64 write MA result flop bypass result to rs1 | |
2557 | // if == 0 Int No Add Accum No Write Accum (rs1*rs2) >> 0 no write MA result flop no bypass result | |
2558 | ||
2559 | assign scff_sel_fx2[0] = | |
2560 | (~spu_grant_fx2 & ~rs2_sel_fx2_b2) | // ~spu & ~8x16 | |
2561 | ( spu_grant_fx2 & ~spu_fpy_ctl_fx2[0] & ~spu_fpy_ctl_fx2[3]); // spu & MA Int * 1 | |
2562 | ||
2563 | assign scff_sel_fx2[1] = | |
2564 | (~spu_grant_fx2 & rs2_sel_fx2_b2); // all 8x16 | |
2565 | ||
2566 | assign scff_sel_fx2[2] = | |
2567 | ( spu_grant_fx2 & ~spu_fpy_ctl_fx2[0] & spu_fpy_ctl_fx2[3]); // spu & MA Int * 2 | |
2568 | ||
2569 | assign scff_sel_fx2[3] = | |
2570 | ( spu_grant_fx2 & spu_fpy_ctl_fx2[0] & ~spu_fpy_ctl_fx2[3]); // spu & XOR * 1 | |
2571 | ||
2572 | // fac_accum_sel_fx3[6:0]: | |
2573 | // | |
2574 | // [0] : Write ACCUM with result | |
2575 | // [1] : Add ACCUM to Mult product | |
2576 | // [2] : XOR Mult w/ ACCUM | |
2577 | // [3] : XOR Mult w/ ACCUM >> 64 | |
2578 | // [4] : XOR Mult w/o ACCUM | |
2579 | // [5] : XOR Mult w/o ACCUM >> 64 | |
2580 | // [6] : Int Mult w/ or w/o ACCUM | |
2581 | // Def : Int Mult w/ or w/o ACCUM >> 64 | |
2582 | ||
2583 | assign accum_sel_fx2[0] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[2]); | |
2584 | assign accum_sel_fx2[1] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[1]); | |
2585 | assign accum_sel_fx2[2] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[0] & spu_fpy_ctl_fx2[1] & ~spu_fpy_ctl_fx2[4]); | |
2586 | assign accum_sel_fx2[3] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[0] & spu_fpy_ctl_fx2[1] & spu_fpy_ctl_fx2[4]); | |
2587 | assign accum_sel_fx2[4] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[0] & ~spu_fpy_ctl_fx2[1] & ~spu_fpy_ctl_fx2[4]); | |
2588 | assign accum_sel_fx2[5] = ( spu_grant_fx2 & spu_fpy_ctl_fx2[0] & ~spu_fpy_ctl_fx2[1] & spu_fpy_ctl_fx2[4]); | |
2589 | assign accum_sel_fx2[6] = ( spu_grant_fx2 & ~spu_fpy_ctl_fx2[0] & ~spu_fpy_ctl_fx2[4]); | |
2590 | ||
2591 | ||
2592 | // ---------------------------------------------------------------------------- | |
2593 | // FX3 stage | |
2594 | // ---------------------------------------------------------------------------- | |
2595 | ||
2596 | fgu_fac_ctl_msff_ctl_macro__width_52 fx3_00 ( | |
2597 | .scan_in(fx3_00_scanin), | |
2598 | .scan_out(fx3_00_scanout), | |
2599 | .l1clk(l1clk_pm1), | |
2600 | .din ({w1_addr_fx2[4:0], | |
2601 | w1_32b_fx2, | |
2602 | w1_odd32b_fx2, | |
2603 | tid_fx2[2:0], | |
2604 | rnd_8x16_fx2[1:0], | |
2605 | scff_sel_fx2[3:0], | |
2606 | result_sel_fx2[5:0], | |
2607 | exu_w_vld_fx2, | |
2608 | irf_w_addr_fx2[4:0], | |
2609 | fpx_int_cc_vld_fx2, | |
2610 | dec_flush_f2, | |
2611 | tlu_flush_fgu_b, | |
2612 | div_dec_issue_fx2, | |
2613 | fpc_pre_div_flush_fx2, | |
2614 | fpc_div_default_res_fx2, | |
2615 | dec_valid_fx2, | |
2616 | itype_fx2[2:0], | |
2617 | itype_mul_fx2, | |
2618 | gsr_w_vld_fx2, | |
2619 | spu_grant_fx2, | |
2620 | accum_sel_fx2, | |
2621 | spu_fpy_ctl_fx2[5], | |
2622 | pre_fcc_vld_fx2, | |
2623 | fgx_instr_fx2, | |
2624 | dec_valid_noflush_fx2}), | |
2625 | .dout({w1_addr_fx3[4:0], | |
2626 | w1_32b_fx3, | |
2627 | w1_odd32b_fx3, | |
2628 | tid_fx3[2:0], | |
2629 | fac_8x16_rnd_fx3[1:0], | |
2630 | fac_scff_sel_fx3[3:0], | |
2631 | result_sel_fx3[5:0], | |
2632 | i_exu_w_vld_fx3, | |
2633 | irf_w_addr_fx3[4:0], | |
2634 | fpx_int_cc_vld_fx3, | |
2635 | dec_flush_fx3, | |
2636 | fac_tlu_flush_fx3, | |
2637 | div_dec_issue_fx3, | |
2638 | i_pre_div_flush_fx3, | |
2639 | div_default_res_fx3, | |
2640 | dec_valid_fx3, | |
2641 | itype_fx3[2:0], | |
2642 | itype_mul_fx3, | |
2643 | gsr_w_vld_fx3, | |
2644 | spu_grant_fx3, | |
2645 | fac_accum_sel_fx3, | |
2646 | spu_fpy_ctl_fx3[5], | |
2647 | i_pre_fcc_vld_fx3, | |
2648 | fgx_instr_fx3, | |
2649 | i_dec_valid_noflush_fx3}), | |
2650 | .siclk(siclk), | |
2651 | .soclk(soclk) | |
2652 | ); | |
2653 | ||
2654 | fgu_fac_ctl_msff_ctl_macro__width_3 fx3_01 ( | |
2655 | .scan_in(fx3_01_scanin), | |
2656 | .scan_out(fx3_01_scanout), | |
2657 | .l1clk(l1clk_pm2), | |
2658 | .din ({lsu_fgu_fld_b, // requires free running clk | |
2659 | i_fld_fcc_vld_fx2[1:0]}), // requires free running clk | |
2660 | .dout({ fgu_fld_fx3, | |
2661 | fgu_fld_fcc_vld_fx3[1:0]}), | |
2662 | .siclk(siclk), | |
2663 | .soclk(soclk) | |
2664 | ); | |
2665 | ||
2666 | assign pre_fcc_vld_fx3 = i_pre_fcc_vld_fx3 & ~fac_tlu_flush_fx3; | |
2667 | ||
2668 | assign dec_valid_noflush_fx3 = | |
2669 | i_dec_valid_noflush_fx3 & | |
2670 | ~dec_flush_fx3 & | |
2671 | ~fac_tlu_flush_fx3 ; | |
2672 | ||
2673 | assign dec_valid_imul_noflush_fx3 = dec_valid_noflush_fx3 & (itype_fx3[2:0] == 3'b101); // mul | |
2674 | ||
2675 | assign fgu_cmp_fcc_tid_fx2[2:0] = tid_fx2[2:0]; | |
2676 | ||
2677 | assign exu_w_vld_fx3 = | |
2678 | i_exu_w_vld_fx3 & | |
2679 | ~dec_flush_fx3 & | |
2680 | ~fac_tlu_flush_fx3; | |
2681 | ||
2682 | assign pre_div_flush_fx3 = | |
2683 | (itype_fx3[2:1] == 2'b11) & // div/sqrt | |
2684 | dec_valid_fx3 & | |
2685 | (i_pre_div_flush_fx3 | | |
2686 | div_default_res_fx3 | | |
2687 | dec_flush_fx3 | | |
2688 | fac_tlu_flush_fx3 ) ; | |
2689 | ||
2690 | assign fac_div_flush_fx3 = | |
2691 | pre_div_flush_fx3 & | |
2692 | (div_dec_issue_fx3 | // DEC issued div/sqrt | |
2693 | div_divq_issue_fx1 | // divq issued div/sqrt | |
2694 | div_divq_issue_fx2 ); // divq issued div/sqrt | |
2695 | ||
2696 | ||
2697 | // ---------------------------------------------------------------------------- | |
2698 | // FX4 stage | |
2699 | // ---------------------------------------------------------------------------- | |
2700 | ||
2701 | fgu_fac_ctl_msff_ctl_macro__width_31 fx4_00 ( | |
2702 | .scan_in(fx4_00_scanin), | |
2703 | .scan_out(fx4_00_scanout), | |
2704 | .l1clk(l1clk_pm1), | |
2705 | .din ({w1_addr_fx3[4:0], | |
2706 | w1_32b_fx3, | |
2707 | w1_odd32b_fx3, | |
2708 | tid_fx3[2:0], | |
2709 | result_sel_fx3[5:0], | |
2710 | exu_w_vld_fx3, | |
2711 | irf_w_addr_fx3[4:0], | |
2712 | fpx_int_cc_vld_fx3, | |
2713 | spu_grant_fx3, | |
2714 | spu_fpy_ctl_fx3[5], | |
2715 | pre_fcc_vld_fx3, | |
2716 | dec_valid_noflush_fx3, | |
2717 | fgu_fld_fx3, | |
2718 | gsr_w_vld_fx3, | |
2719 | dec_valid_imul_noflush_fx3, | |
2720 | fgx_instr_fx3}), | |
2721 | .dout({w1_addr_fx4[4:0], | |
2722 | w1_32b_fx4, | |
2723 | w1_odd32b_fx4, | |
2724 | tid_fx4[2:0], | |
2725 | fac_result_sel_fx4[5:0], | |
2726 | exu_w_vld_fx4, | |
2727 | i_irf_w_addr_fx4[4:0], | |
2728 | i_int_cc_vld_fx4, | |
2729 | spu_grant_fx4, | |
2730 | spu_fpy_ctl_fx4[5], | |
2731 | pre_fcc_vld_fx4, | |
2732 | dec_valid_noflush_fx4, | |
2733 | fgu_fld_fx4, | |
2734 | gsr_w_vld_fx4, | |
2735 | dec_valid_imul_noflush_fx4, | |
2736 | fac_fgx_instr_fx4}), | |
2737 | .siclk(siclk), | |
2738 | .soclk(soclk) | |
2739 | ); | |
2740 | ||
2741 | assign fac_ma_result_en_fx4 = spu_grant_fx4 & spu_fpy_ctl_fx4[5]; | |
2742 | ||
2743 | assign irf_result_tid_fx4[2:0] = | |
2744 | ({3{~exu_w_vld_fx4}} & div_tid_fx1[2:0] ) | | |
2745 | ({3{ exu_w_vld_fx4}} & tid_fx4[2:0] ) ; | |
2746 | ||
2747 | assign irf_w_addr_fx4[4:0] = | |
2748 | ({5{~exu_w_vld_fx4}} & div_irf_addr_fx1[4:0]) | | |
2749 | ({5{ exu_w_vld_fx4}} & i_irf_w_addr_fx4[4:0]) ; | |
2750 | ||
2751 | assign exu_cc_vld_fx4 = | |
2752 | ( ~exu_w_vld_fx4 & div_cc_vld_fx1 ) | | |
2753 | ( exu_w_vld_fx4 & i_int_cc_vld_fx4 ) ; | |
2754 | ||
2755 | ||
2756 | // ---------------------------------------------------------------------------- | |
2757 | // FX5 stage | |
2758 | // ---------------------------------------------------------------------------- | |
2759 | ||
2760 | fgu_fac_ctl_msff_ctl_macro__width_26 fx5_00 ( | |
2761 | .scan_in(fx5_00_scanin), | |
2762 | .scan_out(fx5_00_scanout), | |
2763 | .l1clk(l1clk_pm1), | |
2764 | .din ({w1_addr_fx4[4:0], | |
2765 | w1_32b_fx4, | |
2766 | w1_odd32b_fx4, | |
2767 | tid_fx4[2:0], | |
2768 | exu_w_vld_fx4, | |
2769 | irf_w_addr_fx4[4:0], | |
2770 | irf_result_tid_fx4[2:0], | |
2771 | exu_cc_vld_fx4, | |
2772 | pre_fcc_vld_fx4, | |
2773 | dec_valid_noflush_fx4, | |
2774 | spu_grant_fx4, | |
2775 | fgu_fld_fx4, | |
2776 | dec_valid_imul_noflush_fx4, | |
2777 | fac_fgx_instr_fx4}), | |
2778 | .dout({w1_addr_fx5[4:0], | |
2779 | w1_32b_fx5, | |
2780 | w1_odd32b_fx5, | |
2781 | tid_fx5[2:0], | |
2782 | i_exu_w_vld_fx5, | |
2783 | fgu_irf_w_addr_fx5[4:0], | |
2784 | irf_result_tid_fx5_b2, fgu_result_tid_fx5[1:0], | |
2785 | exu_cc_vld_fx5, | |
2786 | pre_fcc_vld_fx5, | |
2787 | fac_dec_valid_noflush_fx5, | |
2788 | spu_grant_fx5, | |
2789 | fgu_fld_fx5, | |
2790 | dec_valid_imul_noflush_fx5, | |
2791 | fgx_instr_fx5}), | |
2792 | .siclk(siclk), | |
2793 | .soclk(soclk) | |
2794 | ); | |
2795 | ||
2796 | ||
2797 | // Note: no need for idiv0 to clear exu_w_vld or exu_cc_vld | |
2798 | // since idiv0 clears fdc_finish_int_early | |
2799 | ||
2800 | assign fgu_exu_w_vld_fx5[0] = | |
2801 | (i_exu_w_vld_fx5 | div_finish_int_fb) & ~irf_result_tid_fx5_b2; // exu thread group 0 | |
2802 | ||
2803 | assign fgu_exu_w_vld_fx5[1] = | |
2804 | (i_exu_w_vld_fx5 | div_finish_int_fb) & irf_result_tid_fx5_b2; // exu thread group 1 | |
2805 | ||
2806 | assign fgu_exu_cc_vld_fx5 = exu_cc_vld_fx5 & (i_exu_w_vld_fx5 | div_finish_int_fb); | |
2807 | ||
2808 | ||
2809 | // ---------------------------------------------------------------------------- | |
2810 | // FB stage | |
2811 | // ---------------------------------------------------------------------------- | |
2812 | ||
2813 | fgu_fac_ctl_msff_ctl_macro__width_25 fb_00 ( | |
2814 | .scan_in(fb_00_scanin), | |
2815 | .scan_out(fb_00_scanout), | |
2816 | .l1clk(l1clk_pm1), | |
2817 | .din ({ w1_addr_fx5[4:0], | |
2818 | w1_32b_fx5, | |
2819 | w1_odd32b_fx5, | |
2820 | tid_fx5[2:0], | |
2821 | fpc_fsr_w1_vld_fx5[1:0], | |
2822 | pre_fcc_vld_fx5, | |
2823 | fpc_fcc_vld_fx5, | |
2824 | fdc_finish_int_early, | |
2825 | fdc_finish_flts_early, | |
2826 | fdc_finish_fltd_early, | |
2827 | fac_dec_valid_noflush_fx5, | |
2828 | fgu_fld_fx5, | |
2829 | dec_valid_imul_noflush_fx5, | |
2830 | fgx_instr_fx5, | |
2831 | fpc_stfsr_en_fx3to5}), | |
2832 | .dout({fac_w1_addr_fb[4:0], | |
2833 | fac_w1_32b_fb, | |
2834 | fac_w1_odd32b_fb, | |
2835 | fac_w1_tid_fb[2:0], | |
2836 | fsr_w1_vld_fb[1:0], | |
2837 | pre_fcc_vld_fb, | |
2838 | fcc_vld_fb, | |
2839 | div_finish_int_fb, | |
2840 | div_finish_flts_fb, | |
2841 | div_finish_fltd_fb, | |
2842 | dec_valid_noflush_fb, | |
2843 | fgu_fld_fb, | |
2844 | dec_valid_imul_noflush_fb, | |
2845 | fgx_instr_fb, | |
2846 | fpc_stfsr_en_fb}), | |
2847 | .siclk(siclk), | |
2848 | .soclk(soclk) | |
2849 | ); | |
2850 | ||
2851 | assign fac_fpd_addr_fb[4:0] = div_frf_addr_fx1[4:0]; | |
2852 | assign fac_fpd_32b_fb = div_32b_fx1; | |
2853 | assign fac_fpd_odd32b_fb = div_odd32b_fx1; | |
2854 | assign fac_fpd_tid_fb[2:0] = div_tid_fx1[2:0]; | |
2855 | ||
2856 | assign div_finish_fb = div_finish_int_fb | div_finish_flts_fb | div_finish_fltd_fb; | |
2857 | ||
2858 | ||
2859 | // ---------------------------------------------------------------------------- | |
2860 | // FW stage | |
2861 | // ---------------------------------------------------------------------------- | |
2862 | ||
2863 | fgu_fac_ctl_msff_ctl_macro__width_21 fw_00 ( | |
2864 | .scan_in(fw_00_scanin), | |
2865 | .scan_out(fw_00_scanout), | |
2866 | .l1clk(l1clk_pm1), | |
2867 | .din ({fac_fpd_tid_fb[2:0], | |
2868 | fac_w1_tid_fb[2:0], | |
2869 | fac_w1_addr_fb[4], | |
2870 | dec_valid_noflush_fb, | |
2871 | dec_valid_noflush_fw, | |
2872 | dec_valid_noflush_fw1, | |
2873 | div_finish_fb, | |
2874 | div_finish_fw, | |
2875 | div_finish_fw1, | |
2876 | div_finish_fw2, | |
2877 | dec_valid_imul_noflush_fb, | |
2878 | dec_valid_imul_noflush_fw, | |
2879 | dec_valid_imul_noflush_fw1, | |
2880 | fgx_instr_fb, | |
2881 | fgx_instr_fw, | |
2882 | fgx_instr_fw1, | |
2883 | fpc_stfsr_en_fb}), | |
2884 | .dout({fgu_fpd_trap_tid_fw[2:0], | |
2885 | fgu_fpx_trap_tid_fw[2:0], | |
2886 | w1_addr_fw_b4, | |
2887 | dec_valid_noflush_fw, | |
2888 | dec_valid_noflush_fw1, | |
2889 | dec_valid_noflush_fw2, | |
2890 | div_finish_fw, | |
2891 | div_finish_fw1, | |
2892 | div_finish_fw2, | |
2893 | div_finish_fw3, | |
2894 | dec_valid_imul_noflush_fw, | |
2895 | dec_valid_imul_noflush_fw1, | |
2896 | dec_valid_imul_noflush_fw2, | |
2897 | fgx_instr_fw, | |
2898 | fgx_instr_fw1, | |
2899 | fgx_instr_fw2, | |
2900 | fpc_stfsr_en_fw}), | |
2901 | .siclk(siclk), | |
2902 | .soclk(soclk) | |
2903 | ); | |
2904 | ||
2905 | fgu_fac_ctl_msff_ctl_macro__width_53 fw_01 ( | |
2906 | .scan_in(fw_01_scanin), | |
2907 | .scan_out(fw_01_scanout), | |
2908 | .l1clk(l1clk_pm2), | |
2909 | .din ({ fsr0_sel_fb[5:0], // requires free running clk | |
2910 | fsr1_sel_fb[5:0], // requires free running clk | |
2911 | fsr2_sel_fb[5:0], // requires free running clk | |
2912 | fsr3_sel_fb[5:0], // requires free running clk | |
2913 | fsr4_sel_fb[5:0], // requires free running clk | |
2914 | fsr5_sel_fb[5:0], // requires free running clk | |
2915 | fsr6_sel_fb[5:0], // requires free running clk | |
2916 | fsr7_sel_fb[5:0], // requires free running clk | |
2917 | lsu_fgu_fld_tid_b[2:0], // requires free running clk | |
2918 | i_fsr_w2_vld_fb[1:0]}), // requires free running clk | |
2919 | .dout({fac_fsr0_sel_fw[5:4], i_fsr0_sel_fw[3], fac_fsr0_sel_fw[2:1], i_fsr0_sel_fw[0], | |
2920 | fac_fsr1_sel_fw[5:4], i_fsr1_sel_fw[3], fac_fsr1_sel_fw[2:1], i_fsr1_sel_fw[0], | |
2921 | fac_fsr2_sel_fw[5:4], i_fsr2_sel_fw[3], fac_fsr2_sel_fw[2:1], i_fsr2_sel_fw[0], | |
2922 | fac_fsr3_sel_fw[5:4], i_fsr3_sel_fw[3], fac_fsr3_sel_fw[2:1], i_fsr3_sel_fw[0], | |
2923 | fac_fsr4_sel_fw[5:4], i_fsr4_sel_fw[3], fac_fsr4_sel_fw[2:1], i_fsr4_sel_fw[0], | |
2924 | fac_fsr5_sel_fw[5:4], i_fsr5_sel_fw[3], fac_fsr5_sel_fw[2:1], i_fsr5_sel_fw[0], | |
2925 | fac_fsr6_sel_fw[5:4], i_fsr6_sel_fw[3], fac_fsr6_sel_fw[2:1], i_fsr6_sel_fw[0], | |
2926 | fac_fsr7_sel_fw[5:4], i_fsr7_sel_fw[3], fac_fsr7_sel_fw[2:1], i_fsr7_sel_fw[0], | |
2927 | lsu_fgu_fld_tid_fw[2:0], | |
2928 | i_fsr_w2_vld_fw[1:0]}), | |
2929 | .siclk(siclk), | |
2930 | .soclk(soclk) | |
2931 | ); | |
2932 | ||
2933 | assign fsr_w2_vld_fw[0] = // load FSR 32b | |
2934 | i_fsr_w2_vld_fw[0] & lsu_fgu_fld_vld_w; | |
2935 | ||
2936 | assign fsr_w2_vld_fw[1] = // load FSR 64b | |
2937 | i_fsr_w2_vld_fw[1] & lsu_fgu_fld_vld_w; | |
2938 | ||
2939 | assign fac_fsr0_sel_fw[3] = // enable flop | |
2940 | i_fsr0_sel_fw[3] | | |
2941 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd0)) ; | |
2942 | ||
2943 | assign fac_fsr1_sel_fw[3] = // enable flop | |
2944 | i_fsr1_sel_fw[3] | | |
2945 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd1)) ; | |
2946 | ||
2947 | assign fac_fsr2_sel_fw[3] = // enable flop | |
2948 | i_fsr2_sel_fw[3] | | |
2949 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd2)) ; | |
2950 | ||
2951 | assign fac_fsr3_sel_fw[3] = // enable flop | |
2952 | i_fsr3_sel_fw[3] | | |
2953 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd3)) ; | |
2954 | ||
2955 | assign fac_fsr4_sel_fw[3] = // enable flop | |
2956 | i_fsr4_sel_fw[3] | | |
2957 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd4)) ; | |
2958 | ||
2959 | assign fac_fsr5_sel_fw[3] = // enable flop | |
2960 | i_fsr5_sel_fw[3] | | |
2961 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd5)) ; | |
2962 | ||
2963 | assign fac_fsr6_sel_fw[3] = // enable flop | |
2964 | i_fsr6_sel_fw[3] | | |
2965 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd6)) ; | |
2966 | ||
2967 | assign fac_fsr7_sel_fw[3] = // enable flop | |
2968 | i_fsr7_sel_fw[3] | | |
2969 | (( |fsr_w2_vld_fw[1:0]) & (lsu_fgu_fld_tid_fw[2:0] == 3'd7)) ; | |
2970 | ||
2971 | assign fac_fsr0_sel_fw[0] = | |
2972 | i_fsr0_sel_fw[0] | | |
2973 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd0)) & 1'b0) | // LDFSR | |
2974 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd0)) ) ; // LDXFSR | |
2975 | ||
2976 | assign fac_fsr1_sel_fw[0] = | |
2977 | i_fsr1_sel_fw[0] | | |
2978 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd1)) & 1'b0) | // LDFSR | |
2979 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd1)) ) ; // LDXFSR | |
2980 | ||
2981 | assign fac_fsr2_sel_fw[0] = | |
2982 | i_fsr2_sel_fw[0] | | |
2983 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd2)) & 1'b0) | // LDFSR | |
2984 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd2)) ) ; // LDXFSR | |
2985 | ||
2986 | assign fac_fsr3_sel_fw[0] = | |
2987 | i_fsr3_sel_fw[0] | | |
2988 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd3)) & 1'b0) | // LDFSR | |
2989 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd3)) ) ; // LDXFSR | |
2990 | ||
2991 | assign fac_fsr4_sel_fw[0] = | |
2992 | i_fsr4_sel_fw[0] | | |
2993 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd4)) & 1'b0) | // LDFSR | |
2994 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd4)) ) ; // LDXFSR | |
2995 | ||
2996 | assign fac_fsr5_sel_fw[0] = | |
2997 | i_fsr5_sel_fw[0] | | |
2998 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd5)) & 1'b0) | // LDFSR | |
2999 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd5)) ) ; // LDXFSR | |
3000 | ||
3001 | assign fac_fsr6_sel_fw[0] = | |
3002 | i_fsr6_sel_fw[0] | | |
3003 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd6)) & 1'b0) | // LDFSR | |
3004 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd6)) ) ; // LDXFSR | |
3005 | ||
3006 | assign fac_fsr7_sel_fw[0] = | |
3007 | i_fsr7_sel_fw[0] | | |
3008 | //( (fsr_w2_vld_fw[0] & (lsu_fgu_fld_tid_fw[2:0] == 3'd7)) & 1'b0) | // LDFSR | |
3009 | ( (fsr_w2_vld_fw[1] & (lsu_fgu_fld_tid_fw[2:0] == 3'd7)) ) ; // LDXFSR | |
3010 | ||
3011 | // ------------------------------------ | |
3012 | // FPRS | |
3013 | // | |
3014 | // FPRS[2:0] = {fef, du, dl} | |
3015 | // ------------------------------------ | |
3016 | ||
3017 | fgu_fac_ctl_msff_ctl_macro__width_12 fprs_frf_ctl ( | |
3018 | .scan_in(fprs_frf_ctl_scanin), | |
3019 | .scan_out(fprs_frf_ctl_scanout), | |
3020 | .l1clk(l1clk_pm1), | |
3021 | .din ({w1_addr_fw_b4, | |
3022 | fad_w1_tid_fw[2:0], | |
3023 | fad_w1_vld_fw[1:0], | |
3024 | fad_w2_addr_fw1_b4, | |
3025 | fad_w2_tid_fw1[2:0], | |
3026 | fad_w2_vld_fw1[1:0]}), | |
3027 | .dout({fprs_w1_addr[4], | |
3028 | fprs_w1_tid[2:0], | |
3029 | fprs_w1_vld[1:0], | |
3030 | fprs_w2_addr[4], | |
3031 | fprs_w2_tid[2:0], | |
3032 | fprs_w2_vld[1:0]}), | |
3033 | .siclk(siclk), | |
3034 | .soclk(soclk) | |
3035 | ); | |
3036 | ||
3037 | // ---------- | |
3038 | // FPRS tid0 | |
3039 | // ---------- | |
3040 | ||
3041 | assign fprs_tid0_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd0); // ASR FPRS write | |
3042 | assign fprs_tid0_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd0); // FRF w1 write | |
3043 | assign fprs_tid0_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd0); // FRF w2 write | |
3044 | assign fprs_tid0_sel[3] = ~(|fprs_tid0_sel[2:0]); // hold | |
3045 | ||
3046 | assign din_fprs_tid0[0] = // dirty lower | |
3047 | ( fprs_tid0_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3048 | ( fprs_tid0_sel[1] & (fprs_tid0[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3049 | ( fprs_tid0_sel[2] & (fprs_tid0[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3050 | ( fprs_tid0_sel[3] & fprs_tid0[0] ) ; // hold | |
3051 | ||
3052 | assign din_fprs_tid0[1] = // dirty upper | |
3053 | ( fprs_tid0_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3054 | ( fprs_tid0_sel[1] & (fprs_tid0[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3055 | ( fprs_tid0_sel[2] & (fprs_tid0[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3056 | ( fprs_tid0_sel[3] & fprs_tid0[1] ) ; // hold | |
3057 | ||
3058 | assign din_fprs_tid0[2] = // enable fp (POR value is 1'b1) | |
3059 | ~(( fprs_tid0_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3060 | (~fprs_tid0_sel[0] & fprs_tid0[2] ) ); // hold | |
3061 | ||
3062 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid0 ( // FS:wmr_protect | |
3063 | .scan_in(fprstid0_wmr_scanin), | |
3064 | .scan_out(fprstid0_wmr_scanout), | |
3065 | .siclk(spc_aclk_wmr), | |
3066 | .l1clk(l1clk_pm1), | |
3067 | .din (din_fprs_tid0[2:0]), | |
3068 | .dout({fprs_tid0_[2], fprs_tid0[1:0]}), | |
3069 | .soclk(soclk) | |
3070 | ); | |
3071 | ||
3072 | assign fprs_tid0[2] = ~fprs_tid0_[2]; | |
3073 | ||
3074 | // ---------- | |
3075 | // FPRS tid1 | |
3076 | // ---------- | |
3077 | ||
3078 | assign fprs_tid1_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd1); // ASR FPRS write | |
3079 | assign fprs_tid1_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd1); // FRF w1 write | |
3080 | assign fprs_tid1_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd1); // FRF w2 write | |
3081 | assign fprs_tid1_sel[3] = ~(|fprs_tid1_sel[2:0]); // hold | |
3082 | ||
3083 | assign din_fprs_tid1[0] = // dirty lower | |
3084 | ( fprs_tid1_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3085 | ( fprs_tid1_sel[1] & (fprs_tid1[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3086 | ( fprs_tid1_sel[2] & (fprs_tid1[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3087 | ( fprs_tid1_sel[3] & fprs_tid1[0] ) ; // hold | |
3088 | ||
3089 | assign din_fprs_tid1[1] = // dirty upper | |
3090 | ( fprs_tid1_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3091 | ( fprs_tid1_sel[1] & (fprs_tid1[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3092 | ( fprs_tid1_sel[2] & (fprs_tid1[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3093 | ( fprs_tid1_sel[3] & fprs_tid1[1] ) ; // hold | |
3094 | ||
3095 | assign din_fprs_tid1[2] = // enable fp (POR value is 1'b1) | |
3096 | ~(( fprs_tid1_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3097 | (~fprs_tid1_sel[0] & fprs_tid1[2] ) ); // hold | |
3098 | ||
3099 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid1 ( // FS:wmr_protect | |
3100 | .scan_in(fprstid1_wmr_scanin), | |
3101 | .scan_out(fprstid1_wmr_scanout), | |
3102 | .siclk(spc_aclk_wmr), | |
3103 | .l1clk(l1clk_pm1), | |
3104 | .din (din_fprs_tid1[2:0]), | |
3105 | .dout({fprs_tid1_[2], fprs_tid1[1:0]}), | |
3106 | .soclk(soclk) | |
3107 | ); | |
3108 | ||
3109 | assign fprs_tid1[2] = ~fprs_tid1_[2]; | |
3110 | ||
3111 | // ---------- | |
3112 | // FPRS tid2 | |
3113 | // ---------- | |
3114 | ||
3115 | assign fprs_tid2_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd2); // ASR FPRS write | |
3116 | assign fprs_tid2_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd2); // FRF w1 write | |
3117 | assign fprs_tid2_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd2); // FRF w2 write | |
3118 | assign fprs_tid2_sel[3] = ~(|fprs_tid2_sel[2:0]); // hold | |
3119 | ||
3120 | assign din_fprs_tid2[0] = // dirty lower | |
3121 | ( fprs_tid2_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3122 | ( fprs_tid2_sel[1] & (fprs_tid2[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3123 | ( fprs_tid2_sel[2] & (fprs_tid2[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3124 | ( fprs_tid2_sel[3] & fprs_tid2[0] ) ; // hold | |
3125 | ||
3126 | assign din_fprs_tid2[1] = // dirty upper | |
3127 | ( fprs_tid2_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3128 | ( fprs_tid2_sel[1] & (fprs_tid2[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3129 | ( fprs_tid2_sel[2] & (fprs_tid2[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3130 | ( fprs_tid2_sel[3] & fprs_tid2[1] ) ; // hold | |
3131 | ||
3132 | assign din_fprs_tid2[2] = // enable fp (POR value is 1'b1) | |
3133 | ~(( fprs_tid2_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3134 | (~fprs_tid2_sel[0] & fprs_tid2[2] ) ); // hold | |
3135 | ||
3136 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid2 ( // FS:wmr_protect | |
3137 | .scan_in(fprstid2_wmr_scanin), | |
3138 | .scan_out(fprstid2_wmr_scanout), | |
3139 | .siclk(spc_aclk_wmr), | |
3140 | .l1clk(l1clk_pm1), | |
3141 | .din (din_fprs_tid2[2:0]), | |
3142 | .dout({fprs_tid2_[2], fprs_tid2[1:0]}), | |
3143 | .soclk(soclk) | |
3144 | ); | |
3145 | ||
3146 | assign fprs_tid2[2] = ~fprs_tid2_[2]; | |
3147 | ||
3148 | // ---------- | |
3149 | // FPRS tid3 | |
3150 | // ---------- | |
3151 | ||
3152 | assign fprs_tid3_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd3); // ASR FPRS write | |
3153 | assign fprs_tid3_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd3); // FRF w1 write | |
3154 | assign fprs_tid3_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd3); // FRF w2 write | |
3155 | assign fprs_tid3_sel[3] = ~(|fprs_tid3_sel[2:0]); // hold | |
3156 | ||
3157 | assign din_fprs_tid3[0] = // dirty lower | |
3158 | ( fprs_tid3_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3159 | ( fprs_tid3_sel[1] & (fprs_tid3[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3160 | ( fprs_tid3_sel[2] & (fprs_tid3[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3161 | ( fprs_tid3_sel[3] & fprs_tid3[0] ) ; // hold | |
3162 | ||
3163 | assign din_fprs_tid3[1] = // dirty upper | |
3164 | ( fprs_tid3_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3165 | ( fprs_tid3_sel[1] & (fprs_tid3[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3166 | ( fprs_tid3_sel[2] & (fprs_tid3[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3167 | ( fprs_tid3_sel[3] & fprs_tid3[1] ) ; // hold | |
3168 | ||
3169 | assign din_fprs_tid3[2] = // enable fp (POR value is 1'b1) | |
3170 | ~(( fprs_tid3_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3171 | (~fprs_tid3_sel[0] & fprs_tid3[2] ) ); // hold | |
3172 | ||
3173 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid3 ( // FS:wmr_protect | |
3174 | .scan_in(fprstid3_wmr_scanin), | |
3175 | .scan_out(fprstid3_wmr_scanout), | |
3176 | .siclk(spc_aclk_wmr), | |
3177 | .l1clk(l1clk_pm1), | |
3178 | .din (din_fprs_tid3[2:0]), | |
3179 | .dout({fprs_tid3_[2], fprs_tid3[1:0]}), | |
3180 | .soclk(soclk) | |
3181 | ); | |
3182 | ||
3183 | assign fprs_tid3[2] = ~fprs_tid3_[2]; | |
3184 | ||
3185 | // ---------- | |
3186 | // FPRS tid4 | |
3187 | // ---------- | |
3188 | ||
3189 | assign fprs_tid4_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd4); // ASR FPRS write | |
3190 | assign fprs_tid4_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd4); // FRF w1 write | |
3191 | assign fprs_tid4_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd4); // FRF w2 write | |
3192 | assign fprs_tid4_sel[3] = ~(|fprs_tid4_sel[2:0]); // hold | |
3193 | ||
3194 | assign din_fprs_tid4[0] = // dirty lower | |
3195 | ( fprs_tid4_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3196 | ( fprs_tid4_sel[1] & (fprs_tid4[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3197 | ( fprs_tid4_sel[2] & (fprs_tid4[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3198 | ( fprs_tid4_sel[3] & fprs_tid4[0] ) ; // hold | |
3199 | ||
3200 | assign din_fprs_tid4[1] = // dirty upper | |
3201 | ( fprs_tid4_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3202 | ( fprs_tid4_sel[1] & (fprs_tid4[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3203 | ( fprs_tid4_sel[2] & (fprs_tid4[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3204 | ( fprs_tid4_sel[3] & fprs_tid4[1] ) ; // hold | |
3205 | ||
3206 | assign din_fprs_tid4[2] = // enable fp (POR value is 1'b1) | |
3207 | ~(( fprs_tid4_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3208 | (~fprs_tid4_sel[0] & fprs_tid4[2] ) ); // hold | |
3209 | ||
3210 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid4 ( // FS:wmr_protect | |
3211 | .scan_in(fprstid4_wmr_scanin), | |
3212 | .scan_out(fprstid4_wmr_scanout), | |
3213 | .siclk(spc_aclk_wmr), | |
3214 | .l1clk(l1clk_pm1), | |
3215 | .din (din_fprs_tid4[2:0]), | |
3216 | .dout({fprs_tid4_[2], fprs_tid4[1:0]}), | |
3217 | .soclk(soclk) | |
3218 | ); | |
3219 | ||
3220 | assign fprs_tid4[2] = ~fprs_tid4_[2]; | |
3221 | ||
3222 | // ---------- | |
3223 | // FPRS tid5 | |
3224 | // ---------- | |
3225 | ||
3226 | assign fprs_tid5_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd5); // ASR FPRS write | |
3227 | assign fprs_tid5_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd5); // FRF w1 write | |
3228 | assign fprs_tid5_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd5); // FRF w2 write | |
3229 | assign fprs_tid5_sel[3] = ~(|fprs_tid5_sel[2:0]); // hold | |
3230 | ||
3231 | assign din_fprs_tid5[0] = // dirty lower | |
3232 | ( fprs_tid5_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3233 | ( fprs_tid5_sel[1] & (fprs_tid5[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3234 | ( fprs_tid5_sel[2] & (fprs_tid5[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3235 | ( fprs_tid5_sel[3] & fprs_tid5[0] ) ; // hold | |
3236 | ||
3237 | assign din_fprs_tid5[1] = // dirty upper | |
3238 | ( fprs_tid5_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3239 | ( fprs_tid5_sel[1] & (fprs_tid5[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3240 | ( fprs_tid5_sel[2] & (fprs_tid5[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3241 | ( fprs_tid5_sel[3] & fprs_tid5[1] ) ; // hold | |
3242 | ||
3243 | assign din_fprs_tid5[2] = // enable fp (POR value is 1'b1) | |
3244 | ~(( fprs_tid5_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3245 | (~fprs_tid5_sel[0] & fprs_tid5[2] ) ); // hold | |
3246 | ||
3247 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid5 ( // FS:wmr_protect | |
3248 | .scan_in(fprstid5_wmr_scanin), | |
3249 | .scan_out(fprstid5_wmr_scanout), | |
3250 | .siclk(spc_aclk_wmr), | |
3251 | .l1clk(l1clk_pm1), | |
3252 | .din (din_fprs_tid5[2:0]), | |
3253 | .dout({fprs_tid5_[2], fprs_tid5[1:0]}), | |
3254 | .soclk(soclk) | |
3255 | ); | |
3256 | ||
3257 | assign fprs_tid5[2] = ~fprs_tid5_[2]; | |
3258 | ||
3259 | // ---------- | |
3260 | // FPRS tid6 | |
3261 | // ---------- | |
3262 | ||
3263 | assign fprs_tid6_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd6); // ASR FPRS write | |
3264 | assign fprs_tid6_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd6); // FRF w1 write | |
3265 | assign fprs_tid6_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd6); // FRF w2 write | |
3266 | assign fprs_tid6_sel[3] = ~(|fprs_tid6_sel[2:0]); // hold | |
3267 | ||
3268 | assign din_fprs_tid6[0] = // dirty lower | |
3269 | ( fprs_tid6_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3270 | ( fprs_tid6_sel[1] & (fprs_tid6[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3271 | ( fprs_tid6_sel[2] & (fprs_tid6[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3272 | ( fprs_tid6_sel[3] & fprs_tid6[0] ) ; // hold | |
3273 | ||
3274 | assign din_fprs_tid6[1] = // dirty upper | |
3275 | ( fprs_tid6_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3276 | ( fprs_tid6_sel[1] & (fprs_tid6[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3277 | ( fprs_tid6_sel[2] & (fprs_tid6[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3278 | ( fprs_tid6_sel[3] & fprs_tid6[1] ) ; // hold | |
3279 | ||
3280 | assign din_fprs_tid6[2] = // enable fp (POR value is 1'b1) | |
3281 | ~(( fprs_tid6_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3282 | (~fprs_tid6_sel[0] & fprs_tid6[2] ) ); // hold | |
3283 | ||
3284 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid6 ( // FS:wmr_protect | |
3285 | .scan_in(fprstid6_wmr_scanin), | |
3286 | .scan_out(fprstid6_wmr_scanout), | |
3287 | .siclk(spc_aclk_wmr), | |
3288 | .l1clk(l1clk_pm1), | |
3289 | .din (din_fprs_tid6[2:0]), | |
3290 | .dout({fprs_tid6_[2], fprs_tid6[1:0]}), | |
3291 | .soclk(soclk) | |
3292 | ); | |
3293 | ||
3294 | assign fprs_tid6[2] = ~fprs_tid6_[2]; | |
3295 | ||
3296 | // ---------- | |
3297 | // FPRS tid7 | |
3298 | // ---------- | |
3299 | ||
3300 | assign fprs_tid7_sel[0] = rng_wr_fprs_3f & (rng_wr_tid_3f[2:0] == 3'd7); // ASR FPRS write | |
3301 | assign fprs_tid7_sel[1] = |fprs_w1_vld[1:0] & (fprs_w1_tid[2:0] == 3'd7); // FRF w1 write | |
3302 | assign fprs_tid7_sel[2] = |fprs_w2_vld[1:0] & (fprs_w2_tid[2:0] == 3'd7); // FRF w2 write | |
3303 | assign fprs_tid7_sel[3] = ~(|fprs_tid7_sel[2:0]); // hold | |
3304 | ||
3305 | assign din_fprs_tid7[0] = // dirty lower | |
3306 | ( fprs_tid7_sel[0] & rng_data_2f_b7_0[0] ) | // ASR FPRS write | |
3307 | ( fprs_tid7_sel[1] & (fprs_tid7[0] | ~fprs_w1_addr[4])) | // FRF w1 write | |
3308 | ( fprs_tid7_sel[2] & (fprs_tid7[0] | ~fprs_w2_addr[4])) | // FRF w2 write | |
3309 | ( fprs_tid7_sel[3] & fprs_tid7[0] ) ; // hold | |
3310 | ||
3311 | assign din_fprs_tid7[1] = // dirty upper | |
3312 | ( fprs_tid7_sel[0] & rng_data_2f_b7_0[1] ) | // ASR FPRS write | |
3313 | ( fprs_tid7_sel[1] & (fprs_tid7[1] | fprs_w1_addr[4])) | // FRF w1 write | |
3314 | ( fprs_tid7_sel[2] & (fprs_tid7[1] | fprs_w2_addr[4])) | // FRF w2 write | |
3315 | ( fprs_tid7_sel[3] & fprs_tid7[1] ) ; // hold | |
3316 | ||
3317 | assign din_fprs_tid7[2] = // enable fp (POR value is 1'b1) | |
3318 | ~(( fprs_tid7_sel[0] & rng_data_2f_b7_0[2]) | // ASR FPRS write | |
3319 | (~fprs_tid7_sel[0] & fprs_tid7[2] ) ); // hold | |
3320 | ||
3321 | fgu_fac_ctl_msff_ctl_macro__width_3 fprstid7 ( // FS:wmr_protect | |
3322 | .scan_in(fprstid7_wmr_scanin), | |
3323 | .scan_out(fprstid7_wmr_scanout), | |
3324 | .siclk(spc_aclk_wmr), | |
3325 | .l1clk(l1clk_pm1), | |
3326 | .din (din_fprs_tid7[2:0]), | |
3327 | .dout({fprs_tid7_[2], fprs_tid7[1:0]}), | |
3328 | .soclk(soclk) | |
3329 | ); | |
3330 | ||
3331 | assign fprs_tid7[2] = ~fprs_tid7_[2]; | |
3332 | ||
3333 | assign fgu_fprs_fef[7:0] = | |
3334 | {fprs_tid7[2], | |
3335 | fprs_tid6[2], | |
3336 | fprs_tid5[2], | |
3337 | fprs_tid4[2], | |
3338 | fprs_tid3[2], | |
3339 | fprs_tid2[2], | |
3340 | fprs_tid1[2], | |
3341 | fprs_tid0[2]}; | |
3342 | ||
3343 | // ---------- | |
3344 | // ASR FPRS read data | |
3345 | // ---------- | |
3346 | ||
3347 | assign din_rng_fprs[2:0] = | |
3348 | ({3{(rng_wr_tid_3f[2:0] == 3'd0)}} & fprs_tid0[2:0]) | | |
3349 | ({3{(rng_wr_tid_3f[2:0] == 3'd1)}} & fprs_tid1[2:0]) | | |
3350 | ({3{(rng_wr_tid_3f[2:0] == 3'd2)}} & fprs_tid2[2:0]) | | |
3351 | ({3{(rng_wr_tid_3f[2:0] == 3'd3)}} & fprs_tid3[2:0]) | | |
3352 | ({3{(rng_wr_tid_3f[2:0] == 3'd4)}} & fprs_tid4[2:0]) | | |
3353 | ({3{(rng_wr_tid_3f[2:0] == 3'd5)}} & fprs_tid5[2:0]) | | |
3354 | ({3{(rng_wr_tid_3f[2:0] == 3'd6)}} & fprs_tid6[2:0]) | | |
3355 | ({3{(rng_wr_tid_3f[2:0] == 3'd7)}} & fprs_tid7[2:0]) ; | |
3356 | ||
3357 | fgu_fac_ctl_msff_ctl_macro__width_3 fprs_rng ( | |
3358 | .scan_in(fprs_rng_scanin), | |
3359 | .scan_out(fprs_rng_scanout), | |
3360 | .l1clk(l1clk_pm1), | |
3361 | .din (din_rng_fprs[2:0]), | |
3362 | .dout(fac_rng_fprs[2:0]), | |
3363 | .siclk(siclk), | |
3364 | .soclk(soclk) | |
3365 | ); | |
3366 | ||
3367 | // ---------------------------------------------------------------------------- | |
3368 | // FGU ASI local ring control - ASR GSR/FPRS access, ASI FRF ECC access | |
3369 | // ---------------------------------------------------------------------------- | |
3370 | // | |
3371 | // | |
3372 | // ASI access should not happen for a given thread when there is a valid instr | |
3373 | // in the pipeline for that thread. | |
3374 | // | |
3375 | // A packet is transmitted on the ring over 2 cycles. First cycle | |
3376 | // carries control and address information. Second cycle carries data. | |
3377 | // -Determinate write packets go through the pipe unmodified. The write data | |
3378 | // is used by the unit. | |
3379 | // -Determinate read packets have their data portion modified | |
3380 | // by the target unit. | |
3381 | // | |
3382 | // 65-bit control/data bus output from the ring: | |
3383 | // 64 - ctl/data | |
3384 | // 63 - valid/hole | |
3385 | // 62 - ack | |
3386 | // 61:60 - 00-ASI, 01-ASR, 10-PR, 11-HPR | |
3387 | // 59 - rd/wr | |
3388 | // 58:56 - Thread ID | |
3389 | // 55:48 - ASI field | |
3390 | // 47:0 - Virtual Address | |
3391 | // | |
3392 | //////////////////////////////////////////////////////////////////////////////// | |
3393 | // | |
3394 | // PIPELINE STRUCTURE | |
3395 | // | |
3396 | // rng_in_cdbus | |
3397 | // | | |
3398 | // | | |
3399 | // ------------- | |
3400 | // | stage1 reg | | |
3401 | // ------------- | |
3402 | // | | |
3403 | // ------------------------|---------> Store Data | |
3404 | // | v | |
3405 | // | ------------- | |
3406 | // | | Decode | | |
3407 | // | | | ---------> Load request | |
3408 | // | | | | |
3409 | // | ------------- | |
3410 | // | | | |
3411 | // | | | |
3412 | // v v | |
3413 | // --------------- ------------- | |
3414 | // |stage2 data reg| |stage2 ctl reg| | |
3415 | // --------------- ------------- | |
3416 | // load data | | | |
3417 | // ------------- | | | |
3418 | //indet load data | | |---------> Store control | |
3419 | // --------- | | | | |
3420 | // | | | | | |
3421 | // v v v | | |
3422 | // ---------------- | | |
3423 | // \ input mux / | | |
3424 | // -------------- ----------------- | |
3425 | // | | | |
3426 | // | | | |
3427 | // | | | |
3428 | // v v | |
3429 | // ---------------- | |
3430 | // \ data/ctl mux / | |
3431 | // -------------- | |
3432 | // | | |
3433 | // v | |
3434 | // ------------- | |
3435 | // | stage3 reg | | |
3436 | // ------------- | |
3437 | // | | |
3438 | // | | |
3439 | // v | |
3440 | // rng_out_cdbus | |
3441 | // | |
3442 | ////////////////////////////////////////////////////////////////////// | |
3443 | ||
3444 | `define FRF_ADDR 8'd73 // FRF ECC address | |
3445 | `define GSR_ADDR 8'd19 // GSR address | |
3446 | `define FPRS_ADDR 8'd6 // FPRS address | |
3447 | `define ASI 2'b00 | |
3448 | `define ASR 2'b01 | |
3449 | ||
3450 | // ------------------------------------ | |
3451 | // STAGE 1 | |
3452 | // ------------------------------------ | |
3453 | ||
3454 | // First cycle of the packet holds control and address information | |
3455 | // Second cycle holds the read/write data | |
3456 | ||
3457 | // bit 64 indicates whether ctl packet or data packet | |
3458 | fgu_fac_ctl_msff_ctl_macro__width_25 rng_stg1 ( | |
3459 | .scan_in(rng_stg1_scanin), | |
3460 | .scan_out(rng_stg1_scanout), | |
3461 | .l1clk(l1clk_pm2), | |
3462 | .din ({in_rngl_cdbus[64:48], in_rngl_cdbus[7:0]}), // requires free running clk or rng_data_1f[63] en | |
3463 | .dout ({rng_ctl_1f, rng_valid_1f, rng_data_1f[62:48], rng_data_1f_b7_0[7:0]}), | |
3464 | .siclk(siclk), | |
3465 | .soclk(soclk) | |
3466 | ); | |
3467 | ||
3468 | // decode the packet for ASR GSR/FPRS read or ASI ECC read | |
3469 | assign rng_rd_1f = | |
3470 | rng_ctl_1f & // ctl packet (not data) | |
3471 | rng_valid_1f & // valid | |
3472 | ~rng_data_1f[62] & // ~ack | |
3473 | rng_data_1f[59] ; // read (not write) | |
3474 | ||
3475 | // decode the packet for ASR GSR/FPRS write | |
3476 | assign rng_wr_1f = | |
3477 | rng_ctl_1f & // ctl packet (not data) | |
3478 | rng_valid_1f & // valid | |
3479 | ~rng_data_1f[62] & // ~ack | |
3480 | (rng_data_1f[61:60] == `ASR) & // ASR | |
3481 | ~rng_data_1f[59] ; // write (not read) | |
3482 | ||
3483 | assign rng_rd_gsr_1f = rng_rd_1f & (rng_data_1f[61:60] == `ASR) & (rng_data_1f[55:48] == `GSR_ADDR ); | |
3484 | assign rng_wr_gsr_1f = rng_wr_1f & (rng_data_1f[55:48] == `GSR_ADDR ); | |
3485 | assign rng_rd_fprs_1f = rng_rd_1f & (rng_data_1f[61:60] == `ASR) & (rng_data_1f[55:48] == `FPRS_ADDR); | |
3486 | assign rng_wr_fprs_1f = rng_wr_1f & (rng_data_1f[55:48] == `FPRS_ADDR); | |
3487 | assign rng_rd_ecc_1f = rng_rd_1f & (rng_data_1f[61:60] == `ASI) & (rng_data_1f[55:48] == `FRF_ADDR ); | |
3488 | ||
3489 | assign rng_rd_or_wr_1f = | |
3490 | rng_rd_gsr_1f | rng_wr_gsr_1f | | |
3491 | rng_rd_fprs_1f | rng_wr_fprs_1f | | |
3492 | rng_rd_ecc_1f; | |
3493 | ||
3494 | // 0in custom -fire ((rng_rd_or_wr_1f & div_engine_busy_e & (rng_data_1f[58:56]==div_tid_in_e[2:0])) | (rng_rd_or_wr_1f & (div_finish_fltd_fb | div_finish_flts_fb) & (rng_data_1f[58:56]==fac_fpd_tid_fb[2:0])) | (rng_rd_or_wr_1f & dec_fgu_valid_e & (rng_data_1f[58:56]==fac_tid_e[2:0])) | (rng_rd_or_wr_1f & fac_dec_valid_fx1 & (rng_data_1f[58:56]==tid_fx1[2:0])) | (rng_rd_or_wr_1f & dec_valid_fx2 & (rng_data_1f[58:56]==tid_fx2[2:0])) | (rng_rd_or_wr_1f & dec_valid_fx3 & (rng_data_1f[58:56]==tid_fx3[2:0])) | (rng_rd_or_wr_1f & (|fad_w1_vld_fw[1:0]) & (rng_data_1f[58:56]==fad_w1_tid_fw[2:0]))) -message "GSR or FPRS or FRF_ECC ASI collision with FPop" | |
3495 | ||
3496 | // ------------------------------------ | |
3497 | // STAGE 2 | |
3498 | // ------------------------------------ | |
3499 | ||
3500 | fgu_fac_ctl_msff_ctl_macro__width_17 rng_stg2 ( | |
3501 | .scan_in(rng_stg2_scanin), | |
3502 | .scan_out(rng_stg2_scanout), | |
3503 | .l1clk(l1clk_pm1), | |
3504 | .din ({rng_data_1f[58:56], | |
3505 | rng_wr_gsr_1f, | |
3506 | rng_rd_or_wr_1f, | |
3507 | rng_rd_gsr_1f, | |
3508 | rng_rd_fprs_1f, | |
3509 | rng_wr_fprs_1f, | |
3510 | rng_rd_ecc_1f, | |
3511 | rng_data_1f_b7_0[7:0]}), | |
3512 | .dout({rng_wr_tid_2f[2:0], | |
3513 | rng_wr_gsr_2f, | |
3514 | rng_rd_or_wr_2f, | |
3515 | rng_rd_gsr_2f, | |
3516 | rng_rd_fprs_2f, | |
3517 | rng_wr_fprs_2f, | |
3518 | rng_rd_ecc_2f, | |
3519 | rng_data_2f_b7_0[7:0]}), | |
3520 | .siclk(siclk), | |
3521 | .soclk(soclk) | |
3522 | ); | |
3523 | ||
3524 | fgu_fac_ctl_msff_ctl_macro__width_6 rng_6463 ( | |
3525 | .scan_in(rng_6463_scanin), | |
3526 | .scan_out(rng_6463_scanout), | |
3527 | .l1clk(l1clk_pm2), | |
3528 | .din ({rng_ctl_1f, | |
3529 | rng_valid_1f, | |
3530 | rng_ctl_2f, | |
3531 | rng_valid_2f, | |
3532 | rng_ctl_3f, | |
3533 | rng_cdbus_3f_b63}), | |
3534 | .dout({rng_ctl_2f, // requires free running clk | |
3535 | rng_valid_2f, // requires free running clk | |
3536 | rng_ctl_3f, // requires free running clk | |
3537 | rng_valid_3f, // requires free running clk | |
3538 | fgu_rngl_cdbus_b64, // requires free running clk | |
3539 | fgu_rngl_cdbus_b63}), | |
3540 | .siclk(siclk), | |
3541 | .soclk(soclk) // requires free running clk | |
3542 | ); | |
3543 | ||
3544 | // ------------------------------------ | |
3545 | // STAGE 3 | |
3546 | // ------------------------------------ | |
3547 | ||
3548 | fgu_fac_ctl_msff_ctl_macro__width_9 rng_stg3 ( | |
3549 | .scan_in(rng_stg3_scanin), | |
3550 | .scan_out(rng_stg3_scanout), | |
3551 | .l1clk(l1clk_pm1), | |
3552 | .din ({rng_wr_tid_2f[2:0], | |
3553 | rng_wr_gsr_2f, | |
3554 | rng_rd_or_wr_2f, | |
3555 | rng_rd_gsr_2f, | |
3556 | rng_rd_fprs_2f, | |
3557 | rng_wr_fprs_2f, | |
3558 | rng_rd_ecc_2f}), | |
3559 | .dout({rng_wr_tid_3f[2:0], | |
3560 | fac_rng_wr_gsr_3f, | |
3561 | fac_rng_rd_or_wr_3f, | |
3562 | rng_rd_gsr_3f, | |
3563 | rng_rd_fprs_3f, | |
3564 | rng_wr_fprs_3f, | |
3565 | rng_rd_ecc_3f}), | |
3566 | .siclk(siclk), | |
3567 | .soclk(soclk) | |
3568 | ); | |
3569 | ||
3570 | assign rng_b64_default_sel = | |
3571 | ~fac_rng_rd_or_wr_3f & | |
3572 | ~fac_rng_rd_gsr_4f & | |
3573 | ~fac_rng_rd_fprs_4f & | |
3574 | ~fac_rng_rd_ecc_4f ; | |
3575 | ||
3576 | assign rng_cdbus_3f_b63 = | |
3577 | (fac_rng_rd_or_wr_3f & rng_valid_3f ) | | |
3578 | (fac_rng_rd_gsr_4f & fgd_gsr_asr_mask_fx4_b31) | | |
3579 | (rng_b64_default_sel & rng_valid_3f ) ; | |
3580 | ||
3581 | // ------------------------------------ | |
3582 | // STAGE 4 | |
3583 | // ------------------------------------ | |
3584 | ||
3585 | fgu_fac_ctl_msff_ctl_macro__width_5 rng_stg4 ( | |
3586 | .scan_in(rng_stg4_scanin), | |
3587 | .scan_out(rng_stg4_scanout), | |
3588 | .l1clk(l1clk_pm1), | |
3589 | .din ({ rng_rd_gsr_3f, | |
3590 | rng_rd_fprs_3f, | |
3591 | rng_rd_ecc_3f, | |
3592 | fac_rng_rd_or_wr_3f, | |
3593 | rng_rd_or_wr_4f}), | |
3594 | .dout({fac_rng_rd_gsr_4f, | |
3595 | fac_rng_rd_fprs_4f, | |
3596 | fac_rng_rd_ecc_4f, | |
3597 | rng_rd_or_wr_4f, | |
3598 | rng_rd_or_wr_5f}), | |
3599 | .siclk(siclk), | |
3600 | .soclk(soclk) | |
3601 | ); | |
3602 | ||
3603 | ||
3604 | supply0 vss; | |
3605 | supply1 vdd; | |
3606 | // fixscan start: | |
3607 | assign spares_scanin = scan_in ; | |
3608 | assign e_00_scanin = spares_scanout ; | |
3609 | assign e_01_scanin = e_00_scanout ; | |
3610 | assign e_02_scanin = e_01_scanout ; | |
3611 | assign e_03_scanin = e_02_scanout ; | |
3612 | assign fx1_00_scanin = e_03_scanout ; | |
3613 | assign fx1_01_scanin = fx1_00_scanout ; | |
3614 | assign fx1_02_scanin = fx1_01_scanout ; | |
3615 | assign fx2_00_scanin = fx1_02_scanout ; | |
3616 | assign fx2_01_scanin = fx2_00_scanout ; | |
3617 | assign fx2_02_scanin = fx2_01_scanout ; | |
3618 | assign fx3_00_scanin = fx2_02_scanout ; | |
3619 | assign fx3_01_scanin = fx3_00_scanout ; | |
3620 | assign fx4_00_scanin = fx3_01_scanout ; | |
3621 | assign fx5_00_scanin = fx4_00_scanout ; | |
3622 | assign fb_00_scanin = fx5_00_scanout ; | |
3623 | assign fw_00_scanin = fb_00_scanout ; | |
3624 | assign fw_01_scanin = fw_00_scanout ; | |
3625 | assign fprs_frf_ctl_scanin = fw_01_scanout ; | |
3626 | assign fprs_rng_scanin = fprs_frf_ctl_scanout ; | |
3627 | assign rng_stg1_scanin = fprs_rng_scanout ; | |
3628 | assign rng_stg2_scanin = rng_stg1_scanout ; | |
3629 | assign rng_6463_scanin = rng_stg2_scanout ; | |
3630 | assign rng_stg3_scanin = rng_6463_scanout ; | |
3631 | assign rng_stg4_scanin = rng_stg3_scanout ; | |
3632 | assign scan_out = rng_stg4_scanout ; | |
3633 | ||
3634 | assign fprstid0_wmr_scanin = wmr_scan_in ; | |
3635 | assign fprstid1_wmr_scanin = fprstid0_wmr_scanout ; | |
3636 | assign fprstid2_wmr_scanin = fprstid1_wmr_scanout ; | |
3637 | assign fprstid3_wmr_scanin = fprstid2_wmr_scanout ; | |
3638 | assign fprstid4_wmr_scanin = fprstid3_wmr_scanout ; | |
3639 | assign fprstid5_wmr_scanin = fprstid4_wmr_scanout ; | |
3640 | assign fprstid6_wmr_scanin = fprstid5_wmr_scanout ; | |
3641 | assign fprstid7_wmr_scanin = fprstid6_wmr_scanout ; | |
3642 | assign wmr_scan_out = fprstid7_wmr_scanout ; | |
3643 | // fixscan end: | |
3644 | endmodule // fgu_fac_ctl | |
3645 | ||
3646 | ||
3647 | ||
3648 | ||
3649 | ||
3650 | ||
3651 | ||
3652 | ||
3653 | // any PARAMS parms go into naming of macro | |
3654 | ||
3655 | module fgu_fac_ctl_l1clkhdr_ctl_macro ( | |
3656 | l2clk, | |
3657 | l1en, | |
3658 | pce_ov, | |
3659 | stop, | |
3660 | se, | |
3661 | l1clk); | |
3662 | ||
3663 | ||
3664 | input l2clk; | |
3665 | input l1en; | |
3666 | input pce_ov; | |
3667 | input stop; | |
3668 | input se; | |
3669 | output l1clk; | |
3670 | ||
3671 | ||
3672 | ||
3673 | ||
3674 | ||
3675 | cl_sc1_l1hdr_8x c_0 ( | |
3676 | ||
3677 | ||
3678 | .l2clk(l2clk), | |
3679 | .pce(l1en), | |
3680 | .l1clk(l1clk), | |
3681 | .se(se), | |
3682 | .pce_ov(pce_ov), | |
3683 | .stop(stop) | |
3684 | ); | |
3685 | ||
3686 | ||
3687 | ||
3688 | endmodule | |
3689 | ||
3690 | ||
3691 | ||
3692 | ||
3693 | ||
3694 | ||
3695 | ||
3696 | ||
3697 | ||
3698 | // Description: Spare gate macro for control blocks | |
3699 | // | |
3700 | // Param num controls the number of times the macro is added | |
3701 | // flops=0 can be used to use only combination spare logic | |
3702 | ||
3703 | ||
3704 | module fgu_fac_ctl_spare_ctl_macro__num_5 ( | |
3705 | l1clk, | |
3706 | scan_in, | |
3707 | siclk, | |
3708 | soclk, | |
3709 | scan_out); | |
3710 | wire si_0; | |
3711 | wire so_0; | |
3712 | wire spare0_flop_unused; | |
3713 | wire spare0_buf_32x_unused; | |
3714 | wire spare0_nand3_8x_unused; | |
3715 | wire spare0_inv_8x_unused; | |
3716 | wire spare0_aoi22_4x_unused; | |
3717 | wire spare0_buf_8x_unused; | |
3718 | wire spare0_oai22_4x_unused; | |
3719 | wire spare0_inv_16x_unused; | |
3720 | wire spare0_nand2_16x_unused; | |
3721 | wire spare0_nor3_4x_unused; | |
3722 | wire spare0_nand2_8x_unused; | |
3723 | wire spare0_buf_16x_unused; | |
3724 | wire spare0_nor2_16x_unused; | |
3725 | wire spare0_inv_32x_unused; | |
3726 | wire si_1; | |
3727 | wire so_1; | |
3728 | wire spare1_flop_unused; | |
3729 | wire spare1_buf_32x_unused; | |
3730 | wire spare1_nand3_8x_unused; | |
3731 | wire spare1_inv_8x_unused; | |
3732 | wire spare1_aoi22_4x_unused; | |
3733 | wire spare1_buf_8x_unused; | |
3734 | wire spare1_oai22_4x_unused; | |
3735 | wire spare1_inv_16x_unused; | |
3736 | wire spare1_nand2_16x_unused; | |
3737 | wire spare1_nor3_4x_unused; | |
3738 | wire spare1_nand2_8x_unused; | |
3739 | wire spare1_buf_16x_unused; | |
3740 | wire spare1_nor2_16x_unused; | |
3741 | wire spare1_inv_32x_unused; | |
3742 | wire si_2; | |
3743 | wire so_2; | |
3744 | wire spare2_flop_unused; | |
3745 | wire spare2_buf_32x_unused; | |
3746 | wire spare2_nand3_8x_unused; | |
3747 | wire spare2_inv_8x_unused; | |
3748 | wire spare2_aoi22_4x_unused; | |
3749 | wire spare2_buf_8x_unused; | |
3750 | wire spare2_oai22_4x_unused; | |
3751 | wire spare2_inv_16x_unused; | |
3752 | wire spare2_nand2_16x_unused; | |
3753 | wire spare2_nor3_4x_unused; | |
3754 | wire spare2_nand2_8x_unused; | |
3755 | wire spare2_buf_16x_unused; | |
3756 | wire spare2_nor2_16x_unused; | |
3757 | wire spare2_inv_32x_unused; | |
3758 | wire si_3; | |
3759 | wire so_3; | |
3760 | wire spare3_flop_unused; | |
3761 | wire spare3_buf_32x_unused; | |
3762 | wire spare3_nand3_8x_unused; | |
3763 | wire spare3_inv_8x_unused; | |
3764 | wire spare3_aoi22_4x_unused; | |
3765 | wire spare3_buf_8x_unused; | |
3766 | wire spare3_oai22_4x_unused; | |
3767 | wire spare3_inv_16x_unused; | |
3768 | wire spare3_nand2_16x_unused; | |
3769 | wire spare3_nor3_4x_unused; | |
3770 | wire spare3_nand2_8x_unused; | |
3771 | wire spare3_buf_16x_unused; | |
3772 | wire spare3_nor2_16x_unused; | |
3773 | wire spare3_inv_32x_unused; | |
3774 | wire si_4; | |
3775 | wire so_4; | |
3776 | wire spare4_flop_unused; | |
3777 | wire spare4_buf_32x_unused; | |
3778 | wire spare4_nand3_8x_unused; | |
3779 | wire spare4_inv_8x_unused; | |
3780 | wire spare4_aoi22_4x_unused; | |
3781 | wire spare4_buf_8x_unused; | |
3782 | wire spare4_oai22_4x_unused; | |
3783 | wire spare4_inv_16x_unused; | |
3784 | wire spare4_nand2_16x_unused; | |
3785 | wire spare4_nor3_4x_unused; | |
3786 | wire spare4_nand2_8x_unused; | |
3787 | wire spare4_buf_16x_unused; | |
3788 | wire spare4_nor2_16x_unused; | |
3789 | wire spare4_inv_32x_unused; | |
3790 | ||
3791 | ||
3792 | input l1clk; | |
3793 | input scan_in; | |
3794 | input siclk; | |
3795 | input soclk; | |
3796 | output scan_out; | |
3797 | ||
3798 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
3799 | .siclk(siclk), | |
3800 | .soclk(soclk), | |
3801 | .si(si_0), | |
3802 | .so(so_0), | |
3803 | .d(1'b0), | |
3804 | .q(spare0_flop_unused)); | |
3805 | assign si_0 = scan_in; | |
3806 | ||
3807 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
3808 | .out(spare0_buf_32x_unused)); | |
3809 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
3810 | .in1(1'b1), | |
3811 | .in2(1'b1), | |
3812 | .out(spare0_nand3_8x_unused)); | |
3813 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
3814 | .out(spare0_inv_8x_unused)); | |
3815 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
3816 | .in01(1'b1), | |
3817 | .in10(1'b1), | |
3818 | .in11(1'b1), | |
3819 | .out(spare0_aoi22_4x_unused)); | |
3820 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
3821 | .out(spare0_buf_8x_unused)); | |
3822 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
3823 | .in01(1'b1), | |
3824 | .in10(1'b1), | |
3825 | .in11(1'b1), | |
3826 | .out(spare0_oai22_4x_unused)); | |
3827 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
3828 | .out(spare0_inv_16x_unused)); | |
3829 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
3830 | .in1(1'b1), | |
3831 | .out(spare0_nand2_16x_unused)); | |
3832 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
3833 | .in1(1'b0), | |
3834 | .in2(1'b0), | |
3835 | .out(spare0_nor3_4x_unused)); | |
3836 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
3837 | .in1(1'b1), | |
3838 | .out(spare0_nand2_8x_unused)); | |
3839 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
3840 | .out(spare0_buf_16x_unused)); | |
3841 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
3842 | .in1(1'b0), | |
3843 | .out(spare0_nor2_16x_unused)); | |
3844 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
3845 | .out(spare0_inv_32x_unused)); | |
3846 | ||
3847 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
3848 | .siclk(siclk), | |
3849 | .soclk(soclk), | |
3850 | .si(si_1), | |
3851 | .so(so_1), | |
3852 | .d(1'b0), | |
3853 | .q(spare1_flop_unused)); | |
3854 | assign si_1 = so_0; | |
3855 | ||
3856 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
3857 | .out(spare1_buf_32x_unused)); | |
3858 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
3859 | .in1(1'b1), | |
3860 | .in2(1'b1), | |
3861 | .out(spare1_nand3_8x_unused)); | |
3862 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
3863 | .out(spare1_inv_8x_unused)); | |
3864 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
3865 | .in01(1'b1), | |
3866 | .in10(1'b1), | |
3867 | .in11(1'b1), | |
3868 | .out(spare1_aoi22_4x_unused)); | |
3869 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
3870 | .out(spare1_buf_8x_unused)); | |
3871 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
3872 | .in01(1'b1), | |
3873 | .in10(1'b1), | |
3874 | .in11(1'b1), | |
3875 | .out(spare1_oai22_4x_unused)); | |
3876 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
3877 | .out(spare1_inv_16x_unused)); | |
3878 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
3879 | .in1(1'b1), | |
3880 | .out(spare1_nand2_16x_unused)); | |
3881 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
3882 | .in1(1'b0), | |
3883 | .in2(1'b0), | |
3884 | .out(spare1_nor3_4x_unused)); | |
3885 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
3886 | .in1(1'b1), | |
3887 | .out(spare1_nand2_8x_unused)); | |
3888 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
3889 | .out(spare1_buf_16x_unused)); | |
3890 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
3891 | .in1(1'b0), | |
3892 | .out(spare1_nor2_16x_unused)); | |
3893 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
3894 | .out(spare1_inv_32x_unused)); | |
3895 | ||
3896 | cl_sc1_msff_8x spare2_flop (.l1clk(l1clk), | |
3897 | .siclk(siclk), | |
3898 | .soclk(soclk), | |
3899 | .si(si_2), | |
3900 | .so(so_2), | |
3901 | .d(1'b0), | |
3902 | .q(spare2_flop_unused)); | |
3903 | assign si_2 = so_1; | |
3904 | ||
3905 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
3906 | .out(spare2_buf_32x_unused)); | |
3907 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
3908 | .in1(1'b1), | |
3909 | .in2(1'b1), | |
3910 | .out(spare2_nand3_8x_unused)); | |
3911 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
3912 | .out(spare2_inv_8x_unused)); | |
3913 | cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1), | |
3914 | .in01(1'b1), | |
3915 | .in10(1'b1), | |
3916 | .in11(1'b1), | |
3917 | .out(spare2_aoi22_4x_unused)); | |
3918 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
3919 | .out(spare2_buf_8x_unused)); | |
3920 | cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1), | |
3921 | .in01(1'b1), | |
3922 | .in10(1'b1), | |
3923 | .in11(1'b1), | |
3924 | .out(spare2_oai22_4x_unused)); | |
3925 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
3926 | .out(spare2_inv_16x_unused)); | |
3927 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
3928 | .in1(1'b1), | |
3929 | .out(spare2_nand2_16x_unused)); | |
3930 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
3931 | .in1(1'b0), | |
3932 | .in2(1'b0), | |
3933 | .out(spare2_nor3_4x_unused)); | |
3934 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
3935 | .in1(1'b1), | |
3936 | .out(spare2_nand2_8x_unused)); | |
3937 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
3938 | .out(spare2_buf_16x_unused)); | |
3939 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
3940 | .in1(1'b0), | |
3941 | .out(spare2_nor2_16x_unused)); | |
3942 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
3943 | .out(spare2_inv_32x_unused)); | |
3944 | ||
3945 | cl_sc1_msff_8x spare3_flop (.l1clk(l1clk), | |
3946 | .siclk(siclk), | |
3947 | .soclk(soclk), | |
3948 | .si(si_3), | |
3949 | .so(so_3), | |
3950 | .d(1'b0), | |
3951 | .q(spare3_flop_unused)); | |
3952 | assign si_3 = so_2; | |
3953 | ||
3954 | cl_u1_buf_32x spare3_buf_32x (.in(1'b1), | |
3955 | .out(spare3_buf_32x_unused)); | |
3956 | cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1), | |
3957 | .in1(1'b1), | |
3958 | .in2(1'b1), | |
3959 | .out(spare3_nand3_8x_unused)); | |
3960 | cl_u1_inv_8x spare3_inv_8x (.in(1'b1), | |
3961 | .out(spare3_inv_8x_unused)); | |
3962 | cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1), | |
3963 | .in01(1'b1), | |
3964 | .in10(1'b1), | |
3965 | .in11(1'b1), | |
3966 | .out(spare3_aoi22_4x_unused)); | |
3967 | cl_u1_buf_8x spare3_buf_8x (.in(1'b1), | |
3968 | .out(spare3_buf_8x_unused)); | |
3969 | cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1), | |
3970 | .in01(1'b1), | |
3971 | .in10(1'b1), | |
3972 | .in11(1'b1), | |
3973 | .out(spare3_oai22_4x_unused)); | |
3974 | cl_u1_inv_16x spare3_inv_16x (.in(1'b1), | |
3975 | .out(spare3_inv_16x_unused)); | |
3976 | cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1), | |
3977 | .in1(1'b1), | |
3978 | .out(spare3_nand2_16x_unused)); | |
3979 | cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0), | |
3980 | .in1(1'b0), | |
3981 | .in2(1'b0), | |
3982 | .out(spare3_nor3_4x_unused)); | |
3983 | cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1), | |
3984 | .in1(1'b1), | |
3985 | .out(spare3_nand2_8x_unused)); | |
3986 | cl_u1_buf_16x spare3_buf_16x (.in(1'b1), | |
3987 | .out(spare3_buf_16x_unused)); | |
3988 | cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0), | |
3989 | .in1(1'b0), | |
3990 | .out(spare3_nor2_16x_unused)); | |
3991 | cl_u1_inv_32x spare3_inv_32x (.in(1'b1), | |
3992 | .out(spare3_inv_32x_unused)); | |
3993 | ||
3994 | cl_sc1_msff_8x spare4_flop (.l1clk(l1clk), | |
3995 | .siclk(siclk), | |
3996 | .soclk(soclk), | |
3997 | .si(si_4), | |
3998 | .so(so_4), | |
3999 | .d(1'b0), | |
4000 | .q(spare4_flop_unused)); | |
4001 | assign si_4 = so_3; | |
4002 | ||
4003 | cl_u1_buf_32x spare4_buf_32x (.in(1'b1), | |
4004 | .out(spare4_buf_32x_unused)); | |
4005 | cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1), | |
4006 | .in1(1'b1), | |
4007 | .in2(1'b1), | |
4008 | .out(spare4_nand3_8x_unused)); | |
4009 | cl_u1_inv_8x spare4_inv_8x (.in(1'b1), | |
4010 | .out(spare4_inv_8x_unused)); | |
4011 | cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1), | |
4012 | .in01(1'b1), | |
4013 | .in10(1'b1), | |
4014 | .in11(1'b1), | |
4015 | .out(spare4_aoi22_4x_unused)); | |
4016 | cl_u1_buf_8x spare4_buf_8x (.in(1'b1), | |
4017 | .out(spare4_buf_8x_unused)); | |
4018 | cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1), | |
4019 | .in01(1'b1), | |
4020 | .in10(1'b1), | |
4021 | .in11(1'b1), | |
4022 | .out(spare4_oai22_4x_unused)); | |
4023 | cl_u1_inv_16x spare4_inv_16x (.in(1'b1), | |
4024 | .out(spare4_inv_16x_unused)); | |
4025 | cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1), | |
4026 | .in1(1'b1), | |
4027 | .out(spare4_nand2_16x_unused)); | |
4028 | cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0), | |
4029 | .in1(1'b0), | |
4030 | .in2(1'b0), | |
4031 | .out(spare4_nor3_4x_unused)); | |
4032 | cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1), | |
4033 | .in1(1'b1), | |
4034 | .out(spare4_nand2_8x_unused)); | |
4035 | cl_u1_buf_16x spare4_buf_16x (.in(1'b1), | |
4036 | .out(spare4_buf_16x_unused)); | |
4037 | cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0), | |
4038 | .in1(1'b0), | |
4039 | .out(spare4_nor2_16x_unused)); | |
4040 | cl_u1_inv_32x spare4_inv_32x (.in(1'b1), | |
4041 | .out(spare4_inv_32x_unused)); | |
4042 | assign scan_out = so_4; | |
4043 | ||
4044 | ||
4045 | ||
4046 | endmodule | |
4047 | ||
4048 | ||
4049 | ||
4050 | ||
4051 | ||
4052 | ||
4053 | // any PARAMS parms go into naming of macro | |
4054 | ||
4055 | module fgu_fac_ctl_msff_ctl_macro__width_10 ( | |
4056 | din, | |
4057 | l1clk, | |
4058 | scan_in, | |
4059 | siclk, | |
4060 | soclk, | |
4061 | dout, | |
4062 | scan_out); | |
4063 | wire [9:0] fdin; | |
4064 | wire [8:0] so; | |
4065 | ||
4066 | input [9:0] din; | |
4067 | input l1clk; | |
4068 | input scan_in; | |
4069 | ||
4070 | ||
4071 | input siclk; | |
4072 | input soclk; | |
4073 | ||
4074 | output [9:0] dout; | |
4075 | output scan_out; | |
4076 | assign fdin[9:0] = din[9:0]; | |
4077 | ||
4078 | ||
4079 | ||
4080 | ||
4081 | ||
4082 | ||
4083 | dff #(10) d0_0 ( | |
4084 | .l1clk(l1clk), | |
4085 | .siclk(siclk), | |
4086 | .soclk(soclk), | |
4087 | .d(fdin[9:0]), | |
4088 | .si({scan_in,so[8:0]}), | |
4089 | .so({so[8:0],scan_out}), | |
4090 | .q(dout[9:0]) | |
4091 | ); | |
4092 | ||
4093 | ||
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | ||
4099 | ||
4100 | ||
4101 | ||
4102 | ||
4103 | ||
4104 | endmodule | |
4105 | ||
4106 | ||
4107 | ||
4108 | ||
4109 | ||
4110 | ||
4111 | ||
4112 | ||
4113 | ||
4114 | ||
4115 | ||
4116 | ||
4117 | ||
4118 | // any PARAMS parms go into naming of macro | |
4119 | ||
4120 | module fgu_fac_ctl_msff_ctl_macro__width_37 ( | |
4121 | din, | |
4122 | l1clk, | |
4123 | scan_in, | |
4124 | siclk, | |
4125 | soclk, | |
4126 | dout, | |
4127 | scan_out); | |
4128 | wire [36:0] fdin; | |
4129 | wire [35:0] so; | |
4130 | ||
4131 | input [36:0] din; | |
4132 | input l1clk; | |
4133 | input scan_in; | |
4134 | ||
4135 | ||
4136 | input siclk; | |
4137 | input soclk; | |
4138 | ||
4139 | output [36:0] dout; | |
4140 | output scan_out; | |
4141 | assign fdin[36:0] = din[36:0]; | |
4142 | ||
4143 | ||
4144 | ||
4145 | ||
4146 | ||
4147 | ||
4148 | dff #(37) d0_0 ( | |
4149 | .l1clk(l1clk), | |
4150 | .siclk(siclk), | |
4151 | .soclk(soclk), | |
4152 | .d(fdin[36:0]), | |
4153 | .si({scan_in,so[35:0]}), | |
4154 | .so({so[35:0],scan_out}), | |
4155 | .q(dout[36:0]) | |
4156 | ); | |
4157 | ||
4158 | ||
4159 | ||
4160 | ||
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | endmodule | |
4170 | ||
4171 | ||
4172 | ||
4173 | ||
4174 | ||
4175 | ||
4176 | ||
4177 | ||
4178 | ||
4179 | ||
4180 | ||
4181 | ||
4182 | ||
4183 | // any PARAMS parms go into naming of macro | |
4184 | ||
4185 | module fgu_fac_ctl_msff_ctl_macro__width_17 ( | |
4186 | din, | |
4187 | l1clk, | |
4188 | scan_in, | |
4189 | siclk, | |
4190 | soclk, | |
4191 | dout, | |
4192 | scan_out); | |
4193 | wire [16:0] fdin; | |
4194 | wire [15:0] so; | |
4195 | ||
4196 | input [16:0] din; | |
4197 | input l1clk; | |
4198 | input scan_in; | |
4199 | ||
4200 | ||
4201 | input siclk; | |
4202 | input soclk; | |
4203 | ||
4204 | output [16:0] dout; | |
4205 | output scan_out; | |
4206 | assign fdin[16:0] = din[16:0]; | |
4207 | ||
4208 | ||
4209 | ||
4210 | ||
4211 | ||
4212 | ||
4213 | dff #(17) d0_0 ( | |
4214 | .l1clk(l1clk), | |
4215 | .siclk(siclk), | |
4216 | .soclk(soclk), | |
4217 | .d(fdin[16:0]), | |
4218 | .si({scan_in,so[15:0]}), | |
4219 | .so({so[15:0],scan_out}), | |
4220 | .q(dout[16:0]) | |
4221 | ); | |
4222 | ||
4223 | ||
4224 | ||
4225 | ||
4226 | ||
4227 | ||
4228 | ||
4229 | ||
4230 | ||
4231 | ||
4232 | ||
4233 | ||
4234 | endmodule | |
4235 | ||
4236 | ||
4237 | ||
4238 | ||
4239 | ||
4240 | ||
4241 | ||
4242 | ||
4243 | ||
4244 | ||
4245 | ||
4246 | ||
4247 | ||
4248 | // any PARAMS parms go into naming of macro | |
4249 | ||
4250 | module fgu_fac_ctl_msff_ctl_macro__width_9 ( | |
4251 | din, | |
4252 | l1clk, | |
4253 | scan_in, | |
4254 | siclk, | |
4255 | soclk, | |
4256 | dout, | |
4257 | scan_out); | |
4258 | wire [8:0] fdin; | |
4259 | wire [7:0] so; | |
4260 | ||
4261 | input [8:0] din; | |
4262 | input l1clk; | |
4263 | input scan_in; | |
4264 | ||
4265 | ||
4266 | input siclk; | |
4267 | input soclk; | |
4268 | ||
4269 | output [8:0] dout; | |
4270 | output scan_out; | |
4271 | assign fdin[8:0] = din[8:0]; | |
4272 | ||
4273 | ||
4274 | ||
4275 | ||
4276 | ||
4277 | ||
4278 | dff #(9) d0_0 ( | |
4279 | .l1clk(l1clk), | |
4280 | .siclk(siclk), | |
4281 | .soclk(soclk), | |
4282 | .d(fdin[8:0]), | |
4283 | .si({scan_in,so[7:0]}), | |
4284 | .so({so[7:0],scan_out}), | |
4285 | .q(dout[8:0]) | |
4286 | ); | |
4287 | ||
4288 | ||
4289 | ||
4290 | ||
4291 | ||
4292 | ||
4293 | ||
4294 | ||
4295 | ||
4296 | ||
4297 | ||
4298 | ||
4299 | endmodule | |
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | ||
4306 | ||
4307 | ||
4308 | ||
4309 | ||
4310 | ||
4311 | ||
4312 | ||
4313 | // any PARAMS parms go into naming of macro | |
4314 | ||
4315 | module fgu_fac_ctl_msff_ctl_macro__width_128 ( | |
4316 | din, | |
4317 | l1clk, | |
4318 | scan_in, | |
4319 | siclk, | |
4320 | soclk, | |
4321 | dout, | |
4322 | scan_out); | |
4323 | wire [127:0] fdin; | |
4324 | wire [126:0] so; | |
4325 | ||
4326 | input [127:0] din; | |
4327 | input l1clk; | |
4328 | input scan_in; | |
4329 | ||
4330 | ||
4331 | input siclk; | |
4332 | input soclk; | |
4333 | ||
4334 | output [127:0] dout; | |
4335 | output scan_out; | |
4336 | assign fdin[127:0] = din[127:0]; | |
4337 | ||
4338 | ||
4339 | ||
4340 | ||
4341 | ||
4342 | ||
4343 | dff #(128) d0_0 ( | |
4344 | .l1clk(l1clk), | |
4345 | .siclk(siclk), | |
4346 | .soclk(soclk), | |
4347 | .d(fdin[127:0]), | |
4348 | .si({scan_in,so[126:0]}), | |
4349 | .so({so[126:0],scan_out}), | |
4350 | .q(dout[127:0]) | |
4351 | ); | |
4352 | ||
4353 | ||
4354 | ||
4355 | ||
4356 | ||
4357 | ||
4358 | ||
4359 | ||
4360 | ||
4361 | ||
4362 | ||
4363 | ||
4364 | endmodule | |
4365 | ||
4366 | ||
4367 | ||
4368 | ||
4369 | ||
4370 | ||
4371 | ||
4372 | ||
4373 | ||
4374 | ||
4375 | ||
4376 | ||
4377 | ||
4378 | // any PARAMS parms go into naming of macro | |
4379 | ||
4380 | module fgu_fac_ctl_msff_ctl_macro__width_21 ( | |
4381 | din, | |
4382 | l1clk, | |
4383 | scan_in, | |
4384 | siclk, | |
4385 | soclk, | |
4386 | dout, | |
4387 | scan_out); | |
4388 | wire [20:0] fdin; | |
4389 | wire [19:0] so; | |
4390 | ||
4391 | input [20:0] din; | |
4392 | input l1clk; | |
4393 | input scan_in; | |
4394 | ||
4395 | ||
4396 | input siclk; | |
4397 | input soclk; | |
4398 | ||
4399 | output [20:0] dout; | |
4400 | output scan_out; | |
4401 | assign fdin[20:0] = din[20:0]; | |
4402 | ||
4403 | ||
4404 | ||
4405 | ||
4406 | ||
4407 | ||
4408 | dff #(21) d0_0 ( | |
4409 | .l1clk(l1clk), | |
4410 | .siclk(siclk), | |
4411 | .soclk(soclk), | |
4412 | .d(fdin[20:0]), | |
4413 | .si({scan_in,so[19:0]}), | |
4414 | .so({so[19:0],scan_out}), | |
4415 | .q(dout[20:0]) | |
4416 | ); | |
4417 | ||
4418 | ||
4419 | ||
4420 | ||
4421 | ||
4422 | ||
4423 | ||
4424 | ||
4425 | ||
4426 | ||
4427 | ||
4428 | ||
4429 | endmodule | |
4430 | ||
4431 | ||
4432 | ||
4433 | ||
4434 | ||
4435 | ||
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | ||
4441 | ||
4442 | ||
4443 | // any PARAMS parms go into naming of macro | |
4444 | ||
4445 | module fgu_fac_ctl_msff_ctl_macro__width_4 ( | |
4446 | din, | |
4447 | l1clk, | |
4448 | scan_in, | |
4449 | siclk, | |
4450 | soclk, | |
4451 | dout, | |
4452 | scan_out); | |
4453 | wire [3:0] fdin; | |
4454 | wire [2:0] so; | |
4455 | ||
4456 | input [3:0] din; | |
4457 | input l1clk; | |
4458 | input scan_in; | |
4459 | ||
4460 | ||
4461 | input siclk; | |
4462 | input soclk; | |
4463 | ||
4464 | output [3:0] dout; | |
4465 | output scan_out; | |
4466 | assign fdin[3:0] = din[3:0]; | |
4467 | ||
4468 | ||
4469 | ||
4470 | ||
4471 | ||
4472 | ||
4473 | dff #(4) d0_0 ( | |
4474 | .l1clk(l1clk), | |
4475 | .siclk(siclk), | |
4476 | .soclk(soclk), | |
4477 | .d(fdin[3:0]), | |
4478 | .si({scan_in,so[2:0]}), | |
4479 | .so({so[2:0],scan_out}), | |
4480 | .q(dout[3:0]) | |
4481 | ); | |
4482 | ||
4483 | ||
4484 | ||
4485 | ||
4486 | ||
4487 | ||
4488 | ||
4489 | ||
4490 | ||
4491 | ||
4492 | ||
4493 | ||
4494 | endmodule | |
4495 | ||
4496 | ||
4497 | ||
4498 | ||
4499 | ||
4500 | ||
4501 | ||
4502 | ||
4503 | ||
4504 | ||
4505 | ||
4506 | ||
4507 | ||
4508 | // any PARAMS parms go into naming of macro | |
4509 | ||
4510 | module fgu_fac_ctl_msff_ctl_macro__width_16 ( | |
4511 | din, | |
4512 | l1clk, | |
4513 | scan_in, | |
4514 | siclk, | |
4515 | soclk, | |
4516 | dout, | |
4517 | scan_out); | |
4518 | wire [15:0] fdin; | |
4519 | wire [14:0] so; | |
4520 | ||
4521 | input [15:0] din; | |
4522 | input l1clk; | |
4523 | input scan_in; | |
4524 | ||
4525 | ||
4526 | input siclk; | |
4527 | input soclk; | |
4528 | ||
4529 | output [15:0] dout; | |
4530 | output scan_out; | |
4531 | assign fdin[15:0] = din[15:0]; | |
4532 | ||
4533 | ||
4534 | ||
4535 | ||
4536 | ||
4537 | ||
4538 | dff #(16) d0_0 ( | |
4539 | .l1clk(l1clk), | |
4540 | .siclk(siclk), | |
4541 | .soclk(soclk), | |
4542 | .d(fdin[15:0]), | |
4543 | .si({scan_in,so[14:0]}), | |
4544 | .so({so[14:0],scan_out}), | |
4545 | .q(dout[15:0]) | |
4546 | ); | |
4547 | ||
4548 | ||
4549 | ||
4550 | ||
4551 | ||
4552 | ||
4553 | ||
4554 | ||
4555 | ||
4556 | ||
4557 | ||
4558 | ||
4559 | endmodule | |
4560 | ||
4561 | ||
4562 | ||
4563 | ||
4564 | ||
4565 | ||
4566 | ||
4567 | ||
4568 | ||
4569 | ||
4570 | ||
4571 | ||
4572 | ||
4573 | // any PARAMS parms go into naming of macro | |
4574 | ||
4575 | module fgu_fac_ctl_msff_ctl_macro__width_60 ( | |
4576 | din, | |
4577 | l1clk, | |
4578 | scan_in, | |
4579 | siclk, | |
4580 | soclk, | |
4581 | dout, | |
4582 | scan_out); | |
4583 | wire [59:0] fdin; | |
4584 | wire [58:0] so; | |
4585 | ||
4586 | input [59:0] din; | |
4587 | input l1clk; | |
4588 | input scan_in; | |
4589 | ||
4590 | ||
4591 | input siclk; | |
4592 | input soclk; | |
4593 | ||
4594 | output [59:0] dout; | |
4595 | output scan_out; | |
4596 | assign fdin[59:0] = din[59:0]; | |
4597 | ||
4598 | ||
4599 | ||
4600 | ||
4601 | ||
4602 | ||
4603 | dff #(60) d0_0 ( | |
4604 | .l1clk(l1clk), | |
4605 | .siclk(siclk), | |
4606 | .soclk(soclk), | |
4607 | .d(fdin[59:0]), | |
4608 | .si({scan_in,so[58:0]}), | |
4609 | .so({so[58:0],scan_out}), | |
4610 | .q(dout[59:0]) | |
4611 | ); | |
4612 | ||
4613 | ||
4614 | ||
4615 | ||
4616 | ||
4617 | ||
4618 | ||
4619 | ||
4620 | ||
4621 | ||
4622 | ||
4623 | ||
4624 | endmodule | |
4625 | ||
4626 | ||
4627 | ||
4628 | ||
4629 | ||
4630 | ||
4631 | ||
4632 | ||
4633 | ||
4634 | ||
4635 | ||
4636 | ||
4637 | ||
4638 | // any PARAMS parms go into naming of macro | |
4639 | ||
4640 | module fgu_fac_ctl_msff_ctl_macro__width_3 ( | |
4641 | din, | |
4642 | l1clk, | |
4643 | scan_in, | |
4644 | siclk, | |
4645 | soclk, | |
4646 | dout, | |
4647 | scan_out); | |
4648 | wire [2:0] fdin; | |
4649 | wire [1:0] so; | |
4650 | ||
4651 | input [2:0] din; | |
4652 | input l1clk; | |
4653 | input scan_in; | |
4654 | ||
4655 | ||
4656 | input siclk; | |
4657 | input soclk; | |
4658 | ||
4659 | output [2:0] dout; | |
4660 | output scan_out; | |
4661 | assign fdin[2:0] = din[2:0]; | |
4662 | ||
4663 | ||
4664 | ||
4665 | ||
4666 | ||
4667 | ||
4668 | dff #(3) d0_0 ( | |
4669 | .l1clk(l1clk), | |
4670 | .siclk(siclk), | |
4671 | .soclk(soclk), | |
4672 | .d(fdin[2:0]), | |
4673 | .si({scan_in,so[1:0]}), | |
4674 | .so({so[1:0],scan_out}), | |
4675 | .q(dout[2:0]) | |
4676 | ); | |
4677 | ||
4678 | ||
4679 | ||
4680 | ||
4681 | ||
4682 | ||
4683 | ||
4684 | ||
4685 | ||
4686 | ||
4687 | ||
4688 | ||
4689 | endmodule | |
4690 | ||
4691 | ||
4692 | ||
4693 | ||
4694 | ||
4695 | ||
4696 | ||
4697 | ||
4698 | ||
4699 | ||
4700 | ||
4701 | ||
4702 | ||
4703 | // any PARAMS parms go into naming of macro | |
4704 | ||
4705 | module fgu_fac_ctl_msff_ctl_macro__width_52 ( | |
4706 | din, | |
4707 | l1clk, | |
4708 | scan_in, | |
4709 | siclk, | |
4710 | soclk, | |
4711 | dout, | |
4712 | scan_out); | |
4713 | wire [51:0] fdin; | |
4714 | wire [50:0] so; | |
4715 | ||
4716 | input [51:0] din; | |
4717 | input l1clk; | |
4718 | input scan_in; | |
4719 | ||
4720 | ||
4721 | input siclk; | |
4722 | input soclk; | |
4723 | ||
4724 | output [51:0] dout; | |
4725 | output scan_out; | |
4726 | assign fdin[51:0] = din[51:0]; | |
4727 | ||
4728 | ||
4729 | ||
4730 | ||
4731 | ||
4732 | ||
4733 | dff #(52) d0_0 ( | |
4734 | .l1clk(l1clk), | |
4735 | .siclk(siclk), | |
4736 | .soclk(soclk), | |
4737 | .d(fdin[51:0]), | |
4738 | .si({scan_in,so[50:0]}), | |
4739 | .so({so[50:0],scan_out}), | |
4740 | .q(dout[51:0]) | |
4741 | ); | |
4742 | ||
4743 | ||
4744 | ||
4745 | ||
4746 | ||
4747 | ||
4748 | ||
4749 | ||
4750 | ||
4751 | ||
4752 | ||
4753 | ||
4754 | endmodule | |
4755 | ||
4756 | ||
4757 | ||
4758 | ||
4759 | ||
4760 | ||
4761 | ||
4762 | ||
4763 | ||
4764 | ||
4765 | ||
4766 | ||
4767 | ||
4768 | // any PARAMS parms go into naming of macro | |
4769 | ||
4770 | module fgu_fac_ctl_msff_ctl_macro__width_31 ( | |
4771 | din, | |
4772 | l1clk, | |
4773 | scan_in, | |
4774 | siclk, | |
4775 | soclk, | |
4776 | dout, | |
4777 | scan_out); | |
4778 | wire [30:0] fdin; | |
4779 | wire [29:0] so; | |
4780 | ||
4781 | input [30:0] din; | |
4782 | input l1clk; | |
4783 | input scan_in; | |
4784 | ||
4785 | ||
4786 | input siclk; | |
4787 | input soclk; | |
4788 | ||
4789 | output [30:0] dout; | |
4790 | output scan_out; | |
4791 | assign fdin[30:0] = din[30:0]; | |
4792 | ||
4793 | ||
4794 | ||
4795 | ||
4796 | ||
4797 | ||
4798 | dff #(31) d0_0 ( | |
4799 | .l1clk(l1clk), | |
4800 | .siclk(siclk), | |
4801 | .soclk(soclk), | |
4802 | .d(fdin[30:0]), | |
4803 | .si({scan_in,so[29:0]}), | |
4804 | .so({so[29:0],scan_out}), | |
4805 | .q(dout[30:0]) | |
4806 | ); | |
4807 | ||
4808 | ||
4809 | ||
4810 | ||
4811 | ||
4812 | ||
4813 | ||
4814 | ||
4815 | ||
4816 | ||
4817 | ||
4818 | ||
4819 | endmodule | |
4820 | ||
4821 | ||
4822 | ||
4823 | ||
4824 | ||
4825 | ||
4826 | ||
4827 | ||
4828 | ||
4829 | ||
4830 | ||
4831 | ||
4832 | ||
4833 | // any PARAMS parms go into naming of macro | |
4834 | ||
4835 | module fgu_fac_ctl_msff_ctl_macro__width_26 ( | |
4836 | din, | |
4837 | l1clk, | |
4838 | scan_in, | |
4839 | siclk, | |
4840 | soclk, | |
4841 | dout, | |
4842 | scan_out); | |
4843 | wire [25:0] fdin; | |
4844 | wire [24:0] so; | |
4845 | ||
4846 | input [25:0] din; | |
4847 | input l1clk; | |
4848 | input scan_in; | |
4849 | ||
4850 | ||
4851 | input siclk; | |
4852 | input soclk; | |
4853 | ||
4854 | output [25:0] dout; | |
4855 | output scan_out; | |
4856 | assign fdin[25:0] = din[25:0]; | |
4857 | ||
4858 | ||
4859 | ||
4860 | ||
4861 | ||
4862 | ||
4863 | dff #(26) d0_0 ( | |
4864 | .l1clk(l1clk), | |
4865 | .siclk(siclk), | |
4866 | .soclk(soclk), | |
4867 | .d(fdin[25:0]), | |
4868 | .si({scan_in,so[24:0]}), | |
4869 | .so({so[24:0],scan_out}), | |
4870 | .q(dout[25:0]) | |
4871 | ); | |
4872 | ||
4873 | ||
4874 | ||
4875 | ||
4876 | ||
4877 | ||
4878 | ||
4879 | ||
4880 | ||
4881 | ||
4882 | ||
4883 | ||
4884 | endmodule | |
4885 | ||
4886 | ||
4887 | ||
4888 | ||
4889 | ||
4890 | ||
4891 | ||
4892 | ||
4893 | ||
4894 | ||
4895 | ||
4896 | ||
4897 | ||
4898 | // any PARAMS parms go into naming of macro | |
4899 | ||
4900 | module fgu_fac_ctl_msff_ctl_macro__width_25 ( | |
4901 | din, | |
4902 | l1clk, | |
4903 | scan_in, | |
4904 | siclk, | |
4905 | soclk, | |
4906 | dout, | |
4907 | scan_out); | |
4908 | wire [24:0] fdin; | |
4909 | wire [23:0] so; | |
4910 | ||
4911 | input [24:0] din; | |
4912 | input l1clk; | |
4913 | input scan_in; | |
4914 | ||
4915 | ||
4916 | input siclk; | |
4917 | input soclk; | |
4918 | ||
4919 | output [24:0] dout; | |
4920 | output scan_out; | |
4921 | assign fdin[24:0] = din[24:0]; | |
4922 | ||
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | ||
4928 | dff #(25) d0_0 ( | |
4929 | .l1clk(l1clk), | |
4930 | .siclk(siclk), | |
4931 | .soclk(soclk), | |
4932 | .d(fdin[24:0]), | |
4933 | .si({scan_in,so[23:0]}), | |
4934 | .so({so[23:0],scan_out}), | |
4935 | .q(dout[24:0]) | |
4936 | ); | |
4937 | ||
4938 | ||
4939 | ||
4940 | ||
4941 | ||
4942 | ||
4943 | ||
4944 | ||
4945 | ||
4946 | ||
4947 | ||
4948 | ||
4949 | endmodule | |
4950 | ||
4951 | ||
4952 | ||
4953 | ||
4954 | ||
4955 | ||
4956 | ||
4957 | ||
4958 | ||
4959 | ||
4960 | ||
4961 | ||
4962 | ||
4963 | // any PARAMS parms go into naming of macro | |
4964 | ||
4965 | module fgu_fac_ctl_msff_ctl_macro__width_53 ( | |
4966 | din, | |
4967 | l1clk, | |
4968 | scan_in, | |
4969 | siclk, | |
4970 | soclk, | |
4971 | dout, | |
4972 | scan_out); | |
4973 | wire [52:0] fdin; | |
4974 | wire [51:0] so; | |
4975 | ||
4976 | input [52:0] din; | |
4977 | input l1clk; | |
4978 | input scan_in; | |
4979 | ||
4980 | ||
4981 | input siclk; | |
4982 | input soclk; | |
4983 | ||
4984 | output [52:0] dout; | |
4985 | output scan_out; | |
4986 | assign fdin[52:0] = din[52:0]; | |
4987 | ||
4988 | ||
4989 | ||
4990 | ||
4991 | ||
4992 | ||
4993 | dff #(53) d0_0 ( | |
4994 | .l1clk(l1clk), | |
4995 | .siclk(siclk), | |
4996 | .soclk(soclk), | |
4997 | .d(fdin[52:0]), | |
4998 | .si({scan_in,so[51:0]}), | |
4999 | .so({so[51:0],scan_out}), | |
5000 | .q(dout[52:0]) | |
5001 | ); | |
5002 | ||
5003 | ||
5004 | ||
5005 | ||
5006 | ||
5007 | ||
5008 | ||
5009 | ||
5010 | ||
5011 | ||
5012 | ||
5013 | ||
5014 | endmodule | |
5015 | ||
5016 | ||
5017 | ||
5018 | ||
5019 | ||
5020 | ||
5021 | ||
5022 | ||
5023 | ||
5024 | ||
5025 | ||
5026 | ||
5027 | ||
5028 | // any PARAMS parms go into naming of macro | |
5029 | ||
5030 | module fgu_fac_ctl_msff_ctl_macro__width_12 ( | |
5031 | din, | |
5032 | l1clk, | |
5033 | scan_in, | |
5034 | siclk, | |
5035 | soclk, | |
5036 | dout, | |
5037 | scan_out); | |
5038 | wire [11:0] fdin; | |
5039 | wire [10:0] so; | |
5040 | ||
5041 | input [11:0] din; | |
5042 | input l1clk; | |
5043 | input scan_in; | |
5044 | ||
5045 | ||
5046 | input siclk; | |
5047 | input soclk; | |
5048 | ||
5049 | output [11:0] dout; | |
5050 | output scan_out; | |
5051 | assign fdin[11:0] = din[11:0]; | |
5052 | ||
5053 | ||
5054 | ||
5055 | ||
5056 | ||
5057 | ||
5058 | dff #(12) d0_0 ( | |
5059 | .l1clk(l1clk), | |
5060 | .siclk(siclk), | |
5061 | .soclk(soclk), | |
5062 | .d(fdin[11:0]), | |
5063 | .si({scan_in,so[10:0]}), | |
5064 | .so({so[10:0],scan_out}), | |
5065 | .q(dout[11:0]) | |
5066 | ); | |
5067 | ||
5068 | ||
5069 | ||
5070 | ||
5071 | ||
5072 | ||
5073 | ||
5074 | ||
5075 | ||
5076 | ||
5077 | ||
5078 | ||
5079 | endmodule | |
5080 | ||
5081 | ||
5082 | ||
5083 | ||
5084 | ||
5085 | ||
5086 | ||
5087 | ||
5088 | ||
5089 | ||
5090 | ||
5091 | ||
5092 | ||
5093 | // any PARAMS parms go into naming of macro | |
5094 | ||
5095 | module fgu_fac_ctl_msff_ctl_macro__width_6 ( | |
5096 | din, | |
5097 | l1clk, | |
5098 | scan_in, | |
5099 | siclk, | |
5100 | soclk, | |
5101 | dout, | |
5102 | scan_out); | |
5103 | wire [5:0] fdin; | |
5104 | wire [4:0] so; | |
5105 | ||
5106 | input [5:0] din; | |
5107 | input l1clk; | |
5108 | input scan_in; | |
5109 | ||
5110 | ||
5111 | input siclk; | |
5112 | input soclk; | |
5113 | ||
5114 | output [5:0] dout; | |
5115 | output scan_out; | |
5116 | assign fdin[5:0] = din[5:0]; | |
5117 | ||
5118 | ||
5119 | ||
5120 | ||
5121 | ||
5122 | ||
5123 | dff #(6) d0_0 ( | |
5124 | .l1clk(l1clk), | |
5125 | .siclk(siclk), | |
5126 | .soclk(soclk), | |
5127 | .d(fdin[5:0]), | |
5128 | .si({scan_in,so[4:0]}), | |
5129 | .so({so[4:0],scan_out}), | |
5130 | .q(dout[5:0]) | |
5131 | ); | |
5132 | ||
5133 | ||
5134 | ||
5135 | ||
5136 | ||
5137 | ||
5138 | ||
5139 | ||
5140 | ||
5141 | ||
5142 | ||
5143 | ||
5144 | endmodule | |
5145 | ||
5146 | ||
5147 | ||
5148 | ||
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | ||
5154 | ||
5155 | ||
5156 | ||
5157 | ||
5158 | // any PARAMS parms go into naming of macro | |
5159 | ||
5160 | module fgu_fac_ctl_msff_ctl_macro__width_5 ( | |
5161 | din, | |
5162 | l1clk, | |
5163 | scan_in, | |
5164 | siclk, | |
5165 | soclk, | |
5166 | dout, | |
5167 | scan_out); | |
5168 | wire [4:0] fdin; | |
5169 | wire [3:0] so; | |
5170 | ||
5171 | input [4:0] din; | |
5172 | input l1clk; | |
5173 | input scan_in; | |
5174 | ||
5175 | ||
5176 | input siclk; | |
5177 | input soclk; | |
5178 | ||
5179 | output [4:0] dout; | |
5180 | output scan_out; | |
5181 | assign fdin[4:0] = din[4:0]; | |
5182 | ||
5183 | ||
5184 | ||
5185 | ||
5186 | ||
5187 | ||
5188 | dff #(5) d0_0 ( | |
5189 | .l1clk(l1clk), | |
5190 | .siclk(siclk), | |
5191 | .soclk(soclk), | |
5192 | .d(fdin[4:0]), | |
5193 | .si({scan_in,so[3:0]}), | |
5194 | .so({so[3:0],scan_out}), | |
5195 | .q(dout[4:0]) | |
5196 | ); | |
5197 | ||
5198 | ||
5199 | ||
5200 | ||
5201 | ||
5202 | ||
5203 | ||
5204 | ||
5205 | ||
5206 | ||
5207 | ||
5208 | ||
5209 | endmodule | |
5210 | ||
5211 | ||
5212 | ||
5213 | ||
5214 | ||
5215 | ||
5216 | ||
5217 |