Declare result of signed arithmetic as signed to avoid linting error

This commit is contained in:
Pirmin Vogel 2019-05-08 17:44:38 +01:00 committed by Philipp Wagner
parent 49fa87ba44
commit 708f9287e4
2 changed files with 5 additions and 2 deletions

View file

@ -117,7 +117,9 @@ module ibex_alu (
assign shift_op_a_32 = {shift_arithmetic & shift_op_a[31], shift_op_a};
assign shift_right_result = $unsigned($signed(shift_op_a_32) >>> shift_amt[4:0]);
logic signed [32:0] shift_right_result_signed;
assign shift_right_result_signed = $signed(shift_op_a_32) >>> shift_amt[4:0];
assign shift_right_result = shift_right_result_signed[31:0];
// bit reverse the shift_right_result for left shifts
for (genvar j = 0; j < 32; j++) begin : gen_resrevloop

View file

@ -56,7 +56,8 @@ module ibex_multdiv_fast (
} div_fsm_e;
div_fsm_e divcurr_state_q, divcurr_state_n;
logic [34:0] mac_res_ext;
logic signed [34:0] mac_res_ext;
logic [33:0] mac_res_q, mac_res_n, mac_res, op_reminder_n;
logic [15:0] mult_op_a;
logic [15:0] mult_op_b;