Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21595 Discussions

some problem about FIFO

Altera_Forum
Honored Contributor II
1,429 Views

Hello everyone! 

I created a FIFO using megaWizard.I used it to store the data from the ADC. When I used 

the 1M FIFO CLK,it works properly. But I used the 2M FIFO CLK ,it don't work properly.I used 

signalTap to watch it find that the input data is right,but the output data (reading from fifo) is  

wrong( Maintain a certain value). 

The problem confused me. I want to know the reason. 

Thank you very much
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
688 Views

I am very confused with it. Who can help me ?

0 Kudos
Altera_Forum
Honored Contributor II
688 Views

Who can help me

0 Kudos
Altera_Forum
Honored Contributor II
688 Views

Are you sampling the FIFO empty, full, and empty signals? If not I recommend you do just in case your FIFO is over/underflowing at the higher clock rate.

0 Kudos
Altera_Forum
Honored Contributor II
688 Views

Yes I think you are right. I just use MCU read the full signal , I think because the frenquency of MCU is too low. I don't understand how the fifo works. When the fifo is full, and writing it,how the fifo works.

0 Kudos
Altera_Forum
Honored Contributor II
688 Views

The FIFO has different behaviors depending on the parameterization. If you turn on overflow protection then if you write to a full FIFO the data being written into the FIFO will be dropped and the FIFO will remain full. If overflow protection is off the data will be written into the FIFO and the FIFO will go from being full to having only one word buffered (internal pointers will cross). 

 

If the ADC data is coming in too fast then I would use a DMA to pull the contents out of the FIFO into memory then have the CPU access the data in memory. You could also take this one step further and implement multiple buffers in memory so that when the CPU is bogged down the DMA will continue to buffer more data while the CPU tries to catch up.
0 Kudos
Reply