A method is provided for controlling a cache system. The cache system to be controlled
comprises a direct-mapped cache configured with a small block size, and a fully
associative spatial buffer configured with a large block, which includes a plurality
of small blocks. Where accesses to the direct-mapped cache and the fully associative
buffer are misses, data of a missed address and data of adjacent addresses are
copied to the large block in the fully associative spatial buffer according to
a first-in-first-out (FIFO) process. Furthermore, if one or more small data blocks
is accessed among its corresponding large block of data which is to be expelled
from the fully associative buffer, the small block(s) accessed is copied to the
direct-mapped cache.