CN102567137A - System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails - Google Patents

System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails Download PDF

Info

Publication number
CN102567137A
CN102567137A CN2010106072151A CN201010607215A CN102567137A CN 102567137 A CN102567137 A CN 102567137A CN 2010106072151 A CN2010106072151 A CN 2010106072151A CN 201010607215 A CN201010607215 A CN 201010607215A CN 102567137 A CN102567137 A CN 102567137A
Authority
CN
China
Prior art keywords
rob
item
group
address
pairing
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.)
Granted
Application number
CN2010106072151A
Other languages
Chinese (zh)
Other versions
CN102567137B (en
Inventor
杨思博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Original Assignee
BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD filed Critical BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Priority to CN 201010607215 priority Critical patent/CN102567137B/en
Publication of CN102567137A publication Critical patent/CN102567137A/en
Application granted granted Critical
Publication of CN102567137B publication Critical patent/CN102567137B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a system and method for restoring contents of an RAT (register alias table) by using an ROB (reorder buffer) when branch prediction fails. The system for restoring the contents of the RAT by using the ROB when the branch prediction fails, provided by the invention, comprises a timing device which is used for generating an update signal for instructing the RAT to perform update operation and mapping relation restoring modules corresponding to each table item in the RAT, wherein each mapping relation restoring module comprises a comparator corresponding to each ROB item, an intra-group looking-up device corresponding to each group of the ROB items, an inter-group multiple selection device for multiple groups of the ROB items, a looking-up device in special groups, a global looking-up device and an RAT item restoring device. According to the system provided by the invention, the RAT can be effectively restored. The invention further provides the method for restoring the contents of the RAT by using the ROB when the branch prediction fails.

Description

, branch prediction use ROB to recover the system and method for RAT content when failing
Technical field
The present invention relates to the micro-processor architecture technical field; Be particularly related to a kind of resequencing buffer (ReOrder Buffer that when branch prediction is failed, uses; Abbreviate ROB as) recover the system of register alias table (Register Alias Table abbreviates RAT as) content.
Background technology
Modern micro-processor architecture has adopted superscale (Super Scale) technology mostly, improves the program execution performance through the method for carrying out many instructions at one-period simultaneously.Want in one-period, can carry out many instructions, just need to solve the relativity problem between instruction.It is relevant relevant with data that the correlativity of instruction is divided into control.Wherein data are relevant is divided into not only read-after-write (RAW) relevant (but also claiming that true data is relevant), writeafterread (WAR) relevant (claim not only spurious correlation) relevant with write after write (WAW) (but also claiming structurally associated) three kinds.Register renaming (Register Renaming) technology is through being mapped to same logic register the mode of a plurality of physical registers; Solve the writeafterread in the program run (WAR) and to write (WAW) data relevant, improved the concurrency of instruction greatly.
In general, the physical register that is used in rename for the logic register branch is to realize through register alias table RAT (Register Alias Table).Kept the up-to-date mapping relations of current time logic register and physical register among the RAT, RAT comes addressing with the logic register address, and the data (that is the content of RAT list item) of its storage are logic register corresponding physical register addresss.In other words, any time in the microprocessor operation, the mapping relations of a logic register to physical register are all arranged, and RAT is exactly the module of preserving these mapping relations.Through using logic register address search RAT just can know current is that which physical register is represented this logic register, use this logic register as the instruction of source operand will be from this physical register reading of data; Be used for preserving this target operand and use this logic register can obtain the physical register of a free time as the instruction of target operand; To revise the corresponding list item of this logic register in RAT simultaneously; Change its corresponding physical register address into idle physical register address that this instruction obtains; Instruction after this instruction will be read from amended physical register address if read this logic register.
In order to guarantee that microprocessor can return accurately unusually; The order that adopts the microprocessor of out of order execution technique to use resequencing buffer ROB (ReOrder Buffer) to carry out according to instruction is preserved the information of the instruction of carrying out, and the order that complete instruction is carried out according to instruction is submitted to.So-called submission is that expression confirms that the instruction before instruction and this instruction is all complete, and the microprocessor of out of order execution is in agreement in presentation stage with the execution result of the programming model that order is carried out.Resequencing buffer ROB is used for out of order a kind of hardware configuration of carrying out the original order of back restore instruction, to reach the purpose that instruction results is submitted in proper order.Can regard resequencing buffer as a storehouse FIFO who comprises head pointer and tail pointer.When every instruction gets into streamline, all in resequencing buffer, occupied row clauses and subclauses successively, waited instruction to be finished, submitted instruction successively to according to the order of FIFO according to the order at first of program.When interruption or abnormal behaviour take place, also can recover original execution sequence.
Register renaming has two kinds of main implementations, and a kind of is to be divided into two kinds in architecture register and rename register to physical register.Wherein architecture register and logic register are one to one, expression be the state that the back logic register is submitted in instruction to; Rename register and logic register can be many-to-one mapping relations, the execution result of before instruction is submitted to, temporarily holding instruction.The target logic register of instruction is assigned with a rename register when register renaming, and complete back target operand can be write back in the architecture register from the rename register, and the rename register can be released.Under this mode; Though each logic register and its pairing RAT list item can corresponding a plurality of rename registers; But have only an architecture register corresponding with it; When microprocessor resetted, the content of each RAT list item just was reset the address of the architecture register corresponding with it.Another kind of implementation is physical register not to be divided into architecture register and rename register regularly, and outside RAT, adds the mapping relations that an architecture register mapping table is preserved physical register and architecture register again.Instruction is assigned with a free time when register renaming physical register is used for preserving target operand, and this physical register address can be written into architecture register mapping table and be confirmed to be architecture register when submitting to.The physical register that is considered to architecture register can not be used for register renaming and replaced out architecture register mapping table up to it by other physical register, and this moment, this physical register became the rename register of a free time again.Under this mode; Each logic register can be set up corresponding relation with any one physical register when microprocessor moves; But each logic register still has the acquiescence architecture register of a corresponding physical register as it; When microprocessor resetted, the content of each RAT list item just was reset the address with the corresponding acquiescence architecture register of logic register.
These two kinds of implementation hereinafters also can be mentioned, and in order to explain simplification, call rename implementation A to above-mentioned first kind of mode, and call rename implementation B to above-mentioned the 2nd kind of mode.
Modern microprocessor has also used branch prediction (Branch Predict) technology simultaneously and has inferred (Speculation Execution) technology of execution; Make the instruction of not confirming branch to be loaded and to carry out by microprocessor in advance, the control that solves instruction thus is relevant.But this has produced a problem: if the branch prediction mistake; Infer that then the instruction of carrying out also will be cancelled; The physical register that when register renaming, distributes for them will be retracted, and the logic register of therefore in RAT, preserving and the mapping relations of physical register will be restored to the instruction of inferring execution error and carry out state before.
A kind of simple method is that branch instruction arrival presentation stage judges whether prediction is correct again by the time; Because on behalf of the state of microprocessor, the submission of instruction confirm; If find the branch prediction mistake of instruction this moment, can directly cancel all instructions of carrying out in the instruction.For first kind of above-mentioned register renaming implementation, i.e. rename mode A, RAT will be restored to the state after microprocessor resets, and promptly all list items of RAT all are to point to and they architecture registers one to one.And for second kind of above-mentioned register renaming implementation, i.e. rename mode B directly copies the content of architecture register mapping table the recovery that just can realize among the RAT RAT.The realization of this method is very simple, but in the microprocessor of out of order execution, submits to and possibly need a lot of cycles from the instruction instruction that is finished; If being placed on presentation stage to the correction to the branch prediction mistake carries out; Then after branch instruction is carried out, arrive and submit to before during this period of time, microprocessor is always in the address value from mistake, and these instructions will be cancelled; This is equivalent to be wasted during this period of time, has reduced performance of processors.
The method of recovery RAT commonly used is for each fundamental block an independent RAT to be set; Instruction address in the fundamental block is continuous; And branch instruction is that the last item of fundamental block instructs (if microprocessor has the Tapped Delay groove; The instruction that postpones so in the groove is exactly the last item instruction in the fundamental block), be in the different fundamental blocks with this branch instruction in the instruction at the destination address place of branch instruction (no matter whether branch takes place), RAT also can switch when fundamental block switched.Kept a RAT for each fundamental block in the microprocessor like this; When microprocessor is found the branch prediction mistake; Can switch back the pairing RAT of that branch instruction target place fundamental block of prediction error; The mapping relations of logic register with regard to the branch instruction that turned back to prediction error (, also comprising the instruction that postpones in the groove) for some architecture by the state after the rename.
This method need be provided with a plurality of RAT, and will carry out the switching of RAT to a branch instruction whenever, and also will switch during prediction error.RAT is made up of timing unit, needs clock and constantly is in energising (power on) state, has increased power consumption.And when register renaming, need select to use the result of which RAT and which RAT the state after the rename write back among the sequential expense when also having increased rename.
Summary of the invention
The object of the invention is to overcome the deficiency on power consumption and sequential of prior art, the free time utilization is started working to the rename unit from discovery branch prediction mistake again, according to the information of having preserved among the ROB, uses pure combinational logic to recover RAT.Owing to only when the branch prediction mistake, work, and in most of the cases branch prediction success ratio of Modern microprocessor very high (greater than 95%), pure combinational logic does not have clock signal again, so can reduce dynamic power consumption.And owing to do not need extra preservation information, this part circuit can be in the shutdown state when not working, so also can reduce quiescent dissipation.Because have only a RAT,, rename need not select when operating based on basic block, therefore on sequential, also improve.
According to a first aspect of the invention; A kind of system that when branch prediction is failed, uses resequencing buffer ROB to recover register alias table RAT content is provided; All ROB items are divided into a plurality of groups according to its address; It is overlapping that each group comprises that the ROB item of ROB item and the said predetermined number of predetermined number does not have between mutually, and said system comprises:
Be used to produce the timing device that indication RAT upgrades the update signal of operation;
Mapping relations corresponding to each list item among the RAT are recovered module, and wherein each mapping relations recovery module comprises:
Correspond respectively to the comparer of each ROB item; The target logic address that is kept in each ROB item is compared and export the two comparative result that whether equates of indication with the pairing logic register of this mapping relations recovery pairing RAT list item of module address, and the target logic address that wherein is kept in each ROB item equates with the target logic register address of the pairing instruction of this ROB item;
Search device in the group corresponding to each group of ROB item, it receives comparative result of the pairing comparer output of ROB item in each group, in these comparative results, searches and export lookup result;
Be used for multi-selection device between a plurality of groups group of ROB item; Be used for selecting the group at the ROB tail item place of ROB item; Said ROB tail item is that the pairing ROB item of branch instruction that makes a mistake is (for the microprocessor that the Tapped Delay groove is arranged; Be the instruction that postpones in the groove), and export the comparative result of the comparer in the group of group at this ROB tail item place;
Search device in the specific group, receive the comparative result of the output of multi-selection device between said group, and the comparative result of the comparer in the group of said ROB tail item place is searched based on the comparative result of multi-selection device output between said group, and the output lookup result;
The global search device; Be used in said group, searching the final lookup result of lookup result output of searching device output in lookup result and the said specific group of device output; Whether said final lookup result indication also has its target logic address and this mapping relations to recover the ROB item that the pairing logic register of the pairing RAT list item of module address equates in ROB, and the address of the ROB item of the instruction that in its target logic address and these ROB items that the pairing logic register of this mapping relations recovery pairing RAT list item of module address equates, equates with said target logic address corresponding to its target register address that should be performed the latest;
RAT list item recovery device receives the final lookup result of global search device output, exports these mapping relations and recovers the content that physical register address that the pairing RAT list item of module preserved should be resumed.
According to system of the present invention, wherein in the process that said ROB item is divided into groups, address of the ROB item in each group is adjacent, and in all ROB items each all and only in a group.
According to system of the present invention; When the count value of the counter in the said timing device reaches predetermined value; This timing device sends update signal and recovers module output with indication RAT according to the pairing mapping relations of its each list item and upgrade the original physical register address of being preserved of each RAT list item, and the timing of wherein said timing device is no more than when generation branch prediction mistake microprocessor reloads instruction from new address time.
According to system of the present invention; Whether the target logic address that the pairing ROB item of comparative result this comparer of indication of wherein said comparer output is stored is recovered the pairing logic register of the pairing RAT list item of module address with the mapping relations at this comparer place and is equated; If the pairing ROB item of this comparer is cancelled, then comparative result is designated as unequal.
According to system of the present invention; Whether search device in wherein said group has the comparative result of the pairing comparer of ROB item to be designated as equal according to the ROB item address in its pairing group by the sequential search that maximum in the group is decremented to minimum in the group; If have; Then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication; If there have the comparative result of the pairing comparer of a plurality of ROB items to be designated as to be equal, the signal of the position of that ROB item in group that the output indication is found is at first searched the signal of success with indication, otherwise failure signal is searched in the output indication.
Based on system of the present invention, multi-selection device is selected the group at ROB tail item place based on amended ROB tail pointer between wherein said group from existing ROB divides into groups.
According to system of the present invention, in not having the microprocessor of branch delay slot, amended ROB tail pointer points to the pairing ROB item of branch instruction of prediction error; In the microprocessor of branch delay slot was arranged, amended ROB tail pointer pointed to the pairing ROB item of instruction that postpones in the groove.
According to system of the present invention; Search the output result of multi-selection device between device reception group in the wherein said specific group; And be starting point with said ROB tail item; Whether equal, if having, then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication according to the descending sequential search in ROB item address if having the comparative result of the pairing comparer of ROB item to be designated as; If there is the comparative result of the pairing comparer of a plurality of ROB items to be designated as equal; Then export and indicate the signal of the position of that ROB item in group of finding at first to search the signal of success, search failure signal, wherein will can not searched greater than the comparative result of the comparer of the ROB item of ROB tail item address corresponding to its address otherwise export to indicate with indication.
According to system of the present invention; Wherein said global search device is at first searched successful signal whether according to the indication of searching the output of device in the said specific group and is judged that searching the comparative result whether device found comparer in the specific group is designated as equal ROB item; If find; Just the signal of success is searched as output and output expression in the address of searching the ROB item that device finds in the specific group; Be designated as equal ROB item if search the comparative result that device do not find comparer in the specific group, the direction that then gets into ROB successively according to instruction, the next one of judging selected group of multi-selection device between group is organized and is searched the comparative result whether device found comparer in pairing group and be designated as equal ROB item; If find; The signal of success is searched as output and output indication in the address of searching the ROB item that device finds in this group,, continue to judge the result who searches device in the next group if do not find; Till being recycled to the ROB group that multi-selection device finds between group; Whether the global search device was searched and was searched device in the group of the selected ROB group of multi-selection device between group and find the comparer comparative result to be designated as equal ROB item this moment, if find, the signal of success was searched as output and output indication in the address of this ROB item; Otherwise failure signal is searched in global search device output indication, and finishes to search.
Based on system of the present invention; If wherein the signal of success is searched in the output indication of global search device, then said RAT list item recovery device adds one and this position is made as ' 1 ' content to be resumed as the physical register address of being preserved in this RAT list item again with the front, ROB item address of said global search device output; If failure signal is searched in the output indication of global search device, then RAT list item recovery device just with the pairing RAT list item of this mapping relations recovery module the address of the corresponding architecture register content that be resumed as the physical register address of being preserved in this RAT list item.
According to system of the present invention, the structure that wherein said each mapping relations are recovered module is identical.
According to system of the present invention, search the difference of searching device in device and the specific group in wherein said group and be, search in the group device search to as if fixing, and irrelevant with amended ROB tail pointer; And search in the specific group device search to as if the group at the ROB tail item place from all existing ROB groups, selected according to amended ROB tail pointer by multi-selection device between group; And when searching, be starting point with ROB tail item, its address can not searched greater than the ROB item of the address of ROB tail item.
In the present invention, the employed target logic of the pairing comparer of each ROB item address also is present among the ROB in the microprocessor that adopts recovery RAT method commonly used, is used for when instruction is submitted to, register renaming being confirmed.The present invention just is used for RAT again with these information and recovers, and does not have extra new these contents of hardware preservation of ROB increase that are.
According to a further aspect in the invention; A kind of method of when branch prediction is failed, using resequencing buffer ROB to recover register alias table RAT content is provided; All ROB items are divided into a plurality of groups according to its address; It is overlapping that each group comprises that the ROB item of ROB item and the said predetermined number of predetermined number does not have between mutually, said method comprising the steps of:
(I) be provided for producing the update signal that indication RAT upgrades operation;
(II) the target logic address of preserving in each ROB item is compared with the pairing logic register of the RAT list item address that will be resumed and defeated indication the two whether equate go out comparative result, the target logic address that wherein is kept in each ROB item equates with the target logic register address of the pairing instruction of each ROB item;
(III) to each group of ROB item, the pairing comparative result of each ROB item in this group is searched, and the output lookup result;
(IV) select the group that the ROB tail item in the ROB item belongs to, said ROB tail item is the pairing ROB item of branch instruction that makes a mistake, and exports the interior pairing comparative result of each ROB item of group of the group at this ROB tail item place;
(V) based on the pairing comparative result of each ROB item in the group of the group at said ROB tail item place, the comparative result of the comparer in the group of said ROB tail item place is searched, and the output lookup result;
(VI) based on the final lookup result of the output of the lookup result in lookup result in the step (III) and the step (V); The ROB item whether said final lookup result indication also has its target logic address to equate with the pairing logic register of the RAT list item address that will be resumed in ROB, and the address of the ROB item of the instruction that in its target logic address and these ROB items that the pairing logic register of the RAT list item address that will be resumed equates, equates with said target logic address corresponding to its target register address that should be performed the latest;
(VII), upgrade the content that physical register address that RAT list item that the update signal output of operation will be resumed preserved should be resumed according to the indication RAT in the step (I) based on the final lookup result in the step (VI).
According to the method for the invention, wherein in the process that said ROB item is divided into groups, address of the ROB item in each group is adjacent, and in all ROB items each all and only in a group.
According to the method for the invention; Wherein use timing device to provide indication RAT to upgrade the update signal of operation; When the count value of the counter in the said timing device reaches predetermined value; This timing device sends update signal and upgrades the original physical register address of being preserved of each RAT list item with the output that indication RAT recovers module according to the pairing mapping relations of its each list item, and the timing of wherein said timing device is no more than when generation branch prediction mistake microprocessor reloads instruction from new address time.
According to the method for the invention; Wherein step (II) further comprises the signal whether output indication ROB item target logic address of being stored and the pairing logic register of the RAT list item address that will be resumed equate; If the ROB item is cancelled, then output indication comparative result is unequal signal.
According to the method for the invention; Wherein step (III) comprises further whether the address according to the interior ROB item of each group of ROB item has the pairing comparative result of ROB item to be designated as equal by the sequential search that maximum in the group is decremented to minimum in the group; If have; Then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication; If there have the pairing comparative result of a plurality of ROB items to be designated as to be equal, the signal of the position of that ROB item in group that the output indication is found is at first searched the signal of success with indication, otherwise failure signal is searched in the output indication.
According to the method for the invention, wherein step (IV) further comprises according to amended ROB tail pointer, from existing ROB divides into groups, selects the group at ROB tail item place.
According to the method for the invention; Wherein said amended ROB tail pointer points to said ROB tail item; When the branch prediction mistake, the ROB tail pointer is made amendment according to branch's formation; In not having the microprocessor of branch delay slot, amended ROB tail pointer points to the pairing ROB item of branch instruction of prediction error; In the microprocessor of branch delay slot was arranged, amended ROB tail pointer pointed to the pairing ROB item of instruction that postpones in the groove.
According to the method for the invention; Wherein step (V) comprises that further with said ROB tail item be starting point; Whether there is the comparative result of the pairing comparer of ROB item to be designated as equal in the group according to descending sequential search ROB tail item place, ROB item address; If have, then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication, if there is the comparative result of the pairing comparer of a plurality of ROB items to be designated as equal; Then output indicates the signal of the position of that ROB item in group of finding at first to search the signal of success with indication, and wherein its address will can not searched greater than the pairing comparative result of ROB item of ROB tail item address.
According to the method for the invention; Wherein step (VI) further comprises according to the indication of output in step (V) searching whether whether successful signal is judged has been found the pairing comparative result of ROB item to be designated as equal ROB item in step (V); If find, just with this pairing address of ROB item as output, if in step (V), do not find the pairing comparative result of ROB item to be designated as equal ROB item; The direction that then gets into ROB successively according to instruction; Judge in the next one group of group at ROB tail item place whether found the corresponding comparative result of ROB item to be designated as equal ROB item,, the signal of success to be searched as output and output indication in that pairing address of ROB item of finding at first in this group if find; If do not find; Continue to judge that next group has not found the corresponding comparative result of ROB item to be designated as equal ROB item, till the group that is recycled to ROB tail item place, judge this moment and whether found the corresponding comparative result of ROB item to be designated as equal ROB item in the group of ROB tail item place; If find; The signal of success is searched as output and output indication in the address of that ROB item that finds at first in this group, otherwise failure signal is searched in the output indication, and finish to search.
According to the method for the invention; If wherein the signal of success is searched in output indication in step (VI), the front, ROB item address that then will in step (VI), export is adding one and this is made as ' 1 ' content to be resumed as the physical register address of being preserved in this RAT list item; If failure signal is searched in output indication in step (VI), then with this RAT list item the address of the corresponding architecture register content that be resumed as the physical register address of being preserved in this RAT list item.
According to the method for the invention, wherein the difference of step (III) and step (V) is, in step (III) search to as if fixing, and irrelevant with amended ROB tail pointer; And in step (V) search to as if the group at the ROB tail item place from all existing ROB groups, selected according to amended ROB tail pointer, and when searching, be starting point with ROB tail item, its address can not searched greater than the ROB item of the address of ROB tail item.
The present invention has advantage:
1. the present invention does not increase other sequential logic except timing device, but has utilized the original information of ROB.Owing to only when branch prediction fail, just work, when not working, can the input of institute be fixed (such as with ' 0 ' and all signals do and operate), perhaps turn off power supply, thus the reduction power consumption.
2. the time that microprocessor reloaded instruction when the present invention utilized the branch prediction mistake from new address carries out RAT and recovers, and does not have visible time overhead.And owing to have only a RAT, therefore steering logic is fairly simple when register renaming, and the sequential expense is little.
Description of drawings
Fig. 1 is the ROB and the RAT synoptic diagram of embodiments of the invention.
Fig. 2 is the overall construction drawing of embodiments of the invention.
Fig. 3 is that the mapping relations described in the embodiments of the invention are recovered module diagram.
Fig. 4 is the ROB view after the cancellation instruction when the branch prediction mistake takes place according to the embodiment of the invention.
Fig. 5 is the ROB view after the cancellation instruction when the branch prediction mistake takes place according to the embodiment of the invention.
Fig. 6 is used for when branch prediction is failed, using resequencing buffer ROB to recover the process flow diagram of the method for register alias table RAT content according to of the present invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described in further detail:
In the present embodiment, microprocessor has 32 logic registers (Logical Register abbreviates LR later on as), and numbering is respectively LR0~LR31.Wherein LR0 is a read-only register, and its value perseverance is 0, in practical application, need not do rename operation to LR0, so actual what will carry out the rename operation is these 31 logic registers of LR1~LR31.RAT comprises 31 list items, corresponds respectively to the address of these 31 logic registers of LR1~LR31, and the content of list item is the address of these 31 pairing physical registers of logic register of current LR1~LR31.
Present embodiment adopts rename implementation A, and architecture register (Architectural Register abbreviates AR later on as) has 31; Be numbered AR1~AR31, correspond respectively to these 31 logic registers of LR1~LR31, and rename register (Rename Register; Be called for short later on RR) corresponding one by one with the ROB item, ROB has 32, and relative have 32 rename registers; Be numbered RR0~RR31, correspond respectively to these 32 ROB items of ROB0~ROB31.The physical register address has 6; Wherein most significant digit representes that this physical register belongs to architecture register or rename register; When most significant digit is 0, represent that this physical register is an architecture register, and when most significant digit is 1; Represent that this register is the rename register, 5 of the back of physical register address are the numbering of this physical register in architecture register group or rename registers group.Specifically; Physical register address 000001~011111 corresponds respectively to architecture register AR1~AR31; Physical register address 100000~111111 corresponds respectively to rename register RR0~RR31; And,, do not correspond to any physical register so physical register address 000000 is an address blank because logic register LR0 does not have the corresponding physical register.In the ROB item, there is a special zone to preserve the pairing logic register of the target operand address of the instruction in this ROB item; The logic register address has 5; Wherein 00001~11111 distinguishes corresponding LR1~LR31, because the value perseverance of LR0 is 0, so LR0 is nonsensical as target operand; Therefore the logic register address 00000 that is kept in the ROB item also is an address blank; Represent that instruction in this can not write back object run and count in the physical register, when microprocessor resetted, the logic register address in all ROB items all was set as 00000; And when the instruction in the ROB item was cancelled or is submitted to, this logic register address also was set as 00000.
The view of Fig. 1 ROB that is present embodiment when the branch prediction failure does not take place and RAT is the logic register address among the ROB on the left of wherein, and the right side is the content of RAT.ROB12~ROB20 is effective ROB item, and RAT1~RAT31 has represented the mapping relations of LR1~LR31 and physical register respectively.With LR6 is example, and the target logic register address of ROB12 and ROB16 all is LR6, and what then keep among the RAT6 is that the up-to-date mapping relations of LR6 are RR14 (the pairing physical register of expression ROB14).And be not exactly the address of the pairing architecture register of this logic register by the content of the pairing RAT list item of the logic register that instruction used in the ROB formation, be exactly AR5 such as the content of RAT5.And the ROB item that the instruction that does not have the target logic register belongs to, such as the ROB item that is not used at present outside ROB18 and the ROB formation, such as ROB11, their logic register address all is 00000.
In the present embodiment, mapping relations are recovered module and are divided into 8 groups to ROB according to the address of ROB item, the 0th group of corresponding to ROB the 0th~3, and its address is 00000~00011; The 1st group of corresponding to ROB the 4th~7, its address is 00100~00111; The 2nd group of corresponding to ROB the 8th~11, its address is 01000~01011; The 3rd group of corresponding to ROB the 12nd~15, its address is 01100~01111; The 4th group of corresponding to ROB the 16th~19, its address is 10000~10011; The 5th group of corresponding to ROB the 20th~23, its address is 10100~10111; The 6th group of corresponding to ROB the 24th~27, its address is 11000~11011; The 7th group of corresponding to ROB the 28th~31, its address is 11100~11111.Can see that from top description the 4th~2 of ROB item address is exactly the numbering of group, and the 1st~0 of ROB item address can be used as numbering in the group.Such as ROB7, the address is 00111, the 4~2, and to be 001, the 1~0 be 11, promptly the 1st group the 3rd.And ROB29, the address is 11101, the 4~2, and to be 111, the 1~0 be 01, promptly the 7th group the 1st.Can find out that from above-mentioned packet mode the address of ROB item in each group is adjacent, and in all ROB items each all and only in a group.
Fig. 2 is that the course of work of present embodiment when branch prediction is failed is (simple in order to represent; All mapping relations of not drawing among Fig. 2 are recovered the relation of module and ROB item; But writing back the address, the logic register of all ROB items all to enter into all mapping relations recovery modules); After the branch prediction mistake is judged in branch's formation, revise ROB tail item, and timing device is started working and each mapping relations recovery module is started working simultaneously to the pairing ROB item of the branch instruction that makes a mistake; Each mapping relations is recovered module and is obtained the logic register address that they will write back from each ROB item; Through after the operation of certain hour, export the update content of each RAT list item, when timer reaches predetermined value (during periodicity before instruction that this value is not more than the new address of failing from branch prediction gets into rename stage of streamline; The delay of present embodiment is hidden; Can not influence performance), send update signal, the output that each list item among the RAT recovers module to the corresponding mapping relations of the content update Cheng Yuqi of oneself separately.
Fig. 3 is the inner structure that mapping relations are recovered module, and the structure of recovering module corresponding to each mapping relations of each RAT item all is identical, and this sentences the corresponding mapping relations recovery module of RAT7 is example, and each mapping relations is recovered module by forming with the lower part:
Comparer corresponding to each ROB item; Be used for judging whether the logic register address that this ROB item will write back recovers the corresponding pairing logic register of the RAT list item address of module equal (is exactly LR7 at Fig. 3) with these mapping relations; If equate, output ' 1 ', otherwise output ' 0 '.If the pairing ROB item of this comparer is cancelled, then comparative result output ' 0 '.
Divide into groups to the ROB item; Each group has all that to search device in the group corresponding with it; Search device in the group according to the descending order in ROB item address in the group, the comparative result of the corresponding comparer of ROB item in inspection and the group successively will be found to be output as the 1st~0 (promptly numbering in the group) of ' 1 ' the pairing ROB item of comparer address at first and export; To search into function signal simultaneously and be made as ' 1 ', and be illustrated in to have found in the group and be output as ' 1 ' comparer.Traveled through all ROB items in the group and still do not find and be output as ' 1 ' comparer if search device in the group, then will search into function signal and be made as ' 0 ', failure is searched in expression.
Divide into groups to ROB, according to the group that amended ROB tail pointer finds ROB tail item to belong to, as known, when the branch prediction mistake took place, the ROB tail pointer was resumed the next item down of the pairing ROB item of the branch instruction that makes a mistake for sensing.According to the present invention; This ROB tail pointer is revised as the pairing ROB item of the branch instruction that its sensing is made a mistake (promptly; ROB tail item), in not having the microprocessor of branch delay slot, amended ROB tail pointer points to the pairing ROB item of branch instruction of prediction error; In the microprocessor of branch delay slot was arranged, amended ROB tail pointer pointed to the pairing ROB item of instruction that postpones in the groove.Multi-selection device judges according to the 4th~2 of the scale-of-two ROB address of amended ROB tail pointer ROB tail item pointed ROB tail item is in which group between group; In Fig. 2, ROB tail item is ROB18, and the address is 10010; Wherein the 4th~2 is 100, so ROB tail item is just in the 4th group.After multi-selection device is selected the group at ROB tail item place between group, export of the output of the comparative result of the corresponding comparer of the ROB item of this group as oneself.
The result of multi-selection device between device acceptance group and the 1st~0 of ROB tail item scale-of-two ROB address are searched in special establishment; Find the pairing comparator results of ROB tail item among the result of elder generation according to the 1st~0 multi-selection device between group of ROB tail item address; Begin to judge successively the comparative result of comparer according to the descending order in ROB item address from this result; The scope of judging is the 0th from ROB tail item to this group, and numbering can not judged greater than the comparative result of the ROB item of ROB tail item in the group.First that search in the specific group that device will find is output as the 1st~0 output of ' 1 ' the pairing ROB item of comparer address, will search into function signal simultaneously and be made as ' 1 ', is illustrated in to have found in the group to be output as ' 1 ' comparer.Found in the group the 0th still not find to be output as ' 1 ' comparer, then will to search into function signal and be made as ' 0 ' if search device in the specific group, failure is searched in expression always.
The global search device is according to searching device in 8 groups, and the address of searching device and ROB tail item in 1 specific group finds out the address that is used to recover the ROB item of its content to a certain RAT list item.The global search device is judged the lookup result of searching device in the specific group earlier; If searching the function signal of into of device in the specific group is ' 1 '; Then piece together searching numbering in the group of searching device output in group # (just the 4th~2 of the address of ROB tail item the) that device searches and the specific group (ROB item address the 1st~0) in the specific group; Output as the global search device; Simultaneously being made as ' 1 ' to the function signal of searching into of global search device, is ' 0 ' if search the function signal of into of device in the specific group, and then the 4th~2 with the address of ROB tail item subtracts 1 back as group #; Judge this and organize whether the function signal of searching into of searching device in pairing group is ' 1 '; If be ' 1 ', the group # that then will organize and this are organized numbering assembly in the group of searching device output in pairing group, as the output of global search device; Simultaneously be made as ' 1 ' to the function signal of searching into of global search device; If be ' 0 ', then continue this group # is subtracted 1 back as group #, judge that next organizes the function signal of searching into of searching device in pairing group ... Till in finding the group of searching success, searching device or having judged the result who searches device in all groups (search in last estimative group search in device and the specific group device searches be same group); If wherein group # has been 0 and still need continue to search, then group # can be unrolled back 7; If searching the function signal of into of device in all groups all is ' 0 ', all not in executing state, the global search device is made as ' 0 ' to its function signal of searching in all instructions that expression this moment writes back this logic register address.The implication of noting splicing here is for arranging numbering in the group # that is found (just the 4th~2 of the address of ROB tail item the) and the group that is found (ROB item address the 1st~0) according to the order of big-endian; For example; If the group # that finds is AAA; And being numbered BB in the group that finds, this spliced result is AAABB.
Can find out based on foregoing description; Searching the difference of searching device in device and the specific group in of the present invention group is; Search in the group device search to as if fixing; And irrelevant with amended ROB tail pointer, that is, search device in the group and just search the comparative result that the interior pairing comparer of ROB item of oneself group is exported; And search in the specific group device search to as if the group at the ROB tail item place from all existing ROB groups, selected according to amended ROB tail pointer by multi-selection device between group; And when searching, be starting point with ROB tail item, its address can not searched greater than the ROB item of the address of ROB tail item.
In the present embodiment, the grouping of ROB is the principle according to even grouping, is divided into 8 groups to 32 ROB items, 4 every group.This group technology has been considered the simple efficient of realization; Because the not coordination of address that can use the ROB item this moment is as numbering in the numbering of group and the group, thus can be through getting the lookup result of output to the end to the numbering mode of splicing in the numbering of group and the group.But the packet mode of ROB has more than and is limited to this a kind of packet mode; The packet mode of ROB can change as the case may be; Also not necessarily each item number of being comprised of group all equates, the purpose of dividing into groups ROB be each group parallel search to shorten search the time, concrete packet mode will be seen actual conditions and decide; Under the chronic situation that the ROB item number seldom perhaps can be used to search, even can not divide into groups.Though this moment can not directly use the ROB item the address not coordination as the group numbering and the group in the numbering, those skilled in the art can expect using similar mode obtain with the present invention the identical result of illustrational embodiment.Such as the group technology that comprises the ROB item that does not wait item number for each group; Can carry out unequal grouping according to ROB item address earlier; After this method of in subsequent treatment, the ROB item address that obtains being taked to add and subtract address offset obtains numbering in corresponding group # and the group, thereby obtains spliced result at last.For the situation of ROB not being divided into groups, can be according to the direct ROB item address that gets the result who finds to the end, each ROB item address.These class methods are a lot, therefore here do not specifically describe.In a word, the present invention is not limited to 32 ROB items and these 32 ROB items is divided into 8 groups, the embodiment of every group of 4 ROB items, and the ROB item of other number also is adapted to the present invention with other packet mode.It is in order better the present invention to be described, to help those skilled in the art to understand the present invention better thus that this paper uses the for example clear embodiments of the invention of the ROB with 32.
RAT list item recovery device is accepted the output of global search device; If the function signal of searching into of global search device is ' 1 ', then RAT list item recovery device then adds 1 and this position is made as ' 1 ' content to be resumed as the physical register address of preserving in this RAT list item with the front, ROB item address of global search device output again.As previously mentioned and since first place be ' 1 ' physical register address corresponding to the rename register, therefore the above-mentioned modification of the physical register address of preserving in the RAT list item is just represented that the present pairing physical register of this RAT list item is the rename register; If the function signal of searching into of global search device is ' 0 '; Then RAT list item recovery device just recovers the content that the address of the pairing architecture register of the pairing RAT list item of module be resumed as the physical register address of preserving among this RAT with this mapping relations, and this expression pairing physical register of this RAT list item at present is and the pairing architecture register of the pairing logic register of this list item.With the situation among above-mentioned Fig. 2 is example; If the function signal of searching into of global search device is ' 1 '; Then RAT list item recovery device is then adding 1 and this position is made as ' 1 ' (therefore this address becomes 1XXXXX) with the front, ROB item address (for example XXXXX) of global search device output; Address modification with the physical register of storing among the RAT7 is 1XXXXX then; Because the first place of this physical register address is 1, therefore the present pairing physical register of this RAT list item of expression is the rename register.If the function signal of searching into of global search device is ' 0 '; Then RAT list item recovery device just recovers these mapping relations the address of the pairing architecture register of the pairing RAT list item of module; As preceding said, though, have only an architecture register corresponding with it though each logic register and its pairing RAT list item can corresponding a plurality of rename registers; Such as the architecture register corresponding with RAT7 is exactly AR7; Be AR7 at any time, although always the content of RAT7 AR7 not necessarily, but will never be other architecture register.Therefore; The content that RAT list item recovery device just should be resumed the address of RAT7 as this RAT list item; The content modification that is about to this RAT list item becomes the address (000111) of AR7, and the expression this moment pairing physical register of this RAT list item at present is the system register.
According to the present invention; Also comprise and be used to produce the timing device (referring to Fig. 2) that indication RAT upgrades the update signal of operation; In the time of can this timing device being designed to count value when the counter in the said timing device and reaching predetermined value; This timing device sends update signal and recovers the original physical register address of being preserved of module output each RAT list item of renewal with indication RAT according to the pairing mapping relations of its each list item; The timing of wherein said timing device is no more than when the branch prediction mistake takes place microprocessor reloads instruction from new address time, therefore, does not have visible time overhead.And owing to have only a RAT, therefore steering logic is fairly simple when register renaming, and the sequential expense is little.
Present embodiment just goes for rename implementation B to rename implementation A but need only on RAT list item recovery device, to make an amendment in fact.The method of revising is: with respect to rename mode A; Rename mode B can be in the ROB item the pairing physical register of extra preservation target logic register address; RAT list item recovery device is read physical address separately from each ROB item; If the function signal of searching into of global search device is ' 1 ', then according to the restore data of the ROB address selection of the global search device output target physical register address corresponding as the RAT list item with it; If the function signal of searching into of global search device is ' 0 ', then from architecture register mapping table, read the restore data of the content of corresponding list item as corresponding RAT list item.
Enumerate two concrete examples below and specify working method of the present invention, because each list item of RAT is all corresponding to same recovery logic, so following Example is only to explain the rejuvenation of a list item among the RAT:
Example 1. is as shown in Figure 4; When the branch prediction mistake takes place, also have 4 renames operations among the instruction cancellation back ROB to logic register LR15, be in respectively among the 13rd, 17,24,26 of ROB; The head pointer of instruction cancellation back ROB is positioned at the 12nd; And amended tail pointer belongs to mapping relations recovery module the 0th group to the ROB grouping at the 2nd, so the 0th group also is to deliver to the specific group of searching device in the specific group.4 operations to LR15 lay respectively in the the 3rd, the 4th and the 6th group, and wherein the 6th group comprises two operations to LR15.Recover to search in all groups in the module corresponding to the mapping relations of LR15 and search device in device and the specific group and search for operation separately LR15; In this example; 3rd, search device in the 4th and the 6th group the group and found operation LR15; Wherein the 6th group that find is the 26th of ROB because go up from the time, it is newer than on the same group the 24th.The global search device is at first judged the result who searches device in the specific group; Search device in the specific group and do not find the ROB item that will write back LR15; Next the global search device judges the 7th group result; Still do not find; Followed by being the 6th group, the 6th group has been found the target logic register address of preserving is the ROB item of LR15, gives RAT list item recovery device as the output of oneself and draws the restore data with the corresponding RAT list item of LR15 so the global search device with the 6th group Search Results also is the 26th of ROB.
This is a kind of relatively opposite extreme situations for an example 2., also is why the reason of searching device in the specific group will be set in the native system, and is as shown in Figure 5; When the branch prediction mistake takes place; It is empty having only two ROB items after the instruction cancellation, and the piece at amended ROB rear of queue item place has two ROB items to write back LR15, is respectively the 8th and the 11st; Though they belong to a piece; But the two ends of the effective ROB formation in office logically, the 11st is the piece that uses LR15 the earliest, and the 8th is the piece that uses LR15 at last.If the group inner encoder with common makes a decision, should select the 11st, in fact the 8th the up-to-date rename result who is only existing to LR15.Search device in the specific group owing to be to begin to search from amended ROB rear of queue item; So search the lookup result of device in the specific group will be the 8th; Find under result's the situation and in specific group, search device, overall scrambler will preferentially use the result who searches device in the specific group.
With reference to Fig. 6, described according to the method for the invention.Said method is from being provided for producing update signal step 601 beginning that indication RAT upgrades operation; In step 602, target logic address of preserving in each ROB item and the pairing logic register of the RAT list item address that will be resumed are compared and export the two comparative result that whether equates of indication; Comparative result in step 602 output is provided for step 603 and 604, in step 603,, the pairing comparative result of each ROB item in this group searched each group of ROB item, and the output lookup result; In step 604, select the group at the ROB tail item place in the ROB item and export the pairing comparative result of each ROB item in the group of group at this ROB tail item place; The comparative result of step 604 output is provided for step 605; In step 605; Based on the pairing comparative result of each ROB item in the group of the group at said ROB tail item place, the comparative result of the comparator in the group of said ROB tail item place is searched, and the output lookup result; The lookup result of output is provided for step 606 in step 603 and the step 605; In step 606; Be based on the lookup result in the step 603 and 605; Export final lookup result; The ROB item whether said final lookup result indication also has its target logic address to equate with the pairing logic register of the RAT list item address that will be resumed in ROB, and the address of the ROB item of the instruction that in its target logic address and these ROB items that the pairing logic register of the RAT list item address that will be resumed equates, equates with said target logic address corresponding to its target register address that should be performed the latest; Final lookup result in the step 606 is provided for step 607; In step 607; Based on final lookup result, be based on the content that physical register address that RAT list item that update signal output that indication RAT in the step 601 upgrades operation will be resumed preserved should be resumed.
What should explain at last is: above embodiment is the unrestricted technical scheme of the present invention in order to explanation only; Although the present invention is specified with reference to the foregoing description; Those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention; And replace any modification or the part that do not break away from the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.

Claims (12)

1. system that when branch prediction is failed, uses resequencing buffer ROB to recover register alias table RAT content; All ROB items are divided into a plurality of groups according to its address; It is overlapping that each group comprises that the ROB item of ROB item and the said predetermined number of predetermined number does not have between mutually, and said system comprises:
Be used to produce the timing device that indication RAT upgrades the update signal of operation;
Mapping relations corresponding to each list item among the RAT are recovered module, and wherein each mapping relations recovery module comprises:
Correspond respectively to the comparer of each ROB item; The target logic address that is kept in each ROB item is compared and export the two comparative result that whether equates of indication with the pairing logic register of this mapping relations recovery pairing RAT list item of module address, and the target logic address that wherein is kept in each ROB item equates with the target logic register address of the pairing instruction of this ROB item;
Search device in the group corresponding to each group of ROB item, it receives comparative result of the pairing comparer output of ROB item in each group, in these comparative results, searches and export lookup result;
Be used for multi-selection device between a plurality of groups group of ROB item, be used for selecting the group at the ROB tail item place of ROB item, said ROB tail item is the pairing ROB item of branch instruction that makes a mistake, and exports the comparative result of the comparer in the group of group at this ROB tail item place;
Search device in the specific group, receive the comparative result of the output of multi-selection device between said group, and the comparative result of the comparer in the group of said ROB tail item place is searched based on the comparative result of multi-selection device output between said group, and the output lookup result;
The global search device; Be used in said group, searching the final lookup result of lookup result output of searching device output in lookup result and the said specific group of device output; Whether said final lookup result indication also has its target logic address and this mapping relations to recover the ROB item that the pairing logic register of the pairing RAT list item of module address equates in ROB, and the address of the ROB item of the instruction that in its target logic address and these ROB items that the pairing logic register of this mapping relations recovery pairing RAT list item of module address equates, equates with said target logic address corresponding to its target register address that should be performed the latest;
RAT list item recovery device receives the final lookup result of global search device output, exports these mapping relations and recovers the content that physical register address that the pairing RAT list item of module preserved should be resumed.
2. the system of claim 1; When the count value of the counter in the said timing device reaches predetermined value; This timing device sends update signal and recovers module output with indication RAT according to the pairing mapping relations of its each list item and upgrade the original physical register address of being preserved of each RAT list item, and the timing of wherein said timing device is no more than when generation branch prediction mistake microprocessor reloads instruction from new address time.
3. the system of claim 1; Whether search device in wherein said group has the comparative result of the pairing comparer of ROB item to be designated as equal according to the ROB item address in its pairing group by the sequential search that maximum in the group is decremented to minimum in the group; If have; Then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication; If there have the comparative result of the pairing comparer of a plurality of ROB items to be designated as to be equal, the signal of the position of that ROB item in group that the output indication is found is at first searched the signal of success with indication, otherwise failure signal is searched in the output indication.
4. the system of claim 1; Search the output result of multi-selection device between device reception group in the wherein said specific group; And be starting point with said ROB tail item; Whether equal, if having, then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication according to the descending sequential search in ROB item address if having the comparative result of the pairing comparer of ROB item to be designated as; If there is the comparative result of the pairing comparer of a plurality of ROB items to be designated as equal; Then export and indicate the signal of the position of that ROB item in group of finding at first to search the signal of success, search failure signal, wherein will can not searched greater than the comparative result of the comparer of the ROB item of ROB tail item address corresponding to its address otherwise export to indicate with indication.
5. system as claimed in claim 4; Wherein said global search device is at first searched successful signal whether according to the indication of searching the output of device in the said specific group and is judged that searching the comparative result whether device found comparer in the specific group is designated as equal ROB item; If find; Just the signal of success is searched as output and output expression in the address of searching the ROB item that device finds in the specific group; Be designated as equal ROB item if search the comparative result that device do not find comparer in the specific group, the direction that then gets into ROB successively according to instruction, the next one of judging selected group of multi-selection device between group is organized and is searched the comparative result whether device found comparer in pairing group and be designated as equal ROB item; If find; The signal of success is searched as output and output indication in the address of searching the ROB item that device finds in this group,, continue to judge the result who searches device in the next group if do not find; Till being recycled to the ROB group that multi-selection device finds between group; Whether the global search device was searched and was searched device in the group of the selected ROB group of multi-selection device between group and find the comparer comparative result to be designated as equal ROB item this moment, if find, the signal of success was searched as output and output indication in the address of this ROB item; Otherwise failure signal is searched in global search device output indication, and finishes to search.
6. system as claimed in claim 5; If wherein the signal of success is searched in the output indication of global search device, then said RAT list item recovery device is adding one and this position is made as ' 1 ' content that be resumed with the physical register address of being preserved in as this RAT list item with the front, ROB item address of said global search device output; If failure signal is searched in the output indication of global search device, then RAT list item recovery device just with the pairing RAT list item of this mapping relations recovery module the address of the corresponding architecture register content that be resumed as the physical register address of being preserved in this RAT list item.
7. method of when branch prediction is failed, using resequencing buffer ROB to recover register alias table RAT content; All ROB items are divided into a plurality of groups according to its address; It is overlapping that each group comprises that the ROB item of ROB item and the said predetermined number of predetermined number does not have between mutually, said method comprising the steps of:
(I) be provided for producing the update signal that indication RAT upgrades operation;
(II) target logic address of preserving in each ROB item and the pairing logic register of the RAT list item address that will be resumed are compared and export the two comparative result that whether equates of indication, the target logic address that wherein is kept in each ROB item equates with the target logic register address of the pairing instruction of each ROB item;
(III) to each group of ROB item, the pairing comparative result of each ROB item in this group is searched, and the output lookup result;
(IV) select the group that the ROB tail item in the ROB item belongs to, said ROB tail item is the pairing ROB item of branch instruction that makes a mistake, and exports the interior pairing comparative result of each ROB item of group of the group at this ROB tail item place;
(V) based on the pairing comparative result of each ROB item in the group of the group at said ROB tail item place, the comparative result of the comparer in the group of said ROB tail item place is searched, and the output lookup result;
(VI) based on the final lookup result of the output of the lookup result in lookup result in the step (III) and the step (V); The ROB item whether said final lookup result indication also has its target logic address to equate with the pairing logic register of the RAT list item address that will be resumed in ROB, and the address of the ROB item of the instruction that in its target logic address and these ROB items that the pairing logic register of the RAT list item address that will be resumed equates, equates with said target logic address corresponding to its target register address that should be performed the latest;
(VII), upgrade the content that physical register address that RAT list item that the update signal output of operation will be resumed preserved should be resumed according to the indication RAT in the step (I) based on the final lookup result in the step (VI).
8. method as claimed in claim 7; Wherein use timing device to provide indication RAT to upgrade the update signal of operation; When the count value of the counter in the said timing device reaches predetermined value; This timing device sends update signal and upgrades the original physical register address of being preserved of each RAT list item with the output that indication RAT recovers module according to the pairing mapping relations of its each list item, and the timing of wherein said timing device is no more than when generation branch prediction mistake microprocessor reloads instruction from new address time.
9. method as claimed in claim 7; Wherein step (III) comprises further whether the address according to the interior ROB item of each group of ROB item has the pairing comparative result of ROB item to be designated as equal by the sequential search that maximum in the group is decremented to minimum in the group; If have; Then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication; If there have the pairing comparative result of a plurality of ROB items to be designated as to be equal, the signal of the position of that ROB item in group that the output indication is found is at first searched the signal of success with indication, otherwise failure signal is searched in the output indication.
10. method as claimed in claim 7; Wherein step (V) comprises that further with said ROB tail item be starting point; Whether there is the comparative result of the pairing comparer of ROB item to be designated as equal in the group according to descending sequential search ROB tail item place, ROB item address; If have; Then the signal of the position of this ROB item of output indication in group is searched the signal of success with indication; If there have the comparative result of the pairing comparer of a plurality of ROB items to be designated as to be equal, then output indicates the signal of the position of that ROB item in group of finding at first to search the signal of success with indication, and wherein its address will can not searched greater than the pairing comparative result of ROB item of ROB tail item address.
11. method as claimed in claim 10; Wherein step (VI) further comprises according to the indication of output in step (V) searching whether whether successful signal is judged has been found the pairing comparative result of ROB item to be designated as equal ROB item in step (V); If find, just with this pairing address of ROB item as output, if in step (V), do not find the pairing comparative result of ROB item to be designated as equal ROB item; The direction that then gets into ROB successively according to instruction; Judge in the next one group of group at ROB tail item place whether found the corresponding comparative result of ROB item to be designated as equal ROB item,, the signal of success to be searched as output and output indication in that pairing address of ROB item of finding at first in this group if find; If do not find; Continue to judge that next group has not found the corresponding comparative result of ROB item to be designated as equal ROB item, till the group that is recycled to ROB tail item place, judge this moment and whether found the corresponding comparative result of ROB item to be designated as equal ROB item in the group of ROB tail item place; If find; The signal of success is searched as output and output indication in the address of that ROB item that finds at first in this group, otherwise failure signal is searched in the output indication, and finish to search.
12. method as claimed in claim 11; If wherein the signal of success is searched in output indication in step (VI), the front, ROB item address that then will in step (VI), export is adding one and this is made as ' 1 ' content to be resumed as the physical register address of being preserved in this RAT list item; If failure signal is searched in output indication in step (VI), then with this RAT list item the address of the corresponding architecture register content that be resumed as the physical register address of being preserved in this RAT list item.
CN 201010607215 2010-12-27 2010-12-27 System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails Expired - Fee Related CN102567137B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010607215 CN102567137B (en) 2010-12-27 2010-12-27 System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010607215 CN102567137B (en) 2010-12-27 2010-12-27 System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails

Publications (2)

Publication Number Publication Date
CN102567137A true CN102567137A (en) 2012-07-11
CN102567137B CN102567137B (en) 2013-09-25

Family

ID=46412620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010607215 Expired - Fee Related CN102567137B (en) 2010-12-27 2010-12-27 System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails

Country Status (1)

Country Link
CN (1) CN102567137B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI738600B (en) * 2020-12-31 2021-09-01 致茂電子股份有限公司 Address scrambler
CN115113934A (en) * 2022-08-31 2022-09-27 腾讯科技(深圳)有限公司 Instruction processing method, apparatus, program product, computer device and medium
CN117472447A (en) * 2023-12-28 2024-01-30 北京微核芯科技有限公司 Register renaming recovery method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5497493A (en) * 1993-09-30 1996-03-05 Intel Corporation High byte right-shift apparatus with a register alias table
CN1286771A (en) * 1997-12-16 2001-03-07 英特尔公司 Out-of-pipeline trace buffer for instruction replay following misspeculation
US6473746B1 (en) * 1999-12-16 2002-10-29 Simmonds Precision Products, Inc. Method of verifying pretrained neural net mapping for use in safety-critical software
CN1545026A (en) * 2003-11-26 2004-11-10 中国人民解放军国防科学技术大学 Dynamic VLIW command dispatching method according to determination delay
US20060095731A1 (en) * 2004-09-02 2006-05-04 Yuval Bustan Method and apparatus for avoiding read port assignment of a reorder buffer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5497493A (en) * 1993-09-30 1996-03-05 Intel Corporation High byte right-shift apparatus with a register alias table
CN1286771A (en) * 1997-12-16 2001-03-07 英特尔公司 Out-of-pipeline trace buffer for instruction replay following misspeculation
US6473746B1 (en) * 1999-12-16 2002-10-29 Simmonds Precision Products, Inc. Method of verifying pretrained neural net mapping for use in safety-critical software
CN1545026A (en) * 2003-11-26 2004-11-10 中国人民解放军国防科学技术大学 Dynamic VLIW command dispatching method according to determination delay
US20060095731A1 (en) * 2004-09-02 2006-05-04 Yuval Bustan Method and apparatus for avoiding read port assignment of a reorder buffer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI738600B (en) * 2020-12-31 2021-09-01 致茂電子股份有限公司 Address scrambler
CN115113934A (en) * 2022-08-31 2022-09-27 腾讯科技(深圳)有限公司 Instruction processing method, apparatus, program product, computer device and medium
CN117472447A (en) * 2023-12-28 2024-01-30 北京微核芯科技有限公司 Register renaming recovery method, device and equipment
CN117472447B (en) * 2023-12-28 2024-03-12 北京微核芯科技有限公司 Register renaming recovery method, device and equipment

Also Published As

Publication number Publication date
CN102567137B (en) 2013-09-25

Similar Documents

Publication Publication Date Title
CN101819518B (en) Method and device for quickly saving context in transactional memory
US5708841A (en) Processor architecture providing speculative, out of order execution of instructions
CN102566976B (en) Register renaming system and method for managing and renaming registers
US5493669A (en) Data processor for simultaneously searching two fields of the rename buffer having first and second most recently allogated bits
JPH0668726B2 (en) Register management system
CN107688544B (en) Method for recovering alias table of register
US20180246718A1 (en) A system and method for multi-issue processors
JP4956891B2 (en) Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus
KR20080036940A (en) Cache memory having pipeline structure and method for controlling the same
US20220326954A1 (en) Exit history based branch prediction
CN102567137B (en) System and method for restoring contents of RAT (register alias table) by using ROB (reorder buffer) when branch prediction fails
JPH0668736B2 (en) Apparatus and method for providing a cache memory unit with a write operation utilizing two system clock cycles
CN114168197B (en) Instruction execution method, processor and electronic device
CN106095393B (en) Merge the system and method for partial write result during retraction phase
JP2003196086A (en) Register file by register window system and its control method
US8782378B2 (en) Dynamic instruction splitting
EP1622034B1 (en) Apparatus and method for controlling address conversion buffer
EP3264262B1 (en) Processor with slave free list that handles overflow of recycled physical registers and method of recycling physical registers in a processor using a slave free list
CN101482851B (en) Threading sharing target local code cache replacement method and system in binary translator
US11334361B2 (en) Shared pointer for local history records used by prediction circuitry
US20230185534A1 (en) Arithmetic processing device and arithmetic processing method
JP2020077334A (en) Arithmetic processing device and method for controlling arithmetic processing device
JPH081601B2 (en) Information processing device
CN117908961A (en) Renaming mapping table recovery method, renaming mapping table recovery system and terminal
JP3895314B2 (en) Data processing apparatus, data processing program, and recording medium on which data processing program is recorded

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130925

Termination date: 20211227

CF01 Termination of patent right due to non-payment of annual fee