Introduction

This document describes the "SDF API". It is an extension to the Database API and bases on the Tcl command sdf $db.

Overview

The sdf command links an SDF file to an existing database or extracts timings for a given OID.

  • sdf $db link ?-portdirupdate? ?-topInstName name? $filename

  • sdf $db getTiming $signal|$inst $filter1 $filter2

sdf $db link ?-portdirupdate? ?-topInstName name? $filename

Links a given SDF file to the matching top module of the given database. As the SDF timings are not copied to the database, the SDF file must be present when timings are extracted with the sdf $db getTiming command.

Parameters

  • $db - the database containing the module to connect with.

  • $filename - the filename of an SDF file to link with the database.

  • -portdirupdate - optional switch to reconstruct port directions of instances in the database from an SDF file. As proper port directions are needed to extract valid timings, this is strongly recommended for designs with unknown port directions (e.g. if no cell-library is provided).

  • -topInstName - optional argument to set the name of the top instance.

Results

If executed without error, additional spos items described in the SDF file are created in the database. They can be extracted by $db spos commands or are used by the sdf $db getTiming command to extract timing information.

Access SDF Timing Info from Database

sdf $db getTiming $OID $filter1 $filter2

Gets SDF timing information for a given OID (must be either a signal or an instance).

Parameters

  • $db - the Database containing the module.

  • $OID - the OID the timing shall be extracted for; must be either a signal OID or an instance OID.

  • $filter1 - one of Delay, PulseR or PulseX. Depending of the option provided, delay-, pulse-rejection-limit- or X-filter-limit-values are extracted.

  • $filter2 - one of Min, Typ or Max, determining the process factor for which the timings shall be extracted.

Results if $OID is a Signal

If executed without error, a list of triplets (source OID \+ target OID + timing table) is created:

$sig_tim := $src_oid_1 $trg_oid_1 $time_table_1 \
            $src_oid_2 $trg_oid_2 $time_table_2 \
            [...] \
            $src_oid_n $trg_oid_n $time_table_n
  • $src_oid_x - OID of source for path "x"

  • $trg_oid_x - OID of target for path "x"

  • $time_table_x - timing table for path "x"

Timing table $time_table is a Tcl list of 12 tuples (value + type):

$time_table := $value_1 $type_1 \
               $value_2 $type_2 \
               [..] \
               $value_12 $type_12
  • $value_x - delay value of transition "x"; or - if no value is given.

  • $type_x - type of value. t if the value is explicitly given in the SDF file, c if it’s a calculated value not explicitly given in the SDF file.

Each tuple represents the timing of a transition as described in IEEE 1497-2001, page 30:

Tuple # Transition

1

0 → 1

2

1 → 0

3

0 → Z

4

Z → 1

5

1 → Z

6

Z → 0

7

0 → X

8

X → 1

9

1 → X

10

X → 0

11

X → Z

12

Z → X

Results if $OID is an Instance

If executed without error, a list of two lists is created.

$inst_tim := $port_tim $io_tim
  • $port_tim - Tcl list of port delays

  • $io_tim - Tcl list of IO path delays

A port delay list $port_tim is a Tcl list of tuples (pin OID + timing table):

$port_tim := $pin_oid_1 $time_table_1 \
             $pin_oid_2 $time_table_2 \
             [...] \
             $pin_oid_n $time_table_n
  • $pin_oid_x - pin OID of actual instance.

  • $time_table_x - timing table as described in the previous results section.

An IO path delay list is a Tcl list of triplets (source-pin OID + target-pin OID + conditional timing list):

$io_tim := $src_oid_1 $trg_oid_1 $cond_tim_1 \
           $src_oid_2 $trg_oid_2 $cond_tim_2 \
           [...] \
           $src_oid_n $trg_oid_n $cond_tim_n
  • $src_oid_x - OID of source for path "x"

  • $trg_oid_x - OID of target for path "x"

  • $cond_tim_x - conditional timing list

A conditional timing list $cond_tim_x is a Tcl list of tuples (timing table + condition):

$cond_tim := $time_table_1 $condition_1 \
             $time_table_2 $condition_2 \
             [...] \
             $time_table_n $condition_n
  • $time_table_x - timing table as described in the previous results section.

  • $condition_x - Tcl string describing the condition under which the corresponding $time_table_x is valid.