Power, Area and Cost: What Speed Is Paid With
Speed is never free. It is paid for in power, in silicon area and in money. Three rough models tell an architect the price before anything is built.
You Will Be Able To
- Work out how switching power changes with frequency and with supply voltage.
- Work out the cost of one good die from the wafer, the die area and the yield.
- Compare a fast build and a small build of one block by cells and by cycles.
- Lesson
- S1.8
- Time
- 24 min
- Runs on
- Your browser
- Check
- 5 questions
Two multipliers give the same answers. One is finished in one clock cycle and the other in nine. The slow one is the right choice more often than you would think.
Before You Start
You need CPU time and the clock period from S1.5. You need synthesis and the two reports of S1.4.
| Question | |
|---|---|
| 1 | What does switching power depend on? |
| 2 | Why does lowering the voltage save more than lowering the frequency? |
| 3 | How does the area of a design become the cost of a chip? |
| 4 | Why does cost rise faster than area? |
| 5 | What does a faster build of the same block cost in cells? |
The Idea: Four Budgets, One Design
S1.5 measured a design by one thing: the time of a job. A product has three more budgets. It has a battery or a power supply. It has a price. And the price depends on how much silicon each chip uses.
These budgets pull against each other. More speed usually takes more power and more area. More area costs more money. An architect cannot have the best of all four.
So the architect works with rough models. Each is one line of arithmetic. None is exact. Each is good enough to rule a design in or out before months are spent on it.
New Words
| Word | Meaning |
|---|---|
| Volt | The unit of voltage. A small battery gives 1.5 of them. |
| Clock frequency | The number of clock cycles in each second, counted in MHz. |
| Supply voltage | The voltage that feeds the gates of a chip. A common value is near 1 volt. |
| Capacitance | How much electric charge a wire or a gate input holds. Every switch from 0 to 1 must fill it. |
| Switching power | The power a circuit uses because its wires change between 0 and 1. |
| Milliwatt (mW) | A unit of power: one thousandth of a watt. |
| Wafer | The round slice of silicon on which a factory makes many copies of a chip at once. |
| Die | One copy of the chip, cut from the wafer. |
| Yield | The share of the dies on a wafer that work. |
Two plain words come back from S1.4. Synthesis counts its result in cells, and one cell is one gate or one flip-flop. Levels of logic is the longest chain of gates between two flip-flops.
One Picture: What Pulls on a Design
- Processor
- Power
- Memory
- Pads
- Speed against power
A faster clock switches every wire more often. Reaching it may also need a higher voltage. Both raise the power.
- Speed against area
Doing more in one clock cycle needs more logic side by side. The lab below measures this.
- Area against cost
A larger design leaves room for fewer chips on each wafer, and more of them fail.
- Power against cost
Power must be supplied and its heat removed. Both cost money outside the chip.
Read the diagram as text
- Speed: the time of a job, from S1.5
- Power: the energy used in each second
- Area: the silicon the design covers
- Cost: the price of one working chip
- Speed → Power: higher frequency and voltage
- Speed → Area: more logic working at once
- Area → Cost: fewer chips from each wafer
- Power → Cost: a larger battery, more cooling
No design wins on all four. The architect decides which one the product cares about most.
The Smallest Example, Worked by Hand: Two Budgets
First power. Switching power is proportional to three things: the capacitance that switches, the supply voltage squared, and the clock frequency. Take a block that uses 80 mW at 1.0 volt and 100 MHz.
| Change | Sum | Switching power |
|---|---|---|
| None | 80 mW | |
| Frequency from 100 to 50 MHz | 80 x 0.5 | 40 mW |
| Voltage from 1.0 to 0.8 volt | 80 x 0.8 x 0.8 | 51.2 mW |
| Both | 80 x 0.8 x 0.8 x 0.5 | 25.6 mW |
Exercise numbers. The voltage counts twice, because it is squared.
A fifth less voltage saved more than a third of the power. That is why designers lower the voltage first, when the circuit can still keep up.
Now cost. A factory sells whole wafers. Suppose a wafer costs 4800 dollars and has 60,000 square millimetres of usable area.
| Die area | Dies on the wafer | Yield | Good dies | Cost of one good die |
|---|---|---|---|---|
| 100 square mm | 60,000 / 100 = 600 | 80 percent | 480 | 4800 / 480 = 10 dollars |
| 200 square mm | 60,000 / 200 = 300 | 60 percent | 180 | 4800 / 180 = about 26.67 dollars |
Exercise numbers. The division ignores the dies lost at the round edge of the wafer.
The second die has twice the area and costs 2.67 times as much. A larger die is more likely to contain a flaw, so its yield is lower.
The Rules
Rule 1: Switching power is proportional to capacitance, to voltage squared and to frequency.
Halving the frequency halves it. Halving the voltage cuts it to a quarter.
Rule 2: A lower voltage makes gates slower.
So the voltage and the highest usable frequency fall together. The saving is real, and it is paid for in speed.
Rule 3: Dies on a wafer is about the wafer area divided by the die area.
The cost of one good die is the wafer cost, divided by the dies and by the yield.
Rule 4: Yield falls as the die grows.
So cost rises faster than area. Twice the area costs more than twice the money.
Rule 5: One function can be built fast and large, or slow and small.
Work done side by side in one cycle needs more cells than the same work done in turns.
Sources for These Rules
Switching power and its three factors: Patterson and Hennessy, Computer Organization and Design, ARM edition, section 1.7.
Dies on a wafer, yield and the cost of a die: the same book, section 1.5.
Rule 2 is common practice. It is not taken from a library source. Module S10 returns to it.
Every number of the worked example is an exercise number. No real factory price is used.
Now Run It: A Fast Build and a Small Build
The lab at the end of this page holds two multipliers of 8-bit numbers. The fast build works out the whole product between two clock edges. The small build has one adder and uses it eight times.
3 x 5: fast=15 in 1 cycle, small=15 in 9 cycles
200 x 17: fast=3400 in 1 cycle, small=3400 in 9 cycles
255 x 255: fast=65025 in 1 cycle, small=65025 in 9 cyclesThe answers agree in every row. The small build takes nine cycles: eight for the bits, and one for its done signal. We then ran each build alone through synthesis.
| Build | Cells | Flip-flops | Levels of logic | Clock cycles for one product |
|---|---|---|---|---|
| Fast | 347 | 17 | 30 | 1 |
| Small | 95 | 29 | 16 | 9 |
Cells, flip-flops and levels from Yosys, to generic gates. The cells include the flip-flops. The cycle counts are from the lab on Icarus.
Rule 5 at work: the fast build needs 347 cells and the small build 95. For this block, one cycle in place of nine costs more than three times the cells.
Look at the levels of logic too. The fast build has a chain of 30 gates between flip-flops, and the small build 16. A longer chain needs a longer clock period, as S2.6 will show. So the fast build may slow the clock of the whole chip.
Which build is right? It depends on the job. A chip that multiplies once in a thousand cycles should take the small one. S1.5 gives the test: what share of the time is this block?
The lab leaves things out. Generic gates have no real area, and nothing here measures power. Real numbers need the cells of one process.
Why It Is Built This Way
| Design choice | The alternative | What the choice buys, and costs |
|---|---|---|
| Lower the voltage | Lower only the frequency | Power falls with the square. The gates slow down, so the top speed falls too. |
| Share one adder over many cycles | One adder for each step | A fraction of the cells. Each result takes many cycles. |
| Keep the die small | Add every feature asked for | More dies from each wafer, and a better yield. Some features wait for the next chip. |
The Trap: Half the Clock, the Same Energy
A team must make a battery last longer. It halves the clock frequency, and the switching power halves. The battery lasts no longer.
The job now takes twice as long. Energy is power multiplied by time. Half the power for twice the time is the same energy.
| Clock | Switching power | Time of the job | Energy |
|---|---|---|---|
| 100 MHz | 80 mW | 1 second | 80 mW x 1 s |
| 50 MHz | 40 mW | 2 seconds | 40 mW x 2 s, the same |
Exercise numbers, for switching power only.
A lower voltage is different. It cuts the energy of each switch, so the job itself costs less. That is the reason rule 1 squares the voltage, and the reason it is the first lever.
At Scale
This section looks ahead. The three models of this page are the first estimate. A real chip refines each of them.
Power that never switches
A second kind of power flows even when no wire changes. It is called leakage. It grows with the number of transistors.
Voltage that follows the work
A large chip changes its voltage and frequency while it runs. S10.9 follows one such change.
Parts that are switched off
The cheapest block is one with its supply removed. S5.7 shows what that needs.
Heat
Every milliwatt leaves the chip as heat. In a phone, the case sets the limit long before the battery does.
Try It
Run the lab. Check each product by hand, or with a calculator.
Add a fourth pair of numbers. Predict both cycle counts before you run it.
Read mul_small. Find the one adder, and say why eight uses of it are enough.
3 x 5: fast=15 in 1 cycle, small=15 in 9 cycles 200 x 17: fast=3400 in 1 cycle, small=3400 in 9 cycles 255 x 255: fast=65025 in 1 cycle, small=65025 in 9 cyclesCheck Yourself
Common Mistakes
Wrong Halve the clock rate to save the energy of a job.
The job takes twice as long at half the power.
Fix Lower the voltage, or switch the block off when it is idle.
Wrong Expect twice the die area to cost twice the money.
Fewer dies fit on the wafer, and fewer of them work.
Fix Work out the good dies first, then divide the wafer cost.
Wrong Always pick the build with the fewest cycles.
It costs cells, and its long chain of gates may slow the clock.
Fix Find the share of time the block takes, then choose.
Remember
- Switching power is proportional to capacitance, voltage squared and frequency.
- A lower voltage saves the most, and it slows the gates.
- Cost of a good die is the wafer cost over the dies times the yield.
- Yield falls as the die grows, so cost rises faster than area.
- A faster build of one function costs more cells.