There was an error while loading. Please reload this page.
1 parent 25db8fd commit e6641baCopy full SHA for e6641ba
1 file changed
rtl/core/alu.sv
@@ -36,9 +36,9 @@ always_comb begin : ALU_LOGIC
36
EQUAL: ALU_RD_o = (ALU_RS1_i == ALU_RS2_i) ? 32'h1 : 32'h0;
37
38
// Comparações
39
- SLT: ALU_RD_o = (ALU_RS1_i < ALU_RS2_i) ? 32'h1 : 32'h0;
+ SLT: ALU_RD_o = ($signed(ALU_RS1_i) < $signed(ALU_RS2_i)) ? 32'h1 : 32'h0;
40
SLT_U: ALU_RD_o = ($unsigned(ALU_RS1_i) < $unsigned(ALU_RS2_i)) ? 32'h1 : 32'h0;
41
- GREATER_EQUAL: ALU_RD_o = (ALU_RS1_i >= ALU_RS2_i) ? 32'h1 : 32'h0;
+ GREATER_EQUAL: ALU_RD_o = ($signed(ALU_RS1_i) >= $signed(ALU_RS2_i)) ? 32'h1 : 32'h0;
42
GREATER_EQUAL_U: ALU_RD_o = ($unsigned(ALU_RS1_i) >= $unsigned(ALU_RS2_i)) ? 32'h1 : 32'h0;
43
44
// Shifts
0 commit comments