diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-03-16 16:30:18 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-03-16 16:30:18 +0800 |
| commit | dd7f4c2a03a6be4db70c5653b7bdebfd3023dac3 (patch) | |
| tree | 77005684444621a9647cd1388f9353d417afaa76 /rv64cpu/rtl/core/include/rv64_pkg.sv | |
| parent | 660e5ce626965105f6a9327c66ba251f17f7c5f7 (diff) | |
| download | rcc-project-dd7f4c2a03a6be4db70c5653b7bdebfd3023dac3.tar.gz rcc-project-dd7f4c2a03a6be4db70c5653b7bdebfd3023dac3.tar.xz | |
branch unit and test
Diffstat (limited to 'rv64cpu/rtl/core/include/rv64_pkg.sv')
| -rw-r--r-- | rv64cpu/rtl/core/include/rv64_pkg.sv | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rv64cpu/rtl/core/include/rv64_pkg.sv b/rv64cpu/rtl/core/include/rv64_pkg.sv index 984a93b..372cc1b 100644 --- a/rv64cpu/rtl/core/include/rv64_pkg.sv +++ b/rv64cpu/rtl/core/include/rv64_pkg.sv @@ -92,4 +92,17 @@ package rv64_pkg; ALU_AND = 4'b0111 // And } alu_op_t; + + // Branch Operation Encoding + // Derived from funct3 of B-type instructions + typedef enum logic [2:0] { + BRANCH_EQ = 3'b000, // BEQ: Branch if Equal + BRANCH_NE = 3'b001, // BNE: Branch if Not Equal + BRANCH_LT = 3'b100, // BLT: Branch if Less Than (signed) + BRANCH_GE = 3'b101, // BGE: Branch if Greater Than or Equal (signed) + BRANCH_LTU = 3'b110, // BLTU: Branch if Less Than (unsigned) + BRANCH_GEU = 3'b111 // BGEU: Branch if Greater Than or Equal (unsigned) + } branch_op_t; + endpackage + |
