pub fn clean_l1_data_cache<const A: usize, const N: usize, const S: usize>()Expand description
Clean the full L1 data cache.
ยงGenerics
- A: log2(ASSOCIATIVITY) rounded up to the next integer if necessary. For example, a 4-way associative cache will have a value of 2 and a 8-way associative cache will have a value of 3.
- N: log2(LINE LENGTH). For example, a 32-byte line length (4 words) will have a value of 5.
- S: log2(NUM OF SETS). For systems with a fixed cache size, the number of sets can be
calculated using
CACHE SIZE / (LINE LENGTH * ASSOCIATIVITY). For example, a 4-way associative 32kB L1 cache with a 32-byte line length (4 words) will have 32768 / (32 * 4) == 256 sets and S will have a value of 8.