From 2b9ebb5b40fcc97875925b395c3fe1df5ce60d47 Mon Sep 17 00:00:00 2001 From: Jonathan Woodruff Date: Wed, 16 Feb 2022 12:23:05 +0000 Subject: [PATCH] Ugly hack to avoid redirection epoch from being killed by the killAll. Commit stage redirections are post-prediction and should need to somehow be treated specially in the SpecFifo for epochs in the fetch stage. They are post-commit, so should be unkillable somehow. I guess SpecFifos are not meant to hold post-commit state currently. --- src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv b/src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv index bf17561..f293d13 100644 --- a/src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv +++ b/src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv @@ -538,6 +538,7 @@ module mkCommitStage#(CommitInput inIfc)(CommitStage); Bool pauseCommit = isValid(commitTrap) || inIfc.pauseCommit; FIFO#(RedirectInfo) redirectQ <- mkFIFO; + FIFO#(RedirectInfo) redirectQ2 <- mkFIFO; // Nasty hack to avoid killAll killing the epoch change in the Fetch stage. // maintain system consistency when system state (CSR) changes or for security function Action makeSystemConsistent(Bool flushTlb, @@ -1364,8 +1365,13 @@ module mkCommitStage#(CommitInput inIfc)(CommitStage); `endif endrule + rule pre_pass_redirect; + redirectQ2.enq(redirectQ.first); + redirectQ.deq; + endrule + rule pass_redirect; - RedirectInfo ri <- toGet(redirectQ).get; + RedirectInfo ri <- toGet(redirectQ2).get; inIfc.redirectPc(ri.trap_pc, 0 `ifdef RVFI_DII , ri.dii_pid