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

Add parameter to not filter out blackboxes in selected_modules and selected_whole_modules #4565

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RCoeurjoly
Copy link
Contributor

@RCoeurjoly RCoeurjoly commented Aug 26, 2024

What are the reasons/motivation for this change?
The select command in Yosys includes an option that allows patterns to match black/white-box modules or their contents by prefixing the pattern with =. This is documented here:

By default, patterns will not match black/white-box modules or their
contents. To include such objects, prefix the pattern with '='.

However, the method RTLIL::Design::selected_modules() filters out blackboxes, so adding a = to a pattern does nothing.

Explain how this is achieved.
We add a include_bw_box parameter that defaults to false to RTLIL::Design::selected_modules() and RTLIL::Design::selected_whole_modules().

If applicable, please suggest to reviewers how they can test the change.

Discarded options

Unconditionally selecting blackboxes

That would break some passes, like opt.

Adding a -blackbox flag to cutpoint

#4566

@RCoeurjoly RCoeurjoly marked this pull request as draft August 26, 2024 07:46
…odules (default is false). Set that parameter to true in cutpoint and attrmap. Add test
@RCoeurjoly RCoeurjoly changed the title Do not filter out blackboxes in selected_modules and selected_whole_modules Add option to not filter out blackboxes in selected_modules and selected_whole_modules Aug 28, 2024
@RCoeurjoly RCoeurjoly changed the title Add option to not filter out blackboxes in selected_modules and selected_whole_modules Add parameter to not filter out blackboxes in selected_modules and selected_whole_modules Aug 28, 2024
@RCoeurjoly RCoeurjoly requested a review from povik August 28, 2024 16:46
@RCoeurjoly RCoeurjoly marked this pull request as ready for review August 28, 2024 16:47
@RCoeurjoly RCoeurjoly marked this pull request as draft September 3, 2024 09:52
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.

1 participant