TCL 3 2015.00 SG
TCL 3 2015.00 SG
For additional reading, refer to SolvNet “Using Tcl with Synopsys Tools”,
v2014.09.
Tcl Tool Command Language
Alphabetical List of Design Objects
cells
clocks
clusters (Design Compiler only)
designs
library cells
library cell pins
library timing arcs (PrimeTime only)
libraries
multibits (Design Compiler only)
nets
path groups
pins
ports
timing arcs
timing paths
pt_shell> man collections
NAME
Collections_and_Querying
Describes the methodology for creating collections of objects and querying objects in
the database.
DESCRIPTION
Synopsys applications build an internal database of the netlist and the attributes
applied to it. This database consists of several classes of objects, including
designs, libraries, ports, cells, nets, pins, and clocks. Most commands operate on
these objects.
By definition:
A collection is a group of objects exported to the Tcl user interface.
NAME
list - Create a list
SYNOPSIS
list ?arg arg ...?
DESCRIPTION
This command returns a list comprised of all the args, or an
empty string if no args are specified.
pt_shell> man expr
. . .
MATH FUNCTIONS
Tcl supports the following mathematical functions in expressions:
int(arg)
If arg is an integer value, returns arg, otherwise converts arg to integer
by truncation and returns the converted value.
In Design Compiler, you must also filter out hierarchical cells.
set all_flops [get_cells * -hierarchical –filter \
"is_sequential == true and is_hierarchical == false"]
Using the relational operators greater than (>) or less than (<) with strings performs an
alphabetical comparison.
Unlike Tcl lists and strings, the index end is not accepted by collections.
pt_shell> man sort_collection
NAME
sort_collection
Sorts a collection based on one or more attributes, resulting in a new,
sorted collection. The sort is ascending by default.
SYNTAX
collection sort_collection [-descending] collection1 criteria
ARGUMENTS
-descending
Indicates that the collection is to be sorted in reverse order. By
default, the sort proceeds in ascending order.
collection1
Specifies the collection to be sorted.
criteria
Specifies a list of one or more application or user-defined attributes to
use as sort keys.
Properties for above report:
A - Application-defined
U - User-defined
I - Importable from db (for user-defined)
Application attributes are those defined by the Synopsys tool.
User-defined attributes can be imported from db files once they have been defined.
You must define attributes you want to import with the -import option. Note that
imported attributes do not appear on the design objects until the design is linked.
Attributes imported from db files will be inherited through the hierarchy. Note that
attributes defined for designs will be inherited onto cells, and attributes defined
for ports will be inherited onto pins. The define_user_attribute command will set up
these relationships for you automatically if you do not do it explicitly.
For more information on attributes and Design Compiler, refer to SolvNet: Design
Compiler User Guide v2014.09
For more information on attributes and PrimeTime, refer to SolvNet: PrimeTime User
Guide v2014.12.
In v2004.12, Design Compiler now assigns names to timing paths, however they have no meaning.
# Note that the name of a timing path is not unique to a specific path
dc_shell> get_timing_path -from SYS_2x_CLK
{path0 path1}
dc_shell> get_timing_path -from PCI_CLK
{path0 path1}
# In PrimeTime, there is no name for a timing path and thus the collection
# handle is returned.
pt_shell> get_timing_path -from SYS_2x_CLK
_sel141
dc_shell> get_timing_path –help
Usage: get_timing_paths # get_timing_paths
[-to to_list] (to pins, ports, nets or clocks)
[-from from_list] (from pins, ports, nets or clocks)
[-through through_list] (through pins, ports, nets or clocks)
[-delay_type delay_type] (Type of path delay:
Values: max, min, min_max, max_rise, max_fall, min_rise, min_fall)
[-nworst paths_per_endpoint]
(number of paths per endpoint, default is 1)
[-max_paths max_path_count] (maximum number of paths per path group)
[-enable_preset_clear_arcs] (enable async arcs)
[-group group_list] (list of path-group names)
[-true] (find true paths)
[-true_threshold path_delay] (path-length threshold for -true option)
[-greater greater_limit](get paths with length greater than this value)
[-lesser lesser_limit] (get paths with length less than this value)
[-slack_greater_than greater_slack_limit]
(get paths with more slack than this value)
[-slack_lesser_than lesser_slack_limit]
(get paths with less slack than this value)
[-include_hierarchical_pins]
(create timing point for each hierarchical point in path)
**default**
This path group contains timing paths not constrained by a clock but constrained with
set_max_delay/set_min_delay.
**async_default**
This path group contains timing paths constrained by recovery/removal timing checks.
**clock_gating_default**
This path group contains timing paths constrained by clock gating setup/hold timing checks.
You can create user defined path groups using the command group_path.
Unconstrained timing paths are not assigned a path group (i.e. the attribute path_group does
not exist for unconstrained timing paths).
PLL Phased Locked Loop
By default, the above example is not considered a timing path in PrimeTime. In order to
successfully apply the above example in PrimeTime v2004.12 using get_timing_path, you must
set the following variable to true.
pt_shell> set timing_report_unconstrained_paths true
Design Compiler does allow the command get_attribute to work on multiple design objects. This is not true in PrimeTime, as
shown in the man pages below.
dc_shell> man get_attribute
. . .
ARGUMENTS
object_list A list of the design or library objects
for which the attribute value is to be
returned. For details on searching for
design and library object names, refer
to the find command man page.
pt_shell> man get_attribute
. . .
ARGUMENTS
object_spec Specifies a single object from which to
get the attribute value. object_spec
must be is either a collection of
exactly one object, or a name which is
combined with the class_name to find the
object. If object_spec is a name, you
must also use the -class option.
In Design Compiler, the attributes for timing paths is listed under the man page for get_timing_path.
clock_uncertainty
endpoint
endpoint_clock
endpoint_clock_close_edge_type
endpoint_clock_close_edge_value
endpoint_clock_is_inverted
endpoint_clock_is_propagated
endpoint_clock_latency
endpoint_clock_open_edge_type
endpoint_clock_open_edge_value
endpoint_clock_pin
endpoint_hold_time_value
. . .
Note below that the criteria, the attribute used to sort the collection, is a required argument!
pt_shell> sort_collection -help
Usage:
sort_collection # Create a sorted copy of the collection
[-descending] (Sort in descending order)
collection1 (Collection to sort)
criteria (Sort criteria - list of attributes)