diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-15 16:31:56 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-15 16:31:56 -0600 |
| commit | 54fa97814d58f282e2897f8d8a253bcebd52c8ba (patch) | |
| tree | 32e2d2494bbfe7ea21234c88201e32edcea3a4c8 /rtl/core/fetch | |
| parent | 1d08cc6aff97a24bffa5ba5b578c52bb545fc393 (diff) | |
Mpve combinational logic out of arm810.sv
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/fetch/fetch.sv | 5 |
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; |
