Showing results for 
Search instead for 
Did you mean: 
Registered: ‎03-14-2012

wr_data_count,full signal goes wrong when i use asynchronous FIFO with peeking


I use FIFO generator generated a FIFO. The FIFO is an asynchronous one. I chose "First word, first through", so the FIFO is with peeking. The FIFO's width is 72bit, and its depth is 1024(it can store 1023 data accordding to ug175).

however, when i simulate it, there is something strange:

figure 1 on the attachment shows how the FIFO act when inserting data into it. But in the cycle din = 15 and din = 16, the wr_data_count isn't increased. So does the cycle when din = 17 and 18.

figure 2 shows when all the 1023 data are inserted into the FIFO, the wr_data_count is finally 1021, and full, almost_full are not assertted. 

this is strange, when i sroted 1023 data, the full and almost_full should be 1, and wr_data_count should be 1023.

0 Kudos
2 Replies
Registered: ‎07-21-2009

FIFO simulation models

This may be helpful to you (from PG057, FIFO Generator Product Guide):


Note: If independent clocks or common clocks with built-in FIFO is selected, the user must use the structural model, as the behavioral model does not support the built-in FIFO configurations.

Structural Models


The structural models are designed to provide a more accurate model of FIFO behavior at the cost of simulation time. These models will provide a closer approximation of cycle accuracy across clock domains for asynchronous FIFOs. No asynchronous FIFO model can be 100% cycle accurate as physical relationships between the clock domains, including temperature, process, and frequency relationships, affect the domain crossing indeterminately.


-- Bob Elkind

README for newbies is here:

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
Registered: ‎03-14-2012

Re: FIFO simulation models

Thank you very much.

I finally find it in UG175. It says the counter is not accurate when the counter's value is small. 

0 Kudos