Instruction Cache
9-10
MPC801 USER’S MANUAL
MOTOROLA
9
To enable the instruction cache, set the cache enable command in the IC_CST register. This
operation is privileged and if you try to use it when the core is in the problem state
(MSR
PR
=1) a program interrupt will occur. This command has no error cases that you need
to check. When fetching from cache-inhibited regions the full line is brought to the internal
burst buffer. Instructions that originate in a cache-inhibited region are stored in the burst
buffer and can be sent to the MPC801 core no more than once before being refetched. In
the memory management unit, you can program a memory region to be cache-inhibited.
When doing so, you must unlock all previously locked lines containing code that originated
in this memory region, invalidate all lines containing code that originated in this memory
region, and execute an
isync
instruction.
NOTE
Failure to follow these steps causes code from cache-inhibited
regions to be left inside the cache and any reference to these
regions will result in a cache hit. If a reference to a
cache-inhibited region results in a cache hit, the data is sent to
the core from the cache and not from memory.
When the MPC801 asserts the freeze signal, it indicates that the MPC801 is under debug
and all fetches from the cache are treated as if they were from the cache-inhibited memory
region. For more information on cache debug support, refer to
Section 9.9 Debug Support
.
9.4.7 Instruction Cache Read
The MPC801 allows you to read all data stored in the instruction cache, including the content
of the tags array. However, this operation is privileged and if you try to use it when the core
is in the problem state (MSR
PR
=1) a program interrupt will occur. To read the data stored in
the instruction cache, follow these steps:
1. Write the address of the data to be read to the IC_ADR register. You can also read this
register for debugging purposes.
2. Read the IC_DAT register.
So that it can access all parts of the instruction cache, the IC_ADR register is divided into
the fields shown in Table 9-4.
Table 9-1. IC_ADR Bits Functionality for the Cache Read Command
0-17
18
19
20
21-27
28-29
30-31
Reserved
0 - Tag
1 - Data
0 - Way 0
1 - Way 1
Reserved
Set Select
Word Select
(Used Only For
Data Array)
Reserved