110 likes | 339 Views
CS1104 - Digital Logic Design http://www.comp.nus.edu.sg/~cs1104. Lecture 12 Sequential Logic Design Supplementary Notes. Unused state 000:. Design: Example #3. Design with unused states. Given these. Derive these. C. C. Cx. Cx. AB. AB. 00 01 11 10. 00 01 11 10. 00
E N D
CS1104 - Digital Logic Designhttp://www.comp.nus.edu.sg/~cs1104 Lecture 12 Sequential Logic Design Supplementary Notes
Unused state 000: Design: Example #3 • Design with unused states. Given these Derive these Design: Example #3
C C Cx Cx AB AB 00 01 11 10 00 01 11 10 00 01 11 10 X X 00 01 11 10 X X X X 1 1 X X B B X X X X X X X X A A X X X 1 x x C C Cx Cx AB AB 00 01 11 10 00 01 11 10 00 01 11 10 X X 1 00 01 11 10 X X X X 1 1 1 B B X X X X X X X X A A X X X X x x Design: Example #3 • From state table, obtain expressions for flip-flop inputs. SA = B.x RA = C.x' RB = B.C + B.x' SB = A'.B'.x Design: Example #3
C C Cx Cx AB AB 00 01 11 10 00 01 11 10 00 01 11 10 X X X 00 01 11 10 X X 1 1 X X 1 B B X X X X X X X X A A 1 X X 1 x x C Cx AB 00 01 11 10 00 01 11 10 X X B X X X X A 1 1 x Design: Example #3 • From state table, obtain expressions for flip-flop inputs (cont’d). SC = x' RC = x y = A.x Design: Example #3
y Q Q Q S S S A x A' Q' Q' Q' R R R B B' C CP Design: Example #3 • From derived expressions, draw logic diagram: SA =B.x SB = A'.B'.x SC = x' RA = C.x' RB = B.C + B.x'RC = x y = A.x Design: Example #3
Self-Correcting Circuits • All states = Valid states + invalid states. • Invalid states: unused or error states. • Danger: circuit may start or arrive at an invalid state and stay at invalid states circuit malfunction! • To avoid this, we can analyse if our circuit is self-correcting, and re-design the circuit to be self-correcting if it is not so. • A circuit is self-correcting if there are no cycles among its invalid states. It may start in an invalid state but will eventually end up in a valid state for proper functioning. Self-Correcting Circuits
Self-Correcting Circuits • Analysis to check for self-correcting circuit: • Obtain complete state diagram of circuit • Identify invalid states • Check if there is a cycle among the invalid states • The absence of a cycle among invalid states implies a self-correcting circuit. Self-Correcting Circuits
Self-Correcting Circuits • Take design example #3. We obtained the following expressions: SA =B.x SB = A'.B'.x SC = x' RA = C.x' RB = B.C + B.x'RC = x y = A.x • We fill the X’s in the state table with their values, including all unused states 000, 110 and 111. Self-Correcting Circuits
Unused states Self-Correcting Circuits • State table according to derived expressions. 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 1 0 0 Self-Correcting Circuits
0/0 0/0 0/0 101 001 100 011 010 0/0 110 000 111 1/0 0/0 1/0 0/0 1/1 1/0 1/1 1/0 0/0 0/0 1/1 1/1 Self-Correcting Circuits • State diagram according to state table. No cycle among invalid states, hence circuit is self-correcting. Self-Correcting Circuits