Design Compiler
™
Command-Line Interface
Guide
Version 2000.05, May 2000
Comments?
E-mail your comments about Synopsys
documentation to doc@synopsys.com
2000 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary
Copyright Notice and Proprietary Information
Copyright
information that is the property of Synopsys, Inc. The software and documentation are furnished under a license agreement and
may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may
be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise,
without prior written permission of Synopsys, Inc., or as expressly provided by the license agreement.
Right to Copy Documentation
The license agreement with Synopsys permits licensee to make copies of the documentation for its internal use only.
Each copy shall include all copyrights, trademarks, service marks, and proprietary rights notices, if any. Licensee must
assign sequential numbers to all copies. These copies shall contain the following legend on the cover page:
“This document is duplicated with the permission of Synopsys, Inc., for the exclusive use of
__________________________________________ and its employees. This is copy number
__________.”
Destination Control Statement
All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to
determine the applicable regulations and to comply with them.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Registered Trademarks
Synopsys, the Synopsys logo, AMPS, Arcadia, CMOS-CBA, COSSAP, Cyclone, DelayMill, DesignPower, DesignSource,
DesignWare, dont_use, EPIC, ExpressModel, Formality, in-Sync, Logic Automation, Logic Modeling, Memory Architect,
ModelAccess, ModelTools, PathBlazer, PathMill, PowerArc, PowerMill, PrimeTime, RailMill, Silicon Architects,
SmartLicense, SmartModel, SmartModels, SNUG, SOLV-IT!, SolvNET, Stream Driven Simulator, Synopsys Eagle
Design Automation, Synopsys Eaglei, Synthetic Designs, TestBench Manager, and TimeMill are registered trademarks
of Synopsys, Inc.
Trademarks
ACE, BCView, Behavioral Compiler, BOA, BRT, CBA, CBAII, CBA Design System, CBA-Frame, Cedar, CoCentric, DAVIS,
DC Expert, DC ExpertPlus, DC Professional, DC Ultra, DC Ultra Plus, Design Advisor, Design Analyzer, Design Compiler,
DesignTime, Direct RTL, Direct Silicon Access, dont_touch, dont_touch_network, DW8051, DWPCI, ECL Compiler,
ECO Compiler, Floorplan Manager, FoundryModel, FPGA Compiler, FPGA Compiler II, FPGA Express, Frame Compiler,
General Purpose Post-Processor, GPP, HDL Advisor, HDL Compiler, Integrator, Interactive Waveform Viewer, Liberty,
Library Compiler, Logic Model, MAX, ModelSource, Module Compiler, MS-3200, MS-3400, Nanometer Design Experts,
Nanometer IC Design, Nanometer Ready, Odyssey, PowerCODE, PowerGate, Power Compiler, ProFPGA, ProMA,
Protocol Compiler, RMM, RoadRunner, RTL Analyzer, Schematic Compiler, Scirocco, Shadow Debugger, SmartModel
Library, Source-Level Design, SWIFT, Synopsys EagleV, Test Compiler, Test Compiler Plus, Test Manager, TestGen,
TestSim, TetraMAX, TimeTracker, Timing Annotator, Trace-On-Demand, VCS, VCS Express, VCSi, VERA, VHDL
Compiler, VHDL System Simulator, Visualyze, VMC, and VSS are trademarks of Synopsys, Inc.
Service Marks
TAP-in is a service mark of Synopsys, Inc.
All other product or company names may be trademarks of their respective owners.
Printed in the U.S.A.
Document Order Number: 36039-000 IA
Design Compiler Command-Line Interface Guide, v2000.05
ii
Contents
About This Guide
1.
Introduction to Design Compiler Interfaces
What’s New in This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
New Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enhancements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Known Limitations and Resolved STARs. . . . . . . . . . . . . . . . . .
Using dc_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-2
1-4
1-5
1-6
1-7
1-9
Using Startup Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
System-Wide .synopsys_dc.setup File . . . . . . . . . . . . . . . . . . . 1-12
User-Defined .synopsys_dc.setup Files. . . . . . . . . . . . . . . . . . . 1-12
Design-Specific .synopsys_dc.setup Files. . . . . . . . . . . . . . . . . 1-13
Changes to .synopsys_dc.setup File . . . . . . . . . . . . . . . . . . . . . 1-13
Including Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Starting Design Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
iii
Exiting Design Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Assigning an Exit Code Value . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Saving dc_shell Session Information . . . . . . . . . . . . . . . . . . . . . 1-19
Saving an Optimized Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Interrupting Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Controlling Verbosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
UNIX Commands Within Design Compiler . . . . . . . . . . . . . . . . . . . 1-21
2. Command Syntax
Understanding the dc_shell Command Syntax . . . . . . . . . . . . . . . .
Case-Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Command and Option Abbreviation
2-2
2-3
(Tcl Mode Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Removing Aliases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3
2-5
2-5
2-8
2-8
2-9
The Wildcard Character . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
The Comment Character . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Multiple Line Commands and Multiple Commands
per Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Redirecting and Appending Command Output . . . . . . . . . . . . . 2-12
Using the redirect Command . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Getting the Result of Redirected Commands. . . . . . . . . . . . 2-14
Using the Redirection Operators . . . . . . . . . . . . . . . . . . . . . 2-14
Command Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
iv
Successful Completion Example . . . . . . . . . . . . . . . . . . . . . 2-16
Unsuccessful Execution Examples . . . . . . . . . . . . . . . . . . . 2-16
Checking for a Null List Example . . . . . . . . . . . . . . . . . . . . . 2-16
Displaying the Value of the dc_shell_status Variable . . . . . . 2-16
Controlling the Output Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Listing Previously Entered Commands . . . . . . . . . . . . . . . . . . . . . . 2-18
Rerunning Previously Entered Commands . . . . . . . . . . . . . . . . . . . 2-20
Getting Help on Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Listing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Command Usage Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Topic Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Identifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
Lists in dcsh Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Lists in Tcl Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
String and List Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Boolean Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Tcl Limitations Within dc_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
3. Variables
Components of a Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Predefined Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2
3-3
v
Considerations When Using Variables . . . . . . . . . . . . . . . . . . . . . .
Manipulating Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Listing Variable Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assigning Variable Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Initializing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Changing Variables . . . . . . . . . . . . . . . . . . . . . . .
Removing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Re-creating a Variable to Store a New Value Type . . . . . . . . . .
3-3
3-4
3-5
3-5
3-7
3-8
3-9
3-9
Using Variable Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Listing Variable Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Creating Variable Groups or Changing Variable
Group Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Removing Variables From a Variable Group . . . . . . . . . . . . . . . 3-12
Using Predefined Variable Groups. . . . . . . . . . . . . . . . . . . . . . . 3-12
4. Control Flow
Conditional Command Execution . . . . . . . . . . . . . . . . . . . . . . . . . .
if Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
switch Statement (Tcl Mode Only) . . . . . . . . . . . . . . . . . . . . . . .
4-3
4-3
4-5
4-6
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-7
while Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-8
for Statement (Tcl Mode Only). . . . . . . . . . . . . . . . . . . . . . . . . .
foreach Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-8
foreach_in_collection Statement (Tcl Mode Only) . . . . . . . . . . . 4-10
Loop Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
vi
continue Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
break Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
end Command in Loops. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
5. Searching for Design Objects in dcsh Mode
Finding Named Objects (find) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Commands That Create Lists . . . . . . . . . . . . . . . . . . . . .
Implied Order for Searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controlling the Search Order of Object Types. . . . . . . . . . . . . . . . .
Using find With the Wildcard Character. . . . . . . . . . . . . . . . . . . . . .
Nesting find Within dc_shell Commands. . . . . . . . . . . . . . . . . . . . .
Filtering a List of Objects (filter). . . . . . . . . . . . . . . . . . . . . . . . . . . .
6. Generating Collections in Tcl Mode
Commands That Create Collections . . . . . . . . . . . . . . . . . . . . . . . .
Primary Collection Command Example . . . . . . . . . . . . . . . . . . .
Other Commands That Create Collections . . . . . . . . . . . . . . . .
Removing From and Adding to a Collection . . . . . . . . . . . . . . . . . .
Comparing Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Copying Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2
5-4
5-5
5-5
5-5
5-6
5-7
6-2
6-3
6-5
6-5
6-8
6-8
Indexing Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Saving Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
vii
7. Creating and Using Procedures in Tcl Mode
Creating Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the proc Command to Create Procedures . . . . . . . . . . . . . .
Programming Default Values for Arguments . . . . . . . . . . . . . . .
Specifying a Varying Number of Arguments . . . . . . . . . . . . . . .
Extending Procedures: Defining Procedure Attributes . . . . . . . . . .
Default Procedure Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing the Aspects of a Procedure . . . . . . . . . . . . . . . . . . . .
Format for the -define_args Option . . . . . . . . . . . . . . . . . . . . . .
7-2
7-3
7-5
7-5
7-6
7-7
7-7
7-9
Parsing Arguments Passed Into a Tcl Procedure . . . . . . . . . . . . . . 7-11
Displaying the Body of a Procedure . . . . . . . . . . . . . . . . . . . . . . . . 7-13
Displaying the Names of Formal Parameters of a Procedure . . . . . 7-14
8. Using Scripts
Using Command Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Building New Scripts From Existing Scripts. . . . . . . . . . . . . . . . . . .
Checking Syntax and Context in Scripts . . . . . . . . . . . . . . . . . . . . .
Using the Syntax Checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Syntax Checker Functions . . . . . . . . . . . . . . . . . . . . . . . . . .
Syntax Checker Limitations . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling or Disabling Syntax Checking . . . . . . . . . . . . . . . .
Enabling or Disabling the Syntax Checker From
Within dc_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Invoking dc_shell With the Syntax Checker Enabled . . . . . .
8-2
8-4
8-4
8-5
8-5
8-6
8-6
8-7
8-7
8-8
viii