
ML674001 Series/ML675001 Series User’s Manual
Chapter 9
CACHE MEMORY
9-6
9.3
Description of Operations
9.3.1 Initialization of Cache Memory
It is necessary to initialize the cache memory before using this cache controller.
If the cacheable setting is
made without initializing the cache, correct values may not be written to or read from the memory.
9.3.2 Cacheable/Non-cacheable Setting
In this LSI, the entire memory space (4GB) of the CPU is split into 128MB segments called banks.
There
are 32 banks from Bank 0 to Bank 31.
(See Chapter 3, “Address Map”.)
The cacheable/non-cacheable
setting by the CACHE register can be made for each bank separately.
The banks for which the cacheable
setting can be made are the banks (Bank 0, 8 to 13, 24 to 29) of the memory space that is the target of
caching (the cacheable memory area).
9.3.3 Description of operations
Cache hit operation
Read hit:
Data is returned from the cache memory to the CPU when there is a cache hit of the read access
from the CPU.
Write hit:
Data is written into the cache memory when there is a write access from the CPU.
Cache miss operation
Read miss: When there is a cache miss of the read access from the CPU, the cache controller carries out an
AHB bus access to read out one block (16 bytes) of data from the main memory, and stores that
data in the cache memory and also returns that data to the CPU.
Write miss: When there is a cache miss of the write operation from the CPU, the cache controller carries out
an AHB bus access to read out one block (16 bytes) of data from the main memory, and stores it
in the cache memory and also stores the write data from the CPU.
Replacement operation
When there is no free space for storing within the cache memory in the case of a cache miss, one block
(16 bytes) of the data storage area that has not been used recently will be over-written by the newly
required data.
If the data that is over-written has been updated, the cache memory controller carries out first a write back
operation to free the storage area, and then carries out the above cache miss operation.
This type of operation is called a replacement operation.
Non-cacheable access operation
When an access is made to an address in a bank for which the cacheable setting has not been made, the
cache controller does not carry out the hit/miss judgment for the access made by the CPU, but always
carries out an access to the actual memory.
This type of access operation is called a non-cacheable
access operation.
9.3.4 Lock Function
Locking is the function of retaining the contents of the cache memory within the cache memory itself as
follows.
When there is a cache hit, the normal cache hit operation is made.
When there is a cache miss, the contents of the locked cache memory is retained by carrying out a cache
miss operation to a way that has not been locked.