Instruction processing method and device for out-of-order multi-issue processor
By caching and grouping instructions, the execution uncertainty caused by instruction exceptions in out-of-order multi-transmitter processors is solved, ensuring that the processor can still execute instructions stably under abnormal conditions, and improving the stability and efficiency of the processor.
Patent Information
- Application Number
- CN202410918102.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-09
AI Technical Summary
In an out-of-order multi-transmission processor, when an instruction branch prediction error, interrupt or exception occurs, the entire pipeline instruction is cleared, and it is impossible to determine which instructions can be executed and which cannot be executed, affecting the stability and efficiency of the processor.
By obtaining and cacheing the instructions of the preset command transmission queue, extracting and decoding the target instructions, grouping instructions according to the decoded information, obtaining operands and delivery signals, confirming that the packet is completed, performing the memory access operation, and writing the result back to the register. The non-memory fetch instruction is executed directly to ensure that the instruction execution status can still be determined in the case of exceptions or branch prediction errors.
It realizes determining which instructions can be executed and which cannot be executed in an out-of-order multi-transmission processor, ensuring the stability and efficiency of the processor, especially handling out-of-order processing of instructions such as long-term memory access classes.
Smart Images

Figure CN118467041B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of out-of-order processors, and in particular, to an instruction processing method, apparatus, computer equipment and storage medium for an out-of-order multi-issue processor. Background Art
[0002] An out-of-order multi-issue processor refers to a processor that fetches, executes, and submits multiple instructions in one clock cycle, and issues and executes them out of order.
[0003] Currently, the functions of the pipeline of an out-of-order multi-issue processor include but are not limited to instruction fetching and branch prediction, instruction decoding, analyzing data dependencies between instructions and eliminating false data hazards, issuing instructions to functional units, executing instructions in parallel, and updating machine status in the original order of instructions. During the execution of instructions, if an instruction has any of branch prediction errors, interruptions and exceptions, the instructions in the entire pipeline will be cleared, which may lead to the problem of being unable to determine which instructions in the out-of-order multi-issue processor can be executed and which cannot be executed. Summary of the invention
[0004] Embodiments of the present application provide an instruction processing method, apparatus, computer device, and storage medium for an out-of-order multi-issue processor.
[0005] A first aspect of an embodiment of the present application provides an instruction processing method for an out-of-order multi-issue processor, comprising:
[0006] Obtain and cache instructions issued by a preset instruction issuance queue;
[0007] Extracting a target instruction from the instructions and decoding the instruction;
[0008] Grouping the extracted target instructions according to the decoding information of the instructions;
[0009] In the case of acquiring an operand corresponding to the target instruction and an instruction delivery signal, determining whether the grouping of the target instruction is completed;
[0010] When the target instructions have been grouped and the memory access address corresponding to the memory access instruction obtained by the grouping has been obtained, the memory access operation is performed according to the memory access address according to the memory access instruction, and the result of the memory access operation is written back to the designated register through the write-back module. Non-memory access instructions are directly executed after the grouping is completed.
[0011] In an optional embodiment of the present application, obtaining the operand corresponding to the target instruction includes:
[0012] Obtaining an address of a designated operand register of a target instruction, wherein the designated operand register stores an operand corresponding to the target instruction;
[0013] According to the address of the designated operand register, an operand corresponding to the target instruction is read from the designated register.
[0014] In an optional embodiment of the present application, reading the operand corresponding to the target instruction from the designated register includes:
[0015] When the designated register is a general integer register and the operand corresponding to the target instruction has a dependency relationship with the general integer register, reading of the operand is suspended until the operand corresponding to the target instruction has no dependency relationship with the general integer register.
[0016] In an optional embodiment of the present application, the step of obtaining an instruction delivery signal corresponding to the target instruction includes:
[0017] Sending instructions to a delivery module of an out-of-order multi-issue processor;
[0018] The receiving and committing module sends an instruction commit signal in response to the instruction, wherein the instruction commit signal is generated when no branch prediction error, interruption or exception occurs in an instruction preceding the instruction.
[0019] In an optional embodiment of the present application, the decoding information is related to a general integer register, an operand register, and a destination register index of the target instruction, and the grouping of the extracted target instructions according to the decoding information of the instructions includes:
[0020] The extracted target instructions are divided into memory access instructions and non-memory access instructions according to the decoding information of the instructions, and each target instruction is divided into a plurality of minimum operation units.
[0021] In an optional embodiment of the present application, the non-memory access instructions are directly executed after grouping, including:
[0022] For non-memory access instructions, the corresponding multiple minimum operation units are executed and the execution results are sent to the write-back module.
[0023] In an optional embodiment of the present application, the memory access address corresponding to the memory access instruction obtained by the acquisition group includes:
[0024] The offset memory access address in the memory access instruction is calculated according to the operand corresponding to the memory access instruction to obtain the memory access address corresponding to the memory access instruction.
[0025] According to a second aspect of an embodiment of the present application, there is provided an instruction processing device for an out-of-order multi-issue processor, comprising:
[0026] A buffer area, used to obtain and cache instructions issued by a preset instruction issuance queue;
[0027] An extraction module, used for extracting a target instruction from the instructions and decoding the instructions;
[0028] A grouping module, used for grouping the extracted target instructions according to the decoding information of the instructions;
[0029] A determination module, used to determine whether the grouping of the target instructions is completed when the operands corresponding to the target instructions and the instruction delivery signal are obtained;
[0030] A memory access module is used to perform memory access operations according to the memory access instructions according to the memory access addresses after completing the grouping of target instructions and obtaining the memory access addresses corresponding to the memory access instructions obtained by the grouping, and write the memory access operation results back to the designated register through the write-back module, and directly execute non-memory access instructions after completing the grouping.
[0031] According to a third aspect of an embodiment of the present application, a computer device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0032] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0034] Figure 1 A flowchart of an instruction processing method for an out-of-order multi-issue processor provided by an embodiment of the present application;
[0035] Figure 2 A flow chart of the flow of VPU instructions in an out-of-order multi-issue processor provided by one embodiment of the present application;
[0036] Figure 3 A flowchart of an instruction processing method for an out-of-order multi-issue processor provided by another embodiment of the present application;
[0037] Figure 4 A flow chart of the CSR instruction in an out-of-order multi-issue processor provided by one embodiment of the present application;
[0038] Figure 5A schematic diagram of the structure of an instruction processing device for an out-of-order multi-issue processor provided by an embodiment of the present application;
[0039] Figure 6 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION
[0040] In the process of implementing the present application, the inventors discovered that, during the execution of instructions, if an instruction encounters any of a branch prediction error, an interruption, and an exception, the instructions in the entire pipeline may be cleared, which may lead to the problem of being unable to determine which instructions in the out-of-order multi-issue processor can be executed and which cannot be executed.
[0041] In response to the above problems, an embodiment of the present application provides an instruction processing method for an out-of-order multi-issue processor, which obtains and caches instructions emitted by a preset instruction emission queue; extracts target instructions from the instructions and decodes the instructions; groups the extracted target instructions according to the decoding information of the instructions; determines whether the grouping of the target instructions is completed when the operands corresponding to the target instructions and the instruction delivery signal are obtained; when the grouping of the target instructions has been completed and the memory access address corresponding to the memory access instruction obtained by the grouping is obtained, performs a memory access operation according to the memory access instruction according to the memory access address, and writes the memory access operation result back to the designated register through a write back module, and directly executes non-memory access instructions after grouping is completed. When the instructions in the entire pipeline may be cleared due to an exception, an interruption or a branch prediction error, it is possible to determine which instructions in the out-of-order multi-issue processor can be executed and which instructions cannot be executed, and implements out-of-order processing of instructions with a long execution cycle such as memory access.
[0042] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0043] See also Figure 1 The instruction processing method for an out-of-order multi-issue processor provided in an embodiment of the present application includes the following steps S1 to S5:
[0044] S1, obtain and cache the instructions issued by the preset instruction issuance queue.
[0045] In an optional embodiment of the present application, the instructions issued by the dispatch module of the execution unit are grouped, and not each group of instructions has a separate instruction issuance queue, but multiple groups of instructions share the instruction issuance queue, taking into account the area and function of the cache area.
[0046] S2, extracting a target instruction from the instructions and decoding the instructions.
[0047] In an optional embodiment of the present application, the decoding information obtained by decoding the instruction is related to the general integer register and operand register and destination register index of the target instruction.
[0048] S3, grouping the extracted target instructions according to the decoding information of the instructions.
[0049] In an optional embodiment of the present application, the decoding information is related to a general integer register and an operand register and a destination register index of a target instruction, the target instruction is a VPU (Vector Process Unit) instruction, and the grouping of the extracted target instructions according to the decoding information of the instructions includes:
[0050] The extracted target instructions are divided into memory access instructions and non-memory access instructions according to the instruction decoding information, and each target instruction is divided into multiple minimum operation units. The operand register and destination register of the target instruction can be general integer registers or vector registers.
[0051] S4, when the operands corresponding to the target instruction and the instruction delivery signal are obtained, it is determined whether the grouping of the target instruction is completed, and the non-memory access instruction is directly executed after the grouping is completed.
[0052] In an optional embodiment of the present application, obtaining the operand corresponding to the target instruction includes:
[0053] Obtaining an address of a designated operand register of a target instruction, wherein the designated operand register stores an operand corresponding to the target instruction;
[0054] According to the address of the designated operand register, an operand corresponding to the target instruction is read from the designated register.
[0055] In an optional embodiment of the present application, reading the operand corresponding to the target instruction from the designated register includes:
[0056] When the designated register is a general integer register and the operand corresponding to the target instruction has a dependency relationship with the general integer register, reading of the operand is suspended until the operand corresponding to the target instruction has no dependency relationship with the general integer register.
[0057] In an optional embodiment of the present application, the step of obtaining an instruction delivery signal corresponding to the target instruction includes:
[0058] Sending instructions to a delivery module of an out-of-order multi-issue processor;
[0059] The receiving and committing module sends an instruction commit signal in response to the instruction, wherein the instruction commit signal is generated when no branch prediction error, interruption or exception occurs in an instruction preceding the instruction.
[0060] S5, when the target instructions have been grouped and the memory access address corresponding to the memory access instruction obtained by the grouping has been obtained, the memory access operation is performed according to the memory access address according to the memory access instruction, and the memory access operation result is written back to the specified register through the write-back module, and the non-memory access instruction is directly executed after the grouping is completed.
[0061] In an optional embodiment of the present application, the non-memory access instructions are directly executed after grouping, including:
[0062] For non-memory access instructions, the corresponding multiple minimum operation units are executed and the execution results are sent to the write-back module.
[0063] In an optional embodiment of the present application, the memory access address corresponding to the memory access instruction obtained by the acquisition group includes:
[0064] The offset memory access address in the memory access instruction is calculated according to the operand corresponding to the memory access instruction to obtain the memory access address corresponding to the memory access instruction.
[0065] See also Figure 2 , when the target instruction is a VPU instruction, the flow of instructions in the instruction processing method for an out-of-order multi-issue processor disclosed in the present invention is as follows:
[0066] The VPU instruction comes out of the dispatch module of the pipeline execution unit (used to dispatch instructions to different computing units for execution) and is divided into two paths: one is the delivery module (instruction delivery means that the instruction is no longer in the predicted execution state in the pipeline, it is determined to be able to be actually executed in the processor and can affect the processor state), and the other is the execution path. The predicted execution state is: if the previous instruction of an instruction B is a branch jump instruction A, then instruction B is in the predicted execution state. When the previous branch jump instruction A passes through the execution stage, if the prediction is wrong, then instruction B will be cancelled and will not be executed; if the prediction is correct, then instruction B will not be cancelled and can be executed, and the predicted execution state is released, and it can be truly delivered. An instruction is dispatched from the dispatch module of the execution unit, and the parsed instruction information is sent to the queue for instruction issuance (in an out-of-order multi-issue processor, instructions can be issued out of order). Depending on the timing, it may need to enter the queue (used to optimize timing) cache when it comes out of the queue. In the queue stage and queue cache stage, VPU instructions and other instructions such as AGU (Address Generate Unit) instructions are shared. Then the VPU instructions are separated. The instructions enter the vpu separator (in the same stage as the vpu parser, used to extract the VPU instructions from the mixed instruction stream) and the vpu parser (which performs vector register and index-related decoding of the VPU instructions, and is used by the downstream instruction dispatch module to perform uop segmentation and grouping of instructions), and then go to the instruction dispatch module (which is used to group the VPU instructions and perform instruction uop (the full name of uop is micro operation. For SIMD instructions such as VPU instructions, the official instruction set manual requires that they must be split during specific implementation. The full name of SIMD is Single Instruction Multiple Data, that is, an instruction needs to process multiple data. If it is not split, it is impossible to process a large amount of data at one time. uop is the division of the smallest operation unit of the instruction) and enters the operand cache at the same time. The VPU instruction is obtained in the instruction dispatch module stage, and the instruction dispatch module stage and the operand cache stage are strongly aligned. The VPU instruction in the instruction dispatch module stage needs to meet two conditions to be sent down: if xreg (xreg refers to a general integer register) is needed, the dependency of xreg is released in the operand cache stage; and the delivery information of this VPU instruction itself must be waited for (the premise that an instruction can be successfully delivered is that its predecessor instruction has no branch prediction error, interruption or exception). If the dependency is not released, or there is no delivery information, it is necessary to wait. When the VPU instruction reaches the instruction dispatch module, the dependency detection is performed. When the dependency is released, it continues to be sent down and allocated to different instruction groups according to the principle of vpu grouping.The instructions assigned to the memory access instruction group are memory access instructions. In the memory access instruction group stage, they must maintain strong alignment with the first vector address generation unit (the address used for memory access is calculated based on the address offset). The memory access instruction group needs to inform the first vector address generation unit whether the grouping and other related information have been completed, and the first vector address generation unit also needs to inform the memory access instruction group whether the address and other information are ready. If one side has not completed the relevant operation, the other side needs to wait. When both sides are ready, they will go to the second vector address generation unit together (the information sent by the first vector address generation unit and the memory access instruction group must be obtained at the same time). When the memory access instruction arrives at the second vector address generation unit, the memory access instruction is sent to the memory access unit for memory access operation, and finally the memory access result is written back to the general register group through the write-back unit (used to write the calculation result of the instruction back to the general register group).
[0067] See also Figure 3 In the case where the target instruction is a CSR instruction, the instruction processing method for an out-of-order multi-issue processor provided in the embodiment of the present application further includes the following steps S31 to S34:
[0068] S31, acquiring and caching the CSR instructions and their corresponding operands issued by the preset instruction issue queue.
[0069] In an optional embodiment of the present application, in step S31, obtaining and caching the CSR instruction and its corresponding operand issued by the preset instruction issue queue includes:
[0070] Get the CSR instruction sent by the preset instruction sending queue;
[0071] Determine the operand corresponding to the CSR instruction;
[0072] The CSR instructions and their corresponding operands issued by the preset instruction issue queue are cached.
[0073] In an optional embodiment of the present application, determining the operand corresponding to the CSR instruction according to the CSR instruction includes:
[0074] Obtaining an address of a specified operand register in a CSR instruction, wherein the specified operand register stores an operand corresponding to the CSR instruction;
[0075] According to the address of the designated operand register, the operand corresponding to the CSR instruction is read from the designated register.
[0076] S32, storing the plurality of CSR instructions and their corresponding operands into a preset first-in-first-out queue.
[0077] In an optional embodiment of the present application, in step S32, storing the plurality of CSR instructions and their corresponding operands into a preset first-in-first-out queue includes:
[0078] According to the order of reading operands, different CSR instructions and their corresponding operands are stored in a preset first-in-first-out queue.
[0079] S33, for each CSR instruction and its corresponding operand in the first-in-first-out queue, when the corresponding first synchronization signal is sent to the delivery module of the out-of-order multi-issue processor and the second synchronization signal sent by the delivery module is received at the same time, the CSR instruction is executed and the execution result is sent to the write back module of the out-of-order multi-issue processor, wherein there is no order between the sending of the first synchronization signal and the receiving of the second synchronization signal, and the first synchronization signal may be sent first and then the second synchronization signal is received, or the second synchronization signal may be received first and then the first synchronization signal is sent.
[0080] In an optional embodiment of the present application, the first synchronization signal is used to control the read and write operations of the CSR instruction, and the second synchronization signal is used to deliver the instruction, wherein the condition for delivering the instruction is that the instruction preceding the current instruction has no branch prediction error, interruption or exception.
[0081] In an optional embodiment of the present application, in step S33, executing the CSR instruction and sending the execution result to the write-back module of the out-of-order multi-issue processor includes:
[0082] Update the value of the CSR instruction, generate the corresponding flush signal (a signal indicating that the pipeline needs to be flushed), and store the updated value of the CSR instruction and the flush signal in the preset register;
[0083] The updated value of the CSR instruction, the flush signal, and the storage record of the preset register are sent to the write-back module.
[0084] In an optional embodiment of the present application, before executing the CSR instruction, the method further includes:
[0085] When the CSR instruction is a read-write operation instruction and the destination register is the general integer register x0, CSR is only written but not read. xreg is a general integer register, represented by the code x0~x31 or x0~x15. Whether it is 32 registers or 16 registers is affected by the currently used subset. The value of the general integer register x0 is usually reserved as a constant 0, which means that writing to x0 is invalid.
[0086] When the CSR instruction is a read and set operation instruction or a read and clear operation instruction, and the operand register is the general integer register x0, the CSR is only read but not written;
[0087] When the CSR instruction is an immediate value extension instruction of a read and set operation or an immediate value extension instruction of a read and clear operation, and the immediate value is 0, the CSR is only read but not written.
[0088] S34, the delivery module sends the CSR instruction delivery result to the write-back module of the out-of-order multi-issue processor.
[0089] See also Figure 4 , when the target instruction is a CSR instruction, the flow of instructions in the CSR instruction processing method for an out-of-order multi-issue processor disclosed in the present invention is as follows:
[0090] Figure 4 The left side is the execution path of the CSR instruction, and the right side is the path of the delivery module and the write-back module. When the CSR instruction appears in the instruction queue (instruction queue) for instruction emission, it passes through the instruction queue buffer iqbuf (instuction queue buffer, used to optimize timing, Inst Queue and iqbuf are both before reading operands), operand buffer opbuf (opcode buffer, all operands need to be obtained at this stage), and reaches the encapsulation module csr_wrapper (used to encapsulate the N-depth-FIFO of the first-in-first-out buffer area directly related to the CSR, the instruction control module csr_ctrl and the instruction update module csr_update, the instruction control module is used to control the reading and writing of the CSR register, and the instruction update module is used to update the value of the CSR register). Among them, the operand must be obtained before it comes out of the opbuf, otherwise it will be stuck and wait until it is obtained. When a CSR instruction enters csr_wrapper, it first enters an N-depth fifo cache (N-depth-fifo, a first-in-first-out cache area with a depth of N, which can cache multiple CSR instructions sent from upstream). At the exit of the fifo cache, you need to wait until Figure 2 The csr cmt signal sent by the delivery module in the command control module will continue to enter the command control module csr_ctrl. If there is no csr cmt signal (csr commit signal, sent by the cmt module, tells the csr_ctrl module that the command can be delivered, cmt is the commit command delivery module), you need to wait until you get it. At the same time, Figure 2On the main pipeline on the right, it is necessary to wait for the csr rslv signal issued by the instruction control module csr_ctrl (informing the delivery module that the CSR instruction has reached the csr_ctrl module), that is, the CSR instruction has reached the csr_ctrl module normally, before it can continue to move to the downstream module. When the CSR instruction enters the csr_ctrl module, the update of the CSR instruction can be completed. The corresponding clear signal is generated while updating the CSR instruction. At the same time, the read data is saved in the register and sent to the write-back module (writing the calculation result of the instruction back to the general register group regfile), and written back after arbitration.
[0091] In this embodiment, the csr_ctrl module and the delivery module are forced to be synchronized, and both sides wait for each other until the conditions are met. The forced synchronization is to ensure that the current CSR instruction can be safely executed and will not be cleared by other instructions. When the instructions preceding the current CSR instruction are cleared due to an exception, interruption or branch prediction error, the execution status of the current CSR instruction can be determined, that is, whether it can be executed safely.
[0092] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0093] See also Figure 5 One embodiment of the present application provides an instruction processing device for an out-of-order multi-issue processor, comprising:
[0094] Cache area 11, used to obtain and cache instructions issued by a preset instruction issuance queue;
[0095] An extraction module 12, used for extracting a target instruction from the instructions and decoding the instructions;
[0096] A grouping module 13, used for grouping the extracted target instructions according to the decoding information of the instructions;
[0097] A determination module 14, configured to determine whether the grouping of the target instruction is completed when the operand corresponding to the target instruction and the instruction delivery signal are obtained;
[0098] The memory access module 15 is used to perform memory access operations according to the memory access instructions according to the memory access addresses after completing the grouping of the target instructions and obtaining the memory access addresses corresponding to the memory access instructions obtained by the grouping, and write the memory access operation results back to the designated register through the write-back module, and directly execute non-memory access instructions after completing the grouping.
[0099] In an optional embodiment of the present application, the determining module is further configured to:
[0100] Obtaining an address of a designated operand register of a target instruction, wherein the designated operand register stores an operand corresponding to the target instruction;
[0101] According to the address of the designated operand register, an operand corresponding to the target instruction is read from the designated register.
[0102] In an optional embodiment of the present application, the determining module is further configured to:
[0103] When the designated register is a general integer register and the operand corresponding to the target instruction has a dependency relationship with the general integer register, reading of the operand is suspended until the operand corresponding to the target instruction has no dependency relationship with the general integer register.
[0104] In an optional embodiment of the present application, the determining module is further configured to:
[0105] Sending instructions to a delivery module of an out-of-order multi-issue processor;
[0106] The receiving and committing module sends an instruction commit signal in response to the instruction, wherein the instruction commit signal is generated when no branch prediction error, interruption or exception occurs in an instruction preceding the instruction.
[0107] In an optional embodiment of the present application, the decoding information is related to a general integer register and an operand register and a destination register index of the target instruction, and the grouping module is further used to:
[0108] The extracted target instructions are divided into memory access instructions and non-memory access instructions according to the decoding information of the instructions, and each target instruction is divided into a plurality of minimum operation units.
[0109] In an optional embodiment of the present application, the grouping module is further used for:
[0110] For non-memory access instructions, the corresponding multiple minimum operation units are executed and the execution results are sent to the write-back module.
[0111] In an optional embodiment of the present application, the memory access module is further used for:
[0112] The offset memory access address in the memory access instruction is calculated according to the operand corresponding to the memory access instruction to obtain the memory access address corresponding to the memory access instruction.
[0113] For the specific definition of the above-mentioned instruction processing device for the out-of-order multi-issue processor, please refer to the definition of the instruction processing method for the out-of-order multi-issue processor above, which will not be repeated here. Each module in the above-mentioned instruction processing device for the out-of-order multi-issue processor can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0114] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an instruction processing method for a disordered multi-issue processor as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the instruction processing method for a disordered multi-issue processor as described above is implemented.
[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step of the above instruction processing method for an out-of-order multi-issue processor can be implemented.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0117] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0120] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0121] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An instruction processing method for an out-of-order multi-issue processor, characterized in that: include: Obtain and cache instructions issued by a preset instruction issuance queue; Extracting a target instruction from the instructions and decoding the instruction; Grouping the extracted target instructions according to the decoding information of the instructions; In the case of acquiring an operand corresponding to the target instruction and an instruction delivery signal, determining whether the grouping of the target instruction is completed; When the target instructions have been grouped and the memory access address corresponding to the memory access instruction obtained by the grouping has been obtained, the memory access operation is performed according to the memory access address according to the memory access instruction, and the memory access operation result is written back to the specified register through the write-back module. Non-memory access instructions are directly executed after the grouping is completed. The decoding information is related to a general integer register, an operand register, and a destination register index of a target instruction, the target instruction is a VPU instruction, and the extracted target instructions are grouped according to the decoding information of the instructions, including: The extracted target instructions are divided into memory access instructions and non-memory access instructions according to the decoding information of the instructions, and each target instruction is divided into a plurality of minimum operation units.
2. The method according to claim 1, characterized in that The obtaining of the operand corresponding to the target instruction includes: Obtaining an address of a designated operand register of a target instruction, wherein the designated operand register stores an operand corresponding to the target instruction; According to the address of the designated operand register, an operand corresponding to the target instruction is read from the designated register.
3. The method according to claim 2, characterized in that The step of reading an operand corresponding to the target instruction from the designated register comprises: When the designated register is a general integer register and the operand corresponding to the target instruction has a dependency relationship with the general integer register, reading of the operand is suspended until the operand corresponding to the target instruction has no dependency relationship with the general integer register.
4. The method according to claim 1, characterized in that The obtaining of the instruction delivery signal corresponding to the target instruction includes: Sending instructions to a delivery module of an out-of-order multi-issue processor; The receiving and committing module sends an instruction commit signal in response to the instruction, wherein the instruction commit signal is generated when no branch prediction error, interruption or exception occurs in an instruction preceding the instruction.
5. The method according to claim 1, characterized in that Non-memory access instructions are executed directly after grouping, including: For non-memory access instructions, the corresponding multiple minimum operation units are executed and the execution results are sent to the write-back module.
6. The method according to claim 1, characterized in that The memory access address corresponding to the memory access instruction obtained by the acquisition group includes: The offset memory access address in the memory access instruction is calculated according to the operand corresponding to the memory access instruction to obtain the memory access address corresponding to the memory access instruction.
7. An instruction processing device for an out-of-order multi-issue processor, characterized in that: include: A buffer area, used to obtain and cache instructions issued by a preset instruction issuance queue; An extraction module, used for extracting a target instruction from the instructions and decoding the instructions; A grouping module, used for grouping the extracted target instructions according to the decoding information of the instructions; A determination module, used to determine whether the grouping of the target instructions is completed when the operands corresponding to the target instructions and the instruction delivery signal are obtained; The memory access module is used to perform a memory access operation according to the memory access instruction according to the memory access address after completing the grouping of the target instructions and obtaining the memory access address corresponding to the memory access instruction obtained by the grouping, and write the memory access operation result back to the specified register through the write-back module, and directly execute the non-memory access instruction after completing the grouping. The decoding information is related to a general integer register, an operand register, and a destination register index of a target instruction, the target instruction is a VPU instruction, and the extracted target instructions are grouped according to the decoding information of the instructions, including: The extracted target instructions are divided into memory access instructions and non-memory access instructions according to the decoding information of the instructions, and each target instruction is divided into a plurality of minimum operation units.
8. A computer device comprising: The method comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the instruction processing method for an out-of-order multi-issue processor as claimed in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the instruction processing method for an out-of-order multi-issue processor according to any one of claims 1 to 6 are implemented.
