Half-Cycle Paths and Duty Cycle
Time a path between opposite clock edges, find its hold check, and see how the duty cycle moves its budget.
You Will Be Able To
- Find the launch and capture edges of a rise-to-fall and a fall-to-rise path.
- Explain why the hold check of a half-cycle path has a large margin.
- Predict how a change in duty cycle moves each half-cycle slack.
- Write
-waveformfor a clock that is not high half the time.
- Lesson
- T3.2
- Time
- 25 min
- Runs on
- OpenROAD
- Check
- 5 questions
A designer gave a path from a rising-edge flop to a falling-edge flop 2 ns, the full clock period. The tool gave it 1 ns, the high phase of the clock. The setup slack is 0.5301 ns, and at a 40 % duty cycle only 0.3301 ns.
fr → fnsetup check, latest arrival2 cells
- Clock latency
- Cell delay
- Setup time
- Launch on the rising edge
The rising edge at 0 ns launches fr. Its clock-to-Q is 0.3171 ns.
- Capture on the falling edge
The clock falls at 1.0 ns. The setup time of fn, 0.1242 ns, sets the required time to 0.8758 ns.
- Half a period
Slack 0.5301 ns. A full-period check would have given about 1 ns more.
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk fall edge at 1.0000 ns, latency 0.0000 ns, library setup time −0.1242 ns.
Arrival 0.3457 ns, required 0.8758 ns, slack 0.5301 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fr/CLK → fr/Q | dfxtp_1 | rise | 0.3171 | 0.3171 | 0.0388 |
fr/Q → u1/A | wire q1 | rise | 0.0000 | 0.3171 | 0.0388 | |
| 2 | u1/A → u1/Y | inv_1 | fall | 0.0286 | 0.3457 | 0.0173 |
u1/Y → fn/D | wire n1 | fall | 0.0000 | 0.3457 | 0.0173 |
The report
Startpoint: fr (rising edge-triggered flip-flop clocked by clk)
Endpoint: fn (falling edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ fr/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0024 0.0388 0.3171 0.3171 ^ fr/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0388 0.0000 0.3171 ^ u1/A (sky130_fd_sc_hd__inv_1)
1 0.0018 0.0173 0.0286 0.3457 v u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0173 0.0000 0.3457 v fn/D (sky130_fd_sc_hd__dfrtn_1)
0.3457 data arrival time
0.1000 1.0000 1.0000 clock clk (fall edge)
0.0000 1.0000 clock network delay (ideal)
0.0000 1.0000 clock reconvergence pessimism
1.0000 v fn/CLK_N (sky130_fd_sc_hd__dfrtn_1)
-0.1242 0.8758 library setup time
0.8758 data required time
-------------------------------------------------------------------------------------
0.8758 data required time
-0.3457 data arrival time
-------------------------------------------------------------------------------------
0.5301 slack (MET)OpenSTA 3.1.0 on the sky130 tt library, ideal 2 ns clock with 50 % duty and a 0.1 ns slew, no wires.
Which Edges a Half-Cycle Path Uses
A flop that captures on the falling edge turns every path into it into a half-cycle path. The launch is a rising edge, and the capture is the next falling edge of the same clock. With the default waveform, that falling edge comes exactly half a period after the launch. The data therefore gets half the time a normal flop-to-flop path would get.
- Cycle 0
The rising edge launches fr. Its data must reach fn before the clock falls.
- Cycle 4
The falling edge at 1 ns captures fn, and the same edge launches the next path out of fn.
- Cycle 8
The rising edge at 2 ns captures fr2. Each path gets one phase of the clock, not a whole period.
Each half-cycle path gets one clock phase: the high phase for rise to fall, the low phase for fall to rise.
The path out of fn works the same way, from the fall at 1 ns to the rise at 2 ns. Its slack is 0.4833 ns. The falling-edge flop has a slower clock-to-Q, 0.4016 ns, so this half is the tighter one.
The fall-to-rise path, fn to fr2
fn → fr2setup check, latest arrival2 cells
- Clock latency
- Cell delay
- Setup time
Read the path as a table
Launch: clk fall edge at 1.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 2.0000 ns, latency 0.0000 ns, library setup time −0.0857 ns.
Arrival 1.4310 ns, required 1.9143 ns, slack 0.4833 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fn/CLK_N → fn/Q | dfrtn_1 | rise | 0.4016 | 1.4016 | 0.0436 |
fn/Q → u2/A | wire q2 | rise | 0.0000 | 1.4016 | 0.0436 | |
| 2 | u2/A → u2/Y | inv_1 | fall | 0.0294 | 1.4310 | 0.0176 |
u2/Y → fr2/D | wire n2 | fall | 0.0000 | 1.4310 | 0.0176 |
The report
Startpoint: fn (falling edge-triggered flip-flop clocked by clk)
Endpoint: fr2 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 1.0000 1.0000 clock clk (fall edge)
0.0000 1.0000 clock network delay (ideal)
0.1000 0.0000 1.0000 v fn/CLK_N (sky130_fd_sc_hd__dfrtn_1)
1 0.0024 0.0436 0.4016 1.4016 ^ fn/Q (sky130_fd_sc_hd__dfrtn_1)
q2 (net)
0.0436 0.0000 1.4016 ^ u2/A (sky130_fd_sc_hd__inv_1)
1 0.0017 0.0176 0.0294 1.4310 v u2/Y (sky130_fd_sc_hd__inv_1)
n2 (net)
0.0176 0.0000 1.4310 v fr2/D (sky130_fd_sc_hd__dfxtp_1)
1.4310 data arrival time
0.1000 2.0000 2.0000 clock clk (rise edge)
0.0000 2.0000 clock network delay (ideal)
0.0000 2.0000 clock reconvergence pessimism
2.0000 ^ fr2/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0857 1.9143 library setup time
1.9143 data required time
-------------------------------------------------------------------------------------
1.9143 data required time
-1.4310 data arrival time
-------------------------------------------------------------------------------------
0.4833 slack (MET)This is the setup path into fr2, taken from the same run.
The Hold Check Moves to the Earlier Edge
Hold asks whether new data reaches the capturing flop too soon, while the flop still samples the old data. For a same-edge path, the launch and the capture sit on one edge, which makes hold hard. For a half-cycle path, the capturing flop sampled its old data at the falling edge before the launch.
OpenSTA writes this pair one period later: launch at 2 ns, capture at 1 ns. It is the same check as a launch at 0 ns against the fall at −1 ns. The new data has half a period to stay away, so the hold slack is 1.2368 ns.
fr → fnhold check, earliest arrival2 cells
- Clock latency
- Cell delay
- Hold time
- The old sample
fn sampled its old data at the fall at 1 ns. It must hold it until 1.1075 ns.
- The new data
The next launch at 2 ns reaches fn at 2.3443 ns.
- Easy hold
Hold slack 1.2368 ns: half a period of margin.
Read the path as a table
Launch: clk rise edge at 2.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk fall edge at 1.0000 ns, latency 0.0000 ns, library hold time 0.1075 ns.
Arrival 2.3443 ns, required 1.1075 ns, slack 1.2368 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fr/CLK → fr/Q | dfxtp_1 | fall | 0.3082 | 2.3082 | 0.0249 |
fr/Q → u1/A | wire q1 | fall | 0.0000 | 2.3082 | 0.0249 | |
| 2 | u1/A → u1/Y | inv_1 | rise | 0.0361 | 2.3443 | 0.0278 |
u1/Y → fn/D | wire n1 | rise | 0.0000 | 2.3443 | 0.0278 |
The report
Startpoint: fr (rising edge-triggered flip-flop clocked by clk)
Endpoint: fn (falling edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: min
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 2.0000 2.0000 clock clk (rise edge)
0.0000 2.0000 clock network delay (ideal)
0.1000 0.0000 2.0000 ^ fr/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0022 0.0249 0.3082 2.3082 v fr/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0249 0.0000 2.3082 v u1/A (sky130_fd_sc_hd__inv_1)
1 0.0021 0.0278 0.0361 2.3443 ^ u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0278 0.0000 2.3443 ^ fn/D (sky130_fd_sc_hd__dfrtn_1)
2.3443 data arrival time
0.1000 1.0000 1.0000 clock clk (fall edge)
0.0000 1.0000 clock network delay (ideal)
0.0000 1.0000 clock reconvergence pessimism
1.0000 v fn/CLK_N (sky130_fd_sc_hd__dfrtn_1)
0.1075 1.1075 library hold time
1.1075 data required time
-------------------------------------------------------------------------------------
1.1075 data required time
-2.3443 data arrival time
-------------------------------------------------------------------------------------
1.2368 slack (MET)This is the min path of the same run, with the same 50 % clock.
Duty Cycle Moves the Budget
-waveform {rise fall} gives the edges of a clock in one period. -waveform {0 0.8} on a 2 ns clock makes it high for 0.8 ns and low for 1.2 ns: a 40 % duty cycle. Now the two half-cycle paths get different budgets.
| Check | 50 % duty (ns) | 40 % duty (ns) | Change |
|---|---|---|---|
| setup, fr → fn (high phase) | 0.5301 | 0.3301 | -0.2000 |
| setup, fn → fr2 (low phase) | 0.4833 | 0.6833 | +0.2000 |
| worst hold of the block | 1.2368 | 1.2008 | now on fn → fr2 |
The same netlist with -waveform {0 1} and {0 0.8}. The falling edge moved 0.2 ns earlier; nothing else changed.
One phase shrinks by exactly as much as the other phase grows, because the period stays the same. A clock whose duty cycle drifts, called duty-cycle distortion, therefore always hurts one half-cycle path in every pair. Clock buffers with unequal rise and fall delays cause such drift.
The two setup paths at 40 % duty
fr → fnsetup check, latest arrival2 cells
- Clock latency
- Cell delay
- Setup time
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk fall edge at 0.8000 ns, latency 0.0000 ns, library setup time −0.1242 ns.
Arrival 0.3457 ns, required 0.6758 ns, slack 0.3301 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fr/CLK → fr/Q | dfxtp_1 | rise | 0.3171 | 0.3171 | 0.0388 |
fr/Q → u1/A | wire q1 | rise | 0.0000 | 0.3171 | 0.0388 | |
| 2 | u1/A → u1/Y | inv_1 | fall | 0.0286 | 0.3457 | 0.0173 |
u1/Y → fn/D | wire n1 | fall | 0.0000 | 0.3457 | 0.0173 |
The report
Startpoint: fr (rising edge-triggered flip-flop clocked by clk)
Endpoint: fn (falling edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ fr/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0024 0.0388 0.3171 0.3171 ^ fr/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0388 0.0000 0.3171 ^ u1/A (sky130_fd_sc_hd__inv_1)
1 0.0018 0.0173 0.0286 0.3457 v u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0173 0.0000 0.3457 v fn/D (sky130_fd_sc_hd__dfrtn_1)
0.3457 data arrival time
0.1000 0.8000 0.8000 clock clk (fall edge)
0.0000 0.8000 clock network delay (ideal)
0.0000 0.8000 clock reconvergence pessimism
0.8000 v fn/CLK_N (sky130_fd_sc_hd__dfrtn_1)
-0.1242 0.6758 library setup time
0.6758 data required time
-------------------------------------------------------------------------------------
0.6758 data required time
-0.3457 data arrival time
-------------------------------------------------------------------------------------
0.3301 slack (MET)In this run the clock falls at 0.8 ns, which is 0.2 ns earlier than before.
fn → fr2setup check, latest arrival2 cells
- Clock latency
- Cell delay
- Setup time
Read the path as a table
Launch: clk fall edge at 0.8000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 2.0000 ns, latency 0.0000 ns, library setup time −0.0857 ns.
Arrival 1.2310 ns, required 1.9143 ns, slack 0.6833 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fn/CLK_N → fn/Q | dfrtn_1 | rise | 0.4016 | 1.2016 | 0.0436 |
fn/Q → u2/A | wire q2 | rise | 0.0000 | 1.2016 | 0.0436 | |
| 2 | u2/A → u2/Y | inv_1 | fall | 0.0294 | 1.2310 | 0.0176 |
u2/Y → fr2/D | wire n2 | fall | 0.0000 | 1.2310 | 0.0176 |
The report
Startpoint: fn (falling edge-triggered flip-flop clocked by clk)
Endpoint: fr2 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.8000 0.8000 clock clk (fall edge)
0.0000 0.8000 clock network delay (ideal)
0.1000 0.0000 0.8000 v fn/CLK_N (sky130_fd_sc_hd__dfrtn_1)
1 0.0024 0.0436 0.4016 1.2016 ^ fn/Q (sky130_fd_sc_hd__dfrtn_1)
q2 (net)
0.0436 0.0000 1.2016 ^ u2/A (sky130_fd_sc_hd__inv_1)
1 0.0017 0.0176 0.0294 1.2310 v u2/Y (sky130_fd_sc_hd__inv_1)
n2 (net)
0.0176 0.0000 1.2310 v fr2/D (sky130_fd_sc_hd__dfxtp_1)
1.2310 data arrival time
0.1000 2.0000 2.0000 clock clk (rise edge)
0.0000 2.0000 clock network delay (ideal)
0.0000 2.0000 clock reconvergence pessimism
2.0000 ^ fr2/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0857 1.9143 library setup time
1.9143 data required time
-------------------------------------------------------------------------------------
1.9143 data required time
-1.2310 data arrival time
-------------------------------------------------------------------------------------
0.6833 slack (MET)The low phase of the clock is now 1.2 ns long, so this path gains time.
| Hold check | 50 % duty (ns) | 40 % duty (ns) |
|---|---|---|
| fr → fn | 1.2368 | 1.4368 |
| fn → fr2 | 1.4008 | 1.2008 |
Both hold checks of the same two runs.
Hold moves too. Each half-cycle hold check is worth about half a period, and that half also follows the duty cycle. At 40 % the fall comes 0.2 ns earlier, so fr → fn gains 0.2 ns of hold and fn → fr2 loses 0.2 ns. The worst hold of the block moves to fn → fr2, at 1.2008 ns.
Margin for Duty Drift, Edge by Edge
When the real duty is not known exactly, the SDC must add margin for it. A plain set_clock_uncertainty adds that margin to every check: setup and hold, half-cycle and full-cycle alike. Duty drift only hurts paths between opposite edges, and only their setup.
set_clock_uncertainty -setup -rise_from clk -fall_to clk 0.1
set_clock_uncertainty -setup -fall_from clk -rise_to clk 0.1| SDC added | Setup fr → fn | Setup fn → fr2 | Worst hold |
|---|---|---|---|
| Nothing | 0.5301 | 0.4833 | 1.2368 |
| set_clock_uncertainty 0.1 | 0.4301 | 0.3833 | 1.1368 |
| The two lines above | 0.4301 | 0.3833 | 1.2368 |
The half block at 50 % duty, slacks in ns.
Both forms cost the two setup checks 0.1 ns. Only the plain form also takes 0.1 ns of hold, 1.1368 against 1.2368 ns. On a real block it would also charge every full-cycle path, which duty drift cannot hurt.
With propagated clocks, STA already sees the drift that the tree's own rise and fall delays cause. The explicit margin is for the source: the oscillator or PLL that makes the clock.
The Fastest Clock for a Half-Cycle Design
Each half-cycle path must fit its data delay and setup time into half a period. The period must therefore be at least twice the larger need. Here fn → fr2 needs 0.5167 ns per half, which gives 1.0334 ns.
At a 1.0334 ns clock OpenSTA reports a WNS of 0.0000 ns: the path has exactly no margin left. report_clock_min_period cannot give this number here, as the Tool note below explains.
An inverted clock is written -waveform {1 2}: it rises at 1 ns and falls at 2 ns. On this block the two flop types simply swap edges, and the slacks stay 0.5301 and 0.4833 ns.
Where Half-Cycle Paths Come From
Designers use half-cycle paths on purpose in several places. A double data rate (DDR) interface sends one bit on each clock edge, rising and falling. A scan lockup element holds data for half a cycle between two clock domains during scan shift. Some designs also place negative-edge flops on purpose to split a long path over two phases.
They also appear by accident. A clock inverter in the netlist turns a rising-edge flop into a falling-edge one. The path into that flop then loses half of its budget, and nobody may notice until the timing report. With propagated clocks, the delay of that inverter also moves the capture edge a little later.
Asked in interviews
What is a half-cycle path?
A path launched on one clock edge and captured on the opposite edge. Its setup budget is one clock phase, not the whole period.
Why is hold easy on a half-cycle path?
The capturing flop sampled its old data half a period before the launch. New data would have to arrive half a period early to disturb it.
How does duty cycle affect timing?
It sets the length of each phase. A lower duty cycle shortens the high phase and lengthens the low phase, so rise-to-fall paths lose exactly what fall-to-rise paths gain.
Try It
This is the 50 % clock. Run it and open Paths: two setup paths, one per phase, at 0.5301 and 0.4833 ns. The worst hold, 1.2368 ns, has half a period of margin.
Now add -waveform {0 0.8} to the clock and run again. Watch one setup slack fall by 0.2 ns and the other rise by 0.2 ns. Try {0 1.2} to see the opposite.
Run to draw the timing paths here.
WNS 0.4833 ns worst minimum slack 1.2368 nsRead the netlist: half.v (the bundled design half)
// half: a rising-edge flop feeds a falling-edge flop (dfrtn_1) through one inverter, and back.
module half (clk, rst_n, d, q);
input clk; input rst_n; input d; output q;
wire q1, n1, q2, n2;
sky130_fd_sc_hd__dfxtp_1 fr (.CLK(clk), .D(d), .Q(q1));
sky130_fd_sc_hd__inv_1 u1 (.A(q1), .Y(n1));
sky130_fd_sc_hd__dfrtn_1 fn (.CLK_N(clk), .D(n1), .RESET_B(rst_n), .Q(q2));
sky130_fd_sc_hd__inv_1 u2 (.A(q2), .Y(n2));
sky130_fd_sc_hd__dfxtp_1 fr2 (.CLK(clk), .D(n2), .Q(q));
endmodule
Check Yourself
Common Mistakes
Wrong Budget a rise-to-fall path as if it had the full clock period.
The capture edge is the next falling edge, so the path gets only the high phase of the clock.
Fix Budget the high phase (rise to fall) or the low phase (fall to rise), as the edges say.
Wrong Leave the -waveform default when the clock is not 50 % duty.
The default puts the falling edge at half the period, so every half-cycle slack is wrong by the duty error.
Fix Give the real edges with -waveform, and add any unknown duty drift as setup uncertainty between opposite edges.
create_clock -name clk -period 2.0 [get_ports clk]create_clock -name clk -period 2.0 -waveform {0 0.8} [get_ports clk]Wrong Size a half-cycle design with OpenSTA's report_clock_min_period.
On this block, where every flop-to-flop path runs between opposite edges, OpenSTA 3.1.0 printed a minimum period of 0.
Fix Read the slack of each half-cycle path, and check both phases.
Remember
- A path from a rising-edge to a falling-edge flop gets one clock phase, not the whole period.
- Its hold check pairs the launch with the opposite edge before it, so hold has half a period of margin.
- -waveform sets the edges; a lower duty cycle takes from the high phase exactly what it gives to the low phase.
- Duty-cycle drift hurts one half-cycle setup in every pair; add margin for it between opposite edges only.