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

Allow multiple -liberty args in dfflibmap and clockgate #4797

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

widlarizer
Copy link
Collaborator

@widlarizer widlarizer commented Dec 3, 2024

dfflibmap and clockgate are the only passes which accept a -liberty flag but only once. This requires workarounds for PDKs like asap7 which come in multiple files sharing the same "header" (that is, anything but cells) and having distinct sets of cells. The other commands accepting any number of -liberty arguments are the abc commands and stat. read_liberty is a frontend and therefore fixed to one file per invocation.

In this PR, I'm extending libparse with LibertyMergedCells which steals LibertyAst* out of LibertyParsers before the AST is destroyed when ~LibertyAst is executed. I'm extending tests for both affected commands to cover this functionality. There's a nice extra benefit of deduplicating some sanity checks from passes into LibertyMergedCells.

@widlarizer widlarizer merged commit 3b8e8ee into main Dec 4, 2024
44 checks passed
@KrystalDelusion
Copy link
Member

read_liberty is a frontend and therefore fixed to one file per invocation.

Is that true for all frontends (other than verific which is a special case)? I'm sure I've used read_verilog with multiple files, but maybe that results in multiple calls?

@povik
Copy link
Member

povik commented Dec 5, 2024

I'm sure I've used read_verilog with multiple files, but maybe that results in multiple calls?

I've used read_liberty with multiple files, I think there's external logic to repeatedly call the frontend

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.

4 participants