SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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.
Designing State Machine
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.
Designing State Machine
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

Weitere ähnliche Inhalte

Was ist angesagt?

Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderBharti Airtel Ltd.
 
MASTER SLAVE JK FLIP FLOP & T FLIP FLOP
MASTER SLAVE JK FLIP FLOP & T FLIP FLOPMASTER SLAVE JK FLIP FLOP & T FLIP FLOP
MASTER SLAVE JK FLIP FLOP & T FLIP FLOPSmit Shah
 
Z transforms and their applications
Z transforms and their applicationsZ transforms and their applications
Z transforms and their applicationsRam Kumar K R
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED CAman Sharma
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsVinoth Loganathan
 
Asynchronous sequential circuit analysis
Asynchronous sequential circuit analysisAsynchronous sequential circuit analysis
Asynchronous sequential circuit analysisDr Naim R Kidwai
 
Finite state machines
Finite state machinesFinite state machines
Finite state machinesdennis gookyi
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transformMOHAMMAD AKRAM
 
discrete time signals and systems
 discrete time signals and systems  discrete time signals and systems
discrete time signals and systems Zlatan Ahmadovic
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clockMantra VLSI
 
3.Frequency Domain Representation of Signals and Systems
3.Frequency Domain Representation of Signals and Systems3.Frequency Domain Representation of Signals and Systems
3.Frequency Domain Representation of Signals and SystemsINDIAN NAVY
 
Types of flip flops ppt
Types of flip flops pptTypes of flip flops ppt
Types of flip flops pptViraj Shah
 
Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Alamgir Hossain
 

Was ist angesagt? (20)

Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and Encoder
 
Conversion of flip flop
Conversion of flip flopConversion of flip flop
Conversion of flip flop
 
MASTER SLAVE JK FLIP FLOP & T FLIP FLOP
MASTER SLAVE JK FLIP FLOP & T FLIP FLOPMASTER SLAVE JK FLIP FLOP & T FLIP FLOP
MASTER SLAVE JK FLIP FLOP & T FLIP FLOP
 
Z transform
 Z transform Z transform
Z transform
 
Z transforms and their applications
Z transforms and their applicationsZ transforms and their applications
Z transforms and their applications
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
Switch level modeling
Switch level modelingSwitch level modeling
Switch level modeling
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Asynchronous sequential circuit analysis
Asynchronous sequential circuit analysisAsynchronous sequential circuit analysis
Asynchronous sequential circuit analysis
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
Dif fft
Dif fftDif fft
Dif fft
 
Flip flop
Flip flopFlip flop
Flip flop
 
discrete time signals and systems
 discrete time signals and systems  discrete time signals and systems
discrete time signals and systems
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
3.Frequency Domain Representation of Signals and Systems
3.Frequency Domain Representation of Signals and Systems3.Frequency Domain Representation of Signals and Systems
3.Frequency Domain Representation of Signals and Systems
 
Types of flip flops ppt
Types of flip flops pptTypes of flip flops ppt
Types of flip flops ppt
 
Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report
 

Andere mochten auch

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
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machinescodeofficer
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and SynthesisAbhilash Nair
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineAbhilash Nair
 
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
UNIT-II  : SEQUENTIAL CIRCUIT DESIGN UNIT-II  : SEQUENTIAL CIRCUIT DESIGN
UNIT-II : SEQUENTIAL CIRCUIT DESIGN Dr.YNM
 
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 designAdarsh Patel
 

Andere mochten auch (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
 
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
 
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
UNIT-II  : SEQUENTIAL CIRCUIT DESIGN UNIT-II  : SEQUENTIAL CIRCUIT DESIGN
UNIT-II : SEQUENTIAL CIRCUIT DESIGN
 
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
 

Ähnlich wie 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).pdfrdjo
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential CircuitHeman Pathak
 
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.pptxMohammedAdnankhan4
 
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
 
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 modelsJyoti Singh
 
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxSequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxAhmedAlAfandi5
 
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.pptxProfVilasShamraoPati
 
4.3 related rates
4.3 related rates4.3 related rates
4.3 related ratesmath265
 
Sequentialcircuits
SequentialcircuitsSequentialcircuits
SequentialcircuitsRaghu 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 circuitRai University
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformNimithaSoman
 

Ähnlich wie 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
 
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
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transform
 

Mehr von Abhilash Nair

Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsAbhilash Nair
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)Abhilash Nair
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Abhilash Nair
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design processAbhilash 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 modelsAbhilash 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
 

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

Kürzlich hochgeladen

CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfTechSoup
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 

Kürzlich hochgeladen (20)

CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.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.
  • 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.
  • 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