UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor eugeth20
Visitor
190 Views
Registered: ‎11-11-2016

FIFO Generator v.13.2 Data count

Jump to solution

Good morning, 

I am exploiting the FIFO Generator v.13.2 with the following configuration:

- Data length 32-bit R/W, FIFO length is 4096, Native I/F; 

- Independent Clocks, Block RAM implementation, 2 sync stages;

- FWFT behaviour, synchronized reset with security circuit;

- No programmable full/empty thresholds.

As depicted from the attached picture, the wr_data_count/rd_data_count behaviour when the FIFO is empty is quite weird: while writing, count goes up to 1, then goes down back to 0, and eventually remains stuck at N-2 (i.e., if 1024 words were written, wr_data_count and rd_data_count are stuck at 1022).This behaviour is registered with both simple and more accurate data counts settings. Any suggestions?

Thanks in advance!

Eugenio

Cattura.PNG
0 Kudos
1 Solution

Accepted Solutions
Scholar drjohnsmith
Scholar
147 Views
Registered: ‎07-09-2009

Re: FIFO Generator v.13.2 Data count

Jump to solution

also look at page 111 on the 'strange' actions of these counters..

https://www.xilinx.com/support/documentation/ip_documentation/fifo_generator/v13_1/pg057-fifo-generator.pdf

Perosnaly, I only ever use them as indicatoins, and use the prograbable flags if I want a specific under / over marker.

 

 

 

 

0 Kudos
5 Replies
Scholar drjohnsmith
Scholar
182 Views
Registered: ‎07-09-2009

Re: FIFO Generator v.13.2 Data count

Jump to solution

Due to the nature of how the read / write counters need to work across the two clock domains,

    I understand the documents on the fifos says to only use these as indicators or such like,

       you should use the full / empty flags to know when to read / write the fifo,

 

 

0 Kudos
Visitor eugeth20
Visitor
168 Views
Registered: ‎11-11-2016

Re: FIFO Generator v.13.2 Data count

Jump to solution

Hello drjohnsmith,

thank you for answering. I do understand that counters belong to different clocks domains, but I do not see why they should decrease during write-only operations.

Best regards.

0 Kudos
Scholar drjohnsmith
Scholar
152 Views
Registered: ‎07-09-2009

Re: FIFO Generator v.13.2 Data count

Jump to solution

have a look at the dat asheet,

page 18 for instance,

 

"The count is guaranteed to never under-report the number of words in the FIFO, to ensure you

never overflow the FIFO. The exception to this behavior is when a write operation occurs at the rising edge of wr_clk/

clk, that write operation will only be reflected on wr_data_count at the next rising clock edge.

If D is less than log2(FIFO depth)-1, the bus is truncated by removing the least-significant bits."

 

0 Kudos
Scholar drjohnsmith
Scholar
148 Views
Registered: ‎07-09-2009

Re: FIFO Generator v.13.2 Data count

Jump to solution

also look at page 111 on the 'strange' actions of these counters..

https://www.xilinx.com/support/documentation/ip_documentation/fifo_generator/v13_1/pg057-fifo-generator.pdf

Perosnaly, I only ever use them as indicatoins, and use the prograbable flags if I want a specific under / over marker.

 

 

 

 

0 Kudos
Visitor eugeth20
Visitor
137 Views
Registered: ‎11-11-2016

Re: FIFO Generator v.13.2 Data count

Jump to solution

Thank you for your explanation, I just wished the datasheet provided some more useful examples as it is not clear at all which behaviour is to be expected.

Best regards.
Eugenio

0 Kudos