Processor and method of prefetching data based upon a detected stride
First Claim
1. A method within a data processing system including a processor and a memory for generating a load address, said method comprising:
- storing at least a portion of a first instruction address of a first load instruction;
determining a first difference between a first load target address and a second load target address;
determining a second difference between said second load target address and a third load target address, said third load target address having a second instruction address associated therewith;
generating a fourth load target address in response to comparing said first and second differences; and
supplying said fourth load target address to the memory as a memory request address if a program loop is detected by comparison of said second instruction address and said at least said portion of said first instruction address, wherein said memory is an upper level memory and said data processing system further includes a lower level memory, said supplying step comprising transmitting said fourth load target address to said lower level memory only if data associated with said fourth load target address is neither resident in said upper level memory nor a target of an outstanding memory fetch request transmitted to said lower level memory.
1 Assignment
0 Petitions
Accused Products
Abstract
A processor and method of fetching data within a data processing system are disclosed. According to the method, a first difference between a first load address and a second load address is calculated. In addition, a determination is made whether a second difference between a third load address and the second load address is equal to the first difference. In response to a determination that the first difference and the second difference are equal, a fourth load address, which is generated by adding the third address and the second difference, is transmitted to the memory as a memory fetch address. In an embodiment of the data processing system including a processor having an associated cache, the fourth load address is transmitted to the memory only if the fourth load address is not resident in the cache or the target of an outstanding memory fetch request.
-
Citations
16 Claims
-
1. A method within a data processing system including a processor and a memory for generating a load address, said method comprising:
-
storing at least a portion of a first instruction address of a first load instruction;
determining a first difference between a first load target address and a second load target address;
determining a second difference between said second load target address and a third load target address, said third load target address having a second instruction address associated therewith;
generating a fourth load target address in response to comparing said first and second differences; and
supplying said fourth load target address to the memory as a memory request address if a program loop is detected by comparison of said second instruction address and said at least said portion of said first instruction address, wherein said memory is an upper level memory and said data processing system further includes a lower level memory, said supplying step comprising transmitting said fourth load target address to said lower level memory only if data associated with said fourth load target address is neither resident in said upper level memory nor a target of an outstanding memory fetch request transmitted to said lower level memory. - View Dependent Claims (2, 3, 4, 5, 6)
executing one or more load instructions to compute said fist, second, and third load target addresses.
-
-
4. The method of claim 1, and further comprising storing at least said first and said second load target addresses in a load address queue.
-
5. The method of claim 1, wherein said supplying step comprises transmitting said fourth load target address from said processor to said memory as a memory request address.
-
6. The method of claim 1, wherein said supplying is performed only if a program loop is detected.
-
7. A data processing system, comprising:
-
an upper level memory and a lower level memory;
means for storing at least a portion of a first instruction address of a first load instruction;
means for determining a first difference between a first load target address and a second load target address;
means for determining a second difference between said second load target address and a third load target address, said third load target address having a second instruction address associated therewith;
means for generating a fourth load target address in response to comparing said first and second differences;
means for comparing said second instruction address and said at least said portion of said first instruction address to detect a program loop; and
means for supplying said fourth load target address to the upper level memory as a memory request address if a program loop is detected, said means for supplying comprising means for transmitting said fourth load target address to said lower level memory only if data associated with said fourth load target address is neither resident in said upper level memory nor a target of an outstanding memory fetch request transmitted to said lower level memory. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A processor having an associated upper level memory and a lower level memory, said processor comprising:
-
a load-store unit that executes one or more load instructions to produce at least first, second, and third load target addresses, wherein said third load address has a second instruction address associated therewith;
an instruction address queue that stores at least a portion of a first instruction address of an executed first load instruction;
a difference circuitry that determines a first difference between said first load target address and said second load target address and determines a second difference between said third load target address and said second load target address;
address generation circuitry that generates a fourth load target address in response to a comparison of said first and said second differences; and
loop detection circuitry that compares said second instruction address and said at least said portion of said first instruction address to detect a program loop; and
logic circuitry that supplies said fourth load target address to a memory as a memory request address if a program loop is detected by said loop detection circuitry, wherein said logic circuitry supplies said fourth load target address to said lower level memory only if data associated with said fourth load target address is neither resident in said upper level memory nor a target of an outstanding memory fetch request transmitted to said lower level memory. - View Dependent Claims (14, 15, 16)
-
Specification