Chapter 3 <1>
Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe100/
Chapter 3 Professor Brendan Morris, SEB 3216, - - PowerPoint PPT Presentation
Chapter 3 Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe100/ CPE100: Digital Logic Design I Section 1004: Dr. Morris Sequential Logic Design Chapter 3 <1> Chapter 3 :: Topics
Chapter 3 <1>
Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe100/
Chapter 3 <2>
Chapter 3 <3>
Chapter 3 <4>
Chapter 3 <5>
Chapter 3 <6>
Chapter 3 <7>
Q Q I1 I2 1 1
Chapter 3 <8>
Q Q I1 I2 1 1 Q Q I1 I2 1 1
Chapter 3 <9>
Chapter 3 <10>
Chapter 3 <11>
R S Q Q N1 N2 1 1
Chapter 3 <12>
R S Q Q N1 N2 1 1
Chapter 3 <13>
R S Q Q N1 N2 1 1 R S Q Q N1 N2 1 1 1
Chapter 3 <14>
R S Q Q N1 N2 1 1 R S Q Q N1 N2 1 1 1
Chapter 3 <15>
R S Q Q N1 N2 R S Q Q N1 N2 Qprev = 0 Qprev = 1 1
Chapter 3 <16>
R S Q Q N1 N2 R S Q Q N1 N2 Qprev = 0 Qprev = 1 1
Chapter 3 <17>
R S Q Q N1 N2 R S Q Q N1 N2 Qprev = 0 Qprev = 1 1
R S Q Q N1 N2 1 1
Chapter 3 <18>
R S Q Q N1 N2 R S Q Q N1 N2 Qprev = 0 Qprev = 1 1
R S Q Q N1 N2 1 1
Chapter 3 <19>
R S Q Q N1 N2 R S Q Q N1 N2 Qprev = 0 Qprev = 1
R S Q Q N1 N2 1 1
Chapter 3 <20>
Chapter 3 <21>
Chapter 3 <22>
S R Q Q Q Q D CLK
D R S
Chapter 3 <23>
S R Q Q Q Q D CLK
D R S
Chapter 3 <24>
Chapter 3 <25>
CLK D Q Q CLK D Q Q Q Q D N1 CLK L1 L2
– D passes through to N1
Chapter 3 <26>
CLK D Q Q CLK D Q Q Q Q D N1 CLK L1 L2
– L1 is transparent – L2 is opaque – D passes through to N1
– L2 is transparent – L1 is opaque – N1 passes through to Q
Chapter 3 <27>
CLK D Q Q CLK D Q Q Q Q D N1 CLK L1 L2
– L1 is transparent – L2 is opaque – D passes through to N1
– L2 is transparent – L1 is opaque – N1 passes through to Q
– D passes through to Q
Chapter 3 <28>
CLK D Q (latch) Q (flop)
Chapter 3 <29> CLK D Q (latch) Q (flop)
Chapter 3 <30>
Chapter 3 <31>
CLK D Q D Q D Q D Q D0 D1 D2 D3 Q0 Q1 Q2 Q3
Chapter 3 <32>
Internal Circuit D Q CLK EN D Q 1 D Q EN Symbol
Chapter 3 <33>
Internal Circuit D Q CLK EN D Q 1 D Q EN Symbol
Chapter 3 <34>
Reset r
Chapter 3 <35>
Chapter 3 <36>
Internal Circuit D Q CLK D Q Reset
Chapter 3 <37>
Set s
Chapter 3 <38>
Chapter 3 <39>
Chapter 3 <40>
Chapter 3 <41>
Next State Current State S’ S CLK
Next State Logic Next State
Output Logic Outputs
Chapter 3 <42>
CLK M N k k
next state logic
logic
Moore FSM CLK M N k k
next state logic
logic
inputs inputs
state state next state next state
Mealy FSM
– Moore FSM: outputs depend only on current state – Mealy FSM: outputs depend on current state and inputs
Chapter 3 <43>
Chapter 3 <44>
TA LA TA LB TB TB LA LB
Academic Ave. Bravado Blvd. Dorms Fields Dining Hall Labs
Chapter 3 <45>
Chapter 3 <46>
Note: multiple bits for output
Chapter 3 <47>
Chapter 3 <48>
S0 LA: green LB: red Reset
TA LA TA LB TB TB LA LB
Academic Ave. Bravado Blvd. Dorms Fields Dining Hall Labs
Chapter 3 <49>
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
TA LA TA LB TB TB LA LB
Academic Ave. Bravado Blvd. Dorms Fields Dining Hall Labs
Chapter 3 <50>
Chapter 3 <51>
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <52>
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <53>
Chapter 3 <54>
Two bits required for 4 states
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <55>
Two bits required for 4 states
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <56>
Chapter 3 <57>
Two bits required for 3 outputs
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <58>
Two bits required for 3 outputs
S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <59>
Chapter 3 <60>
S1 S0 S'1 S'0 CLK
state register
Reset r
Chapter 3 <61>
S1 S0 S'1 S'0 CLK
next state logic state register
Reset TA TB
inputs
S1 S0 r
Chapter 3 <62>
S1 S0 S'1 S'0 CLK
next state logic
state register
Reset LA1 LB1 LB0 LA0 TA TB
inputs
S1 S0 r
Chapter 3 <63>
CLK Reset TA TB S'1:0 S1:0 LA1:0 LB1:0 Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7 Cycle 8 Cycle 9 Cycle 10 S1 (01) S2 (10) S3 (11) S0 (00) t (sec) ?? ?? S0 (00) S0 (00) S1 (01) S2 (10) S3 (11) S1 (01) ?? ??
5 10 15 20 25 30 35 40 45 Green (00) Red (10)
S0 (00)
Yellow (01) Red (10) Green (00) Green (00) Red (10) Yellow (01) S0 LA: green LB: red S1 LA: yellow LB: red S3 LA: red LB: yellow S2 LA: red LB: green TA TA TB TB Reset
Chapter 3 <64>
Chapter 3 <65>
Chapter 3 <66>
1. Identify inputs and outputs 2. Sketch state transition diagram 3. Write state transition table 4. Select state encodings 5. Rewrite state transition table with state encodings 6. Write output table 7. Write Boolean equations for next state and output logic 8. Sketch the circuit schematic
Chapter 3 <67>
Chapter 3 <68>
CLK tsetup D thold ta
Chapter 3 <69>
CLK tccq tpcq Q
Chapter 3 <70>
Chapter 3 <71>
C L CLK CLK R1 R2 Q1 D2 (a) CLK Q1 D2 (b) Tc
Chapter 3 <72>
CLK Q1 D2 Tc tpcq tpd tsetup C L CLK CLK Q1 D2 R1 R2
Chapter 3 <73>
CLK Q1 D2 Tc tpcq tpd tsetup C L CLK CLK Q1 D2 R1 R2
Chapter 3 <74>
CLK Q1 D2 Tc tpcq tpd tsetup C L CLK CLK Q1 D2 R1 R2
(tpcq + tsetup): sequencing overhead
Chapter 3 <75>
CLK Q1 D2 tccq tcd thold C L CLK CLK Q1 D2 R1 R2
Chapter 3 <76>
CLK Q1 D2 tccq tcd thold C L CLK CLK Q1 D2 R1 R2
Chapter 3 <77>
CLK Q1 D2 tccq tcd thold C L CLK CLK Q1 D2 R1 R2
Chapter 3 <78> CLK CLK A B C D X' Y' X Y
per gate
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps tpd = 35 ps tcd = 25 ps
tpd = tcd = Setup time constraint: Tc ≥ tpcq + tpd + tsetup fc = Hold time constraint: tccq + tcd > thold ?
Chapter 3 <79> CLK CLK A B C D X' Y' X Y
per gate
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps tpd = 35 ps tcd = 25 ps
tpd = 3 x 35 ps = 105 ps tcd = 25 ps Setup time constraint: Tc ≥ tpcq + tpd + tsetup Tc ≥ (50 + 105 + 60) ps = 215 ps fc = 1/Tc = 4.65 GHz Hold time constraint: tccq + tcd > thold ? (30 + 25) ps > 70 ps ? No!
Chapter 3 <80>
per gate
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps tpd = 35 ps tcd = 25 ps
tpd = tcd = Setup time constraint: Tc ≥ fc = Hold time constraint: tccq + tcd > thold ?
CLK CLK A B C D X' Y' X Y
Add buffers to the short paths:
Chapter 3 <81>
per gate
tccq = 30 ps tpcq = 50 ps tsetup = 60 ps thold = 70 ps tpd = 35 ps tcd = 25 ps
tpd = 3 x 35 ps = 105 ps tcd = 2 x 25 ps = 50 ps Setup time constraint: Tc ≥ tpcq + tpd + tsetup Tc ≥ (50 + 105 + 60) ps = 215 ps fc = 1/Tc = 4.65 GHz Hold time constraint: tccq + tcd > thold ? (30 + 50) ps > 70 ps ? Yes!
CLK CLK A B C D X' Y' X Y
Add buffers to the short paths:
Chapter 3 <82>
Chapter 3 <83>
Chapter 3 <84>
Chapter 3 <85>
Chapter 3 <86>
Chapter 3 <87>
Spatial Parallelism Roll Bake Ben 1 Ben 1 Alyssa 1 Alyssa 1 Ben 2 Ben 2 Alyssa 2 Alyssa 2 Time
5 10 15 20 25 30 35 40 45 50
Tray 1 Tray 2 Tray 3 Tray 4
Latency: time to first tray
Legend
Chapter 3 <88>
Spatial Parallelism Roll Bake Ben 1 Ben 1 Alyssa 1 Alyssa 1 Ben 2 Ben 2 Alyssa 2 Alyssa 2 Time
5 10 15 20 25 30 35 40 45 50
Tray 1 Tray 2 Tray 3 Tray 4
Latency: time to first tray
Legend
Chapter 3 <89>
Temporal Parallelism Ben 1 Ben 1 Ben 2 Ben 2 Ben 3 Ben 3 Time
5 10 15 20 25 30 35 40 45 50 Latency: time to first tray
Tray 1 Tray 2 Tray 3
Chapter 3 <90>
Temporal Parallelism Ben 1 Ben 1 Ben 2 Ben 2 Ben 3 Ben 3 Time
5 10 15 20 25 30 35 40 45 50 Latency: time to first tray
Tray 1 Tray 2 Tray 3
Chapter 3 <91>
Chapter 3 <92>
Chapter 3 <93>
Chapter 3 <94>