SPRUIU1C July 2020 – February 2024 DRA821U , DRA821U-Q1
MSMC has registers to provide software control to determine which portion of the on-chip SRAM will be used as cache data store. To maximize this flexibility, the associativity of the level 3 data cache scales with the desired cache size. The 32 ways in each snoop filter set are separated into 8 groups of 4 ways each as shown in Table 8-6.
Group 0 | Group 1 | Group 2 | Group 3 | |
---|---|---|---|---|
Way 0 | 0 | 4 | 8 | 12 |
Way 1 | 1 | 5 | 9 | 13 |
Way 2 | 2 | 6 | 10 | 14 |
Way 3 | 3 | 7 | 11 | 15 |
Group 4 | Group 5 | Group 6 | Group 7 | |
Way 0 | 16 | 20 | 24 | 28 |
Way 1 | 17 | 21 | 25 | 29 |
Way 2 | 18 | 22 | 26 | 30 |
Way 3 | 19 | 23 | 27 | 31 |
The MSMC_CACHE_CTRL[3-0] CACHE_SIZE bit field controls the cache size by selecting how many way groups are backed with data. Table 8-7 describes the encodings of the CACHE_SIZE field.
CACHE_SIZE | Number of Active Way Groups | Total Active Data Ways |
---|---|---|
0x0 | 0 | 0 ways |
0x1 | 1 | 4 ways |
0x2 | 2 | 8 ways |
0x3 | 3 | 12 ways |
0x4 | 4 | 16 ways |
0x5 | 5 | 20 ways |
0x6 | 6 | 24 ways |
0x7 | 7 | 28 ways |
0x8 | 8 | 32 ways |
Writing a new value to the CACHE_SIZE field begins the cache size transition process. The MSMC hardware sets the MSMC_CACHE_CTRL[4] SZ_TRANSITION bit to 0x1 during this transition process. When the transition process completes hardware sets SZ_TRANSITION to 0x0. During this transition time window:
After setting a new CACHE_SIZE value, software can poll the SZ_TRANSITION bit to know when the transition is complete. At that point the new CACHE_SIZE value can be read in the MSMC_CACHE_CTRL[3-0] CACHE_SIZE bit field.
As the cache scales up in size, the memory-mapped space shrinks by the same amount, appearing as though the cache grows from the top of the memory mapped region down. This provides a single contiguous memory-mapped window starting from the SRAM base address. The memory space occupied by the cache is no longer accessible as memory-mapped SRAM and any accesses to this space return an addressing error.