mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 21:57:11 -04:00
🐛 Fix remove ALU operators
This commit is contained in:
parent
74c33bf1ba
commit
5ffb9ef36c
2 changed files with 11 additions and 11 deletions
|
@ -74,7 +74,7 @@ package ariane_pkg;
|
|||
// jumps
|
||||
JAL, JALR,
|
||||
// set lower than operations
|
||||
SLTS, SLTU, SLETS, SLETU,
|
||||
SLTS, SLTU,
|
||||
// CSR functions
|
||||
MRET, SRET, URET, ECALL, CSR_WRITE, CSR_READ, CSR_SET, CSR_CLEAR,
|
||||
// LSU functions
|
||||
|
|
20
src/alu.sv
20
src/alu.sv
|
@ -59,8 +59,7 @@ module alu
|
|||
// COMPARATOR OPs
|
||||
EQ, NE,
|
||||
GEU, LTU,
|
||||
GES, LTS,
|
||||
SLETS, SLETU: adder_op_b_negate = 1'b1;
|
||||
GES, LTS: adder_op_b_negate = 1'b1;
|
||||
|
||||
default: ;
|
||||
endcase
|
||||
|
@ -147,7 +146,9 @@ module alu
|
|||
cmp_signed = 1'b0;
|
||||
|
||||
unique case (operator_i)
|
||||
GES, LTS: begin
|
||||
GES,
|
||||
LTS,
|
||||
SLTS: begin
|
||||
cmp_signed = 1'b1;
|
||||
end
|
||||
|
||||
|
@ -181,11 +182,9 @@ module alu
|
|||
unique case (operator_i)
|
||||
EQ: cmp_result = is_equal;
|
||||
NE: cmp_result = (~is_equal);
|
||||
// GTS, GTU: cmp_result = is_greater_equal && (~is_equal);
|
||||
GES, GEU: cmp_result = is_greater_equal;
|
||||
LTS, LTU: cmp_result = (~is_greater_equal);
|
||||
// LES, LEU: cmp_result = (~is_greater_equal) || is_equal;
|
||||
|
||||
LTS, SLTS,
|
||||
LTU, SLTU: cmp_result = (~is_greater_equal);
|
||||
default: ;
|
||||
endcase
|
||||
end
|
||||
|
@ -217,9 +216,10 @@ module alu
|
|||
SRLW, SRAW: result_o = {{32{shift_result32[31]}}, shift_result32[31:0]};
|
||||
|
||||
// Comparison Operations
|
||||
EQ, NE,
|
||||
LTU, GEU,
|
||||
GES, LTS : result_o = {63'b0, cmp_result};
|
||||
EQ, NE,
|
||||
GEU, LTU,
|
||||
LTS, GES,
|
||||
SLTS, SLTU: result_o = {63'b0, cmp_result};
|
||||
|
||||
default: ; // default case to suppress unique warning
|
||||
endcase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue