Line 104... |
Line 104... |
input [3:0] i_daddress_sel,
|
input [3:0] i_daddress_sel,
|
input [2:0] i_pc_sel,
|
input [2:0] i_pc_sel,
|
input [1:0] i_byte_enable_sel,
|
input [1:0] i_byte_enable_sel,
|
input [2:0] i_status_bits_sel,
|
input [2:0] i_status_bits_sel,
|
input [2:0] i_reg_write_sel,
|
input [2:0] i_reg_write_sel,
|
// input i_user_mode_regs_load,
|
|
input i_user_mode_regs_store_nxt,
|
input i_user_mode_regs_store_nxt,
|
input i_firq_not_user_mode,
|
input i_firq_not_user_mode,
|
|
input i_use_carry_in, // e.g. add with carry instruction
|
|
|
input i_write_data_wen,
|
input i_write_data_wen,
|
input i_base_address_wen, // save LDM base address register,
|
input i_base_address_wen, // save LDM base address register,
|
// in case of data abort
|
// in case of data abort
|
input i_pc_wen,
|
input i_pc_wen,
|
Line 212... |
Line 212... |
wire [31:0] save_int_pc;
|
wire [31:0] save_int_pc;
|
wire [31:0] save_int_pc_m4;
|
wire [31:0] save_int_pc_m4;
|
wire ldm_flags;
|
wire ldm_flags;
|
wire ldm_status_bits;
|
wire ldm_status_bits;
|
|
|
|
wire carry_in;
|
|
|
|
|
// ========================================================
|
// ========================================================
|
// Status Bits in PC register
|
// Status Bits in PC register
|
// ========================================================
|
// ========================================================
|
wire [1:0] status_bits_mode_out;
|
wire [1:0] status_bits_mode_out;
|
assign status_bits_mode_out = (i_status_bits_mode_wen && i_status_bits_sel == 3'd1 && !ldm_status_bits) ?
|
assign status_bits_mode_out = (i_status_bits_mode_wen && i_status_bits_sel == 3'd1 && !ldm_status_bits) ?
|
Line 556... |
Line 559... |
|
|
|
|
// ========================================================
|
// ========================================================
|
// Instantiate Barrel Shift
|
// Instantiate Barrel Shift
|
// ========================================================
|
// ========================================================
|
|
assign carry_in = i_use_carry_in ? status_bits_flags[1] : 1'd0;
|
|
|
a25_barrel_shift u_barrel_shift (
|
a25_barrel_shift u_barrel_shift (
|
.i_clk ( i_clk ),
|
.i_clk ( i_clk ),
|
.i_in ( barrel_shift_in ),
|
.i_in ( barrel_shift_in ),
|
.i_carry_in ( status_bits_flags[1] ),
|
.i_carry_in ( carry_in ),
|
.i_shift_amount ( shift_amount ),
|
.i_shift_amount ( shift_amount ),
|
.i_shift_imm_zero ( i_shift_imm_zero ),
|
.i_shift_imm_zero ( i_shift_imm_zero ),
|
.i_function ( i_barrel_shift_function ),
|
.i_function ( i_barrel_shift_function ),
|
|
|
.o_out ( barrel_shift_out ),
|
.o_out ( barrel_shift_out ),
|