Hpca2001 Tutorial
Hpca2001 Tutorial
Margaret Martonosi
David Brooks
Pradip Bose
VET NOV
TES TAM
EN TVM
DEI VI GET
SVB NVMINE
Moore’s Law & Power Dissipation...
Moore’s Law:
❚ The Good News: 2X
Transistor counts
every 18 months
❚ The Bad News: To
get the performance
improvements we’re
accustomed to, CPU
Power consumption
will increase
exponentially too...
Battery
life
Thermal issues: affect
cooling, packaging,
reliability, timing
Environment
Hitting the wall…
❚ Battery technology
❙ Linear improvements, nowhere ❚ Past:
near the exponential power ❙ Power important for
increases we’ve seen laptops, cell phones
❚ Cooling techniques ❚ Present:
❙ Air-cooled is reaching limits ❙ Power a Critical, Universal
❙ Fans often undesirable (noise, design constraint even for
weight, expense) very high-end chips
❙ $1 per chip per Watt when
operating in the >40W realm ❚ Circuits and process scaling
can no longer solve all power
❙ Water-cooled ?!?
problems.
❚ Environment
❙ SYSTEMS must also be
❙ US EPA: 10% of current electricity
usage in US is directly due to power-aware
desktop computers ❙ Architecture, OS, compilers
❙ Increasing fast. And doesn’t count
embedded systems, Printers, UPS
backup?
Power: The Basics
Power ~ ½ CV2Af
Clock frequency:
Activity factor: Increasing…
How often, on average,
do wires switch?
Short-Circuit Power Dissipation
ISC
VIN VOUT
CL
− q⋅VT
VIN
ISub
VOUT
IDSub = k ⋅ e a⋅ka⋅T
CL
Moto PPC740
Intel Celeron
AMD Athlon
HP-PA8600
MIPS R12K
IBM PWR3
Compaq 21264
Moto PPC740
Intel Celeron
Sun USII
AMD Athlon
HP-PA8600
MIPS R12K
IBM PWR3
Intel PIII
Sun USII
(Brooks et al., IEEE Micro, Nov/Dec 2000)
• Note:
> at the low end, E metrics like SpecInt/W appear to be fair
> at the highest end, ED2P metrics like (SpecInt)3/W seem to do the job
> perhaps at the midrange, EDP metrics like (SpecInt)2/W are appropriate?
Part II: Abstractions
What can architects & systems people
do to help?
❚ Micro-Architecture & Architecture
❙ Shrink structures
Application ❙ Shorten wires
❙ Reduce activity factors
OS compilers ❙ Improve instruction-level control
❚ Compilers
❙ Reduce wasted work: “standard” operations
architecture ❙ More aggressive register allocation and cache
optimization
microarchitecture ❙ Trade off parallelism against clock frequency
❚ Operating Systems
circuits ❙ Natural, since OS is traditional resource
and manager
below… ❙ Equal energy scheduling
❙ Battery-aware or thermally-aware adaptation
What do architects & systems people
need to have, in order to help?
❚ Better observability and control of power
characteristics
Application ❙ Ability to see current power, thermal
status
OS compilers
❘ Temperature sensors on-chip
❘ Battery meters
architecture ❙ Ability to control power dissipation
microarchitecture ❘ Turn units on/off
❘ Techniques to impact leakage
circuits ❙ Abstractions for efficient
and modeling/estimation of power
below… consumption
Power/Performance abstractions at
different levels of this hierarchy…
❚ Low-level:
❙ Hspice
❙ PowerMill
❚ Medium-Level:
❙ RTL Models
❚ Architecture-level:
❙ PennState SimplePower
❙ Intel Tempest
❙ Princeton Wattch
❙ IBM PowerTimer
Low-level models: Hspice
❚ Examples:
❙ SimplePower, Tempest, Wattch, PowerTimer…
Wordlines Cell
(Number of
Entries)
Number of entries
❚ On each cycle:
❙ determine which units are accessed
❙ model execution time issues
❙ model per-unit energy/power based on which units used and
how many ports.
Units Modeled by Wattch
60
50
40
falls short.
30
20
10
0 H ardw are Structure Intel D ata W attch
Pentium MIPS Alpha Instruction Fetch 22% 21%
Pro R10K 21264 R egister A lias T able 6% 5%
R eservation Stations 8% 9%
R eorder B uffer 11% 12%
Typically 10-15% relative Integer E xec. U nit 15% 15%
D ata C ache U nit 11% 11%
accuracy as compared to M em ory O rder B uffer 6% 5%
low-level industry data. Floating P oint E xec. U nit 8% 8%
G lobal C lock 8% 10%
B ranch Target B uffer 5% 4%
Wattch Simulation Speed
❚ Future Work:
❙ User selectable circuit styles (high-performance, low-
power, etc)
❙ Update models as technologies change
PowerTimer
PowerTimer
Circuit Power SubUnit Power =
Data (Macros) f(SF, uArch, Tech)
Power=C1*SF+HoldPower Macro1
Power
SF Power=C2*SF+HoldPower Macro2 Estimate
Data
Power=Cn*SF+HoldPower MacroN
PowerTimer: Power models f(SF)
Power linearly dependent on Switching Factor
1400
1200
1000 fpq
800 fxq
mW
fpr-map
600
gpr-map
400
gct
200
0
0 10 20 30 40 50
SF
❚ Challenges:
❙ Difficult to get enough motherboard information to
measure the power you want to.
❙ Even harder (ie impossible) to break down on-chip
power into a pie chart of different contributers
❙ Difficult to ascribe power peaks and valleys to
particular software behavior or program constructs.
A few typical meter-based setups #1:
Voltage-drops with transceivers …
Rsense
+ Vsense
Vsupply Computing
- System
Ammeter
+
Vsupply Computing
- Iammeter System
Basic idea:
❚ Most (all?) high-end CPUs have a bank of hardware
performance counters
❚ Performance counters track a variety of program events
❙ Cache misses
❙ Branch mispredicts…
❚ If these events are also the main power dissipators, then
we can hope these counters can also help power
measurement
❚ Estimate power by weighting and superimposing event
counts appropriately
CASTLE: Details & Methodology
Counter Values
C11 … C1M W1 P1
Appls
=
…
…
C1N … CNM WM PM
vortex -6.36
CASTLE: Further work & issues
❚ Accuracy/Methodology
❙ How many “training” applications?
❙ Different training methods for different application domains
❘ If so, which weights to choose?
❚ Portability issues
❙ Different CPUs have different event counters
❘ >200 on IBM Power architecture
❘ ~50 on Intel Pentium
❘ Few on Alpha
❘ Varies from implementation to implementation
❘ Still working on seeing which counts are key ones, which counts
are extraneous
❙ Also different models for time required to read counters
❘ Polling vs. interrupt…
❘ Overhead…
Other Measurement Techniques
❚ Thermal sensors
❙ [Sanchez et al. 1995]
❙ PowerPC includes thermal sensor and allows for real-
time responses to thermal emergencies.
❘ Eg. Reduce instruction fetch rate
Break #2 (5 minutes)
Comparing different
measurement/modeling techniques
Input Output
MODEL
An Input Testcase
MODEL GOLDEN
UNDER TEST REFERENCE
compare
• Secondary problems: outputs
– generate apt test cases
– test case coverage
– choice of o/p signatures Flag Error (if outputs differ)
Comparing Apples to Apples
❚ Like technologies
❚ Similar architectures
❚ Circuit styles
❚ Clocking styles
❚ Industry details
Technology Trends: Overview
* IBM Research, Bose et al. 1995 - 2000: applied to perf validation for high-end PPC
* U of Michigan, Davidson et al. 1991 - 1998
• Dynamic Bounds:
– analyze a trace; build a graph; assign node/edge costs;
process graph to compute net cost (time)
(e.g. Wellman96, Iyengar et al., HPCA-96)
Static Bounds - Example
Consider an in-order-issue
super scalar machine:
fadd fp3, fp1, fp0
lfdu fp5, 8(r1) • disp_bw = iss_bw = compl_bw = 4
lfdu fp4, 8(r3) • fetch_bw = 8
• l_ports = ls_units = 2
fadd fp4, fp5, fp4 • s_ports = 1
fadd fp1, fp4, fp3 • fp_units = 2
stfdu fp1, 8(r2)
bc loop_top
N = number of instructions/iteration = 7
MIPS /pseudowatts
Inflexion points
of interest
150
0.6
100
0.4
50
0.2
0 0
1
3
5
7
9
1
3
5
7
9
150
• Poor “absolute”
100 accuracy of
“true” h/w
50 measurement (say) simulator
0 • But, good
1 2 3 4 5 6 7 8 9 1 “relative”
S uperscalar width W
accuracy
In real-life, early-stage design tradeoff studies, relative
accuracy is more important than absolute accuracy
Abstraction via Separable Components
The issue of absolute vs. relative accuracy is raised in any
modeling scenario: be it “performance-only”, “power” or
“power-performance.”
Standalone
Standalone BP sim
Detailed, full Baseline, cache sim
model cycle “infprf”
simulator simulator
Delta-CPI
CPIinfprf Delta-CPI
CPIactual (cache)
(BP)
CPI approx(sc)
CPI
CPI
True- 1
0.6 CPI
0.4 INF-PRF-
INF- 0.5
0.2 CPI
0 PRF-CPI
0
2
48
64
80
96
2
48
64
80
96
11
11
Rename registers Rename registers
❚ The reason?
❙ Supply Voltage ↓ to save power =>
❙ => Threshold voltages ↓ to maintain performance
❙ => Leakage current ↑
Other technology trends and needs
❚ Need:
❙ Good models for leakage current
❙ Ways of handling chips with more than one Vt
❙ Models that link power and thermal characteristics
Other resources
❚ Tutorial webpage
❙ Access to slides:
❘ [Link]
❘ Also, semi-comprehensive Power Bibliography…