Docsity

Digital Logic Design: Sequence Detector Example - Prof. Stephen Kuyath, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Digital Logic Design: Sequence Detector Example - Prof. Stephen Kuyath and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Digital Logic Design

Topic 13: An Example Design Problem

  • Objectives • To work through an entire design problem: – Review specifications – Derive state diagram – Build state table and assign states – Decide the number of state variables needed – Choose technology – Implement the design11/4/

FSM Design Steps 1.^ Obtain the specifications of the desired circuit2.^ Derive the states of the machine and develop a statediagram 11/4/

1.^ Should show all possible states2.^ Provide the conditions for which the the circuit moves from one stateto the next

3.^

Develop the state table from the state diagram

4.^

Decide on the number of state variables needed torepresent all states1.^

Minimize the number of states if possible

5.^

Choose the type of flip-flops that will be used in theimplementation1.^

Derive the next-state logic expressions to develop the Input LogicCircuit2. Derive the logic expressions for the Output Logic Circuit

6.^

Implement the design

FSM Design Steps 1.^ Obtain the specifications of the desired circuit2.^ Derive the states of the machine and develop a statediagram 11/4/

1.^ Should show all possible states2.^ Provide the conditions for which the the circuit moves from one stateto the next

3.^

Develop the state table from the state diagram

4.^

Decide on the number of state variables needed torepresent all states1.^

Minimize the number of states if possible

5.^

Choose the type of flip-flops that will be used in theimplementation1.^

Derive the next-state logic expressions to develop the Input LogicCircuit2. Derive the logic expressions for the Output Logic Circuit

6.^

Implement the design

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0

In this state, the output must equal 0, because there have beenno pulses detected on w

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0 B^

w = 1 D w = 0 z = 0

w could be a 0 or a 1. Depending on which it is, the FSMshould go to the next state (B or D). Let B be the “start counting 0s state” and D be the “startcounting 1s state. There have not been 2 0s or 2 1s, so z = 0. z = 0

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0 B^

w = 1 D w = 0

From this point on, if w=0, we should stay in state C and zshould be high

z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0 B^

w = 1 D w = 0

From this point on, if w=0, we should stay in state C and zshould be high If w should go high, we need to start counting 1s (state D)

z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0 B^

w = 1 D w = 0

If at any point w=1, we want to start counting 1s (go to state D).If the next w is also 1, we go to state E and z should go high. But, if the next w = 0, then we need to start counting 0s (go tostate B).

z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1^

w = 1^ z = 1 E w = 0

State Diagram • Start with the state diagram^ – State A: Reset (or Starting) state11/4/

A

Reset

z = 0 B^

w = 1 D w = 0

If w continues to be 1, we ne

ed to stay in state E and z ne

eds

to remain high.

z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1^

w = 1^ z = 1 E w = 0

w = 1

FSM Design Steps 1.^ Obtain the specifications of the desired circuit2.^ Derive the states of the machine and develop a statediagram 11/4/

1.^ Should show all possible states2.^ Provide the conditions for which the the circuit moves from one stateto the next

3.^

Develop the state table from the state diagram

4.^

Decide on the number of state variables needed torepresent all states1.^

Minimize the number of states if possible

5.^

Choose the type of flip-flops that will be used in theimplementation1.^

Derive the next-state logic expressions to develop the Input LogicCircuit2. Derive the logic expressions for the Output Logic Circuit

6.^

Implement the design

^

State Table • Develop the state table from the state diagram11/4/

A

Reset

z = 0 B^

w = 1 D w = 0 z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1^

w = 1z = 1 E w = 0

w = 1 w = 0

PresentState

Inputw

Next^ OutputState

z

A^

If we are in state A, z should be low, and w could be 0 or 1

State Table • Develop the state table from the state diagram11/4/

A

Reset

z = 0 B^

w = 1 D w = 0 z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1^

w = 1z = 1 E w = 0

w = 1 w = 0

PresentState

Inputw

Next^ OutputState

z

A^

0 B 1 D

If w = 1, we go to state D

State Table • Develop the state table from the state diagram11/4/

A

Reset

z = 0 B^

w = 1 D w = 0 z = 0^ w = 0 C

z = 0

z = 1^ w = 0

w = 1 w = 1^

w = 1z = 1 E w = 0

w = 1 w = 0

PresentState

Inputw

Next^ OutputState

z

A^

0 B 1 D 0 1
B

If we are in state B, z should be 0, and w could be high or low