L06
L06
Result: a bistable
1
0 0
1 1
0 storage element
VIN VOUT
Not affected
VTC for
Feedback constraint: by noise
inverter pair
VIN = VOUT
VOUT
Three solutions:
• two end-points are stable
• middle point is metastable
1 1
Q D 0 Q
D 0
C C
1 0
D V1 V2
if C=1, the value of Q holds
C
if C=0, the value of D passes to Q
Q V1 V2
D
Q tPD tPD
DL
C C D Qt-1 Qt
0 0 X 0
Qt-1 represents the value 0 1 X 1
pass
previously held in DL; 1 X 0 0
Qt represents the current value. hold
1 X 1 1
Next
State
D Q
Current
DL State Combinational
C
Logic
Input Output
Gate 2 Gate 2
Gate 1 Gate 1
Sequence
of values
D QInt D
Q
DL DL D
Q
C C
Next
State
D Q
Current
D State Combinational
Logic
Input Output
D 0
Q
D D 1 Q
Clk
Clk
D
t1 t2 t3
EN D Qt Qt+1
Clk
0 X 0 0
EN hold
0 X 1 1
D 1 0 X 0 copy
Q 1 1 X 1 input
Transitions happen at
Data is captured rising edge of the clock
only if EN is on No need to specify the
clock explicitly
September 26, 2023 MIT 6.191 Fall 2023 L06-15
How Are Flip-Flops Initialized?
Reset
EN Reset
Initial Value 1
D EN 0
D
Q D Q
Clk 0
D 1
Clk
D0 DFF Q0
Reg
CLK D Q
n n
…
Current Next
state state
Combinational
clock logic
input output
IN
Lock U
CLK
Specification:
• A 1-bit input ( “0” or “1”)
• A 1-bit output (“Unlock” signal)
• UNLOCK is 1 if and only if:
Last 4 inputs were the “combination”: 0110
0
1
S0 S1 S2 S3 S4
1 U=0 0 U=0 1 U=0 1 U=0 0 U=1
0 0
1 Heavy circle
Means
Designing our lock NAME
INITIAL state
t+1 t t
1 1 0 1 1
q0 = ~inc·q0 + inc·~q0 1 1 1 0 0
t
= inc Å q0
q1t+1 = ~inc·q1t + inc·~q1t·q0t + inc·q1t·~q0t
= ~inc·q1t + inc·(q1t Å q0t)
Output = current state = q1q0
September 26, 2023 MIT 6.191 Fall 2023 L06-23
Two-Bit Counter Circuit
Using D flip-flops
§ Output is q1q0 D
E q1 Q
0 IV R
§ Set Initial Value of both flip-
flops to 0 (initial state: 00)
§ Loaded when Reset = 1
CLK
D D Q Q ≥tSETUP ≥tHOLD
D
CLK
Q
≤tPD
§ Flip-flop input D should not change around the rising edge of
the clock to avoid metastability
§ Formally, D should be a stable and valid digital value:
§ For at least tSETUP before the rising edge of the clock
§ For at least tHOLD after the rising edge of the clock
§ Flip-flop propagation delay tPD is measured from rising edge
of the clock to valid output (CLKàQ)
Current Next
state state
Combinational
clock logic
input output
Need to analyze
the timing of each
a register-to-register path
b c
clk
Current Next
tCD,Reg = 1ns State State
tPD,Reg = 3ns
tSetup,Reg = 2ns
tHold,Reg = 2ns
Combinational
Clock Logic
tCD,CL = ?
tPD,CL = 5ns
Input Output
Questions:
• Constraints on tCD for the logic?
tCD,Reg (1 ns) + tCD,CL(?) ≥ tHold,Reg(2 ns)
tCD,CL ≥ 1 ns
Next lecture:
Sequential logic in Minispec