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.
This commit is contained in:
Jonathan Woodruff
2022-02-16 12:23:05 +00:00
parent 4961d321b9
commit 2b9ebb5b40

View File

@@ -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