Prejudgment type request suspension method and device
By using a predictive request dangling method to perform predictive lookup and cache lookup of request identity within the same clock cycle, the problem of high request blocking rate in multi-request parallel processing is solved, achieving efficient parallel processing of requests and responses, and improving the data processing efficiency and system throughput of digital circuits.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 太初(无锡)电子科技有限公司
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-12
AI Technical Summary
In scenarios involving multiple requests in parallel processing, existing request hanging methods result in high request blocking rates, failing to meet the high-efficiency parallel processing requirements of high-bandwidth scenarios.
A predictive request suspending method is adopted, which performs predictive query and cache query of request identity within the same clock cycle. Combined with suspending space allocation and blocking detection, it realizes parallel processing of requests and responses, reducing the clock cycles consumed by suspending.
It reduces the blocking rate of requests, improves the data processing efficiency and system throughput of integrated digital circuits, and enhances system response speed and resource utilization efficiency.
Smart Images

Figure CN122019415A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital integrated circuit design technology, and specifically to a predictive request suspension method and apparatus. Background Technology
[0002] In the field of digital integrated circuit design, with the continuous improvement of chip performance requirements, high-bandwidth multi-request scenarios are becoming increasingly common. In order to achieve efficient parallel processing of multiple requests, it is necessary to perform a cache feasibility query on the storage space for the requests to be processed. When the storage space meets the caching conditions, the system will temporarily store the request data in the space, and after the target write response is fed back to the system, the corresponding request data will be deleted from the storage space.
[0003] However, in scenarios where multiple requests are processed in parallel, the relevant request hanging handling methods need to wait for a single request to complete the cache feasibility query and data writing operation before processing the next request, which leads to a high request blocking rate. Summary of the Invention
[0004] This invention provides a predictive request suspension method and apparatus to solve the problem of high request blocking rate.
[0005] In a first aspect, the present invention provides a predictive request suspending method applied to an integrated digital circuit, the integrated digital circuit including: a request register, a request cache register, a request downstream register, and a predictive suspending logic processing module; The request register acquires the first write request in the current clock cycle, sends the predictive query request identity of the first write request to the predictive dangling logic processing module, and acquires the second write request in the next clock cycle, sending the predictive query request identity of the second write request to the predictive dangling logic processing module. The request cache register obtains the first write request in the next clock cycle and sends the query request identifier and input cache information of the first write request to the predictive dangling logic processing module. In the current time period, the predictive suspending logic processing module performs a cache query based on the predictive query request identity of the first write request, obtains the query backpressure result of the first write request, and stores the query backpressure result of the first write request. In the next clock cycle, it performs a cache query based on the predictive query request identity of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity of the first write request. The request cache register obtains the status of the requested downstream register in the next clock cycle. Based on the status of the requested downstream register and the query backpressure result of the current clock cycle, a write enable is generated and sent to the predictive suspend logic processing module. The predictive suspending logic processing module stores input cache information based on write enable.
[0006] The predictive request suspending method provided in this embodiment obtains a first write request in the current clock cycle through the request register, sends the predictive query request identity identifier of the first write request to the predictive suspending logic processing module, and obtains a second write request in the next clock cycle. The request cache register obtains the first write request in the next clock cycle, and sends the query request identity identifier and input cache information of the first write request. In the current clock cycle, the predictive suspending logic processing module performs a cache query based on the predictive query request identity identifier of the first write request to obtain the query backpressure result of the first write request, stores the query backpressure result of the first write request, and in the next clock cycle, performs a cache query based on the predictive query request identity identifier of the second write request to obtain the query backpressure result of the second write request. As a result, the query backpressure result of the second write request is stored, and based on the query request identity of the first write request, the query backpressure result of the first write request is sent to the request cache register. This realizes query and write operations within the same time period. The prediction logic and request path are designed in parallel, which reduces the clock cycles consumed by request suspending while meeting high-frequency timing requirements. The request cache register obtains the status of the downstream register of the request in the next clock cycle. Based on the status of the downstream register of the request and the query backpressure result of the current clock cycle, a write enable is generated and sent to the prediction-based suspending logic processing module. Finally, the prediction-based suspending logic processing module stores the input cache information based on the write enable, reducing the blocking rate of requests and improving the data processing efficiency of the integrated digital circuit.
[0007] In one alternative implementation, the integrated digital circuitry further includes a response register and a downstream response register, and the method further includes: The predictive hanging logic processing module obtains the query response identity identifier of the read response sent by the response register, and sends the output buffer information corresponding to the query response identity identifier of the read response to the response register. The response register obtains the status of the downstream response register. If the status of the downstream response register is ready, a write enable is generated and sent to the predictive suspend logic processing module. The predictive hanging logic processing module deletes the output cache information corresponding to the query response identity identifier of the read response based on write-out enable.
[0008] The predictive request suspending method provided in this embodiment obtains the query response identity identifier of the read response sent by the response register through the predictive suspending logic processing module, and sends the output cache information corresponding to the query response identity identifier of the read response to the response register. The response register obtains the status of the downstream response register. If the status of the downstream response register is ready, a write enable is generated and sent to the predictive suspending logic processing module. Based on the write enable, the predictive suspending logic processing module deletes the output cache information corresponding to the query response identity identifier of the read response. Through the collaborative operation of the predictive suspending logic processing module and the response register, efficient matching of read and write responses and timely release of cache resources are achieved, thereby improving the parallelism of data processing and system throughput.
[0009] In one optional implementation, the predictive suspending logic processing module includes a suspending space allocation submodule and a blocking detection submodule; the predictive suspending logic processing module performs a cache query based on the predictive query request identity identifier of the first write request in the current time period to obtain the query backpressure result of the first write request, including: In the current time period, the suspended space allocation submodule compares the predicted query request identity of the first write request with the recorded identity, assigns a write number to the predicted query request identity of the first write request based on the comparison result, and sends the write number to the blocking detection submodule. The congestion detection submodule performs congestion judgment on the dangling space corresponding to the write number and obtains the query backpressure result of the first write request.
[0010] The predictive request suspending method provided in this embodiment compares the predicted query request identity identifier of the first write request with the recorded identity identifier in the current time period. Based on the comparison result, a write number is assigned to the predicted query request identity identifier of the first write request, which effectively avoids resource conflicts and identifier duplication problems, ensuring the orderly scheduling of write requests and reasonable resource allocation. The congestion detection submodule performs congestion judgment on the suspending space corresponding to the write number to obtain the query backpressure result of the first write request, which timely warns of potential system bottlenecks and prevents data accumulation and transmission delays. The suspending space allocation ensures that requests enter the system in an orderly manner, while the congestion detection provides a basis for dynamic adjustment. The two work together to achieve a precise balance between resource allocation and flow control, which significantly improves system throughput and response speed.
[0011] In one optional implementation, the suspended space allocation submodule compares the predicted query request identity identifier of the first write request with the recorded identity identifier in the current time period, and assigns a write number to the predicted query request identity identifier of the first write request based on the comparison result, including: If the recorded identity identifiers contain the predicted query request identity identifier of the first write request, then obtain the query request identity identifier of the current clock cycle and compare it with the predicted query request identity identifier of the first write request. If the query request identity identifier of the current clock cycle is equal to the predicted query request identity identifier of the first write request, then the dangling space number corresponding to the recorded identity identifier will be used as the write number. Alternatively, if the identity identifier of the first write request is not found among the recorded identity identifiers, the hanging space allocation submodule will use the number of each idle hanging space as the write number.
[0012] The predictive request suspending method provided in this embodiment, when the identity identifier of the query request in the current clock cycle is equal to the predictive query request identity identifier of the first write request, uses the suspending space number corresponding to the recorded identity identifier as the write number. This avoids duplicate allocation and resource conflicts, ensures continuous processing of identical requests, significantly improves system response speed, and reduces resource management overhead. Furthermore, when the predicted query request identity identifier of the first write request is not among the recorded identity identifiers, the suspending space allocation submodule uses the number of each idle suspending space as the write number. This dynamic allocation strategy maximizes the utilization of idle resources, prevents resource waste, and ensures timely processing of new requests, effectively balancing system load and improving overall throughput.
[0013] In one optional implementation, the congestion detection submodule performs congestion assessment on the dangling space corresponding to the write number to obtain the query backpressure result of the first write request, including: The blocking detection submodule obtains the remaining number of suspendable requests in the suspend space corresponding to the write number, and the write enable, query response identity, query request enable, predict query request enable, and write enable under the current clock cycle; The blocking detection submodule predicts the number of suspendable requests corresponding to the write number based on the remaining number of suspendable requests in the suspending space, write enable, query response identity, query request enable, predict query request enable, and write enable, and obtains the query backpressure result of the first write request.
[0014] The predictive request suspending method provided in this embodiment uses a congestion detection submodule to predict the number of suspendable requests corresponding to a write number based on the remaining number of suspendable requests in the suspending space, write enable, query response identity identifier, query request enable, predictive query request enable, and write enable. This predicts the query backpressure result of the first write request. The congestion detection submodule predicts the suspending space capacity through multi-parameter fusion and dynamically generates backpressure results, achieving precise resource scheduling and congestion prevention, and improving system throughput efficiency.
[0015] In one optional implementation, the congestion detection submodule performs congestion assessment on the dangling space corresponding to the write number, and further includes: The blocking detection submodule obtains the number of remaining requests for different identity identifiers that can be hung. The blocking detection submodule predicts the number of suspendable spaces corresponding to the write number based on the number of remaining suspendable requests with different identity identifiers, write enable, query response identity identifier, query request enable, predict query request enable, and write enable, and obtains the query backpressure result of the first write request.
[0016] In a second aspect, the present invention provides a predictive request suspension device, the device comprising: a request register, a request cache register, a request downstream register, and a predictive suspension logic processing module; The request register is used to acquire the first write request in the current clock cycle, send the predictive query request identity of the first write request to the predictive dangling logic processing module, and acquire the second write request in the next clock cycle, and send the predictive query request identity of the second write request to the predictive dangling logic processing module. The request cache register is used to obtain the first write request in the next clock cycle and send the query request identifier and input cache information of the first write request to the predictive dangling logic processing module. The predictive suspending logic processing module is used to perform a cache query based on the predictive query request identity of the first write request in the current time period, obtain the query backpressure result of the first write request, and store the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predictive query request identity of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity of the first write request. The request cache register is used to obtain the status of the downstream register in the next clock cycle. Based on the status of the downstream register and the query backpressure result of the current clock cycle, a write enable is generated and sent to the predictive suspend logic processing module. The predictive suspend logic processing module is used to store input cache information based on write enable.
[0017] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the predictive request suspension method of the first aspect or any corresponding embodiment described above.
[0018] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the predictive request suspension method of the first aspect or any corresponding embodiment thereof.
[0019] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the predictive request suspension method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the structure of an integrated digital circuit according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a related digital circuit according to an embodiment of the present invention; Figure 3 This is a schematic flowchart of the first type of predictive request suspension method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a second type of predictive request suspension method according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of the predictive suspended logic processing module according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the operation of the suspended storage submodule according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the suspended space allocation submodule structure according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0024] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0025] As an optional application scenario of this invention, such as Figure 1 As shown, the integrated digital circuit includes: a request register 101, a request buffer register 102, a request downstream register 103, a predictive suspended logic processing module 104, a response register 105, and a downstream response register 106.
[0026] In the field of digital integrated circuit design, with the continuous improvement of chip performance requirements, high-bandwidth multi-request scenarios, such as cache controllers, PCIe 5.0 / 6.0 (a high-speed interface), AI (Artificial Intelligence) chips, and data flow management, are becoming increasingly common. In these scenarios, it is necessary to use "suspended logic" to temporarily store unfinished requests such as data read / write requests and computation requests and track their status until a response is returned, so as to achieve parallel processing of requests and improve circuit throughput. The depth requirement of suspended logic in digital circuit design has increased from the traditional 8-16 to 32-128, and some high-end AI chips even need to support a suspended depth of more than 256 to meet the requirements of multi-request parallel processing.
[0027] The increase in suspension depth requirements will have a significant negative chain reaction on timing. The core issue is that the combination path delay of the query process increases non-linearly. The number of occupied IDs that need to be compared for identification (ID) conflict queries increases exponentially with depth. At the same time, the counter bit width and comparator complexity for judging the remaining space increase synchronously. The overall timing path is difficult to meet the design requirements of high frequencies (such as 1GHz and above), becoming one of the obstacles restricting chip performance.
[0028] To address the timing challenges of deep suspension, predictive suspension logic has emerged. It uses a pipeline architecture of "querying in the first phase and writing in the second phase" to break down long combined logic paths. However, this architecture introduces complex logic such as "multi-phase state fusion" and "blocking adaptive correction", which leads to a significant increase in the number of boundary scenarios such as request conflicts, out-of-order responses, and blocking switching, placing extremely high demands on the completeness of verification.
[0029] The request suspending scheme of single-shot query + single-shot write is suitable for scenarios with a small suspending depth (≤16). It completes "request ID conflict query", "remaining space judgment" and "request write" within the same clock cycle. This scheme has a short timing path and simple logic. However, when the suspending depth is ≥32, the combined path delay of the query logic will exceed the clock cycle, resulting in timing violations.
[0030] like Figure 2 As shown, if using a single-cycle query + single-cycle write approach, please suspend the request when it is ready to be transferred from the request register (req_reg) to the downstream request register (req_reg). When using DownstreamRegister (req_down_reg), a "request ID conflict query" and a "remaining space judgment" are performed, and finally, the caching step for the hanging information is completed. The specific steps include: 1) req_reg will send the query request (req_id), query request enable (req_en), and input cache information (req_info) of this request to the hanging processing module; 2) When the request is executed, the hanging processing module queries within the module based on req_id to determine whether the req_info can be cached, and feeds back the query backpressure result (req_hang_full) to the request register; if the result of req_hang_full is not full, and req_down_reg is ready, write enable (req_wr_en) will be generated when the request is executed; 3) If req_hang_full is 1 or req_down_reg is not ready, req_wr_en will not be generated until req_hang_full is 0 and req_down_reg is ready.
[0031] When the response to the request is returned, and is ready to be transmitted to the Response Downstream register in the Response Register (resp_reg) When registering (resp_down_reg), a "response ID query" is required to ultimately retrieve and delete the suspended information from the suspended list. The specific steps include: 1) resp_reg will send the query response ID (resp_id) and query response enable (resp_en) of this response to the suspended list processing module; when the suspended list processing module retrieves the output buffer information (resp_info) based on resp_id, it will transmit it to resp_reg; 2) If resp_down_reg can receive data at this time, then resp_reg will generate a read enable (resp_rd_en) and send it to the suspended list processing module; 3) If resp_down_reg is not ready, resp_rd_en will not be generated until resp_down_reg becomes ready; 4) In the next period after receiving resp_rd_end, the suspended list processing module will delete resp_info from the suspended list based on resp_id; 5) In the next period after receiving req_wr_en, the suspended list processing module will store req_info into the specified suspended list based on req_id.
[0032] Therefore, in extreme cases, during the transition of a request from req_reg to req_down_reg, the process needs to proceed as follows: obtain req_id from req_reg -> compare req_id with the ID recorded in the hang -> check if the cache space corresponding to req_id is full or if there is new space available for req_id to occupy -> req_req receives the invalid req_hang_full signal and confirms that the request is sent -> req_down_reg obtains the request information. In this critical path, "comparing req_id with the ID recorded in the suspending cache" is summarized as "requesting ID conflict query," and "req_id checking whether the corresponding cache space is full or whether there is new space for req_id to occupy" is summarized as "remaining space judgment." As the ID bit width increases and the suspending depth deepens, the timing consumption of "requesting ID conflict query" and "remaining space judgment" will increase sharply. The increase in ID bit width mainly increases "single comparator latency," while the increase in suspending depth also increases "the number of comparators / counters" and "gate fan-in." Under the combined effect of these two factors, the timing consumption of the two operations exhibits "non-linear growth." When the logic depth doubles, the timing consumption increases more than double, ultimately causing the combined path latency of the suspending query to exceed the limit, becoming a timing bottleneck in high-parameter scenarios.
[0033] For related request hanging methods, to address timing bottlenecks, some solutions split queries and writes into multiple cycles (e.g., 2 cycles for querying + 1 cycle for writing). The first cycle initiates the query, the second cycle retrieves the query result, and the third cycle executes the write. This leads to a significant increase in request blocking rate (blocking rate ≥30% in scenarios with 2 requests per cycle), reducing circuit throughput.
[0034] The split storage solution divides the suspended storage space by bank (database), such as splitting a 128-depth bank into four 32-depth banks, reducing the comparison range of a single query and alleviating timing pressure. However, this solution requires the addition of bank routing logic and conflict arbitration logic, which greatly increases control complexity, and there are still potential timing risks in the state synchronization between multiple banks.
[0035] According to an embodiment of the present invention, a predictive request suspension method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0036] This embodiment provides a predictive request suspension method, which can be used in the aforementioned integrated digital circuits. Figure 3 This is a flowchart of a predictive request suspension method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: The request register obtains the first write request in the current clock cycle, sends the predictive query request identity of the first write request to the predictive dangling logic processing module, and obtains the second write request in the next clock cycle, and sends the predictive query request identity of the second write request to the predictive dangling logic processing module.
[0037] Specifically, during the current clock cycle clk0, if the request buffer register (req_buff_reg) can receive requests, req_reg will pass the pre-query request identifier (pre_req_id) of this request and the pre-query request enable (pre_req_en) to the pre-predictive suspending processing module.
[0038] Step S302: The request cache register obtains the first write request in the next clock cycle, and sends the query request identifier and input cache information of the first write request to the predictive dangling logic processing module.
[0039] Specifically, to implement a predictive request dangling flow, a request buffer register is added in the request direction. The core component of the request buffer register is the register slice. In the next clock cycle clk1, the write request in req_reg enters req_buff_reg, and the corresponding query request ID (req_id), query request enable (req_en), and input buffer information (req_info) are passed to the predictive dangling processing module.
[0040] In step S303, the predictive suspending logic processing module performs a cache query based on the predictive query request identity identifier of the first write request in the current time period, obtains the query backpressure result of the first write request, and stores the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predictive query request identity identifier of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity identifier of the first write request.
[0041] Specifically, when a write request is about to be transferred from the request register to the request cache register, it is necessary to perform a "request ID conflict lookup" and a "remaining space judgment", that is, to perform a cache lookup based on the pre-judgment of the write request's identity identifier.
[0042] Furthermore, in the current clock cycle clk0, the pre-hanging processing module queries within the module based on pre_req_id to determine whether the hanging information corresponding to that ID can be cached. In the next clock cycle clk1, the pre-hanging processing module feeds back the query backpressure result (req_hang_full) to req_buff_reg. In the next clock cycle, it performs a cache query based on the pre-query identity identifier of another write request and temporarily stores the obtained query backpressure result.
[0043] Step S304: The request cache register obtains the status of the requested downstream register in the next clock cycle. Based on the status of the requested downstream register and the query backpressure result of the current clock cycle, a write enable is generated and sent to the predictive suspend logic processing module.
[0044] Specifically, in the next clock control cycle clk1, if the result of req_hang_full is not full and the request downstream register status req_down_reg is ready, a write enable (req_wr_en) will be generated in the next clock control cycle clk1. If req_hang_full is 1 (meaning that there is no remaining space in the dangling space to store the request), or req_down_reg is not ready, a write enable req_wr_en will not be generated until req_hang_full is 0 and req_down_reg is ready.
[0045] In step S305, the predictive suspending logic processing module stores the input cache information based on write enable.
[0046] Specifically, the predictive suspension logic processing module, upon receiving req_wr_en, at the fastest clk2 clock control cycle, stores req_info into the suspension specified in the predictive suspension logic processing module according to req_id.
[0047] Furthermore, when the response to the first write request is returned, and the response register (resp_reg) is ready to be transferred to the response downstream register (resp_down_reg), a "response ID lookup" is required to ultimately retrieve and remove the dangling information from the dangling register. Specifically, this includes: 1) At clk0, during the current control clock cycle, resp_reg will send the query response ID (resp_id) and query response enable (resp_en) of this response to the suspending processing module; 2) At clk0, the predictive suspending logic processing module retrieves the output buffer information (resp_info) based on resp_id and transmits it to resp_reg; 3) At clk0, if resp_down_reg can receive data, then resp_reg will generate a read enable (resp_rd_en) and send it to the predictive suspending logic processing module. If resp_down_reg is not ready, it will not generate resp_rd_en until resp_down_reg becomes ready; 4) In the next clock cycle after receiving resp_rd_end (as early as clk1), the suspending processing module removes resp_info from the suspending state based on resp_id, and the response moves from resp_reg to resp_down_reg.
[0048] This embodiment provides a predictive request suspending method. In the current clock cycle, a first write request is acquired through a request register. The predictive query request identifier of the first write request is sent to the predictive suspending logic processing module. In the next clock cycle, a second write request is acquired. In the next clock cycle, the request cache register acquires the first write request, along with its query request identifier and input cache information. In the current clock cycle, the predictive suspending logic processing module performs a cache query based on the predictive query request identifier of the first write request to obtain the query backpressure result of the first write request. This query backpressure result is stored. In the next clock cycle, based on the predictive query request identifier of the second write request, a cache query is performed to obtain the query backpressure result of the second write request. The backpressure result of the second write request is stored, and the backpressure result of the first write request is sent to the request cache register based on the query request identity of the first write request. This realizes query and write operations within the same time period. The prediction logic and request path are designed in parallel, which reduces the clock cycle consumed by request suspending while meeting high-frequency timing requirements. The request cache register obtains the status of the downstream register of the request in the next clock cycle. Based on the status of the downstream register of the request and the query backpressure result of the current clock cycle, a write enable is generated and sent to the prediction-based suspending logic processing module. Finally, the prediction-based suspending logic processing module stores the input cache information based on the write enable, which reduces the blocking rate of requests and improves the data processing efficiency of integrated digital circuits.
[0049] This embodiment provides a predictive request suspension method, which can be used in the aforementioned digital integrated circuits. Figure 4 This is a flowchart of a predictive request suspension method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps: Step S401: The request register acquires a first write request in the current clock cycle, sends the predictive query request identifier of the first write request to the predictive dangling logic processing module, and acquires a second write request in the next clock cycle, sending the predictive query request identifier of the second write request to the predictive dangling logic processing module. For details, please refer to [link to relevant documentation]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.
[0050] Step S402: The request cache register acquires the first write request in the next clock cycle, and sends the query request identifier and input cache information of the first write request to the predictive dangling logic processing module. For details, please refer to [link to relevant documentation]. Figure 3 Step S302 of the illustrated embodiment will not be described again here.
[0051] In step S403, the predictive suspending logic processing module performs a cache query based on the predictive query request identity identifier of the first write request in the current time period, obtains the query backpressure result of the first write request, and stores the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predictive query request identity identifier of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity identifier of the first write request.
[0052] Specifically, step S403 includes: In step S4031, the suspending space allocation submodule compares the predicted query request identity identifier of the first write request with the recorded identity identifier in the current time period, assigns a write number to the predicted query request identity identifier of the first write request based on the comparison result, and sends the write number to the blocking detection submodule.
[0053] Among them, such as Figure 5 As shown, the predictive suspending logic processing module includes a suspending space allocation submodule, a suspending storage submodule, and a blocking detection submodule. Within one clock control cycle (clk), the predictive suspending logic processing module can see a maximum of three transaction messages from req_reg, req_buff_reg, and resp_reg. When three transactions arrive simultaneously, the module needs to consider the following scenarios: pre_req_id, req_id, and resp_id are all unequal; pre_req_id and req_id are equal, but not equal to resp_id; pre_req_id and resp_id are equal, but not equal to req_id; req_id and resp_id are equal, but not equal to pre_req_id; and pre_req_id, req_id, and resp_id are all equal.
[0054] like Figure 6As shown, the suspended storage submodule takes a two-dimensional storage space as an example. It can store BUFF_SIZE requests with different identities. Each request with the same identity can store BUFF_DEPTH transactions. That is, the outstanding (request sending capability) capacity of different identities supported by the suspended storage is BUFF_SIZE, and the outstanding capacity of the same identity is BUFF_DEPTH. At this time, the storage status inside the suspended storage submodule includes: whether the outstanding capacity of different identities supported by the suspended storage is full; whether the outstanding capacity of different identities supported by the suspended storage is about to be full, that is, it has occupied outstanding-1 buffs; whether pre_req_id has been recorded in the box, such as whether the corresponding box is full or about to be full; whether req_id has been recorded in the box, such as whether the corresponding box is full or about to be full; whether the box corresponding to resp_id is about to be empty or full.
[0055] In some optional implementations, step S4031 above includes: Step a1: If the recorded identity identifiers contain the predicted query request identity identifier of the first write request, then obtain the query request identity identifier of the current clock cycle and compare the query request identity identifier of the current clock cycle with the predicted query request identity identifier of the first write request.
[0056] Specifically, such as Figure 7 As shown, the left side of the dashed line is the first cache, and the right side of the dashed line is the second cache. It utilizes a multi-dimensional state judgment logic of "continuous request judgment -> space allocation -> space update", including: when pre_req_en is valid, pre_req_id will be compared with the recorded id information. If req_en is valid, the req_id of the current cache will also be compared to ensure that the same identity identifier is allocated the same cache space.
[0057] Step a2: If the query request identity identifier of the current clock cycle is equal to the predicted query request identity identifier of the first write request, then the dangling space number corresponding to the recorded identity identifier is used as the write number.
[0058] Specifically, if the comparison matches, a corresponding hanging space number corresponding to the recorded identity is assigned to the identity of the query request, and the identity of the query request will not change in subsequent queries.
[0059] Step a3, or, if the identity identifier of the first write request is not found in the recorded identity identifiers, then the hanging space allocation submodule will use the number of each idle hanging space as the write number.
[0060] Specifically, if the comparison fails, an empty number is assigned to the request. If all numbers are occupied, the default number can be used to wait for reallocation, ensuring that different identities are allocated to different cache spaces. The numbers of each idle state dangling space are determined as follows: if req_en is valid and req_wr_en is invalid, and if the request was previously judged to be a match, then the number remains unchanged; otherwise, it is checked whether there is an empty number available for allocation and reallocation is performed.
[0061] Furthermore, when req_wr_en is enabled high, the assigned write number is output. Therefore, when the module is blocked, the submodule will temporarily store the judgment result and determine in real time whether the result needs to be updated.
[0062] In step S4032, the congestion detection submodule performs congestion judgment on the dangling space corresponding to the write number and obtains the query backpressure result of the first write request.
[0063] In some optional implementations, step S4032 above includes: Step b1: The blocking detection submodule obtains the remaining number of suspendable requests in the suspend space corresponding to the write number and the write enable, query response identity, query request enable, predict query request enable, and write enable under the current clock cycle.
[0064] Specifically, the congestion detection submodule is mainly used to determine whether there is space for suspending requests in req_reg under the current control clock, and to provide the number of remaining suspendable requests with different identities (table_rst_num) and the number of remaining suspendable requests with the same identity in the suspended space corresponding to the current req_id (same_id_rst_num). The calculation formulas for the number of remaining suspendable requests with different identities (table_rst_num) and the number of remaining suspendable requests with the same identity (same_id_rst_num) are as follows: table_rst_num = BUFF_SIZE-table_cnt(1) same_id_rst_num = BUFF_DEPTH-id_fly_cnt(2) Among them, table_cnt provides real-time feedback on the occupancy status of each box, and id_fly_cnt indicates the number of requests in the hanging area corresponding to the current identity.
[0065] Step b2: The blocking detection submodule predicts the number of suspendable requests corresponding to the write number based on the remaining number of suspendable requests in the suspendable space based on the write number, write enable, query response identity, query request enable, predict query request enable, and write enable, and obtains the query backpressure result of the first write request.
[0066] Specifically, for a two-dimensional suspended storage space, if the request to be suspended has not been recorded, it needs to pay attention to whether there are still empty buffs to record, and use the table_full signal to indicate this, that is, to give the query backpressure result. The table_full judgment process includes: after reset, table_full defaults to 0. If resp_rd_en is high, and there is only one piece of data in the box corresponding to resp_id, and there are no requests with the same ID in the request direction, then table_full will be lowered in the next clock cycle. If req_en is high, but req_wr_en is not high, then table_full needs to be maintained in the next clock cycle. If table_rst_num is 1, and both req_en and pre_req_en are 1, and the corresponding IDs have not been recorded, then table_full needs to be high in the next clock cycle. If table_rst_num is 0, and req_en is 1, and the corresponding ID has not been recorded, then table_full will be high in the next clock cycle.
[0067] Furthermore, if the pending request has already been recorded, it needs to check whether there is still space remaining in the corresponding buffer for recording, using the cnt_full signal for indication. The cnt_full judgment process includes: after reset, cnt_full defaults to 0; if cnt_full is high, resp_rd_en is high, and resp_id matches req_id, the signal is pulled low in the next clock cycle; if pre_req_en, req_en, and resp_rd_en are all high, and resp_id, pre... If `_req_id` and `req_id` are equal, and `same_id_rst_num` is 1, then `cnt_full` goes low in the next clock cycle. If `pre_req_en` and `reesp_rd_en` are high, `resp_id` is equal to `pre_req_id`, and `same_id_rst_num` is 0, then `cnt_full` goes low in the next clock cycle. If both `pre_req_en` and `req_en` are 1, the corresponding IDs are equal and recorded, and `same_id_rst_num` is 1, then the signal goes high in the next clock cycle. If pre_req_en is high, the corresponding id has been recorded, and same_id_rst_num is 0. In the next clock cycle, cnt_full will be pulled high.
[0068] Step S404: The request cache register obtains the status of the requested downstream register in the next clock cycle. Based on the status of the requested downstream register and the query backpressure result of the current clock cycle, a write enable is generated and sent to the predictive suspend logic processing module. For details, please refer to [link to relevant documentation]. Figure 3 Step S304 of the illustrated embodiment will not be described again here.
[0069] In step S405, the predictive suspending logic processing module stores the input buffer information based on write enable. For details, please refer to [link to relevant documentation]. Figure 3 Step S305 of the illustrated embodiment will not be described again here.
[0070] The predictive request suspending method provided in this embodiment compares the predicted query request identity identifier of the first write request with the recorded identity identifier in the current time period. Based on the comparison result, a write number is assigned to the predicted query request identity identifier of the first write request, which effectively avoids resource conflicts and identifier duplication problems, ensuring the orderly scheduling of write requests and reasonable resource allocation. The congestion detection submodule performs congestion judgment on the suspending space corresponding to the write number to obtain the query backpressure result of the first write request, which timely warns of potential system bottlenecks and prevents data accumulation and transmission delays. The suspending space allocation ensures that requests enter the system in an orderly manner, while the congestion detection provides a basis for dynamic adjustment. The two work together to achieve a precise balance between resource allocation and flow control, which significantly improves system throughput and response speed.
[0071] This embodiment also provides a predictive request suspension device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0072] This embodiment provides a predictive request suspension device, such as Figure 1 As shown, it is applied to an integrated digital circuit, which includes: a request register 101, a request buffer register 102, a request downstream register 103, and a predictive suspended logic processing module 104.
[0073] Request register 101 is used to obtain a first write request in the current clock cycle, send the predictive query request identity of the first write request to the predictive suspending logic processing module, and obtain a second write request in the next clock cycle, and send the predictive query request identity of the second write request to the predictive suspending logic processing module.
[0074] The request cache register 102 is used to obtain the first write request in the next clock cycle and send the query request identity and input cache information of the first write request to the predictive suspend logic processing module.
[0075] The predictive suspending logic processing module 104 is used to perform a cache query based on the predictive query request identity identifier of the first write request in the current time period, obtain the query backpressure result of the first write request, and store the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predictive query request identity identifier of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity identifier of the first write request.
[0076] The request cache register 102 is used to obtain the status of the downstream register in the next clock cycle. Based on the status of the downstream register and the query backpressure result of the current clock cycle, a write enable is generated and sent to the predictive suspend logic processing module. The predictive suspending logic processing module 104 is used to store input cache information based on write enable.
[0077] The predictive request suspension device provided in this embodiment of the invention can execute a predictive request suspension method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0078] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0079] The following is a detailed reference. Figure 8 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 801, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 802 or a program loaded from memory 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device. The processor 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0080] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0081] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a memory 808, or installed from a ROM 802. When the computer program is executed by the processor 801, it performs the functions defined in a predictive request suspending method according to embodiments of the present invention.
[0082] Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0083] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, a predictive request suspending method shown in the above embodiments is implemented.
[0084] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0085] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A predictive request suspension method, characterized in that, Applied to integrated digital circuits, the integrated digital circuits include: a request register, a request cache register, a request downstream register, and a predictive dangling logic processing module; The request register acquires a first write request in the current clock cycle, sends the predictive query request identity identifier of the first write request to the predictive dangling logic processing module, and acquires a second write request in the next clock cycle, sending the predictive query request identity identifier of the second write request to the predictive dangling logic processing module. The request cache register acquires the first write request in the next clock cycle and sends the query request identifier and input cache information of the first write request to the predictive dangling logic processing module. The predictive suspending logic processing module performs a cache query based on the predictive query request identity identifier of the first write request in the current time period to obtain the query backpressure result of the first write request and stores the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predictive query request identity identifier of the second write request to obtain the query backpressure result of the second write request and stores the query backpressure result of the second write request. Based on the query request identity identifier of the first write request, it sends the query backpressure result of the first write request to the request cache register. The request cache register obtains the request downstream register status in the next clock cycle, generates a write enable based on the request downstream register status and the query backpressure result of the current clock cycle, and sends the write enable to the predictive suspend logic processing module. The predictive suspending logic processing module stores the input cache information based on the write enable.
2. The method according to claim 1, characterized in that, The integrated digital circuit further includes a response register and a downstream response register, and the method further includes: The predictive suspending logic processing module obtains the query response identity identifier of the read response sent by the response register, and sends the output buffer information corresponding to the query response identity identifier of the read response to the response register; The response register obtains the status of the downstream response register. If the status of the downstream response register is ready, a write enable is generated and the write enable is sent to the predictive suspend logic processing module. The predictive suspending logic processing module deletes the output cache information corresponding to the query response identity identifier of the read response based on the write enable.
3. The method according to claim 1, characterized in that, The predictive suspension logic processing module includes a suspension space allocation submodule and a blockage detection submodule; the predictive suspension logic processing module performs a cache query based on the predictive query request identity identifier of the first write request in the current time period to obtain the query backpressure result of the first write request, including: In the current time period, the suspended space allocation submodule compares the predicted query request identity identifier of the first write request with the recorded identity identifier, assigns a write number to the predicted query request identity identifier of the first write request based on the comparison result, and sends the write number to the blocking detection submodule. The congestion detection submodule performs congestion judgment on the dangling space corresponding to the write number and obtains the query backpressure result of the first write request.
4. The method according to claim 3, characterized in that, The suspended space allocation submodule compares the predicted query request identity identifier of the first write request with the recorded identity identifier in the current time period, and assigns a write number to the predicted query request identity identifier of the first write request based on the comparison result, including: If the recorded identity identifiers contain the predicted query request identity identifier of the first write request, then the query request identity identifier of the current clock cycle is obtained, and the query request identity identifier of the current clock cycle is compared with the predicted query request identity identifier of the first write request. If the query request identity identifier of the current clock cycle is equal to the predicted query request identity identifier of the first write request, then the dangling space number corresponding to the recorded identity identifier is used as the write number. Alternatively, if the recorded identity identifier does not contain the identity identifier of the first write request, then the hanging space allocation submodule will use the number of each idle hanging space as the write number.
5. The method according to claim 3, characterized in that, The congestion detection submodule performs congestion assessment on the dangling space corresponding to the write number, and obtains the query backpressure result of the first write request, including: The blocking detection submodule obtains the remaining number of suspendable requests in the suspending space corresponding to the write number and the write enable, query response identity, query request enable, predict query request enable, and write enable under the current clock cycle; The blocking detection submodule predicts the number of suspendable requests corresponding to the write number based on the remaining number of suspendable requests in the suspending space, the write enable, the query response identity, the query request enable, the predictive query request enable, and the write enable, thereby obtaining the query backpressure result of the first write request.
6. The method according to claim 5, characterized in that, The congestion detection submodule performs congestion judgment on the dangling space corresponding to the write number, and also includes: The blocking detection submodule obtains the number of remaining requests for different identity identifiers that can be hung. The blocking detection submodule predicts the number of suspendable spaces corresponding to the write number based on the remaining number of suspendable requests with different identity identifiers, the write enable, the query response identity identifier, the query request enable, the predictive query request enable, and the write enable, thereby obtaining the query backpressure result of the first write request.
7. A predictive request suspension device, characterized in that, The device includes: a request register, a request cache register, a request downstream register, and a predictive suspending logic processing module; The request register is used to acquire a first write request in the current clock cycle, send the predictive query request identity identifier of the first write request to the predictive dangling logic processing module, and acquire a second write request in the next clock cycle, and send the predictive query request identity identifier of the second write request to the predictive dangling logic processing module. The request cache register is used to obtain the first write request in the next clock cycle and send the query request identity and input cache information of the first write request to the predictive dangling logic processing module. The predictive suspending logic processing module is used to perform a cache query based on the predicted query request identity of the first write request in the current time period, obtain the query backpressure result of the first write request, and store the query backpressure result of the first write request. In the next clock period, it performs a cache query based on the predicted query request identity of the second write request, obtains the query backpressure result of the second write request, stores the query backpressure result of the second write request, and sends the query backpressure result of the first write request to the request cache register based on the query request identity of the first write request. The request cache register is used to obtain the status of the request downstream register in the next clock cycle, generate a write enable based on the status of the request downstream register and the query backpressure result of the current clock cycle, and send the write enable to the predictive suspend logic processing module. The predictive suspending logic processing module is used to store the input cache information based on the write enable.
8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the predictive request suspension method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the predictive request suspension method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the predictive request suspension method as described in any one of claims 1 to 6.