sequential logiclogis desin

Upload: radha-krishna

Post on 14-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Sequential Logiclogis Desin

    1/26

    Sequential Logic

    Combinatorial components: the output values

    are computed only from their present input

    values.

    Sequential components: their output valuesare computed using both the present and past

    input values.

    Sequential circuits can contain only a finite

    number of statesfinite state machines

    Synchronous and Asynchronous

  • 7/27/2019 Sequential Logiclogis Desin

    2/26

    Sequential Circuits

    Contains Memory Elements Asynchronous sequential circuits change their state

    and output values when input changes

    Synchronous sequential circuits change their outputvalues at fixed points of time, which are specified by therising or falling edge of a clock signal

    Clock period is the time between successive transitionsin the same direction

    Active highstate changes occur at the clocks rising

    edge( on higher voltage) Active lowstate changes occur at the clocks falling

    edge( on lower voltage)

  • 7/27/2019 Sequential Logiclogis Desin

    3/26

    4 Basic types of Flip-Flops

    SR, JK, D, and T JK ff has 2 inputs, J and K need to be

    asserted at the same time to change thestate

    D ff has 1 input D (DATA), which sets the ffwhen D = 1 and resets it when D = 0

    T ff has1 input T (Toggle), which forces theff to change states when T = 1

    SR ff has 2 inputs, S (set) and R (reset)that set or reset the output Q whenasserted

  • 7/27/2019 Sequential Logiclogis Desin

    4/26

    Gated D-Latch

    Ensures S and R inputs never equal to 1 at the

    same time

    Useful in control application where setting or

    resetting a flag to some condition is needed

    Stores bits of information

    Constructed from a gated SR latch and a Data

    latch

  • 7/27/2019 Sequential Logiclogis Desin

    5/26

    D Flip-Flop

    Characteristics :

    Synchronous

    Avoids the instability of RS flip-flop

    Retains its last input value

    To set the ff, place 1 on D input and pause the CK input

    To reset, place 1 on D input and pause the CK input

    D Q+

    0

    1

    0

    1Q+ = Next State

  • 7/27/2019 Sequential Logiclogis Desin

    6/26

    JK Flip Flop

    J Set

    K Reset

    J = K = 0 output does not change

    J = K = 1 invert the outputs

  • 7/27/2019 Sequential Logiclogis Desin

    7/26

    Clocked JK Flip Flop

  • 7/27/2019 Sequential Logiclogis Desin

    8/26

    T Flip-Flop

    T Q+

    0

    1

    Q

    Q

    T = 1 force the state change

    T = 0 state remain the same

    Q

    QSET

    CLR

    DT

  • 7/27/2019 Sequential Logiclogis Desin

    9/26

    D and JK Flip-Flop

    Q

    QSET

    CLR

    D D Q+

    0

    1

    0

    1

    J

    Q

    Q

    K

    SET

    CLR

    J K Q+

    0 0

    0 1

    1 0

    1 1

    Q

    0

    1

    Q

  • 7/27/2019 Sequential Logiclogis Desin

    10/26

    How to use JK to implement D Flip-Flop

    D Q+

    0

    1

    0

    1

    J K Q+

    0 0

    0 1

    1 01 1

    Q

    0

    1Q

    D ffs property:When in = 0, the out(Q+) = 0.

    When in = 1, the out(Q+) is 1

    invert K

    invert K

    J

    Q

    Q

    K

    SET

    CLR

    D

  • 7/27/2019 Sequential Logiclogis Desin

    11/26

    How to use JK to implement T Flip-Flop

    T Q+

    0

    1

    Q

    Q

    J K Q+

    0 0

    0 11 0

    1 1

    Q

    01

    Q

    T ffs property:When in = 0, the out(Q+) = no change

    When in = 1, the out(Q+) is = complement

    No change

    State changeJ

    Q

    Q

    K

    SET

    CLR

    T

  • 7/27/2019 Sequential Logiclogis Desin

    12/26

    How to use D to implement JK Flip-Flop

    KQ 00 01 11 10

    J 0

    1

    0(Q) 1(Q) 0 0

    1 1 0(Q) 1(Q)

    J K Q+

    0 0

    0 1

    1 01 1

    Q

    0

    1Q

    D Q+

    0

    1

    0

    1D = JQ + KQ

    (Q ) = no state change

    (Q) = state change

  • 7/27/2019 Sequential Logiclogis Desin

    13/26

    How to use D to implement JK Flip-Flop

    D = JQ + KQ

    J

    K

    Q

    QSET

    CLR

    D

  • 7/27/2019 Sequential Logiclogis Desin

    14/26

    How to use T to implement JK Flip-Flop

    KQ 00 01 11 10

    J

    0

    1

    0 0 1 0

    1 0 1 1

    J K Q+

    0 0

    0 1

    1 01 1

    Q

    0

    1Q

    T Q+

    0

    1

    Q

    Q

    T = KQ + JQ

  • 7/27/2019 Sequential Logiclogis Desin

    15/26

    How to use T to implement JK Flip-Flop

    T = KQ + JQ

    Q

    QSET

    CLR

    DT

  • 7/27/2019 Sequential Logiclogis Desin

    16/26

    How to use D to implement T Flip-Flop

    T Q+

    0

    1

    Q

    Q

    Q+ 0 1

    T 0

    1

    0 1

    1 0

    D = TQ + TQ

    D Q+

    0

    1

    0

    1

  • 7/27/2019 Sequential Logiclogis Desin

    17/26

    How to use D to implement T Flip-Flop

    Q

    QSET

    CLR

    D

    D = TQ + TQ

    T

  • 7/27/2019 Sequential Logiclogis Desin

    18/26

    How to use T to implement D Flip-Flop

    T Q+

    0

    1

    Q

    Q

    D Q+

    0

    1

    0

    1T = DQ + DQ

    Q+ 0 1

    D

    01

    0 11 0

  • 7/27/2019 Sequential Logiclogis Desin

    19/26

    How to use T to implement D Flip-Flop

    Q

    QSET

    CLR

    DT

    T = DQ + DQ

    D

  • 7/27/2019 Sequential Logiclogis Desin

    20/26

    SR-Flip Flop

    S R Q Q

    0 0

    1 0

    0 1

    1 1

    Q Q

    1 0

    0 1

    0 0

    S R Q Q

    1 1

    0 1

    1 0

    0 0

    Q Q

    1 0

    0 1

    1 1

    RESET

    SET

    SET

    RESET

  • 7/27/2019 Sequential Logiclogis Desin

    21/26

    SR-Flip Flop

    Asynchronous

    If S=0 and R=1, Q is set to 1, and Q is

    reset to 0

    IF R=0 and S=1, Q is reset to 0, and Qis set to 1

    If S=1 and R=1, Q and Q maintain their

    previous state

    If S=0 and R=0, a transition to S=1,R=1 will cause oscillation

    Q

    QSET

    CLR

    S

    R

  • 7/27/2019 Sequential Logiclogis Desin

    22/26

    Clocked SR Flip-Flop

    Similar to SR Flip-flop but

    with extra control input C,

    which enables or disables

    the operation of S and R

    inputs.

    C=1 EnabledC=0 Disabled,circuit persists in

    preceding state

    Q

    QSET

    CLR

    S

    R

  • 7/27/2019 Sequential Logiclogis Desin

    23/26

    Instability

    RS flip-flops can become unstable if both

    R and S are set to 0

    All sequential elements are fundamentally

    unstable under certain conditions

    Invalid transitions

    Transitions too close together

    Transitions at the wrong time

  • 7/27/2019 Sequential Logiclogis Desin

    24/26

    Edge and level-triggered Flip Flop

    Digital circuit often form loops, flip-flopsoscillations can

    Oscillation will not occur because by

    the time an output change cause aninput change, the activating edge of theCK signal will be gone

    Positive edge triggered ff responds to

    a positive going edge of clock Negative edge triggered responds toa negative-going edge

  • 7/27/2019 Sequential Logiclogis Desin

    25/26

    Positive-edge-triggered D Flip-Flop

    When CLK=0 the

    masterlatch is open

    and the content of D is

    transferred to QM

    When CLK=1 themasteris closed and

    its output is transferred

    to the slave

    Master and slave

    latches are neverenabled at the same

    time

  • 7/27/2019 Sequential Logiclogis Desin

    26/26

    References

    www.play-hookey.com/digital

    www.infopad.eecs.berkeley.edu/~icdesign/

    SLIDES/slides6.pdf

    www.cs.mun.ca/~paul/cs3724/material/we

    b/notes/node14.html

    Dos Reis, Assembly Language and

    Computer Architecture Using C++ and

    Java