0% found this document useful (0 votes)
528 views158 pages

TCL 3 2015.00 SG

Tcl (Tool Command Language) is used with Synopsys tools like Design Compiler and PrimeTime. It provides commands to create and manipulate collections of design objects for use in other commands. Collections can be sorted based on attributes. Both application-defined and user-defined attributes can be used to mark objects.

Uploaded by

Vijay Sarathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
528 views158 pages

TCL 3 2015.00 SG

Tcl (Tool Command Language) is used with Synopsys tools like Design Compiler and PrimeTime. It provides commands to create and manipulate collections of design objects for use in other commands. Collections can be sorted based on attributes. Both application-defined and user-defined attributes can be used to mark objects.

Uploaded by

Vijay Sarathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 158

Tcl Tool Command Language

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.

Collections have an internal representation (the objects) and, sometimes, a string


representation. The string representation is generally used only for error messages.

A set of commands to create and manipulate collections is provided as an integral


part of the user interface. The collection commands encompass two categories: those
that create collections of objects for use by another command, and one that queries
objects for viewing. The result of a command that creates a collection is a Tcl
object that can be passed along to another command. . .
Note the get_* commands accept only a single argument. Use " " grouping to include
multiple strings and patterns as a single argument.
set testclks [get_clocks "test* TEST*"]
WNS Worst Negative Slack
pt_shell> all_outputs -help
all_outputs # Create a collection of all output ports in design
[-level_sensitive] (Get ports with level-sensitive output delay)
[-edge_triggered] (Get ports with edge-triggered output delay)
[-clock clock_name] (Get ports with output delay relative to clock)
pt_shell> man get_nets
. . .
-of_objects objects
Creates a collection of nets connected to the specified objects. Each object
is either a named pin or a pin collection. -of_objects and patterns are
mutually exclusive; you must specify one, but not both. In addition, you
cannot use -hierarchical with -of_objects.
dc_shell> man get_pins
. . .
-leaf
You can use this option only with -of_objects. For any nets in the objects
argument to -of_objects, only pins on leaf cells connected to those nets
will be included in the collection. In addition, hierarchical boundaries are
crossed in order to find pins on leaf cells. This option is available only
in XG mode.
pt_shell> man get_ports
. . .
DESCRIPTION
The get_ports command creates a collection of ports in the current design that
match certain criteria. The command returns a collection if any ports match the
patterns and pass the filter (if specified). If no objects match the criteria,
the empty string is returned.
The –quiet switch is supported in PrimeTime and in Design Compiler in XG mode only (not in
DB mode).

pt_shell> get_ports -help


Usage:
get_ports # Create a collection of ports
[-filter expression] (Filter collection with 'expression')
-of_objects objects (Get ports of these nets)
[-quiet] (Suppress all messages)
[-regexp] (Patterns are full regular expressions)
[-nocase] (With -regexp, matches are case-insensitive)
[-exact] (Wildcards are considered as plain characters)
patterns (Match port names against patterns)
pt_shell> man list

Tcl Built-In Commands list(n)

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:

abs cosh log sqrt


acos double log10 srand
asin exp pow tan
atan floor rand tanh
atan2 fmod round
ceil hypot sin
cos int sinh

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.

You can also create user defined attributes:


pt_shell> man define_user_attribute
. . .
Use the define_user_attribute command to define a new attribute. You can apply
attributes to most object classes. You can use these to mark interesting cells or
nets, or store values you computed, and so on. The Synopsys tool will not use these
attributes, but you can use them in scripts, procedures, and so on. You can list the
attributes you defined using the list_attributes command.

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.

dc_shell> man get_timing_path


DESCRIPTION
The get_timing_paths command creates a collection of paths for custom reporting or
other operations. Use the foreach_in_collection command to iterate among the paths
in the collection. You can use the get_attribute and collection commands to obtain
information about the paths. The following attributes are supported on timing
paths:

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)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy