Pipeline conflict processing method, data processing device, electronic device and medium

By setting flags in the pipeline processing unit of the CPU core and deciding the processing of requests based on the conflict status, the problem of improper request conflict handling in the pipeline is solved, and the throughput rate and processor performance of the pipeline are improved.

CN114281413BActive Publication Date: 2025-02-07HYGON INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111627929.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-02-07
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In the pipeline of the CPU core, when the target request conflicts with the previous request, the prior art is difficult to effectively handle the conflict, resulting in the request in the request queue being wrongly awakened, affecting the throughput rate of the pipeline.

Method used

By setting the first flag and the second flag in the pipeline processing unit, based on whether the conflict is released and the time coefficient of the conflict, it is decided whether to retrieve the target request from the request queue for subsequent processing.

Benefits of technology

It effectively reduces the number of times the request in the request queue is erroneously awakened, improves the throughput of the pipeline, and thus improves the performance of components such as processors or caches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114281413B_ABST
    Figure CN114281413B_ABST
Patent Text Reader

Abstract

A pipeline conflict handling method, a data processing device, an electronic device and a non-transient readable storage medium. A pipeline includes a pipeline processing unit and a request queue, and the pipeline processing unit and the request queue are communicatively connected. The pipeline conflict handling method includes: in response to a conflict between a target request in the pipeline processing unit and a previous request, the target request is placed in a request queue, and a first flag and a second flag are set for the target request; based on the first flag and the second flag, the target request is taken out of the request queue for subsequent processing, the first flag is based on whether the conflict is released, and the second flag is based on the time coefficient of the conflict. By setting the first flag and the second flag, the pipeline conflict handling method can effectively reduce the number of times that requests in the request queue are erroneously awakened, thereby effectively improving the throughput of the pipeline, and further improving the performance of components such as processors or caches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to a pipeline conflict processing method, a data processing device, an electronic device, and a non-transitory readable storage medium. Background Art

[0002] In order to improve the performance of the central processing unit (CPU) core, the CPU core can use a pipeline method, that is, the entire process of an instruction from being extracted, decoded, executed, and the result written is divided into multiple pipeline stages, and one instruction can only be in a certain pipeline stage per clock. The CPU core can have multiple instructions running in different pipeline stages. Each pipeline stage can include multiple pipeline stages, and each pipeline stage performs limited operations to further improve the performance of the CPU core. Summary of the invention

[0003] At least one embodiment of the present disclosure provides a pipeline conflict handling method, wherein the pipeline includes a pipeline processing unit and a request queue, wherein the pipeline processing unit and the request queue are communicatively connected. The method includes: in response to a conflict between a target request in the pipeline processing unit and a previous request, placing the target request in the request queue, setting a first flag and a second flag for the target request; and based on the first flag and the second flag, taking the target request out of the request queue for subsequent processing. The first flag is based on whether the conflict is released, and the second flag is based on a time coefficient of the conflict.

[0004] For example, in at least one embodiment of the present disclosure, the pipeline further includes an arbitrator, and the arbitrator is in communication with the pipeline processing unit and the request queue. Based on the first flag and the second flag, the target request is taken out from the request queue for subsequent processing, including: based on the first flag and the second flag, the target request is taken out from the request queue and sent to the arbitrator, and one or more access requests to be processed including the target request are selected by the arbitrator.

[0005] For example, the pipeline conflict handling method of at least one embodiment of the present disclosure further includes: in response to a conflict between a target request and a previous request in the pipeline processing unit, obtaining a conflict cause of the conflict; and setting a time coefficient of the conflict based on the conflict cause.

[0006] For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict includes a predicted time when the conflict ends.

[0007] For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict is set based on the conflict cause, including: obtaining the conflict end prediction time of the conflict based on the conflict cause and the conflict occurrence time.

[0008] For example, the pipeline conflict handling method of at least one embodiment of the present disclosure further includes: in response to the conflict being released, enabling the first flag; in response to the current time being greater than the time coefficient of the conflict, enabling the second flag. Based on the first flag and the second flag, taking the target request out of the request queue for subsequent processing includes: in response to the first flag and the second flag both being in an enabled state, taking the target request out of the request queue for subsequent processing.

[0009] For example, in at least one embodiment of the present disclosure, the conflict is released, including: the previous request is completely processed by the pipeline processing unit; or the previous request has not been completely processed by the pipeline processing unit, and the conflict is set to be released.

[0010] For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict is set based on the conflict cause, including setting the time coefficient of the conflict based on the conflict cause, the conflict occurrence time and the early wake-up time.

[0011] For example, in at least one embodiment of the present disclosure, the early wake-up time is set based on the conflict detection time, and the conflict detection time is predefined.

[0012] For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict is set based on the conflict cause, including setting the time coefficient of the conflict based on the conflict cause, the conflict occurrence time and the delayed wake-up time.

[0013] For example, in at least one embodiment of the present disclosure, the delayed wake-up time is determined based on statistical data of conflicts existing in the pipeline processing unit within a predetermined time period.

[0014] For example, in at least one embodiment of the present disclosure, the statistical data includes the total number of existing conflicts.

[0015] At least one embodiment of the present disclosure also provides a data processing device, including: a conflict handling device, a pipeline processing unit and a request queue, wherein the data processing device is in communication with the request queue and the pipeline processing unit. The conflict handling device includes a setting unit and a fetching unit. The setting unit is configured to, in response to a conflict between a target request in the pipeline processing unit and a previous request, place the target request in the request queue and set a first flag and a second flag for the target request. The fetching unit is configured to fetch the target request from the request queue for subsequent processing based on the first flag and the second flag, wherein the first flag is based on whether the conflict is released, and the second flag is based on a time coefficient of the conflict.

[0016] For example, in at least one embodiment of the present disclosure, the data processing device further includes an arbitrator, the arbitrator is communicatively connected with the conflict handling device, the pipeline processing unit and the request queue. The fetching unit includes a transmitting unit, the transmitting unit is configured to: based on the first flag and the second flag, fetch the target request from the request queue and send it to the arbitrator. The arbitrator is configured to select one or more access requests to be processed including the target request.

[0017] For example, at least one embodiment of the present disclosure further provides a data processing device, including a processor and a memory. The memory includes one or more computer program modules. The one or more computer program modules are stored in the memory and configured to be executed by the processor to execute instructions of the pipeline conflict handling method described in any of the above embodiments.

[0018] For example, at least one embodiment of the present disclosure further provides an electronic device, comprising the data processing device and a pipeline as described in any of the above embodiments. The pipeline is communicatively connected to the data processing device.

[0019] For example, at least one embodiment of the present disclosure further provides a non-transitory readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the pipeline conflict handling method described in any of the above embodiments is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.

[0021] Figure 1 A schematic diagram of a microprocessor architecture provided for at least one embodiment of the present disclosure;

[0022] Figure 2 An operation schematic diagram of a pipeline provided for at least one embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of a request being woken up by mistake in a request queue provided by at least one embodiment of the present disclosure;

[0024] Figure 4 A flowchart of a pipeline conflict handling method provided for at least one embodiment of the present disclosure;

[0025] Figure 5 A schematic diagram of the structure of a pipeline provided for at least one embodiment of the present disclosure;

[0026] Figure 6 A flowchart of another pipeline conflict handling method provided for at least one embodiment of the present disclosure;

[0027] Figure 7 An operation diagram of a pipeline conflict handling method provided for at least one embodiment of the present disclosure;

[0028] Figure 8 A schematic diagram of a wake-up request method provided for at least one embodiment of the present disclosure;

[0029] Fig. 9 A schematic diagram of another wake-up request method provided for at least one embodiment of the present disclosure;

[0030] Fig.10 A structural schematic diagram of a data processing device provided for at least one embodiment of the present disclosure;

[0031] Fig.11 A schematic diagram of the structure of another data processing device provided for at least one embodiment of the present disclosure;

[0032] Fig.12 A schematic block diagram of another data processing device provided for at least one embodiment of the present disclosure;

[0033] Fig.13 A schematic block diagram of another data processing device provided for at least one embodiment of the present disclosure;

[0034] Fig.14 A schematic block diagram of an electronic device provided for at least one embodiment of the present disclosure; and

[0035] Fig.15 A schematic diagram of a non-transitory readable storage medium provided for at least one embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0037] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantity restrictions, but indicate that there is at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0038] Figure 1 A schematic diagram of a microprocessor architecture provided for at least one embodiment of the present disclosure.

[0039] like Figure 1 As shown, in at least one embodiment of the present disclosure, an exemplary microprocessor architecture includes a five-stage pipeline, wherein each instruction can be issued at each clock cycle and executed within a fixed time, such as 5 clock cycles. The execution of each instruction is divided into 5 steps: instruction fetch (IF) stage 1001, read register (RD) stage 1002, arithmetic / logic unit (ALU) stage 1003, storage (MEM) stage 1004 and write back (WB) stage 1005. In the IF stage 1001, a specified instruction is taken from the instruction cache. A portion of the fetched instruction is used to specify a source register that can be used to execute the instruction. In the RD stage 1002, the system takes out the content of the specified source register. The obtained value can be used to perform arithmetic or logic operations in the ALU stage 1003. In the MEM stage 1004, the execution instruction can read / write the memory in the data cache. Finally, in the WB stage 1005, the value obtained by executing the instruction can be written back to a register.

[0040] Usually, the processor processes data very quickly, but it takes a long time to read data from the main memory, so current high-performance processors generally use multi-level caches to cache data. Caches can also be read, written, and updated continuously using a pipeline. However, when performing continuous operations, related structures may be operated simultaneously, so conflict detection is required. For example, when two consecutive instructions operate on a cache line with the same index, because there is a conflict, the operation of the second instruction needs to be stopped, re-arbitrated, and then enter the pipeline.

[0041] It should be noted that, in the embodiments of the present disclosure, the conflict in the pipeline may refer to the existence of certain reasons that make the next instruction in the pipeline unable to be executed in the specified clock cycle. For example, the conflict in the pipeline can be divided into three categories: structural conflict, data conflict, and control conflict. For example, structural conflict is usually caused when different instructions compete for the same functional component during overlapping execution of instructions, resulting in resource conflicts. For example, data conflict is usually caused when instructions are overlapped in the pipeline and subsequent instructions need to use the results generated by the previous instructions. For example, control conflict is usually caused when the pipeline encounters a transfer instruction. For another example, the basic method to resolve the above-mentioned pipeline conflicts is to suspend the execution of some instructions.

[0042] Figure 2 An operation diagram of a pipeline provided for at least one embodiment of the present disclosure.

[0043] For example, in at least one embodiment of the present disclosure, Figure 2 As shown, a pipeline 20 includes a request queue 210, an arbitrator 220 and a pipeline processing unit 230. For example, a request from an upper-layer cache or processor is cached in the request queue 210. If the request in the request queue 210 meets a preset condition (for example, sufficient resources, etc.), it can enter the arbitrator 220. The arbitrator 220 has arbitration selection logic, that is, it selects requests according to certain rules. After the request is selected, the request is placed in the pipeline processing unit 230.

[0044] It should be noted that, in the embodiment of the present disclosure, there is no restriction on the preset conditions required for the above-mentioned request to be sent from the request queue 210 to the arbiter 220, and it can be set according to actual needs. It should also be noted that, in the embodiment of the present disclosure, there is no restriction on the arbitration selection logic of the arbiter 220. For example, in one example, the arbitration selection logic can be set so that the request that first enters the arbiter is taken out first. Of course, it can also be other selection logics, which can be set according to actual needs.

[0045] Because the requests in the pipeline processing unit 230 may be continuous, there may be a situation where continuous requests access the same structure, such as a structure with the same index. If the structure cannot process the requests continuously, there will be a conflict in the pipeline processing unit 230.

[0046] For example, in one example, Figure 2 As shown, in the third cycle (i.e., cycle 2) of the pipeline processing unit 203, conflict detection is performed. If a conflict occurs in the pipeline processing unit 230, the cause of the conflict is recorded, and the corresponding request is put back into the request queue 210. After the conflict is released, the put-back request is reselected by the arbiter 220 and enters the pipeline processing unit 230. However, in practice, there may be a situation where the request is woken up by mistake.

[0047] Figure 3 The present invention is a schematic diagram of a request being woken up by mistake in at least one embodiment of the present disclosure.

[0048] For example, Figure 3 As shown, in at least one embodiment of the present disclosure, the pipeline processing unit 30 includes request 1, request 2, request 3 and request 4 which are arranged in sequence. Figure 3 In the example shown, request 4 indicates the request that first enters the pipeline processing unit 30 in chronological order, followed by request 3 and request 2, and request 1 is the request that last enters the pipeline processing unit 30 in chronological order. It should be noted that the pipeline processing unit 30 may include more or fewer requests, and the embodiments of the present disclosure are not limited to this.

[0049] For example, if a certain structural conflict is detected between request 4 and request 3 (for example, occupying the same resource), such as the structural conflict reason is 0, then request 3 is put back into the request queue, and the conflict reason is recorded as CheckDetection0. If a conflict of the same reason is detected between request 2 and request 1, then request 1 is put back into the request queue, and the conflict reason is recorded as CheckDetection0.

[0050] It should be noted that in at least one embodiment of the present disclosure, the conflict causes of the structural conflict class may include address lookup conflicts, replacement strategy update conflicts, request address and replacement address conflicts, etc. The embodiments of the present disclosure do not limit the conflict causes and can be set according to actual conditions.

[0051] For example, at the end of request 4, the corresponding conflict cause will be released, that is,

[0052] CheckDetection0, in this case, both request 1 and request 3 that were previously put back into the request queue will be awakened. If request 1 reenters the pipeline processing unit 30, it may still conflict with request 2. Therefore, the awakening of request 1 is an incorrect awakening.

[0053] In view of the problems faced by the above pipeline, at least one embodiment of the present disclosure provides a pipeline conflict handling method. The pipeline includes a pipeline processing unit and a request queue, and the pipeline processing unit and the request queue are communicatively connected. The pipeline conflict handling method includes: in response to a conflict between a target request in the pipeline processing unit and a previous request, the target request is placed in the request queue, and a first flag and a second flag are set for the target request; based on the first flag and the second flag, the target request is taken out of the request queue for subsequent processing. The first flag is based on whether the conflict is released, and the second flag is based on the time coefficient of the conflict.

[0054] Accordingly, at least one embodiment of the present disclosure further provides a data processing device, an electronic device, and a non-transitory readable storage medium corresponding to the above-mentioned pipeline conflict handling method.

[0055] The pipeline conflict handling method provided by at least one embodiment of the present disclosure can effectively reduce the number of times that requests in the request queue are erroneously awakened by setting a first flag and a second flag, thereby effectively improving the throughput of the pipeline and further improving the performance of components such as a processor or a cache.

[0056] It should be noted that the pipeline conflict handling method provided by at least one embodiment of the present disclosure can be applied not only to pipelines in processors and pipelines in caches, but also to pipelines of other types or other structures, and the embodiments of the present disclosure do not impose specific limitations on this.

[0057] The following is a non-restrictive description of the pipeline conflict handling method provided according to at least one embodiment of the present disclosure through several examples or embodiments. As described below, different features in these specific examples or embodiments can be combined with each other without conflicting with each other to obtain new examples or embodiments, and these new examples or embodiments also fall within the scope of protection of the present disclosure.

[0058] Figure 4 A flowchart of a pipeline conflict handling method provided for at least one embodiment of the present disclosure, and Figure 5 A schematic diagram of the structure of a pipeline provided for at least one embodiment of the present disclosure.

[0059] For example, at least one embodiment of the present disclosure provides a pipeline conflict handling method 40, such as Figure 4For example, the pipeline conflict handling method 40 can be applied to various types of pipelines. For example, in at least one embodiment of the present disclosure, the pipeline conflict handling method 40 can be applied to Figure 5 The pipeline 50 shown. For example, Figure 5 As shown, the pipeline 50 includes a request queue 510 and a pipeline processing unit 520, and the request queue 510 and the pipeline processing unit 520 are connected in communication. It should be noted that, Figure 5 The pipeline structure shown is only exemplary. In the embodiments of the present disclosure, the pipeline structure may also include more or fewer components. The embodiments of the present disclosure do not specifically limit this and may be set according to actual needs. For example, in at least one embodiment of the present disclosure, the pipeline conflict handling method 40 may also be applied to Figure 2 The pipeline 20 is shown.

[0060] For example, in at least one embodiment of the present disclosure, the pipeline conflict handling method 40 may include the following operations S401-S402:

[0061] Step S401: In response to a conflict between a target request and a previous request in a pipeline processing unit, the target request is placed in a request queue, and a first flag and a second flag are set for the target request.

[0062] Step S402: Based on a first flag and a second flag, taking the target request out of the request queue for subsequent processing, the first flag is based on whether the conflict is released, and the second flag is based on the time coefficient of the conflict.

[0063] The pipeline conflict handling method 40 provided by at least one embodiment of the present disclosure can effectively reduce the number of times that requests in the request queue are erroneously awakened by setting the first flag and the second flag, thereby effectively improving the throughput of the pipeline and further improving the performance of components such as the processor or cache.

[0064] It should be noted that in at least one embodiment of the present disclosure, steps S401-S402 can be executed sequentially, in parallel, or in other adjusted orders. The embodiments of the present disclosure do not limit the execution order of the steps and can be adjusted according to actual conditions.

[0065] It should also be noted that, in at least one embodiment of the present disclosure, the pipeline conflict handling method 40 may selectively execute some of the steps in step S401-step S402, or may execute some additional steps in addition to step S401-step S402, and the embodiments of the present disclosure are not limited to this.

[0066] For example, in at least one embodiment of the present disclosure, for step S401, when it is detected that a target request in the pipeline processing unit conflicts with a previous request, the target request is placed in a request queue, and a first flag and a second flag are set for the target request. For example, in at least one embodiment of the present disclosure, the target request may be any request in the pipeline processing unit, and the previous request may refer to a request that the pipeline processing unit will process earlier than the target request. For example, in one example, Figure 5 As shown, the pipeline processing unit 520 includes request 0, request 1, request 2, request 3, etc. arranged in sequence. For example, in at least one embodiment of the present disclosure, Figure 5 As shown, assuming that there is a conflict between request 1 and request 2 in the pipeline processing unit 520, when a conflict is detected between request 1 and request 2, since the pipeline processing unit 520 prioritizes the earlier request (ie, request 2), request 1 is placed in the request queue 510.

[0067] For example, in at least one embodiment of the present disclosure, a wakeup flag and a time flag are set for request 1 placed in request queue 510. For example, the wakeup flag is based on whether the detected conflict is released or resolved, and the time flag is based on the time coefficient of the detected conflict.

[0068] It should be noted that, in the embodiments of the present disclosure, the wake-up flag may be a specific implementation of the first flag mentioned in the embodiments of the present disclosure, and the time flag may be a specific implementation of the second flag mentioned in the embodiments of the present disclosure. For example, in at least one embodiment of the present disclosure, when the corresponding conflict is released or resolved, the wake-up flag is enabled, that is, the wake-up flag is in an enabled state or a valid state. For example, in at least one embodiment of the present disclosure, when the current time is greater than the time coefficient of the conflict, the time flag is enabled, that is, the time flag is in an enabled state or a valid state. It should be noted that the first flag and the second flag may also include other parameters, which are not limited in the embodiments of the present disclosure and can be set according to actual needs.

[0069] For example, in at least one embodiment of the present disclosure, the wake-up flag and the time flag can be set to "1" in an enabled state / valid state, and set to "0" in a disabled state / invalid state, and of course, the opposite can also be set. It should also be noted that the embodiments of the present disclosure do not limit the number of digits of the wake-up flag and the time flag, which can be one digit or more digits, and are set according to actual needs.

[0070] For example, in at least one embodiment of the present disclosure, Figure 2As shown, the pipeline 20 includes a request queue 210, an arbiter 220 and a pipeline processing unit 230, and the arbiter 220 is in communication with the pipeline processing unit 230 and the request queue 210. For example, for the above step S402, based on the first flag and the second flag, the target request is taken out from the request queue for subsequent processing, including: based on the first flag and the second flag, the target request is taken out from the request queue and sent to the arbiter, and the arbiter selects one or more access requests to be processed including the target request.

[0071] Figure 6 A flowchart of another pipeline conflict handling method provided for at least one embodiment of the present disclosure.

[0072] For example, in at least one embodiment of the present disclosure, Figure 6 As shown, the pipeline conflict handling method 40 may further include steps S403 and S404 in addition to the above steps S401 and S402. Figure 6 shown.

[0073] Step S403: In response to a conflict between a target request and a previous request in a pipeline processing unit, a conflict cause of the conflict is obtained.

[0074] Step S404: Based on the cause of the conflict, a time coefficient of the conflict is set.

[0075] For example, in at least one embodiment of the present disclosure, for step 403, in response to a conflict between the target request and the previous request, the conflict cause of the conflict is obtained, and the conflict cause is recorded. For example, in an embodiment of the present disclosure, different conflict causes may correspond to different structural conflicts. For example, in at least one embodiment of the present disclosure, when the conflict cause is an address lookup conflict, the conflict cause is recorded as CheckDection0, when the conflict cause is a replacement policy update conflict, the conflict cause is recorded as CheckDection1, and when the conflict cause is a request address and a replacement address conflict, the conflict cause is recorded as CheckDection2. The embodiments of the present disclosure are not limited to this and can be set according to actual conditions.

[0076] For example, in at least one embodiment of the present disclosure, for step 404, a time coefficient of the conflict is set based on the recorded conflict cause. For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict may be a predicted time when the conflict ends. It should be noted that the time coefficient of the conflict may also be other parameters related to the conflict, which is not limited in the embodiments of the present disclosure and may be set according to actual needs.

[0077] For example, in at least one embodiment of the present disclosure, for step S404, the time coefficient of the conflict is set based on the cause of the conflict, including: obtaining the predicted conflict end time of the conflict based on the cause of the conflict and the time when the conflict occurred.

[0078] For example, in at least one embodiment of the present disclosure, the conflict occurrence time refers to the time when the target request is detected to conflict with the previous request, and the conflict end prediction time refers to the time when the detected conflict is predicted to be released. It should be noted that the time for performing conflict detection in the pipeline processing unit is predefined, and the embodiments of the present disclosure do not limit this, and can be set according to actual needs.

[0079] For example, in at least one embodiment of the present disclosure, it is assumed that the cause of the conflict between the target request and the prior request is an address lookup conflict, i.e., CheckDection0. For example, based on experience or design requirements, the conflict caused by this conflict cause requires 3 clock cycles to be released. Then, the conflict end prediction time of the corresponding conflict can be calculated as the conflict occurrence time plus 3 clock cycles.

[0080] For example, in at least one embodiment of the present disclosure, when request 1 is processed by the pipeline processing unit in the first clock cycle, it is detected that request 1 and request 2 have a conflict caused by some conflict reason (such as CheckDection0), and the conflict reason corresponds to 2 cycles to be released, then the conflict end prediction time of the conflict is the third clock cycle.

[0081] It should be noted that when setting the conflict end prediction time of a conflict, if the target request has conflicts caused by multiple different conflict reasons, for example, the target request conflicts with multiple prior requests, and the conflict end prediction times of each conflict are different, then only the longest conflict end prediction time needs to be recorded. This ensures that when the conflict corresponding to the longest conflict end prediction time is released, other conflicts of the target request have been released.

[0082] It should also be noted that, in the embodiments of the present disclosure, when referring to detecting a conflict in the Nth clock cycle, or releasing a conflict in the Nth clock cycle, etc., it may refer to detecting a conflict or releasing a conflict at the rising edge of the Nth clock cycle after the corresponding request enters the pipeline processing unit, or it may refer to detecting a conflict or releasing a conflict at the falling edge of the Nth clock cycle after the corresponding request enters the pipeline processing unit. The embodiments of the present disclosure do not impose any restrictions on this and can be set according to actual needs.

[0083] For example, in at least one embodiment of the present disclosure, the pipeline conflict handling method 40 may further include steps S405-S406 in addition to the above steps S401-S404.

[0084] Step S405: In response to the conflict being released, enabling the first flag.

[0085] Step S406: In response to the current time being greater than the time coefficient of the conflict, enabling the second flag.

[0086] For example, in at least one embodiment of the present disclosure, in response to the detected conflict being released, the wake-up flag is enabled. For example, in at least one embodiment of the present disclosure, the conflict being released may include the situation where the previous request has ended, that is, it has been processed by the pipeline processing unit. For example, in an embodiment of the present disclosure, the previous request being processed means that the previous request no longer occupies the resources that caused the conflict, and the resources can process new requests. For example, in at least one embodiment of the present disclosure, in response to the current time being greater than the time coefficient of the conflict, for example, the current time is greater than the conflict end prediction time of the conflict, the time flag is enabled.

[0087] For example, in at least one embodiment of the present disclosure, in response to the wake-up flag and the time flag both being in an enabled state or a valid state, the target request is taken out of the request queue for subsequent processing.

[0088] For example, in at least one embodiment of the present disclosure, Figure 3 In the pipeline processing unit 30 shown, there is a certain structural conflict between request 4 and request 3 (for example, a conflict caused by the conflict reason CheckDection0), and there is the same kind of conflict between request 1 and request 2 (also caused by the conflict reason CheckDection0). When a conflict is detected between request 1 and request 2, the conflict end prediction time of the conflict can be calculated. For example, it is predicted that request 2 will end in the 6th clock cycle, and request 1 can be awakened. Then suppose that in the 4th clock cycle, request 4 ends, the conflict corresponding to CheckDection0 is released, and request 1 and request 3 are awakened. The wake-up flag of request 1 is enabled, but the current time (the 4th clock cycle) is not greater than the conflict end prediction time (the 6th clock cycle), and the time mark is not in the enabled state, so request 1 will not be taken out from the request queue. Only when the 6th clock cycle arrives and the time mark is also enabled, can request 1 be taken out from the request queue, which effectively avoids request 1 from being awakened by mistake.

[0089] Therefore, the pipeline conflict handling method 40 provided by at least one embodiment of the present disclosure can effectively reduce the number of times that requests in the request queue are woken up by mistake, thereby improving the throughput of the pipeline.

[0090] Figure 7 An operational schematic diagram of a pipeline conflict handling method provided for at least one embodiment of the present disclosure.

[0091] For example, in at least one embodiment of the present disclosure, Figure 7 As shown, the request to be processed is waiting in the request queue. If the request to be processed does not conflict with the previous request, it can directly enter the arbitrator, and enter the pipeline processing unit for subsequent processing after being selected by the arbitrator. For example, if the request waiting in the request queue conflicts with the previous request, it is necessary to wait until both the wake-up flag and the time flag are enabled, that is, the corresponding conflict is released and the current time is greater than the corresponding conflict end prediction time, before entering the arbitrator, and entering the pipeline processing unit for subsequent processing after being selected by the arbitrator. For example, if a request is detected to conflict with the previous request after entering the pipeline processing unit, the request is put back in the request queue to wait for wake-up, and the conflict cause causing the conflict and the conflict end prediction time corresponding to the conflict are recorded. Figure 7 The operation schematic diagram of the pipeline conflict handling method shown corresponds to the pipeline conflict handling method 40 provided in the embodiment of the present disclosure, and will not be repeated here.

[0092] Figure 8 A schematic diagram of a wake-up request method provided by at least one embodiment of the present disclosure, Fig. 9 A schematic diagram of another wake-up request method provided for at least one embodiment of the present disclosure.

[0093] For example, in at least one embodiment of the present disclosure, a wake-up request method is provided, such as Figure 8 shown.

[0094] For example, in at least one embodiment of the present disclosure, the conflict being released may mean that the previous request that conflicts with the target request has been processed by the pipeline processing unit. Figure 8 As shown, in one example, request 0 conflicts with request 1. When request 0 is processed in the pipeline processing unit, that is, after cycle 7 of request 0 ends, request 1 can be awakened, that is, the wake-up flag of request 1 is enabled. Figure 8 In the example shown, the fastest time for request 1 to enter the pipeline processing unit is after cycle 7 of request 0. After request 1 enters the pipeline processing unit, conflict detection is performed after two clock cycles, that is, in cycle 2 (the third clock cycle) of request 1, and the detection result is that there is no conflict.

[0095] For example, in at least one embodiment of the present disclosure, the conflict being released may mean that the previous request that conflicts with the target request has not been processed by the pipeline processing unit, and the conflict is set to be released. Fig. 9As shown, in one example, it is assumed that request 1 performs conflict detection at fixed clock cycle 2 (the third clock cycle) when request 1 enters the pipeline processing unit, and request 0 occupies the same resource as request 1 from clock cycle 3 to clock cycle 7 of request 0. Figure 8 In the wake-up scheme shown, at cycle 7 of request 0, request 0 releases resources and sends a wake-up signal to request 1. After two clock cycles, request 1 performs conflict detection to calculate whether there is a conflict. The time from request 0 releasing resources to request 1 calculating whether there is a conflict is two clock cycles. Therefore, request 1 can be awakened in advance and the wake-up flag of request 1 can be enabled in advance. Fig. 9 As shown, the time for early waking up request 1 is the time from request 1 entering the pipeline processing unit after being arbitrated to the time when conflict detection is performed.

[0096] For example, in at least one embodiment of the present disclosure, request 1 enters the pipeline processing unit at cycle 0 of request 1, and conflict detection is performed at cycle 2 of request 1, with a time interval of 2 clock cycles. For request 0, request 0 releases resources at cycle 7, 7-2=5, so request 0 can send a wake-up signal to request 1 in advance at cycle 5, "artificially" releasing the conflict in advance. It should be noted that the time for releasing the conflict in advance is related to the cycle in which the conflict detection is performed, and has nothing to do with the cause of the conflict.

[0097] For example, in Fig. 9 In the example shown, the fastest time for request 1 to enter the pipeline processing unit is after cycle 5 of request 0 ends. After request 1 enters the pipeline processing unit, conflict detection is performed after two clock cycles, that is, in cycle 2 (the third clock cycle) of request 1. At this time, request 0 has ended, and the detection result is that there is no conflict.

[0098] It should be noted that, in conjunction with the pipeline conflict handling method 40 provided in at least one embodiment of the present disclosure, the factors that determine whether the target request can be taken out of the request queue include not only the wake-up flag but also the time flag. Fig. 9 In the early wake-up scheme shown, the time coefficient of the conflict needs to be adjusted based on the above-mentioned conflict end prediction time to achieve early wake-up of the target request.

[0099] For example, in at least one embodiment of the present disclosure, for step S404, setting the time coefficient of the conflict based on the conflict cause may include setting the time coefficient of the conflict based on the conflict cause, the conflict occurrence time, and the early wake-up time. For example, in one example, after obtaining the conflict end prediction time of the conflict through the conflict cause and the conflict occurrence time as described above, the early wake-up time is subtracted from the conflict end prediction time to calculate the time coefficient.

[0100] For example, in at least one embodiment of the present disclosure, the early wake-up time is set based on the conflict detection time, and the conflict detection time is predefined. For example, in one example, the conflict detection time is the second clock cycle after the target request enters the pipeline processing unit. It should be noted that the embodiments of the present disclosure do not limit the conflict detection time and can be set according to actual needs.

[0101] For example, in one example, the conflict end prediction time calculated by the method described above is the 6th clock cycle, and the conflict detection time is set to the 2nd clock cycle. Then, in the early wake-up scheme, the final time coefficient is the 4th clock cycle. That is, only when the current time is greater than the 4th clock cycle, the corresponding time flag will be enabled.

[0102] Therefore, through the pipeline processing method 40 provided by at least one embodiment of the present disclosure, conflicting requests can be awakened in advance, further increasing the throughput of the pipeline.

[0103] For example, in at least one embodiment of the present disclosure, for step S404, setting the time coefficient of the conflict based on the conflict cause may include setting the time coefficient of the conflict based on the conflict cause, the conflict occurrence time, and the delayed wake-up time. For example, in one example, after obtaining the conflict end prediction time of the conflict through the conflict cause and the conflict occurrence time as described above, the delayed wake-up time is added to the conflict end prediction time to calculate the time coefficient.

[0104] For example, in at least one embodiment of the present disclosure, the delayed wake-up time is determined based on statistical data of conflicts existing in the pipeline processing unit within a predetermined time period. It should be noted that the predetermined time period can be set according to actual needs, and the embodiments of the present disclosure are not limited to this.

[0105] For example, in at least one embodiment of the present disclosure, the statistical data of conflicts existing in the pipeline processing unit within a predetermined time period may include the total number of conflicts existing in the pipeline processing unit within the predetermined time period. It should be noted that the statistical data of conflicts may also include other parameters related to conflicts, which are not limited in the embodiments of the present disclosure and may be set according to actual needs.

[0106] For example, in at least one embodiment of the present disclosure, when the total number of conflicts detected is greater than a certain threshold, a delayed wake-up time can be set. For example, in one example, when 5 conflicts are detected in the pipeline processing unit within a predetermined time period (for example, within 1 minute), the delayed wake-up time can be set to 2 clock cycles. For example, in one example, the predicted end time of the conflict calculated by the method described above is the 3rd clock cycle. When the delayed wake-up time is set to 2 clock cycles, the final time coefficient is the 5th clock cycle. That is, only when the current time is greater than the 5th clock cycle will the corresponding time flag be enabled. For example, by setting the delayed wake-up time, the time coefficient can be adjusted according to the actual situation of the pipeline, thereby providing the stability of the pipeline.

[0107] Therefore, the pipeline conflict handling method provided by at least one embodiment of the present disclosure can effectively reduce the number of times a request is woken up by mistake by setting a wake-up flag and a time flag. In addition, by adding an early wake-up mechanism, a wake-up signal is sent in advance when the previous request has not been processed, thereby effectively increasing the throughput of the pipeline.

[0108] Fig.10 A schematic diagram of the structure of a data processing device provided by at least one embodiment of the present disclosure is provided. Fig.11 A schematic diagram of the structure of another data processing device provided for at least one embodiment of the present disclosure.

[0109] For example, at least one embodiment of the present disclosure provides a data processing device 10, such as Fig.10 The data processing device 10 includes a conflict handling device 110, a pipeline processing unit 120 and a request queue 130, and the conflict handling device 110, the pipeline processing unit 120 and the request queue 130 are connected to each other in communication. For example, the conflict handling device 110 includes a setting unit and a fetching unit.

[0110] For example, the setting unit is configured to, in response to a conflict between a target request in the pipeline processing unit and a previous request, place the target request in the request queue and set a first flag and a second flag for the target request. For example, the setting unit may implement step S401, and its specific implementation method may refer to the relevant description of step S401, which will not be repeated here.

[0111] For example, the fetching unit is configured to fetch the target request from the request queue for subsequent processing based on the first flag and the second flag. The first flag is based on whether the conflict is released, and the second flag is based on the time coefficient of the conflict. For example, the fetching unit can implement step S402, and its specific implementation method can refer to the relevant description of step S402, which will not be repeated here.

[0112] For example, the specific operations that the setting unit and the fetching unit are configured to perform can refer to the relevant description of the pipeline conflict handling method 40 provided in at least one embodiment of the present disclosure above, and will not be repeated here.

[0113] It should be noted that the setting unit and the taking-out unit may be implemented by software, hardware, firmware or any combination thereof. For example, the setting unit and the taking-out unit may be implemented as a setting circuit and a taking-out circuit respectively, and the embodiments of the present disclosure do not limit their specific implementations.

[0114] For example, in at least one embodiment of the present disclosure, the data processing device includes an arbitrator in addition to the conflict handling device, the pipeline processing unit, and the request queue. The arbitrator is connected to the conflict handling device, the pipeline processing unit, and the request queue for communication. For example, in one example, Fig.11 As shown, the data processing device 11 includes a conflict handling device ( Fig.11 ), a pipeline processing unit 1103, a request queue 1101 and an arbiter 1102, the fetching unit in the conflict handling device further includes a transmitting unit, the transmitting unit being configured to: based on the first flag and the second flag, fetch the target request from the request queue and send it to the arbiter. The arbiter 1102 is configured to select one or more access requests to be processed including the target request.

[0115] It should be noted that Fig.10 and Fig.11 The data processing device 10 / 11 shown is merely exemplary, and the data processing device may also include more or fewer components, which is not limited in the embodiments of the present disclosure.

[0116] For example, in at least one embodiment of the present disclosure, the conflict handling device further includes a cause acquisition unit and a time calculation unit. For example, in one example, the time calculation unit may be Fig.11 The time calculation unit 1104 is shown in FIG. For example, the cause acquisition unit is configured to obtain the conflict cause of the conflict in response to the conflict between the target request and the previous request in the pipeline processing unit. For example, the time calculation unit is configured to set the time coefficient of the conflict based on the conflict cause. For example, the cause acquisition unit can implement step S403, and its specific implementation method can refer to the relevant description of step S403, which will not be repeated here. For example, the time calculation unit can implement step S404, and its specific implementation method can refer to the relevant description of step S404, which will not be repeated here.

[0117] For example, in at least one embodiment of the present disclosure, the time coefficient of the conflict includes the predicted time when the conflict ends.

[0118] For example, in at least one embodiment of the present disclosure, the time calculation unit may include an end time unit, which is configured to obtain a conflict end prediction time of the conflict based on the conflict cause and the conflict occurrence time.

[0119] For example, in at least one embodiment of the present disclosure, the time calculation unit may include an advance time unit, which is configured to set a time coefficient of the conflict based on the conflict cause, the conflict occurrence time, and the advance wake-up time. For example, in at least one embodiment of the present disclosure, the advance wake-up time is set based on the conflict detection time, and the conflict detection time is predefined.

[0120] For example, in at least one embodiment of the present disclosure, the time calculation unit may include a delay time unit, which is configured to include a time coefficient for setting the conflict based on the cause of the conflict, the time when the conflict occurs, and the delayed wake-up time. For example, in at least one embodiment of the present disclosure, the delayed wake-up time is determined based on statistical data of conflicts existing in the pipeline processing unit within a predetermined time period. For example, in one example, the conflict processing device may include a conflict statistics unit, which is configured to obtain statistical data based on conflicts existing in the pipeline processing unit within a predetermined time period. For example, in one example, the conflict statistics unit may be implemented as Fig.11 The conflict statistics unit 1105 in FIG. 1104. For example, in at least one embodiment of the present disclosure, the statistical data includes the total number of existing conflicts.

[0121] For example, in at least one embodiment of the present disclosure, Fig.11 In the data processing device 11 shown, the conflict statistics unit 1105 is in communication with the time calculation unit 1104, and the time calculation unit 1104 can calculate the time coefficient based on the statistical data of the conflict statistics unit 1105. For example, in one example, the conflict cause and time coefficient corresponding to the request can be stored in the request queue 1101.

[0122] For example, in at least one embodiment of the present disclosure, the conflict handling device may further include a wake-up enabling unit and a time enabling unit. For example, the wake-up enabling unit is configured to enable a first flag in response to the conflict being released. For example, the time enabling unit is configured to enable a second flag in response to the current time being greater than the time coefficient of the conflict. For example, the fetching unit includes a fetching subunit, which is configured to: in response to the first flag and the second flag being both in an enabled state, fetch the target request from the request queue for subsequent processing.

[0123] For example, in at least one embodiment of the present disclosure, the conflict being released includes: the previous request is completely processed by the pipeline processing unit; or the previous request has not been completely processed by the pipeline processing unit, and the conflict is set to be released.

[0124] For example, in an embodiment of the present disclosure, the specific operations that the above-mentioned transmission unit, cause acquisition unit, time calculation unit, end time unit, advance time unit, delay time unit, conflict statistics unit, wake-up enable unit, time enable unit, and fetching sub-unit are configured to perform can all be referred to the relevant description of the pipeline conflict handling method 40 provided in at least one embodiment of the present disclosure above, and will not be repeated here.

[0125] It should be noted that the above-mentioned transmission unit, cause acquisition unit, time calculation unit, end time unit, advance time unit, delay time unit, conflict statistics unit, wake-up enable unit, time enable unit, and extraction sub-unit can be implemented by software, hardware, firmware or any combination thereof. For example, the above-mentioned transmission unit, cause acquisition unit, time calculation unit, end time unit, advance time unit, delay time unit, conflict statistics unit, wake-up enable unit, time enable unit, and extraction sub-unit can be respectively implemented as a transmission circuit, a cause acquisition circuit, a time calculation circuit, an end time circuit, an advance time circuit, a delay time circuit, a conflict statistics circuit, a wake-up enable circuit, a time enable circuit, and an extraction sub-circuit. The embodiments of the present disclosure do not limit their specific implementation methods.

[0126] It should be understood that the data processing device 10 / 11 provided by at least one embodiment of the present disclosure can implement the aforementioned pipeline conflict handling method 40, and can also achieve technical effects similar to the aforementioned pipeline conflict handling method 40, which will not be elaborated herein.

[0127] It should be noted that in the embodiments of the present disclosure, the data processing device 10 / 11 may include more or fewer circuits or units, and the connection relationship between the various circuits or units is not limited and can be determined according to actual needs. The specific configuration of each circuit is not limited and can be composed of analog devices according to circuit principles, or can be composed of digital chips, or can be composed in other applicable ways.

[0128] Fig.12 It is a schematic block diagram of a data processing device provided by at least one embodiment of the present disclosure.

[0129] For example, in at least one embodiment of the present disclosure, Fig.12As shown, the data processing device 12 includes a processor 1210 and a memory 1220. The memory 1220 includes one or more computer program modules 1201. The one or more computer program modules 1201 are stored in the memory 1220 and are configured to be executed by the processor 1210. The one or more computer program modules 1201 include instructions for executing the pipeline conflict processing method 40 provided by at least one embodiment of the present disclosure. When the one or more computer program modules 1201 are executed by the processor 1210, one or more steps in the pipeline conflict processing method 40 provided by at least one embodiment of the present disclosure can be executed. The memory 1220 and the processor 1210 can be interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0130] For example, the processor 1210 may be a central processing unit (CPU), a digital signal processor (DSP), or other forms of processing units with data processing capabilities and / or program execution capabilities, such as a field programmable gate array (FPGA), etc.; for example, the central processing unit (CPU) may be an X86 or ARM architecture, etc. The processor 1210 may be a general-purpose processor or a dedicated processor, and may control other components in the data processing device 12 to perform desired functions.

[0131] For example, the memory 1220 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache, etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules 1201 may be stored on the computer-readable storage medium, and the processor 1210 may run one or more computer program modules 1201 to implement various functions of the data processing device 12. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium. The data processing device 12 may be, for example, a system on chip (SOC) or a computer, television, display, etc. including the SOC. The specific functions and technical effects of the data processing device 12 may refer to the description of the pipeline conflict handling method 40 above, which will not be repeated here.

[0132] Fig.13A schematic block diagram of another data processing device 300 provided for at least one embodiment of the present disclosure. The terminal device in the embodiments of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.13 The data processing device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0133] For example, Fig.13 As shown, in some examples, the data processing device 300 includes a processing device (e.g., a central processing unit, a graphics processor, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the computer system are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0134] For example, the following components may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309 including a network interface card such as a LAN card, a modem, etc. The communication device 309 may allow the data processing device 300 to communicate with other devices wirelessly or by wire to exchange data, performing communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. Removable media 311, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 310 as needed, so that the computer program read therefrom is installed into the storage device 308 as needed. Although Fig.13 The data processing device 300 including various devices is shown, but it should be understood that it is not required to implement or include all the devices shown. More or fewer devices may be implemented or included instead.

[0135] For example, the data processing device 300 may further include a peripheral interface (not shown in the figure), etc. The peripheral interface may be various types of interfaces, such as a USB interface, a lightning interface, etc. The communication device 309 may communicate with a network and other devices through wireless communication, such as the Internet, an intranet and / or a wireless network such as a cellular phone network, a wireless local area network (LAN) and / or a metropolitan area network (MAN). Wireless communication may use any of a variety of communication standards, protocols, and techniques, including, but not limited to, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging and / or Short Message Service (SMS), or any other suitable communication protocol.

[0136] For example, the data processing device 300 can be any device such as a mobile phone, a tablet computer, a laptop computer, an e-book, a game console, a television, a digital photo frame, a navigator, etc., or it can be any combination of data processing devices and hardware, and the embodiments of the present disclosure are not limited to this.

[0137] For example, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 309, or installed from a storage device 308, or installed from a ROM 302. When the computer program is executed by the processing device 301, the pipeline conflict handling method 40 disclosed in the embodiment of the present disclosure is executed.

[0138] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0139] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0140] The computer-readable medium may be included in the data processing device 300 ; or may exist independently without being incorporated into the data processing device 300 .

[0141] At least one embodiment of the present disclosure also provides an electronic device. Fig.14 1 is a schematic block diagram of an electronic device 140 according to at least one embodiment of the present disclosure. Fig.14As shown, the electronic device 140 may include Figure 10-13 Any data processing device shown in ; and a pipeline, for example, the pipeline structure can be provided for the embodiment of the present disclosure Figure 2 The pipeline 20 shown, Figure 5 The pipeline 50 shown may also be other similar or structural pipelines, and the embodiments of the present disclosure are not limited to this. The pipeline is connected to the above-mentioned data processing device. It should be understood that the electronic device 140 provided in the embodiments of the present disclosure can implement the aforementioned pipeline conflict processing method 40, and can also achieve technical effects similar to the aforementioned pipeline conflict processing method 40, which will not be described in detail here.

[0142] At least one embodiment of the present disclosure also provides a non-transitory readable storage medium. Fig.15 is a schematic block diagram of a non-transitory readable storage medium provided by at least one embodiment of the present disclosure. Fig.15 As shown, the non-transitory readable storage medium 150 stores computer instructions 111, and when the computer instructions 111 are executed by the processor, one or more steps in the pipeline conflict handling method 40 described above are performed.

[0143] For example, the non-transitory readable storage medium 150 can be any combination of one or more computer-readable storage media, for example, one computer-readable storage medium includes a computer-readable program code for placing a target request into a request queue and setting a first flag and a second flag for the target request in response to a conflict between a target request and a previous request in a pipeline processing unit, and another computer-readable storage medium includes a computer-readable program code for taking the target request out of the request queue for subsequent processing based on the first flag and the second flag, the first flag is based on whether the conflict is released, and the second flag is based on the time coefficient of the conflict. Of course, the above-mentioned various program codes can also be stored in the same computer-readable medium, and the embodiments of the present disclosure are not limited to this.

[0144] For example, when the program code is read by a computer, the computer may execute the program code stored in the computer storage medium, and execute, for example, the pipeline conflict handling method 40 provided in any one of the embodiments of the present disclosure.

[0145] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media. For example, the readable storage medium may also be Fig.12For the memory 1220 in the example, the related description can be referred to the aforementioned content and will not be repeated here.

[0146] In the present disclosure, the term "plurality" refers to two or more than two, unless clearly defined otherwise.

[0147] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0148] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A pipeline conflict handling method, wherein: The pipeline includes a pipeline processing unit and a request queue, the pipeline processing unit and the request queue are communicatively connected, and the method includes: In response to a conflict between a target request and a previous request in the pipeline processing unit, placing the target request in the request queue, and setting a first flag and a second flag for the target request; Based on the first flag and the second flag, in response to the first flag and the second flag both being in an enabled state, taking the target request out of the request queue for subsequent processing, The first flag is based on whether the conflict is released, and in response to the conflict being released, the first flag is enabled; the second flag is based on the time coefficient of the conflict, and in response to the current time being greater than the time coefficient of the conflict, the second flag is enabled.

2. The method according to claim 1, wherein: The pipeline further includes an arbitrator, the arbitrator is communicatively connected with the pipeline processing unit and the request queue, Based on the first flag and the second flag, taking the target request out of the request queue for subsequent processing includes: Based on the first flag and the second flag, the target request is taken out from the request queue and sent to the arbitrator, and one or more pending access requests including the target request are selected by the arbitrator.

3. The method according to claim 1, further comprising: In response to a conflict between a target request and a previous request in the pipeline processing unit, obtaining a conflict cause of the conflict; Based on the conflict cause, a time coefficient of the conflict is set.

4. The method according to claim 3, wherein: The time coefficient of the conflict includes a predicted time when the conflict ends.

5. The method according to claim 4, wherein: Based on the conflict cause, setting the time coefficient of the conflict includes: Based on the conflict cause and the conflict occurrence time, a conflict end prediction time of the conflict is obtained.

6. The method according to claim 1, wherein: The conflicts are released, including: The previous request has been processed by the pipeline processing unit; or The previous request has not been processed by the pipeline processing unit, and the conflict is set to be released.

7. The method according to claim 3, wherein: Based on the conflict cause, a time coefficient of the conflict is set, including The time coefficient of the conflict is set based on the conflict cause, the conflict occurrence time and the early wake-up time.

8. The method according to claim 7, wherein: The early wake-up time is set based on the conflict detection time, and the conflict detection time is predefined.

9. The method according to claim 3, wherein: Based on the conflict cause, a time coefficient of the conflict is set, including The time coefficient of the conflict is set based on the conflict cause, the conflict occurrence time and the delayed wake-up time.

10. The method according to claim 9, wherein: The delayed wake-up time is determined based on statistical data of conflicts existing in the pipeline processing unit within a predetermined time period.

11. The method according to claim 10, wherein: The statistics include the total number of conflicts that exist.

12. A data processing device, comprising: A conflict handling device, a pipeline processing unit and a request queue, wherein the conflict handling device is in communication connection with the request queue and the pipeline processing unit, The conflict handling device comprises a setting unit and a taking unit. The setting unit is configured to, in response to a conflict between a target request and a previous request in the pipeline processing unit, place the target request in the request queue and set a first flag and a second flag for the target request; The fetching unit is configured to fetch the target request from the request queue for subsequent processing based on the first flag and the second flag, in response to the first flag and the second flag both being in an enabled state, The first flag is based on whether the conflict is released, and in response to the conflict being released, the first flag is enabled; the second flag is based on the time coefficient of the conflict, and in response to the current time being greater than the time coefficient of the conflict, the second flag is enabled.

13. The data processing apparatus according to claim 12, further comprising an arbitrator, wherein: The arbiter is in communication with the conflict handling device, the pipeline processing unit and the request queue. The taking-out unit comprises a conveying unit, and the conveying unit is configured as follows: Based on the first flag and the second flag, taking the target request from the request queue and sending it to the arbitrator; The arbitrator is configured to select one or more pending access requests including the target request.

14. A data processing device comprising processor; a memory including one or more computer program modules; in, The one or more computer program modules are stored in the memory and configured to be executed by the processor to execute instructions of the pipeline conflict handling method according to any one of claims 1 to 11.

15. An electronic device comprising The data processing device according to any one of claims 12 to 14; and The pipeline is connected to the data processing device.

16. A non-transitory readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, a pipeline conflict handling method according to any one of claims 1 to 11 is performed.

Citation Information

Patent Citations

  • Resource assess arbitration method and device

    CN103246565A

  • AU1588383A