From 700a32c506f00378d2547faf6bdc49348135efeb Mon Sep 17 00:00:00 2001 From: sylwpro <70205385+sylwpro@users.noreply.github.com> Date: Wed, 26 Aug 2020 09:30:01 +0200 Subject: [PATCH] Change in conditional operator --- rtl/e203/core/e203_exu_alu_muldiv.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/e203/core/e203_exu_alu_muldiv.v b/rtl/e203/core/e203_exu_alu_muldiv.v index 3ee53055..fc8a2a64 100644 --- a/rtl/e203/core/e203_exu_alu_muldiv.v +++ b/rtl/e203/core/e203_exu_alu_muldiv.v @@ -589,11 +589,11 @@ module e203_exu_alu_muldiv( // The special case will need to be handled specially wire [32:0] golden_res_div = div_special_cases ? div_special_res : - ( $signed({div_rs1_sign,muldiv_i_rs1}) / ((div_by_0 | div_ovf) ? 1 : $signed({div_rs2_sign,muldiv_i_rs2}))); + $signed( $signed({div_rs1_sign,muldiv_i_rs1}) / ((div_by_0 | div_ovf) ? 1 : $signed({div_rs2_sign,muldiv_i_rs2}))); wire [32:0] golden_res_divu = div_special_cases ? div_special_res : ($unsigned({div_rs1_sign,muldiv_i_rs1}) / ((div_by_0 | div_ovf) ? 1 : $unsigned({div_rs2_sign,muldiv_i_rs2}))); wire [32:0] golden_res_rem = div_special_cases ? div_special_res : - ( $signed({div_rs1_sign,muldiv_i_rs1}) % ((div_by_0 | div_ovf) ? 1 : $signed({div_rs2_sign,muldiv_i_rs2}))); + $signed( $signed({div_rs1_sign,muldiv_i_rs1}) % ((div_by_0 | div_ovf) ? 1 : $signed({div_rs2_sign,muldiv_i_rs2}))); wire [32:0] golden_res_remu = div_special_cases ? div_special_res : ($unsigned({div_rs1_sign,muldiv_i_rs1}) % ((div_by_0 | div_ovf) ? 1 : $unsigned({div_rs2_sign,muldiv_i_rs2})));