Download presentation
Presentation is loading. Please wait.
1
CS 140 Lecture 10 Professor CK Cheng 10/29/02
2
Part II. Sequential NetworkReminder 1.Flip flops 2.Specification 3.Implement Netlist State Table State Diagram
3
X T Q Q’ T Q y Q0Q0 Q1Q1 T0T0 T1T1 y(t) = Q 1 (t)Q 0 (t) Q 0 (t+1) = T 0 (t) = X(t) Q 1 (t) Q 1 (t+1) = T 1 (t) = X(t) + Q 0 (t)
4
0 0 0 1 1 0 1 PS inputs x=0 x=1 State table 00, 0 10, 0 10, 0 00, 0 11, 0 10, 0 11, 1 Q 1 (t) Q 0 (t) Q 1 (t+1) Q 0 (t+1), y(t) id Q 1 (t) Q 0 (t) X(t) T 1 (t) T 0 (t) Q 1 (t+1) Q 0 (t+1) 0 0 0 0 1 0 0 1 1 0 1 0 2 0 1 0 1 0 1 1 3 0 1 1 1 0 1 1 4 1 0 0 0 0 1 0 5 1 0 1 1 1 0 1 6 1 1 0 1 0 0 1 7 1 1 1 1 1 0 0 000111 10 0 1 0 0, 1 1 1 All three forms are equivalent. Given one, we can derive the other ones.
5
Implement: Language State Diagram State Table Netlist Language 1 – Pattern recognizer A sequential machine has one binary input x for x(t-2, t) = aab, the output y(t) = 1, otherwise y(t) = 0. (Essentially, if we see a string matching aab, we output 1). S1S0 a/0 b/0 s0s0 a/0 b/1 S2 a/0
6
s0s1s2s0s1s2 PS X a b s 1 / 0 s 0 / 0 s 2 / 0 s 0 / 0 s 2 / 0 s 1 / 1 State table 0 0 1 1 0 PS inputs X=0 X=1 01, 0 00, 0 10, 0 00, 0 10, 0 00, 1 Q 1 (t) Q 0 (t) Q 1 (t+1) Q 0 (t+1), y(t) = D 1 (t),D 0 (t) State Assignment s 0 :00 s 1 :01 s 2 :10
7
0 1 3 2 4 5 7 6 x(t) Q1Q1 0 1 - 1 0 1 - 0 Q0Q0 D 1 (t): D 1 (t) = x’Q 0 + x’Q 1 (Repeat for D 0 )
8
D Q Q’ D Q Q1Q1 Q0Q0 D1D1 D0D0 x Q1Q1 Q0Q0
9
Another example Language 1 – Pattern recognizer A sequential machine has one binary input x for x(t-2, t) = aba, the output y(t) = 1, otherwise y(t) = 0. (Essentially, if we see a string matching aba, we output 1). S0 a/0 b/0 s0s0 a/0 b/0 S2 b/0 S1 a/1
10
1 10 init 1/0 0/0 s0s0 s1s1 s2s2 10 s2s2 1/0 0/0 1/1 0/1 1/0 Another example Language 1 – Pattern recognizer Given a sequential machine that recognizes patterns 110 or 101, draw the state diagram. Overlap is allowed.
11
Canonical Form Combinational Logic x(t) y(t) CLK C2 C1 y(t) CLK x(t) C1C2 CLK x(t) y(t)
12
Moore Machine: y(t) = f(x(t), s(t)) Mealy Machine:y(t) = f(s(t)) s(t+1) = g(x(t), s(t)) C1C2 CLK x(t) y(t) Mealy Machine C1C2 CLK x(t) y(t) Moore Machine s(t)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.