cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
poorchava
Newbie
Newbie
11,598 Views
Registered: ‎07-05-2013

FIFO read latency

I'm trying to implement an ansychronous fifo. The goal is to shift data in very fast and then read out when it's needed and refill when necessary.

 

The problem is that as far as write works ok, I observe ~6 read clock cycles latency for read operation

 

Write:

2013-07-05 11_01_21-ISim (P.58f) - [top_sch.wcfg].png

 

Read:

2013-07-05 11_02_17-ISim (P.58f) - [top_sch.wcfg].png

 

How do i get rid of latency? The read frequency is low, but the timing accuracy is critical, so i cannot afford to cycle trough first few record in order for the data to get valid.

 

What am I doing wrong?

0 Kudos
3 Replies
eteam00
Instructor
Instructor
11,594 Views
Registered: ‎07-21-2009

If you know that you will never be writing and reading from the FIFO simultaneously, then you do not need the Xilinx FIFO function and its considerable overhead.  Just use a dual-port RAM, with your own controller logic.  This will reduce the initial read latency considerably, to as little as one (read) clock cycle.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
gszakacs
Professor
Professor
11,589 Views
Registered: ‎08-14-2007

If you want to use the Xilinx coregen FIFO, you can't have clocks that stop as in your first

waveform for write clock.  The flag synchronization works on both clocks, so if either

clock stops the empty flag will not propagate to the output pin.

 

In your second waveform, I don't see the write related signals.  Your "six clock latency" is

mostly while the empty flag is asserted, which may or may not be due to the write clock stopping.

Once the empty flag deasserts, the read latency is one cycle.

-- Gabor
balkris
Xilinx Employee
Xilinx Employee
11,320 Views
Registered: ‎08-01-2008

Refer the latency information in PG057 FIFO Generator product guide. I think for asynchronous fifo 6 clock latency clock.
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos