Title: Registers
1ECE U322Digital Logic Design
Nov. 3, 2005
- Lecture 24
- Sequential Circuit Design Marcovitz 7.1
- Homework Due Today
2Finite State Machine
Outputs
Nextstatelogic
OutputLogic
Stateregister
Inputs
Moore machine outputs depend on current state
only Mealy machine outputs depend on
current state and inputs
3Sequential Circuit Design
- Procedure
- 1. Specify Obtain state diagram or state table
based on problem specification - 2. Write state table if not given in 1
- 3. Determine type and number of flip-flops
- 4. Determine binary codes for states
- 5. Derive flip-flop input equations
- 6. Derive output equations
- 7. Simplify equations from 5 and 6
- 8. Draw logic diagram
4Finding State Diagrams and Tables
- Example Find a state diagram for a sequence
recognizer. - Specifications
- Let the input be X and output be Z. Recognize
the occurrence of the sequence, 01 on X. - Z 1 when X1 and previous input was 0
- Z 0 otherwise
5States are used to remember something about the
history of past inputs. A state in which none
of the first portion of the sequence has
occurred. B last input was a 0.
6State Table for String Recognizer
Two states one flipflop State A Flipflop
storing 0 State B Flipflop storing 1 Use D
Flipflops
7State Table with Flip-Flops Assigned to States
Input equation What goes on D input to make
next state transition happen D Output
equation What is Z? Z
8Circuit Diagram for Sequence Recognizer
9Timing Diagram for 01 Sequence Recognizer
10More complicated sequence recognizer
- Find a state diagram for an FSM that recognizes
the sequence 1101 - Let the input be X and output be Z. Recognize
the occurrence of the sequence, 1101, on X. - Z 1, when X1 and previous 3 inputs were
110. - Z 0, otherwise.
- X 10110101011010110111011101
- Z
11How about non-overlapping Case
Use states to remember past events.
12State Table
13(No Transcript)
14Given sequence 00111011, determine output
sequence and state transitions.
15State Table with State Assignmentoverlapping
sequence recognizer
16Flip-flop and output equations
17Circuit Diagram for Sequence Recognizer
18This is an overlapping sequence recognizer
- X 1101101 ...
- Z 0001001 ...
- The fourth input 1 is the last bit of the first
recognized sequence and the first bit of the
second recognized sequence - I can also have non-overlapping recognizers
- X 1101101101 ...
- Z 0001000001 ...
-
19State Diagram for non-overlapping sequence
recognizer
20Moore Machine
- Any Mealy machine can be turned into a Moore
machine, and vice versa - A Moore machine has the same number of states or
more states than a Mealy machine - Output timing is different between a Moore
machine and a Mealy Machine - Moore outputs change on clock edge
- Mealy machine output changes whenever inputs
change
2101 Sequence Recognizer
Mealy machine
Moore machine
22State Table for 01 Recognizer
Output State A State B State C
23State Table for 01 Recognizer
24Equations for 01 String Recognizer
25Circuit for 01 String Recognizer Moore version
26Timing Diagram for 01 string recognizer Moore
version