![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_551.png)
Applications
B-6
MPC801 USER’S MANUAL
MOTOROLA
B
B.1.2.2.2 Data Cache.
write directly into the content area of the data cache. In addition to this, the MPC801 allows
both writethrough and writeback operation. During normal operation, the following sequence
of tasks must be performed before enabling the data cache.
Data cache is a bidirectional cache. The core can read as well as
1. The cache must be unlocked in all locations by writing 101 (bin) to the CMD field of the
DC_CST register.
2. All cache locations must be invalidated by writing 101 (bin) to the CMD field of the
DC_CST register. This reset sequence guarantees that the data cache has no valid
garbage data when it is turned on.
3. Define cacheable and noncacheable regions and select write-back or write-through
mode for the cacheable region of main memory by initializing the memory
management unit. This must be performed before enabling the data cache.
After following this sequence, the instruction cache can be turned on by writing 001 (bin) to
the CMD field of the DC_CST register. Notice that since the data cache can only be
accessed by the core, no other bus master is allowed to alter the contents of the cache.
Cacheable memory locations should not be expected to contain correct data at a particular
time in writeback mode because the bus arbitration is transparent to the programmer. In this
situation, the SDMA of the MPC801 would be able to execute a read from a memory location
that may not yet be updated with new data from the cache.
In another example, if the SDMA writes to a cacheable location, the data in main memory is
now more updated than the valid entry available in the data cache. The next core access
from this location results in the core obtaining old data from the cache and not the updated
data from the main memory. This occurs because the cache has no knowledge that there is
newer data in main memory. Cacheable, noncachable, writethrough, and copyback regions
can be set up in memory by setting up the DMMU.
B.1.3 Memory Management Unit
This section describes the basic concepts and background information concerning the
MPC801 memory management unit. The MPC801 supports a demand paged virtual
memory environment. The term
demand
refers to the fact that software programs request
memory through effective addresses and the term
divided into blocks of the same size page frame. Each page frame is then divided into a
known page size—8M, 512K, 16K, 4K, or 1K. The operating system assigns pages to page
frames as required.
paged
refers to the fact that memory is
The principal memory management unit function is to translate an effective address to a real
address using translation tables stored in memory. When the memory management unit
receives an effective address from the load unit, it searches in each entry of its TLB for the
current page to get the corresponding real address. If the translation is in the TLB, the
memory management unit provides the real address to the cache controller, which
determines if the instruction or data being accessed is cached. When the translation is not
in the TLB, the memory management unit searches the translation tables in the memory for
the translation information. This is called a tablewalk.