// fig_begin idecode module idecode(instr, reg_id_d, imm_value); parameter instr_width = 32; parameter reg_id_d_width = 5; parameter imm_width = 32; input [instr_width-1:0] instr; output [reg_id_d_width-1:0] reg_id_d; output [imm_width-1:0] imm_value; assign reg_id_d = instr[11:7]; assign imm_value = {instr[31:12], 12'b0}; endmodule // fig_end idecode