ESE 570: Digital Integrated Circuits and VLSI Fundamentals
Lec 17: March 26, 2020 Design Space Exploration, Sequential MOS
Logic
Penn ESE 570 Spring 2020 – Khanna
Lecture Outline
!
Energy Optimization/Design Tradeoffs
!
Design Space Exploration
"
Example
!
Sequential MOS Logic
2 Penn ESE 570 Spring 2020 – Khanna
Total Power
!
P
tot≈ P
static+ P
dyn+ P
sc3 Penn ESE 570 Spring 2020 – Khanna
Dynamic Power
!
Every time output switches 0#1 pay:
"
E = CV
2!
P
dyn= (# 0#1 trans) × CV
2/ time
!
# 0#1 trans = ½ # of transitions
!
P
dyn= (# trans) × ½CV
2/ time
4 Penn ESE 570 Spring 2020 – Khanna
Charging Power
!
P
dyn= (# 0#1 trans) × CV
2/ time
!
Often like to think about switching frequency
!
Useful to consider per clock cycle
"
Frequency f = 1/clock-period
!
P
dyn= (# 0#1 trans/clock) CV
2f
"
f # units of clock/time
5 Penn ESE 570 Spring 2020 – Khanna
Switching Power
!
P
dyn= (#0#1 trans/clock) CV
2f
!
Let a = activity factor a = average #tran
0#1/clock
!
P
dyn= aCV
2f
6 Penn ESE 570 Spring 2020 - Khanna
Activity Factor
!
Let a = activity factor
"
a = average #tran
0#1/clock
Penn ESE 570 Spring 2020 - Khanna 7
a = p(out
i= 0) p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 NActivity Factor
!
Let a = activity factor
"
a = average #tran
0#1/clock
Penn ESE 570 Spring 2020 - Khanna 8
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 NActivity Factor
!
Let a = activity factor
"
a = average #tran
0#1/clock
Penn ESE 570 Spring 2020 - Khanna 9
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 NN=2 N=4
A B AND
0 0 0
0 1 0
1 0 0
1 1 1
Activity Factor
!
Let a = activity factor
"
a = average #tran
0#1/clock
Penn ESE 570 Spring 2020 - Khanna 10
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 NN=2 N=4
A B AND
0 0 0
0 1 0
1 0 0
1 1 1
a =
3 4 ⋅ 1
4 = 3
16 a=?
Reduce Dynamic Power?
!
P
dyn= aCV
2f
!
Which has less dynamic power?
"
Assume all AND gates min size
11 Penn ESE 570 Spring 2020 - Khanna
A B
C D
O1
O2 F
A B
C D O1
O2 F
Reduce Activity Factor
Penn ESE 570 Spring 2020 - Khanna 12
A B
D C
O1
O2 F
A B
C D O1
O2 F
Tree Chain
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 Nall switch 0#1
Reduce Activity Factor
Penn ESE 570 Spring 2020 - Khanna 13
A B
C D
O1
O2 F
A B
C D O1
O2 F
Tree Chain
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 N3/16
3/16 all switch
0#1
Reduce Activity Factor
Penn ESE 570 Spring 2020 - Khanna 14
A B
D C
O1
O2 F
A B
C D O1
O2 F
Tree Chain
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 N3/16
3/16 15/256 all switch
0#1
Reduce Activity Factor
Penn ESE 570 Spring 2020 - Khanna 15
A B
C D
O1
O2
F A B
C D O1
O2 F
Tree Chain
3/16 7/64
15/256
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 Nall switch 0#1
Reduce Activity Factor
Penn ESE 570 Spring 2020 - Khanna 16
A B
D C
O1
O2
F A B
C D O1
O2 F
Tree Chain
3/16 7/64
15/256
a = p(out
i= 0)p(out
i+1= 1) a = N
02
NN
12
N= N
0(2
N− N
0) 2
2 N3/16
3/16 15/256 all switch
0#1
Total Power Summary
!
P
tot= P
static+ P
sc+ P
dyn!
P
sw= P
dyn+ P
sc≈ a(C
loadV
2f)
!
P
tot≈ a(C
loadV
2f) + VI
’s(W/L)e
-Vt/(nkT/q)!
Let a = activity factor a = average #tran
0#1/clock
17 Penn ESE 570 Spring 2020 – Khanna
Design Tradeoffs
Power vs Speed (Energy vs Delay)
Penn ESE 570 Spring 2020 – Khanna
Reduce V dd
!
What happens as reduce V?
"
Energy?
" Static
" Dynamic
"
Delay?
19 Penn ESE 570 Spring 2020 – Khanna
Reduce V dd
20
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dReduce V dd
21
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= 1 2 ( ) µC
ox( W L ) ( V
gs−V
th)
2Reduce V dd
22
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= 1 2 ( ) µC
ox( W L ) ( V
gs−V
th)
2τ
gd= CV
ddI
d= CV
dd( ) 1 2 µC
ox( W L ) ( V
gs−V
th)
2Reduce V dd
23
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= 1 2 ( ) µC
ox( W L ) ( V
gs−V
th)
2τ
gd= CV
ddI
d= CV
dd( ) 1 2 µC
ox( W L ) ( V
gs−V
th)
2τ
gd∝ 1 V
ddReduce V dd
24
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= 1 2 ( ) µC
ox( W L ) ( V
gs−V
th)
2τ
gd= CV
ddI
d= CV
dd( ) 1 2 µC
ox( W L ) ( V
gs−V
th)
2τ
gd∝ 1
V
ddE
dyn= CV
dd2Reduce V dd
25
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= 1 2 ( ) µC
ox( W L ) ( V
gs−V
th)
2τ
gd= CV
ddI
d= CV
dd( ) 1 2 µC
ox( W L ) ( V
gs−V
th)
2τ
gd∝ 1
V
dd× Edyn= CV
dd2 #
€
Eτ
2≈ Const 2
Reduce V dd
26
!
τ
gdimpact?
Penn ESE 570 Spring 2020 – Khanna
τ
gd= CV
ddI
dI
d= v
satC
oxW V ( gs−V
th−V
DSAT 2 )
Eτ ≈ Const
Slow Down
!
P
dyn= aCV
2f
!
P
stat= IV
!
What happens to energy as we reduce clock frequency by half?
"
Example: CMOS circuit consumes equal dynamic and
leakage power, X. No short circuit power. The energy consumed in T seconds is 2XT.
27 Penn ESE 570 Spring 2016 - Khanna
Slow Down
!
P
dyn= aCV
2f
!
P
stat= IV
!
What happens to energy as we reduce clock frequency by half?
"
Example: CMOS circuit consumes equal dynamic and
leakage power, X. No short circuit power. The energy consumed in T seconds is 2XT.
" E = PT = (X+X)T = 2XT
28 Penn ESE 570 Spring 2016 - Khanna
Slow Down
!
P
dyn= aCV
2f
!
P
stat= IV
!
What happens to energy as we reduce clock frequency by half?
"
Example: CMOS circuit consumes equal dynamic and
leakage power, X. No short circuit power. The energy consumed in T seconds is 2XT.
"
New energy: (X/2 + X)2T = 3XT
"
Increased energy!
29 Penn ESE 570 Spring 2016 - Khanna
Slow Down
!
P
dyn= aCV
2f
!
P
stat= IV
!
What happens to energy as we reduce V
ddby half?
"
Reducing V
ddslows our gates down, so assume the clock
frequency reduces by half.
"
Assume leakage current stays the same.
"
Example: CMOS circuit consumes equal dynamic and
leakage power, X. No short circuit power. The energy consumed in T seconds is 2XT.
30 Penn ESE 570 Spring 2016 - Khanna
Slow Down
!
P
dyn= aCV
2f
!
P
stat= IV
!
What happens to power contributions as we reduce V
ddby half?
"
Reducing V
ddslows our gates down, so assume the clock
frequency reduces by half.
"
Assume leakage current stays the same.
"
Example: CMOS circuit consumes equal dynamic and
leakage power, X. No short circuit power. The energy consumed in T seconds is 2XT.
!
New power: (X/8 + X/2)2T = 5XT/4 = 1.25XT
31 Penn ESE 570 Spring 2016 - Khanna
Idea
!
Tradeoff
"
Speed
"
Switching energy
"
Leakage energy
!
Energy-Delay tradeoff: Eτ
232 Penn ESE 570 Spring 2020 – Khanna
Design Space Exploration
Penn ESE 570 Spring 2020 - Khanna 33
Design Problem
!
Function: Identify equivalence of two 32bit inputs
!
Optimize: Minimize total energy
!
Assumptions: Match case uncommon
"
Ie. Most of the time, the inputs won’t be matched
!
Deliberately focus on Energy to complement HW 7 where you are minimizing delay
"
…but will still talk about delay
34 Penn ESE 570 Spring 2020 - Khanna
Idea: Design Space Explore
!
Identify options
"
All the knobs you can turn
!
Explore space systematically
!
Formulate continuum where possible
"
i.e. formulate trends and tradeoffs quantitatively
35 Penn ESE 570 Spring 2020 - Khanna
Problem Solvable
!
Is it feasible?
"
First, make sure we have a solution so we know our main
goal is optimization
!
How do we decompose the problem?
36 Penn ESE 570 Spring 2020 - Khanna
Problem Solvable
!
Is it feasible?
"
First, make sure we have a solution so we know our main
goal is optimization
!
How do we decompose the problem?
"
Bit-by-bit comparison
!
What does this look like built out of nand2 gates and inverters?
37 Penn ESE 570 Spring 2020 - Khanna
Bit-by-bit Comparison with NAND2
Penn ESE 570 Spring 2020 - Khanna 38
A
B O
Combine Bit Comparison Outputs
Penn ESE 570 Spring 2020 - Khanna 39
Single Gate Match Condition
!
Design a single gate for match comparison
Penn ESE 570 Spring 2020 - Khanna 40
Single Gate Match Condition
!
Design a single gate for match comparison
Penn ESE 570 Spring 2020 - Khanna 41
Out = A⋅ B + A⋅ B
Comparison
Penn ESE 570 Spring 2020 - Khanna 42
-Assume inputs driven with min size inverters -C
d=0
-R
un=R, C
g=C
Combine Bit Comparison Outputs
Penn ESE 570 Spring 2020 - Khanna 43
Total Power
!
Static CMOS:
"
P
tot≈ a(C
load+2C
sc)V
2f+VI
’s(W/L)e
-Vt/(nkT/q)!
Ratioed Logic:
"
P
tot≈ a(C
load+2C
sc)V
2f
+p(V
out=low)V
2/R
pon+(1-p(V
out=low))VI
’s(W/L)e
-Vt/(nkT/q)!
What can we do to reduce power?
44 Penn ESE 570 Spring 2020 - Khanna
Knobs
!
What are the options and knobs we can turn?
45 Penn ESE 570 Spring 2020 - Khanna
Design Space Dimensions
!
Topology
"
(A) Gate choice, logical optimization
"
(B) Fanin, fanout, (C) Serial vs. parallel
!
Gate style / logic family
"
(D) CMOS, Ratioed (N load, P load), Pass Logic
!
(E) Transistor Sizing
!
(F) Vdd
!
(G) Vth
46 Penn ESE 570 Spring 2020 - Khanna
Topology
!
(A) Gate choice. What gates might we build?
47 Penn ESE 570 Spring 2020 - Khanna
Topology
!
(A) Gate choice. What gates might we build?
48 Penn ESE 570 Spring 2020 - Khanna
Topology
!
(B) Higher fanin?
49 Penn ESE 570 Spring 2020 - Khanna
-Reduced switching because we know inputs don’t match often # small a -Increased Cload on gates # Pdyn goes up
Topology
!
(C) Serial-Parallel?
50 Penn ESE 570 Spring 2020 - Khanna
-As soon as mismatch is found all switching stops # small a
-Increased delay, but our goal here is to minimize power
(D) Logic Family
!
Considerations for each logic family?
51 Penn ESE 570 Spring 2020 - Khanna
(D) Logic Family
!
Considerations for each logic family?
"
CMOS
"
Ratioed with PMOS load
"
Ratioed with NMOS load
!
Ratioed Logic
"
Reduced C
loadsresult in lower switching power (P
dyn$)
"
Increased steady-state power
52 Penn ESE 570 Spring 2020 - Khanna
(E) Sizing
!
How do we want to size gates?
53 Penn ESE 570 Spring 2020 - Khanna
(E) Sizing
!
How do we want to size gates?
"
Sizing transistors up will reduce delay #
"
Reduces short circuit power
"
Increases dynamic power
54 Penn ESE 570 Spring 2020 - Khanna
€
E = V
dd× I
peak× t
sc× 1 2
#
$ % &
' (
#
$ % &
' (
(F) Reduce Vdd
!
What happens as reduce V?
"
Energy?
" Dynamic $
" Static $
"
Switching Delay? %
&
τ
gd=Q/I=(CV)/I
&
I
d=(µC
OX/2)(W/L)(V
gs-V
TH)
2&
τ
gdimpact?
&
τ
gdα 1/V
&
Limit on V
dd?
55 Penn ESE 570 Spring 2020 - Khanna
(G) Increase V th ?
!
What is impact of increasing threshold on
"
Dynamic Energy? $
"
Leakage Energy? $
"
Delay? %
56 Penn ESE 570 Spring 2020 - Khanna
V
gsI
dV
tV
tV
ddIdeas
!
Three components of power
"
P
tot= P
static+ P
dyn+ P
sc!
We know many things we can do to our circuits
!
Design space is large
!
Systematically identify dimensions
!
Identify continuum (trends) tuning when possible
!
Watch tradeoffs
"
…don’t over-tune
57 Penn ESE 570 Spring 2020 – Khanna
Sequential MOS Logic
Penn ESE 570 Spring 2020 – Khanna
Classes of Logic Circuits
59 Combinational Circuits:
a. Current Output(s) depend ONLY on Current Inputs.
b. Suited to problems that can be solved using truth tables.
Sequential Circuits or State Machines:
a. Current Output(s) depend on Current Inputs and Past Inputs via State(s).
b. Suited to problems that are solved by completing several steps using current inputs and past outputs in a specific order or a sequential manner.
Penn ESE 570 Spring 2020 – Khanna
Sequential Circuit (or State Machine) Construct
60
-> Register is used to Store Past Values of State(s) and Output(s)
-> Synchronous Sequential Circuit – clock, outputs change with clock event
-> Asynchronous Sequential Circuit – no clock, outputs change after inputs changeV
o1V
o2. . . .
. . . .
V
o3Present State
Next State
Inputs Outputs
Clock
REGISTER
Penn ESE 570 Spring 2020 – Khanna
Synchronous Discipline
!
Add state elements (registers, latches)
!
Compute
"
From state elements
"
Through combinational logic
"
To new values for state elements
61 Penn ESE 570 Spring 2020 – Khanna
Static Bistable Sequential Circuits
62 Basic Cross-
coupled Inverter pair
Q Q
Penn ESE 570 Spring 2020 – Khanna
63 Basic Bistable Cross-coupled Inverter Pair has no means to apply input(s)
to change the circuit's State.
Basic Cross- coupled Inverter
pair Q
Q
V
OH= V
DDV
OL= 0 maintain stable state.
STATIC: V
DDand GND are required to maintain a stable state.
Static Bistable Sequential Circuits
Penn ESE 570 Spring 2020 – Khanna
Basic Sequential Circuits (Cells)
!
Latches
!
Registers
64 Penn ESE 570 Spring 2020 – Khanna
Latch
65
Q = CLK ⋅Q + CLK ⋅ In
!
Level-sensitive device
!
Positive Latch
"
Output follows input if
CLK high
!
Negative Latch
"
Output follows input if
CLK low
Penn ESE 570 Spring 2020 – Khanna
Register
66
!
Edge-triggered storage element
!
Positive edge-triggered
"
Input sampled on
rising CLK edge
!
Negative edge- triggered
"
Input sampled on
falling CLK edge
Penn ESE 570 Spring 2020 – Khanna
Shift Register
!
How do you make a shift register out of latches?
67 Penn ESE 570 Spring 2020 - Khanna
Positive-Edge Triggered Register
!
Build register from pair of positive latches
!
What happens when φ
0is high?
!
What happens when φ
1is high?
68 Penn ESE 570 Spring 2020 – Khanna
QM
Positive-Edge Triggered Register
!
Build register from pair of positive latches
69 Penn ESE 570 Spring 2020 – Khanna
QM
Positive-Edge Triggered Register
!
Build register from pair of positive latches
!
What could go wrong if clocks overlap?
70 Penn ESE 570 Spring 2020 – Khanna
QM
Positive-Edge Triggered Register
!
Build register from pair of positive latches
!
Control with non-overlapping clocks
71 Penn ESE 570 Spring 2020 – Khanna
Timing Hazards
72 Penn ESE 570 Spring 2020 – Khanna
Clocking Discipline
!
Follow discipline of combinational logic broken by registers
!
Compute
"
From state elements
"
Through combinational logic
"
To new values for state elements
!
As long as clock cycle long enough,
"
Will get correct behavior
73 Penn ESE 570 Spring 2020 - Khanna
Latch Timing Issues
Penn ESE 570 Spring 2020 - Khanna 74
Latch Timing Issues
Penn ESE 570 Spring 2020 - Khanna 75
!
t
su=time data (D) must be valid before CLK edge
!
t
plogic=worst case propagation delay of logic
!
t
c-p=worst case propagation delay of latch
Latch Timing Issues
Penn ESE 570 Spring 2020 - Khanna 76
!
t
cdregister=minimum propagation delay of latch
!
t
cdlogic=minimum propagation delay of logic
!
t
hold=time data (D) must stay valid after CLK edge
Timing Example
Penn ESE 570 Spring 2020 - Khanna 77
Timing Example
Penn ESE 570 Spring 2020 - Khanna 78
Timing Example
Penn ESE 570 Spring 2020 - Khanna 79
Timing Example
Penn ESE 570 Spring 2020 - Khanna 80
Clocking Highlights
!
Clock discipline simplifies logic composition
"
Abstracts many internal timing details
"
Just concerned with making clock period long enough
!
Breaking logic up with registers allows circuit to run at high frequency
"
Inputs decoupled from outputs
!
Design Discipline – keeping data stable around clock edge
"
Setup, hold time – determined by latch circuit
"
Worst case and minimum Clk#Q delay for latch
81 Penn ESE 570 Spring 2020 - Khanna
Ideas
!
Synchronize circuits
"
to external events (eg. Clk)
"
disciplined reuse of circuitry
!
Leads to clocked circuit discipline
"
Uses state holding element (eg. Latches and registers)
"
Prevents
" Timing assumptions
" (More) complex reasoning about all possible timings
82 Penn ESE 570 Spring 2020 – Khanna
Admin
!
HW 7 due 4/3
"
Only choose the multiplier if you have designed an adder
before…
"
…but you don’t have to
"
Start yesterday!
"
Will take time and organization
"
Remember to test each gate/block for functionality before
connecting them together
"
See references in Canvas Files
"
Midterm on Monday
"
Yuanlong review session Friday 7-9pm
83 Penn ESE 570 Spring 2020 – Khanna