Top Banner

of 12

Fifo Buffers

Jun 03, 2018

Download

Documents

naveen silveri
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/11/2019 Fifo Buffers

    1/12

    Working of a FIFO ??

    > FIFO is used for high throughput asynchronous data transfer.

    > When youre sending data from one domain to another domain and if high performance is required,you can not just get away with simpe synchroni!er" #etafop $.

    > %s you cant afford to oose cock cyces"In synchroni!er you merey wait for additiona cock cycesunti you guarantee metasta&iity free operation$, you come up with storageeement and reasona&y compe' handshaking scheme for contro signas to faciitate the transfer.

    > %n %synchronous FIFO has two interfaces, one for writing the data into the FIFO and the other forreading the data out of FIFO. It has two cocks, one for writing and the other for reading.

    > (ock % writes the data in the FIFO and (ock ( reads out the data from it. )o faciitate error freeoperations, we ha*e FIFO fu and FIFO empty signas. )hese signas are generated with respect to thecorresponding cock.

    > +eep in mind that, &ecause contro signas are generated in their corresponding domains and suchdomains are asynchronous to each other, these contro signas ha*e to &e synchroni!ed through thesynchroni!er

    > FIFO fu signa is used &y &ock % "when FIFO is fu, we don-t want &ock % to write data intoFIFO, this data wi &e ost$, so it wi &e dri*en &y the write cock.

    > imiary, FIFO empty wi &e dri*en &y the read cock. /ere read cock means &ock ( cock andwrite cock means &ock % cock

    > %synchronous FIFO is used at paces when the performance matters more, when one does not wantto waste cock cyces in handshake and more resources are a*aia&e.

  • 8/11/2019 Fifo Buffers

    2/12

    FIFO memory &uffers 000000000000000

    /ow it works?00 )here are two cocks in*o*ed, a aunch cock during which the data is stored in the FIFO just ikewrite cock, and a capture cock where the data is read from the FIFO ike read cock.

    00 In a circuar FIFO concept, the memory address of the incoming data is in the write pointer. )headdress of the first data word in the FIFO that is to &e read out is in the read pointer. %fter reset, &othpointers indicate the same memory ocation. %fter each write operation, the write pointer is set to thene't memory ocation. )he reading of a data word sets the read pointer to the ne't data word that is to&e read out. )he read pointer constanty foows the write pointer. When the read pointer reaches thewrite pointer, the FIFO is 1#2)3. If the write pointer catches up with the read pointer, the FIFO isF455

    FIFO memory &uffers 0000000000000000000FIFO 5imitations600 FIFO is not of much use if aunch cock is faster than capture cock, and if a*erage data rate isgreater than capture rate, &ecause after a whie, the FIFO woud &ecome F455.

    /ow to decide of FIFO &uffer i!e?

    00 FIFO depth is decided as 6"data &ytes "&urst$ written in write cock$ 0 "data &ytes read in read cock in the time taken to write the&urst$.

  • 8/11/2019 Fifo Buffers

    3/12

    1'ampe6 uppose 788 &ytes &urst is to &e written at 988 #/:, 9 &yte per write cock. and ;ead cockis

  • 8/11/2019 Fifo Buffers

    4/12

    %s per standard the e*ent queue is ogicay segmented into four different regions.> For sake of simpicity were showing the three main e*ent queues.> )he DInacti*eE e*ent queue has &een omitted as 8 deay e*ents that it deas with is not arecommended guideine.

    0> G%cti*e e*ent queue 6

    > %ccording to the I111 Heriog spec, e*ents can &e schedued to any of the e*ent queues, &ut e*entscan &e remo*ed ony from the Dacti*eE e*ent queue. %s shown in the image, the Gacti*e e*ent queuehods &ocking assignments, continuous assignments. primiti*e IO updates and write commands.

    > Within Dacti*eE queue a e*ents ha*e same priority, which is why they can get e'ecuted in any orderand is the source of nondeterminism in Heriog.

    0> C(% ;egion "Con0&ocking assignment$ 6

    > )here is a separate queue for the 5/ update for the non&ocking assignments. %s you can see that5/ updates queue is taken up after Dacti*eE e*ents ha*e &een e'hausted, &ut 5/ updates for thenon&ocking assignments coud re0trigger acti*e e*ents.

    0> 2ostpone region 6

  • 8/11/2019 Fifo Buffers

    5/12

    >5asty once the ooping through the Dacti*eE and non &ocking 5/ update queue has setted downand finished, the DpostponedE queue is taken up where stro&e and monitor commands are e'ecuted,again without any particuar preference of order.

    %t the end simuation time is incremented and whoe cyce repeats.

  • 8/11/2019 Fifo Buffers

    6/12

    Jated cocks 6Kock signas that are passed through some gate other than &uffer and in*erters are caed gated cocks.)hese cock signas wi &e under the contro of gated ogic. Kock gating is used to turn off cock tosome sections of design to sa*e power. Kick here to read more a&out cock gating.

    Jenerated cocks 6

    Jenerated cocks are the cocks that are generated from other cocks &y a circuit within the design suchas di*idermutipier circuit.

    generated cock 6GKock is the master cock and new cock is generated from F9L output. #aster cock is defined withthe constraint GcreateMcok. 4ness and unti new generated cock is defined as Ggenerated cocktiming anaysis toos wont consider it as generated cock. /ence to accompish this requirement useDcreateMgeneratedMcockE command. GK5+ pin of F9 is now treated as cock definition point for thenew generated cock. /ence cock path deay ti F9K5+ contri&utes source atency whereas deayfrom F9K5+ contri&utes network atency.

    kew 6kew is the difference in arri*a of cock at two consecuti*e pins of a sequentia eement is caed skew.

    Kock skew is the *ariation at arri*a time of cock at destination points in the cock network. )hedifference in the arri*a of cock signa at the cock pin of different fops.

    )wo types of skews are defined6 5oca skew and Jo&a skew.

    5oca skew 65oca skew is the difference in the arri*a of cock signa at the cock pin of reated fops.

    Jo&a skew 6

  • 8/11/2019 Fifo Buffers

    7/12

    Jo&a skew is the difference in the arri*a of cock signa at the cock pin of non reated fops. )hisaso defined as the difference &etween shortest cock path deay and ongest cock path deay reachingtwo sequentia eements

    )iming 2ath 6)iming path is defined as the path &etween start point and end point where start point and end point is

    defined as foows6

    tart 2oint6% input ports or cock pins of a sequentia eement are considered as *aid start point.

    1nd 2oint6% output port or @ pin of sequentia eement is considered as 1nd point.

    >For tatic )iming %naysis ")%$ design is spit into different timing path and each timing path deayis cacuated &ased on gate deays and net deays.

    >In timing path data gets aunched and tra*erses through com&inationa eements and stops when itencounter a sequentia eement. In any timing path, in genera "there are e'ceptions$B deayrequirements shoud &e satisfied within a cock cyce.

    >In a timing path wherein start point is sequentia eement and end point is sequentia eement, if thesetwo sequentia eements are triggered &y two different cocks"i.e. asynchronous$ then a common eastcommon mutipe "5K#$ of these two different cock periods shoud &e considered to find the aunchedge and capture edge for setup and hod timing anaysis.

    @ifferent )iming 2aths%ny synchronous design is spit into *arious timing paths and each timing path is *erified for its timingrequirements. In genera four types of timing paths can &e identified in a synchronous design.

    )hey are6N Input to ;egisterN Input to OutputN ;egister to ;egisterN ;egister to Output

    tatic power Hs @ynamic 2ower 6

    tatic power is power dissipation for dc suppy ony. to cacuate is just using the equation 2=IH "I=I@@L ,H=H@@ $

    using dc operating point anaysis you coud o&tain those *aue.

    @ynamic power dissipation has many cases, such as charging and discharging capacitors, o*erturn ofin*erter and atch.

    tatic power 6 when the transistors in OFF state@ynamic 6 when the transistors in OC state

  • 8/11/2019 Fifo Buffers

    8/12

    %synchronous ;eset 60

    0Co fitering of reset ine is a*aia&e for inputs coming directy from. e'terna reset pins. % soution ispossi&e howe*er. ee &eow.

    0;eset synchroni!ation circuit is required on %IKs with asynchronous reset0Kircuit shown wi pro*ide asynchronous reset and synchronous deassertion.

    0)hese fip0fops must &e kept out of the @F) scan chain.

    #1)%)%(I5I)3 60

  • 8/11/2019 Fifo Buffers

    9/12

    Whene*er a signa changes too cose to the cock edge it is &eing samped on, the captured *aue isnon0deterministic due to setuphod *ioations. )his phenomenon is caed #etasta&iity and withoutproper pre*ention and *erification, metasta&iity propagation coud cause serious design errors. Forsynchronous designs, this is not a major issue as tatic )iming %naysis ")%$ toos can fag theseissues with setuphod checks.

    /owe*er, metasta&iity is an una*oida&e issue for signas crossing asynchronous cock domains ascock domain crossings are not timed &y )% toos. @ue to the asynchronous nature of the transmit andrecei*e cocks, it is possi&e that the transmit data might change within the setup and hod window ofthe recei*e cock, hence resuting in an unpredicta&e *aue and deay at the output of the fop.

    ...

    .. . !"#$ %&'( )*+,-

    ./0 .. 1 23 45 6 . 78 9:; . =

    ?@ .A.. ) B C DEF 5G.. 8 1H ?&I# J## 7KL M N O=P$ G .. 7.

    QG5 R&P$ ST. Q..

    7UV W 9D G .A.. .. 7 8 #.. #XY #... Z[ \] #'' ^P K;

    &I_$ #.. R U` ST ab 1;= cb$ #... 8 C +# ?T c5

    d6 ... def H g. 1 23 h C + S#ij Jkl(. .,mT h #n&P$ deh + 7. o JC$.. 7 #XY #..

  • 8/11/2019 Fifo Buffers

    10/12

    QG .A.. p`!I qr .. T N$" j s( t5f #* 1Hu.. v2T 1wh ?2x[ yh , ?=z5 + #*l'$ u 7U.. {I v,-1*il(.. v JC$|.. }| ?# ~_KAf K ul(. ., +0 J## 9T 7K

    z .2}I.. + JC$k$ KP. deP mT > +0 K ?.5P. v2T .

    +0 K mT h ?uC #n&PC$j. ?f IP; 2 Nj.T q1@ w >; 5@ T x[ 1 . J.. ^k[ 1' #no 1

    9h 9T q .15 #n&P...

    + 2`.. ?@ ; J$K.. ?@ 5 .A.. ?#h . P.;

    JC$D# ?F.

    ?# qw&B .;5,

    ? 5h P2# ?F.

    7A' d) 1' h

    b 5 #n&P. ? 0_, ?l' ( )& 9T q .A.. + ab P|..

    {' =b 9 IP? ?Ah "U# + ?l' Z ... H IKv ?Ah ?w' c6 N(. .h 9C; JC$? ?@ JC$D# OiP..

    nWP.. + .: h #* ?jA 9C`T mT >I P.. ?.A.. 8 9C 11*_ pT # $ | P.. :#$ 1_ .2 1Dh.r(..

    mT wh uIk .h# 1* . .#$ \uT P5 NI... uIk

  • 8/11/2019 Fifo Buffers

    11/12

    ch J$ 1* 9; uT .A.. y# J$ >; d uIk J dF j @ ^5

    _Ph JC$j. y#[ v I 'P; I(# JC$I.. KPK # 7 h D T . C.. C

    7 Y 6y ?$#[ T ! 7. P J..

    7 9C`T D 2u ' P.. mT # ^ = Q* u: / T oP 2

    ! /T &P. 7>k = #Q ? _P &9I #Q h{: P- h x[ /T J.. ? _P 7 P- h x[ Jk:, x[ C# C; Z[ =Y ^k; Jk: .

    x[ 9 #*x[ U# b 5 #nWP. y$ + 9C`T D5 #6Nk# mT S #3 .

    1 q1@ x[ ? .rij IP; JC$j. 7>0 1 . r 5 90ij.. 7>0

    .r #n&PC$j. #Q ? _Ph '> K" J$ /T h 7. 0K" Jk: .. .2 oX 1_ vA5 +0 T i: ,

    vD#p F 2 o.. ?A' d) 9C`T D.P

    +0 t ; v5 K* 9Dh, IK _ 1S 9h 1 '

    v5 #ndPj.. h ?uC 9D . C IP; g&PC$j.._ 1S9 8 T c 8 T :h 2T 5 J. ?j D !D5

    Kh 8p 8 ?D T N# Q6r J.

    ofP I o .6[ 9Dh Q6r J$

    ?D 99Q h J. 8> Q

    [ J.#.. +0 v1 4+0 J$ /T .. T &P 23 w*#$ /&P$ mT h

    # NY vx[ T U`. 23 uK/ T "# ( ST OiP. T Sh# A3 ;mT ' P # k'| Z I.. > 4+0 C$ 2dPI.. 7sA' d xh

    4+0 #n&P...

    IK r.. 7> ? K J. y# {h "U ?6$ T ` o. ?j 7>kT J . 7>k ?: /T h ^#$ T x[ ; I'"j. " I.. 7 ?hc

    9T Y .. kq Ru5 T ; RdPI. # ' &:, =' &:, K#

    0 # o ^ 5 %&: odPI.. mT T ! /' n ) oj.

    7Ah Z[ 2 ); J$ = B' ! . C# #3 ?j.

    +0 t 7b ' g $ 8 ss[ , ?& ?P"!# t ?M d) 1 J. ? .

    h 1 23 45 6. 1f +0# mT 1 SA 9(.. +

    1, IK 6? K* 9Dh ., 1 S9h ., + S#ij IK

    6V T dP }A.. +0 ?T D; 5 }V srDA.. ., 7X +0 t

    ? ab Z;h (. ?U ..

    mT h# #' ^ h ss[ T U`h 8 2 J.. h T S: NY x[ #.. = 7Z[ T o( ? O/b.. ?

    +0 c `1# O=PC$I.. ` = ~ ? k

  • 8/11/2019 Fifo Buffers

    12/12

    d#$ Sur6 ST h ? ^ P ; Zr dPj.