A data processing apparatus and method are provided for performing a cache
lookup in an energy efficient manner. The data processing apparatus has
at least one processing unit for performing operations and a cache having
a plurality of cache lines for storing data values for access by that at
least one processing unit when performing those operations. The at least
one processing unit provides a plurality of sources from which access
requests are issued to the cache, and each access request, in addition to
specifying an address, further includes a source identifier indicating
the source of the access request. A storage element is provided for
storing for each source an indication as to whether the last access
request from that source resulted in a hit in the cache, and cache line
identification logic determines, for each access request, whether that
access request is seeking to access the same cache line as the last
access request issued by that source. The cache control logic is operable
when handling an access request to constrain the lookup procedure to only
a subset of the storage blocks within the cache if it is determined that
the access request is to the same cache line as the last access request
issued by the relevant source, and the storage element indicates that the
last access request from that source resulted in a hit in the cache. This
yields significant energy savings when accessing the cache.