Mc Quine Multiple Output

download Mc Quine Multiple Output

of 27

Transcript of Mc Quine Multiple Output

  • 8/4/2019 Mc Quine Multiple Output

    1/27

    2-Level Minimization

    Classic Problem in Switching Theory Tabulation Method Transformed to Set

    Covering Problem

    Set Covering Problem is Intractable

    n-input Function Can Have 3n/n Prime

    Implicants

    n-input Function Can Have 2n Minterms

    Exponentially Complex Algorithms for Exact

    Solutions

    NOTE: Sometimes the Covering Problem is Easy to Solve (when

    no cyclic tables result)

  • 8/4/2019 Mc Quine Multiple Output

    2/27

    Heuristic Branch and Bound

    Quine-McCluskey Method is Tabulation Method Using a Branch and

    Bound Algorithm with Heuristic in Branch Operation for Solution of theCyclic Cover

    Branch and Bound Approaches

    BRANCH STEP

    Reduce, HALT if not Cyclic Cover Heuristically Choose a PI

    Solve Cyclic Cover in Two Ways

    1) Assume Chosen PI is in the Final Cover Set

    2) Assume Chosen PI is not in the Final Cover Set

    3) Select Between 1) and 2) Depending on Minimal Cost

    BOUND STEP

    If Current Solution is Better Than Previous, Return from this Level ofRecursion (Note: Initially Set to Entire Set of PIs in Table)

    Go to Branching Step

  • 8/4/2019 Mc Quine Multiple Output

    3/27

    Branch and Bound Diagram

    Cyclic

    Cover 1

    Cyclic

    Cover 2

    Cyclic

    Cover 3

    CC3

    Solution 1CC3

    Solution 2

    Initial CC1 Soln is All PIs

    Heuristically Choose a

    PI Reduce to CC2

    Initial CC2 Soln is All PIs

    Heuristically Choose aPI Reduce to CC3

    Initial CC3 Soln is All PIs

    Heuristically Choose a

    PI1 Reduce to CC3Heuristically Choose a

    PI2 Reduce to CC3

    Soln 1 Fully Reduced Equal to All PIs in CC3 No Bounding

    Soln 2 Better CC3 Entire

    Set and Fully Reduced

  • 8/4/2019 Mc Quine Multiple Output

    4/27

    Choosing Candidate PIs

    Choose PI With Fewest Literals

    That is, One that Covers the most Minterms

    Select One that Covers a Minterm Covered byVery Few Other Minterms

    Note if Minterm Covered by Single PI, it is EPI

    This Technique Chooses One that is Almost an EPI

    Independent Set Heuristic

  • 8/4/2019 Mc Quine Multiple Output

    5/27

    Independent Set Heuristic

    Find Maximum Set of Independent Rows in Cover Matrix

    Partition Matrix as Shown

    1 1 1

    1 1 1 1

    1 11 1

    0

    CA

    Iis Sub-Matrix of Independent Rows

    I = {I1, I2, I3, ...}

    1) Choose PI inIthat Covers Most Rows inA

    2) Reduce Matrix Using New EPI Selection and Dominance

    3) If Matrix is 00 Solution is Found Else Go To 1)

  • 8/4/2019 Mc Quine Multiple Output

    6/27

    Exact Method Petricks Method

    When Cyclic Cover Table is Found use Covering

    Clauses in POS Form

    Each Product Corresponds to Minterm

    Transform the POS to SOP

    Product Terms Represent Selected Primes

    Minimum Cover Identified by Product with Fewest

    Literals

    Finds ALL Solutions to the Cyclic Cover

  • 8/4/2019 Mc Quine Multiple Output

    7/27

    Petricks Method Example

    Write Clauses as a POS Expression:

    ( )( )( )( )( ) 1A D A B B C C D B D+ + + + + =

    We Solve this Equation

  • 8/4/2019 Mc Quine Multiple Output

    8/27

    Solving the Satisfying Clause

    It is Easy to Find a Satisfying Argument for a SOP Expression Classic Petricks Method Transforms POS to SOP

    ( )( )( )( )( ) 1A D A B B C C D B D+ + + + + =

    ( )( )( ) 1A AB AD BD BC BD C CD B D+ + + + + + + =

    ( )( )( ) 1A BD C BD B D+ + + =( )( ) 1A BD BC CD BD+ + + =

    1ABC ACD ABD BCD BD+ + + + =

    { , , , , }SOLN ABC ACD ABD BCD BD=

  • 8/4/2019 Mc Quine Multiple Output

    9/27

    Multi-Output Functions

    Minimizing Each Output Separately Usually Results in PoorMinimization

    Term Sharing Occurs Only by Chance

    Can Use Multi-Output Prime Implicants

    More Complex Version of Tabulation Method

    Can Use Characteristic Function for Multi-Output

    Functions

    Utilizes Principles in Multiple-Valued Logic

  • 8/4/2019 Mc Quine Multiple Output

    10/27

    Product Functions

    Consider1( , , )f x y z x z x y x z= + +

    2 ( , , )f x y z z x y= +x

    y

    z

    f1

    f2x y z f1 f2 f

    1 f

    2

    0 0 0 1 0 0

    0 0 1 1 1 1

    0 1 0 1 1 10 1 1 0 1 0

    1 0 0 0 0 01 0 1 1 1 1

    1 1 0 0 0 01 1 1 1 1 1

    Minterms inf1f2 are Minterms for Bothf1 andf2

    f1f2 is a Product Function

  • 8/4/2019 Mc Quine Multiple Output

    11/27

    Multi-Output Prime Implicant

    DEFINITIONA MOPI for a set of switching functionsf1, f2, , fm is a product of

    literals which is either:

    1. A Prime Implicant of One of the functions,fi, fori=1,2,,m

    2. A Prime Implicant of one of the Product Functions,fifjfk

    where i,j,k=1,2,,m and ij k

    THEOREM

    The set of all MOPIs is sufficient for the determination of

    at least one multi-output minimized SOP.

  • 8/4/2019 Mc Quine Multiple Output

    12/27

    Tagged Product Terms Could Generate Using K-map or Tabulation Method for Each

    Output SeparatelyAND all Product Functions

    too lengthy

    instead use Tagged Product Terms

    Tagged Product Terms have Two Parts:

    1. kernel a product term of literals (as normal)

    2. tag appended entity to kernel that indicates which function outputs it

    applies tox y z f1 f2 f1 f2 TPTs

    0 0 0 1 0 0 000f1 -

    0 0 1 1 1 1 001f1f2

    0 1 0 1 1 1 010f1f2

    0 1 1 0 1 0 011 -f2

    1 0 0 0 0 0

    1 0 1 1 1 1 101f1f2

    1 1 0 0 0 0

    1 1 1 1 1 1 111f1f2

  • 8/4/2019 Mc Quine Multiple Output

    13/27

    Generating MOPIs

    0 0 0 f1 -0 0 1 f1 f2

    0 1 0 f1 f2

    0 1 1 - f2

    1 0 1 f1 f2

    1 1 1 f1 f2

  • 8/4/2019 Mc Quine Multiple Output

    14/27

    Generating MOPIs

    0 0 0 f1 -

    0 0 1 f1 f2

    0 1 0 f1 f2

    0 1 1 - f2

    1 0 1 f1 f2

    1 1 1 f1 f2

    0 0 - f1 -0 - 0 f1 -

    0 - 1 - f2

    - 0 1 f1 f20 1 - - f2

    - 1 1 - f2

    1 - 1 f1 f2

  • 8/4/2019 Mc Quine Multiple Output

    15/27

    Generating MOPIs

    0-0f1- and 0-1-f2DO NOT combine

    No Common Tag Elements

    They WOULD Combine Under Cube Merging for Single Output

    Function

    Only Place Check Mark on Terms with COMMON Tag Outputs

    EXAMPLE 000f1- and 001f1f2 Results in 000f1- Being Checked ONLY

    0 0 0 f1 -

    0 0 1 f1 f2

    0 1 0 f1 f2 G

    0 1 1 - f2

    1 0 1 f1 f2

    1 1 1 f1 f2

    0 0 - f1 - B0 - 0 f1 - C

    0 - 1 - f2

    - 0 1 f1 f2 D0 1 - - f2 E

    - 1 1 - f2

    1 - 1 f1 f2 F

    - - 1 - f2 A

  • 8/4/2019 Mc Quine Multiple Output

    16/27

    MOPI Cover Table

    f1 f2m0 m1 m2 m5 m7 m1 m2 m3 m5 m7

    B X Xf1 C X X

    A X X X X

    f2 E X XD X X X X

    *F X X X Xf1f2G X X

    5

    1&7

  • 8/4/2019 Mc Quine Multiple Output

    17/27

    MOPI Cover Table

    Fis an essential row forf1, only

    Column dominance, remove m5 underf2

    f1 f2m0 m1 m2 m5 m7 m1 m2 m3 m5 m7

    B X Xf1 C X X

    A X X X X

    f2 E X XD X X X X

    *F X X X Xf1f2G X X

    5

    1&7

  • 8/4/2019 Mc Quine Multiple Output

    18/27

    MOPI Cover Table

    Will use Petricks method applied to multiple outputs

    f2 f2

    m0 m1 m2 m1 m2 m3 m7

    B X Xf1

    C X X

    A X X Xf2E X X

    D X X

    *F Xf1f2

    G X X

    B+CB+D C+G A+D E+G A+E A+F

  • 8/4/2019 Mc Quine Multiple Output

    19/27

    Exact Solution

    ( )( )( )( )( )( )( ) 1B C B D C G A D E G A E A F+ + + + + + + =

    ( )( )( )( )( ) 1B CD C G A DE E G A F+ + + + + =

    ( )( )( ) 1BC BG CD A DEF E G+ + + + =

    ( )( ) 1BC BG CD AE AG DEF+ + + + =

    (

    ) 1

    ABCE ABCG BCDEF ACDE ACDG

    CDEF ABEG ABG BDEFG

    + + + +

    + + + + =

    ( ) 1ABCE ACDE ACDG CDEF ABEG ABG BDEFG+ + + + + + =

  • 8/4/2019 Mc Quine Multiple Output

    20/27

    Exact Solution (Cont.)

    Minimum Product Term:

    {A,B,G}

    f1ON

    =

    All MOPIs that havef1in Tagf2

    ON=All MOPIs that havef2in Tag

    1

    2

    f F B G

    f A G

    = + +

    = +

  • 8/4/2019 Mc Quine Multiple Output

    21/27

    Hazard-Free2-Level Minimization

    Tabular Method Can Be Applied To Realize 2-LevelDesigns That Eliminate Certain Hazards

    Considers Delay of Logic Circuits

    Example:

  • 8/4/2019 Mc Quine Multiple Output

    22/27

    Hazard Types

    Static Hazard Output value the sameafter input change

    0-Hazard 1-Hazard

    Dynamic Hazard Output value

    different after input change

  • 8/4/2019 Mc Quine Multiple Output

    23/27

    Analysis of Networks with Static

    Hazards

    SOP Expression with 1-Hazard

    POS Expression with 0-Hazard

  • 8/4/2019 Mc Quine Multiple Output

    24/27

    Elimination of Hazard

    Prime Implicant added to eliminate

    static 1-hazard

    Oth H d Cl ifi ti f M

  • 8/4/2019 Mc Quine Multiple Output

    25/27

    Other Hazard Classifications for More

    than One Input Change Logic Hazard Hazard caused by the particular

    implementation. Can be eliminated by adding Pis

    Function Hazard Presence of hazard due to the function

    realized by the output. Present for transitions in which more

    than one input changes. Cannot be eliminated

    T b l A h t H d F

  • 8/4/2019 Mc Quine Multiple Output

    26/27

    Tabular Approach to Hazard-Free

    Design

    Uses Minimum number of prime implicants

    A Network will contain no static or dynamic

    hazards if its 1-sets satisfy the following two

    conditions

    1. For each pair of adjacent input states that both

    produce a 1 output, there is at least one 1-set that

    includes both input states of the pair2. There are no 1-sets that contain exactly one pair

    of complementary literals

  • 8/4/2019 Mc Quine Multiple Output

    27/27

    Tabular Approach Steps

    1. Find prime implicants using tabular approach

    2. Create prime implicant table, however,

    columns will be any essential single minterm& all pairs of adjacent states (these have

    been found in the second table of 1)

    See Example Handout