Methods for prefetching data and apparatuses using the same
AssigneeVia Alliance Semiconductor Co., Ltd.
InventorChen CHEN
Life of this patent
Estimating the term…
Abstract
The invention introduces a method for prefetching data, which contains at least the following steps: receiving a first read request and a second read request from a first LD/ST (Load/Store) queue and a second LD/ST queue, respectively, in parallel; obtaining a first cache-line number and a first offset from the first read request and a second cache-line number of a second offset from the second read request in parallel; obtaining a third cache-line number from a cache-line number register; obtaining a third offset from an offset register; determining whether an offset trend is formed according to the first to third cache-line numbers and the first to third offsets; and directing an L1 (Level-1) data cache to prefetch data of a cache line when the offset trend is formed.
Claims20
A method for prefetching data, comprising:
- receiving a first read request and a second read request from a first LD/ST (Load/Store) queue and a second LD/ST queue, respectively, in parallel;
- obtaining a first cache-line number and a first offset from the first read request and a second cache-line number of a second offset from the second read request in parallel;
- obtaining a third cache-line number from a cache-line number register;
- obtaining a third offset from an offset register;
- determining whether an offset trend is formed according to the first to third cache-line numbers and the first to third offsets;
- and
- directing an L1 (Level-1) data cache to prefetch data of a cache line when the offset trend is formed.
An apparatus for prefetching data, comprising:
- a first LD/ST (Load/Store) queue;
- a second LD/ST queue;
- an L1 (Level-1) data cache;
- and
- a detector, coupled to the first LD/ST queue, the second LD/ST queue and the L1 data cache, receiving a first read request and a second read request from the first LD/ST queue and the second LD/ST queue, respectively, in parallel;
- obtaining a first cache-line number and a first offset from the first read request and a second cache-line number of a second offset from the second read request in parallel;
- obtaining a third cache-line number from a cache-line number register;
- obtaining a third offset from an offset register;
- determining whether an offset trend is formed according to the first to third cache-line numbers and the first to third offsets;
- and directing the L1 data cache to prefetch data of a cache line when the offset trend is formed.
Dependencies are inferred from the claim text.