8000 [FIRRTL] InferResets: properly lower FART'd registers by youngar · Pull Request #7680 · llvm/circt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[FIRRTL] InferResets: properly lower FART'd registers #7680

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

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

youngar
Copy link
Member
@youngar youngar commented Oct 8, 2024

This is quick fix for #7675.

The way this is supposed to work is, FRT is not supposed to add a reset if a register already has one, but it isn't smart enough to understand that an invalid value corresponds to a register without a reset. As a result, it will not add a reset to this register. Later on, in SFCCompat, when choosing how to lower the Invalid value, it should "see" that the registers should all have a reset, by looking for the FRT annotation, and choose to lower the reset value to 0 or remove the reset accordingly. The "bug" is that the FRT annotation on a parent module won't be discovered on the child module.

This attaches the annotation on to every module in a reset domain, so that it can be found.

This is quick fix for llvm#7675.

The way this is supposed to work is, FRT is not supposed to add a reset
if a register already has one, but it isn't smart enough to understand
that an invalid value corresponds to a register without a reset. As a
result, it will not add a reset to this register. Later on, in
SFCCompat, when choosing how to lower the Invalid value, it should "see"
that the registers should all have a reset, by looking for the FRT
annotation, and choose to lower the reset value to 0 or remove the reset
accordingly. The "bug" is that the FRT annotation on a parent module
won't be discovered on the child module.

This attaches the annotation on to every module in a reset domain, so
that it can be found.
@youngar youngar added the FIRRTL Involving the `firrtl` dialect label Oct 8, 2024
Copy link
Contributor
@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks Andrew!

@youngar youngar merged commit e76d264 into llvm:main Oct 8, 2024
4 checks passed
@youngar youngar deleted the firrtl-fullresettransform branch October 8, 2024 05:36
@llvm llvm deleted a comment from saikmaddali Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0