timing_graph¶
SDF Timing Graph Generation Module.
This module provides functionality to parse SDF files and generate timing directed graphs using NetworkX.
Functions¶
|
Determine the delay value from a delay dictionary. |
|
Generate a timing directed networkx graph (DiGraph) from the SDF file. |
|
Parse the SDF file to extract INTERCONNECT and IOPATH components. |
|
Separate instance and pin from a hierarchical name. |
Module Contents¶
- delay_type(delay_paths, kind=DelayType.MAX_ALL) float[source]¶
Determine the delay value from a delay dictionary.
Based on the specified type. In the SDF format, delays can be specified for different conditions (fast, slow, nominal). For example, a delay dictionary might look like this:
- delay_paths{
“fast”: {“min”: 1.0, “avg”: None, “max”: 2.0}, “slow”: {“min”: 3.0, “avg”: None, “max”: 4.0}, “nominal”: {“min”: 2.0, “avg”: None, “max”: 3.0}
}
which will be in the SDF as: ((1.0::2.0) (3.0::4.0)) for fast and slow, and (2.0::3.0) for nominal.
- Parameters:
delay_paths (dict) – A dictionary containing delay information.
kind (DelayType) – The type of delay to extract. Options include: DelayType.MIN_ALL, DelayType.MAX_ALL, DelayType.AVG_ALL, DelayType.AVG_FAST, DelayType.AVG_SLOW, DelayType.MAX_FAST, DelayType.MAX_SLOW, DelayType.MIN_FAST, DelayType.MIN_SLOW.
- Returns:
The calculated delay value.
- Raises:
ValueError – If an unknown delay type is specified.
- gen_timing_digraph(sdf_file, delay_type_str) SDFGobject[source]¶
Generate a timing directed networkx graph (DiGraph) from the SDF file.
Also extracts header information, cell names, and instance-component mappings. But IOPATHs and INTERCONNECTS are used to build the timing graph. Timing checks (hold, setup, reset, recover, width) and other components are stored in the instances dictionary.
- Parameters:
sdf_file (Path) – Path to the SDF file.
delay_type_str (DelayType) – The type of delay to extract (e.g., DelayType.MAX_ALL).
- Returns:
An SDFGobject containing the generated timing graph, header information, cell names, instance-component mappings, and lists of IOPATH and INTERCONNECT components.
- parse_sdf(sdf_file, delay_type_str) SDFGobject[source]¶
Parse the SDF file to extract INTERCONNECT and IOPATH components.
Parse the SDF file to extract INTERCONNECT and IOPATH components with their delays. Also extracts header information, cell names, and instance-component mappings. But IOPATHs and INTERCONNECTS are used to build the timing graph. Timing checks (hold, setup, reset, recover, width) and other components are stored in the instances dictionary.
- Parameters:
sdf_file (Path) – Path to the SDF file.
delay_type_str (DelayType) – The type of delay to extract (e.g., DelayType.MAX_ALL).
- Returns:
An SDFGobject containing the parsed SDF data, including header information, cell names, instance-component mappings, and lists of IOPATH and INTERCONNECT components.