-
Notifications
You must be signed in to change notification settings - Fork 906
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
clockgate: add -liberty #4744
clockgate: add -liberty #4744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to convert all cases in which we are confident the ICG attributes are malformed into warnings, and in all other cases ignore the cell and possibly explain with a print. Oftentimes people can't share the Liberty file with us easily, so we should relax what's acceptable.
Other than that I leave some suggestions on simplifying the code.
I think what we need is errors that are suppressable as a new category of logging event, in addition to the non-suppressable errors that we have now. I want to terminate and tell the user to fix their Liberty file, and still give them the power to just cope with it otherwise |
Is there a reason this uses lines like |
Integrated clock gating cells (ICGs) are ASIC cells designed as part of PDKs and they are described in Liberty files. To avoid requiring per-PDK hacks to PDK-agnostic scripts, instead of requiring in the invocation a specification of a concrete ICG cell name and its interface, this PR allows the user to use
-liberty <filename>
argument for theclockgate
command and automatically selects the most suitable ICGs described in<filename>
. A suitable cell is one with matching clock polarity, a reasonable interface based on the Liberty Reference Manual (refer to pin attributesclock_gate_...
and cell attributeclock_gating_integrated_cell
). Most suitable cells are those with the fewest scan/test inputs to tie low and smallest area. Using existing current libparse, I use logic similar to that indfflibmap.cc
to find these cells and interfaces.This PR also assumes all test inputs are to be tied low and all enables are active high. I've tested it manually with asap7 and sky130hd to behave as expected