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.
- I/O
- Datapath
- Data
- Control
- Without isolation
The operands go straight into the multiplier. Every new pair makes hundreds of gates toggle, used or not.
- With isolation
While
selis 0 the AND gates hold both operands at 0. The multiplier sees no change and stays still. - The result is the same
When
selis 1 the operands pass and the product is right. Whenselis 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.
| Version | Product bit toggles in 2,000 cycles | Per cycle |
|---|---|---|
| Plain | 14,155 | 7.1 |
| Operands isolated | 2,802 | 1.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 product | Plain (287 cells) | Operands isolated (277 cells) | Saving |
|---|---|---|---|
| 0.9 | 0.608 mW | 0.543 mW | 11 % |
| 0.5 | 0.573 mW | 0.279 mW | 51 % |
| 0.1 | 0.540 mW | 0.116 mW | 79 % |
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 sit | Power at 10 % use | What happened |
|---|---|---|
| Nowhere (plain) | 0.540 mW | The multiplier toggles in every cycle |
| On both operands | 0.116 mW | The multiplier is still while unused |
On operand a only | 0.118 mW | One zero operand makes every partial product zero |
| On the product, after the multiplier | 0.551 mW | The 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 activity | Plain | Operands isolated | Saving |
|---|---|---|---|
| 0.2 per cycle (new values in every cycle) | 0.540 mW | 0.116 mW | 79 % |
| 0.02 per cycle (values change only when used) | 0.115 mW | 0.085 mW | 26 % |
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
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.
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.
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.
cycles=2000 used=252 plain: product bit toggles=14155 isolated: product bit toggles=2802 outputs differ in 0 cyclesCheck Yourself
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.