Data processing method, device, equipment and medium
By simplifying the data forwarding network based on pipeline information in the processor, the problem of increased waiting time and excessive consumption of logical resources caused by dependencies between instructions is solved, and the execution performance and main frequency stability of the processor are improved.
Patent Information
- Application Number
- CN202410726284.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In the processor, the waiting time caused by the dependency between instructions increases, especially when using dual-issue and multi-issue mechanisms, resulting in a large number of instructions in the pipeline stage to wait invalidly, affecting the execution performance of the processor, and existing data forwarding This method requires a large amount of logic resources, increases the circuit complexity and the probability of reducing the processor frequency.
Simplify the data forwarding network by determining whether the simplified conditions of the data forwarding network are met based on pipeline information, including determining whether there is an arithmetic unit in the pipeline stage and whether the instruction is a performance-critical instruction or a long-cycle instruction, thereby deciding whether to read instructions from other pipeline levels. Execution results reduce unnecessary data forwarding and avoid excessively long data forwarding logical paths.
On the premise of reducing the waiting time caused by instruction dependencies, the probability of processor frequency reduction is reduced, the complexity of the forwarding network is simplified, the execution performance of the processor is improved, and the use of logical resources is reduced.
Smart Images

Figure CN118295712B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, device and medium. Background Art
[0002] Generally, whether in a sequential architecture or an out-of-order architecture, the processor executes instructions in the order of the program flow. For example, the classic five-stage pipeline processor architecture includes five pipeline stages: IF (Instruction Fetch), ID (Instruction Decode), EX (Execute), MEM (Memory Access), and WB (Write Back). Among them, the processor executes instructions in a fixed order at the IF, ID, and EX pipeline stages; the processor executes instructions out of order at the EX and MEM pipeline stages.
[0003] Usually, the order of instructions determines the judgment of dependencies, which include resource dependencies and data dependencies. However, due to the dependencies between instructions, for instructions of different cycles, such as multi-cycle instructions are assigned earlier and single-cycle instructions are assigned later, the earlier assigned instructions have not yet been executed, and the later assigned instructions have been executed, which will cause the instructions to consume invalid waiting time before they can be written back. With the increasing use of dual-issue and multi-issue mechanisms, this situation will become more and more common, resulting in a large number of invalid instructions waiting in the pipeline stage, which will greatly affect the execution performance of the processor. At present, the relevant technology provides a processing architecture with data forwarding. Once the instruction execution is completed, data is forwarded to all instructions immediately, which can reduce the waiting cycle caused by data dependency between instructions and improve the performance of the processor.
[0004] However, the data forwarding method described above consumes a large amount of logic resources, increases the circuits between pipeline stages, causes an excessively long data forwarding logic path, and affects the execution performance of the processor. Summary of the invention
[0005] The embodiments of the present application provide a data processing method, apparatus, device and medium.
[0006] A first aspect of an embodiment of the present application provides a data processing method, which is applied to a processor with multiple pipeline stages; the method includes: based on pipeline information, determining whether a first pipeline stage meets the simplification conditions of a data forwarding network, the first pipeline stage being any one of the multiple pipeline stages; if the first pipeline stage meets the simplification conditions, simplifying the data forwarding network of the first pipeline stage; controlling the first pipeline stage to read the execution results of instructions of other pipeline stages based on the simplified data forwarding network; wherein the pipeline information includes at least one of the following: whether there is an operation unit in the pipeline stage, whether the instruction on the pipeline stage is a performance-critical instruction, and whether the instruction on the pipeline stage is a long-cycle instruction.
[0007] In an optional embodiment of the present application, based on pipeline information, determining whether the first pipeline stage meets the simplification condition includes: determining whether there is an operation unit in the first pipeline stage; if there is no operation unit in the first pipeline stage, determining whether the first instruction has dependent data in the target pipeline stage, the first instruction is the instruction on the first pipeline stage at the current moment, and the data on the target pipeline stage will disappear from the pipeline in the next cycle; if the first pipeline stage meets the simplification condition, simplifying the data forwarding network of the first pipeline stage, including: if the first instruction does not have dependent data in the target pipeline stage, simplifying the data forwarding network of the first pipeline stage; wherein, simplifying the data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of subsequent instructions of other pipeline stages except the target pipeline stage.
[0008] In an optional embodiment of the present application, after determining whether the first instruction has dependent data in the target pipeline stage, the method also includes: if there is no operation unit in the first pipeline stage, and the first instruction has dependent data in the target pipeline stage, controlling the first pipeline stage to read the data of the instruction of the target pipeline stage.
[0009] In an optional embodiment of the present application, after determining whether there is an operation unit in the first pipeline stage, the method also includes: if there is an operation unit in the first pipeline stage, determining whether the type of the first instruction is a performance-critical instruction; if the first instruction is a performance-critical instruction, controlling the first instruction on the first pipeline stage to read data of instructions on all pipeline stages after the first pipeline stage.
[0010] In an optional embodiment of the present application, after determining whether the type of the first instruction is a performance-critical instruction, the method further includes: if there is an operation unit in the first pipeline stage and the first instruction is not a performance-critical instruction, determining whether the instruction on the first pipeline stage is a long-cycle instruction; if the execution timing of the first instruction is to be executed at the second pipeline stage after multiple cycles, determining whether there is any dependent data on the first instruction at the target pipeline stage; if there is no dependent data on the first instruction at the target pipeline stage, simplifying the data forwarding network of other pipeline stages after the first pipeline stage except the second pipeline stage.
[0011] In an optional embodiment of the present application, it is determined whether there is any dependent data of the first instruction after the target pipeline stage. The method also includes: if the execution timing of the first instruction is multiple cycles later, and there is any dependent data of the first instruction in the target pipeline stage, then the instruction of the first pipeline stage is controlled to read the data of the instruction of the target pipeline stage.
[0012] In an optional embodiment of the present application, the method further includes: delaying the release of the dependency between the first instruction and a second instruction, the second instruction being an instruction on the target pipeline stage that has a dependency with the first instruction.
[0013] According to a first aspect of an embodiment of the present application, a data processing device is provided, which includes: a determination module, a simplification module and a control module; based on pipeline information, determining whether a first pipeline stage meets the simplification conditions of a data forwarding network, the first pipeline stage being any one of the multiple pipeline stages; the simplification module is used to simplify the data forwarding network of the first pipeline stage if the first pipeline stage meets the simplification conditions; the control module is used to control the execution results of instructions of other pipeline stages after the first pipeline stage reads the simplified data forwarding network; wherein the pipeline information includes at least one of the following: whether there is an operation unit in the pipeline stage, whether the instruction on the pipeline stage is a performance-critical instruction, and whether the instruction on the pipeline stage is a long-cycle instruction.
[0014] In an optional embodiment of the present application, the determination module is specifically used to: determine whether there is an operation unit in the first pipeline stage; if there is no operation unit in the first pipeline stage, determine whether the first instruction has dependent data in the target pipeline stage, the first instruction is the instruction on the first pipeline stage at the current moment, and the data on the target pipeline stage will disappear from the pipeline in the next cycle; the simplification module is specifically used to: if the first instruction does not have dependent data in the target pipeline stage, simplify the data forwarding network of the first pipeline stage; wherein, simplifying the data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of subsequent instructions of other pipeline stages except the target pipeline stage.
[0015] In an optional embodiment of the present application, the control module is also used for: after the determination module determines whether the first instruction has dependent data in the target pipeline stage, if there is no operation unit in the first pipeline stage, and the first instruction has dependent data in the target pipeline stage, then controlling the first pipeline stage to read the data of the instruction of the target pipeline stage.
[0016] In an optional embodiment of the present application, the determination module is also used to: after determining whether there is an operation unit in the first pipeline stage, if there is an operation unit in the first pipeline stage, determine whether the type of the first instruction is a performance-critical instruction; the control module is also used to: if the first instruction is a performance-critical instruction, control the first instruction on the first pipeline stage to read data of instructions on all pipeline stages after the first pipeline stage.
[0017] In an optional embodiment of the present application, the determination module is also used for: if there is an operation unit in the first pipeline stage and the first instruction is not a performance-critical instruction, then determining whether the instruction on the first pipeline stage is a long-cycle instruction; if the execution timing of the first instruction is to be executed at the second pipeline stage after multiple cycles, then determining whether there is any dependent data on the first instruction in the target pipeline stage; the simplification module is also used for: if there is no dependent data on the first instruction in the target pipeline stage, then simplifying the data forwarding network of other pipeline stages after the first pipeline stage except the second pipeline stage.
[0018] In an optional embodiment of the present application, the control module is also used for: after the determination module determines whether the first instruction has dependent data in the target pipeline stage, if the execution timing of the first instruction is multiple cycles later, and the data on which the first instruction depends exists in the target pipeline stage, then the instruction of the first pipeline stage is controlled to read the data of the instruction of the target pipeline stage.
[0019] In an optional embodiment of the present application, the data processing device also includes: a dependency release module; the dependency release module is used to delay the release of the dependency between the first instruction and the second instruction, the second instruction being an instruction on the target pipeline level that has a dependency on the first instruction.
[0020] According to a third aspect of an embodiment of the present application, a computer device is provided, including: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above data processing methods are implemented.
[0021] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above data processing methods are implemented.
[0022] A data processing method is provided in an embodiment of the present application, and an efficient and fast architecture is provided that can forward data to a required module at an appropriate time point with minimal logic, that is, when a processor with multiple pipeline stages executes instructions on the pipeline stage, a judgment can be made for each instruction on each pipeline stage, based on pipeline stage information such as whether there is an operation unit on the pipeline stage, whether the type of instruction on the pipeline stage is a performance-critical instruction, and whether it is a long-cycle instruction, so as to judge whether the pipeline stage at this level meets the simplified conditions of the forwarding network; when the simplified conditions are met, the forwarding network between the pipeline stage at this level and other subsequent pipeline stages can be simplified, that is, the use of logic resources can be reduced, the generation of an extremely long data forwarding logic path can be avoided, the circuits between the pipeline stages can be reduced, and the probability of the processor's main frequency being reduced can be reduced, and the complexity of the forwarding network can be simplified, so that the execution performance of the processor can be improved under the premise of ensuring that the waiting time caused by the dependency relationship of the instructions is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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:
[0024] Figure 1 A schematic diagram of a five-stage pipeline processor architecture in the related art;
[0025] Figure 2 It is a data processing method in related technologies;
[0026] Figure 3 It is a data processing method in related technologies;
[0027] Figure 4 A flowchart of a data processing method provided by an embodiment of the present application;
[0028] Figure 5 A flowchart of a data processing method provided by an embodiment of the present application;
[0029] Figure 6 A simplified logical diagram of a forwarding network provided for one embodiment of the present application;
[0030] Figure 7 A simplified logical diagram of a forwarding network provided for one embodiment of the present application;
[0031] Figure 8 A schematic diagram of the structure of a data processing device provided in one embodiment of the present application;
[0032] Fig. 9A schematic diagram of the structure of a data processing device provided in one embodiment of the present application;
[0033] Fig.10 A schematic diagram of the structure of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0034] In the process of implementing the present application, the inventors discovered that the current way of reclaiming space in a processor has a significant impact on processor performance.
[0035] First, the technical terms in the relevant technologies are introduced in detail here:
[0036] 1. Classic five-stage pipeline processor architecture
[0037] Figure 1 FIG. 1 is a schematic diagram of a five-stage pipeline processor architecture in the related art. Figure 1 As shown in , it includes the following five pipeline stages. Among them: the IF pipeline stage is responsible for reading instructions from the memory. The ID pipeline stage is responsible for identifying instructions. The EX pipeline stage is responsible for the operation of instructions; operation instructions are operated at this pipeline stage to obtain the results of the operation. The MEM pipeline stage is responsible for accessing the memory; reading data from the internal or external memory, or writing the execution results to the memory. The WB pipeline stage is responsible for writing back the results; writing the results of the instruction execution back to the processor's register stack for quick access next time. Among them, Figure 1 For a classic five-stage pipeline workflow, the life cycle of some instructions will go through the above five-stage pipeline, or four of the five-stage pipeline (for example, some instructions do not need the WB pipeline stage, and some instructions do not need the MEM pipeline stage). If the instruction does not obtain all the data when entering the EX pipeline stage, or if any operand does not get the correct data when entering the EX pipeline stage, then the instruction can only wait in the EX pipeline stage until the operand gets the data. This kind of dependency between operands is called data dependency. The order of instructions determines the judgment of dependency. Among them, resource dependency is common in that different instructions of the same type preempt the same processing unit, or different memory access instructions access the same address. Data dependency is in the program order, including RAW (Read after Write) dependency and WAW (Write after Write) dependency. Among them, RAW dependency indicates that the execution of subsequent instructions requires the results of the previous instructions that have not been executed, and both WAW instructions must be written back to the same register.
[0038] It should be noted that the method in the embodiments of the present application can be applied to a multi-stage pipeline processor architecture, such as the instruction execution of a processor with a five-stage or nine-stage pipeline.
[0039] 2. A common problem in program flow
[0040] 1 # for (i=0;i<5;i++)
[0041] 2#{
[0042] 3 # a=a+1;
[0043] 4 #}
[0044] 5## 6 7
[0047] 8 li to, 5
[0048] 9 li t1,0
[0049] 10 loops;
[0050] 11 lw ao,(s0)
[0051] 12 add a0,a0,t1
[0052] 13 sw ao, (s0)
[0053] 14 add s0,s0,4
[0054] 15 add t1,t1,1
[0055] 16 bne t1, t0 loop
[0056] From the above program, we can see that in the main part of the program, that is, from the start of the loop to the end of the loop, some data not only saves the calculation results, but also serves as the data source for the next instruction. Typical examples are lines 11 to 13. In line 11, the lw instruction takes a 32-bit (can be changed according to the actual application) data from the address s0 in the memory and saves the data in register a0. In line 12, the add instruction adds the data in the a0 register to the data in the t1 register, and saves the result in the a0 register. In line 13, the sw instruction saves the data in the a0 register to the space at address s0 in the memory. In these three consecutive instructions, the a0 register is frequently used. If data is obtained from the most original register every time, it is bound to cause a certain amount of blockage. Figure 1 Taking the classic 5-stage pipeline mentioned in as an example, combined with Figure 2 , Figure 2It is a data processing method in the related art. In the first cycle, when the lw instruction reaches the MEM pipeline stage, the add instruction reaches the EX pipeline stage. At this time, the lw instruction issues a memory read request and waits for data. At this time, the add instruction cannot get the data and is stuck in the pipeline. In the second cycle, the lw instruction continues to wait for data, and the add instruction continues to be stuck in the pipeline. The new sw instruction cannot enter the EX pipeline stage. In the third cycle, the lw instruction receives the data and can be sent to the next WB pipeline stage. The add instruction still cannot get the data and continues to wait, which is stuck in the pipeline. In the fourth cycle, the lw instruction performs a write-back operation, but the data will not be updated until the next cycle, so the add instruction still cannot get the data and continues to wait. The add instruction gets the data and starts to execute. At the same time, the pipeline is released to allow new instructions to come in. The new sw instruction reaches the EX pipeline stage, and the add instruction reaches the MEM pipeline stage. Because the sw instruction is also a memory access instruction, the sw instruction must be executed at the MEM pipeline stage, so everything is fine. The sw instruction reaches the MEM pipeline stage, and the add instruction reaches the WB pipeline stage. Similarly, the data will not be updated to the register until the next cycle, so the sw instruction cannot obtain the data and continues to wait. In the 8th cycle, the sw instruction obtains the data and executes the memory write operation.
[0057] It can be seen that the dependency between data is very critical to the performance of the processor. Currently, a data forwarding technology is provided in the relevant technology to forward data to other subsequent instructions immediately after the instruction operation is completed. Figure 3 , Figure 3 It is a data processing method in related technologies. Figure 3 In the first cycle, the add instruction reaches the EX pipeline stage, and the lw instruction goes to the MEM pipeline stage. The add instruction in the EX pipeline stage depends on the execution result of the lw instruction, so it is stuck waiting for data. (This causes the driver load to increase and the processor operating frequency to decrease). In the second cycle, the lw instruction issues a memory read request, and the add instruction continues to wait for data, which is stuck in the main pipeline. In the third cycle, the lw instruction receives the data returned by the memory, and immediately forwards the data to the add instruction, and moves to the next pipeline stage. The add instruction gets the data and starts to perform the addition operation. In the fourth cycle, the new instruction sw instruction reaches the EX pipeline stage, the add instruction reaches the MEM pipeline stage, and the lw instruction is in the WB pipeline stage. The add instruction has completed the operation and forwarded the data to the sw instruction, so the sw instruction can get the data in advance. In the fifth cycle, the sw instruction reaches the MEM pipeline stage and is executed directly. The add instruction reaches the WB pipeline stage and starts to write back.
[0058] It can be understood that the processing architecture with data forwarding can reduce the waiting cycle caused by data dependency between instructions and improve the performance of the processor. However, the above design method, first of all, data forwarding consumes a lot of logic resources, which will increase the circuits between pipeline stages, resulting in a reduction in the overall main frequency of the processor. Especially when there are complex logics such as adders, multipliers, and dividers, forwarding the operation results of these instructions will connect these complex result generation logic (operation logic) with the operation data update logic, resulting in an extremely long data forwarding logic path. The longer the logic path means the longer the actual circuit path, which means the more the main frequency of the circuit is reduced; secondly, data forwarding requires precise control, early forwarding does not necessarily bring equal benefits, late forwarding will cause performance or even functional problems, and the design complexity is relatively high.
[0059] In response to the above problems, a data processing method is provided in an embodiment of the present application. The method provides an efficient and fast architecture that can forward data to the required modules at an appropriate time point with minimal logic, that is, when a processor with multiple pipeline stages executes instructions on the pipeline stage, a judgment can be made for each instruction on each pipeline stage, based on pipeline stage information such as whether there is an operation unit on the pipeline stage, whether the type of instruction on the pipeline stage is a performance-critical instruction, and whether it is a long-cycle instruction, so as to judge whether the pipeline stage at this level meets the simplification conditions of the forwarding network; when the simplification conditions are met, the forwarding network between the pipeline stage at this level and other subsequent pipeline stages can be simplified, that is, the use of logic resources can be reduced, the generation of ultra-long data forwarding logic paths can be avoided, and the circuits between pipeline stages can be reduced, thereby reducing the probability of the processor's main frequency being reduced, simplifying the complexity of the forwarding network, and thereby improving the execution performance of the processor while ensuring that the waiting time caused by the dependency relationship of the instructions is reduced.
[0060] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0061] 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.
[0062] Figure 4 This is a flowchart of a data processing method provided by an embodiment of the present application. Figure 4The following embodiments use the above processor as the execution subject, and apply the data processing method provided in the embodiments of the present application to a computer device supporting single / multiple transmissions, and use a processor supporting multiple pipeline stages of single / multiple transmissions as an example to specifically illustrate the data processing method provided in the embodiments of the present application. The data processing method provided in the embodiments of the present application includes the following steps 401-403:
[0063] Step 401: The processor determines whether the first pipeline stage meets the simplification condition of the data forwarding network based on the pipeline information.
[0064] It should be noted that the present application simplifies the data forwarding network on the basis of forwarding all executed data provided in the related art.
[0065] The pipeline information includes at least one of the following: whether there is an operation unit (or instruction execution unit) at the pipeline stage, whether the instruction at the pipeline stage is a performance-critical instruction, and whether the instruction at the pipeline stage is a long-cycle instruction.
[0066] Exemplarily, in an embodiment of the present application, instructions may be divided based on the characteristics of the instructions, and may include performance-critical instructions, non-performance-critical instructions, and long-cycle instructions. Among them, performance-critical instructions may include instructions with the following functions: instructions that can be calculated quickly and used frequently, such as addition instructions, subtraction instructions, shift instructions, and jump instructions. Non-performance-critical instructions may include instructions for accessing system status registers. Long-cycle instructions may include instructions with long calculation cycles and complex logic, which are executed after several pipeline stages after the current pipeline stage (generally executed at the end pipeline stage, such as the previous stage of the WB pipeline stage), such as multiplication instructions and division instructions.
[0067] Step 402: If the first pipeline stage meets the simplification condition, the processor simplifies the data forwarding network of the first pipeline stage.
[0068] Among them, simplifying the data forwarding network of the first pipeline stage instructs the first pipeline stage not to read the data of the instruction execution results of some or all pipeline stages after the first pipeline stage, and the simplification is specifically performed based on the specific simplification conditions that are met.
[0069] Step 403: The processor controls the first pipeline to read the execution results of the instructions of other pipeline stages based on the simplified data forwarding network.
[0070] It can be understood that the processor can process the data on the pipeline level based on whether there is an operation unit at the pipeline level, whether the instruction at the pipeline level is a performance-critical instruction, and whether the instruction at the pipeline level is a long-cycle instruction, so as to avoid directly forwarding the instruction calculation results to all subsequent pipeline levels, thereby simplifying the data forwarding network between various pipeline levels, thereby reducing the waiting cycle caused by data dependencies, and reducing the probability of the processor's main frequency being reduced, thereby simplifying the design complexity of the forwarding network.
[0071] A data processing method provided in an embodiment of the present application provides an efficient and fast architecture that can forward data to a required module at an appropriate time point with minimal logic, that is, when a processor with multiple pipeline stages executes instructions on the pipeline stage, a judgment can be made for each instruction on each pipeline stage, based on pipeline stage information such as whether there is an operation unit on the pipeline stage, whether the type of instruction on the pipeline stage is a performance-critical instruction, and whether it is a long-cycle instruction, so as to judge whether the pipeline stage at this level meets the simplification conditions of the forwarding network; when the simplification conditions are met, the forwarding network between the pipeline stage at this level and other subsequent pipeline stages can be simplified, that is, the use of logic resources can be reduced, the generation of an extremely long data forwarding logic path can be avoided, the circuits between pipeline stages can be reduced, and the probability of the processor's main frequency being reduced can be reduced, and the complexity of the forwarding network can be simplified, so that the execution performance of the processor can be improved under the premise of ensuring that the waiting time caused by the dependency relationship of the instruction is reduced.
[0072] In an optional embodiment of the present application, in combination with Figure 5 The above step 401 may specifically be the following steps 401a and 401b, and the above step 402 may include the following step 402a:
[0073] Step 401a: The processor determines whether there is an operation unit in the first pipeline stage.
[0074] It should be noted that in a processor with multiple pipeline stages, not every pipeline stage has a computing unit, that is, some of the pipeline stages in the multiple pipeline stages do not have a computing unit. For example, a nine-stage EX pipeline stage includes five EX sub-stages, some of which do not have a computing unit and some of which do. The specific correlation is related to the architecture used by the processor, and the embodiments of the present application do not specifically limit this.
[0075] Step 401b: If there is no operation unit in the first pipeline stage, the processor determines whether the first instruction has dependent data in the target pipeline stage.
[0076] The first instruction is the instruction on the first pipeline stage at the current moment. The data on the target pipeline stage will disappear from the pipeline in the next cycle.
[0077] It should be noted that the data on which the first instruction depends is the execution result of the instruction on which the first instruction depends.
[0078] Exemplarily, the target pipeline stage may be the five-stage pipeline stage WB pipeline stage. The target pipeline stage may also be the EX4 stage in the nine-stage pipeline stage; wherein, in the nine-stage pipeline, the EX pipeline stage includes the EX0 stage, the EX1 stage, the EX2 stage, the EX3 stage and the EX4 stage, and the WB pipeline stage may be a shadow register hidden in the EX4 stage, and the result of the instruction executed by the EX4 stage will be saved in the shadow register and saved in the destination register at the same time. Therefore, this hidden register is the last position of the instruction execution result in the pipeline stage.
[0079] In the above step 401b, if there is no operation unit in the first pipeline stage, (possible) data is obtained only from the target pipeline stage, without having to obtain (possible) data from other pipeline stages after the first pipeline stage (except the target pipeline stage), which actually simplifies the data forwarding network.
[0080] Step 402a: If the first instruction has no dependent data in the target pipeline stage, the processor simplifies the data forwarding network of the first pipeline stage.
[0081] The simplified data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of instructions of subsequent pipeline stages other than the target pipeline stage, that is, the forwarding network of the first pipeline stage and subsequent other pipeline stages is not established, reducing the forwarding logic.
[0082] Based on this scheme, when there is no operation unit in a pipeline stage, the instruction in the pipeline stage will not be operated. If the instruction on the pipeline stage does not have dependent data in the target pipeline stage, that is, the dependent data will not disappear from the pipeline stage temporarily, then the processor can directly simplify the forwarding network of the pipeline stage and other pipeline stages, that is, it does not read the execution results of the instructions on other pipeline stages. In other words, there is no need to establish a data forwarding network between the pipeline stage and other pipeline stages, which simplifies the complexity of the forwarding network and eliminates the need to forward temporarily unnecessary data, thereby improving the execution efficiency of the processor.
[0083] In an optional embodiment of the present application, after the above-mentioned step 401b, the following steps may also be included: if there is no operation unit in the first pipeline stage, and the first instruction has dependent data in the target pipeline stage, the processor does not simplify the data forwarding network, and can control the first pipeline stage to read the data of the instruction of the target pipeline stage.
[0084] It can be understood that if there is no operation unit in the current pipeline stage, the instruction does not perform the operation at the current pipeline stage. If the data that the instruction depends on will not disappear from the pipeline in the next cycle, the operation results of the instructions on other pipeline stages can be read without the current pipeline stage. If the data that the instruction depends on will disappear from the pipeline stage in the next cycle, the processor controls the current pipeline stage to read the operation results performed on the target pipeline stage.
[0085] Based on this scheme, if there is no operation unit in the pipeline stage, that is, the first instruction does not perform any operation in the current pipeline stage, but the data that the first instruction depends on is about to disappear from the pipeline stage, in this case, the processor reads the data of the instruction on the target pipeline stage for the first pipeline stage to avoid the waiting cycle caused by the first instruction reading data from the register.
[0086] In an optional embodiment of the present application, after the above step 401a, the following step 401c is also included:
[0087] Step 401c: If there is an operation unit in the first pipeline stage, the processor determines whether the first instruction is a performance-critical instruction.
[0088] Furthermore, in the data processing method provided in the embodiment of the present application, the following step 404 may also be included:
[0089] Step 404: If the first instruction is a performance-critical instruction, the processor controls the first instruction on the first pipeline stage to read data of instructions on all pipeline stages after the first pipeline stage.
[0090] It should be noted that performance-critical instructions are usually large in number and are widely used in programs, and can be executed quickly after the operands are obtained. Therefore, if an instruction is a performance-critical instruction, the processor can forward data for the instruction as much as possible to enable such instructions to be executed quickly and avoid unnecessary waiting for such instructions.
[0091] Based on this solution, if there is an operation unit in the pipeline stage and the first instruction is a performance-critical instruction, the first instruction may need to be executed at the current pipeline stage, and there are many instructions of this type. Therefore, the processor can forward data for this type of instruction as much as possible, so that this type of instruction can quickly obtain the required operands for calculation, and minimize the waiting cycle of this type of instruction due to the inability to obtain dependent data for calculation, which can greatly improve the execution efficiency and performance of the processor.
[0092] In an optional embodiment of the present application, after the above step 401a, the following steps 401d and 401e are also included:
[0093] Step 401d: If there is an operation unit in the first pipeline stage and the first instruction is not a performance-critical instruction, the processor determines whether the first instruction is a long-cycle instruction.
[0094] Step 401e: If the execution timing of the first instruction is to be executed at the second pipeline stage after a plurality of cycles, the processor determines whether the first instruction has dependent data at the target pipeline stage.
[0095] Furthermore, the above step 402 may be performed through the following step 402b:
[0096] Step 402b: If there is no data that the first instruction depends on in the target pipeline stage, the processor simplifies the data forwarding networks of the pipeline stages after the first pipeline stage except the second pipeline stage.
[0097] It can be understood that when there is an operation unit in the first pipeline stage, the first instruction is not a performance-critical instruction, and it can be determined whether the first instruction is a long-cycle instruction. If it is a long-cycle instruction, that is, the instruction does not need to be operated in the first pipeline stage, and the data on which the first instruction depends is not about to leave the pipeline stage, then it means that the first instruction does not need to immediately obtain the data of other instructions in the first pipeline stage. Therefore, the data forwarding network corresponding to the first instruction in the first pipeline stage can be simplified. Because the first instruction is executed in the second pipeline stage, the processor retains the forwarding networks of the second pipeline stage and the first pipeline stage.
[0098] Based on this scheme, when there is a computing unit in the current pipeline stage and the instruction is a long-cycle instruction, that is, the instruction needs to be executed in the second pipeline stage after several pipeline stages, that is, it does not need to be executed immediately, and the data that the first instruction depends on will not disappear from the pipeline temporarily, then the processor can retain the data forwarding network between the first pipeline stage and the execution pipeline stage of the first instruction, simplify the data forwarding network between the first pipeline stage and other pipeline stages, avoid useless data forwarding, and thus improve the execution efficiency of the processor.
[0099] In an optional embodiment of the present application, after the above step 401e, the following step 405 may also be included:
[0100] Step 405: If the execution timing of the first instruction is multiple cycles later, and the data that the first instruction depends on exists in the target pipeline stage, the processor controls the instruction of the first pipeline stage to read the data of the instruction of the target pipeline stage.
[0101] Based on this scheme, that is, the current pipeline stage includes an execution unit, the instruction on the pipeline stage is a long-cycle instruction, and the data on which the instruction depends is about to leave the pipeline stage, then the processor needs to control the instruction on the first pipeline stage to immediately read the data on which it depends, so as to avoid the failure to read data in the pipeline stage and the need to re-read the data from the register, which causes a waiting cycle for reading data, thereby improving the execution efficiency of the processor.
[0102] In an optional embodiment of the present application, in the above step 404 or step 406, the following step 400 may also be included:
[0103] Step 400: The processor delays releasing the dependency between the first instruction and the second instruction.
[0104] The second instruction is an instruction on the target pipeline stage that has a dependency relationship with the first instruction.
[0105] Based on this solution, when the processor determines that the data forwarding network can be simplified, the processor can delay releasing the dependency between the current instruction and the dependent instructions until the current instruction is executed.
[0106] Example:
[0107] Figure 6 A simplified logic diagram of a forwarding network provided for an embodiment of the present application, as shown in the figure, for ALU1 instructions and BJP1 instructions, they are performance-critical instructions, the processor can process them quickly, and this type of instruction can receive the most complete and most data forwarding; for AGU1 instructions, this instruction is used to access memory and is a performance-critical instruction, so this type of instruction also receives the most complete and most data forwarding. Since it can only be forwarded from front to back according to the pipeline level, the forwarding network of the EX0 level is the most complex, followed by the EX2 level, and finally the EX4 level. Among them, ALU (Arithmetic & logical Unit) instructions are usually used to perform arithmetic and logical operations in the computer instruction set. BJP (Branch & JumP, branch and jump) instructions are usually used to: perform branch jump operations. For example, commonly used if-else programs or loop body programs. AGU (Address Generate Unit) instructions are instructions used to calculate addresses and access memory.
[0108] Figure 7A simplified logic diagram of a forwarding network provided for an embodiment of the present application, for pipeline stages without arithmetic units, such as EX1 and EX3. For EX1, the AGU2 instruction at this time is processing data that needs to be saved to the memory, and this data is not necessary here, so it is equivalent to not executing the AGU2 instruction at this pipeline stage; for EX3, the data forwarding source of this pipeline stage is only the necessary write-back port. If the data that the instruction on the EX1 / EX3 level depends on happens to be on the EX4 level, that is, the instruction sees the data it needs on the write-back port, then the forwarding network will forward the data, otherwise no special processing will be performed. Continue to combine Figure 7 , for MUL (multiplication) instructions and DIV (division) instructions, since these instructions are only processed at the EX4 level, when these instructions are at the EX0 level, EX1 level, EX2 level, and EX3 level, even if the MUL instruction and the DIV instruction have seen the required data from other pipeline levels except the EX4 level (according to the relevant technology, data forwarding should be started here), data forwarding will not be performed immediately in this application. Forwarding data here will not only not improve the execution speed of the MUL instruction and the DIV instruction, but will also cause a waste of forwarding resources, that is, invalid forwarding is performed, making the forwarding logic of these pipeline levels complicated. Therefore, for the MUL instruction and the DIV instruction, unless the dependent data reaches the EX4 level, that is, when it is about to be written back to the register file, data forwarding will be performed, otherwise no special processing will be given.
[0109] The data processing method provided in the embodiment of the present application can make the data forwarding of the pipeline level simple, greatly reduce the design complexity, reduce the logic consumption, and improve the processing frequency of the pipeline level. The designed multi-stage pipeline data forwarding network, starting from the actual application scenario, simplifies the data forwarding network of certain pipeline levels while ensuring the efficiency of instruction execution. It can not only reduce the complexity of the entire data forwarding network, reduce the logic consumption (which means that the power consumption is also reduced), but also improve the operating frequency of each pipeline level.
[0110] The data processing method of the present application simplifies the data forwarding network architecture and can be applied to various processor architectures. As the number of pipeline stages increases and the number of instructions issued increases, the benefits brought by this method will become more and more obvious. Because complex pipelines mean complex data forwarding networks, if these data networks are not cut, they will definitely affect the operating frequency of the processor. In the classic five-stage pipeline, since the EX pipeline stage and the MEM pipeline stage are respectively in two pipeline stages, the EX pipeline stage can determine whether the instruction is a performance-critical instruction and read as much data as possible to avoid blocking the pipeline. For the MEM pipeline stage, since the memory access address cannot be a floating-point data type, it can be considered that there is no floating-point execution unit at this level, so there is no need to read the result of the floating-point instruction. In the nine-stage pipeline in the present application, since there are more pipeline stages, and each execution unit is not evenly distributed in each pipeline stage. Therefore, for pipeline stages where there is no execution unit, no connection is established with other pipeline stages except the WB pipeline stage, simplifying the data forwarding network between these pipeline stages. When there is an execution unit and the execution unit needs to execute performance-critical instructions, the pipeline stage is allowed to establish a data forwarding network with other pipeline stages, and the integrity of these forwarding networks is guaranteed as much as possible to ensure that the instructions executed in these execution units can get the required data as soon as possible. Finally, the instructions with more complex implementation logic (executed on the later pipeline stages in the pipeline), such as division instructions, floating-point instructions, etc., only exist in the last pipeline stage in the architecture, so these instructions will only establish a data forwarding network with other pipeline stages at the WB pipeline stage, so that these instructions will not have, or have very few, data forwarding relationship networks at other pipeline stages, so the final forwarding network can also be greatly simplified. If it is a dual-issue nine-stage pipeline, then the forwarding network of such instructions can be tailored by judging whether a certain pipeline will execute the corresponding type of instructions, which is also based on the above logic. If there is an execution unit and it is a performance-critical unit, more forwarding will be done. If there is no execution unit, less forwarding will be done or even no forwarding will be done. In summary, by making full use of the architecture and instruction characteristics, this method can reduce unnecessary data forwarding networks in the pipeline without damaging the processor performance, thereby increasing the operating frequency of the hardware circuit and thus improving the performance of the entire processor.
[0111] 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.
[0112] See also Figure 8 An embodiment of the present application provides a structural schematic diagram of a data processing device, wherein the data processing device 800 includes: a determination module 801, a simplification module 802, and a control module 803; the determination module 801 is used to determine whether a first pipeline stage meets the simplification condition of a data forwarding network based on pipeline information, and the first pipeline stage is any one of the multiple pipeline stages; the simplification module 802 is used to simplify the data forwarding network of the first pipeline stage if the first pipeline stage meets the simplification condition; the control module 803 is used to control the execution result of instructions of other pipeline stages read by the first pipeline stage based on the simplified data forwarding network; wherein the pipeline information includes at least one of the following: whether there is an operation unit in the pipeline stage, whether the instruction on the pipeline stage is a performance-critical instruction, and whether the instruction on the pipeline stage is a long-cycle instruction.
[0113] In an optional embodiment of the present application, the determination module 801 is specifically used to: determine whether there is an operation unit in the first pipeline stage; if there is no operation unit in the first pipeline stage, determine whether the first instruction has dependent data in the target pipeline stage, the first instruction is the instruction on the first pipeline stage at the current moment, and the data on the target pipeline stage will disappear from the pipeline in the next cycle; the simplification module 802 is specifically used to: if the first instruction does not have dependent data in the target pipeline stage, simplify the data forwarding network of the first pipeline stage; wherein, simplifying the data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of subsequent instructions of other pipeline stages except the target pipeline stage.
[0114] In an optional embodiment of the present application, the control module 803 is also used for: after the determination module 801 determines whether the first instruction has dependent data in the target pipeline stage, if there is no operation unit in the first pipeline stage, and the first instruction has dependent data in the target pipeline stage, then controlling the first pipeline stage to read the data of the instruction of the target pipeline stage.
[0115] In an optional embodiment of the present application, the determination module 801 is also used to: after determining whether there is an operation unit in the first pipeline stage, if there is an operation unit in the first pipeline stage, determine whether the type of the first instruction is a performance-critical instruction; the control module 803 is also used to: if the first instruction is a performance-critical instruction, control the first instruction on the first pipeline stage to read data of instructions on all pipeline stages after the first pipeline stage.
[0116] In an optional embodiment of the present application, the determination module 801 is also used for: if there is an operation unit in the first pipeline stage and the first instruction is not a performance-critical instruction, then determining whether the instruction on the first pipeline stage is a long-cycle instruction; if the execution timing of the first instruction is to be executed at the second pipeline stage after multiple cycles, then determining whether there is any dependent data on the first instruction at the target pipeline stage; the simplification module 802 is also used for: if there is no dependent data on the first instruction at the target pipeline stage, then simplifying the data forwarding network of other pipeline stages after the first pipeline stage except the second pipeline stage.
[0117] In an optional embodiment of the present application, the control module 803 is also used for: after the determination module 801 determines whether the first instruction has dependent data in the target pipeline stage, if the execution timing of the first instruction is multiple cycles later, and the data on which the first instruction depends exists in the target pipeline stage, then the instruction of the first pipeline stage is controlled to read the data of the instruction of the target pipeline stage.
[0118] In an optional embodiment of the present application, in combination with Figure 8 ,like Fig. 9 As shown in , the data processing device 800 further includes: a dependency release module 804; the dependency release module 804 is used to delay the release of the dependency between the first instruction and the second instruction, where the second instruction is an instruction on the target pipeline stage that has a dependency with the first instruction.
[0119] A data processing device provided in an embodiment of the present application provides an efficient and fast architecture that can forward data to a required module at an appropriate time point with minimal logic, that is, when a processor with multiple pipeline stages executes instructions on the pipeline stage, the data processing device can make a judgment for each instruction on each pipeline stage, based on pipeline stage information such as whether there is an operation unit on the pipeline stage, whether the type of instruction on the pipeline stage is a performance-critical instruction, and whether it is a long-cycle instruction, so as to judge whether the pipeline stage meets the simplification conditions of the forwarding network; when the simplification conditions are met, the data processing device can simplify the forwarding network between the pipeline stage and other subsequent pipeline stages, that is, reduce the use of logic resources, avoid generating an extremely long data forwarding logic path, reduce the circuits between pipeline stages, and thus reduce the probability of the processor's main frequency being reduced, simplify the complexity of the forwarding network, and thereby improve the execution performance of the processor while ensuring that the waiting time caused by the dependency relationship of the instructions is reduced.
[0120] For the specific definition of the above-mentioned data processing device, please refer to the definition of the data processing method above, which will not be repeated here. Each module in the above-mentioned data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of 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 each of the above modules.
[0121] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Fig.10 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, a data processing method as described above is implemented.
[0122] In one embodiment, a computer device is provided, including: a memory and a processor, wherein the memory stores a computer program, and the processor implements any step in the above data processing method when executing the computer program.
[0123] 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 in the above data processing method can be implemented.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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 The steps for the functions specified in one or more boxes.
[0128] 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.
[0129] 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. A data processing method, applied to a processor with multiple pipeline stages, characterized in that: The method comprises: Based on the pipeline information, determining whether the first pipeline stage meets the simplification condition of the data forwarding network, the first pipeline stage being any one of the multiple pipeline stages; wherein, based on the pipeline information, determining whether the first pipeline stage meets the simplification condition comprises: determining whether there is an operation unit in the first pipeline stage; if there is no operation unit in the first pipeline stage, determining whether there is dependent data of the first instruction in the target pipeline stage, the first instruction being the instruction on the first pipeline stage at the current moment, and the data on the target pipeline stage will disappear from the pipeline in the next cycle; If the first pipeline stage meets the simplification condition, simplifying the data forwarding network of the first pipeline stage includes: if the first instruction does not have dependent data in the target pipeline stage, simplifying the data forwarding network of the first pipeline stage; wherein, simplifying the data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of subsequent instructions of other pipeline stages except the target pipeline stage; Controlling the first pipeline stage to read the execution results of the instructions of other pipeline stages based on the simplified data forwarding network; The pipeline information includes at least one of the following: whether there is an operation unit at the pipeline stage, whether the instruction at the pipeline stage is a performance-critical instruction, and whether the instruction at the pipeline stage is a long-cycle instruction.
2. The method according to claim 1, characterized in that The determining whether the first instruction has dependent data after the target pipeline stage, the method further comprises: If there is no operation unit in the first pipeline stage, and the first instruction has dependent data in the target pipeline stage, the first pipeline stage is controlled to read the data of the instruction of the target pipeline stage.
3. The method according to claim 1, characterized in that: After determining whether there is an operation unit in the first pipeline stage, the method further includes: If there is an arithmetic unit in the first pipeline stage, determining whether the type of the first instruction is a performance-critical instruction; If the first instruction is a performance-critical instruction, the first instruction on the first pipeline stage is controlled to read data of instructions on all pipeline stages after the first pipeline stage.
4. The method according to claim 3, characterized in that After determining whether the type of the first instruction is a performance-critical instruction, the method further includes: If there is a computing unit in the first pipeline stage, and the first instruction is not a performance-critical instruction, determining whether the instruction on the first pipeline stage is a long-cycle instruction; If the execution timing of the first instruction is to be executed at the second pipeline stage after a plurality of cycles, determining whether the first instruction has dependent data at the target pipeline stage; If the data that the first instruction depends on does not exist in the target pipeline stage, the data forwarding networks of pipeline stages after the first pipeline stage except the second pipeline stage are simplified.
5. The method according to claim 4, characterized in that The method of determining whether the first instruction has dependent data after the target pipeline stage further includes: If the execution timing of the first instruction is multiple cycles later, and the data on which the first instruction depends exists in the target pipeline stage, the instruction of the first pipeline stage is controlled to read the data of the instruction of the target pipeline stage.
6. The method according to claim 1 or 4, characterized in that: The method further comprises: The dependency relationship between the first instruction and a second instruction is released by delay, where the second instruction is an instruction on the target pipeline stage that has a dependency relationship with the first instruction.
7. A data processing device, the data processing device being arranged in a processor of a multi-stage pipeline, characterized in that: The data processing device comprises: a determination module, a simplification module and a control module; The determination module is used to determine whether the first pipeline stage meets the simplification condition based on the pipeline information, and the first pipeline stage is any one of the multiple pipeline stages; wherein the determination based on the pipeline information whether the first pipeline stage meets the simplification condition includes: determining whether there is an operation unit in the first pipeline stage; if there is no operation unit in the first pipeline stage, determining whether there is dependent data of the first instruction in the target pipeline stage, the first instruction is the instruction on the first pipeline stage at the current moment, and the data on the target pipeline stage will disappear from the pipeline in the next cycle; The simplification module is used to simplify the data forwarding network of the first pipeline stage if the first pipeline stage meets the simplification condition, including: if the first instruction does not have dependent data in the target pipeline stage, simplifying the data forwarding network of the first pipeline stage; wherein, the simplification of the data forwarding network of the first pipeline stage indicates that the first pipeline stage does not read the execution results of subsequent instructions of other pipeline stages except the target pipeline stage; The control module is used to control the first pipeline stage to read the instruction results of the instructions of other pipeline stages based on the simplified data forwarding network; The pipeline information includes at least one of the following: whether there is an operation unit at the pipeline stage, whether the instruction at the pipeline stage is a performance-critical instruction, and whether the instruction at the pipeline stage is a long-cycle instruction.
8. A computer device comprising: A memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the data processing method according to any one of claims 1 to 6 when executing the computer program.
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 data processing method according to any one of claims 1 to 6 are implemented.
