Title: ECE U322 Digital Logic Design
1ECE U322Digital Logic Design
Nov. 7, 2005
- Lecture 25
- Sequential Circuit Design
- Second Midterm Wednesday, Nov. 16.
2Announcements
- Midterm in class on Wed, Nov 16
- Homework 7 due this Thursday
- Practice MidtermII
- We will go over solutions Nov. 14 in class.
3Moore 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
401 Sequence Recognizer
Mealy machine
Moore machine
5State Table for 01 Recognizer
Output State A State B State C
6State Table for 01 Recognizer
7Equations for 01 String Recognizer
8Circuit for 01 String Recognizer Moore version
9Timing Diagram for 01 string recognizer Moore
version
10State Diagram for 1101 string recognizer Mealy
version
11State Diagram for 1101 string recognizer Moore
version
- outputs marked on
states for Moore model - Arcs show only
state transitions - Add a new state E to
produce the output 1 - The new state, E produces the same behavior
in the future
as state B. But it gives a different output at
the present time. The timing of the Moore and the
Mealy machines are different.
12Implement 01 sequence recognizer with J-K
Flipflops
- One extra design step determine J-K inputs
- We will do the Mealy version
- two states, one flip-flop A 0 B 1
13State Table for 01 recognizer
Output is the same as before
14Equations for 01 state recognizer
15Circuit Diagram for 01 recognizer with JK
flipflops
16Timing Diagram 01 recognizer with JK flipflops
17State Machine Implementations
- D or J-K flip-flops
- same number of states
- same number of flip-flops
- same timing
- Mealy or Moore machine
- Moore may have more states
- Timing is different
- output changes with state for Moore machine
18Candy machine example
Let us design a control unit for a simple
coin-operated candy machine. Candy costs 20
cents, and the machine accepts nickels and dimes.
Change should be returned if more than 20 cents
is deposited. No more than 25 cents can be
deposited on a single purchase therefore, the
maximum change is one nickel.
19(No Transcript)
20State Diagram
21State Table