read_liberty: support loopy retention cells #5496
Open
+417
−101
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.
Fixes #5491. Retention cells seem to be advanced PDK cells that allow retention of flop state, usually while the main power domain is off. Balloon retention cells loop the output of a DFFSR through a latch to its input. For this reason, to construct them correctly in
read_liberty, we have to createlatchandffgroup state wires before we build the logic that models them.Additionally, to test this change, this PR modifies
filterlib -verilogsimto avoid emitting unsynthesizable verilog when possible. This is possible whenever bothclear_preset_var*are defined as either low or high by emitting a process for either state variable separately and adjusting the precedence of clear and preset.This allowed me to cover the new functionality with
tests/liberty/read_liberty.yswhich proves equivalence between the cell model forretention.libcreated byread_libertyand byfilterlib -verilogsim.