in the pdk
# analog-design
m
in the pdk
y
It's in the liberty file (.lib) with a rise and fall constraint reference from the input to clock
m
thanks!
looking now at sky130A liberty files
can't find a lib for 1.8v
I can find the cell for dfxtp_2
but don't know how to read the setup/hold times from all the info in there
image.png
i think rise and fall constarint are setup and hold
y
Yep, there's also a table which shows the setup/hold time under certain conditions. This should help (p248): https://media.c3d2.de/mgoblin_media/media_entries/659/Liberty_User_Guides_and_Reference_Manual_Suite_Version_2017.06.pdf
m
thanks
I can't understand that LUT table format. Not very well explained in the pdf
atm I'm grepping 'library setup' and 'library hold' from the RUNS directory and getting lines from the opensta report. setup is 70ps and hold is -10ps
sound about right?
y
I think the LUT provides the setup/hold time for a given clock and data transition time
I'm guessing your design has a very low fanout so the transition times will be quite quick. That checks out with what's in the table, 10 ps transition on CLK and D gives 56 ps setup and -29 ps hold. That's a guesstemite, I haven't had to actually decode the LUT by hand before
m
can you explain how you got those numbers?
my clock is transitiioning in about 50ps in the simulation
y
Highlighted in the image below, although I realised I just looked at the rise and not the fall, that may be incorrect
I think the values in the table are linearly interpolated between the indexes
m
ah
so this is with the clock at 0.01ns
why are there 2 indexes?
y
I think one is the clock transition and the other is the data transition
m
well it also fits with what I'm seeing reported in the sta reports and my measurements from a spice sim
did you see this?

https://youtu.be/P2myRgSbD8Qโ–พ

I'm quite pleased with it
I just added 2 draggable vertical lines that can be used to measure time between them
so I can measure TCQ, the add 5%, move line line there, move D into clock untilQ hits the 5% line and then measure the time between 50% D and 50% clk
y
Yeah I did, it's really cool and surprisingly smooth. I tried to play around with it but the dependencies of generating the data caused me to give up before I got the data. I know it goes against the "the outputs in repository" best practice but maybe you provide an example input file in this case?
m
image.png
yeah, was just thinking of adding a zipped data set
what deps didn't you have? it's just a spice file I thought
I think finally I have built some intuition on what's going on in a flop
took a suprisingly long time
OK, I added a .tar.bz to the git which I will probably regret. maybe better to keep it on my shared gdrive
cd flipflop_demo
tar -xf csv.tar.bz2
y
There were a few hardcoded includes that I had to try and find the location on my computer and I had to pull out the FF subcircuit. Nothing insurmountable but I lazily gave up after a while. Awesome, it will be useful for getting up and running quickly.
m
./gui.py
should work
y
It works!
k
vio_3_3_1 keyword in the beginning of the file should tell what those indexes mean
๐Ÿ‘ 1
y
@Kunal that's good to know about the keyword, thanks
k
๐Ÿ‘
m
You really do have a course for everything!
k
๐Ÿ˜Š yes All collection from last 10years
m
๐Ÿ’ฏ