summaryrefslogtreecommitdiff
path: root/rtl/core/fetch/fetch.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-15 16:31:56 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-15 16:31:56 -0600
commit54fa97814d58f282e2897f8d8a253bcebd52c8ba (patch)
tree32e2d2494bbfe7ea21234c88201e32edcea3a4c8 /rtl/core/fetch/fetch.sv
parent1d08cc6aff97a24bffa5ba5b578c52bb545fc393 (diff)
Mpve combinational logic out of arm810.sv
Diffstat (limited to '')
-rw-r--r--rtl/core/fetch/fetch.sv5
1 files changed, 3 insertions, 2 deletions
diff --git a/rtl/core/fetch/fetch.sv b/rtl/core/fetch/fetch.sv
index 63cb936..acc8e9d 100644
--- a/rtl/core/fetch/fetch.sv
+++ b/rtl/core/fetch/fetch.sv
@@ -6,8 +6,8 @@ module core_fetch
input logic clk,
rst_n,
stall,
- branch,
fetched,
+ explicit_branch,
wr_pc,
prefetch_flush,
input ptr branch_target,
@@ -23,10 +23,11 @@ module core_fetch
);
ptr next_pc, hold_addr, target;
- logic prefetch_ready, fetched_valid, discard, pending, next_pending;
+ logic branch, prefetch_ready, fetched_valid, discard, pending, next_pending;
assign fetch = prefetch_ready && !discard;
assign flush = branch || prefetch_flush;
+ assign branch = explicit_branch || wr_pc;
assign target = wr_pc ? wr_current[31:2] : branch_target; //TODO: alignment exception
assign next_pending = fetch || (pending && !fetched);
assign fetched_valid = fetched && !discard;