Re-timing reduces the longest combinational logic paths by relocating some of the flip-flops, both logically and physically. How do you evaluate the effectiveness of re-timing, with existing tools and/or some of your own scripts? Comparing it with useful clock skew is a plus. Below is a plain-words explanation of both techniques, followed by a worked answer with the timing equations.
What retiming does
A synchronous design is a set of flip-flops with combinational logic between them. The clock period has to be long enough for the slowest stage. If one stage has a lot of logic and the next has very little, the slow stage sets the speed of the whole design while the fast stage wastes time.
Retiming moves flip-flops across logic so the work is shared more evenly between stages. The design still produces the same outputs on the same clock cycles as seen from its inputs and outputs, but the longest stage gets shorter, so the clock can run faster. The idea was formalized by Charles Leiserson and James Saxe in Retiming synchronous circuitry (Algorithmica, volume 6, 1991).
What useful skew does
Useful skew leaves the flip-flops where they are and instead shifts the clock arrival time at some of them. Delaying the clock at the end of a slow path gives that path a little more time; the price is that the next path, which starts from that flip-flop, gets a little less. The classic paper is J. P. Fishburn, Clock skew optimization (IEEE Transactions on Computers, July 1990).
Both borrow time, in different ways
Retiming moves logic between stages by moving the registers. Useful skew moves time between stages by moving the clock edges. Both help when neighboring stages are unbalanced, and neither helps when every stage is already too slow.
How to judge whether retiming worked, in outline
- Compare timing before and after: worst slack, total negative slack, and the achievable clock period.
- Compare cost: number of flip-flops, area and power. Retiming can add registers.
- Confirm the design is still correct: equivalence checking that understands sequential changes, plus simulation.
- Check the side effects: reset behavior, testability and whether the result survives placement and routing.
Deep dive: the numbers and details
This part holds the figures, equations and worked examples. Skip it if the overview is all you need.
The timing constraint
For a path from launching flip-flop i to capturing flip-flop j, with zero skew, the setup constraint is:
T_clk >= t_clk-q + d_max(i,j) + t_setup
With clock arrival times c_i and c_j at the two flip-flops, it becomes:
T_clk >= t_clk-q + d_max(i,j) + t_setup + c_i - c_j (setup) c_i + t_clk-q + d_min(i,j) >= c_j + t_hold (hold)
Useful skew chooses the c values; retiming changes which logic falls into d(i,j).
Worked example
Take a two-stage pipeline with t_clk-q = 0.1ns and t_setup = 0.1ns. Stage A has 2.8ns of logic and stage B has 1.2ns.
Before: stage A needs 0.1 + 2.8 + 0.1 = 3.0 ns
stage B needs 0.1 + 1.2 + 0.1 = 1.4 ns
T_clk = 3.0 ns (333 MHz)
Retiming. Move the middle register backward so 0.8ns of logic moves from A into B:
After: stage A: 0.1 + 2.0 + 0.1 = 2.2 ns
stage B: 0.1 + 2.0 + 0.1 = 2.2 ns
T_clk = 2.2 ns (about 455 MHz)
If the cut point is on a narrow part of the logic, the register count may stay the same. If it falls on a wide part, say 32 signals instead of 16, the design gains 16 flip-flops.
Useful skew. Keep the logic as it was and delay the clock at the middle register by s:
Stage A: 3.0 - s <= T_clk Stage B: 1.4 + s <= T_clk Best when 3.0 - s = 1.4 + s, so s = 0.8 ns and T_clk = 2.2 ns
Both reach 2.2ns here. The difference is in the cost and risk: useful skew adds no registers but needs a clock tree that can deliver 0.8ns of intentional delay accurately across process, voltage and temperature, and it shrinks hold margin on the path that leaves the delayed register. Retiming changes the register count and state encoding, which affects verification and test.
A lower bound to compare against
For any loop in the design, neither technique can beat the average delay around the loop:
T_clk >= (total combinational delay around the loop) / (number of registers in the loop)
Retiming cannot change the number of registers in a loop. So if a feedback loop has 4ns of logic and 2 registers, no retiming or skewing can get the period below 2ns plus register overhead. Computing this bound for the critical loops tells you how close a retiming result is to the best possible. A simple script can extract the loops from the timing graph and compute the ratio; Leiserson and Saxe's paper gives the formal algorithms.
Measuring effectiveness with tools and scripts
| Metric | How to measure | What good looks like |
|---|---|---|
| Worst negative slack (WNS) | Static timing report before and after | Moves toward zero or positive |
| Total negative slack (TNS) | Sum of negative slacks over all endpoints | Falls sharply, not just the worst path |
| Achievable period | Sweep the clock constraint, or read the minimum period | Close to the loop bound above |
| Register count and area | Synthesis area report | Small increase for the gain |
| Power | Power analysis with realistic activity | Extra registers do not cancel the benefit |
| Hold violations | Hold timing report | No new hold fixes needed in bulk |
| Post-route timing | Timing after placement and routing | Gain holds once wires are real |
A useful script compares the slack histogram of all endpoints before and after, rather than only the worst path. Retiming that improves one path and leaves hundreds of near-critical paths unchanged has not helped much.
Correctness checks
- Sequential equivalence. Retimed logic is not combinationally equivalent to the original, because register contents differ. Use a sequential equivalence checker or the synthesis tool's retiming-aware verification mode.
- Reset and initial state. Moving registers across logic changes what their reset values must be. Check that the retimed design starts in a state equivalent to the original.
- Test. Scan chains and test coverage must be regenerated and checked.
- Debug visibility. Retimed registers no longer match RTL names, which makes waveform debug harder.
Retiming versus useful skew: summary
| Aspect | Retiming | Useful skew |
|---|---|---|
| What moves | Registers | Clock arrival times |
| Register count | Can change | Unchanged |
| Main risk | Verification, reset and test complexity | Hold violations, clock tree accuracy over PVT |
| Stage of flow | Mainly synthesis, sometimes physical | Mainly clock tree synthesis and optimization |
| Limit | Loop delay divided by loop registers | Same loop limit, plus skew budget |
What interviewers look for
A strong answer defines both techniques, writes the setup constraint with skew terms, shows a small numeric example, names the loop bound, and lists the verification and hold-time risks. Pointing out that the two can be combined, retiming first and then skew to fine-tune, shows practical experience.

Your comments will be moderated before it appears here.