Another Cortex-M7 question that was kind of hard to answer from the docs: what a...
cliffle @cliffle@hachyderm.io
Another Cortex-M7 question that was kind of hard to answer from the docs: what accesses go to dcache, vs icache?
The answer turns out to be very simple. Accesses from the PreFetch Unit go to icache; accesses from the LoadStore Unit go to dcache.
This was not true in all cached ARM cores. I recall something circa 2011 that would route PC-relative loads to icache, under the assumption that a PC-relative literal might share a line with code.
Loads from lookup tables using the TBB/TBH instructions appear to go through the LSU, not the PFU, which means your branch tables are probably in dcache. This means there's no good reason to place them next to hot instructions; align them to a cache line wherever they fit. (This is a little surprising, since idiomatically they immediately follow the TBx instruction and are likely in icache.)