aboutsummaryrefslogtreecommitdiff
path: root/core/pkg
diff options
context:
space:
mode:
authorJoshua Yun <joshua@joshuayun.com>2025-03-25 00:29:30 -0500
committerJoshua Yun <joshua@joshuayun.com>2025-03-25 00:29:30 -0500
commit86021b3616c24efe38d8869b45d201bf24fe9a07 (patch)
tree445ec3b30de9451604f12c96c18fdbb975fbaf66 /core/pkg
parent6bd9f4f7ab48576d3fda98bef915162a7436866d (diff)
downloadriscv-processor-86021b3616c24efe38d8869b45d201bf24fe9a07.tar.gz
feat: initial completion of decode stage, fix: removed hardcoded path for riscv assembly files in TB
Diffstat (limited to 'core/pkg')
-rw-r--r--core/pkg/riscv_types.sv24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/pkg/riscv_types.sv b/core/pkg/riscv_types.sv
index 3d68331..48ca87b 100644
--- a/core/pkg/riscv_types.sv
+++ b/core/pkg/riscv_types.sv
@@ -11,4 +11,28 @@ package riscv_types;
INSTR_TYPE_REG = 7'b0110011, // R arith ops with register operands
INSTR_TYPE_CSR = 7'b1110011 // I control and status register
} opcode_t;
+
+ typedef enum logic [1:0] {
+ MEM_OP_LOAD,
+ MEM_OP_STORE,
+ MEM_OP_NONE
+ } mem_op_t;
+
+ typedef enum logic [1:0] {
+ REG_IMM_OFFSET,
+ PC_IMM_OFFSET,
+ OFFSET_NONE
+ } brjmp_op_t;
+
+ typedef enum logic [1:0] {
+ RS1,
+ PC,
+ OP_NONE
+ } aluSelOp1_t;
+
+ typedef enum logic {
+ RS2,
+ IMM
+ } aluSelOp2_t;
+
endpackage