Repetition delay-elements
William Sandqvist william@kth.se
Repetition delay-elements Synchronous sequential circuits clocked - - PowerPoint PPT Presentation
Repetition delay-elements Synchronous sequential circuits clocked flip-flop Asynchronous sequential circuits a trick: Delay Elements Other names: Y and y William Sandqvist william@kth.se Golden rule William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Present Next state Output state
SR = 00
01 10 11 Q A A A B A B B A B A 1 10 00 11 01 00 10 A 0
⁄
B 1
⁄
11 01 SR
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Alt: A Alt: B Alt: C
in Q
in Q
in Q in Q
1 1 1 1 1 1
William Sandqvist william@kth.se
Alt: A Alt: B Alt: C
in Q
in Q
in Q in Q
1 1 1 1 1 1
Option C does not take into account the delay of the AND gate
x
1
x Because of the delay in the inverters both inputs to the AND gate becomes 1 for a short time
in Q
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Static 1 → 1 Static 0 → 0 Dynamic 1 → 0 Dynamic 0 → 1
William Sandqvist william@kth.se
Static 1 → 1 Static 0 → 0
William Sandqvist william@kth.se
f x
3
x
1
x
2
p q
3 1 2 1
William Sandqvist william@kth.se f x
3
x
1
x
2
p q
3 1 2 1
x
1
x
2
x
3
00 01 11 10 1 1 1 1 1
William Sandqvist william@kth.se x
3
x
1
x
2
f
x
1
x
2
x
3
00 01 11 10 1 1 1 1 1
3 2 3 1 2 1
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Dynamic 1 → 0 Dynamic 0 → 1
William Sandqvist william@kth.se
4 1 4 3 2 1
William Sandqvist william@kth.se
x
2
x
1
x
3
x
4
b a c d f x
2 x 3 x 4
, , x
1
b a c d f One gate delay
William Sandqvist william@kth.se
Alt: A Alt: B Alt: C x x x
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Alt: A Alt: B Alt: C x x x Risk for hazard when a=1 and b=0 The extra gate is not covering this case (but a=1 and b=1) a b
not Hazard cover!
William Sandqvist william@kth.se
Alt: C x Risk for hazard when a=1 and b=0 The extra gate does not cover this case (but a=1 and b=1) a b
not Hazard cover!
ba x 00 01 11 10 1 1 1 1 1 1 ba x 00 01 11 10 1 1 1 1 1 1
b x a
no Hazard
William Sandqvist william@kth.se
William Sandqvist william@kth.se
Static 1 → 1 Static 0 → 0 Dynamic 1 → 0 Dynamic 0 → 1 Static hazard is caused by
Dynamic hazard can occur when implementing circuits with multi-level logic. Two- level logic circuits which are free of static hazard is also free from dynamic hazard.
William Sandqvist william@kth.se
Next State Pres state X=0 1 Q y2y1 Y2Y1 00 00 01 01 00 11 1 11 01 10 10 11 10 1
William Sandqvist william@kth.se
V
f
V
DD
V
x
T
1
T
2
William Sandqvist william@kth.se
To understand what metastability is, we can imagine that the input signal D to a latch is very loaded and thus changes very slowly relative to the clock. Suppose further that the clock signal C changes just when D is at VDD/2. Then the latch will be locked at the value that happens to be on D. After some time the latchen will transfer to either ’1’ or ’0’.
1? 0? 1 1
William Sandqvist william@kth.se
This instability lasts until the transistors in the feedback pleases go to one or the
locking occurred. We can compare the situation with a ball that lies on top of a hill, or a pencil balanced on its tip. Minimum disruption will get the ball or the pen to fall to one side or the other.
?
’0’ ’1’
William Sandqvist william@kth.se
If Setup and Hold time’s are met, then the flip-flop are guaranteed to behave nicely/deterministic! Setup time is the time D must be stable before Clk changes its value Hold time is the time D must be stable after Clk has changed its value
Setup Hold time
William Sandqvist william@kth.se
William Sandqvist william@kth.se
D Q Q Data Clock (asynchronous) D Q Q Data (synchronous)
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
1. both S and R first are S=0 and R=0 (Q = 1) 2. R is then activated (S = 0, R = 1) → Q = 0 !
William Sandqvist william@kth.se
S R Q
a
1 1 1 1 0/1 1/0 1 (a) Circuit (b) Truth table Q
a
Q
b
R S
Q
b
(no change) 1
b a
Q Q ≠
William Sandqvist william@kth.se
S R Q
a
1 1 1 1 0/1 1/0 1 (a) Circuit (b) Truth table Q
a
Q
b
R S Q
b
(no change) 1
William Sandqvist william@kth.se
a d
00 10
SR
10 00 01 11
01 11
William Sandqvist william@kth.se
e f b c a d
00(10)
) ( Q Q SR
00(10) 01(10) 10(10) 10(10) 00(10) 01(01) 01(01) 11(10) 11(10) 10(10) 11(10) 00(01) 01(01) 00(01) 01(10) 11(10)
11 = SR
William Sandqvist william@kth.se
William Sandqvist william@kth.se
e f b c a d
00(10)
) ( Q Q SR
00(10) 01(10) 10(10) 10(10) 00(10) 01(01) 01(01) 11(10) 11(10) 10(10) 11(10) 00(01) 01(01) 00(01) 01(10) 11(10)
1 1 1 1 1 1 10 11 01 00 − − − − − − e f a f b e f e e d c d b d c c b e a b b d a a Q Q ) ( Q Q SR 11 = SR
William Sandqvist william@kth.se
a (10) b (10) e (10) f (10) c (01) d (01)
William Sandqvist william@kth.se
a (10) b (10) e (10) f (10) c (01) d (01)
William Sandqvist william@kth.se
a (10) b (10) e (10) f (10) c (01) d (01)
− − − − − − − 1 1 1 10 11 01 00 a e e a e a e c c c a e c a a Q Q
) ( Q Q SR
William Sandqvist william@kth.se
1 2y
y
From c to e requires a "double change" of Y2Y1 this is modified by the transition state to two changes after another.
2
Transition-state
Output code
William Sandqvist william@kth.se
1 2 1 2 2
y Ry y R S y S Y + + = SR Ry Y + =
1 1
William Sandqvist william@kth.se 1
1 2 1 2 2
y Ry y R S y S Y + + = SR Ry Y + =
1 1
2 2
William Sandqvist william@kth.se
square number 3, on pure speculation that this will give us a simpler circuit? From 00 in square 2 to 11 in square 3 there is a safe dubblechange. Will it be 01, you end up in stable 01, will it be 10 you go to 11 and finally to stable 01.
In addition to solving the problem of double change, as we have already have done, we want to get as simple as possible network!
William Sandqvist william@kth.se
harmless double change of state variables that in the end always leads to stable 01.
1 2 2
y R y S Y + = SR Ry Y + =
1 1
William Sandqvist william@kth.se
2 2 1
2
1 2 2
y R y S Y + = SR Ry Y + =
1 1
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se
William Sandqvist william@kth.se