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 -waveform for 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.

Timing pathRise to Fall: Fr Launches at 0 Ns, Fn Captures at 1 Nsfr is a rising-edge flop. fn is a falling-edge flop (dfrtn_1). One inverter sits between them.

fr → fnsetup check, latest arrival2 cells

  • Clock latency
  • Cell delay
  • Setup time
Rise to fall: fr launches at 0 ns, fn captures at 1 ns00.10.20.30.40.50.60.70.80.91time (ns)launch clk ↑capture clk ↓Data arrivesRequired byfr/CLK → fr/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0286 ns2setup −0.1242 nsslack +0.5301 ns · metarrival 0.3457required 0.8758Rise to fall: fr launches at 0 ns, fn captures at 1 ns00.20.40.60.81time (ns)launch clk ↑capture clk ↓Data arrivesRequired byfr/CLK → fr/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0286 nssetup −0.1242 nsslack +0.5301 ns · metarrival 0.3457required 0.8758
  1. Launch on the rising edge

    The rising edge at 0 ns launches fr. Its clock-to-Q is 0.3171 ns.

  2. 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.

  3. 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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fr/CLK → fr/Qdfxtp_1rise0.31710.31710.0388
fr/Q → u1/Awire q1rise0.00000.31710.0388
2u1/A → u1/Yinv_1fall0.02860.34570.0173
u1/Y → fn/Dwire n1fall0.00000.34570.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.

A 2 Ns Clock at 50 % Duty, in 0.25 Ns StepsOne column per 0.25 ns. The setup check of fr to fn runs from the rise at 0 ns to the fall at 1 ns. The check of fn to fr2 runs from the fall at 1 ns to the rise at 2 ns.
0123456789101112131415clkfr launchesfn captures and launchesfr2 captures
Scroll horizontally ↔
  1. Cycle 0

    The rising edge launches fr. Its data must reach fn before the clock falls.

  2. Cycle 4

    The falling edge at 1 ns captures fn, and the same edge launches the next path out of fn.

  3. 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
Timing pathFall to Rise: Fn Launches at 1 Ns, fr2 Captures at 2 Ns

fn → fr2setup check, latest arrival2 cells

  • Clock latency
  • Cell delay
  • Setup time
Fall to rise: fn launches at 1 ns, fr2 captures at 2 ns11.11.21.31.41.51.61.71.81.92time (ns)launch clk ↓capture clk ↑Data arrivesRequired byfn/CLK_N → fn/Q (dfrtn_1): 0.4016 ns1 dfrtn_1u2/A → u2/Y (inv_1): 0.0294 ns2setup −0.0857 nsslack +0.4833 ns · metarrival 1.4310required 1.9143Fall to rise: fn launches at 1 ns, fr2 captures at 2 ns11.21.41.61.82time (ns)launch clk ↓capture clk ↑Data arrivesRequired byfn/CLK_N → fn/Q (dfrtn_1): 0.4016 ns1 dfrtn_1u2/A → u2/Y (inv_1): 0.0294 nssetup −0.0857 nsslack +0.4833 ns · metarrival 1.4310required 1.9143
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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fn/CLK_N → fn/Qdfrtn_1rise0.40161.40160.0436
fn/Q → u2/Awire q2rise0.00001.40160.0436
2u2/A → u2/Yinv_1fall0.02941.43100.0176
u2/Y → fr2/Dwire n2fall0.00001.43100.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.

Timing pathHold from Fr to Fn: The Fall Half a Period Before the LaunchThe launch is the rise at 2 ns. The capture is the fall at 1 ns, which samples the old data.

fr → fnhold check, earliest arrival2 cells

  • Clock latency
  • Cell delay
  • Hold time
Hold from fr to fn: the fall half a period before the launch11.21.41.61.822.2time (ns)launch clk ↑capture clk ↓Data arrivesRequired afterfr/CLK → fr/Q (dfxtp_1): 0.3082 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0361 ns2hold 0.1075 nsslack +1.2368 ns · metarrival 2.3443required 1.1075Hold from fr to fn: the fall half a period before the launch11.52time (ns)launch clk ↑capture clk ↓Data arrivesRequired afterfr/CLK → fr/Q (dfxtp_1): 0.3082 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0361 nshold 0.1075 nsslack +1.2368 ns · metarrival 2.3443required 1.1075
  1. The old sample

    fn sampled its old data at the fall at 1 ns. It must hold it until 1.1075 ns.

  2. The new data

    The next launch at 2 ns reaches fn at 2.3443 ns.

  3. 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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fr/CLK → fr/Qdfxtp_1fall0.30822.30820.0249
fr/Q → u1/Awire q1fall0.00002.30820.0249
2u1/A → u1/Yinv_1rise0.03612.34430.0278
u1/Y → fn/Dwire n1rise0.00002.34430.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.

Check50 % duty (ns)40 % duty (ns)Change
setup, fr → fn (high phase)0.53010.3301-0.2000
setup, fn → fr2 (low phase)0.48330.6833+0.2000
worst hold of the block1.23681.2008now 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
Timing pathRise to Fall at 40 % Duty

fr → fnsetup check, latest arrival2 cells

  • Clock latency
  • Cell delay
  • Setup time
Rise to fall at 40 % duty00.10.20.30.40.50.60.70.8time (ns)launch clk ↑capture clk ↓Data arrivesRequired byfr/CLK → fr/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0286 ns2setup −0.1242 nsslack +0.3301 ns · metarrival 0.3457required 0.6758Rise to fall at 40 % duty00.20.40.60.8time (ns)launch clk ↑capture clk ↓Data arrivesRequired byfr/CLK → fr/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0286 nssetup −0.1242 nsslack +0.3301 ns · metarrival 0.3457required 0.6758
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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fr/CLK → fr/Qdfxtp_1rise0.31710.31710.0388
fr/Q → u1/Awire q1rise0.00000.31710.0388
2u1/A → u1/Yinv_1fall0.02860.34570.0173
u1/Y → fn/Dwire n1fall0.00000.34570.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.

Timing pathFall to Rise at 40 % Duty

fn → fr2setup check, latest arrival2 cells

  • Clock latency
  • Cell delay
  • Setup time
Fall to rise at 40 % duty0.811.21.41.61.82time (ns)launch clk ↓capture clk ↑Data arrivesRequired byfn/CLK_N → fn/Q (dfrtn_1): 0.4016 ns1 dfrtn_1u2/A → u2/Y (inv_1): 0.0294 ns2setup −0.0857 nsslack +0.6833 ns · metarrival 1.2310required 1.9143Fall to rise at 40 % duty11.52time (ns)launch clk ↓capture clk ↑Data arrivesRequired byfn/CLK_N → fn/Q (dfrtn_1): 0.4016 ns1 dfrtn_1u2/A → u2/Y (inv_1): 0.0294 nssetup −0.0857 nsslack +0.6833 ns · metarrival 1.2310required 1.9143
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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fn/CLK_N → fn/Qdfrtn_1rise0.40161.20160.0436
fn/Q → u2/Awire q2rise0.00001.20160.0436
2u2/A → u2/Yinv_1fall0.02941.23100.0176
u2/Y → fr2/Dwire n2fall0.00001.23100.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 check50 % duty (ns)40 % duty (ns)
fr → fn1.23681.4368
fn → fr21.40081.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.

Margin between opposite edges, for setup only.
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 addedSetup fr → fnSetup fn → fr2Worst hold
Nothing0.53010.48331.2368
set_clock_uncertainty 0.10.43010.38331.1368
The two lines above0.43010.38331.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
  1. 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.

  2. 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.

  3. 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.

STAOpenSTA in OpenROAD 26Q2 · sky130hd tt_025C_1v80 Liberty · simulator service
Edit the constraints, then run them

          
Expected: WNS 0.4833 ns worst minimum slack 1.2368 ns
Read 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

Predict the outputThe same half block with -waveform {0 0.9}: a 45 % duty cycle. What worst setup slack (WNS) does OpenSTA report, in ns?
create_clock -name clk -period 2.0 -waveform {0 0.9} [get_ports clk]
set_clock_transition 0.1 [all_clocks]
Read the waveformThe same half block now runs at 40 % duty, as below. Which hold check is the worst of the block, and why?
clk at 40 % duty over two periods, in 0.25 ns steps
0123456789101112131415clk0 ns1 ns2 ns3 ns
Scroll horizontally ↔

Rising edges at 0 and 2 ns, falling edges at 0.8 and 2.8 ns (shown at the nearest step).

ConceptWhy is the hold slack of fr → fn (1.2368 ns) so much larger than its setup slack?
ConceptWhich of these is a half-cycle path?
ConceptTwo half-cycle paths in this block each need 0.6 ns of data delay plus setup. What is the shortest clock period, at 50 % duty?

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.

Before
create_clock -name clk -period 2.0 [get_ports clk]
After
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.

Practice

Report a problem with this page