CN1327353C - Microprocessor device with optional recall of prefetch - Google Patents
Microprocessor device with optional recall of prefetch Download PDFInfo
- Publication number
- CN1327353C CN1327353C CNB2003101014821A CN200310101482A CN1327353C CN 1327353 C CN1327353 C CN 1327353C CN B2003101014821 A CNB2003101014821 A CN B2003101014821A CN 200310101482 A CN200310101482 A CN 200310101482A CN 1327353 C CN1327353 C CN 1327353C
- Authority
- CN
- China
- Prior art keywords
- prefetch
- cache
- cache line
- microprocessor
- control logic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0862—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/60—Details of cache memory
- G06F2212/6022—Using a prefetch buffer or dedicated prefetch cache
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Advance Control (AREA)
Abstract
A microprocessor capable of selectively retiring a prefetched cache line is disclosed. In a first embodiment, a first count and a second count are maintained, wherein the first count counts accesses to the prefetched cache line and the N second counts accesses to N cache lines in an alternate reserve set of the cache, the N cache lines in the reserve set being selected by an address of the prefetched cache line, and the reserve prefetched cache line is retired back into the cache if the first count is greater than a minimum of the N second counts when another prefetch is requested; otherwise, the prefetched cache line is discarded. In a second embodiment, a count of the number of alternative reserved cache lines is maintained, and when another prefetch is requested, the reserved prefetch cache line is evicted back to the cache if the count is greater than a programmable threshold value; otherwise, the prefetched cache line is discarded.
Description
Technical field
The present invention relates to the field of high-speed cache (cache), refer to the computing of looking ahead (prefetching) of fast line taking (cache line) especially, promptly relate to the micro processor, apparatus of selective prefetch retire.
Background technology
Included a microprocessor and an Installed System Memory in the computer system of today, this Installed System Memory is in order to store microprocessor instruction and to be the handled data of this microprocessor instruction.In general, from required time of Installed System Memory reading of data can more than microprocessor carry out the required time of one or more instruction want many-in some cases, be even more than ten times or 20 times, therefore, when from the Installed System Memory loading data, microprocessor often is to be in idle state, and this kind situation is very inefficent, and can reduce the performance of system.
For relaxing the influence of the problems referred to above to system, can in microprocessor, make up a high-speed cache usually, this high-speed cache is built in the microprocessor in being, and its memory capacity is less than Installed System Memory, in order to a subclass of stocking system internal memory institute deposit data.When processor must be taken data carrying out an instruction, this processor at first can check whether this desired data is present in this high-speed cache from a previous data load, was referred to as " cache hit " (cache hit) as this step 1.If in this previous data load, desired data " hits " this high-speed cache, in other words, be that desired data has been deposited in this high-speed cache, this instruction this moment can be performed immediately, if but in this previous data load, desired data " in getting not soon " is this high-speed cache (miss), then delay the execution of this instruction again, obtain desired data in processor from Installed System Memory to wait for.
The designer of microprocessor knows that software program often is successional to the access of data and instruction; therefore; if during a data load is miss this high-speed cache; then and then the data on the memory address of the miss address of this data load (load miss address) probably soon can be required by this program; so a microprocessor is anticipated following demand to next data; therefore even in program still before next data of failed call; regular meeting in advance and then the data block subsequently of this miss address date be loaded in its high-speed cache, this action generally is referred to as look ahead (prefetch).
The size of the data block that this is prefetched normally is equal to the size of a fast line taking, and high-speed cache is with in the fast line taking of data storing, and the size of general fast line taking often is 32 bytes or 64 bytes.Fast line taking is the least unit of the data that can transmit between this high-speed cache and this Installed System Memory, in other words, when the be cached data of desiring to read when a microprocessor are not present in its high-speed cache, this microprocessor promptly can read from Installed System Memory and comprise the whole fast line taking that this can be cached data, and should fast line taking be stored in its high-speed cache, similarly, in the time a new fast line taking need being written to its high-speed cache, promptly can cause being substituted of a fast line taking that was modified, this moment, microprocessor also was written to Installed System Memory with whole this substituted fast line taking.
Traditionally, this fast line taking of looking ahead all is regarded as being equal to a common fast line taking and fills (line fill).One common fast line taking is filled to a fast line taking of extracting from Installed System Memory, because an instruction is from this fast line taking access data, so utilize a common fast line taking to fill, this fast line taking that is extracted can unconditionally be written into or be retracted into its high-speed cache.Unconditionally recall the fast line taking of looking ahead in advance and have a shortcoming to its high-speed cache, this shortcoming may replace a fast line taking that just is being used or is being about to be used for this fast line taking that is withdrawn, thereby may adverse influence be arranged to the efficient of high-speed cache.Therefore, desire is improved the efficient of high-speed cache, must solve this shortcoming.
Summary of the invention
In one first specific embodiment of the present invention, the present invention can distinguish look ahead fast line taking and a common fast line taking and fill, and access (contemporaneous access) when this is looked ahead fast line taking, the present invention fast line taking of optionally this being looked ahead is withdrawn into its high-speed cache.In one second specific embodiment of the present invention, access based on to the fast line taking of one in this high-speed cache the time, and this fast line taking will be by being replaced by this fast line taking of looking ahead, and this fast line taking of looking ahead is optionally to recall.Therefore, for reaching above-mentioned purpose, the invention provides a microprocessor, this microprocessor comprises that a high-speed cache and is coupled to the prefetch buffer of this high-speed cache, and this prefetch buffer is in order to receive from one of an Installed System Memory fast line taking of looking ahead.This microprocessor also comprises the steering logic device that is coupled to this prefetch buffer, this steering logic device be according in fact simultaneously access this look ahead fast line taking with look ahead this fast line taking of looking ahead to this prefetch buffer, be retracted into its high-speed cache with fast line taking that this is looked ahead.
On the other hand, the invention provides a kind of device in a microprocessor, this device is according to an access of looking ahead fast line taking, optionally a plurality of fast line takings of looking ahead are withdrawn into a high-speed cache of this microprocessor.This device comprises a prefetch buffer, and this prefetch buffer is in order to store the fast line taking of looking ahead.This device comprises that also one is coupled to a buffer of this prefetch buffer, and this buffer is in order to store a prefetch address of this fast line taking of looking ahead.This device also comprises the steering logic device that is coupled to this buffer, and this steering logic device receives the access address of a memory access computing, and this access address and this prefetch address are done one relatively.This device also comprises a counter that is coupled to this steering logic device, and this counter is in order to store the counting of this fast line taking of looking ahead of an access.If this access address is identical with this prefetch address, then this steering logic device increases the counting of this counter.This steering logic device and be withdrawn into this high-speed cache with the fast line taking of optionally this being looked ahead according to this counting.
Again on the other hand, the invention provides a kind of device in a microprocessor, this device can be optionally be withdrawn into a high-speed cache of this microprocessor with the fast line taking of looking ahead.This device comprises that in order to store a prefetch buffer of this fast line taking of looking ahead with a counter that is coupled to this prefetch buffer, this counter is accessed in the counting that one in the high-speed cache laid in fast line taking in order to store one.This device also comprises a steering logic device that is coupled to this counter, and this steering logic device is withdrawn into this high-speed cache according to this counting with the fast line taking of optionally this being looked ahead.
Again on the other hand, the invention provides a kind of method, this method is in a microprocessor, optionally from a prefetch buffer the one fast line taking of looking ahead is withdrawn into a high-speed cache.The step of this method comprises first counting of preserving this fast line taking of looking ahead of an access, and receives one and requires with the new fast line taking of looking ahead to this prefetch buffer.The step of this method comprises that also whether one second counting that be accessed in high-speed cache in a deposit fast line taking of judgement before receiving this requirement be less than this first counting, with response as this requirement of reception, if and this second counting then rewrites (overwrite) to this fast line taking of looking ahead of this prefetch buffer with this new fast line taking less than this first counting.
Again on the other hand, the invention provides a kind of method, this method optionally is withdrawn into a high-speed cache from a prefetch buffer with the fast line taking of looking ahead in a microprocessor.The step of this method comprises this fast line taking of looking ahead of looking ahead to this prefetch buffer, with in getting not soon as one of this high-speed cache with receive the response of a new fast line taking that require to look ahead to this prefetch buffer.The step of this method comprises also whether a deposit fast line taking of judgement in this high-speed cache is invalid, if the fast line taking of this deposit is invalid, then is substituted in this high-speed cache this with this fast line taking of looking ahead and lays in fast line taking.
Again on the other hand, the invention provides a computer data signal that is included in a transmission assembly, but this computer data signal comprises that computing machine identification program code is used for a microprocessor.This program code comprises that first program code is used for a high-speed cache.This program code comprises that also second program code is used for a prefetch buffer, and this prefetch buffer is coupled to this high-speed cache, with the fast line taking of looking ahead from Installed System Memory reception one.It is used that this program code comprises that also the 3rd program code is coupled to the steering logic device of this prefetch buffer for one, this steering logic device according in fact simultaneously access this look ahead fast line taking with look ahead this fast line taking of looking ahead to this prefetch buffer, be retracted into its high-speed cache with fast line taking that this is looked ahead.
The invention has the advantages that as long as increase some extra hardware, the present invention can lower the fast line taking of looking ahead replaced also may be promptly will be by the unfavorable possibility of the fast line taking of access, thereby the efficient of promoting high-speed cache.
Other purpose of the present invention and advantage can be clearer by subsequently the detailed description and the chart of enclosing.
Description of drawings
Fig. 1 is a calcspar of the present invention, and it is described in the device in the microprocessor, and this device is in order to optionally to recall most fast line takings of looking ahead.
Fig. 2 is a process flow diagram of the present invention, and it illustrates in microprocessor shown in Figure 1, optionally recalls the operation of fast line taking to its high-speed cache of looking ahead from this prefetch buffer.
Fig. 3 is a calcspar of another specific embodiment of the present invention, and it is described in the device in the microprocessor, and this device is in order to optionally to recall most fast line takings of looking ahead.
Fig. 4 is a process flow diagram of the present invention, and it illustrates in microprocessor shown in Figure 3, optionally recalls the operation of fast line taking to its high-speed cache of looking ahead from this prefetch buffer.
Wherein, description of reference numerals is as follows:
100 microprocessors, 102 steering logic devices
104 high-speed caches, 106 prefetched lines impact dampers
108 prefetch address buffers (PAR)
112B deposit path 1 access count buffer (CWAC1)
112C deposit path 2 access count buffers (CWAC2)
112D deposit path 3 access count buffers (CWAC3)
114 minimums are chosen logic device 116 access counts (PBAC) buffer
118 comparer 122min_AC
124 comparative result 126min_way signals
128 look ahead cushions access count (PBAC) 132 loading/storage addresses
The fast line taking of looking ahead of 134 status informations 136
138 prefetch address, 300 microprocessors
The fast line taking access count of 302 steering logic devices, 314 deposits
316 access fixed limit buffers, 318 deposit path buffers
Embodiment
See also Fig. 1, it is a calcspar, and it is described in the device in the microprocessor 100, and this device is in order to optionally to recall most fast line takings of looking ahead.This microprocessor 100 comprises that one is coupled to each other to constitute a plurality of stages of a pipeline (pipeline).One or more this pipeline stage comprises an address generator, and this address generator is in order to produce a memory access arithmetic address, loading as shown in Figure 1/storage address 132.These 132 concrete addresses of specifying a loading or storing computing, loading/storage address.One load operation is written to internal memory with data from microprocessor 100 and store computing from the internal memory reading of data to microprocessor 100.In one embodiment, this loading/storage address 132 is a physical memory addresses.
High-speed cache 104 stores the address label and is stored in the state of each the fast line taking in it.This label comprises the upper strata part that is stored in the memory address of a plurality of fast line takings in the high-speed cache 104.In one embodiment, this state comprises MESI (revising, exclusive, shared, invalid) (modified, exclusive, shared, invalid) protocol information.High-speed cache 104 receives loading/storage address 132.One lower floor of this loading/storage address 132 partly be in order in high-speed cache 104 as choosing a set (set), or row (row), or the index of path (ways).High-speed cache 104 will load/store the upper strata of address 132 and partly do one relatively with this address label that is selected each path in the set, whether " hit " this high-speed cache to judge this loading/storage address 132, in other words, whether i.e. this loading/storage address 132 conforms to arbitrary label that is present in this high-speed cache 104, and be effective status.High-speed cache 104 is with status information 134 outputs, and this status information 134 comprises the MESI state that is selected each path in the set, and shows that this is selected the indication whether arbitrary label in the set conforms to loading/storage address 132.If loading/storage address 132 is derived from a load operation, and " hitting " high-speed cache 104, then these fast line taking data of hitting will be provided for the pipeline stage of this microprocessor 100 that requires these fast line taking data.
Prefetched lines impact damper 106 offers this high-speed cache 104 with this fast line taking 136 of looking ahead, and in addition, this prefetched lines impact damper 106 and the fast line taking 136 of will looking ahead offer one or more pipeline stage that requires this microprocessor 100 of data from this fast line taking 136 of looking ahead.In this regard, can be considered as be an extension of this high-speed cache 104 to this prefetched lines impact damper 106.Promptly be, this high-speed cache 104 during if a loading/storage address 132 of the concrete appointment of these steering logic device 102 judgement one load operations is got not soon, but but hit this prefetched lines impact damper 106, then this can the be looked ahead data of fast line taking 136 of this steering logic device 102 offer the pipeline stage of this microprocessor 100.
See also Fig. 2, it is a process flow diagram of the present invention, illustrates in microprocessor shown in Figure 1 100, optionally recalls the operation of fast line taking to its high-speed cache 104 of looking ahead from this prefetch buffer 106.Flow process starts from decision block 202.
In decision block 202, this steering logic device 102 will check the status signal 134 of Fig. 1, in order to judge this loading/storage address 132 whether get not soon in this high-speed cache 104.If answer is for being that then flow process proceeds to square 204; If answer is that then flow process is not got back to decision block 202.
In square 204, begin to extract from internal memory this get not soon fast line taking to this high-speed cache 104, these steering logic device 102 its bus interface assemblies of instruction are looked ahead its next line taking soon to the prefetched lines impact damper 106 of Fig. 1, the fast line taking of looking ahead that the fast line taking of this next one is pointed to for loading/storage address 132 during and then this gets soon.Prefetched to this prefetched lines impact damper 106 in the fast line taking of the next one, this steering logic device 102 is verified the fast line taking of this next one and also is this high-speed cache 104 in getting not soon.Prefetched to this prefetched lines impact damper 106 when this fast line taking 136 of looking ahead, this steering logic device 102 is about to the prefetch address 138 that this prefetch address buffer 108 is updated to Fig. 1, in other words, and the address that is updated to the fast line taking of this next one that is about to.Flow process then proceeds to decision block 206.
In decision block 206, steering logic device 102 is inquired about (query) prefetch address 138 to high-speed cache 104, and the status information 134 of Fig. 1 is carried out an inspection in order to judge that whether any paths is arranged is to be in invalid (invalid) state in its reserve convergence.If answer is for being that then flow process proceeds to square 208; If answer is that then flow process does not proceed to square 212.
In square 208, steering logic device 102 is retracted into the path that this is in disarmed state with this fast line taking 136 of looking ahead, in the reserve convergence of this path in high-speed cache 104.Flow process is then got back to square 202.
In square 212, steering logic device 102 is removed the PBAC buffer 116 and CWAC buffer 112 of Fig. 1, and its value is set at 0.Flow process then proceeds to decision block 214.
In decision block 214, when loading/storage computing was carried out access to high-speed cache 104, steering logic device 102 will carry out an inspection made the arbitrary path in its reserve convergence become disarmed state in order to judge whether arbitrary computing.For example the path in reserve convergence can invalidly be spied on access (invalidating snoop access) and becomes disarmed state through one.If there is the arbitrary path in its reserve convergence to be become disarmed state, then flow process is got back to square 208 from decision block 214; If answer is that then flow process does not proceed to decision block 216.
In decision block 216, this steering logic device 102 will carry out an inspection in order to judge whether the new requirement of looking ahead, in other words, this steering logic device 102 will carry out an inspection in order to judge a new loading/storage address 132 whether get not soon in this high-speed cache 104, thereby needing to cause the new fast line taking of looking ahead of this prefetched lines impact damper 106.If answer is for being that then flow process proceeds to decision block 218; If answer is that then flow process does not proceed to decision block 224.
In decision block 218, this steering logic device 102 will carry out an inspection to the compare result signal 124 of Fig. 1 in order to judge that whether PBAC 128 is greater than min_AC 122.If answer is for being that then flow process proceeds to square 222; If answer is for denying, then flow process is got back to square 204, and this fast line taking 136 of looking ahead that consequently is stored in prefetched lines impact damper 106 can not be retracted into this high-speed cache 104, but is dropped, in other words, this fast line taking 136 of looking ahead is by subsequently the new rewriting that fast line taking covers of looking ahead.
In square 222, this steering logic device 102 is retracted into path by 126 concrete appointments of min_way signal with this fast line taking 136 of looking ahead, in the reserve convergence of this path in high-speed cache 104.Flow process is then got back to square 204 from square 222.
In decision block 224, this steering logic device 102 carries out an inspection in order to judge that whether a path in reserve convergence is by access with status information 134.In one embodiment, why one path is because of this loading/storage address 132 cache hits this high-speed cache 104, in other words by access, be because this path is an effective status, and the label in this path partly conform to the label of this loading/storage address 132.If this reserve convergence is by access, then flow process proceeds to decision block 226; If answer is that then flow process does not proceed to decision block 228.
In decision block 226, the access path that this steering logic device 102 is determined in response to decision block 224 is to increase CWAC buffer 112.For example, by access, then this steering logic device 102 increases CWAC 112C as if path 2.Flow process then proceeds to decision block 228 from square 226.
In decision block 228, this steering logic device 102 will be relatively this prefetch address 138 and this loading/storage address 132, to carry out an inspection in order to judge that whether this fast line taking 136 of looking ahead is by access.If answer is for being that then flow process proceeds to square 232; If answer is that then flow process is not got back to decision block 214.
In square 232, this steering logic device 102 increases PBAC buffer 116.Flow process is then got back to decision block 214 from square 232.
False code (pseudocode) shown in the following form 1 is also in order to the computing of the microprocessor 100 of describing Fig. 2.
If(anyWayInCandidateSetInvalid){
RetirePrefetchedLineToCache();
}else{
PBAC=CWAC[0]=CWAC[1]=CWAC[2]==CWAC[3]=0;
while(noNewPrefetchRequested&&noWayInCandidateSetInvalided){
if(candidateSetAccessed)
CWAC[accessedWay]++;
if(PrefetchedLineAccessed)
PBAC++;
}
if(newPrefetchRequested){
if(PBAC>min_AC)
RetirePrefetchLineToCache();
else/*throw?away?prefetched?cache?line*/
OverwritePrefetchBufferWithNewPrefetchData();
}else{/*way?in?candidate?set?was?invalidated*/
RetirePrefetchedLineToCache();
}
}
Form 1.
As shown in Figures 1 and 2, the invention has the advantages that according to the path of gathering corresponding to this storages by this fast line taking 136 of looking ahead of access times by access times, the fast line taking 136 of can optionally this being looked ahead is withdrawn into its high-speed cache 104, rather than indiscriminate this fast line taking 136 of looking ahead is withdrawn into its high-speed cache 104.
See also Fig. 3, it is a calcspar of another specific embodiment of the present invention, and it is described in the device in the microprocessor 300, and this device is in order to optionally to recall most fast line takings of looking ahead.
As the assembly of Fig. 1 same numeral, this microprocessor 300 comprises a high-speed cache 104, prefetched lines impact damper 106, prefetch address buffer (PAR) 108, loading/storage address 132, status information 134, the fast line taking 136 of looking ahead, and prefetch address 138.
See also Fig. 4, it is a process flow diagram of the present invention, and it illustrates in microprocessor shown in Figure 3 300, optionally recalls the operation of fast line taking to its high-speed cache 104 of looking ahead from this prefetch buffer 106.Flow process starts from decision block 402.
In decision block 402, this steering logic device 302 will check the status signal 134 of Fig. 3, in order to judge this loading/storage address 132 whether get not soon in this high-speed cache 104.If answer is for being that then flow process proceeds to square 404; If answer is that then flow process is not got back to decision block 402.
In square 404, begin to extract from internal memory this get not soon fast line taking to this high-speed cache 104, this steering logic device 302 is about to concrete this nearest numerical value in path (LRU) that used of laying in fast line taking of specifying and moves into to CWR 318.And these steering logic device 302 its bus interface assemblies of instruction are looked ahead its next line taking soon to the prefetched lines impact damper 106 of figure three, the fast line taking of looking ahead that the fast line taking of this next one is pointed to for loading/storage address 132 during and then this gets soon.Prefetched to this prefetched lines impact damper 106 in the fast line taking of the next one, this steering logic device 102 is checked the fast line taking of this next one and also is this high-speed cache 104 in getting not soon.In addition, this steering logic device 302 be about to this get not soon in the address of next fast line taking of fast line taking move into to prefetch address buffer 108.Flow process then proceeds to decision block 406.
In decision block 406, steering logic device 302 is inquired about (query) prefetch address 138 to high-speed cache 104, and the status information 134 of Fig. 3 is carried out an inspection in order to judge that whether any paths is arranged is to be in invalid (invalid) state in its reserve convergence.If answer is for being that then flow process proceeds to square 408; If answer is that then flow process does not proceed to square 412.
In square 408, steering logic device 302 is retracted into this fast line taking 136 of looking ahead by the deposit path at high-speed cache 104 of 318 concrete appointments of CWR.Flow process is then got back to decision block 402.
In square 412, steering logic device 102 is removed the CLAC 314 of Fig. 3, and its value is set at 0.Flow process then proceeds to decision block 414.
In decision block 414, when loading/storage computing is carried out access to high-speed cache 104, steering logic device 302 will carry out an inspection and become disarmed state in order to have judged whether that arbitrary computing makes in its deposit path.If answer is for being that then flow process is got back to square 408 from decision block 414; If answer is that then flow process does not proceed to decision block 416.
In decision block 416, this steering logic device 302 will carry out an inspection in order to judge whether the new requirement of looking ahead.If answer is for being that then flow process proceeds to decision block 418; If answer is that then flow process does not proceed to decision block 424.
In decision block 418, this steering logic device 302 will carry out an inspection in order to judge that whether CLAC314 is greater than the numerical value in the ATR 316 that is stored in Fig. 3.If answer is for being that then flow process proceeds to square 422; If answer is for denying, then flow process is got back to square 404, and this fast line taking 136 of looking ahead that consequently is stored in prefetched lines impact damper 106 can not be retracted into this high-speed cache 104, but is dropped, in other words, this fast line taking 136 of looking ahead is by subsequently the new rewriting that fast line taking covers of looking ahead.
In square 422, this steering logic device 302 with this fast line taking 136 of looking ahead be retracted into by CWR318 the deposit path at high-speed cache 104 of concrete appointment.Flow process is then got back to square 404 from square 422.
In decision block 424, this steering logic device 302 carries out an inspection in order to judge that whether this deposit path is by access with status information 134.In one embodiment, why this deposit path be because this path be effective status, and the label in this path with the label of this loading/storage address 132 partly conforms to by access.If this reserve convergence is by access, then flow process proceeds to decision block 426; If answer is that then flow process does not proceed to decision block 428.
In decision block 426, this steering logic device 302 increases CLAC 314.Flow process then proceeds to decision block 428 from square 426.
In decision block 428, this steering logic device 302 will carry out an inspection in order to judge whether the deposit path is stored computing by one and replace.If answer is for being that then flow process proceeds to square 432; If answer is that then flow process is not got back to judgement side 414.
In square 432, this steering logic device 302 is updated to a new nearest used path in its reserve convergence with CWR 318, and removes CLAC 314, and its value is set at 0.Flow process is then got back to decision block 414 from square 432.
False code (pseudocode) shown in the following form 2 is also in order to the computing of the microprocessor 300 of describing Fig. 4.
If(Cache[PrefetchIndex][CandidateWay].Valid==0){
RetirePrefetchedToCache();
}else{
CandidateLineAccessCount=0;
while(!NewPrefetchRequest&&!CandidateLineInvalidated){
if(CandidateLineAccessed){
CandidateLineAccessCount++;
}else?if(CandidateLineInvalidated){/*e.g.,by?external?snoop*/
RetirePrefetchToCache();
}else?if(CandidateLineReplaced){/*i.e.,with?valid?miss?data*/
UpdateCandidateWayRegister();
CandidateLineAccessCount=0;
}
}
if((CandidateLineAccessCount<AccessThreshold)&&
(!CandidateLineInvalidate))
{
RetirePrefetchToCache();
}else{
OverWritePrefetchBufferWithNewPrefetchData();
/*i.e.,flush?old?prefetch?data*/
}
}
Form 2.
Though specific embodiments of the invention narrated as before, the present invention is not subject to this.For example, the present invention is applicable to a data cache, an instruction cache, or an instruction/data high-speed cache.In addition, though be described in detail in one embodiment the fast line taking of looking ahead prefetched to its prefetch buffer after, how to follow the trail of the access of (track) this fast line taking of looking ahead and the replacement of the fast line taking of deposit, but other the time access also can be tracked, and the basis of recalling this fast line taking of looking ahead of property alternatively, for example be confirmed as and this fast line taking of looking ahead arrived between the time of this prefetch buffer, to this fast line taking and/or lay in the access of fast line taking of looking ahead in this demand of looking ahead.In addition, read, write, spy on and the combination of other access also can be tracked, and use optionally to recall this fast line taking of looking ahead.In other words, various examinations are arranged, and rule can be by specific implementation to judge this fast line taking of looking ahead in high-speed cache by mistake, or the fast line taking of a deposit have in future bigger by the access possibility, so the present invention to be withdrawn into its high-speed cache than traditional fast line taking of unconditionally this being looked ahead more favourable.At last, though the invention relates to by looking ahead of being produced in getting not soon, the present invention is also applicable to the looking ahead of any pattern, for example by looking ahead that the prefetch program instruction is produced.
The present invention not only can hardware realizes, also can by can use at a computing machine (for example, but identification) but the computing machine identification code of assembly specific implementation (for example, but computing machine identification program code, data or the like) realize.The function of the present invention that this computer program code facilitates this place to disclose, or make, or both realizations of all having.For instance, the present invention can realize it by following computer program code: general program language (for example, C, C++, JAVA or the like); The GDSII database; (hardwaredescription languages HDL), comprising hardware description language: Verilog HDL, VHDL, Altera HDL (AHDL) or the like; Or other programming and/or circuit (promptly being, icon) trap tool in the art.This computer program code (for example can use applicable to any known computing machine, but identification) assembly, this computing machine can use assembly to comprise: semiconductor memory, and disk sheet, discs is (for example, CD-ROM, DVD-ROM or the like), and as can use (for example, but identification) transmission assembly (for example, carrier wave at a computing machine, or comprise numeral, optics, or analog assembly) computer data signal of specific implementation.With regard to itself, this computer program code can transmit on telecommunication network, and this telecommunication network comprises world-wide web and enterprise network.Be understandable that the present invention can (for example realize by computer program code, one intellecture property (Intellectual property, IP) part of core, as a microcontroller core, or as the design of a systemic hierarchial, for example (System-on-Chip SoC), and is transferred to hardware to become the part of integrated circuit with it to a system single chip.The present invention also can a hardware and the combination of computer program code realize.
Specific embodiments of the invention narrated as before, but the present invention is not subject to this.Above-mentioned only is preferred embodiment of the present invention, can not limit the scope of the invention with it.All equalizations of making according to claim of the present invention change and revise, and still belong to protection scope of the present invention, and it does not break away from design of the present invention and scope, so all should be considered as further enforcement situation of the present invention.
Claims (24)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US10/420,357 US6990558B2 (en) | 2002-06-18 | 2003-04-21 | Microprocessor, apparatus and method for selective prefetch retire |
| US10/420,357 | 2003-04-21 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2006101356004A Division CN100489813C (en) | 2003-04-21 | 2003-10-17 | Method for selective prefetch withdraw |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1514369A CN1514369A (en) | 2004-07-21 |
| CN1327353C true CN1327353C (en) | 2007-07-18 |
Family
ID=34272337
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2003101014821A Expired - Lifetime CN1327353C (en) | 2003-04-21 | 2003-10-17 | Microprocessor device with optional recall of prefetch |
| CNB2006101356004A Expired - Lifetime CN100489813C (en) | 2003-04-21 | 2003-10-17 | Method for selective prefetch withdraw |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2006101356004A Expired - Lifetime CN100489813C (en) | 2003-04-21 | 2003-10-17 | Method for selective prefetch withdraw |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN1327353C (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100378687C (en) * | 2005-08-25 | 2008-04-02 | 北京中星微电子有限公司 | A cache prefetch module and method thereof |
| CN102169428A (en) * | 2010-06-22 | 2011-08-31 | 上海盈方微电子有限公司 | Dynamic configurable instruction access accelerator |
| CN103729142B (en) * | 2012-10-10 | 2016-12-21 | 华为技术有限公司 | The method for pushing of internal storage data and device |
| TWI692746B (en) * | 2018-11-27 | 2020-05-01 | 瑞鼎科技股份有限公司 | Data cache method applied to display driver of mobile device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5944815A (en) * | 1998-01-12 | 1999-08-31 | Advanced Micro Devices, Inc. | Microprocessor configured to execute a prefetch instruction including an access count field defining an expected number of access |
| US6219760B1 (en) * | 1997-06-27 | 2001-04-17 | Advanced Micro Devices, Inc. | Cache including a prefetch way for storing cache lines and configured to move a prefetched cache line to a non-prefetch way upon access to the prefetched cache line |
| WO2002021268A2 (en) * | 2000-09-08 | 2002-03-14 | Sun Microsystems, Inc. | Method and apparatus for using an assist processor to prefetch instructions for a primary processor |
| WO2002054230A2 (en) * | 2000-12-29 | 2002-07-11 | Intel Corporation | System and method for prefetching data into a cache based on miss distance |
| WO2003014945A2 (en) * | 2001-08-10 | 2003-02-20 | Motorola, Inc., | Data processing system having an adaptive priority controller |
| CN1410893A (en) * | 2002-04-09 | 2003-04-16 | 智慧第一公司 | Microprocessor with prefetching instructions and method of prefetching to its cache |
-
2003
- 2003-10-17 CN CNB2003101014821A patent/CN1327353C/en not_active Expired - Lifetime
- 2003-10-17 CN CNB2006101356004A patent/CN100489813C/en not_active Expired - Lifetime
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6219760B1 (en) * | 1997-06-27 | 2001-04-17 | Advanced Micro Devices, Inc. | Cache including a prefetch way for storing cache lines and configured to move a prefetched cache line to a non-prefetch way upon access to the prefetched cache line |
| US5944815A (en) * | 1998-01-12 | 1999-08-31 | Advanced Micro Devices, Inc. | Microprocessor configured to execute a prefetch instruction including an access count field defining an expected number of access |
| WO2002021268A2 (en) * | 2000-09-08 | 2002-03-14 | Sun Microsystems, Inc. | Method and apparatus for using an assist processor to prefetch instructions for a primary processor |
| WO2002054230A2 (en) * | 2000-12-29 | 2002-07-11 | Intel Corporation | System and method for prefetching data into a cache based on miss distance |
| WO2003014945A2 (en) * | 2001-08-10 | 2003-02-20 | Motorola, Inc., | Data processing system having an adaptive priority controller |
| CN1410893A (en) * | 2002-04-09 | 2003-04-16 | 智慧第一公司 | Microprocessor with prefetching instructions and method of prefetching to its cache |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101063956A (en) | 2007-10-31 |
| CN1514369A (en) | 2004-07-21 |
| CN100489813C (en) | 2009-05-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9043556B2 (en) | Optimizing a cache back invalidation policy | |
| JP4226057B2 (en) | Method and apparatus for pre-sacrificial selection to reduce undesirable replacement behavior in an inclusive cache | |
| JP4298800B2 (en) | Prefetch management in cache memory | |
| US7917701B2 (en) | Cache circuitry, data processing apparatus and method for prefetching data by selecting one of a first prefetch linefill operation and a second prefetch linefill operation | |
| JP4128878B2 (en) | Method and system for speculatively invalidating cached lines | |
| CN102640124B (en) | For computing system, method and pre-fetch unit that the storage perception of data stream is looked ahead | |
| US7783837B2 (en) | System and storage medium for memory management | |
| CN117609110B (en) | A cache method, high-speed cache, electronic device and readable storage medium | |
| US8140759B2 (en) | Specifying an access hint for prefetching partial cache block data in a cache hierarchy | |
| US6990558B2 (en) | Microprocessor, apparatus and method for selective prefetch retire | |
| WO2001009729A1 (en) | Cast-out cache | |
| JPH0962572A (en) | Device and method for stream filter | |
| US7716424B2 (en) | Victim prefetching in a cache hierarchy | |
| CN113641598B (en) | Microprocessor, cache memory system and method for implementing same | |
| US6959363B2 (en) | Cache memory operation | |
| US11775440B2 (en) | Producer prefetch filter | |
| CN1327353C (en) | Microprocessor device with optional recall of prefetch | |
| CN116150047A (en) | technique for operating a cache storage device to cache data associated with a memory address | |
| US20010032297A1 (en) | Cache memory apparatus and data processing system | |
| CN100451994C (en) | Microprocessor, apparatus and method for selectively associating store buffer cache line status with response buffer cache line status | |
| CN115964309A (en) | Prefetching | |
| US8176254B2 (en) | Specifying an access hint for prefetching limited use data in a cache hierarchy | |
| CN114450668A (en) | Circuit and method | |
| US12013784B2 (en) | Prefetch state cache (PSC) |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CX01 | Expiry of patent term | ||
| CX01 | Expiry of patent term |
Granted publication date: 20070718 |