Professional Documents
Culture Documents
6.004 Computation Structures: Mit Opencourseware
6.004 Computation Structures: Mit Opencourseware
edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Sequential Logic:
adding a little state
2.71354 volts
01101
QUIZ #1 Tomorrow!
(covers thru L4/R5)
2/19/09
2/19/09
Digital State
One model of what wed like to build
New State
Memory Device
light
Current State
button
LOAD Input
Combinational Logic
Output
What makes this circuit so dierent from those weve discussed before?
1. State i.e. the circuit has memory 2. The output was changed by a input event (pushing a button) rather than an input value
6.004 Spring 2009 2/19/09 L05 Sequential Logic 3
Plan: Build a Sequential Circuit with stored digital STATE Memory stores CURRENT state, produced at output
Combinational Logic computes NEXT state (from input, current state) OUTPUT bit (from input, current state) State changes on LOAD control input
6.004 Spring 2009 2/19/09 L05 Sequential Logic 4
Needed: Storage
Combinational logic is stateless:
valid outputs always reect current inputs.
To build devices with state, we need components which store information (e.g., state) for subsequent access.
ROMs (and other combinational logic) store information wired in to their truth table Read/Write memory elements are required to build devices capable of changing their contents.
To write: Drive bit line, turn on access fet, force storage cap to new voltage To read: precharge bit line, turn on access fet, detect (small) change in bit line voltage
6.004 Spring 2009 2/19/09
Pros: compact low cost/bit (on BIG memories) Cons: complex interface stable? (noise, ) it leaks! refresh
Suppose we refresh CONTINUOUSLY?
VOUT
D B G S
2/19/09
D G Q
TPD
V1
V2
Q Y
D G Q
Q
TPD
V1
D G
Q Y
V1 TPD
V2
V1 TPD
V2
Assume LENIENT Mux, propagation delay of TPD Then output valid when G=1, D stable for TPD, independently of Q; or Q=D stable for TPD , independently of G; or G=0, Q stable for TPD , independently of D
L05 Sequential Logic 9 6.004 Spring 2009 2/19/09
Q(D,G)
Q(D,Q) Q(G,Q)
Q A D G
0 1
Q Y
D G Q
V2
D
V2 TPD TPD TPD
Q
Current State
Combinational Logic
Output
Input
TSETUP THOLD
Plan: Build a Sequential Circuit with one bit of STATE Single latch holds CURRENT state
Combinational Logic computes NEXT state (from input, current state) OUTPUT bit (from input, current state) State changes when G = 1 (briey!)
6.004 Spring 2009 2/19/09 L05 Sequential Logic 12
Q
Current State
1
Input
Combinational Logic
Output
2/19/09
Escapement Strategy
The Solution: Add two gates and only open one at a time.
D
D0 1
S
D G
D G
D CLK
master
slave
CLK
Observations: Transitions mark only one latch transparent at any time: instants, not intervals master closed when slave is open slave closed when master is open no combinational path through ip op
(the feedback path in one of the master or slave latches is always active)
Q only changes shortly after 0 1 transition of CLK, so ip op appears to be triggered by rising edge of CLK
2/19/09 L05 Sequential Logic 16
D G
D G
master
slave
CLK
Q
master closed slave open
6.004 Spring 2009
Accumulated tCD thru inverter, G Q path of master must cover slave tHOLD for this design to work!
6.004 Spring 2009 2/19/09 L05 Sequential Logic 18
Well use Flip Flops and Registers groups of FFs sharing a clock input in a highly constrained way to build digital systems:
Q CLK D
tPD: maximum propagation delay, CLK tCD: minimum contamination delay, CLK tSETUP: setup time
guarantee that D has propagated through feedback path before master closes
Q Q
reg1 CLK
reg2
Questions for register-based designs: how much time for useful work (i.e. for combinational logic delay)? does it help to guarantee a minimum tCD? How bout designing registers so that tCD,reg > tHOLD,reg? what happens if CLK signal doesnt arrive at the two registers at exactly the same time (a phenomenon known as clock skew)?
Memory Device
Clock Input
Current State
Combinational Logic
Output
t1 CLK QR1
tPD,reg1 tCD,reg1 tCD, 1 tPD, 1
t2
Active Clock Edges punctuate time -- Discrete Clock periods Discrete State Variables Discrete specications (simple rules eg tables relating outputs to inputs, state variables) ABSTRACTION: Finite State Machines (next lecture!)
2/19/09
Summary
Sequential Circuits (with memory): Basic memory elements:
Feedback, detailed analysis => D basic level-sensitive devices Clk (eg, latch) 2 Latches => Flop Q Dynamic Discipline: constraints on input timing
Simple rules for sequential circuits Yields clocked circuit with TS, TH constraints on input timing >t s >t h
Combinational Logic
tCD,L = ? tPD,L = 5ns
Output
>t cd <t pd
In
DQ
Combinational logic
DQ
Out
Clk