SlideShare uma empresa Scribd logo
1 de 29
Analysis: Example 2 - New State Machine
  • This is now a Moore machine
    – output MAXS depends only on state (Q0 and Q1)

                                            MAXS



                                         MAXS = Q0 ⋅ Q1




                                                      1
Analysis: Example 2 - New Table/Diagram
  • Updated State/Output Table & Diagram
    – Moore machine state diagram




                  output associated with state, not transition
                                                                 2
Analysis: Example 2 - Timing Diagram
• Timing Diagram for State Machine
  – Compare outputs MAX and MAXS for the Mealy
    and Moore machine implementations




                                                 3
Conversion of Models
 • Mealy to Moore machine
     – If all the transitions in a Mealy model to a particular state are
       associated with the same output then in the corresponding
       Moore model that output becomes the state output.

T1                                      T1
       1/0                                      1

T2 1/0               1/0                T2 1         A      1       B
              A             B
                                                     0              0
                     0/1                                     0
       0/0                                      0
T3                         T4           T3                       T4
             Mealy                                  Moore
Conversion of Models
• Mealy to Moore machine
     – If the outputs of all the transitions in a Mealy model to a
       particular state are not the same, then in the corresponding
       Moore model we need to insert intermediate states

T1                                     T1                     T4
        1/0                                   1           0

T2 0/0                1/0              T2 0        A0              B
                                                          1
               A             B
                                                   0               0
                      0/1
        1/1
T3                          T4                     A1     1
                                       T3     1
              Mealy                                1      0
                                                  Moore        T4
Conversion of Models
• Moore to Mealy machine
     – If the state transition from two different states of the same
       input leads to common state then one state can be eliminated

T1                                     T1
         1                                    1/0

T2 0         A0            B           T2 0/0               1/0
                    1                               A             B
             0             0

                                              1/1
         1    A1    1                  T3
T3
              1

              Moore                                 Mealy
Conversion of Models
• Moore to Mealy machine
     – If the state transition from two different states of the same
       input does not lead to the same state, then state output
       becomes the output corresponding to each input transition of
       that state
T1                                      T1
         1                                    1/0

T2            A               B         T2 0/0              0/0
        0            0                              A             B
              0               0
         1           1                        1/0           1/1
                          C             T3
T3                                                                C
             Moore        1                         Mealy
Analysis: Example 3 - State Machine
X Y   Q0 Q1      J0 = X·Y'
                 K0 = X·Y' + Y·Q1
       Q0' Q1'
                                J0             Q0
                                       J   Q

                               K0      K   Q




                                      J1 = X·Q0 + Y
                                J1             Q1
                                       J   Q
                               K1
                                       K   Q
                                                                            Z
                                Clk




                   K1 = Y·Q0' + X·Y'·Q0               Z = X·Q0·Q1 + Q0'·Q1'·Y
1. Determine the excitation equations for the flip flop inputs

         J 0 = X ⋅Y ′                               J 1 = X ⋅ Q0 + Y
         K 0 = X ⋅ Y ′ + Y ⋅ Q1                     K1 = Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q0

    2. Substitute the excitation equations into the flip flop
       characteristic equations to obtain transition equations.
           Q0* = J 0 ⋅ Q0′ + K 0′Q 0
                                                    characteristic equations
           Q1* = J 1 ⋅ Q1′ + K1′Q1

                                             ′
Q 0* = ( X ⋅ Y ′) ⋅ Q0′ + ( X ⋅ Y ′ + Y ⋅ Q1) Q 0          transition equations
                                                        ′
Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1′ + ( Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q 0 ) Q1
Simplifying the transition equations
    Q0* = ( X ⋅ Y ′) ⋅ Q0′ + ( X ⋅ Y ′ + Y ⋅ Q1) ′ Q 0

   Q 0* = ( X ⋅ Y ) ⋅ Q0 + ( ( X ⋅ Y ) + ( Y ⋅ Q1) ) ⋅ Q0

                           (                   )
   Q0* = X ⋅ Y ⋅ Q 0 + ( X ⋅ Y ) ⋅ ( Y ⋅ Q1) ⋅ Q0

                               (     )(
    Q0* = X ⋅ Y ⋅ Q0 + X + Y ⋅ Y + Q1 ⋅ Q0  ))
    Q0* = X ⋅ Y ⋅ Q0 + ( ( X + Y ) ⋅ (Y + Q1) ) ⋅ Q0

    Q0* = X ⋅ Y ⋅ Q0 + ( X ⋅ Y + X ⋅ Q1 + Y ⋅ Y + Y ⋅ Q1) ⋅ Q0

    Q 0* = X ⋅ Y ′ ⋅ Q 0′ + X ′ ⋅ Y ′ ⋅ Q0 + X ′ ⋅ Q0 ⋅ Q1′ + Y ⋅ Q0 ⋅ Q1′
Simplifying the transition equations
      Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1′ + ( Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q 0 ) ′ Q1
                                   ((    ) (
     Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1 + Y ⋅ Q0 + X ⋅ Y ⋅ Q0 ⋅ Q1 ))
     Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + ( Y ⋅ Q0 ) ⋅ ( X ⋅ Y ⋅ Q0 ) ) ⋅ Q1
                                    (         )(
   Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + Y + Q0 ⋅ X + Y + Q0 ⋅ Q1       )
                                    ((        )(
   Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + Y + Q0 ⋅ X + Y + Q0 ⋅ Q1       ))
                            (
 Q1* = XQ0Q1 + Y Q1 + X Y + Y Y + Y Q0 + X Q 0 + YQ0 + Q0Q0 ⋅ Q1       )
               Q1* = X ⋅ Q0 ⋅ Q1′ + Y ⋅ Q1′ + X ′ ⋅ Y ′ ⋅ Q1
               + Y ′ ⋅ Q 0′ ⋅ Q1 + X ′ ⋅ Q0 ⋅ Q1 + Y ⋅ Q0 ⋅ Q1
3. Determine the output equations.
       Z = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q0′ ⋅ Q1′          output equation
4. Use transition equations and output equations to construct
   transition/output table.
                        Transition/output table
          State                   Input XY

          Q1Q0     00        01        10         11

          00       00,0      10,1      01,0       10,1

          01       01,0      11,0      10,0       11,0

          10       10,0      00,0      11,0       00,0

          11       11,0      10,0      00,1       10,1

                          Next State Q1*Q0*, Z
6. Name the states and substitute state names for state –
    variable combinations in the transition/output table to obtain
    the state/output table.
                                   State/output table
Substituting the
state names as ‘A’    State                   Input XY
for Q1Q0 = 00,
‘B’ for Q1Q0 = 01,    S        00       01        10       11
‘C’ for Q1Q0 = 10,
‘D’ for Q1Q0 = 11.    A        A,0      C,1       B,0      C,1
S is current state
& S* is next state.   B        B,0      D,0       C,0      D,0

                      C        C,0      A,0       D,0      A,0

                      D        D,0      C,0       A,1      C,1

                                     Next State S*, Z
State diagram


                            10/0
00/0          A                              B          00/0
                  01,11/1          01,11/0


       10/1                                      10/0
                            01,11/0

                             11/1
00/0          D                              C           00/0
                              01/0

                             10/0
Synchronous Design Process
1. Construct a state diagram and/or state/output
   table corresponding to the word description or
   specification
2. Minimize the number of states
3. Choose a set of state variables and assign
   state variable combinations to the named
   states
4. Obtain the transition/output table
5. Determine the number of flip-flops and select
   the type of flip-flop to be used (D is often the
   default)
6. Construct the excitation table
7. Derive excitation equations
8. Derive output equations                          15
Design a clocked synchronous state machine
which accepts two serial strings of digits of
arbitrary length, starting with LSB and
produces the sum and carry of the two bit
streams as its output. The input bit streams
could come from two shift registers clocked
simultaneously .
Assuming Mealy machine design
Let the inputs be X and Y

Let the outputs be S and C
Obtaining the state Diagram
  Assume initial condition to be SC = 00
  Let the state be represented by state A
  If XY = 00, then output SC = 00, Same
  state A
       = 01, then output SC = 10, goes to
  state B
XY/SC = 10, then output SC = 10, goes to
  state B            01,10/10
 00/00      A                    B
       = 11, then output SC = 01, goes to
  state C
       11/01


               C
Obtaining the state Diagram
  Assume machine has moved to state B
  If XY = 00, then output SC = 00, goes to
  state A
       = 01, then output SC = 10, same state
  B
       = 10, then output SC = 10, same state
XY/SC
  B
                      01,10/10
       = 11, then output SC = 01, goes to
 00/00      A                   B     01,10/10
  state C        00/00

       11/01       11/01


               C
Obtaining the state Diagram
  Assume machine has moved to state C
  If XY = 00, then output SC = 10, goes to
  state B
       = 01, then output SC = 01, same state
  C
       = 10, then output SC = 01, same state
XY/SC
  C
                      01,10/10
       = 11, then output SC = 11, goes to
 00/00      A                   B     01,10/10
  state D        00/00

           11/01         11/01

                       00/10     11/11
01,10/01           C                     D
Obtaining the state Diagram
  Assume machine has moved to state D
  If XY = 00, then output SC = 10, goes to
  state B
       = 01, then output SC = 01, goes to
  state C
XY/SC = 10, then output SC = 01, goes to
                      01,10/10
  state C                              01,10/10
 00/00      A                   B
                 00/00
       = 11, then output SC = 11, same state
  D               11/01
           11/01                           00/10

                       00/10   11/11               11/11
01,10/01           C                   D
                          01,10/01
Obtaining the state/output table
                    State/output table
       State                 Input XY

       S       00       01       10       11

       A       A,00     B,10     B,10     C,01

       B       A,00     B,10     B,10     C,01

       C       B,10     C,01     C,01     D,11

       D       B,10     C,01     C,01     D,11

                      Next State S*, SC
Equivalent States
Two states are equivalent if it is impossible to
distinguish them by observing only the current
and future outputs of the machine .

A pair of equivalent states can be replaced by a
single state.

Two states S1 and S2 are equivalent if two
conditions are true.
1. S1 and S2 must produce the same values at
the state machine output(s) for all input
combinations.
2. For each input combination S1 and S2 must
State Minimization

Equivalen             State/output table
t states State                 Input XY

          S      00       01       10       11

          A      A,00     B,10     B,10     C,01

          B      A,00     B,10     B,10     C,01

          C      B,10     C,01     C,01     D,11

          D      B,10     C,01     C,01     D,11

                        Next State S*, SC
Equivalent states
Minimized state/output table & state diagram
                State/output table
        State                     Input XY

        S           00       01       10         11

        A           A,00     A,10     A,10       D,01

        D           A,10     D,01     D,01       D,11


                           Next State S*, SC

00/00                                                   01/01
                             11/01
01/10                                                   10/01
                A                            D
10/10                                                   11/11
                             00/10

                         State diagram
Assigning state variable to obtain
transition/output table
               Transition/output table
         State                   Input XY

         Q       00       01         10     11

         0       0,00     0,10       0,10   1,01

         1       0,10     1,01       1,01   1,11


                        Next State Q*, SC

Encoding A = 0 and D = 1
Choosing D type flip flop
Constructing the excitation table

                 Excitation/output table
         State                 Input XY

         Q       00     01         10     11

         0       0,00   0,10       0,10   1,01

         1       0,10   1,01       1,01   1,11

                                D, SC
Transferring onto K-maps to derive excitation &
output equations     Excitation/output table
                        State                   Input XY

                        Q         00     01         10     11

                        0         0,00   0,10       0,10   1,01

                        1         0,10   1,01       1,01   1,11


 State   Input XY                               D, SC

 Q       00 01 11 10
                                D = X· Y + X · Q +Y · Q
 0       0    0     1       0
                                C = X· Y + X · Q +Y · Q
 1       0    1     1       1
Transferring onto K-maps to derive excitation &
output equations     Excitation/output table
                        State                   Input XY

                        Q       00       01         10     11

                        0       0,00     0,10       0,10   1,01

                        1       0,10     1,01       1,01   1,11


 State   Input XY                               D, SC

 Q       00 01 11 10            S = X ⋅Y ⋅ Q + X ⋅Y ⋅ Q
 0       0    1     0       1   + X ⋅Y ⋅ Q + X ⋅Y ⋅ Q
 1       1    0     1       0   S = X ⊕Y ⊕Q
Circuit (logic) diagram
D = X· Y + X · Q +Y · Q             excitation equation

  S = X ⊕ Y ⊕ Q C = X· Y + X · Q +Y · Qoutput equations


           X Y Q
                                              C

                                              S




                             D Q

                                Q

     Clk

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of 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
 
Mealy state machine
Mealy state machineMealy state machine
Mealy state machine
 
Meley & moore
Meley & mooreMeley & moore
Meley & moore
 
Lec 25 26_27
Lec 25 26_27Lec 25 26_27
Lec 25 26_27
 
Mealy moore machine model
Mealy moore machine modelMealy moore machine model
Mealy moore machine model
 
Finite State Machines
Finite State Machines Finite State Machines
Finite State Machines
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
1 introduction1
1 introduction11 introduction1
1 introduction1
 
Lect20 Engin112
Lect20 Engin112Lect20 Engin112
Lect20 Engin112
 
lecture 1 content
lecture 1 contentlecture 1 content
lecture 1 content
 
95414579 flip-flop
95414579 flip-flop95414579 flip-flop
95414579 flip-flop
 
Admissions in india 2015
Admissions in india 2015Admissions in india 2015
Admissions in india 2015
 
Detecting Drug Effects in the Brain
Detecting Drug Effects in the BrainDetecting Drug Effects in the Brain
Detecting Drug Effects in the Brain
 
Slides euria-2
Slides euria-2Slides euria-2
Slides euria-2
 
Ch15p
Ch15pCh15p
Ch15p
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Ppt tls
Ppt tlsPpt tls
Ppt tls
 
X2 T07 05 conical pendulum
X2 T07 05 conical pendulumX2 T07 05 conical pendulum
X2 T07 05 conical pendulum
 

Destaque (20)

CPLDs
CPLDsCPLDs
CPLDs
 
Introduction state machine
Introduction state machineIntroduction state machine
Introduction state machine
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
 
VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
 
Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip Flops
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift Registers
 
Chapter 5 counter
Chapter 5 counterChapter 5 counter
Chapter 5 counter
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
FPLDs
FPLDsFPLDs
FPLDs
 
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
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
CPLDs
CPLDsCPLDs
CPLDs
 
Study of vlsi design methodologies and limitations using cad tools for cmos t...
Study of vlsi design methodologies and limitations using cad tools for cmos t...Study of vlsi design methodologies and limitations using cad tools for cmos t...
Study of vlsi design methodologies and limitations using cad tools for cmos t...
 
VHDL
VHDLVHDL
VHDL
 
Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)
 
mạch tổ hợp và mạch trình tự - Điện tử Đo lường
mạch tổ hợp và mạch trình tự - Điện tử Đo lườngmạch tổ hợp và mạch trình tự - Điện tử Đo lường
mạch tổ hợp và mạch trình tự - Điện tử Đo lường
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLD & FPLD
CPLD & FPLDCPLD & FPLD
CPLD & FPLD
 
Vlsi design
Vlsi designVlsi design
Vlsi design
 

Mais de Abhilash Nair

Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential CircuitsAbhilash Nair
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State MachineAbhilash 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
 
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
 
Trends Of Televisions
Trends Of TelevisionsTrends Of Televisions
Trends Of TelevisionsAbhilash Nair
 

Mais de Abhilash Nair (14)

Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State Machine
 
Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)
 
FPGA
FPGAFPGA
FPGA
 
Static and Dynamic Read/Write memories
Static and Dynamic Read/Write memoriesStatic and Dynamic Read/Write memories
Static and Dynamic Read/Write memories
 
Documentation Standards of an IC
Documentation Standards of an ICDocumentation Standards of an IC
Documentation Standards of an IC
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
MSI Counters
MSI CountersMSI Counters
MSI Counters
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROM
 
Counters
CountersCounters
Counters
 
Trends Of Televisions
Trends Of TelevisionsTrends Of Televisions
Trends Of Televisions
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Vectors in Java
Vectors in JavaVectors in Java
Vectors in Java
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 

Último

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Último (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Analysis of state machines & Conversion of models

  • 1. Analysis: Example 2 - New State Machine • This is now a Moore machine – output MAXS depends only on state (Q0 and Q1) MAXS MAXS = Q0 ⋅ Q1 1
  • 2. Analysis: Example 2 - New Table/Diagram • Updated State/Output Table & Diagram – Moore machine state diagram output associated with state, not transition 2
  • 3. Analysis: Example 2 - Timing Diagram • Timing Diagram for State Machine – Compare outputs MAX and MAXS for the Mealy and Moore machine implementations 3
  • 4. Conversion of Models • Mealy to Moore machine – If all the transitions in a Mealy model to a particular state are associated with the same output then in the corresponding Moore model that output becomes the state output. T1 T1 1/0 1 T2 1/0 1/0 T2 1 A 1 B A B 0 0 0/1 0 0/0 0 T3 T4 T3 T4 Mealy Moore
  • 5. Conversion of Models • Mealy to Moore machine – If the outputs of all the transitions in a Mealy model to a particular state are not the same, then in the corresponding Moore model we need to insert intermediate states T1 T1 T4 1/0 1 0 T2 0/0 1/0 T2 0 A0 B 1 A B 0 0 0/1 1/1 T3 T4 A1 1 T3 1 Mealy 1 0 Moore T4
  • 6. Conversion of Models • Moore to Mealy machine – If the state transition from two different states of the same input leads to common state then one state can be eliminated T1 T1 1 1/0 T2 0 A0 B T2 0/0 1/0 1 A B 0 0 1/1 1 A1 1 T3 T3 1 Moore Mealy
  • 7. Conversion of Models • Moore to Mealy machine – If the state transition from two different states of the same input does not lead to the same state, then state output becomes the output corresponding to each input transition of that state T1 T1 1 1/0 T2 A B T2 0/0 0/0 0 0 A B 0 0 1 1 1/0 1/1 C T3 T3 C Moore 1 Mealy
  • 8. Analysis: Example 3 - State Machine X Y Q0 Q1 J0 = X·Y' K0 = X·Y' + Y·Q1 Q0' Q1' J0 Q0 J Q K0 K Q J1 = X·Q0 + Y J1 Q1 J Q K1 K Q Z Clk K1 = Y·Q0' + X·Y'·Q0 Z = X·Q0·Q1 + Q0'·Q1'·Y
  • 9. 1. Determine the excitation equations for the flip flop inputs J 0 = X ⋅Y ′ J 1 = X ⋅ Q0 + Y K 0 = X ⋅ Y ′ + Y ⋅ Q1 K1 = Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q0 2. Substitute the excitation equations into the flip flop characteristic equations to obtain transition equations. Q0* = J 0 ⋅ Q0′ + K 0′Q 0 characteristic equations Q1* = J 1 ⋅ Q1′ + K1′Q1 ′ Q 0* = ( X ⋅ Y ′) ⋅ Q0′ + ( X ⋅ Y ′ + Y ⋅ Q1) Q 0 transition equations ′ Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1′ + ( Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q 0 ) Q1
  • 10. Simplifying the transition equations Q0* = ( X ⋅ Y ′) ⋅ Q0′ + ( X ⋅ Y ′ + Y ⋅ Q1) ′ Q 0 Q 0* = ( X ⋅ Y ) ⋅ Q0 + ( ( X ⋅ Y ) + ( Y ⋅ Q1) ) ⋅ Q0 ( ) Q0* = X ⋅ Y ⋅ Q 0 + ( X ⋅ Y ) ⋅ ( Y ⋅ Q1) ⋅ Q0 ( )( Q0* = X ⋅ Y ⋅ Q0 + X + Y ⋅ Y + Q1 ⋅ Q0 )) Q0* = X ⋅ Y ⋅ Q0 + ( ( X + Y ) ⋅ (Y + Q1) ) ⋅ Q0 Q0* = X ⋅ Y ⋅ Q0 + ( X ⋅ Y + X ⋅ Q1 + Y ⋅ Y + Y ⋅ Q1) ⋅ Q0 Q 0* = X ⋅ Y ′ ⋅ Q 0′ + X ′ ⋅ Y ′ ⋅ Q0 + X ′ ⋅ Q0 ⋅ Q1′ + Y ⋅ Q0 ⋅ Q1′
  • 11. Simplifying the transition equations Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1′ + ( Y ⋅ Q0′ + X ⋅ Y ′ ⋅ Q 0 ) ′ Q1 (( ) ( Q1* = ( X ⋅ Q0 + Y ) ⋅ Q1 + Y ⋅ Q0 + X ⋅ Y ⋅ Q0 ⋅ Q1 )) Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + ( Y ⋅ Q0 ) ⋅ ( X ⋅ Y ⋅ Q0 ) ) ⋅ Q1 ( )( Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + Y + Q0 ⋅ X + Y + Q0 ⋅ Q1 ) (( )( Q1* = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q1 + Y + Q0 ⋅ X + Y + Q0 ⋅ Q1 )) ( Q1* = XQ0Q1 + Y Q1 + X Y + Y Y + Y Q0 + X Q 0 + YQ0 + Q0Q0 ⋅ Q1 ) Q1* = X ⋅ Q0 ⋅ Q1′ + Y ⋅ Q1′ + X ′ ⋅ Y ′ ⋅ Q1 + Y ′ ⋅ Q 0′ ⋅ Q1 + X ′ ⋅ Q0 ⋅ Q1 + Y ⋅ Q0 ⋅ Q1 3. Determine the output equations. Z = X ⋅ Q0 ⋅ Q1 + Y ⋅ Q0′ ⋅ Q1′ output equation
  • 12. 4. Use transition equations and output equations to construct transition/output table. Transition/output table State Input XY Q1Q0 00 01 10 11 00 00,0 10,1 01,0 10,1 01 01,0 11,0 10,0 11,0 10 10,0 00,0 11,0 00,0 11 11,0 10,0 00,1 10,1 Next State Q1*Q0*, Z
  • 13. 6. Name the states and substitute state names for state – variable combinations in the transition/output table to obtain the state/output table. State/output table Substituting the state names as ‘A’ State Input XY for Q1Q0 = 00, ‘B’ for Q1Q0 = 01, S 00 01 10 11 ‘C’ for Q1Q0 = 10, ‘D’ for Q1Q0 = 11. A A,0 C,1 B,0 C,1 S is current state & S* is next state. B B,0 D,0 C,0 D,0 C C,0 A,0 D,0 A,0 D D,0 C,0 A,1 C,1 Next State S*, Z
  • 14. State diagram 10/0 00/0 A B 00/0 01,11/1 01,11/0 10/1 10/0 01,11/0 11/1 00/0 D C 00/0 01/0 10/0
  • 15. Synchronous Design Process 1. Construct a state diagram and/or state/output table corresponding to the word description or specification 2. Minimize the number of states 3. Choose a set of state variables and assign state variable combinations to the named states 4. Obtain the transition/output table 5. Determine the number of flip-flops and select the type of flip-flop to be used (D is often the default) 6. Construct the excitation table 7. Derive excitation equations 8. Derive output equations 15
  • 16. Design a clocked synchronous state machine which accepts two serial strings of digits of arbitrary length, starting with LSB and produces the sum and carry of the two bit streams as its output. The input bit streams could come from two shift registers clocked simultaneously . Assuming Mealy machine design Let the inputs be X and Y Let the outputs be S and C
  • 17. Obtaining the state Diagram Assume initial condition to be SC = 00 Let the state be represented by state A If XY = 00, then output SC = 00, Same state A = 01, then output SC = 10, goes to state B XY/SC = 10, then output SC = 10, goes to state B 01,10/10 00/00 A B = 11, then output SC = 01, goes to state C 11/01 C
  • 18. Obtaining the state Diagram Assume machine has moved to state B If XY = 00, then output SC = 00, goes to state A = 01, then output SC = 10, same state B = 10, then output SC = 10, same state XY/SC B 01,10/10 = 11, then output SC = 01, goes to 00/00 A B 01,10/10 state C 00/00 11/01 11/01 C
  • 19. Obtaining the state Diagram Assume machine has moved to state C If XY = 00, then output SC = 10, goes to state B = 01, then output SC = 01, same state C = 10, then output SC = 01, same state XY/SC C 01,10/10 = 11, then output SC = 11, goes to 00/00 A B 01,10/10 state D 00/00 11/01 11/01 00/10 11/11 01,10/01 C D
  • 20. Obtaining the state Diagram Assume machine has moved to state D If XY = 00, then output SC = 10, goes to state B = 01, then output SC = 01, goes to state C XY/SC = 10, then output SC = 01, goes to 01,10/10 state C 01,10/10 00/00 A B 00/00 = 11, then output SC = 11, same state D 11/01 11/01 00/10 00/10 11/11 11/11 01,10/01 C D 01,10/01
  • 21. Obtaining the state/output table State/output table State Input XY S 00 01 10 11 A A,00 B,10 B,10 C,01 B A,00 B,10 B,10 C,01 C B,10 C,01 C,01 D,11 D B,10 C,01 C,01 D,11 Next State S*, SC
  • 22. Equivalent States Two states are equivalent if it is impossible to distinguish them by observing only the current and future outputs of the machine . A pair of equivalent states can be replaced by a single state. Two states S1 and S2 are equivalent if two conditions are true. 1. S1 and S2 must produce the same values at the state machine output(s) for all input combinations. 2. For each input combination S1 and S2 must
  • 23. State Minimization Equivalen State/output table t states State Input XY S 00 01 10 11 A A,00 B,10 B,10 C,01 B A,00 B,10 B,10 C,01 C B,10 C,01 C,01 D,11 D B,10 C,01 C,01 D,11 Next State S*, SC Equivalent states
  • 24. Minimized state/output table & state diagram State/output table State Input XY S 00 01 10 11 A A,00 A,10 A,10 D,01 D A,10 D,01 D,01 D,11 Next State S*, SC 00/00 01/01 11/01 01/10 10/01 A D 10/10 11/11 00/10 State diagram
  • 25. Assigning state variable to obtain transition/output table Transition/output table State Input XY Q 00 01 10 11 0 0,00 0,10 0,10 1,01 1 0,10 1,01 1,01 1,11 Next State Q*, SC Encoding A = 0 and D = 1 Choosing D type flip flop
  • 26. Constructing the excitation table Excitation/output table State Input XY Q 00 01 10 11 0 0,00 0,10 0,10 1,01 1 0,10 1,01 1,01 1,11 D, SC
  • 27. Transferring onto K-maps to derive excitation & output equations Excitation/output table State Input XY Q 00 01 10 11 0 0,00 0,10 0,10 1,01 1 0,10 1,01 1,01 1,11 State Input XY D, SC Q 00 01 11 10 D = X· Y + X · Q +Y · Q 0 0 0 1 0 C = X· Y + X · Q +Y · Q 1 0 1 1 1
  • 28. Transferring onto K-maps to derive excitation & output equations Excitation/output table State Input XY Q 00 01 10 11 0 0,00 0,10 0,10 1,01 1 0,10 1,01 1,01 1,11 State Input XY D, SC Q 00 01 11 10 S = X ⋅Y ⋅ Q + X ⋅Y ⋅ Q 0 0 1 0 1 + X ⋅Y ⋅ Q + X ⋅Y ⋅ Q 1 1 0 1 0 S = X ⊕Y ⊕Q
  • 29. Circuit (logic) diagram D = X· Y + X · Q +Y · Q excitation equation S = X ⊕ Y ⊕ Q C = X· Y + X · Q +Y · Qoutput equations X Y Q C S D Q Q Clk