Patent ID: 8166251

Claim:
A stream engine comprising: one or more registers configured to store: a first pointer identifying a next expected demand access corresponding to a prefetch stream that is assigned to the stream engine; a second pointer identifying a next prefetch in the prefetch stream; a stride corresponding to the prefetch stream; and limit data indicating a limit to a number of prefetches that are permitted beyond the first pointer in the prefetch stream; and a control circuit coupled to the one or more registers and configured to generate prefetches responsive to the limit data, wherein the control circuit is further configured to monitor demand accesses that consume data from the prefetch stream by comparing demand access addresses to the first pointer, and wherein, responsive to demand accesses consuming at least a number of prefetches equal to the limit, the control circuit is configured to increase the limit, and wherein the control circuit is further configured to update the first pointer to indicate the next expected demand access after a consumption of prefetch data by a demand access by adding the stride to the first pointer.