Line 78... |
Line 78... |
logic o; // Overflow
|
logic o; // Overflow
|
logic c; // Carry
|
logic c; // Carry
|
} type_scr1_ialu_flags_s;
|
} type_scr1_ialu_flags_s;
|
|
|
`ifdef SCR1_RVM_EXT
|
`ifdef SCR1_RVM_EXT
|
typedef enum logic [1:0] {
|
//typedef enum logic [1:0] {
|
SCR1_IALU_MDU_FSM_IDLE,
|
parameter SCR1_IALU_MDU_FSM_IDLE = 2'b00;
|
SCR1_IALU_MDU_FSM_ITER,
|
parameter SCR1_IALU_MDU_FSM_ITER = 2'b01;
|
SCR1_IALU_MDU_FSM_CORR
|
parameter SCR1_IALU_MDU_FSM_CORR = 2'b10;
|
} type_scr1_ialu_fsm_state;
|
//} type_scr1_ialu_fsm_state;
|
|
|
typedef enum logic [1:0] {
|
//typedef enum logic [1:0] {
|
SCR1_IALU_MDU_NONE,
|
parameter SCR1_IALU_MDU_NONE = 2'b00;
|
SCR1_IALU_MDU_MUL,
|
parameter SCR1_IALU_MDU_MUL = 2'b01;
|
SCR1_IALU_MDU_DIV
|
parameter SCR1_IALU_MDU_DIV = 2'b10;
|
} type_scr1_ialu_mdu_cmd;
|
//} type_scr1_ialu_mdu_cmd;
|
`endif // SCR1_RVM_EXT
|
`endif // SCR1_RVM_EXT
|
|
|
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
// Local signals declaration
|
// Local signals declaration
|
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
Line 121... |
Line 121... |
logic mdu_corr_req; // DIV/REM(U) correction request
|
logic mdu_corr_req; // DIV/REM(U) correction request
|
logic div_corr_req; // Correction request for DIV operation
|
logic div_corr_req; // Correction request for DIV operation
|
logic rem_corr_req; // Correction request for REM(U) operations
|
logic rem_corr_req; // Correction request for REM(U) operations
|
|
|
// MUL/DIV FSM signals
|
// MUL/DIV FSM signals
|
type_scr1_ialu_fsm_state mdu_fsm_ff; // Current FSM state
|
logic [1:0] mdu_fsm_ff; // Current FSM state
|
type_scr1_ialu_fsm_state mdu_fsm_next; // Next FSM state
|
logic [1:0] mdu_fsm_next; // Next FSM state
|
logic mdu_fsm_idle; // MDU FSM is in IDLE state
|
logic mdu_fsm_idle; // MDU FSM is in IDLE state
|
`ifdef SCR1_TRGT_SIMULATION
|
`ifdef SCR1_TRGT_SIMULATION
|
logic mdu_fsm_iter; // MDU FSM is in ITER state
|
logic mdu_fsm_iter; // MDU FSM is in ITER state
|
`endif // SCR1_TRGT_SIMULATION
|
`endif // SCR1_TRGT_SIMULATION
|
logic mdu_fsm_corr; // MDU FSM is in CORR state
|
logic mdu_fsm_corr; // MDU FSM is in CORR state
|
|
|
// MDU command signals
|
// MDU command signals
|
type_scr1_ialu_mdu_cmd mdu_cmd; // MDU command: 00 - NONE, 01 - MUL, 10 - DIV
|
logic [1:0] mdu_cmd; // MDU command: 00 - NONE, 01 - MUL, 10 - DIV
|
logic mdu_cmd_mul; // MDU command is MUL(HSU)
|
logic mdu_cmd_mul; // MDU command is MUL(HSU)
|
logic mdu_cmd_div; // MDU command is DIV(U)/REM(U)
|
logic mdu_cmd_div; // MDU command is DIV(U)/REM(U)
|
logic [1:0] mul_cmd; // MUL command: 00 - MUL, 01 - MULH, 10 - MULHSU, 11 - MULHU
|
logic [1:0] mul_cmd; // MUL command: 00 - MUL, 01 - MULH, 10 - MULHSU, 11 - MULHU
|
logic mul_cmd_hi; // High part of MUL result is requested
|
logic mul_cmd_hi; // High part of MUL result is requested
|
logic [1:0] div_cmd; // DIV command: 00 - DIV, 01 - DIVU, 10 - REM, 11 - REMU
|
logic [1:0] div_cmd; // DIV command: 00 - DIV, 01 - DIVU, 10 - REM, 11 - REMU
|