DigDesignCh18L04.pdf

download DigDesignCh18L04.pdf

of 40

Transcript of DigDesignCh18L04.pdf

  • 7/25/2019 DigDesignCh18L04.pdf

    1/40

    Chapter 18

    FUNDAMENTALMODE SEQUENTIAL

    CIRCUITS

  • 7/25/2019 DigDesignCh18L04.pdf

    2/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    2

    Lesson 4

    Race Free Assignments

  • 7/25/2019 DigDesignCh18L04.pdf

    3/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    3

    Outline

    Race Free Assignment

    Circuit Implementation

  • 7/25/2019 DigDesignCh18L04.pdf

    4/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    4

    xQ and

    xQ

    differing in more than one

    latch during a transition

    Memory (or delay) section next-state

    variables when have the bits differingby more than one during a transition,the critical (indeterminate time forstable state) and non-critical(deterministic) races occur.

    Critical type of race must not occur inasynchronous sequential circuit.

  • 7/25/2019 DigDesignCh18L04.pdf

    5/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    5

    Race free assignment Race free assignment is an assignment

    of state variables such that next-statevariables when have the bits differing

    by one during a transition.

    Recall the bit changes in adjacent cells

    in a Karnaugh map.

    Only a single bit changes between twoadjacent cells

  • 7/25/2019 DigDesignCh18L04.pdf

    6/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    6

    Finding Non-Adjacencies in Transitions

    for Different Input Conditions

    Step 1: Build a Karnaugh map type

    table for each set of X in a State table

    Draw adjacency map for the

    assignments of present and next statevariables for X = 0 and X =1,respectively. It shows in a cell the

    present state by 0 (no change) and nextstate (change) by 1

  • 7/25/2019 DigDesignCh18L04.pdf

    7/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    7

    Map for X = 0 Using a flow Table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 0

    -S1 01 0

    S3 11 1

    S2 10

    S3

    11

    S2

    10

    0

    1 0

  • 7/25/2019 DigDesignCh18L04.pdf

    8/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    8

    Map for X = 1 using the flow table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 0

    S1 01

    S3 11 1

    S2 10

    S3

    11

    S2

    10

    1

    1

    1

    0

    0

  • 7/25/2019 DigDesignCh18L04.pdf

    9/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    9

    Observation

    It is observed that for the present state S2,the transition to S1 is not to the adjacent

    cell. S2 and S1 have to be the neighbors

    It is observed that for the present state S3,

    the transition to S0 is not to the adjacent

    cell. S3 and S0 have to be the neighbors

  • 7/25/2019 DigDesignCh18L04.pdf

    10/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    10

    Number of Races

    Number of critical + non-critical races

    = 3

  • 7/25/2019 DigDesignCh18L04.pdf

    11/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    11

    Map for X = 00 Two inputs Using for another

    circuit flow table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 0

    01S1 01

    S3 11

    S2 10

    1

    S3

    11

    S2

    10

    01

    1 0

  • 7/25/2019 DigDesignCh18L04.pdf

    12/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    12

    Map for X = 01 using another circuit flow

    table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 01

    01S1 01

    S3 11 1

    S2 10

    S3

    11

    S2

    10

    0

    1 0

  • 7/25/2019 DigDesignCh18L04.pdf

    13/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    13

    Map for X = 11 Using for another circuit

    flow table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 0

    0S1 01

    S3 11

    S2 10

    S3

    11

    S2

    10

    1

    1

    0 1

    1 0

  • 7/25/2019 DigDesignCh18L04.pdf

    14/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    14

    Map for X = 10 using another circuit flow table

    S (xQ)

    S (xQ)

    S0

    00

    S1

    01

    S0 00 0

    0S1 01 1

    S3 11

    S2 10

    S3

    11

    S2

    10

    -

    01

    01

  • 7/25/2019 DigDesignCh18L04.pdf

    15/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    15

    Observation

    It is observed for X =01that for a presentstate S2, the transition to S1 is not to the

    adjacent cell. S2 and S1 have to be the

    neighbors

    It is observed for X =11 that for the present

    state S1, the transition to S2 is not to the

    adjacent cell. S1 and S2 have to be the

    neighbors

  • 7/25/2019 DigDesignCh18L04.pdf

    16/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    16

    Observation

    It is observed for X =11 that for apresent state S0, the transition is non

    existent due to two input changes and

    is leading to unstable intermediate

    states

  • 7/25/2019 DigDesignCh18L04.pdf

    17/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    17

    Number of races

    It is observed for X =11 that for apresent state S0, the transition is non

    existent due to two input changes and

    is leading to unstable intermediate

    states

  • 7/25/2019 DigDesignCh18L04.pdf

    18/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    18

    Finding Race free State assignments for

    Different Input Conditions

    Step 2:

    Method 1 Replacement of an

    unstable non-adjacent state by another

    adjacent state in flow table so that inthe next cycle the stable state is

    obtained.

  • 7/25/2019 DigDesignCh18L04.pdf

    19/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    19

    Finding Race free State assignments for

    Different Input Conditions

    Modification of flow table is permitted

    if it does not change the result finallyachieved

  • 7/25/2019 DigDesignCh18L04.pdf

    20/40

    20

    Example 1: Flow Table for Y = X. xq2 +

    xq1; xq1 =D and xq2 = xqn+1 = J. xqn +K. xqn

    State Next State-Transition Outputs YO

    (yq) [xq]X=0 [xq]X=1 X=0 X =1

    S0 S0 S3 0 -

    S3 S1 S0 1 1S

    2S

    1S

    3 0 1

    YO is present output state after the xq outputs

    but before transition yq next state

  • 7/25/2019 DigDesignCh18L04.pdf

    21/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    21

    Map for X = 0 Using a modified flow Table

    with new variable assignments .

    S (xQ)

    S (xQ)

    S0

    011

    S1

    101

    S0 011 0

    -S1 101 0

    S3 111 1

    S2 110

    S3

    111

    S2

    110

    0

    1 0

    Neighbors

    101 and

    110

  • 7/25/2019 DigDesignCh18L04.pdf

    22/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    22

    Map for X = 1 Using a modified flow Table

    with new variable assignments

    S (xQ)

    S (xQ)

    S0

    011

    S1

    101

    S0 011 0

    S1 101

    S3 111 1

    S2 110

    S3

    111

    S2

    110

    1

    1

    1

    0

    0

    Neighbors

    111 and

    011

  • 7/25/2019 DigDesignCh18L04.pdf

    23/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    23

    Finding Race free State assignments for

    Different Input Conditions

    Example 1: S1 present state is

    unresponsive to any input condition.So S1 can be assigned three state

    variables, (xq0, xq1, xq2) = 101, in placeof 01. S3 to S0 transition in flow table,

    means 111 to 110, transition, and that

    means only one variable change. S0 =011, S3 = 111 are also neighbors.

  • 7/25/2019 DigDesignCh18L04.pdf

    24/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    24

    Race Free Assignment

    Race condition will not now exist and

    after intermediate cycles the state willbecome same as when race sets in due

    to two or ore variable changes withmismatched delays

  • 7/25/2019 DigDesignCh18L04.pdf

    25/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    25

    Finding Race free State assignments for

    Different Input Conditions

    Step 2:

    Method 2A systematic method,

    called one-hot method of race free

    state assignments

  • 7/25/2019 DigDesignCh18L04.pdf

    26/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    26

    Action 1

    Let number of rows in flow table = n. Use nstate variables. Assign each row (xq0, xq1

    , , x

    qn--1) in sequence as 0001, 00. 10,

    , 10 00. In k-th row the k-th statevariable is 1. For example, if there are fourrows in the flow table, S0, S1, S2 and S3,

    assign 1000, 0100, 0010 and 0001,respectively to (xq0, xq1

    , , xqn--1

    ) with m= 4.

  • 7/25/2019 DigDesignCh18L04.pdf

    27/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    27

    Action 2

    Fill present state column 1 contains thestates as per new state variable

    assignments

  • 7/25/2019 DigDesignCh18L04.pdf

    28/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    28

    Action 3

    Assign the stable state variables to thestate variable as per corresponding

    state variables used in present state

    column and leave presently unstable

    state as such

  • 7/25/2019 DigDesignCh18L04.pdf

    29/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    29

    Example 2: Flow Table Actions 1 to 3State Transition Outputs (xq0, xq1) Y

    (xq0, xq1) X=00 01 10 11 X=00 01 10 11

    S0 1000 S1 1000 - S1 0 0 - 1

    S1 0100 0100 S1 S0 S2 1 - 1 0

    S2 0010 S3 S1 0100 0100 0 - 0 1

    S3 0001 0001 S1 0001 S2 1 1 0 1

    Row 2 column 5 0100 S1 is final state

    after intermediate feedback cycles]

  • 7/25/2019 DigDesignCh18L04.pdf

    30/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006

    30

    Action 4

    :For unstable state, now write theassignment after ORing with the

    assignment for its next cycle transition.

  • 7/25/2019 DigDesignCh18L04.pdf

    31/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 31

    Action 5 Add extra row for those next state,

    which have two variables as 1s. Theassignment for the same vertical

    column of the state with two variable

    1s can now be done so that next state

    transition occurs to the same next state

    occurs which was ORed with theunstable state assignment before. .

  • 7/25/2019 DigDesignCh18L04.pdf

    32/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 32

    Example 2: Flow Table Actions 4 and 5State Transition Outputs (xq0, xq1) Y

    (xq0, xq1) X=00 01 10 11 X=00 01 10 11

    S0 1000 0100 1000 - 0100b 0 0 - 1

    S1 0100 0100 0100 1010a 0110c 1 - 1 0

    S2 0010 0001 0100 0010 0100b 0 - 0 1

    S3 0001 0001 0100 0001 0110 1 1 0 1

    S4 1010

    a

    - - 0010 -S5 0110

    c - - - 0100b

  • 7/25/2019 DigDesignCh18L04.pdf

    33/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 33

    New States

    a

    New assignment to unstable state afterORing with its next cycle state assignmentin column 1 for present states

    b

    New assignment to unstable state afterORing with its next cycle state assignmentin column 5 for present states

    cNew row addition for an unstable stateassignment in row-2

  • 7/25/2019 DigDesignCh18L04.pdf

    34/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 34

    Action 6 Change the output column entry for the

    state assigned two variables as 1s. Putthe next cycle stable state. This is to

    prevent two times changes in an output

    when adding another extra row in the

    flow table.

  • 7/25/2019 DigDesignCh18L04.pdf

    35/40

  • 7/25/2019 DigDesignCh18L04.pdf

    36/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 36

    New Outputs

    dNew output entry eNow it has next cycle stable state

    output entry

  • 7/25/2019 DigDesignCh18L04.pdf

    37/40

    Summary

  • 7/25/2019 DigDesignCh18L04.pdf

    38/40

    Using Karnaugh map concept, we findthe number of races

    By reassigning the state variables, weget race free assignments

  • 7/25/2019 DigDesignCh18L04.pdf

    39/40

    End of Lesson 4Race Free Assignments

  • 7/25/2019 DigDesignCh18L04.pdf

    40/40

    Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,2006 40

    THANK YOU