vlsi04_tut3

Upload: udit-kumar

Post on 04-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 vlsi04_tut3

    1/26

    1

    Synchronization ofcomplex systems

    Jordi Cortadella

    Universitat Politecnica de Catalunya

    Barcelona, Spain

    Thanks to A. Chakraborty, T. Chelcea,

    M. Greenstreet and S. Nowick

  • 7/30/2019 vlsi04_tut3

    2/26

    2

    Multiple clock domains

    CLK

    f1/f0

    f2/f0

    f3/f0

    CLK

    (f0)

    CLK1

    CLK2

    CLK3

    CLK0

    Single clock

    (Mesochronous)Rational clock frequencies

    Independent clocks

    (plesiochronous

    if frequencies

    closely match)

  • 7/30/2019 vlsi04_tut3

    3/26

    3

    The problem: metastability

    D Q

    T

    D Q

    ?

    D

    Q

    RR setup hold

  • 7/30/2019 vlsi04_tut3

    4/26

    4

    Classical synchronous solution

    Wff

    e

    D

    rt

    MTBF

    2

    D Q D Q D Q D Q

    T

    R

    Mean Time Between Failures

    f: frequency of the clock

    fD: frequency of the data

    tr: resolve time availableW: metastability window

    : resolve time constant

    # FFs MTBF

    1 FF 15 min

    2 FF 9 days

    3 FF 23 years

    Example

  • 7/30/2019 vlsi04_tut3

    5/26

    5

    How to live with metastability ?

    Metastability cannot be avoided, it must be tolerated.

    Having a decent MTBF ( years) may result in atangible impact in latency

    Purely asynchronous systems can be designedfailure-free

    Synchronous and mixed synchronous-asynchronoussystems need mechanisms with impact in latency

    But latency can be hidden in many cases

  • 7/30/2019 vlsi04_tut3

    6/26

    6

    Different approaches

    Pausible Clocks (Yun & Donohue 1996)

    Predict metastability-free transmission windows for domains with

    related clocks (Chakraborty & Greenstreet 2003)

    Use the waiting time in FIFOs to resolve metastability

    (Chelcea & Nowick 2001)

    And others

    The term Globally Asynchronous, Locally Synchronous is typicallyused for these systems (Chapiro 1984)

  • 7/30/2019 vlsi04_tut3

    7/26

    7

    Mutual exclusion element

    req1

    req2

    ack1

    ack2

    0

    0

    1

    1

    0

    0

  • 7/30/2019 vlsi04_tut3

    8/26

    8

    Metastability

  • 7/30/2019 vlsi04_tut3

    9/26

    9

    Mutual exclusion element

    req1

    req2

    ack2

    ack1

    0

    0

    1

    1

    0

    0

    An asynchronous data latch with MSresolver can be built similarly

    Metastability

    resolver

  • 7/30/2019 vlsi04_tut3

    10/26

  • 7/30/2019 vlsi04_tut3

    11/26

    11

    A pausible clock generator

    delay

    [1, 2]

    Environment

    MUTEX

  • 7/30/2019 vlsi04_tut3

    12/26

    12

    Pausible clocks

    delay

    [1, 2]

    ME

    CLK

    Cntr

    MUTEXFF

    Req

    Ack

    Yun & Dooply, IEEE Trans. VLSI, Dec. 1999

    Moore et al., ASYNC 2002

  • 7/30/2019 vlsi04_tut3

    13/26

    13

    STARI (Self-Timed At Receivers Input)

    Both clocks are generated from the same sourceThe FIFO compensates for skew betweentransmitter and receiver

    M. Greenstreet, 1993

  • 7/30/2019 vlsi04_tut3

    14/26

    14

    A Minimalist Interface

    FIFO reduces to latch-X and a latch controller

    x can always be generated in such a way as toreliably transfer data from input to output

    Chakraborty & Greenstreet, 2002

  • 7/30/2019 vlsi04_tut3

    15/26

    15

    A Minimalist Interface: 3 scenarios

    Latch-X setup & hold

    Latch-R setup & hold

    x Permitted

    The scenario is chosen

    at initialization

  • 7/30/2019 vlsi04_tut3

    16/26

    16

    A Minimalist Interface: latch controller

    The controller detects which transition arrives first (from T and R)

    and generates X accordingly

  • 7/30/2019 vlsi04_tut3

    17/26

    17

    A Minimalist Interface: rational clocks

  • 7/30/2019 vlsi04_tut3

    18/26

    18

    A Minimalist Interface: arbitrary clocks

    Assumption: clocks are stableEach domain estimates the others frequency

    Residual error corrected using stuff bits

  • 7/30/2019 vlsi04_tut3

    19/26

    19

    Mixed-Timing Interfaces

    AsynchronousDomain

    Synchronous

    Domain 1

    SynchronousDomain 2

    Async-Sync FIFO

    Async-SyncFI

    FO

    Sync-A

    syncFIFO

    Mixed-Clock FIFOs

    Chelcea & Nowick, 2001

  • 7/30/2019 vlsi04_tut3

    20/26

    20

    Mixed-Clock FIFO: Block Level

    full

    req_put

    data_put

    CLK_put

    req_get

    valid_get

    empty

    data_get

    CLK_getMixed-Clock

    FIFO

    synchronousput inteface

    synchronousget interface

  • 7/30/2019 vlsi04_tut3

    21/26

    21

    Mixed-Clock FIFO: Block Level

    full

    req_put

    data_put

    CLK_put

    req_get

    valid_get

    empty

    data_get

    CLK_getMixed-Clock

    FIFO

    Bus for data items

    Controls get operations

    Initiates get operations

    Bus for data items

    synchronousput inteface

    synchronousget interface

    Initiates put operations

    Controls put operations

  • 7/30/2019 vlsi04_tut3

    22/26

    22

    full

    req_put

    data_put

    CLK_put

    req_get

    valid_get

    empty

    data_get

    CLK_getMixed-Clock

    FIFO

    synchronousput inteface

    synchronousget interface

    Indicates when FIFO empty

    Indicates when FIFO fullIndicates data items validity

    (always 1 in this design)

    Mixed-Clock FIFO: Block Level

  • 7/30/2019 vlsi04_tut3

    23/26

    23

    Mixed-Clock FIFO: Architecture

    cell cell cell cell cell

    Get

    Contro

    ller

    Empty Detector

    Full DetectorPut

    Controller

    full

    req_put

    data_put

    CLK_put

    CLK_getdata_get

    req_get

    valid_get

    empty

  • 7/30/2019 vlsi04_tut3

    24/26

    24

    REG

    Mixed-Clock FIFO: Cell Implementation

    En

    En

    f_ie_i

    ptok_out ptok_in

    gtok_ingtok_out

    CLK_get en_get valid data_get

    CLK_put en_put req_put data_put

    SR

  • 7/30/2019 vlsi04_tut3

    25/26

    25

    REG

    Mixed-Clock FIFO: Cell Implementation

    En

    En

    f_ie_i

    ptok_out ptok_in

    gtok_ingtok_out

    CLK_get data_get

    CLK_put en_put data_put

    SR

    GET INTERFACE

    PUT INTERFACE

    en_get valid

    req_put

  • 7/30/2019 vlsi04_tut3

    26/26

    26

    Synchronization: summary

    Resolving metastability implies latency

    Latency can be often hidden (FIFOs, Chelcea & Nowick)

    Clock frequencies can be estimated and clock edgespredicted under the assumption of stable clocks(Chakraborty & Greenstreet)

    Pausible clocks are also possible (Yun & Donohue 1996)

    But still the nicest solutions are totally asynchronous As presented by Fulcrum Microsystems in the last lecture