feat(MMU): add ptehelper support#6115
Open
fuhuakai wants to merge 3 commits into
Open
Conversation
c05f99e to
6afd69f
Compare
Emu - Performance SummaryMetadata
IPC Report
|
Update the difftest submodule to the ptehelper DPI model used by the MMU simulation helper. The bumped difftest commit provides the PTEHelper Verilog wrapper, the pte_helper C++ walk model, PBMT and NAPOT fault handling, and TLB checker diagnostic output needed by the matching RTL change. This commit only updates the submodule gitlink. The actual RTL support is added in the next commit.
Add ptehelper as a DPI-C backed ideal translation path for MMU simulation studies. The feature can bypass selected hardware translation structures and use a software page-table walk model to evaluate the MMU translation performance upper bound. softTLB replaces the L1 TLB storage with TLBFakeFA. The fake storage returns a registered helper result on the cycle after a valid request when translation is enabled, and it does not take the normal TLB miss and refill path. softPTW replaces the normal L2TLB implementation at the L2TLBWrapper boundary with FakePTW. From the L1 TLB side this bypasses the L2TLB, page-table cache, and PTW miss path, while still returning the normal L2TLBIO response format. Add PTEHelper, PteHelperResult, and shared response builders so the softTLB and softPTW paths use the same PPN, permission, PBMT, NAPOT, and stage-fault construction. The helper covers Sv39, Sv48, Sv39x4, Sv48x4, PBMTE-gated PBMT checks, and two-stage translation results. The softPTW path also avoids instantiating the normal PTW-to-L2 buffer module in the reset tree when the normal L2TLB path is disabled. The feature is controlled by the existing softTLB and softPTW fields in core parameters. Both flags stay disabled by default. Validated with rvh-test using softTLB and softPTW modes. Both modes pass all rvh-test cases, including PBMT tests.
Rename the misspelled EnbaleTlbDebug parameter and its users to EnableTlbDebug. This keeps the debug switch name readable without changing the generated logic.
6afd69f to
510d9ce
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.
Add ptehelper as a DPI-C backed ideal translation path for MMU
simulation studies. The feature can bypass selected hardware
translation structures and use a software page-table walk model to
evaluate the MMU translation performance upper bound.
softTLB replaces the L1 TLB storage with TLBFakeFA. The fake storage
returns a registered helper result on the cycle after a valid request
when translation is enabled, and it does not take the normal TLB miss
and refill path.
softPTW replaces the normal L2TLB implementation at the L2TLBWrapper
boundary with FakePTW. From the L1 TLB side this bypasses the L2TLB,
page-table cache, and PTW miss path, while still returning the normal
L2TLBIO response format.
Add PTEHelper, PteHelperResult, and shared response builders so the
softTLB and softPTW paths use the same PPN, permission, PBMT, NAPOT,
and stage-fault construction. The helper covers Sv39, Sv48, Sv39x4,
Sv48x4, PBMTE-gated PBMT checks, and two-stage translation results.
The softPTW path also avoids instantiating the normal PTW-to-L2 buffer
module in the reset tree when the normal L2TLB path is disabled.
The feature is controlled by the existing softTLB and softPTW fields in
core parameters. Both flags stay disabled by default.
Without enabling softtlb/softptw, it will not affect any of the original hardware logic.
Validated with rvh-test using softTLB and softPTW modes. Both modes
pass all rvh-test cases, including PBMT tests.