Forum Discussion
Altera_Forum
Honored Contributor
16 years agoa problem in using the fifo
Recently, i designed a project, in the project i used fifo ip core. the fifo has wraddr and rdaddr port. As my understanding , if i read the fifo , these two address should decrease, if i write t...
Altera_Forum
Honored Contributor
16 years agoDecrease? The FIFO counters should always increase. A write increases the write pointer and a read increases the read counter. The difference between these two counters is basically how many words are in your FIFO. Now technically, the FIFO should always count up, but there's a very strange situation where it can "flip" and always count down. The only way this will happen is if you have a glitchy clock. There's a thread on here about it.
http://www.alteraforum.com/forum/showthread.php?t=1615&highlight=gray+counter I would first signaltap when it's working and make sure they always increase, then find what the do when its not working(it's hard to debug since it's a gray counter, not binary, and so the direction isn't obvious). If it's truly flipping to counting down, then you have a glitch on your clock.