SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

SRAM redundancy insertion
SRAM redundancy insertionSRAM redundancy insertion
SRAM redundancy insertionchiportal
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVishal kakade
 
Cmos design
Cmos designCmos design
Cmos designMahi
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approachGopinathD17
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor LogicDiwaker Pant
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set Nitin Ahire
 
Pass transistor logic
Pass transistor logicPass transistor logic
Pass transistor logicstudent
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic arrayHuba Akhtar
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adderABIN THOMAS
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilogJITU MISTRY
 
Addressing modes of 8085
Addressing modes of 8085Addressing modes of 8085
Addressing modes of 8085Gaurav Solanki
 

What's hot (20)

CMOS Logic Circuits
CMOS Logic CircuitsCMOS Logic Circuits
CMOS Logic Circuits
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
SRAM redundancy insertion
SRAM redundancy insertionSRAM redundancy insertion
SRAM redundancy insertion
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustration
 
Cmos design
Cmos designCmos design
Cmos design
 
PLDs
PLDsPLDs
PLDs
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approach
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set
 
Pass transistor logic
Pass transistor logicPass transistor logic
Pass transistor logic
 
Vlsi
VlsiVlsi
Vlsi
 
Digital logic families
Digital logic familiesDigital logic families
Digital logic families
 
CMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURESCMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURES
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adder
 
Twin well process
Twin well processTwin well process
Twin well process
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
All flipflop
All flipflopAll flipflop
All flipflop
 
Addressing modes of 8085
Addressing modes of 8085Addressing modes of 8085
Addressing modes of 8085
 

Viewers also liked

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
 
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
 

Viewers also liked (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
 

Similar to State Machine Design and Synthesis

Similar to 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
 
Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.Unit I_CDA-1 computer design and applications.
Unit I_CDA-1 computer design and applications.
 
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
 

More from Abhilash Nair

More from 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
 

Recently uploaded

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 

Recently uploaded (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

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