The 545CK DSP core uses the same region-protection unit (RPU) discussed in Chapter 8 on the 212GP processor. Figure 12.5 shows how the Diamond RPU divides the 545CK DSP core’s 4-Gbyte memory space into eight equally sized, 512-Mbyte regions. The 545CK DSP core’s local data-memory address spaces fall into memory-protection region 1. Its local instruction-memory address space falls into memory-protection region 2. Thus the RPU can prevent accidental writes to instruction memory through the proper use of its protection mechanisms. The 545CK DSP core’s non-local address space (assigned to the PIF) falls into all eight memory-protection regions, so the RPU is also useful for protecting PIF-attached memory and devices.
The Diamond 545CK DSP core sets the memory-protection attributes for each region independently by setting 4-bit access-mode values in separate, 8-entry instruction and data TLBs. (Note: The three-letter abbreviation TLB stands for translation lookaside buffer but, for Diamond processor core RPUs, its definition is widened to mean “translation hardware.”) Each TLB has an entry for each of the eight memory-protection regions.
The access modes control both the protection level and the cache behavior for each of the eight memory-protection regions. The access modes appear in Table 12.4 and descriptions of the modes appear in Table 12.5. (Note: Tables 7.3 and 7.4 from Chapter 7 are repeated in this chapter as Tables 12.4 and 12.5.)
Access-mode value | Access-mode name | Instruction-fetch behavior | Load behavior | Store behavior |
---|---|---|---|---|
0000 | No Allocate | Instruction-fetch exception | No allocate | Write through/No allocate |
0001 (see Note) | Write-through/No write allocate | Allocat | Allocate | Write through/No write allocate |
0010 | Bypass | Bypass | Bypass | Bypass |
0011 | Not supported | Undefined | Load exception | Store exception |
0100 | Write-back | Allocate | Allocate | Write back/Write allocate |
0101–1101 | Reserved | Instruction-fetch exception | Load exception | Store exception |
1110 | Isolate | Instruction-fetch exception | Direct processor access to memory cache | Direct processor access to memory cache |
1111 | Illegal | Instruction-fetch exception | Load exception | Store exception |
Note: RPU access-mode 1 forces Diamond core data caches to operate in write-through mode even though all Diamond processor core data caches are pre-configured as write-back caches. |
RPU access mode | Access-mode description |
---|---|
No allocate | Do not allocate a cache line for this address. If the address is already cached, fetch or load the cached value. If the address has an allocated cache line but the cache line is not already in the cache, fetch or load the value from main memory and place the value in the cache. |
Bypass | Do not use the cache. |
Write back | Write the value to the cache and then update main memory when the cache line is evicted or when the processor forces the cache line to be written to main memory. |
Isolate | Permits direct read/write access to the cache’s data and tag RAM arrays. |
Illegal | Any access causes an exception. |