SlideShare a Scribd company logo
Designing State Machines
  Using State Diagrams
• Design a state machine to control the
  tail lights of a 1965 Ford
  Thunderbird. The tail lights are
  composed of three light on each side
  which operate for the turns in the
  manner shown in the picture next.
Designing State Machines
  Using State Diagrams




• The state machine has:
  – Three inputs: left, and right turns,
    and hazard.
  – Six outputs: LA, LB, LC, RA, RB, and
    RC.
  – Free running clock with frequency
    equal to the flashing rate.
Designing State Machines
     Using State Diagrams




• State name represents     •   LA = L1+L2+L3+LR3
  a logic expression that   •
  is 1 only in that state       LB = L2+L3+LR3
• The output equations      •   LC = L3+LR3
  may be written            •   RA = R1+R2+R3+LR3
  without assigning         •   RB = R2+R3+LR3
  coded states              •   RC = R3+LR3
For the state diagram to be unambiguous:
  The transition expressions on the arcs
  leaving each state have to be mutually
  exclusive and all inclusive. That is, for
  each state, no two expressions are 1 for
  the same input combination, and some
  expression is 1 for every input
  combination.
   This can be confirmed algebraically by
     performing two steps
   Mutual exclusion: For each state, show
     that the logical product of each pair of
     transition expression on arcs leaving
     that state is zero. If there are n arcs,
     then there are n(n-1)/2 logical
     products to evaluate.
   All inclusion: For each state show that
     the logical sum of the transition
     expressions on all arcs leaving the state
     is 1.
The state diagram in not mutually exclusive
   because for some input combinations more
     than one transition expressions are 1.
                     State IDLE
     I/p          Transition Expressions
     combinations
      Le   Ri   Ha     L   R   H   L+R+H
       0   0    0      0   0   0     1

       0   0    1      0   0   1     0

       0   1    0      0   1   0     0

       0   1    1      0   1   1     0

       1   0    0      1   0   0     0

       1   0    1      1   0   1     0

       1   1    0      1   1   0     0

       1   1    1      1   1   1     0
• Some of the logical products for each
  pair of transition expression on arcs
  leaving IDLE state is not zero.
   For the state IDLE
   Arcs leaving the state: 4
   L, R, H, L + R + H
   Logical products to evaluate:4*3/2 = 6
   L·R ≠ 0, L·H ≠ 0, R·H ≠ 0
   L·             =0
      L+R+H
   R·             =0
      L+R+H
   H·             =0
      L+R+H
• All inclusion: For each state the logical sum
  of the transition expressions on all arcs
  leaving the state is one.
   L+R+H+
             L + R + H =1
Problem
- The state diagram doesn’t handle
  multiple inputs asserted simultaneously.
  That is, what happens in the IDLE state
  if both LEFT and HAZ are asserted?
  According to the state diagram the
  machine goes into two states L1 and LR3
  which is impossible.
   The problem is avoided by giving HAZ
     input a priority. Also we treat both
     LEFT and RIGHT asserted
     simultaneously as a Hazard request,
     since the driver is completely confused
     and requires help.
The state diagram in now mutually exclusive


                       State IDLE

  I/p comb-      Transition Expressions
  inations           L⋅R + H            R⋅H ⋅L
  Le Ri Ha
                 L⋅H ⋅R                       L+R+H
   0   0     0        0          0      0        1

   0   0     1        0          1      0        0

   0   1     0        0          0      1        0

   0   1     1        0          1      0        0

   1   0     0        1          0      0        0

   1   0     1        0          1      0        0

   1   1     0        0          1      0        0

   1   1     1        0          1      0        0
• The logical products for each pair of
  transition expression on arcs leaving
  IDLE state is zero.
   For the state IDLE
   Arcs leaving the state: 4
 L ⋅ H ⋅ R , L ⋅ R + H , R ⋅ H ⋅ L, L + R + H
  Logical products to evaluate:4*3/2 = 6
  All 6 products are zero.

• For each state the logical sum of the
  transition expressions on all arcs leaving
  the state is one.

• Hence the state diagram now is both
  mutually exclusive and all inclusive
• In the new state diagram we notice that
  once the turn has been initiated the state
  diagram allows the cycle to run to
  completion even if HAZ is asserted.

   This may have a certain aesthetic
    appeal, however it would be safer to
    allow the machine to go into Hazard
    mode as soon as possible.
• Hence the state diagram is modified as
  shown next.
State Assignment
• IDLE state of 000.
• Q1 and Q0 are used to count in gray code
  sequence (IDLE→L1→L2→L3→IDLE)
  (IDLE→R1→R2→R3→IDLE).
• Q2 identifies LEFT or RIGHT turn.
• HAZ state of 100.
• Next step – sort of transition table
• In this case the transitions are specified by
  expressions rather than an exhaustive
  tabulation of next states
                Transition List
Synthesis using transition List
• Develop a set of transition equations that
  define the next state variable S* in terms
  of current state S and inputs
• The transition list may be viewed as a
  sort of hybrid truth table in which the
  state-variable combinations for the
  current state are listed explicitly and
  input combinations are listed
  algebraically.
• Reading down a S* column find a
  sequence of 0s and 1s indicating the value
  of S* for various state/input
  combinations.
• A transition equation for a next state
  variable S* can be written using a sort of
  hybrid canonical sum.
• S* = ∑ (transition p-term)
  Transition list rows where S* = 1
Synthesis using transition List
• Transition p-term is the product of the
  current states min-term and the
  transition expression.
• The transition equation has one
  transition p-term for each row of the
  transition list that contains a ‘1’ in the S*
  column.
• There is no guarantee that the transition
  equations obtained by this method are in
  any sense minimal.
• The equations are not even in the
  standard POS or SOP forms
• They only provide a starting point for
  whatever combinational design method
  one might choose to synthesize the
  excitation logic for the FSM
Synthesis using transition List
• Based on the transition list we get the
  following transition equations for Q2*,
  Q1* and Q0*

        (             )
Q 2* = Q 2 ⋅ Q1⋅ Q0 ( L ⋅ R + H )
     + (Q 2 ⋅ Q1⋅ Q0 )( L ⋅ R ⋅ H )
     + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H )

     + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H )
     + ( Q 2 ⋅ Q1⋅ Q0)( H ) + ( Q 2 ⋅ Q1 ⋅ Q0) ( H )

        (                )
 Q 2* = Q 2 ⋅ Q1⋅ Q0 ( R + H )

            (        )
         + Q 2 ⋅ Q0 ( H ) + ( Q 2 ⋅ Q0)
Synthesis using transition List

       (             )( ) (
Q1* = Q 2 ⋅ Q1 ⋅ Q0 H + Q 2 ⋅ Q1⋅ Q0 H      )( )
 + (Q 2 ⋅ Q1⋅ Q0 )( H ) + ( Q 2 ⋅ Q1⋅ Q0) ( H )
Q1* = Q0( H )


             (          )(
  Q0* = Q 2 ⋅ Q1 ⋅ Q0 L ⋅ R ⋅ H      )
      + (Q 2 ⋅ Q1 ⋅ Q0)( L ⋅ R ⋅ H )
      + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H )

             (             )(
  Q0* = Q 2 ⋅ Q1 ⋅ Q0 H ( L ⊕ R )    )
           + (Q1⋅ Q0)( H )
Excitation equations
• On deriving the transition equations it is
  desirable to use the D flip flops as
  memory elements
• The transition equation directly gives the
  excitation equation in this case
• The excitation equations of other flip-
  flops are not so easy to derive
• Majority of the PLD & ASIC based
  systems employ D flip flops.
Variations in the scheme
• If the column for a particular next state
  variable contains fewer 0s than 1s, it may
  be advantageous to write that variables
  transition equation in terms of 0s in its
  column

   S*=                  ∑ (transition         p terms )
          transition list rows where S *= 0

• That is S * = 1 for all the p terms for
  which S * = 0
• Thus a transition equation may be
  written for Q 2 * as the sum of 7 p-terms
       (            )(
Q 2 * = Q 2 ⋅ Q1 ⋅ Q0 L + R + H    )
    + (Q 2 ⋅ Q1⋅ Q0 )( L ⋅ R ⋅ H )
    + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1 ⋅ Q0 )( H )
    + (Q 2 ⋅ Q1 ⋅ Q0)(1) + (Q 2 ⋅ Q1⋅ Q0 )(1)
    + (Q 2 ⋅ Q1 ⋅ Q0)(1)
Variations in the scheme
          (                        ) (
  Q 2 * = Q 2 ⋅ Q1 ⋅ Q0 ⋅ H ⋅ R + Q 2 ⋅ Q0 ⋅ H   )
              (        ) (
          + Q1⋅ Q0 + Q 2 ⋅ Q0             )
• To obtain an expression for Q 2 * we
  simply complement both sides of the
  reduced equation
• To obtain an expression for a next state
  variable V * directly, using the 0s in the
  transition list, we can complement the
  right hand side of the general V *
  equation using DeMorgan’s theorem,
  obtaining a sort of hybrid canonical
  product
   V* =                ∏ (transition s terms)
          transition list rows where V *= 0

•Transition s-term is the sum of the current
states max-term and the complement of the
transition expression.
Unused states
• In this problem there were no unused
  states
• However, in case there are some unused
  states in the problem then they do not
  reflect in the transition list
• They are treated as don’t care in a very
  limited sense
• While writing equations for S*, the sum
  of p-terms for rows that had an explicit 1
  in the corresponding column were taken
• Although we don’t consider the unused
  states, the procedure implicitly treats
  them as if they had 0s in the
  corresponding column
• Conversely for S * the procedure
  implicitly treats unused states as if they
  had 1s in the corresponding column
Output-Coded state assignment
• The machines outputs are a function of
  state only
• A different output combination is
  produced in each named state
• We can use the outputs as state variables
  and assign each named state to the
  required output combination
• This sort of assignment is termed as
  output-coded state assignment
• Sometimes results in excitation equations
  that are simpler than the set of excitation
  and output equations obtained with a
  state assignment using minimum number
  of state variables
• It saves cost in a PLD based design since
  fewer PLD macrocells or outputs are
  needed overall
• Current State| Transition Exp| Next State
Decomposing State Machines
• Just like large programs being
  decomposed into procedures or
  subroutines, large state-machine
  problems are often solved with a
  collection of smaller state machines
• The original design problem is put into a
  natural hierarchical structure, so that the
  functions and uses of the sub-machines
  are obvious, making it unnecessary even
  to write a state table for the sub-machine
• The most commonly used sub-machine is
  a counter. The main machine usually
  STARTS the counter when it wishes to
  stay in a particular main state for n
  counts
• The counter counts the n counts and
  sends a DONE signal when the count is
  completed
Decomposing State Machines
• The main machine is designed to wait in
  the same state till it receives the DONE
  signal from the sub-machine
• This adds an extra output and input to
  the main machine (START and DONE)
  but saves n -1 states
• The simplest type of decomposition is
  shown in figure
• The Main machine provides the primary
  inputs and outputs and executes the top
  level control algorithm.
• The sub-machines perform the lower
  level functions under the control of the
  main machine and may also optionally
  handle some of the primary inputs and
  outputs
Decomposing State Machines



Inputs                                 Outputs
                              Sub
                             Machine
                   Start 1     1
                   Done 1
          Main
         Machine Start 2
                              Sub
                  Done 2
                             Machine
                               2


            Typical hierarchical
          state-machine structure

More Related Content

What's hot

ASIC vs SOC vs FPGA
ASIC  vs SOC  vs FPGAASIC  vs SOC  vs FPGA
ASIC vs SOC vs FPGA
Verification Excellence
 
FSM and ASM
FSM and ASMFSM and ASM
FSM and ASM
Unsa Shakir
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuitWan Afirah
 
Fpga
FpgaFpga
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
Prachi Pandey
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
Amr Rashed
 
Hdl
HdlHdl
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
UNIT-II  : SEQUENTIAL CIRCUIT DESIGN UNIT-II  : SEQUENTIAL CIRCUIT DESIGN
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
Dr.YNM
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
Huba Akhtar
 
Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and Encoder
Bharti Airtel Ltd.
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
DEPARTMENT OF PHYSICS
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machinesIrfan Anjum
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transform
NimithaSoman
 
Fpga & VHDL
Fpga & VHDLFpga & VHDL
Fpga & VHDL
Francesco De Canio
 
Finite state machines
Finite state machinesFinite state machines
Finite state machinesdennis gookyi
 
Programmable Logic Devices Plds
Programmable Logic Devices PldsProgrammable Logic Devices Plds
Programmable Logic Devices Plds
Gaditek
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
Mustafa Salah
 
Flip flops
Flip flopsFlip flops
Flip flops
Shashi Lata
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
Amr E. Mohamed
 

What's hot (20)

ASIC vs SOC vs FPGA
ASIC  vs SOC  vs FPGAASIC  vs SOC  vs FPGA
ASIC vs SOC vs FPGA
 
FSM and ASM
FSM and ASMFSM and ASM
FSM and ASM
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
 
Fpga
FpgaFpga
Fpga
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Hdl
HdlHdl
Hdl
 
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
UNIT-II  : SEQUENTIAL CIRCUIT DESIGN UNIT-II  : SEQUENTIAL CIRCUIT DESIGN
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
 
Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and Encoder
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
 
Moore and Mealy machines
Moore and Mealy machinesMoore and Mealy machines
Moore and Mealy machines
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transform
 
Fpga & VHDL
Fpga & VHDLFpga & VHDL
Fpga & VHDL
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
 
Programmable Logic Devices Plds
Programmable Logic Devices PldsProgrammable Logic Devices Plds
Programmable Logic Devices Plds
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Flip flops
Flip flopsFlip flops
Flip flops
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 

Viewers also liked

State Machine Design - Traffic Light Controller EGRE 254
State Machine Design - Traffic Light  Controller EGRE 254State Machine Design - Traffic Light  Controller EGRE 254
State Machine Design - Traffic Light Controller EGRE 254Jacob Ramey
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
Abhilash Nair
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machines
codeofficer
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and Synthesis
Abhilash Nair
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State Machine
Abhilash Nair
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROM
Abhilash Nair
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)
Mumbi Chishimba
 
Finite State Machines
Finite State Machines Finite State Machines
Finite State Machines
Basel Mansour
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
Adarsh Patel
 

Viewers also liked (9)

State Machine Design - Traffic Light Controller EGRE 254
State Machine Design - Traffic Light  Controller EGRE 254State Machine Design - Traffic Light  Controller EGRE 254
State Machine Design - Traffic Light Controller EGRE 254
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machines
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and Synthesis
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State Machine
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROM
 
Synchronous state machines. Moore and Mealy state machines (FSM)
Synchronous state machines.  Moore and Mealy state machines (FSM)Synchronous state machines.  Moore and Mealy state machines (FSM)
Synchronous state machines. Moore and Mealy state machines (FSM)
 
Finite State Machines
Finite State Machines Finite State Machines
Finite State Machines
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
 

Similar to Designing State Machine

COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSStarlee Lathong
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
rdjo
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
Heman Pathak
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
DamotTesfaye
 
Signals and systems assignment help
Signals and systems assignment helpSignals and systems assignment help
Signals and systems assignment help
Matlab Assignment Experts
 
ELN Presentation Add more information to your upload.pptx
ELN Presentation Add more information to your upload.pptxELN Presentation Add more information to your upload.pptx
ELN Presentation Add more information to your upload.pptx
MohammedAdnankhan4
 
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
Dr.SHANTHI K.G
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
Matlab Assignment Experts
 
Ssmboost
SsmboostSsmboost
Ssmboost
divyasri0008
 
Conversion of transfer function to canonical state variable models
Conversion of transfer function to canonical state variable modelsConversion of transfer function to canonical state variable models
Conversion of transfer function to canonical state variable models
Jyoti Singh
 
Lec9
Lec9Lec9
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxSequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
AhmedAlAfandi5
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
DrSonali Vyas
 
Digital Electronics R-S, J-K flip flop etc.pptx
Digital Electronics R-S, J-K  flip flop etc.pptxDigital Electronics R-S, J-K  flip flop etc.pptx
Digital Electronics R-S, J-K flip flop etc.pptx
ProfVilasShamraoPati
 
Lecture 3
Lecture 3Lecture 3
4.3 related rates
4.3 related rates4.3 related rates
4.3 related ratesmath265
 
Lecture 12.pptx
Lecture 12.pptxLecture 12.pptx
Lecture 12.pptx
TimePresents
 
Sequentialcircuits
SequentialcircuitsSequentialcircuits
Sequentialcircuits
Raghu Vamsi
 
B sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitB sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuit
Rai University
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
Thapar Institute
 

Similar to Designing State Machine (20)

COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPS
 
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdfPreparatory_questions_final_exam_DigitalElectronics1 (1).pdf
Preparatory_questions_final_exam_DigitalElectronics1 (1).pdf
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
 
Signals and systems assignment help
Signals and systems assignment helpSignals and systems assignment help
Signals and systems assignment help
 
ELN Presentation Add more information to your upload.pptx
ELN Presentation Add more information to your upload.pptxELN Presentation Add more information to your upload.pptx
ELN Presentation Add more information to your upload.pptx
 
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
Fourier Transform ,LAPLACE TRANSFORM,ROC and its Properties
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
Ssmboost
SsmboostSsmboost
Ssmboost
 
Conversion of transfer function to canonical state variable models
Conversion of transfer function to canonical state variable modelsConversion of transfer function to canonical state variable models
Conversion of transfer function to canonical state variable models
 
Lec9
Lec9Lec9
Lec9
 
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxSequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Digital Electronics R-S, J-K flip flop etc.pptx
Digital Electronics R-S, J-K  flip flop etc.pptxDigital Electronics R-S, J-K  flip flop etc.pptx
Digital Electronics R-S, J-K flip flop etc.pptx
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
4.3 related rates
4.3 related rates4.3 related rates
4.3 related rates
 
Lecture 12.pptx
Lecture 12.pptxLecture 12.pptx
Lecture 12.pptx
 
Sequentialcircuits
SequentialcircuitsSequentialcircuits
Sequentialcircuits
 
B sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitB sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuit
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 

More from Abhilash Nair

Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip Flops
Abhilash Nair
 
VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
Abhilash Nair
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift Registers
Abhilash Nair
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
Abhilash Nair
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
Abhilash Nair
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
Abhilash Nair
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
Abhilash Nair
 
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
Abhilash Nair
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machines
Abhilash 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
 
FPGA
FPGAFPGA
FPLDs
FPLDsFPLDs
CPLDs
CPLDsCPLDs
CPLD & FPLD
CPLD & FPLDCPLD & FPLD
CPLD & FPLD
Abhilash Nair
 
CPLDs
CPLDsCPLDs
CPLDs
CPLDsCPLDs
Static and Dynamic Read/Write memories
Static and Dynamic Read/Write memoriesStatic and Dynamic Read/Write memories
Static and Dynamic Read/Write memories
Abhilash Nair
 
Documentation Standards of an IC
Documentation Standards of an ICDocumentation Standards of an IC
Documentation Standards of an IC
Abhilash Nair
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
 

More from Abhilash Nair (20)

Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip Flops
 
VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift Registers
 
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
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
 
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
 
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
 
FPLDs
FPLDsFPLDs
FPLDs
 
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
 

Recently uploaded

Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 

Designing State Machine

  • 1. Designing State Machines Using State Diagrams • Design a state machine to control the tail lights of a 1965 Ford Thunderbird. The tail lights are composed of three light on each side which operate for the turns in the manner shown in the picture next.
  • 2. Designing State Machines Using State Diagrams • The state machine has: – Three inputs: left, and right turns, and hazard. – Six outputs: LA, LB, LC, RA, RB, and RC. – Free running clock with frequency equal to the flashing rate.
  • 3. Designing State Machines Using State Diagrams • State name represents • LA = L1+L2+L3+LR3 a logic expression that • is 1 only in that state LB = L2+L3+LR3 • The output equations • LC = L3+LR3 may be written • RA = R1+R2+R3+LR3 without assigning • RB = R2+R3+LR3 coded states • RC = R3+LR3
  • 4. For the state diagram to be unambiguous: The transition expressions on the arcs leaving each state have to be mutually exclusive and all inclusive. That is, for each state, no two expressions are 1 for the same input combination, and some expression is 1 for every input combination. This can be confirmed algebraically by performing two steps Mutual exclusion: For each state, show that the logical product of each pair of transition expression on arcs leaving that state is zero. If there are n arcs, then there are n(n-1)/2 logical products to evaluate. All inclusion: For each state show that the logical sum of the transition expressions on all arcs leaving the state is 1.
  • 5. The state diagram in not mutually exclusive because for some input combinations more than one transition expressions are 1. State IDLE I/p Transition Expressions combinations Le Ri Ha L R H L+R+H 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0
  • 6. • Some of the logical products for each pair of transition expression on arcs leaving IDLE state is not zero. For the state IDLE Arcs leaving the state: 4 L, R, H, L + R + H Logical products to evaluate:4*3/2 = 6 L·R ≠ 0, L·H ≠ 0, R·H ≠ 0 L· =0 L+R+H R· =0 L+R+H H· =0 L+R+H • All inclusion: For each state the logical sum of the transition expressions on all arcs leaving the state is one. L+R+H+ L + R + H =1
  • 7. Problem - The state diagram doesn’t handle multiple inputs asserted simultaneously. That is, what happens in the IDLE state if both LEFT and HAZ are asserted? According to the state diagram the machine goes into two states L1 and LR3 which is impossible. The problem is avoided by giving HAZ input a priority. Also we treat both LEFT and RIGHT asserted simultaneously as a Hazard request, since the driver is completely confused and requires help.
  • 8.
  • 9. The state diagram in now mutually exclusive State IDLE I/p comb- Transition Expressions inations L⋅R + H R⋅H ⋅L Le Ri Ha L⋅H ⋅R L+R+H 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0
  • 10. • The logical products for each pair of transition expression on arcs leaving IDLE state is zero. For the state IDLE Arcs leaving the state: 4 L ⋅ H ⋅ R , L ⋅ R + H , R ⋅ H ⋅ L, L + R + H Logical products to evaluate:4*3/2 = 6 All 6 products are zero. • For each state the logical sum of the transition expressions on all arcs leaving the state is one. • Hence the state diagram now is both mutually exclusive and all inclusive
  • 11. • In the new state diagram we notice that once the turn has been initiated the state diagram allows the cycle to run to completion even if HAZ is asserted. This may have a certain aesthetic appeal, however it would be safer to allow the machine to go into Hazard mode as soon as possible. • Hence the state diagram is modified as shown next.
  • 12.
  • 13. State Assignment • IDLE state of 000. • Q1 and Q0 are used to count in gray code sequence (IDLE→L1→L2→L3→IDLE) (IDLE→R1→R2→R3→IDLE). • Q2 identifies LEFT or RIGHT turn. • HAZ state of 100.
  • 14. • Next step – sort of transition table • In this case the transitions are specified by expressions rather than an exhaustive tabulation of next states Transition List
  • 15. Synthesis using transition List • Develop a set of transition equations that define the next state variable S* in terms of current state S and inputs • The transition list may be viewed as a sort of hybrid truth table in which the state-variable combinations for the current state are listed explicitly and input combinations are listed algebraically. • Reading down a S* column find a sequence of 0s and 1s indicating the value of S* for various state/input combinations. • A transition equation for a next state variable S* can be written using a sort of hybrid canonical sum. • S* = ∑ (transition p-term) Transition list rows where S* = 1
  • 16. Synthesis using transition List • Transition p-term is the product of the current states min-term and the transition expression. • The transition equation has one transition p-term for each row of the transition list that contains a ‘1’ in the S* column. • There is no guarantee that the transition equations obtained by this method are in any sense minimal. • The equations are not even in the standard POS or SOP forms • They only provide a starting point for whatever combinational design method one might choose to synthesize the excitation logic for the FSM
  • 17. Synthesis using transition List • Based on the transition list we get the following transition equations for Q2*, Q1* and Q0* ( ) Q 2* = Q 2 ⋅ Q1⋅ Q0 ( L ⋅ R + H ) + (Q 2 ⋅ Q1⋅ Q0 )( L ⋅ R ⋅ H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + ( Q 2 ⋅ Q1⋅ Q0)( H ) + ( Q 2 ⋅ Q1 ⋅ Q0) ( H ) ( ) Q 2* = Q 2 ⋅ Q1⋅ Q0 ( R + H ) ( ) + Q 2 ⋅ Q0 ( H ) + ( Q 2 ⋅ Q0)
  • 18. Synthesis using transition List ( )( ) ( Q1* = Q 2 ⋅ Q1 ⋅ Q0 H + Q 2 ⋅ Q1⋅ Q0 H )( ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + ( Q 2 ⋅ Q1⋅ Q0) ( H ) Q1* = Q0( H ) ( )( Q0* = Q 2 ⋅ Q1 ⋅ Q0 L ⋅ R ⋅ H ) + (Q 2 ⋅ Q1 ⋅ Q0)( L ⋅ R ⋅ H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) ( )( Q0* = Q 2 ⋅ Q1 ⋅ Q0 H ( L ⊕ R ) ) + (Q1⋅ Q0)( H )
  • 19. Excitation equations • On deriving the transition equations it is desirable to use the D flip flops as memory elements • The transition equation directly gives the excitation equation in this case • The excitation equations of other flip- flops are not so easy to derive • Majority of the PLD & ASIC based systems employ D flip flops.
  • 20. Variations in the scheme • If the column for a particular next state variable contains fewer 0s than 1s, it may be advantageous to write that variables transition equation in terms of 0s in its column S*= ∑ (transition p terms ) transition list rows where S *= 0 • That is S * = 1 for all the p terms for which S * = 0 • Thus a transition equation may be written for Q 2 * as the sum of 7 p-terms ( )( Q 2 * = Q 2 ⋅ Q1 ⋅ Q0 L + R + H ) + (Q 2 ⋅ Q1⋅ Q0 )( L ⋅ R ⋅ H ) + (Q 2 ⋅ Q1⋅ Q0 )( H ) + (Q 2 ⋅ Q1 ⋅ Q0 )( H ) + (Q 2 ⋅ Q1 ⋅ Q0)(1) + (Q 2 ⋅ Q1⋅ Q0 )(1) + (Q 2 ⋅ Q1 ⋅ Q0)(1)
  • 21. Variations in the scheme ( ) ( Q 2 * = Q 2 ⋅ Q1 ⋅ Q0 ⋅ H ⋅ R + Q 2 ⋅ Q0 ⋅ H ) ( ) ( + Q1⋅ Q0 + Q 2 ⋅ Q0 ) • To obtain an expression for Q 2 * we simply complement both sides of the reduced equation • To obtain an expression for a next state variable V * directly, using the 0s in the transition list, we can complement the right hand side of the general V * equation using DeMorgan’s theorem, obtaining a sort of hybrid canonical product V* = ∏ (transition s terms) transition list rows where V *= 0 •Transition s-term is the sum of the current states max-term and the complement of the transition expression.
  • 22. Unused states • In this problem there were no unused states • However, in case there are some unused states in the problem then they do not reflect in the transition list • They are treated as don’t care in a very limited sense • While writing equations for S*, the sum of p-terms for rows that had an explicit 1 in the corresponding column were taken • Although we don’t consider the unused states, the procedure implicitly treats them as if they had 0s in the corresponding column • Conversely for S * the procedure implicitly treats unused states as if they had 1s in the corresponding column
  • 23. Output-Coded state assignment • The machines outputs are a function of state only • A different output combination is produced in each named state • We can use the outputs as state variables and assign each named state to the required output combination • This sort of assignment is termed as output-coded state assignment • Sometimes results in excitation equations that are simpler than the set of excitation and output equations obtained with a state assignment using minimum number of state variables • It saves cost in a PLD based design since fewer PLD macrocells or outputs are needed overall • Current State| Transition Exp| Next State
  • 24. Decomposing State Machines • Just like large programs being decomposed into procedures or subroutines, large state-machine problems are often solved with a collection of smaller state machines • The original design problem is put into a natural hierarchical structure, so that the functions and uses of the sub-machines are obvious, making it unnecessary even to write a state table for the sub-machine • The most commonly used sub-machine is a counter. The main machine usually STARTS the counter when it wishes to stay in a particular main state for n counts • The counter counts the n counts and sends a DONE signal when the count is completed
  • 25. Decomposing State Machines • The main machine is designed to wait in the same state till it receives the DONE signal from the sub-machine • This adds an extra output and input to the main machine (START and DONE) but saves n -1 states • The simplest type of decomposition is shown in figure • The Main machine provides the primary inputs and outputs and executes the top level control algorithm. • The sub-machines perform the lower level functions under the control of the main machine and may also optionally handle some of the primary inputs and outputs
  • 26. Decomposing State Machines Inputs Outputs Sub Machine Start 1 1 Done 1 Main Machine Start 2 Sub Done 2 Machine 2 Typical hierarchical state-machine structure