TDEB Top Bar

Trending
Semiconductor Industry News — The Digital Electronics Blog
Follow Us

TDEB Masthead

The Semiconductor Hub

Semiconductors.  Chips and Systems.  Innovation.

Indexed by leading Search Engines, AI and referenced by Engineers worldwide 500+ Articles 10M+ Pageviews 30+ Reports 50+ Citations

Advantages and Disadvantages of Gated Clocks

The Editor's Desk
by
0
Share Facebook X LinkedIn WhatsApp Email

A gated clock is a clock that can be switched off for part of a design. Instead of letting every flip-flop see every clock edge, a small gating circuit blocks the clock to a group of flops whenever they have nothing new to store. It is the most common power-saving technique in digital design, but it comes with timing, glitch and test rules that every designer must follow.

Advantages of gated clocks

  1. Saves power by masking the clock to the flops. A flop that is not clocked does not switch, and neither does the piece of clock tree that feeds it.
  2. Used in clock switching circuits, where one clock must be turned off cleanly before another is turned on.
  3. Reduces routing burden and area to some extent. A flop with a load (enable) input needs a multiplexer in front of it and an enable wire routed to it. Gating the clock instead removes both.
  4. Example: suppose there are 8 D flops with a load input (DffL) and a common load signal. We can replace all those loadable flops with simple D flops (Dff) and one clock gating circuit. This removes the routing of the load signal to every flop. The area saved is 8 × (area of DffL minus area of Dff), less the area of the clock gate we add. The worked numbers are in the deep dive.

Disadvantages of gated clocks

  1. There must be no glitch on the gating signal, and the gating signal should change only while the clock is at its inactive level. Otherwise the gate can produce a short extra clock pulse.
  2. For DFT, the gating signal is forced to a value so that the clock reaches every flop during test. Gating logic must therefore have a test override.
  3. It introduces delay on the clock line, which adds skew between gated and ungated flops and must be balanced by clock tree synthesis.

How it works, in plain words

Think of an enable on a register as a question asked every clock cycle: "should I load a new value or keep the old one?" With a plain enable flop, the answer is implemented with a multiplexer that feeds the old value back into the flop. The flop is still clocked every cycle and still burns clock power, even though its value does not change.

Clock gating moves the question to the clock itself. If the enable is off, the clock pulse never arrives, so the flop simply keeps its value. For a register that is idle most of the time, such as a configuration register or a pipeline stage that only works on some cycles, that removes almost all of its switching power.

When to use it

  • Register banks with a shared enable, especially wide ones (the wider the bank, the better the trade).
  • Blocks that are idle for long periods: a whole peripheral, a DSP unit, a cache way.
  • Not worth it for a single flop or for registers that load nearly every cycle, because the gate itself costs area and power.

Modern synthesis tools insert clock gating automatically when they see a register with an enable, using a standard integrated clock gating (ICG) cell from the library. The designer's main job is to write clean enables and to set the minimum register-bank width for gating.

Deep dive: the numbers and details

This part holds the power equation, the area example with numbers, the glitch-free gate circuit, the timing checks and the DFT and CTS details. Skip it if the overview is all you need.

Where the power saving comes from

Dynamic power is P = αCV²f, where α is the activity factor, C the switched capacitance, V the supply and f the clock frequency. A clock net has α = 1: it toggles every cycle by definition. Every flop's clock pin, plus the buffers and wires of the clock tree that feed it, switches on every edge whether or not the data changes. If a register bank is enabled only 10 percent of the time, gating its clock cuts the clock-related switching of that bank and its tree branch by roughly 90 percent, less the small overhead of the gate.

Worked area example

Use illustrative cell areas (the real values depend on the library):

  • Plain D flop (Dff): 5.0 µm²
  • Loadable D flop (DffL, a flop plus a 2:1 mux): 6.5 µm²
  • Integrated clock gating cell (latch plus AND): 4.0 µm²

For the 8-bit register: with loadable flops, area = 8 × 6.5 = 52 µm². With plain flops plus one gate, area = 8 × 5.0 + 4.0 = 44 µm². The saving is 8 × (6.5 - 5.0) - 4.0 = 8 µm². The break-even bank width is 4.0 / 1.5, about 2.7, so with these numbers gating pays from 3 bits upward. That is why synthesis tools have a minimum bank-width setting for clock gating, often set somewhere around 3 to 8 bits.

The glitch problem with a plain AND gate

The simplest gate is GCLK = CLK AND EN. For a positive-edge design, the clock is inactive while low. If EN changes while CLK is high, GCLK can rise or fall in the middle of the high phase, producing a short pulse or a truncated one. A short pulse can clock some flops and not others. This is why the rule says the enable may change only while the clock is at its inactive level.

The latch-based gate (ICG)

The standard cure is a latch in front of the AND gate:

// Integrated clock gating cell, positive-edge flops
// Latch is transparent while CLK is low
always @(CLK or EN or TE)
  if (!CLK) en_latched <= EN | TE;

assign GCLK = CLK & en_latched;

The latch is transparent while CLK is low, so EN can change freely during the low phase. When CLK rises, the latch closes and holds its value for the whole high phase, so the AND output cannot glitch. TE is the test enable that forces the clock on during scan. Libraries supply this as a single characterized cell so that its internal timing is guaranteed.

Timing checks on the gate

  • Clock gating setup: EN must arrive at the latch before the clock rises, with the latch's setup time. Because EN usually comes from flops clocked by the same clock, the enable path has roughly one cycle, minus the insertion delay difference between the gate's clock and the launching flops' clock.
  • Clock gating hold: EN must not change too soon after the edge that closes the latch.
  • STA tools check these as clock gating checks automatically once the ICG cell is recognized.

A subtle point: the ICG sits early in the clock tree, so its clock arrives earlier than the clock at the leaf flops that launch EN. That eats into the enable path's budget, and clock gating setup violations are a common late-stage timing problem in large designs.

Delay and skew

The gate adds one cell delay, typically tens of picoseconds in a modern process, to the clock of every flop behind it. Clock tree synthesis must balance gated and ungated branches so that skew stays within budget. Placing the ICG close to the flops it drives keeps the gated branch short; placing it high in the tree saves more power because more of the tree is switched off, but makes balancing harder.

DFT considerations

  • During scan shift, every flop must receive every clock pulse, so the gate's test enable (TE) forces the clock on regardless of the functional enable.
  • TE is usually tied to scan enable or a test-mode signal. If it is tied to scan enable, the gate can still be controlled during capture, which lets ATPG test the gating logic itself.
  • Forgetting the test override is a classic DFT design rule violation: the flops behind the gate become uncontrollable and coverage drops.

Clock switching circuits

The second advantage listed above, use in clock switching, relies on the same idea. A glitch-free clock multiplexer gates off the current clock on its inactive level, waits until it is really off (usually through a pair of synchronizer flops in each clock domain), and only then enables the new clock. Each side is a clock gate with a carefully sequenced enable.

Interview angle

  • Why a latch and not a flop in the ICG? A flop would delay the enable by a full cycle; the latch passes it during the low phase and only blocks it during the high phase.
  • For a negative-edge design, which latch phase is used? A latch transparent while the clock is high, with an OR gate instead of an AND.
  • How much power does gating save? Enough to justify it on any register bank that is idle most of the time; the exact number depends on activity and on how much of the clock tree is switched off.
The Editor's Desk
About the Author
The Editor's Desk
Share Facebook X LinkedIn WhatsApp Email

Post a Comment

0 Comments

Your comments will be moderated before it appears here.

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn more
Ok, Go it!