Hello
Suppose the function "Matrix multiplication" is a calculation performing on InBuffer and OutBuffer. InBuffer and OutBuffer are resided on MSMC, which is programmed as SL2. In this condition, I am aware that data on SL2 is cached on L1D, and SW needs to maintain the cache coherency between L1D and MSMC. Supposing that the size of OutBuffer is 50KB, which is larger than the size of L1D. So when I use the CSL codes, CACHE_InvL2(OutBuffer, sizeof(OutBuffer), CACHE_WAIT);, does the HW determines which area needs to be writeback, and only writeback those area related with OutBuffer? Or the HW just writeback the entire L1D, because the size of OutBuffer is larger than L1D.
Or maybe the data in OutBuffer is not cached because of L1D is read-allocated?
A similar question, what will be invalidated if InBuffer size larger than L1D? Note: InBuffer is previously cached in L1D, because those three lines of codes are contained in a "for" loop.
CACHE_invL1d(InBuffer, sizeof(InBuffer), CACHE_WAIT); Matrix_multiplication(InBuffer, OutBuffer) CACHE_wbL1d(OutBuffer, sizeof(OutBuffer), CACHE_WAIT);
Thanks.
Xining Yu