Forum Discussion
Altera_Forum
Honored Contributor
12 years agoIf you have a data cache then this won't work. On the first loop iteration the CPU will read from your FIFO, but for the next iterations it will just read the value again from the cache instead of accessing your FIFO. Something like this would be better (not tested)
#include <sys/alt_cache.h>
alt_16 *my_fifo = alt_remap_uncached((void*)CUSTOM_FIFO_IP_BASE,sizeof(alt_16));
for(counter = 0 ;counter < 255 ;counter++)
{
write_buffer = *my_fifo ;
}