fix(ICache,ITLB): also flush itlb pipe when prefetchPipe s1_flush #3996
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ITLB does not store
gpaddr
to save resources, instead it takesgpaddr
from L2TLB when gpf occurs, which poses a two-option requirement for the requestor (i.e. IPrefetchPipe):itlb.io.req.vaddr
untilitlb.io.resp.miss
is pulled downitlb.io.flushPipe
Otherwise, ITLB is unable to handle the next gpf and the core hangs.
However, the first point cannot be guaranteed during the speculative execution, as IPrefetchPipe sends request to ITLB at s0 stage and may receive a flush request from BPU s3 stage, IFU or Backend at s1 stage, then the same vaddr is never resend to ITLB.
Therefore, we must ensure that ITLB is flushed synchronously when IPrefetchPipe s1 stage is flushed, thus satisfying the second point. This PR implements this.