Arithmetic Logic Unit (ALU)
Defined in rtl/alu.sv
Figure |
Direction |
Signal |
|
Input |
a |
b |
operation |
Output |
result |
status |
The Arithmetic Logic Unit (ALU) is the combinatorial circuit in charge to perform the binary operation selected by the operation
signal.
alu_opcode_t
is the enum that represent the operations, these are defined in rv32i_defs.sv.
The status
bus represent the following flags:
Bit index |
Flag |
Description |
0 |
N |
Result is negative |
1 |
Z |
Result is zero |
2 |
C |
Carry out |
3 |
V |
Overflow |