Skip to content

Commit e34c5ba

Browse files
Correct logic for sign bit in load_unit.sv (#3035)
Without this change the logic is ambiguous. Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
1 parent dcd0b03 commit e34c5ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/load_unit.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ module load_unit
505505

506506
// select correct sign bit in parallel to result shifter above
507507
// pull to 0 if unsigned
508-
assign rdata_sign_bit = rdata_is_signed & rdata_sign_bits[rdata_offset] | (CVA6Cfg.FpPresent && rdata_is_fp_signed);
508+
assign rdata_sign_bit = (rdata_is_signed && rdata_sign_bits[rdata_offset]) || (CVA6Cfg.FpPresent && rdata_is_fp_signed);
509509

510510
// result mux
511511
always_comb begin

0 commit comments

Comments
 (0)