Professional Documents
Culture Documents
Clock
Application Note
Version 1.0, August 2009
Comments?
Send comments on the documentation by going
to http://solvnet.synopsys.com and clicking
Enter a Call to the Support Center.
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, AMPS, Astro, Behavior Extracting Synthesis Technology, Cadabra, CATS, Certify, CHIPit, Design
Compiler, DesignWare, Formality, HDL Analyst, HSIM, HSPICE, Identify, iN-Phase, Leda, MAST, ModelTools,
NanoSim, OpenVera, PathMill, Physical Compiler, PrimeTime, SCOPE, Simply Better Results, SiVL, SNUG, SolvNet,
Syndicated, Synplicity, the Synplicity logo, Synplify, Synplify Pro, Synthesis Constraints Optimization Environment,
TetraMAX, the Synplicity logo, UMRBus, VCS, Vera, and YIELDirector are registered trademarks of Synopsys, Inc.
Trademarks ()
AFGen, Apollo, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, BEST, Columbia, Columbia-CE, Confirma, Cosmos,
CosmosLE, CosmosScope, CRITIC, CustomSim, DC Expert, DC Professional, DC Ultra, Design Analyzer, Design
Vision, DesignerHDL, DesignPower, DFTMAX, Direct Silicon Access, Discovery, Eclypse, Encore, EPIC, Galaxy,
Galaxy Custom Designer, HANEX, HAPS, HapsTrak, HDL Compiler, Hercules, Hierarchical Optimization
plus
Technology, High-performance ASIC Prototyping System, HSIM , i-Virtual Stepper, IICE, in-Sync, iN-Tandem,
Jupiter, Jupiter-DP, JupiterXT, JupiterXT-ASIC, Liberty, Libra-Passport, Library Compiler, Magellan, Mars, Mars-Rail,
Mars-Xtalk, Milkyway, ModelSource, Module Compiler, MultiPoint, Physical Analyst, Planet, Planet-PL, Polaris,
Power Compiler, Raphael, Saturn, Scirocco, Scirocco-i, Star-RCXT, Star-SimXT, System Compiler, System
Designer, Taurus, TotalRecall, TSUPREM-4, VCS Express, VCSi, VHDL Compiler, VirSim, and VMC are trademarks
of Synopsys, Inc.
Page ii
Contents
Introduction ............................................................................................................ 1
Clock Definition ..................................................................................................... 1
Generated Clocks .................................................................................................. 2
Reconvergent Clocks ............................................................................................ 3
Clock Propagation ................................................................................................. 4
Dynamic Clock Simulation (DCS).......................................................................... 6
Clock Reporting and Debugging ........................................................................... 7
Summary ............................................................................................................... 9
Page iii
Introduction
In the second phase of analysis, you specify all the clocks and topologies in the
design. You can also provide specifics on I/O constraints in SDC format, case
settings and logic constraints, timing exceptions, user-defined timing checks, and
parasitics in either this phase or the next. Some case analysis settings and logic
constraints might be necessary before topology matching to get maximum clock
penetration or for correct MUX recognition, for example. It is generally advisable to
defer specifying case settings and logic constraints until after check_topology so
that you dont have to re-run check_topology to see the effects of changing such
constraints in the design. In this section we will look at clock specification and
propagation in NanoTime.
Ensuring proper clock propagation is crucial for successful timing analysis using
NanoTime. Identifying correct clocks in a design is important for several reasons:
Topology recognition: structures that rely on clocks such as clock gates, sequential
devices like latches, flip flops, domino cells, memory elements, etc.
Installing correct default timing checks: setup/hold checks and clk-to-q checks for latches,
flip-flops, domino precharge structures, input/output constraint checks, etc.
Creating user-defined timing checks.
Tip: As a general practice, always make sure that the clocks are reaching all the
expected points in the design before evaluating the timing report because
unpropagated clocks lead to missing timing paths and checks.
Clock Definition
In case NanoTime is unable to propagate clocks to all the expected endpoints in the
design, there are several commands, variables, and attributes available to you that
check the clock network and also help with debugging any issues. Clocks are
specified using the create_clock and create_generated_clock commands in
NanoTime. For example,
create_clock -name clk1 \
-period 2.0 \
-waveform {0 1} \
[get_ports clk1]
Page 1
By default, NanoTime treats all clocks as propagated clocks. For propagated clocks,
NanoTime calculates the cumulative delays along the clock network, including wire
delay. The opposite is an ideal clock. For ideal clocks, NanoTime uses the latency
values set on clocks, ports, or pins using the set_clock_latency command, or
zero latency if none has been set.
You can control the ideal or propagated clocking behavior in NanoTime using the
timing_all_clocks_propagated variable or the set_propagated_clock and
remove_propagated_clock commands.
Tip: A few more points about ideal clocking:
Use the set_clock_transition command to set the slope at the ideal clock-tree
endpoints; use the set_input_transition command for propagated clocks
Use set_clock_latency source to specify the source latency, or the delay from
the external ideal waveform to the clock definition point in the design
Use set_clock_latency (without the source option) to specify network
latency, or the delay from the clock definition point to the sequential elements in the
design
Generated Clocks
Another method of specifying clocks in a design involves using the
create_generated_clock command. Using this command, you can create a clock
object and apply the clock to a specified source object in the current design. The
timing characteristics, such as period, waveform, and latency, of the generated clock
depend on another clock in the design, called the master clock. If you change the
characteristics of the master clock, then the generated clock characteristics also
change accordingly.
An example usage of create_generated_clock is shown in Figure 1. The
command used is:
create_generated_clock name CLK2 source [get_ports SCLK] \
divide_by 2 [get_pins FF1/Q]
Page 2
Generated clocks can only be specified on actual design objects like port, pin, or net;
you cannot specify a virtual generated clock
A generated clock can, however, be referenced off of a virtual clock source
Unlike create_clock, create_generated_clock can be applied on nets,
including non-stage boundary nets; NanoTime will promote proper pins to the timing
graph
This command can be used to create pulse clocks; it can also be used to create
inverted, multiplied, and divided clocks
To generate a timing model, you need to specify a source clock on a physical port/pin
which can then be referenced using the create_generated_clock source
option. Otherwise you will get a CMDS-047 warning ("Clock <clk> does not
have a source defined")
Reconvergent Clocks
NanoTime automatically detects simple clock shapers and clock pulse generators as
shown in Figure 2. The variable to control "detection of such circuits is
topo_clock_gate_allow_reconvergent_clocks. This variable is set to true by
default. Clock shapers and pulse generators are reported with an (s) or (p)
attribute in report_topology verbose structure_type clock_gate to
represent a clock shaper or a clock pulse generator, respectively.
Page 3
Clock Propagation
In NanoTime, clock propagation occurs when match_topology (or
check_topology in the absence of match_topology) is issued for the first time.
During the clock propagation phase, NanoTime pushes the clock property onto
nets/pins starting from the primary clock definition point through the inverters, buffers,
clock gates, and other structures on the clock network. NanoTime does not check the
logic settings that might otherwise prevent the clock flag from propagating
downstream. This is done to ensure that the clock property reaches all the valid
endpoints in the design.
Tip: In order to force NanoTime to take into consideration the logic settings on
the nets and devices on the clock path, set the variable
topo_clock_propagation_strict_logic_check to true; this strict logic
checking can result in fewer clock nets and sequential devices being reported
in the current design.
Page 4
Page 5
Clock propagation stops at the clock pins of sequential devices and at clock output
ports. If you want to continue clock propagation through a sequential device, use the
mark_clock_network force_propagation command. If you want to stop
clock propagation at any point in the design, use the mark_clock_network
stop_propagation command.
For example, the minimum set of commands required to correctly configure the clock
divider shown in Figure 3 is:
create_clock -name clk -period 2.0 -waveform {0 1} [get_ports clk]
create_generated_clock -name clkdiv2 -edges {1 3 5} \
-source [get_ports clk] [get_nets clkdiv2]
mark_clock_network -force [get_nets {xslave.lat}]
Page 6
The internal clock nodes are not visible in DCS; the clock tree is a black box with
waveforms available only at the clock network endpoints
DCS cannot be used with read_spice_model/set_technology flow
Set dcs_spice_header, dcs_control_header, dcs_number_of_cycles
variables to further customize the DCS simulation in NanoSim
Page 7
This shows that net clk was identified and marked as a clock net but no delay
numbers were calculated. If the same clock net is queried after trace_paths:
Net
Min Rise Min Fall Max Rise Max Fall Period
type
----------------- --------- --------- --------- --------- ----clk
0.182
1.113
0.182
1.113
2.000
Tip: The report_clock_arrivals tree [-net] utility is a powerful clock
debugging tool in NanoTime; using this, you can find out exactly how far a
particular clock signal traveled and through which devices.
Example report_clock_arrivals tree output:
0.000 r clk (Clock source pin)
`- 0.000 r x6.mn1.g(inv) (via net)
`- 0.023 f x7.mp1.g(inv) (via inverter)
`- 0.042 r xslave.mn1.g(simple_latch) (via inverter)
|- 0.067 f xslave.x2.mp1.g(inv) (via
force_propagation)
| |- 0.102 r x3.mn1.g(inv) (via inverter)
| | `- 0.127 f x4.mp1.g(inv) (via inverter)
| |
`- 0.151 r x5.mn1.g(inv) (via inverter)
| |
`- STOPPED f xmaster.x2.mp1.g(inv) (via
unknown gate type) (false path, logic blocking, other)
| `- 0.102 r clkdiv2 (via inverter) (generated clock
pin)
`- STOPPED r xslave.x2.mn1.g(inv) (via
force_propagation) (false path, logic blocking, other)
You can then focus on the STOPPED clock points and take appropriate action like
mark/remove a clock gate or check logic constraints or path exceptions that may be
preventing clock propagation at that point.
Tip: A few clock debugging tips:
NanoTime, by default, optimizes the timing graph by removing arcs that do not lead to
timing checks or to path endpoints that have timing checks associated with them; you
may see only one clock edge reported by report_clock_arrivals in such cases
o Dead-end paths
o User-defined false paths
For missing clocks, check if there are any:
o set_false_path
o set_case_analysis
Page 8
mark_instance dont_search_thru_gate
[-dont_search_thru_channel]
o Clock merging through a non-static gate
Certain topologies optimize away some arcs:
o Tgate controlled by an inverter
o MUX XOR
o Register files
Refer to SolvNet article 024540 for more information on clock propagation and
debugging tips in NanoTime. Refer to SolvNet article 024473 for clock gating and
pulse generation analysis in NanoTime.
Summary
Ensuring proper clock propagation is very crucial for successful static timing analysis using
NanoTime.
Several different types of clocks such as ideal, propagated, generated, divide-by, multiply-by,
pulse, etc. can be specified in NanoTime; gated clocks are also supported.
Clock selection through MUX is supported but a timing run can only be performed at a single
clock frequency in NanoTime; the path database needs to be cleared before performing timing
analysis at a different clock frequency in the same NanoTime session.
Dynamic Clock Simulation (DCS) can be performed for complex clock network using feedback
loops, simultaneous switching, etc.
Forcing and stopping clock propagation at design pin/net objects is supported in NanoTime;
report_clock_arrivals is a useful clock debugging tool.
Page 9