Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mikeurbach
Copy link
Contributor

This turns the multiple-instantiation error into a warning in ResolvePaths and LowerClasses. In real designs coming from Chisel today, we are not yet able to enforce single instantiation. This was never a requirement of the original way that we handled hierarchical paths in EmitOMIR, so this removes the requirement for now. Adding it back is tracked in #7128.

With this change, the ResolvePaths logic was simplified to stop trying to disambiguate paths in some cases, and instead allow the annotations to simply convey the user's requested local or hierarchical path. In LowerClasses, if there are multiple instances, this means we have ambiguity. In practice, this logic will produce the same outputs as EmitOMIR, once we fix #7125.

This turns the multiple-instantiation error into a warning in
ResolvePaths and LowerClasses. In real designs coming from Chisel
today, we are not yet able to enforce single instantiation. This was
never a requirement of the original way that we handled hierarchical
paths in EmitOMIR, so this removes the requirement for now. Adding it
back is tracked in #7128.

With this change, the ResolvePaths logic was simplified to stop trying
to disambiguate paths in some cases, and instead allow the annotations
to simply convey the user's requested local or hierarchical path. In
LowerClasses, if there are multiple instances, this means we have
ambiguity. In practice, this logic will produce the same outputs as
EmitOMIR, once we fix #7125.
Copy link
Contributor

@prithayan prithayan left a comment

Choose a reason for hiding this comment

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

Looks good, If I understand this correctly, seems like we will never hit the ambiguous path case in the current designs.

@mikeurbach
Copy link
Contributor Author

We can have ambiguous paths, but it doesn't affect anything until we fix #7125. But in that change (#7130) it's at least possible to handle it in a way that produces the same output in the properties flow as EmitOMIR does.

@mikeurbach mikeurbach merged commit 06ca849 into main Jun 4, 2024
@mikeurbach mikeurbach deleted the mikeurbach/path-check-simplification branch June 4, 2024 23:59
mikeurbach added a commit that referenced this pull request Sep 5, 2024
This was made a warning in #7129. In
reality, the flows can fail during LowerClasses if we do allow this
through, so this adds back the previous restrictions so we ensure from
the start that we have unambiguous paths.
mikeurbach added a commit that referenced this pull request Sep 5, 2024
This was made a warning in #7129. In
reality, the flows can fail during LowerClasses if we do allow this
through, so this adds back the previous restrictions so we ensure from
the start that we have unambiguous paths as originally intended.

Closes #7128.
mikeurbach added a commit that referenced this pull request Sep 5, 2024
This was made a warning in #7129. In
reality, the flows can fail during LowerClasses if we do allow this
through, so this adds back the previous restrictions so we ensure from
the start that we have unambiguous paths as originally intended.

Closes #7128.
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] LowerClasses doesn't actually copy the leading part of the path from the owning module to the start of the NLA

2 participants