Clock Power Beyond One Gate: Gating Trees, Clock Networks and Multi-Bit Flops

Stop the clock power that leaf gates leave behind with gates higher in the tree, and share one local clock driver.

You Will Be Able To

  • Explain which cells of a clock tree a gate stops at each height.
  • Choose gates at the leaves, the branches or the root from the enable duties.
  • Explain why gating efficiency alone does not predict the clock power.
  • Estimate what a shared local clock driver saves, from a transistor-level run.
Lesson
W2.4
Time
30 min
Runs on
OpenROAD
Check
5 questions

A team put a clock gate on every register bank of a block. 88.8 % of all flop-cycles now get no clock edge. Yet the block still burns 116.2 µW. 71.4 µW of that is in the clock network: the buffers and the gates themselves.

BuildFlop-cycles with the clock stoppedTotal powerClock network (buffers and gates)
Enable muxes, no gate0.0 %430.9 µW89.3 µW
A gate on every bank88.8 %116.2 µW71.4 µW
The same, plus one gate at the root88.8 %75.8 µW32.2 µW

Build-time OpenSTA estimates for four banks of 16 flops behind a three-level clock tree, 10 ns clock. The block is busy in 20 % of the cycles.

One more gate, high in the tree, cuts the clock network power in half.

A Gate Stops Everything Below It

A clock tree carries the clock from one pin to thousands of flops. It uses levels of buffers: a root buffer, branch buffers, and a leaf buffer near each group of flops. Each buffer that receives an edge charges its wire and the inputs it drives.

Where a Clock Gate Sits Decides What It StopsArrows show the clock. The block has a root buffer, two branch buffers and four banks of 16 flops. Each bank has its own leaf buffer.
  • Clock / reset
  • Storage
  • Clock
Where a clock gate sits decides what it stopsArrows show the clock. The block has a root buffer, two branch buffers and four banks of 16 flops. Each bank has its own leaf buffer. clock reset Root buffer clkbuf_8 clock reset Root gate dlclkp_4, en_blk clock reset Branch 0 clkbuf_8 clock reset Branch 1 clkbuf_8 storage Banks a, b Leaf buffer, gate, 16flops each storage Banks c, d Leaf buffer, gate, 16flops each
  1. clock reset Root bufferclkbuf_8
    • Root gate
  2. clock reset Branch 0clkbuf_8
    • Banks a, b
  3. clock reset Branch 1clkbuf_8
    • Banks c, d
  4. storage Banks a, bLeaf buffer, gate, 16 flops each
  5. storage Banks c, dLeaf buffer, gate, 16 flops each
  6. clock reset Root gatedlclkp_4, en_blk
    • Branch 0
    • Branch 1
  1. No gate

    Every buffer and every flop sees every edge. The clock network burns 89.3 µW and the flops' clock pins 312.2 µW.

  2. Gates at the leaves

    Each bank's gate sits behind its leaf buffer. The flops stop: their pins fall to 44.8 µW. Root, branch and leaf buffers still toggle in every cycle.

  3. A gate at the root

    The root gate closes whenever the block is idle, 80 % of the time. Both branch buffers and all four leaf buffers stop with it. The clock network falls to 32.2 µW.

  4. A gate on one branch

    A gate in front of branch 0 stops that buffer and two leaf buffers. It pays only if branch 0 is idle more often than the gate above it.

Read the diagram as text
  • Root buffer: clkbuf_8
  • Root gate: dlclkp_4, en_blk
  • Branch 0: clkbuf_8
  • Branch 1: clkbuf_8
  • Banks a, b: Leaf buffer, gate, 16 flops each
  • Banks c, d: Leaf buffer, gate, 16 flops each
  • Root buffer → Root gate
  • Root gate → Branch 0
  • Root gate → Branch 1
  • Branch 0 → Banks a, b
  • Branch 1 → Banks c, d

Arm's power control architecture names three levels that work together. Low: inserted by synthesis. Mid: placed inside a block. High: a whole clock domain.

The table holds every build of this block. The duties stay the same: the block is busy 20 % of the time. Banks a and b load together in 10 % of the cycles, c in 5 %, and d in every busy cycle.

BuildTotalClock networkFlop clock pins (Sequential)Flop-cycles stopped
Enable muxes, no gate430.9 µW89.3 µW312.2 µW0.0 %
A gate on every bank (leaf)116.2 µW71.4 µW44.8 µW88.8 %
One gate behind the root, muxes in the banks122.7 µW31.3 µW77.8 µW80.0 %
Root gate and leaf gates75.8 µW32.2 µW43.7 µW88.8 %
Branch gates and leaf gates77.1 µW32.9 µW44.2 µW88.8 %
Root, branch 0 and leaf gates74.0 µW30.3 µW43.7 µW88.8 %
Root, both branches and leaf gates75.5 µW31.8 µW43.7 µW88.8 %

Build-time OpenSTA report_power, tt, 10 ns clock, data inputs toggling 0.1 times per cycle. The clock tree is part of the netlist; wires are ideal.

One root gate with muxes in the banks burns 122.7 µW. Four leaf gates burn 116.2 µW, so one cell does almost as well as four. The best builds use both heights.

Gating Efficiency Hides the Buffers

Clock-gating efficiency is the share of flop-cycles in which a flop gets no clock edge. Reviews often quote it.

Look at the last column of the table. The leaf build and every build with a root or branch gate score the same 88.8 %. Their total power runs from 116.2 µW down to 74.0 µW.

The efficiency is the same because a flop behind several gates is stopped when its own bank idles. A gate higher up stops no extra flop-cycle. It stops buffer-cycles, and the efficiency number does not count those.

Gate higher in the treeIts enable is 1 inOpens more rarely than the gate above?Effect, with leaf and root gates in place
Branch 0 (banks a, b)10 % of cyclesYes: the root opens in 20 %75.8 µW to 74.0 µW: saves
Branch 1 (banks c, d)20 % of cyclesNo: bank d loads in every busy cycle74.0 µW to 75.5 µW: costs

Build-time OpenSTA estimates. A gate whose enable is 1 whenever its parent is open never closes on its own.

So a high gate pays when its subtree idles more often than the gate above it. Its enable must also cover every bank below it. A branch gate driven by one bank's enable would stop the other bank in cycles where it must load.

Multi-Bit Flops: Share the Local Driver

Inside every flop of this library sits a small clock driver. The dfxtp_1 flop has two inverters that make clkneg (not CLK) and clkpos (CLK again). The other 20 transistors, the two latches and the input and output stages, only read those two signals.

A multi-bit flop puts several flops in one cell and shares that local driver. The clock tree then sees one clock pin instead of several. sky130_fd_sc_hd has no multi-bit flop, so this lesson builds one from the transistors of dfxtp_1.

Four Private Drivers Against One Shared DriverArrows show the clock. Bank A uses four ordinary flops. Bank B drives four flop cores from one driver of the same size.
  • Clock / reset
  • Storage
  • Clock
Four private drivers against one shared driverArrows show the clock. Bank A uses four ordinary flops. Bank B drives four flop cores from one driver of the same size. clock reset Tree buffer A Drives four clock pins clock reset Four drivers One per flop storage Four cores Latches of four flops clock reset Tree buffer B Drives one clock pin clock reset One driver clkneg and clkpos storage Four cores The same latches CLK x4clkneg, clkpos x4CLK x1clkneg, clkpos to allfour
  1. clock reset Tree buffer ADrives four clock pins
    • CLK x4 → Four drivers
  2. clock reset Four driversOne per flop
    • clkneg, clkpos x4 → Four cores
  3. storage Four coresLatches of four flops
  4. clock reset Tree buffer BDrives one clock pin
    • CLK x1 → One driver
  5. clock reset One driverclkneg and clkpos
    • clkneg, clkpos to all four → Four cores
  6. storage Four coresThe same latches
  1. Private drivers

    Each flop charges its own driver's gate, drain and wiring in every cycle. The tree buffer drives four driver inputs.

  2. One shared driver

    One driver charges the clock inputs of all four cores. Three drivers and three clock pins are gone.

Read the diagram as text
  • Tree buffer A: Drives four clock pins
  • Four drivers: One per flop
  • Four cores: Latches of four flops
  • Tree buffer B: Drives one clock pin
  • One driver: clkneg and clkpos
  • Four cores: The same latches
  • Tree buffer A → Four drivers: CLK x4
  • Four drivers → Four cores: clkneg, clkpos x4
  • Tree buffer B → One driver: CLK x1
  • One driver → Four cores: clkneg, clkpos to all four

Transistors from the CDL netlist of sky130_fd_sc_hd__dfxtp_1 in the pinned OpenROAD platform.

TransientCurrent Drawn by the Local Clock Drivers of Each BankData held at 0, so every femtojoule here is clock energy. 500 MHz clock; two cycles shown.
  • Bank A: four private drivers
  • Bank B: one shared driver
-150 µA-100 µA-50 µA050 µA100 µA150 µA200 µA250 µA300 µABank A: four private drivers, Bank B: one shared driver4 ns6 ns8 ns10 ns12 nsTime-200 µA-100 µA0100 µA200 µA300 µABank A: four private drivers, Bank B: one shared driver5 ns10 nsTime
Read the plot as a table
TimeBank A: four private driversBank B: one shared driver
4 ns9.103 µA4.681 µA
6 ns9.115 µA4.693 µA
8 ns9.583 µA5.503 µA
10 ns9.584 µA5.506 µA
12 ns9.895 µA3.699 µA

Measured on ngspice 42, tt. Per cycle the local drivers take 71.2 fJ in bank A and 46.9 fJ in bank B.

Clock energy per cycleBank A: four flopsBank B: shared driverChange
Last clock-tree buffer22.1 fJ8.5 fJ2.61 times less
Local clock drivers71.2 fJ46.9 fJ34 % less
Total93.3 fJ55.4 fJ41 % less

The same ngspice run as the plot, five cycles at 500 MHz. Each part has its own supply source, so each is measured apart.

Here a driver the size of one flop's still makes clean edges for four cores. A driver that is too weak makes slow edges, and bits go wrong at speed.

What a Real Clock Tree Adds

The tables above use ideal wires and the buffers drawn in the netlist. A real flow places the cells, then clock tree synthesis (CTS) adds its own buffers and routes the clock. Wires add capacitance, so real clock power is higher.

The lab runs the root-and-leaf build through placement and CTS. It reports 0.1542 mW in the clock network and 0.241 mW in total. The leaf-only build through the same flow reports 0.2719 mW and 0.4226 mW.

The flow cannot set the enable duties: OpenSTA uses its default activity for every input. So these numbers do not match the tables. They agree on the direction: the root gate cuts the clock network power 1.8 times here.

Asked in interviews
  1. Why gate the clock high in the tree?

    A gate stops every buffer below it as well as the flops. Leaf gates stop only the flops, and the tree above them keeps toggling. When a whole block idles, one high gate removes most of its clock network power.

  2. What is clock-gating efficiency, and what does it miss?

    It is the share of flop-cycles in which the clock is stopped. It counts flops, not buffers, so two designs with the same efficiency can differ a lot in clock power. Read the clock network row of the power report as well.

  3. What does a multi-bit flop save?

    It shares one local clock driver among several flops. The clock tree drives fewer clock pins, and the extra drivers' own capacitance disappears. The latches' clock load stays. The cell must also fit the placement and keep its timing.

  4. How do you enable a branch-level clock gate?

    With the OR of every enable below it, so that no bank loses an edge it needs. Its gate has a setup check like any clock gate, and the OR adds delay to that path.

Try It

This lab places the block, builds its clock tree, and runs report_power. Open the Clock tree stage and read the total power and the clock power.

It reports 0.241 mW in total and 0.1542 mW in the clock network, at OpenSTA's default activity.

Now remove the root gate. In the netlist, delete the cg_root line, and change .A(r1) to .A(cr) in both brbuf lines. Predict the clock power, then run. The leaf-only build measured 0.2719 mW.

Open Layout and find the root gate between the root buffer and the two branch buffers.

FLOWOpenROAD 26Q2 · sky130hd · simulator service
Edit the constraints or the netlist, then run

          
Expected: clock tree totalPower 0.241 clock tree clockPower 0.1542

Check Yourself

ConceptA block already has a gate on every bank. 88.8 % of its flop-cycles are gated, and it burns 116.2 µW. It is idle 80 % of the time. Which change saves the most?
Predict the outputThis program computes the clock-gating efficiency of two banks. What exact line does it print?
module tb;
  // two banks of 16 flops: bank x loads in 25 % of the cycles, bank y in every cycle
  int width[2], duty_pct[2];
  int stopped = 0, all = 0;
  initial begin
    width[0] = 16; duty_pct[0] = 25;
    width[1] = 16; duty_pct[1] = 100;
    for (int b = 0; b < 2; b++) begin
      stopped += width[b] * (100 - duty_pct[b]);   // flop-cycles with no clock edge
      all += width[b] * 100;
    end
    $display("efficiency=%0d%%", stopped * 100 / all);
  end
endmodule
ConceptA branch feeds two banks. One of them loads in every cycle in which the block is busy. A root gate already stops the clock when the block is idle. Should the branch get its own gate?
ConceptWhat does a multi-bit flop share between its bits?
ConceptAn ideal-wire OpenSTA run and a flow to CTS give different clock power for the same netlist. Which reason is NOT one of the differences?

Common Mistakes

Wrong Enable a branch gate from the enable of one bank below it.

The other bank on that branch then loses its clock in cycles where it must load, and the design no longer works.

Fix Enable a high gate from the OR of every enable below it, and time that path to the gate.

Before
assign en_br1 = en_c;
After
assign en_br1 = en_c | en_d;

Wrong Make the shared driver of a multi-bit flop as weak as possible, to save more energy.

Slow clkneg and clkpos edges let both latches of a flop conduct at once, so bits go wrong at speed.

Fix Check every bit at the target clock and corner, and size the driver just strong enough.

Wrong Compare clock power from an ideal-clock OpenSTA run with clock power after clock tree synthesis.

The two runs model different cells and wires, so their difference is not the effect of your change.

Fix Compare two designs through the same flow, stage and activity.

Remember

  • A clock gate stops everything below it in the tree: buffers as well as flops.
  • Leaf gates stop the flops; the buffers above them keep toggling. A gate high in the tree stops them while the block idles.
  • A higher gate pays only if its enable is 0 more often than the gate above it. Its enable must cover every bank below.
  • Clock-gating efficiency counts flop-cycles, not buffer-cycles. Read the clock network power too.
  • A multi-bit flop shares the local clock driver: fewer clock pins and less driver capacitance, the same latch load.

Practice

Report a problem with this page