Being a fresher, I had a nightmare about 7 years ago, to read and interpret the timing .lib file. I feel others should not suffer the same, so here’s a blog on timing library format basics. My course on “Library characterization and modelling – Part 1” explains every bit of it, in detail. A very important skill needed for STA engineers.
Timing library format:
Here’s an image of a library:
Liberty modeling format is mainly a syntactical collection of below statements:
- Group statements
- Attribute statements
- Define statements
A group statement, as shown above is a collection of other statements. Like, a group of timing and power arc form ‘arc’, a group of arcs form ‘pin’, a group of ‘pins’ form a cell, and a group of ‘cells’ for a library. If this part is clear, then it becomes damn easy to interpret any timing library.
Now attributes, an important part of the static timing analysis or place and route analysis, are classified in various parts, as shown in below image:
In above example, “voltage_unit” is form of library attribute, “area” is a form of cell attribute, “direction” and “function” are forms of pin attribute. There are more than 100’s of attributes for each group. So, an attribute statement is a qualitative description with a keyword-value pair.
These attributes convey an important information to core static timing analysis engine or PNR engine. Why PNR? So there are “cell” attributes like “dont_touch : true” for cells like pads. This conveys the PNR optimization software to not use this cell to optimize core of design
That’s not all, you can create and define your own attributes as well, and that brings me to introduce you the next liberty format basic
This is something needed to customize the library as you wish. I below image, I have created new attribute called “my_job”
For example, a custom attribute “my_job” on “pin” group can be created using following statement:
define (my_job, pin, string)
And then, this attribute can be assigned a string value under “pin” group, which can later be accessed using any timing engine.So, you see, a library file is just a collection of group and attribute statements combined hierarchically. It can’t get any simpler than above.