![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_159.png)
Instruction Cache
9-8
MPC801 USER’S MANUAL
MOTOROLA
9
Only commands that are not immediately executed need to be followed by an
instruction for the hardware to perform them correctly. However, all commands need to be
followed by an
isync
to make sure all instruction fetches that are after the instruction cache
command in the program stream are affected by the instruction cache command. When the
instruction cache is executing a command it is busy, so it stops any treatment of core
requests. This eventually results in a machine stall.
isync
9.4.1 Instruction Cache Block Invalidate
The MPC801 implements the
cache. This instruction does not broadcast on the external bus and the MPC801 does not
snoop this instruction if it is broadcasted by other masters. This command is not privileged
and has no associated error cases. The instruction cache performs this instruction in one
clock cycle. To accurately calculate the latency of this instruction, bus latency should be
taken into consideration.
icbi
instruction
as if it only pertains to the MPC801 instruction
9.4.2 Invalidate All Instruction Cache
The invalidate all instruction cache 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. When it is invoked
and MSR
PR
=0, all valid lines in the cache, except the lines that are locked, become invalid.
As a result of this command, the lines’ LRU points to an unlocked way or to way 0 if both
lines are unlocked. This last feature is useful when initializing the instruction cache out of
reset. For more information, refer to
Section 9.8 Reset Sequence
cache, set the invalidate all command in the IC_CST register. This command has no
associated error cases. The instruction cache performs this instruction in one clock cycle.
To accurately calculate the latency of this instruction, you should consider bus latency.
. To invalidate the whole
9.4.3 Load & Lock
Load & lock is used to lock critical code segments in the instruction cache. This operation is
privileged and if you try to use it when the core is in the problem state (MSR
interrupt will occur. Load & lock is performed on a cache line granularity and after a line is
locked, it operates as a regular instruction SRAM. It is not replaced during misses and it is
not affected by invalidate commands. The hardware correct operation depends on the
software to follow the exact steps mentioned in
Region Attributes
. To load and lock a line, follow these steps:
PR
=1) a program
Section 9.7 Updating Code And Memory
1. Read the error type bits in the IC_CST register to clear them.
2. Write the address of the line to be locked to the IC_ADR.
3. Set the load & lock command in the IC_CST register.
4. Execute the
isync
instruction.
5. Return to Step 2 to load & lock more lines.
6. Read the error type bits in the
properly.
IC_CST register to determine if the operation completed