Chapter 3. L1 and L2 Cache Operation
3-67
L2 Cache Interface
4. Execute a series of
dcbz
and
dcbf
instructions to initialize the cache with a
sequential range of addresses and with cache data consisting of zeroes. Although the
L2 cache is in data-only mode at this point, instruction accesses may still hit in the
L2 cache, so ensure that the sequential range of addresses selected does not overlap
with any existing instruction address space.
5. Invalidate and lock the L1 data cache.
6. Perform a series of non-zero stores to a range of addresses not currently in the L2
cache. Each of these stores should miss.
7. Initialize the performance monitor counters to zero, and set the MMCR registers to
count the number of L2 cache hits.
8. Perform a series of reads from the original range of addresses located in the cache
and verify that the data read was not affected by the stores performed in step 6. For
accurate reporting of the number of hits, only one load per cache line should be
performed.
9. Disable the performance monitor counters and verify that the number of hits
matches the accesses performed by the test program. All accesses to the original
region should hit.
Note that when running these cache tests, the performance monitor counters can only be
used to count load hits/misses in the L2 cache. Hits or misses that result from stores cannot
be counted. This is due to the L1 data cache being locked during the test procedure, which
means that data store operations are treated as write-through. Loads are treated as cacheable
when the L1 data cache is locked, and can therefore be counted by the performance
monitors.
3.7.8 L2 Cache SRAM Timing Examples
This section describes the signal timing for the three types of SRAM (pipelined burst
SRAM, late-write SRAM, and PB3 SRAM) supported by the MPC7400s L2 cache
interface. The timing diagrams illustrate the best case logical (ideal, non AC-timing
accurate) interface operations. For proper interface operation, the designer must select
SRAMs that support the signal sequencing illustrated in the timing diagrams.