refactor(prefetch): add a wrapper and parameterization#4443
Closed
Maxpicca-Li wants to merge 12 commits intokunminghu-v3from
Closed
refactor(prefetch): add a wrapper and parameterization#4443Maxpicca-Li wants to merge 12 commits intokunminghu-v3from
Maxpicca-Li wants to merge 12 commits intokunminghu-v3from
Conversation
d06f0c9 to
8552187
Compare
According to RISC-V specification, the least significant 1 or 2 bits (depending on whether the C extension is enabled or not) are hardwired to zero. Therefore, these bits can be pruned to save area. This PR prunes almost all the addresses in the frontend, except those related to the backend. The backend should also use `PrunedAddr` instead of plain `UInt`. Some of these places have been labeled with FIXME or TODO in the code. Apart from this, there are several other things that need attention: * Line 351 of SC.scala appears to have a historical that needs to be fixed. * `>>` of `PrunedAddr` should be removed to avoid confusion. This is mostly used to calculate tags, which can be rewritten as selecting corresponding bits. * Implicit conversion of Scala has been attempted. However, the types of `:=` are not decided until runtime, making `UInt` inevitable. Considering potential confusion, this approach was abandoned. There might be a better way of doing this, especially after backend modifications are merged.
This PR completely refactors the commit mechanism from frontend to backend, addressing the commit problem once and for all. Additionally, these changes are expected to save noticeable area for frontend. The backend now guarantees that every FTQ entry is committed on time, rather than committing only a subset of instructions. To accomplish this, each ROB entry can now compress a maximum of two FTQ entries. As a result, the `commitStateQueue` is no longer needed in the FTQ. During the refactoring process, some historical bugs were identified and fixed. **Attention**: Modifications in the FTQ may lead to a noticeable drop in BP accuracy. Performance data should be checked before merging into master. --------- Co-authored-by: lewislzh <liuzehao19@mails.ucas.ac.cn> Co-authored-by: chengguanghui <wissycgh@gmail.com>
kunminghu v3 does not have `isFused` field after commit mechanism is refactored; use `fusionNum` instead
Re-opened from #4338 & rebased to kunminghu-v3 - move InstrUncache out of package ICache (as it is actually a submodule of Ifu) - each class in a separate file (except Bundles / Utils) - module IO inside module class - extract similar codes and define them as helper functions for reuse - renames: - camel cases - unify bundle naming convention - re-organize IO ~~DO NOT MERGE: should be rebased to #4462~~ -> Done ~~DO NOT MERGE: should rebase `kunminghu-v3` to master to port #4423 #4468~~ -> Done ~~DO NOT MERGE: ... and rebase `refactor-icache` to `kunminghu-v3` again~~ -> Done Ready for review & merge
- each class in a separate file (except Bundles / Utils) - module IO inside module class - extract similar codes and define them as helper functions for reuse - renames: - camel cases - unify bundle naming convention - re-organize IO - add type annotations & `private` modifiers - **(important) rewrite delimitation logic in `PreDecode`**, see [`b7aa772` (#4436)](b7aa772) and [`893f4fb` (#4436)](893f4fb) - apply review suggestions in #4461 (review) ~~DO NOT MERGE: Should be rebased to #4461~~ -> Done Ready for review & merge --------- Co-authored-by: my-mayfly <mayflyandtree@163.com>
1b95e2e to
3fe0eaa
Compare
9864879 to
4b2ae9d
Compare
aea1e18 to
0c29850
Compare
7285bed to
53b3d5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.