Professional Documents
Culture Documents
Lab #10
1-Design and Implementation of a Sequence Detector using
Mealy/Moore Machine
1.2-Objective:
This experiment is to design a Sequence detector using Mealy/Moore models of Finite State
Machine (FSM) and implement the design on FPGA.
1.3-Pre-Lab:
Background theory:
The most general model of a sequential circuit has inputs, outputs, and internal states. It is
customary to distinguish between two models of sequential circuits: the Mealy model and the
Moore model. They differ only in the way the output is generated. The two models of a
sequential circuit are commonly referred to as a finite state machine, abbreviated FSM.
In the Mealy model, the output is a function of both the present state and the input as shown
in Figure 10.1. the outputs may change if the inputs change during the clock cycle. the output
of the Mealy machine is the value that is present immediately before the active edge of the
clock.
In the Moore model, the output is a function of only the present state. A circuit may have
both types of outputs as shown in Figure 10.2. The outputs of the sequential circuit are
synchronized with the clock because they depend only on flip-flop outputs that are
synchronized with the clock.
Page 2 of 9
Figure:1.4.2:
Page 3 of 9
1.5-In-Lab Task 2:
HDL implementation for Mealy machine on FPGA
Step 1:
Write the HDL (Verilog) structural description for Mealy based sequence detector
for the given sequence.
1.5.3-Test pattrens :
Figure:1.5.7.1:Verilog code
1.5.4-Main:
Page 5 of 9
1.6-Implementation on FPGA:
Test Bench:
How we make a sequence detector using mealy\moore models of finite state machines(FSM)