summaryrefslogtreecommitdiff
path: root/rtl/core/control/issue.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-16 16:46:52 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-16 17:55:27 -0600
commit683352ce030923bdef3cf4fe90d6cb73f4f74529 (patch)
tree09bfdff34626fe90a10d93df2c293f7d87763e44 /rtl/core/control/issue.sv
parent14a3611e492d2f213e81c9053bf613a5d8ad30a6 (diff)
Implement psr read/write logic
Diffstat (limited to 'rtl/core/control/issue.sv')
-rw-r--r--rtl/core/control/issue.sv9
1 files changed, 6 insertions, 3 deletions
diff --git a/rtl/core/control/issue.sv b/rtl/core/control/issue.sv
index d124a0d..ffdf250 100644
--- a/rtl/core/control/issue.sv
+++ b/rtl/core/control/issue.sv
@@ -23,7 +23,10 @@ module core_control_issue
next_pc_visible
);
- assign issue = next_cycle.issue && dec.ctrl.execute && !next_bubble && !halt;
+ logic valid;
+
+ assign valid = !next_bubble && !halt;
+ assign issue = next_cycle.issue && dec.ctrl.execute && valid;
assign next_pc_visible = insn_pc + 2;
always_ff @(posedge clk or negedge rst_n)
@@ -32,14 +35,14 @@ module core_control_issue
undefined <= 0;
pc_visible <= 2;
end else if(next_cycle.issue) begin
- if(issue) begin
+ if(valid) begin
undefined <= dec.ctrl.undefined;
`ifdef VERILATOR
if(dec.ctrl.undefined)
$display("[core] undefined insn: [0x%08x] %08x", insn_pc << 2, insn);
- end
`endif
+ end
pc <= insn_pc;
pc_visible <= next_pc_visible;