Uploaded by Mohammed ALMadhoun

Digital Design Lab 9 - HackMD

advertisement
Digital Design Lab 9
More about State Machines
The Islamic University of Gaza
Engineering Faculty
Department of Computer Engineering
Author: Mohammed Nafiz ALMadhoun
2021/12/14
Introduction
In this lab, we are going to talk about state machines, and how to implement state machines using
registers and flip-flops.
State Machines
The state machine is a sequence of states which defines the current state, and what has to be done
to move from one state to another.
Type of State Machines
As you might know, there are two types of state machines, the first one is mealy state machines (In
which the inputs affect the outputs directly), and Moore state machines (In which only the state
affect the outputs).
Mealy, Moore state machines
[1]
Note that you could design any state machine using Moore, or mealy designs, in general, the
mealy is easier but it introduces a lot of errors in high-speed machines.
State digram
In this section, we will design a 101 sequence detector, first, we will design it using Moore state
machine
101 Sequance Detector Moore
101 Sequance Detector Mealy
Notice that in the mealy design, the input and the states are not synchronized, so usually in a
mealy state machine, we will connect the inputs to a d-latch before connecting it to the state
machine itself.
Lab Tasks
Task 1: Money Counter!
Imagine that you have a device with three sensors, one for each coin type (1NIS, 2NIS, 5NIS), your
task is to implement the state machine that counts the final amount, you could use a regular state
machine, or come up with a design that implements in using a counter!
The device might look something like this:
Dummy Coins Counter.
And you have 3 sensors for each tube (1NIS, 2NIS, 5NIS).
Hope you enjoyed this semester.
tags: Digital Design
Digital
IUG
Computer Engineering
End Of Lab 9
1. Digital Design - Morris Mano 5th ↩︎
Download