Altera_Forum
Honored Contributor
14 years agofifo-dma, memset. good test or not?
My prototypesystem uses a dma to fetch data from a fifo to my SDRAM.
i want to test that the cpu has the time to play around with the data between each read from fifo without the fifo overflowing. this is my testloop: while(1){ alt_dma_rxchan_prepare(rxbuf,.....); if(altera_avalon_fifo_read_level > testlimit){ printf("altera_avalon_fifo_read_level") } memset(rxbuf,...); memset(rxbuf,...); memset(rxbuf,...); memset(rxbuf,...); memset(rxbuf,...); } my test runs nice, but can i conclude that the CPU and SDRAM are kept busy during the memset's? what i about is that the compiler might optimize away all memsets but the last. Thanks