Timing Constraints Tutorial: Part 1 - CLOCKS: The Constraints Backbone
Timing Constraints Tutorial: Part 1 - CLOCKS: The Constraints Backbone
Have you found yourself frustrated at the lack of some decent timing constraints? Perhaps made
critical floorplanning and placement decisions only to have them thrown out because someone
forgot to mention a tiny detail in the constraints? Often times, the role of timing constraints is
marginalized until it‟s just too late.
Instead of assuming the constraints are correct, and getting rid of the attitude “That‟s not my
responsibility” or “I didn‟t know”, let‟s explore some questions we can ask the Timing
Constraint Designer that will help insure quality up front, instead of patching them in later on.
Even if you‟re not responsible for writing the constraints, at least this will help you become more
aware of what to look for to avoid a disaster.
I‟m going to assume right off the bat that you have a wonderful document in your hands that
might have the name “Clock and Timing Specification”. What‟s that you say? You never
received one? Never heard of such a thing? Indeed more often than not, a document which
clearly defines the clocking and timing relationship of a design can also fall by the wayside.
That‟s ok, let‟s use the same questions to help build a timing specification as well. But it sure
would have been nice to have that document, right? Insist on it as soon as possible!
1. Clock Constraints
2. I/O Constraints
3. Path Exceptions
4. Design Rules and Operating Modes
I hope you walk away with some of the right questions to ask, and perhaps get your feedback on
ones I might have over looked. In between, I‟ll try and add some famous last words for a little
humor to lighten the mood. Isn‟t timing analysis supposed to be fun anyway?
Timing constraints would have nothing to time against if there were no clocks defined. Let‟s
first go over the questions to ask about the clocks and whether the constraints reflect that or not.
“But in school, they never told us that things are not ideal in the real world!”
Source Locations (Internal/External)
o Where is the clock entering the system?
o Through an I/O cell?
o From the output of a clock divider?
o How about an on-chip PLL?
o Later on, are you adjusting that PLL correctly?
“You mean I didn‟t have to spend my entire vacation closing timing on these 10,000 violating
paths because they were false?”
“You really think you‟re passing timing on that clock gate with only 1ps of uncertainty? Sure
you don‟t want a little cushion in that?”
“Management didn‟t tell you they purchased a PLL that had 350ps of jitter? Hey it was on
sale!! What did you expect?”
Now to help check some of these items, I like to run the check timing analysis function in
Encounter (check_timing). This helps give a quick and organized report to review and share
with whoever is responsible for the constraints.
In the case of clocks, it will help find flops that are not receiving any clocks, spot where clock
gating situations occur, or even when multiple clocks are arriving at a destination. All of this can
point out big flaws in the constraints or even design.
Next time, we‟ll go over the importance of having good I/O constraints and what to look for!
It wouldn‟t be a chip or block if it didn‟t have to talk to something other than itself right? We
could always assume that every input arrives at exactly the same time, and every output has
exactly the same amount of external delay. The downside is you may never realize some of the
more complex aspects of the I/O timing without digging a little further. Last time we talked
about the right questions to ask with respect to the clocks, now let‟s go over some items to check
in the constraints dealing with I/O and port communication.
Pad/Bus/Interface Identifications
o Where is data entering the system?
o Is there a relationship in the form of a bus or a more general interface?
o Are there skew requirements that need to be set?
o Is this an interface that is being referenced by a clock leaving the system with the
data, or perhaps data received with incoming clock? (such as a DDR)
Reference Clock
o What clock domain will this data communicate with?
o Do you want to use virtual clocks as the reference clock(s)?
“That’s great you closed timing on the interface. Too bad it was with the wrong clock.”
Implementation of I/O
o Is data entering the system through a bi-directional I/O?
o Is data on this I/O only entering or only leaving the system?
“Wait, you mean data flows in both directions? Why didn’t someone tell me that!”
“The customer told me that the data could arrive at the beginning of the clock all the way to
the end of the clock. That should be easy to meet…”
“The only thing with my block is, it must be in a loving environment. Only sharp input slews
and low output capacitance will do with this cream puff.”
Going back to the check_timing report, it should list any I/O ports that have no constraint
input/output delay associated with it. While you may have a set_false_path -from/-to on the port,
it will still remind you to double check that.
Another thing to think about, if the constraints have been partitioned from the top-level in
Encounter, the I/O constraints should have good realistic values for the items above. Of course
you better hope the constraints at the top-level were defined correctly…
Next time in part 3, we‟ll tackle the questions to ask for Exception Path Timing!
More often than not, I‟ll start an optimization on a block only to have it result in thousands of
timing violations. Many times, the culprit is a missing path exception constraint. When you see
timing violations that are suspicious, ask the RTL/constraint developer whether there are
exceptions to the timing rules you‟re trying to meet. Let‟s go over some items to consider when
debugging timing!
Multi-Cycle
o (set_multicycle_path)
o Are certain paths allowed more than one clock cycle?
o Have these been properly defined for BOTH setup and hold?
“So my setup violation went away, but now I have -2ns hold violation. Come on, that can’t be
real?!”
False Paths
o (set_false_path)
o Are there asynchronous paths, or ones that no timing is necessary?
o Are you sure that wildcard „*‟ is being applied correctly in this case?
Path Delay
o (set_min_delay/set_max_delay)
o Is there a minimum or maximum amount of time a path should take?
“So you’d like me to work with a path delay between 1.000ns to 1.001ns in all corners. Let me
just put my blind fold on and tie this hand behind my back, cause you’re about to see some
magic…”
Constants
o (set_case_analysis)
o Are there any ports or the output of a flop that sets the functional or test mode of
the constraints?
“Then I disabled the timing arc on this clock gate and all my problems went away”
“Good news! I reduced that ring oscillator thingy you guys added in down to a single
inverter. Yeah, I know, you can thank me later.”
Next up in the last segment of this series we‟ll discuss Design Rules and Modes of Operation.
See you then!
This is the last in the series of Constraint Construction blogs! Today we‟re going to go over
DESIGN RULES and MODES OF OPERATION.
Often times, these rules are indeed set in the timing library. But perhaps you want sharper
transitions in your design to reduce noise issues. Or maybe you want to give yourself some
margin of safety with minimum capacitance. Let‟s go over the main design rules to live by.
Max Fanout
o How many cells should each instance drive?
o Does the timing library set this at all or is it necessary for any specific library cells
or instances in the design?
Min/Max Transition
o What is the maximum slew that each pin in the system should have? Should you
have max transitions on any input or output ports?
“So I cranked the max transition down to 100ps, and all my noise problems went away. Of
course the design doesn’t meet timing and is packed with buffers. But focusing on the good,…
I got rid of the noise!”
Min/Max Capacitance
o Should there be a limit to the load on each driving pin?
o Perhaps even on an input port or internal net?
Design Environment
o What timing library should we use?
o Which timing corners (PVT)?
o Will you be setting the operating conditions in the constraints?
“So you’re saying there is a Best Case environment? Why would I care about that if it’s so
good?”
Functional Mode(s)
Test Mode(s)
o Are there test modes that differ significantly from the functional operation (JTAG
Boundary Scan, BIST/MBIST, Shift, and Capture)?
o Have these been defined correctly as well?
Well, I hope this has been informative for everyone! The goal here is, whenever you get some
constraints from someone, and you are not sure how well they are „constructed‟, reference back
to this and ask these simple questions and you just might catch problems early enough!
To read up some more on this topic, check out this section in the Encounter docs (please note, to
access the doc requires and account and password): Setting Constraints and Performing Timing
Analysis in Encounter RTL Compiler
Thomas Moore This is the last in the series of Constraint Construction blogs! Today we‟re going
to go over DESIGN RULES and MODES OF OPERATION.
Often times, these rules are indeed set in the timing library. But perhaps you want sharper
transitions in your design to reduce noise issues. Or maybe you want to give yourself some
margin of safety with minimum capacitance. Let‟s go over the main design rules to live by.
Max Fanout
o How many cells should each instance drive?
o Does the timing library set this at all or is it necessary for any specific library cells
or instances in the design?
Min/Max Transition
o What is the maximum slew that each pin in the system should have? Should you
have max transitions on any input or output ports?
“So I cranked the max transition down to 100ps, and all my noise problems went away. Of
course the design doesn’t meet timing and is packed with buffers. But focusing on the good,…
I got rid of the noise!”
Min/Max Capacitance
o Should there be a limit to the load on each driving pin?
o Perhaps even on an input port or internal net?
Design Environment
o What timing library should we use?
o Which timing corners (PVT)?
o Will you be setting the operating conditions in the constraints?
“So you’re saying there is a Best Case environment? Why would I care about that if it’s so
good?”
Test Mode(s)
o Are there test modes that differ significantly from the functional operation (JTAG
Boundary Scan, BIST/MBIST, Shift, and Capture)?
o Have these been defined correctly as well?
Well, I hope this has been informative for everyone! The goal here is, whenever you get some
constraints from someone, and you are not sure how well they are „constructed‟, reference back
to this and ask these simple questions and you just might catch problems early enough!