Synthesis
Synthesis
So Basically ,
Synthesis = translation + optimization + mapping
4
Synthesis in a nutshell:
5
Synthesis Stage:
RTL
Generic
TRANSLATION Boolean
(Read Verilog) Gates
OPTIMIZATION + Gate
MAPPING Level
(COMPILE ) Netlist
6
Synthesis Stage:
Translation:
❏ Check RTL for valid syntax
7
Synthesis Stage:
8
Compile:
9
Design Compiler and the design Flow:
10
Design Compiler and the design Flow:
➔ Design Compiler uses technology libraries, and symbol libraries to implement
synthesis and to display synthesis results graphically.During the synthesis process, dc
translates the HDL description to components extracted from the generic technology
(GTECH) library and Design Ware library. The GTECH library consists of basic logic
gates and flip-flops. The Design Ware library contains more complex cells such as
adders and comparators. Both the GTECH and Design Ware libraries are technology
independent, that is, they are not mapped to a specific technology library. Design
Compiler uses the symbol library to generate the design schematic.
➔ After translating the HDL description to gates, Design Compiler optimizes and maps
the design to a specific technology library, known as the target library. The process is
constraint driven. Constraints are the designer’s specification of timing and
environmental restrictions under which synthesis is to be performed.
11
Design Compiler and the design Flow:
➔ After the design is optimized, it is ready for test synthesis. Test synthesis is the
process by which designers can integrate test logic into a design during logic
synthesis. Test synthesis enables designers to ensure that a design is testable and
resolve any test issues early in the design cycle.
➔ The result of the logic synthesis process is an optimized gate-level netlist, which is a
list of circuit elements and their interconnections. After test synthesis, the design is
ready for the place and route tools, which place and interconnect cells in the design.
Based on the physical routing, the designer can back-annotate the design with actual
interconnect delays; Design Compiler can then resynthesize the design for more
accurate timing analysis.
12
Synthesizable Verilog cells & Operators:
13
An Example:
14
Steps before synthesis:
Note :
The only trade-off available with a synthesis tool is timing versus area. But with advent of mobile
devices, power has entered the equation.
Design is now optimized for three constraints; PPA ( Power, Performance, Area)
In fact, a super tight timing constraint may be worked while synthesis, but failed in the Place & Route
(P&R) procedure.
15
Synthesis Flow:
● Unified User Interface: Genus offers a fully unified Tcl scripting language
and GUI environment also referred as Stylus Common UI.
The default interface is Stylus Common UI.
genus@root:>
● Legacy User Interface: Genus can also operate in legacy mode which
supports RTL Compiler commands/attributes and scripting.
legacy_genus:/>
17
Setting the Appropriate Synthesis Mode:
● Genus has two modes to synthesize the design. The synthesis mode is
determined by the setting of the interconnect_mode attribute:
○ wireload (default) indicates to use wire-load models to drive synthesis
○ PLE indicates to use Physical Layout Estimators (PLEs) to drive synthesis
PLE uses physical information, such as LEF libraries, to provide better closure
with backend tools.
19
Target library variable:
➔ The target library is the library used by synthesis tool for building a circuit.
➔ During mapping , synthesis tool will :
◆ Choose functionally-correct gates from this library
◆ Calculate the timing of the circuits using vendor-supplied timing data
for these gates.
But what do you think about this ? Will this help you anywhere?
21
Design Objects : verilog Perspective
22
Design Objects : Schematic Perspective
23
Read HDL :
➔ Use the read_hdl command to read HDL files into Genus. When you issue
a read_hdl command, Genus reads the files and performs syntax checks.
➔ In DC it use one of the following methods to read HDL design files:
◆ The analyze and elaborate commands :
To use this method, analyze the top-level design and all subdesigns in
bottom-up order and then elaborate the top-level design and any
subdesigns that require parameters to be assigned or overwritten.
For example, enter
dc_shell> analyze -format verilog -lib -work nelist.v
dc_shell> analyze -format vhdl -lib -work {ALU.vhd
STACK_TOP.vhd STACK_MEM.vhd...}
dc_shell> elaborate RISC_CORE -arch STRUCT -lib WORK
-update 24
Read HDL : (another way )
Elaboration is only required for the top-level design. The elaborate command
automatically elaborates the top-level design and all of its references. During
elaboration ,Genus performs the following tasks:
After elaboration, Genus has an internally created data structure for the whole
design so you can apply constraints and perform other operations.
26
Multiple objects with same name :
get commands return a collection of object names. If none are found ,an empty collection is returned.
It searches the current design and can be used stand-alone or composed with other functions.
28
Get command exercise :
29
RT overview :
30
Path and Delay:
So we have three types of path :
1.Input to Register
2.Register to Register
3.Register to Output
R2R delay :
Setup time is defined as the minimum amount of time before the clock's active edge
that the data must be stable for it to be latched correctly. Any violation may cause
incorrect data to be captured, which is known as setup violation.
Hold time is defined as the minimum amount of time after the clock's active edge
during which data must be stable. Violation in this case may cause incorrect data to be
latched, which is known as a hold violation. Note that setup and hold time is measured
with respect to the active clock edge only.
31
Path and Delay:
I2R delay:
Input delay to chip is also external input delay (time take from outside world to
the chip)
R2O delay:
output delay or output external delay how time it takes from the output of the
chip to the input of the next chip/system.
This is the only bullshit in the whole chip. Now you ,how to put your input
register to input,output register to output depends upon i/o timing right?.
32
Constraints:
Constraints are the instructions that the designer apply during logic synthesis.
❏ After loading and elaborating your design, you must specify constraints. The
constraints
Include:
❏ Operating conditions
❏ Clock waveforms
❏ I/O timing
❏ You can apply constraints in several ways:
❏ Type them manually in the Genus shell.
❏ Include a constraints file.
❏ Read in SDC constraints.
33
Types of Constraints:
There are two basic types of constraints, Timing constraints & Physical constraints.
34
Basic mode specific constraints of Genus:
Genus has some mode specific constraints.
● Create_mode
● Define_clock
● External_delay
● Multi_cycle
● Path_adjust
● Path_delay
● Path_disable
● Path_group
● Specify_path
35
Mode specific constraints: Create_mode
Create_mode: Specifies the mode for power and timing analysis and
optimization.
● Mode creation happens after loading and elaborating the design and before
reading in the SDC file and constraints: define_clock,
external_delay, multi_cycle, path_adjust, path_delay,
path_disable, path_group, and specify_paths.
● After creating modes, use the -mode option with the read_sdc command.
38
Mode specific constraints: External_delay
External Output delay:
● Output can also be connected with some other external logic. So some
delays needs to be added with the output pin.
39
Mode specific constraints: External_delay
External_delay: Constraints ports and pins within the design. Timing is specified
as either an input or output delay, and is specified relative to a clock edge.
● External delays are most often specified on top-level ports of your design.
40
Mode specific constraints: Genarate_constraints
Genarte_constraints verifies the false path and multi-cycle paths.
False path: A false path is a path for which you will ignore timing constraints.
41
Mode specific constraints: Genarate_constraints
Genarate_constraints: Verifies the false paths and multi-cycle paths in the SDC
files against the RTL or netlist and then generates any missing functional false
paths or multi-cycle paths.
● Paths can be selected using the -from, -through, -to, or -paths options.
● At least one of these four options must be provided.
● The -paths option cannot be used in conjunction with any of the other three
path selection options.
43
Mode specific constraints: Path_delay
Path_delay: Specify the timing constraint for paths that meet the path selection
criteria.
● Paths can be selected using the -from, -through, -to, or -paths options.
● At least one of these four options must be provided.
● The -paths option cannot be used in conjunction with any of the other three
path selection options.
● These path constraints could have been computed by the timing engine
using the launching and capturing waveforms.
44
Mode specific constraints: Validate_constraints
Validate_constraints: Validates the SDCs specified in the SDC files against the
RTL or netlist.
validate_constraints -netlist
/home/cody/design/netlist.nl.v \
-sdc /home/cody/lane.sdc
45
SDC(Standard Design Constraint) Constraints:
Genus has its own mode specific constraints. But when Synopsys Design
Constraints(SDC) got standardize as Standard Design Constraint, Genus had to
merge with the standard version of constraints.
Now, SDC Constraints can be segregated based on the changes they bring to the
design.
46
SDC(Standard Design Constraint) Constraints:
set_wire_load_mode
set_wire_load_model
● Wire load model set_wire_load_selection_group
set_wire_load_min_block_size
set_drive
set_driving_cell
set_input_transition
● System interface set_load
set_port_fanout_number
set_fanout_load
set_max_fanout
● Design rule constraints set_max_capacitance
set_min_capacitance
set_max_transition
47
SDC(Standard Design Constraint) Constraints:
create_clock
set_clock_latency
set_clock_transition
set_clock_uncertainty
set_clock_groups
set_clock_sense
create_generated_clock
set_clock_gating_check
48
SDC(Standard Design Constraint) Constraints:
set_false_path
● Timing exceptions set_max_delay
set_min_delay
set_multicycle_path
create_voltage_area
set_level_shifter_strategy
set_level_shifter_threshold
● Multi-voltage and Power Optimization Constraints set_max_dynamic_power
set_max_leakage_power
set_case_analysis
set_logic_dc
● Logic Assignments set_logic_one
set_logic_zero
49
Set_input_transition:
Set_input_transition: Sets a specific transition time (slew) on the specified input
and inout ports. One can specify the minimum rise, minimum fall, maximum
rise, or maximum fall slew.
50
Set_max_fanout:
set_max_fanout: Specifies the maximum allowed fanout for specified input ports
or all input ports of the design.
● The synthesis or optimization tool uses this information to keep the number
of loads connected to the input ports to be no more than the specified
maximum value.
● Sets the max_fanout attribute on the specified design or port.
51
Set_max_capacitance:
Set_max_capacitance: Specifies the maximum allowed capacitance for the
specified input ports or all input ports of the design.
52
Set_max_transition:
Set_max_transition: Specifies the maximum transition for the specified design or
port list.
● Defines maximum allowed signal transition time for a net, applied to nets
belonging in one clock group, specified ports or entire design.
● The synthesis or optimization tool ensures that the transition time is no
more than specified maximum value.
53
Create_clock:
Clock: A clock is a periodic waveform with a fixed frequency that is used to sequence
the operation of a circuit. A clock sets the time allowed for signals to propagate
between sequential elements.
● A clock waveform is a periodic signal with one rising edge and one falling edge
per period.
● Create_clock is a sdc equivalent of
define_clock
54
Ex. create_clock -period 20 [get_ports Clk]
Create_clock:
Create_clock: Creates a clock constraints timing paths between registers.
create_clock___________________________________ 55
Create_generated_clock:
Create_generated_clock: Creates a new clock signal from the clock waveform
of a given pin in the design.
● Generated clocks are the clocks that are generated from other clocks.
● Master clocks are defined by ‘create_clock’. The source of generated
clock is specified by -source
● Generated clocks can be divided or multiplied from the main clock by using
-divided_by, -multiply_by
● Duty cycle can also be defined while generate clocks by -duty_cycle
● The -invert option can be specified if the phase of the clock has been
inverted.
56
Create_generated_clock:
create_generated_clock [-name clock_name] -source master_pin [-edges edge_list]
[-divide_by factor] [-multiply_by factor] [-duty_cycle percent] [-invert]
57
Set_clock_sense:
Set_clock_sense: Sets the clock sense on the specified pins and ports.
● -clocks: Specifies the clocks for which the clock sense must be set.
● -logical_stop_propagation: Stops the propagation of the specified clocks
through the specified pins.
● -negative: Specifies that the specified pins and ports are inverted sources of the
clock.
● -pins/-ports: Specifies the name of the pins and ports for which the clock
sense must be set.
● -stop_propagation: Stops the propagation of the specified clocks and clock
source data paths through the specified pins.
● The setup uncertainty is subtracted from the data required time for a path.
● The hold uncertainty is added to the data required time for each path.
61
Set_input_delay:
Set_input_delay: Specifies the data arrival times at the specified input ports relative to
the clock specified.
64
Set_output_delay:
Set_output_delay___________________________________
65
Set_clock_transition:
Set_clock_transition: Specifies the clock transition at the clock definition point.
68
set_max_delay:
Set_max_delay: Specifies the required maximum delay for the specified paths.
69
Set_multicycle_path:
Multicycle path: A multicycle path is one that requires either more or less than one
clock cycle. That is why those paths need special checks for setup and hold.
70
Physical Constraints :
72
Modeling Capacitive Load :
74
Input Driving strength :
➔ In order to accurately calculate the timing of an input circuit, tool needs to
know the transition time of the signal arriving at the input port.
➔ set_driving_cell allows the user to specify a realistic external cell
driving the input ports.
➔ By default, tools assumes that the external signal has a transition
time of 0.
➔ Placing a driving cell on the input ports causes tool to calculate the actual
(non-zero) transition time on the input signal as though the specified library
cell was driving it.
75
Example :
➔ set_driving_cell -lib_cell and2a0 [get_ports IN1]
76
Variation in cell delays:
➔ Library cells are usually characterized using “nominal” voltage and
temperature.
◆ Example:
● Nom_process 1.0
● Nom_voltage 2.0
● Nom_temperature 25
77
Example :
➔ Operating conditions can be placed on your design by
using the set_operating_conditions command.
➔ During synthesis, “nominal”cell and wire delays will be scaled
based on the operating conditions.
78
Example :
➔ Use report_lib libname to list the vendor-supplied operating conditions.
79
Wire load :
➔ A wire load model is an estimate of a net’s RC parasitics based on the net’s
fanout:
● Model is created by tool
● Estimates are based on statistics from other designs the vendor has
fabricated using this process
80
Example :
➔ Here we can see a standard
format.
➔ set_wire_load_model -name
160KGATES
➔ Report_lib mylib
For specified object net, the command returns the list of all the pins connected to the
net. If the object is a pin or a port, the command returns the net connected to the pin or
the port.
❖ all des
Generates a Tcl list based on the specified object.The following example returns all the
input ports for the clock named clock1:
Generates a Tcl list of library cell. “bufs” Generates a list of all the buffers in the loaded
library. “ties” Generates a list of all the tie-cells in the loaded library.
❖ check_design
Provides information on undriven and multi-driven ports and pins, unloaded sequential
elements and ports, unresolved references, constants connected ports and pins, any assign
statements and preserved instances in the given design. In addition, the command can
report any cells that are not in both .lib and the physical libraries (LEF files).
84
Analysis and Report :
❖ Clock_ports
◆ clock_ports [design]
➢ Returns input ports of your design that are clock inputs.Note: Only input ports at the top
level are listed. Gated clocks and clock pins that are present in the hierarchical design
internally (typical PLL outputs) will not be identified.
➢ The following example finds all of the clock ports of a design:
◆ rc:/> clock_ports
➢ In the following example, the clock_ports command is embedded within a create_clock
command to apply a clock waveform to all clock input ports of the design:
◆ rc:/> create_clock -period 3000 -name clk [clock_ports]
❖
❖ Fanout
➢ Returns all the pins and ports in the fanout cone for the specified
pins and ports.
85
Analysis and Report :
❖ Fanin
➢ Returns all the pins, ports, and subports in the fanin cone for the specified pins and ports
➢ The following example returns all the
pins in the fanin cone for port out:
■ rc:/> fanin out
/designs/test/instances_seq/out_reg/pins_out/Q
/designs/test/instances_seq/out_reg/pins_in/CK
➢ The following example specifies to only return the startpoint for port out shown in the
design above:
■ rc:/> fanin out -startpoint out
/designs/test/instances_seq/out_reg/pins_in/CK
➢ The following example executes a path disable from all the start points that fan out to
reg1/D:
■ rc:/> path_disable -from [fanin -startpoint reg1/D]
86
Analysis and Report :
❖ Fanout
➢ Returns all the pins, ports, and subports in the fanout cone for the specified pins and ports
➢ The following example returns all the
pins in the fanout cone of port en
The design shown in figure.
■ rc:/> fanout en
➢ The following example executes a path disable on all the endpoints to which reg1/CK fans
out:
■ rc:/> path_disable -to [fanout -endpoint reg1/CK]
87
Analysis and Report :
➔ report {area | boundary_opto | cdn_loop_breaker | cell_delay_calculation |
clock_gating | clocks | congestion | cwd | datapath | design_rules |
dft_chains | dft_registers | dft_setup | dft_violations |
disabled_transparent_latches | gates | hierarchy | instance | isolation |
level_shifter | memory | memory_cells | messages | net_cap_calculation |
net_delay_calculation | net_res_calculation | nets | operand_isolation | ple
| port | power | power_doamin | qor | scan_power | sequential |
slew_calculation | state_retention | summary | timing | yield}
➔ report clock_gating
◆ Reports clock-gating information for the design.
◆ -detail Reports detailed clock-gating information. Lists all the clock-gating instances inserted,
including the library cell used for the clock-gating cell, the clock-gating style, the signals
connected to the inputs and outputs of the gating logic, and the flip-flops gated by this gating
cell. If you specify only this option, the return value of this command is the total number of
clock-gating logic inserted in the design 88
Analysis and Report :
➔ report_clocks
◆ Generates a report on the clocks of the current design. Reports the clock period,
rise, fall,domain, setup uncertainty, latency, clock ports or sources in the
current design. Use the -generated option to report generated clock
information, and use the -ideal option to report an ideal clock - clock
relationship.
➔ report_congestion
◆ Reports the total number (and percentage) of gcells with overflow, the total
overflow of the design as well as the maximum overflow and the associated
gcell.
➔ report design_rules
◆ Reports any design rule violations that are present in the specified design
objects like Max_transition, Max_capacitance, Max_fanout.
89
Analysis and Report :
➔ report_gates
◆ report_gates [-library_domain library_domain_list] [-power] [-yield]
[-instance_hier instance] [design] [> file]
◆ Reports the technology library cells that were implemented (and identifies their originating
libraries), the area of the cell instances, and the break up of the instances into timing models,
sequential cells, inverters and logic gate cells.
◆ Optionally power information can be reported. Note: Timing models can refer to memory cells, IPs,
integrated clock-gating cells, and so on.
➔ report_nets
◆ report_nets [-hierarchical] [-pin pin...] [-minfanout integer] [-maxfanout
integer] [net | instance]... [-sort string] [-cap_worst integer] [> file]
◆ Generates a report on the nets of the current design. The report gives information for the top-level
nets in the design. You can specify pin names, nets, instances, maximum and minimum fanout
threshold values, nets, and instances.
◆ Control the data printed out using the -minfanout and -maxfanout options for nets that have
fanout between these values.
90
Analysis and Report :
➔ report_ple
◆ report_ple [design]... [> file]
◆ Returns the physical layout estimation information for the specified design. The command
reports information like aspect ratio, shrink factor, site size, layer names, direction of
layers, capacitance, resistance, area, and the source used to extract the physical
information.
➔ report_power
◆ { -rtl_cross_reference [-detail] [-flat [-nworst number]] [-sort
mode] [design | instance] [-mode mode] [-tcf_summary] [-hier | -flat
[-nworst number]] [-depth number] [-sort mode] [design | instance |
net] [-mode mode] [-tcf_summary] -clock_tree [clock] -width float
-height float }
◆ Reports the power consumed. The information returned depends on your current position in
the design hierarchy and on the specified objects. If no objects are specified, the report is
given for the design or instance at the current position in the design hierarchy.
91
Extracting Output files :
➔ Write_def
◆ write_def [-ignore_groups] [-ignore_placed_instances] [-scan_chains]
[design] [-version] [> file]
◆ Writes a floorplan, in DEF format, for the specified design. RTL Compiler does not store all
the information from the original DEF (for example, VIAS, SLOTS, ROWS, TRACKS, etc.).
However, the generated floorplan includes data from both the RTL Compiler session as well
as the original imported DEF. The DEF does not contain the netlist information (net
connectivity information) aside from the power/ground nets defined in the input DEF
(SPECIAL NETS section).
➔ Write_hdl / write -mapped
◆ Write_hdl [-abstract] [-depth] [-equation] [-generic] [-language]
[-lec] [-suffix] [-pg] [> file]
◆ Automatically write out a gzip compressed Verilog file.
◆ Generates a structural netlist using generic logic
◆ Generates a structural netlist using mapped logic
92
Extracting Output files :
➔ write_sdc
◆ write_sdc [-version {1.1|1.3|1.4|1.5|1.5rc}] [-strict] [-mode mode_name]
[-no_split] [design] [> file]
◆ Writes out the current design constraints in Standard Design Constraint (SDC) format. The
write_sdc command can also compress the SDC constraints with gzip (.gz extension).
◆ For those SDCs that are not supported, RTL Compiler will issue a warning message but store
them for output for the write_sdc command. RTL Compiler will only store the SDCs and not
manipulate any data with them
93
Constraints- DC_shell Vs Genus:
94
Constraints- DC_shell Vs Genus:
95
Analyzing Results- DC_shell Vs Genus:
96
Saving design- DC_shell Vs Genus:
97
Generic Flow:
#set the paths
set_db init_lib_search_path path
set_db init_hdl_search_path path
#load the library
set_db library library_name
#load and elaborate the design
read_hdl design.v
elaborate
#specify timing and design constraints
read_sdc sdc_file
#synthesize the design
syn_generic
syn_map
#analyze design
report_area
report_timing
report_gates
#export design
write_hdl > dessign.vm
write_sdc > constraints.sdc
write_script > constraints.g
98