Altera_Forum
Honored Contributor
20 years agoDoes alt_dcache_flush_all() work right?
Hi:
I want to flush all dcache of niosII/f core, I find a function in kitsv1.1\nios2\components\altera_nios2\HAL\src\alt_dcache_flush_all.c , but I wonder if it is correct. the function is like that: /* * alt_dcache_flush_all() is called to flush the entire data cache. */ void alt_dcache_flush_all (void) {# if NIOS2_DCACHE_SIZE > 0 alt_dcache_flush (0, NIOS2_DCACHE_SIZE);# endif } I read the src of function alt_dcache_flush (void* start, alt_u32 len) in alt_dcache_flush.c. the first param is an address second is a size. we can invoke it like that alt_dcache_flush(&iVal , sizeof(iVal) ), but what does it mean to pass a zero to it as first param just like alt_dcache_flush_all() does? Is it correct? I am anxious to know the answer. Who can give me some advice? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif