Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )

Similar presentations


Presentation on theme: "CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )"— Presentation transcript:

1 CS 140 Lecture 9 Professor CK Cheng 4/30/02

2 Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )

3 Given a sequential machine that recognizes patterns 110 or 101, draw the state diagram. Overlap is allowed. 1 10 init 1/0 0/0 s0s0 s1s1 s2s2 10 s2s2 1/0 0/0 1/1 0/1 1/0 s0s1s2s3s0s1s2s3 PS X 0 1 s 0 / 0 s 1 / 0 s 2 / 0 s 3 / 0 s 0 / 0 s 1 / 1 s 2 / 1 s 3 / 0 State table 0 0 1 1 0 1 PS inputs X=0 X=1 00, 0 10, 0 10, 0 00, 0 11, 1 10, 1 11, 0 Q 1 (t) Q 0 (t) Q 1 (t+1) Q 0 (t+1 Input1101100101 Output0011010001 State Assignment s 0 :00 s 1 :01 s 2 :10 s 3 :11

4 Given a sequential machine that outputs a “1” when input contains an odd # of 0s, and even # of 1s, draw the state diagram. Input0010011011 Output1000000010 s 0 : even # of 1s, even # of 0s s 1 : even # of 1s, odd # of 0s s 2 : odd # of 1s, even # of 0s s 3 : odd # of 1s, odd # of 1s s 1 / 1 s 2 / 0 s 3 / 0 s 0 / 0 0 0 0 01 1 1 1

5 s0s1s2s3s0s1s2s3 PS X 0 1 s 1 / 1 s 2 / 0 s 0 / 0 s 3 / 0 s 3 / 0 s 0 / 0 s 2 / 0 s 1 / 1 Moore Machine Mealy Machine s0s1s2s3s0s1s2s3 PS X 0 1 s 1 s 2 s s 3 s 3 s 0 s 2 s 1 y 01000100 Moore Machine: y(t) = f(x(t), s(t)) Mealy Machine:y(t) = f(s(t)) s(t+1) = g(x(t), s(t))

6 Canonical Form Combinational Logic x(t) y(t) CLK C2 C1 y(t) CLK x(t) C1C2 CLK x(t) y(t)

7 (1)State Table: y(t) = f(Q(t), x(t)) Q(t+1) = y(Q(t) x(t)) (2)Excitation Table: (1)D(t) = e D (Q(t+1), Q(t)); (2)T(t) = e T (Q(t+1), Q(t)); (3)S, R, J, K (3)From 1 & 2, we derive (1)D(t) = h D (Q(t), x(t)); (2)T = h T (Q(t), x(t)); (3)S,R,J,K. (4)Use K-Map (QuineMcClusky) to derive optional combinational logic implementation. (1)D(t) = h(Q(t), x(t)) (2)Y(t) = f(Q(t), x(t))

8 Given a state table, implement with 2 D F-Fs. 0 0 1 1 0 x=0 x=1 01, 0 00, 0 10, 1 01, 1 00, 1 10, 0 Q 1 (t) Q 0 (t) 0 1 0101 Q 1 (t+1) Q 1 (t) id Q 1 (t) Q 0 (t) x(t) D 1 (t) D 0 (t) y(t) 0 0 0 0 0 1 0 1 0 0 1 0 0 0 2 0 1 0 1 0 1 3 0 1 1 0 1 1 4 1 0 0 0 0 1 5 1 0 1 1 0 0 6 1 1 0 - - - 7 1 1 1 - - - Excitation Table D(t)

9 0 2 6 4 1 3 7 5 y Q1Q1 0 1 - 0 0 0 - 1 Q0Q0 D1:D1: 0 2 6 4 1 3 7 5 y Q1Q1 1 0 - 0 0 1 - 0 Q0Q0 D2:D2: 0 2 6 4 1 3 7 5 y Q1Q1 0 1 - 1 0 1 - 0 Q0Q0 y:

10 x D Q Q’ D Q y Q0Q0 D0D0 D1D1 y(t) = Q 0 (t) + Q 1 (t) x’ D 0 (t) = Q 0 (t) x + Q 1 (t)’ Q 0 (t)’ D 1 (t) = Q 0 (t) x’ + Q 1 (t) x Q1Q1 Q0Q0 Q0Q0 Q0’Q0’ Q1’Q1’


Download ppt "CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )"

Similar presentations


Ads by Google