From 7bc17965b683e6188ccb1c2c1b87e707cb071b6c Mon Sep 17 00:00:00 2001 From: Jonathan Woodruff Date: Tue, 20 May 2025 14:54:27 +0100 Subject: [PATCH] Give commit redirect priority over branch/execute redirect. --- src_Core/CPU/Core.bsv | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src_Core/CPU/Core.bsv b/src_Core/CPU/Core.bsv index ee84408..63a66ff 100644 --- a/src_Core/CPU/Core.bsv +++ b/src_Core/CPU/Core.bsv @@ -337,6 +337,8 @@ module mkCore#(CoreId coreId)(Core); endinterface); MMIOCore mmio <- mkMMIOCore(mmioInIfc); + PulseWire commitRedirect <- mkPulseWire; + // fix point module to instantiate other function units module mkCoreFixPoint#(CoreFixPoint fix)(CoreFixPoint); // spec update @@ -420,7 +422,7 @@ module mkCore#(CoreId coreId)(Core); method setRegReadyAggr = writeAggr(aluWrAggrPort(i)); interface sendBypass = sendBypassIfc; method writeRegFile = writeCons(aluWrConsPort(i)); - method Action redirect(CapMem new_pc, SpecTag spec_tag, InstTag inst_tag, SpecBits spec_bits); + method Action redirect(CapMem new_pc, SpecTag spec_tag, InstTag inst_tag, SpecBits spec_bits) if (!commitRedirect); if (verbose) begin $display("[ALU redirect - %d] ", i, fshow(new_pc), "; ", fshow(spec_tag), "; ", fshow(inst_tag)); @@ -526,6 +528,7 @@ module mkCore#(CoreId coreId)(Core); interface memExeIfc = memExe; method Action killAll; globalSpecUpdate.incorrectSpec(True, ?, ?, 0); + commitRedirect.send(); endmethod interface doStatsIfc = doStatsReg; method pendingIncorrectSpec = globalSpecUpdate.pendingIncorrectSpec;