Professional Documents
Culture Documents
ABCs of Synthesis Part One PDF
ABCs of Synthesis Part One PDF
Part 1
ABSTRACT
The Synthesis ABCs white paper provides information on how to perform
synthesis. Part 1 covers material such as basic synthesis flow, defining libraries,
using setup files, reading files, using Presto, and timing and area constraints.
Part 2 covers compile strategies, report generation, and writing files.
1
Table of Contents
INTRODUCTION ............................................................................ 4
BASIC SYNTHESIS FLOW ......................................................... 4
CORRECT INPUT FILES ............................................................. 5
DEFINING LIBRARIES................................................................. 5
SYNOPSYS SETUP FILE ..................................................................................................... 6
Setup File Description ................................................................................................ 6
EFFICIENTLY READING FILES ................................................ 7
ANALYZE / ELABORATE VERSUS READ_FILE .................................................................... 7
analyze ........................................................................................................................ 7
Elaborate..................................................................................................................... 8
link Command ............................................................................................................. 9
read_file ...................................................................................................................... 9
Comparison............................................................................................................... 10
PRESTO ON VERSUS PRESTO OFF................................................................................... 10
Presto Variables........................................................................................................ 10
READ EXAMPLE .............................................................................................................. 11
hdlin_report_inferred_modules ................................................................................ 13
Generic Components................................................................................................. 14
FOCUSED CONSTRAINTS....................................................... 15
DESIGN ENVIRONMENT .................................................................................................. 15
Operating Conditions ............................................................................................... 15
Wire Load Models..................................................................................................... 18
Wire Load Model Example ....................................................................................... 19
System Interface ........................................................................................................ 21
CONSTRAINTS ................................................................................................................ 23
Timing ....................................................................................................................... 23
Area........................................................................................................................... 33
Design Rules ............................................................................................................. 33
UNUSUAL CLOCK CONSTRAINTS.................................................................................... 35
CONCLUSION .............................................................................. 37
2
TABLE OF FIGURES
3
Introduction
So youre new to Design Compiler and have been assigned to do the synthesis
for the team. Where do you begin? Team members try to help by sending
example scripts, but upon review the scripts seem to be written in a foreign
language. All you want to know is how do I read in the files, what constraints do I
need, and how do I generate reports.
The goal of this paper is to provide you that information. The paper starts with
the synthesis flow and ends with writing files. Everything in between. including
reading files, preparing constraints, compiling, and report generation, is included.
Part 1 discusses the flow through constraint generation. Part 2 picks up with
compile techniques and ends with writing files.
Next you need to read in the files. The different methods for reading in files will
be covered along with comparisons of each. Once the files have been read, you
need to set constraints. When the constraints have been defined, youll need to
compile, analyze the results, and write out the synthesized netlist.
Figure 1 shows a basic synthesis flow. An explanation for each box is provided
in Parts 1 and 2 of Synthesis ABCs. The yellow boxes cover what you need to
know about getting the design into Design Compiler and preparing the design for
synthesis. The purple boxes cover how to compile the design, perform static
timing analysis, and write out necessary files.
4
HDL Files
Compile
Generation
Setup Generate
Libraries Reports
Reading
Write Files
Files
Building
Constraints
Before writing any code, invest some time collecting coding guideline resources.
See the Synopsys manuals HDL Compiler for VHDL Reference Manual and HDL
Compiler (Presto Verilog) Reference Manual. Also see the white paper available
on SolvNet called Fat-Free HDL (#006606) that contains guidelines along with
other coding guideline articles.
Another option is to look into using code checkers. One checker is called LEDA.
The LEDA tool is a programmable HDL checker that verifies that HDL code
complies with design rule and coding-style guidelines.
Even if youre not writing the HDL code, it is still a good idea to understand
coding guidelines. This will allow you to quickly determine if a problem is in
synthesis or in the code.
Defining Libraries
For most people libraries are not an interesting topic, but every tool needs them
and Design compiler isnt any different. You need to tell Design Compiler what
5
libraries to use when synthesizing your HDL code to gates. There are different
types of libraries with different definitions. For example, the link and target
libraries are technology libraries that define the semiconductor vendors set of
cells and related information, such as cell names, cell pin names, delay arcs, pin
loading, design rules, and operating conditions.
Another type of library is called the synthetic or DesignWare library. This library
is where your adders, multipliers, and so on come from. You do not need to
specify the standard synthetic library, standard.sldb, which implements the built-
in HDL operators; Design Compiler automatically uses this library. If you are
using additional DesignWare libraries, you must specify these libraries by using
the synthetic_library variable (for optimization purposes) and the link_library
variable (for cell resolution purposes).
To specify the link, target, symbol, and synthetic libraries you use the link_library,
target_library, symbol_library, and synthetic_library variables. These libraries are
normally placed in a setup file named .synopsys_dc.setup.
The set link_library command specifies the list of design files and
libraries used during linking. The asterisk (*) shown in the line tells
6
Design Compiler that the link command is to search all the designs
loaded in dc_shell while trying to resolve references. You should
always have this entry.
The set search_path command allows you to tell Design Compiler what
directories it should search in to find files.
analyze
The analyze command does the following:
Reads an HDL source file and performs HDL syntax checking and
Synopsys rule checking.
Checks file for errors without building generic logic for the design.
7
Stores the intermediate files in a location specified by you with the
define_design_lib command. For example:
Elaborate
The elaborate command does the following:
8
Replaces the HDL arithmetic operators in the code with DesignWare
components.
link Command
The link command is needed to locate all the designs and library components
and connects (links) them to the current design. Once this is done the design is
complete.
read_file
The read_file command does the following:
read_file Formats
The read_file command can read the following formats:
9
verilog - Cadence Design Systems, Inc. Hardware Description
Language
Comparison
The following figure shows a comparison between the two commands.
Presto Variables
There are a couple of variables that control the Presto HDL reader. Brief
descriptions are shown below.
10
hdlin_enable_presto
This variable controls whether the two commands read and analyze use Presto
HDL Compiler for Verilog input files. When set to true (the default), the
commands use Presto HDL Compiler.
hdlin_enable_presto_for_vhdl
This variable is available as beta starting with version 2003.03. When set to true,
the read and analyze commands use the Presto HDL Compiler for VHDL input
files. The default is false.
read Example
Lets go through an example so you can see what happens when you read in the
design. In this example, the command read_verilog is used to read in the Verilog
HDL code. The design consists of two sequential flip-flops.
Shown below is a copy of the Verilog HDL code used for this example.
always @ ( clk1)
begin
if (reset_n ==0)
out2 <= 1'b0;
else
out2 <= in2;
end
endmodule
Now lets read the file into Design Compiler. Items of interest have been
highlighted.
11
dc_shell-t> read_verilog dff.v
Loading verilog file '/remote/scfs6/terrib/projects/testcase/tutoral/dff.v'
Detecting input file type automatically (-rtl or -netlist).
Reading with Presto HDL Compiler (equivalent to -rtl option).
Running PRESTO HDLC
Loading db file '/remote/release/2003.06/libraries/syn/standard.sldb'
Loading db file '/remote/release/2003.03-2/libraries/syn/dw01.sldb'
Loading db file '/remote/release/2003.03-2/libraries/syn/dw02.sldb'
Loading db file '/remote/release/2003.03-2/libraries/syn/dw_foundation.sldb'
Loading db file '/remote/release/2003.06/libraries/syn/gtech.db'
Loading db file '/remote/scfs6/terrib/projects/testcase/tutoral/class.db'
Compiling source file /remote/scfs6/terrib/projects/testcase/tutoral/dff.v
Notice that in this example the command read_verilog was used to read in the
HDL code. To tell if Presto is turned on or not, look for a line similar to this:
Running PRESTO HDLC.
Youll want to examine the lines that start with loading db. This will tell you what
libraries are being loaded.
If you have sequential elements in your design, look at the section called Inferred
memory devices in process. There will be tables showing the size and type of
your sequential elements. Check to see if a flip-flop or a latch was inferred.
12
The last item to note is the Current design. The current design will be set to the
last file read into Design Compiler. It is good practice to always set the current
design using the current_design command before executing any other
commands.
hdlin_report_inferred_modules
If you need additional information on registers, you might want to set variable
hdlin_report_inferred_modules to verbose. Using this variable youll get detailed
information on elements. Here is an example.
13
Sequential Cell (out2_reg)
Cell Type: Flip-Flop
Multibit Attribute: N
Clock: clk_buf2
Async Clear: 0
Async Set: 0
Async Load: 0
Sync Clear: 0
Sync Set: 0
Sync Toggle: 0
Sync Load: 1
Do you see the additional information you can get with this variable?
Generic Components
When you read in the HDL code, you have an unmapped design, meaning that
you dont have gates. Instead you have generic components called GTECH for
combinational logic and SEQGEN for sequential logic. You can see this by
executing the report_cell command. Heres an example:
dc_shell-t> report_cell
Information: Updating design information... (UID-85)
Allocating blocks in 'dff'
****************************************
Report : cell
Design : dff
Version: 2003.06
Date : Wed Jul 9 07:29:05 2003
****************************************
Attributes:
b - black box (unknown)
c - control logic
h - hierarchical
n - noncombinational
r - removable
s - synthetic operator
u - contains unmapped logic
14
I_0 GTECH_NOT gtech 0.000000 u
I_1 GTECH_NOT gtech 0.000000 c, u
out1_reg **SEQGEN** 0.000000 n, u
out2_reg **SEQGEN** 0.000000 n, u
--------------------------------------------------------------------------------
Total 6 cells 0.000000
Focused Constraints
Now that your design has been read into memory you need to define the design
environment and constraints. For the design environment youll want to tell
Design Compiler about things it doesnt know anything about, such as what
operating conditions the chip will see, which wire load models should be used,
and system interface requirements. In addition Design Compiler needs to know
about area and timing constraints.
Design Environment
The design environment constraints consist of operating conditions, wire load
models, and system interface requirements. All areas are covered below.
Operating Conditions
The operating conditions consist of temperature, voltage, and process. The
effects each of these can have on the chip need to be considered during
synthesis and timing analysis. During timing analysis, Design Compiler must
consider the worst-case and best-case scenarios for the expected variations in
the temperature, voltage, and process factors. Here is a brief description of
each.
Voltage Having the designs supply voltage vary from the ideal value
during day-to-day operation is normal. Often a complex calculation
(using a shift in threshold voltages) is used, but a simple linear scaling
factor is also used for logic-level performance calculations.
15
Operating Condition Example
Most libraries have default settings for operating conditions. To see what the
default conditions are you can use report_lib command, or if you have the .lib file
you can take a look at it in UNIX. Assuming you dont have the .lib file, here is an
example of how to use the report_lib command.
Continuing with our Read Verilog Example, lets see what libraries are loaded
into memory using the list_libs command.
dc_shell-t> list_libs
Logical Libraries:
-------------------------------------------------------------------------
Library File Path
------- ---- ----
standard.sldb standard.sldb /remote/release/2003.06/libraries/syn
dw01.sldb dw01.sldb /remote/release/2003.03-2/libraries/syn
dw02.sldb dw02.sldb /remote/release/2003.03-2/libraries/syn
dw_foundation.sldb dw_foundation.sldb /remote/release/2003.03-2/libraries/syn
gtech gtech.db /remote/release/2003.06/libraries/syn
class class.db /remote/scfs6/terrib/projects/testcase/tutoral
Looking at this list we can find the name of our library class. Now do a report_lib
to see what the default operating conditions are.
****************************************
Report : library
Library: class
Version: 2003.06
Date : Tue Jul 15 06:22:47 2003
****************************************
..
Operating Conditions:
Name Library Calc_mode Process Temp Volt Interconnect Model
----------------------------------------------------------------------------
WCCOM class 1.50 70.00 4.75 worst_case_tree
WCIND class 1.50 85.00 4.75 worst_case_tree
WCMIL class 1.50 125.00 4.50 worst_case_tree
...
16
From this report, you can see what the operating conditions are for Worst Case
Commercial (WCCOM), Worst Case Industrial (WCIND), and Worst Case Military
(WCMIL).
Normally you would let Design Compiler use the operating conditions specified in
the library as the default. If your library doesnt have operating conditions or you
want to specify explicit operating conditions, which supersede the default library
conditions, you can use set_operating_conditions command as shown below.
dc_shell-t> report_design
****************************************
Report : design
Design : dff
Version: 2003.06
Date : Tue Jul 15 06:48:43 2003
****************************************
...
Operating Conditions:
...
If you had run report_design prior to setting the operating conditions, you would
see that no operating conditions have been specified as shown:
...
Operating Conditions:
17
Wire Load Models
I find wire load models a confusing concept because I think in ones and zeros
not resistance and capacitance. But in any case, wire load modeling allows you
to estimate the effect of wire length and fanout on the resistance, capacitance,
and area of nets. Design Compiler uses these values to calculate wire delays
and design speeds.
Where do the wire load models come from? Normally the semiconductor
vendors will develop the models. If back-annotated wire delays are not available,
Design Compiler uses these wire load models to estimate net wire lengths and
delays. To determine which model to use, Design Compiler uses the following
factors:
User specification.
User specification.
Top In this mode, Design Compiler models nets as if the design has
no hierarchy and uses the wire load model specified for the top level of
the design hierarchy for all nets in a design and its subdesigns.
Enclosed Design Compiler uses the wire load model of the smallest
design that fully encloses the net. Use enclosed mode if the design has
similar logical and physical hierarchies.
18
Segmented Design Compiler determines the wire load model of each
segment of a net by using the design encompassing the segment. Use
segmented mode if the wire load models in your technology file have
been characterized with net segments.
****************************************
Report : library
Library: class
Version: 2003.06
Date : Thu Jul 17 11:53:48 2003
****************************************
Wire Loading Model:
Name : 05x05
Location : class
Resistance : 0
Capacitance : 1
Area : 0
Slope : 0.186
Fanout Length Points Average Cap Std Deviation
--------------------------------------------------------------
1 0.39
Name : 10x10
Location : class
Resistance : 0
Capacitance : 1
Area : 0
Slope : 0.311
Fanout Length Points Average Cap Std Deviation
--------------------------------------------------------------
1 0.53
Name : 20x20
Location : class
Resistance : 0
Capacitance : 1
Area : 0
Slope : 0.547
19
Fanout Length Points Average Cap Std Deviation
--------------------------------------------------------------
1 0.86
Name : class
This report provides a lot of information. Lets take a look at what it is telling you.
The Wire Loading Model section tells you what wire load models are
available.
The Wire Loading Model Mode section identifies the default wire load
mode. If the library doesnt have a default, then Design Compiler will
use the top mode.
The Wire Loading Model Selection Group section tells which wire load
models will be user for specific areas.
If you need to change the wire load model or mode you can use commands
set_wire_load_model and set_wire_load_mode, respectively. Here is an
example:
20
Dont forget to use the report_design command to see the changes. Notice the
highlighted areas.
dc_shell-t> report_design
****************************************
Report : design
Design : dff
Version: 2003.06
Date : Thu Jul 17 12:13:11 2003
****************************************
Wire Loading Model:
Name : 10x10
Location : class
Resistance : 0
Capacitance : 1
Area : 0
Slope : 0.311
Fanout Length Points Average Cap Std Deviation
--------------------------------------------------------------
1 0.53
...
System Interface
When constraining a design for synthesis; you need to tell Design Compiler
about items that are missing. In this case, all of the outside logic that will be
driving your ASIC or receiving signals from your ASIC is unknown. You have to
provide this information. Here are some of the items that need to be provided:
21
Input Drive Strength
By default, Design Compiler assumes zero drive resistance on input ports,
meaning infinite drive strength. To avoid this unrealistic approach, you can place
a driving cell on the input ports that will cause Design Compiler to calculate the
actual (nonzero) transition time on the input signal as though the specified library
cell was driving it.
You can do this by using the set_driving_cell command. This command allows
you to select a realistic external cell driving the input ports. For example:
If for some reason the input port drive capability cant be modeled with a cell in
the technology library, you can use the set_drive and set_input_transition
commands. Together these commands can represent the drive resistance of the
top-level ports; however, theyre not as accurate for nonlinear models as the
set_driving_cell command is.
Capacitive Load
In order for Design Compiler to accurately calculate the timing of an output
circuit, you need to tell Design Compiler what the total capacitance driven by the
output cells will be. This needs to be done because, by default, the tool assumes
that the external load on the ports is zero. This information helps Design
Compiler select the correct cell drive strength of an output pad and helps model
the transition delay on input pads.
You can use the set_load command to specify the external capacitive load on
ports (inputs or outputs). You may specify a constant value or use the load_of
command to specify the external load as the pin load of a cell in your technology
library. Here are some examples.
22
Output Fanout Load
Take a look at the loads your outputs will be driving. You can model these loads
by using the set_fanout_load command. Using this command, Design Compiler
will try to make sure that the sum of the fanout load on the output port plus the
fanout load of cells connected to the output port driver is less than the maximum
fanout limit of the library, library cell, and design. Heres an example:
Important: Fanout load is not the same as load in Design Compiler. Fanout load
is a unitless value that represents a numerical contribution to the total fanout.
Load is a capacitance value. Design Compiler uses fanout load primarily to
measure the fanout presented by each input pin. An input pin normally has a
fanout load of 1, but it can have a higher value.
Constraints
Lets review. Youve specified libraries and read in the HDL code. Youve told
Design Compiler about the chips operating conditions and wire load models. And
youve specified system interface requirements. Whats missing? Well, we
havent indicated what clock speed the chip will be running at nor what size the
chip should be. Well address those now.
Timing
To accurately set up timing constraints, you need to tell Design Compiler about
the following:
Clocks
Timing exceptions
Figure 3 shows the commands you need to use for creating timing constraints.
These commands are discussed in more detail in the following sections.
Command Description
create_clock Use to generate a clock and define the period and
waveform.
create_generated_clock Use to define a generated clock in relation to a source
clock.
23
set_clock_latency Use these commands to tell Design Compiler about
set_propagated_clock the clock delay.
set_clock_uncertainty
set_input_delay Used to specify the timing requirements for input ports
relative to the clock period.
set_output_delay Used to specify the timing requirements for output
ports relative to the clock period.
set_max_delay Can be used to define maximum delay for
combinational paths.
Clock Definition
The first constraint you need to be concerned with is defining all of your clocks.
Design Compiler needs to know what the source is for the clock and clock period.
In addition, you may want to include information such as the clocks duty cycle,
offset/skew, and clock name. To define a clock you use the command
create_clock. If you have an internally generated clock use the command
create_generated_clock. Lets go through a few examples.
create_clock example
The first command tells Design Compiler you have clock with a period of 10.
Because the name option was not used, the clock gets the same name as the
clock source in this case, clk1. The clock will also have a 50 percent duty cycle
because a waveform was not specified.
This example creates a clock named clk2_in with a period of 10.0, a rise at 5.0,
and a fall at 9.5:
24
Create_clock name clk2_in period 10 waveform {5.0 9.5} [get_ports
clk2]
Lets say you have a divide-by-two clock generator as shown in the following
figure. Here is an example of how to constrain it.
U4
D Q DIVIDE
SYSCLK CLK QN
The following example creates a divide-by-2 clock. The clock name is DIVIDE,
and the source for the clock is SYSCLK.
Uncertainty accounts for varying delays between the clock network branches.
There are two types of uncertainty: simple and interclock. Simple uncertainty
means that setup uncertainty and hold uncertainty applies to all paths to the
endpoint. Interclock uncertainty allows you to specify different skew between
various clock domains. The recommendation is to set the uncertainty to the worst
skew expected to the endpoint or between the clock domains. You can always
increase the value to account for additional margin for setup and hold.
This example specifies that all paths leading to registers or ports clocked by CLK
have setup uncertainty of 0.65 and hold uncertainty of 0.45.
25
Here is an example that specifies uncertainties between two clock domains.
Clock latency is the propagation time from the actual clock origin to the clock
definition point in the design. There are two types of clock latency: network and
source. Clock network latency is the time it takes a clock signal to propagate
from the clock definition point to a register clock pin. Clock source latency is the
time it takes for a clock signal to propagate from its actual waveform origin point
to the clock definition point in the design. Clock source latency in normally used
to model off-chip clock latency. The following figure shows the difference
between the two.
Clock Definition
Point ASIC
D Q
set_propagated_clock
The set_propagated_clock command specifies that delays be propagated
through the clock network to determine latency at register clock pins. This
command should be used for post_route analysis. The benefit of using this
26
command is that propagated clocks will calculate network latency. The total
latency to the register will be the source + network latency.
in1 out1
D Q
clk_2
D Q CLK QN
clk1 CLK QN
dc_shell-t> report_clocks
Information: Updating design information... (UID-85)
****************************************
Report : clocks
Design : divide_by2
Version: 2003.06-2
Date : Mon Aug 4 06:45:45 2003
27
****************************************
Attributes:
d - dont_touch_network
f - fix_hold
p - propagated_clock
G - generated_clock
Looking at the report generated using report_clock, you can see the clock names
clk1 and clk_2. The d and G indicate dont_touch_network and generated_clock
attributes have been set.
Additional information is provided for the generated clock such as the source and
type of waveform.
****************************************
Report : clock_skew
Design : divide_by2
Version: 2003.06-2
Date : Mon Aug 4 06:47:19 2003
****************************************
28
Early Early Late Late Early Early Late Late
Object Rise Fall Rise Fall Rise Fall Rise Fall
-------------------------------------------------------------------------
clk1 3.00 3.00 3.00 3.00 3.00 3.00 3.00 3.00
By using this report you can check to see if the set_clock_uncertainty and
set_clock_latency commands were used correctly. Looking at rise delay, fall
delay and so on, we see a delay of 1ns. This delay came from the
command set_clock_latency 1 [get_clocks clk1].
Clock uncertainty is 0.5 and source latency is 3.0 ns. These delay values match
the commands that were used: set_clock_uncertainty 0.5 [get_clocks clk1] and
set_clock_latency -source 3 [get_clocks clk1].
Set_input_delay
The set_input_delay command is used to specify how much time is used by
external logic. Design Compiler then calculates how much time is left for the
internal logic. If you dont use this command the tool will assume an input port
clock and pick a clock period. Lets look at an example.
External Logic
ASIC
A
N delay D Q
D Q M delay
CLK QN
CLK QN
clk
T clk-q Tm Tn
T setup
29
The delay for the external logic will be Tclk-q + Tm. The time remaining for
internal logic is Tn + Tsetup. So if Tclk-q + Tm = 7.4 ns, the clock period is 20ns,
and the flop has a 1 ns setup requirement, what is the maximum delay for Tn?
The calculation will be as shown. 20 ns 7.4 ns 1 ns = 11.6 ns. Here is what
the constraints would look like.
set_output_delay
The set_output_delay command is used to constrain the output paths. You need
to specify how much time the external log needs; then Design Compiler
calculates how much time is left for the internal logic. Heres an example.
External Logic
ASIC
D Q B
S delay T delay D Q
CLK QN
CLK QN
clk
T setup
T clk-q Ts Tt
30
Set_max_delay
The set_max_delay command allows you to specify the maximum path length for
any startpoint to any endpoint. Design Compiler will try to make the path less
than the delay value you set. For example if you want to optimize the design so
that any delay path to a port named Y is less than10, you would do the following:
Set_min_delay
The set_min_delay command allows you to specify the minimum path delay. If a
path violates the requirement given in a set_min_delay command, Design
Compiler adds delay to fix the violation if maximum delay cost is not increased.
For example if you want to specify that all paths from A1 and A2 to Z5 must be
greater than 4.0, here is what you would do.
This overrides the original calculated maximum path length. Similarly, the
calculated minimum path length is equivalent to the library hold time for the
register at the endpoint, but a set_min_delay that is greater than that would
require that Design Compiler insert delays to meet the specification.
You can use the report_timing_requirements command to see the maximum and
minimum constraints.
31
Exceptions
Almost every design has exceptions. Exceptions can be false paths or multicycle
paths. The set_false_path command can be used to tell Design Compiler to
ignore the timing constraints on certain paths. This command is useful for
constraining asynchronous paths and logically false paths. Lets look at an
example for an asynchronous path.
TOP
Block_A Block_B
D Q A D Q
B
CLKA
CLK QN CLK QN
CLKB
In this example CLKA and CLKB are asynchronous to each other, so how do we
constrain it? First you want to define the clocks using create_clock, then tell
Design Compiler not to optimize logic crossing the clock domains by using
set_false_path.
Set_multicycle_path
The set_multicycle_path command is used to tell Design Compiler that you need
longer than a single clock cycle for a path. Using this command you can specify
how many clocks you will need. Lets go through an adder example.
32
a_reg
D Q
a(63:0) <60ns
c_reg
CLK QN + D Q c(63:0)
b_reg
b(63:0) D Q CLK QN
CLK QN
clk
Important: The default hold check is always performed on the clock edge before
the setup check. In this example, the hold check would occur at 50ns.
Area
Area is another topic that needs to be covered. Design Compiler will perform
minimal area optimizations unless an area constraint is set. By using the
set_max_area command, you can constrain area.
Most designers set zero max area constraint. With the exception of runtime, this
wont have any negative effect. Another option that may reduce runtime and
provide good quality of results is to set your maximum area to around 90 percent
of the minimum area. You can find the designs minimum area by running simple
compile mode with no clock or timing constrains (set simple_compile_mode true;
compile). Here is an example of how to use the set_max_area command.
set_max_area 100
Design Rules
Your library vendor may impose design rules that restrict how many cells are
connected to one another based on capacitance, transition, and fanout. You
33
can override these rules using these commands: set_max_capacitance,
set_max_transition, and set_max_fanout.
Set_max_capacitance
If you need to control capacitance, you can use the set_max_capacitance
command. Using this command Design Compiler will try to make sure that the
capacitance value for a net is less than the value specified. The maximum value
for a net is defined as the least of the maximum capacitance values of the cell
pins and design ports on that net. Here is how you would use it.
Set_max_transition
The transition time of a net is the time required for its driving pin to change logic
values. This time is based on the library data. For the nonlinear delay model
(NLDM), output transition time is a function of input transition and output load. If
you need to change this value, use the set_max_transition command.
Set_max_fanout
The maximum fanout load for a net is the maximum number of loads
the net can drive. Design Compiler attempts to ensure that the sum of the
fanout_load attributes for input pins on nets driven by the specified ports or all
nets in the specified design is less than the given value set in the
set_max_fanout command.
The fanout load value does not represent capacitance; it represents the weighted
numerical contribution to the total fanout load. Lets say you have two inverters
(inv1a1 and inv1a27). You can find the fanout_load attribute for each of these by
Using the get_attribute command.
Assume these commands return 0.25 and 3.00, respectively. Now if you have
the following
Design compiler can load port in1 with 6/.25 = 24 inv1a1 cells but can only load
port in1 with 6/3 = 2 inv1a27 cells.
34
Unusual Clock Constraints
This section goes through a few examples of how you would write constraints for
different types of circuits.
For this example the clock periods are clk1 = 30, clk2 = 20, clk3 = 10, and clk4 =
15. Skew for clk1 is 0.35 and clk2 is 0.40. Network delay is 0.5 and 0.6 for clk1
and clk2. Transition delay is 1.0 for both clk1 and clk2. Clocks clk3 and clk4 are
asynchronous to design top.
TOP
data_in data_out
D Q 2.5ns D Q
D Q D Q A D Q 3.0ns
clk3 CLK
CLK CLK CLK CLK clk4
clk1
clk2
#Create clocks
create_clock period 30 [get_ports clk1]
create_clock period 20 [get_ports clk2]
35
set_output_delay 3.0 clock clk4 [get_clocks data_out]
#Exceptions
set_false_path from clk3 clk4 to clk1 clk2
set_false_path from clk1 clk2 to clk3 clk4
The next example shows how to create a clock when you have a PLL. Because
Design Compiler treats the PLL as a black box, you will want to use
create_generated_clock on the output. The advantage of doing this is when you
propagate the clock created at the input clock pin of the clock that is also the
source clock, the tool will calculate the latency of the generated clock
automatically.
TOP
PLL
clki clki
clk_in rclk
#Create clocks
create_clock -period 20.0 -name clk_in [get_pins PLL/rclk]
What happens when you need to divide a clock by 2 and have a negative clock
as the master? When you use the create_generated_clock command, Design
Compiler looks at the master clock and does the necessary divide by taking into
account the clock waveform you specified with create_clock. If you used
create_clock for clk1 and waveform is {0 5 10} and then divided-by 2 , the
waveform created using create_generated_clock would be {0 10 20}. The tool
doesnt take into account the clock inversion. Heres what you need to do.
36
U2
D Q clk2
clk1
CLK
#Create clk
create_clock period 10 [get_ports clk1]
clk1
edges 1 2 3 4 5 6
time 0 5 10 15 20 25
clk2
Using the edges option you can achieve the required edges with the
create_generated_clock command.
Conclusion
Congratulations, you have finished Part 1 of Synthesis ABCs. A lot of ground
was covered and there is more to come. Before continuing with Part 2, review
what youve learned and dig deeper into the commands. Using the figures and
examples, you should be able to set up your libraries, read in you files, and write
constraints.
37