Skip to guide

Logic to reliable timing

Digital Design

Connect logic behavior to its physical timing contract, then choose safe structures for paths that cross cycles, clocks, and module boundaries.

Diagnose whether a failure comes from function, timing, constraints, or clock-domain assumptions and select a repair that remains safe in silicon.

Updated July 20265 connected chaptersInteractive labs + worked examples

One signal · four design contracts

Follow a bit from Boolean intent to safe state.

Inputs form a combinational result, a launch register samples it, the data path meets a capture aperture, and a synchronizer contains metastability before another clock domain consumes it.
Logic
Y = 1
Setup
+0.31 ns
Hold
+0.04 ns
CDC
2FF level
The design contract changes at every boundary.Boolean correctness, maximum and minimum delay, exception intent, and CDC protocol each require different evidence.

Logic and state

First decide whether the answer needs memory.

Digital logic becomes easier to reason about when every block has an explicit contract: transform current inputs, or sample and retain state. Timing then tells us whether that contract is physically achievable.

Combinational logic

y(t) = f(x(t))

Output depends only on current inputs. There is no intentional state or sampling edge.

Building blocks
AND, OR, NOT, XOR, mux and FPGA LUT selection, decoder, encoder, adder, subtractor, comparator, and shifter
Typical failure
Incomplete assignment infers storage; deep logic creates setup pressure.

Sequential logic

Q(next) = f(Q(now), x)

State changes at a defined event, normally a clock edge. Past history is represented by stored state.

Building blocks
Flip-flop, register, counter, shift register, finite-state machine, data pipeline, and memory interface
Typical failure
Unsynchronized inputs, reset-release hazards, and timing violations corrupt state.
1Specify

Truth table, equation, state diagram, or cycle-level contract.

2Implement

Combinational network plus the minimum intentional state.

3Time

Maximum delay for setup, minimum delay for hold, and CDC intent.

4Prove

Simulation, assertions, lint, STA, CDC, and implementation checks.

Setup, hold, and register paths

A receiving register needs a quiet aperture.

Setup checks the latest arriving data before capture. Hold checks the earliest changing data after capture. They use different delay corners and require different fixes.

Before the edge

Setup time

The minimum interval that D must be stable before the active capture edge. A setup failure means the maximum data path arrives after the required time.

Intuition: have the input ready before the sampling buzzer.

Tperiod + Tskew ≥ tCQ(max) + Tcomb(max) + TsetupTypical repairs: pipeline, restructure HDL, reduce logic depth, use faster cells or higher synthesis effort, improve placement, or lengthen the period as a last resort.
After the edge

Hold time

The minimum interval that D must remain stable after the active capture edge. A hold failure means the minimum data path changes too early.

Intuition: keep the input still just after the sampling buzzer.

tCQ(min) + Tcomb(min) ≥ Thold + TskewTypical repairs: insert minimum-delay cells, detour routing, or reduce harmful skew. Frequency reduction does not help.

Register timing boundaries

Data and clock race through different physical paths.

Clock pathData pathSetup boundaryHold boundary
Register-to-register setup and hold timing pathOne root clock travels to launch and capture registers with different latency. Data leaves the launch register after clock-to-Q, crosses combinational logic and routing, then must reach the capture register before setup and remain unchanged through hold. Clock skew is capture latency minus launch latency.LAUNCH DOMAINFF_AQ changes after tCQCAPTURE DOMAINFF_BD samples at active edgeLogic + routeTcomb(max) / Tcomb(min)tCQarrival at DTsetupTholdClock rootlaunch latencycapture latencyTskew = capture clock latency − launch clock latencyMAX → setupMIN → hold
Setup asks: can the latest data launched now arrive before the next capture edge minus Tsetup?Hold asks: can the earliest new data avoid contaminating the same capture edge through Thold?

Interactive waveform

Select the data transition relative to the capture edge.

Clock and data around one capture edgeThe purple region is the setup window before the capture edge. The amber region is the hold window after it. The selected data transition is at 214 on the time axis.CLKDSETUPHOLDcapture edge
Data is stable on both sides of the sampling edge.The transition finishes before the setup window begins. The receiving register sees one unambiguous value for the complete aperture.

Data is stable on both sides of the sampling edge. The transition finishes before the setup window begins. The receiving register sees one unambiguous value for the complete aperture.

Register-to-register timing lab

Change the path and watch max and min timing separate.

Positive capture skew gives the setup path more time but makes the hold requirement harder in this simplified same-clock model.

Solve arrival time first, required time second, then compute slack = required − arrival.

Live arrival versus requirement

Slack is the distance between two labelled boundaries.

All values in nanoseconds
Setup direction0.31 ns of max-path margin remains.Hold direction0.04 ns of min-path margin remains.
Setup slack0.31 ns

Required 1.88 ns − arrival 1.57 ns

Maximum path meets setup.
Hold slack0.04 ns

Arrival 0.18 ns − required 0.14 ns

Minimum path meets hold.

Setup slack 0.31 nanoseconds, passing. Hold slack 0.04 nanoseconds, passing.

Variation-aware timing

One path does not have one physical delay.

Process, voltage, temperature, local variation, crosstalk, and clock-tree behavior move launch, data, and capture delays differently. Signoff tests pessimistic combinations, not only a nominal waveform.

Setup cornerLate data, early capture

Slow launch clock-to-Q and data logic compete with an early capture clock edge. Maximum delay and frequency dominate.

Hold cornerEarly data, late capture

Fast launch clock-to-Q and a short data path compete with a late capture edge. Minimum delay and skew dominate.

OCV intuitionDerates model unequal variation

AOCV or POCV adjusts delay by path depth and variation. Common-path pessimism removal avoids charging the same shared clock segment as both early and late.

Timing intent

An exception must describe function, not discomfort.

False paths and multicycle paths change what static timing analyzes. Both need an architectural proof. They are not interchangeable fixes for a difficult implementation path.

Analyzed edge window

No launch-to-capture timing check remains.

analysis disabled
False path analyzed clock edgesThe path may exist structurally, but both setup and hold analysis are disabled, so no candidate capture edge is timed.C0C1C2C3SETUPHOLDlaunchset_false_path removes setup analysisset_false_path removes hold analysisFunctional proof must justify removing every candidate edge.
False does not mean slow. It means no legal mode can sensitize the path, so neither setup nor hold has a meaningful capture edge.

Path does not functionally exist

False path

No legal operating mode can sensitize this launch-to-capture path. Static timing sees a graph edge, but the design contract says the edge can never carry sampled data.

Setup
Removed from setup analysis
Hold
Removed from hold analysis
Proof obligation
Prove the mutual exclusion, test mode, reset state, or configuration invariant that makes the path unreachable.
Source example
A test-mode and functional-mode mux pair whose select conditions are mutually exclusive, so no legal state can sensitize the complete path.

Conceptual SDC

set_false_path -from [get_pins src_reg/Q] \
  -to [get_pins dst_reg/D]

Showing False path. No legal operating mode can sensitize this launch-to-capture path. Static timing sees a graph edge, but the design contract says the edge can never carry sampled data. No setup or hold capture edge is analyzed.

01

Name the functional mode.

Reset, test, configuration, enables, and clock mode all matter.

02

Inspect the actual edges.

Read the timing report after the exception, including hold.

03

Prove the assumption.

Use assertions, formal reachability, or protocol verification.

Clock-domain crossing

Transfer meaning, not merely wires.

Metastability is an analog consequence of sampling near an aperture. A CDC structure contains that risk and preserves the payload’s protocol: level, event, coherent value, or stream.

What the first flop is doing

Metastability cannot be simulated away.

With unrelated clocks, changing data eventually lands near a destination sampling aperture. The first flip-flop can then take an unpredictable analog time to resolve. Digital simulation usually shows a clean 0 or 1, so structural design, physical timing, and an MTBF target carry the guarantee.

Reliability intuition

MTBF ∝ e(Tresolve / τ) / (Fclk × Fdata)More resolution time improves reliability exponentially. Faster clocks and more input transitions create more opportunities for failure.

CDC structure selector

What must cross?

2-flop synchronizer topology. A stable single-bit level crosses from clk A into two destination flip-flops. Only the first stage may feed the second; destination logic uses the second stage.

Recommended mechanism

2-flop synchronizer

Two destination-clock flip-flops in series

The first stage may become metastable; the second gets almost a full destination period for that analog state to resolve.

  1. 1Asynchronous level
  2. 2Metastability containment
  3. 3Synchronized level
Design contract

The source level must remain stable long enough to be observed for at least one destination sampling opportunity.

Common mistake

Do not synchronize each bit of a related bus independently. Their resolving cycles can differ.

Delivery and backpressure

Usually two destination edges, with a possible extra cycle depending on phase. There is no acknowledgment or backpressure.

Verification focus

Constrain the minimum source pulse width, mark the synchronizer stages, place them close, and calculate MTBF for the real toggle and clock rates.

For Slow single-bit level, use 2-flop synchronizer. The first stage may become metastable; the second gets almost a full destination period for that analog state to resolve.

Why Gray pointers help an async FIFO

Only one pointer bit changes per adjacent count.

Binary 0111 → 1000 changes four bits. Gray 0100 → 1100 changes one. The synchronized pointer may be old, which is safe for conservative full/empty decisions, but it is far less likely to look like an unrelated mixed value.

Binary0111Binary10004 bits changeGray0100Gray11001 bit changes

Reset-domain crossing

Assert safely; release on each local clock.

An asynchronous reset may assert without a running clock, but its deassertion must satisfy recovery and removal. Synchronize deassertion separately in every clock domain, then exchange explicit ready or initialization state before domains interact.

Async assert2-stage local releaseDomain ready

Reconvergence risk

Related signals can become unrelated after crossing.

Two independently synchronized control bits can emerge on different destination cycles. Even duplicate synchronizers fed by one source may disagree temporarily. Synchronize once and fan out locally, or transfer an encoded state, bundle, handshake, or FIFO entry atomically.

CDC and RDC signoff

Structure finds risk; assertions prove the protocol.

  • Structural CDC/RDC analysis with reviewed, specific waivers
  • ASYNC_REG intent, synchronizer placement, and MTBF analysis
  • Gray-bus skew constraints and pointer-transition assertions
  • Randomized phase, reset, backpressure, overflow, and underflow tests
  • No combinational logic between metastability containment stages

Lab-to-silicon debug

Start with the physical contract that was assumed.

Both failures below look logical at first. The decisive evidence comes from clock ancestry, minimum delay, pulse width, phase behavior, and the protocol used to move state.

Decoded counter enable

A decoded count is a minimum-delay path to the clock-enable pin.

The source asks why a one-cycle counter decode could fail in hardware even though RTL simulation looks deterministic.

Counter bits reconverge through an equality comparator and directly feed a destination enable path. Minimum delay, skew, and any decode transient must be checked at the receiving aperture.

Before: a multi-bit decode feeds a synchronous enable directly

The slide’s intended risk is a minimum-delay path from counter Q through a small equality comparator to the destination enable mux or clock-enable pin. Unequal counter-bit delays can also make the equality decode glitch as the bits reconverge.

  1. 1Counter edge launches several bits
  2. 2Clock-to-Q, route, and comparator delays determine the decode waveform
  3. 3The decode reaches the destination enable path
  4. 4STA checks whether its earliest change violates destination hold
logic [3:0] count;
wire enable = (count == 4'd15);

always_ff @(posedge clk) begin
  count <= count + 1'b1;
end

always_ff @(posedge clk) begin
  if (enable) data_reg <= data_in;
end
Intended timing answer

The slide is aiming at a hold or minimum-delay check on counter Q through the equality decode to the destination enable path. Setup must also be checked at the maximum-delay corner.

Important qualification

As written, both blocks use the same clock, so this is a normal synchronous register-to-register control path. A combinational enable is not automatically a violation. STA must decide from real min delay and skew.

Why the decode deserves review

Several counter bits can change with unequal delays and reconverge in the comparator. A transient is dangerous if it overlaps a sampling aperture or is misused as a clock or asynchronous control.

Function-preserving repair

Compare against 14, register the result, and consume that registered enable when the old counter value is 15. Keep the root clock and verify the new path’s setup, hold, and pulse alignment.

Before: a multi-bit decode feeds a synchronous enable directly. The slide’s intended risk is a minimum-delay path from counter Q through a small equality comparator to the destination enable mux or clock-enable pin. Unequal counter-bit delays can also make the equality decode glitch as the bits reconverge.

The reusable reasoning model

Classify. Constrain. Contain. Prove.

Classify logic, state, path, clock relationship, and payload.Constrain real launch and capture behavior across every mode.Contain analog uncertainty with the right CDC structure.Prove function and timing with independent evidence.

Reasoning checkpoints

Questions worth answering without notes.

Each answer states the mechanism first, then the consequence.
01What is the practical difference between setup and hold?

Setup is a maximum-delay check: old-cycle data must reach the capture register before its active edge. Hold is a minimum-delay check: new-cycle data must not reach that register too soon after the edge. Setup is helped by a longer period or faster data path; hold usually needs added data delay or improved skew.

02Why can a two-flop synchronizer not safely synchronize a data bus?

Each bit can resolve and be sampled on a different destination cycle, producing a word that never existed in the source domain. Multi-bit transfers need a protocol that holds a coherent word, such as a handshake, Gray-coded control transfer, or asynchronous FIFO.

03How is a false path different from a multicycle path?

A false path cannot be sensitized in the defined operating modes and is excluded from timing. A multicycle path is real and must work, but the design deliberately allows more than one clock cycle. Calling a slow real path false hides a functional timing failure.

Keep practicing

Move from recognition to explanation.

These links open the existing practice bank without publishing protected solutions on this guide.

Continue the system

Connect the adjacent layer.