How is FIFO implemented in FPGA and ASIC?

Hi,

Could anyone explain why FIFO is difficult to implement in FPGA and ASIC? and how is FIFO implemented in FPGA and ASIC.

Thanks, Wei

Reply to
Wei Wang
Loading thread data ...

Where did you read that a FIFO is difficult to implement?

Reply to
MikeShepherd564

Wei,

According to WHOIS, you're posting from Advanced RISC Machines Ltd. I bet there are several people in your office who can answer that for you.

Perhaps no one in the office will talk to you? Googling fifo+fpga returns

400k hits. Adding I'm+a+little+teapot to the search gets you down to 7.

HTH., Syms.

p.s.

formatting link

p.p.s.

formatting link

Reply to
Symon

With dual port memory, like many FPGAs and ASICs have it isn't difficult to implement. It isn't for beginners, but it isn't that hard, either.

In FPGA they are implemented with dual port memory and two counters. Also, logic to compare the counters to generate the full and empty status lines.

-- glen

Reply to
glen herrmannsfeldt

"FIFO" is a broad term and can be either simple or complicated. For starters, a synchronous (single clock), small FIFO should be easy to understand and implement. See, for example:

formatting link

FIFOs get more complex than that. They can have different clocks for read and write, they can be large and require a dual port memory block, etc.

Start with the simple, advance to the more sophisticated when you need.

Eli

Reply to
Eli Bendersky

Hi Glen, My favourite FPGA FIFO design is described in XAPP291. The counters' storage elements are part of the dual port RAM. "Their advantage is in using only one clock load." Cheers, Syms.

Reply to
Symon

I'm not planning to start at all. I was asking a question of the original poster.

Reply to
MikeShepherd564

elements are part of

Pah, I'll beat that for elegance and simplicity....

process(clk,rst) begin one_bit_fifo

Reply to
Nial Stewart

I reckon the question was about asynchronous FIFOs and possibly more on the ASIC side, the Full and Empty signals need some care.

Reply to
jack.harvard

Let me throw in my usual tutorial: If you have a dual-ported RAM, designing a synchronous (single-clock) FIFO is trivial. Designing an asynchronous (two independent clocks) FIFO faces the tricky issue of detecting Full and Empty. That means detecting the identity of two counters, which is best done with Gray-coded counters (which in turn makes it difficult to perform arithmetic on them).

The leading edges of Full and Empty are unproblematic, since they are generated by the "proper" clock (Empty is generated by a read operation, and only the read side is interested in the Empty signal) The VERY TRICKY issues are the trailing edges of Full and Empty, since they are caused by the "wrong" clock, and thus require synchronization, and face the UGLY issue of metastability. Enough problems to give you some grey hair... Peter Alfke

Reply to
Peter Alfke

Peter Alfke schrieb:

So it looks like you designed quite a lot of those nasty FIFOs . . .

SCNR Falk

Reply to
Falk Brunner

Yes, grey hair, but (still) lots of it ! Today is my 20th anniversary at Xilinx. It has been a very good experience, in every respect... Peter

Reply to
Peter Alfke

Asynchronous FIFO implementation is also explained in Steve Kilts' Advanced FPGA Design book, although not in great details.

Reply to
jack.harvard

Peter Alfke schrieb:

Congratulations!

Regards Falk

Reply to
Falk Brunner

Or just use "coregen". The FIFO's generated by it work pretty darn well. ;)

G.

Reply to
ghelbig

Reply to
Brian Drummond

It's been very good for us too. Many thanks.

--
These are my opinions, not necessarily my employer's.  I hate spam.
Reply to
Hal Murray

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.