diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-10-17 01:03:25 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-10-17 01:03:25 -0600 |
| commit | 5079281c8e8889efc2eeba664d93644126006743 (patch) | |
| tree | 7d02022f71cd860caaae9d63f280d19f2d92ddab /rtl/core/fetch | |
| parent | 87c73314d7ce0062b13ae14f376ec50a4653fb18 (diff) | |
Fix data hazards in nzcv and PC increment
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/fetch/fetch.sv | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rtl/core/fetch/fetch.sv b/rtl/core/fetch/fetch.sv index e8c6a9b..c1f150c 100644 --- a/rtl/core/fetch/fetch.sv +++ b/rtl/core/fetch/fetch.sv @@ -20,8 +20,8 @@ module core_fetch ptr next_pc, head, hold_addr; logic fetched_valid, do_flush, discard; - assign do_flush = branch | flush; - assign fetched_valid = fetched & ~discard; + assign do_flush = branch || flush; + assign fetched_valid = fetched && !discard; core_prefetch #(.ORDER(PREFETCH_ORDER)) prefetch ( @@ -40,7 +40,7 @@ module core_fetch if(do_flush) addr = head; - else if(fetched_valid) + else if(fetch && fetched_valid) addr = hold_addr + 1; else addr = hold_addr; |
