Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIRRTL] Fix bug in GCT Taps XMRs #3415

Merged
merged 2 commits into from
Jun 24, 2022
Merged

Conversation

seldridge
Copy link
Member

Fix a bug in Grand Central (GCT) Data/Mem Taps pass where Data Taps
could be produced with invalid XMRs. An exhaustive test case is added
that checks all permutations of upwards and downwards XMRs including
corner cases where the tap module is a leaf and the root.

Fixes #3414.

Signed-off-by: Schuyler Eldridge [email protected]

Fix a bug in Grand Central (GCT) Data/Mem Taps pass where Data Taps
could be produced with invalid XMRs.  An exhaustive test case is added
that checks all permutations of upwards and downwards XMRs including
corner cases where the tap module is a leaf and the root.

Fixes #3414.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge requested a review from youngar June 24, 2022 03:46
Comment on lines -850 to -860
if (port.nla && shortestPrefix->empty() &&
port.nla.root() != rootModule.moduleNameAttr()) {
// This handles the case when nla is not considered for common prefix
// stripping.
auto rootMod = port.nla.root();
for (auto p : path) {
if (rootMod == p->getParentOfType<FModuleOp>().getNameAttr())
break;
addSymbol(getInnerRefTo(p));
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block of code was surprisingly not covered by existing tests after 43035e7. The logic that merged NLA path with the computed instance paths made this unreachable (for the tests we had).

Copy link
Member

@youngar youngar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@seldridge seldridge merged commit 69b3f68 into main Jun 24, 2022
@seldridge seldridge deleted the dev/seldridge/gct-taps-xmrs-fix2 branch June 24, 2022 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIRRTL] GCT Tap Upwards XMR Bug
2 participants