fifo occupancy bigger than fifo size?

Apr 04, 2007 4 Replies

Note: using EDk 8.2.02 with peripheral generated with the wizard with FIFO enabled and one user interrupt that is set to the fifo_almostfull line.



I'm set up to generate interrupts on the fifo almost full signal but I get a couple interrupts and then it stops. If I go read the occupancy register I get a number(0x737) greater than the size of the fifo (0x400). If I then go and manually read from the fifo data register(from gdb) I can get the occupancy to go back to 0x400 and the next interrupt occurs when I run but they stop shortly after.



So, How could the occupancy be greater than the size of the fifo? Have you seen anything like this before?



Thanks, Clark


FYI, I found that by gating the fifo write request with the fifo full signal I could prevent this problem. Apparently the fifo does not like to be written to once it is already full.

-Clark

a

go

In my defense, this is the only module (in my design) that isn't idiot proof thus my surprise at having to gate the write myself. One could argue that if xilinx is the one telling me (the user) the fifo is full shouldn't they already know not to allow any more writes? But I get your point.

-Clark

signal

FIFO

line.

get

register I

then

but

You have a loss-of-data condition which should NEVER be handled politely and automatically by the FIFO. You should either have the system designed to never be in that situation or use the (almost) full flag to make things happen so you don't overfill; usually this means shutting off the flow of data, not simply ignoring it.

cp> In my defense, this is the only module (in my design) that isn't idiot proof

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required