Algorithm Search⌘K

Problemcore

Clock tree synthesis

Also called CTS, clock routing.

Build a buffered tree from the clock source to all registers with low skew, latency and power, under slew limits.

Clock tree synthesis is a routing problem: connect the clock source to every register, or sink, of a synchronous circuit by a tree of wires and buffers, so that the clock reaches all sinks at nearly the same time. The difference between the latest and the earliest arrival is the skew, and the setup and hold constraints of every register pair must hold with it. The tree should also have a short source-to-sink delay, little wire and buffer capacitance, since the clock net switches every cycle and often takes a large part of the power, and sharp signal edges, which a limit on the slew sets. With the skew left free and wire length as the cost, it is the rectilinear Steiner tree problem, so it is NP-hard; with a fixed tree shape and zero skew under linear delay, it has an exact linear-time solution.

In plain words

Every register on a chip waits for the clock to tell it when to take in new data. If the clock reaches some registers earlier than others, data can arrive too early or too late, and the chip fails or must run slower.

The clock comes from one point and must reach thousands or millions of registers. The wires that carry it form a tree. The task is to draw this tree so that the clock reaches every register at almost the same time, without too long a wait, with as little wire as possible, and with amplifiers along the way so that the signal stays sharp.

A shortest tree reaches near registers early and far registers late. Making all paths take the same time costs extra wire. Clock tree synthesis is the search for a good balance.

Definition

Input. A set of sinks s1,…,sns_1, \dots, s_n with points pip_i in the plane and load capacitances ci>0c_i > 0, and a source point p0p_0, or no source point when the root may go anywhere. The wire resistance rr and capacitance cc per unit length. A library of buffers, each with an input capacitance, a drive resistance and an intrinsic delay. A delay model, usually the Elmore delay of the RC tree model with buffers as in van Ginneken buffer insertion. A skew bound B≥0B \ge 0 and a slew limit.

Decision. A rooted tree whose leaves are the sinks and whose root is at p0p_0 (the topology), a point for each internal node (the embedding), a wire length for each edge of at least the rectilinear distance of its ends, since a wire may make a detour to add delay, and a set of buffers at nodes of the tree.

Delay and skew. Let tit_i be the delay from the source to sink sis_i in the delay model. The latency is max⁡iti\max_i t_i and the skew is max⁡iti−min⁡iti\max_i t_i - \min_i t_i.

Output. A tree with skew at most BB and every slew within the limit that minimizes the cost: total wire length, or the total switched capacitance of wires and buffers, which is proportional to the clock power. Latency is a second objective or a further bound.

The case B=0B = 0 is the zero-skew problem. In the linear delay or path length model, tit_i is the wire length of the path to sis_i and there are no buffers; it is the usual model for the geometry of a clock tree.

Variants

  • Zero skew or bounded skew. Zero skew asks for equal delays to all sinks. A bound B>0B > 0 allows a cheaper tree; Cong, Kahng, Koh and Tsao gave the bounded-skew form of deferred-merge embedding.
  • Given topology or free topology. With the topology fixed, only the embedding is chosen. Most methods build a topology first, for example by recursive splits or by greedy matching of nearby subtrees, and then embed it.
  • Prescribed or useful skew. Each sink gets its own target delay instead of a common one. The targets come from clock skew scheduling, which shifts the clock at each register to give more time to its slowest paths.
  • Local skew. Only pairs of registers joined by a timing path need equal clock arrival, so the bound applies to those pairs, not to all sinks.
  • Buffered clock trees. Buffers are needed on large trees to meet the slew limit. The choice of buffer places and sizes joins the routing problem.
  • Clock gating. Parts of the tree are switched off when their registers are idle, which saves power and adds gates to the tree.
  • Variation and corners. The skew must stay small at several process, voltage and temperature corners, or in a statistical sense. Meshes and cross links lower the sensitivity at the cost of more wire and power.
  • Regular structures. The H-tree fixes topology and embedding in advance for a square region, and local trees join it to the sinks.

Examples

Wire against skew. Take the source at (0,0)(0, 0), sink aa at (2,0)(2, 0) and sink bb at (0,6)(0, 6), under linear delay. Every tree splits at some point qq: a wire of length tt from the source to qq, then wires of lengths ℓa\ell_a and ℓb\ell_b from qq to the sinks. The path lengths are ta=t+ℓat_a = t + \ell_a and tb=t+ℓbt_b = t + \ell_b, and the wire length is W=t+ℓa+ℓbW = t + \ell_a + \ell_b.

  • Least wire. The shortest tree is the star at the source, W=8W = 8, with paths 2 and 6, so the skew is 4. Every tree of length 8 is a shortest path from aa to bb through the source, so all of them have skew 4.
  • Skew at most BB, for 0≤B≤40 \le B \le 4. The path to bb has tb≥6t_b \ge 6, so ta≥6−Bt_a \ge 6 - B and W=ta+tb−t≥12−B−tW = t_a + t_b - t \ge 12 - B - t. Also ℓa+ℓb≥8\ell_a + \ell_b \ge 8, the distance from aa to bb, so W≥t+8W \ge t + 8. The larger of the two bounds is least at t=(4−B)/2t = (4 - B) / 2, which gives W≥10−B/2W \ge 10 - B / 2. The tree with q=(0,(4−B)/2)q = (0, (4 - B) / 2) meets this bound: ℓb=6−t\ell_b = 6 - t, ℓa=2+t\ell_a = 2 + t, paths 6−B6 - B and 6.
  • Zero skew. For B=0B = 0 the least wire is 10, with the split at (0,2)(0, 2), a wire of length 4 from there to each sink, and both paths of length 6. The set of points at path length 4 from both sinks is the segment from (0,2)(0, 2) to (2,4)(2, 4), the merging segment of deferred-merge embedding, and (0,2)(0, 2) is its point nearest the source.

So each unit of skew given up saves half a unit of wire here, and zero skew costs 25 percent more wire than the Steiner tree. Under the Elmore delay the numbers change, since the load of each branch enters the delay, but the trade-off is the same.

Known algorithms

  • H-tree. A fixed recursive H for sinks on a regular grid. Zero skew under the Elmore delay when the loads are equal; wasteful for uneven sinks.
  • Method of means and medians (Jackson, Srinivasan and Kuh, 1990). Splits the sinks at the median, alternating the direction, and joins the centres of mass. It builds a topology in O(nlog⁡n)O(n \log n) time, with small but not zero skew.
  • Recursive geometric matching (Kahng, Cong and Robins, 1991). Builds the topology bottom up by a matching of nearby subtrees at each level.
  • Tsay's zero-skew algorithm (1991). For a given topology, places each tapping point from a closed formula so that the Elmore skew is exactly zero, with wire detours when needed.
  • Deferred-merge embedding (Chao, Hsu, Ho, Boese and Kahng, 1992, and Edahiro). Keeps a merging segment for each subtree and embeds top down. For a given topology it is proved to use the least wire under linear delay, and it gives exact zero Elmore skew. With greedy merging it also builds the topology.
  • Buffering. Van Ginneken buffer insertion and its variants place buffers on a routed tree; clock tools insert buffers level by level to keep the slew within the limit and balance the levels.
AlgorithmTimeSpacePropertiesCode
Deferred-merge embeddingΘ(n) given_topologyΘ(n) extradeterministicexactrecursive1 language
Method of means and mediansO(n log n) worstΘ(n) extradeterministicnot exactrecursive1 language
Tsay's exact zero-skew algorithmΘ(n) given_topologyΘ(n) extradeterministicexactrecursive1 language

Bounds

  • NP-hard with a free topology. If BB is so large that it never binds, for example B=∞B = \infty, and the cost is wire length, any tree is feasible and the problem is to find a shortest rectilinear tree that connects the source and the sinks. This is the rectilinear Steiner tree problem, which Garey and Johnson (1977) proved NP-complete in the decision form. So minimum-wire clock routing with a skew bound and a free topology is NP-hard in general.
  • Zero skew with a free topology. This page cites no hardness result for this case. The Steiner reduction does not apply, since the zero-skew condition changes the feasible trees.
  • Polynomial with a given topology. Under linear delay, deferred-merge embedding finds a zero-skew tree of least wire for a given binary topology in O(n)O(n) time; this is proved (Chao et al., 1992). Under the Elmore delay, a zero-skew embedding of every topology exists and Tsay's method finds one in O(n)O(n) time, but least wire is not proved.
  • Lower bounds. Every clock tree is at least as long as the rectilinear Steiner minimal tree of the source and the sinks, and under linear delay its latency is at least the largest rectilinear distance from the source to a sink. In the example the latency bound 6 is met for every BB, but the Steiner bound 8 is met only when B≥4B \ge 4.

Reductions

  • From the rectilinear Steiner tree problem. With the skew bound removed, minimum-wire clock routing is the rectilinear Steiner tree problem on the source and the sinks; this gives the NP-hardness above.
  • Shortest path trees. If the skew is free but every sink must be reached from the source by a path of the shortest possible length, the problem is the rectilinear Steiner arborescence problem. This form bounds the delay to each sink, not only the latency.
  • Prescribed skew to zero skew. A target delay did_i at each sink is the same as zero skew after adding a delay offset at the sink, which methods based on merging segments handle by starting each sink with delay −di-d_i instead of 0.
  • To clock skew scheduling. The choice of target delays that best helps the timing of the circuit is a system of difference constraints, solved in clock skew scheduling; clock tree synthesis then realizes the targets.

Applications

  • Physical design flows. Clock tree synthesis runs after placement and before signal routing in every flow for synchronous chips, and its result sets the clock arrival times that static timing analysis uses after it.
  • Power. The clock tree switches every cycle, so its capacitance is a large share of the dynamic power of a chip; low-capacitance trees and clock gating reduce it.
  • High-performance processors. Large processors use a global grid or H-tree driven from the centre with local trees to the registers, to keep the skew small under variation.
  • Field-programmable gate arrays. The clock networks are fixed H-trees or spines in the silicon, and the tools choose which branches to use.

References

  1. M. R. Garey and D. S. Johnson, The rectilinear Steiner tree problem is NP-complete, SIAM Journal on Applied Mathematics 32(4), 1977, the NP-completeness of the rectilinear Steiner tree problem, which the clock problem contains when the skew is free
  2. Ting-Hai Chao, Yu-Chin Hsu, Jan-Ming Ho, Kenneth D. Boese and Andrew B. Kahng, Zero skew clock routing with minimum wirelength, IEEE Transactions on Circuits and Systems II 39(11), 799 to 814, 1992, the zero-skew clock routing problem for a given topology and its exact solution under linear delay
  3. Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, Springer, 2011, Chapter 7, Specialized Routing, Sections 7.4 and 7.5, on the clock routing problem, skew, and clock tree constructions
  4. Charles J. Alpert, Dinesh P. Mehta and Sachin S. Sapatnekar (editors), Handbook of Algorithms for Physical Design Automation, CRC Press, 2008, Chapter 42, Clock Network Design, Basics

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml