8000 Fix linking parameterized hierarchical blocks and recursive hierarchical blocks by donlon · Pull Request #4654 · verilator/verilator · GitHub
[go: up one dir, main page]

Skip to content

Fix linking parameterized hierarchical blocks and recursive hierarchical blocks #4654

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 6 commits into from
Nov 3, 2023

Conversation

donlon
Copy link
Contributor
@donlon donlon commented Nov 1, 2023

Parameterized hierarchical blocks without parameter overrides didn't link to the correct module (the library wrapper) during parameterization, instead it's the original module. It's because m_hierBlocks.findByParams is not used to find the modules if any_overrides is false.

Recursive hierarchical blocks also failed to link to the correct modules because it search the modules with the mangled name. Now it uses its original name, to make it work properly.

@donlon donlon changed the title Fix using parameterized hierarchical blocks and recursive hierarchical blocks Fix linking parameterized hierarchical blocks and recursive hierarchical blocks Nov 1, 2023
Copy link
Member
@wsnyder wsnyder left a comment

Choose a reason for hiding this comment

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

Can you please update the hier tests to use an escaped identifier and show the problem that this fixes?

@donlon
Copy link
Contributor Author
donlon commented Nov 2, 2023

Can you please update the hier tests to use an escaped identifier and show the problem that this fixes?

The problem (for recursive blocks) was that it sometime failed to find the library wrapper, with the mangled name, but recursive cells was linked to the Vrcm module so it creates a wrong name containing "__Vrcm", later m_hierBlocks.isHierBlock will fail to find the wrapper.

An assertion is now added (here). It assures that the library wrappers must be linked.

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.

2 participants
0