summaryrefslogtreecommitdiff
path: root/rtl/core/fetch/fetch.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-12-07 19:18:04 -0600
committerAlejandro Soto <alejandro@34project.org>2022-12-07 19:51:41 -0600
commitc39552375661e495b344e8386649ade92a4d45b2 (patch)
tree45623ce35964e43ae7d8804c1ef1c6dedb3ba7a1 /rtl/core/fetch/fetch.sv
parentb1761b8eac5777c09723bbc8cd31cc05d8ec35ae (diff)
Implement single-stepping
Diffstat (limited to '')
-rw-r--r--rtl/core/fetch/fetch.sv6
1 files changed, 4 insertions, 2 deletions
diff --git a/rtl/core/fetch/fetch.sv b/rtl/core/fetch/fetch.sv
index acc8e9d..c024e7d 100644
--- a/rtl/core/fetch/fetch.sv
+++ b/rtl/core/fetch/fetch.sv
@@ -11,18 +11,20 @@ module core_fetch
wr_pc,
prefetch_flush,
input ptr branch_target,
+ porch_insn_pc,
input word wr_current,
fetch_data,
output logic fetch,
flush,
+ nop,
output word insn,
output ptr insn_pc,
addr,
fetch_head
);
- ptr next_pc, hold_addr, target;
+ ptr hold_addr, target;
logic branch, prefetch_ready, fetched_valid, discard, pending, next_pending;
assign fetch = prefetch_ready && !discard;
@@ -44,7 +46,7 @@ module core_fetch
if(branch)
fetch_head = target;
else if(prefetch_flush)
- fetch_head = next_pc;
+ fetch_head = porch_insn_pc;
else
fetch_head = {30{1'bx}};