Fix comparison bug in ALU

This commit is contained in:
Sven Stucki 2015-10-21 17:45:32 +02:00
parent b957c6f682
commit 9f5beb527f

4
alu.sv
View file

@ -167,9 +167,9 @@ module riscv_alu
end
assign is_equal = (operand_a_i == operand_b_i);
assign is_greater = $signed({operand_a_i[31] & cmp_signed, operand_a_i[30:0]})
assign is_greater = $signed({operand_a_i[31] & cmp_signed, operand_a_i[31:0]})
>
$signed({operand_b_i[31] & cmp_signed, operand_b_i[30:0]});
$signed({operand_b_i[31] & cmp_signed, operand_b_i[31:0]});
// generate comparison result
always_comb