Tcl · Module 20
Output Delays
An output delay is the mirror of an input delay: it reserves the part of the cycle the receiver still needs. Get the two wrong and the budget does not add up — usually in somebody else's favour.
Intermediate16 min readtcledapart-iisdcoutput-delaytimingbudget
Part II · Module 20 · Chapter 20.4 · Output Delays
Data leaving a block is not finished. It still has to travel to whatever captures it and arrive in time to satisfy that flop's setup requirement.
An output delay reserves that part of the cycle. Where an input delay says how much was already used before the data reached you, an output delay says how much must remain after it leaves.
1. The declaration
set_output_delay 0.3 -clock core_clk [get_ports {d_out[*]}]=== output delays applied ===
d_out[0] clock core_clk 0.3
d_out[1] clock core_clk 0.3The same shape as an input delay — a value, a clock, and a collection — applied to the whole output bus in one command.
2. The mirror
The two constraints describe the same cycle from opposite ends, and holding them as one model is easier than remembering two rules:
| Input delay | Output delay | |
|---|---|---|
| Describes | the sender's launch | the receiver's capture |
| Time it accounts for | already used before arrival | still needed after departure |
| Reduces | the budget for your logic | the budget for your logic |
| Missing default | data arrives at the edge | the full cycle is available to leave |
The last row is the important symmetry: both defaults are optimistic. An output with no delay declared is analysed as though the receiver needs nothing — the whole period is available to get the signal out of your block, which is never true.
3. Where the number comes from
The receiver's requirement, which is the sum of:
- the flop's setup time at the far end,
- the interconnect delay between the blocks,
- and any clock skew between the two domains that has to be covered.
Like the input delay, it should be a number agreed at the interface, written down outside the SDC. The two sides must use the same split — §5 is what happens when they do not.
4. As a fraction, again
set PERIOD 2.0
set OUT_FRAC 0.15
set_output_delay [expr {$PERIOD * $OUT_FRAC}] -clock core_clk [get_ports {d_out[*]}]Same reasoning as Chapter 20.3 §4. When the period changes the reservation follows, and a literal does not.
5. Make the budget add up
This is the part worth taking seriously, and it is three lines of ordinary Tcl in the constraints file itself:
set in_frac 0.20 ; set out_frac 0.15
puts [format " input %.2f (%.0f%% of %.1f)" [expr {$PERIOD*$in_frac}] [expr {$in_frac*100}] $PERIOD]
puts [format " output %.2f (%.0f%% of %.1f)" [expr {$PERIOD*$out_frac}] [expr {$out_frac*100}] $PERIOD]
puts [format " left for logic inside the block: %.2f (%.0f%%)" \
[expr {$PERIOD*(1.0-$in_frac-$out_frac)}] [expr {(1.0-$in_frac-$out_frac)*100}]]=== the budget split, stated explicitly ===
input 0.40 (20% of 2.0)
output 0.30 (15% of 2.0)
left for logic inside the block: 1.30 (65%)6. When the two sides disagree
The interface between two blocks has two constraints describing it: your output delay, and the receiver's input delay. They are supposed to be consistent.
When they are not, the gap is silent in both directions:
- Your output delay is smaller than their input delay. You reserved 0.2 for them; they are assuming 0.4 was used getting to them. Someone is 0.2 short, and both reports look clean because each block is meeting its own stated constraint.
- Both are generous. You reserve 0.4 and they assume 0.2. Nothing fails; you simply both worked harder than necessary, and somebody paid for area or power to meet a budget that did not exist.
Neither shows up as a violation. The only way to catch it is to check that the numbers at the two ends of an interface agree — which means they have to be recorded somewhere both blocks can see, and ideally derived from one shared file.
7. Which outputs need one
Every output. There is no equivalent of the clock-port exception from Chapter 20.3 §7 — a clock going out of a block is itself constrained differently, but an output carrying data always needs its budget reserved.
The check is the same one Chapter 20.8 runs:
ERROR 2 output port(s) with no output delay: d_out[0], d_out[1]And the same rule applies as for inputs: if an output genuinely does not need timing — a debug pin nobody samples — that is a false path with a reason, not an omission.
8. Exercises
Exercise 1. What does an output delay reserve, and for whom?
Exercise 2. State the mirror relationship between input and output delays in one sentence.
Exercise 3. What is assumed about an output with no delay declared?
Exercise 4. Why are missing output delays more common than missing input delays?
Exercise 5. Your input is 20% and your output is 15%. What is left, and why does printing it matter?
Exercise 6. Your output delay is 0.2 and the receiver's input delay is 0.4. What happens, and does either report show a violation?
Exercise 7. How do you make the two ends of an interface agree structurally?
Where this fits
Part of the Tcl curriculum.
