summaryrefslogtreecommitdiff
path: root/rtl/core/decode
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-10-23 23:43:37 -0600
committerAlejandro Soto <alejandro@34project.org>2022-10-23 23:43:37 -0600
commit0374ac313e850d2356e36bd42df59846df3111f7 (patch)
treebf41d22bbf3fcec3a87c7ff780f42b20ba0c45b6 /rtl/core/decode
parent642f1480854fa60c71dd06cb57c29fee0b3504e9 (diff)
Pack general control signals as struct datapath_decode
Diffstat (limited to 'rtl/core/decode')
-rw-r--r--rtl/core/decode/decode.sv32
1 files changed, 18 insertions, 14 deletions
diff --git a/rtl/core/decode/decode.sv b/rtl/core/decode/decode.sv
index da244c1..2740b70 100644
--- a/rtl/core/decode/decode.sv
+++ b/rtl/core/decode/decode.sv
@@ -3,20 +3,25 @@
module core_decode
(
- input word insn,
- input psr_flags flags,
-
- output logic execute,
- conditional,
- undefined,
- writeback,
- update_flags,
- output branch_decode branch_ctrl,
- output snd_decode snd_ctrl,
- output data_decode data_ctrl,
- output ldst_decode ldst_ctrl
+ input word insn,
+ input psr_flags flags,
+
+ output datapath_decode ctrl,
+ output branch_decode branch_ctrl,
+ output snd_decode snd_ctrl,
+ output data_decode data_ctrl,
+ output ldst_decode ldst_ctrl
);
+ logic execute, undefined, conditional, writeback, update_flags, branch;
+
+ assign ctrl.execute = execute;
+ assign ctrl.undefined = undefined;
+ assign ctrl.conditional = conditional;
+ assign ctrl.writeback = writeback;
+ assign ctrl.update_flags = update_flags;
+ assign branch_ctrl.branch = branch;
+
//TODO
logic restore_spsr;
@@ -43,8 +48,7 @@ module core_decode
.*
);
- logic branch, branch_link;
- assign branch_ctrl.branch = branch;
+ logic branch_link;
core_decode_branch group_branch
(