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

select: Add new t:@<name> syntax #4626

Merged
merged 2 commits into from
Oct 16, 2024
Merged

select: Add new t:@<name> syntax #4626

merged 2 commits into from
Oct 16, 2024

Conversation

povik
Copy link
Member

@povik povik commented Oct 2, 2024

What are the reasons/motivation for this change?

Sample use case: you identify buffer cells in a standard cell library with the following command (requires #4625)

cellmatch -lut_attrs *
select -set buffers a:lut=2'b10 %m

now you want to see the buffer cells instanced in a design. This new syntax allows you to do

stat t:@buffers

@povik povik requested a review from nakengelhardt October 2, 2024 09:40
@povik
Copy link
Member Author

povik commented Oct 2, 2024

To select instances with types starting with @ one can still do t:\@foo, I checked

@widlarizer
Copy link
Collaborator

widlarizer commented Oct 15, 2024

I'm at my wit's end as to why this wouldn't work, so I pushed the reproducer directly as a test

select -list t:@buffers
# yosys prints top/buf
select -assert-count 0 top/not t:@buffers
# yosys prints:
# ERROR: Assertion failed: selection contains 2 elements instead of the asserted 0: top/not t:@buffers
# Selection contains:
# top/not
# top/buf

Edit: forgot -assert-count only takes the single count argument and not a type argument

@povik povik merged commit 9432e97 into YosysHQ:main Oct 16, 2024
16 checks passed
@povik povik deleted the select-t-at branch October 16, 2024 08:18
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