
311
Chapter 6 Memory Mangement Unit
but the execution of all programs from within the limited sized SRAM cache will be
attempted, and the DRAM will only be accessed when a page–to or page–from sec-
ondary memory needs copying.
There are many different PTE table arrangements. Some systems have multiple
layers of PTEs, where a higher level PTE points to tables of lower level PTEs. In mul-
ti–tasking systems, each task may have its own table of PTEs. And if the Supervisor
code also executes with address translation, then it may also have a table of PTEs. To
simplify our example system, we will assume the supervisor always runs in physical
mode, and there is a single table of PTEs shared by all User mode programs. To evalu-
ate the system performance, only single User mode tasks will be run, in particular the
nroff
and
assembler
utility programs.
PTEs need not have the same structure as TLB entries. They typically do not.
This enables the memory management system to keep additional page information in
memory and only cache critical data in the TLB registers. In addition it may be pos-
sible to compact information into a smaller PTE structure, which results in a substan-
tial space saving in systems which keep extensive PTE tables permanently in physi-
cal memory (in our case SRAM). For the example system, PTEs shall have exactly
the same format as TLB entries. The method has the benefit that TLB entries can be
loaded from PTE memory location directly without additional processor cycles be-
ing expended in reformatting.
The PTE format will be 4–way set associative. The number of sets shall be lim-
ited by the amount of available SRAM cache memory, but a lower limit of 32, estab-
lished by the Am29000, is required. Given a minimum page size of 1K bytes, the
SRAM can not be smaller that 128K bytes (1K x 4 x 32). If the number of PTE sets is
greater than 32, then the cache has more set resolution than the TLBs. In this case a
TLB set caches entries for more than one PTE set, and the TLB VTAG field has more
address resolution than the PTE VTAG field requires.
Each TLB entry indicates how the user’s virtual address is mapped into an
SRAM page number (given by the TLB RPN entry). The PTE entries must have a
mapping relationship with DRAM memory pages and SRAM memory pages. The
entries use the PTE RPN field to store the DRAM page number. PTEs also have a
mapping relationship with SRAM pages. This enables the memory page maintained
by the PTE to be moved between SRAM and DRAM. The PTE SRAM mapping is
simple. PTEs and SRAM pages are stored consecutively in memory, as are SRAM
pages. Given the PTE address, the corresponding SRAM page address can be found
by determining the PTE address displacement from the PTE table base. The PTE dis-
placement, multiplied by the page size, will locate the SRAM page relative to the
base address of SRAM pages. Figure 6-12 outlines the system.