+ -- control signals that are derived from insn_type
+ type mux_select_array_t is array(insn_type_t) of std_ulogic_vector(2 downto 0);
+
+ constant result_select : mux_select_array_t := (
+ OP_AND => "001", -- logical_result
+ OP_OR => "001",
+ OP_XOR => "001",
+ OP_POPCNT => "001",
+ OP_PRTY => "001",
+ OP_CMPB => "001",
+ OP_EXTS => "001",
+ OP_BPERM => "001",
+ OP_BCD => "001",
+ OP_MTSPR => "001",
+ OP_RLC => "010", -- rotator_result
+ OP_RLCL => "010",
+ OP_RLCR => "010",
+ OP_SHL => "010",
+ OP_SHR => "010",
+ OP_EXTSWSLI => "010",
+ OP_MUL_L64 => "011", -- muldiv_result
+ OP_MUL_H64 => "011",
+ OP_MUL_H32 => "011",
+ OP_DIV => "011",
+ OP_DIVE => "011",
+ OP_MOD => "011",
+ OP_CNTZ => "100", -- countzero_result
+ OP_MFSPR => "101", -- spr_result
+ OP_ISEL => "111", -- misc_result
+ OP_DARN => "111",
+ OP_MFMSR => "111",
+ OP_MFCR => "111",
+ OP_SETB => "111",
+ others => "000" -- default to adder_result
+ );
+
+ constant subresult_select : mux_select_array_t := (
+ OP_MUL_L64 => "000", -- muldiv_result
+ OP_MUL_H64 => "001",
+ OP_MUL_H32 => "010",
+ OP_DIV => "011",
+ OP_DIVE => "011",
+ OP_MOD => "011",
+ others => "000"
+ );
+