FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-25-2005, 03:47 PM
Nemesis
Guest
 
Posts: n/a
Default Xilinx FIFO Generator: FIFO Length

Hi all,
I need a 16 words deep FIFO. I'm using the Xilinx FIFO Generator Core.
I chosen an asynchronous FIFO, but I found an odd behaviour. The FIFO
stores only 15 words then the Full Flag goes high.
Is it normal? Why isn't it storing 16 words?

I tried to monitor the number of words in the FIFO so I added the
RD_DATA_COUNT and WR_DATA_COUNT outputs, they should 4 bits wide but
instead they are 2 bits wide, so the count arrives at 3 and then it
stops.
Where is my error?

I'm starting thinking tha in order to have 16 words I have to implement
a 32 words FIFO.

Reply With Quote
  #2 (permalink)  
Old 10-25-2005, 04:06 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length

You "chose an asynchronous FIFO" design. Why? Is your design
synchronous, with the same clock for read and write? If so, use the
synchronous design, it is much simpler and easier to understand.
What is the max clock rate? Which Virtex or Spartan family?
Peter Alfke

Reply With Quote
  #3 (permalink)  
Old 10-25-2005, 04:41 PM
Nemesis
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length

Peter Alfke wrote:

> You "chose an asynchronous FIFO" design. Why?


I chose the asynchronous one because I need two different clocks for
reading and writing. Clock for write is 128 MHz. clock for read is 32
MHz.

> Which Virtex or Spartan family?


VirtexII, VP50.

Reply With Quote
  #4 (permalink)  
Old 10-25-2005, 07:33 PM
Robert
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length

This is not an answer to your query but rather a question to you:

How did you include the generated FIFO from Core Generator in your
project? (I am assuming you're using ISE)

Did you have to compile the cores seperately? Or did ISE take care of
it?

Reply With Quote
  #5 (permalink)  
Old 10-25-2005, 08:21 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length

If your 32 MHz clock is really derived from, and thus synchronous with,
the 128 MHz, then I would treat this as a synchronous FIFO.
Asynchronous means that you have no idea of, and no control over, the
phase relationship between the two clocks. And asynchronous FIFO
control is far trickier than synchronous, just because of the unknown
and shifting phase relationships, and the associated possible decoding
glitches and even metastability. Synchronism makes all this so much
easier.
Peter Alfke

Reply With Quote
  #6 (permalink)  
Old 10-26-2005, 09:47 AM
Nemesis
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length


Robert wrote:
> This is not an answer to your query but rather a question to you:
>
> How did you include the generated FIFO from Core Generator in your
> project? (I am assuming you're using ISE)
>
> Did you have to compile the cores seperately? Or did ISE take care of
> it?


I use ISE7.1. FIFO Generator works exactly like other cores. I just
clicked on "Add new Source...".
When I used ISE6.3 I was not able to get FIFO Generator work, it always
generated empty cores!

Reply With Quote
  #7 (permalink)  
Old 10-26-2005, 10:00 AM
Nemesis
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length


Peter Alfke wrote:
> If your 32 MHz clock is really derived from, and thus synchronous with,
> the 128 MHz, then I would treat this as a synchronous FIFO.


In the final design they should be synchronous, I should get them from
a DCM with a 64MHz input. Now I just create them in the testbench.
Anyway I don't think this is the problem, the test I'm performing is
very simple, first I raise the wr_enable, I wait for the FULL signal,
and then I lower the wr_enable and after a little bit of time I raise
the rd_enable.

> Asynchronous means that you have no idea of, and no control over, the
> phase relationship between the two clocks. And asynchronous FIFO
> control is far trickier than synchronous, just because of the unknown
> and shifting phase relationships, and the associated possible decoding
> glitches and even metastability. Synchronism makes all this so much
> easier.


I understand that asynchronous FIFOs are more trickier than synchronous
ones ... but I don't want to use a synchronous FIFO, the clocks
relation is not fixed, their ratio could change in the future.
So I'm just asking, is possible to store 16 words in a 16 words deep
FIFO? Or "Deep N" means that I can only store N-1 words?
Is this problem somehow related to the old asynchronous-fifo core
behaviour? I remember that it let me chose only the length like
7,15,31,63 ... i.e. (2^N)-1.

Reply With Quote
  #8 (permalink)  
Old 10-26-2005, 10:26 AM
Nemesis
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length


Nemesis ha scritto:

[...]

> Is this problem somehow related to the old asynchronous-fifo core
> behaviour? I remember that it let me chose only the length like
> 7,15,31,63 ... i.e. (2^N)-1.


OK, I just read carefully the summary screens that appears at the of
the FIFO customization ...
When you chose an asynchronous FIFO it says: "Write Depth:15 Read
Depth:15. Actual FIFO depth differs from specified depth in this
configuration".
So this is a "limit" of the asyncrhonous FIFO.

Reply With Quote
  #9 (permalink)  
Old 10-26-2005, 12:11 PM
Hal Murray
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length

>So I'm just asking, is possible to store 16 words in a 16 words deep
>FIFO? Or "Deep N" means that I can only store N-1 words?


It's possible, but not simple. Keeping track of 0 to 16 words
in a FIFO requires 17 states. That won't fit in 4 bits.

--
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.

Reply With Quote
  #10 (permalink)  
Old 10-26-2005, 04:32 PM
Nemesis
Guest
 
Posts: n/a
Default Re: Xilinx FIFO Generator: FIFO Length


Hal Murray wrote:
> >So I'm just asking, is possible to store 16 words in a 16 words deep
> >FIFO? Or "Deep N" means that I can only store N-1 words?

>
> It's possible, but not simple. Keeping track of 0 to 16 words
> in a FIFO requires 17 states. That won't fit in 4 bits.


OK.
Is this true also for synchronous FIFO?
In this case FIFO Generator announce a depth equal to 16

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xilinx: XST synchronous FIFO using BRAMs Sidney Cadot FPGA 26 07-06-2005 12:48 PM
what's the difference between syn FIFO and asyn FIFO? changewhere FPGA 1 02-23-2005 04:02 PM
Xilinx Post Place and Route FIFO problems Brad Smallridge FPGA 10 02-17-2005 11:39 PM
Xilinx BRAM FIFO problems ModelSim Post Place and Route Brad Smallridge FPGA 3 02-14-2005 08:13 PM
Xilinx FIFO Brad Smallridge FPGA 6 12-20-2004 10:45 PM


All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved