SlideShare ist ein Scribd-Unternehmen logo
1 von 20
State-machine design and synthesis
    The creative part, like   Turning the crank, like
    writing a program         a compiler does
Designing State Machines Using State
                  Diagrams
• State-diagram design is simpler but it is more prone to
  errors.
   – State table is an exhaustive listing of the next states for
     each state/input combination. No ambiguity is possible.
   – When constructing a state diagram there is no guarantee
     that the transition expressions written on the arcs leaving
     a particular state, cover all input combination exactly
     once.
Designing State Machines Using State
                   Diagrams
• Mutual exclusion: For each state the logical product of each
  pair of transition expression on arcs leaving that state
  should be zero. If there are n arcs then there are n(n-1)/2
  logical products to evaluate
• All inclusion: For each state the logical sum of the transition
  expressions on all arcs leaving the state should be one.
• A state table guarantees mutual exclusion and all inclusion
• A state diagram needs to be verified for mutual exclusion
  and all inclusion so that there is no ambiguity.
• Design a machine with inputs A and B, and output Z
  that is 1 if:
  – A had the same value at the two previous ticks
  – B has been 1 since the last time the above was true

                     State          Input AB              Output
 Meaning               S      00    01     11      10       Z


 Initial State       INIT    A0     A0     A1     A1        0
 Got A = 0           A0      OK00 OK00     A1     A1        0
 Got A = 1           A1      A0     A0    OK11 OK11         0
 Got A = 00          OK00 OK00 OK00 OK01          A1        1
 Got A = 11          OK11    A0    OK10 OK11 OK11           1
 Got A = 01, B = 1   OK01    A0    OK10 OK11 OK11           1
 Got A = 10, B = 1   OK10 OK00 OK00 OK01          A1        1
• Minimized State Table




                     State          Input AB         Output
 Meaning               S      00    01    11   10      Z


 Initial State       INIT    A0    A0     A1   A1      0
 Got A = 0           A0      OK00 OK00    A1   A1      0
 Got A = 1           A1      A0    A0    OK11 OK11     0
 Got A = 00 or A =   OK00 OK00 OK00 OK11       A1      1
 10, B = 1
 Got A = 11or A =    OK11    A0    OK00 OK11 OK11      1
 01, B = 1
State Assignment
           • Can minimize number of states (see text), but
             hardly anyone bothers anymore.
           • Need to assign state-variable combinations to
             states.
             – Minimum number of variables for n states is log2
               n
             Example -- 4 states, 2 state variables (Q1,Q2):

                A ==> 00
                B ==> 01
                C ==> 10
                D ==> 11       Up to this point is “art”, the
                               rest is just “turning the crank.”

Lect #11                                                       Rissacher EE365
State assignment contd.
• The design example has 5 states, so
  minimum f/fs required are 3
• For 3 f/fs we have 8 states and we
  require only 5
• Hence there will be 3 unused states
• Two approaches
  -Minimal Risk
  -Minimal Cost
Minimal Risk
• All unused states are identified and explicit next
  state entries are made so that, for any input
  combination the unused states will go to the
  ‘initial’, ‘idle’ or ‘safe’ state
                  Minimal Cost
• All unused states are identified and next state
  entries are marked as ‘don’t cares’. In most
  cases this simplifies the excitation logic.
  However, the machine’s behavior if it enters an
  unused state may be pretty weird
Guidelines for state assignments
• Choose an initial coded state into which the
  machine can easily be forced at reset (00.. Or
  11..)
• Minimize the number of state variables that
  change on each transition
• Maximize the number of state variables that do
  not change in a group of related states. ( a
  group of states in which most of the transitions
  stay in the group)
Guidelines for state assignments
• Exploit symmetries in the problem specification
  and the corresponding symmetries in the state
  table.
• If there are unused states then use the ‘best’
  available states
• Decompose the set of states into individual bits
  or fields, where they have a well defined
  meaning with respect to the input effects or
  output behavior
• Consider more than the minimum number of
  state variables
State assignment contd.
• There are 6,720 different state assignments of
  5 states to 3 variables.
  – And there are even more using 4 or more variables
• Here are a few “obvious” or “interesting” ones:
One–hot assignment
• It uses 1 bit per state
• Simple
• Each f/f needs to be set to ‘1’ for transitions in
  only one state
• More number of f/fs
• Usually used for a machine with S states that is
  required to have a set of 1 out-of-S coded
  outputs indicating its current state. The one-hot
  -coded f/f outputs can be used directly for this
  purpose, with no additional combinational
  output logic
Almost One–hot assignment
• It uses a ‘no-hot’ combination for the initial state
Reasons
  -Easy to initialize most storage devices to 0
  -Initial state in particular is usually not visited
  once the machine gets going
Incorporation of some guidelines
• Initial state is 000 which is easy to force using
  Reset signal
• Q1 is used to indicate whether the machine is
  in INIT state or not
  -Q1 = 0 implies INIT state
  -Q1 = 1 implies non-INIT states
• Q2 indicates that the conditions for a ‘1’ output
  are satisfied in the current state.
  -Q2 = 0 for A0, A1 states
  -Q2 = 1 for OK0, OK1 states
Incorporation of some guidelines
• Q3 indicates the previous value of A.
  -Q3 = 0 for OK0, A0 states
  -Q3 = 1 for OK1, A1 states

• By decomposing the state bits meanings in this
  way, we can expect the next state and output
  logic to be simpler than in a ‘random’
  assignment
Transition/output table (decomposed
                             assignment)




                                                      D1 D2 D3
           • Simple textual substitution
           • With D flip-flops, excitation table is identical to
             transition table (now with D1 D2 D3)

Lect #11                                                   Rissacher EE365
Develop
            excitation
            equations



           • Assume unused states have next-state = 000




Lect #11                                           Rissacher EE365
Option:
            Minimize
           with “Don’t
             Cares”



                    D1 = 1
                    D2 = Q1 • Q3´ • A´ + Q3 • A + Q2 • B
                    D3 = A

Lect #11                                            Rissacher EE365
Output Equation

                              Q1
                  Q2Q3    0        1
                   00     0        0
                   01     d        0
                   11     d        1
                   10     d        1

                         Z = Q2
Circuit using minimized equations




Lect #11                        Rissacher EE365

Weitere ähnliche Inhalte

Was ist angesagt?

UNIT-IV .FINITE STATE MACHINES
UNIT-IV .FINITE STATE MACHINESUNIT-IV .FINITE STATE MACHINES
UNIT-IV .FINITE STATE MACHINESDr.YNM
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086Albin Panakkal
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
Time Domain and Frequency Domain
Time Domain and Frequency DomainTime Domain and Frequency Domain
Time Domain and Frequency Domainsajan gohel
 
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...Waqas Afzal
 
Stability of Control System
Stability of Control SystemStability of Control System
Stability of Control Systemvaibhav jindal
 
Reliable, cheaper, and modular new scada 1
Reliable, cheaper, and modular new scada 1Reliable, cheaper, and modular new scada 1
Reliable, cheaper, and modular new scada 1Mohamed Zahran
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacingMonica Gunjal
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded systemVikas Dongre
 
Semiconductor memories
Semiconductor memoriesSemiconductor memories
Semiconductor memoriesSambitShreeman
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecturekomal mistry
 
Sampling theorem
Sampling theoremSampling theorem
Sampling theoremShanu Bhuvana
 
Counters & time delay
Counters & time delayCounters & time delay
Counters & time delayHemant Chetwani
 
Motor driver
Motor driverMotor driver
Motor driverRobotix 2011
 

Was ist angesagt? (20)

UNIT-IV .FINITE STATE MACHINES
UNIT-IV .FINITE STATE MACHINESUNIT-IV .FINITE STATE MACHINES
UNIT-IV .FINITE STATE MACHINES
 
Stable & Unstable Systems |Solved problems|
Stable & Unstable Systems |Solved problems|Stable & Unstable Systems |Solved problems|
Stable & Unstable Systems |Solved problems|
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
Time Domain and Frequency Domain
Time Domain and Frequency DomainTime Domain and Frequency Domain
Time Domain and Frequency Domain
 
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...
Transfer Function, Concepts of stability(critical, Absolute & Relative) Poles...
 
Stability of Control System
Stability of Control SystemStability of Control System
Stability of Control System
 
Reliable, cheaper, and modular new scada 1
Reliable, cheaper, and modular new scada 1Reliable, cheaper, and modular new scada 1
Reliable, cheaper, and modular new scada 1
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded system
 
Semiconductor memories
Semiconductor memoriesSemiconductor memories
Semiconductor memories
 
Ec8791 lpc2148 pwm
Ec8791 lpc2148 pwmEc8791 lpc2148 pwm
Ec8791 lpc2148 pwm
 
Two port networks
Two port networksTwo port networks
Two port networks
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecture
 
Sampling theorem
Sampling theoremSampling theorem
Sampling theorem
 
Counters & time delay
Counters & time delayCounters & time delay
Counters & time delay
 
Motor driver
Motor driverMotor driver
Motor driver
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 

Andere mochten auch

Synchronous design process
Synchronous design processSynchronous design process
Synchronous design processAbhilash Nair
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineAbhilash Nair
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Abhilash Nair
 
Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsAbhilash Nair
 
Design Synthesis
Design SynthesisDesign Synthesis
Design Synthesisfrog
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift RegistersAbhilash Nair
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine designAdarsh Patel
 
Analysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAnalysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAbhilash Nair
 
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-CalculusA Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculussmennicke
 
Icmens 2009 L100
Icmens 2009   L100Icmens 2009   L100
Icmens 2009 L100khalid_nitt
 
Daad March 8th 2010
Daad   March 8th 2010Daad   March 8th 2010
Daad March 8th 2010khalid_nitt
 
FSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU BraunschweigFSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU Braunschweigalexanderperl
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential CircuitsAbhilash Nair
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State MachineAbhilash Nair
 
Distributed systems and scalability rules
Distributed systems and scalability rulesDistributed systems and scalability rules
Distributed systems and scalability rulesOleg Tsal-Tsalko
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Practical Byzantine Fault Tolerance
Practical Byzantine Fault TolerancePractical Byzantine Fault Tolerance
Practical Byzantine Fault ToleranceSuman Karumuri
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machinescodeofficer
 

Andere mochten auch (20)

Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State Machine
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
 
VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
 
Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip Flops
 
Design Synthesis
Design SynthesisDesign Synthesis
Design Synthesis
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift Registers
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
 
Analysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAnalysis of state machines & Conversion of models
Analysis of state machines & Conversion of models
 
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-CalculusA Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
 
Icmens 2009 L100
Icmens 2009   L100Icmens 2009   L100
Icmens 2009 L100
 
Daad March 8th 2010
Daad   March 8th 2010Daad   March 8th 2010
Daad March 8th 2010
 
FSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU BraunschweigFSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU Braunschweig
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State Machine
 
Distributed systems and scalability rules
Distributed systems and scalability rulesDistributed systems and scalability rules
Distributed systems and scalability rules
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Practical Byzantine Fault Tolerance
Practical Byzantine Fault TolerancePractical Byzantine Fault Tolerance
Practical Byzantine Fault Tolerance
 
FPLDs
FPLDsFPLDs
FPLDs
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machines
 

Ähnlich wie State Machine Design and Synthesis

Computer system architecture 16 counters
Computer system architecture 16 countersComputer system architecture 16 counters
Computer system architecture 16 countersthearticlenow
 
04 sequential circuits
04 sequential circuits04 sequential circuits
04 sequential circuitsxyxz
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential CircuitHeman Pathak
 
digital-electronics_7.pdf
digital-electronics_7.pdfdigital-electronics_7.pdf
digital-electronics_7.pdfsarala9
 
Lect23 Engin112
Lect23 Engin112Lect23 Engin112
Lect23 Engin112John Williams
 
Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Asif Iqbal
 
UNIT - III.pptx
UNIT - III.pptxUNIT - III.pptx
UNIT - III.pptxamudhak10
 
flip flop 13.ppt
flip flop 13.pptflip flop 13.ppt
flip flop 13.pptSivaranjaniN6
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh mapchandkec
 
Basics Counters
Basics Counters Basics Counters
Basics Counters Danial Mirza
 
Lecture 12.pptx
Lecture 12.pptxLecture 12.pptx
Lecture 12.pptxTimePresents
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxThapar Institute
 
Sometimes tells me funny stories from his childhood
Sometimes tells me funny stories from his childhoodSometimes tells me funny stories from his childhood
Sometimes tells me funny stories from his childhoodnomuss27
 
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaaDD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaakasheenp
 

Ähnlich wie State Machine Design and Synthesis (20)

Lec 25 26_27
Lec 25 26_27Lec 25 26_27
Lec 25 26_27
 
Computer system architecture 16 counters
Computer system architecture 16 countersComputer system architecture 16 counters
Computer system architecture 16 counters
 
Lec9
Lec9Lec9
Lec9
 
04 sequential circuits
04 sequential circuits04 sequential circuits
04 sequential circuits
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
 
digital-electronics_7.pdf
digital-electronics_7.pdfdigital-electronics_7.pdf
digital-electronics_7.pdf
 
Lect23 Engin112
Lect23 Engin112Lect23 Engin112
Lect23 Engin112
 
Sequential Logic
Sequential LogicSequential Logic
Sequential Logic
 
Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4
 
UNIT - III.pptx
UNIT - III.pptxUNIT - III.pptx
UNIT - III.pptx
 
flip flop 13.ppt
flip flop 13.pptflip flop 13.ppt
flip flop 13.ppt
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh map
 
Basics Counters
Basics Counters Basics Counters
Basics Counters
 
Lecture 12.pptx
Lecture 12.pptxLecture 12.pptx
Lecture 12.pptx
 
Flipflop r012
Flipflop   r012Flipflop   r012
Flipflop r012
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptx
 
Sometimes tells me funny stories from his childhood
Sometimes tells me funny stories from his childhoodSometimes tells me funny stories from his childhood
Sometimes tells me funny stories from his childhood
 
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaaDD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
K - Map
  K - Map    K - Map
K - Map
 

Mehr von Abhilash Nair

VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)Abhilash Nair
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machinesAbhilash Nair
 
Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Abhilash Nair
 
Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Abhilash Nair
 
Static and Dynamic Read/Write memories
Static and Dynamic Read/Write memoriesStatic and Dynamic Read/Write memories
Static and Dynamic Read/Write memoriesAbhilash Nair
 
Documentation Standards of an IC
Documentation Standards of an ICDocumentation Standards of an IC
Documentation Standards of an ICAbhilash Nair
 
Shift Registers
Shift RegistersShift Registers
Shift RegistersAbhilash Nair
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROMAbhilash Nair
 
Trends Of Televisions
Trends Of TelevisionsTrends Of Televisions
Trends Of TelevisionsAbhilash Nair
 
Core java slides
Core java slidesCore java slides
Core java slidesAbhilash Nair
 
Vectors in Java
Vectors in JavaVectors in Java
Vectors in JavaAbhilash Nair
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in JavaAbhilash Nair
 

Mehr von Abhilash Nair (20)

VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machines
 
Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)
 
Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)
 
FPGA
FPGAFPGA
FPGA
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLD & FPLD
CPLD & FPLDCPLD & FPLD
CPLD & FPLD
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLDs
CPLDsCPLDs
CPLDs
 
Static and Dynamic Read/Write memories
Static and Dynamic Read/Write memoriesStatic and Dynamic Read/Write memories
Static and Dynamic Read/Write memories
 
Documentation Standards of an IC
Documentation Standards of an ICDocumentation Standards of an IC
Documentation Standards of an IC
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
MSI Counters
MSI CountersMSI Counters
MSI Counters
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROM
 
Counters
CountersCounters
Counters
 
Trends Of Televisions
Trends Of TelevisionsTrends Of Televisions
Trends Of Televisions
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Vectors in Java
Vectors in JavaVectors in Java
Vectors in Java
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 

KĂźrzlich hochgeladen

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

KĂźrzlich hochgeladen (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

State Machine Design and Synthesis

  • 1. State-machine design and synthesis The creative part, like Turning the crank, like writing a program a compiler does
  • 2. Designing State Machines Using State Diagrams • State-diagram design is simpler but it is more prone to errors. – State table is an exhaustive listing of the next states for each state/input combination. No ambiguity is possible. – When constructing a state diagram there is no guarantee that the transition expressions written on the arcs leaving a particular state, cover all input combination exactly once.
  • 3. Designing State Machines Using State Diagrams • Mutual exclusion: For each state the logical product of each pair of transition expression on arcs leaving that state should be zero. If there are n arcs then there are n(n-1)/2 logical products to evaluate • All inclusion: For each state the logical sum of the transition expressions on all arcs leaving the state should be one. • A state table guarantees mutual exclusion and all inclusion • A state diagram needs to be verified for mutual exclusion and all inclusion so that there is no ambiguity.
  • 4. • Design a machine with inputs A and B, and output Z that is 1 if: – A had the same value at the two previous ticks – B has been 1 since the last time the above was true State Input AB Output Meaning S 00 01 11 10 Z Initial State INIT A0 A0 A1 A1 0 Got A = 0 A0 OK00 OK00 A1 A1 0 Got A = 1 A1 A0 A0 OK11 OK11 0 Got A = 00 OK00 OK00 OK00 OK01 A1 1 Got A = 11 OK11 A0 OK10 OK11 OK11 1 Got A = 01, B = 1 OK01 A0 OK10 OK11 OK11 1 Got A = 10, B = 1 OK10 OK00 OK00 OK01 A1 1
  • 5. • Minimized State Table State Input AB Output Meaning S 00 01 11 10 Z Initial State INIT A0 A0 A1 A1 0 Got A = 0 A0 OK00 OK00 A1 A1 0 Got A = 1 A1 A0 A0 OK11 OK11 0 Got A = 00 or A = OK00 OK00 OK00 OK11 A1 1 10, B = 1 Got A = 11or A = OK11 A0 OK00 OK11 OK11 1 01, B = 1
  • 6. State Assignment • Can minimize number of states (see text), but hardly anyone bothers anymore. • Need to assign state-variable combinations to states. – Minimum number of variables for n states is log2 n Example -- 4 states, 2 state variables (Q1,Q2): A ==> 00 B ==> 01 C ==> 10 D ==> 11 Up to this point is “art”, the rest is just “turning the crank.” Lect #11 Rissacher EE365
  • 7. State assignment contd. • The design example has 5 states, so minimum f/fs required are 3 • For 3 f/fs we have 8 states and we require only 5 • Hence there will be 3 unused states • Two approaches -Minimal Risk -Minimal Cost
  • 8. Minimal Risk • All unused states are identified and explicit next state entries are made so that, for any input combination the unused states will go to the ‘initial’, ‘idle’ or ‘safe’ state Minimal Cost • All unused states are identified and next state entries are marked as ‘don’t cares’. In most cases this simplifies the excitation logic. However, the machine’s behavior if it enters an unused state may be pretty weird
  • 9. Guidelines for state assignments • Choose an initial coded state into which the machine can easily be forced at reset (00.. Or 11..) • Minimize the number of state variables that change on each transition • Maximize the number of state variables that do not change in a group of related states. ( a group of states in which most of the transitions stay in the group)
  • 10. Guidelines for state assignments • Exploit symmetries in the problem specification and the corresponding symmetries in the state table. • If there are unused states then use the ‘best’ available states • Decompose the set of states into individual bits or fields, where they have a well defined meaning with respect to the input effects or output behavior • Consider more than the minimum number of state variables
  • 11. State assignment contd. • There are 6,720 different state assignments of 5 states to 3 variables. – And there are even more using 4 or more variables • Here are a few “obvious” or “interesting” ones:
  • 12. One–hot assignment • It uses 1 bit per state • Simple • Each f/f needs to be set to ‘1’ for transitions in only one state • More number of f/fs • Usually used for a machine with S states that is required to have a set of 1 out-of-S coded outputs indicating its current state. The one-hot -coded f/f outputs can be used directly for this purpose, with no additional combinational output logic
  • 13. Almost One–hot assignment • It uses a ‘no-hot’ combination for the initial state Reasons -Easy to initialize most storage devices to 0 -Initial state in particular is usually not visited once the machine gets going
  • 14. Incorporation of some guidelines • Initial state is 000 which is easy to force using Reset signal • Q1 is used to indicate whether the machine is in INIT state or not -Q1 = 0 implies INIT state -Q1 = 1 implies non-INIT states • Q2 indicates that the conditions for a ‘1’ output are satisfied in the current state. -Q2 = 0 for A0, A1 states -Q2 = 1 for OK0, OK1 states
  • 15. Incorporation of some guidelines • Q3 indicates the previous value of A. -Q3 = 0 for OK0, A0 states -Q3 = 1 for OK1, A1 states • By decomposing the state bits meanings in this way, we can expect the next state and output logic to be simpler than in a ‘random’ assignment
  • 16. Transition/output table (decomposed assignment) D1 D2 D3 • Simple textual substitution • With D flip-flops, excitation table is identical to transition table (now with D1 D2 D3) Lect #11 Rissacher EE365
  • 17. Develop excitation equations • Assume unused states have next-state = 000 Lect #11 Rissacher EE365
  • 18. Option: Minimize with “Don’t Cares” D1 = 1 D2 = Q1 • Q3´ • A´ + Q3 • A + Q2 • B D3 = A Lect #11 Rissacher EE365
  • 19. Output Equation Q1 Q2Q3 0 1 00 0 0 01 d 0 11 d 1 10 d 1 Z = Q2
  • 20. Circuit using minimized equations Lect #11 Rissacher EE365