Chip comprising replay queue, and device, processing method, medium and program product

By introducing retransmission queues and related units into the chip, the problem of retransmission instructions occupying resources is solved, the utilization rate of the transmitting queues and execution pipelines is improved, and the overall performance of the chip is improved.

WO2025092174A1PCT designated stage expired Publication Date: 2025-05-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/114484
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-03
Filing Date
2024-08-26
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

In the prior art, resending instructions frequently occupies the transmission queue and execution pipeline resources, resulting in low chip utilization.

Method used

The retransmission queue is introduced, including the acquisition unit, the retransmission wake-up unit and the retransmission unit. The retransmission instructions are processed by detecting abnormally resolved retransmission instructions to avoid the retransmission instructions occupying the transmission queue and execution pipeline resources.

Benefits of technology

It improves the utilization rate of the transmission queue and execution pipeline, enhances the execution success rate of resending instructions, and improves the overall utilization rate of the chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024114484_08052025_PF_FP_ABST
    Figure CN2024114484_08052025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the field of chips. Disclosed are a chip comprising a replay queue, and a computer device, and a replay instruction processing method. The replay queue comprises an acquisition unit, a replay wake-up unit, and a replay unit, wherein an output end of the acquisition unit is connected to an input end of the replay wake-up unit; an output end of the replay wake-up unit is connected to an input end of the replay unit; the acquisition unit is configured to receive at least one replay instruction and send the at least one replay instruction to the replay wake-up unit; the at least one replay instruction is an instruction, the execution of which is abnormal; the replay wake-up unit is configured to send a target replay instruction to the replay unit when it is detected that the abnormality of the target replay instruction among the at least one replay instruction is eliminated; and the replay unit is configured to send the target replay instruction, which is configured to be re-executed after being sent. The solution can be applied to the field of chips, and improves the utilization rate of the chip.
Need to check novelty before this filing date? Find Prior Art

Description

Chip, device, processing method, medium and program product including retransmission queue

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 3, 2023, with application number 2023114714171 and application name “Chip including a retransmission queue, computer device and method for processing retransmission instructions”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of chips, and in particular to the processing of retransmission queues and retransmission instructions. Background Art

[0003] The chips in computer devices execute a variety of instructions, including arithmetic instructions (such as addition instructions and subtraction instructions), data transfer instructions (such as data loading instructions and data storage instructions), and control instructions (such as input and output instructions). The execution of arithmetic instructions generally requires only one clock cycle, and once issued, they are guaranteed to execute successfully. Data transfer instructions, on the other hand, generally require multiple clock cycles to execute, and execution is not guaranteed to be successful. During execution, they may encounter various exceptions, such as cache misses, missing data from dependent preceding instructions, and so on. These exceptions may cause the data transfer instructions to be re-executed until they are successfully executed.

[0004] In related technologies, an issue queue issues an instruction, which then enters the execute pipeline for execution. After execution is complete, it determines whether the instruction was successfully executed. If so, it is directly written back. Otherwise, the instruction needs to re-enter the issue queue and wait for the next issuance. This instruction is also called a replay instruction. Specifically, a replay instruction needs to participate in arbitration with other instructions in the issue queue. When a replay instruction is arbitrated, it enters the execute pipeline for re-execution. If the re-execution fails, it needs to re-enter the issue queue until it is successfully executed. Only then can the replay instruction leave the issue queue.

[0005] However, the resend instruction in the related art can be re-executed as long as it is arbitrated, and frequent resends result in low chip utilization.

[0006] Summary of the Invention

[0007] The present application provides a chip including a retransmission queue, a computer device, a method for processing retransmission instructions, a medium, and a program product. The technical solution is as follows:

[0008] According to one aspect of the present application, a chip including a retransmission queue is provided, wherein the retransmission queue includes an acquisition unit, a retransmission wake-up unit, and a retransmission unit, wherein the output end of the acquisition unit is connected to the input end of the retransmission wake-up unit, and the output end of the retransmission wake-up unit is connected to the input end of the retransmission unit;

[0009] The acquiring unit is configured to receive at least one retransmission instruction and send the at least one retransmission instruction to the retransmission wake-up unit; the at least one retransmission instruction is an instruction that is retransmitted due to an execution exception;

[0010] The retransmission wake-up unit is configured to, upon detecting that an abnormality of a target retransmission instruction in the at least one retransmission instruction is resolved, send the target retransmission instruction to the retransmission unit;

[0011] The retransmission unit is used to send the target retransmission instruction; the target retransmission instruction is used to be re-executed after being sent.

[0012] According to another aspect of the present application, a method for processing a resend instruction is provided, the method comprising:

[0013] The acquiring unit receives at least one retransmission instruction and sends the at least one retransmission instruction to the retransmission wake-up unit; the at least one retransmission instruction is an instruction that is retransmitted due to an execution exception;

[0014] The retransmission wake-up unit sends the target retransmission instruction to the retransmission unit when detecting that the abnormality of the target retransmission instruction in the at least one retransmission instruction is resolved;

[0015] The retransmission unit sends the target retransmission instruction; the target retransmission instruction is used to be re-executed after being sent.

[0016] According to another aspect of the present application, a computer device is provided, comprising the chip as described above.

[0017] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned method for processing resending instructions.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the processing method of resending instructions as described above.

[0019] According to another aspect of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium. A processor obtains the computer program from the computer-readable storage medium, so that the processor loads and executes it to implement the processing method of reissuing instructions as described above.

[0020] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0021] On the one hand, an embodiment of the present application provides a chip including a retransmission queue. By setting a retransmission queue in the chip and processing the retransmission instruction through the retransmission queue, compared with the method of still using the transmission queue to process the retransmission instruction in the related art, the retransmission instruction does not need to enter the transmission queue, which can avoid the retransmission instruction occupying the resources of the transmission queue and avoid the situation where subsequent instructions cannot enter the transmission queue, thereby improving the utilization rate of the transmission queue; by setting a retransmission wake-up unit in the retransmission queue to detect the target retransmission instruction whose exception is resolved, and sending the target retransmission instruction through the retransmission unit, compared with the method of the related art that the retransmission instruction can be retransmitted and executed as long as the retransmission instruction is arbitrated, it can avoid the retransmission instruction whose exception is not resolved occupying the resources of the execution pipeline, which can improve the success rate of the re-execution of the target retransmission instruction, improve the utilization rate of the execution pipeline, and thus improve the utilization rate of the chip.

[0022] On the other hand, an embodiment of the present application provides a method for processing retransmitted instructions, in which a target retransmitted instruction whose exception has been resolved is detected by a retransmitting wake-up unit, and the target retransmitted instruction is sent by the retransmitting unit. Compared with the method in the related art in which the retransmitted instruction can be retransmitted and executed as long as the retransmitted instruction is arbitrated, it can avoid the retransmitted instruction whose exception has not been resolved occupying the resources of the execution pipeline, can improve the success rate of the re-execution of the target retransmitted instruction, improve the utilization rate of the execution pipeline, and improve the processing efficiency of the retransmitted instruction, so that when a chip including a retransmit queue adopts this scheme to process the retransmitted instruction, it can improve the utilization rate of the chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 shows a block diagram of a computer system provided by an exemplary embodiment;

[0024] FIG2 shows a schematic diagram of a related technology provided by an exemplary embodiment;

[0025] FIG3 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0026] FIG4 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0027] FIG5 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0028] FIG6 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0029] FIG7 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0030] FIG8 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0031] FIG9 shows a schematic diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0032] FIG10 shows a schematic diagram of a one-way linked list provided by an exemplary embodiment;

[0033] FIG11 is a schematic diagram showing a resending instruction provided by an exemplary embodiment;

[0034] FIG12 is a schematic diagram showing a resending instruction provided by an exemplary embodiment;

[0035] FIG13 shows a block diagram of a chip including a retransmission queue provided by an exemplary embodiment;

[0036] FIG14 shows a schematic diagram of a data flow provided by an exemplary embodiment;

[0037] FIG15 is a schematic diagram showing a method for processing a resending instruction provided by an exemplary embodiment;

[0038] FIG16 shows a structural block diagram of a computer device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0040] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0042] It should be understood that although the terms first, second, etc. may be used in this application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0043] It should be noted that before collecting relevant user data (such as various types of instructions, resend instructions, etc.) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0044] Figure 1 shows a block diagram of a computer system 100 according to an exemplary embodiment of the present application. This computer system 100 can be implemented as a system architecture for a method for processing retransmission instructions. This computer system 100 includes a terminal 120 and a server 140. Terminal 120 and / or server 140 are provided with a chip including a retransmission queue. The aforementioned method for processing retransmission instructions can be implemented using the chip including the retransmission queue provided in terminal 120 and / or server 140.

[0045] The terminal 120 can be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a PC (Personal Computer), an unmanned reservation terminal, etc. A client that runs a target application can be installed in the terminal 120. The target application can be an application for processing various instructions, or other applications that provide instruction processing functions. This application does not limit this. The above-mentioned various instructions include operation instructions (such as addition instructions, subtraction instructions), data transmission instructions (such as data loading instructions, data storage instructions), control instructions (such as input and output instructions), etc. In addition, this application does not limit the form of the target application, including but not limited to App (Application, application) installed in the terminal 120, applets, etc., and can also be in the form of a web page.

[0046] Server 140 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud computing services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 140 can be the backend server of the target application described above, used to provide backend services to the client of the target application.

[0047] In some embodiments, the server 140 may also be implemented as a node in a blockchain system.

[0048] The terminal 120 and the server 140 may communicate with each other via a network, such as a wired or wireless network.

[0049] In the method for processing retransmission instructions provided in the embodiment of the present application, the execution subject of each step can be a computer device, specifically a chip including a retransmission queue provided in the computer device, and the computer device refers to an electronic device with data calculation, processing and storage capabilities. Taking the implementation environment of the solution shown in Figure 1 as an example, the method for processing retransmission instructions can be executed by the terminal 120 (for example, the chip including a retransmission queue provided in the terminal 120 executes the method for processing retransmission instructions), or the method for processing retransmission instructions can be executed by the server 140 (for example, the chip including a retransmission queue provided in the server 140 executes the method for processing retransmission instructions), or the method for processing retransmission instructions can be executed by the terminal 120 and the server 140 in an interactive manner (for example, the chips including a retransmission queue provided in the terminal 120 and the server 140 respectively execute the method for processing retransmission instructions), and this application does not limit this.

[0050] Those skilled in the art will appreciate that the number of terminals 120 may be greater or less. For example, there may be only one terminal 120, or there may be dozens, hundreds, or even more terminals 120. The embodiments of the present application do not limit the number or device type of terminals 120.

[0051] The chips in computer devices execute a variety of instructions, including arithmetic instructions (such as addition instructions and subtraction instructions), data transfer instructions (such as data loading instructions and data storage instructions), and control instructions (such as input and output instructions). The execution of arithmetic instructions generally requires only one clock cycle, and once issued, they are guaranteed to execute successfully. Data transfer instructions, on the other hand, generally require multiple clock cycles to execute, and execution is not guaranteed to be successful. During execution, they may encounter various exceptions, such as cache misses, missing data from dependent preceding instructions, and so on. These exceptions may cause the data transfer instructions to be re-executed until they are successfully executed.

[0052] In related technologies, an issue queue issues an instruction, which enters the execution pipeline for execution. After execution is complete, it determines whether the instruction was successfully executed (Execute Success). If it is, it is directly written back (Write Back). Otherwise, the instruction needs to re-enter the issue queue and wait for the next issuance. This instruction is also called a replay instruction. Specifically, the replay instruction needs to participate in arbitration with other instructions in the issue queue. When the replay instruction is arbitrated, it enters the execution pipeline for re-execution. If the re-execution fails, it needs to re-enter the issue queue until it is successfully executed. Only then can the replay instruction leave the issue queue.

[0053] Specifically, FIG2 shows a schematic diagram of a related technology provided by an exemplary embodiment of the present application. The emission queue 201 includes a subtraction instruction (Sub), an addition instruction (Add), and a multiplication instruction (Mul) in a waiting state, as well as a data loading instruction (Load) and a data storage instruction (Store) in a replay state. The data loading instruction (Load) and the data storage instruction (Store) in the emission queue 201 need to participate in arbitration together with the subtraction instruction (Sub), the addition instruction (Add), and the multiplication instruction (Mul). When the data loading instruction (Load) or the data storage instruction (Store) is arbitrated, it enters the execution pipeline 202 for re-execution. The execution pipeline 202 determines whether the execution is successful 203. If the re-execution is successful, it writes back 204. If the re-execution fails, it needs to re-enter the emission queue 201 and can only leave the emission queue 201 until the execution is successful.

[0054] The disadvantages of the related art include at least:

[0055] 1. Failed retransmission instructions need to be returned to the transmission queue and wait for the next transmission. Due to the limited capacity of the transmission queue, if it is occupied by a large number of retransmission instructions, subsequent instructions cannot enter the transmission queue, which will cause back pressure and lead to low utilization of the retransmission queue;

[0056] 2. Reissued instructions in the transmit queue can be executed again as long as they are arbitrated. If the exception of the reissued instruction cannot be resolved within a short period of time, the reissued instruction will fail during this period of time. The reissued instruction will occupy the resources of the execution pipeline during re-execution, resulting in low utilization of the execution pipeline.

[0057] The above-mentioned related technologies may result in low chip utilization.

[0058] The embodiments of the present application provide solutions to the above-mentioned shortcomings of the related art:

[0059] 1. Set up a retransmission queue. When there is a retransmission instruction, the retransmission instruction is stored in the retransmission queue. The retransmission instruction does not need to be returned to the transmission queue. The transmission queue can continue to receive subsequent instructions for execution, thereby improving the utilization rate of the transmission queue;

[0060] 2. The reissue queue assigns reissue instructions to the reissue wakeup unit. After the exception is resolved, the reissued instructions are woken up and enter the execution pipeline for execution, improving the execution success rate of reissued instructions and the utilization rate of the execution pipeline.

[0061] Therefore, the embodiments of the present application can effectively improve chip utilization.

[0062] FIG3 shows a schematic diagram of a chip including a replay queue provided by an exemplary embodiment of the present application. The transmit queue 201 includes a subtraction instruction (Sub), an addition instruction (Add), and a data load instruction (Load) in a wait state. The transmit queue 201 sends the data load instruction (Load) to the execution pipeline 202 for execution. The execution pipeline 202 determines whether the execution is successful 203. If the execution is successful, it writes back 204. If the execution fails, the data load instruction (Load) is a replay instruction, and the execution pipeline 202 sends the data load instruction (Load) to the replay queue 205. The replay queue 205 is a parallel bypass of the transmit queue 201 and the execution pipeline 202, and the data processing within the three can be executed in parallel. Specifically, the replay queue 205 may include an acquisition unit, a replay wake-up unit, and a replay unit. The output end of the acquisition unit is connected to the input end of the replay wake-up unit, and the output end of the replay wake-up unit is connected to the input end of the replay unit. The acquisition unit is used to receive the data loading instruction (Load) and send the data loading instruction (Load) to the retransmission wake-up unit. The retransmission wake-up unit is used to send the data loading instruction (Load) to the retransmission unit when it detects that the abnormality of the data loading instruction (Load) is resolved; the retransmission unit is used to send the data loading instruction (Load) to send the data loading instruction (Load) to the execution pipeline 202 for re-execution.

[0063] In summary, an embodiment of the present application provides a chip including a retransmission queue, by setting a retransmission queue in the chip and processing the retransmission instruction through the retransmission queue, compared with the method of still using the transmission queue to process the retransmission instruction in the related art, the retransmission instruction does not need to enter the transmission queue, which can avoid the retransmission instruction occupying the resources of the transmission queue and the situation where subsequent instructions cannot enter the transmission queue, thereby improving the utilization rate of the transmission queue; by setting a retransmission wake-up unit in the retransmission queue to detect the target retransmission instruction whose exception is resolved, and sending the target retransmission instruction through the retransmission unit, compared with the method of the related art that the retransmission instruction can be retransmitted and executed as long as the retransmission instruction is arbitrated, it can avoid the retransmission instruction whose exception is not resolved occupying the resources of the execution pipeline, which can improve the success rate of the re-execution of the target retransmission instruction, improve the utilization rate of the execution pipeline, and thus improve the utilization rate of the chip.

[0064] FIG4 shows a schematic diagram of a chip 200 including a retransmission queue 210 according to an exemplary embodiment of the present application. The retransmission queue 210 includes an acquisition unit 211, a retransmission wakeup unit 212, and a retransmission unit 213. The output of the acquisition unit 211 is connected to the input of the retransmission wakeup unit 212, and the output of the retransmission wakeup unit 212 is connected to the input of the retransmission unit 213.

[0065] In some embodiments, chip 200 further includes an issue queue and an execution pipeline, as shown in FIG2 , such as issue queue 201 and execution pipeline 202. The output of the issue queue is connected to the input of the execution pipeline, allowing the issue queue to send instructions to the execution pipeline for execution. A reissue queue can serve as a parallel bypass for the issue queue, with the output of the reissue queue connected to the input of the execution pipeline, allowing the reissue queue to send reissued instructions to the execution pipeline for execution. For execution pipelines connected to the issue queue, the output of the execution pipeline is connected to the input of the reissue queue, allowing the execution pipeline to push instructions with execution exceptions into the reissue queue as reissued instructions.

[0066] It should be noted that in the above connection relationship, the input and output of the retransmission queue are respectively connected to execution pipelines. The input of the retransmission queue is connected to the execution pipeline corresponding to the transmit queue. This execution pipeline pushes instructions with execution exceptions into the retransmission queue as retransmission instructions. The output of the retransmission queue is connected to its own execution pipeline. This execution pipeline re-executes the retransmission instructions. These two execution pipelines can be the same or different execution pipelines, and this embodiment does not limit this.

[0067] In this embodiment, the reissue queue 210 serves as a parallel bypass for the issue queue and the execution pipeline, allowing data processing within the three pipelines to be performed in parallel. For example, at time 1, the issue queue issues instruction 1 from among multiple instructions to the execution pipeline for execution. This instruction 1 encounters an execution exception and is pushed into the reissue queue as reissued instruction 1. At time 2, the issue queue issues instruction 2 from among multiple instructions to the execution pipeline for execution. This instruction 2 executes normally. Simultaneously, at time 2, the reissue queue can detect whether the exception for reissued instruction 1 has been resolved. In other words, data processing within the three pipelines is performed in parallel.

[0068] The acquiring unit 211 is configured to receive at least one retransmission instruction and send the at least one retransmission instruction to the retransmission wakeup unit 212 ; the at least one retransmission instruction is an instruction that is retransmitted due to an execution exception.

[0069] The acquiring unit is a unit configured to receive (or acquire) at least one resend instruction.

[0070] At least one of the reissued instructions is the instruction whose execution has an exception.

[0071] For example, an instruction is sent from the transmit queue to the execution pipeline for execution. If there is an exception in this execution, the instruction is an instruction with an execution exception and needs to be resent and executed again. This application calls the instruction that is resent due to the execution exception a reissue instruction, and pushes the instruction into the reissue queue waiting for subsequent reissue. It should be noted that the reissue queue is different from the transmit queue used for non-reissue instructions.

[0072] Optionally, the execution exception is also referred to as the reason for reissuing the instruction, and includes at least one of a program error, an interrupt (e.g., an external hardware interrupt or software interrupt), a trap, a system call, an invalidation, an overflow, a data cache miss, an address translation exception, and an address misalignment. For a reissuing instruction, the exception that causes the reissuing instruction may be one or more.

[0073] Optionally, the instruction type of the reissued instruction includes at least one of: operation instructions (such as addition operation instructions, subtraction operation instructions), data transmission instructions (such as data loading instructions, data storage instructions), and control instructions (such as input and output instructions).

[0074] The retransmission wake-up unit 212 is configured to send the target retransmission instruction to the retransmission unit 213 when detecting that the abnormality of the target retransmission instruction in at least one retransmission instruction is resolved.

[0075] The reissue wakeup unit is a unit for detecting whether the at least one reissue instruction has been resolved abnormally. Alternatively, the reissue wakeup unit is a unit for selecting a target reissue instruction for which the abnormality has been resolved from among the at least one reissue instruction.

[0076] The target resend instruction is the resend instruction for which the exception has been resolved among at least one resend instruction. Resent exception means that the exception that caused the resend instruction has been resolved. For example, if instruction a encounters exception 1 during execution and needs to be resent for execution, the resend instruction based on instruction a is recorded as resend instruction a. If exception 1 is resolved by the computer device, resend instruction a becomes the target resend instruction for which the exception has been resolved.

[0077] Since the exception of the target reissued instruction has been resolved, it means that the target reissued instruction has a high probability of being successfully executed when re-executed, and the target reissued instruction can be reissued to the execution pipeline for execution.

[0078] In some embodiments, a retransmission wake-up unit is used to send at least one target retransmission instruction to the retransmission unit at a time. It is understood that when there are multiple parallel retransmission wake-up units in the retransmission queue, the determined multiple target retransmission instructions can be sent to the retransmission unit simultaneously.

[0079] The retransmission unit 213 is configured to send a target retransmission instruction; the target retransmission instruction is configured to be re-executed after being sent.

[0080] The retransmission unit is a unit for sending (or retransmitting) a target retransmission instruction.

[0081] Exemplarily, the reissue unit is used to send the target reissue instruction to the execution pipeline for re-execution, that is, the target reissue instruction is used to be re-executed after being sent.

[0082] In summary, an embodiment of the present application provides a chip including a retransmission queue, the retransmission queue including an acquisition unit, a retransmission wake-up unit and a retransmission unit, the output end of the acquisition unit is connected to the input end of the retransmission wake-up unit, and the output end of the retransmission wake-up unit is connected to the input end of the retransmission unit; the acquisition unit is used to receive at least one retransmission instruction and send at least one retransmission instruction to the retransmission wake-up unit; at least one retransmission instruction is an instruction in which an exception occurs in execution; the retransmission wake-up unit is used to send the target retransmission instruction to the retransmission unit when it is detected that the exception of the target retransmission instruction in at least one retransmission instruction is resolved; the retransmission unit is used to send the target retransmission instruction; the target retransmission instruction is used to be re-executed after sending. Accordingly, the retransmission instruction is processed by the retransmission queue in the chip. Compared with the method of still using the transmission queue to process the retransmission instruction in the related art, the retransmission instruction does not need to enter the transmission queue, which can avoid the retransmission instruction occupying the resources of the transmission queue and avoid the situation where subsequent instructions cannot enter the transmission queue, thereby improving the utilization rate of the transmission queue; by setting a retransmission wake-up unit in the retransmission queue to detect the target retransmission instruction whose exception is resolved, and sending the target retransmission instruction through the retransmission unit, compared with the method of the related art that the retransmission instruction can be retransmitted and executed as long as the retransmission instruction is arbitrated, it can avoid the retransmission instruction whose exception is not resolved occupying the resources of the execution pipeline, which can improve the success rate of the re-execution of the target retransmission instruction, improve the utilization rate of the execution pipeline, and thus improve the utilization rate of the chip.

[0083] Resend wake-up unit 212

[0084] In some embodiments, a reissue instruction corresponds to a reissue type (Replay Type). The reissue type corresponds to the instruction type and reissue reason (Replay Reason) of the reissue instruction. The reissue reason, i.e., the cause of the instruction execution exception, includes at least one of: program error, interrupt, trap, system call, invalid, overflow, data cache miss, address translation exception, and address misalignment. The instruction types of the reissue instruction include: operation instructions, data transfer instructions, and control instructions. The instruction type of a reissue instruction is one of the above instruction types.

[0085] For example, if retransmission instruction 1 corresponds to instruction type 1 and retransmission reason 1, then the retransmission instruction 1 corresponds to retransmission type 1; if retransmission instruction 1 corresponds to instruction type 1 and retransmission reason 2, then the retransmission instruction 1 corresponds to retransmission type 2; if retransmission instruction 2 corresponds to instruction type 2 and retransmission reason 2, then the retransmission instruction 2 corresponds to retransmission type 2; if retransmission instruction 2 corresponds to instruction type 2 and retransmission reason 1, then the retransmission instruction corresponds to retransmission type 3. The corresponding relationship in an example can be shown in the following Table 1:

[0086] Table 1 Correspondence

[0087] In this embodiment, for the same retransmission instruction, different retransmission reasons may correspond to different retransmission types. For different retransmission instructions with the same retransmission reason, the corresponding retransmission types may also be the same. The correspondence between the instruction type, retransmission reason, and retransmission type of a retransmission instruction can be pre-set based on actual technical needs. Optionally, the correspondence can be stored in table form.

[0088] In some embodiments, the retransmission queue includes multiple parallel retransmission wake-up units, each of which is used to process a retransmission instruction of a retransmission type. The retransmission wake-up unit is at least two retransmission wake-up units, the acquisition unit is connected to the input ends of the at least two retransmission wake-up units respectively, and the output ends of the at least two retransmission wake-up units are connected to the input ends of the retransmission units respectively. The at least two retransmission wake-up units have a one-to-one correspondence with the retransmission type. Optionally, the at least two retransmission wake-up units include a target retransmission wake-up unit, which matches the retransmission type corresponding to at least one retransmission instruction received by the acquisition unit.

[0089] The target retransmission wake-up unit is used to determine that the abnormality of the target retransmission instruction is resolved when it is detected that the target retransmission instruction in at least one retransmission instruction meets the retransmission condition.

[0090] The target retransmission awakening unit is one of the at least two retransmission awakening units, wherein the retransmission type corresponding to the target retransmission awakening unit matches the retransmission type of at least one retransmission instruction received by the acquisition unit.

[0091] In some embodiments, the acquisition unit is used to acquire at least one retransmission instruction under various retransmission types, and the acquisition unit is used to push at least one retransmission instruction into a target retransmission wake-up unit that matches the retransmission type of the at least one retransmission instruction based on the retransmission type corresponding to the at least one retransmission instruction.

[0092] A retransmission condition is a condition used to determine whether the target retransmission instruction has been retransmitted. Retransmission conditions can be set based on the retransmission type associated with the retransmission instruction. For example, if retransmission type 1 corresponds to retransmission condition 1, then if the target retransmission instruction in the retransmission instruction satisfies retransmission condition 1, the target retransmission instruction is considered to have been retransmitted.

[0093] In some embodiments, a retransmission instruction has a corresponding data field, wherein the specific type of the data field can be determined based on the retransmission type corresponding to the retransmission instruction, and whether the retransmission instruction meets the retransmission condition can be determined based on the field value of the data field. For example, if retransmission instruction 1 corresponds to retransmission type 1, then the retransmission instruction has a corresponding data field 1. When the field value of data field 1 is preset to 0, retransmission instruction 1 does not meet the retransmission condition. When the field value of data field 1 is preset to 1, retransmission instruction 1 meets the retransmission condition. Therefore, based on the retransmission type corresponding to the retransmission instruction and the field value of the data field, it can be determined whether the retransmission instruction meets the retransmission condition, that is, whether the retransmission instruction is abnormal.

[0094] Exemplarily, at least one resend instruction corresponds to a data field, and a field value of the data field is used to indicate whether the at least one resend instruction meets the resend condition.

[0095] The target retransmission wake-up unit is used to determine the data field segment corresponding to at least one retransmission instruction based on the retransmission type corresponding to at least one retransmission instruction; when the field segment value of the data field segment corresponding to the target retransmission instruction in at least one retransmission instruction is a preset value, determine that the abnormality of the target retransmission instruction is resolved.

[0096] The data field corresponding to the at least one retransmission instruction is determined based on the retransmission type of the at least one retransmission instruction. The preset value is a pre-set field value of the data field.

[0097] Optionally, if the field value of the data field corresponding to the target reissue instruction in at least one reissue instruction is a preset value, it is determined that the abnormality of the target reissue instruction has been resolved, and the target reissue instruction can be reissued. Conversely, if the field value of the data field corresponding to the target reissue instruction in at least one reissue instruction is not a preset value, it is determined that the abnormality of the target reissue instruction has not yet been resolved, and the target reissue instruction does not need to be reissued. Even if it is reissued to the execution pipeline for execution, the probability of execution failure is very high.

[0098] In the above embodiment, by setting the retransmission condition, the target retransmission wake-up unit is used to determine whether the abnormality of the target retransmission instruction is resolved when the target retransmission instruction meets the retransmission condition, which is conducive to the subsequent sending of the target retransmission instruction to the retransmission unit for transmission, and can quickly detect the target retransmission instruction with the abnormality resolved, thereby improving the processing efficiency of the retransmission instruction.

[0099] In the following embodiments, a specific type of target retransmission wake-up unit is used as an example for description.

[0100] For example, FIG5 shows a schematic diagram of a chip 200 including a retransmission queue 210 provided by an exemplary embodiment of the present application. Taking the retransmission wake-up unit 212 as an example, which includes a first retransmission wake-up unit 212-1, a second retransmission wake-up unit 212-2, and a third retransmission wake-up unit 212-3 in parallel, the output end of the acquisition unit 211 is connected to the input ends of the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3, respectively. The output ends of the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3 are connected to the input end of the retransmission unit 213, respectively.

[0101] First retransmission wake-up unit 212-1

[0102] In some embodiments, at least one retransmission instruction includes a first retransmission instruction, the retransmission type of the first retransmission instruction includes a first retransmission type, the target retransmission wake-up unit includes a first retransmission wake-up unit corresponding to the first retransmission type, the first retransmission instruction has at least one exception source that causes an execution exception, and the data field corresponding to the first retransmission instruction includes a ready field corresponding to at least one exception source of the first retransmission instruction.

[0103] An exception source is the source of an instruction execution exception. A reissued instruction may have one or more exception sources.

[0104] Optionally, the exception source includes at least one of a program error, an interrupt, a trap, a system call, an invalidation, an overflow, a data cache miss, an address translation exception, and a source corresponding to an address misalignment. For example, the exception source of a program error may be the instruction itself, the exception source corresponding to an interrupt may be external hardware or software, the exception source corresponding to a system call may be other coprocessors, the exception source of a data cache miss may be other data storage instructions or other data loading instructions associated with the instruction, and so on.

[0105] In some embodiments, at least one exception source of the first reissued instruction corresponds to a ready domain segment. When the domain segment value of the ready domain segment is the first preset value, it indicates that it is ready, that is, the exception is resolved. The first preset value can be set to 1. Optionally, all exception sources of the at least one exception source of the first reissued instruction can share a ready domain segment, and when all exception sources are ready, the domain segment value of the ready domain segment is adjusted to the first preset value. At this time, the first reissued wake-up unit only needs to determine whether the first reissued instruction is abnormally resolved based on the domain segment value of the ready domain segment. It can also be that each exception source of the at least one exception source of the first reissued instruction corresponds to a ready domain segment, and when each exception source is ready, the corresponding ready domain segment is adjusted to the first preset value. At this time, the first reissued wake-up unit needs to determine whether the first reissued instruction is abnormally resolved based on the domain segment value of all ready domain segments.

[0106] The first retransmission wake-up unit 212-1 is configured to use the first retransmission instruction as a target retransmission instruction and determine whether the target retransmission instruction is free from an exception when the field value of the ready field corresponding to at least one exception source in the first retransmission instruction is a first preset value.

[0107] Exemplarily, each of the at least one exception source of the first reissue instruction is set to correspond to a ready domain segment. Each exception source is represented by an exception source identifier (Wake-up Index, Wiid). The first reissue wake-up unit is used to determine that the exception of the target reissue instruction is resolved, that is, the target reissue instruction meets the reissue condition, when the domain segment value of the ready domain segment corresponding to each of the at least one exception source of the target reissue instruction in the first reissue instruction is a first preset value.

[0108] In some embodiments, the first retransmission wakeup unit includes a wakeup slice (Wus), which stores a preset exception source identifier of at least one exception source of the first retransmission instruction. Optionally, the wakeup slice can be in the form of a table, storing the preset exception source identifier of each exception source. The number of wakeup slices of the first retransmission wakeup unit is the same as the number of exception sources of the first retransmission instruction. One wakeup switch is used to handle the wakeup of one of the at least one exception source.

[0109] A wake-up slice is used to set the domain segment value of the ready domain segment corresponding to at least one exception source of the first reissued instruction to a first preset value when the exception source identifier of at least one exception source in the first reissued instruction is equal to the preset exception source identifier.

[0110] Exemplarily, the wake-up slice is used to indicate that when the exception source identifier of at least one exception source in the first reissued instruction is equal to the preset exception source identifier of the target reissued instruction stored in the table, the exception source can be awakened (i.e., it no longer causes the exception of the execution of the first reissued instruction), and the domain segment value of the ready domain segment of the exception source is set to the first preset value.

[0111] For example, the first preset value is set to 1. The target retransmission instruction input to the first retransmission wake-up unit includes three exception sources, which are processed accordingly using three wake-up slices. In one wake-up slice, when the exception source identifier of the input exception source is equal to the preset exception source identifier of a pre-stored exception source, it indicates that the exception source can be awakened, and the field value of the ready field corresponding to the exception source is set to 1. The ready fields of the three wake-up slices are bitwise ANDed. When all three exception sources of the target retransmission instruction are ready, that is, all three ready fields are 1, it indicates that the exception of the target retransmission instruction is resolved, that is, the target retransmission instruction meets the retransmission conditions.

[0112] Exemplarily, the first retransmission type includes an accurate event type, the first retransmission wake-up unit includes an accurate event type retransmission wake-up unit, and the first retransmission instruction includes a first data loading instruction (Load); wherein the first data loading instruction refers to a data loading instruction that needs to obtain data from the data field segment of the data storage instruction (Store), the data storage instruction is the previous instruction of the first data loading instruction, and the address of the data loading instruction is associated with the address of the first data loading instruction, and the first data loading instruction is based on the fact that the data field segment of the data storage instruction is invalid, resulting in an execution exception.

[0113] Figure 11 shows a schematic diagram of a resend instruction provided by an exemplary embodiment of the present application. Figure 11 is an accurate event-type resend instruction, in which the data storage instruction writes data to a specified address of a specified memory, and the data storage instruction has two operands, namely the address of the data storage instruction and the data storage instruction. In some processors, the data storage instruction address pipeline (Store Address Pipeline) 231 and the data storage instruction data pipeline (Store Data Pipeline) 232 are separated, and the data storage instruction enters the store queue (Store Queue) 233 after leaving the above pipeline. If a subsequent data loading instruction generates an address dependency with the previous data storage instruction, the data loading instruction can directly obtain data from the store queue. If the address of the data storage instruction has been calculated, but the data has not been calculated, its address field is valid and the data field is invalid in the store queue. By comparing the addresses, it is found that the address of the data loading instruction is the same as the address of the data storage instruction, and the data storage instruction comes first. Therefore, the data of the data loading instruction needs to be obtained from the data field of the data storage instruction. Since the data field of the data storage instruction is currently invalid, the data loading instruction needs to be resent. In this embodiment, this data loading instruction is also referred to as the first data loading instruction.

[0114] The exception in this embodiment is called an accurate event-type exception. The store queue index (Store Queue Index) of the data storage instruction can be used as the exception source identifier (Wuid). When the data of the data storage instruction is ready, it can be used as a wake-up event to notify the wake-up slice (Wus). After the wake-up slice captures the wake-up event, if the exception source identifier matches, it sets the field value of the corresponding ready field to 1. If the data loading instruction has only this one exception source, the data loading instruction meets the retransmission conditions and can be retransmitted later through the arbitration circuit.

[0115] In the above embodiment, by setting a first retransmission wake-up unit, the first retransmission wake-up unit is specifically an accurate event type retransmission wake-up unit, which can specifically process the accurate event type retransmission instructions, improve the effect of detecting whether the retransmission instruction is abnormal, and improve the processing efficiency of the retransmission instruction.

[0116] Second retransmission wake-up unit 212-2

[0117] In some embodiments, at least one retransmission instruction includes a second retransmission instruction, the retransmission type of the second retransmission instruction includes a second retransmission type, the target retransmission wake-up unit includes a second retransmission wake-up unit corresponding to the second retransmission type, and the data field corresponding to the second retransmission instruction includes a counter (Count, Cnt) field and a ready (Ready) field.

[0118] In some embodiments, the data field corresponding to the second reissue instruction includes both a counter field and a ready field. Only when both the counter field and the ready field meet corresponding preset values ​​can the exception of the second reissue instruction be determined to be resolved.

[0119] The second retransmission wake-up unit 212-2 is used to take the second retransmission instruction as the target retransmission instruction and determine that the exception of the target retransmission instruction is resolved when the field segment value of the counter field segment corresponding to the second retransmission instruction is the second preset value and the field segment value of the ready field segment corresponding to the second retransmission instruction is the first preset value.

[0120] Exemplarily, the first preset value and the second preset value are different preset values. The second retransmission wake-up unit is configured to determine that the abnormality of the target retransmission instruction is resolved when the field value of the counter field corresponding to the target retransmission instruction in the second retransmission instruction is the second preset value and the field value of the ready field corresponding to the target retransmission instruction is the first preset value.

[0121] In some embodiments, the second retransmission wake-up unit stores the initial value of the counter domain segment corresponding to the second retransmission instruction. The initial value of the counter domain segment is used to represent the cooling time. The initial value can be set according to the instruction type and retransmission reason of the second retransmission instruction, and the unit of the initial value is clock cycle. For example, the second retransmission instruction is a data loading instruction, and the retransmission reason is the missing data of the second level (L2). The initial value can be set according to the maximum delay time of the return data of the second level. Optionally, the correspondence between the instruction type, retransmission reason, and initial value of the counter domain segment of the second retransmission instruction can be stored in the form of a table.

[0122] The second retransmission wake-up unit 212-2 is used to reduce the field segment value of the counter field segment corresponding to the second retransmission instruction according to the clock cycle; when the field segment value of the counter field segment is reduced from the initial value to the second preset value, the field segment value of the ready field segment corresponding to the second retransmission instruction is set to the first preset value.

[0123] Exemplarily, the second retransmission wake-up unit is used to reduce the field segment value of the counter field segment corresponding to the second retransmission instruction according to the clock cycle, and the field segment value starts to decrease from the initial value. Then, when the field segment value of the counter field segment decreases from the initial value to the second preset value, the field segment value of the ready field segment corresponding to the second retransmission instruction is set to the first preset value.

[0124] For example, the first preset value is set to 1, and the second preset value is set to 0. The second resend instruction is input to the second resend wake-up unit, and the second resend wake-up unit sets an initial value for the counter field of the second resend instruction according to the instruction type and the resend reason, and decrements the initial value by 1 every clock cycle. When the initial value is decremented to 0, the field value of the ready field of the second resend instruction is set to 1, indicating that the second resend instruction meets the resend condition.

[0125] Exemplarily, the second retransmission type includes a cooling time type, the second retransmission wake-up unit includes a cooling time type retransmission wake-up unit, and the second retransmission instruction includes a second data loading instruction; wherein the second data loading instruction is based on the existence of at least one level of cache data missing, resulting in an execution exception.

[0126] Figure 12 shows a schematic diagram of a resend instruction provided by an exemplary embodiment of the present application. Figure 12 is a resend instruction of a cooling time type. Among them, data cache (Dcache) miss is a typical cooling time type exception source. The data cache is usually divided into multiple levels. For a data load instruction (Load), the load storage unit (Load Store Unit, LSU) 241 first queries the first-level data cache (L1 Dcache) 242. When the data is hit in the first-level data cache 242, the data can be directly obtained. When the data is not hit in the first-level data cache, the second-level data cache (L2 Dcache) 243 is queried. When the data is not hit in the second-level data cache 243, the query is performed from the lower-level data cache. Among them, if the data load instruction misses the data in the first-level data cache 242, it means that a cache miss exception occurs, and the data load instruction needs to be resent. This embodiment also refers to the data load instruction as the first data load instruction. If it is found that the second-level data cache 243 hits data at this time, it means that the data loading instruction can obtain data in a short time, and the cooling time (the initial value of the counter field segment) can be set to a number less than the threshold. If it is found that the second-level data cache 243 still does not hit data, the cooling time can be set to a number greater than the preset value, that is, the cooling time is an empirical value set based on actual technical needs, and is usually determined based on the time for returning data to different levels of cache.

[0127] In the above embodiment, by setting a second retransmission wake-up unit, the second retransmission wake-up unit is specifically a cooling time type retransmission wake-up unit, which can specifically process the quasi-cooling time type retransmission instructions, improve the effect of detecting whether the abnormality of the retransmission instruction is resolved, and improve the processing efficiency of the retransmission instruction.

[0128] In some embodiments, for a portion of the first retransmitted instructions, the first retransmitted wake-up unit can determine whether the first retransmitted instructions have been resolved, and wake up the device when the exception is resolved. For another portion of the first retransmitted instructions, a post-wake-up cooldown period can also be set. For this portion of the first retransmitted instructions, after being awakened by the first retransmitted wake-up unit, a second awakening is performed by the second retransmitted wake-up unit.

[0129] Exemplarily, the retransmission wake-up unit specifically includes a first retransmission wake-up unit and a second retransmission wake-up unit, wherein the output end of the first retransmission wake-up unit is also connected to the input end of the second retransmission wake-up unit, and the output end of the second retransmission wake-up unit is connected to the input end of the retransmission unit. The first retransmission wake-up unit is used to send the first retransmission instruction to the second retransmission wake-up unit when the field value of the ready field corresponding to at least one exception source in the first retransmission instruction is a first preset value. The second retransmission wake-up unit is used to determine that the exception of the first retransmission instruction is resolved when the field value of the counter field corresponding to the first retransmission instruction is a second preset value and the field value of the ready field corresponding to the target retransmission instruction is a first preset value, and can be used as the target retransmission instruction. In this example, there are two retransmission types of the retransmission instruction, namely, the accurate event type and the cooling time type. That is, the present application does not limit a retransmission instruction to have only one retransmission type. In some scenarios, it can also have multiple retransmission types at the same time.

[0130] In the above embodiment, by simultaneously setting the first retransmission wake-up unit and the second retransmission wake-up unit, the first retransmission wake-up unit is specifically an accurate event type retransmission wake-up unit, and the second retransmission wake-up unit is specifically a cooling time type retransmission wake-up unit, which can specifically process the accurate event type + cooling time type retransmission instructions, improve the effect of detecting whether the abnormality of the retransmission instruction is resolved, and improve the processing efficiency of the retransmission instruction.

[0131] The third retransmission wake-up unit 212-3

[0132] In some embodiments, the at least one retransmission instruction includes a third retransmission instruction, the retransmission type of the third retransmission instruction includes a third retransmission type, and the target retransmission wakeup unit includes a third retransmission wakeup unit corresponding to the third retransmission type. Unlike the first retransmission instruction and the second retransmission instruction, for the third retransmission instruction, the third retransmission wakeup unit does not need to determine whether the third retransmission instruction is abnormal based on a field value of a data field corresponding to the third retransmission instruction.

[0133] The third retransmission wake-up unit 212 - 3 is configured to determine that the abnormality of the target retransmission instruction is resolved when it is detected that the target retransmission instruction in the third retransmission instruction is at the head of the queue.

[0134] Exemplarily, a third retransmission instruction with the third retransmission type is a retransmission instruction whose exception can be quickly resolved. The third retransmission wake-up unit includes a unit queue, which is a first-in, first-out unit queue, and the instruction at the head of the queue can be sent directly. The third retransmission wake-up unit is configured to, upon detecting that the third retransmission instruction is at the head of the queue, use the third retransmission instruction as the target retransmission instruction and determine that the exception of the target retransmission instruction has been resolved, i.e., that the target retransmission instruction meets the retransmission conditions.

[0135] Exemplarily, the third retransmission type includes a direct wake-up type, the third retransmission wake-up unit includes a direct wake-up type retransmission wake-up unit, and the third retransmission instruction includes a third data loading instruction; wherein the third data loading instruction is based on a bank conflict when accessing the data cache, resulting in an execution exception.

[0136] For example, if a sector conflict occurs when a data load instruction (Load) accesses the data cache (Dcache), the execution of the data load instruction will be abnormal, and the data load instruction needs to be resent. In this embodiment, this data load instruction is also referred to as the third data load instruction. Sector conflicts arise when multiple access sources access the same sector and are relatively random. There is a high probability that a sector conflict will not occur again during the next access. Therefore, this resend instruction can be resent directly without waiting.

[0137] In the above embodiment, by setting a third retransmission wake-up unit, the third retransmission wake-up unit is specifically a direct wake-up type retransmission wake-up unit, which can specifically process the direct wake-up type retransmission instruction, improve the effect of detecting whether the abnormality of the retransmission instruction is resolved, and improve the processing efficiency of the retransmission instruction.

[0138] In some embodiments, at least one retransmission instruction is a plurality of retransmission instructions. The retransmission queue further includes a find first bit (FFB) unit. FIG6 shows a schematic diagram of a chip 200 including a retransmission queue 210 provided by an exemplary embodiment of the present application. The output end of the acquisition unit 211 is connected to the input end of the retransmission wake-up unit 212, the output end of the retransmission wake-up unit 212 is connected to the input end of the search unit 310, and the output end of the search unit 310 is connected to the input end of the retransmission unit 213.

[0139] The retransmission awakening unit 212 is configured to send the at least two retransmission instructions to the search unit when detecting that the abnormality of at least two retransmission instructions among the multiple retransmission instructions is resolved.

[0140] The searching unit 310 is configured to search for a first ready retransmission instruction from at least two retransmission instructions, and send the first ready retransmission instruction as a target retransmission instruction to the retransmission unit.

[0141] Optionally, if at least one retransmission instruction is multiple retransmission instructions, the retransmission wake-up unit may detect that the abnormality of at least two retransmission instructions among the multiple retransmission instructions has been resolved. Since each retransmission wake-up unit can only output one target retransmission instruction to the retransmission unit, the search unit is required to determine one retransmission instruction from at least two retransmission instructions as the target retransmission instruction and send it to the retransmission unit.

[0142] Exemplarily, the retransmission wake-up unit is configured to, upon detecting that at least two retransmission instructions among the plurality of retransmission instructions have had their anomalies resolved, send the at least two retransmission instructions to the search unit. The search unit is configured to search for a first ready retransmission instruction from the at least two retransmission instructions and send the first ready retransmission instruction as a target retransmission instruction to the retransmission unit.

[0143] The ready mentioned here refers to the state where all exceptions are resolved. The ready resend instruction is the resend instruction when the corresponding exception is resolved. Since the exception resolution has a specific time, the first ready resend instruction among the two resend instructions is the first resend instruction to complete the exception resolution.

[0144] In some embodiments, the search unit searches for the first ready retransmission instruction from at least two retransmission instructions by selecting the retransmission instruction with the earliest time point as the first ready retransmission instruction according to the time point when the ready domain of each target retransmission instruction is the first preset value, or by randomly selecting a target retransmission instruction from at least two retransmission instructions as the first ready retransmission instruction. This embodiment does not impose any restrictions on this.

[0145] In some embodiments, when there are multiple retransmission wake-up units, multiple search units can also be provided accordingly. For example, FIG7 shows a schematic diagram of a chip 200 including a retransmission queue 210 provided by an exemplary embodiment of the present application. For example, the retransmission wake-up unit 212 includes a first retransmission wake-up unit 212-1, a second retransmission wake-up unit 212-2, and a third retransmission wake-up unit 212-3 in parallel, and the search unit 310 includes a first search unit 311 and a second search unit 312. The output of acquisition unit 211 is connected to the inputs of first retransmission wakeup unit 212-1, second retransmission wakeup unit 212-2, and third retransmission wakeup unit 212-3, respectively. The output of first retransmission wakeup unit 212-1 is connected to the input of first search unit 311, the output of first search unit 311 is connected to the input of retransmission unit 213, the output of second retransmission wakeup unit 212-2 is connected to the input of second search unit 312, the output of second search unit 312 is connected to the input of retransmission unit 213, and the output of third retransmission wakeup unit 212-3 is connected to the input of retransmission unit 213. Since third retransmission wakeup unit 212-3 outputs the target retransmission instruction at the head of the queue, there is only one target retransmission instruction, and third retransmission instruction 212-3 does not need to be connected to a search unit.

[0146] Specifically, the first retransmission wakeup unit 212-1 is configured to, upon detecting that at least two retransmission instructions among a plurality of retransmission instructions have had their exceptions resolved, send the at least two retransmission instructions to the first search unit 311. The first search unit 311 is configured to search for the first ready retransmission instruction from the at least two retransmission instructions and send the first ready retransmission instruction as the target retransmission instruction to the retransmission unit 213. Similarly, the second retransmission wakeup unit 212-2 is configured to, upon detecting that at least two retransmission instructions among a plurality of retransmission instructions have had their exceptions resolved, send the at least two retransmission instructions to the second search unit 312. The second search unit 312 is configured to search for the first ready retransmission instruction from the at least two retransmission instructions and send the first ready retransmission instruction as the target retransmission instruction to the retransmission unit 213. The third retransmission wakeup unit 212-3, upon detecting that the target retransmission instruction is at the head of the queue, determines that the target retransmission instruction has had its exception resolved and sends the target retransmission instruction to the retransmission unit 213.

[0147] In the above embodiment, by setting up a search unit, a retransmission wake-up unit can be selected from multiple target retransmission instructions that meet the retransmission conditions, so that a retransmission wake-up unit sends a target retransmission instruction to the retransmission unit, thereby realizing the screening of multiple target retransmission instructions that meet the retransmission conditions.

[0148] In some embodiments, the retransmission wakeup unit comprises at least two retransmission wakeup units, and the target retransmission instruction comprises at least two target retransmission instructions, i.e., one retransmission wakeup unit is used to determine one target retransmission instruction. The retransmission queue further comprises a polling unit, wherein the outputs of the at least two retransmission wakeup units are respectively connected to the inputs of the polling unit, and the output of the polling unit is connected to the input of the retransmission unit.

[0149] at least two retransmission wake-up units, configured to respectively send at least two target retransmission instructions to the polling unit;

[0150] The polling unit is configured to perform polling arbitration on at least two target retransmission instructions, determine the arbitrated target retransmission instruction, and send the arbitrated target retransmission instruction to the retransmission unit.

[0151] In some embodiments, the polling unit can be implemented by a round-robin arbiter (RR), wherein the round-robin arbiter is used to allocate bus usage rights to each retransmission wake-up unit in a certain order in turn. Each retransmission wake-up unit can monopolize the bus within its own time slice, so that each target retransmission instruction determined by itself can be sent to the retransmission unit at a time.

[0152] Optionally, at least two retransmission wake-up units are used to send at least two target retransmission instructions to the polling unit respectively; the polling unit is used to perform polling arbitration on at least two target retransmission instructions, determine the arbitrated target retransmission instruction, and send the arbitrated target retransmission instruction as the target retransmission instruction to the retransmission unit; the retransmission unit is used to send the target retransmission instruction; the target retransmission instruction is used to be re-executed after sending.

[0153] In some embodiments, a retransmission queue includes an acquisition unit, at least two retransmission wake-up units, a polling unit, and a retransmission unit. For example, FIG8 shows a schematic diagram of a chip 200 including a retransmission queue 210 provided by an exemplary embodiment of the present application. Among them, at least two retransmission wake-up units include a first retransmission wake-up unit 212-1, a second retransmission wake-up unit 212-2, and a third retransmission wake-up unit 212-3 in parallel as an example. The output end of the acquisition unit 211 is connected to the input ends of the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3 respectively, and the output ends of the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3 are connected to the input end of the polling unit 320, and the output end of the polling unit 320 is connected to the input end of the retransmission unit 213.

[0154] Specifically, the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3 are used to send their respective target retransmission instructions to the polling unit 320 when they detect that the abnormality of the target retransmission instruction is resolved. The polling unit 320 is used to perform polling arbitration on each target retransmission instruction and send the target retransmission instruction after the final arbitration to the retransmission unit 213.

[0155] In some embodiments, a retransmission queue includes an acquisition unit, at least two retransmission wakeup units, at least two search units, a polling unit, and a retransmission unit. For example, FIG9 shows a schematic diagram of a chip 200 including a retransmission queue 210 provided by an exemplary embodiment of the present application. For example, at least two retransmission wakeup units 212 include a first retransmission wakeup unit 212-1, a second retransmission wakeup unit 212-2, and a third retransmission wakeup unit 212-3 in parallel, and for example, a search unit 310 includes a first search unit 311 and a second search unit 312. The output end of the acquisition unit 211 is connected to the input ends of the first retransmission wake-up unit 212-1, the second retransmission wake-up unit 212-2, and the third retransmission wake-up unit 212-3 respectively. The output end of the first retransmission wake-up unit 212-1 is connected to the input end of the first search unit 311, the output end of the first search unit 311 is connected to the input end of the polling unit 320, the output end of the second retransmission wake-up unit 212-2 is connected to the input end of the second search unit 312, the output end of the second search unit 312 is connected to the input end of the polling unit 320, the output end of the polling unit 320 is connected to the input end of the retransmission unit 213, and the output end of the third retransmission wake-up unit 212-3 is connected to the input end of the retransmission unit 213.

[0156] Specifically, the first retransmission wake-up unit 212-1 is configured to, upon detecting that the abnormality of at least two target retransmission instructions among the at least two retransmission instructions has been resolved, send the at least two target retransmission instructions to the first search unit 311. The first search unit 311 is configured to search for a first ready retransmission instruction from the at least two target retransmission instructions, and send the first ready retransmission instruction as target retransmission instruction 1 to the polling unit 320. Similarly, the second retransmission wake-up unit 212-2 is configured to, upon detecting that the abnormality of at least two target retransmission instructions among the at least two retransmission instructions has been resolved, send the at least two target retransmission instructions to the second search unit 312. The second search unit 312 is configured to search for a first ready retransmission instruction from the at least two target retransmission instructions, and send the first ready retransmission instruction as target retransmission instruction 2 to the polling unit 320. The third retransmission wake-up unit 212-3 is configured to, upon detecting that the target retransmission instruction 3 is at the head of the queue, determine that the abnormality of the target retransmission instruction 3 has been resolved and send the target retransmission instruction 3 to the polling unit 320. The polling unit 320 is configured to perform polling arbitration on the target retransmission instruction 1, the target retransmission instruction 2, and the target retransmission instruction 3, determine the arbitrated target retransmission instruction, and send the arbitrated target retransmission instruction as the final target retransmission instruction to the retransmission unit 213; the retransmission unit 213 is configured to send the target retransmission instruction; the target retransmission instruction is configured to be re-executed after being sent.

[0157] In the above embodiment, by setting up a polling unit, the target retransmission instruction to be finally transmitted can be selected from multiple target retransmission instructions, so that the retransmission queue will only send one target retransmission instruction to the execution pipeline for execution at a time, which can avoid the error situation that the execution pipeline executes multiple retransmission instructions at the same time, and improve the execution efficiency of the execution pipeline.

[0158] In some embodiments, the chip including the retransmission queue also stores a one-way linked list (Freelist), which stores a retransmission index (Replay Index) corresponding to at least one retransmission instruction. The retransmission index is used to index the corresponding retransmission instruction in the memory space (Payload Ram), and the memory space stores at least one retransmission instruction.

[0159] Optionally, when a retransmitted instruction enters the retransmitted queue, the retransmitted queue allocates a memory space in a one-way linked list to store the instruction itself and instruction information of the retransmitted instruction, and the instruction information includes at least one of the source operand and the retransmitted reason. For example, FIG10 shows a schematic diagram of a one-way linked list provided by an exemplary embodiment of the present application. The organizational structure of the one-way linked list is a first-in-first-out queue, which maintains a head (Head) 222 and a tail (Rear) 221. When it is necessary to allocate memory space for a newly pressed retransmitted instruction, a data is taken out from the head 222 of the queue. The data is the retransmitted index (or storage index) of the retransmitted instruction in the memory space, that is, the retransmitted index is read from the head of the queue and assigned to the retransmitted instruction. The memory space is used to store the retransmitted instruction. After getting a data from the head, the head pointer is increased by 1. Each time a target retransmitted instruction is popped out from the retransmitted queue, the storage index corresponding to the popped out target retransmitted instruction needs to be released, that is, the storage index corresponding to the target retransmitted instruction is pushed to the tail of the queue. Based on this, the currently free storage index is stored in the one-way linked list.

[0160] In some embodiments, each retransmission instruction is stored in a memory space, and the retransmission wake-up unit, the search unit, and the polling unit can process the retransmission instruction without first obtaining the retransmission instruction itself, but only obtain the instruction information of the retransmission instruction. The retransmission wake-up unit is used to send the retransmission index corresponding to the target retransmission instruction to the polling unit.

[0161] A polling unit, configured to perform polling arbitration on at least two target retransmission instructions, determine a target retransmission index corresponding to the arbitrated target retransmission instruction, and send the target retransmission index to the retransmission unit;

[0162] The retransmission unit is further configured to index the target retransmission instruction corresponding to the target retransmission index from the memory space based on the one-way linked list and the target retransmission index, and obtain the target retransmission instruction stored in the memory space.

[0163] Optionally, the polling unit is used to perform polling arbitration on at least two target retransmission instructions, determine the target retransmission index corresponding to the arbitrated target retransmission instruction, and send the target retransmission index to the retransmission unit; the retransmission unit is also used to index the target retransmission instruction corresponding to the retransmission index from the memory space based on the one-way linked list and the target retransmission index, obtain the target retransmission instruction stored in the memory space, and finally send the target retransmission instruction.

[0164] In the above embodiment, by setting a one-way linked list, storage space can be allocated for the retransmission instruction. Then, when the retransmission queue processes the retransmission instruction, it is not necessary to obtain the retransmission instruction itself temporarily. It is only necessary to obtain the target retransmission instruction to be sent at the last sending of the retransmission unit, which can save chip resources.

[0165] Acquisition unit 211

[0166] In some embodiments, the retransmission instruction includes multiple retransmission types, and the retransmission wake-up unit includes multiple retransmission types, and the retransmission wake-up unit corresponds one-to-one with the retransmission type. The acquisition unit is further configured to send each retransmission instruction to a matching retransmission wake-up unit. The acquisition unit stores a retransmission type table (Replay Type Table), which includes a correspondence between multiple retransmission instructions and retransmission types (Replay Type). Optionally, the retransmission type table also includes retransmission reasons (Replay Reason) corresponding to the multiple retransmission instructions.

[0167] The acquisition unit 211 is configured to receive multiple retransmission instructions, search the retransmission type table, determine the retransmission types corresponding to the multiple retransmission instructions, and send the multiple retransmission instructions to the retransmission wakeup units matching the corresponding retransmission types.

[0168] Optionally, the retransmission wake-up units correspond to the retransmission types one by one. The acquisition unit is configured to receive multiple retransmission instructions, search the retransmission type table, determine the retransmission types corresponding to the multiple retransmission instructions, and send the multiple retransmission instructions to at least two retransmission wake-up units that match the retransmission types.

[0169] In the above embodiment, the acquisition unit can send the retransmission instruction to the matching retransmission wake-up unit, which is conducive to the retransmission wake-up unit to process the retransmission instruction in a targeted manner, thereby improving the processing efficiency of the retransmission instruction.

[0170] The following is an overall description of a method for processing retransmission instructions by the chip including a retransmission queue, in conjunction with a possible structural diagram of the chip including a retransmission queue.

[0171] Figure 13 shows a block diagram of a chip including a retransmission queue provided by an exemplary embodiment of the present application. The retransmission queue includes an acquisition unit 12, an accurate event-based retransmission wakeup unit 13, a first search unit 14, a cooling time-based retransmission wakeup unit 16, a second search unit 17, a first polling unit 18, a direct wakeup-based retransmission wakeup unit 19, a second polling unit 20, and a retransmission unit 22. The overall steps are briefly described as follows:

[0172] 1. When the execution pipeline determines that an instruction is executed abnormally, the instruction is pushed (Push) into the acquisition unit 12 of the replay queue (Replay Queue) as a reissue instruction (Replay_Instr_In) 11-1; and the instruction itself and instruction information (source operand, reissue reason) of the reissue instruction are stored in the memory space 22 (Replay_Payload_In) 11-2; optionally, a one-way linked list 21 is used to allocate memory space (Payload Ram) for the reissue instruction, and the memory space stores the reissue index corresponding to the reissue instruction, the instruction itself, and the instruction information.

[0173] 2. After receiving the retransmission instruction, the acquisition unit 12 searches the retransmission type table (Replay Type Table), which stores the correspondence between the retransmission instruction, the retransmission reason (Replay Reason) and the retransmission type (Replay Type), thereby determining the retransmission type corresponding to the retransmission instruction and sending the retransmission instruction to the retransmission wake-up unit that matches the retransmission type.

[0174] 3. Take the resend type of the resend instruction as the accurate event type as an example:

[0175] The acquisition unit 12 pushes (Push) the retransmission instruction to the accurate event-type retransmission wake-up unit 13. Taking the case where the retransmission instruction corresponds to 3 exception sources as an example, the accurate event-type retransmission wake-up unit 13 includes 3 wake-up slices (Wus), and each wake-up slice stores a preset exception source identifier (Id) corresponding to an exception source. When the 3 exception source identifiers of the retransmission instruction are respectively equal to the preset exception source identifier, the 3 wake-up slices set the field values ​​of the ready (Ready) fields corresponding to the 3 exception sources of the retransmission instruction to 1. At this time, the retransmission instruction meets the retransmission conditions, and the accurate event-type retransmission wake-up unit 13 sends the retransmission instruction to the first search unit (Ffb) 14. When there are multiple retransmission instructions with the above-mentioned retransmission conditions, the first search unit 14 selects the first ready retransmission instruction from them and determines the retransmission index 0 (Replay Index0) corresponding to the first ready retransmission instruction. If the retransmission instruction does not have a cooldown time 15, the retransmission index 0 corresponding to the retransmission instruction is directly sent to the first polling unit 18. If the retransmission instruction has a cooldown time 15, the retransmission instruction is pushed into the cooldown time type retransmission awakening unit 16 for secondary awakening.

[0176] The cooling time type retransmission wake-up unit 16 decrements the field value of the counter (Cnt) field corresponding to the retransmission instruction according to the clock cycle; when the field value of the counter field is reduced from the initial value to 0, the field value of the ready (Ready) field corresponding to the retransmission instruction is set to 1. At this time, the retransmission instruction meets the retransmission condition again, and the cooling time type retransmission wake-up unit 16 sends the retransmission wake-up unit to the second search unit 17. When there are multiple retransmission instructions that meet the retransmission condition, the second search unit 17 selects the first ready retransmission instruction from them, determines the replay index 1 (Replay Index 1) corresponding to the first ready retransmission instruction, and sends the replay index 1 corresponding to the retransmission instruction to the first polling unit 18. The first polling unit 18 is used to send the retransmission index 0 or the retransmission index 1 to the second polling unit 20.

[0177] 4. Take the resend type of the resend instruction as the cooldown time type as an example:

[0178] The acquisition unit 12 pushes the retransmission instruction to the cooling time type retransmission wake-up unit 16. The cooling time type retransmission wake-up unit 16 reduces the field value of the counter (Cnt) field corresponding to the retransmission instruction according to the clock cycle; when the field value of the counter field is reduced from the initial value to 0, the field value of the ready (Ready) field corresponding to the retransmission instruction is set to 1. At this time, the retransmission instruction meets the retransmission condition, and the cooling time type retransmission wake-up unit 16 sends the retransmission wake-up unit to the second search unit 17. When there are multiple retransmission instructions that meet the retransmission conditions, the second search unit 17 selects the first ready retransmission instruction from them, determines the retransmission index 1 (Replay Index 1) corresponding to the first ready retransmission instruction, and sends the retransmission index 1 corresponding to the retransmission instruction to the first polling unit 18. The first polling unit 18 is used to send the retransmission index 1 to the second polling unit 20.

[0179] 5. Take the case where the resend type of the resend instruction is direct wake-up type as an example:

[0180] The acquisition unit 12 pushes the retransmission instruction to the direct-wake-up retransmission awakening unit 16. When the direct-wake-up retransmission awakening unit 16 detects that the retransmission instruction is at the head of the queue, the retransmission instruction meets the retransmission condition. The direct-wake-up retransmission awakening unit 16 sends the retransmission index 2 (Replay Index 2) corresponding to the retransmission instruction to the second polling unit 20.

[0181] 6. The second polling unit 20 performs polling arbitration on retransmission index 0, retransmission index 1 and retransmission index 2, determines the final retransmission index (Final Replay Idx) corresponding to the arbitrated retransmission instruction, and sends the retransmission index to the retransmission unit 22. The retransmission unit 22 indexes the retransmission instruction corresponding to the retransmission index from the memory space based on the one-way linked list 21 and the retransmission index, obtains the retransmission instruction stored in the memory space and sends 23 (Replay_Out).

[0182] Based on the chip including the retransmission queue shown in Figure 13, Figure 14 shows a schematic diagram of a data flow provided by an exemplary embodiment of the present application, wherein the data flow refers to the direction of data flow.

[0183] When the chip including the retransmission queue processes the retransmission instruction, the retransmission queue may include at least one of the following four data streams: the solid line a1 is the data stream of accurate event type retransmission wake-up, the solid line a2 is the data stream of accurate event type + cooling time type retransmission wake-up, the solid line b is the data stream of cooling time type retransmission wake-up, and the solid line c is the data stream of direct wake-up type retransmission wake-up.

[0184] In summary, the chip including a retransmission queue provided in the embodiment of the present application, by setting up a retransmission queue, compared with the method of still using a transmission queue to process retransmission instructions in the related art, the retransmission instruction does not need to enter the transmission queue, which can avoid the retransmission instruction occupying the resources of the transmission queue and the situation where subsequent instructions cannot enter the transmission queue, thereby improving the utilization rate of the transmission queue; by setting multiple retransmission wake-up units in the retransmission queue to detect the target retransmission instruction of the exception resolution, it can adapt to different exception sources, different retransmission reasons and retransmission types of the retransmission instruction; the target retransmission instruction is sent by the retransmission unit, compared with the method of the related art that the retransmission instruction can be retransmitted and executed as long as the retransmission instruction is arbitrated, it can avoid the retransmission instruction whose exception has not been resolved occupying the resources of the execution pipeline, can improve the success rate of the re-execution of the target retransmission instruction, improve the utilization rate of the execution pipeline, and thus improve the utilization rate of the chip.

[0185] FIG15 is a schematic diagram of a method for processing a retransmission instruction provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be the terminal 120 and / or server 140 shown in FIG1 , and can be specifically executed by a chip including a retransmission queue provided in the terminal 120 and / or server 140. The method includes steps 420, 440, and 460:

[0186] Step 420: The acquiring unit receives at least one resend instruction and sends the at least one resend instruction to the resend wake-up unit; the at least one resend instruction is an instruction that is resent due to an execution exception;

[0187] Step 440 , when the retransmission wake-up unit detects that the abnormality of the target retransmission instruction in at least one retransmission instruction is resolved, the retransmission wake-up unit sends the target retransmission instruction to the retransmission unit;

[0188] Step 460: The retransmission unit sends a target retransmission instruction; the target retransmission instruction is used to be re-executed after being sent.

[0189] In summary, the embodiment of the present application provides a method for processing reissued instructions, wherein an acquisition unit receives at least one reissued instruction and sends at least one reissued instruction to a reissue wake-up unit; at least one reissued instruction is an instruction in which an exception occurs during execution; the reissue wake-up unit sends the target reissued instruction to the reissue unit when detecting that the exception of the target reissued instruction in at least one reissued instruction is resolved; the reissue unit sends the target reissued instruction; and the target reissued instruction is used to be re-executed after being sent. Accordingly, the target reissued instruction whose exception is resolved is detected by the reissue wake-up unit, and the target reissued instruction is sent by the reissue unit. Compared with the method in the related art in which the reissued instruction can be reissued and executed as long as the reissued instruction is arbitrated, the reissued instruction whose exception is not resolved can be avoided from occupying the resources of the execution pipeline, and the success rate of the re-execution of the target reissued instruction can be improved, the utilization rate of the execution pipeline can be improved, and the processing efficiency of the reissued instruction can be improved, so that when a chip including a reissue queue adopts this solution to process the reissued instruction, the utilization rate of the chip can be improved.

[0190] In some embodiments, the retransmission wake-up unit includes at least two retransmission wake-up units, the at least two retransmission wake-up units correspond one-to-one to the retransmission type, the at least two retransmission wake-up units include a target retransmission wake-up unit, and the target retransmission wake-up unit matches the retransmission type corresponding to at least one retransmission instruction; step 440 can be optionally implemented as steps 520 and 540:

[0191] Step 520 , when the target retransmission wakeup unit detects that the target retransmission instruction satisfies the retransmission condition, it determines that the abnormality of the target retransmission instruction is resolved;

[0192] Step 540: The target retransmission wakeup unit sends the target retransmission instruction to the retransmission unit.

[0193] In some embodiments, at least one resend instruction corresponds to a data field, and the field value of the data field is used to indicate whether the at least one resend instruction meets the resend condition; step 520 can be optionally implemented as steps 522 and 524:

[0194] Step 522: The target retransmission wakeup unit determines a data field corresponding to the at least one retransmission instruction based on a retransmission type corresponding to the at least one retransmission instruction.

[0195] Step 524 : The target resend wake-up unit determines that the abnormality of the target resend instruction is resolved when the field value of the data field corresponding to the target resend instruction is a preset value.

[0196] In some embodiments, the at least one reissue instruction includes a first reissue instruction, the reissue type of the first reissue instruction includes a first reissue type, the target reissue wakeup unit includes a first reissue wakeup unit corresponding to the first reissue type, the first reissue instruction has at least one exception source that causes an execution exception, and the data field corresponding to the first reissue instruction includes a ready field corresponding to the at least one exception source of the first reissue instruction; step 524 can optionally be implemented as step 524-1:

[0197] Step 524-1: When the field value of the ready field corresponding to at least one exception source in the first reissue instruction is a first preset value, the first reissue wake-up unit uses the first reissue instruction as the target reissue instruction and determines whether the exception of the target reissue instruction is resolved.

[0198] In some embodiments, the first retransmission wakeup unit includes a wakeup slice, and the wakeup slice stores a preset exception source identifier of at least one exception source of the first retransmission instruction; the method further includes step 524-2:

[0199] Step 524-2, when the exception source identifier of at least one exception source in the first reissued instruction of the wake-up slice is equal to the preset exception source identifier, the domain segment value of the ready domain segment corresponding to at least one exception source of the first reissued instruction is set to the first preset value.

[0200] Optionally, the first retransmission type includes an accurate event type, the first retransmission wake-up unit includes an accurate event type retransmission wake-up unit, and the first retransmission instruction includes a first data loading instruction; wherein, the first data loading instruction refers to a data loading instruction that needs to obtain data from the data field of the data storage instruction, the data storage instruction is the previous instruction of the first data loading instruction, and the address of the data loading instruction is associated with the address of the first data loading instruction, and the first data loading instruction is based on the fact that the data field of the data storage instruction is invalid, resulting in an execution exception.

[0201] In some embodiments, the at least one retransmission instruction includes a second retransmission instruction, the retransmission type of the second retransmission instruction includes a second retransmission type, the target retransmission wakeup unit includes a second retransmission wakeup unit corresponding to the second retransmission type, and the data field corresponding to the second retransmission instruction includes a counter field and a ready field; step 524 may be optionally implemented as step 524-3:

[0202] Step 524-3, when the field segment value of the counter field segment corresponding to the second retransmission instruction is the second preset value and the field segment value of the ready field segment corresponding to the second retransmission instruction is the first preset value, the second retransmission wake-up unit takes the second retransmission instruction as the target retransmission instruction and determines that the abnormality of the target retransmission instruction is resolved.

[0203] In some embodiments, the second retransmission wake-up unit stores an initial value of the counter field corresponding to the second retransmission instruction; the method further includes steps 524-4 and 524-5:

[0204] Step 524-4: the second retransmission wake-up unit decrements the value of the counter field corresponding to the second retransmission instruction according to the clock cycle;

[0205] In step 524-5, when the field value of the counter field decreases from the initial value to the second preset value, the second retransmission wake-up unit sets the field value of the ready field corresponding to the second retransmission instruction to the first preset value.

[0206] Optionally, the second retransmission type includes a cooling time type, the second retransmission wake-up unit includes a cooling time type retransmission wake-up unit, and the second retransmission instruction includes a second data loading instruction; wherein the second data loading instruction is based on the existence of at least one level of cache data missing, resulting in an execution exception.

[0207] In some embodiments, the at least one retransmission instruction includes a third retransmission instruction, the retransmission type of the third retransmission instruction includes a third retransmission type, and the target retransmission wake-up unit includes a third retransmission wake-up unit corresponding to the third retransmission type; step 524 may be optionally implemented as step 524-6:

[0208] In step 524 - 6 , when the third retransmission wake-up unit detects that the third retransmission instruction is at the head of the queue, it uses the third retransmission instruction as the target retransmission instruction and determines whether the abnormality of the target retransmission instruction is resolved.

[0209] Optionally, the third retransmission type includes a direct wake-up type, the third retransmission wake-up unit includes a direct wake-up type retransmission wake-up unit, and the third retransmission instruction includes a third data loading instruction; wherein the third data loading instruction is based on a plate conflict when accessing the data cache, resulting in an execution exception.

[0210] In some embodiments, the at least one resend instruction is a plurality of resend instructions; step 440 may also be implemented as steps 620 and 640:

[0211] Step 620 , when the retransmission wake-up unit detects that the abnormality of at least two retransmission instructions among the multiple retransmission instructions is resolved, the retransmission wake-up unit sends the at least two retransmission instructions to the search unit;

[0212] In step 640 , the search unit searches for a first ready retransmission instruction from at least two retransmission instructions, and sends the first ready retransmission instruction as a target retransmission instruction to the retransmission unit.

[0213] In some embodiments, the retransmission wake-up unit is at least two retransmission wake-up units, and the target retransmission instruction is at least two target retransmission instructions; step 440 can also be implemented as steps 660 and 680:

[0214] Step 660: at least two retransmission wake-up units send two target retransmission instructions to the polling unit respectively;

[0215] Step 680: The polling unit performs polling arbitration on at least two target retransmission instructions, determines the arbitrated target retransmission instruction, and sends the arbitrated target retransmission instruction to the retransmission unit.

[0216] In some embodiments, step 680 may be optionally implemented as step 682:

[0217] Step 682: The polling unit performs polling arbitration on at least two target retransmission instructions, determines a target retransmission index corresponding to the arbitrated target retransmission instruction, and sends the target retransmission index to the retransmission unit.

[0218] Optionally, after step 682 and before step 460, the method further includes step 684:

[0219] In step 684, the retransmission unit indexes the target retransmission instruction corresponding to the target retransmission index from the memory space based on the one-way linked list and the target retransmission index, and obtains the target retransmission instruction stored in the memory space; wherein, the one-way linked list stores at least one retransmission index corresponding to a retransmission instruction, the retransmission index is used to index the corresponding retransmission instruction in the memory space, and the memory space stores at least one retransmission instruction.

[0220] In some embodiments, the retransmission instruction includes multiple retransmission types, the retransmission wake-up unit includes multiple units, and each unit corresponds to the retransmission type. The acquisition unit stores a retransmission type table, and the retransmission type table includes a correspondence between the retransmission instruction and the retransmission type. Step 420 can be optionally implemented as step 422:

[0221] Step 422: The acquisition unit receives multiple retransmission instructions, searches the retransmission type table, determines the retransmission types corresponding to the multiple retransmission instructions, and sends the multiple retransmission instructions to the retransmission wake-up units that match the corresponding retransmission types.

[0222] It should be noted that the specific limitations of the embodiments of the method for processing one or more retransmission instructions provided above can be found in the above-mentioned limitations on the chip including the retransmission queue, and will not be repeated here. Each unit of the chip including the retransmission queue can be implemented in whole or in part through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor of the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software to facilitate the processor to call and execute the corresponding operations of each unit.

[0223] In some embodiments, an embodiment of the present application further provides a computer device, which includes: a chip including a retransmission queue as described above.

[0224] In some embodiments, embodiments of the present application further provide a computer device comprising: a processor and a memory, wherein the memory stores a computer program; and the processor is configured to execute the computer program in the memory to implement the methods for processing retransmission instructions provided in the above-described method embodiments. The computer device is provided with a chip including a retransmission queue as described above, and specifically, the above-described methods for processing retransmission instructions can be implemented using the chip including a retransmission queue.

[0225] 16 is a block diagram of a computer device 1000 according to an exemplary embodiment of the present application. Optionally, the computer device 1000 is a server 1000.

[0226] Typically, the server 1000 includes a processor 1001 and a memory 1002 .

[0227] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1001 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0228] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, which is used to be executed by the processor 1001 to implement the method for processing retransmission instructions provided in the method embodiment of the present application.

[0229] In some embodiments, the server 1000 may further optionally include: an input interface 1003 and an output interface 1004. The processor 1001, the memory 1002, and the input interface 1003 and the output interface 1004 may be connected via a bus or a signal line. Each peripheral device may be connected to the input interface 1003 and the output interface 1004 via a bus, a signal line, or a circuit board. The input interface 1003 and the output interface 1004 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the input interface 1003 and the output interface 1004 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, the input interface 1003, and the output interface 1004 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.

[0230] Those skilled in the art will appreciate that the structure shown in FIG. 16 does not limit the computer device 1000 , and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.

[0231] In an exemplary embodiment, the present application provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the processing method for reissuing instructions provided in the above method embodiment.

[0232] The present application provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the method for processing resending instructions provided in the above method embodiment.

[0233] The present application provides a computer program product or computer program, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, so that the processor of the computer device loads and executes the computer program to implement the method for processing resending instructions provided in the above method embodiment.

[0234] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0235] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0236] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0237] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A chip including a retransmission queue, wherein the retransmission queue includes an acquisition unit, a retransmission wake-up unit and a retransmission unit, wherein an output end of the acquisition unit is connected to an input end of the retransmission wake-up unit, and an output end of the retransmission wake-up unit is connected to an input end of the retransmission unit; The acquisition unit is used to receive at least one resend instruction and send the at least one resend instruction to the resend wake-up unit, wherein the at least one resend instruction is an instruction that is resent due to an execution exception; The retransmission wake-up unit is configured to send the target retransmission instruction to the retransmission unit when detecting that the abnormality of the target retransmission instruction in the at least one retransmission instruction is resolved; The retransmission unit is used to send the target retransmission instruction, and the target retransmission instruction is used to be re-executed after being sent.

2. The chip according to claim 1, wherein the retransmission wake-up unit is at least two retransmission wake-up units, the at least two retransmission wake-up units correspond to the retransmission types one by one, and the at least two retransmission wake-up units include a target retransmission wake-up unit, and the target retransmission wake-up unit matches the retransmission type corresponding to the at least one retransmission instruction; The target resending awakening unit is used to determine whether the abnormality of the target resending instruction is resolved when it is detected that the target resending instruction meets the resending condition.

3. The chip according to claim 2, wherein the at least one resend instruction corresponds to a data field, and a field value of the data field is used to indicate whether the at least one resend instruction satisfies a resend condition; The target retransmission wake-up unit is used to determine the data field segment corresponding to the at least one retransmission instruction based on the retransmission type corresponding to the at least one retransmission instruction; when the field segment value of the data field segment corresponding to the target retransmission instruction is a preset value, determine that the abnormality of the target retransmission instruction is resolved.

4. The chip according to claim 3, wherein the at least one resend instruction comprises a first resend instruction, the resend type of the first resend instruction comprises a first resend type, the target resend wake-up unit comprises a first resend wake-up unit corresponding to the first resend type, the first resend instruction has at least one exception source causing execution exception, and the data field corresponding to the first resend instruction comprises a ready field corresponding to at least one exception source of the first resend instruction; The first retransmission wake-up unit is used to use the first retransmission instruction as the target retransmission instruction and determine the abnormality resolution of the target retransmission instruction when the domain segment value of the ready domain segment corresponding to at least one abnormal source in the first retransmission instruction is a first preset value.

5. The chip according to claim 4, wherein the first resending wake-up unit comprises a wake-up slice, and the wake-up slice stores a preset abnormal source identifier of at least one abnormal source of the first resending instruction; The wake-up slice is used to set the domain segment value of the ready domain segment corresponding to at least one exception source in the first resend instruction to the first preset value when the exception source identifier of at least one exception source in the first resend instruction is equal to the preset exception source identifier.

6. The chip according to claim 4 or 5, wherein the first retransmission type comprises an accurate event type, the first retransmission wake-up unit comprises an accurate event type retransmission wake-up unit, and the first retransmission instruction comprises a first data loading instruction; in, The first data loading instruction is a data loading instruction that needs to obtain data from the data field of the data storage instruction, the data storage instruction is a preceding instruction of the first data loading instruction, and the address of the data loading instruction is associated with the address of the first data loading instruction, and the first data loading instruction is based on the data storage instruction. The data field of the storage instruction is invalid, resulting in an execution exception.

7. The chip according to claim 3, wherein the at least one retransmission instruction comprises a second retransmission instruction, the retransmission type of the second retransmission instruction comprises a second retransmission type, the target retransmission wake-up unit comprises a second retransmission wake-up unit corresponding to the second retransmission type, and the data field corresponding to the second retransmission instruction comprises a counter field and a ready field; The second retransmission wake-up unit is used to use the second retransmission instruction as the target retransmission instruction and determine that the exception of the target retransmission instruction is resolved when the field segment value of the counter field segment corresponding to the second retransmission instruction is a second preset value and the field segment value of the ready field segment corresponding to the second retransmission instruction is a first preset value.

8. The chip according to claim 7, wherein the second retransmission wake-up unit stores an initial value of a counter field corresponding to the second retransmission instruction; The second retransmission wake-up unit is used to reduce the field segment value of the counter field segment corresponding to the second retransmission instruction according to the clock cycle; when the field segment value of the counter field segment is reduced from the initial value to the second preset value, the field segment value of the ready field segment corresponding to the second retransmission instruction is set to the first preset value.

9. The chip according to claim 7 or 8, wherein the second retransmission type comprises a cooling time type, the second retransmission wake-up unit comprises a cooling time type retransmission wake-up unit, and the second retransmission instruction comprises a second data loading instruction; in, The second data loading instruction causes an execution exception based on a cache data miss in at least one level.

10. The chip according to claim 2, wherein the at least one retransmission instruction comprises a third retransmission instruction, the retransmission type of the third retransmission instruction comprises a third retransmission type, and the target retransmission wake-up unit comprises a third retransmission wake-up unit corresponding to the third retransmission type; The third retransmission wake-up unit is used to, when detecting that the third retransmission instruction is located at the head of the queue, use the third retransmission instruction as the target retransmission instruction and determine that the abnormality of the target retransmission instruction is resolved.

11. The chip according to claim 10, wherein the third retransmission type comprises a direct wake-up type, the third retransmission wake-up unit comprises a direct wake-up type retransmission wake-up unit, and the third retransmission instruction comprises a third data loading instruction; in, The third data loading instruction is executed abnormally due to a block conflict when accessing the data cache.

12. The chip according to any one of claims 1 to 11, wherein the at least one retransmission instruction is a plurality of retransmission instructions; the retransmission queue further comprises a search unit, the output end of the retransmission wake-up unit is connected to the input end of the search unit, and the output end of the search unit is connected to the input end of the retransmission unit; The retransmission wake-up unit is configured to send the at least two retransmission instructions to the search unit when detecting that the abnormality of at least two retransmission instructions among the multiple retransmission instructions is resolved; The searching unit is used to search for a first ready retransmission instruction from the at least two retransmission instructions, and send the first ready retransmission instruction as the target retransmission instruction to the retransmission unit.

13. According to any one of claims 1 to 11, the retransmission wake-up unit is at least two retransmission wake-up units, and the target retransmission instruction is at least two target retransmission instructions; the retransmission queue further includes a polling unit, and the output ends of the at least two retransmission wake-up units are respectively connected to the input ends of the polling unit, and the output end of the polling unit is connected to the input end of the retransmission unit; The at least two retransmission wake-up units are used to send the at least two target retransmission instructions to the polling unit; The polling unit is used to perform polling arbitration on the at least two target retransmission instructions, determine the arbitrated target retransmission instruction, and send the arbitrated target retransmission instruction to the retransmission unit.

14. The chip according to claim 13, wherein the chip further stores a one-way linked list, wherein the one-way linked list stores a retransmission index corresponding to the at least one retransmission instruction, wherein the retransmission index is used to index the corresponding retransmission instruction in a memory space, wherein the at least one retransmission instruction is stored in the memory space; The polling unit is used to perform polling arbitration on the at least two target retransmission instructions, determine the target retransmission index corresponding to the arbitrated target retransmission instruction, and send the target retransmission index to the retransmission unit; The retransmission unit is further used to index the target retransmission instruction corresponding to the target retransmission index from the memory space based on the one-way linked list and the target retransmission index, and obtain the target retransmission instruction stored in the memory space.

15. According to the chip of any one of claims 1 to 11, the retransmission instruction includes multiple retransmission types, the retransmission wake-up unit includes multiple and corresponds to the retransmission type one by one, the acquisition unit stores a retransmission type table, and the retransmission type table includes the correspondence between the retransmission instruction and the retransmission type; The acquisition unit is used to receive the multiple retransmission instructions, search the retransmission type table, determine the retransmission types corresponding to the multiple retransmission instructions, and send the multiple retransmission instructions to the retransmission wake-up unit matching the corresponding retransmission type.

16. A computer device, comprising the chip according to any one of claims 1 to 15.

17. A method for processing a resending instruction, the method being executed by a computer device, the method comprising: The acquiring unit receives at least one retransmission instruction and sends the at least one retransmission instruction to the retransmission wake-up unit; The at least one resent instruction is an instruction that is resent due to an execution exception; The retransmission wake-up unit sends the target retransmission instruction to the retransmission unit when detecting that the abnormality of the target retransmission instruction in the at least one retransmission instruction is resolved; The retransmission unit sends the target retransmission instruction; the target retransmission instruction is used to be re-executed after sending.

18. A storage medium for storing a computer program for executing the method of claim 17.

19. A computer program product comprising a computer program which, when run on a computer, causes the computer to execute the method of claim 17.

Citation Information

Patent Citations

  • DDR memory error recovery

    CN109478158A

  • Refresh management for dram

    CN115668377A

  • Breaking replay dependency loops in processor using rescheduled replay queue

    CN1478228A

  • Method and apparatus for rescheduling multiple micro-operations in a processor using a replay queue and a counter

    US6877086B1