+ All Categories
Home > Documents > Honors6_1PP

Honors6_1PP

Date post: 27-Feb-2018
Category:
Upload: doravari-lakshmi
View: 217 times
Download: 0 times
Share this document with a friend

of 23

Transcript
  • 7/25/2019 Honors6_1PP

    1/23

    Asynchronous {Pipelines, dataflow}

    Honors Discussion #5

    EECS 150 Spring 2010Chris W. Fletcher

    1UCB EECS150 Spring 2010, Honors #5

  • 7/25/2019 Honors6_1PP

    2/23

    Today

    HSRA commentary

    Clocking

    Synchronizers Dataflow in asynchronous systems

    2UCB EECS150 Spring 2010, Honors #5

  • 7/25/2019 Honors6_1PP

    3/23

    Big Picture

    Last week: Synchronous pipelines

    & data transactions

    This week: Asynchronous pipelines& data transactions

    Next week: {Synchronous, Asynchronous} FIFOs

    3UCB EECS150 Spring 2010, Honors #5

  • 7/25/2019 Honors6_1PP

    4/23

    Clocking Basics 1

    A clock signal

    UCB EECS150 Spring 2010, Honors #5 4

  • 7/25/2019 Honors6_1PP

    5/23

    Clocking Basics 2

    A clock signal

    Setup time

    UCB EECS150 Spring 2010, Honors #5 5

    tsetup

  • 7/25/2019 Honors6_1PP

    6/23

    Clocking Basics 3

    A clock signal

    Setup time

    Hold time

    UCB EECS150 Spring 2010, Honors #5 6

    tsetup thold

  • 7/25/2019 Honors6_1PP

    7/23

    Clocking Basics 4

    A clock signal

    Setup time

    Hold time clkQ

    UCB EECS150 Spring 2010, Honors #5 7

    tsetup thold

    tclkQ

  • 7/25/2019 Honors6_1PP

    8/23

    Clocking Basics 5

    Quiz: Can tsetup or thold to be negative?

    UCB EECS150 Spring 2010, Honors #5 8

    thold tsetup

    tclkQ

    tsetup < 0: D can change after the clock edge

    and the new D will be recognized thold < 0: D can change before the clock edge

    and the old D will be recognized

    What about clk

    Q?

  • 7/25/2019 Honors6_1PP

    9/23

    Metastability 1

    What happens when tsetup or thold are violated?

    UCB EECS150 Spring 2010, Honors #5 9

    tsetup

    metastable resolution

    outin

    Activ

    e

    Active

    ???

    Output unknown

    (somewhere between 0 and 1)

    until resolution occurs

    at which point out could

    be either 0 or 1!

  • 7/25/2019 Honors6_1PP

    10/23

    Metastability 2

    When can tsetup or thold be violated?

    UCB EECS150 Spring 2010, Honors #5 10

    One Clock

    Design doesnt meet timing

    (You have bigger problems)

    tsetupLogic

    Two Clocks: different frequencies

    Will almost always cause violations

    Thought Q: Exceptions to this? tsetup tclkQ tclkQ

    ???

    Two Clocks: phase offset

    May or may not cause violations tsetup

    tsetup

    tclkQ

  • 7/25/2019 Honors6_1PP

    11/23

    Metastability 3

    Resolution must occur within tr

    UCB EECS150 Spring 2010, Honors #5 11

    tr = tp tclkQ-tcl - tsu

    tsetup

    tp

    tclkQtcltr

    Good news:chance to leave metastability increases exponentially with time

    Bad news:

    synchronization failure

    means circuit failure

  • 7/25/2019 Honors6_1PP

    12/23

    Synchronizers 1

    First flip-flop absorbs metastability

    UCB EECS150 Spring 2010, Honors #5 12

    Clock A

    Clock B

    Input

    Clock Domain A Clock Domain B

    Level Synchronizer

    Output

    1 2 3

    Second flip-flop protects downstream logic

    tr = tp tclkQ- tsu

  • 7/25/2019 Honors6_1PP

    13/23

    Synchronizers 2

    How can we do better? Increase tr

    UCB EECS150 Spring 2010, Honors #5 13

    Clock A

    Clock B

    Input

    Clock Domain A Clock Domain B

    Reliable Synchronizer

    Output

    1 2 3

    2+ Stage Shift Register

    tr = Nx(tp tclkQ- tsu)

  • 7/25/2019 Honors6_1PP

    14/23

    Synchronizers 3

    Another reliable synchronizer

    UCB EECS150 Spring 2010, Honors #5 14

    tr = Nxtp tclkQ- tsu

    Clock A

    Clock B

    Input

    Reliable Synchronizer

    Output

    1 2 3

    Clock Domain BClock Domain A

    Clock

    Divider

    (by N)

  • 7/25/2019 Honors6_1PP

    15/23

    Synchronizers 4

    Synchronizer cost

    Area (but not much)

    Cycle Delay

    UCB EECS150 Spring 2010, Honors #5 15

    Where does this matter? Handshaking

    Case Study:

    Asynchronous FIFOs

  • 7/25/2019 Honors6_1PP

    16/23

    Asynchronous Pipelines 1

    Recall the FIFO interface that we call Ready/Valid

    Valid

    Ready

    16UCB EECS150 Spring 2010, Honors #5

    This worked in a single clock domain

    Why?

    Ready

    Valid

    Clock

    1+ 1+ 1 0+

    Transfers @ edge, both parties

    see change at the same time

  • 7/25/2019 Honors6_1PP

    17/23

    Asynchronous Pipelines 2

    What happens in two clock domains?

    UCB EECS150 Spring 2010, Honors #5 17

    Valid

    Ready

    Clock A Clock B

    Data

    First: we must avoid metastability. Ideas?

  • 7/25/2019 Honors6_1PP

    18/23

    Asynchronous Pipelines 3

    Step #1: Add synchronizers (prevents metastability)

    UCB EECS150 Spring 2010, Honors #5 18

    Valid

    Clock A Clock B

    Clock A Clock B

    Clock BClock A

    Ready

  • 7/25/2019 Honors6_1PP

    19/23

    Asynchronous Pipelines 4

    Step #1: Add synchronizers (prevents metastability)

    UCB EECS150 Spring 2010, Honors #5 19

    Valid

    Clock A Clock B

    Clock A Clock B

    Clock BClock A

    Ready

    Data

    Data

    Step #2: Add a hold register (does this help here?)

    Aside: Why not push data through parallel synchronizers?

    This still doesnt work!

  • 7/25/2019 Honors6_1PP

    20/23

    Asynchronous Pipelines 5

    Problem: It takes multiple cycles for a message

    from the receiver to reach the sender

    UCB EECS150 Spring 2010, Honors #5 20

    Solution Add buffering to the receiver

    Add almost full like in lecture

    Why do we care? What happens when

    the receiver says stop?

    (i.e. DataInReady = 0) Ready

    Valid

    Clock

    Synchronizer delayW

    ewant

    Weget

  • 7/25/2019 Honors6_1PP

    21/23

    Asynchronous Pipelines 6

    Almost full gives sender time to stop

    UCB EECS150 Spring 2010, Honors #5 21

    Valid

    Clock A Clock B

    Clock A Clock B

    Clock BClock A

    ReadyData

    Data

    Data

    Data

    Data

    Same idea as what you saw in lecture

    What is the receiver starting to look a lot like?

  • 7/25/2019 Honors6_1PP

    22/23

    Homework

    Thought problem

    Based on what you have seen in lecture & today:

    Draw a block diagram for a synchronous FIFO

    (More) reading will be posted

    UCB EECS150 Spring 2010, Honors #5 22

  • 7/25/2019 Honors6_1PP

    23/23

    Acknowledgements & Contributors

    Slides developed by Chris Fletcher (2/2010).

    This work is based on ideas and discussions with:

    Ilia Lebedev, Greg Gibeling, John Wawrzynek, Krste Asanovic,

    and other fellow Spring 2009 CS294-48 students

    This work has been used by the following courses: UC Berkeley CS150 (Spring 2010): Components and Design Techniques for Digital Systems

    23UCB EECS150 Spring 2010, Honors #5