This fixes a AttributeError: 'list' object has no attribute 'args' crash for me when trying to run the DFF characterization.
Fix crash when starting DFF characterization. #16
TholinVali/lctime:main into main
Thanks for the pull request! I'll soon give it a look and probably come back to you tomorrow.
I might come with another proposal for handling the unateness (already started something).
Please note that this pull request was not intended to contain the commits past adding the sky130 example (54791d1383). My bad.
I did find another crash, though, which occurs when a DFF cell does not contain both a preset and clear input. Having only one or none used to crash because a None would pop up, but all possible scenarios should now be fine and handled correctly. This change is meant to be part of the PR.
Okay, thanks for the clarification!
Do you plan to continue work on the unateness thing? Does your version already do the job for you?
My code generates the output required for non-unate cases, but its not particularly pretty is all.
The issue with preset/clear for flip-flops can be solved neatly when preset/clear are set to sympy.false in the case where there is no preset/clear. sympy.false is the actual default value for them but it looks like that got overwritten somewhere.
I tried to fix it in an alternative way. See 396e906077 and 826f6c3b75
Did you run into this issue with the DFF example you propose here? I think needs some testing from my side.
The included DFF example replicates the problem because it has neither a preset or a clear input.
I see you're working on support for inverted outputs of DFFs. I just pushed a suggestion here, based on your first commit on the topic: https://codeberg.org/librecell/lctime/src/branch/dev-dff-inverted-outputs
I did some renaming of arguments to make it easier to understand their purpose (timing_sequential.py).
Then in flipflop.py I added the part to find out if the output is inverted or not regarding the data input. This depends on both, the 'next_state' expression and also the output function.
Good question why there's duplicate code for finding observer outputs :)
Note I had to split my code changes for inverted outputs into two commits, when I decided to merge your changes back into my fork.
I am done with code changes for now and am just going to commit more examples for both combinatorial and sequential cells in the sky130 PDK.
Cool, thank you! :)
Can you manage to include some instructions on how to setup the PDK for running the examples? Or best include the required spice models directly (if they are not too large). That would be great :)
You pretty much have to set up the PDK, since its not just one .spice file, but a whole network of them.
Volare is the PDK version manager that can install the sky130 PDK.
I use the iic-osic-tools docker environment, but it comes with its own installation of lctime, so you’ll need to override that somehow.
Which PDK version are you using ? I tried to set it up with volare, but the most recent version does not contain the combined folder that you use in the examples. Somewhere in your volare directory there is a file current it contains the hash of the PDK. That would be great to know :)
Use the path sky130A/libs.tech/ngspice/sky130.lib.spice tt instead. "combined" appears to be a thing specific to the IIC-tools container which contains shortcuts to various things.
Hi, great to see that lctime is being improved to work with sky130!
The "combined" models are not specific to the IIC-OSIC-tools. They are rather a combination of the discrete and continuous models. The continuous models have been added at a later time to the open PDK and are superior to the discrete models. But they do not cover the complete operating range over various parameters (such as W), thus the combined models were created.
@tok it seems that your version of the PDK is not recent enough.
I have installed the following version of the PDK via volare which contains the combined models.
a918dc7c8e474a99b68c85eb3546b4ed91fe9e7b (2024年10月08日) (enabled)
Thanks @mole99 !
Indeed, with this version the combined folder is there now :)
I'd like to better understand the issue with the DFFs with inverted output. Do you have in mind to characterize both outputs in one go? Or just trying to get it to work at all? :)
Trying to get it to work at all right now. Finally got it, and been using the code in my fork for a few days now.
Pull request closed
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?