// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: exu_ect_ctl.v
// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// For the avoidance of doubt, and except that if any non-GPL license
// choice is available it will apply instead, Sun elects to use only
// the General Public License version 2 (GPLv2) at this time for any
// software where a choice of GPL license versions is made
// available with the language indicating that GPLv2 or any later version
// may be used, or where a choice of which version of the GPL is applied is
// otherwise unspecified.
// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
// CA 95054 USA or visit www.sun.com if you need additional information or
// ========== Copyright Header End ============================================
ect_alignaddress_little_e,
wire [2:0] lsu_exu_tid_b;
wire i_mbist_lth_scanout;
wire mbi_irf_write_en_p1;
wire alignaddress_little_d;
wire i_estage_lth_scanin;
wire i_estage_lth_scanout;
wire i_mstage_lth_scanin;
wire i_mstage_lth_scanout;
wire [1:0] tid_lth_w_plus1;
wire [4:0] rd_lth_w_plus1;
wire [1:0] tid_lth_w2_plus1;
wire [4:0] rd_lth_w2_plus1;
wire [7:0] ccr_data_lth_b;
wire [7:0] arch_ccr_tid0_in;
wire [7:0] ccr_data_lth_w;
wire [7:0] arch_ccr_tid0_lth;
wire [7:0] arch_ccr_tid1_in;
wire [7:0] arch_ccr_tid1_lth;
wire [7:0] arch_ccr_tid2_in;
wire [7:0] arch_ccr_tid2_lth;
wire [7:0] arch_ccr_tid3_in;
wire [7:0] arch_ccr_tid3_lth;
wire i_ccr_pipe_lth_scanin;
wire i_ccr_pipe_lth_scanout;
wire [7:0] ccr_data_lth_m;
wire i_ccr_arch_lth_wmr_scanin;
wire i_ccr_arch_lth_wmr_scanout;
wire [7:0] exu_ccr_byp_data0;
wire [7:0] exu_ccr_byp_data1;
wire tas_tv_overflow_m_in;
wire tas_tv_overflow_m_lth;
wire special_ls_va_hole_m_;
wire special_br_va_hole_m_;
wire misalign_error_m_in;
wire yreg_mwr_valid_em3_in;
wire yreg_mwr_valid_em2_in;
wire yreg_mwr_valid_em2_lth;
wire yreg_mwr_valid_em1_in;
wire yreg_mwr_valid_em1_lth;
wire yreg_mwr_valid_e_in;
wire yreg_mwr_valid_e_lth;
wire yreg_mwr_valid_m_in;
wire yreg_mwr_valid_m_lth;
wire yreg_swr_valid_e_in;
wire yreg_swr_valid_m_in;
wire yreg_swr_valid_m_lth;
wire yreg_mwr_valid_b_lth;
wire yreg_swr_valid_b_lth;
wire i_yreg_mpipe_lth_scanin;
wire i_yreg_mpipe_lth_scanout;
wire i_yreg_spipe_lth_scanin;
wire i_yreg_spipe_lth_scanout;
wire [2:0] fgu_cmp_fcc_tid_fx3;
wire [2:0] fgu_fld_fcc_tid_fx3;
wire fcc_t0_ff_wmr_scanin;
wire fcc_t0_ff_wmr_scanout;
wire fcc_t1_ff_wmr_scanin;
wire fcc_t1_ff_wmr_scanout;
wire fcc_t2_ff_wmr_scanin;
wire fcc_t2_ff_wmr_scanout;
wire fcc_t3_ff_wmr_scanin;
wire fcc_t3_ff_wmr_scanout;
wire brcond_e_reg_scanin;
wire brcond_e_reg_scanout;
wire final_cond_true_z0_e;
wire final_cond_true_z1_e;
input tcu_pce_ov; // scan signals
input dec_inst_rs1_vld_p;
input dec_inst_rs2_vld_p;
input dec_inst_rs3_vld_p;
input [4:0] dec_inst_rs1_p; // window operations must be taken into account
input [4:0] dec_inst_rs2_p;
input [4:0] dec_inst_rs3_p;
input [4:0] dec_inst_rd_d;
input dec_decode_d; // Instruction and TID are valid
input dec_thread_group; // Static Signal : Tie UP or DOWN where cloning occurs
input dec_valid_e; // inst is truly valid at e (annul)
input tlu_itlb_bypass_e; // Ignore Address Out-Of-Range
input [3:0] fgu_exu_icc_fx5; // FGU int icc cond code {N,Z,V,C}
input [1:0] fgu_exu_xcc_fx5; // FGU int xcc cond code {N,Z}
input fgu_exu_cc_vld_fx5; // FGU int icc/xcc cond code valid
input [1:0] fgu_result_tid_fx5;
input [4:0] fgu_irf_w_addr_fx5;
input [4:0] lsu_exu_rd_m;
input [2:0] lsu_exu_tid_m;
input tlu_flush_exu_b; // EXU to flush instr in B stage
input [1:0] tlu_ccr_cwp_tid;
input [3:0] tlu_pstate_am; // 32-bit addressing mode if = 1
input lsu_exu_pmen; // Power Management : Master Enable
input [3:0] spc_core_running_status; // Power Management : Thread active
input [6:0] mbi_addr; // MBIST
input mbi_irf_write_en; // MBIST
input [7:0] edp_rng_in_ff; // ASI Ring : In data flopped
input rml_rng_wt_ccr_ctl;
input [1:0] edp_br_flag_e; // [1] : RS1 negative; [0] : RS1 zero;
input [63:0] exu_rs1_data_e;
input [63:0] exu_rs2_data_e;
input edp_add_data_e_b63;
input edp_add_data_e_b31;
input [1:0] edp_add_zdetect_e_;
input edp_sub_data_e_b63;
input edp_sub_data_e_b31;
input [1:0] edp_sub_zdetect_e_;
input edp_logical_data_e_b63;
input edp_logical_data_e_b31;
input [1:0] edp_lg_zdetect_e;
input [63:47] edp_address_m;
input [63:47] edp_rd_ff_m;
// *** DEC_CCR Inputs ***
input [7:0] fgu_fld_fcc_fx3; // fcc's from the fgu
input [2:0] lsu_fgu_fld_tid_b;
input [1:0] fgu_fld_fcc_vld_fx3;
input lsu_fgu_fld_vld_w; // Float load valid
input [1:0] fgu_cmp_fcc_fx3; // fcc's from the fgu
input [2:0] fgu_cmp_fcc_tid_fx2;
input [3:0] fgu_cmp_fcc_vld_fx3;
input [3:0] dec_pick_d; // which stand is valid at d
// *** Global Outputs ***
output [5:0] exu_mdp_mux_sel_e; // To MDP
output [1:0] exu_gsr_vld_m;
output exu_lsu_va_error_m; // To LSU : Address Out of Range
output exu_misalign_m; // To TLU : Misaligned address for Jump,Return
output exu_oor_va_m; // To TLU : Address Out of Range
output exu_tcc_m; // To TLU : Trap taken
output exu_tof_m; // To TLU : Tagged Add TV with overflow
output [7:0] exu_ccr0; // To TLU : Architected CCR
output [7:0] exu_ccr1; // To TLU : Architected CCR
output [7:0] exu_ccr2; // To TLU : Architected CCR
output [7:0] exu_ccr3; // To TLU : Architected CCR
output [4:0] ect_rs1_early_sel_d;
output [4:0] ect_rs2_early_sel_d;
output [4:0] ect_rs3_early_sel_d;
output [7:0] ect_rs2_imm_sel_d;
output [3:0] ect_rs1_late_sel_d;
output [3:0] ect_rs2_late_sel_d;
output [3:0] ect_rs3_late_sel_d;
output [3:0] ect_logic_sel_d;
output [6:0] ect_shift_sel_d;
output ect_br_taken_z0_e;
output ect_br_taken_z1_e;
output ect_alignaddress_little_e;
output ect_as_clip_e_; // ALIGNADDRESS clipping of bit [2:0]
output [1:0] ect_array_sel_e;
output [7:0] ect_edge_lmask_e;
output [7:0] ect_edge_lrmask_e;
output [5:0] ect_rm_early_sel_e;
output [2:0] ect_rm_late_sel_e; // [0] : Sub; [1] : Add; [2] : Shift; Def : Early Mux
output ect_store_mux_sel_e;
output [1:0] ect_tid_lth_e;
output [4:0] ect_rs1_addr_e;
output [4:0] ect_rs2_addr_e;
output [4:0] ect_rs3_addr_e;
output ect_rs1_valid_e; // Allow ECC checking on RS1
output ect_rs2_valid_e; // Allow ECC checking on RS2
output ect_rs3_valid_e; // Allow ECC checking on RS3
output ect_two_cycle_m; // Allow ECC checking on 2nd cycle of CASA+STD
output [4:0] ect_rd_lth_w;
output [4:0] ect_rd_lth_w2;
output [1:0] ect_tid_lth_w;
output [1:0] ect_tid_lth_w2;
output [7:0] ect_rng_ccr_data;
output ect_misaligned_error_m; // To RML : assert when last 2 bit of address is non "00"
output ect_ex_emb_clken; // Power Management
output ect_tg_clken; // Power Management
assign pce_ov = tcu_pce_ov;
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Power Management !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
exu_ect_ctl_l1clkhdr_ctl_macro clkgen (
exu_ect_ctl_l1clkhdr_ctl_macro clkgen_pm1 (
exu_ect_ctl_l1clkhdr_ctl_macro clkgen_pm2 (
assign tg_active = (spc_core_running_status[3:0] != 4'b0000);
exu_ect_ctl_msff_ctl_macro__width_5 i_pwr0_lth (
.scan_in(i_pwr0_lth_scanin),
.scan_out(i_pwr0_lth_scanout),
.din ({~lsu_exu_pmen , tg_active , mbi_run , lsu_exu_tid_m[2] , lsu_exu_tid_b[2]} ),
.dout ({pmen_lth_ , tg_active_lth , mbi_run_lth , lsu_exu_tid_b[2] , tid_lth_w2[2]} ),
exu_ect_ctl_msff_ctl_macro__width_5 i_pwr1_lth (
.scan_in(i_pwr1_lth_scanin),
.scan_out(i_pwr1_lth_scanout),
.din ({dec_decode_d , dec_valid_e , pwr_m , pwr_b , pwr_w} ),
.dout ({pwr_e , pwr_m , pwr_b , pwr_w , pwr_w_p1} ),
assign ect_tg_clken = pmen_lth_ | tg_active_lth | mbi_run_lth;
assign ect_ex_emb_clken = pmen_lth_ | mbi_run_lth | pwr_e | pwr_m | pwr_b;
assign ex_dw1_clken = pmen_lth_ | mbi_run_lth | dec_decode_d | pwr_e | pwr_m | pwr_b | pwr_w | pwr_w_p1;
assign ect_mbist_sel = mbi_run_lth;
exu_ect_ctl_msff_ctl_macro__width_8 i_mbist_lth (
.scan_in(i_mbist_lth_scanin),
.scan_out(i_mbist_lth_scanout),
.din ({mbi_irf_write_en , mbi_addr[6:0]} ),
.dout ({mbi_irf_write_en_p1 , mbi_addr_p1[6:0]} ),
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Power Management !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Decode !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
// *** WARNING : Full decodes used until unit is functional - then use espresso
// assign inst[29:25] = dec_inst_d[29:25];
// assign d_add = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0000);
// assign d_addcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0000);
// assign d_addc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1000);
// assign d_addccc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1000);
// assign d_sub = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0100);
// assign d_subcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0100);
// assign d_subc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1100);
// assign d_subccc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1100);
// assign d_taddcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0000); // pg 234 : Tagged Add
// assign d_taddcctv = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0010); // pg 234 : Tagged Add
// assign d_tsubcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0001); // pg 235 : Tagged Sub
// assign d_tsubcctv = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0011); // pg 235 : Tagged Sub
// assign d_save = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_1100); // pg 214 : Save
// assign d_restore = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_1101); // pg 214 : Restore
// assign add_d = d_add | d_addcc | d_addc | d_addccc | d_taddcc | d_taddcctv | bmask_d | alignaddress_d | alignaddress_little_d;
// assign sub_d = d_sub | d_subcc | d_subc | d_subccc | d_tsubcc | d_tsubcctv;
// assign addsub_d = add_d | sub_d | bmask_d | alignaddress_d | alignaddress_little_d;
// assign as_subtract_d = sub_d | edge_d;
// assign as_cc_d = d_addcc | d_addccc | d_subcc | d_subccc | d_taddcc | d_taddcctv | d_tsubcc | d_tsubcctv | edge_cc_d;
// assign tas_cc_d = d_taddcc | d_taddcctv | d_tsubcc | d_tsubcctv;
// assign tas_tv_d = d_taddcctv | d_tsubcctv;
// assign as_cin_d = ((d_sub | d_subcc ) ) |
// ((d_tsubcc | d_tsubcctv) ) |
// ((d_subc | d_subccc ) & ~ccr_byp_data_b0) |
// ((d_addc | d_addccc ) & ccr_byp_data_b0);
assign as_cin_d = as_cin_set_d |
(as_cin_ccr0_d & ~ccr_byp_data_b0) |
(as_cin_ccr1_d & ccr_byp_data_b0);
// assign d_and = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0001);
// assign d_andcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0001);
// assign d_andn = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0101);
// assign d_andncc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0101);
// assign d_or = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0010);
// assign d_orcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0010);
// assign d_orn = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0110);
// assign d_orncc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0110);
// assign d_xor = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0011);
// assign d_xorcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0011);
// assign d_xorn = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_0111);
// assign d_xorncc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_0111);
// assign logic_rs2_d = sethi_d | mov_cond_d;
// assign logic_d = d_and | d_andcc | d_andn | d_andncc | d_or | d_orcc | d_orn | d_orncc | d_xor | d_xorcc | d_xorn | d_xorncc | logic_rs2_d;
// assign logic_sel_d[3] = d_and | d_andcc | d_or | d_orcc | d_orn | d_orncc | d_xorn | d_xorncc | logic_rs2_d | casa_d;
// assign logic_sel_d[2] = d_andn | d_andncc | d_or | d_orcc | d_orn | d_orncc | d_xor | d_xorcc | casa_d;
// assign logic_sel_d[1] = d_or | d_orcc | d_xor | d_xorcc | logic_rs2_d;
// assign logic_sel_d[0] = d_orn | d_orncc | d_xorn | d_xorncc ;
// assign lg_cc_d = d_andcc | d_andncc | d_orcc | d_orncc | d_xorcc | d_xorncc;
// assign d_sll = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0101) & (inst[12] == 1'b0);
// assign d_srl = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0110) & (inst[12] == 1'b0);
// assign d_sra = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0111) & (inst[12] == 1'b0);
// assign d_sllx = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0101) & (inst[12] == 1'b1);
// assign d_srlx = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0110) & (inst[12] == 1'b1);
// assign d_srax = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0111) & (inst[12] == 1'b1);
// assign shift_d = d_sll | d_srl | d_sra | d_sllx | d_srlx | d_srax;
// assign shift_sel_d[6] = d_srl | d_sra | d_srlx | d_srax;
// assign shift_sel_d[5] = d_sll | d_sllx ;
// assign shift_sel_d[4] = d_srax;
// assign shift_sel_d[3] = d_sra ;
// assign shift_sel_d[2] = d_srlx | d_srax;
// assign shift_sel_d[1] = d_sllx ;
// assign shift_sel_d[0] = d_sll | d_srl | d_sra ;
// assign d_edge8 = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0000); // VIS pg. 70
// assign d_edge8n = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0001); // VIS pg. 70
// assign d_edge8l = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0010); // VIS pg. 70
// assign d_edge8ln = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0011); // VIS pg. 70
// assign d_edge16 = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0100); // VIS pg. 70
// assign d_edge16n = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0101); // VIS pg. 70
// assign d_edge16l = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0110); // VIS pg. 70
// assign d_edge16ln = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_0111); // VIS pg. 70
// assign d_edge32 = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_1000); // VIS pg. 70
// assign d_edge32n = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_1001); // VIS pg. 70
// assign d_edge32l = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_1010); // VIS pg. 70
// assign d_edge32ln = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0000_1011); // VIS pg. 70
// assign edge08_d = d_edge8 | d_edge8n | d_edge8l | d_edge8ln;
// assign edge16_d = d_edge16 | d_edge16n | d_edge16l | d_edge16ln;
// assign edge32_d = d_edge32 | d_edge32n | d_edge32l | d_edge32ln;
// assign edge_d = edge08_d | edge16_d | edge32_d;
// assign edgele_d = d_edge8l | d_edge8ln | d_edge16l | d_edge16ln | d_edge32l | d_edge32ln;
// assign edge_cc_d = d_edge8 | d_edge8l | d_edge16 | d_edge16l | d_edge32 | d_edge32l;
// assign array08_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0001_0000); // VIS pg. 74
// assign array16_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0001_0010); // VIS pg. 74
// assign array32_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:05] == 9'b0_0001_0100); // VIS pg. 74
// assign array_d = array08_d | array16_d | array32_d;
// assign bpr_d = (inst[31:30] == 2'b00) & (inst[28] == 1'b0) & (inst[24:22] == 3'b011); // pg 136 : sign_ext{[21:20],[13:0]}
// assign bicc_d = (inst[31:30] == 2'b00) & (inst[24:22] == 3'b010); // pg 144 : sign_ext{[21:0]}
// assign bpcc_d = (inst[31:30] == 2'b00) & (inst[24:22] == 3'b001); // pg 146 : sign_ext{[18:0]}
// assign call_d = (inst[31:30] == 2'b01); // pg 149 : sign_ext{[29:0]}
// assign fbfcc_d = (inst[31:30] == 2'b00) & (inst[24:22] == 3'b110); // pg 138 : sign_ext{[21:0]}
// assign fbpfcc_d = (inst[31:30] == 2'b00) & (inst[24:22] == 3'b101); // pg 141 : sign_ext{[18:0]}
// assign branch_d = bpr_d | bicc_d | bpcc_d | call_d | fbfcc_d | fbpfcc_d;
// *** Conditional Move ***
// assign fmovcc_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0101) & (inst[18] == 1'b0); // pg 185 : Move FP on Condition Code
// assign fmovr_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0101) & (inst[13] == 1'b0); // pg 189 : Move FP on Integer reg
// assign movcc_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_1100); // pg 189 : Move Int on Condition Code
// assign movr_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_1111); // pg 189 : Move Int on Integer reg
// assign mov_cond_d = movcc_d | movr_d;
// assign d_ldf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0000); // pg 171 : Load Floating Point
// assign d_lddf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0011); // pg 171 : Load Floating Point
// assign d_ldqf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0010); // pg 171 : Load Floating Point
// assign d_ldfsr = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0001); // pg 171 : Load Floating Point
// assign d_ldxfsr = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0001); // pg 171 : Load Floating Point
// assign d_ldfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0000); // pg 173 : Load Floating Point from Alternate Space
// assign d_lddfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0011); // pg 173 : Load Floating Point from Alternate Space
// assign d_ldqfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0010); // pg 173 : Load Floating Point from Alternate Space
// assign d_ldsb = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1001); // pg 175 : Load Integer
// assign d_ldsh = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1010); // pg 175 : Load Integer
// assign d_ldsw = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1000); // pg 175 : Load Integer
// assign d_ldub = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0001); // pg 175 : Load Integer
// assign d_lduh = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0010); // pg 175 : Load Integer
// assign d_lduw = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0000); // pg 175 : Load Integer
// assign d_ldx = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1011); // pg 175 : Load Integer
// assign d_ldd = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0011); // pg 175 : Load Integer
// assign d_ldsba = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1001); // pg 177 : Load Integer from Alternate Space
// assign d_ldsha = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1010); // pg 177 : Load Integer from Alternate Space
// assign d_ldswa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1000); // pg 177 : Load Integer from Alternate Space
// assign d_lduba = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0001); // pg 177 : Load Integer from Alternate Space
// assign d_lduha = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0010); // pg 177 : Load Integer from Alternate Space
// assign d_lduwa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0000); // pg 177 : Load Integer from Alternate Space
// assign d_ldxa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1011); // pg 177 : Load Integer from Alternate Space
// assign d_ldda = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0011); // pg 177 : Load Integer from Alternate Space
// assign d_ldstub = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1101); // pg 179 : Load-Store
// assign d_ldstuba = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1101); // pg 180 : Load-Store from Alternate Space
// assign d_prefetch = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_1101); // pg 203 : Prefetch Data
// assign d_prefetcha = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_1101); // pg 203 : Prefetch Data from Alternate Space
// assign load_d = d_ldf | d_lddf | d_ldfsr | d_ldxfsr |
// d_ldsb | d_ldsh | d_ldsw | d_ldub | d_lduh | d_lduw | d_ldx | d_ldd |
// d_ldsba | d_ldsha | d_ldswa | d_lduba | d_lduha | d_lduwa | d_ldxa | d_ldda |
// d_ldstub | d_ldstuba |
// d_prefetch | d_prefetcha;
// assign int_load_d = d_ldsb | d_ldsh | d_ldsw | d_ldub | d_lduh | d_lduw | d_ldx | d_ldd |
// d_ldsba | d_ldsha | d_ldswa | d_lduba | d_lduha | d_lduwa | d_ldxa | d_ldda |
// assign d_stf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0100); // pg 222 : Store Floating Point
// assign d_stdf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0111); // pg 222 : Store Floating Point
// assign d_stqf = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0110); // pg 222 : Store Floating Point
// assign d_stfsr = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0101); // pg 222 : Store Floating Point
// assign d_stxfsr = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b10_0101); // pg 222 : Store Floating Point
// assign d_stfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0100); // pg 224 : Store Floating Point from Alternate Space
// assign d_stdfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0111); // pg 224 : Store Floating Point from Alternate Space
// assign d_stqfa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_0110); // pg 224 : Store Floating Point from Alternate Space
// assign d_stb = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0101); // pg 226 : Store Integer
// assign d_sth = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0110); // pg 226 : Store Integer
// assign d_stw = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0100); // pg 226 : Store Integer
// assign d_stx = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1110); // pg 226 : Store Integer
// assign d_std = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_0111); // pg 226 : Store Integer
// assign d_stba = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0101); // pg 226 : Store Integer from Alternate Space
// assign d_stha = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0110); // pg 226 : Store Integer from Alternate Space
// assign d_stwa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0100); // pg 226 : Store Integer from Alternate Space
// assign d_stxa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1110); // pg 226 : Store Integer from Alternate Space
// assign d_stda = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_0111); // pg 226 : Store Integer from Alternate Space
// assign d_swap = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b00_1111); // pg 231 : Swap Register with Memory
// assign d_swapa = (inst[31:30] == 2'b11) & (inst[24:19] == 6'b01_1111); // pg 232 : Swap Register with Alt Space Memory
// assign casa_d =((inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_1100))| // pg 150 : Compare and Swap
// ((inst[31:30] == 2'b11) & (inst[24:19] == 6'b11_1110)); // pg 150 : Compare and Swap
// assign store_d = d_stf | d_stdf | d_stfsr | d_stxfsr |
// d_stb | d_sth | d_stw | d_stx | d_std |
// d_stba | d_stha | d_stwa | d_stxa | d_stda |
// assign bmask_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:5] == 9'b0_0001_1001);
// assign alignaddress_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:5] == 9'b0_0001_1000);
// assign alignaddress_little_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0110) & (inst[13:5] == 9'b0_0001_1010);
// assign d_udiv = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1110); // pg 152 : Unsigned Integer Division
// assign d_sdiv = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1111); // pg 152 : Signed Integer Division
// assign d_udivcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1110); // pg 152 : Unsigned Integer Division
// assign d_sdivcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1111); // pg 152 : Signed Integer Division
// assign d_mulx = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1001); // pg 196 : Multiply (signed or unsigned)
// assign d_sdivx = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_1101); // pg 196 : Signed Divide
// assign d_udivx = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1101); // pg 196 : Unsigned Divide
// assign d_umul = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1010); // pg 197 : Unsigned Integer Multiply
// assign d_smul = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b00_1011); // pg 197 : Signed Integer Multiply
// assign d_umulcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1010); // pg 197 : Unsigned Integer Multiply
// assign d_smulcc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b01_1011); // pg 197 : Signed Integer Multiply
// assign d_mulscc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_0100); // pg 199 : Multiply Step
// assign d_popc = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b10_1110); // pg 202 : Population Count
// assign int_to_fgu_d = d_udiv | d_sdiv | d_udivcc | d_sdivcc |
// d_mulx | d_sdivx | d_udivx |
// d_umul | d_smul | d_umulcc | d_smulcc |
// assign mux_mdp_sel_d[0] = d_smul | d_smulcc;
// assign mux_mdp_sel_d[1] = d_umul | d_umulcc;
// assign mux_mdp_sel_d[2] = d_udiv | d_sdiv | d_udivcc | d_sdivcc;
// assign mux_mdp_sel_d[3] = d_mulscc;
// assign mux_mdp_sel_d[4] = d_sdiv | d_sdivcc | d_smul | d_smulcc;
// assign mux_mdp_sel_d[5] = d_udiv | d_udivcc | d_umul | d_umulcc | d_mulscc;
// assign jmpl_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_1000);
// assign return_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_1001);
// assign sethi_d = (inst[31:30] == 2'b00) & (inst[24:22] == 3'b10_0 );
// assign sir_d = (inst[31:30] == 2'b10) & (inst[29:14] == 16'b01111_11_0000_00000); // pg 220
// assign tcc_d = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_1010); // pg 237 : Trap on Integer Condition
// assign d_wrpr = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0010); // pg 239 : Write Privileged Register
// assign d_wry = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0000); // pg 241 : Write State Register
// assign d_wrhpr = (inst[31:30] == 2'b10) & (inst[24:19] == 6'b11_0011); //
// assign wrxx_d = (d_wrpr | d_wry | d_wrhpr) & dec_decode_d;
assign wrxx_d = wrxx_raw_d & dec_decode_d;
// assign address_d = branch_d | load_d | store_d | return_d | casa_d;
// assign exu_op_d = logic_d | shift_d | add_d | sub_d | jmpl_d | edge_d | array_d;
// *** Operand Selects ***
assign ect_rs1_early_sel_d[0] = rs1_m_cmp;
assign ect_rs1_early_sel_d[1] = rs1_b_cmp;
assign ect_rs1_early_sel_d[2] = rs1_w_cmp;
assign ect_rs1_early_sel_d[3] = rs1_w2_cmp;
assign ect_rs1_early_sel_d[4] = rs1_w_plus1_cmp;
assign ect_rs1_late_sel_d[0] = branch_d; // PC
assign ect_rs1_late_sel_d[1] = rs1_e_cmp; // E Stage Bypass
assign ect_rs1_late_sel_d[2] = rs1_l_cmp & ~rs1_m_cmp; // Load Bypass
assign ect_rs1_late_sel_d[3] = rs1_byp_early;
// assign ect_rs2_imm_sel_d[0] = bpr_d; // immediate BPr = {[21:20],[13:0]}
// assign ect_rs2_imm_sel_d[1] = bicc_d | fbfcc_d; // immediate disp22
// assign ect_rs2_imm_sel_d[2] = bpcc_d | fbpfcc_d; // immediate disp19
// assign ect_rs2_imm_sel_d[3] = call_d; // immediate disp30
// assign ect_rs2_imm_sel_d[4] = sethi_d; // IMM22
// assign ect_rs2_imm_sel_d[5] = movcc_d; // SIMM11
// assign ect_rs2_imm_sel_d[6] = movr_d; // SIMM10
// assign ect_rs2_imm_sel_d[7] = rs2_imm13_data_d; // SIMM13
assign ect_rs2_imm_sel_d[7:0] = {rs2_imm_sel7_d,rs2_imm_sel6_d,rs2_imm_sel5_d,rs2_imm_sel4_d,rs2_imm_sel3_d,rs2_imm_sel2_d,rs2_imm_sel1_d,rs2_imm_sel0_d};
assign ect_rs2_early_sel_d[0] = rs2_m_cmp;
assign ect_rs2_early_sel_d[1] = rs2_b_cmp;
assign ect_rs2_early_sel_d[2] = rs2_w_cmp;
assign ect_rs2_early_sel_d[3] = rs2_w2_cmp;
assign ect_rs2_early_sel_d[4] = rs2_w_plus1_cmp;
// assign rs2_imm13_data_d = (d_save | d_restore | logic_d | add_d | sub_d | shift_d | load_d | store_d | jmpl_d |
// return_d | sir_d | tcc_d | d_wrpr | d_wrhpr | d_wry | int_to_fgu_d) & inst[13];
// assign rs2_imm_data_d = branch_d | sethi_d | rs2_imm13_data_d;
assign ect_rs2_late_sel_d[0] = rs2_imm_data_d; // Immediate
assign ect_rs2_late_sel_d[1] = rs2_e_cmp; // E Stage Bypass
assign ect_rs2_late_sel_d[2] = rs2_l_cmp & ~rs2_m_cmp; // Load Bypass
assign ect_rs2_late_sel_d[3] = rs2_byp_early;
assign ect_rs3_early_sel_d[0] = rs3_m_cmp;
assign ect_rs3_early_sel_d[1] = rs3_b_cmp;
assign ect_rs3_early_sel_d[2] = rs3_w_cmp;
assign ect_rs3_early_sel_d[3] = rs3_w2_cmp;
assign ect_rs3_early_sel_d[4] = rs3_w_plus1_cmp;
assign ect_rs3_late_sel_d[0] = rs1_late_sel4_d & dec_decode_d & ~rml_test_valid_d; // call_d | jmpl_d
assign ect_rs3_late_sel_d[1] = rs3_e_cmp & ~rml_test_valid_d;
assign ect_rs3_late_sel_d[2] = rs3_l_cmp & ~rs3_m_cmp & ~rml_test_valid_d;
assign ect_rs3_late_sel_d[3] = rs3_byp_early & ~rml_test_valid_d;
// assign rm_late_sel_d[0] = sub_d;
// assign rm_late_sel_d[1] = add_d | tcc_d | load_d | store_d | return_d | bpr_d | bicc_d | bpcc_d | fbfcc_d | fbpfcc_d;
// assign rm_late_sel_d[2] = shift_d;
// assign rm_early_sel_d[0] = logic_d | casa_d;
// assign rm_early_sel_d[1] = array_d;
// assign rm_early_sel_d[2] = edge_d;
// assign rm_early_sel_d[3] = d_mulscc;
// assign rm_early_sel_d[4] = call_d | jmpl_d;
// The ESPRESSO code below was generated from the EXU's "decode" file using the following command :
// ~rg131678/perl/n2decode -i decode -exu > decode.out
assign i[31:5] = dec_inst_d[31:5];
// --- autogenerated by n2decode view=exu Tue Aug 16 16:43:11 CDT 2005
assign as_subtract_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[12]&!i[11]
&!i[10]&!i[9]) | (i[31]&!i[30]&i[24]&!i[23]&!i[22]&!i[21]&i[19]) | (
i[31]&!i[30]&!i[24]&i[21]&!i[20]&!i[19]);
assign as_cc_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[11]&!i[10]&!i[9]
&!i[5]) | (i[31]&!i[30]&!i[24]&i[23]&!i[20]&!i[19]) | (i[31]&!i[30]
&i[24]&!i[23]&!i[22]&!i[21]);
assign tas_cc_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&!i[21]);
assign tas_tv_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&!i[21]&i[20]);
assign as_cin_set_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[12]&!i[11]
&!i[10]&!i[9]) | (i[31]&!i[30]&i[24]&!i[23]&!i[22]&!i[21]&i[19]) | (
i[31]&!i[30]&!i[24]&!i[22]&i[21]&!i[20]&!i[19]);
assign as_cin_ccr0_d = (i[31]&!i[24]&i[22]&i[21]&!i[20]&!i[19]);
assign as_cin_ccr1_d = (i[31]&!i[30]&!i[24]&i[22]&!i[21]&!i[20]&!i[19]);
assign logic_sel3_d = (i[31]&i[24]&i[23]&i[21]&i[20]&i[19]&!i[13]&i[12]&i[11]
&!i[10]&!i[9]) | (i[31]&i[30]&i[24]&i[22]&!i[19]) | (i[31]&!i[30]
&!i[24]&!i[22]&!i[21]&!i[20]&i[19]) | (i[31]&!i[30]&!i[24]&!i[22]
&i[21]&i[20]) | (i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]) | (
i[31]&i[24]&i[22]&i[21]&i[20]&i[19]) | (i[31]&!i[30]&!i[24]&!i[22]
&i[20]&!i[19]) | (!i[31]&!i[30]&!i[23]&!i[22]);
assign logic_sel2_d = (i[31]&i[24]&i[23]&i[21]&i[20]&i[19]&!i[13]&i[12]&i[11]
&!i[10]&!i[9]) | (i[31]&!i[30]&!i[24]&!i[22]&i[21]&!i[20]&i[19]) | (
i[31]&i[30]&i[24]&i[22]&!i[19]) | (i[31]&!i[30]&!i[24]&!i[22]&!i[21]
&i[20]) | (i[31]&!i[30]&!i[24]&!i[22]&i[20]&!i[19]);
assign logic_sel1_d = (i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]) | (i[31]
&i[24]&i[22]&i[21]&i[20]&i[19]) | (i[31]&!i[30]&!i[24]&!i[22]&!i[21]
&i[20]) | (!i[31]&!i[30]&!i[23]&!i[22]);
assign logic_sel0_d = (i[31]&!i[30]&!i[24]&!i[22]&i[21]&i[20]);
assign lg_cc_d = (i[31]&!i[30]&!i[24]&i[23]&!i[20]&i[19]) | (i[31]&!i[30]&!i[24]
assign shift_sel6_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[20]&i[12]) | (
i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[19]&i[12]);
assign shift_sel5_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[20]);
assign shift_sel4_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&!i[20]&i[19]);
assign shift_sel3_d = (i[31]&!i[30]&i[24]&!i[22]&i[21]&i[20]&i[19]&i[12]);
assign shift_sel2_d = (i[31]&!i[30]&i[24]&!i[22]&i[21]&i[20]&i[19]&!i[12]);
assign shift_sel1_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[20]&i[12]);
assign shift_sel0_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&!i[20]&i[19]&i[12]);
assign edgele_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[11]&!i[10]
assign edge08_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[12]&!i[10]
assign edge16_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[10]&!i[9]&!i[8]
assign edge32_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[11]&!i[10]
assign array08_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[11]&i[9]&!i[8]&!i[7]
assign array16_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[11]&!i[10]&i[9]
assign call_d = (!i[31]&i[30]);
assign branch_d = (!i[31]&i[23]) | (!i[31]&i[22]) | (!i[31]&i[30]);
assign mov_cond_d = (i[31]&i[24]&i[22]&i[21]&i[20]&i[19]) | (i[31]&i[24]&!i[23]
&i[22]&i[21]&!i[20]&!i[19]);
assign bmask_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[10]&i[9]&i[8]&i[5]);
assign alignaddress_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[10]&i[9]&i[8]
assign alignaddress_little_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[10]
assign mux_mdp_sel0_d = (i[31]&!i[30]&!i[24]&i[22]&!i[21]&i[20]&i[19]);
assign mux_mdp_sel1_d = (i[31]&!i[30]&!i[24]&i[22]&!i[21]&i[20]&!i[19]);
assign mux_mdp_sel2_d = (i[31]&!i[30]&!i[24]&i[22]&i[21]&i[20]);
assign mux_mdp_sel3_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&!i[20]&!i[19]);
assign mux_mdp_sel4_d = (i[31]&!i[30]&!i[24]&i[22]&i[20]&i[19]);
assign mux_mdp_sel5_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&!i[20]&!i[19]) | (
i[31]&!i[30]&!i[24]&i[22]&i[20]&!i[19]);
assign tcc_d = (!i[30]&i[24]&i[23]&i[22]&!i[21]&i[20]&!i[19]);
assign wrxx_raw_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[20]&i[19]) | (i[31]&!i[30]
&i[24]&i[23]&!i[22]&!i[21]&!i[19]);
assign address_d = (i[30]&i[22]&!i[19]) | (i[30]&!i[22]&i[19]) | (i[30]&!i[20]
&!i[19]) | (!i[31]&i[22]) | (!i[31]&i[23]) | (i[24]&i[23]&i[22]&!i[21]
&!i[20]) | (i[30]&!i[24]) | (!i[31]&i[30]);
assign exu_op_d = (i[31]&!i[30]&!i[22]&i[21]&i[20]&!i[12]&!i[11]&!i[10]) | (
i[31]&i[24]&i[23]&i[22]&!i[21]&!i[20]&!i[19]) | (i[31]&i[24]&i[22]
&i[21]&i[20]&i[19]) | (i[31]&!i[23]&i[22]&i[21]&!i[20]&!i[19]) | (
!i[30]&!i[23]&!i[22]&i[19]) | (i[31]&!i[30]&!i[24]&!i[20]&!i[19]) | (
!i[30]&!i[23]&!i[22]&i[20]) | (i[31]&!i[30]&!i[24]&!i[22]) | (!i[30]
&!i[23]&!i[22]&!i[21]) | (!i[31]&!i[30]&!i[23]&!i[22]);
assign rs1_late_sel4_d = (i[24]&i[23]&i[22]&!i[21]&!i[20]&!i[19]) | (!i[31]
assign rs2_imm_sel0_d = (!i[31]&!i[30]&i[23]&i[22]);
assign rs2_imm_sel1_d = (!i[31]&!i[30]&i[23]&!i[22]);
assign rs2_imm_sel2_d = (!i[31]&!i[30]&!i[23]&i[22]);
assign rs2_imm_sel3_d = (!i[31]&i[30]);
assign rs2_imm_sel4_d = (!i[31]&!i[30]&!i[23]&!i[22]);
assign rs2_imm_sel5_d = (i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]);
assign rs2_imm_sel6_d = (i[31]&i[24]&i[22]&i[21]&i[20]&i[19]);
assign rs2_imm_sel7_d = (i[31]&!i[23]&i[22]&i[21]&i[20]&!i[19]&i[13]) | (i[31]
&!i[30]&i[23]&!i[21]&!i[19]&i[13]) | (i[31]&i[22]&i[21]&!i[20]&i[19]
&i[13]) | (!i[30]&i[24]&i[23]&i[22]&!i[20]&i[13]) | (i[31]&!i[22]
&i[20]&i[19]&i[13]) | (i[31]&i[30]&!i[22]&!i[20]&i[13]) | (i[31]
&!i[30]&!i[23]&!i[22]&i[13]) | (i[31]&!i[24]&i[13]);
assign rs2_imm_data_d = (i[23]&i[22]&!i[21]&!i[19]&i[13]) | (!i[23]&!i[22]&i[19]
&i[13]) | (!i[30]&i[23]&i[22]&!i[20]&i[13]) | (!i[30]&!i[22]&i[20]
&i[13]) | (!i[22]&!i[20]&!i[19]&i[13]) | (!i[30]&!i[23]&i[21]&i[13]) | (
i[30]&i[19]&i[13]) | (!i[31]) | (!i[24]&i[13]);
assign rm_late_sel0_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&!i[21]&i[19]) | (
i[31]&!i[30]&!i[24]&i[21]&!i[20]&!i[19]);
assign rm_late_sel1_d = (i[31]&i[30]&!i[20]&i[19]) | (i[31]&i[30]&i[19]&i[13]) | (
!i[30]&i[24]&i[23]&i[22]&!i[21]&i[20]&!i[19]) | (i[31]&i[30]&i[19]
&!i[12]) | (!i[30]&!i[24]&!i[21]&!i[20]&!i[19]) | (!i[30]&i[23]&i[22]
&!i[21]&!i[20]&i[19]) | (i[31]&i[30]&i[19]&!i[11]) | (i[31]&i[30]
&i[19]&i[10]) | (i[31]&i[30]&i[19]&i[9]) | (!i[30]&i[24]&i[23]&!i[22]
&i[21]&!i[10]&i[9]&i[8]) | (i[31]&i[30]&!i[23]&i[19]) | (!i[31]&!i[30]
&i[22]) | (!i[31]&!i[30]&i[23]) | (i[31]&i[30]&!i[24]) | (i[31]&!i[30]
&i[24]&!i[23]&!i[22]&!i[21]&!i[19]) | (i[31]&i[30]&!i[22]&!i[20]) | (
i[31]&i[30]&!i[21]&i[19]);
assign rm_late_sel2_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[20]) | (i[31]
&!i[30]&i[24]&!i[23]&!i[22]&i[21]&i[19]);
assign rm_early_sel0_d = (i[31]&i[24]&i[23]&i[21]&i[20]&i[19]&!i[13]&i[12]&i[11]
&!i[10]&!i[9]) | (i[31]&i[30]&i[24]&i[22]&!i[19]) | (i[31]&!i[30]
&!i[24]&!i[22]&i[19]) | (i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]) | (
i[31]&i[24]&i[22]&i[21]&i[20]&i[19]) | (i[31]&!i[30]&!i[24]&!i[22]
&i[20]) | (!i[31]&!i[30]&!i[23]&!i[22]);
assign rm_early_sel1_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&!i[11]&!i[10]
assign rm_early_sel2_d = (i[31]&!i[30]&i[24]&!i[23]&!i[22]&i[21]&!i[20]&!i[19]);
assign rm_early_sel4_d = (i[31]&!i[30]&i[24]&i[23]&!i[22]&i[21]&i[20]&!i[12]
assign misalign_d = (!i[30]&i[24]&i[23]&i[22]&!i[21]&!i[20]);
assign ls_special_sel_d = (i[31]&i[24]&i[23]&i[21]&i[20]&i[19]&!i[13]&i[12]
&i[11]&!i[10]&!i[9]) | (i[31]&i[30]&i[24]&i[22]&!i[19]);
assign cmov_d = (i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[5]) | (
i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[6]) | (i[31]
&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]) | (i[31]&i[24]&i[22]&i[21]
assign regop_d = (i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&i[7]&!i[5]) | (
i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&i[7]&!i[6]) | (
!i[31]&!i[30]&i[23]&i[22]) | (i[31]&i[24]&i[22]&i[21]&i[20]&i[19]);
assign specbr_d = (!i[31]&!i[30]&i[23]) | (!i[31]&!i[30]&i[22]);
assign callclass_d = (i[24]&i[23]&i[22]&!i[21]&!i[20]) | (!i[31]&i[30]);
assign movcc_d = (i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[7]&!i[5]) | (
i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[7]&!i[6]) | (
i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]);
assign movr_d = (i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&i[7]&!i[5]) | (
i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&i[7]&!i[6]) | (
i[31]&i[24]&i[22]&i[21]&i[20]&i[19]);
assign br_or_tcc_d = (!i[30]&i[24]&i[23]&i[22]&!i[21]&i[20]&!i[19]) | (!i[31]
&!i[30]&i[23]) | (!i[31]&!i[30]&i[22]);
assign bcc_d = (!i[31]&!i[30]&i[23]&!i[22]);
assign bpcc_d = (!i[31]&!i[30]&!i[23]&i[22]);
assign fmov_d = (i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[7]&!i[5]) | (
i[31]&i[24]&i[23]&!i[22]&i[21]&!i[20]&i[19]&!i[9]&!i[7]&!i[6]) | (
!i[30]&i[24]&i[23]&i[22]&!i[21]&i[20]&!i[19]);
assign imov_d = (i[31]&i[24]&!i[23]&i[22]&i[21]&!i[20]&!i[19]);
assign fp_d = (!i[31]&!i[30]&i[24]&i[23]) | (!i[31]&!i[30]&i[24]&i[22]);
assign two_cycle_d = (i[31]&i[30]&i[24]&i[22]&!i[19]) | (i[31]&i[30]&!i[24]
&!i[22]&i[21]&i[20]&i[19]);
// *** Embed DECODE.OUT above here ***
assign ect_logic_sel_d[3:0] = {logic_sel3_d,logic_sel2_d,logic_sel1_d,logic_sel0_d};
assign ect_shift_sel_d[6:0] = {shift_sel6_d,shift_sel5_d,shift_sel4_d,shift_sel3_d,shift_sel2_d,shift_sel1_d,shift_sel0_d};
exu_ect_ctl_msff_ctl_macro__width_37 i_estage_lth (
.scan_in(i_estage_lth_scanin),
.scan_out(i_estage_lth_scanout),
(~mux_mdp_sel5_d & ~mux_mdp_sel4_d),mux_mdp_sel4_d,mux_mdp_sel3_d,mux_mdp_sel2_d,mux_mdp_sel1_d,mux_mdp_sel0_d,
rm_early_sel4_d,rs1_late_sel4_d,rm_early_sel2_d,rm_early_sel1_d,rm_early_sel0_d,
rm_late_sel2_d,rm_late_sel1_d,rm_late_sel0_d,
bmask_d,alignaddress_d,alignaddress_little_d ,
edge08_d,edge16_d,edge32_d ,edgele_d }),
ect_rm_early_sel_e[5],rm_early_sel34,ect_rm_early_sel_e[2:0],
bmask_e,alignaddress_e,ect_alignaddress_little_e ,
edge08_e,edge16_e,edge32_e ,edgele_e }),
assign ect_rm_early_sel_e[3] = rm_early_sel34 & ~ect_pstate_am_e;
assign ect_rm_early_sel_e[4] = rm_early_sel34 & ect_pstate_am_e;
assign ect_as_clip_e_ = ~(alignaddress_e | ect_alignaddress_little_e);
assign gsr_vld_e_in[1] = dec_valid_e & (alignaddress_e | ect_alignaddress_little_e);
assign gsr_vld_e_in[0] = dec_valid_e & bmask_e;
assign address_e_in = address_e & dec_valid_e;
assign br_special_sel_e = branch_e & exu_rs1_data_e[47];
assign two_cycle_e_in = dec_valid_e & two_cycle_e;
exu_ect_ctl_msff_ctl_macro__width_6 i_mstage_lth (
.scan_in(i_mstage_lth_scanin),
.scan_out(i_mstage_lth_scanout),
.din ({gsr_vld_e_in[1:0] , address_e_in , ls_special_sel_e , br_special_sel_e , two_cycle_e_in} ),
.dout ({exu_gsr_vld_m[1:0] , address_m , ls_special_sel_m , br_special_sel_m , ect_two_cycle_m} ),
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Decode !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Bypass !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
assign fgu_valid_b = fgu_exu_w_vld_fx5 & ~(fgu_irf_w_addr_fx5[4:0] == 5'b00000);
assign lsu_valid_w2 = lsu_exu_ld_w & (dec_thread_group == tid_lth_w2[2]) & ~(ect_rd_lth_w2[4:0] == 5'b00000);
assign ect_valid_in_w2 = lsu_exu_ld_vld_w & (dec_thread_group == tid_lth_w2[2]) & ~(ect_rd_lth_w2[4:0] == 5'b00000) & ~ect_mbist_sel;
assign valid_in_d = (exu_op_d & ~(dec_inst_d[29:25] == 5'b00000)) | call_d; // see SPARC v9, page 30.
assign valid_in_e = valid_out_e;
assign valid_in_m = valid_lth_m & ~dec_flush_m & ~exu_ecc_m & ~address_error_m;
assign valid_in_b = (valid_lth_b & ~dec_flush_b & ~tlu_flush_exu_b & ~tof_b & ~misalign_b & ~ect_mbist_sel) |
(fgu_valid_b & ~ect_mbist_sel) |
assign ect_tid_in_b[1:0]= ({2{~ect_mbist_sel & fgu_exu_w_vld_fx5}} & fgu_result_tid_fx5[1:0]) |
({2{~ect_mbist_sel & ~fgu_exu_w_vld_fx5}} & tid_lth_b[1:0] ) |
({2{ ect_mbist_sel }} & mbi_addr_p1[6:5] );
assign rd_in_d[4:0] = ({5{~two_cycle_e_in}} & dec_inst_rd_d[4:0]) |
({5{ two_cycle_e_in}} & inst_rs3_d[4:0] );
assign rd_in_m[4:0] = rd_lth_m[4:0];
assign ect_rd_in_b[4:0] = ({5{~ect_mbist_sel & fgu_valid_b}} & fgu_irf_w_addr_fx5[4:0]) |
({5{~ect_mbist_sel & ~fgu_valid_b}} & rd_lth_b[4:0] ) |
({5{ ect_mbist_sel }} & mbi_addr_p1[4:0] );
assign rs1_valid_d = (ect_rs1_late_sel_d[3:1] == 3'b000 ) & rs1_rd_en_d & ~two_cycle_e_in;
assign rs2_valid_d = (ect_rs2_late_sel_d[3:0] == 4'b0000) & rs2_rd_en_d & ~two_cycle_e_in;
assign rs3_valid_d = (ect_rs3_late_sel_d[3:1] == 3'b000 ) & rs3_rd_en_d;
exu_ect_ctl_msff_ctl_macro__width_6 ren_lth (
.scan_in(ren_lth_scanin),
.scan_out(ren_lth_scanout),
.din ({dec_inst_rs1_vld_p , dec_inst_rs2_vld_p , dec_inst_rs3_vld_p ,
rs1_valid_d , rs2_valid_d , rs3_valid_d }),
.dout ({rs1_rd_en_d , rs2_rd_en_d , rs3_rd_en_d ,
ect_rs1_valid_e , ect_rs2_valid_e , ect_rs3_valid_e }),
exu_ect_ctl_msff_ctl_macro__width_15 rs_lth (
.scan_out(rs_lth_scanout),
.din ({dec_inst_rs1_p[4:0] , dec_inst_rs2_p[4:0] , dec_inst_rs3_p[4:0]} ),
.dout ({ inst_rs1_d[4:0] , inst_rs2_d[4:0] , inst_rs3_d[4:0]} ),
exu_ect_ctl_msff_ctl_macro__width_76 i_byp_lth (
.scan_in(i_byp_lth_scanin),
.scan_out(i_byp_lth_scanout),
valid_in_d , tid_lth_d[1:0] , rd_in_d[4:0] , inst_rs1_d[4:0] , inst_rs2_d[4:0] ,
valid_in_e , ect_tid_lth_e[1:0] , rd_lth_e[4:0] , movcc_true_e ,
valid_in_m , tid_lth_m[1:0] , rd_in_m[4:0] ,
valid_in_b , ect_tid_in_b[1:0] , ect_rd_in_b[4:0] ,
ect_valid_lth_w , ect_tid_lth_w[1:0] , ect_rd_lth_w[4:0] ,
lsu_exu_tid_m[1:0] , lsu_exu_rd_m[4:0] ,
lsu_exu_tid_b[1:0] , lsu_exu_rd_b[4:0] , lsu_exu_ld_b ,
ect_valid_in_w2 , ect_tid_lth_w2[1:0] , ect_rd_lth_w2[4:0] }),
.dout ({ tid_lth_d[1:0] ,
valid_lth_e , ect_tid_lth_e[1:0] , rd_lth_e[4:0] , ect_rs1_addr_e[4:0] , ect_rs2_addr_e[4:0] ,
valid_lth_m , tid_lth_m[1:0] , rd_lth_m[4:0] , exu_cmov_true_m ,
valid_lth_b , tid_lth_b[1:0] , rd_lth_b[4:0] ,
ect_valid_lth_w , ect_tid_lth_w[1:0] , ect_rd_lth_w[4:0] ,
valid_lth_w_plus1 , tid_lth_w_plus1[1:0] , rd_lth_w_plus1[4:0],
lsu_exu_tid_b[1:0] , lsu_exu_rd_b[4:0] ,
ect_tid_lth_w2[1:0] , ect_rd_lth_w2[4:0] , lsu_exu_ld_w ,
valid_lth_w2_plus1, tid_lth_w2_plus1[1:0] , rd_lth_w2_plus1[4:0]}),
assign ect_rs3_addr_e[4:0] = rd_lth_e[4:0];
// M, B, W, and W2 priority built into the PGPE mux in the datapath
// ZN RS1 zero RS1 negative
assign movcc_true_e = (dec_cmov_z00_e & ~edp_br_flag_e[0] & ~edp_br_flag_e[1]) |
(dec_cmov_z01_e & ~edp_br_flag_e[0] & edp_br_flag_e[1]) |
(dec_cmov_z10_e & edp_br_flag_e[0] & ~edp_br_flag_e[1]);
assign valid_out_e = valid_lth_e & dec_valid_e & ~(mov_cond_e & ~movcc_true_e) & ~tas_tv_overflow_e & ~misalign_error_e;
assign raw_valid_out_e = valid_lth_e & dec_valid_e & ~(mov_cond_e & ~movcc_true_e);
assign rs1_e_cmp = raw_valid_out_e & (ect_tid_lth_e[1:0] == tid_lth_d[1:0]) & (rd_lth_e[4:0] == inst_rs1_d[4:0]);
assign rs1_m_cmp = valid_lth_m & ( tid_lth_m[1:0] == tid_lth_d[1:0]) & (rd_lth_m[4:0] == inst_rs1_d[4:0]);
assign rs1_b_cmp = valid_lth_b & ( tid_lth_b[1:0] == tid_lth_d[1:0]) & (rd_lth_b[4:0] == inst_rs1_d[4:0]);
assign rs1_w_cmp = ect_valid_lth_w & (ect_tid_lth_w[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w[4:0] == inst_rs1_d[4:0]);
assign rs1_w2_cmp = lsu_valid_w2 & (ect_tid_lth_w2[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w2[4:0] == inst_rs1_d[4:0]);
assign rs1_w_plus1_cmp = valid_lth_w_plus1 & ( tid_lth_w_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w_plus1[4:0] == inst_rs1_d[4:0]);
assign rs1_w2_plus1_cmp = valid_lth_w2_plus1 & ( tid_lth_w2_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w2_plus1[4:0] == inst_rs1_d[4:0]);
assign rs2_e_cmp = raw_valid_out_e & (ect_tid_lth_e[1:0] == tid_lth_d[1:0]) & (rd_lth_e[4:0] == inst_rs2_d[4:0]);
assign rs2_m_cmp = valid_lth_m & ( tid_lth_m[1:0] == tid_lth_d[1:0]) & (rd_lth_m[4:0] == inst_rs2_d[4:0]);
assign rs2_b_cmp = valid_lth_b & ( tid_lth_b[1:0] == tid_lth_d[1:0]) & (rd_lth_b[4:0] == inst_rs2_d[4:0]);
assign rs2_w_cmp = ect_valid_lth_w & (ect_tid_lth_w[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w[4:0] == inst_rs2_d[4:0]);
assign rs2_w2_cmp = lsu_valid_w2 & (ect_tid_lth_w2[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w2[4:0] == inst_rs2_d[4:0]);
assign rs2_w_plus1_cmp = valid_lth_w_plus1 & ( tid_lth_w_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w_plus1[4:0] == inst_rs2_d[4:0]);
assign rs2_w2_plus1_cmp = valid_lth_w2_plus1 & ( tid_lth_w2_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w2_plus1[4:0] == inst_rs2_d[4:0]);
assign rs3_e_cmp = raw_valid_out_e & (ect_tid_lth_e[1:0] == tid_lth_d[1:0]) & (rd_lth_e[4:0] == inst_rs3_d[4:0]);
assign rs3_m_cmp = valid_lth_m & ( tid_lth_m[1:0] == tid_lth_d[1:0]) & (rd_lth_m[4:0] == inst_rs3_d[4:0]);
assign rs3_b_cmp = valid_lth_b & ( tid_lth_b[1:0] == tid_lth_d[1:0]) & (rd_lth_b[4:0] == inst_rs3_d[4:0]);
assign rs3_w_cmp = ect_valid_lth_w & (ect_tid_lth_w[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w[4:0] == inst_rs3_d[4:0]);
assign rs3_w2_cmp = lsu_valid_w2 & (ect_tid_lth_w2[1:0] == tid_lth_d[1:0]) & (ect_rd_lth_w2[4:0] == inst_rs3_d[4:0]);
assign rs3_w_plus1_cmp = valid_lth_w_plus1 & ( tid_lth_w_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w_plus1[4:0] == inst_rs3_d[4:0]);
assign rs3_w2_plus1_cmp = valid_lth_w2_plus1 & ( tid_lth_w2_plus1[1:0] == tid_lth_d[1:0]) & (rd_lth_w2_plus1[4:0] == inst_rs3_d[4:0]);
assign rs1_l_cmp = lsu_exu_ld_b &
(lsu_exu_tid_b[2:0] == {dec_thread_group,tid_lth_d[1:0]}) &
(lsu_exu_rd_b[4:0] == inst_rs1_d[4:0] ) &
~(lsu_exu_rd_b[4:0] == 5'b00000 );
assign rs2_l_cmp = lsu_exu_ld_b &
(lsu_exu_tid_b[2:0] == {dec_thread_group,tid_lth_d[1:0]}) &
(lsu_exu_rd_b[4:0] == inst_rs2_d[4:0] ) &
~(lsu_exu_rd_b[4:0] == 5'b00000 );
assign rs3_l_cmp = lsu_exu_ld_b &
(lsu_exu_tid_b[2:0] == {dec_thread_group,tid_lth_d[1:0]}) &
(lsu_exu_rd_b[4:0] == inst_rs3_d[4:0] ) &
~(lsu_exu_rd_b[4:0] == 5'b00000 );
assign rs1_byp_early = rs1_m_cmp | rs1_b_cmp | rs1_w_cmp | rs1_w2_cmp | rs1_w_plus1_cmp | rs1_w2_plus1_cmp;
assign rs2_byp_early = rs2_m_cmp | rs2_b_cmp | rs2_w_cmp | rs2_w2_cmp | rs2_w_plus1_cmp | rs2_w2_plus1_cmp;
assign rs3_byp_early = rs3_m_cmp | rs3_b_cmp | rs3_w_cmp | rs3_w2_cmp | rs3_w_plus1_cmp | rs3_w2_plus1_cmp;
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Bypass !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Flags !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
// *** E Stage Flag generation ***
assign lg_cc[7] = edp_logical_data_e_b63; // N
assign lg_cc[6] = edp_lg_zdetect_e[1] & edp_lg_zdetect_e[0]; // Z : [63:0] == 0
assign lg_cc[5] = 1'b0; // V : always 0
assign lg_cc[4] = 1'b0; // C : always 0
assign lg_cc[3] = edp_logical_data_e_b31; // N
assign lg_cc[2] = edp_lg_zdetect_e[0]; // Z : [31:0] == 0
assign lg_cc[1] = 1'b0; // V : always 0
assign lg_cc[0] = 1'b0; // C : always 0
assign as_cc[7] = ( ~as_subtract_e & edp_add_data_e_b63 ) | // N
( as_subtract_e & edp_sub_data_e_b63 );
assign as_cc[6] = ( ~as_subtract_e & ~edp_add_zdetect_e_[1] & ~edp_add_zdetect_e_[0]) | // Z : [63:0] == 0
( as_subtract_e & ~edp_sub_zdetect_e_[1] & ~edp_sub_zdetect_e_[0]);
assign as_cc[5] = ( ~as_subtract_e & ~exu_rs1_data_e[63] & ~exu_rs2_data_e[63] & edp_add_data_e_b63 ) | // V
( ~as_subtract_e & exu_rs1_data_e[63] & exu_rs2_data_e[63] & ~edp_add_data_e_b63 ) |
( as_subtract_e & ~exu_rs1_data_e[63] & exu_rs2_data_e[63] & edp_sub_data_e_b63 ) |
( as_subtract_e & exu_rs1_data_e[63] & ~exu_rs2_data_e[63] & ~edp_sub_data_e_b63 );
assign as_cc[4] = ( ~as_subtract_e & edp_add_cout64_e ) | // C
( as_subtract_e & ~edp_sub_cout64_e );
assign as_cc[3] = ( ~as_subtract_e & edp_add_data_e_b31 ) | // N
( as_subtract_e & edp_sub_data_e_b31 );
assign as_cc[2] = ( ~as_subtract_e & ~edp_add_zdetect_e_[0]) | // Z : [31:0] == 0
( as_subtract_e & ~edp_sub_zdetect_e_[0]);
assign as_cc[1] = ( ~as_subtract_e & ~exu_rs1_data_e[31] & ~exu_rs2_data_e[31] & edp_add_data_e_b31 ) | // V
( ~as_subtract_e & exu_rs1_data_e[31] & exu_rs2_data_e[31] & ~edp_add_data_e_b31 ) |
( as_subtract_e & ~exu_rs1_data_e[31] & exu_rs2_data_e[31] & edp_sub_data_e_b31 ) |
( as_subtract_e & exu_rs1_data_e[31] & ~exu_rs2_data_e[31] & ~edp_sub_data_e_b31 ) |
( tas_cc_e & ( exu_rs1_data_e[0] | exu_rs2_data_e[0]) ) |
( tas_cc_e & ( exu_rs1_data_e[1] | exu_rs2_data_e[1]) );
assign as_cc[0] = ( ~as_subtract_e & ( exu_rs1_data_e[31] & exu_rs2_data_e[31]) ) | // C
( ~as_subtract_e & ( exu_rs1_data_e[31] | exu_rs2_data_e[31]) & ~edp_add_data_e_b31 ) |
( as_subtract_e & (~exu_rs1_data_e[31] & exu_rs2_data_e[31]) ) |
( as_subtract_e & (~exu_rs1_data_e[31] | exu_rs2_data_e[31]) & edp_sub_data_e_b31 );
assign ccr_data_e[7:0] = ({8{as_cc_e }} & as_cc[7:0] ) |
({8{lg_cc_e }} & lg_cc[7:0] );
assign ccr_data_b[7:0] = ({8{~fgu_ccr_valid_b}} & ccr_data_lth_b[7:0] ) |
({8{ fgu_ccr_valid_b}} & {fgu_exu_xcc_fx5[1:0],2'b00,fgu_exu_icc_fx5[3:0]});
assign fgu_ccr_valid_b = fgu_exu_cc_vld_fx5 & fgu_exu_w_vld_fx5;
assign ccr_valid_in_d = (as_cc_d | lg_cc_d);
assign ccr_valid_in_e = ccr_valid_out_e;
assign ccr_valid_in_m = ccr_valid_lth_m & ~dec_flush_m & ~exu_ecc_m & ~address_error_m;
assign ccr_valid_in_b = (ccr_valid_lth_b & ~dec_flush_b & ~tlu_flush_exu_b & ~tof_b & ~misalign_b) | fgu_ccr_valid_b;
assign wr_ccr_w_tid0 = ccr_valid_lth_w & (ect_tid_lth_w[1:0] == 2'b00);
assign wr_ccr_w_tid1 = ccr_valid_lth_w & (ect_tid_lth_w[1:0] == 2'b01);
assign wr_ccr_w_tid2 = ccr_valid_lth_w & (ect_tid_lth_w[1:0] == 2'b10);
assign wr_ccr_w_tid3 = ccr_valid_lth_w & (ect_tid_lth_w[1:0] == 2'b11);
assign wr_ccr_tlu0 = tlu_ccr_cwp_valid & (tlu_ccr_cwp_tid[1:0] == 2'b00);
assign wr_ccr_tlu1 = tlu_ccr_cwp_valid & (tlu_ccr_cwp_tid[1:0] == 2'b01);
assign wr_ccr_tlu2 = tlu_ccr_cwp_valid & (tlu_ccr_cwp_tid[1:0] == 2'b10);
assign wr_ccr_tlu3 = tlu_ccr_cwp_valid & (tlu_ccr_cwp_tid[1:0] == 2'b11);
assign wr_ccr_asi0 = rml_rng_wt_ccr_ctl & (rng_tid[1:0] == 2'b00);
assign wr_ccr_asi1 = rml_rng_wt_ccr_ctl & (rng_tid[1:0] == 2'b01);
assign wr_ccr_asi2 = rml_rng_wt_ccr_ctl & (rng_tid[1:0] == 2'b10);
assign wr_ccr_asi3 = rml_rng_wt_ccr_ctl & (rng_tid[1:0] == 2'b11);
assign arch_ccr_tid0_in[7:0] = ({8{ wr_ccr_w_tid0 }} & ccr_data_lth_w[7:0] ) |
({8{ wr_ccr_tlu0 }} & tlu_ccr[7:0] ) |
({8{ wr_ccr_asi0}} & edp_rng_in_ff[7:0] ) |
({8{~wr_ccr_w_tid0 & ~wr_ccr_tlu0 & ~wr_ccr_asi0}} & arch_ccr_tid0_lth[7:0]);
assign arch_ccr_tid1_in[7:0] = ({8{ wr_ccr_w_tid1 }} & ccr_data_lth_w[7:0] ) |
({8{ wr_ccr_tlu1 }} & tlu_ccr[7:0] ) |
({8{ wr_ccr_asi1}} & edp_rng_in_ff[7:0] ) |
({8{~wr_ccr_w_tid1 & ~wr_ccr_tlu1 & ~wr_ccr_asi1}} & arch_ccr_tid1_lth[7:0]);
assign arch_ccr_tid2_in[7:0] = ({8{ wr_ccr_w_tid2 }} & ccr_data_lth_w[7:0] ) |
({8{ wr_ccr_tlu2 }} & tlu_ccr[7:0] ) |
({8{ wr_ccr_asi2}} & edp_rng_in_ff[7:0] ) |
({8{~wr_ccr_w_tid2 & ~wr_ccr_tlu2 & ~wr_ccr_asi2}} & arch_ccr_tid2_lth[7:0]);
assign arch_ccr_tid3_in[7:0] = ({8{ wr_ccr_w_tid3 }} & ccr_data_lth_w[7:0] ) |
({8{ wr_ccr_tlu3 }} & tlu_ccr[7:0] ) |
({8{ wr_ccr_asi3}} & edp_rng_in_ff[7:0] ) |
({8{~wr_ccr_w_tid3 & ~wr_ccr_tlu3 & ~wr_ccr_asi3}} & arch_ccr_tid3_lth[7:0]);
exu_ect_ctl_msff_ctl_macro__width_28 i_ccr_pipe_lth (
.scan_in(i_ccr_pipe_lth_scanin),
.scan_out(i_ccr_pipe_lth_scanout),
ccr_valid_in_e , ccr_data_e[7:0] ,
ccr_valid_in_m , ccr_data_lth_m[7:0] ,
ccr_valid_in_b , ccr_data_b[7:0] }),
.dout ({ ccr_valid_lth_e ,
ccr_valid_lth_m , ccr_data_lth_m[7:0] ,
ccr_valid_lth_b , ccr_data_lth_b[7:0] ,
ccr_valid_lth_w , ccr_data_lth_w[7:0] }),
exu_ect_ctl_msff_ctl_macro__width_32 i_ccr_arch_lth ( // FS:wmr_protect
.scan_in(i_ccr_arch_lth_wmr_scanin),
.scan_out(i_ccr_arch_lth_wmr_scanout),
.din ({arch_ccr_tid0_in[7:0] , arch_ccr_tid1_in[7:0] , arch_ccr_tid2_in[7:0] , arch_ccr_tid3_in[7:0] }),
.dout ({arch_ccr_tid0_lth[7:0], arch_ccr_tid1_lth[7:0], arch_ccr_tid2_lth[7:0], arch_ccr_tid3_lth[7:0] }),
assign ccr_valid_out_e = ccr_valid_lth_e & dec_valid_e & ~tas_tv_overflow_e;
assign ccr_e_cmp = ccr_valid_lth_e & (tid_lth_d[1:0] == ect_tid_lth_e[1:0]);
assign ccr_m_cmp = ccr_valid_lth_m & (tid_lth_d[1:0] == tid_lth_m[1:0]);
assign ccr_b_cmp = ccr_valid_lth_b & (tid_lth_d[1:0] == tid_lth_b[1:0]);
assign ccr_w_cmp = ccr_valid_lth_w & (tid_lth_d[1:0] == ect_tid_lth_w[1:0]);
assign ccr_sel_e = ccr_e_cmp;
assign ccr_sel_m = ccr_m_cmp;
assign ccr_sel_b = ~ccr_m_cmp & ccr_b_cmp;
assign ccr_sel_w = ~ccr_m_cmp & ~ccr_b_cmp & ccr_w_cmp;
assign ccr_sel_a0 = ~ccr_m_cmp & ~ccr_b_cmp & ~ccr_w_cmp & (tid_lth_d[1:0] == 2'b00);
assign ccr_sel_a1 = ~ccr_m_cmp & ~ccr_b_cmp & ~ccr_w_cmp & (tid_lth_d[1:0] == 2'b01);
assign ccr_sel_a2 = ~ccr_m_cmp & ~ccr_b_cmp & ~ccr_w_cmp & (tid_lth_d[1:0] == 2'b10);
assign ccr_sel_a3 = ~ccr_m_cmp & ~ccr_b_cmp & ~ccr_w_cmp & (tid_lth_d[1:0] == 2'b11);
assign exu_ccr_byp_data0[7:0] = ({8{ ccr_sel_m }} & ccr_data_lth_m[7:0] ) |
({8{ ccr_sel_b }} & ccr_data_lth_b[7:0] ) |
({8{ ccr_sel_w }} & ccr_data_lth_w[7:0] ) |
({8{ ccr_sel_a0}} & arch_ccr_tid0_lth[7:0]) |
({8{ ccr_sel_a1}} & arch_ccr_tid1_lth[7:0]) |
({8{ ccr_sel_a2}} & arch_ccr_tid2_lth[7:0]) |
({8{ ccr_sel_a3}} & arch_ccr_tid3_lth[7:0]);
assign exu_ccr_byp_data1[7:0] = ({8{ ccr_sel_e }} & ccr_data_e[7:0] ) |
({8{~ccr_sel_e & ccr_sel_m }} & ccr_data_lth_m[7:0] ) |
({8{~ccr_sel_e & ccr_sel_b }} & ccr_data_lth_b[7:0] ) |
({8{~ccr_sel_e & ccr_sel_w }} & ccr_data_lth_w[7:0] ) |
({8{~ccr_sel_e & ccr_sel_a0}} & arch_ccr_tid0_lth[7:0]) |
({8{~ccr_sel_e & ccr_sel_a1}} & arch_ccr_tid1_lth[7:0]) |
({8{~ccr_sel_e & ccr_sel_a2}} & arch_ccr_tid2_lth[7:0]) |
({8{~ccr_sel_e & ccr_sel_a3}} & arch_ccr_tid3_lth[7:0]);
assign ccr_byp_data_b0 = ( {~dec_valid_e} & exu_ccr_byp_data0[0]) |
( { dec_valid_e} & exu_ccr_byp_data1[0]);
assign ccr_byp_data_b1 = ( {~dec_valid_e} & exu_ccr_byp_data0[1]) |
( { dec_valid_e} & exu_ccr_byp_data1[1]);
assign ccr_byp_data_b3 = ( {~dec_valid_e} & exu_ccr_byp_data0[3]) |
( { dec_valid_e} & exu_ccr_byp_data1[3]);
assign exu_ccr0[7:0] = arch_ccr_tid0_lth[7:0];
assign exu_ccr1[7:0] = arch_ccr_tid1_lth[7:0];
assign exu_ccr2[7:0] = arch_ccr_tid2_lth[7:0];
assign exu_ccr3[7:0] = arch_ccr_tid3_lth[7:0];
assign ect_rng_ccr_data[7:0] = ({8{rng_tid[1:0] == 2'b00}} & arch_ccr_tid0_lth[7:0]) |
({8{rng_tid[1:0] == 2'b01}} & arch_ccr_tid1_lth[7:0]) |
({8{rng_tid[1:0] == 2'b10}} & arch_ccr_tid2_lth[7:0]) |
({8{rng_tid[1:0] == 2'b11}} & arch_ccr_tid3_lth[7:0]);
assign trap_taken_e = dec_valid_e & tcc_e & tcc_taken_e;
assign exu_tcc_m = trap_taken_m_lth;
// pg. 199 Multiply Step -> CCR.icc.n XOR CCR.icc.v
assign ms_icc_in = ccr_byp_data_b3 ^ ccr_byp_data_b1;
assign tas_tv_overflow_e = (dec_valid_e & tas_tv_e & as_cc[1]); // Tagged Add TV with overflow
assign tas_tv_overflow_m_in = tas_tv_overflow_m_lth & ~dec_flush_m;
assign exu_tof_m = tas_tv_overflow_m_lth;
assign normal_va_hole_m_ = edp_address_m[63:48] == {16{edp_address_m[47]}};
assign special_ls_va_hole_m_ = edp_rd_ff_m[63:48] == {16{edp_rd_ff_m[47]}};
assign special_br_va_hole_m_ = ((edp_address_m[63:48] == 16'h0001) & ~edp_address_m[47]) |
((edp_address_m[63:48] == 16'h0000) & edp_address_m[47]);
assign va_hole_m = ( ls_special_sel_m & ~special_ls_va_hole_m_) |
( br_special_sel_m & ~special_br_va_hole_m_) |
(~ls_special_sel_m & ~br_special_sel_m & ~normal_va_hole_m_ );
assign exu_lsu_va_error_m = (va_hole_m & address_m & ~pstate_am_m );
assign exu_oor_va_m = (va_hole_m & address_m );
assign address_error_m = (va_hole_m & address_m & ~pstate_am_m & ~itlb_bypass_m);
assign misalign_error_e = misalign_e & dec_valid_e & (edp_add_data_e_b1 | edp_add_data_e_b0);
assign misalign_error_m_in = ect_misaligned_error_m & ~dec_flush_m;
assign exu_misalign_m = ect_misaligned_error_m;
assign pstate_am_d = (tlu_pstate_am[0] & (tid_lth_d[1:0] == 2'b00)) |
(tlu_pstate_am[1] & (tid_lth_d[1:0] == 2'b01)) |
(tlu_pstate_am[2] & (tid_lth_d[1:0] == 2'b10)) |
(tlu_pstate_am[3] & (tid_lth_d[1:0] == 2'b11));
exu_ect_ctl_msff_ctl_macro__width_9 i_tlu_lth (
.scan_in(i_tlu_lth_scanin),
.scan_out(i_tlu_lth_scanout),
.dout ({trap_taken_m_lth ,
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Flags !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Y Register !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
assign yreg_mwr_valid_em3_in = dec_valid_e & (exu_mdp_mux_sel_e[0] | exu_mdp_mux_sel_e[1]); // UMUL(cc), SMUL(cc)
assign yreg_mwr_valid_em2_in = yreg_mwr_valid_em2_lth & ~dec_flush_m & ~exu_ecc_m;
assign yreg_mwr_valid_em1_in = yreg_mwr_valid_em1_lth & ~dec_flush_b & ~tlu_flush_exu_b;
assign yreg_mwr_valid_e_in = yreg_mwr_valid_e_lth;
assign yreg_mwr_valid_m_in = yreg_mwr_valid_m_lth;
assign yreg_swr_valid_e_in = dec_valid_e & exu_mdp_mux_sel_e[3]; // MULScc
assign yreg_swr_valid_m_in = yreg_swr_valid_m_lth & ~dec_flush_m & ~exu_ecc_m;
assign yreg_wr_valid_b_in = yreg_mwr_valid_b_lth |
(yreg_swr_valid_b_lth & ~dec_flush_b & ~tlu_flush_exu_b);
exu_ect_ctl_msff_ctl_macro__width_5 i_yreg_mpipe_lth (
.scan_in(i_yreg_mpipe_lth_scanin),
.scan_out(i_yreg_mpipe_lth_scanout),
.din ({yreg_mwr_valid_em3_in , yreg_mwr_valid_em2_in , yreg_mwr_valid_em1_in , yreg_mwr_valid_e_in , yreg_mwr_valid_m_in }),
.dout ({yreg_mwr_valid_em2_lth , yreg_mwr_valid_em1_lth , yreg_mwr_valid_e_lth , yreg_mwr_valid_m_lth , yreg_mwr_valid_b_lth}),
exu_ect_ctl_msff_ctl_macro__width_5 i_yreg_spipe_lth (
.scan_in(i_yreg_spipe_lth_scanin),
.scan_out(i_yreg_spipe_lth_scanout),
.din ({yreg_swr_valid_e_in , yreg_swr_valid_m_in , yreg_wr_valid_b_in , edp_rng_in_ff_b57,edp_rng_in_ff_b56} ),
.dout ({yreg_swr_valid_m_lth , yreg_swr_valid_b_lth , ect_yreg_wr_w , rng_tid[1:0]} ),
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Y Register !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : Edge !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
// Edge Mask Specification
// Big-endian Little-endian
// Edge Size A2..A0 Left Edge Right Edge Left Edge Right Edge
// --------- ------ --------- ---------- --------- ----------
// 8 000 1111_1111 1000_0000 1111_1111 0000_0001
// 8 001 0111_1111 1100_0000 1111_1110 0000_0011
// 8 010 0011_1111 1110_0000 1111_1100 0000_0111
// 8 011 0001_1111 1111_0000 1111_1000 0000_1111
// 8 100 0000_1111 1111_1000 1111_0000 0001_1111
// 8 101 0000_0111 1111_1100 1110_0000 0011_1111
// 8 110 0000_0011 1111_1110 1100_0000 0111_1111
// 8 111 0000_0001 1111_1111 1000_0000 1111_1111
// 16 00x 1111 1000 1111 0001
// 16 01x 0111 1100 1110 0011
// 16 10x 0011 1110 1100 0111
// 16 11x 0001 1111 1000 1111
// 1. The left edge is computed from the 3 least significant bits of RS1 and
// the right edge is computed from the 3 least significant bits of RS2.
// 2. If 32-bit address masking is disabled (PSTATE.AM == 0, 64-bit addressing) and
// the (RS1[63:3] == RS2[63:3]), then RD = right edge mask ANDed with the left edge mask.
// If 32-bit address masking is enabled (PSTATE.AM == 1, 32-bit addressing) and
// the (RS1[31:3] == RS2[31:3]), then RD = right edge mask ANDed with the left edge mask.
// 3. Otherwise, RD = left edge mask.
// 31:30 29:25 24:19 18:14 13:05 04:00
// ----- ----- ------ ----- ----- -----
// 10 rd 110110 rs1 opf rs2
// -------- ----------- ----------------------------
// edge8N 0 0000 0001 no icc,xcc update;
// edge8L 0 0000 0010 Little-Endian
// edge8LN 0 0000 0011 no icc,xcc update; Little-Endian
// edge16N 0 0000 0101 no icc,xcc update;
// edge16L 0 0000 0110 Little-Endian
// edge16LN 0 0000 0111 no icc,xcc update; Little-Endian
// edge32N 0 0000 1001 no icc,xcc update;
// edge32L 0 0000 1010 Little-Endian
// edge32LN 0 0000 1011 no icc,xcc update; Little-Endian
// E0: XOR rs1 rs2 for eq det. Also take pstate_am into account
// assign zdet_in_e[63:32] = {32{~ect_pstate_am_e}} & (exu_rs1_data_e[63:32] ^ exu_rs2_data_e[63:32]);
// assign zdet_in_e[31:3] = exu_rs1_data_e[31:3] ^ exu_rs2_data_e[31:3];
// assign neq_zdet_e = | zdet_in_e[63:3];
// assign neq_zdet_e = ~(( edp_rs1_x_rs2_cmp_e[1] & edp_rs1_x_rs2_cmp_e[0]) |
// ( ect_pstate_am_e & edp_rs1_x_rs2_cmp_e[0]));
// *** Generate left mask ***
assign lmask_e[7] = edge08_e & ~exu_rs1_data_e[2] & ~exu_rs1_data_e[1] & ~exu_rs1_data_e[0] ; // 000
assign lmask_e[6] = edge08_e & ~exu_rs1_data_e[2] & ~exu_rs1_data_e[1] ; // 000 001
assign lmask_e[5] = (edge08_e & ~exu_rs1_data_e[2] & ~exu_rs1_data_e[1] ) | // 000 001
(edge08_e & ~exu_rs1_data_e[2] & ~exu_rs1_data_e[0]); // 010
assign lmask_e[4] = edge08_e & ~exu_rs1_data_e[2] ; // 000 001 010 011
assign lmask_e[3] = (edge08_e & ~exu_rs1_data_e[2] ) | // 000 001 010 011
(edge08_e & ~exu_rs1_data_e[1] & ~exu_rs1_data_e[0]) | // 100
(edge16_e & ~exu_rs1_data_e[2] & ~exu_rs1_data_e[1] ); // 00x
assign lmask_e[2] = (edge08_e & ~exu_rs1_data_e[2] ) | // 000 001 010 011
(edge08_e & ~exu_rs1_data_e[1] ) | // 100 101
(edge16_e & ~exu_rs1_data_e[2] ); // 00x 01x
assign lmask_e[1] = (edge08_e & ~exu_rs1_data_e[2] ) | // 000 001 010 011
(edge08_e & ~exu_rs1_data_e[1] ) | // 100 101
(edge08_e & ~exu_rs1_data_e[0]) | // 110
(edge16_e & ~exu_rs1_data_e[2] ) | // 00x 01x
(edge16_e & ~exu_rs1_data_e[1] ) | // 10x
(edge32_e & ~exu_rs1_data_e[2] ); // 0xx
assign lmask_e[0] = 1'b1;
// *** Generate right mask ***
assign rmask_e[7] = 1'b1;
assign rmask_e[6] = (edge08_e & exu_rs2_data_e[2] ) | // 100 101 110 111
(edge08_e & exu_rs2_data_e[1] ) | // 010 011
(edge08_e & exu_rs2_data_e[0]); // 001
assign rmask_e[5] = (edge08_e & exu_rs2_data_e[2] ) | // 100 101 110 111
(edge08_e & exu_rs2_data_e[1] ); // 010 011
assign rmask_e[4] = (edge08_e & exu_rs2_data_e[2] ) | // 100 101 110 111
(edge08_e & exu_rs2_data_e[1] & exu_rs2_data_e[0]); // 011
assign rmask_e[3] = (edge08_e & exu_rs2_data_e[2] ) | // 100 101 110 111
edge16_e ; // 00x 01x 10x 11x
assign rmask_e[2] = (edge08_e & exu_rs2_data_e[2] & exu_rs2_data_e[1] ) | // 110 111
(edge08_e & exu_rs2_data_e[2] & exu_rs2_data_e[0]) | // 101
(edge16_e & exu_rs2_data_e[2] ) | // 10x 11x
(edge16_e & exu_rs2_data_e[1] ); // 01x
assign rmask_e[1] = (edge08_e & exu_rs2_data_e[2] & exu_rs2_data_e[1] ) | // 110 111
(edge16_e & exu_rs2_data_e[2] ) | // 10x 11x
assign rmask_e[0] = (edge08_e & exu_rs2_data_e[2] & exu_rs2_data_e[1] & exu_rs2_data_e[0]) | // 111
(edge16_e & exu_rs2_data_e[2] & exu_rs2_data_e[1] ) | // 11x
(edge32_e & exu_rs2_data_e[2] ); // 1xx
assign lrmask_e[7:0] = lmask_e[7:0] & rmask_e[7:0];
assign lmask_le8[7:0] = { lmask_e[0], lmask_e[1], lmask_e[2], lmask_e[3], lmask_e[4], lmask_e[5], lmask_e[6], lmask_e[7]};
assign lmask_le16[7:0] = { 1'b0 , 1'b0 , 1'b0 , 1'b0 , lmask_e[0], lmask_e[1], lmask_e[2], lmask_e[3]};
assign lmask_le32[7:0] = { 1'b0 , 1'b0 , 1'b0 , 1'b0 , 1'b0 , 1'b0 , lmask_e[0], lmask_e[1]};
assign lrmask_le8[7:0] = {lrmask_e[0], lrmask_e[1], lrmask_e[2], lrmask_e[3], lrmask_e[4], lrmask_e[5], lrmask_e[6], lrmask_e[7]};
assign lrmask_le16[7:0] = { 1'b0 , 1'b0 , 1'b0 , 1'b0 , lrmask_e[0], lrmask_e[1], lrmask_e[2], lrmask_e[3]};
assign lrmask_le32[7:0] = { 1'b0 , 1'b0 , 1'b0 , 1'b0 , 1'b0 , 1'b0 , lrmask_e[0], lrmask_e[1]};
assign ect_edge_lmask_e[7:0] = ({8{~edgele_e }} & lmask_e[7:0] ) |
({8{ edgele_e & edge08_e}} & lmask_le8[7:0] ) |
({8{ edgele_e & edge16_e}} & lmask_le16[7:0] ) |
({8{ edgele_e & edge32_e}} & lmask_le32[7:0] );
assign ect_edge_lrmask_e[7:0] = ({8{~edgele_e }} & lrmask_e[7:0] ) |
({8{ edgele_e & edge08_e}} & lrmask_le8[7:0] ) |
({8{ edgele_e & edge16_e}} & lrmask_le16[7:0]) |
({8{ edgele_e & edge32_e}} & lrmask_le32[7:0]);
// assign ect_edge_res_e[7:0] = ({8{ neq_zdet_e}} & lmask_endian_e[7:0] ) |
// ({8{~neq_zdet_e}} & lrmask_endian_e[7:0]);
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : Edge !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! Start : DEC_CCR_CTL !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
// Description: Condition code resolution logic
// Choose appropriate CCs
assign cctype_d[2:0] = ({3{imov_d}} & {i[18], i[12:11]} ) |
({3{fmov_d}} & {i[13] | tcc_d, i[12:11]}) |
({3{bpcc_d}} & {~fp_d, i[21:20]} ) |
({3{bcc_d}} & {~fp_d, 2'b00} );
assign brcond_d[3:0] = ({4{movcc_d}} & i[17:14] ) |
({4{movr_d}} & {1'b0,i[12:10]}) |
({4{br_or_tcc_d}} & i[28:25] );
exu_ect_ctl_msff_ctl_macro__width_6 fgu_tid_ff (
.scan_in(fgu_tid_ff_scanin),
.scan_out(fgu_tid_ff_scanout),
.din ({fgu_cmp_fcc_tid_fx2[2:0] , lsu_fgu_fld_tid_b[2:0]}),
.dout ({fgu_cmp_fcc_tid_fx3[2:0] , fgu_fld_fcc_tid_fx3[2:0]}),
// modeled this after N1, it assumes the data is available 1 cycle earlier than POR
assign fcc_cw_valid[3:0] = fgu_cmp_fcc_vld_fx3[3:0];
assign sel_ct0 = (fgu_cmp_fcc_tid_fx3[2:0] == {dec_thread_group,2'b00});
assign sel_ct1 = (fgu_cmp_fcc_tid_fx3[2:0] == {dec_thread_group,2'b01});
assign sel_ct2 = (fgu_cmp_fcc_tid_fx3[2:0] == {dec_thread_group,2'b10});
assign sel_ct3 = (fgu_cmp_fcc_tid_fx3[2:0] == {dec_thread_group,2'b11});
assign fcc_cw_t0[3:0] = {4{sel_ct0}} & fcc_cw_valid[3:0];
assign fcc_cw_t1[3:0] = {4{sel_ct1}} & fcc_cw_valid[3:0];
assign fcc_cw_t2[3:0] = {4{sel_ct2}} & fcc_cw_valid[3:0];
assign fcc_cw_t3[3:0] = {4{sel_ct3}} & fcc_cw_valid[3:0];
assign fcc_lw_valid[1:0] = {2{lsu_fgu_fld_vld_w}} & fgu_fld_fcc_vld_fx3[1:0];
assign sel_lt0 = (fgu_fld_fcc_tid_fx3[2:0] == {dec_thread_group,2'b00});
assign sel_lt1 = (fgu_fld_fcc_tid_fx3[2:0] == {dec_thread_group,2'b01});
assign sel_lt2 = (fgu_fld_fcc_tid_fx3[2:0] == {dec_thread_group,2'b10});
assign sel_lt3 = (fgu_fld_fcc_tid_fx3[2:0] == {dec_thread_group,2'b11});
assign fcc_lw_t0[1:0] = {2{sel_lt0}} & fcc_lw_valid[1:0];
assign fcc_lw_t1[1:0] = {2{sel_lt1}} & fcc_lw_valid[1:0];
assign fcc_lw_t2[1:0] = {2{sel_lt2}} & fcc_lw_valid[1:0];
assign fcc_lw_t3[1:0] = {2{sel_lt3}} & fcc_lw_valid[1:0];
assign t0_data_in[7:0] = {
({2{fcc_lw_t0[1]}} & fgu_fld_fcc_fx3[7:6]) | ({2{fcc_cw_t0[3]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t0[1]}} & fgu_fld_fcc_fx3[5:4]) | ({2{fcc_cw_t0[2]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t0[1]}} & fgu_fld_fcc_fx3[3:2]) | ({2{fcc_cw_t0[1]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t0[0]}} & fgu_fld_fcc_fx3[1:0]) | ({2{fcc_cw_t0[0]}} & fgu_cmp_fcc_fx3[1:0])
assign t0_hold_in[7:0] = {
{2{~fcc_lw_t0[1] & ~fcc_cw_t0[3]}} & fcc_t0_d[7:6],
{2{~fcc_lw_t0[1] & ~fcc_cw_t0[2]}} & fcc_t0_d[5:4],
{2{~fcc_lw_t0[1] & ~fcc_cw_t0[1]}} & fcc_t0_d[3:2],
{2{~fcc_lw_t0[0] & ~fcc_cw_t0[0]}} & fcc_t0_d[1:0]
assign fcc_nxt_t0[7:0] = t0_data_in[7:0] | t0_hold_in[7:0];
exu_ect_ctl_msff_ctl_macro__width_8 fcc_t0_ff ( // FS:wmr_protect
.scan_in(fcc_t0_ff_wmr_scanin),
.scan_out(fcc_t0_ff_wmr_scanout),
assign t1_data_in[7:0] = {
({2{fcc_lw_t1[1]}} & fgu_fld_fcc_fx3[7:6]) | ({2{fcc_cw_t1[3]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t1[1]}} & fgu_fld_fcc_fx3[5:4]) | ({2{fcc_cw_t1[2]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t1[1]}} & fgu_fld_fcc_fx3[3:2]) | ({2{fcc_cw_t1[1]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t1[0]}} & fgu_fld_fcc_fx3[1:0]) | ({2{fcc_cw_t1[0]}} & fgu_cmp_fcc_fx3[1:0])
assign t1_hold_in[7:0] = {
{2{~fcc_lw_t1[1] & ~fcc_cw_t1[3]}} & fcc_t1_d[7:6],
{2{~fcc_lw_t1[1] & ~fcc_cw_t1[2]}} & fcc_t1_d[5:4],
{2{~fcc_lw_t1[1] & ~fcc_cw_t1[1]}} & fcc_t1_d[3:2],
{2{~fcc_lw_t1[0] & ~fcc_cw_t1[0]}} & fcc_t1_d[1:0]
assign fcc_nxt_t1[7:0] = t1_data_in[7:0] | t1_hold_in[7:0];
exu_ect_ctl_msff_ctl_macro__width_8 fcc_t1_ff ( // FS:wmr_protect
.scan_in(fcc_t1_ff_wmr_scanin),
.scan_out(fcc_t1_ff_wmr_scanout),
assign t2_data_in[7:0] = {
({2{fcc_lw_t2[1]}} & fgu_fld_fcc_fx3[7:6]) | ({2{fcc_cw_t2[3]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t2[1]}} & fgu_fld_fcc_fx3[5:4]) | ({2{fcc_cw_t2[2]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t2[1]}} & fgu_fld_fcc_fx3[3:2]) | ({2{fcc_cw_t2[1]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t2[0]}} & fgu_fld_fcc_fx3[1:0]) | ({2{fcc_cw_t2[0]}} & fgu_cmp_fcc_fx3[1:0])
assign t2_hold_in[7:0] = {
{2{~fcc_lw_t2[1] & ~fcc_cw_t2[3]}} & fcc_t2_d[7:6],
{2{~fcc_lw_t2[1] & ~fcc_cw_t2[2]}} & fcc_t2_d[5:4],
{2{~fcc_lw_t2[1] & ~fcc_cw_t2[1]}} & fcc_t2_d[3:2],
{2{~fcc_lw_t2[0] & ~fcc_cw_t2[0]}} & fcc_t2_d[1:0]
assign fcc_nxt_t2[7:0] = t2_data_in[7:0] | t2_hold_in[7:0];
exu_ect_ctl_msff_ctl_macro__width_8 fcc_t2_ff ( // FS:wmr_protect
.scan_in(fcc_t2_ff_wmr_scanin),
.scan_out(fcc_t2_ff_wmr_scanout),
assign t3_data_in[7:0] = {
({2{fcc_lw_t3[1]}} & fgu_fld_fcc_fx3[7:6]) | ({2{fcc_cw_t3[3]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t3[1]}} & fgu_fld_fcc_fx3[5:4]) | ({2{fcc_cw_t3[2]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t3[1]}} & fgu_fld_fcc_fx3[3:2]) | ({2{fcc_cw_t3[1]}} & fgu_cmp_fcc_fx3[1:0]),
({2{fcc_lw_t3[0]}} & fgu_fld_fcc_fx3[1:0]) | ({2{fcc_cw_t3[0]}} & fgu_cmp_fcc_fx3[1:0])
assign t3_hold_in[7:0] = {
{2{~fcc_lw_t3[1] & ~fcc_cw_t3[3]}} & fcc_t3_d[7:6],
{2{~fcc_lw_t3[1] & ~fcc_cw_t3[2]}} & fcc_t3_d[5:4],
{2{~fcc_lw_t3[1] & ~fcc_cw_t3[1]}} & fcc_t3_d[3:2],
{2{~fcc_lw_t3[0] & ~fcc_cw_t3[0]}} & fcc_t3_d[1:0]
assign fcc_nxt_t3[7:0] = t3_data_in[7:0] | t3_hold_in[7:0];
exu_ect_ctl_msff_ctl_macro__width_8 fcc_t3_ff ( // FS:wmr_protect
.scan_in(fcc_t3_ff_wmr_scanin),
.scan_out(fcc_t3_ff_wmr_scanout),
// use current tid to pick the right thread
// 0in value -var dec_pick_d[3:0] -val 0 1 2 4 8
assign fcc_d[7:0] = ({8{dec_pick_d[0]}} & fcc_t0_d[7:0]) |
({8{dec_pick_d[1]}} & fcc_t1_d[7:0]) |
({8{dec_pick_d[2]}} & fcc_t2_d[7:0]) |
({8{dec_pick_d[3]}} & fcc_t3_d[7:0]);
//---------------------------
//--------------------------
assign use_fcc0_d = ~cctype_d[1] & ~cctype_d[0];
assign use_fcc1_d = ~cctype_d[1] & cctype_d[0];
assign use_fcc2_d = cctype_d[1] & ~cctype_d[0];
assign use_fcc3_d = cctype_d[1] & cctype_d[0];
assign curr_fcc_d[1:0] = ({2{use_fcc0_d}} & fcc_d[1:0]) |
({2{use_fcc1_d}} & fcc_d[3:2]) |
({2{use_fcc2_d}} & fcc_d[5:4]) |
({2{use_fcc3_d}} & fcc_d[7:6]);
// decode to make next step easier
assign fcc_dec_d[0] = ~curr_fcc_d[1] & ~curr_fcc_d[0];
assign fcc_dec_d[1] = ~curr_fcc_d[1] & curr_fcc_d[0];
assign fcc_dec_d[2] = curr_fcc_d[1] & ~curr_fcc_d[0];
assign fcc_dec_d[3] = curr_fcc_d[1] & curr_fcc_d[0];
exu_ect_ctl_msff_ctl_macro__width_4 fcce_ff (
.scan_in(fcce_ff_scanin),
.scan_out(fcce_ff_scanout),
exu_ect_ctl_msff_ctl_macro__width_4 brcond_e_reg (
.scan_in(brcond_e_reg_scanin),
.scan_out(brcond_e_reg_scanout),
assign use_xcc_d = cctype_d[2] & cctype_d[1];
assign ccr_byp_data[7:0] = dec_valid_e ? exu_ccr_byp_data1[7:0] :
// mux between xcc and icc
assign cc_d[3:0] = use_xcc_d ? ccr_byp_data[7:4] : // xcc
ccr_byp_data[3:0]; // icc
exu_ect_ctl_msff_ctl_macro__width_4 ccreg_e (
.scan_in(ccreg_e_scanin),
.scan_out(ccreg_e_scanout),
assign brcond_e[0] = ~br_cond_e[1] & ~br_cond_e[0];
assign brcond_e[1] = ~br_cond_e[1] & br_cond_e[0];
assign brcond_e[2] = br_cond_e[1] & ~br_cond_e[0];
assign brcond_e[3] = br_cond_e[1] & br_cond_e[0];
// Evaluate potential integer CC branches
assign ltz_e = (cc_e[3] ^ cc_e[1]);
assign cc_breval_e[0] = 1'b0; // BPN
assign cc_breval_e[1] = cc_e[2]; // BPE
assign cc_breval_e[2] = cc_e[2] | ltz_e; // BPLE
assign cc_breval_e[3] = ltz_e; // BPL
assign cc_breval_e[4] = cc_e[2] | cc_e[0]; // BPLEU
assign cc_breval_e[5] = cc_e[0]; // BPCS
assign cc_breval_e[6] = cc_e[3]; // BPNEG
assign cc_breval_e[7] = cc_e[1]; // BPVS
// mux to choose right condition
assign cc_eval0 = cc_breval_e[0] & brcond_e[0] |
cc_breval_e[1] & brcond_e[1] |
cc_breval_e[2] & brcond_e[2] |
cc_breval_e[3] & brcond_e[3];
assign cc_eval1 = cc_breval_e[4] & brcond_e[0] |
cc_breval_e[5] & brcond_e[1] |
cc_breval_e[6] & brcond_e[2] |
cc_breval_e[7] & brcond_e[3];
// Evaluate FP CC branches
assign fp_breval_e[0] = 1'b0; // FBN / A
assign fp_breval_e[1] = ~fcc_dec_e[0]; // FBNE / E
assign fp_breval_e[2] = fcc_dec_e[1] | fcc_dec_e[2]; // FBLG / UE
assign fp_breval_e[3] = fcc_dec_e[1] | fcc_dec_e[3]; // FBUL / GE
assign fp_breval_e[4] = fcc_dec_e[1]; // FBL / UGE
assign fp_breval_e[5] = fcc_dec_e[3] | fcc_dec_e[2]; // FBUG / LE
assign fp_breval_e[6] = fcc_dec_e[2]; // FBG / ULE
assign fp_breval_e[7] = fcc_dec_e[3]; // FBU / O
assign fp_eval0 = fp_breval_e[0] & brcond_e[0] |
fp_breval_e[1] & brcond_e[1] |
fp_breval_e[2] & brcond_e[2] |
fp_breval_e[3] & brcond_e[3];
assign fp_eval1 = fp_breval_e[4] & brcond_e[0] |
fp_breval_e[5] & brcond_e[1] |
fp_breval_e[6] & brcond_e[2] |
fp_breval_e[7] & brcond_e[3];
exu_ect_ctl_msff_ctl_macro__width_1 cctype_reg (
.scan_in(cctype_reg_scanin),
.scan_out(cctype_reg_scanout),
assign fpcond_mvbr_e = ~cctype_e[2];
// merge eval0, eval1 and fp condition codes
assign cc_eval = (~fpcond_mvbr_e & ~br_cond_e[2] & cc_eval0) |
(~fpcond_mvbr_e & br_cond_e[2] & cc_eval1) |
( fpcond_mvbr_e & ~br_cond_e[2] & fp_eval0) |
( fpcond_mvbr_e & br_cond_e[2] & fp_eval1);
// invert branch condition if this is an inverted br type
assign cond_true_e = cc_eval ^ br_cond_e[3];
exu_ect_ctl_msff_ctl_macro__width_4 misc_ff (
.scan_in(misc_ff_scanin),
.scan_out(misc_ff_scanout),
.din ({callclass_d , specbr_d , cmov_d , regop_d}),
.dout ({callclass_e , specbr_e , cmov_e , regop_e}),
// Calculate Cond Assuming Z=1 And Z=0. Then Mux
assign r_eval1 = (edp_br_flag_e[1] | ~br_cond_e[1] | ~br_cond_e[0]) ^ br_cond_e[2];
assign r_eval0 = (edp_br_flag_e[1] & br_cond_e[1]) ^ br_cond_e[2];
// Evaluate Final Branch condition
assign final_cond_true_z0_e = (~regop_e & cond_true_e) |
assign final_cond_true_z1_e = (~regop_e & cond_true_e) |
// valid_e takes annul into account
// 0in value -var {callclass_e & dec_valid_e,cmov_e & dec_valid_e,tcc_e & dec_valid_e} -val 0 1 2 4
assign ect_br_taken_z0_e = (callclass_e | (specbr_e & final_cond_true_z0_e));
assign ect_br_taken_z1_e = (callclass_e | (specbr_e & final_cond_true_z1_e));
// 3 cases for {zero,neg} are 00, 01, 10 (11 illegal)
assign dec_cmov_z00_e = cmov_e & ((~regop_e & cond_true_e) | (regop_e & br_cond_e[2])); // 00 case
assign dec_cmov_z01_e = cmov_e & ((~regop_e & cond_true_e) | (regop_e & (br_cond_e[1] ^ br_cond_e[2]))); // 01 case
assign dec_cmov_z10_e = cmov_e & ((~regop_e & cond_true_e) | (regop_e & ((~br_cond_e[1] | ~br_cond_e[0]) ^ br_cond_e[2]))); // 10 case
assign tcc_taken_e = (tcc_e & final_cond_true_z0_e & ~edp_br_flag_e[0]) |
(tcc_e & final_cond_true_z1_e & edp_br_flag_e[0]);
//!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*! End : DEC_CCR_CTL !*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
exu_ect_ctl_spare_ctl_macro__num_6 spares (
.scan_out(spares_scanout),
assign i_pwr0_lth_scanin = scan_in ;
assign i_pwr1_lth_scanin = i_pwr0_lth_scanout ;
assign i_mbist_lth_scanin = i_pwr1_lth_scanout ;
assign i_estage_lth_scanin = i_mbist_lth_scanout ;
assign i_mstage_lth_scanin = i_estage_lth_scanout ;
assign ren_lth_scanin = i_mstage_lth_scanout ;
assign rs_lth_scanin = ren_lth_scanout ;
assign i_byp_lth_scanin = rs_lth_scanout ;
assign i_ccr_pipe_lth_scanin = i_byp_lth_scanout ;
assign i_tlu_lth_scanin = i_ccr_pipe_lth_scanout ;
assign i_yreg_mpipe_lth_scanin = i_tlu_lth_scanout ;
assign i_yreg_spipe_lth_scanin = i_yreg_mpipe_lth_scanout ;
assign fgu_tid_ff_scanin = i_yreg_spipe_lth_scanout ;
assign fcce_ff_scanin = fgu_tid_ff_scanout ;
assign brcond_e_reg_scanin = fcce_ff_scanout ;
assign ccreg_e_scanin = brcond_e_reg_scanout ;
assign cctype_reg_scanin = ccreg_e_scanout ;
assign misc_ff_scanin = cctype_reg_scanout ;
assign spares_scanin = misc_ff_scanout ;
assign scan_out = spares_scanout ;
assign i_ccr_arch_lth_wmr_scanin = wmr_scan_in ;
assign fcc_t0_ff_wmr_scanin = i_ccr_arch_lth_wmr_scanout;
assign fcc_t1_ff_wmr_scanin = fcc_t0_ff_wmr_scanout ;
assign fcc_t2_ff_wmr_scanin = fcc_t1_ff_wmr_scanout ;
assign fcc_t3_ff_wmr_scanin = fcc_t2_ff_wmr_scanout ;
assign wmr_scan_out = fcc_t3_ff_wmr_scanout ;
// any PARAMS parms go into naming of macro
module exu_ect_ctl_l1clkhdr_ctl_macro (
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_5 (
assign fdin[4:0] = din[4:0];
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_8 (
assign fdin[7:0] = din[7:0];
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_37 (
assign fdin[36:0] = din[36:0];
.so({so[35:0],scan_out}),
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_6 (
assign fdin[5:0] = din[5:0];
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_15 (
assign fdin[14:0] = din[14:0];
.so({so[13:0],scan_out}),
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_76 (
assign fdin[75:0] = din[75:0];
.so({so[74:0],scan_out}),
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_28 (
assign fdin[27:0] = din[27:0];
.so({so[26:0],scan_out}),
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_32 (
assign fdin[31:0] = din[31:0];
.so({so[30:0],scan_out}),
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_9 (
assign fdin[8:0] = din[8:0];
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_4 (
assign fdin[3:0] = din[3:0];
// any PARAMS parms go into naming of macro
module exu_ect_ctl_msff_ctl_macro__width_1 (
assign fdin[0:0] = din[0:0];
// Description: Spare gate macro for control blocks
// Param num controls the number of times the macro is added
// flops=0 can be used to use only combination spare logic
module exu_ect_ctl_spare_ctl_macro__num_6 (
wire spare0_buf_32x_unused;
wire spare0_nand3_8x_unused;
wire spare0_inv_8x_unused;
wire spare0_aoi22_4x_unused;
wire spare0_buf_8x_unused;
wire spare0_oai22_4x_unused;
wire spare0_inv_16x_unused;
wire spare0_nand2_16x_unused;
wire spare0_nor3_4x_unused;
wire spare0_nand2_8x_unused;
wire spare0_buf_16x_unused;
wire spare0_nor2_16x_unused;
wire spare0_inv_32x_unused;
wire spare1_buf_32x_unused;
wire spare1_nand3_8x_unused;
wire spare1_inv_8x_unused;
wire spare1_aoi22_4x_unused;
wire spare1_buf_8x_unused;
wire spare1_oai22_4x_unused;
wire spare1_inv_16x_unused;
wire spare1_nand2_16x_unused;
wire spare1_nor3_4x_unused;
wire spare1_nand2_8x_unused;
wire spare1_buf_16x_unused;
wire spare1_nor2_16x_unused;
wire spare1_inv_32x_unused;
wire spare2_buf_32x_unused;
wire spare2_nand3_8x_unused;
wire spare2_inv_8x_unused;
wire spare2_aoi22_4x_unused;
wire spare2_buf_8x_unused;
wire spare2_oai22_4x_unused;
wire spare2_inv_16x_unused;
wire spare2_nand2_16x_unused;
wire spare2_nor3_4x_unused;
wire spare2_nand2_8x_unused;
wire spare2_buf_16x_unused;
wire spare2_nor2_16x_unused;
wire spare2_inv_32x_unused;
wire spare3_buf_32x_unused;
wire spare3_nand3_8x_unused;
wire spare3_inv_8x_unused;
wire spare3_aoi22_4x_unused;
wire spare3_buf_8x_unused;
wire spare3_oai22_4x_unused;
wire spare3_inv_16x_unused;
wire spare3_nand2_16x_unused;
wire spare3_nor3_4x_unused;
wire spare3_nand2_8x_unused;
wire spare3_buf_16x_unused;
wire spare3_nor2_16x_unused;
wire spare3_inv_32x_unused;
wire spare4_buf_32x_unused;
wire spare4_nand3_8x_unused;
wire spare4_inv_8x_unused;
wire spare4_aoi22_4x_unused;
wire spare4_buf_8x_unused;
wire spare4_oai22_4x_unused;
wire spare4_inv_16x_unused;
wire spare4_nand2_16x_unused;
wire spare4_nor3_4x_unused;
wire spare4_nand2_8x_unused;
wire spare4_buf_16x_unused;
wire spare4_nor2_16x_unused;
wire spare4_inv_32x_unused;
wire spare5_buf_32x_unused;
wire spare5_nand3_8x_unused;
wire spare5_inv_8x_unused;
wire spare5_aoi22_4x_unused;
wire spare5_buf_8x_unused;
wire spare5_oai22_4x_unused;
wire spare5_inv_16x_unused;
wire spare5_nand2_16x_unused;
wire spare5_nor3_4x_unused;
wire spare5_nand2_8x_unused;
wire spare5_buf_16x_unused;
wire spare5_nor2_16x_unused;
wire spare5_inv_32x_unused;
cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
.out(spare0_buf_32x_unused));
cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
.out(spare0_nand3_8x_unused));
cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
.out(spare0_inv_8x_unused));
cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
.out(spare0_aoi22_4x_unused));
cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
.out(spare0_buf_8x_unused));
cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
.out(spare0_oai22_4x_unused));
cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
.out(spare0_inv_16x_unused));
cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
.out(spare0_nand2_16x_unused));
cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
.out(spare0_nor3_4x_unused));
cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
.out(spare0_nand2_8x_unused));
cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
.out(spare0_buf_16x_unused));
cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
.out(spare0_nor2_16x_unused));
cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
.out(spare0_inv_32x_unused));
cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
.out(spare1_buf_32x_unused));
cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
.out(spare1_nand3_8x_unused));
cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
.out(spare1_inv_8x_unused));
cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
.out(spare1_aoi22_4x_unused));
cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
.out(spare1_buf_8x_unused));
cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
.out(spare1_oai22_4x_unused));
cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
.out(spare1_inv_16x_unused));
cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
.out(spare1_nand2_16x_unused));
cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
.out(spare1_nor3_4x_unused));
cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
.out(spare1_nand2_8x_unused));
cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
.out(spare1_buf_16x_unused));
cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
.out(spare1_nor2_16x_unused));
cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
.out(spare1_inv_32x_unused));
cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
.out(spare2_buf_32x_unused));
cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
.out(spare2_nand3_8x_unused));
cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
.out(spare2_inv_8x_unused));
cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
.out(spare2_aoi22_4x_unused));
cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
.out(spare2_buf_8x_unused));
cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
.out(spare2_oai22_4x_unused));
cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
.out(spare2_inv_16x_unused));
cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
.out(spare2_nand2_16x_unused));
cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
.out(spare2_nor3_4x_unused));
cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
.out(spare2_nand2_8x_unused));
cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
.out(spare2_buf_16x_unused));
cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
.out(spare2_nor2_16x_unused));
cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
.out(spare2_inv_32x_unused));
cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
.out(spare3_buf_32x_unused));
cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
.out(spare3_nand3_8x_unused));
cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
.out(spare3_inv_8x_unused));
cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
.out(spare3_aoi22_4x_unused));
cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
.out(spare3_buf_8x_unused));
cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
.out(spare3_oai22_4x_unused));
cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
.out(spare3_inv_16x_unused));
cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
.out(spare3_nand2_16x_unused));
cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
.out(spare3_nor3_4x_unused));
cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
.out(spare3_nand2_8x_unused));
cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
.out(spare3_buf_16x_unused));
cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
.out(spare3_nor2_16x_unused));
cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
.out(spare3_inv_32x_unused));
cl_sc1_msff_8x spare4_flop (.l1clk(l1clk),
cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
.out(spare4_buf_32x_unused));
cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
.out(spare4_nand3_8x_unused));
cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
.out(spare4_inv_8x_unused));
cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
.out(spare4_aoi22_4x_unused));
cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
.out(spare4_buf_8x_unused));
cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
.out(spare4_oai22_4x_unused));
cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
.out(spare4_inv_16x_unused));
cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
.out(spare4_nand2_16x_unused));
cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
.out(spare4_nor3_4x_unused));
cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
.out(spare4_nand2_8x_unused));
cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
.out(spare4_buf_16x_unused));
cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
.out(spare4_nor2_16x_unused));
cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
.out(spare4_inv_32x_unused));
cl_sc1_msff_8x spare5_flop (.l1clk(l1clk),
cl_u1_buf_32x spare5_buf_32x (.in(1'b1),
.out(spare5_buf_32x_unused));
cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1),
.out(spare5_nand3_8x_unused));
cl_u1_inv_8x spare5_inv_8x (.in(1'b1),
.out(spare5_inv_8x_unused));
cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1),
.out(spare5_aoi22_4x_unused));
cl_u1_buf_8x spare5_buf_8x (.in(1'b1),
.out(spare5_buf_8x_unused));
cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1),
.out(spare5_oai22_4x_unused));
cl_u1_inv_16x spare5_inv_16x (.in(1'b1),
.out(spare5_inv_16x_unused));
cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1),
.out(spare5_nand2_16x_unused));
cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0),
.out(spare5_nor3_4x_unused));
cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1),
.out(spare5_nand2_8x_unused));
cl_u1_buf_16x spare5_buf_16x (.in(1'b1),
.out(spare5_buf_16x_unused));
cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0),
.out(spare5_nor2_16x_unused));
cl_u1_inv_32x spare5_inv_32x (.in(1'b1),
.out(spare5_inv_32x_unused));