https://open-source-silicon.dev logo
m

Matt Venn

01/23/2022, 2:28 PM
in the pdk
y

yrrapt

01/23/2022, 2:32 PM
It's in the liberty file (.lib) with a rise and fall constraint reference from the input to clock
m

Matt Venn

01/23/2022, 2:35 PM
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

yrrapt

01/23/2022, 2:52 PM
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

Matt Venn

01/23/2022, 3:00 PM
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

yrrapt

01/23/2022, 3:08 PM
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

Matt Venn

01/23/2022, 3:16 PM
can you explain how you got those numbers?
my clock is transitiioning in about 50ps in the simulation
y

yrrapt

01/23/2022, 3:21 PM
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

Matt Venn

01/23/2022, 3:21 PM
ah
so this is with the clock at 0.01ns
why are there 2 indexes?
y

yrrapt

01/23/2022, 3:22 PM
I think one is the clock transition and the other is the data transition
m

Matt Venn

01/23/2022, 3:23 PM
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

yrrapt

01/23/2022, 3:32 PM
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

Matt Venn

01/23/2022, 3:33 PM
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

yrrapt

01/23/2022, 3:41 PM
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

Matt Venn

01/23/2022, 3:41 PM
./gui.py
should work
y

yrrapt

01/23/2022, 3:43 PM
It works!
k

Kunal

01/23/2022, 4:44 PM
vio_3_3_1 keyword in the beginning of the file should tell what those indexes mean
👍 1
y

yrrapt

01/23/2022, 5:09 PM
@Kunal that's good to know about the keyword, thanks
k

Kunal

01/23/2022, 5:23 PM
👍
m

Matt Venn

01/23/2022, 5:53 PM
You really do have a course for everything!
k

Kunal

01/23/2022, 6:04 PM
😊 yes All collection from last 10years
m

Matt Venn

01/23/2022, 6:04 PM
💯