Data are prefetched into a cache from a prefetch region of memory, based
on a program instruction reference and on compile-time information that
indicates the bounds of the prefetch region, a size of a prefetch block,
and a location of the prefetch block. If the program reference address
lies with the prefetch region, an offset distance is used to determine
the address of the prefetch block. Prefetching is performed either from a
continuous one-dimensional prefetch region, or an embedded
multi-dimensional prefetch region. The prefetch block address is
respectively determined in one dimension or multiple dimensions.
Program-directed prefetching is implemented by a media processor or by a
separate processing component in communication with the media processor.
The primary components include a program-directed prefetch controller, a
cache, a function unit, and a memory. Preferably, region registers store
the compile-time information, and the prefetched data are stored in a
cache prefetch buffer.