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

Preserve origPortRename After Qualifying Direction #246

Merged
merged 1 commit into from Aug 10, 2018
Merged

Conversation

David-Durst
Copy link
Collaborator

This fixes my port renaming between Magma and CoreIR. In some cases, the port returned from port.qualify has the origPortName property stripped from it. This prevents the following line from doing the name mapping (ref.name = port.origPortName). Rather than requiring all qualifies to preserve this property, I'm removing the variable name reuse.

The fact that qualify doesn't preserve all properties shouldn't be a problem as origPortName is made in only one place (https://github.com/phanrahan/magma/blob/master/magma/backend/coreir_.py#L146-L150) and used only here. Therefore, the ports should never be modified in between those two places. Any thoughts on how to guarantee that more strongly?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 897

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.007%

Totals Coverage Status
Change from base Build 895: 0.0%
Covered Lines: 3165
Relevant Lines: 4521

💛 - Coveralls

Copy link
Collaborator

@leonardt leonardt 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

@leonardt leonardt merged commit 96d700a into master Aug 10, 2018
@leonardt leonardt deleted the fix_I_in_rename branch August 10, 2018 17:24
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.

None yet

3 participants