electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

fifo pointers - Y only gray code pointers are used ???


Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> fifo pointers - Y only gray code pointers are used ???
Author Message
lakshman.ar



Joined: 29 Nov 2006
Posts: 89
Helped: 8


Post13 Nov 2007 8:38   

fifo pointers - Y only gray code pointers are used ???


hi every1,

this is a question which was asked in the interview !!

why do v use only "gray code" pointers as read pointers and write pointers while implementing FIFO ???? .... y not binary ????
Back to top
Google
AdSense
Google Adsense




Post13 Nov 2007 8:38   

Ads




Back to top
wkong_zhu



Joined: 13 Nov 2004
Posts: 171
Helped: 2


Post13 Nov 2007 9:11   

fifo pointers - Y only gray code pointers are used ???


if you implement an async fifo, you must use gray code fifo pointer to aviod metastable or glitch problems.

eg: ptr[3:0] is binary code, when a state change, the 4 bits are not changed at the same time. so there may be some time that ptr turns to be a transition state.(4'b101 -> 4'b110, there may be 4'b100 or 4'b111 states). that will make your async logic to judge fifo empty/full fail.
Back to top
lakshman.ar



Joined: 29 Nov 2006
Posts: 89
Helped: 8


Post13 Nov 2007 9:15   

fifo pointers - Y only gray code pointers are used ???


1) meta-stable
2)glitches ... anything els ????

cos 4 the same answer, the reply was
"apart 4m this wat els is important ???? .. u are missing some major things " ....
Back to top
kanagavel_docs



Joined: 18 Aug 2007
Posts: 40
Helped: 7


Post13 Nov 2007 9:20   

Re: fifo pointers - Y only gray code pointers are used ???


Without synchronizing we can compare the pointers asynchronously to generate FULL/EMPTY signals.

Regards,
Kanags
Back to top
vlsi_whiz



Joined: 12 Nov 2005
Posts: 171
Helped: 24


Post13 Nov 2007 10:48   

Re: fifo pointers - Y only gray code pointers are used ???


When designing asynch FIFOs, we must use Gray style pointers to avoid errors when comparing the read and write pointers.

To compare the read pointer with the write pointer for Full flag, we need to take the read pointer to the write clock domain.

When this is done using binary style pointers, the read pinter address value changes more than one bit and thus can lead to errors when comparing the pointers. When using Gray style logic, the bit change is limited to only one-bit and thus the comparison errors are eliminated or minimized.

This is the main reason why gray style pointers are used rather than binary.
Back to top
donald007



Joined: 28 Aug 2007
Posts: 11
Helped: 1
Location: TAIWAN


Post13 Nov 2007 16:22   

fifo pointers - Y only gray code pointers are used ???


The reason of using gray code is that multi-bit synchronization problems.
Only one bit change.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> fifo pointers - Y only gray code pointers are used ???
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
about FIFO,uses LFSR/Gray for read/write pointers (13)
Pointers (7)
Function Pointers in C (9)
pointers in MATLAB? (1)
Pointers in verilog??? (4)
Understanding pointers in C (3)
creating pointers in verilog (3)
C language - pointers to functions (4)
Pointers to struct assignment (1)
[C] What's pointers like *** mean? (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS