SDF file is how you represent your circuit delays. We have earlier seen SPEF format which is the circuit’s RC representation. SDF now has the delay numbers derived from these as well as the cell delays associated with the digital cells. SDF or Standard Delay Format is an IEEE specification. SDF is an ASCII format and can include:
1. Delays: module path, device, interconnect, and port
2. Timing checks: setup, hold, recovery, removal, skew, width, period, and nochange
3. Timing constraints: path, skew, period, sum, and diff
4. Timing environment: intended operating timing environment
5. Incremental and absolute delays
6. Conditional and unconditional module path delays and timing checks
7. Design/instance-specific or type/library-specific data
8. Scaling, environmental, and technology parameters
SDFs can be used at any stage in the design flow for an accurate and tool independent representation of circuit delays. In physical design flow, SDF files are used for postlayout simulation & backannotation. The STA tool typically writes out the SDF. This will have both interconnect and cell delay.After P&R you give the following inputs to the STA tool.
- .lib file for cell delays
- SPEF file for extracted parasitics from the layout
- SDC file for timing constraints
The .lib only has the cell delays in a table form, and the SPEF file has the interconnect parasitics. SDF file combines these information and gives out a file that has accurate delays for each component in the layout database, for the given constraints. This is used along with the netlist in a simulator to verify that design meets its functional & timing requirements.
Let us now try to understand the format in detail. I will skip the header section, since it is more or less self explanatory. Make sure you look at the (TIMESCALE
An SDF file typically has a section similar to the one below.
(CELL (CELLTYPE "digital_top") (INSTANCE) (DELAY (ABSOLUTE (INTERCONNECT in1 top/test_reg/D (0.0027::0.0028) (0.0029::0.0030)) (INTERCONNECT top/test_reg/Q chain_reg/D (0.0000::0.0002) (0.0000::0.0003)) ...
The SDF INTERCONNECT construct allows interconnect delays to be specified on a point-to-point basis. This is the most general method of specifying interconnect delay.
The above snippet gives the interconnect delays as calculated by the analysis tool. `in1` is a port (a physical pin in layout) and there is a wire connecting to the D pin of register `top/test_reg`. There are two parentheses next to it,with colon separated values.`(0.0029::0.0028)` corresponds to the delay values when top/test_reg/D makes a 0->1 transition. Similarly the value in the second parenthesis `(0.0029::0.0029)` corresponds to when this port makes a 1->0 transition. (A typical SDF may only have two such groups, but SDF file can have upto 12 delay values, which corresponds to when the ports makes the following transitions. 0->1, 1->0, 0->Z, Z->1, 1->Z, Z->0, 0->X, X->1, 1->X, X->0, X->Z, Z->X)
Inside each of the delay group, we can have a triplet of values, separated by colon.In the example, we only have two.This means the minimum & maximum corner values are written out by the tool.(With typical values missing.It is NOT zero.)
Now, let us see how cell delay information is incorporated in SDF file.
(CELL (CELLTYPE "SDFF") (INSTANCE top/test_reg) (DELAY (ABSOLUTE (IOPATH CLK Q (0.2864::0.2865) (0.3616::0.3617)) (IOPATH CLRZ Q () (0.8764::0.8765)) ) ) (TIMINGCHECK (RECREM (posedge CLRZ) (posedge CLK) (0.1540::0.1540) (0.1961::0.1961)) (SETUPHOLD (posedge D) (posedge CLK) (0.5805::0.5805) (-0.1512::-0.1512)) (SETUPHOLD (negedge D) (posedge CLK) (0.8792::0.8792) (-0.1725::-0.1725)) (WIDTH (posedge CLK) (0.3692::0.3692)) (WIDTH (negedge CLRZ) (0.3975::0.3975)) ) )
Let us take the DELAY statement from the above. There are two IOPATHs defined. The `CLK->Q` delay and the `CLRZ-Q` delay of the cell. See that the first parenthesis is empty for `CLRZ->Q` path delay. This means `0->1` values are not specified and might not even be present in the timing model(.lib).
We also have a TIMINGCHECK section above. Timing check entries specify limits in the way in which a signal can change or two signals can change in relation to each other for reliable circuit operation. EDA analysis tools use this information in different ways:
- Simulation tools issue warnings about signal transitions that violate timing checks.
- Timing analysis tools identify delay paths that might cause timing check violations and may determine the constraints for those paths.
Take `(SETUPHOLD (posedge D) (posedge CLK) (0.5805::0.5805) (-0.1512::-0.1512))`
The syntax for SETUPHOLD timingcheck statement is `( SETUPHOLD port_tchk port_tchk rvalue rvalue )`
The first port_tchk is `(posedge D)`,and identifies the data port D. Since there is a posedge specification, this value is for posedge transition at D.`(posedge CLK)` identifies the clock port and identifies posedge as the active transition edge.The first rvale `(0.5805::0.5805)` gives the SETUP time.The second rvale `(-0.1512::-0.1512)` gives the hold time.Either can be negative, however their sum must be greater than zero.
The WIDTH entry specifies limits for a minimum pulse width timing check.
`(WIDTH (posedge CLK) (0.3692::0.3692))` gives the min & max minimum width required of the clock CLK from its positive edge. We can also have a similar statement for `(negedge CLK)`.
There is another common statement which is COND. The COND construct allows any path delay to be made conditional, that is, its value applies only when the specified condition is true.This allows for state-dependency of path delays where the path appears more than once in the timing model with conditions to identify the circuit state when it applies.Annotator must locate a path delay with a condition matching the one specified and apply the data only to that. Other path delays from the same input port to the same output port but with different conditions in the timing model will not receive the data.
`(COND A&&!B (IOPATH S Y (0.7427::0.7427) (0.6942::0.6942)))`
The Path delay from S->Y is the given values only when the condition A&&!B is matched. i.e. the example below gives the different delays the MUX has depending on which signal is being selected.
(CELL (CELLTYPE "MUX") (INSTANCE U346) (DELAY (ABSOLUTE (IOPATH A Y (0.4768::0.4845) (0.5036::0.5187)) (IOPATH B Y (0.6201::0.6201) (0.6646::0.6646)) (IOPATH S Y (0.5066::0.8544) (0.6456::0.6942)) (COND A&&!B (IOPATH S Y (0.7427::0.7427) (0.6942::0.6942))) (COND !A&&B (IOPATH S Y (0.5066::0.8544) (0.6456::0.6505))) ) ) )
COND statements can be used as part of TIMINGCHECKS as well. You may encounter those in your SDFs.
This just starts you off with understanding the SDF file you use for postlayout simulations, and these are the most common statements you encounter in the file.