Allow multiple -liberty args in dfflibmap and clockgate #4797
+327
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dfflibmap
andclockgate
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 andstat
.read_liberty
is a frontend and therefore fixed to one file per invocation.In this PR, I'm extending libparse with
LibertyMergedCells
which stealsLibertyAst*
out ofLibertyParser
s 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 intoLibertyMergedCells
.I intend to create an OpenROAD flow scripts PR later to demonstrate this functionality.