SlideShare uma empresa Scribd logo
1 de 18
FINITE STATE MACHINES
(MEALY AND MOORE MACHINES)
Gookyi Dennis A. N.
SoC Design Lab.
April 30, 2014
Contents:
• Introduction
• Moore machines
• Mealy machines
• Comparison
2
Introduction:
• FSM’s can exist in several states and it goes from one
state to another state based on the present state and
the input conditions
• Any synchronous circuit is an FSM of some form
• This means that:
 Combinational logic is an FSM without memory
 Flip-Flops and counters are also FSM’s
3
General FSM
4
General FSM
• The circuit diagram consists of:
Combinational block: with primary input w
and primary output z. it also consist of
secondary inputs (present state) and
secondary outputs (next state)
Memory block: consist mainly of Flip-Flops.
5
Outputs of state machines:
• No provision has been made to show the
output z which is different from the state
variables. The output can therefore be
modelled in two distinct ways
Moore machines
Mealy machines
6
Moore machines:
•Edward Moore’s model:
D = F(W,Q)
Z = G(Q)
F and G are Boolean functions
Output only depends on the current state (Q)
Input (W) and current state (Q) determine the next
state (D)
7
Moore state graph:
8
Moore state table
Present state Input Next state output
A B W Z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 0
0 1 1 0 1 0
1 0 0 0 0 1
1 0 1 0 0 1
1 1 0 x x 0
1 1 1 x x 0
9
Moore maps
10
Moore circuit diagram:
11
Mealy machines
• George Mealy’s model
 D = F(W,Q)
 Z = G(W,Q)
 F and G are Boolean functions
 Output depends on both current state (Q) and input
(W)
 Next state (D) depends on input (W) and current
state (Q)12
Mealy state graph
13
Mealy state table
Present state Input Next state output
A B W Z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 1
0 1 1 0 1 0
1 0 0 0 0 0
1 0 1 0 0 1
1 1 0 x x 0
1 1 1 x x 0
14
Mealy maps
15
Mealy circuit diagram
16
Comparison: Moore vs Mealy
• Moore machines are safer to use
Output change at clock edge
In mealy machines, input change can cause
output to change as soon as logic is done.
• Mealy machines are faster because the output
is dependent on the inputs.
17
Choosing between Moore and Mealy
machines
• It actually comes down to the task at hand when
choosing between Mealy and More machines
• These are a few questions to ask when choosing
between either of the two:
 Does one want to have a synchronous or asynchronous
machine?
 Is speed paramount?
 Are both the inputs and present state readily available?
• The answer to each of these questions determines the
type of machine that would work best.
18

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
mealy and moore machines
mealy and moore machinesmealy and moore machines
mealy and moore machines
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Flipflop
FlipflopFlipflop
Flipflop
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Verilog lab manual (ECAD and VLSI Lab)
Verilog lab manual (ECAD and VLSI Lab)Verilog lab manual (ECAD and VLSI Lab)
Verilog lab manual (ECAD and VLSI Lab)
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
 
UART
UARTUART
UART
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Programmable logic devices
Programmable logic devicesProgrammable logic devices
Programmable logic devices
 
ALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINESALGORITHMIC STATE MACHINES
ALGORITHMIC STATE MACHINES
 
PLDs
PLDsPLDs
PLDs
 
Verilog
VerilogVerilog
Verilog
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
peripheral interfacing
peripheral interfacingperipheral interfacing
peripheral interfacing
 
flip flops
flip flops flip flops
flip flops
 

Semelhante a Finite state machines

Semelhante a Finite state machines (17)

19-MooreMealy.ppt
19-MooreMealy.ppt19-MooreMealy.ppt
19-MooreMealy.ppt
 
Moore and mealy machine
Moore and mealy machineMoore and mealy machine
Moore and mealy machine
 
melay and moore machine.pptx
melay and moore machine.pptxmelay and moore machine.pptx
melay and moore machine.pptx
 
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
MOC2.PPT[1].pptx introduction to mealy machine and moore machine with eample ...
 
19-MooreMealy.ppt
19-MooreMealy.ppt19-MooreMealy.ppt
19-MooreMealy.ppt
 
Finite state automaton
Finite state automatonFinite state automaton
Finite state automaton
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
 
19 moore mealy
19 moore mealy19 moore mealy
19 moore mealy
 
Digital Design Session 24
Digital Design Session 24Digital Design Session 24
Digital Design Session 24
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
 
state_machines1.pdf
state_machines1.pdfstate_machines1.pdf
state_machines1.pdf
 
Logic and computer design.ppt
Logic and computer design.pptLogic and computer design.ppt
Logic and computer design.ppt
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Meley & moore
Meley & mooreMeley & moore
Meley & moore
 
mealy moore machine conversion
mealy moore machine conversion mealy moore machine conversion
mealy moore machine conversion
 
Mealy and moore machines
Mealy and moore machinesMealy and moore machines
Mealy and moore machines
 
Modeling FSMs
Modeling FSMsModeling FSMs
Modeling FSMs
 

Mais de dennis gookyi

Verilog hdl design examples
Verilog hdl design examplesVerilog hdl design examples
Verilog hdl design examplesdennis gookyi
 
Verilog HDL Verification
Verilog HDL VerificationVerilog HDL Verification
Verilog HDL Verificationdennis gookyi
 
System design methodology
System design methodologySystem design methodology
System design methodologydennis gookyi
 
Wishbone classic bus cycle
Wishbone classic bus cycleWishbone classic bus cycle
Wishbone classic bus cycledennis gookyi
 
Design options for digital systems
Design options for digital systemsDesign options for digital systems
Design options for digital systemsdennis gookyi
 
Wishbone interface and bus cycles
Wishbone interface and bus cyclesWishbone interface and bus cycles
Wishbone interface and bus cyclesdennis gookyi
 
Advanced modeling techniques
Advanced modeling techniquesAdvanced modeling techniques
Advanced modeling techniquesdennis gookyi
 
Hierachical structural modeling
Hierachical structural modelingHierachical structural modeling
Hierachical structural modelingdennis gookyi
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazardsdennis gookyi
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systemsdennis gookyi
 
basic concepts of reliability
basic concepts of reliabilitybasic concepts of reliability
basic concepts of reliabilitydennis gookyi
 

Mais de dennis gookyi (19)

Verilog hdl design examples
Verilog hdl design examplesVerilog hdl design examples
Verilog hdl design examples
 
Wishbone tutorials
Wishbone tutorialsWishbone tutorials
Wishbone tutorials
 
Verilog HDL Verification
Verilog HDL VerificationVerilog HDL Verification
Verilog HDL Verification
 
Synthesis
SynthesisSynthesis
Synthesis
 
System design methodology
System design methodologySystem design methodology
System design methodology
 
Wishbone classic bus cycle
Wishbone classic bus cycleWishbone classic bus cycle
Wishbone classic bus cycle
 
Design options for digital systems
Design options for digital systemsDesign options for digital systems
Design options for digital systems
 
Wishbone interface and bus cycles
Wishbone interface and bus cyclesWishbone interface and bus cycles
Wishbone interface and bus cycles
 
Encoder decoder
Encoder decoderEncoder decoder
Encoder decoder
 
Advanced modeling techniques
Advanced modeling techniquesAdvanced modeling techniques
Advanced modeling techniques
 
4 bit add sub
4 bit add sub4 bit add sub
4 bit add sub
 
Hierachical structural modeling
Hierachical structural modelingHierachical structural modeling
Hierachical structural modeling
 
Behavioral modeling
Behavioral modelingBehavioral modeling
Behavioral modeling
 
Biosensors
BiosensorsBiosensors
Biosensors
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazards
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
test generation
test generationtest generation
test generation
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systems
 
basic concepts of reliability
basic concepts of reliabilitybasic concepts of reliability
basic concepts of reliability
 

Último

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Último (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

Finite state machines

  • 1. FINITE STATE MACHINES (MEALY AND MOORE MACHINES) Gookyi Dennis A. N. SoC Design Lab. April 30, 2014
  • 2. Contents: • Introduction • Moore machines • Mealy machines • Comparison 2
  • 3. Introduction: • FSM’s can exist in several states and it goes from one state to another state based on the present state and the input conditions • Any synchronous circuit is an FSM of some form • This means that:  Combinational logic is an FSM without memory  Flip-Flops and counters are also FSM’s 3
  • 5. General FSM • The circuit diagram consists of: Combinational block: with primary input w and primary output z. it also consist of secondary inputs (present state) and secondary outputs (next state) Memory block: consist mainly of Flip-Flops. 5
  • 6. Outputs of state machines: • No provision has been made to show the output z which is different from the state variables. The output can therefore be modelled in two distinct ways Moore machines Mealy machines 6
  • 7. Moore machines: •Edward Moore’s model: D = F(W,Q) Z = G(Q) F and G are Boolean functions Output only depends on the current state (Q) Input (W) and current state (Q) determine the next state (D) 7
  • 9. Moore state table Present state Input Next state output A B W Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 x x 0 1 1 1 x x 0 9
  • 12. Mealy machines • George Mealy’s model  D = F(W,Q)  Z = G(W,Q)  F and G are Boolean functions  Output depends on both current state (Q) and input (W)  Next state (D) depends on input (W) and current state (Q)12
  • 14. Mealy state table Present state Input Next state output A B W Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 x x 0 1 1 1 x x 0 14
  • 17. Comparison: Moore vs Mealy • Moore machines are safer to use Output change at clock edge In mealy machines, input change can cause output to change as soon as logic is done. • Mealy machines are faster because the output is dependent on the inputs. 17
  • 18. Choosing between Moore and Mealy machines • It actually comes down to the task at hand when choosing between Mealy and More machines • These are a few questions to ask when choosing between either of the two:  Does one want to have a synchronous or asynchronous machine?  Is speed paramount?  Are both the inputs and present state readily available? • The answer to each of these questions determines the type of machine that would work best. 18