Operand Isolation and Data Gating

Stop a datapath from toggling when nobody uses its result, and check what the fix costs.

You Will Be Able To

  • Find logic that toggles while its result is thrown away.
  • Isolate the operands of that logic with the signal that says "used".
  • Weigh the power saved against the delay added, at the real use rate.
Lesson
W2.2
Time
25 min
Runs on
Your browser
Check
5 questions

A filter block holds a multiplier, and its product is needed in one cycle of ten. New operands arrive in every cycle, so the multiplier computes a product in every cycle. Nine of ten results are thrown away, and the block still burns 0.540 mW.

A Multiplier Whose Result Is Used Only When Sel Is 1Arrows show data. The two isolation gates in front of the multiplier are the change this lesson makes.
  • I/O
  • Datapath
  • Data
  • Control
A multiplier whose result is used only when sel is 1Arrows show data. The two isolation gates in front of the multiplier are the change this lesson makes. io Operands a, b New values in everycycle datapath Isolation AND with sel datapath Multiplier About 250 cells io sel 1 when the product isused datapath Mux and register y takes p when sel is1 a, ba, b or 0p
  1. io Operands a, bNew values in every cycle
    • a, b → Isolation
  2. datapath MultiplierAbout 250 cells
    • p → Mux and register
  3. io sel1 when the product is used
    • Isolation
    • Mux and register
  4. datapath IsolationAND with sel
    • a, b or 0 → Multiplier
  5. datapath Mux and registery takes p when sel is 1
  1. Without isolation

    The operands go straight into the multiplier. Every new pair makes hundreds of gates toggle, used or not.

  2. With isolation

    While sel is 0 the AND gates hold both operands at 0. The multiplier sees no change and stays still.

  3. The result is the same

    When sel is 1 the operands pass and the product is right. When sel is 0 the mux ignores the product anyway.

Read the diagram as text
  • Operands a, b: New values in every cycle
  • Isolation: AND with sel
  • Multiplier: About 250 cells
  • sel: 1 when the product is used
  • Mux and register: y takes p when sel is 1
  • Operands a, b → Isolation: a, b
  • Isolation → Multiplier: a, b or 0
  • Multiplier → Mux and register: p
  • sel → Isolation
  • sel → Mux and register

This is operand isolation: hold the inputs of a block still while its output is not used.

A clock gate on the output register cannot help here, because the waste is in the combinational logic in front of it.

Count the Wasted Toggles

Switching power follows activity (W1.2). So first measure the activity. The lab runs both versions with the same operands and counts how many product bits change in each cycle.

VersionProduct bit toggles in 2,000 cyclesPer cycle
Plain14,1557.1
Operands isolated2,8021.4

Simulated on Icarus. The product is used in 252 of the 2,000 cycles, and the outputs of the two versions never differ.

The plain multiplier changes about 7 product bits in every cycle. The isolated one changes 5.1 times fewer. It moves only around the used cycles.

This count is recorded activity: it comes from a simulation of real stimulus, not from an assumption. The product bits stand for the hundreds of nets inside the multiplier.

What the Power Report Says at Each Use Rate

Both versions were synthesized to SKY130 cells. OpenSTA then estimated their power for three use rates. The operands toggle 0.2 times per cycle, and the clock period is 10 ns.

Share of cycles that use the productPlain (287 cells)Operands isolated (277 cells)Saving
0.90.608 mW0.543 mW11 %
0.50.573 mW0.279 mW51 %
0.10.540 mW0.116 mW79 %

Build-time OpenSTA estimates. The use rate is the duty of sel.

At 10 % use, isolation cuts the power 4.65 times. At 90 % use it saves 11 %. The saving follows the unused share: 79 % when 90 % of the cycles are unused. The register and its clock pins still burn power.

The plain design hardly cares about the use rate. Its multiplier toggles in every cycle, so its combinational power stays near 0.463 mW.

Where the AND gates sitPower at 10 % useWhat happened
Nowhere (plain)0.540 mWThe multiplier toggles in every cycle
On both operands0.116 mWThe multiplier is still while unused
On operand a only0.118 mWOne zero operand makes every partial product zero
On the product, after the multiplier0.551 mWThe multiplier still toggles: nothing is saved

Build-time OpenSTA estimates for four netlists of the same function.

Two rows teach the rule. Gates after the multiplier save nothing, because the toggling happens before them. For this multiplier one zero operand is almost as good as two, because every partial product is then zero. A multiplier built another way, such as a Booth multiplier, may differ.

What Isolation Costs

The AND gates sit in front of the multiplier, and the multiplier is the longest path of this block. With a 4 ns clock and inputs that arrive at the clock edge, the plain design has 0.512 ns of setup slack. The isolated design has 0.424 ns.

So isolation costs 88 ps on the critical path in this netlist. Synthesis also restructures the multiplier, so the number moves from run to run. The netlists with one operand isolated lost 186 and 259 ps. The isolated netlist even came out smaller: 277 cells against 287.

The isolation signal also needs to arrive early. If sel is late, the operands reach the multiplier late as well.

Isolation is also useless when the operands are already quiet. Suppose the operands come from registers that load only in used cycles. Then they change in one cycle of ten.

Operand activityPlainOperands isolatedSaving
0.2 per cycle (new values in every cycle)0.540 mW0.116 mW79 %
0.02 per cycle (values change only when used)0.115 mW0.085 mW26 %

Build-time OpenSTA estimates at 10 % use.

With quiet operands the plain design already burns only 0.115 mW. Isolation then removes 29.6 µW, and it still costs its delay.

Asked in interviews
  1. What is operand isolation?

    It holds the inputs of a combinational block at a constant while its output is not used. The block then stops toggling and its switching power disappears. The usual form is an AND gate on each operand, controlled by the signal that says the result is used.

  2. How does it differ from clock gating?

    Clock gating stops the clock of registers that hold their values. Operand isolation stops data from moving through combinational logic. A datapath fed by registers that are already gated may need no isolation at all.

  3. When is operand isolation not worth it?

    When the block is used in most cycles, or when its operands are already quiet. Also when the block is on the critical path with no slack. Measured here: 11 % saved at 90 % use, for 88 ps of extra delay.

Try It

Run it. The bench drives a plain copy and an isolated copy with the same operands. It counts the product bits that change, and it checks that the two outputs agree.

Change % 10 to % 2 in the line that sets sel. The product is now used in half of the cycles. Predict which toggle count moves.

Then isolate only one operand: in opiso, set mb = b;. The count stays at 2802, because a zero product looks the same however it is made. The product bits cannot show the partial products inside. The OpenSTA table can: 0.118 mW with one operand isolated against 0.116 mW with both.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: cycles=2000 used=252 plain: product bit toggles=14155 isolated: product bit toggles=2802 outputs differ in 0 cycles

Check Yourself

Predict the outputBoth operands are isolated and sel is 1. What exact line does this program print?
module tb;
  logic sel;
  logic [7:0] a, b, ma, mb;
  logic [15:0] p;
  initial begin
    a = 8'd200; b = 8'd3; sel = 1;
    ma = a & {8{sel}};
    mb = b & {8{sel}};
    p = ma * mb;
    $display("p=%0d", p);
  end
endmodule
ConceptThe plain multiplier burns 0.540 mW when its product is used in 10 % of the cycles. What did the report show with both operands isolated?
ConceptWhere must the isolation gates sit to save power in a multiplier?
ConceptA multiplier is on the critical path with almost no slack, and its product is used in 95 % of the cycles. Should you isolate its operands?
ConceptThe operands of an adder come from two registers. A clock gate already stops those registers in every cycle where the sum is not used. What does operand isolation add?

Common Mistakes

Wrong Drive the isolation gates from a select that is decoded late in the cycle.

The operands wait for sel at the AND gates. A select that arrives after the operands adds its delay to the multiplier path.

Fix Use a select that arrives early, ideally straight from a flop.

Wrong Assume two mirror-image changes give the same netlist.

This multiplier treats a and b alike, yet synthesis gave 0.253 ns of slack with only a isolated and 0.326 ns with only b.

Fix Synthesize and time each variant you consider.

Wrong Decide on isolation from a guessed use rate.

The saving here runs from 11 % at 90 % use to 79 % at 10 % use. A wrong guess flips the decision.

Fix Record the real use rate from a simulation of a real workload.

Remember

  • Combinational logic toggles for every new input, used or not. A clock gate on the output register cannot stop that.
  • Operand isolation holds the inputs of a block at a constant while its output is not used.
  • The saving follows the unused share: 4.65 times at 10 % use, 11 % at 90 % use.
  • Put the gates in front of the block. Gates behind it save nothing.
  • The gates add delay on the path. Check timing, and skip operands that are already quiet.

Practice

Report a problem with this page