- •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
Using Tcl within ac_shell and pks_shell
Tcl also supports a convenient demand-load mechanism for personal procedures to avoid the
first source command above. See autoload in a standard Tcl reference book for more details.
Tcl procedures support arguments, such as:
proc my_set_constraints {clock_name period} { puts “Creating $clock_name with period $period”
# …commands…
}
and arguments with defaults, such as:
proc my_set_constraints {clock_name {period 10}} { puts “Creating $clock_name with period $period”
# …commands…
}
This applet approach is recommended and should be extended to the entire synthesis flow. The top-level script should look similar to the code in the following example. Use of a unique prefix is recommended to avoid Tcl command name collisions.
Example: Top-Level Script Using the Applet Approach
#Synthesis for block ‘alu’ set design alu
set clock clk2 set period 8
my_set_project_globals my_read_library my_read_design_files $alu
my_set_default_time_budget $clock $period
#…commands…
Tcl Variables and Control Structures
Variables
Like most shells, Tcl allows for defining, modifying, and referencing variables, and using these variables in control structures.
September 2000 |
213 |
Product Version 4.0 |
Ambit BuildGates Synthesis User Guide
Using Tcl within ac_shell and pks_shell
There are no reserved shell variables in ac_shell. Tcl variables have no restrictions. The set_global and get_global commands in ac_shell handle all of the global settings that affect synthesis operations. These commands are described in the Envisia and Ambit
Synthesis Command Reference.
Character Strings
A variable has no type (everything is a character string), and does not need to be declared.
The first occurrence is equivalent to the declaration.
ac_shell> set myvar 100 ac_shell> puts $myvar
100
ac_shell>
A variable has a global scope if the first occurrence of the variable is in the global context (not inside a procedure). If the first occurrence of a variable is inside a procedure then it has scope of that procedure and will not conflict with another variable having the same name in a different scope. The commands global, upvar, and uplevel allow the use of variables across scopes.
Using the $ Prefix
Use the $ prefix to get the value of a variable. In Tcl, placing the $ in front of a variable causes the value of a variable to be substituted for that variable. This is shown in the following example:
set x 1
if { $x == 1 } {
#…
}else {
#…
}
Some commands use the variable value, as in the If statement above. Other commands require the name of a variable as an argument (usually so they can modify it) as follows:
ac_shell> puts $x
1
ac_shell> incr x
2
September 2000 |
214 |
Product Version 4.0 |
Ambit BuildGates Synthesis User Guide
Using Tcl within ac_shell and pks_shell
Syntax
Tcl terminates all commands (built-in or user-defined) when it reaches a newline character or a semicolon in a line. The trailing left-brace in the if-else statement above is a mandated Tcl style. Using the open brace before the new line character indicates that the text should be read as one argument to the if command.
Variables may also be used to hold lists of items, which can be defined recursively
ac_shell> set y {a b {c d}} a b {c d}
ac_shell> foreach val $y {puts “$val”} a
b
c d
Use double quotes to group items together with (one pass of) substitution, and curly braces group items together without any substitution.
ac_shell> set val 4 ac_shell> puts “$val”
4
ac_shell> puts $val
4
ac_shell> puts {$val}
$val
Note: In Tcl, the square brackets ([ ]) contain commands which are evaluated and return values. In ac_shell, square brackets indicate bus indices.
Tcl supports the standard C language arithmetic operators, and also performs comparisons on numbers and strings, according to the C language definition. For example, use == to perform a string comparison and use expr (Tcl command) to evaluate an expression:
ac_shell> set_port_capacitance [expr {1 + 0.4}] {out[2]}
Note: Because Tcl treats square brackets ([ ]) differently, using square brackets when referring to a single bit of a bussed net requires enclosing the expression in braces ({ }). If braces are not used, the literal value of the calculated expression is given. This is similar to the backquote in C-shell (see examples below).
The following results in an error:
ac_shell> set_port_capacitance [expr {1 + 0.4}] out[2]
September 2000 |
215 |
Product Version 4.0 |