- •Contents
- •Preface
- •About This Manual
- •Other Information Sources
- •Syntax Conventions
- •Text Command Syntax
- •About the Graphical User Interface
- •Using Menus
- •Using Forms
- •Introduction to Ambit BuildGates Synthesis
- •Separately Licensed Software Products
- •Low Power Synthesis
- •Physically Knowledgeable Synthesis
- •Datapath Synthesis
- •AC_Shell / DC_Shell Equivalencies
- •Getting Started
- •Invoking Ambit BuildGates Synthesis
- •Exiting Ambit BuildGates Synthesis
- •Files Used in Ambit BuildGates Synthesis Software
- •Key Bindings and Mouse Operations
- •Using the GUI
- •Main Menu Functions
- •File Menu Options
- •Edit Menu Options
- •View Menu Options
- •Commands Menu Options
- •Reports Menu Options
- •Window Menu Options
- •Help Menu Options
- •The Tool Bar
- •The Browsers
- •The Module Browser
- •The Variable Browser
- •Work Area Tools
- •HDL and Tcl Editors
- •Constraints Tool
- •The Schematic Viewer
- •Distributed Processing
- •Update Mode
- •The ac_shell Console
- •The Status Bar
- •Flow Procedures
- •Typical Synthesis Flow
- •Read the Libraries
- •Read the Design Data
- •Build Generic Netlist
- •Set Constraints
- •Optimize the Design
- •Generate Reports
- •Save Final Netlist
- •Viewing the Schematic Design
- •How to Use the Schematic Viewer
- •Keyboard Shortcuts
- •Mouse Operations
- •Objects in the Schematic Database
- •Accessing Context-Sensitive Pop-Up Menus
- •Highlighting Path Between Pins
- •Viewing Bus Properties
- •The Schematic Tool Bar
- •The Module Title Bar
- •Searching for an Object
- •Grouping Instances
- •Dissolving Instances
- •Creating a Unique Module
- •Displaying Logic Cones
- •Extracting Logic Cones
- •Displaying Port Constraints
- •Printing a Schematic
- •Setting Constraints
- •Setting a Hierarchical Context
- •Units in Constraints
- •Timing Constraints
- •Timing Analysis
- •Setting up Timing Context
- •Clock Insertion Delay Time
- •Data Arrival Time
- •External Delay
- •Multicycle Paths
- •Setting Drive Cell for Input Ports
- •Setting Drive Resistance
- •Slew Related Commands
- •Technology and Design Rule Constraints
- •Operating Conditions
- •Estimating Capacitance and Resistance
- •Port Capacitance
- •Capacitance Limit
- •Fanout
- •Fanout Limit
- •External Sources and Sinks
- •Wire Capacitance
- •Wire Resistance
- •Wire Load Model Selection
- •Optimizing Before Place and Route
- •Running do_optimize Command
- •Top-Down Optimization
- •Bottom-Up Optimization
- •Deriving Constraints from Context
- •Time Budgeting
- •Preserving Module Contents
- •Uniquifying Instances
- •Collapsing Hierarchy
- •Incremental Optimization
- •Applying Timing Corrections
- •Optimizing with Logic Transforms
- •Introduction to Transforms
- •Logic Optimization Steps
- •Optimizing Generic Logic
- •Mapping and Unmapping of Generic Logic
- •Constraint-Driven Optimizing
- •Summary Listing of Transform Commands
- •Optimizing After Place and Route
- •Timing Analysis
- •Backannotating
- •A Script Showing the Backannotation of a Design
- •Reading SDF Data
- •Optimizing to Correct Late and Early Slack
- •Report Generation
- •Report Header
- •Timing Reports
- •Area Reports
- •Sample Area Report
- •Library Reports
- •Hierarchy Reports
- •Sample Hierarchy Report
- •Design Rule Violations Reports
- •Sample Design Rule Violations Report
- •VHDL Library Reports
- •Sample VHDL Library Report
- •End Point Slack and Path Histogram Reports
- •Fanin and Fanout Reports
- •Sample Fanin Report
- •Finite State Machine Reports
- •Sample FSM Report
- •Customizing Report Column Width
- •Using Tcl within ac_shell and pks_shell
- •The Tcl Language
- •Procedures
- •Tcl Variables and Control Structures
- •Variables
- •Syntax
- •Tcl Commands
- •get_names Command
- •Abbreviating Commands
- •Searching for Commands
- •Accessing Environment Variables
- •Returning Unix Command Values
- •Error Handling
- •Quick Reference
Ambit BuildGates Synthesis User Guide
A
Using Tcl within ac_shell and pks_shell
This appendix is a quick-start to the Tcl language and discusses ac_shell and pks_shell conventions that are beyond the scope of the Tcl language.}
This appendix contains the following information:
■The Tcl Language on page 212
■Procedures on page 212
■Tcl Variables and Control Structures on page 213
■Tcl Commands on page 216
■Error Handling on page 219
There are several good texts on Tcl, including:
■Practical Programming in Tcl and Tk by Brent B. Welch, Prentice Hall Publishing Company
■Tcl and the Tk Toolkit and TCL Reference by John K. Ousterhout, Addison-Wesley Publishing Company
Tcl and the Tk Toolkit is shipped with Ambit® BuildGates® synthesis. In addition, the web site www.scriptics.com provides full documentation and open source Tcl/Tk scripting language and offers professional development tools, services and extensions for Tcl.
Note: In BuildGates synthesis syntax, curly braces indicate that you must make a choice from a list of arguments separated by OR-bars (see the Preface for clarification). In the Tcl language, curly braces mean that the text within the braces are to be interpreted verbatim. To distinguish between the two functions of the braces, Tcl braces are presented in bold type in this appendix.
September 2000 |
211 |
Product Version 4.0 |
Ambit BuildGates Synthesis User Guide
Using Tcl within ac_shell and pks_shell
The Tcl Language
The Tcl language contains very few rules and most of the complexity that exists can be deferred until needed (such as substitution rules or regular expression matching). The ac_shell and pks_shell use Tcl as their command and extension languages.
Tcl is based on character strings. A Tcl command is a list of string arguments, and each command returns a string. At this time, Tcl treats numbers as strings until they are evaluated. This will change in future Tcl versions.
Procedures
A fundamental advantage of Tcl is support for user-defined procedures, which correlate with built-in Tcl commands, such as set and if, and ac_shell commands, such as read_verilog and do_optimize.
Note: The method used to add ac_shell commands to the interface is the same method used to interactively define a procedure, except that the ac_shell commands are statically compiled, and some are bound to C code instead of Tcl code.
For larger designs containing many lines of script, writing this procedurally makes the code easier to maintain. For example:
ac_shell> source my_proc.tcl ac_shell> my_read_library ac_shell> my_set_constraints
where my_proc.tcl contains the two procedures or commands: proc my_read_library {} {
#…commands…
}
proc my_set_constraints {} {
# …commands…
}
When sourcing my_proc.tcl, no action occurs. Two new Tcl commands are added to the existing body of built-in commands and ac_shell commands. When the commands are invoked, the Tcl engine interprets their code.
September 2000 |
212 |
Product Version 4.0 |