Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / tlu / rtl / tlu_fls_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: tlu_fls_ctl.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35module tlu_fls_ctl (
36 l2clk,
37 scan_in,
38 tcu_pce_ov,
39 spc_aclk,
40 spc_bclk,
41 tcu_scan_en,
42 spc_aclk_wmr,
43 wmr_scan_in,
44 lsu_tlu_pmen,
45 thread_group,
46 trl_shscanid,
47 tcu_core_running,
48 tcu_ss_mode,
49 tcu_do_mode,
50 tcu_ss_request,
51 cxi_xir,
52 cxi_ivt,
53 dec_raw_pick_p,
54 dec_tid_m,
55 dec_inst_valid_m,
56 dec_lsu_inst_m,
57 dec_fgu_inst_m,
58 dec_illegal_inst_m,
59 dec_exc_m,
60 dec_done_inst_m,
61 dec_retry_inst_m,
62 dec_sir_inst_m,
63 dec_hpriv_exc_m,
64 dec_priv_exc_m,
65 dec_fpdisable_exc_m,
66 dec_br_taken_m,
67 dec_annul_ds_m,
68 dec_ds_m,
69 dec_icache_perr_m,
70 dec_cti_inst_m,
71 dec_flush_b,
72 exu_ibp_m,
73 exu_tcc_m,
74 exu_tof_m,
75 exu_cecc_m,
76 exu_uecc_m,
77 exu_oor_va_m,
78 exu_misalign_m,
79 exu_spill_b,
80 exu_fill_m,
81 exu_normal_b,
82 exu_cleanwin_b,
83 exu_wstate_b,
84 exu_trap_number_b,
85 exu_cwp0,
86 exu_cwp1,
87 exu_cwp2,
88 exu_cwp3,
89 lsu_lddf_align_b,
90 lsu_stdf_align_b,
91 lsu_illegal_inst_b,
92 lsu_daccess_prot_b,
93 lsu_priv_action_b,
94 lsu_va_watchpoint_b,
95 lsu_pa_watchpoint_b,
96 lsu_align_b,
97 lsu_tlb_miss_b_,
98 lsu_dae_invalid_asi_b,
99 lsu_dae_nc_page_b,
100 lsu_dae_nfo_page_b,
101 lsu_dae_priv_viol_b,
102 lsu_dae_so_page,
103 lsu_priv_action_g,
104 lsu_tid_g,
105 lsu_trap_flush,
106 lsu_spec_enable,
107 lsu_tlb_bypass_b,
108 lsu_tlb_real_b,
109 lsu_sync_inst_b,
110 lsu_tlu_twocycle_m,
111 lsu_block_store_b,
112 lsu_dcl2u_err_g,
113 lsu_dcl2nd_err_g,
114 lsu_dcerr_tid_g,
115 lsu_sbdlc_err_g,
116 lsu_sbdlu_err_g,
117 lsu_sbapp_err_g,
118 lsu_sbdiou_err_g,
119 lsu_stberr_tid_g,
120 lsu_dttp_err_b,
121 lsu_dtdp_err_b,
122 lsu_dtmh_err_b,
123 lsu_perfmon_trap_b,
124 lsu_perfmon_trap_g,
125 lsu_immu_enable,
126 fgu_predict_fx2,
127 fgu_pdist_beat2_fx1,
128 fgu_cecc_fx2,
129 fgu_uecc_fx2,
130 fgu_fpx_ieee_trap_fw,
131 fgu_fpd_ieee_trap_fw,
132 fgu_fpx_unfin_fw,
133 fgu_fpd_unfin_fw,
134 fgu_fpd_idiv0_trap_fw,
135 fgu_fpx_trap_tid_fw,
136 fgu_fpd_trap_tid_fw,
137 asi_ece_exc,
138 asi_eue_exc,
139 asi_ecc_tid,
140 asi_irl_cleared,
141 asi_halt,
142 asi_decr,
143 asi_clear_spu_trap_req,
144 tel_tsacu_exc,
145 mmu_hw_tw_enable,
146 mmu_i_unauth_access,
147 mmu_i_tsb_miss,
148 mmu_d_tsb_miss,
149 mmu_i_tte_outofrange,
150 mmu_d_tte_outofrange,
151 mmu_asi_cecc,
152 mmu_asi_uecc,
153 mmu_asi_tid,
154 mmu_i_eccerr,
155 mmu_d_eccerr,
156 mmu_thr0_err_type_b1,
157 mmu_thr1_err_type_b1,
158 mmu_thr2_err_type_b1,
159 mmu_thr3_err_type_b1,
160 mmu_dae_req,
161 mmu_dae_tid,
162 spu_tlu_ma_int_req,
163 spu_tlu_cwq_int_req,
164 pmu_tlu_trap_m,
165 pmu_tlu_debug_event,
166 pct_iaw_exc_e,
167 pct_npc_0_w,
168 pct_npc_1_w,
169 pct_npc_2_w,
170 pct_npc_3_w,
171 pct_pc_oor_va_e,
172 flsx_flush_lsu_b,
173 flsx_flush_fgu_b,
174 trl_tl_eq_0,
175 trl_pil_mask_15,
176 trl_iln_exc,
177 trl_hstick_match,
178 trl_unhalt_,
179 trl_tlz_exc,
180 trl_nns_exc,
181 trl_ssc_exc,
182 trl_invalidate_pc,
183 trl_invalidate_npc,
184 trl_pc_sel_trap_pc,
185 trl_fls_npc_en,
186 trl_trap_taken,
187 trl_take_sma,
188 trl_take_cwq,
189 trl_take_xir,
190 trl_take_ftt,
191 trl_core_running_status,
192 trl_check_rqr,
193 tlu_ceter_de,
194 tlu_ceter_dhcce,
195 tsd_hpstate_ibe,
196 tsd_hpstate_hpriv,
197 tsd_hpstate_red,
198 tsd_pstate_tct,
199 tsd_pstate_priv,
200 tsd_pstate_ie,
201 tsd_pstate_am,
202 tsd_itlb_bypass,
203 tsd_mrqr_exc_,
204 tsd_dqr_exc_,
205 asi_check_qr_exc,
206 dfd_fls_desr_f,
207 dfd_fls_desr_s,
208 ras_precise_error,
209 ras_disrupting_error,
210 ras_deferred_error,
211 scan_out,
212 wmr_scan_out,
213 fls_spc_hardstop_request,
214 fls_spc_softstop_request,
215 fls_spc_trigger_pulse,
216 tlu_dbg_instr_cmt_grp,
217 tlu_flush_ifu,
218 tlu_flush_exu_b,
219 tlu_flush_lsu_b,
220 tlu_flush_fgu_b,
221 tlu_flush_pmu_b,
222 tlu_flush_pmu_w,
223 tlu_load_i_tag_access_p,
224 tlu_load_i_tag_access_n,
225 tlu_load_d_tag_access,
226 tlu_load_d_tag_access_r,
227 fls_flush_lsu_b,
228 fls_flush_fgu_b,
229 fls_pc_is_npc,
230 fls_tid_d,
231 fls_tid_dec_b,
232 fls_tid_dec_w,
233 fls_pc_sel_npc,
234 fls_pc_sel_npc_plus_4,
235 fls_npc_sel_npc_plus_4,
236 fls_npc_sel_npc_plus_8,
237 fls_npc_sel_target,
238 fls_npc_b_sel_npc,
239 fls_pstate_am_d_,
240 fls_pstate_am_b_,
241 fls_pstate_am_w_,
242 fls_lsu_inst_w,
243 fls_dfd_lsu_inst_b,
244 fls_wstate0,
245 fls_wstate1,
246 fls_wstate2,
247 fls_wstate3,
248 fls_tcc_number_0,
249 fls_tcc_number_1,
250 fls_tcc_number_2,
251 fls_tcc_number_3,
252 fls_tid_dec_w_in,
253 fls_por_request,
254 fls_xir_request,
255 fls_ivt_request,
256 fls_sir_request,
257 fls_itm_request,
258 fls_iln_request,
259 fls_hst_request,
260 fls_tlz_request,
261 fls_sma_request,
262 fls_cwq_request,
263 fls_ade_request,
264 fls_iae_request,
265 fls_ipe_request,
266 fls_ipv_request,
267 fls_inp_request,
268 fls_iar_request,
269 fls_irr_request,
270 fls_mar_request,
271 fls_mrr_request,
272 fls_pro_request,
273 fls_ill_request,
274 fls_don_request,
275 fls_ret_request,
276 fls_fpd_request,
277 fls_snn_request,
278 fls_sno_request,
279 fls_fnn_request,
280 fls_fno_request,
281 fls_clw_request,
282 fls_dtm_request,
283 fls_ldf_request,
284 fls_stf_request,
285 fls_dap_request,
286 fls_vaw_request,
287 fls_iaw_request,
288 fls_paw_request,
289 fls_maa_request,
290 fls_fpe_request,
291 fls_fei_request,
292 fls_fof_request,
293 fls_pra_request,
294 fls_dia_request,
295 fls_ups_request,
296 fls_dpv_request,
297 fls_dnc_request,
298 fls_dnf_request,
299 fls_dso_request,
300 fls_tof_request,
301 fls_dbz_request,
302 fls_tcc_request,
303 fls_dae_request,
304 fls_lsr_request,
305 fls_irt_request,
306 fls_drt_request,
307 fls_pmu_request,
308 fls_mqr_request,
309 fls_dqr_request,
310 fls_rqr_request,
311 fls_idl_request,
312 fls_res_request,
313 fls_ssr_request,
314 fls_ssc_request,
315 fls_nns_request,
316 fls_ime_request,
317 fls_dme_request,
318 fls_eer_request,
319 fls_icp_request,
320 fls_ftt_request,
321 fls_ibp_request,
322 fls_tct_request,
323 fls_ref_request,
324 fls_ipe_dme_request,
325 fls_pc_valid,
326 fls_load_dsfar,
327 fls_irf_cecc_b,
328 fls_irf_uecc_b,
329 fls_kill_irf_ecc_w,
330 fls_cwp0,
331 fls_cwp1,
332 fls_cwp2,
333 fls_cwp3,
334 fls_core_running,
335 fls_ss_request,
336 fls_pct_pc_en,
337 fls_pct_npc_en,
338 fls_trl_l1en,
339 fls_npc_if_cnt_eq_1_d,
340 fls_npc_if_cnt_eq_2_d,
341 fls_npc_if_cnt_eq_3_d,
342 fls_flush,
343 fls_disrupting_flush_w,
344 fls_f_cecc_w,
345 fls_f_uecc_w,
346 fls_ss_update_pc_w,
347 tlu_iht_request,
348 tlu_dht_request,
349 tlu_itlb_bypass_e,
350 tlu_tag_access_tid_b,
351 tlu_i_tag_access_b,
352 tlu_d_tag_access_b,
353 tlu_retry_state,
354 tlu_halted);
355wire pce_ov;
356wire stop;
357wire siclk;
358wire soclk;
359wire se;
360wire beat_two_b_in;
361wire l_tlu_twocycle_b;
362wire fgu_inst_b;
363wire beat_two_b_lat_scanin;
364wire beat_two_b_lat_scanout;
365wire beat_two_b;
366wire pbeat_two_b;
367wire beat_two_w;
368wire exc_for_w;
369wire l1en_b2w_in;
370wire pre_inst_valid_b;
371wire l1en_b2w;
372wire [3:0] tid_dec_w;
373wire [3:0] flush_gfb;
374wire [3:0] m_dae_req_w;
375wire [3:0] por_req;
376wire [3:0] res_req;
377wire [3:0] trap_flush;
378wire [3:0] pdist_ecc_w;
379wire [3:0] ssr_req;
380wire [3:0] multicycle_nns_to_npc_w;
381wire l1en_b2w_lat_scanin;
382wire l1en_b2w_lat_scanout;
383wire l1clk_pm1;
384wire l1clk;
385wire hpstate_hpriv_lat_scanin;
386wire hpstate_hpriv_lat_scanout;
387wire [3:0] hpstate_hpriv;
388wire [3:0] hpriv_bar_or_ie_in;
389wire hpriv_bar_or_ie_lat_scanin;
390wire hpriv_bar_or_ie_lat_scanout;
391wire [3:0] phpriv_bar_or_ie;
392wire [3:0] hpriv_bar_or_ie_m;
393wire [3:0] tid_dec_m;
394wire [3:0] hpriv_bar_and_ie_in;
395wire hpriv_bar_and_ie_lat_scanin;
396wire hpriv_bar_and_ie_lat_scanout;
397wire [3:0] hpriv_bar_and_ie;
398wire [1:0] tid_p;
399wire tid_dec_d_lat_scanin;
400wire tid_dec_d_lat_scanout;
401wire [1:0] tid_d;
402wire [3:0] tid_dec_d;
403wire itlb_bypass_lat_scanin;
404wire itlb_bypass_lat_scanout;
405wire [3:0] itlb_bypass;
406wire itlb_bypass_d;
407wire itlb_bypass_e_lat_scanin;
408wire itlb_bypass_e_lat_scanout;
409wire itlb_bypass_e;
410wire l_tlu_twocycle_b_in;
411wire l_tlu_twocycle_b_lat_scanin;
412wire l_tlu_twocycle_b_lat_scanout;
413wire [1:0] tid_m;
414wire twocycle_inst_b;
415wire [1:0] tid_b;
416wire tid_b_lat_scanin;
417wire tid_b_lat_scanout;
418wire fast_tid_dec_b_lat_scanin;
419wire fast_tid_dec_b_lat_scanout;
420wire [3:0] fast_tid_dec_b;
421wire inst_valid_m;
422wire pre_inst_valid_b_lat_scanin;
423wire pre_inst_valid_b_lat_scanout;
424wire [3:0] tid_dec_b;
425wire tl_eq_0_lat_scanin;
426wire tl_eq_0_lat_scanout;
427wire [3:0] tl_eq_0;
428wire tl_eq_0_b;
429wire inst_valid_b;
430wire flush_b;
431wire preflush_exu_b;
432wire exception_for_w;
433wire bsee_flush_b;
434wire lsu_inst_m;
435wire lsu_inst_b;
436wire lsu_inst_b_lat_scanin;
437wire lsu_inst_b_lat_scanout;
438wire fgu_inst_m;
439wire fgu_inst_b_lat_scanin;
440wire fgu_inst_b_lat_scanout;
441wire illegal_inst_b_in;
442wire illegal_inst_b_lat_scanin;
443wire illegal_inst_b_lat_scanout;
444wire pillegal_inst_b;
445wire illegal_inst_b;
446wire illegal_sir_b;
447wire illegal_done_inst_b;
448wire illegal_retry_inst_b;
449wire itlb_miss_m;
450wire itlb_miss_b_lat_scanin;
451wire itlb_miss_b_lat_scanout;
452wire itlb_miss_b;
453wire ra_itlb_miss_m;
454wire ra_itlb_miss_b_lat_scanin;
455wire ra_itlb_miss_b_lat_scanout;
456wire ra_itlb_miss_b;
457wire itlb_priv_exc_m;
458wire itlb_priv_exc_b_lat_scanin;
459wire itlb_priv_exc_b_lat_scanout;
460wire itlb_priv_exc_b;
461wire itlb_nfo_exc_m;
462wire itlb_nfo_exc_b_lat_scanin;
463wire itlb_nfo_exc_b_lat_scanout;
464wire itlb_nfo_exc_b;
465wire i_l2_unde_m;
466wire i_l2_unde_b_lat_scanin;
467wire i_l2_unde_b_lat_scanout;
468wire i_l2_unde_b;
469wire i_oor_va_m;
470wire i_oor_va_b_lat_scanin;
471wire i_oor_va_b_lat_scanout;
472wire i_oor_va_b;
473wire i_ra_oor_va_m;
474wire i_ra_oor_va_b_lat_scanin;
475wire i_ra_oor_va_b_lat_scanout;
476wire i_ra_oor_va_b;
477wire itlb_err_m;
478wire itlb_err_b_lat_scanin;
479wire itlb_err_b_lat_scanout;
480wire itlb_err_b;
481wire pre_icache_exc_m;
482wire ic_err_m;
483wire ic_err_b_lat_scanin;
484wire ic_err_b_lat_scanout;
485wire ic_err_b;
486wire done_inst_b_in;
487wire done_inst_b_lat_scanin;
488wire done_inst_b_lat_scanout;
489wire pdone_inst_b;
490wire done_inst_b;
491wire priv_exc_b;
492wire retry_inst_b_in;
493wire retry_inst_b_lat_scanin;
494wire retry_inst_b_lat_scanout;
495wire pretry_inst_b;
496wire retry_inst_b;
497wire sir_b_in;
498wire sir_b_lat_scanin;
499wire sir_b_lat_scanout;
500wire psir_b;
501wire in_hpriv_b;
502wire sir_b;
503wire hpriv_exc_b_in;
504wire hpriv_exc_b_lat_scanin;
505wire hpriv_exc_b_lat_scanout;
506wire hpriv_exc_b;
507wire priv_exc_b_in;
508wire priv_exc_b_lat_scanin;
509wire priv_exc_b_lat_scanout;
510wire fpdisable_exc_b_in;
511wire fpdisable_exc_b_lat_scanin;
512wire fpdisable_exc_b_lat_scanout;
513wire fpdisable_exc_b;
514wire e_cecc_b_in;
515wire e_uecc_b_in;
516wire ecc_b_lat_scanin;
517wire ecc_b_lat_scanout;
518wire e_cecc_b;
519wire e_uecc_b;
520wire misalign_b_in;
521wire misalign_b_lat_scanin;
522wire misalign_b_lat_scanout;
523wire misalign_b;
524wire e_oor_va_b_lat_scanin;
525wire e_oor_va_b_lat_scanout;
526wire pe_oor_va_b;
527wire e_oor_va_b;
528wire pstate_am_b;
529wire e_tcc_b_in;
530wire e_tcc_b_lat_scanin;
531wire e_tcc_b_lat_scanout;
532wire e_tcc_b;
533wire e_tof_b_in;
534wire e_tof_b_lat_scanin;
535wire e_tof_b_lat_scanout;
536wire e_tof_b;
537wire e_fill_b_in;
538wire e_fill_b_lat_scanin;
539wire e_fill_b_lat_scanout;
540wire e_fill_b;
541wire br_exc_b;
542wire pdec_exc_b;
543wire br_oor_va_b;
544wire br_ra_oor_va_b;
545wire [3:0] perf_trap_b;
546wire ibp_b;
547wire iaw_b;
548wire tct_b;
549wire target_oor_b;
550wire disrupting_flush_pending_tid_dec_b;
551wire br_taken_b_in;
552wire br_taken_b_lat_scanin;
553wire br_taken_b_lat_scanout;
554wire pre_br_taken_b;
555wire br_taken_b;
556wire annul_ds_m_lat_scanin;
557wire annul_ds_m_lat_scanout;
558wire pre_annul_ds_b;
559wire annul_ds_b;
560wire ds_b_lat_scanin;
561wire ds_b_lat_scanout;
562wire pre_ds_b;
563wire ds_b;
564wire [3:0] perf_trap_m;
565wire [3:0] pil_mask_15;
566wire perf_trap_b_lat_scanin;
567wire perf_trap_b_lat_scanout;
568wire pil_mask_15_lat_scanin;
569wire pil_mask_15_lat_scanout;
570wire ibe_m;
571wire ibp_b_in;
572wire ibp_b_lat_scanin;
573wire ibp_b_lat_scanout;
574wire itlb_va_pa_enabled;
575wire [3:0] immu_enable;
576wire iaw_exc_m_in;
577wire iaw_exc_m_lat_scanin;
578wire iaw_exc_m_lat_scanout;
579wire iaw_exc_m;
580wire iaw_b_in;
581wire iaw_b_lat_scanin;
582wire iaw_b_lat_scanout;
583wire pstate_tct_m;
584wire pstate_tct_b_lat_scanin;
585wire pstate_tct_b_lat_scanout;
586wire pstate_tct_b;
587wire tct_b_in_b;
588wire tct_b_in;
589wire tct_b_lat_scanin;
590wire tct_b_lat_scanout;
591wire ptct_b;
592wire cti_b_in;
593wire cti_b_lat_scanin;
594wire cti_b_lat_scanout;
595wire cti_b;
596wire disrupting_flush_b;
597wire pmu_debug_exc_b;
598wire twocycle_inst_w_lat_scanin;
599wire twocycle_inst_w_lat_scanout;
600wire ptwocycle_inst_w;
601wire twocycle_inst_w;
602wire d_flush_w_lat_scanin;
603wire d_flush_w_lat_scanout;
604wire d_flush_w;
605wire [3:0] dec_inst_valid_b;
606wire [3:0] tid_dec_w_in;
607wire tid_dec_w_lat_scanin;
608wire tid_dec_w_lat_scanout;
609wire pstate_am_b_in;
610wire pstate_am_b_lat_scanin;
611wire pstate_am_b_lat_scanout;
612wire pstate_am_w_lat_scanin;
613wire pstate_am_w_lat_scanout;
614wire pstate_am_w;
615wire [3:0] dec_two_tid_b;
616wire [3:0] two_tid_dec_w_in;
617wire two_tid_dec_w_lat_scanin;
618wire two_tid_dec_w_lat_scanout;
619wire [3:0] two_tid_dec_w;
620wire inst_valid_w_lat_scanin;
621wire inst_valid_w_lat_scanout;
622wire pre_inst_valid_w;
623wire inst_valid_w;
624wire illegal_inst_w_in;
625wire kill_exc_gt_6_lt_7_b_;
626wire illegal_inst_w_lat_scanin;
627wire illegal_inst_w_lat_scanout;
628wire illegal_inst_w;
629wire itlb_miss_w_in;
630wire m103663_exc_b;
631wire kill_exc_lt_6_b_;
632wire itlb_miss_w_lat_scanin;
633wire itlb_miss_w_lat_scanout;
634wire itlb_miss_w;
635wire ra_itlb_miss_w_in;
636wire ra_itlb_miss_w_lat_scanin;
637wire ra_itlb_miss_w_lat_scanout;
638wire ra_itlb_miss_w;
639wire itlb_priv_exc_w_in;
640wire itlb_priv_exc_w_lat_scanin;
641wire itlb_priv_exc_w_lat_scanout;
642wire itlb_priv_exc_w;
643wire itlb_nfo_exc_w_in;
644wire itlb_nfo_exc_w_lat_scanin;
645wire itlb_nfo_exc_w_lat_scanout;
646wire itlb_nfo_exc_w;
647wire i_l2_unde_w_in;
648wire i_l2_err_w_lat_scanin;
649wire i_l2_err_w_lat_scanout;
650wire i_l2_unde_w;
651wire i_oor_va_w_in;
652wire target_oor_va_b;
653wire kill_exc_iar_irr_b_;
654wire i_oor_va_w_lat_scanin;
655wire i_oor_va_w_lat_scanout;
656wire i_oor_va_w;
657wire i_ra_oor_va_w_in;
658wire target_ra_oor_va_b;
659wire i_ra_oor_va_w_lat_scanin;
660wire i_ra_oor_va_w_lat_scanout;
661wire i_ra_oor_va_w;
662wire itlb_err_w_in;
663wire itlb_err_w_lat_scanin;
664wire itlb_err_w_lat_scanout;
665wire itlb_err_w;
666wire ic_err_w_in;
667wire icp_req_in;
668wire ic_err_w_lat_scanin;
669wire ic_err_w_lat_scanout;
670wire icp_req;
671wire done_inst_w_in;
672wire kill_exc_b_;
673wire done_inst_w_lat_scanin;
674wire done_inst_w_lat_scanout;
675wire done_inst_w;
676wire retry_inst_w_in;
677wire retry_inst_w_lat_scanin;
678wire retry_inst_w_lat_scanout;
679wire retry_inst_w;
680wire sir_w_in;
681wire dsc_req_in;
682wire sir_w_lat_scanin;
683wire sir_w_lat_scanout;
684wire sir_w;
685wire hpriv_exc_w_in;
686wire hpriv_exc_w_lat_scanin;
687wire hpriv_exc_w_lat_scanout;
688wire hpriv_exc_w;
689wire priv_exc_w_in;
690wire kill_exc_ge_7_lt_11_b_;
691wire priv_exc_w_lat_scanin;
692wire priv_exc_w_lat_scanout;
693wire priv_exc_w;
694wire fpdisable_exc_w_in;
695wire fpdisable_exc_w_lat_scanin;
696wire fpdisable_exc_w_lat_scanout;
697wire fpdisable_exc_w;
698wire tcc_w_in;
699wire tcc_w_lat_scanin;
700wire tcc_w_lat_scanout;
701wire tcc_w;
702wire tof_w_in;
703wire tof_w_lat_scanin;
704wire tof_w_lat_scanout;
705wire tof_w;
706wire kill_e_f_ecc_b;
707wire e_ecc_b;
708wire e_f_ecc_w_in;
709wire f_ecc_b;
710wire e_ecc_w_lat_scanin;
711wire e_ecc_w_lat_scanout;
712wire e_f_ecc_w;
713wire kill_irf_ecc_w_lat_scanin;
714wire kill_irf_ecc_w_lat_scanout;
715wire kill_e_f_ecc_w;
716wire e_misalign_b;
717wire fnn_b;
718wire fno_b;
719wire e_misalign_w_in;
720wire e_misalign_w_lat_scanin;
721wire e_misalign_w_lat_scanout;
722wire e_misalign_w;
723wire immu_enable_lat_scanin;
724wire immu_enable_lat_scanout;
725wire br_real_b;
726wire br_bypass_b;
727wire ld_oor_va_b;
728wire br_oor_va_w_in;
729wire br_ld_oor_va_w_in;
730wire br_ld_oor_va_w_lat_scanin;
731wire br_ld_oor_va_w_lat_scanout;
732wire br_ld_oor_va_w;
733wire ld_ra_oor_va_b;
734wire br_ra_oor_va_w_in;
735wire br_ld_ra_oor_va_w_in;
736wire br_ld_ra_oor_va_w_lat_scanin;
737wire br_ld_ra_oor_va_w_lat_scanout;
738wire br_ld_ra_oor_va_w;
739wire pc_oor_va_b_lat_scanin;
740wire pc_oor_va_b_lat_scanout;
741wire pc_oor_va_m;
742wire pc_oor_va_b;
743wire snn_b;
744wire sno_b;
745wire snn_w_in;
746wire sno_w_in;
747wire fnn_w_in;
748wire fno_w_in;
749wire snn_w_lat_scanin;
750wire snn_w_lat_scanout;
751wire snn_w;
752wire sno_w_lat_scanin;
753wire sno_w_lat_scanout;
754wire sno_w;
755wire fnn_w_lat_scanin;
756wire fnn_w_lat_scanout;
757wire fnn_w;
758wire fno_w_lat_scanin;
759wire fno_w_lat_scanout;
760wire fno_w;
761wire clw_b;
762wire clw_w_in;
763wire clw_w_lat_scanin;
764wire clw_w_lat_scanout;
765wire clw_w;
766wire lsu_inst_w_lat_scanin;
767wire lsu_inst_w_lat_scanout;
768wire lsu_inst_w;
769wire cti_w_lat_scanin;
770wire cti_w_lat_scanout;
771wire cti_w;
772wire [2:0] wstate3_b;
773wire [2:0] wstate3_w;
774wire wstate3_w_lat_scanin;
775wire wstate3_w_lat_scanout;
776wire [2:0] wstate2_b;
777wire [2:0] wstate2_w;
778wire wstate2_w_lat_scanin;
779wire wstate2_w_lat_scanout;
780wire [2:0] wstate1_b;
781wire [2:0] wstate1_w;
782wire wstate1_w_lat_scanin;
783wire wstate1_w_lat_scanout;
784wire [2:0] wstate0_b;
785wire [2:0] wstate0_w;
786wire wstate0_w_lat_scanin;
787wire wstate0_w_lat_scanout;
788wire in_user_b;
789wire [7:0] trap_number_b;
790wire trap_number_w_lat_scanin;
791wire trap_number_w_lat_scanout;
792wire [7:0] trap_number_w;
793wire [7:0] trap_number_3_in;
794wire [7:0] trap_number_3;
795wire trap_number_3_lat_scanin;
796wire trap_number_3_lat_scanout;
797wire [7:0] trap_number_2_in;
798wire [7:0] trap_number_2;
799wire trap_number_2_lat_scanin;
800wire trap_number_2_lat_scanout;
801wire [7:0] trap_number_1_in;
802wire [7:0] trap_number_1;
803wire trap_number_1_lat_scanin;
804wire trap_number_1_lat_scanout;
805wire [7:0] trap_number_0_in;
806wire [7:0] trap_number_0;
807wire trap_number_0_lat_scanin;
808wire trap_number_0_lat_scanout;
809wire lddf_align_b;
810wire lddf_align_w_in;
811wire lddf_align_w_lat_scanin;
812wire lddf_align_w_lat_scanout;
813wire lddf_align_w;
814wire stdf_align_b;
815wire stdf_align_w_in;
816wire stdf_align_w_lat_scanin;
817wire stdf_align_w_lat_scanout;
818wire stdf_align_w;
819wire daccess_prot_b;
820wire dtlb_error_b;
821wire daccess_prot_w_in;
822wire daccess_prot_w_lat_scanin;
823wire daccess_prot_w_lat_scanout;
824wire daccess_prot_w;
825wire priv_action_b;
826wire priv_action_w_in;
827wire priv_action_w_lat_scanin;
828wire priv_action_w_lat_scanout;
829wire priv_action_w;
830wire va_watchpoint_b;
831wire va_watchpoint_w_in;
832wire va_watchpoint_w_lat_scanin;
833wire va_watchpoint_w_lat_scanout;
834wire va_watchpoint_w;
835wire pa_watchpoint_b;
836wire pa_watchpoint_w_in;
837wire pa_watchpoint_w_lat_scanin;
838wire pa_watchpoint_w_lat_scanout;
839wire pa_watchpoint_w;
840wire align_b;
841wire align_w_in;
842wire align_w_lat_scanin;
843wire align_w_lat_scanout;
844wire align_w;
845wire dtlb_miss_b;
846wire perfmon_trap_b;
847wire dtlb_miss_w_in;
848wire dtlb_w_lat_scanin;
849wire dtlb_w_lat_scanout;
850wire dtlb_miss_w;
851wire ra_dtlb_miss_b;
852wire ra_dtlb_miss_w_in;
853wire ra_dtlb_w_lat_scanin;
854wire ra_dtlb_w_lat_scanout;
855wire ra_dtlb_miss_w;
856wire l_real_w_lat_scanin;
857wire l_real_w_lat_scanout;
858wire l_real_w;
859wire dae_invalid_asi_b;
860wire dae_invalid_asi_w_in;
861wire dae_invalid_asi_w_lat_scanin;
862wire dae_invalid_asi_w_lat_scanout;
863wire dae_invalid_asi_w;
864wire dae_nc_page_b;
865wire dae_nc_page_w_in;
866wire dae_nc_page_w_lat_scanin;
867wire dae_nc_page_w_lat_scanout;
868wire dae_nc_page_w;
869wire dae_nfo_page_b;
870wire dae_nfo_page_w_in;
871wire dae_nfo_page_w_lat_scanin;
872wire dae_nfo_page_w_lat_scanout;
873wire dae_nfo_page_w;
874wire dae_priv_viol_b;
875wire dae_priv_viol_w_in;
876wire dae_priv_viol_w_lat_scanin;
877wire dae_priv_viol_w_lat_scanout;
878wire dae_priv_viol_w;
879wire dae_so_page_b;
880wire dae_so_page_w_in;
881wire dae_so_page_w_lat_scanin;
882wire dae_so_page_w_lat_scanout;
883wire dae_so_page_w;
884wire dtlb_error_w_in;
885wire dtlb_error_w_lat_scanin;
886wire dtlb_error_w_lat_scanout;
887wire dtlb_error_w;
888wire pil_mask_15_b;
889wire precise_perf_trap_b;
890wire tlz_exc_dec_b;
891wire por_req_in;
892wire xir_req_in;
893wire ftt_req_in;
894wire debug_exc_b;
895wire precise_perf_trap_w_in;
896wire precise_perf_trap_w_lat_scanin;
897wire precise_perf_trap_w_lat_scanout;
898wire precise_perf_trap_w;
899wire perf_trap_w_in;
900wire perf_trap_w_lat_scanin;
901wire perf_trap_w_lat_scanout;
902wire perf_trap_w;
903wire ibp_w_in;
904wire ibp_w_lat_scanin;
905wire ibp_w_lat_scanout;
906wire ibp_w;
907wire iaw_w_in;
908wire kill_exc_iaw_b_;
909wire iaw_w_lat_scanin;
910wire iaw_w_lat_scanout;
911wire iaw_w;
912wire tct_w_in;
913wire tct_w_lat_scanin;
914wire tct_w_lat_scanout;
915wire tct_w;
916wire l_spec_enable_lat_scanin;
917wire l_spec_enable_lat_scanout;
918wire [3:0] l_spec_enable;
919wire spec_enable;
920wire f_predict_b;
921wire f_predict_w_in;
922wire f_predict_w_lat_scanin;
923wire f_predict_w_lat_scanout;
924wire f_predict_w;
925wire pdist_beat2_fx2_in;
926wire pdist_beat2_fx2_lat_scanin;
927wire pdist_beat2_fx2_lat_scanout;
928wire pdist_beat2_fx2;
929wire f_cecc_w_lat_scanin;
930wire f_cecc_w_lat_scanout;
931wire f_uecc_w_lat_scanin;
932wire f_uecc_w_lat_scanout;
933wire pdist_ecc_b;
934wire [3:0] pdist_ecc_w_in;
935wire pdist_ecc_w_lat_scanin;
936wire pdist_ecc_w_lat_scanout;
937wire [3:0] m_asi_ecc_b;
938wire [3:0] asi_ecc_b;
939wire asi_ecc_w_lat_scanin;
940wire asi_ecc_w_lat_scanout;
941wire [3:0] asi_ecc_w;
942wire [3:0] ime_b;
943wire ime_w_lat_scanin;
944wire ime_w_lat_scanout;
945wire [3:0] ime_w;
946wire [3:0] dme_b;
947wire dme_w_lat_scanin;
948wire dme_w_lat_scanout;
949wire [3:0] dme_w;
950wire [3:0] m_dae_req_m;
951wire m_dae_req_b_lat_scanin;
952wire m_dae_req_b_lat_scanout;
953wire [3:0] pm_dae_req_b;
954wire [3:0] m_dae_req_b;
955wire m_dae_req_w_lat_scanin;
956wire m_dae_req_w_lat_scanout;
957wire br_taken_not_annul_ds_w_in;
958wire br_taken_not_annul_ds_w_lat_scanin;
959wire br_taken_not_annul_ds_w_lat_scanout;
960wire br_taken_not_annul_ds_w;
961wire [3:0] hold_nns_exc_w;
962wire [3:0] clear_nns_exc_w;
963wire [3:0] flush_not_tablewalk;
964wire [3:0] flush_ifu;
965wire [3:0] iht_request;
966wire [3:0] dht_request;
967wire [3:0] hwtw_exception;
968wire [3:0] nns_exc_in;
969wire [3:0] nns_exc;
970wire nns_exc_lat_scanin;
971wire nns_exc_lat_scanout;
972wire ssmode;
973wire domode;
974wire sync_inst_b;
975wire [3:0] nns_to_pc_b;
976wire [3:0] tid_dec_valid_b;
977wire [3:0] nns_to_npc_b;
978wire [3:0] bsee_req_in;
979wire [3:0] multicycle_nns_to_npc_b;
980wire bsee_req_w_in;
981wire [3:0] block_store_w;
982wire nns_exc_w_lat_scanin;
983wire nns_exc_w_lat_scanout;
984wire [3:0] pnns_to_pc_w;
985wire [3:0] pnns_to_npc_w;
986wire [3:0] nns_to_pc_w;
987wire [3:0] nns_to_npc_w;
988wire same_thread_b_m;
989wire [3:0] pbsee_pending_in;
990wire [3:0] bsee_pending;
991wire itlb_exc_b;
992wire dtlb_exc_b;
993wire dec_exc_b;
994wire exu_exc_b;
995wire lsu_exc_b;
996wire fgu_exc_b;
997wire exc_w_lat_scanin;
998wire exc_w_lat_scanout;
999wire dec_exc_w;
1000wire exu_exc_w;
1001wire lsu_exc_w;
1002wire fgu_exc_w;
1003wire bsee_req_w;
1004wire trap_flush_lat_scanin;
1005wire trap_flush_lat_scanout;
1006wire [3:0] ptrap_flush;
1007wire preflush_exu_m;
1008wire preflush_lsu_m;
1009wire preflush_fgu_m;
1010wire preflush_b_lat_scanin;
1011wire preflush_b_lat_scanout;
1012wire preflush_lsu_b;
1013wire preflush_fgu_b;
1014wire flush_lsu_b;
1015wire flush_fgu_b;
1016wire [3:0] sync_flush_ifu;
1017wire [3:0] flush_not_disrupting;
1018wire [3:0] bsee_req;
1019wire [3:0] clear_disrupting_flush_pending_w;
1020wire [3:0] core_running;
1021wire [3:0] clear_disrupting_flush_pending;
1022wire tlz_exc_b;
1023wire [3:0] l_tid_dec_g;
1024wire [3:0] fpx_tid_dec_fb;
1025wire [3:0] fpd_tid_dec_fb;
1026wire [3:0] dcerr_tid_dec_g;
1027wire [3:0] l_l2_ecc_g;
1028wire [3:0] l_sbdl_ecc_g;
1029wire [3:0] priv_action_g;
1030wire [3:0] precise_perf_trap_g;
1031wire [3:0] fpx_ieee_exc_fb;
1032wire [3:0] fpd_ieee_exc_fb;
1033wire [3:0] fpx_unfin_exc_fb;
1034wire [3:0] fpd_unfin_exc_fb;
1035wire [3:0] idiv0_exc_fb;
1036wire [3:0] flush_gfb_in;
1037wire flush_gfb_lat_scanin;
1038wire flush_gfb_lat_scanout;
1039wire l_l2_ecc_w_lat_scanin;
1040wire l_l2_ecc_w_lat_scanout;
1041wire [3:0] l_l2_ecc_w;
1042wire l_sbdl_ecc_w_lat_scanin;
1043wire l_sbdl_ecc_w_lat_scanout;
1044wire [3:0] l_sbdl_ecc_w;
1045wire priv_action_g_w_lat_scanin;
1046wire priv_action_g_w_lat_scanout;
1047wire [3:0] priv_action_g_w;
1048wire precise_perf_trap_g_w_lat_scanin;
1049wire precise_perf_trap_g_w_lat_scanout;
1050wire [3:0] precise_perf_trap_g_w;
1051wire [3:0] ieee_exc_fb;
1052wire ieee_exc_fw_lat_scanin;
1053wire ieee_exc_fw_lat_scanout;
1054wire [3:0] ieee_exc_fw;
1055wire [3:0] unfin_fb;
1056wire unfin_fw_lat_scanin;
1057wire unfin_fw_lat_scanout;
1058wire [3:0] unfin_fw;
1059wire idiv0_exc_fw_lat_scanin;
1060wire idiv0_exc_fw_lat_scanout;
1061wire [3:0] idiv0_exc_fw;
1062wire [3:0] xir_flush_in;
1063wire [3:0] pre_xir_flush;
1064wire xir_flush_lat_scanin;
1065wire xir_flush_lat_scanout;
1066wire [3:0] xir_flush_m;
1067wire xir_flush_b_in;
1068wire xir_flush_b_lat_scanin;
1069wire xir_flush_b_lat_scanout;
1070wire xir_flush_b;
1071wire pre_desr_f_lat_scanin;
1072wire pre_desr_f_lat_scanout;
1073wire [3:0] pre_desr_f;
1074wire [3:0] desr_f_in;
1075wire [3:0] desr_f;
1076wire desr_f_lat_scanin;
1077wire desr_f_lat_scanout;
1078wire desr_s_lat_scanin;
1079wire desr_s_lat_scanout;
1080wire [3:0] desr_s;
1081wire [3:0] eer_err_m;
1082wire eer_err_b_in;
1083wire eer_err_b_lat_scanin;
1084wire eer_err_b_lat_scanout;
1085wire eer_err_b;
1086wire [3:0] ade_err_m;
1087wire ade_err_b_in;
1088wire ade_err_b_lat_scanin;
1089wire ade_err_b_lat_scanout;
1090wire ade_err_b;
1091wire [3:0] l_sbpp_in;
1092wire [3:0] pre_l_sbpp;
1093wire l_sbpp_lat_scanin;
1094wire l_sbpp_lat_scanout;
1095wire [3:0] l_sbpp_m;
1096wire l_sbpp_b_in;
1097wire l_sbpp_b_lat_scanin;
1098wire l_sbpp_b_lat_scanout;
1099wire l_sbpp_b;
1100wire [3:0] ma_flush_in;
1101wire [3:0] pre_ma_flush;
1102wire ma_flush_lat_scanin;
1103wire ma_flush_lat_scanout;
1104wire [3:0] ma_flush_m;
1105wire ma_flush_b_in;
1106wire ma_flush_b_lat_scanin;
1107wire ma_flush_b_lat_scanout;
1108wire ma_flush_b;
1109wire [3:0] cwq_flush_in;
1110wire [3:0] pre_cwq_flush;
1111wire cwq_flush_lat_scanin;
1112wire cwq_flush_lat_scanout;
1113wire [3:0] cwq_flush_m;
1114wire cwq_flush_b_in;
1115wire cwq_flush_b_lat_scanin;
1116wire cwq_flush_b_lat_scanout;
1117wire cwq_flush_b;
1118wire tsa_tca_ecc_error;
1119wire [3:0] check_mqr_dqr_;
1120wire [3:0] check_mqr_dqr;
1121wire [3:0] check_rqr_;
1122wire [3:0] check_rqr;
1123wire [3:0] pmqr_exc_in;
1124wire [3:0] pmqr_exc;
1125wire pmqr_exc_lat_wmr_scanin;
1126wire pmqr_exc_lat_wmr_scanout;
1127wire [3:0] mqr_exc_m;
1128wire mqr_exc_b_in;
1129wire mqr_exc_b_lat_scanin;
1130wire mqr_exc_b_lat_scanout;
1131wire mqr_exc_b;
1132wire [3:0] pdqr_exc_in;
1133wire [3:0] pdqr_exc;
1134wire pdqr_exc_lat_wmr_scanin;
1135wire pdqr_exc_lat_wmr_scanout;
1136wire [3:0] dqr_exc_m;
1137wire dqr_exc_b_in;
1138wire dqr_exc_b_lat_scanin;
1139wire dqr_exc_b_lat_scanout;
1140wire dqr_exc_b;
1141wire [3:0] prqr_exc_in;
1142wire [3:0] prqr_exc;
1143wire prqr_exc_lat_wmr_scanin;
1144wire prqr_exc_lat_wmr_scanout;
1145wire [3:0] rqr_exc_m;
1146wire rqr_exc_b_in;
1147wire rqr_exc_b_lat_scanin;
1148wire rqr_exc_b_lat_scanout;
1149wire rqr_exc_b;
1150wire ivt_lat_scanin;
1151wire ivt_lat_scanout;
1152wire [3:0] ivt_last;
1153wire [3:0] ivt_flush_in;
1154wire [3:0] pre_ivt_flush;
1155wire ivt_flush_lat_wmr_scanin;
1156wire ivt_flush_lat_wmr_scanout;
1157wire [3:0] ivt_flush_m;
1158wire ivt_flush_b_in;
1159wire ivt_flush_b_lat_scanin;
1160wire ivt_flush_b_lat_scanout;
1161wire ivt_flush_b;
1162wire [3:0] iln_exc_m;
1163wire iln_exc_b_in;
1164wire iln_exc_b_lat_scanin;
1165wire iln_exc_b_lat_scanout;
1166wire iln_exc_b;
1167wire [3:0] tlz_exc_m;
1168wire tlz_exc_b_in;
1169wire tlz_exc_b_lat_scanin;
1170wire tlz_exc_b_lat_scanout;
1171wire [3:0] hst_exc_m;
1172wire hst_exc_b_in;
1173wire hst_exc_b_lat_scanin;
1174wire hst_exc_b_lat_scanout;
1175wire hst_exc_b;
1176wire [3:0] no_hold_disrupting_flush_in;
1177wire [3:0] idl_exc_in;
1178wire [3:0] disrupting_ssc_exc;
1179wire no_hold_disrupting_flush_lat_scanin;
1180wire no_hold_disrupting_flush_lat_scanout;
1181wire [3:0] no_hold_disrupting_flush;
1182wire [3:0] disrupting_flush_pending;
1183wire disrupting_flush_pending_tid_dec_m;
1184wire disrupting_flush_pending_tid_dec_b_lat_scanin;
1185wire disrupting_flush_pending_tid_dec_b_lat_scanout;
1186wire kill_pmu_debug_exc_b_;
1187wire pmu_debug_exc_ge_7_lt_11_b;
1188wire [3:0] clear_disrupting_flush_pending_w_in;
1189wire cdfpw_lat_scanin;
1190wire cdfpw_lat_scanout;
1191wire disrupting_flush_w_in;
1192wire refetch_b;
1193wire disrupting_flush_w_lat_scanin;
1194wire disrupting_flush_w_lat_scanout;
1195wire disrupting_flush_w;
1196wire block_store_w_lat_scanin;
1197wire block_store_w_lat_scanout;
1198wire [3:0] bsee_pending_in;
1199wire bsee_pending_lat_scanin;
1200wire bsee_pending_lat_scanout;
1201wire bsee_req_lat_scanin;
1202wire bsee_req_lat_scanout;
1203wire bsee_req_w_lat_scanin;
1204wire bsee_req_w_lat_scanout;
1205wire bsee_flush_b_in;
1206wire bsee_flush_b_lat_scanin;
1207wire bsee_flush_b_lat_scanout;
1208wire core_running_lat_scanin;
1209wire core_running_lat_scanout;
1210wire core_running_last_lat_scanin;
1211wire core_running_last_lat_scanout;
1212wire [3:0] core_running_last;
1213wire core_running_status_lat_scanin;
1214wire core_running_status_lat_scanout;
1215wire [3:0] core_running_status;
1216wire [3:0] idl_exc_new;
1217wire [3:0] idl_exc;
1218wire idl_exc_lat_scanin;
1219wire idl_exc_lat_scanout;
1220wire idl_exc_b;
1221wire idl_req_in;
1222wire rqr_req_in;
1223wire ade_req_in;
1224wire eer_req_in;
1225wire iln_req_in;
1226wire dqr_req_in;
1227wire mqr_req_in;
1228wire cwq_req_in;
1229wire ma_req_in;
1230wire ivt_req_in;
1231wire tlz_req_in;
1232wire hst_req_in;
1233wire idl_req_lat_scanin;
1234wire idl_req_lat_scanout;
1235wire idl_req;
1236wire [3:0] res_exc;
1237wire [3:0] ever_been_running;
1238wire ssmode_lat_scanin;
1239wire ssmode_lat_scanout;
1240wire domode_lat_scanin;
1241wire domode_lat_scanout;
1242wire ssreq_lat_scanin;
1243wire ssreq_lat_scanout;
1244wire ssreq;
1245wire [3:0] ssr_exc_forces_por;
1246wire [3:0] ssr_exc_b;
1247wire [3:0] por_exc;
1248wire [3:0] ssc_req;
1249wire [3:0] ssr_req_in;
1250wire ssr_req_lat_scanin;
1251wire ssr_req_lat_scanout;
1252wire [3:0] ever_been_running_in;
1253wire ever_been_running_lat_scanin;
1254wire ever_been_running_lat_scanout;
1255wire [3:0] por_req_vec_in;
1256wire por_req_lat_scanin;
1257wire por_req_lat_scanout;
1258wire [3:0] xir_request_in;
1259wire xir_req_lat_scanin;
1260wire xir_req_lat_scanout;
1261wire [3:0] xir_request;
1262wire [3:0] ftt_request_in;
1263wire ftt_req_lat_scanin;
1264wire ftt_req_lat_scanout;
1265wire [3:0] ftt_request;
1266wire ade_req_lat_scanin;
1267wire ade_req_lat_scanout;
1268wire ade_req;
1269wire eer_req_lat_scanin;
1270wire eer_req_lat_scanout;
1271wire eer_req;
1272wire ivt_req_lat_scanin;
1273wire ivt_req_lat_scanout;
1274wire ivt_req;
1275wire ma_req_lat_scanin;
1276wire ma_req_lat_scanout;
1277wire ma_req;
1278wire cwq_req_lat_scanin;
1279wire cwq_req_lat_scanout;
1280wire cwq_req;
1281wire mqr_req_lat_scanin;
1282wire mqr_req_lat_scanout;
1283wire mqr_req;
1284wire dqr_req_lat_scanin;
1285wire dqr_req_lat_scanout;
1286wire dqr_req;
1287wire rqr_req_lat_scanin;
1288wire rqr_req_lat_scanout;
1289wire rqr_req;
1290wire iln_req_lat_scanin;
1291wire iln_req_lat_scanout;
1292wire iln_req;
1293wire hst_req_lat_scanin;
1294wire hst_req_lat_scanout;
1295wire hst_req;
1296wire [3:0] tlz_request_in;
1297wire tlz_req_lat_scanin;
1298wire tlz_req_lat_scanout;
1299wire [3:0] tlz_request;
1300wire [3:0] ssc_req_in;
1301wire ssc_req_lat_scanin;
1302wire ssc_req_lat_scanout;
1303wire [3:0] disrupting_ssc_exc_in;
1304wire [3:0] idl_request;
1305wire [3:0] disrupting_ssc_req;
1306wire disrupting_ssc_exc_lat_scanin;
1307wire disrupting_ssc_exc_lat_scanout;
1308wire hw_tw_enabled_lat_scanin;
1309wire hw_tw_enabled_lat_scanout;
1310wire [3:0] hw_tw_enabled;
1311wire [3:0] hw_tw_disabled;
1312wire [3:0] itm_request;
1313wire load_i_tag_access_in;
1314wire load_i_tag_access_lat_scanin;
1315wire load_i_tag_access_lat_scanout;
1316wire load_i_tag_access_pre;
1317wire [3:0] load_i_tag_access;
1318wire [3:0] ipe_request;
1319wire [3:0] dtm_request;
1320wire load_d_tag_access_in;
1321wire load_d_tag_access_lat_scanin;
1322wire load_d_tag_access_lat_scanout;
1323wire load_d_tag_access;
1324wire [3:0] vaw_request;
1325wire [3:0] iaw_request;
1326wire [3:0] paw_request;
1327wire [3:0] irt_request;
1328wire [3:0] i_real_w;
1329wire [3:0] load_i_tag_access_r;
1330wire [3:0] drt_request;
1331wire [3:0] pre_lsr_request;
1332wire [3:0] ibp_request;
1333wire [3:0] tct_request;
1334wire refetch_w;
1335wire [3:0] m103663_in;
1336wire [3:0] m103663;
1337wire m103663_lat_scanin;
1338wire m103663_lat_scanout;
1339wire refetch_w_in;
1340wire refetch_w_lat_scanin;
1341wire refetch_w_lat_scanout;
1342wire [2:0] cwp3_in;
1343wire [2:0] cwp3;
1344wire [2:0] cwp2_in;
1345wire [2:0] cwp2;
1346wire [2:0] cwp1_in;
1347wire [2:0] cwp1;
1348wire [2:0] cwp0_in;
1349wire [2:0] cwp0;
1350wire cwp_lat_wmr_scanin;
1351wire cwp_lat_wmr_scanout;
1352wire [3:0] pc_valid;
1353wire [3:0] pc_sel_npc_plus_4;
1354wire [3:0] npc_valid;
1355wire prevent_valid;
1356wire [3:0] inst_b;
1357wire [3:0] pc_valid_in;
1358wire pc_valid_lat_scanin;
1359wire pc_valid_lat_scanout;
1360wire [3:0] npc_valid_in;
1361wire npc_valid_lat_scanin;
1362wire npc_valid_lat_scanout;
1363wire npc_is_valid;
1364wire [3:0] pc_is_npc_in;
1365wire [3:0] pc_is_npc;
1366wire pc_is_npc_lat_scanin;
1367wire pc_is_npc_lat_scanout;
1368wire [4:2] pre_npc_d;
1369wire sel_inst_cnt_m_1;
1370wire [4:2] npc_plus_0;
1371wire [4:2] npc_plus_1;
1372wire [4:2] npc_plus_2;
1373wire [4:2] npc_plus_3;
1374wire debug_event_lat_scanin;
1375wire debug_event_lat_scanout;
1376wire [3:0] debug_event;
1377wire softstop_req_in;
1378wire hardstop_req_in;
1379wire pulse_req_in;
1380wire softstop_req_lat_scanin;
1381wire softstop_req_lat_scanout;
1382wire softstop_req;
1383wire hardstop_req_lat_scanin;
1384wire hardstop_req_lat_scanout;
1385wire hardstop_req;
1386wire pulse_req_lat_scanin;
1387wire pulse_req_lat_scanout;
1388wire pulse_req;
1389wire [1:0] instr_cmt_grp_in;
1390wire instr_cmt_grp_lat_scanin;
1391wire instr_cmt_grp_lat_scanout;
1392wire [1:0] instr_cmt_grp;
1393wire [3:0] m114419_nor3_0;
1394wire [3:0] m114419_nor3_1;
1395wire [3:0] m114419_nor3_2;
1396wire [3:0] m114419_nand3_0;
1397wire [3:0] m114419_inv_0;
1398wire [3:0] unhalt;
1399wire [3:0] halted_in;
1400wire [3:0] halted;
1401wire spares_scanin;
1402wire spares_scanout;
1403wire [15:0] unused;
1404
1405
1406input l2clk;
1407input scan_in;
1408input tcu_pce_ov;
1409input spc_aclk;
1410input spc_bclk;
1411input tcu_scan_en;
1412
1413input spc_aclk_wmr; // Warm reset (non)scan
1414input wmr_scan_in;
1415
1416input lsu_tlu_pmen; // Power management
1417
1418input thread_group; // Which thread group?
1419
1420input [2:0] trl_shscanid; // Select which thread to shadow
1421
1422
1423input [3:0] tcu_core_running;
1424input tcu_ss_mode; // Core is in single step mode
1425input tcu_do_mode; // Core is in disable overlap mode
1426input tcu_ss_request; // Enabled threads should single step
1427
1428input [3:0] cxi_xir; // External Interrupt Request
1429input [3:0] cxi_ivt; // Interrupt Vector Trap Request
1430
1431input [3:1] dec_raw_pick_p; // Decoded TID for instruction in P
1432input [1:0] dec_tid_m; // TID for instruction in M
1433input dec_inst_valid_m; // Valid instruction
1434input dec_lsu_inst_m; // LSU instruction
1435input dec_fgu_inst_m; // FGU instruction
1436input dec_illegal_inst_m; // Illegal instruction
1437input [4:0] dec_exc_m; // Exceptions before the ibuffer
1438input dec_done_inst_m; // DONE
1439input dec_retry_inst_m; // RETRY
1440input dec_sir_inst_m; // Software initiated reset
1441input dec_hpriv_exc_m; // Instruction has hyperprivilege exc
1442input dec_priv_exc_m; // Instruction has privilege exc
1443input dec_fpdisable_exc_m; // Floating-point disabled exception
1444input dec_br_taken_m; // Branch in M is taken
1445input dec_annul_ds_m; // Branch in M annuls delay slot
1446input dec_ds_m; // Instruction is in a delay slot
1447input dec_icache_perr_m; // Icache data array had parity error
1448input dec_cti_inst_m; // br/tcc/call/jmpl in M
1449input dec_flush_b; // Flush instruction in B
1450
1451input exu_ibp_m; // Instruction breakpoint
1452input exu_tcc_m; // Trap on condition codes
1453input exu_tof_m; // Tag overflow (TADccTV, TSUBccTV)
1454input exu_cecc_m; // Correctable ECC error on source
1455input exu_uecc_m; // Uncorrectable ECC error on source
1456input exu_oor_va_m; // VA is out of range
1457input exu_misalign_m; // Misaligned address for JMPL, RETURN
1458input exu_spill_b;
1459input exu_fill_m;
1460input exu_normal_b;
1461input exu_cleanwin_b;
1462input [2:0] exu_wstate_b;
1463input [7:0] exu_trap_number_b;
1464input [2:0] exu_cwp0;
1465input [2:0] exu_cwp1;
1466input [2:0] exu_cwp2;
1467input [2:0] exu_cwp3;
1468
1469input lsu_lddf_align_b;
1470input lsu_stdf_align_b;
1471input lsu_illegal_inst_b;
1472input lsu_daccess_prot_b;
1473input lsu_priv_action_b;
1474input lsu_va_watchpoint_b;
1475input lsu_pa_watchpoint_b;
1476input lsu_align_b; // Alignment exception
1477input lsu_tlb_miss_b_; // TLB miss
1478input lsu_dae_invalid_asi_b;
1479input lsu_dae_nc_page_b;
1480input lsu_dae_nfo_page_b;
1481input lsu_dae_priv_viol_b;
1482input lsu_dae_so_page;
1483input lsu_priv_action_g;
1484input [2:0] lsu_tid_g; // TID for exceptions from G
1485input [3:0] lsu_trap_flush; // Flush thread and redirect to NPC
1486input [3:0] lsu_spec_enable; // Speculation mode enabled
1487input lsu_tlb_bypass_b; // TLB in bypass mode
1488input lsu_tlb_real_b; // TLB doing RA->PA translation
1489input lsu_sync_inst_b; // Instruction will get a trap flush
1490input lsu_tlu_twocycle_m; // LSU takes extra cycle on this inst
1491input [3:0] lsu_block_store_b; // LSU reads FRF for block store
1492input lsu_dcl2u_err_g; // LSU data cache L2 uncorrectable ECC
1493input lsu_dcl2nd_err_g; // LSU data cache L2 NotData
1494input [2:0] lsu_dcerr_tid_g; // TID for G stage errors (above)
1495input lsu_sbdlc_err_g; // STB RAW error (CE)
1496input lsu_sbdlu_err_g; // STB RAW error (UE)
1497input lsu_sbapp_err_g; // STB read for issue addr parity error
1498input lsu_sbdiou_err_g; // STB read for issue IO/ext ASI parity
1499input [2:0] lsu_stberr_tid_g; // TID of STB error
1500input lsu_dttp_err_b; // DTLB tag parity error
1501input lsu_dtdp_err_b; // DTLB data parity error
1502input lsu_dtmh_err_b; // DTLB tag multiple hit
1503input lsu_perfmon_trap_b; // Take pic_overflow on this instruction
1504input lsu_perfmon_trap_g; // Take pic_overflow on this instruction
1505input [3:0] lsu_immu_enable; // For instruction VA watchpoint
1506
1507input fgu_predict_fx2; // Exception predicted
1508input fgu_pdist_beat2_fx1; // Second part of PDIST in FX1
1509input fgu_cecc_fx2; // Correctable ECC Error on FRF
1510input fgu_uecc_fx2; // Uncorrectable ECC Error on FRF
1511input fgu_fpx_ieee_trap_fw; // IEEE 754 trap exception
1512input fgu_fpd_ieee_trap_fw; // IEEE 754 trap exception
1513input fgu_fpx_unfin_fw; // Other FGU exception
1514input fgu_fpd_unfin_fw; // Other divide exception
1515input fgu_fpd_idiv0_trap_fw; // Integer divide by zero exception
1516input [2:0] fgu_fpx_trap_tid_fw; // TID for FGU exceptions except divide
1517input [2:0] fgu_fpd_trap_tid_fw; // TID for divide exception
1518
1519input asi_ece_exc; // Correctable ECC error on ASI rd/wr
1520input asi_eue_exc; // Uncorrectable ECC error on ASI rd/wr
1521input [2:0] asi_ecc_tid; // TID for ECC error
1522input [3:0] asi_irl_cleared; // Interrupt_receive_register cleared
1523input [3:0] asi_halt; //
1524input [63:46] asi_decr; // Debug event control register
1525input [3:0] asi_clear_spu_trap_req; //
1526
1527input [3:0] tel_tsacu_exc; // ECC error TSA rd don/ret
1528
1529input [3:0] mmu_hw_tw_enable; // Hardware tablewalk enables per thread
1530input [3:0] mmu_i_unauth_access; // Hardware tablewalk ITSB with EP=0
1531input [3:0] mmu_i_tsb_miss; // Hardware tablewalk missed
1532input [3:0] mmu_d_tsb_miss; // Hardware tablewalk missed
1533input [3:0] mmu_i_tte_outofrange; // RA out of range
1534input [3:0] mmu_d_tte_outofrange; // RA out of range
1535input mmu_asi_cecc; // Correctable ECC error on ASI read
1536input mmu_asi_uecc; // Uncorrectable ECC error on ASI read
1537input [2:0] mmu_asi_tid; // Thread for reported error
1538input [3:0] mmu_i_eccerr; // HW TW had MRA or L2 error on I rld
1539input [3:0] mmu_d_eccerr; // HW TW had MRA or L2 error on D rld
1540input mmu_thr0_err_type_b1; // [1:0] ND U C - (3-0)
1541input mmu_thr1_err_type_b1; // [1:0] ND U C - (3-0)
1542input mmu_thr2_err_type_b1; // [1:0] ND U C - (3-0)
1543input mmu_thr3_err_type_b1; // [1:0] ND U C - (3-0)
1544input mmu_dae_req; // unsupported_page_size exception
1545input [2:0] mmu_dae_tid;
1546
1547input [4:0] spu_tlu_ma_int_req; // SPU MA 4 err 3 trap 2:0 thread ID
1548input [3:0] spu_tlu_cwq_int_req; // SPU CWQ trap rq 3 vld 2:0 thread ID
1549
1550input [3:0] pmu_tlu_trap_m; // PMU trap; kill instruction in M
1551input [3:0] pmu_tlu_debug_event; // PMU event; soft/hard stop or pulse
1552
1553input [1:0] pct_iaw_exc_e;
1554input [3:2] pct_npc_0_w;
1555input [3:2] pct_npc_1_w;
1556input [3:2] pct_npc_2_w;
1557input [3:2] pct_npc_3_w;
1558input pct_pc_oor_va_e;
1559
1560input flsx_flush_lsu_b;
1561input flsx_flush_fgu_b;
1562
1563input [3:0] trl_tl_eq_0; // TL equals zero
1564input [3:0] trl_pil_mask_15; // PIL_mask 15
1565input [3:0] trl_iln_exc; // interrupt_level_n exception
1566input [3:0] trl_hstick_match; // HSTICK_CMPR matches TICK
1567input [3:0] trl_unhalt_; // Raw *STICK_CMPR match;
1568input [3:0] trl_tlz_exc; // TL equals zero exception
1569input [3:0] trl_nns_exc; // Retry with nonsequential NPC
1570input [3:0] trl_ssc_exc; // Single step complete exception
1571input [3:0] trl_invalidate_pc; // Trap, done, retry, or HW TW complete
1572input [3:0] trl_invalidate_npc; // Trap, retry, or HW TW complete
1573input [3:0] trl_pc_sel_trap_pc; // Power management
1574input [3:0] trl_fls_npc_en; // Power management
1575input [3:0] trl_trap_taken;
1576input trl_take_sma; // SPU Modular Arithmetic trap taken
1577input trl_take_cwq; // SPU Control Word Queue trap taken
1578input trl_take_xir;
1579input trl_take_ftt;
1580input [3:0] trl_core_running_status;
1581input trl_check_rqr;
1582
1583input [3:0] tlu_ceter_de;
1584input [3:0] tlu_ceter_dhcce;
1585
1586input [3:0] tsd_hpstate_ibe;
1587input [3:0] tsd_hpstate_hpriv;
1588input [3:0] tsd_hpstate_red;
1589input [3:0] tsd_pstate_tct;
1590input [3:0] tsd_pstate_priv;
1591input [3:0] tsd_pstate_ie;
1592input [3:0] tsd_pstate_am;
1593input [3:0] tsd_itlb_bypass;
1594input tsd_mrqr_exc_; // Mondo or Res Err Queue Register exc
1595input tsd_dqr_exc_; // Device Queue Register exception
1596
1597input [3:0] asi_check_qr_exc; // Check for Interrupt Queue Register
1598 // head vs. tail mismatch
1599
1600input [3:0] dfd_fls_desr_f;
1601input [3:0] dfd_fls_desr_s;
1602input [3:0] ras_precise_error;
1603input [3:0] ras_disrupting_error;
1604input [3:0] ras_deferred_error;
1605
1606
1607
1608output scan_out;
1609
1610output wmr_scan_out; // Warm reset (non)scan
1611
1612output fls_spc_hardstop_request;
1613output fls_spc_softstop_request;
1614output fls_spc_trigger_pulse;
1615output [1:0] tlu_dbg_instr_cmt_grp;
1616
1617output [3:0] tlu_flush_ifu; // Flush specified thread
1618
1619output tlu_flush_exu_b; // EXU to flush instr in B stage
1620
1621output tlu_flush_lsu_b; // This covers both thread groups
1622
1623output tlu_flush_fgu_b; // This covers both thread groups
1624
1625output tlu_flush_pmu_b; // PMU to flush instr in B stage
1626output tlu_flush_pmu_w; // PMU to flush instr in W stage
1627
1628output [3:0] tlu_load_i_tag_access_p;
1629output [3:0] tlu_load_i_tag_access_n;
1630output [3:0] tlu_load_d_tag_access;
1631output [3:0] tlu_load_d_tag_access_r;
1632
1633output fls_flush_lsu_b; // LSU to flush instr in B stage
1634
1635output fls_flush_fgu_b; // FGU to flush instr in B stage
1636
1637output fls_pc_is_npc; // PC reg actually holds NPC, not PC
1638
1639output [1:0] fls_tid_d;
1640output [3:0] fls_tid_dec_b;
1641output [3:0] fls_tid_dec_w;
1642output [3:0] fls_pc_sel_npc; // Sequential flow
1643output [3:0] fls_pc_sel_npc_plus_4; // Branch taken or(not taken with annul)
1644output [3:0] fls_npc_sel_npc_plus_4; // Sequential flow
1645output [3:0] fls_npc_sel_npc_plus_8; // Sequential flow
1646output [3:0] fls_npc_sel_target; // Branch taken
1647output fls_npc_b_sel_npc; // NPC for inst at B is invalid
1648output fls_pstate_am_d_; // For instruction watchpoint
1649output fls_pstate_am_b_; // For dsfar
1650output fls_pstate_am_w_; // For itlb_tag_access
1651output fls_lsu_inst_w; // For npc_w
1652output fls_dfd_lsu_inst_b; // For DSFAR
1653
1654output [2:0] fls_wstate0; // WSTATE value for spill, fill traps
1655output [2:0] fls_wstate1; // WSTATE value for spill, fill traps
1656output [2:0] fls_wstate2; // WSTATE value for spill, fill traps
1657output [2:0] fls_wstate3; // WSTATE value for spill, fill traps
1658
1659output [7:0] fls_tcc_number_0; // Trap number for thread 0
1660output [7:0] fls_tcc_number_1; // Trap number for thread 1
1661output [7:0] fls_tcc_number_2; // Trap number for thread 2
1662output [7:0] fls_tcc_number_3; // Trap number for thread 3
1663
1664output [3:0] fls_tid_dec_w_in; // Decoded TID for nonstranded requests
1665
1666output [3:0] fls_por_request; // POR trap request
1667output [3:0] fls_xir_request; // XIR trap request
1668output [3:0] fls_ivt_request; // Interrupt Vector Trap request
1669output [3:0] fls_sir_request; // SIR trap request
1670output [3:0] fls_itm_request; // ITLB miss trap request
1671output [3:0] fls_iln_request; // Interrupt level n request
1672output [3:0] fls_hst_request; // hstick_match request
1673output [3:0] fls_tlz_request; // TL equals zero request
1674output [3:0] fls_sma_request; // SPU Modular Arithmetic request
1675output [3:0] fls_cwq_request; // SPU Control Word Queue request
1676output [3:0] fls_ade_request; // Software recoverable error trap req
1677 // (Disrupting error on store,HWTW)
1678output [3:0] fls_iae_request; // Instruction_access_error trap req
1679output [3:0] fls_ipe_request; // Internal processor error trap request
1680 // (Error on array access, etc.)
1681output fls_ipv_request; // IAE_privilege_violation trap request
1682output fls_inp_request; // IAE_nfo_page trap request
1683output fls_iar_request; // instruction_address_range trap equest
1684output fls_irr_request; // instruction_real_range trap equest
1685output fls_mar_request; // mem_address_range trap request
1686output fls_mrr_request; // mem_real_range trap request
1687output fls_pro_request; // Privileged opcode trap request
1688output fls_ill_request; // Illegal instruction trap request
1689output fls_don_request; // Done instruction
1690output fls_ret_request; // Retry instruction
1691output fls_fpd_request; // FP disabled trap request
1692output fls_snn_request; // Spill normal trap request
1693output fls_sno_request; // Spill other trap request
1694output fls_fnn_request; // Fill normal trap request
1695output fls_fno_request; // Fill other trap request
1696output fls_clw_request; // Clean window trap request
1697output [3:0] fls_dtm_request; // DTLB miss trap request
1698output fls_ldf_request; // lddf alignment trap request
1699output fls_stf_request; // stdf alignment trap request
1700output fls_dap_request; // data_access_protection trap request
1701output fls_vaw_request; // VA watchpoint trap request
1702output fls_iaw_request; // Instruction VA watchpoint trap req
1703output fls_paw_request; // PA watchpoint trap request
1704output fls_maa_request; // Memory address alignment trap request
1705output fls_fpe_request; // FP predicted exception
1706output [3:0] fls_fei_request; // FP IEEE 754 trap request
1707output [3:0] fls_fof_request; // FP other trap request (unfinished)
1708output [3:0] fls_pra_request; // Privileged action trap request
1709output fls_dia_request; // DAE_invalid_asi trap request
1710output [3:0] fls_ups_request; // unsupported_page_size trap request
1711output fls_dpv_request; // DAE_privilege_violation trap request
1712output fls_dnc_request; // DAE_nc_page trap request
1713output fls_dnf_request; // DAE_nfo_page trap request
1714output fls_dso_request; // DAE_so_page trap request
1715output fls_tof_request; // Tag overflow trap request
1716output [3:0] fls_dbz_request; // Divide by zero trap request
1717output fls_tcc_request; // Trap instruction trap request
1718output [3:0] fls_dae_request; // LSU uncorrectable ECC on load miss
1719output [3:0] fls_lsr_request; // LSU sync trap (postsync)
1720output fls_irt_request; // Instruction real translation miss
1721output fls_drt_request; // Data real translation miss
1722output [3:0] fls_pmu_request; // pic_overflow
1723output [3:0] fls_mqr_request; // CPU mondo trap request
1724output [3:0] fls_dqr_request; // Device mondo trap request
1725output [3:0] fls_rqr_request; // Resumable error trap request
1726output [3:0] fls_idl_request; // CMP idle request
1727output [3:0] fls_res_request; // CMP resume request
1728output [3:0] fls_ssr_request; // Single step request
1729output [3:0] fls_ssc_request; // Single step completion
1730output [3:0] fls_nns_request; // NPC nonsequential redirect request
1731output [3:0] fls_ime_request; // Instruction_access_MMU_error request
1732output [3:0] fls_dme_request; // Data_access_MMU_error request
1733output [3:0] fls_eer_request; // Hardware corrected error trap request
1734output fls_icp_request; // Icache parity error (invalidate)
1735output [3:0] fls_ftt_request; // Fatal_thread_trap request
1736output fls_ibp_request; // Instruction breakpoint request
1737output fls_tct_request; // Trap on control transfer request
1738output fls_ref_request; // Refetch inst
1739
1740output fls_ipe_dme_request; // Update DSFSR / DSFAR
1741
1742output [3:0] fls_pc_valid; // For single step redirection control
1743
1744output [3:0] fls_load_dsfar;
1745output fls_irf_cecc_b;
1746output fls_irf_uecc_b;
1747output fls_kill_irf_ecc_w;
1748
1749output [2:0] fls_cwp0;
1750output [2:0] fls_cwp1;
1751output [2:0] fls_cwp2;
1752output [2:0] fls_cwp3;
1753
1754output [3:0] fls_core_running;
1755output fls_ss_request;
1756
1757output [3:0] fls_pct_pc_en; // Power management for pct PC flops
1758output [3:0] fls_pct_npc_en; // Power management for pct NPC flops
1759output [3:0] fls_trl_l1en; // Power management for trl
1760
1761output [4:2] fls_npc_if_cnt_eq_1_d;
1762output [4:2] fls_npc_if_cnt_eq_2_d;
1763output [4:2] fls_npc_if_cnt_eq_3_d;
1764
1765output [3:0] fls_flush; // Copy of tlu_flush_ifu
1766output fls_disrupting_flush_w;
1767output fls_f_cecc_w; // For tlu_ras_ctl
1768output fls_f_uecc_w; // For tlu_ras_ctl
1769
1770output fls_ss_update_pc_w;
1771
1772output [3:0] tlu_iht_request; // ITLB hardware tablewalk request
1773output [3:0] tlu_dht_request; // DTLB hardware tablewalk request
1774
1775output tlu_itlb_bypass_e;
1776
1777output [1:0] tlu_tag_access_tid_b; // Tag access power management
1778output tlu_i_tag_access_b; // Tag access power management
1779output tlu_d_tag_access_b; // Tag access power management
1780
1781output [3:0] tlu_retry_state; // DEC should not wait for delay slot
1782
1783output [3:0] tlu_halted;
1784
1785
1786
1787
1788////////////////////////////////////////////////////////////////////////////////
1789
1790assign pce_ov = tcu_pce_ov;
1791assign stop = 1'b0;
1792assign siclk = spc_aclk;
1793assign soclk = spc_bclk;
1794assign se = tcu_scan_en;
1795
1796
1797
1798//////////////////////////////////////////////////////////////////////////////
1799// Power management
1800
1801// l_tlu_twocycle_b is the M stage of the second beat
1802// fgu_pdist_beat2_fx1 is the M stage of the second beat
1803assign beat_two_b_in =
1804 (l_tlu_twocycle_b | (fgu_pdist_beat2_fx1 & fgu_inst_b)) & ~dec_flush_b;
1805
1806tlu_fls_ctl_msff_ctl_macro__width_2 beat_two_b_lat (
1807 .scan_in(beat_two_b_lat_scanin),
1808 .scan_out(beat_two_b_lat_scanout),
1809 .din ({beat_two_b_in ,
1810 beat_two_b }),
1811 .dout ({pbeat_two_b ,
1812 beat_two_w }),
1813 .l1clk(l1clk),
1814 .siclk(siclk),
1815 .soclk(soclk)
1816);
1817
1818assign beat_two_b =
1819 pbeat_two_b & ~exc_for_w;
1820
1821// dec_inst_valid_m is the M stage of normal instructions
1822// pre_inst_valid_b is the B stage of normal instructions and M of twocycle ops
1823// beat_two_b is the B stage of twocycle ops
1824assign l1en_b2w_in =
1825 dec_inst_valid_m | pre_inst_valid_b | ~lsu_tlu_pmen |
1826 beat_two_b;
1827
1828assign fls_trl_l1en[3:0] =
1829 ({4 {l1en_b2w}} & tid_dec_w[3:0]) | flush_gfb[3:0] |
1830 m_dae_req_w[3:0] | por_req[3:0] | res_req[3:0] |
1831 trap_flush[3:0] | pdist_ecc_w[3:0] | ssr_req[3:0] |
1832 multicycle_nns_to_npc_w[3:0];
1833
1834tlu_fls_ctl_msff_ctl_macro__width_1 l1en_b2w_lat (
1835 .scan_in(l1en_b2w_lat_scanin),
1836 .scan_out(l1en_b2w_lat_scanout),
1837 .din (l1en_b2w_in ),
1838 .dout (l1en_b2w ),
1839 .l1clk(l1clk),
1840 .siclk(siclk),
1841 .soclk(soclk)
1842);
1843
1844tlu_fls_ctl_l1clkhdr_ctl_macro b2w_clken (
1845 .l2clk (l2clk ),
1846 .l1en (l1en_b2w ),
1847 .l1clk (l1clk_pm1 ),
1848 .pce_ov(pce_ov),
1849 .stop(stop),
1850 .se(se)
1851);
1852
1853
1854
1855
1856////////////////////////////////////////////////////////////////////////////////
1857// Clock header
1858
1859tlu_fls_ctl_l1clkhdr_ctl_macro clkgen (
1860 .l2clk (l2clk ),
1861 .l1en (1'b1 ),
1862 .l1clk (l1clk ),
1863 .pce_ov(pce_ov),
1864 .stop(stop),
1865 .se(se)
1866);
1867
1868
1869
1870
1871////////////////////////////////////////////////////////////////////////////////
1872// Flop signals that are out of pipe
1873
1874tlu_fls_ctl_msff_ctl_macro__width_4 hpstate_hpriv_lat (
1875 .scan_in(hpstate_hpriv_lat_scanin),
1876 .scan_out(hpstate_hpriv_lat_scanout),
1877 .din (tsd_hpstate_hpriv [3:0] ),
1878 .dout (hpstate_hpriv [3:0] ),
1879 .l1clk(l1clk),
1880 .siclk(siclk),
1881 .soclk(soclk)
1882);
1883
1884assign hpriv_bar_or_ie_in[3:0] =
1885 ~tsd_hpstate_hpriv[3:0] | tsd_pstate_ie[3:0];
1886
1887tlu_fls_ctl_msff_ctl_macro__width_4 hpriv_bar_or_ie_lat (
1888 .scan_in(hpriv_bar_or_ie_lat_scanin),
1889 .scan_out(hpriv_bar_or_ie_lat_scanout),
1890 .din (hpriv_bar_or_ie_in [3:0] ),
1891 .dout (phpriv_bar_or_ie [3:0] ),
1892 .l1clk(l1clk),
1893 .siclk(siclk),
1894 .soclk(soclk)
1895);
1896
1897assign hpriv_bar_or_ie_m[3:0] =
1898 phpriv_bar_or_ie[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
1899
1900assign hpriv_bar_and_ie_in[3:0] =
1901 ~tsd_hpstate_hpriv[3:0] & tsd_pstate_ie[3:0];
1902
1903tlu_fls_ctl_msff_ctl_macro__width_4 hpriv_bar_and_ie_lat (
1904 .scan_in(hpriv_bar_and_ie_lat_scanin),
1905 .scan_out(hpriv_bar_and_ie_lat_scanout),
1906 .din (hpriv_bar_and_ie_in [3:0] ),
1907 .dout (hpriv_bar_and_ie [3:0] ),
1908 .l1clk(l1clk),
1909 .siclk(siclk),
1910 .soclk(soclk)
1911);
1912
1913
1914
1915
1916////////////////////////////////////////////////////////////////////////////////
1917// Pipe signals from P to D
1918
1919assign tid_p[1:0] =
1920 {dec_raw_pick_p[3] | dec_raw_pick_p[2],
1921 dec_raw_pick_p[3] | dec_raw_pick_p[1]};
1922
1923tlu_fls_ctl_msff_ctl_macro__width_2 tid_dec_d_lat (
1924 .scan_in(tid_dec_d_lat_scanin),
1925 .scan_out(tid_dec_d_lat_scanout),
1926 .din (tid_p [1:0] ),
1927 .dout (tid_d [1:0] ),
1928 .l1clk(l1clk),
1929 .siclk(siclk),
1930 .soclk(soclk)
1931);
1932
1933assign tid_dec_d[3:0] =
1934 { tid_d[1] & tid_d[0],
1935 tid_d[1] & ~tid_d[0],
1936 ~tid_d[1] & tid_d[0],
1937 ~tid_d[1] & ~tid_d[0]};
1938
1939assign fls_tid_d[1:0] =
1940 tid_d[1:0];
1941
1942assign fls_pstate_am_d_ =
1943 | (~tsd_pstate_am[3:0] & tid_dec_d[3:0]);
1944
1945tlu_fls_ctl_msff_ctl_macro__width_4 itlb_bypass_lat (
1946 .scan_in(itlb_bypass_lat_scanin),
1947 .scan_out(itlb_bypass_lat_scanout),
1948 .din (tsd_itlb_bypass[3:0] ),
1949 .dout (itlb_bypass [3:0] ),
1950 .l1clk(l1clk),
1951 .siclk(siclk),
1952 .soclk(soclk)
1953);
1954
1955assign itlb_bypass_d =
1956 | (itlb_bypass[3:0] & tid_dec_d[3:0]);
1957
1958tlu_fls_ctl_msff_ctl_macro__width_1 itlb_bypass_e_lat (
1959 .scan_in(itlb_bypass_e_lat_scanin),
1960 .scan_out(itlb_bypass_e_lat_scanout),
1961 .din (itlb_bypass_d ),
1962 .dout (itlb_bypass_e ),
1963 .l1clk(l1clk),
1964 .siclk(siclk),
1965 .soclk(soclk)
1966);
1967
1968assign tlu_itlb_bypass_e =
1969 itlb_bypass_e;
1970
1971
1972
1973////////////////////////////////////////////////////////////////////////////////
1974// Pipe signals from M to B
1975
1976assign l_tlu_twocycle_b_in =
1977 lsu_tlu_twocycle_m & dec_inst_valid_m & dec_lsu_inst_m;
1978
1979tlu_fls_ctl_msff_ctl_macro__width_1 l_tlu_twocycle_b_lat (
1980 .scan_in(l_tlu_twocycle_b_lat_scanin),
1981 .scan_out(l_tlu_twocycle_b_lat_scanout),
1982 .din (l_tlu_twocycle_b_in ),
1983 .dout (l_tlu_twocycle_b ),
1984 .l1clk(l1clk),
1985 .siclk(siclk),
1986 .soclk(soclk)
1987);
1988
1989assign tid_m[1:0] =
1990 (dec_tid_m[1:0] & {2 {~twocycle_inst_b}}) |
1991 (tid_b [1:0] & {2 { twocycle_inst_b}}) ;
1992
1993tlu_fls_ctl_msff_ctl_macro__width_2 tid_b_lat (
1994 .scan_in(tid_b_lat_scanin),
1995 .scan_out(tid_b_lat_scanout),
1996 .din (tid_m [1:0] ),
1997 .dout (tid_b [1:0] ),
1998 .l1clk(l1clk),
1999 .siclk(siclk),
2000 .soclk(soclk)
2001);
2002
2003assign tid_dec_m[3:0] =
2004 { tid_m[1] & tid_m[0],
2005 tid_m[1] & ~tid_m[0],
2006 ~tid_m[1] & tid_m[0],
2007 ~tid_m[1] & ~tid_m[0]};
2008
2009tlu_fls_ctl_msff_ctl_macro__width_4 fast_tid_dec_b_lat (
2010 .scan_in(fast_tid_dec_b_lat_scanin),
2011 .scan_out(fast_tid_dec_b_lat_scanout),
2012 .din (tid_dec_m [3:0] ),
2013 .dout (fast_tid_dec_b [3:0] ),
2014 .l1clk(l1clk),
2015 .siclk(siclk),
2016 .soclk(soclk)
2017);
2018
2019assign fls_tid_dec_b[3:0] =
2020 fast_tid_dec_b[3:0];
2021
2022assign inst_valid_m =
2023 dec_inst_valid_m;
2024
2025tlu_fls_ctl_msff_ctl_macro__width_1 pre_inst_valid_b_lat (
2026 .scan_in(pre_inst_valid_b_lat_scanin),
2027 .scan_out(pre_inst_valid_b_lat_scanout),
2028 .din (inst_valid_m ),
2029 .dout (pre_inst_valid_b ),
2030 .l1clk(l1clk),
2031 .siclk(siclk),
2032 .soclk(soclk)
2033);
2034
2035assign tid_dec_b[3:0] =
2036 { tid_b[1] & tid_b[0],
2037 tid_b[1] & ~tid_b[0],
2038 ~tid_b[1] & tid_b[0],
2039 ~tid_b[1] & ~tid_b[0]};
2040
2041tlu_fls_ctl_msff_ctl_macro__width_4 tl_eq_0_lat (
2042 .scan_in(tl_eq_0_lat_scanin),
2043 .scan_out(tl_eq_0_lat_scanout),
2044 .din (trl_tl_eq_0 [3:0] ),
2045 .dout (tl_eq_0 [3:0] ),
2046 .l1clk(l1clk),
2047 .siclk(siclk),
2048 .soclk(soclk)
2049);
2050
2051assign tl_eq_0_b =
2052 (| (tl_eq_0[3:0] & tid_dec_b[3:0]));
2053
2054assign inst_valid_b =
2055 pre_inst_valid_b & ~flush_b;
2056
2057// bsee_flush_b means there was an earlier block store with ECC error
2058// that is being injected 'just before' the next instruction for that thread
2059// coming down the pipe
2060assign flush_b =
2061 (preflush_exu_b & exception_for_w) | bsee_flush_b;
2062
2063assign lsu_inst_m =
2064 (dec_lsu_inst_m & ~twocycle_inst_b & dec_inst_valid_m) |
2065 ( lsu_inst_b & twocycle_inst_b) ;
2066
2067tlu_fls_ctl_msff_ctl_macro__width_1 lsu_inst_b_lat (
2068 .scan_in(lsu_inst_b_lat_scanin),
2069 .scan_out(lsu_inst_b_lat_scanout),
2070 .din (lsu_inst_m ),
2071 .dout (lsu_inst_b ),
2072 .l1clk(l1clk),
2073 .siclk(siclk),
2074 .soclk(soclk)
2075);
2076
2077assign fls_dfd_lsu_inst_b =
2078 lsu_inst_b & pre_inst_valid_b;
2079
2080assign fgu_inst_m =
2081 dec_fgu_inst_m & dec_inst_valid_m;
2082
2083tlu_fls_ctl_msff_ctl_macro__width_1 fgu_inst_b_lat (
2084 .scan_in(fgu_inst_b_lat_scanin),
2085 .scan_out(fgu_inst_b_lat_scanout),
2086 .din (fgu_inst_m ),
2087 .dout (fgu_inst_b ),
2088 .l1clk(l1clk),
2089 .siclk(siclk),
2090 .soclk(soclk)
2091);
2092
2093assign illegal_inst_b_in =
2094 dec_illegal_inst_m & ~dec_icache_perr_m;
2095
2096tlu_fls_ctl_msff_ctl_macro__width_1 illegal_inst_b_lat (
2097 .scan_in(illegal_inst_b_lat_scanin),
2098 .scan_out(illegal_inst_b_lat_scanout),
2099 .din (illegal_inst_b_in ),
2100 .dout (pillegal_inst_b ),
2101 .l1clk(l1clk),
2102 .siclk(siclk),
2103 .soclk(soclk)
2104);
2105
2106assign illegal_inst_b =
2107 pillegal_inst_b | (lsu_illegal_inst_b & lsu_inst_b) |
2108 illegal_sir_b | illegal_done_inst_b | illegal_retry_inst_b;
2109
2110assign itlb_miss_m =
2111 dec_exc_m[4:0] == 5'b00001;
2112
2113tlu_fls_ctl_msff_ctl_macro__width_1 itlb_miss_b_lat (
2114 .scan_in(itlb_miss_b_lat_scanin),
2115 .scan_out(itlb_miss_b_lat_scanout),
2116 .din (itlb_miss_m ),
2117 .dout (itlb_miss_b ),
2118 .l1clk(l1clk),
2119 .siclk(siclk),
2120 .soclk(soclk)
2121);
2122
2123assign ra_itlb_miss_m =
2124 dec_exc_m[4:0] == 5'b00100;
2125
2126tlu_fls_ctl_msff_ctl_macro__width_1 ra_itlb_miss_b_lat (
2127 .scan_in(ra_itlb_miss_b_lat_scanin),
2128 .scan_out(ra_itlb_miss_b_lat_scanout),
2129 .din (ra_itlb_miss_m ),
2130 .dout (ra_itlb_miss_b ),
2131 .l1clk(l1clk),
2132 .siclk(siclk),
2133 .soclk(soclk)
2134);
2135
2136assign itlb_priv_exc_m =
2137 dec_exc_m[4:0] == 5'b00010;
2138
2139tlu_fls_ctl_msff_ctl_macro__width_1 itlb_priv_exc_b_lat (
2140 .scan_in(itlb_priv_exc_b_lat_scanin),
2141 .scan_out(itlb_priv_exc_b_lat_scanout),
2142 .din (itlb_priv_exc_m ),
2143 .dout (itlb_priv_exc_b ),
2144 .l1clk(l1clk),
2145 .siclk(siclk),
2146 .soclk(soclk)
2147);
2148
2149assign itlb_nfo_exc_m =
2150 dec_exc_m[4:0] == 5'b10001;
2151
2152tlu_fls_ctl_msff_ctl_macro__width_1 itlb_nfo_exc_b_lat (
2153 .scan_in(itlb_nfo_exc_b_lat_scanin),
2154 .scan_out(itlb_nfo_exc_b_lat_scanout),
2155 .din (itlb_nfo_exc_m ),
2156 .dout (itlb_nfo_exc_b ),
2157 .l1clk(l1clk),
2158 .siclk(siclk),
2159 .soclk(soclk)
2160);
2161
2162assign i_l2_unde_m =
2163 (dec_exc_m[4:0] == 5'b01111) |
2164 (dec_exc_m[4:0] == 5'b10000) |
2165 (dec_exc_m[4:0] == 5'b10111) |
2166 (dec_exc_m[4:0] == 5'b11000) ;
2167
2168tlu_fls_ctl_msff_ctl_macro__width_1 i_l2_unde_b_lat (
2169 .scan_in(i_l2_unde_b_lat_scanin),
2170 .scan_out(i_l2_unde_b_lat_scanout),
2171 .din (i_l2_unde_m ),
2172 .dout (i_l2_unde_b ),
2173 .l1clk(l1clk),
2174 .siclk(siclk),
2175 .soclk(soclk)
2176);
2177
2178assign i_oor_va_m =
2179 dec_exc_m[4:0] == 5'b00011;
2180
2181tlu_fls_ctl_msff_ctl_macro__width_1 i_oor_va_b_lat (
2182 .scan_in(i_oor_va_b_lat_scanin),
2183 .scan_out(i_oor_va_b_lat_scanout),
2184 .din (i_oor_va_m ),
2185 .dout (i_oor_va_b ),
2186 .l1clk(l1clk),
2187 .siclk(siclk),
2188 .soclk(soclk)
2189);
2190
2191assign i_ra_oor_va_m =
2192 dec_exc_m[4:0] == 5'b10011;
2193
2194tlu_fls_ctl_msff_ctl_macro__width_1 i_ra_oor_va_b_lat (
2195 .scan_in(i_ra_oor_va_b_lat_scanin),
2196 .scan_out(i_ra_oor_va_b_lat_scanout),
2197 .din (i_ra_oor_va_m ),
2198 .dout (i_ra_oor_va_b ),
2199 .l1clk(l1clk),
2200 .siclk(siclk),
2201 .soclk(soclk)
2202);
2203
2204assign itlb_err_m =
2205 (dec_exc_m[4:0] == 5'b00111) |
2206 (dec_exc_m[4:0] == 5'b11111) |
2207 (dec_exc_m[4:0] == 5'b01001) ;
2208
2209tlu_fls_ctl_msff_ctl_macro__width_1 itlb_err_b_lat (
2210 .scan_in(itlb_err_b_lat_scanin),
2211 .scan_out(itlb_err_b_lat_scanout),
2212 .din (itlb_err_m ),
2213 .dout (itlb_err_b ),
2214 .l1clk(l1clk),
2215 .siclk(siclk),
2216 .soclk(soclk)
2217);
2218
2219assign pre_icache_exc_m =
2220 itlb_miss_m | ra_itlb_miss_m | itlb_priv_exc_m | itlb_nfo_exc_m |
2221 i_oor_va_m | i_ra_oor_va_m | itlb_err_m;
2222
2223assign ic_err_m =
2224 (dec_exc_m[4:0] == 5'b01010) | // ICVP
2225 (dec_exc_m[4:0] == 5'b01011) | // ICTP
2226 (dec_exc_m[4:0] == 5'b01100) | // ICTM
2227 (dec_icache_perr_m & ~pre_icache_exc_m) ; // ICDP
2228
2229tlu_fls_ctl_msff_ctl_macro__width_1 ic_err_b_lat (
2230 .scan_in(ic_err_b_lat_scanin),
2231 .scan_out(ic_err_b_lat_scanout),
2232 .din (ic_err_m ),
2233 .dout (ic_err_b ),
2234 .l1clk(l1clk),
2235 .siclk(siclk),
2236 .soclk(soclk)
2237);
2238
2239assign done_inst_b_in =
2240 dec_done_inst_m & ~dec_illegal_inst_m &
2241 ~dec_icache_perr_m;
2242
2243tlu_fls_ctl_msff_ctl_macro__width_1 done_inst_b_lat (
2244 .scan_in(done_inst_b_lat_scanin),
2245 .scan_out(done_inst_b_lat_scanout),
2246 .din (done_inst_b_in ),
2247 .dout (pdone_inst_b ),
2248 .l1clk(l1clk),
2249 .siclk(siclk),
2250 .soclk(soclk)
2251);
2252
2253assign done_inst_b =
2254 pdone_inst_b & ~tl_eq_0_b & ~priv_exc_b;
2255
2256assign illegal_done_inst_b =
2257 pdone_inst_b & tl_eq_0_b & ~priv_exc_b;
2258
2259assign retry_inst_b_in =
2260 dec_retry_inst_m & ~dec_illegal_inst_m &
2261 ~dec_icache_perr_m;
2262
2263tlu_fls_ctl_msff_ctl_macro__width_1 retry_inst_b_lat (
2264 .scan_in(retry_inst_b_lat_scanin),
2265 .scan_out(retry_inst_b_lat_scanout),
2266 .din (retry_inst_b_in ),
2267 .dout (pretry_inst_b ),
2268 .l1clk(l1clk),
2269 .siclk(siclk),
2270 .soclk(soclk)
2271);
2272
2273assign retry_inst_b =
2274 pretry_inst_b & ~tl_eq_0_b & ~priv_exc_b;
2275
2276assign illegal_retry_inst_b =
2277 pretry_inst_b & tl_eq_0_b & ~priv_exc_b;
2278
2279assign sir_b_in =
2280 dec_sir_inst_m & ~dec_illegal_inst_m & ~dec_icache_perr_m;
2281
2282tlu_fls_ctl_msff_ctl_macro__width_1 sir_b_lat (
2283 .scan_in(sir_b_lat_scanin),
2284 .scan_out(sir_b_lat_scanout),
2285 .din (sir_b_in ),
2286 .dout (psir_b ),
2287 .l1clk(l1clk),
2288 .siclk(siclk),
2289 .soclk(soclk)
2290);
2291
2292assign in_hpriv_b =
2293 ( | (tid_dec_b[3:0] & hpstate_hpriv[3:0]));
2294
2295assign sir_b =
2296 psir_b & in_hpriv_b;
2297
2298assign illegal_sir_b =
2299 psir_b & ~in_hpriv_b;
2300
2301assign hpriv_exc_b_in =
2302 dec_hpriv_exc_m & ~dec_illegal_inst_m & ~dec_icache_perr_m;
2303
2304tlu_fls_ctl_msff_ctl_macro__width_1 hpriv_exc_b_lat (
2305 .scan_in(hpriv_exc_b_lat_scanin),
2306 .scan_out(hpriv_exc_b_lat_scanout),
2307 .din (hpriv_exc_b_in ),
2308 .dout (hpriv_exc_b ),
2309 .l1clk(l1clk),
2310 .siclk(siclk),
2311 .soclk(soclk)
2312);
2313
2314// DEC generates privileged exceptions only on legal instructions so TLU
2315// can prioritize it correctly
2316assign priv_exc_b_in =
2317 dec_priv_exc_m & ~dec_icache_perr_m;
2318
2319tlu_fls_ctl_msff_ctl_macro__width_1 priv_exc_b_lat (
2320 .scan_in(priv_exc_b_lat_scanin),
2321 .scan_out(priv_exc_b_lat_scanout),
2322 .din (priv_exc_b_in ),
2323 .dout (priv_exc_b ),
2324 .l1clk(l1clk),
2325 .siclk(siclk),
2326 .soclk(soclk)
2327);
2328
2329assign fpdisable_exc_b_in =
2330 dec_fpdisable_exc_m & ~dec_illegal_inst_m & ~dec_icache_perr_m;
2331
2332tlu_fls_ctl_msff_ctl_macro__width_1 fpdisable_exc_b_lat (
2333 .scan_in(fpdisable_exc_b_lat_scanin),
2334 .scan_out(fpdisable_exc_b_lat_scanout),
2335 .din (fpdisable_exc_b_in ),
2336 .dout (fpdisable_exc_b ),
2337 .l1clk(l1clk),
2338 .siclk(siclk),
2339 .soclk(soclk)
2340);
2341
2342assign e_cecc_b_in =
2343 exu_cecc_m & (dec_inst_valid_m | twocycle_inst_b);
2344assign e_uecc_b_in =
2345 exu_uecc_m & (dec_inst_valid_m | twocycle_inst_b);
2346tlu_fls_ctl_msff_ctl_macro__width_2 ecc_b_lat (
2347 .scan_in(ecc_b_lat_scanin),
2348 .scan_out(ecc_b_lat_scanout),
2349 .din ({e_cecc_b_in ,
2350 e_uecc_b_in }),
2351 .dout ({e_cecc_b ,
2352 e_uecc_b }),
2353 .l1clk(l1clk),
2354 .siclk(siclk),
2355 .soclk(soclk)
2356);
2357
2358assign fls_irf_cecc_b =
2359 e_cecc_b;
2360assign fls_irf_uecc_b =
2361 e_uecc_b;
2362
2363assign misalign_b_in =
2364 exu_misalign_m & ~exu_cecc_m & ~exu_uecc_m & dec_inst_valid_m;
2365
2366tlu_fls_ctl_msff_ctl_macro__width_1 misalign_b_lat (
2367 .scan_in(misalign_b_lat_scanin),
2368 .scan_out(misalign_b_lat_scanout),
2369 .din (misalign_b_in ),
2370 .dout (misalign_b ),
2371 .l1clk(l1clk),
2372 .siclk(siclk),
2373 .soclk(soclk)
2374);
2375
2376tlu_fls_ctl_msff_ctl_macro__width_1 e_oor_va_b_lat (
2377 .scan_in(e_oor_va_b_lat_scanin),
2378 .scan_out(e_oor_va_b_lat_scanout),
2379 .din (exu_oor_va_m ),
2380 .dout (pe_oor_va_b ),
2381 .l1clk(l1clk),
2382 .siclk(siclk),
2383 .soclk(soclk)
2384);
2385
2386assign e_oor_va_b =
2387 pe_oor_va_b & ~e_cecc_b & ~e_uecc_b & pre_inst_valid_b & ~pstate_am_b;
2388
2389assign e_tcc_b_in =
2390 exu_tcc_m & ~exu_cecc_m & ~exu_uecc_m & dec_inst_valid_m;
2391
2392tlu_fls_ctl_msff_ctl_macro__width_1 e_tcc_b_lat (
2393 .scan_in(e_tcc_b_lat_scanin),
2394 .scan_out(e_tcc_b_lat_scanout),
2395 .din (e_tcc_b_in ),
2396 .dout (e_tcc_b ),
2397 .l1clk(l1clk),
2398 .siclk(siclk),
2399 .soclk(soclk)
2400);
2401
2402assign e_tof_b_in =
2403 exu_tof_m & ~exu_cecc_m & ~exu_uecc_m & dec_inst_valid_m;
2404
2405tlu_fls_ctl_msff_ctl_macro__width_1 e_tof_b_lat (
2406 .scan_in(e_tof_b_lat_scanin),
2407 .scan_out(e_tof_b_lat_scanout),
2408 .din (e_tof_b_in ),
2409 .dout (e_tof_b ),
2410 .l1clk(l1clk),
2411 .siclk(siclk),
2412 .soclk(soclk)
2413);
2414
2415assign e_fill_b_in =
2416 exu_fill_m & ~exu_cecc_m & ~exu_uecc_m & dec_inst_valid_m;
2417
2418tlu_fls_ctl_msff_ctl_macro__width_1 e_fill_b_lat (
2419 .scan_in(e_fill_b_lat_scanin),
2420 .scan_out(e_fill_b_lat_scanout),
2421 .din (e_fill_b_in ),
2422 .dout (e_fill_b ),
2423 .l1clk(l1clk),
2424 .siclk(siclk),
2425 .soclk(soclk)
2426);
2427
2428
2429
2430
2431// Possible exceptions on branches:
2432// - decode exceptions
2433// - VA out of range on branch
2434// - Misaligned address (for jmpl and return)
2435// - Fill exceptions (for return)
2436// - disrupting exceptions
2437// - PMU and debug exceptions
2438assign br_exc_b =
2439 pdec_exc_b | br_oor_va_b | br_ra_oor_va_b | misalign_b |
2440 e_fill_b |
2441 e_cecc_b | e_uecc_b |
2442 (| perf_trap_b[3:0]) | ibp_b | iaw_b | tct_b | target_oor_b |
2443 disrupting_flush_pending_tid_dec_b;
2444
2445assign br_taken_b_in =
2446 dec_br_taken_m & dec_inst_valid_m & ~dec_illegal_inst_m;
2447
2448tlu_fls_ctl_msff_ctl_macro__width_1 br_taken_b_lat (
2449 .scan_in(br_taken_b_lat_scanin),
2450 .scan_out(br_taken_b_lat_scanout),
2451 .din (br_taken_b_in ),
2452 .dout (pre_br_taken_b ),
2453 .l1clk(l1clk),
2454 .siclk(siclk),
2455 .soclk(soclk)
2456);
2457
2458assign br_taken_b =
2459 pre_br_taken_b & ~br_exc_b;
2460
2461tlu_fls_ctl_msff_ctl_macro__width_1 annul_ds_m_lat (
2462 .scan_in(annul_ds_m_lat_scanin),
2463 .scan_out(annul_ds_m_lat_scanout),
2464 .din (dec_annul_ds_m ),
2465 .dout (pre_annul_ds_b ),
2466 .l1clk(l1clk),
2467 .siclk(siclk),
2468 .soclk(soclk)
2469);
2470
2471assign annul_ds_b =
2472 pre_annul_ds_b & ~br_exc_b;
2473
2474tlu_fls_ctl_msff_ctl_macro__width_1 ds_b_lat (
2475 .scan_in(ds_b_lat_scanin),
2476 .scan_out(ds_b_lat_scanout),
2477 .din (dec_ds_m ),
2478 .dout (pre_ds_b ),
2479 .l1clk(l1clk),
2480 .siclk(siclk),
2481 .soclk(soclk)
2482);
2483
2484assign ds_b =
2485 pre_ds_b & ~ibp_b & ~iaw_b & ~tct_b & ~target_oor_b &
2486 ~(| {perf_trap_b[3:0],
2487 disrupting_flush_pending_tid_dec_b});
2488
2489// This takes care of M stage flushes
2490// Take PMU trap if IE == 1 and PIL != 15
2491assign perf_trap_m[3:0] =
2492 pmu_tlu_trap_m[3:0] & tid_dec_m[3:0] & pil_mask_15[3:0] &
2493 {4 {dec_inst_valid_m}};
2494
2495tlu_fls_ctl_msff_ctl_macro__width_4 perf_trap_b_lat (
2496 .scan_in(perf_trap_b_lat_scanin),
2497 .scan_out(perf_trap_b_lat_scanout),
2498 .din (perf_trap_m [3:0] ),
2499 .dout (perf_trap_b [3:0] ),
2500 .l1clk(l1clk),
2501 .siclk(siclk),
2502 .soclk(soclk)
2503);
2504
2505tlu_fls_ctl_msff_ctl_macro__width_4 pil_mask_15_lat (
2506 .scan_in(pil_mask_15_lat_scanin),
2507 .scan_out(pil_mask_15_lat_scanout),
2508 .din (trl_pil_mask_15 [3:0] ),
2509 .dout (pil_mask_15 [3:0] ),
2510 .l1clk(l1clk),
2511 .siclk(siclk),
2512 .soclk(soclk)
2513);
2514
2515// Instruction breakpoint
2516assign ibe_m =
2517 | (tsd_hpstate_ibe[3:0] & tid_dec_m[3:0]);
2518
2519assign ibp_b_in =
2520 exu_ibp_m & ibe_m & dec_inst_valid_m & ~itlb_err_m &
2521 ~i_l2_unde_m & ~ic_err_m;
2522
2523tlu_fls_ctl_msff_ctl_macro__width_1 ibp_b_lat (
2524 .scan_in(ibp_b_lat_scanin),
2525 .scan_out(ibp_b_lat_scanout),
2526 .din (ibp_b_in ),
2527 .dout (ibp_b ),
2528 .l1clk(l1clk),
2529 .siclk(siclk),
2530 .soclk(soclk)
2531);
2532
2533assign itlb_va_pa_enabled =
2534 | (tid_dec_m[3:0] & ~hpstate_hpriv[3:0] &
2535 ~tsd_hpstate_red[3:0] & immu_enable[3:0]);
2536
2537assign iaw_exc_m_in =
2538 (& pct_iaw_exc_e[1:0]);
2539
2540tlu_fls_ctl_msff_ctl_macro__width_1 iaw_exc_m_lat (
2541 .scan_in(iaw_exc_m_lat_scanin),
2542 .scan_out(iaw_exc_m_lat_scanout),
2543 .din (iaw_exc_m_in ),
2544 .dout (iaw_exc_m ),
2545 .l1clk(l1clk),
2546 .siclk(siclk),
2547 .soclk(soclk)
2548);
2549
2550assign iaw_b_in =
2551 iaw_exc_m & itlb_va_pa_enabled & dec_inst_valid_m;
2552
2553tlu_fls_ctl_msff_ctl_macro__width_1 iaw_b_lat (
2554 .scan_in(iaw_b_lat_scanin),
2555 .scan_out(iaw_b_lat_scanout),
2556 .din (iaw_b_in ),
2557 .dout (iaw_b ),
2558 .l1clk(l1clk),
2559 .siclk(siclk),
2560 .soclk(soclk)
2561);
2562
2563assign pstate_tct_m =
2564 | (tid_dec_m[3:0] & tsd_pstate_tct[3:0]);
2565
2566tlu_fls_ctl_msff_ctl_macro__width_1 pstate_tct_b_lat (
2567 .scan_in(pstate_tct_b_lat_scanin),
2568 .scan_out(pstate_tct_b_lat_scanout),
2569 .din (pstate_tct_m ),
2570 .dout (pstate_tct_b ),
2571 .l1clk(l1clk),
2572 .siclk(siclk),
2573 .soclk(soclk)
2574);
2575
2576assign tct_b_in_b =
2577 ~(((dec_br_taken_m & ~exu_cecc_m & ~exu_uecc_m) |
2578 dec_done_inst_m | dec_retry_inst_m) &
2579 dec_inst_valid_m & ~dec_illegal_inst_m & pstate_tct_m);
2580
2581assign tct_b_in =
2582 ~(tct_b_in_b | exu_fill_m);
2583
2584tlu_fls_ctl_msff_ctl_macro__width_1 tct_b_lat (
2585 .scan_in(tct_b_lat_scanin),
2586 .scan_out(tct_b_lat_scanout),
2587 .din (tct_b_in ),
2588 .dout (ptct_b ),
2589 .l1clk(l1clk),
2590 .siclk(siclk),
2591 .soclk(soclk)
2592);
2593
2594assign tct_b =
2595 ptct_b | (e_tcc_b & pstate_tct_b);
2596
2597
2598assign cti_b_in =
2599 dec_cti_inst_m | dec_done_inst_m | dec_retry_inst_m;
2600
2601tlu_fls_ctl_msff_ctl_macro__width_1 cti_b_lat (
2602 .scan_in(cti_b_lat_scanin),
2603 .scan_out(cti_b_lat_scanout),
2604 .din (cti_b_in ),
2605 .dout (cti_b ),
2606 .l1clk(l1clk),
2607 .siclk(siclk),
2608 .soclk(soclk)
2609);
2610
2611
2612
2613////////////////////////////////////////////////////////////////////////////////
2614// Pipe signals from B to W
2615
2616// lsu_tlu_twocycle_m means that the first beat is in M
2617// FGU pdist is handled differently
2618assign twocycle_inst_b =
2619 l_tlu_twocycle_b & lsu_inst_b & inst_valid_b & ~disrupting_flush_b &
2620 ~e_cecc_b & ~e_uecc_b & ~pmu_debug_exc_b & ~dec_flush_b ;
2621
2622tlu_fls_ctl_msff_ctl_macro__width_1 twocycle_inst_w_lat (
2623 .scan_in(twocycle_inst_w_lat_scanin),
2624 .scan_out(twocycle_inst_w_lat_scanout),
2625 .l1clk (l1clk_pm1 ),
2626 .din (twocycle_inst_b ),
2627 .dout (ptwocycle_inst_w ),
2628 .siclk(siclk),
2629 .soclk(soclk)
2630);
2631
2632assign twocycle_inst_w =
2633 ptwocycle_inst_w & ~exc_for_w;
2634
2635tlu_fls_ctl_msff_ctl_macro__width_1 d_flush_w_lat (
2636 .scan_in(d_flush_w_lat_scanin),
2637 .scan_out(d_flush_w_lat_scanout),
2638 .l1clk (l1clk_pm1 ),
2639 .din (dec_flush_b ),
2640 .dout (d_flush_w ),
2641 .siclk(siclk),
2642 .soclk(soclk)
2643);
2644
2645assign dec_inst_valid_b[3] =
2646 tid_b[1] & tid_b[0] & inst_valid_b;
2647assign dec_inst_valid_b[2] =
2648 tid_b[1] & ~tid_b[0] & inst_valid_b;
2649assign dec_inst_valid_b[1] =
2650 ~tid_b[1] & tid_b[0] & inst_valid_b;
2651assign dec_inst_valid_b[0] =
2652 ~tid_b[1] & ~tid_b[0] & inst_valid_b;
2653
2654assign tid_dec_w_in[3:0] =
2655 dec_inst_valid_b[3:0] & {4 {~dec_flush_b}};
2656
2657assign fls_tid_dec_w_in[3:0] =
2658 tid_dec_w_in[3:0];
2659
2660tlu_fls_ctl_msff_ctl_macro__width_4 tid_dec_w_lat (
2661 .scan_in(tid_dec_w_lat_scanin),
2662 .scan_out(tid_dec_w_lat_scanout),
2663 .l1clk (l1clk_pm1 ),
2664 .din (tid_dec_w_in [3:0] ),
2665 .dout (tid_dec_w [3:0] ),
2666 .siclk(siclk),
2667 .soclk(soclk)
2668);
2669
2670assign fls_tid_dec_w[3:0] =
2671 tid_dec_w[3:0];
2672
2673assign pstate_am_b_in =
2674 | (tsd_pstate_am[3:0] & tid_dec_m[3:0]);
2675
2676tlu_fls_ctl_msff_ctl_macro__width_1 pstate_am_b_lat (
2677 .scan_in(pstate_am_b_lat_scanin),
2678 .scan_out(pstate_am_b_lat_scanout),
2679 .din (pstate_am_b_in ),
2680 .dout (pstate_am_b ),
2681 .l1clk(l1clk),
2682 .siclk(siclk),
2683 .soclk(soclk)
2684);
2685
2686assign fls_pstate_am_b_ =
2687 ~pstate_am_b;
2688
2689tlu_fls_ctl_msff_ctl_macro__width_1 pstate_am_w_lat (
2690 .scan_in(pstate_am_w_lat_scanin),
2691 .scan_out(pstate_am_w_lat_scanout),
2692 .l1clk (l1clk_pm1 ),
2693 .din (pstate_am_b ),
2694 .dout (pstate_am_w ),
2695 .siclk(siclk),
2696 .soclk(soclk)
2697);
2698
2699assign fls_pstate_am_w_ =
2700 ~pstate_am_w;
2701
2702assign dec_two_tid_b[3:0] =
2703 { tid_b[1] & tid_b[0],
2704 tid_b[1] & ~tid_b[0],
2705 ~tid_b[1] & tid_b[0],
2706 ~tid_b[1] & ~tid_b[0]} &
2707 {4 {inst_valid_b | twocycle_inst_w}};
2708
2709assign two_tid_dec_w_in[3:0] =
2710 dec_two_tid_b[3:0] & {4 {~dec_flush_b}};
2711
2712tlu_fls_ctl_msff_ctl_macro__width_4 two_tid_dec_w_lat (
2713 .scan_in(two_tid_dec_w_lat_scanin),
2714 .scan_out(two_tid_dec_w_lat_scanout),
2715 .l1clk (l1clk_pm1 ),
2716 .din (two_tid_dec_w_in [3:0] ),
2717 .dout (two_tid_dec_w [3:0] ),
2718 .siclk(siclk),
2719 .soclk(soclk)
2720);
2721
2722
2723tlu_fls_ctl_msff_ctl_macro__width_1 inst_valid_w_lat (
2724 .scan_in(inst_valid_w_lat_scanin),
2725 .scan_out(inst_valid_w_lat_scanout),
2726 .l1clk (l1clk_pm1 ),
2727 .din (inst_valid_b ),
2728 .dout (pre_inst_valid_w ),
2729 .siclk(siclk),
2730 .soclk(soclk)
2731);
2732
2733assign inst_valid_w =
2734 pre_inst_valid_w & ~d_flush_w;
2735
2736assign illegal_inst_w_in =
2737 illegal_inst_b &
2738 kill_exc_gt_6_lt_7_b_;
2739
2740tlu_fls_ctl_msff_ctl_macro__width_1 illegal_inst_w_lat (
2741 .scan_in(illegal_inst_w_lat_scanin),
2742 .scan_out(illegal_inst_w_lat_scanout),
2743 .l1clk (l1clk_pm1 ),
2744 .din (illegal_inst_w_in ),
2745 .dout (illegal_inst_w ),
2746 .siclk(siclk),
2747 .soclk(soclk)
2748);
2749
2750assign itlb_miss_w_in =
2751 itlb_miss_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2752
2753tlu_fls_ctl_msff_ctl_macro__width_1 itlb_miss_w_lat (
2754 .scan_in(itlb_miss_w_lat_scanin),
2755 .scan_out(itlb_miss_w_lat_scanout),
2756 .l1clk (l1clk_pm1 ),
2757 .din (itlb_miss_w_in ),
2758 .dout (itlb_miss_w ),
2759 .siclk(siclk),
2760 .soclk(soclk)
2761);
2762
2763
2764assign ra_itlb_miss_w_in =
2765 ra_itlb_miss_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2766
2767tlu_fls_ctl_msff_ctl_macro__width_1 ra_itlb_miss_w_lat (
2768 .scan_in(ra_itlb_miss_w_lat_scanin),
2769 .scan_out(ra_itlb_miss_w_lat_scanout),
2770 .l1clk (l1clk_pm1 ),
2771 .din (ra_itlb_miss_w_in ),
2772 .dout (ra_itlb_miss_w ),
2773 .siclk(siclk),
2774 .soclk(soclk)
2775);
2776
2777assign itlb_priv_exc_w_in =
2778 itlb_priv_exc_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2779
2780tlu_fls_ctl_msff_ctl_macro__width_1 itlb_priv_exc_w_lat (
2781 .scan_in(itlb_priv_exc_w_lat_scanin),
2782 .scan_out(itlb_priv_exc_w_lat_scanout),
2783 .l1clk (l1clk_pm1 ),
2784 .din (itlb_priv_exc_w_in ),
2785 .dout (itlb_priv_exc_w ),
2786 .siclk(siclk),
2787 .soclk(soclk)
2788);
2789
2790assign itlb_nfo_exc_w_in =
2791 itlb_nfo_exc_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2792
2793tlu_fls_ctl_msff_ctl_macro__width_1 itlb_nfo_exc_w_lat (
2794 .scan_in(itlb_nfo_exc_w_lat_scanin),
2795 .scan_out(itlb_nfo_exc_w_lat_scanout),
2796 .l1clk (l1clk_pm1 ),
2797 .din (itlb_nfo_exc_w_in ),
2798 .dout (itlb_nfo_exc_w ),
2799 .siclk(siclk),
2800 .soclk(soclk)
2801);
2802
2803assign i_l2_unde_w_in =
2804 i_l2_unde_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2805
2806tlu_fls_ctl_msff_ctl_macro__width_1 i_l2_err_w_lat (
2807 .scan_in(i_l2_err_w_lat_scanin),
2808 .scan_out(i_l2_err_w_lat_scanout),
2809 .l1clk (l1clk_pm1 ),
2810 .din (i_l2_unde_w_in ),
2811 .dout (i_l2_unde_w ),
2812 .siclk(siclk),
2813 .soclk(soclk)
2814);
2815
2816assign i_oor_va_w_in =
2817 (i_oor_va_b | target_oor_va_b) & kill_exc_iar_irr_b_;
2818
2819tlu_fls_ctl_msff_ctl_macro__width_1 i_oor_va_w_lat (
2820 .scan_in(i_oor_va_w_lat_scanin),
2821 .scan_out(i_oor_va_w_lat_scanout),
2822 .l1clk (l1clk_pm1 ),
2823 .din (i_oor_va_w_in ),
2824 .dout (i_oor_va_w ),
2825 .siclk(siclk),
2826 .soclk(soclk)
2827);
2828
2829assign i_ra_oor_va_w_in =
2830 (i_ra_oor_va_b | target_ra_oor_va_b) & kill_exc_iar_irr_b_;
2831
2832tlu_fls_ctl_msff_ctl_macro__width_1 i_ra_oor_va_w_lat (
2833 .scan_in(i_ra_oor_va_w_lat_scanin),
2834 .scan_out(i_ra_oor_va_w_lat_scanout),
2835 .l1clk (l1clk_pm1 ),
2836 .din (i_ra_oor_va_w_in ),
2837 .dout (i_ra_oor_va_w ),
2838 .siclk(siclk),
2839 .soclk(soclk)
2840);
2841
2842assign itlb_err_w_in =
2843 itlb_err_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2844
2845tlu_fls_ctl_msff_ctl_macro__width_1 itlb_err_w_lat (
2846 .scan_in(itlb_err_w_lat_scanin),
2847 .scan_out(itlb_err_w_lat_scanout),
2848 .l1clk (l1clk_pm1 ),
2849 .din (itlb_err_w_in ),
2850 .dout (itlb_err_w ),
2851 .siclk(siclk),
2852 .soclk(soclk)
2853);
2854
2855assign ic_err_w_in =
2856 ic_err_b & ~itlb_err_b & ~m103663_exc_b & kill_exc_lt_6_b_;
2857
2858assign icp_req_in =
2859 ic_err_w_in;
2860
2861tlu_fls_ctl_msff_ctl_macro__width_1 ic_err_w_lat (
2862 .scan_in(ic_err_w_lat_scanin),
2863 .scan_out(ic_err_w_lat_scanout),
2864 .l1clk (l1clk_pm1 ),
2865 .din (icp_req_in ),
2866 .dout (icp_req ),
2867 .siclk(siclk),
2868 .soclk(soclk)
2869);
2870
2871assign done_inst_w_in =
2872 done_inst_b & kill_exc_b_;
2873
2874tlu_fls_ctl_msff_ctl_macro__width_1 done_inst_w_lat (
2875 .scan_in(done_inst_w_lat_scanin),
2876 .scan_out(done_inst_w_lat_scanout),
2877 .l1clk (l1clk_pm1 ),
2878 .din (done_inst_w_in ),
2879 .dout (done_inst_w ),
2880 .siclk(siclk),
2881 .soclk(soclk)
2882);
2883
2884assign retry_inst_w_in =
2885 retry_inst_b & kill_exc_b_;
2886
2887tlu_fls_ctl_msff_ctl_macro__width_1 retry_inst_w_lat (
2888 .scan_in(retry_inst_w_lat_scanin),
2889 .scan_out(retry_inst_w_lat_scanout),
2890 .l1clk (l1clk_pm1 ),
2891 .din (retry_inst_w_in ),
2892 .dout (retry_inst_w ),
2893 .siclk(siclk),
2894 .soclk(soclk)
2895);
2896
2897// Disrupting single step completion must be higher priority
2898// than SIR because it's really for the previous instruction
2899assign sir_w_in =
2900 sir_b & ~dsc_req_in & ~target_oor_b;
2901
2902tlu_fls_ctl_msff_ctl_macro__width_1 sir_w_lat (
2903 .scan_in(sir_w_lat_scanin),
2904 .scan_out(sir_w_lat_scanout),
2905 .l1clk (l1clk_pm1 ),
2906 .din (sir_w_in ),
2907 .dout (sir_w ),
2908 .siclk(siclk),
2909 .soclk(soclk)
2910);
2911
2912assign hpriv_exc_w_in =
2913 hpriv_exc_b & kill_exc_gt_6_lt_7_b_;
2914
2915tlu_fls_ctl_msff_ctl_macro__width_1 hpriv_exc_w_lat (
2916 .scan_in(hpriv_exc_w_lat_scanin),
2917 .scan_out(hpriv_exc_w_lat_scanout),
2918 .l1clk (l1clk_pm1 ),
2919 .din (hpriv_exc_w_in ),
2920 .dout (hpriv_exc_w ),
2921 .siclk(siclk),
2922 .soclk(soclk)
2923);
2924
2925assign priv_exc_w_in =
2926 priv_exc_b & ~illegal_inst_b & ~hpriv_exc_b & kill_exc_ge_7_lt_11_b_;
2927
2928tlu_fls_ctl_msff_ctl_macro__width_1 priv_exc_w_lat (
2929 .scan_in(priv_exc_w_lat_scanin),
2930 .scan_out(priv_exc_w_lat_scanout),
2931 .l1clk (l1clk_pm1 ),
2932 .din (priv_exc_w_in ),
2933 .dout (priv_exc_w ),
2934 .siclk(siclk),
2935 .soclk(soclk)
2936);
2937
2938assign fpdisable_exc_w_in =
2939 fpdisable_exc_b & ~(lsu_inst_b & lsu_illegal_inst_b) &
2940 kill_exc_ge_7_lt_11_b_;
2941
2942tlu_fls_ctl_msff_ctl_macro__width_1 fpdisable_exc_w_lat (
2943 .scan_in(fpdisable_exc_w_lat_scanin),
2944 .scan_out(fpdisable_exc_w_lat_scanout),
2945 .l1clk (l1clk_pm1 ),
2946 .din (fpdisable_exc_w_in ),
2947 .dout (fpdisable_exc_w ),
2948 .siclk(siclk),
2949 .soclk(soclk)
2950);
2951
2952assign tcc_w_in =
2953 e_tcc_b & kill_exc_b_;
2954
2955tlu_fls_ctl_msff_ctl_macro__width_1 tcc_w_lat (
2956 .scan_in(tcc_w_lat_scanin),
2957 .scan_out(tcc_w_lat_scanout),
2958 .l1clk (l1clk_pm1 ),
2959 .din (tcc_w_in ),
2960 .dout (tcc_w ),
2961 .siclk(siclk),
2962 .soclk(soclk)
2963);
2964
2965assign tof_w_in =
2966 e_tof_b & kill_exc_b_;
2967
2968tlu_fls_ctl_msff_ctl_macro__width_1 tof_w_lat (
2969 .scan_in(tof_w_lat_scanin),
2970 .scan_out(tof_w_lat_scanout),
2971 .l1clk (l1clk_pm1 ),
2972 .din (tof_w_in ),
2973 .dout (tof_w ),
2974 .siclk(siclk),
2975 .soclk(soclk)
2976);
2977
2978assign kill_e_f_ecc_b =
2979 lsu_inst_b & lsu_illegal_inst_b;
2980
2981assign e_ecc_b =
2982 e_cecc_b | e_uecc_b;
2983
2984assign e_f_ecc_w_in =
2985 (e_ecc_b & ~kill_e_f_ecc_b & kill_exc_ge_7_lt_11_b_) |
2986 (f_ecc_b & fgu_inst_b & ~kill_e_f_ecc_b & kill_exc_ge_7_lt_11_b_);
2987
2988tlu_fls_ctl_msff_ctl_macro__width_1 e_ecc_w_lat (
2989 .scan_in(e_ecc_w_lat_scanin),
2990 .scan_out(e_ecc_w_lat_scanout),
2991 .l1clk (l1clk_pm1 ),
2992 .din (e_f_ecc_w_in ),
2993 .dout (e_f_ecc_w ),
2994 .siclk(siclk),
2995 .soclk(soclk)
2996);
2997
2998tlu_fls_ctl_msff_ctl_macro__width_1 kill_irf_ecc_w_lat (
2999 .scan_in(kill_irf_ecc_w_lat_scanin),
3000 .scan_out(kill_irf_ecc_w_lat_scanout),
3001 .din (kill_e_f_ecc_b ),
3002 .dout (kill_e_f_ecc_w ),
3003 .l1clk(l1clk),
3004 .siclk(siclk),
3005 .soclk(soclk)
3006);
3007
3008assign fls_kill_irf_ecc_w =
3009 kill_e_f_ecc_w;
3010
3011assign e_misalign_b =
3012 misalign_b & ~fnn_b & ~fno_b;
3013
3014assign e_misalign_w_in =
3015 e_misalign_b & kill_exc_ge_7_lt_11_b_;
3016
3017tlu_fls_ctl_msff_ctl_macro__width_1 e_misalign_w_lat (
3018 .scan_in(e_misalign_w_lat_scanin),
3019 .scan_out(e_misalign_w_lat_scanout),
3020 .l1clk (l1clk_pm1 ),
3021 .din (e_misalign_w_in ),
3022 .dout (e_misalign_w ),
3023 .siclk(siclk),
3024 .soclk(soclk)
3025);
3026
3027tlu_fls_ctl_msff_ctl_macro__width_4 immu_enable_lat (
3028 .scan_in(immu_enable_lat_scanin),
3029 .scan_out(immu_enable_lat_scanout),
3030 .din (lsu_immu_enable [3:0] ),
3031 .dout (immu_enable [3:0] ),
3032 .l1clk(l1clk),
3033 .siclk(siclk),
3034 .soclk(soclk)
3035);
3036
3037assign br_real_b =
3038 | (~itlb_bypass[3:0] & ~immu_enable[3:0] & tid_dec_b[3:0]);
3039
3040assign br_bypass_b =
3041 | ( itlb_bypass[3:0] & tid_dec_b[3:0]);
3042
3043assign br_oor_va_b =
3044 e_oor_va_b & pre_br_taken_b & ~e_fill_b &
3045 ~misalign_b & ~tct_b & ~br_real_b & ~br_bypass_b;
3046
3047// Kill ld_oor_va_b if FGU inst with FRF ECC error
3048assign ld_oor_va_b =
3049 e_oor_va_b & ~lsu_va_watchpoint_b & ~lsu_tlb_bypass_b & ~lsu_align_b &
3050 ~lsu_stdf_align_b & ~lsu_lddf_align_b & ~lsu_priv_action_b &
3051 ~lsu_tlb_real_b & ~lsu_illegal_inst_b & ~fpdisable_exc_b &
3052 lsu_inst_b & (~fgu_inst_b | ~f_ecc_b);
3053
3054assign br_oor_va_w_in =
3055 br_oor_va_b & kill_exc_ge_7_lt_11_b_;
3056
3057assign br_ld_oor_va_w_in =
3058 (br_oor_va_b | ld_oor_va_b) & kill_exc_ge_7_lt_11_b_;
3059
3060tlu_fls_ctl_msff_ctl_macro__width_1 br_ld_oor_va_w_lat (
3061 .scan_in(br_ld_oor_va_w_lat_scanin),
3062 .scan_out(br_ld_oor_va_w_lat_scanout),
3063 .l1clk (l1clk_pm1 ),
3064 .din (br_ld_oor_va_w_in ),
3065 .dout (br_ld_oor_va_w ),
3066 .siclk(siclk),
3067 .soclk(soclk)
3068);
3069
3070assign br_ra_oor_va_b =
3071 e_oor_va_b & pre_br_taken_b & ~e_fill_b &
3072 ~misalign_b & ~tct_b & br_real_b;
3073
3074// Kill ld_ra_oor_va_b if FGU inst with FRF ECC error
3075assign ld_ra_oor_va_b =
3076 e_oor_va_b & ~lsu_va_watchpoint_b & ~lsu_tlb_bypass_b & ~lsu_align_b &
3077 ~lsu_stdf_align_b & ~lsu_lddf_align_b & ~lsu_priv_action_b &
3078 ~lsu_illegal_inst_b & ~fpdisable_exc_b & lsu_inst_b & lsu_tlb_real_b &
3079 (~fgu_inst_b | ~f_ecc_b);
3080
3081assign br_ra_oor_va_w_in =
3082 br_ra_oor_va_b & kill_exc_ge_7_lt_11_b_;
3083
3084assign br_ld_ra_oor_va_w_in =
3085 (br_ra_oor_va_b | ld_ra_oor_va_b) & kill_exc_ge_7_lt_11_b_;
3086
3087tlu_fls_ctl_msff_ctl_macro__width_1 br_ld_ra_oor_va_w_lat (
3088 .scan_in(br_ld_ra_oor_va_w_lat_scanin),
3089 .scan_out(br_ld_ra_oor_va_w_lat_scanout),
3090 .l1clk (l1clk_pm1 ),
3091 .din (br_ld_ra_oor_va_w_in ),
3092 .dout (br_ld_ra_oor_va_w ),
3093 .siclk(siclk),
3094 .soclk(soclk)
3095);
3096
3097// Hang onto VA hole exceptions on branches with delay slots when the branch
3098// occurs with the TLB in bypass mode because the delay slot instruction can
3099// take us out of bypass. In this case, the processor should take an
3100// instruction_address_range or instruction_real_range trap on the target
3101
3102// Same basic scenario, but PSTATE.am is set when branch is executed but
3103// clears due to delay slot.
3104
3105// Same scenario, but now take a trap in the delay slot and return from
3106// trap handler while changing PSTATE.am or activating translation
3107//
3108// So the generic fix is to carry a 'oor_va' bit with the PC and NPC
3109// even into the trap stack. pct tracks the 'oor_va' bit into the E stage
3110
3111tlu_fls_ctl_msff_ctl_macro__width_2 pc_oor_va_b_lat (
3112 .scan_in(pc_oor_va_b_lat_scanin),
3113 .scan_out(pc_oor_va_b_lat_scanout),
3114 .din ({pct_pc_oor_va_e ,
3115 pc_oor_va_m }),
3116 .dout ({pc_oor_va_m ,
3117 pc_oor_va_b }),
3118 .l1clk(l1clk),
3119 .siclk(siclk),
3120 .soclk(soclk)
3121);
3122
3123// instruction_VA_watchpoint is higher priority
3124assign target_oor_b =
3125 pc_oor_va_b & pre_inst_valid_b & ~br_bypass_b & ~pstate_am_b & ~iaw_b;
3126
3127assign target_oor_va_b =
3128 target_oor_b & ~br_real_b;
3129
3130assign target_ra_oor_va_b =
3131 target_oor_b & br_real_b;
3132
3133assign snn_b =
3134 exu_spill_b & exu_normal_b & ~e_cecc_b & ~e_uecc_b;
3135assign sno_b =
3136 exu_spill_b & ~exu_normal_b & ~e_cecc_b & ~e_uecc_b;
3137assign fnn_b =
3138 e_fill_b & exu_normal_b & ~e_cecc_b & ~e_uecc_b;
3139assign fno_b =
3140 e_fill_b & ~exu_normal_b & ~e_cecc_b & ~e_uecc_b;
3141
3142assign snn_w_in =
3143 snn_b & kill_exc_ge_7_lt_11_b_;
3144assign sno_w_in =
3145 sno_b & kill_exc_ge_7_lt_11_b_;
3146assign fnn_w_in =
3147 fnn_b & kill_exc_ge_7_lt_11_b_;
3148assign fno_w_in =
3149 fno_b & kill_exc_ge_7_lt_11_b_;
3150
3151tlu_fls_ctl_msff_ctl_macro__width_1 snn_w_lat (
3152 .scan_in(snn_w_lat_scanin),
3153 .scan_out(snn_w_lat_scanout),
3154 .l1clk (l1clk_pm1 ),
3155 .din (snn_w_in ),
3156 .dout (snn_w ),
3157 .siclk(siclk),
3158 .soclk(soclk)
3159);
3160
3161tlu_fls_ctl_msff_ctl_macro__width_1 sno_w_lat (
3162 .scan_in(sno_w_lat_scanin),
3163 .scan_out(sno_w_lat_scanout),
3164 .l1clk (l1clk_pm1 ),
3165 .din (sno_w_in ),
3166 .dout (sno_w ),
3167 .siclk(siclk),
3168 .soclk(soclk)
3169);
3170
3171tlu_fls_ctl_msff_ctl_macro__width_1 fnn_w_lat (
3172 .scan_in(fnn_w_lat_scanin),
3173 .scan_out(fnn_w_lat_scanout),
3174 .l1clk (l1clk_pm1 ),
3175 .din (fnn_w_in ),
3176 .dout (fnn_w ),
3177 .siclk(siclk),
3178 .soclk(soclk)
3179);
3180
3181tlu_fls_ctl_msff_ctl_macro__width_1 fno_w_lat (
3182 .scan_in(fno_w_lat_scanin),
3183 .scan_out(fno_w_lat_scanout),
3184 .l1clk (l1clk_pm1 ),
3185 .din (fno_w_in ),
3186 .dout (fno_w ),
3187 .siclk(siclk),
3188 .soclk(soclk)
3189);
3190
3191assign clw_b =
3192 exu_cleanwin_b & ~e_cecc_b & ~e_uecc_b;
3193
3194assign clw_w_in =
3195 clw_b & kill_exc_ge_7_lt_11_b_;
3196
3197tlu_fls_ctl_msff_ctl_macro__width_1 clw_w_lat (
3198 .scan_in(clw_w_lat_scanin),
3199 .scan_out(clw_w_lat_scanout),
3200 .l1clk (l1clk_pm1 ),
3201 .din (clw_w_in ),
3202 .dout (clw_w ),
3203 .siclk(siclk),
3204 .soclk(soclk)
3205);
3206
3207tlu_fls_ctl_msff_ctl_macro__width_1 lsu_inst_w_lat (
3208 .scan_in(lsu_inst_w_lat_scanin),
3209 .scan_out(lsu_inst_w_lat_scanout),
3210 .l1clk (l1clk_pm1 ),
3211 .din (lsu_inst_b ),
3212 .dout (lsu_inst_w ),
3213 .siclk(siclk),
3214 .soclk(soclk)
3215);
3216
3217assign fls_lsu_inst_w =
3218 lsu_inst_w & pre_inst_valid_w;
3219
3220tlu_fls_ctl_msff_ctl_macro__width_1 cti_w_lat (
3221 .scan_in(cti_w_lat_scanin),
3222 .scan_out(cti_w_lat_scanout),
3223 .l1clk (l1clk_pm1 ),
3224 .din (cti_b ),
3225 .dout (cti_w ),
3226 .siclk(siclk),
3227 .soclk(soclk)
3228);
3229
3230assign wstate3_b[2:0] =
3231 ({3 { dec_inst_valid_b[3]}} & exu_wstate_b [2:0]) |
3232 ({3 {~dec_inst_valid_b[3]}} & wstate3_w [2:0]) ;
3233
3234tlu_fls_ctl_msff_ctl_macro__width_3 wstate3_w_lat (
3235 .scan_in(wstate3_w_lat_scanin),
3236 .scan_out(wstate3_w_lat_scanout),
3237 .l1clk (l1clk_pm1 ),
3238 .din (wstate3_b [2:0] ),
3239 .dout (wstate3_w [2:0] ),
3240 .siclk(siclk),
3241 .soclk(soclk)
3242);
3243
3244assign wstate2_b[2:0] =
3245 ({3 { dec_inst_valid_b[2]}} & exu_wstate_b [2:0]) |
3246 ({3 {~dec_inst_valid_b[2]}} & wstate2_w [2:0]) ;
3247
3248tlu_fls_ctl_msff_ctl_macro__width_3 wstate2_w_lat (
3249 .scan_in(wstate2_w_lat_scanin),
3250 .scan_out(wstate2_w_lat_scanout),
3251 .l1clk (l1clk_pm1 ),
3252 .din (wstate2_b [2:0] ),
3253 .dout (wstate2_w [2:0] ),
3254 .siclk(siclk),
3255 .soclk(soclk)
3256);
3257
3258assign wstate1_b[2:0] =
3259 ({3 { dec_inst_valid_b[1]}} & exu_wstate_b [2:0]) |
3260 ({3 {~dec_inst_valid_b[1]}} & wstate1_w [2:0]) ;
3261
3262tlu_fls_ctl_msff_ctl_macro__width_3 wstate1_w_lat (
3263 .scan_in(wstate1_w_lat_scanin),
3264 .scan_out(wstate1_w_lat_scanout),
3265 .l1clk (l1clk_pm1 ),
3266 .din (wstate1_b [2:0] ),
3267 .dout (wstate1_w [2:0] ),
3268 .siclk(siclk),
3269 .soclk(soclk)
3270);
3271
3272assign wstate0_b[2:0] =
3273 ({3 { dec_inst_valid_b[0]}} & exu_wstate_b [2:0]) |
3274 ({3 {~dec_inst_valid_b[0]}} & wstate0_w [2:0]) ;
3275
3276tlu_fls_ctl_msff_ctl_macro__width_3 wstate0_w_lat (
3277 .scan_in(wstate0_w_lat_scanin),
3278 .scan_out(wstate0_w_lat_scanout),
3279 .l1clk (l1clk_pm1 ),
3280 .din (wstate0_b [2:0] ),
3281 .dout (wstate0_w [2:0] ),
3282 .siclk(siclk),
3283 .soclk(soclk)
3284);
3285
3286assign fls_wstate3[2:0] =
3287 wstate3_w[2:0];
3288assign fls_wstate2[2:0] =
3289 wstate2_w[2:0];
3290assign fls_wstate1[2:0] =
3291 wstate1_w[2:0];
3292assign fls_wstate0[2:0] =
3293 wstate0_w[2:0];
3294
3295assign in_user_b =
3296 ( | (tid_dec_b[3:0] &
3297 ~(hpstate_hpriv[3:0] | tsd_pstate_priv[3:0])));
3298
3299assign trap_number_b[7:0] =
3300 {exu_trap_number_b[7] & ~in_user_b, exu_trap_number_b[6:0]};
3301
3302tlu_fls_ctl_msff_ctl_macro__width_8 trap_number_w_lat (
3303 .scan_in(trap_number_w_lat_scanin),
3304 .scan_out(trap_number_w_lat_scanout),
3305 .l1clk (l1clk_pm1 ),
3306 .din (trap_number_b [7:0] ),
3307 .dout (trap_number_w [7:0] ),
3308 .siclk(siclk),
3309 .soclk(soclk)
3310);
3311
3312assign trap_number_3_in[7:0] =
3313 ({8 { tid_dec_w[3]}} & trap_number_w [7:0]) |
3314 ({8 {~tid_dec_w[3]}} & trap_number_3 [7:0]) ;
3315
3316tlu_fls_ctl_msff_ctl_macro__width_8 trap_number_3_lat (
3317 .scan_in(trap_number_3_lat_scanin),
3318 .scan_out(trap_number_3_lat_scanout),
3319 .din (trap_number_3_in [7:0] ),
3320 .dout (trap_number_3 [7:0] ),
3321 .l1clk(l1clk),
3322 .siclk(siclk),
3323 .soclk(soclk)
3324);
3325
3326assign trap_number_2_in[7:0] =
3327 ({8 { tid_dec_w[2]}} & trap_number_w [7:0]) |
3328 ({8 {~tid_dec_w[2]}} & trap_number_2 [7:0]) ;
3329
3330tlu_fls_ctl_msff_ctl_macro__width_8 trap_number_2_lat (
3331 .scan_in(trap_number_2_lat_scanin),
3332 .scan_out(trap_number_2_lat_scanout),
3333 .din (trap_number_2_in [7:0] ),
3334 .dout (trap_number_2 [7:0] ),
3335 .l1clk(l1clk),
3336 .siclk(siclk),
3337 .soclk(soclk)
3338);
3339
3340assign trap_number_1_in[7:0] =
3341 ({8 { tid_dec_w[1]}} & trap_number_w [7:0]) |
3342 ({8 {~tid_dec_w[1]}} & trap_number_1 [7:0]) ;
3343
3344tlu_fls_ctl_msff_ctl_macro__width_8 trap_number_1_lat (
3345 .scan_in(trap_number_1_lat_scanin),
3346 .scan_out(trap_number_1_lat_scanout),
3347 .din (trap_number_1_in [7:0] ),
3348 .dout (trap_number_1 [7:0] ),
3349 .l1clk(l1clk),
3350 .siclk(siclk),
3351 .soclk(soclk)
3352);
3353
3354assign trap_number_0_in[7:0] =
3355 ({8 { tid_dec_w[0]}} & trap_number_w [7:0]) |
3356 ({8 {~tid_dec_w[0]}} & trap_number_0 [7:0]) ;
3357
3358tlu_fls_ctl_msff_ctl_macro__width_8 trap_number_0_lat (
3359 .scan_in(trap_number_0_lat_scanin),
3360 .scan_out(trap_number_0_lat_scanout),
3361 .din (trap_number_0_in [7:0] ),
3362 .dout (trap_number_0 [7:0] ),
3363 .l1clk(l1clk),
3364 .siclk(siclk),
3365 .soclk(soclk)
3366);
3367
3368assign fls_tcc_number_3[7:0] =
3369 trap_number_3_in[7:0];
3370assign fls_tcc_number_2[7:0] =
3371 trap_number_2_in[7:0];
3372assign fls_tcc_number_1[7:0] =
3373 trap_number_1_in[7:0];
3374assign fls_tcc_number_0[7:0] =
3375 trap_number_0_in[7:0];
3376
3377assign lddf_align_b =
3378 lsu_lddf_align_b & lsu_inst_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3379 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3380
3381assign lddf_align_w_in =
3382 lddf_align_b & kill_exc_ge_7_lt_11_b_;
3383
3384tlu_fls_ctl_msff_ctl_macro__width_1 lddf_align_w_lat (
3385 .scan_in(lddf_align_w_lat_scanin),
3386 .scan_out(lddf_align_w_lat_scanout),
3387 .l1clk (l1clk_pm1 ),
3388 .din (lddf_align_w_in ),
3389 .dout (lddf_align_w ),
3390 .siclk(siclk),
3391 .soclk(soclk)
3392);
3393
3394assign stdf_align_b =
3395 lsu_stdf_align_b & lsu_inst_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3396 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3397
3398assign stdf_align_w_in =
3399 stdf_align_b & kill_exc_ge_7_lt_11_b_;
3400
3401tlu_fls_ctl_msff_ctl_macro__width_1 stdf_align_w_lat (
3402 .scan_in(stdf_align_w_lat_scanin),
3403 .scan_out(stdf_align_w_lat_scanout),
3404 .l1clk (l1clk_pm1 ),
3405 .din (stdf_align_w_in ),
3406 .dout (stdf_align_w ),
3407 .siclk(siclk),
3408 .soclk(soclk)
3409);
3410
3411assign daccess_prot_b =
3412 lsu_daccess_prot_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3413 ~lsu_align_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3414 ~lsu_priv_action_b & ~lsu_stdf_align_b & ~lsu_lddf_align_b &
3415 ~lsu_va_watchpoint_b & ~lsu_dae_invalid_asi_b &
3416 ~lsu_dae_priv_viol_b & ~lsu_dae_nc_page_b & ~lsu_dae_nfo_page_b &
3417 ~lsu_dae_so_page & ~dtlb_error_b & lsu_inst_b &
3418 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3419
3420assign daccess_prot_w_in =
3421 daccess_prot_b & kill_exc_b_;
3422
3423tlu_fls_ctl_msff_ctl_macro__width_1 daccess_prot_w_lat (
3424 .scan_in(daccess_prot_w_lat_scanin),
3425 .scan_out(daccess_prot_w_lat_scanout),
3426 .l1clk (l1clk_pm1 ),
3427 .din (daccess_prot_w_in ),
3428 .dout (daccess_prot_w ),
3429 .siclk(siclk),
3430 .soclk(soclk)
3431);
3432
3433assign priv_action_b =
3434 lsu_priv_action_b &
3435 ~lsu_align_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3436 ~lsu_stdf_align_b & ~lsu_lddf_align_b & lsu_inst_b &
3437 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3438
3439
3440assign priv_action_w_in =
3441 priv_action_b & kill_exc_ge_7_lt_11_b_;
3442
3443tlu_fls_ctl_msff_ctl_macro__width_1 priv_action_w_lat (
3444 .scan_in(priv_action_w_lat_scanin),
3445 .scan_out(priv_action_w_lat_scanout),
3446 .l1clk (l1clk_pm1 ),
3447 .din (priv_action_w_in ),
3448 .dout (priv_action_w ),
3449 .siclk(siclk),
3450 .soclk(soclk)
3451);
3452
3453assign va_watchpoint_b =
3454 lsu_va_watchpoint_b & ~lsu_tlb_bypass_b & ~lsu_align_b &
3455 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3456 ~lsu_priv_action_b & ~lsu_stdf_align_b & ~lsu_lddf_align_b &
3457 ~lsu_illegal_inst_b & ~fpdisable_exc_b &
3458 lsu_inst_b;
3459
3460assign va_watchpoint_w_in =
3461 va_watchpoint_b & kill_exc_ge_7_lt_11_b_;
3462
3463tlu_fls_ctl_msff_ctl_macro__width_1 va_watchpoint_w_lat (
3464 .scan_in(va_watchpoint_w_lat_scanin),
3465 .scan_out(va_watchpoint_w_lat_scanout),
3466 .l1clk (l1clk_pm1 ),
3467 .din (va_watchpoint_w_in ),
3468 .dout (va_watchpoint_w ),
3469 .siclk(siclk),
3470 .soclk(soclk)
3471);
3472
3473assign pa_watchpoint_b =
3474 lsu_pa_watchpoint_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3475 lsu_tlb_miss_b_ &
3476 ~lsu_align_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3477 ~lsu_priv_action_b & ~lsu_stdf_align_b & ~lsu_lddf_align_b &
3478 ~lsu_va_watchpoint_b & ~lsu_dae_invalid_asi_b &
3479 ~lsu_dae_priv_viol_b & ~lsu_dae_nc_page_b & ~lsu_dae_nfo_page_b &
3480 ~lsu_dae_so_page & ~dtlb_error_b & ~lsu_daccess_prot_b & lsu_inst_b &
3481 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3482
3483assign pa_watchpoint_w_in =
3484 pa_watchpoint_b & kill_exc_b_;
3485
3486tlu_fls_ctl_msff_ctl_macro__width_1 pa_watchpoint_w_lat (
3487 .scan_in(pa_watchpoint_w_lat_scanin),
3488 .scan_out(pa_watchpoint_w_lat_scanout),
3489 .l1clk (l1clk_pm1 ),
3490 .din (pa_watchpoint_w_in ),
3491 .dout (pa_watchpoint_w ),
3492 .siclk(siclk),
3493 .soclk(soclk)
3494);
3495
3496assign align_b =
3497 lsu_align_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b & lsu_inst_b &
3498 ~lsu_illegal_inst_b & ~fpdisable_exc_b;
3499
3500
3501assign align_w_in =
3502 align_b & kill_exc_ge_7_lt_11_b_;
3503
3504tlu_fls_ctl_msff_ctl_macro__width_1 align_w_lat (
3505 .scan_in(align_w_lat_scanin),
3506 .scan_out(align_w_lat_scanout),
3507 .l1clk (l1clk_pm1 ),
3508 .din (align_w_in ),
3509 .dout (align_w ),
3510 .siclk(siclk),
3511 .soclk(soclk)
3512);
3513
3514// lsu_perfmon_trap_b can assert for TLB miss or for data cache miss
3515// If both signals assert, then the pic_overflow should have priority
3516// if the trap is not masked
3517assign dtlb_miss_b =
3518 ~lsu_tlb_miss_b_ & lsu_inst_b & ~lsu_tlb_real_b & ~lsu_priv_action_b &
3519 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3520 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b & ~e_oor_va_b &
3521 ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b & ~fpdisable_exc_b &
3522 ~lsu_dae_invalid_asi_b &
3523 ~perfmon_trap_b &
3524 ~ld_oor_va_b & ~ld_ra_oor_va_b & ~dtlb_error_b;
3525
3526assign dtlb_miss_w_in =
3527 dtlb_miss_b & kill_exc_b_;
3528
3529tlu_fls_ctl_msff_ctl_macro__width_1 dtlb_w_lat (
3530 .scan_in(dtlb_w_lat_scanin),
3531 .scan_out(dtlb_w_lat_scanout),
3532 .l1clk (l1clk_pm1 ),
3533 .din (dtlb_miss_w_in ),
3534 .dout (dtlb_miss_w ),
3535 .siclk(siclk),
3536 .soclk(soclk)
3537);
3538
3539assign ra_dtlb_miss_b =
3540 ~lsu_tlb_miss_b_ & lsu_inst_b & lsu_tlb_real_b & ~lsu_priv_action_b &
3541 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3542 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b & ~e_oor_va_b &
3543 ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b & ~fpdisable_exc_b &
3544 ~lsu_dae_invalid_asi_b &
3545 ~perfmon_trap_b &
3546 ~ld_oor_va_b & ~ld_ra_oor_va_b & ~dtlb_error_b;
3547
3548assign ra_dtlb_miss_w_in =
3549 ra_dtlb_miss_b & kill_exc_b_;
3550
3551tlu_fls_ctl_msff_ctl_macro__width_1 ra_dtlb_w_lat (
3552 .scan_in(ra_dtlb_w_lat_scanin),
3553 .scan_out(ra_dtlb_w_lat_scanout),
3554 .l1clk (l1clk_pm1 ),
3555 .din (ra_dtlb_miss_w_in ),
3556 .dout (ra_dtlb_miss_w ),
3557 .siclk(siclk),
3558 .soclk(soclk)
3559);
3560
3561tlu_fls_ctl_msff_ctl_macro__width_1 l_real_w_lat (
3562 .scan_in(l_real_w_lat_scanin),
3563 .scan_out(l_real_w_lat_scanout),
3564 .l1clk (l1clk_pm1 ),
3565 .din (lsu_tlb_real_b ),
3566 .dout (l_real_w ),
3567 .siclk(siclk),
3568 .soclk(soclk)
3569);
3570
3571assign dae_invalid_asi_b =
3572 lsu_dae_invalid_asi_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3573 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3574 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3575 ~lsu_priv_action_b & ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b &
3576 ~fpdisable_exc_b & lsu_inst_b;
3577
3578assign dae_invalid_asi_w_in =
3579 dae_invalid_asi_b & kill_exc_b_;
3580
3581tlu_fls_ctl_msff_ctl_macro__width_1 dae_invalid_asi_w_lat (
3582 .scan_in(dae_invalid_asi_w_lat_scanin),
3583 .scan_out(dae_invalid_asi_w_lat_scanout),
3584 .l1clk (l1clk_pm1 ),
3585 .din (dae_invalid_asi_w_in ),
3586 .dout (dae_invalid_asi_w ),
3587 .siclk(siclk),
3588 .soclk(soclk)
3589);
3590
3591assign dae_nc_page_b =
3592 lsu_dae_nc_page_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3593 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3594 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3595 ~lsu_dae_invalid_asi_b & ~lsu_dae_priv_viol_b & ~lsu_priv_action_b &
3596 ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b & ~fpdisable_exc_b &
3597 ~dtlb_error_b & lsu_inst_b;
3598
3599assign dae_nc_page_w_in =
3600 dae_nc_page_b & kill_exc_b_;
3601
3602tlu_fls_ctl_msff_ctl_macro__width_1 dae_nc_page_w_lat (
3603 .scan_in(dae_nc_page_w_lat_scanin),
3604 .scan_out(dae_nc_page_w_lat_scanout),
3605 .l1clk (l1clk_pm1 ),
3606 .din (dae_nc_page_w_in ),
3607 .dout (dae_nc_page_w ),
3608 .siclk(siclk),
3609 .soclk(soclk)
3610);
3611
3612assign dae_nfo_page_b =
3613 lsu_dae_nfo_page_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3614 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3615 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3616 ~lsu_dae_invalid_asi_b & ~lsu_dae_priv_viol_b & ~lsu_dae_nc_page_b &
3617 ~lsu_priv_action_b & ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b &
3618 ~fpdisable_exc_b & ~dtlb_error_b & lsu_inst_b;
3619
3620assign dae_nfo_page_w_in =
3621 dae_nfo_page_b & kill_exc_b_;
3622
3623tlu_fls_ctl_msff_ctl_macro__width_1 dae_nfo_page_w_lat (
3624 .scan_in(dae_nfo_page_w_lat_scanin),
3625 .scan_out(dae_nfo_page_w_lat_scanout),
3626 .l1clk (l1clk_pm1 ),
3627 .din (dae_nfo_page_w_in ),
3628 .dout (dae_nfo_page_w ),
3629 .siclk(siclk),
3630 .soclk(soclk)
3631);
3632
3633assign dae_priv_viol_b =
3634 lsu_dae_priv_viol_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3635 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3636 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3637 ~lsu_dae_invalid_asi_b & ~lsu_priv_action_b & ~lsu_va_watchpoint_b &
3638 ~lsu_illegal_inst_b & ~fpdisable_exc_b & ~dtlb_error_b & lsu_inst_b;
3639
3640assign dae_priv_viol_w_in =
3641 dae_priv_viol_b & kill_exc_b_;
3642
3643tlu_fls_ctl_msff_ctl_macro__width_1 dae_priv_viol_w_lat (
3644 .scan_in(dae_priv_viol_w_lat_scanin),
3645 .scan_out(dae_priv_viol_w_lat_scanout),
3646 .l1clk (l1clk_pm1 ),
3647 .din (dae_priv_viol_w_in ),
3648 .dout (dae_priv_viol_w ),
3649 .siclk(siclk),
3650 .soclk(soclk)
3651);
3652
3653assign dae_so_page_b =
3654 lsu_dae_so_page & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3655 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3656 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3657 ~lsu_dae_invalid_asi_b & ~lsu_dae_priv_viol_b & ~lsu_dae_nc_page_b &
3658 ~lsu_priv_action_b & ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b &
3659 ~fpdisable_exc_b & ~dtlb_error_b & lsu_inst_b;
3660
3661assign dae_so_page_w_in =
3662 dae_so_page_b & kill_exc_b_;
3663
3664tlu_fls_ctl_msff_ctl_macro__width_1 dae_so_page_w_lat (
3665 .scan_in(dae_so_page_w_lat_scanin),
3666 .scan_out(dae_so_page_w_lat_scanout),
3667 .l1clk (l1clk_pm1 ),
3668 .din (dae_so_page_w_in ),
3669 .dout (dae_so_page_w ),
3670 .siclk(siclk),
3671 .soclk(soclk)
3672);
3673
3674assign dtlb_error_b =
3675 (lsu_dttp_err_b | lsu_dtmh_err_b | lsu_dtdp_err_b) &
3676 ~lsu_dae_invalid_asi_b &
3677 ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3678 ~lsu_align_b & ~lsu_lddf_align_b & ~lsu_stdf_align_b &
3679 ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3680 ~lsu_priv_action_b & ~lsu_va_watchpoint_b & ~lsu_illegal_inst_b &
3681 ~fpdisable_exc_b & lsu_inst_b;
3682
3683assign dtlb_error_w_in =
3684 dtlb_error_b & kill_exc_b_;
3685
3686tlu_fls_ctl_msff_ctl_macro__width_1 dtlb_error_w_lat (
3687 .scan_in(dtlb_error_w_lat_scanin),
3688 .scan_out(dtlb_error_w_lat_scanout),
3689 .l1clk (l1clk_pm1 ),
3690 .din (dtlb_error_w_in ),
3691 .dout (dtlb_error_w ),
3692 .siclk(siclk),
3693 .soclk(soclk)
3694);
3695
3696// If LSU signals PMU trap, and no earlier exception occurred,
3697// it will be treated as the same as if pmu_tlu_trap_m
3698// had been asserted in the M stage
3699// Prioritizing precise_perf_trap over f_ecc
3700assign perfmon_trap_b =
3701 lsu_perfmon_trap_b & pil_mask_15_b & lsu_inst_b;
3702
3703assign precise_perf_trap_b =
3704 perfmon_trap_b & ~tlz_exc_dec_b &
3705 ~dsc_req_in &
3706 ~por_req_in & ~xir_req_in & ~ftt_req_in &
3707 ~sir_b &
3708 ~lsu_pa_watchpoint_b & ~(e_oor_va_b & ~lsu_tlb_bypass_b) &
3709 ~lsu_align_b & ~e_cecc_b & ~e_uecc_b & ~f_ecc_b &
3710 ~lsu_priv_action_b & ~lsu_stdf_align_b & ~lsu_lddf_align_b &
3711 ~lsu_va_watchpoint_b & ~lsu_dae_invalid_asi_b &
3712 ~lsu_dae_priv_viol_b & ~lsu_dae_nc_page_b & ~lsu_dae_nfo_page_b &
3713 ~lsu_dae_so_page & ~dtlb_error_b & ~lsu_daccess_prot_b & lsu_inst_b &
3714 ~lsu_illegal_inst_b & ~fpdisable_exc_b & ~debug_exc_b & ~target_oor_b;
3715
3716assign pil_mask_15_b =
3717 | (pil_mask_15[3:0] & tid_dec_b[3:0]);
3718
3719assign tlz_exc_dec_b =
3720 | (trl_tlz_exc[3:0] & tid_dec_b[3:0]);
3721
3722// precise_perf_trap_w is higher priority than disrupting exceptions
3723// and it's essentially the same as pmu_exception
3724// Prioritize precise_perf_trap_w lower than disrupting
3725// exceptions to avoid OV bit not being set when pic_oveflow
3726// trap is taken
3727assign precise_perf_trap_w_in =
3728 precise_perf_trap_b & ~disrupting_flush_b;
3729
3730tlu_fls_ctl_msff_ctl_macro__width_1 precise_perf_trap_w_lat (
3731 .scan_in(precise_perf_trap_w_lat_scanin),
3732 .scan_out(precise_perf_trap_w_lat_scanout),
3733 .l1clk (l1clk_pm1 ),
3734 .din (precise_perf_trap_w_in ),
3735 .dout (precise_perf_trap_w ),
3736 .siclk(siclk),
3737 .soclk(soclk)
3738);
3739
3740
3741// PMU trap is a disrupting exception with priority 16.0, so it needs to be
3742// higher priority than all disruptings except
3743// - disrupting single step completion
3744// - resets
3745// - deferred (store_error)
3746// - trap level zero
3747assign perf_trap_w_in =
3748 (| (perf_trap_b[3:0] & ~trl_tlz_exc[3:0])) &
3749 ~dsc_req_in &
3750 ~por_req_in & ~xir_req_in & ~ftt_req_in &
3751 ~sir_b;
3752
3753tlu_fls_ctl_msff_ctl_macro__width_1 perf_trap_w_lat (
3754 .scan_in(perf_trap_w_lat_scanin),
3755 .scan_out(perf_trap_w_lat_scanout),
3756 .l1clk (l1clk_pm1 ),
3757 .din (perf_trap_w_in ),
3758 .dout (perf_trap_w ),
3759 .siclk(siclk),
3760 .soclk(soclk)
3761);
3762
3763assign ibp_w_in =
3764 ibp_b & ~ic_err_b & ~itlb_err_b & ~illegal_inst_b & ~hpriv_exc_b &
3765 ~sir_b &
3766 ~itlb_miss_b & ~ra_itlb_miss_b & ~iaw_b & ~i_oor_va_b & ~i_ra_oor_va_b &
3767 ~target_oor_b &
3768 ~i_l2_unde_b & ~itlb_priv_exc_b & ~itlb_nfo_exc_b &
3769 kill_exc_lt_6_b_;
3770
3771tlu_fls_ctl_msff_ctl_macro__width_1 ibp_w_lat (
3772 .scan_in(ibp_w_lat_scanin),
3773 .scan_out(ibp_w_lat_scanout),
3774 .l1clk (l1clk_pm1 ),
3775 .din (ibp_w_in ),
3776 .dout (ibp_w ),
3777 .siclk(siclk),
3778 .soclk(soclk)
3779);
3780
3781assign iaw_w_in =
3782 iaw_b & kill_exc_iaw_b_;
3783
3784tlu_fls_ctl_msff_ctl_macro__width_1 iaw_w_lat (
3785 .scan_in(iaw_w_lat_scanin),
3786 .scan_out(iaw_w_lat_scanout),
3787 .l1clk (l1clk_pm1 ),
3788 .din (iaw_w_in ),
3789 .dout (iaw_w ),
3790 .siclk(siclk),
3791 .soclk(soclk)
3792);
3793
3794assign tct_w_in =
3795 tct_b & kill_exc_ge_7_lt_11_b_ & ~e_misalign_w_in & ~align_w_in &
3796 ~br_oor_va_w_in & ~br_ra_oor_va_w_in & ~illegal_inst_w_in &
3797 ~hpriv_exc_w_in & ~priv_exc_w_in & ~ic_err_w_in;
3798
3799tlu_fls_ctl_msff_ctl_macro__width_1 tct_w_lat (
3800 .scan_in(tct_w_lat_scanin),
3801 .scan_out(tct_w_lat_scanout),
3802 .l1clk (l1clk_pm1 ),
3803 .din (tct_w_in ),
3804 .dout (tct_w ),
3805 .siclk(siclk),
3806 .soclk(soclk)
3807);
3808
3809tlu_fls_ctl_msff_ctl_macro__width_4 l_spec_enable_lat (
3810 .scan_in(l_spec_enable_lat_scanin),
3811 .scan_out(l_spec_enable_lat_scanout),
3812 .din (lsu_spec_enable [3:0] ),
3813 .dout (l_spec_enable [3:0] ),
3814 .l1clk(l1clk),
3815 .siclk(siclk),
3816 .soclk(soclk)
3817);
3818
3819assign spec_enable =
3820 | (l_spec_enable[3:0] & tid_dec_b[3:0]);
3821
3822// Kill FGU predicted exception if not in spec_enable mode
3823assign f_predict_b =
3824 fgu_inst_b & fgu_predict_fx2 & ~fgu_cecc_fx2 & ~fgu_uecc_fx2 &
3825 spec_enable;
3826
3827assign f_predict_w_in =
3828 f_predict_b & kill_exc_b_;
3829
3830tlu_fls_ctl_msff_ctl_macro__width_1 f_predict_w_lat (
3831 .scan_in(f_predict_w_lat_scanin),
3832 .scan_out(f_predict_w_lat_scanout),
3833 .l1clk (l1clk_pm1 ),
3834 .din (f_predict_w_in ),
3835 .dout (f_predict_w ),
3836 .siclk(siclk),
3837 .soclk(soclk)
3838);
3839
3840assign pdist_beat2_fx2_in =
3841 fgu_pdist_beat2_fx1 & fgu_inst_b & inst_valid_b & ~disrupting_flush_b &
3842 ~pmu_debug_exc_b & ~dec_flush_b;
3843
3844tlu_fls_ctl_msff_ctl_macro__width_1 pdist_beat2_fx2_lat (
3845 .scan_in(pdist_beat2_fx2_lat_scanin),
3846 .scan_out(pdist_beat2_fx2_lat_scanout),
3847 .l1clk (l1clk_pm1 ),
3848 .din (pdist_beat2_fx2_in ),
3849 .dout (pdist_beat2_fx2 ),
3850 .siclk(siclk),
3851 .soclk(soclk)
3852);
3853
3854// Used to gate DTLB miss which can't happen for pdist
3855// and for in-pipe FRF ECC errors
3856assign f_ecc_b =
3857 fgu_inst_b & (fgu_cecc_fx2 | fgu_uecc_fx2);
3858
3859// Latch for tlu_ras_ctl
3860// No power management because this is used for both thread groups
3861tlu_fls_ctl_msff_ctl_macro__width_1 f_cecc_w_lat (
3862 .scan_in(f_cecc_w_lat_scanin),
3863 .scan_out(f_cecc_w_lat_scanout),
3864 .din (fgu_cecc_fx2 ),
3865 .dout (fls_f_cecc_w ),
3866 .l1clk(l1clk),
3867 .siclk(siclk),
3868 .soclk(soclk)
3869);
3870
3871tlu_fls_ctl_msff_ctl_macro__width_1 f_uecc_w_lat (
3872 .scan_in(f_uecc_w_lat_scanin),
3873 .scan_out(f_uecc_w_lat_scanout),
3874 .din (fgu_uecc_fx2 ),
3875 .dout (fls_f_uecc_w ),
3876 .l1clk(l1clk),
3877 .siclk(siclk),
3878 .soclk(soclk)
3879);
3880
3881
3882assign pdist_ecc_b =
3883 pdist_beat2_fx2 & (fgu_cecc_fx2 | fgu_uecc_fx2);
3884
3885assign pdist_ecc_w_in[3:0] =
3886 {4 {pdist_ecc_b}} & tid_dec_w[3:0];
3887
3888tlu_fls_ctl_msff_ctl_macro__width_4 pdist_ecc_w_lat (
3889 .scan_in(pdist_ecc_w_lat_scanin),
3890 .scan_out(pdist_ecc_w_lat_scanout),
3891 .l1clk (l1clk_pm1 ),
3892 .din (pdist_ecc_w_in [3:0] ),
3893 .dout (pdist_ecc_w [3:0] ),
3894 .siclk(siclk),
3895 .soclk(soclk)
3896);
3897
3898assign m_asi_ecc_b[3:0] =
3899 ({4 {mmu_asi_cecc | mmu_asi_uecc}} &
3900 {4 {mmu_asi_tid[2] == thread_group}} &
3901 { mmu_asi_tid[1] & mmu_asi_tid[0],
3902 mmu_asi_tid[1] & ~mmu_asi_tid[0],
3903 ~mmu_asi_tid[1] & mmu_asi_tid[0],
3904 ~mmu_asi_tid[1] & ~mmu_asi_tid[0]}) ;
3905
3906assign asi_ecc_b[3:0] =
3907 m_asi_ecc_b[3:0] |
3908 ({4 {asi_ece_exc | asi_eue_exc }} &
3909 {4 {asi_ecc_tid[2] == thread_group}} &
3910 { asi_ecc_tid[1] & asi_ecc_tid[0],
3911 asi_ecc_tid[1] & ~asi_ecc_tid[0],
3912 ~asi_ecc_tid[1] & asi_ecc_tid[0],
3913 ~asi_ecc_tid[1] & ~asi_ecc_tid[0]}) |
3914 tel_tsacu_exc[3:0];
3915
3916tlu_fls_ctl_msff_ctl_macro__width_4 asi_ecc_w_lat (
3917 .scan_in(asi_ecc_w_lat_scanin),
3918 .scan_out(asi_ecc_w_lat_scanout),
3919 .din (asi_ecc_b [3:0] ),
3920 .dout (asi_ecc_w [3:0] ),
3921 .l1clk(l1clk),
3922 .siclk(siclk),
3923 .soclk(soclk)
3924);
3925
3926// Instruction_access_MMU_error (HW TW MRA or L2 U/ND ECC error)
3927// Does not need to flush because flush occurred at beginning of HW TW
3928assign ime_b[3:0] =
3929 mmu_i_eccerr[3:0] &
3930 {mmu_thr3_err_type_b1,
3931 mmu_thr2_err_type_b1,
3932 mmu_thr1_err_type_b1,
3933 mmu_thr0_err_type_b1};
3934
3935tlu_fls_ctl_msff_ctl_macro__width_4 ime_w_lat (
3936 .scan_in(ime_w_lat_scanin),
3937 .scan_out(ime_w_lat_scanout),
3938 .din (ime_b [3:0] ),
3939 .dout (ime_w [3:0] ),
3940 .l1clk(l1clk),
3941 .siclk(siclk),
3942 .soclk(soclk)
3943);
3944
3945// Data_access_MMU_error (HW TW MRA or L2 U/ND ECC error)
3946// Does not need to flush because flush occurred at beginning of HW TW
3947assign dme_b[3:0] =
3948 mmu_d_eccerr[3:0] &
3949 {mmu_thr3_err_type_b1,
3950 mmu_thr2_err_type_b1,
3951 mmu_thr1_err_type_b1,
3952 mmu_thr0_err_type_b1};
3953
3954tlu_fls_ctl_msff_ctl_macro__width_4 dme_w_lat (
3955 .scan_in(dme_w_lat_scanin),
3956 .scan_out(dme_w_lat_scanout),
3957 .din (dme_b [3:0] ),
3958 .dout (dme_w [3:0] ),
3959 .l1clk(l1clk),
3960 .siclk(siclk),
3961 .soclk(soclk)
3962);
3963
3964
3965// unsupported_page_size in TSB config or data_in regs
3966// Does need to flush because only lsu_sync occurred (no previous flush)
3967// Pipe it one more cycle so MRA parity error can catch it
3968assign m_dae_req_m[3:0] =
3969 {4 {mmu_dae_req}} &
3970 {4 {mmu_dae_tid[2] == thread_group}} &
3971 { mmu_dae_tid[1] & mmu_dae_tid[0],
3972 mmu_dae_tid[1] & ~mmu_dae_tid[0],
3973 ~mmu_dae_tid[1] & mmu_dae_tid[0],
3974 ~mmu_dae_tid[1] & ~mmu_dae_tid[0]};
3975
3976tlu_fls_ctl_msff_ctl_macro__width_4 m_dae_req_b_lat (
3977 .scan_in(m_dae_req_b_lat_scanin),
3978 .scan_out(m_dae_req_b_lat_scanout),
3979 .din (m_dae_req_m [3:0] ),
3980 .dout (pm_dae_req_b [3:0] ),
3981 .l1clk(l1clk),
3982 .siclk(siclk),
3983 .soclk(soclk)
3984);
3985
3986assign m_dae_req_b[3:0] =
3987 pm_dae_req_b[3:0] & ~m_asi_ecc_b[3:0];
3988
3989tlu_fls_ctl_msff_ctl_macro__width_4 m_dae_req_w_lat (
3990 .scan_in(m_dae_req_w_lat_scanin),
3991 .scan_out(m_dae_req_w_lat_scanout),
3992 .din (m_dae_req_b [3:0] ),
3993 .dout (m_dae_req_w [3:0] ),
3994 .l1clk(l1clk),
3995 .siclk(siclk),
3996 .soclk(soclk)
3997);
3998
3999
4000
4001
4002////////////////////////////////////////////////////////////////////////////////
4003// NPC nonsequential on retry
4004// Flag exception on first instruction after retry
4005// Reassert exception if instruction after retry is a taken branch that does
4006// not annul delay slot
4007// Have to hold nns exception through branch taken that does not annul DS
4008// Have to suppress nns exception for any other exception
4009// Have to clear nns_exc if thread is flushed OR non-flushing exception occurs
4010
4011assign br_taken_not_annul_ds_w_in =
4012 br_taken_b & ~annul_ds_b;
4013
4014tlu_fls_ctl_msff_ctl_macro__width_1 br_taken_not_annul_ds_w_lat (
4015 .scan_in(br_taken_not_annul_ds_w_lat_scanin),
4016 .scan_out(br_taken_not_annul_ds_w_lat_scanout),
4017 .din (br_taken_not_annul_ds_w_in ),
4018 .dout (br_taken_not_annul_ds_w ),
4019 .l1clk(l1clk),
4020 .siclk(siclk),
4021 .soclk(soclk)
4022);
4023
4024assign hold_nns_exc_w[3:0] =
4025 ~tid_dec_w[3:0] | {4 {br_taken_not_annul_ds_w}} |
4026 lsu_block_store_b[3:0];
4027
4028assign clear_nns_exc_w[3:0] =
4029 ({4 {~exc_for_w}} & tid_dec_w[3:0]) | multicycle_nns_to_npc_w[3:0];
4030
4031assign flush_not_tablewalk[3:0] =
4032 (flush_ifu[3:0] & ~iht_request[3:0] & ~dht_request[3:0]) |
4033 hwtw_exception[3:0];
4034
4035assign hwtw_exception[3:0] =
4036 mmu_i_unauth_access[3:0] |
4037 mmu_i_tsb_miss[3:0] | mmu_d_tsb_miss[3:0] |
4038 mmu_i_tte_outofrange[3:0] | mmu_d_tte_outofrange[3:0] |
4039 ime_b[3:0] | dme_b[3:0] | m_dae_req_b[3:0] ;
4040
4041assign nns_exc_in[3:0] =
4042 trl_nns_exc[3:0] |
4043 (nns_exc[3:0] & (hold_nns_exc_w[3:0] | ~clear_nns_exc_w[3:0]) &
4044 ~flush_not_tablewalk[3:0]);
4045
4046tlu_fls_ctl_msff_ctl_macro__width_4 nns_exc_lat (
4047 .scan_in(nns_exc_lat_scanin),
4048 .scan_out(nns_exc_lat_scanout),
4049 .din (nns_exc_in [3:0] ),
4050 .dout (nns_exc [3:0] ),
4051 .l1clk(l1clk),
4052 .siclk(siclk),
4053 .soclk(soclk)
4054);
4055
4056assign tlu_retry_state[3:0] =
4057 nns_exc[3:0] | {4 {ssmode | domode}};
4058
4059// If the first instruction after retry is a taken branch that does not annul
4060// its delay shot,
4061// then the TNPC from the retry will be in the PC flop,
4062// otherwise it will be in the NPC flop
4063assign sync_inst_b =
4064 lsu_sync_inst_b & lsu_inst_b;
4065
4066assign nns_to_pc_b[3:0] =
4067 nns_exc[3:0] & {4 { br_taken_b & ~annul_ds_b & ~sync_inst_b}} &
4068 tid_dec_valid_b[3:0];
4069
4070// This needs to be validated with EACH multicycle instruction taking an ECC
4071// error in EVERY cycle (including the first)
4072// Multicycle are pdist, casa, std, block store
4073assign nns_to_npc_b[3:0] =
4074 nns_exc[3:0] &
4075 (({4 {~(br_taken_b & ~annul_ds_b) & ~sync_inst_b &
4076 ~(fgu_pdist_beat2_fx1 & fgu_inst_b) & ~l_tlu_twocycle_b}} &
4077 ~(lsu_block_store_b[3:0] & bsee_req_in[3:0]) &
4078 tid_dec_valid_b[3:0]) |
4079 multicycle_nns_to_npc_b[3:0]);
4080
4081assign multicycle_nns_to_npc_b[3:0] =
4082 (tid_dec_w[3:0] & {4 {beat_two_b & ~bsee_req_w_in}} &
4083 ~pdist_ecc_w_in[3:0]) |
4084 (~lsu_block_store_b[3:0] & block_store_w[3:0] &
4085 ~bsee_req_in[3:0]);
4086
4087tlu_fls_ctl_msff_ctl_macro__width_12 nns_exc_w_lat (
4088 .scan_in(nns_exc_w_lat_scanin),
4089 .scan_out(nns_exc_w_lat_scanout),
4090 .l1clk (l1clk_pm1 ),
4091 .din ({nns_to_pc_b [3:0],
4092 nns_to_npc_b [3:0],
4093 multicycle_nns_to_npc_b [3:0]}),
4094 .dout ({pnns_to_pc_w [3:0],
4095 pnns_to_npc_w [3:0],
4096 multicycle_nns_to_npc_w [3:0]}),
4097 .siclk(siclk),
4098 .soclk(soclk)
4099);
4100
4101assign nns_to_pc_w[3:0] =
4102 pnns_to_pc_w[3:0] & clear_nns_exc_w[3:0];
4103
4104assign nns_to_npc_w[3:0] =
4105 pnns_to_npc_w[3:0] & clear_nns_exc_w[3:0];
4106
4107
4108
4109////////////////////////////////////////////////////////////////////////////////
4110// Determine if instruction in M is from the same thread as in B
4111
4112assign same_thread_b_m =
4113 (((tid_m[1:0] == tid_b[1:0]) &
4114 (pre_inst_valid_b | twocycle_inst_w)) |
4115 (| (tid_dec_m[3:0] & pbsee_pending_in[3:0])) |
4116 (| (tid_dec_m[3:0] & bsee_pending [3:0])) |
4117 (| (tid_dec_m[3:0] & pdist_ecc_w_in [3:0])) ) & inst_valid_m;
4118
4119
4120
4121////////////////////////////////////////////////////////////////////////////////
4122// Determine if instruction in B had an exception
4123
4124assign itlb_exc_b =
4125 itlb_miss_b | ra_itlb_miss_b;
4126
4127assign dtlb_exc_b =
4128 ~lsu_tlb_miss_b_;
4129
4130assign pdec_exc_b =
4131 (i_l2_unde_b | i_oor_va_b | i_ra_oor_va_b | itlb_err_b |
4132 ic_err_b |
4133 pdone_inst_b | pretry_inst_b |
4134 itlb_exc_b | itlb_priv_exc_b | itlb_nfo_exc_b |
4135 pillegal_inst_b | psir_b | hpriv_exc_b |
4136 priv_exc_b | fpdisable_exc_b | pmu_debug_exc_b |
4137 disrupting_flush_b) & inst_valid_b;
4138
4139assign dec_exc_b =
4140 (i_l2_unde_b | i_oor_va_b | i_ra_oor_va_b | itlb_err_b |
4141 ic_err_b |
4142 done_inst_b | retry_inst_b |
4143 itlb_exc_b | itlb_priv_exc_b | itlb_nfo_exc_b |
4144 illegal_inst_b | sir_b | hpriv_exc_b |
4145 priv_exc_b | fpdisable_exc_b | pmu_debug_exc_b |
4146 disrupting_flush_b) & inst_valid_b;
4147
4148assign exu_exc_b =
4149 e_tcc_b | e_tof_b | e_cecc_b | e_uecc_b | misalign_b |
4150 br_oor_va_b | br_ra_oor_va_b | ld_oor_va_b | ld_ra_oor_va_b |
4151 exu_spill_b | e_fill_b | exu_cleanwin_b;
4152
4153assign lsu_exc_b =
4154 (lsu_align_b | dtlb_exc_b | lsu_dae_invalid_asi_b |
4155 lsu_dae_nc_page_b | lsu_dae_nfo_page_b | lsu_dae_priv_viol_b |
4156 lsu_dae_so_page |
4157 lsu_lddf_align_b | lsu_stdf_align_b | lsu_daccess_prot_b |
4158 lsu_priv_action_b | lsu_va_watchpoint_b | lsu_pa_watchpoint_b |
4159 lsu_dttp_err_b | lsu_dtdp_err_b | lsu_dtmh_err_b |
4160 perfmon_trap_b) &
4161 lsu_inst_b;
4162
4163assign fgu_exc_b =
4164 f_predict_b | ((fgu_cecc_fx2 | fgu_uecc_fx2) & fgu_inst_b);
4165
4166tlu_fls_ctl_msff_ctl_macro__width_4 exc_w_lat (
4167 .scan_in(exc_w_lat_scanin),
4168 .scan_out(exc_w_lat_scanout),
4169 .l1clk (l1clk_pm1 ),
4170 .din ({dec_exc_b ,
4171 exu_exc_b ,
4172 lsu_exc_b ,
4173 fgu_exc_b }),
4174 .dout ({dec_exc_w ,
4175 exu_exc_w ,
4176 lsu_exc_w ,
4177 fgu_exc_w }),
4178 .siclk(siclk),
4179 .soclk(soclk)
4180);
4181
4182assign exc_for_w =
4183 (dec_exc_w | exu_exc_w | lsu_exc_w | fgu_exc_w) &
4184 (inst_valid_w | beat_two_w);
4185assign exception_for_w =
4186 exc_for_w |
4187 bsee_req_w | (| (pdist_ecc_w[3:0] & tid_dec_b[3:0]));
4188
4189
4190
4191////////////////////////////////////////////////////////////////////////////////
4192// Generate flushes
4193
4194tlu_fls_ctl_msff_ctl_macro__width_4 trap_flush_lat (
4195 .scan_in(trap_flush_lat_scanin),
4196 .scan_out(trap_flush_lat_scanout),
4197 .din ({lsu_trap_flush [3:0]}),
4198 .dout ({ptrap_flush [3:0]}),
4199 .l1clk(l1clk),
4200 .siclk(siclk),
4201 .soclk(soclk)
4202);
4203
4204// Prevent trap_flush from flushing machine when in disable_overlap mode
4205// because there's no flush needed -- only one instruction in the machine
4206// at a time. Also, the flush would kill the ssr_req in trl.
4207assign trap_flush[3:0] =
4208 ptrap_flush[3:0] & {4 {~domode}};
4209
4210assign preflush_exu_m =
4211 same_thread_b_m;
4212assign preflush_lsu_m =
4213 same_thread_b_m & dec_lsu_inst_m;
4214assign preflush_fgu_m =
4215 same_thread_b_m & dec_fgu_inst_m;
4216
4217tlu_fls_ctl_msff_ctl_macro__width_3 preflush_b_lat (
4218 .scan_in(preflush_b_lat_scanin),
4219 .scan_out(preflush_b_lat_scanout),
4220 .din ({preflush_exu_m ,
4221 preflush_lsu_m ,
4222 preflush_fgu_m }),
4223 .dout ({preflush_exu_b ,
4224 preflush_lsu_b ,
4225 preflush_fgu_b }),
4226 .l1clk(l1clk),
4227 .siclk(siclk),
4228 .soclk(soclk)
4229);
4230
4231// Note that pmu_debug_exc_b causes a flush in the B cycle of the instruction
4232// that has these exceptions.
4233// Note that pmu_debug_exc_b is ORed into dec_exc_b, so that the execution units
4234// will receive flush_b when the instruction with the exception reaches W if
4235// the instruction in B is from the same thread
4236assign pmu_debug_exc_b =
4237 (| perf_trap_b[3:0]) | debug_exc_b;
4238
4239assign debug_exc_b =
4240 ibp_b | iaw_b | tct_b | target_oor_b;
4241
4242assign tlu_flush_exu_b =
4243 (preflush_exu_b & exception_for_w) |
4244 (preflush_lsu_b & exception_for_w) |
4245 disrupting_flush_b | pmu_debug_exc_b ;
4246
4247assign flush_lsu_b =
4248 (preflush_lsu_b & exception_for_w) |
4249 (disrupting_flush_b & lsu_inst_b ) |
4250 (pmu_debug_exc_b & lsu_inst_b ) ;
4251
4252assign flush_fgu_b =
4253 (preflush_fgu_b & exception_for_w) |
4254 (disrupting_flush_b & fgu_inst_b ) |
4255 (pmu_debug_exc_b & fgu_inst_b ) ;
4256
4257assign fls_flush_lsu_b =
4258 flush_lsu_b;
4259
4260assign fls_flush_fgu_b =
4261 flush_fgu_b;
4262
4263assign tlu_flush_lsu_b =
4264 flush_lsu_b | flsx_flush_lsu_b;
4265
4266assign tlu_flush_fgu_b =
4267 flush_fgu_b | flsx_flush_fgu_b;
4268
4269// IFU flushes regardless of whether the next instuction is from the same
4270// thread
4271// IFU not flushed in B for tct, pmu, ibp, or iaw (but execution units are);
4272// IFU flushed in W for these exceptions
4273assign sync_flush_ifu[3:0] =
4274 ({4 {exc_for_w}} & two_tid_dec_w[3:0]) |
4275 trap_flush[3:0];
4276
4277assign flush_not_disrupting[3:0] =
4278 flush_gfb[3:0] | sync_flush_ifu[3:0] | m_dae_req_w[3:0] |
4279 bsee_req[3:0] | pdist_ecc_w[3:0];
4280
4281assign flush_ifu[3:0] =
4282 flush_not_disrupting[3:0] | clear_disrupting_flush_pending_w[3:0] |
4283 (por_req[3:0] & core_running[3:0]);
4284
4285assign tlu_flush_ifu[3:0] =
4286 flush_ifu[3:0];
4287
4288assign fls_flush[3:0] =
4289 flush_ifu[3:0];
4290
4291// Flush PMU B if instruction in W had exception and instruction in B
4292// is from same thread
4293// OR
4294// NPC arrived
4295// OR
4296// disrupting flush for B
4297assign tlu_flush_pmu_b =
4298 flush_b |
4299 (| (clear_disrupting_flush_pending[3:0] & ~perf_trap_b[3:0])) |
4300 (debug_exc_b & ~(| perf_trap_b[3:0])) |
4301 tlz_exc_b;
4302
4303// Flush PMU W if instruction in W had exception
4304assign tlu_flush_pmu_w =
4305 exc_for_w & ~perf_trap_w & ~precise_perf_trap_w;
4306
4307
4308////////////////////////////////////////////////////////////////////////////////
4309// Generate flushes for G and FB stages
4310
4311assign l_tid_dec_g[3:0] =
4312 {4 {thread_group == lsu_tid_g[2]}} &
4313 { lsu_tid_g[1] & lsu_tid_g[0],
4314 lsu_tid_g[1] & ~lsu_tid_g[0],
4315 ~lsu_tid_g[1] & lsu_tid_g[0],
4316 ~lsu_tid_g[1] & ~lsu_tid_g[0]};
4317
4318assign fpx_tid_dec_fb[3:0] =
4319 {4 {thread_group == fgu_fpx_trap_tid_fw[2]}} &
4320 { fgu_fpx_trap_tid_fw[1] & fgu_fpx_trap_tid_fw[0],
4321 fgu_fpx_trap_tid_fw[1] & ~fgu_fpx_trap_tid_fw[0],
4322 ~fgu_fpx_trap_tid_fw[1] & fgu_fpx_trap_tid_fw[0],
4323 ~fgu_fpx_trap_tid_fw[1] & ~fgu_fpx_trap_tid_fw[0]};
4324
4325assign fpd_tid_dec_fb[3:0] =
4326 {4 {thread_group == fgu_fpd_trap_tid_fw[2]}} &
4327 { fgu_fpd_trap_tid_fw[1] & fgu_fpd_trap_tid_fw[0],
4328 fgu_fpd_trap_tid_fw[1] & ~fgu_fpd_trap_tid_fw[0],
4329 ~fgu_fpd_trap_tid_fw[1] & fgu_fpd_trap_tid_fw[0],
4330 ~fgu_fpd_trap_tid_fw[1] & ~fgu_fpd_trap_tid_fw[0]};
4331
4332assign dcerr_tid_dec_g[3:0] =
4333 {4 {thread_group == lsu_dcerr_tid_g[2]}} &
4334 { lsu_dcerr_tid_g[1] & lsu_dcerr_tid_g[0],
4335 lsu_dcerr_tid_g[1] & ~lsu_dcerr_tid_g[0],
4336 ~lsu_dcerr_tid_g[1] & lsu_dcerr_tid_g[0],
4337 ~lsu_dcerr_tid_g[1] & ~lsu_dcerr_tid_g[0]};
4338
4339assign l_l2_ecc_g[3:0] =
4340 {4 {lsu_dcl2u_err_g | lsu_dcl2nd_err_g}} & dcerr_tid_dec_g[3:0];
4341
4342assign l_sbdl_ecc_g[3:0] =
4343 {4 {(lsu_sbdlc_err_g | lsu_sbdlu_err_g) &
4344 (thread_group == lsu_stberr_tid_g[2])}} &
4345 { lsu_stberr_tid_g[1] & lsu_stberr_tid_g[0],
4346 lsu_stberr_tid_g[1] & ~lsu_stberr_tid_g[0],
4347 ~lsu_stberr_tid_g[1] & lsu_stberr_tid_g[0],
4348 ~lsu_stberr_tid_g[1] & ~lsu_stberr_tid_g[0]};
4349
4350// lsu_priv_action_g can't happen for a L2 miss, so
4351// it will not happen on the same instruction as lsu_perfmon_trap_g
4352// lsu_priv_action_g and lsu_sbdp[cu]_err_g/lsu_sbapp_err_g/lsu_sbdiou_err_g
4353// can happen simultaneously for same thread;
4354// the store buffer errors are
4355// disrupting, so no reason to prioritize
4356// lsu_priv_action_g cannot occur on same thread on same cycle as
4357// lsu_sbdl[cu]_err_g
4358assign priv_action_g[3:0] =
4359 {4 {lsu_priv_action_g}} & l_tid_dec_g[3:0];
4360
4361assign precise_perf_trap_g[3:0] =
4362 {4 {lsu_perfmon_trap_g & ~lsu_dcl2u_err_g & ~lsu_dcl2nd_err_g}} &
4363 pil_mask_15[3:0] & dcerr_tid_dec_g[3:0];
4364
4365assign fpx_ieee_exc_fb[3:0] =
4366 {4 {fgu_fpx_ieee_trap_fw}} & fpx_tid_dec_fb[3:0];
4367
4368assign fpd_ieee_exc_fb[3:0] =
4369 {4 {fgu_fpd_ieee_trap_fw}} & fpd_tid_dec_fb[3:0];
4370
4371assign fpx_unfin_exc_fb[3:0] =
4372 {4 {fgu_fpx_unfin_fw}} & fpx_tid_dec_fb[3:0];
4373
4374assign fpd_unfin_exc_fb[3:0] =
4375 {4 {fgu_fpd_unfin_fw}} & fpd_tid_dec_fb[3:0];
4376
4377assign idiv0_exc_fb[3:0] =
4378 {4 {fgu_fpd_idiv0_trap_fw}} & fpx_tid_dec_fb[3:0];
4379
4380assign flush_gfb_in[3:0] =
4381 l_l2_ecc_g[3:0] | priv_action_g[3:0] |
4382 precise_perf_trap_g[3:0] |
4383 l_sbdl_ecc_g[3:0] |
4384 fpx_ieee_exc_fb[3:0] | fpd_ieee_exc_fb[3:0] |
4385 fpx_unfin_exc_fb[3:0] | fpd_unfin_exc_fb[3:0] |
4386 idiv0_exc_fb[3:0] | asi_ecc_b[3:0];
4387
4388tlu_fls_ctl_msff_ctl_macro__width_4 flush_gfb_lat (
4389 .scan_in(flush_gfb_lat_scanin),
4390 .scan_out(flush_gfb_lat_scanout),
4391 .din (flush_gfb_in [3:0] ),
4392 .dout (flush_gfb [3:0] ),
4393 .l1clk(l1clk),
4394 .siclk(siclk),
4395 .soclk(soclk)
4396);
4397
4398tlu_fls_ctl_msff_ctl_macro__width_4 l_l2_ecc_w_lat (
4399 .scan_in(l_l2_ecc_w_lat_scanin),
4400 .scan_out(l_l2_ecc_w_lat_scanout),
4401 .din (l_l2_ecc_g [3:0] ),
4402 .dout (l_l2_ecc_w [3:0] ),
4403 .l1clk(l1clk),
4404 .siclk(siclk),
4405 .soclk(soclk)
4406);
4407
4408tlu_fls_ctl_msff_ctl_macro__width_4 l_sbdl_ecc_w_lat (
4409 .scan_in(l_sbdl_ecc_w_lat_scanin),
4410 .scan_out(l_sbdl_ecc_w_lat_scanout),
4411 .din (l_sbdl_ecc_g [3:0] ),
4412 .dout (l_sbdl_ecc_w [3:0] ),
4413 .l1clk(l1clk),
4414 .siclk(siclk),
4415 .soclk(soclk)
4416);
4417
4418tlu_fls_ctl_msff_ctl_macro__width_4 priv_action_g_w_lat (
4419 .scan_in(priv_action_g_w_lat_scanin),
4420 .scan_out(priv_action_g_w_lat_scanout),
4421 .din (priv_action_g [3:0] ),
4422 .dout (priv_action_g_w[3:0] ),
4423 .l1clk(l1clk),
4424 .siclk(siclk),
4425 .soclk(soclk)
4426);
4427
4428tlu_fls_ctl_msff_ctl_macro__width_4 precise_perf_trap_g_w_lat (
4429 .scan_in(precise_perf_trap_g_w_lat_scanin),
4430 .scan_out(precise_perf_trap_g_w_lat_scanout),
4431 .din (precise_perf_trap_g [3:0] ),
4432 .dout (precise_perf_trap_g_w [3:0] ),
4433 .l1clk(l1clk),
4434 .siclk(siclk),
4435 .soclk(soclk)
4436);
4437
4438assign ieee_exc_fb[3:0] =
4439 fpx_ieee_exc_fb[3:0] | fpd_ieee_exc_fb[3:0];
4440
4441tlu_fls_ctl_msff_ctl_macro__width_4 ieee_exc_fw_lat (
4442 .scan_in(ieee_exc_fw_lat_scanin),
4443 .scan_out(ieee_exc_fw_lat_scanout),
4444 .din (ieee_exc_fb [3:0] ),
4445 .dout (ieee_exc_fw [3:0] ),
4446 .l1clk(l1clk),
4447 .siclk(siclk),
4448 .soclk(soclk)
4449);
4450
4451assign unfin_fb[3:0] =
4452 fpx_unfin_exc_fb[3:0] | fpd_unfin_exc_fb[3:0];
4453
4454tlu_fls_ctl_msff_ctl_macro__width_4 unfin_fw_lat (
4455 .scan_in(unfin_fw_lat_scanin),
4456 .scan_out(unfin_fw_lat_scanout),
4457 .din (unfin_fb [3:0] ),
4458 .dout (unfin_fw [3:0] ),
4459 .l1clk(l1clk),
4460 .siclk(siclk),
4461 .soclk(soclk)
4462);
4463
4464tlu_fls_ctl_msff_ctl_macro__width_4 idiv0_exc_fw_lat (
4465 .scan_in(idiv0_exc_fw_lat_scanin),
4466 .scan_out(idiv0_exc_fw_lat_scanout),
4467 .din (idiv0_exc_fb [3:0] ),
4468 .dout (idiv0_exc_fw [3:0] ),
4469 .l1clk(l1clk),
4470 .siclk(siclk),
4471 .soclk(soclk)
4472);
4473
4474
4475
4476////////////////////////////////////////////////////////////////////////////////
4477// Generate flushes for disrupting traps
4478// Includes reset requests
4479//
4480
4481// XIR is not maskable, but use this structure to simplify verification
4482assign xir_flush_in[3:0] =
4483 cxi_xir[3:0] |
4484 (pre_xir_flush[3:0] & ~(trl_trap_taken[3:0] & {4 {trl_take_xir}}));
4485
4486tlu_fls_ctl_msff_ctl_macro__width_4 xir_flush_lat (
4487 .scan_in(xir_flush_lat_scanin),
4488 .scan_out(xir_flush_lat_scanout),
4489 .din (xir_flush_in [3:0] ),
4490 .dout (pre_xir_flush [3:0] ),
4491 .l1clk(l1clk),
4492 .siclk(siclk),
4493 .soclk(soclk)
4494);
4495
4496assign xir_flush_m[3:0] =
4497 pre_xir_flush[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
4498
4499assign xir_flush_b_in =
4500 | xir_flush_m[3:0];
4501
4502tlu_fls_ctl_msff_ctl_macro__width_1 xir_flush_b_lat (
4503 .scan_in(xir_flush_b_lat_scanin),
4504 .scan_out(xir_flush_b_lat_scanout),
4505 .din (xir_flush_b_in ),
4506 .dout (xir_flush_b ),
4507 .l1clk(l1clk),
4508 .siclk(siclk),
4509 .soclk(soclk)
4510);
4511
4512
4513// Disrupting RAS errors
4514// Take disrupting RAS errors on second instruction to
4515// enter M to break the hardware_corrected_error loop on L2U/L2ND error
4516// on instruction fetch
4517
4518tlu_fls_ctl_msff_ctl_macro__width_4 pre_desr_f_lat (
4519 .scan_in(pre_desr_f_lat_scanin),
4520 .scan_out(pre_desr_f_lat_scanout),
4521 .din (dfd_fls_desr_f [3:0] ),
4522 .dout (pre_desr_f [3:0] ),
4523 .l1clk(l1clk),
4524 .siclk(siclk),
4525 .soclk(soclk)
4526);
4527
4528assign desr_f_in[3:0] =
4529 dfd_fls_desr_f[3:0] &
4530 (( pre_desr_f[3:0] & tid_dec_m[3:0] & {4 { dec_inst_valid_m}}) |
4531 ( desr_f[3:0] & ~tid_dec_m[3:0] ) |
4532 ( desr_f[3:0] & {4 {~dec_inst_valid_m}}));
4533
4534tlu_fls_ctl_msff_ctl_macro__width_4 desr_f_lat (
4535 .scan_in(desr_f_lat_scanin),
4536 .scan_out(desr_f_lat_scanout),
4537 .din (desr_f_in [3:0] ),
4538 .dout (desr_f [3:0] ),
4539 .l1clk(l1clk),
4540 .siclk(siclk),
4541 .soclk(soclk)
4542);
4543
4544tlu_fls_ctl_msff_ctl_macro__width_4 desr_s_lat (
4545 .scan_in(desr_s_lat_scanin),
4546 .scan_out(desr_s_lat_scanout),
4547 .din (dfd_fls_desr_s [3:0] ),
4548 .dout (desr_s [3:0] ),
4549 .l1clk(l1clk),
4550 .siclk(siclk),
4551 .soclk(soclk)
4552);
4553
4554assign eer_err_m[3:0] =
4555 pre_desr_f[3:0] & desr_f[3:0] & ~desr_s[3:0] &
4556 tlu_ceter_dhcce[3:0] & hpriv_bar_or_ie_m[3:0];
4557
4558assign eer_err_b_in =
4559 | eer_err_m[3:0];
4560
4561tlu_fls_ctl_msff_ctl_macro__width_1 eer_err_b_lat (
4562 .scan_in(eer_err_b_lat_scanin),
4563 .scan_out(eer_err_b_lat_scanout),
4564 .din (eer_err_b_in ),
4565 .dout (eer_err_b ),
4566 .l1clk(l1clk),
4567 .siclk(siclk),
4568 .soclk(soclk)
4569);
4570
4571assign ade_err_m[3:0] =
4572 pre_desr_f[3:0] & desr_f[3:0] & desr_s[3:0] &
4573 tlu_ceter_de[3:0] & hpriv_bar_or_ie_m[3:0];
4574
4575assign ade_err_b_in =
4576 | ade_err_m[3:0];
4577
4578tlu_fls_ctl_msff_ctl_macro__width_1 ade_err_b_lat (
4579 .scan_in(ade_err_b_lat_scanin),
4580 .scan_out(ade_err_b_lat_scanout),
4581 .din (ade_err_b_in ),
4582 .dout (ade_err_b ),
4583 .l1clk(l1clk),
4584 .siclk(siclk),
4585 .soclk(soclk)
4586);
4587
4588
4589
4590
4591
4592// Fatal errors, not (technically) disrupting, and not maskable
4593assign l_sbpp_in[3:0] =
4594 ({4 {(lsu_sbapp_err_g | lsu_sbdiou_err_g) &
4595 (thread_group == lsu_stberr_tid_g[2])}} &
4596 { lsu_stberr_tid_g[1] & lsu_stberr_tid_g[0],
4597 lsu_stberr_tid_g[1] & ~lsu_stberr_tid_g[0],
4598 ~lsu_stberr_tid_g[1] & lsu_stberr_tid_g[0],
4599 ~lsu_stberr_tid_g[1] & ~lsu_stberr_tid_g[0]}) |
4600 (pre_l_sbpp[3:0] & ~({4 {trl_take_ftt}} & trl_trap_taken[3:0]));
4601
4602tlu_fls_ctl_msff_ctl_macro__width_4 l_sbpp_lat (
4603 .scan_in(l_sbpp_lat_scanin),
4604 .scan_out(l_sbpp_lat_scanout),
4605 .din (l_sbpp_in [3:0] ),
4606 .dout (pre_l_sbpp [3:0] ),
4607 .l1clk(l1clk),
4608 .siclk(siclk),
4609 .soclk(soclk)
4610);
4611
4612assign l_sbpp_m[3:0] =
4613 pre_l_sbpp[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
4614
4615assign l_sbpp_b_in =
4616 (| l_sbpp_m[3:0]);
4617
4618tlu_fls_ctl_msff_ctl_macro__width_1 l_sbpp_b_lat (
4619 .scan_in(l_sbpp_b_lat_scanin),
4620 .scan_out(l_sbpp_b_lat_scanout),
4621 .din (l_sbpp_b_in ),
4622 .dout (l_sbpp_b ),
4623 .l1clk(l1clk),
4624 .siclk(siclk),
4625 .soclk(soclk)
4626);
4627
4628
4629assign ma_flush_in[3:0] =
4630 ({4 {spu_tlu_ma_int_req[3] &
4631 (thread_group == spu_tlu_ma_int_req[2])}} &
4632 { spu_tlu_ma_int_req[1] & spu_tlu_ma_int_req[0],
4633 spu_tlu_ma_int_req[1] & ~spu_tlu_ma_int_req[0],
4634 ~spu_tlu_ma_int_req[1] & spu_tlu_ma_int_req[0],
4635 ~spu_tlu_ma_int_req[1] & ~spu_tlu_ma_int_req[0]}) |
4636 (pre_ma_flush[3:0] & ~({4 {trl_take_sma}} & trl_trap_taken[3:0]) &
4637 ~asi_clear_spu_trap_req[3:0]);
4638
4639
4640tlu_fls_ctl_msff_ctl_macro__width_4 ma_flush_lat (
4641 .scan_in(ma_flush_lat_scanin),
4642 .scan_out(ma_flush_lat_scanout),
4643 .din (ma_flush_in [3:0] ),
4644 .dout (pre_ma_flush [3:0] ),
4645 .l1clk(l1clk),
4646 .siclk(siclk),
4647 .soclk(soclk)
4648);
4649
4650assign ma_flush_m[3:0] =
4651 pre_ma_flush[3:0] &
4652 hpriv_bar_or_ie_m[3:0];
4653
4654assign ma_flush_b_in =
4655 (| ma_flush_m[3:0]);
4656
4657tlu_fls_ctl_msff_ctl_macro__width_1 ma_flush_b_lat (
4658 .scan_in(ma_flush_b_lat_scanin),
4659 .scan_out(ma_flush_b_lat_scanout),
4660 .din (ma_flush_b_in ),
4661 .dout (ma_flush_b ),
4662 .l1clk(l1clk),
4663 .siclk(siclk),
4664 .soclk(soclk)
4665);
4666
4667
4668assign cwq_flush_in[3:0] =
4669 ({4 {spu_tlu_cwq_int_req[3] &
4670 (thread_group == spu_tlu_cwq_int_req[2])}} &
4671 { spu_tlu_cwq_int_req[1] & spu_tlu_cwq_int_req[0],
4672 spu_tlu_cwq_int_req[1] & ~spu_tlu_cwq_int_req[0],
4673 ~spu_tlu_cwq_int_req[1] & spu_tlu_cwq_int_req[0],
4674 ~spu_tlu_cwq_int_req[1] & ~spu_tlu_cwq_int_req[0]}) |
4675 (pre_cwq_flush[3:0] & ~({4 {trl_take_cwq}} & trl_trap_taken[3:0]) &
4676 ~asi_clear_spu_trap_req[3:0]);
4677
4678tlu_fls_ctl_msff_ctl_macro__width_4 cwq_flush_lat (
4679 .scan_in(cwq_flush_lat_scanin),
4680 .scan_out(cwq_flush_lat_scanout),
4681 .din (cwq_flush_in [3:0] ),
4682 .dout (pre_cwq_flush [3:0] ),
4683 .l1clk(l1clk),
4684 .siclk(siclk),
4685 .soclk(soclk)
4686);
4687
4688assign cwq_flush_m[3:0] =
4689 pre_cwq_flush[3:0] &
4690 hpriv_bar_or_ie_m[3:0];
4691
4692assign cwq_flush_b_in =
4693 (| cwq_flush_m[3:0]);
4694
4695tlu_fls_ctl_msff_ctl_macro__width_1 cwq_flush_b_lat (
4696 .scan_in(cwq_flush_b_lat_scanin),
4697 .scan_out(cwq_flush_b_lat_scanout),
4698 .din (cwq_flush_b_in ),
4699 .dout (cwq_flush_b ),
4700 .l1clk(l1clk),
4701 .siclk(siclk),
4702 .soclk(soclk)
4703);
4704
4705
4706
4707assign tsa_tca_ecc_error =
4708 asi_ece_exc | asi_eue_exc;
4709
4710// No longer clear queue exceptions on taking the exception;
4711// have to see the head and tail the same.
4712// This should behave as registers outside an array.
4713
4714assign check_mqr_dqr_[3:0] =
4715 ~(asi_check_qr_exc[3:0] & {4 {~trl_check_rqr}});
4716assign check_mqr_dqr[3:0] =
4717 ~check_mqr_dqr_[3:0];
4718assign check_rqr_[3:0] =
4719 ~(asi_check_qr_exc[3:0] & {4 {trl_check_rqr}});
4720assign check_rqr[3:0] =
4721 ~check_rqr_[3:0];
4722
4723assign pmqr_exc_in[3:0] =
4724 ({4 {~tsd_mrqr_exc_ & ~tsa_tca_ecc_error}} & check_mqr_dqr [3:0]) |
4725 (pmqr_exc[3:0] & check_mqr_dqr_[3:0]) ;
4726
4727tlu_fls_ctl_msff_ctl_macro__width_4 pmqr_exc_lat (
4728 .scan_in(pmqr_exc_lat_wmr_scanin),
4729 .scan_out(pmqr_exc_lat_wmr_scanout),
4730 .siclk(spc_aclk_wmr),
4731 .din (pmqr_exc_in [3:0] ),
4732 .dout (pmqr_exc [3:0] ),
4733 .l1clk(l1clk),
4734 .soclk(soclk)
4735);
4736
4737// Need mqr_exc active in M for disrupting_flush
4738// and need it in B for mqr_req
4739assign mqr_exc_m[3:0] =
4740 pmqr_exc[3:0] & hpriv_bar_and_ie[3:0] &
4741 (tid_dec_m[3:0] & {4 {dec_inst_valid_m}});
4742
4743assign mqr_exc_b_in =
4744 (| mqr_exc_m[3:0]);
4745
4746tlu_fls_ctl_msff_ctl_macro__width_1 mqr_exc_b_lat (
4747 .scan_in(mqr_exc_b_lat_scanin),
4748 .scan_out(mqr_exc_b_lat_scanout),
4749 .din (mqr_exc_b_in ),
4750 .dout (mqr_exc_b ),
4751 .l1clk(l1clk),
4752 .siclk(siclk),
4753 .soclk(soclk)
4754);
4755
4756
4757assign pdqr_exc_in[3:0] =
4758 ({4 {~tsd_dqr_exc_ & ~tsa_tca_ecc_error}} & check_mqr_dqr [3:0]) |
4759 (pdqr_exc[3:0] & check_mqr_dqr_[3:0]) ;
4760
4761tlu_fls_ctl_msff_ctl_macro__width_4 pdqr_exc_lat (
4762 .scan_in(pdqr_exc_lat_wmr_scanin),
4763 .scan_out(pdqr_exc_lat_wmr_scanout),
4764 .siclk(spc_aclk_wmr),
4765 .din (pdqr_exc_in [3:0] ),
4766 .dout (pdqr_exc [3:0] ),
4767 .l1clk(l1clk),
4768 .soclk(soclk)
4769);
4770
4771// Need dqr_exc active in M for disrupting_flush
4772// and need it in B for dqr_req
4773assign dqr_exc_m[3:0] =
4774 pdqr_exc[3:0] & hpriv_bar_and_ie[3:0] &
4775 (tid_dec_m[3:0] & {4 {dec_inst_valid_m}});
4776
4777assign dqr_exc_b_in =
4778 (| dqr_exc_m[3:0]);
4779
4780tlu_fls_ctl_msff_ctl_macro__width_1 dqr_exc_b_lat (
4781 .scan_in(dqr_exc_b_lat_scanin),
4782 .scan_out(dqr_exc_b_lat_scanout),
4783 .din (dqr_exc_b_in ),
4784 .dout (dqr_exc_b ),
4785 .l1clk(l1clk),
4786 .siclk(siclk),
4787 .soclk(soclk)
4788);
4789
4790
4791assign prqr_exc_in[3:0] =
4792 ({4 {~tsd_mrqr_exc_ & ~tsa_tca_ecc_error}} & check_rqr [3:0]) |
4793 (prqr_exc[3:0] & check_rqr_ [3:0]) ;
4794
4795tlu_fls_ctl_msff_ctl_macro__width_4 prqr_exc_lat (
4796 .scan_in(prqr_exc_lat_wmr_scanin),
4797 .scan_out(prqr_exc_lat_wmr_scanout),
4798 .siclk(spc_aclk_wmr),
4799 .din (prqr_exc_in [3:0] ),
4800 .dout (prqr_exc [3:0] ),
4801 .l1clk(l1clk),
4802 .soclk(soclk)
4803);
4804
4805// Need rqr_exc active in M for disrupting_flush
4806// and need it in B for rqr_req
4807assign rqr_exc_m[3:0] =
4808 prqr_exc[3:0] & hpriv_bar_and_ie[3:0] &
4809 (tid_dec_m[3:0] & {4 {dec_inst_valid_m}});
4810
4811assign rqr_exc_b_in =
4812 (| rqr_exc_m[3:0]);
4813
4814tlu_fls_ctl_msff_ctl_macro__width_1 rqr_exc_b_lat (
4815 .scan_in(rqr_exc_b_lat_scanin),
4816 .scan_out(rqr_exc_b_lat_scanout),
4817 .din (rqr_exc_b_in ),
4818 .dout (rqr_exc_b ),
4819 .l1clk(l1clk),
4820 .siclk(siclk),
4821 .soclk(soclk)
4822);
4823
4824
4825tlu_fls_ctl_msff_ctl_macro__width_4 ivt_lat (
4826 .scan_in(ivt_lat_scanin),
4827 .scan_out(ivt_lat_scanout),
4828 .din (cxi_ivt [3:0] ),
4829 .dout (ivt_last [3:0] ),
4830 .l1clk(l1clk),
4831 .siclk(siclk),
4832 .soclk(soclk)
4833);
4834
4835// Do not need to reinject exception on dec_flush_b because this
4836// only clears when the trap is taken
4837assign ivt_flush_in[3:0] =
4838 ivt_last[3:0] |
4839 (pre_ivt_flush[3:0] & ~asi_irl_cleared[3:0]);
4840
4841tlu_fls_ctl_msff_ctl_macro__width_4 ivt_flush_lat (
4842 .scan_in(ivt_flush_lat_wmr_scanin),
4843 .scan_out(ivt_flush_lat_wmr_scanout),
4844 .siclk(spc_aclk_wmr),
4845 .din (ivt_flush_in [3:0] ),
4846 .dout (pre_ivt_flush [3:0] ),
4847 .l1clk(l1clk),
4848 .soclk(soclk)
4849);
4850
4851assign ivt_flush_m[3:0] =
4852 pre_ivt_flush[3:0] &
4853 hpriv_bar_or_ie_m[3:0];
4854
4855assign ivt_flush_b_in =
4856 (| ivt_flush_m[3:0]);
4857
4858tlu_fls_ctl_msff_ctl_macro__width_1 ivt_flush_b_lat (
4859 .scan_in(ivt_flush_b_lat_scanin),
4860 .scan_out(ivt_flush_b_lat_scanout),
4861 .din (ivt_flush_b_in ),
4862 .dout (ivt_flush_b ),
4863 .l1clk(l1clk),
4864 .siclk(siclk),
4865 .soclk(soclk)
4866);
4867
4868
4869// Make sure these exceptions do not 'get ahead' of other disrupting exceptions
4870// This is not strictly required for correctness, but it makes
4871// verification much easier.
4872
4873assign iln_exc_m[3:0] =
4874 trl_iln_exc[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
4875
4876assign iln_exc_b_in =
4877 (| iln_exc_m[3:0]);
4878
4879tlu_fls_ctl_msff_ctl_macro__width_1 iln_exc_b_lat (
4880 .scan_in(iln_exc_b_lat_scanin),
4881 .scan_out(iln_exc_b_lat_scanout),
4882 .din (iln_exc_b_in ),
4883 .dout (iln_exc_b ),
4884 .l1clk(l1clk),
4885 .siclk(siclk),
4886 .soclk(soclk)
4887);
4888
4889
4890assign tlz_exc_m[3:0] =
4891 trl_tlz_exc[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
4892
4893assign tlz_exc_b_in =
4894 (| tlz_exc_m[3:0]);
4895
4896tlu_fls_ctl_msff_ctl_macro__width_1 tlz_exc_b_lat (
4897 .scan_in(tlz_exc_b_lat_scanin),
4898 .scan_out(tlz_exc_b_lat_scanout),
4899 .din (tlz_exc_b_in ),
4900 .dout (tlz_exc_b ),
4901 .l1clk(l1clk),
4902 .siclk(siclk),
4903 .soclk(soclk)
4904);
4905
4906
4907assign hst_exc_m[3:0] =
4908 trl_hstick_match[3:0] & tid_dec_m[3:0] & {4 {dec_inst_valid_m}};
4909
4910assign hst_exc_b_in =
4911 (| hst_exc_m[3:0]);
4912
4913tlu_fls_ctl_msff_ctl_macro__width_1 hst_exc_b_lat (
4914 .scan_in(hst_exc_b_lat_scanin),
4915 .scan_out(hst_exc_b_lat_scanout),
4916 .din (hst_exc_b_in ),
4917 .dout (hst_exc_b ),
4918 .l1clk(l1clk),
4919 .siclk(siclk),
4920 .soclk(soclk)
4921);
4922
4923
4924
4925assign no_hold_disrupting_flush_in[3:0] =
4926 xir_flush_m[3:0] | l_sbpp_m[3:0] |
4927 iln_exc_m[3:0] | tlz_exc_m[3:0] | hst_exc_m[3:0] |
4928 ma_flush_m[3:0] | cwq_flush_m[3:0] |
4929 eer_err_m[3:0] | ade_err_m[3:0] |
4930 mqr_exc_m[3:0] | dqr_exc_m[3:0] | rqr_exc_m[3:0] |
4931 ivt_flush_m[3:0] | idl_exc_in[3:0] |
4932 disrupting_ssc_exc[3:0];
4933
4934tlu_fls_ctl_msff_ctl_macro__width_4 no_hold_disrupting_flush_lat (
4935 .scan_in(no_hold_disrupting_flush_lat_scanin),
4936 .scan_out(no_hold_disrupting_flush_lat_scanout),
4937 .din (no_hold_disrupting_flush_in [3:0] ),
4938 .dout (no_hold_disrupting_flush [3:0] ),
4939 .l1clk(l1clk),
4940 .siclk(siclk),
4941 .soclk(soclk)
4942);
4943
4944assign disrupting_flush_pending[3:0] =
4945 no_hold_disrupting_flush[3:0];
4946
4947assign disrupting_flush_pending_tid_dec_m =
4948 | (no_hold_disrupting_flush_in[3:0] & tid_dec_m[3:0]);
4949
4950tlu_fls_ctl_msff_ctl_macro__width_1 disrupting_flush_pending_tid_dec_b_lat (
4951 .scan_in(disrupting_flush_pending_tid_dec_b_lat_scanin),
4952 .scan_out(disrupting_flush_pending_tid_dec_b_lat_scanout),
4953 .din (disrupting_flush_pending_tid_dec_m ),
4954 .dout (disrupting_flush_pending_tid_dec_b ),
4955 .l1clk(l1clk),
4956 .siclk(siclk),
4957 .soclk(soclk)
4958);
4959
4960
4961// Consider instruction in B valid if IFU is not flushing it
4962assign clear_disrupting_flush_pending[3:0] =
4963 disrupting_flush_pending[3:0] & tid_dec_b[3:0] &
4964 {4 {pre_inst_valid_b}};
4965
4966assign kill_pmu_debug_exc_b_ =
4967 ~(| clear_disrupting_flush_pending[3:0]);
4968
4969assign kill_exc_b_ =
4970 kill_pmu_debug_exc_b_ & ~pmu_debug_exc_b & ~target_oor_b;
4971
4972assign kill_exc_ge_7_lt_11_b_ =
4973 kill_pmu_debug_exc_b_ & ~pmu_debug_exc_ge_7_lt_11_b;
4974
4975assign pmu_debug_exc_ge_7_lt_11_b =
4976 (| perf_trap_b[3:0]) | ibp_b | iaw_b | target_oor_b;
4977
4978assign kill_exc_gt_6_lt_7_b_ =
4979 kill_pmu_debug_exc_b_ &
4980 ~(| {perf_trap_b[3:0], iaw_b, target_oor_b});
4981
4982assign kill_exc_lt_6_b_ =
4983 kill_pmu_debug_exc_b_ & ~(| {perf_trap_b[3:0], iaw_b, target_oor_b});
4984
4985assign kill_exc_iar_irr_b_ =
4986 kill_pmu_debug_exc_b_ & ~(| {perf_trap_b[3:0], iaw_b});
4987
4988assign kill_exc_iaw_b_ =
4989 kill_pmu_debug_exc_b_ & ~(| {perf_trap_b[3:0]});
4990
4991
4992assign disrupting_flush_b =
4993 (| clear_disrupting_flush_pending[3:0]);
4994
4995// Precise perf traps (precise_perf_trap_b) kills all disrupting EXCEPT
4996// - resets (POR, XIR), but not SIR
4997// - trap_level_zero
4998// These are handled later (by not requiring clear_disrupting_flush_pending_w)
4999// In the event of a pending disrupting trap request when
5000// LSU signals pic_overflow trap, take the disrupting trap
5001assign clear_disrupting_flush_pending_w_in[3:0] =
5002 clear_disrupting_flush_pending[3:0] & tid_dec_w_in[3:0];
5003
5004tlu_fls_ctl_msff_ctl_macro__width_4 cdfpw_lat (
5005 .scan_in(cdfpw_lat_scanin),
5006 .scan_out(cdfpw_lat_scanout),
5007 .l1clk (l1clk_pm1 ),
5008 .din (clear_disrupting_flush_pending_w_in [3:0] ),
5009 .dout (clear_disrupting_flush_pending_w [3:0] ),
5010 .siclk(siclk),
5011 .soclk(soclk)
5012);
5013
5014// Do not suppress disrupting exceptions in the case of
5015// trap on control transfer exception
5016
5017// Do not suppress disrupting exceptions in the case of
5018// any 'debug' related exception
5019
5020// Suppress error register updates on DCTI couple with error on
5021// annulled delay slot being tagged against next instruction
5022assign disrupting_flush_w_in =
5023 | {clear_disrupting_flush_pending[3:0] & tid_dec_w_in[3:0],
5024 target_oor_b, refetch_b};
5025
5026tlu_fls_ctl_msff_ctl_macro__width_1 disrupting_flush_w_lat (
5027 .scan_in(disrupting_flush_w_lat_scanin),
5028 .scan_out(disrupting_flush_w_lat_scanout),
5029 .l1clk (l1clk_pm1 ),
5030 .din (disrupting_flush_w_in ),
5031 .dout (disrupting_flush_w ),
5032 .siclk(siclk),
5033 .soclk(soclk)
5034);
5035
5036assign fls_disrupting_flush_w =
5037 disrupting_flush_w;
5038
5039
5040
5041////////////////////////////////////////////////////////////////////////////////
5042// Block store FRF ECC errors
5043
5044// Cannot power manage this flop because block stores "stall" in or repeat B
5045tlu_fls_ctl_msff_ctl_macro__width_4 block_store_w_lat (
5046 .scan_in(block_store_w_lat_scanin),
5047 .scan_out(block_store_w_lat_scanout),
5048 .din (lsu_block_store_b [3:0] ),
5049 .dout (block_store_w [3:0] ),
5050 .l1clk(l1clk),
5051 .siclk(siclk),
5052 .soclk(soclk)
5053);
5054
5055assign pbsee_pending_in[3:0] =
5056 (lsu_block_store_b[3:0] & {4 {fgu_cecc_fx2 | fgu_uecc_fx2}}) |
5057 (bsee_pending[3:0] & lsu_block_store_b[3:0]);
5058
5059assign bsee_pending_in[3:0] =
5060 pbsee_pending_in[3:0] & ~(tid_dec_m[3:0] & {4 {inst_valid_m}});
5061
5062tlu_fls_ctl_msff_ctl_macro__width_4 bsee_pending_lat (
5063 .scan_in(bsee_pending_lat_scanin),
5064 .scan_out(bsee_pending_lat_scanout),
5065 .din (bsee_pending_in [3:0] ),
5066 .dout (bsee_pending [3:0] ),
5067 .l1clk(l1clk),
5068 .siclk(siclk),
5069 .soclk(soclk)
5070);
5071
5072assign bsee_req_in[3:0] =
5073 (pbsee_pending_in[3:0] & tid_dec_m[3:0] & {4 {inst_valid_m}}) |
5074 (~lsu_block_store_b[3:0] & block_store_w[3:0] & bsee_pending[3:0]);
5075
5076tlu_fls_ctl_msff_ctl_macro__width_4 bsee_req_lat (
5077 .scan_in(bsee_req_lat_scanin),
5078 .scan_out(bsee_req_lat_scanout),
5079 .din (bsee_req_in [3:0] ),
5080 .dout (bsee_req [3:0] ),
5081 .l1clk(l1clk),
5082 .siclk(siclk),
5083 .soclk(soclk)
5084);
5085
5086assign bsee_req_w_in =
5087 | (bsee_req_in[3:0] & tid_dec_m[3:0]);
5088
5089tlu_fls_ctl_msff_ctl_macro__width_1 bsee_req_w_lat (
5090 .scan_in(bsee_req_w_lat_scanin),
5091 .scan_out(bsee_req_w_lat_scanout),
5092 .din (bsee_req_w_in ),
5093 .dout (bsee_req_w ),
5094 .l1clk(l1clk),
5095 .siclk(siclk),
5096 .soclk(soclk)
5097);
5098
5099assign bsee_flush_b_in =
5100 | (tid_dec_m[3:0] & bsee_req_in[3:0]);
5101
5102tlu_fls_ctl_msff_ctl_macro__width_1 bsee_flush_b_lat (
5103 .scan_in(bsee_flush_b_lat_scanin),
5104 .scan_out(bsee_flush_b_lat_scanout),
5105 .din (bsee_flush_b_in ),
5106 .dout (bsee_flush_b ),
5107 .l1clk(l1clk),
5108 .siclk(siclk),
5109 .soclk(soclk)
5110);
5111
5112
5113
5114////////////////////////////////////////////////////////////////////////////////
5115// Generate trap request: prioritize the various requests
5116
5117tlu_fls_ctl_msff_ctl_macro__width_4 core_running_lat (
5118 .scan_in(core_running_lat_scanin),
5119 .scan_out(core_running_lat_scanout),
5120 .din (tcu_core_running [3:0] ),
5121 .dout (core_running [3:0] ),
5122 .l1clk(l1clk),
5123 .siclk(siclk),
5124 .soclk(soclk)
5125);
5126
5127assign fls_core_running[3:0] =
5128 core_running[3:0];
5129
5130tlu_fls_ctl_msff_ctl_macro__width_4 core_running_last_lat (
5131 .scan_in(core_running_last_lat_scanin),
5132 .scan_out(core_running_last_lat_scanout),
5133 .din (core_running [3:0] ),
5134 .dout (core_running_last [3:0] ),
5135 .l1clk(l1clk),
5136 .siclk(siclk),
5137 .soclk(soclk)
5138);
5139
5140tlu_fls_ctl_msff_ctl_macro__width_4 core_running_status_lat (
5141 .scan_in(core_running_status_lat_scanin),
5142 .scan_out(core_running_status_lat_scanout),
5143 .din (trl_core_running_status[3:0] ),
5144 .dout (core_running_status [3:0] ),
5145 .l1clk(l1clk),
5146 .siclk(siclk),
5147 .soclk(soclk)
5148);
5149
5150// Idle thread if core_running transitions to 0 while core_running_status is 1
5151// Clear idle request if core becomes idle
5152assign idl_exc_new[3:0] =
5153 ~core_running[3:0] & core_running_last[3:0] &
5154 core_running_status[3:0];
5155assign idl_exc_in[3:0] =
5156 idl_exc_new[3:0] |
5157 (idl_exc[3:0] & core_running_status[3:0]);
5158
5159tlu_fls_ctl_msff_ctl_macro__width_4 idl_exc_lat (
5160 .scan_in(idl_exc_lat_scanin),
5161 .scan_out(idl_exc_lat_scanout),
5162 .din (idl_exc_in [3:0] ),
5163 .dout (idl_exc [3:0] ),
5164 .l1clk(l1clk),
5165 .siclk(siclk),
5166 .soclk(soclk)
5167);
5168
5169assign idl_exc_b =
5170 | (idl_exc[3:0] & tid_dec_b[3:0]) & pre_inst_valid_b;
5171
5172
5173// dsc_req_in is purposefully NOT included here.
5174// The TCU should not try to park a thread that has a pending
5175// single step completion, so this is OK.
5176assign idl_req_in =
5177 idl_exc_b &
5178 ~rqr_req_in &
5179 ~ade_req_in & ~eer_req_in &
5180 ~iln_req_in & ~dqr_req_in &
5181 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5182 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5183 ~ftt_req_in & ~xir_req_in & ~por_req_in &
5184 ~perf_trap_w_in & ~sir_w_in;
5185
5186tlu_fls_ctl_msff_ctl_macro__width_1 idl_req_lat (
5187 .scan_in(idl_req_lat_scanin),
5188 .scan_out(idl_req_lat_scanout),
5189 .l1clk (l1clk_pm1 ),
5190 .din (idl_req_in ),
5191 .dout (idl_req ),
5192 .siclk(siclk),
5193 .soclk(soclk)
5194);
5195
5196// Resume thread if core_running transitions to 1 and thread has been in
5197// running state previously and is not currently running
5198assign res_exc[3:0] =
5199 core_running[3:0] & ~core_running_last[3:0] & ~{4 {ssmode}} &
5200 ever_been_running[3:0] & ~core_running_status[3:0];
5201
5202assign res_req[3:0] =
5203 res_exc[3:0] & ~{4 {domode}};
5204
5205// Treat single step as special resume request
5206tlu_fls_ctl_msff_ctl_macro__width_1 ssmode_lat (
5207 .scan_in(ssmode_lat_scanin),
5208 .scan_out(ssmode_lat_scanout),
5209 .din (tcu_ss_mode ),
5210 .dout (ssmode ),
5211 .l1clk(l1clk),
5212 .siclk(siclk),
5213 .soclk(soclk)
5214);
5215
5216tlu_fls_ctl_msff_ctl_macro__width_1 domode_lat (
5217 .scan_in(domode_lat_scanin),
5218 .scan_out(domode_lat_scanout),
5219 .din (tcu_do_mode ),
5220 .dout (domode ),
5221 .l1clk(l1clk),
5222 .siclk(siclk),
5223 .soclk(soclk)
5224);
5225
5226tlu_fls_ctl_msff_ctl_macro__width_1 ssreq_lat (
5227 .scan_in(ssreq_lat_scanin),
5228 .scan_out(ssreq_lat_scanout),
5229 .din (tcu_ss_request ),
5230 .dout (ssreq ),
5231 .l1clk(l1clk),
5232 .siclk(siclk),
5233 .soclk(soclk)
5234);
5235
5236assign fls_ss_request =
5237 ssmode & ssreq;
5238
5239assign ssr_exc_forces_por[3:0] =
5240 {4 {ssmode & ssreq}} & core_running[3:0] & ~ever_been_running[3:0];
5241
5242assign ssr_exc_b[3:0] =
5243 ({4 {ssmode & ssreq}} & core_running[3:0]) |
5244 ({4 {domode & ~idl_req_in}} & (por_exc[3:0] | res_exc[3:0] |
5245 (ssc_req[3:0] & tid_dec_w_in[3:0]))) |
5246 ({4 {ssmode}} & idl_exc_new[3:0]);
5247
5248assign ssr_req_in[3:0] =
5249 ssr_exc_b[3:0];
5250
5251tlu_fls_ctl_msff_ctl_macro__width_4 ssr_req_lat (
5252 .scan_in(ssr_req_lat_scanin),
5253 .scan_out(ssr_req_lat_scanout),
5254 .din (ssr_req_in [3:0] ),
5255 .dout (ssr_req [3:0] ),
5256 .l1clk(l1clk),
5257 .siclk(siclk),
5258 .soclk(soclk)
5259);
5260
5261assign ever_been_running_in[3:0] =
5262 core_running_last[3:0] | ever_been_running[3:0];
5263
5264tlu_fls_ctl_msff_ctl_macro__width_4 ever_been_running_lat (
5265 .scan_in(ever_been_running_lat_scanin),
5266 .scan_out(ever_been_running_lat_scanout),
5267 .din (ever_been_running_in [3:0] ),
5268 .dout (ever_been_running [3:0] ),
5269 .l1clk(l1clk),
5270 .siclk(siclk),
5271 .soclk(soclk)
5272);
5273
5274assign por_exc[3:0] =
5275 core_running[3:0] & ~core_running_last[3:0] &
5276 ~ever_been_running[3:0];
5277
5278assign por_req_vec_in[3:0] =
5279 (por_exc[3:0] & ~{4 {ssmode}}) | ssr_exc_forces_por[3:0];
5280
5281assign por_req_in =
5282 | (por_req_vec_in[3:0] & clear_disrupting_flush_pending[3:0]);
5283
5284
5285tlu_fls_ctl_msff_ctl_macro__width_4 por_req_lat (
5286 .scan_in(por_req_lat_scanin),
5287 .scan_out(por_req_lat_scanout),
5288 .din (por_req_vec_in [3:0] ),
5289 .dout (por_req [3:0] ),
5290 .l1clk(l1clk),
5291 .siclk(siclk),
5292 .soclk(soclk)
5293);
5294
5295assign xir_req_in =
5296 xir_flush_b &
5297 ~dec_flush_b &
5298 ~dsc_req_in &
5299 ~por_req_in;
5300
5301assign xir_request_in[3:0] =
5302 {4 {xir_req_in}} &
5303 clear_disrupting_flush_pending[3:0] & tid_dec_w_in[3:0];
5304
5305tlu_fls_ctl_msff_ctl_macro__width_4 xir_req_lat (
5306 .scan_in(xir_req_lat_scanin),
5307 .scan_out(xir_req_lat_scanout),
5308 .din (xir_request_in [3:0] ),
5309 .dout (xir_request [3:0] ),
5310 .l1clk(l1clk),
5311 .siclk(siclk),
5312 .soclk(soclk)
5313);
5314
5315
5316// The following are RAS errors
5317assign ftt_req_in =
5318 l_sbpp_b &
5319 ~dec_flush_b &
5320 ~sir_b & ~xir_req_in &
5321 ~dsc_req_in & ~por_req_in;
5322
5323assign ftt_request_in[3:0] =
5324 {4 {ftt_req_in}} &
5325 clear_disrupting_flush_pending[3:0] & tid_dec_w_in[3:0];
5326
5327tlu_fls_ctl_msff_ctl_macro__width_4 ftt_req_lat (
5328 .scan_in(ftt_req_lat_scanin),
5329 .scan_out(ftt_req_lat_scanout),
5330 .din (ftt_request_in [3:0] ),
5331 .dout (ftt_request [3:0] ),
5332 .l1clk(l1clk),
5333 .siclk(siclk),
5334 .soclk(soclk)
5335);
5336
5337assign ade_req_in =
5338 ade_err_b &
5339 ~dec_flush_b &
5340 ~iln_req_in & ~dqr_req_in &
5341 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5342 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5343 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5344 ~perf_trap_w_in;
5345
5346tlu_fls_ctl_msff_ctl_macro__width_1 ade_req_lat (
5347 .scan_in(ade_req_lat_scanin),
5348 .scan_out(ade_req_lat_scanout),
5349 .l1clk (l1clk_pm1 ),
5350 .din (ade_req_in ),
5351 .dout (ade_req ),
5352 .siclk(siclk),
5353 .soclk(soclk)
5354);
5355
5356assign eer_req_in =
5357 eer_err_b &
5358 ~dec_flush_b &
5359 ~ade_req_in &
5360 ~iln_req_in & ~dqr_req_in &
5361 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5362 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5363 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5364 ~perf_trap_w_in;
5365
5366
5367tlu_fls_ctl_msff_ctl_macro__width_1 eer_req_lat (
5368 .scan_in(eer_req_lat_scanin),
5369 .scan_out(eer_req_lat_scanout),
5370 .l1clk (l1clk_pm1 ),
5371 .din (eer_req_in ),
5372 .dout (eer_req ),
5373 .siclk(siclk),
5374 .soclk(soclk)
5375);
5376
5377// The previous were RAS errors
5378
5379assign ivt_req_in =
5380 ivt_flush_b &
5381 ~dec_flush_b &
5382 ~tlz_req_in & ~hst_req_in &
5383 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5384 ~perf_trap_w_in;
5385
5386tlu_fls_ctl_msff_ctl_macro__width_1 ivt_req_lat (
5387 .scan_in(ivt_req_lat_scanin),
5388 .scan_out(ivt_req_lat_scanout),
5389 .l1clk (l1clk_pm1 ),
5390 .din (ivt_req_in ),
5391 .dout (ivt_req ),
5392 .siclk(siclk),
5393 .soclk(soclk)
5394);
5395
5396assign ma_req_in =
5397 ma_flush_b &
5398 ~dec_flush_b &
5399 ~ivt_req_in &
5400 ~tlz_req_in & ~hst_req_in &
5401 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5402 ~perf_trap_w_in;
5403
5404tlu_fls_ctl_msff_ctl_macro__width_1 ma_req_lat (
5405 .scan_in(ma_req_lat_scanin),
5406 .scan_out(ma_req_lat_scanout),
5407 .l1clk (l1clk_pm1 ),
5408 .din (ma_req_in ),
5409 .dout (ma_req ),
5410 .siclk(siclk),
5411 .soclk(soclk)
5412);
5413
5414assign cwq_req_in =
5415 cwq_flush_b &
5416 ~dec_flush_b &
5417 ~ma_req_in & ~ivt_req_in &
5418 ~tlz_req_in & ~hst_req_in &
5419 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5420 ~perf_trap_w_in;
5421
5422tlu_fls_ctl_msff_ctl_macro__width_1 cwq_req_lat (
5423 .scan_in(cwq_req_lat_scanin),
5424 .scan_out(cwq_req_lat_scanout),
5425 .l1clk (l1clk_pm1 ),
5426 .din (cwq_req_in ),
5427 .dout (cwq_req ),
5428 .siclk(siclk),
5429 .soclk(soclk)
5430);
5431
5432assign mqr_req_in =
5433 mqr_exc_b &
5434 ~dec_flush_b &
5435 ~cwq_req_in & ~ma_req_in & ~ivt_req_in &
5436 ~tlz_req_in & ~hst_req_in &
5437 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5438 ~perf_trap_w_in;
5439
5440tlu_fls_ctl_msff_ctl_macro__width_1 mqr_req_lat (
5441 .scan_in(mqr_req_lat_scanin),
5442 .scan_out(mqr_req_lat_scanout),
5443 .l1clk (l1clk_pm1 ),
5444 .din (mqr_req_in ),
5445 .dout (mqr_req ),
5446 .siclk(siclk),
5447 .soclk(soclk)
5448);
5449
5450assign dqr_req_in =
5451 dqr_exc_b &
5452 ~dec_flush_b &
5453 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5454 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5455 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5456 ~perf_trap_w_in;
5457
5458tlu_fls_ctl_msff_ctl_macro__width_1 dqr_req_lat (
5459 .scan_in(dqr_req_lat_scanin),
5460 .scan_out(dqr_req_lat_scanout),
5461 .l1clk (l1clk_pm1 ),
5462 .din (dqr_req_in ),
5463 .dout (dqr_req ),
5464 .siclk(siclk),
5465 .soclk(soclk)
5466);
5467
5468assign rqr_req_in =
5469 rqr_exc_b &
5470 ~dec_flush_b &
5471 ~iln_req_in & ~dqr_req_in &
5472 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5473 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5474 ~ade_req_in & ~eer_req_in &
5475 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5476 ~perf_trap_w_in;
5477
5478tlu_fls_ctl_msff_ctl_macro__width_1 rqr_req_lat (
5479 .scan_in(rqr_req_lat_scanin),
5480 .scan_out(rqr_req_lat_scanout),
5481 .l1clk (l1clk_pm1 ),
5482 .din (rqr_req_in ),
5483 .dout (rqr_req ),
5484 .siclk(siclk),
5485 .soclk(soclk)
5486);
5487
5488assign iln_req_in =
5489 iln_exc_b &
5490 ~dec_flush_b &
5491 ~dqr_req_in &
5492 ~mqr_req_in & ~cwq_req_in & ~ma_req_in &
5493 ~ivt_req_in & ~tlz_req_in & ~hst_req_in &
5494 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5495 ~perf_trap_w_in;
5496
5497tlu_fls_ctl_msff_ctl_macro__width_1 iln_req_lat (
5498 .scan_in(iln_req_lat_scanin),
5499 .scan_out(iln_req_lat_scanout),
5500 .l1clk (l1clk_pm1 ),
5501 .din (iln_req_in ),
5502 .dout (iln_req ),
5503 .siclk(siclk),
5504 .soclk(soclk)
5505);
5506
5507assign hst_req_in =
5508 hst_exc_b &
5509 ~dec_flush_b &
5510 ~tlz_req_in &
5511 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in &
5512 ~perf_trap_w_in;
5513
5514tlu_fls_ctl_msff_ctl_macro__width_1 hst_req_lat (
5515 .scan_in(hst_req_lat_scanin),
5516 .scan_out(hst_req_lat_scanout),
5517 .l1clk (l1clk_pm1 ),
5518 .din (hst_req_in ),
5519 .dout (hst_req ),
5520 .siclk(siclk),
5521 .soclk(soclk)
5522);
5523
5524assign tlz_req_in =
5525 tlz_exc_b &
5526 ~dec_flush_b &
5527 ~ftt_req_in & ~sir_b & ~xir_req_in & ~dsc_req_in & ~por_req_in;
5528
5529assign tlz_request_in[3:0] =
5530 {4 {tlz_req_in}} &
5531 clear_disrupting_flush_pending[3:0] & tid_dec_w_in[3:0];
5532
5533tlu_fls_ctl_msff_ctl_macro__width_4 tlz_req_lat (
5534 .scan_in(tlz_req_lat_scanin),
5535 .scan_out(tlz_req_lat_scanout),
5536 .l1clk (l1clk_pm1 ),
5537 .din (tlz_request_in [3:0] ),
5538 .dout (tlz_request [3:0] ),
5539 .siclk(siclk),
5540 .soclk(soclk)
5541);
5542
5543// Single step completion does not require a flush or gating from other
5544// exceptions
5545// Need to reset ssc_req_in in domode when G exceptions occur
5546// Or for exceptions on second cycle of twocycle instructions in domode
5547// Or for exceptions on second through eighth beats of block store in domode
5548assign ssc_req_in[3:0] =
5549 (trl_ssc_exc[3:0] |
5550 ((flush_gfb[3:0] | m_dae_req_w[3:0] |
5551 (two_tid_dec_w[3:0] & {4 {e_f_ecc_w}}) |
5552 bsee_req[3:0] | pdist_ecc_w[3:0]) & {4 {domode}}) |
5553 ssc_req[3:0]) &
5554 ~(tid_dec_w[3:0] & ~flush_ifu[3:0]);
5555
5556tlu_fls_ctl_msff_ctl_macro__width_4 ssc_req_lat (
5557 .scan_in(ssc_req_lat_scanin),
5558 .scan_out(ssc_req_lat_scanout),
5559 .din (ssc_req_in [3:0] ),
5560 .dout (ssc_req [3:0] ),
5561 .l1clk(l1clk),
5562 .siclk(siclk),
5563 .soclk(soclk)
5564);
5565
5566// There are certain cases for which we want to create a
5567// disrupting exception so that the 'next' instruction will be flushed
5568// and we can signal the completion
5569// This is the 'highest priority' disrupting or reset exception behind
5570// POR because it's really for the 'last' instruction
5571//
5572// tcu_ss_request x x
5573// trl_trap_taken[n] x x x
5574// dec_inst_valid_m x x x
5575// ssc_req (precise) x
5576// flush_ifu x x
5577// disrupting_ssc_exc xxxxxxxxxxxxxx
5578// disrupting_ssc_req x
5579//
5580// suppress_d_s_e xxxxxxx xxxx
5581//
5582// But we don't want to do this on hardware tablewalks. We want to let the
5583// tablewalk proceed without interruption, and want to stop after the
5584// instruction with the hardware tablewalk.
5585//
5586// Also need to set disrupting_ssc_exc for late exceptions
5587// But have to suppress disrupting_ssc_req for late exceptions
5588
5589assign disrupting_ssc_exc_in[3:0] =
5590 {4 {ssmode}} &
5591 ((flush_ifu[3:0] & tid_dec_w[3:0] & ~disrupting_ssc_exc[3:0] &
5592 ~idl_request[3:0] & ~iht_request[3:0] & ~dht_request[3:0]) |
5593 flush_gfb[3:0] |
5594 hwtw_exception[3:0] |
5595 (two_tid_dec_w[3:0] & {4 {e_f_ecc_w}}) |
5596 bsee_req[3:0] | pdist_ecc_w[3:0] |
5597 (disrupting_ssc_exc[3:0] & ~disrupting_ssc_req[3:0]));
5598
5599tlu_fls_ctl_msff_ctl_macro__width_4 disrupting_ssc_exc_lat (
5600 .scan_in(disrupting_ssc_exc_lat_scanin),
5601 .scan_out(disrupting_ssc_exc_lat_scanout),
5602 .din (disrupting_ssc_exc_in [3:0] ),
5603 .dout (disrupting_ssc_exc [3:0] ),
5604 .l1clk(l1clk),
5605 .siclk(siclk),
5606 .soclk(soclk)
5607);
5608
5609assign dsc_req_in =
5610 | (disrupting_ssc_exc[3:0] & clear_disrupting_flush_pending[3:0]);
5611
5612assign disrupting_ssc_req[3:0] =
5613 disrupting_ssc_exc[3:0] & flush_ifu[3:0] & ~por_req[3:0] &
5614 ~(flush_gfb[3:0] | m_dae_req_w[3:0] |
5615 bsee_req[3:0] | pdist_ecc_w[3:0]);
5616
5617
5618
5619//////////////////////////////////////////////////////////////////////////////
5620// Requests to trap redirect logic
5621//
5622
5623assign fls_ssc_request[3:0] =
5624 (ssc_req[3:0] & tid_dec_w[3:0] & ~flush_ifu[3:0]) |
5625 disrupting_ssc_req[3:0];
5626
5627assign fls_ssr_request[3:0] =
5628 ssr_req[3:0];
5629
5630assign fls_res_request[3:0] =
5631 res_req[3:0];
5632
5633// Nonsequential NPC after retry (or taken branch after retry)
5634assign fls_nns_request[3:0] =
5635 nns_to_pc_w[3:0] & {4 {~(domode | ssmode)}};
5636
5637assign fls_por_request[3:0] =
5638 por_req[3:0];
5639
5640assign fls_xir_request[3:0] =
5641 xir_request[3:0];
5642
5643assign fls_tlz_request[3:0] =
5644 tlz_request[3:0];
5645
5646assign fls_hst_request[3:0] =
5647 {4 {hst_req}} &
5648 clear_disrupting_flush_pending_w[3:0];
5649
5650assign fls_ivt_request[3:0] =
5651 {4 {ivt_req}} &
5652 clear_disrupting_flush_pending_w[3:0];
5653
5654assign fls_sma_request[3:0] =
5655 {4 {ma_req}} &
5656 clear_disrupting_flush_pending_w[3:0];
5657
5658assign fls_cwq_request[3:0] =
5659 {4 {cwq_req}} &
5660 clear_disrupting_flush_pending_w[3:0];
5661
5662// CPU mondo trap request
5663assign fls_mqr_request[3:0] =
5664 {4 {mqr_req}} &
5665 clear_disrupting_flush_pending_w[3:0];
5666
5667// Device mondo trap request
5668assign fls_dqr_request[3:0] =
5669 {4 {dqr_req}} &
5670 clear_disrupting_flush_pending_w[3:0];
5671
5672assign fls_iln_request[3:0] =
5673 {4 {iln_req}} &
5674 clear_disrupting_flush_pending_w[3:0];
5675
5676assign fls_rqr_request[3:0] =
5677 {4 {rqr_req}} &
5678 clear_disrupting_flush_pending_w[3:0];
5679
5680assign fls_ade_request[3:0] =
5681 {4 {ade_req}} &
5682 clear_disrupting_flush_pending_w[3:0];
5683
5684// Idle lower than all other exceptions so that the other exceptions are not
5685// lost
5686assign idl_request[3:0] =
5687 {4 {idl_req}} &
5688 clear_disrupting_flush_pending_w[3:0];
5689
5690assign fls_idl_request[3:0] =
5691 idl_request[3:0];
5692
5693assign fls_sir_request[3:0] =
5694 {4 {sir_w}} & tid_dec_w[3:0];
5695
5696tlu_fls_ctl_msff_ctl_macro__width_4 hw_tw_enabled_lat (
5697 .scan_in(hw_tw_enabled_lat_scanin),
5698 .scan_out(hw_tw_enabled_lat_scanout),
5699 .l1clk (l1clk_pm1 ),
5700 .din (mmu_hw_tw_enable [3:0] ),
5701 .dout (hw_tw_enabled [3:0] ),
5702 .siclk(siclk),
5703 .soclk(soclk)
5704);
5705
5706assign hw_tw_disabled[3:0] =
5707 ~hw_tw_enabled[3:0];
5708
5709assign itm_request[3:0] =
5710 {4 {itlb_miss_w}} & tid_dec_w[3:0];
5711
5712assign fls_itm_request[3:0] =
5713 (itm_request[3:0] & hw_tw_disabled[3:0]);
5714
5715assign iht_request[3:0] =
5716 itm_request[3:0] & hw_tw_enabled[3:0];
5717
5718assign tlu_iht_request[3:0] =
5719 iht_request[3:0];
5720
5721assign load_i_tag_access_in =
5722 itlb_priv_exc_w_in | itlb_nfo_exc_w_in | i_oor_va_w_in | itlb_err_w_in;
5723
5724tlu_fls_ctl_msff_ctl_macro__width_1 load_i_tag_access_lat (
5725 .scan_in(load_i_tag_access_lat_scanin),
5726 .scan_out(load_i_tag_access_lat_scanout),
5727 .l1clk (l1clk_pm1 ),
5728 .din (load_i_tag_access_in ),
5729 .dout (load_i_tag_access_pre ),
5730 .siclk(siclk),
5731 .soclk(soclk)
5732);
5733
5734assign load_i_tag_access[3:0] =
5735 itm_request[3:0] |
5736 ({4 {load_i_tag_access_pre}} & tid_dec_w[3:0]);
5737
5738assign fls_iae_request[3:0] =
5739 ({4 {i_l2_unde_w}} & tid_dec_w[3:0]);
5740
5741assign ipe_request[3:0] =
5742 ({4 {e_f_ecc_w}} & two_tid_dec_w[3:0]) |
5743 bsee_req[3:0] | asi_ecc_w[3:0] | l_sbdl_ecc_w[3:0] |
5744 pdist_ecc_w[3:0];
5745
5746assign fls_ipe_request[3:0] =
5747 ipe_request[3:0];
5748
5749assign fls_ipv_request =
5750 itlb_priv_exc_w;
5751
5752assign fls_inp_request =
5753 itlb_nfo_exc_w;
5754
5755assign fls_iar_request =
5756 i_oor_va_w;
5757
5758assign fls_irr_request =
5759 i_ra_oor_va_w;
5760
5761assign fls_mar_request =
5762 br_ld_oor_va_w;
5763
5764assign fls_mrr_request =
5765 br_ld_ra_oor_va_w;
5766
5767assign fls_pro_request =
5768 priv_exc_w;
5769
5770// hyperprivileged exceptions cause
5771// illegal instruction traps
5772assign fls_ill_request =
5773 illegal_inst_w | hpriv_exc_w;
5774
5775assign fls_don_request =
5776 done_inst_w;
5777
5778assign fls_ret_request =
5779 retry_inst_w;
5780
5781assign fls_fpd_request =
5782 fpdisable_exc_w;
5783
5784assign fls_snn_request =
5785 snn_w;
5786
5787assign fls_sno_request =
5788 sno_w;
5789
5790assign fls_fnn_request =
5791 fnn_w;
5792
5793assign fls_fno_request =
5794 fno_w;
5795
5796assign fls_clw_request =
5797 clw_w;
5798
5799assign dtm_request[3:0] =
5800 {4 {dtlb_miss_w}} & tid_dec_w[3:0];
5801
5802assign fls_dtm_request[3:0] =
5803 dtm_request[3:0] & hw_tw_disabled[3:0];
5804
5805assign dht_request[3:0] =
5806 dtm_request[3:0] & hw_tw_enabled[3:0];
5807
5808assign tlu_dht_request[3:0] =
5809 dht_request[3:0];
5810
5811assign load_d_tag_access_in =
5812 dae_priv_viol_w_in | dae_nc_page_w_in |
5813 dae_nfo_page_w_in | dae_so_page_w_in | daccess_prot_w_in |
5814 dtlb_error_w_in;
5815
5816tlu_fls_ctl_msff_ctl_macro__width_1 load_d_tag_access_lat (
5817 .scan_in(load_d_tag_access_lat_scanin),
5818 .scan_out(load_d_tag_access_lat_scanout),
5819 .l1clk (l1clk_pm1 ),
5820 .din (load_d_tag_access_in ),
5821 .dout (load_d_tag_access ),
5822 .siclk(siclk),
5823 .soclk(soclk)
5824);
5825
5826assign tlu_load_d_tag_access[3:0] =
5827 dtm_request[3:0] |
5828 ({4 {load_d_tag_access & ~l_real_w}} & tid_dec_w[3:0]);
5829
5830assign fls_ldf_request =
5831 lddf_align_w;
5832
5833assign fls_stf_request =
5834 stdf_align_w;
5835
5836assign fls_dap_request =
5837 daccess_prot_w;
5838
5839assign vaw_request[3:0] =
5840 {4 {va_watchpoint_w}} & tid_dec_w[3:0];
5841
5842assign fls_vaw_request =
5843 va_watchpoint_w;
5844
5845assign iaw_request[3:0] =
5846 {4 {iaw_w}} & tid_dec_w[3:0];
5847
5848assign fls_iaw_request =
5849 iaw_w;
5850
5851assign paw_request[3:0] =
5852 {4 {pa_watchpoint_w}} & tid_dec_w[3:0];
5853
5854assign fls_paw_request =
5855 pa_watchpoint_w;
5856
5857assign fls_maa_request =
5858 align_w | e_misalign_w;
5859
5860assign fls_fpe_request =
5861 f_predict_w;
5862
5863assign fls_fei_request[3:0] =
5864 ieee_exc_fw[3:0];
5865
5866assign fls_fof_request[3:0] =
5867 unfin_fw[3:0];
5868
5869assign fls_pra_request[3:0] =
5870 ({4 {priv_action_w}} & tid_dec_w[3:0]) | priv_action_g_w[3:0];
5871
5872assign fls_dia_request =
5873 dae_invalid_asi_w;
5874
5875assign fls_ups_request[3:0] =
5876 m_dae_req_w[3:0];
5877
5878assign fls_dnc_request =
5879 dae_nc_page_w;
5880
5881assign fls_dnf_request =
5882 dae_nfo_page_w;
5883
5884assign fls_dpv_request =
5885 dae_priv_viol_w;
5886
5887assign fls_dso_request =
5888 dae_so_page_w;
5889
5890assign fls_tof_request =
5891 tof_w;
5892
5893assign fls_dbz_request[3:0] =
5894 idiv0_exc_fw[3:0];
5895
5896assign fls_tcc_request =
5897 tcc_w;
5898
5899assign fls_dae_request[3:0] =
5900 l_l2_ecc_w[3:0];
5901
5902assign irt_request[3:0] =
5903 {4 {ra_itlb_miss_w}} & tid_dec_w[3:0];
5904
5905assign i_real_w[3:0] =
5906 ~itlb_bypass[3:0] & ~immu_enable[3:0];
5907
5908assign load_i_tag_access_r[3:0] =
5909 ({4 {i_ra_oor_va_w}} & tid_dec_w[3:0]) | irt_request[3:0];
5910
5911assign tlu_load_i_tag_access_p[3:0] =
5912 load_i_tag_access[3:0] & tl_eq_0[3:0] & ~i_real_w[3:0];
5913
5914assign tlu_load_i_tag_access_n[3:0] =
5915 (load_i_tag_access[3:0] & ~tl_eq_0[3:0]) |
5916 (load_i_tag_access[3:0] & i_real_w[3:0]) |
5917 load_i_tag_access_r[3:0];
5918
5919assign fls_irt_request =
5920 ra_itlb_miss_w;
5921
5922assign drt_request[3:0] =
5923 {4 {ra_dtlb_miss_w}} & tid_dec_w[3:0];
5924
5925assign tlu_load_d_tag_access_r[3:0] =
5926 drt_request[3:0] |
5927 ({4 {load_d_tag_access & l_real_w}} & tid_dec_w[3:0]);
5928
5929assign fls_drt_request =
5930 ra_dtlb_miss_w;
5931
5932assign fls_pmu_request[3:0] =
5933 ({4 {perf_trap_w | precise_perf_trap_w}} & tid_dec_w[3:0]) |
5934 precise_perf_trap_g_w[3:0];
5935
5936assign pre_lsr_request[3:0] =
5937 (nns_to_npc_w[3:0] | trap_flush[3:0]) & {4 {~(domode | ssmode)}};
5938
5939assign fls_lsr_request[3:0] =
5940 ~(~pre_lsr_request[3:0] | ipe_request[3:0]);
5941
5942assign fls_ime_request[3:0] =
5943 ime_w[3:0] |
5944 ({4 {itlb_err_w}} & tid_dec_w[3:0]);
5945
5946assign fls_dme_request[3:0] =
5947 dme_w[3:0] |
5948 ({4 {dtlb_error_w}} & tid_dec_w[3:0]);
5949
5950assign fls_eer_request[3:0] =
5951 {4 {eer_req}} & clear_disrupting_flush_pending_w[3:0];
5952
5953assign fls_icp_request =
5954 icp_req;
5955
5956assign fls_ftt_request[3:0] =
5957 ftt_request[3:0];
5958
5959assign ibp_request[3:0] =
5960 {4 {ibp_w}} & tid_dec_w[3:0];
5961
5962assign fls_ibp_request =
5963 ibp_w;
5964
5965assign tct_request[3:0] =
5966 {4 {tct_w}} & tid_dec_w[3:0];
5967
5968assign fls_tct_request =
5969 tct_w;
5970
5971assign fls_ref_request =
5972 refetch_w;
5973
5974assign fls_ipe_dme_request =
5975 ((e_f_ecc_w | dtlb_error_w) & (| two_tid_dec_w[3:0])) |
5976 (| bsee_req[3:0]) | (| pdist_ecc_w[3:0]);
5977
5978assign fls_load_dsfar[3:0] =
5979 ({4 {align_w | e_misalign_w | dae_invalid_asi_w | dae_priv_viol_w |
5980 dae_nc_page_w | dae_nfo_page_w | dae_so_page_w |
5981 br_ld_oor_va_w | br_ld_ra_oor_va_w |
5982 daccess_prot_w | pa_watchpoint_w |
5983 va_watchpoint_w |
5984 lddf_align_w | stdf_align_w}} & tid_dec_w[3:0]);
5985
5986
5987
5988// If a
5989// branch that annuls its own delay slot that is in the delay slot of
5990// another branch
5991// precedes an instruction with
5992// a pre-icache exception, then that instruction will
5993// cause an instruction cache parity
5994// microarchitectural trap (icp). Note that the disrupting exception is
5995// NOT posted, so no trap will be taken later.
5996// This solution does cause
5997// the instruction cache line to be invalidated for no reason.
5998
5999// First, capture that a branch in a delay slot has annulled its own delay slot
6000
6001assign m103663_in[3:0] =
6002 ( tid_dec_w_in[3:0] & {4 {annul_ds_b & ~br_taken_b}}) |
6003 (~tid_dec_w_in[3:0] & m103663[3:0]);
6004
6005tlu_fls_ctl_msff_ctl_macro__width_4 m103663_lat (
6006 .scan_in(m103663_lat_scanin),
6007 .scan_out(m103663_lat_scanout),
6008 .din (m103663_in [3:0] ),
6009 .dout (m103663 [3:0] ),
6010 .l1clk(l1clk),
6011 .siclk(siclk),
6012 .soclk(soclk)
6013);
6014
6015// Then generate exception and gate off the pre-icache exceptions
6016// This needs to be tid_dec_b to be fast, but the hold latch needs tid_dec_w_in
6017// to hold through dec_flush_b situations
6018// Have to gate off this exception in the absence of valid
6019assign m103663_exc_b =
6020 (| (m103663[3:0] & tid_dec_b[3:0])) & pre_inst_valid_b;
6021
6022// i_oor_va_b and i_ra_oor_va_b not needed because these would not occur
6023// before the boundary. IFU doesn't detect branches into VA hole; EXU
6024// and TLU do.
6025assign refetch_b =
6026 m103663_exc_b &
6027 (itlb_miss_b | ra_itlb_miss_b | itlb_priv_exc_b | itlb_nfo_exc_b |
6028 i_l2_unde_b | itlb_err_b | ic_err_b) ;
6029
6030assign refetch_w_in =
6031 refetch_b & kill_exc_lt_6_b_;
6032
6033tlu_fls_ctl_msff_ctl_macro__width_1 refetch_w_lat (
6034 .scan_in(refetch_w_lat_scanin),
6035 .scan_out(refetch_w_lat_scanout),
6036 .din (refetch_w_in ),
6037 .dout (refetch_w ),
6038 .l1clk(l1clk),
6039 .siclk(siclk),
6040 .soclk(soclk)
6041);
6042
6043
6044
6045////////////////////////////////////////////////////////////////////////////////
6046// Save CWP on flush
6047
6048assign cwp3_in[2:0] =
6049 ({3 { flush_ifu[3]}} & exu_cwp3[2:0]) |
6050 ({3 {~flush_ifu[3]}} & cwp3[2:0]);
6051assign cwp2_in[2:0] =
6052 ({3 { flush_ifu[2]}} & exu_cwp2[2:0]) |
6053 ({3 {~flush_ifu[2]}} & cwp2[2:0]);
6054assign cwp1_in[2:0] =
6055 ({3 { flush_ifu[1]}} & exu_cwp1[2:0]) |
6056 ({3 {~flush_ifu[1]}} & cwp1[2:0]);
6057assign cwp0_in[2:0] =
6058 ({3 { flush_ifu[0]}} & exu_cwp0[2:0]) |
6059 ({3 {~flush_ifu[0]}} & cwp0[2:0]);
6060
6061tlu_fls_ctl_msff_ctl_macro__width_12 cwp_lat (
6062 .scan_in(cwp_lat_wmr_scanin),
6063 .scan_out(cwp_lat_wmr_scanout),
6064 .siclk(spc_aclk_wmr),
6065 .din ({cwp3_in [2:0],
6066 cwp2_in [2:0],
6067 cwp1_in [2:0],
6068 cwp0_in [2:0]}),
6069 .dout ({cwp3 [2:0],
6070 cwp2 [2:0],
6071 cwp1 [2:0],
6072 cwp0 [2:0]}),
6073 .l1clk(l1clk),
6074 .soclk(soclk)
6075);
6076
6077assign fls_cwp3[2:0] =
6078 cwp3[2:0];
6079assign fls_cwp2[2:0] =
6080 cwp2[2:0];
6081assign fls_cwp1[2:0] =
6082 cwp1[2:0];
6083assign fls_cwp0[2:0] =
6084 cwp0[2:0];
6085
6086
6087
6088////////////////////////////////////////////////////////////////////////////////
6089//
6090// Manage PC, NPC
6091//
6092// Terminology: a taken branch will not have an exception
6093assign tid_dec_valid_b[3:0] =
6094 tid_dec_b[3:0] & {4 {inst_valid_b}};
6095
6096// Sequential flow
6097// or
6098// branch not taken that annuls the delay slot that itself is in a delay slot
6099// or
6100// branch taken and NPC is invalid
6101// In pct, pc_sel_npc_plus_4 is prioritized over pc_sel_npc
6102assign fls_pc_sel_npc[3:0] =
6103 (pc_valid[3:0] | {4 {br_taken_b | annul_ds_b}}) &
6104 tid_dec_valid_b[3:0];
6105
6106
6107// Branch taken and NPC is valid
6108// or
6109// branch not taken that annuls the delay slot that is not in a delay slot
6110assign pc_sel_npc_plus_4[3:0] =
6111 npc_valid[3:0] & {4 {br_taken_b | (annul_ds_b & ~ds_b)}} &
6112 tid_dec_valid_b[3:0];
6113
6114assign fls_pc_sel_npc_plus_4[3:0] =
6115 pc_sel_npc_plus_4[3:0];
6116
6117
6118
6119
6120// Sequential flow or
6121// first instruction (with or without exception) after done
6122// or
6123// branch not taken that annuls the delay slot that itself is in a delay slot
6124// or
6125// branch not taken that annuls delay slot that's not in a delay slot w/npc inv
6126// In pct, npc_sel_target and npc_sel_npc_plus_8 are prioritized over
6127// npc_sel_npc_plus_4
6128assign fls_npc_sel_npc_plus_4[3:0] =
6129 ((npc_valid[3:0] & {4 {~annul_ds_b}}) | {4 {annul_ds_b}}) &
6130 tid_dec_valid_b[3:0];
6131
6132// Branch not taken that annuls the delay slot that is not in a delay slot
6133// In pct, npc_sel_target is prioritized over npc_sel_npc_plus_8
6134assign fls_npc_sel_npc_plus_8[3:0] =
6135 npc_valid[3:0] & {4 {annul_ds_b & ~ds_b}} &
6136 tid_dec_valid_b[3:0];
6137
6138// Taken branch that does not have exception
6139assign fls_npc_sel_target[3:0] =
6140 {4 {br_taken_b}} & tid_dec_valid_b[3:0];
6141
6142
6143
6144// PC becomes valid whenever instruction comes down pipe and that instruction
6145// is not
6146// a taken branch that does not annul the delay slot
6147// an instruction that is being flushed due to idle exception
6148// PC is invalidated on trap, done, retry
6149assign prevent_valid =
6150 (br_taken_b & ~annul_ds_b) | disrupting_flush_b | pmu_debug_exc_b |
6151 refetch_b;
6152
6153// A flushed instruction should not affect PC valids
6154// (Flushes prevent updates to pc_?_w registers in PCT)
6155assign inst_b[3:0] =
6156 tid_dec_valid_b[3:0] & {4 {~dec_flush_b}};
6157
6158assign pc_valid_in[3:0] =
6159 ( inst_b[3:0] & ~{4 {prevent_valid}}) |
6160 (~inst_b[3:0] & pc_valid[3:0] & ~trl_invalidate_pc[3:0]);
6161
6162tlu_fls_ctl_msff_ctl_macro__width_4 pc_valid_lat (
6163 .scan_in(pc_valid_lat_scanin),
6164 .scan_out(pc_valid_lat_scanout),
6165 .din (pc_valid_in [3:0] ),
6166 .dout (pc_valid [3:0] ),
6167 .l1clk(l1clk),
6168 .siclk(siclk),
6169 .soclk(soclk)
6170);
6171
6172assign fls_pc_valid[3:0] =
6173 pc_valid[3:0];
6174
6175
6176// NPC becomes valid whenever instruction comes down pipe and that instruction
6177// is not
6178// a taken branch that does not annul the delay slot
6179// an instruction that is being flushed due to idle exception
6180// NPC is invalidated on trap and retry (valid on done to calculate real NPC)
6181assign npc_valid_in[3:0] =
6182 ( inst_b[3:0] & ~{4 {prevent_valid}}) |
6183 (~inst_b[3:0] & npc_valid[3:0] & ~trl_invalidate_npc[3:0]);
6184
6185tlu_fls_ctl_msff_ctl_macro__width_4 npc_valid_lat (
6186 .scan_in(npc_valid_lat_scanin),
6187 .scan_out(npc_valid_lat_scanout),
6188 .din (npc_valid_in [3:0] ),
6189 .dout (npc_valid [3:0] ),
6190 .l1clk(l1clk),
6191 .siclk(siclk),
6192 .soclk(soclk)
6193);
6194
6195assign npc_is_valid =
6196 (| (tid_dec_b[3:0] & npc_valid[3:0])) & inst_valid_b;
6197
6198assign fls_npc_b_sel_npc =
6199 ~npc_is_valid;
6200
6201
6202// PC is actually NPC if
6203// inst is taken branch that does not annul delay slot that is not in a delay
6204// slot itself
6205// inst is after done, retry, or trap
6206// In the case of a delay slot that's annulled, we want to know
6207// the NPC of the delay slot, not the branch. In this case, the NPC of the
6208// delay slot is in the NPC flop, so the PC is not the NPC (that we want).
6209// If a branch in the delay slot of another branch is at decode
6210// (signified by dec_inst_cnt[01:00] being nonzero), then the PC is no longer
6211// the NPC. Handled in tlu_pct_dp
6212assign pc_is_npc_in[3:0] =
6213 (inst_b[3:0] & {4 { br_taken_b & ~annul_ds_b}}) |
6214 trl_invalidate_pc[3:0] |
6215 (pc_is_npc[3:0] & ~inst_b[3:0]);
6216
6217tlu_fls_ctl_msff_ctl_macro__width_4 pc_is_npc_lat (
6218 .scan_in(pc_is_npc_lat_scanin),
6219 .scan_out(pc_is_npc_lat_scanout),
6220 .din (pc_is_npc_in [3:0] ),
6221 .dout (pc_is_npc [3:0] ),
6222 .l1clk(l1clk),
6223 .siclk(siclk),
6224 .soclk(soclk)
6225);
6226
6227assign fls_pc_is_npc =
6228 | (pc_is_npc[3:0] & tid_dec_d[3:0]);
6229
6230
6231
6232//////////////////////////////////////////////////////////////////////////////
6233//
6234// Implement adder for lower two bits of NPC at D
6235//
6236
6237// Need to mux NPC down to by thread group
6238assign pre_npc_d[3:2] =
6239 ({2 {tid_dec_d[0]}} & pct_npc_0_w[3:2]) |
6240 ({2 {tid_dec_d[1]}} & pct_npc_1_w[3:2]) |
6241 ({2 {tid_dec_d[2]}} & pct_npc_2_w[3:2]) |
6242 ({2 {tid_dec_d[3]}} & pct_npc_3_w[3:2]) ;
6243
6244assign pre_npc_d[4] =
6245 1'b0;
6246
6247// Need to select inst_cnt minus one when a branch in the delay slot of
6248// another branch is at decode, because the PC of the instruction after the
6249// branch (which is at D and in the delay slot) is in the NPC register
6250assign sel_inst_cnt_m_1 =
6251 | (pc_is_npc[3:0] & ~npc_valid[3:0] & tid_dec_d[3:0]);
6252
6253
6254
6255// Precalculate possible outcomes and then mux them
6256// dec_inst_cnt sel_inst_cnt_m1 npc_inc_d = pre_npc_d + ?
6257// 00 1 0
6258// 00 0 0
6259// 01 1 0
6260// 01 0 1
6261// 10 1 1
6262// 10 0 2
6263// 11 1 2
6264// 11 0 3
6265
6266assign npc_plus_0[4:2] =
6267 pre_npc_d[4:2];
6268
6269assign npc_plus_1[4:2] =
6270 pre_npc_d[4:2] + 3'b001;
6271
6272assign npc_plus_2[4:2] =
6273 pre_npc_d[4:2] + 3'b010;
6274
6275assign npc_plus_3[4:2] =
6276 pre_npc_d[4:2] + 3'b011;
6277
6278
6279assign fls_npc_if_cnt_eq_1_d[4:2] =
6280 ({3 { sel_inst_cnt_m_1}} & npc_plus_0[4:2]) |
6281 ({3 {~sel_inst_cnt_m_1}} & npc_plus_1[4:2]) ;
6282
6283assign fls_npc_if_cnt_eq_2_d[4:2] =
6284 ({3 { sel_inst_cnt_m_1}} & npc_plus_1[4:2]) |
6285 ({3 {~sel_inst_cnt_m_1}} & npc_plus_2[4:2]) ;
6286
6287assign fls_npc_if_cnt_eq_3_d[4:2] =
6288 ({3 { sel_inst_cnt_m_1}} & npc_plus_2[4:2]) |
6289 ({3 {~sel_inst_cnt_m_1}} & npc_plus_3[4:2]) ;
6290
6291
6292
6293//////////////////////////////////////////////////////////////////////////////
6294//
6295// tlu_pct_dp power management
6296//
6297
6298assign fls_pct_pc_en[3:0] =
6299 trl_pc_sel_trap_pc[3:0] | (tid_dec_b[3:0] & {4 {pre_inst_valid_b}});
6300
6301assign fls_pct_npc_en[3:0] =
6302 trl_fls_npc_en[3:0] | (tid_dec_b[3:0] & {4 {pre_inst_valid_b}});
6303
6304
6305
6306//////////////////////////////////////////////////////////////////////////////
6307//
6308// Debug event control register processing
6309//
6310
6311tlu_fls_ctl_msff_ctl_macro__width_4 debug_event_lat (
6312 .scan_in(debug_event_lat_scanin),
6313 .scan_out(debug_event_lat_scanout),
6314 .din (pmu_tlu_debug_event [3:0] ),
6315 .dout (debug_event [3:0] ),
6316 .l1clk(l1clk),
6317 .siclk(siclk),
6318 .soclk(soclk)
6319);
6320
6321assign softstop_req_in =
6322 | (
6323 ({4 {asi_decr[63:62] == 2'b01}} & ibp_request [3:0]) |
6324 ({4 {asi_decr[61:60] == 2'b01}} & iaw_request [3:0]) |
6325 ({4 {asi_decr[59:58] == 2'b01}} & vaw_request [3:0]) |
6326 ({4 {asi_decr[57:56] == 2'b01}} & paw_request [3:0]) |
6327 ({4 {asi_decr[55:54] == 2'b01}} & tct_request [3:0]) |
6328 ({4 {asi_decr[53:52] == 2'b01}} & ras_precise_error [3:0]) |
6329 ({4 {asi_decr[51:50] == 2'b01}} & ras_disrupting_error [3:0]) |
6330 ({4 {asi_decr[49:48] == 2'b01}} & ras_deferred_error [3:0]) |
6331 ({4 {asi_decr[47:46] == 2'b01}} & debug_event [3:0]) );
6332
6333assign hardstop_req_in =
6334 | (
6335 ({4 {asi_decr[63:62] == 2'b10}} & ibp_request [3:0]) |
6336 ({4 {asi_decr[61:60] == 2'b10}} & iaw_request [3:0]) |
6337 ({4 {asi_decr[59:58] == 2'b10}} & vaw_request [3:0]) |
6338 ({4 {asi_decr[57:56] == 2'b10}} & paw_request [3:0]) |
6339 ({4 {asi_decr[55:54] == 2'b10}} & tct_request [3:0]) |
6340 ({4 {asi_decr[53:52] == 2'b10}} & ras_precise_error [3:0]) |
6341 ({4 {asi_decr[51:50] == 2'b10}} & ras_disrupting_error [3:0]) |
6342 ({4 {asi_decr[49:48] == 2'b10}} & ras_deferred_error [3:0]) |
6343 ({4 {asi_decr[47:46] == 2'b10}} & debug_event [3:0]) );
6344
6345assign pulse_req_in =
6346 | (
6347 ({4 {asi_decr[63:62] == 2'b11}} & ibp_request [3:0]) |
6348 ({4 {asi_decr[61:60] == 2'b11}} & iaw_request [3:0]) |
6349 ({4 {asi_decr[59:58] == 2'b11}} & vaw_request [3:0]) |
6350 ({4 {asi_decr[57:56] == 2'b11}} & paw_request [3:0]) |
6351 ({4 {asi_decr[55:54] == 2'b11}} & tct_request [3:0]) |
6352 ({4 {asi_decr[53:52] == 2'b11}} & ras_precise_error [3:0]) |
6353 ({4 {asi_decr[51:50] == 2'b11}} & ras_disrupting_error [3:0]) |
6354 ({4 {asi_decr[49:48] == 2'b11}} & ras_deferred_error [3:0]) |
6355 ({4 {asi_decr[47:46] == 2'b11}} & debug_event [3:0]) );
6356
6357tlu_fls_ctl_msff_ctl_macro__width_1 softstop_req_lat (
6358 .scan_in(softstop_req_lat_scanin),
6359 .scan_out(softstop_req_lat_scanout),
6360 .din (softstop_req_in ),
6361 .dout (softstop_req ),
6362 .l1clk(l1clk),
6363 .siclk(siclk),
6364 .soclk(soclk)
6365);
6366
6367tlu_fls_ctl_msff_ctl_macro__width_1 hardstop_req_lat (
6368 .scan_in(hardstop_req_lat_scanin),
6369 .scan_out(hardstop_req_lat_scanout),
6370 .din (hardstop_req_in ),
6371 .dout (hardstop_req ),
6372 .l1clk(l1clk),
6373 .siclk(siclk),
6374 .soclk(soclk)
6375);
6376
6377tlu_fls_ctl_msff_ctl_macro__width_1 pulse_req_lat (
6378 .scan_in(pulse_req_lat_scanin),
6379 .scan_out(pulse_req_lat_scanout),
6380 .din (pulse_req_in ),
6381 .dout (pulse_req ),
6382 .l1clk(l1clk),
6383 .siclk(siclk),
6384 .soclk(soclk)
6385);
6386
6387assign fls_spc_softstop_request =
6388 softstop_req;
6389assign fls_spc_hardstop_request =
6390 hardstop_req;
6391assign fls_spc_trigger_pulse =
6392 pulse_req;
6393
6394
6395
6396//////////////////////////////////////////////////////////////////////////////
6397//
6398// Core instruction signature
6399//
6400
6401// 00 : instruction non commited
6402// 01 : Control Transfer instruction commited in pipe
6403// 10 : Integer or FPU instruction commited in pipe
6404// 11 : Ld/Store instruction commited in pipe
6405assign instr_cmt_grp_in[1:0] =
6406 {2 {inst_valid_w & ~(| (flush_ifu[3:0] & tid_dec_w[3:0]))}} &
6407 {~cti_w, cti_w | lsu_inst_w};
6408
6409tlu_fls_ctl_msff_ctl_macro__width_2 instr_cmt_grp_lat (
6410 .scan_in(instr_cmt_grp_lat_scanin),
6411 .scan_out(instr_cmt_grp_lat_scanout),
6412 .din (instr_cmt_grp_in [1:0] ),
6413 .dout (instr_cmt_grp [1:0] ),
6414 .l1clk(l1clk),
6415 .siclk(siclk),
6416 .soclk(soclk)
6417);
6418
6419assign tlu_dbg_instr_cmt_grp[1:0] =
6420 instr_cmt_grp[1:0];
6421
6422
6423
6424
6425//////////////////////////////////////////////////////////////////////////////
6426//
6427// Tag access register power management
6428//
6429
6430assign tlu_tag_access_tid_b[1:0] =
6431 tid_b[1:0];
6432
6433assign tlu_i_tag_access_b =
6434 itlb_miss_b | ra_itlb_miss_b | itlb_priv_exc_b | itlb_nfo_exc_b |
6435 i_oor_va_b | i_ra_oor_va_b | itlb_err_b | target_oor_b;
6436
6437assign tlu_d_tag_access_b =
6438 lsu_inst_b;
6439
6440
6441
6442//////////////////////////////////////////////////////////////////////////////
6443//
6444// Shadow scan control for PC
6445//
6446
6447assign fls_ss_update_pc_w =
6448 (trl_shscanid[2] == thread_group) &
6449 (( trl_shscanid[1] & trl_shscanid[0] & tid_dec_w_in[3]) |
6450 ( trl_shscanid[1] & ~trl_shscanid[0] & tid_dec_w_in[2]) |
6451 (~trl_shscanid[1] & trl_shscanid[0] & tid_dec_w_in[1]) |
6452 (~trl_shscanid[1] & ~trl_shscanid[0] & tid_dec_w_in[0]) );
6453
6454
6455
6456//////////////////////////////////////////////////////////////////////////////
6457//
6458// Spares
6459//
6460
6461
6462
6463assign m114419_nor3_0[3:0] =
6464 ~(pre_xir_flush[3:0] | pre_desr_f[3:0] | pre_l_sbpp[3:0]);
6465
6466assign m114419_nor3_1[3:0] =
6467 ~(pre_ma_flush[3:0] | pre_cwq_flush[3:0] | pre_ivt_flush[3:0]);
6468
6469assign m114419_nor3_2[3:0] =
6470 ~(idl_exc[3:0] | {4 {ssmode | domode}});
6471
6472assign m114419_nand3_0[3:0] =
6473 ~(m114419_nor3_0 & m114419_nor3_1 & m114419_nor3_2);
6474
6475assign m114419_inv_0[3:0] =
6476 ~(m114419_nand3_0[3:0]);
6477
6478assign unhalt[3:0] =
6479 ~(trl_unhalt_[3:0] & m114419_inv_0[3:0]);
6480
6481assign halted_in[3:0] =
6482 ~(~(halted[3:0] | asi_halt[3:0]) | unhalt[3:0]);
6483
6484tlu_fls_ctl_msff_ctl_macro__scanreverse_1__width_16 spare_15_0_lat (
6485 .scan_in(spares_scanin),
6486 .scan_out(spares_scanout),
6487 .din ({{6{1'b0}} ,
6488 halted_in [3 ],
6489 1'b0 ,
6490 halted_in [0 ],
6491 1'b0 ,
6492 halted_in [1 ],
6493 1'b0 ,
6494 halted_in [2 ],
6495 {3{1'b0}} }),
6496 .dout ({unused [15:10],
6497 halted [3 ],
6498 unused [8 ],
6499 halted [0 ],
6500 unused [6 ],
6501 halted [1 ],
6502 unused [4 ],
6503 halted [2 ],
6504 unused [2:0]}),
6505 .l1clk(l1clk),
6506 .siclk(siclk),
6507 .soclk(soclk)
6508);
6509
6510assign tlu_halted[3:0] =
6511 halted[3:0];
6512
6513
6514
6515
6516
6517
6518supply0 vss; // <- port for ground
6519supply1 vdd; // <- port for power
6520// fixscan start:
6521assign beat_two_b_lat_scanin = scan_in ;
6522assign l1en_b2w_lat_scanin = beat_two_b_lat_scanout ;
6523assign hpstate_hpriv_lat_scanin = l1en_b2w_lat_scanout ;
6524assign hpriv_bar_or_ie_lat_scanin = hpstate_hpriv_lat_scanout;
6525assign hpriv_bar_and_ie_lat_scanin = hpriv_bar_or_ie_lat_scanout;
6526assign tid_dec_d_lat_scanin = hpriv_bar_and_ie_lat_scanout;
6527assign itlb_bypass_lat_scanin = tid_dec_d_lat_scanout ;
6528assign itlb_bypass_e_lat_scanin = itlb_bypass_lat_scanout ;
6529assign l_tlu_twocycle_b_lat_scanin = itlb_bypass_e_lat_scanout;
6530assign tid_b_lat_scanin = l_tlu_twocycle_b_lat_scanout;
6531assign fast_tid_dec_b_lat_scanin = tid_b_lat_scanout ;
6532assign pre_inst_valid_b_lat_scanin = fast_tid_dec_b_lat_scanout;
6533assign tl_eq_0_lat_scanin = pre_inst_valid_b_lat_scanout;
6534assign lsu_inst_b_lat_scanin = tl_eq_0_lat_scanout ;
6535assign fgu_inst_b_lat_scanin = lsu_inst_b_lat_scanout ;
6536assign illegal_inst_b_lat_scanin = fgu_inst_b_lat_scanout ;
6537assign itlb_miss_b_lat_scanin = illegal_inst_b_lat_scanout;
6538assign ra_itlb_miss_b_lat_scanin = itlb_miss_b_lat_scanout ;
6539assign itlb_priv_exc_b_lat_scanin = ra_itlb_miss_b_lat_scanout;
6540assign itlb_nfo_exc_b_lat_scanin = itlb_priv_exc_b_lat_scanout;
6541assign i_l2_unde_b_lat_scanin = itlb_nfo_exc_b_lat_scanout;
6542assign i_oor_va_b_lat_scanin = i_l2_unde_b_lat_scanout ;
6543assign i_ra_oor_va_b_lat_scanin = i_oor_va_b_lat_scanout ;
6544assign itlb_err_b_lat_scanin = i_ra_oor_va_b_lat_scanout;
6545assign ic_err_b_lat_scanin = itlb_err_b_lat_scanout ;
6546assign done_inst_b_lat_scanin = ic_err_b_lat_scanout ;
6547assign retry_inst_b_lat_scanin = done_inst_b_lat_scanout ;
6548assign sir_b_lat_scanin = retry_inst_b_lat_scanout ;
6549assign hpriv_exc_b_lat_scanin = sir_b_lat_scanout ;
6550assign priv_exc_b_lat_scanin = hpriv_exc_b_lat_scanout ;
6551assign fpdisable_exc_b_lat_scanin = priv_exc_b_lat_scanout ;
6552assign ecc_b_lat_scanin = fpdisable_exc_b_lat_scanout;
6553assign misalign_b_lat_scanin = ecc_b_lat_scanout ;
6554assign e_oor_va_b_lat_scanin = misalign_b_lat_scanout ;
6555assign e_tcc_b_lat_scanin = e_oor_va_b_lat_scanout ;
6556assign e_tof_b_lat_scanin = e_tcc_b_lat_scanout ;
6557assign e_fill_b_lat_scanin = e_tof_b_lat_scanout ;
6558assign br_taken_b_lat_scanin = e_fill_b_lat_scanout ;
6559assign annul_ds_m_lat_scanin = br_taken_b_lat_scanout ;
6560assign ds_b_lat_scanin = annul_ds_m_lat_scanout ;
6561assign perf_trap_b_lat_scanin = ds_b_lat_scanout ;
6562assign pil_mask_15_lat_scanin = perf_trap_b_lat_scanout ;
6563assign ibp_b_lat_scanin = pil_mask_15_lat_scanout ;
6564assign iaw_exc_m_lat_scanin = ibp_b_lat_scanout ;
6565assign iaw_b_lat_scanin = iaw_exc_m_lat_scanout ;
6566assign pstate_tct_b_lat_scanin = iaw_b_lat_scanout ;
6567assign tct_b_lat_scanin = pstate_tct_b_lat_scanout ;
6568assign cti_b_lat_scanin = tct_b_lat_scanout ;
6569assign twocycle_inst_w_lat_scanin = cti_b_lat_scanout ;
6570assign d_flush_w_lat_scanin = twocycle_inst_w_lat_scanout;
6571assign tid_dec_w_lat_scanin = d_flush_w_lat_scanout ;
6572assign pstate_am_b_lat_scanin = tid_dec_w_lat_scanout ;
6573assign pstate_am_w_lat_scanin = pstate_am_b_lat_scanout ;
6574assign two_tid_dec_w_lat_scanin = pstate_am_w_lat_scanout ;
6575assign inst_valid_w_lat_scanin = two_tid_dec_w_lat_scanout;
6576assign illegal_inst_w_lat_scanin = inst_valid_w_lat_scanout ;
6577assign itlb_miss_w_lat_scanin = illegal_inst_w_lat_scanout;
6578assign ra_itlb_miss_w_lat_scanin = itlb_miss_w_lat_scanout ;
6579assign itlb_priv_exc_w_lat_scanin = ra_itlb_miss_w_lat_scanout;
6580assign itlb_nfo_exc_w_lat_scanin = itlb_priv_exc_w_lat_scanout;
6581assign i_l2_err_w_lat_scanin = itlb_nfo_exc_w_lat_scanout;
6582assign i_oor_va_w_lat_scanin = i_l2_err_w_lat_scanout ;
6583assign i_ra_oor_va_w_lat_scanin = i_oor_va_w_lat_scanout ;
6584assign itlb_err_w_lat_scanin = i_ra_oor_va_w_lat_scanout;
6585assign ic_err_w_lat_scanin = itlb_err_w_lat_scanout ;
6586assign done_inst_w_lat_scanin = ic_err_w_lat_scanout ;
6587assign retry_inst_w_lat_scanin = done_inst_w_lat_scanout ;
6588assign sir_w_lat_scanin = retry_inst_w_lat_scanout ;
6589assign hpriv_exc_w_lat_scanin = sir_w_lat_scanout ;
6590assign priv_exc_w_lat_scanin = hpriv_exc_w_lat_scanout ;
6591assign fpdisable_exc_w_lat_scanin = priv_exc_w_lat_scanout ;
6592assign tcc_w_lat_scanin = fpdisable_exc_w_lat_scanout;
6593assign tof_w_lat_scanin = tcc_w_lat_scanout ;
6594assign e_ecc_w_lat_scanin = tof_w_lat_scanout ;
6595assign kill_irf_ecc_w_lat_scanin = e_ecc_w_lat_scanout ;
6596assign e_misalign_w_lat_scanin = kill_irf_ecc_w_lat_scanout;
6597assign immu_enable_lat_scanin = e_misalign_w_lat_scanout ;
6598assign br_ld_oor_va_w_lat_scanin = immu_enable_lat_scanout ;
6599assign br_ld_ra_oor_va_w_lat_scanin = br_ld_oor_va_w_lat_scanout;
6600assign pc_oor_va_b_lat_scanin = br_ld_ra_oor_va_w_lat_scanout;
6601assign snn_w_lat_scanin = pc_oor_va_b_lat_scanout ;
6602assign sno_w_lat_scanin = snn_w_lat_scanout ;
6603assign fnn_w_lat_scanin = sno_w_lat_scanout ;
6604assign fno_w_lat_scanin = fnn_w_lat_scanout ;
6605assign clw_w_lat_scanin = fno_w_lat_scanout ;
6606assign lsu_inst_w_lat_scanin = clw_w_lat_scanout ;
6607assign cti_w_lat_scanin = lsu_inst_w_lat_scanout ;
6608assign wstate3_w_lat_scanin = cti_w_lat_scanout ;
6609assign wstate2_w_lat_scanin = wstate3_w_lat_scanout ;
6610assign wstate1_w_lat_scanin = wstate2_w_lat_scanout ;
6611assign wstate0_w_lat_scanin = wstate1_w_lat_scanout ;
6612assign trap_number_w_lat_scanin = wstate0_w_lat_scanout ;
6613assign trap_number_3_lat_scanin = trap_number_w_lat_scanout;
6614assign trap_number_2_lat_scanin = trap_number_3_lat_scanout;
6615assign trap_number_1_lat_scanin = trap_number_2_lat_scanout;
6616assign trap_number_0_lat_scanin = trap_number_1_lat_scanout;
6617assign lddf_align_w_lat_scanin = trap_number_0_lat_scanout;
6618assign stdf_align_w_lat_scanin = lddf_align_w_lat_scanout ;
6619assign daccess_prot_w_lat_scanin = stdf_align_w_lat_scanout ;
6620assign priv_action_w_lat_scanin = daccess_prot_w_lat_scanout;
6621assign va_watchpoint_w_lat_scanin = priv_action_w_lat_scanout;
6622assign pa_watchpoint_w_lat_scanin = va_watchpoint_w_lat_scanout;
6623assign align_w_lat_scanin = pa_watchpoint_w_lat_scanout;
6624assign dtlb_w_lat_scanin = align_w_lat_scanout ;
6625assign ra_dtlb_w_lat_scanin = dtlb_w_lat_scanout ;
6626assign l_real_w_lat_scanin = ra_dtlb_w_lat_scanout ;
6627assign dae_invalid_asi_w_lat_scanin = l_real_w_lat_scanout ;
6628assign dae_nc_page_w_lat_scanin = dae_invalid_asi_w_lat_scanout;
6629assign dae_nfo_page_w_lat_scanin = dae_nc_page_w_lat_scanout;
6630assign dae_priv_viol_w_lat_scanin = dae_nfo_page_w_lat_scanout;
6631assign dae_so_page_w_lat_scanin = dae_priv_viol_w_lat_scanout;
6632assign dtlb_error_w_lat_scanin = dae_so_page_w_lat_scanout;
6633assign precise_perf_trap_w_lat_scanin = dtlb_error_w_lat_scanout ;
6634assign perf_trap_w_lat_scanin = precise_perf_trap_w_lat_scanout;
6635assign ibp_w_lat_scanin = perf_trap_w_lat_scanout ;
6636assign iaw_w_lat_scanin = ibp_w_lat_scanout ;
6637assign tct_w_lat_scanin = iaw_w_lat_scanout ;
6638assign l_spec_enable_lat_scanin = tct_w_lat_scanout ;
6639assign f_predict_w_lat_scanin = l_spec_enable_lat_scanout;
6640assign pdist_beat2_fx2_lat_scanin = f_predict_w_lat_scanout ;
6641assign f_cecc_w_lat_scanin = pdist_beat2_fx2_lat_scanout;
6642assign f_uecc_w_lat_scanin = f_cecc_w_lat_scanout ;
6643assign pdist_ecc_w_lat_scanin = f_uecc_w_lat_scanout ;
6644assign asi_ecc_w_lat_scanin = pdist_ecc_w_lat_scanout ;
6645assign ime_w_lat_scanin = asi_ecc_w_lat_scanout ;
6646assign dme_w_lat_scanin = ime_w_lat_scanout ;
6647assign m_dae_req_b_lat_scanin = dme_w_lat_scanout ;
6648assign m_dae_req_w_lat_scanin = m_dae_req_b_lat_scanout ;
6649assign br_taken_not_annul_ds_w_lat_scanin = m_dae_req_w_lat_scanout ;
6650assign nns_exc_lat_scanin = br_taken_not_annul_ds_w_lat_scanout;
6651assign nns_exc_w_lat_scanin = nns_exc_lat_scanout ;
6652assign exc_w_lat_scanin = nns_exc_w_lat_scanout ;
6653assign trap_flush_lat_scanin = exc_w_lat_scanout ;
6654assign preflush_b_lat_scanin = trap_flush_lat_scanout ;
6655assign flush_gfb_lat_scanin = preflush_b_lat_scanout ;
6656assign l_l2_ecc_w_lat_scanin = flush_gfb_lat_scanout ;
6657assign l_sbdl_ecc_w_lat_scanin = l_l2_ecc_w_lat_scanout ;
6658assign priv_action_g_w_lat_scanin = l_sbdl_ecc_w_lat_scanout ;
6659assign precise_perf_trap_g_w_lat_scanin = priv_action_g_w_lat_scanout;
6660assign ieee_exc_fw_lat_scanin = precise_perf_trap_g_w_lat_scanout;
6661assign unfin_fw_lat_scanin = ieee_exc_fw_lat_scanout ;
6662assign idiv0_exc_fw_lat_scanin = unfin_fw_lat_scanout ;
6663assign xir_flush_lat_scanin = idiv0_exc_fw_lat_scanout ;
6664assign xir_flush_b_lat_scanin = xir_flush_lat_scanout ;
6665assign pre_desr_f_lat_scanin = xir_flush_b_lat_scanout ;
6666assign desr_f_lat_scanin = pre_desr_f_lat_scanout ;
6667assign desr_s_lat_scanin = desr_f_lat_scanout ;
6668assign eer_err_b_lat_scanin = desr_s_lat_scanout ;
6669assign ade_err_b_lat_scanin = eer_err_b_lat_scanout ;
6670assign l_sbpp_lat_scanin = ade_err_b_lat_scanout ;
6671assign l_sbpp_b_lat_scanin = l_sbpp_lat_scanout ;
6672assign ma_flush_lat_scanin = l_sbpp_b_lat_scanout ;
6673assign ma_flush_b_lat_scanin = ma_flush_lat_scanout ;
6674assign cwq_flush_lat_scanin = ma_flush_b_lat_scanout ;
6675assign cwq_flush_b_lat_scanin = cwq_flush_lat_scanout ;
6676assign mqr_exc_b_lat_scanin = cwq_flush_b_lat_scanout ;
6677assign dqr_exc_b_lat_scanin = mqr_exc_b_lat_scanout ;
6678assign rqr_exc_b_lat_scanin = dqr_exc_b_lat_scanout ;
6679assign ivt_lat_scanin = rqr_exc_b_lat_scanout ;
6680assign ivt_flush_b_lat_scanin = ivt_lat_scanout ;
6681assign iln_exc_b_lat_scanin = ivt_flush_b_lat_scanout ;
6682assign tlz_exc_b_lat_scanin = iln_exc_b_lat_scanout ;
6683assign hst_exc_b_lat_scanin = tlz_exc_b_lat_scanout ;
6684assign no_hold_disrupting_flush_lat_scanin = hst_exc_b_lat_scanout ;
6685assign disrupting_flush_pending_tid_dec_b_lat_scanin = no_hold_disrupting_flush_lat_scanout;
6686assign cdfpw_lat_scanin = disrupting_flush_pending_tid_dec_b_lat_scanout;
6687assign disrupting_flush_w_lat_scanin = cdfpw_lat_scanout ;
6688assign block_store_w_lat_scanin = disrupting_flush_w_lat_scanout;
6689assign bsee_pending_lat_scanin = block_store_w_lat_scanout;
6690assign bsee_req_lat_scanin = bsee_pending_lat_scanout ;
6691assign bsee_req_w_lat_scanin = bsee_req_lat_scanout ;
6692assign bsee_flush_b_lat_scanin = bsee_req_w_lat_scanout ;
6693assign core_running_lat_scanin = bsee_flush_b_lat_scanout ;
6694assign core_running_last_lat_scanin = core_running_lat_scanout ;
6695assign core_running_status_lat_scanin = core_running_last_lat_scanout;
6696assign idl_exc_lat_scanin = core_running_status_lat_scanout;
6697assign idl_req_lat_scanin = idl_exc_lat_scanout ;
6698assign ssmode_lat_scanin = idl_req_lat_scanout ;
6699assign domode_lat_scanin = ssmode_lat_scanout ;
6700assign ssreq_lat_scanin = domode_lat_scanout ;
6701assign ssr_req_lat_scanin = ssreq_lat_scanout ;
6702assign ever_been_running_lat_scanin = ssr_req_lat_scanout ;
6703assign por_req_lat_scanin = ever_been_running_lat_scanout;
6704assign xir_req_lat_scanin = por_req_lat_scanout ;
6705assign ftt_req_lat_scanin = xir_req_lat_scanout ;
6706assign ade_req_lat_scanin = ftt_req_lat_scanout ;
6707assign eer_req_lat_scanin = ade_req_lat_scanout ;
6708assign ivt_req_lat_scanin = eer_req_lat_scanout ;
6709assign ma_req_lat_scanin = ivt_req_lat_scanout ;
6710assign cwq_req_lat_scanin = ma_req_lat_scanout ;
6711assign mqr_req_lat_scanin = cwq_req_lat_scanout ;
6712assign dqr_req_lat_scanin = mqr_req_lat_scanout ;
6713assign rqr_req_lat_scanin = dqr_req_lat_scanout ;
6714assign iln_req_lat_scanin = rqr_req_lat_scanout ;
6715assign hst_req_lat_scanin = iln_req_lat_scanout ;
6716assign tlz_req_lat_scanin = hst_req_lat_scanout ;
6717assign ssc_req_lat_scanin = tlz_req_lat_scanout ;
6718assign disrupting_ssc_exc_lat_scanin = ssc_req_lat_scanout ;
6719assign hw_tw_enabled_lat_scanin = disrupting_ssc_exc_lat_scanout;
6720assign load_i_tag_access_lat_scanin = hw_tw_enabled_lat_scanout;
6721assign load_d_tag_access_lat_scanin = load_i_tag_access_lat_scanout;
6722assign m103663_lat_scanin = load_d_tag_access_lat_scanout;
6723assign refetch_w_lat_scanin = m103663_lat_scanout ;
6724assign pc_valid_lat_scanin = refetch_w_lat_scanout ;
6725assign npc_valid_lat_scanin = pc_valid_lat_scanout ;
6726assign pc_is_npc_lat_scanin = npc_valid_lat_scanout ;
6727assign debug_event_lat_scanin = pc_is_npc_lat_scanout ;
6728assign softstop_req_lat_scanin = debug_event_lat_scanout ;
6729assign hardstop_req_lat_scanin = softstop_req_lat_scanout ;
6730assign pulse_req_lat_scanin = hardstop_req_lat_scanout ;
6731assign instr_cmt_grp_lat_scanin = pulse_req_lat_scanout ;
6732assign spares_scanin = instr_cmt_grp_lat_scanout;
6733assign scan_out = spares_scanout ;
6734
6735assign pmqr_exc_lat_wmr_scanin = wmr_scan_in ;
6736assign pdqr_exc_lat_wmr_scanin = pmqr_exc_lat_wmr_scanout ;
6737assign prqr_exc_lat_wmr_scanin = pdqr_exc_lat_wmr_scanout ;
6738assign ivt_flush_lat_wmr_scanin = prqr_exc_lat_wmr_scanout ;
6739assign cwp_lat_wmr_scanin = ivt_flush_lat_wmr_scanout;
6740assign wmr_scan_out = cwp_lat_wmr_scanout ;
6741// fixscan end:
6742endmodule
6743
6744
6745
6746
6747
6748
6749// any PARAMS parms go into naming of macro
6750
6751module tlu_fls_ctl_msff_ctl_macro__width_2 (
6752 din,
6753 l1clk,
6754 scan_in,
6755 siclk,
6756 soclk,
6757 dout,
6758 scan_out);
6759wire [1:0] fdin;
6760wire [0:0] so;
6761
6762 input [1:0] din;
6763 input l1clk;
6764 input scan_in;
6765
6766
6767 input siclk;
6768 input soclk;
6769
6770 output [1:0] dout;
6771 output scan_out;
6772assign fdin[1:0] = din[1:0];
6773
6774
6775
6776
6777
6778
6779dff #(2) d0_0 (
6780.l1clk(l1clk),
6781.siclk(siclk),
6782.soclk(soclk),
6783.d(fdin[1:0]),
6784.si({scan_in,so[0:0]}),
6785.so({so[0:0],scan_out}),
6786.q(dout[1:0])
6787);
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800endmodule
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814// any PARAMS parms go into naming of macro
6815
6816module tlu_fls_ctl_msff_ctl_macro__width_1 (
6817 din,
6818 l1clk,
6819 scan_in,
6820 siclk,
6821 soclk,
6822 dout,
6823 scan_out);
6824wire [0:0] fdin;
6825
6826 input [0:0] din;
6827 input l1clk;
6828 input scan_in;
6829
6830
6831 input siclk;
6832 input soclk;
6833
6834 output [0:0] dout;
6835 output scan_out;
6836assign fdin[0:0] = din[0:0];
6837
6838
6839
6840
6841
6842
6843dff #(1) d0_0 (
6844.l1clk(l1clk),
6845.siclk(siclk),
6846.soclk(soclk),
6847.d(fdin[0:0]),
6848.si(scan_in),
6849.so(scan_out),
6850.q(dout[0:0])
6851);
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864endmodule
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878// any PARAMS parms go into naming of macro
6879
6880module tlu_fls_ctl_l1clkhdr_ctl_macro (
6881 l2clk,
6882 l1en,
6883 pce_ov,
6884 stop,
6885 se,
6886 l1clk);
6887
6888
6889 input l2clk;
6890 input l1en;
6891 input pce_ov;
6892 input stop;
6893 input se;
6894 output l1clk;
6895
6896
6897
6898
6899
6900cl_sc1_l1hdr_8x c_0 (
6901
6902
6903 .l2clk(l2clk),
6904 .pce(l1en),
6905 .l1clk(l1clk),
6906 .se(se),
6907 .pce_ov(pce_ov),
6908 .stop(stop)
6909);
6910
6911
6912
6913endmodule
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927// any PARAMS parms go into naming of macro
6928
6929module tlu_fls_ctl_msff_ctl_macro__width_4 (
6930 din,
6931 l1clk,
6932 scan_in,
6933 siclk,
6934 soclk,
6935 dout,
6936 scan_out);
6937wire [3:0] fdin;
6938wire [2:0] so;
6939
6940 input [3:0] din;
6941 input l1clk;
6942 input scan_in;
6943
6944
6945 input siclk;
6946 input soclk;
6947
6948 output [3:0] dout;
6949 output scan_out;
6950assign fdin[3:0] = din[3:0];
6951
6952
6953
6954
6955
6956
6957dff #(4) d0_0 (
6958.l1clk(l1clk),
6959.siclk(siclk),
6960.soclk(soclk),
6961.d(fdin[3:0]),
6962.si({scan_in,so[2:0]}),
6963.so({so[2:0],scan_out}),
6964.q(dout[3:0])
6965);
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978endmodule
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992// any PARAMS parms go into naming of macro
6993
6994module tlu_fls_ctl_msff_ctl_macro__width_3 (
6995 din,
6996 l1clk,
6997 scan_in,
6998 siclk,
6999 soclk,
7000 dout,
7001 scan_out);
7002wire [2:0] fdin;
7003wire [1:0] so;
7004
7005 input [2:0] din;
7006 input l1clk;
7007 input scan_in;
7008
7009
7010 input siclk;
7011 input soclk;
7012
7013 output [2:0] dout;
7014 output scan_out;
7015assign fdin[2:0] = din[2:0];
7016
7017
7018
7019
7020
7021
7022dff #(3) d0_0 (
7023.l1clk(l1clk),
7024.siclk(siclk),
7025.soclk(soclk),
7026.d(fdin[2:0]),
7027.si({scan_in,so[1:0]}),
7028.so({so[1:0],scan_out}),
7029.q(dout[2:0])
7030);
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043endmodule
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057// any PARAMS parms go into naming of macro
7058
7059module tlu_fls_ctl_msff_ctl_macro__width_8 (
7060 din,
7061 l1clk,
7062 scan_in,
7063 siclk,
7064 soclk,
7065 dout,
7066 scan_out);
7067wire [7:0] fdin;
7068wire [6:0] so;
7069
7070 input [7:0] din;
7071 input l1clk;
7072 input scan_in;
7073
7074
7075 input siclk;
7076 input soclk;
7077
7078 output [7:0] dout;
7079 output scan_out;
7080assign fdin[7:0] = din[7:0];
7081
7082
7083
7084
7085
7086
7087dff #(8) d0_0 (
7088.l1clk(l1clk),
7089.siclk(siclk),
7090.soclk(soclk),
7091.d(fdin[7:0]),
7092.si({scan_in,so[6:0]}),
7093.so({so[6:0],scan_out}),
7094.q(dout[7:0])
7095);
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108endmodule
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122// any PARAMS parms go into naming of macro
7123
7124module tlu_fls_ctl_msff_ctl_macro__width_12 (
7125 din,
7126 l1clk,
7127 scan_in,
7128 siclk,
7129 soclk,
7130 dout,
7131 scan_out);
7132wire [11:0] fdin;
7133wire [10:0] so;
7134
7135 input [11:0] din;
7136 input l1clk;
7137 input scan_in;
7138
7139
7140 input siclk;
7141 input soclk;
7142
7143 output [11:0] dout;
7144 output scan_out;
7145assign fdin[11:0] = din[11:0];
7146
7147
7148
7149
7150
7151
7152dff #(12) d0_0 (
7153.l1clk(l1clk),
7154.siclk(siclk),
7155.soclk(soclk),
7156.d(fdin[11:0]),
7157.si({scan_in,so[10:0]}),
7158.so({so[10:0],scan_out}),
7159.q(dout[11:0])
7160);
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173endmodule
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187// any PARAMS parms go into naming of macro
7188
7189module tlu_fls_ctl_msff_ctl_macro__scanreverse_1__width_16 (
7190 din,
7191 l1clk,
7192 scan_in,
7193 siclk,
7194 soclk,
7195 dout,
7196 scan_out);
7197wire [15:0] fdin;
7198wire [0:14] so;
7199
7200 input [15:0] din;
7201 input l1clk;
7202 input scan_in;
7203
7204
7205 input siclk;
7206 input soclk;
7207
7208 output [15:0] dout;
7209 output scan_out;
7210assign fdin[15:0] = din[15:0];
7211
7212
7213
7214
7215
7216
7217dff #(16) d0_0 (
7218.l1clk(l1clk),
7219.siclk(siclk),
7220.soclk(soclk),
7221.d(fdin[15:0]),
7222.si({so[0:14],scan_in}),
7223.so({scan_out,so[0:14]}),
7224.q(dout[15:0])
7225);
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238endmodule
7239
7240
7241
7242
7243
7244
7245
7246