7.3. The Diamond RPU

Early microprocessors of the 1970s had one unified memory space. As microprocessor usage became more sophisticated, microprocessors started to run multiple tasks and single, unified memory spaces became cumbersome because the unified memory space allowed independent tasks to easily access to memory regions assigned to other tasks. This lack of inter-task memory barriers resulted in spectacular system crashes, which gave rise to the use of the RTOSs to manage the multiple tasks. All of the Diamond Standard Series processor cores except for the 232L core provide hardware support for memory protection through an RPU.

Note: The 232L CPU core incorporates a memory-management unit (MMU) that supports more complex operating systems such as Linux. The access modes used in the TLB contained in the 232L’s MMU are similar to those implemented in the TLBs contained in the RPUs of the other Diamond cores.

As Figure 7.4 illustrates, the Diamond RPU divides the processor’s 4-Gbyte memory space into eight equally sized, 512-Mbyte regions. The Diamond 108Mini processor core’s two local data-memory address spaces fall into memory-protection region 1 and 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 Diamond 108Mini core’s non-local address space (assigned to the PIF) falls into all eight memory-protection regions, so the 108Mini controller core’s RPU is also useful for managing access to PIF-attached memory and devices.

Figure 7.4. The Diamond cores’ RPU divides the processors’ memory space into eight protected regions and the Diamond 108Mini core’s local data and instruction memories map into memory-protection regions 1 and 2, respectively so the RPU can prevent accidental writes to instruction memory through the proper use of its protection mechanisms.


The Diamond processor sets the memory-protection attributes for each region independently by setting 4-bit access-mode values in separate, 8-entry, instruction and data TLBs. Each TLB has an entry for each of the eight memory-protection regions.

The TLB 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 7.3 and descriptions of the modes appear in Table 7.4.

Table 7.3. Diamond RPU access modes
Access-mode valueAccess-mode nameInstruction-fetch behaviorLoad behaviorStore behavior
0000No allocateInstruction-fetch exceptionNo allocateWrite-through/No allocate
0001Write-through/No write allocateAllocateAllocateWrite-through/No write allocate
0010BypassBypassBypassBypass
0011Not supportedUndefinedLoad exceptionStore exception
0100Write-back mapped region with write-back cache optionAllocateAllocateWrite-back/Write allocate
 Write-back mapped region allocate without write-back cache optionAllocateAllocateWrite-through/No write
0101–1101ReservedInstruction-fetch exceptionLoad exceptionStore exception
1110IsolateInstruction-fetch exceptionDirect processor access to memory cacheDirect processor access to memory cache
1111IllegalInstruction-fetch exceptionLoad exceptionStore exception

Table 7.4. Diamond RPU access-mode descriptions
RPU access modeAccess-mode description
No allocateDo 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.
BypassDo not use the cache.
Write-backWrite the value to the cache. Update main memory only when the cache line is evicted or when the processor forces the cache line to be written to main memory.
Write-throughWrite the value to the cache and to main memory simultaneously.
IsolatePermits direct read/write access to the cache’s data and tag RAM arrays.
IllegalAny access causes an exception.

Note: Because the Diamond 108Mini processor core has no instruction or data caches, it ignores all of the TLB’s cache-related attributes and always acts as though cache-bypass mode is set. For completeness, Tables 7.3 and 7.4 list all of the Diamond RPU TLB’s access-mode behaviors for all Diamond cores including the cache-access controls not supported (or needed) by the Diamond 108Mini processor core.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.162.249