From 8ef44b0a6c733ff972e5a3597d9bd889ce9fab74 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Fri, 2 Jul 2021 16:41:35 +0100 Subject: [PATCH] Workaround single step wedges by not waiting for flush before halting --- src_Core/CPU/Core.bsv | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src_Core/CPU/Core.bsv b/src_Core/CPU/Core.bsv index d40ef31..f70cd15 100644 --- a/src_Core/CPU/Core.bsv +++ b/src_Core/CPU/Core.bsv @@ -857,9 +857,6 @@ module mkCore#(CoreId coreId)(Core); `endif // SELF_INV_CACHE rule readyToFetch( -`ifdef INCLUDE_GDB_CONTROL - (rg_core_run_state == CORE_RUNNING) && -`endif !flush_reservation && !flush_tlbs && !update_vm_info && iTlb.flush_done && dTlb.flush_done `ifdef SECURITY_OR_INCLUDE_GDB_CONTROL @@ -875,16 +872,19 @@ module mkCore#(CoreId coreId)(Core); `endif ); fetchStage.done_flushing(); + endrule `ifdef INCLUDE_GDB_CONTROL - if (commitStage.is_debug_halted) begin - started <= False; - rg_core_run_state <= CORE_HALTING; - if (verbosity >= 1) - $display ("%0d: %m.rule readyToFetch: halting for debug mode", cur_cycle); - end -`endif + rule readyToHalt( + (rg_core_run_state == CORE_RUNNING) && + commitStage.is_debug_halted + ); + started <= False; + rg_core_run_state <= CORE_HALTING; + if (verbosity >= 1) + $display ("%0d: %m.rule readyToHalt: halting for debug mode", cur_cycle); endrule +`endif `ifdef PERF_COUNT // incr cycle count