Request processing apparatus, request processing method, graphics processor, and electronic device

By splitting memory access requests in the graphics processor and actively prefetching adjacent page table entries, the low memory access efficiency caused by passive prefetching in the GPU's MMU is solved, achieving more efficient memory access and storage system performance.

CN123178293APending Publication Date: 2026-11-27MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611709605.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The passive prefetching strategy of the memory management unit (MMU) in existing graphics processing units (GPUs) results in low memory access efficiency, long waiting times, and an inability to effectively utilize the potential of the memory system.

Method used

The memory access request is split into multiple burst requests by the splitting unit, and the detection unit actively sends a prefetch request when the detection signal is received to obtain adjacent page table entries in advance, so as to realize the parallel execution of prefetch and business memory access requests.

Benefits of technology

It significantly improves the memory access efficiency of the GPU front end and the access efficiency of the storage system, reduces the waiting time of front end memory access requests, hides page table traversal latency, and improves the overall performance of the memory system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178293A_ABST
    Figure CN123178293A_ABST
Patent Text Reader

Abstract

The application provides a request processing device, a request processing method, a graphics processor and electronic equipment, and mainly relates to the technical field of computers, so as to solve the problems of long waiting time and low memory access efficiency in related technologies, in which a passive prefetch strategy is usually used by MMU. The request processing device comprises a splitting unit configured to split a memory access request into at least two burst requests and send a target burst request to a memory system; wherein the memory system comprises a memory management unit configured to obtain a first page table entry corresponding to the target burst request; and a detection unit configured to send a prefetch request corresponding to access information to the memory system in response to a detection signal corresponding to the target burst request; wherein the memory management unit is further configured to prefetch a second page table entry corresponding to the prefetch request in advance, the second page table entry is adjacent to the first page table entry, and the access information represents a processing progress of the memory access request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of computer technology, and in particular to a request processing apparatus, a request processing method, a graphics processor, and an electronic device. Background Technology

[0002] In a graphics processing unit (GPU), the front-end module needs to read instructions from the command buffer and generate memory access requests. Before data access, the memory management unit (MMU), located downstream of the front-end module, needs to translate the virtual address of the memory access request into a physical address. Currently, MMUs typically employ a passive prefetch strategy, which prefetches subsequent page table entries based on adjacent addresses or historical patterns when processing arriving memory access requests. This approach suffers from long waiting times and low memory access efficiency. Summary of the Invention

[0003] This application provides a request processing apparatus, a request processing method, a graphics processor, and an electronic device.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a request processing apparatus, including: The splitting unit is used to split a memory access request into at least two burst requests and send the target burst request to the memory system; wherein, the target burst request is one of the at least two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; The detection unit is used to send a prefetch request corresponding to the access information to the memory system in response to the detection signal corresponding to the target burst request; wherein, the memory management unit is also used to prefetch the second page table entry corresponding to the prefetch request in advance, the second page table entry is adjacent to the first page table entry, and the access information represents the processing progress of the memory access request.

[0005] This application provides a request processing method, applied in a request processing apparatus including a splitting unit and a detection unit, the request processing method including: The memory access request is split into at least two burst requests using a splitting unit, and the target burst request is sent to the memory system; wherein, the target burst request is one of the at least two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; In response to the detection signal corresponding to the burst request of the target, the detection unit sends the prefetch request corresponding to the access information to the memory system; wherein, the memory management unit is also used to prefetch the second page table entry corresponding to the prefetch request in advance, the second page table entry is adjacent to the first page table entry, and the access information represents the processing progress of the memory access request.

[0006] This application provides a graphics processor that includes the request processing device described above.

[0007] This application provides an electronic device including the aforementioned graphics processor.

[0008] The embodiments of this application have the following beneficial effects: On the one hand, by splitting memory access requests into burst requests and sending them to the memory system, this splitting mechanism not only adapts to the underlying transmission granularity, but also enables the front end of the memory system (i.e., the request processing unit) to monitor address changes in a finer granular unit, laying the foundation for precise prefetching triggering.

[0009] On the other hand, by adding a hardware detection unit to the request processing device, and having the detection unit actively send a prefetch request for adjacent page table entries when responding to the detection signal, the memory management unit can obtain and cache the second page table entry in advance. Compared with the mechanism in related technologies where the MMU can only passively trigger prefetching after the request arrives, this application realizes the parallel execution of prefetching and business memory access request processing. This proactive triggering method not only avoids the problem of prefetching timing delay caused by processing split requests one by one, but also ensures that the page table entries to be used later are ready before the actual address translation of the business request, thereby effectively hiding the page table traversal delay, reducing the waiting time of front-end memory access requests, and significantly improving the memory access efficiency of the GPU front end and the access efficiency of the storage system. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of the composition structure of a request processing device provided in an embodiment of this application. Figure 1 ; Figure 2 This is a schematic diagram illustrating the implementation flow of a request processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the composition structure of a request processing device provided in an embodiment of this application. Figure 2 .

[0011] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0014] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0016] The technical solutions in the embodiments of this application will now be clearly and completely described with reference to the accompanying drawings.

[0017] Figure 1 A schematic diagram of the composition structure of a request processing device provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the request processing device 10 includes a splitting unit 11 and a detection unit 12, wherein: The splitting unit 11 is used to split a memory access request into at least two burst requests and send the target burst request to the memory system; wherein, the target burst request is one of the at least two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; The detection unit 12 is used to send a prefetch request corresponding to the access information to the memory system in response to the detection signal corresponding to the target burst request; wherein, the memory management unit is also used to prefetch the second page table entry corresponding to the prefetch request in advance, the second page table entry is adjacent to the first page table entry, and the access information represents the processing progress of the memory access request.

[0018] Here, the splitting unit can be any suitable hardware unit capable of implementing this function. Its core function is to break down a memory access request (i.e., a memory access request) into one or more burst requests (BRs) that meet the requirements.

[0019] A memory access request is a raw memory access instruction generated by the GPU frontend after reading and parsing from the command buffer or task queue. This memory access request may include, but is not limited to, a starting address (addr), a request length (size), and operation attributes (such as read, write, etc.). A single memory access request can correspond to a complete business data read / write operation, such as a rendering engine reading texture data or a compute shader reading global memory variables. For example, when the GPU executes a pixel shader program and needs to read a continuous block of floating-point data, the starting virtual address (i.e., the starting address) of the memory access request could be 0x4000_0000, and the access length (i.e., the request length) could be 64KB.

[0020] In some implementations, the original memory access request often corresponds to a large data block. That is, the original memory access request may span a large address range. However, due to limitations such as hardware bus width, maximum burst length, and cache line boundary, directly sending such a large memory access request can lead to low bus efficiency or prevent downstream modules from processing it correctly. Therefore, the memory access request can be broken down into smaller-granularity requests that conform to the physical transmission specifications.

[0021] Burst requests are an efficient data transfer mechanism defined in the memory bus protocol. They allow multiple adjacent memory access blocks to be transferred consecutively in a single request without repeatedly sending address and control signals for each block, thus improving data transfer efficiency. A burst request can correspond to a continuous range of physical or virtual addresses. Essentially, a burst request is the physical manifestation of a raw memory access request, and its purpose is to match the transfer capabilities of the backend memory controller or bus.

[0022] The original memory access request can be split in any way. In some implementations, the original memory access request can be split into a series of sub-requests with a fixed granularity (i.e., burst_size) based on hardware constraints such as bus transmission width, maximum burst length, and cache boundaries.

[0023] For example, if the maximum single transfer length supported by the bus is 32 bytes, and the original memory access request length is 1KB, the splitting unit will split the original memory access request into 32 burst requests of 32 bytes each and send them out sequentially.

[0024] For example, in some high-performance video memory interfaces, burst_size may be configured to 128 bytes. In this case, a 4KB raw memory access request will be split into 32 burst requests of 128 bytes each.

[0025] It is understandable that the split burst requests may be sent sequentially in time, but logically they belong to the same original access request.

[0026] A target burst request is a specific burst request that the splitting unit is sending to the memory system in chronological order. Since the original memory access request may be broken down into a sequence of requests, at any given time, one burst request is either actively transmitting or ready to be transmitted. The target burst request acts as a bridge between the GPU front-end splitting logic and the back-end memory system, and is also a key object triggering subsequent prefetching logic. Understandably, the specific object referred to by the target burst request changes dynamically over time. For example, when the splitting unit issues its first burst request, the target burst request is the first burst request; when the second burst request is issued, the target burst request becomes the second burst request. This dynamism is crucial for subsequent detection logic, as each transmission of the target burst request signifies an advancement in the access progress.

[0027] In implementation, the splitting and sending processes of the splitting unit can be performed synchronously or asynchronously. For example, the splitting unit can send synchronously during the splitting process, i.e., splitting and sending simultaneously. Another example is that the splitting unit can split the entire original memory access request and then send it sequentially, i.e., splitting completely before sending.

[0028] The memory system is the backend module that receives burst requests and performs actual data access, address translation, etc. It is the core execution site for virtual address to physical address translation. A memory system can include at least a memory management unit (MMU). The MMU is the hardware module responsible for translating virtual addresses in burst requests into physical addresses. The MMU can include, but is not limited to, a translation lookaside buffer (TLB), a page table walker (PTW), and a page table cache. In implementation, when a TLB miss occurs, the MMU needs to access multiple levels of page tables through the page table walker to obtain the required page table entry (PTE). This page table traversal process generates significant latency and consumes storage bandwidth.

[0029] The first page table entry is the page table entry in the page table structure that directly maps the virtual address range corresponding to the target burst request. The first page table entry is fundamental data that the MMU must obtain when performing address translation. Page table entries may include, but are not limited to, the physical page number corresponding to the virtual address range, access permissions (such as read-only or write-only), and page attributes (such as cache consistency policies). It is understandable that correctly obtaining the first page table entry is a prerequisite for completing the address translation of the target burst request.

[0030] During implementation, the splitting unit first receives memory access requests; then it extracts the starting virtual address (addr) and access length (size) from the memory access request; subsequently, it cuts the memory access request into a series of short burst requests according to the burst_size; finally, it sends each burst request to the memory system. After receiving the target burst request, the MMU parses the virtual address of the target burst request and queries the TLB. If the TLB is matched, the physical address is directly output; if not, the MMU starts the page table traverser to read the corresponding first page table entry. This process ensures that the target burst request can be correctly addressed and provides a baseline time point for subsequent prefetching decisions.

[0031] The detection unit is a dedicated hardware logic module that communicates with the splitting unit. For example, the detection unit may include combinational logic circuits, registers, etc. Its main functions are to monitor the splitting unit in real time, analyze address scrambling situations to generate prefetch requests when necessary, etc. In implementation, the detection unit does not directly participate in data movement, but focuses on logical analysis and prediction of the address space.

[0032] The detection signal can be sent by the splitting unit or automatically generated by the detection unit. This detection signal can be a control pulse or a flag bit, without carrying a burst request. Alternatively, it can carry the entire burst request or partial information about the burst request (such as its address, length, etc.). In implementation, this detection signal signifies that a new address range has been processed, prompting the detection unit to perform prefetch detection. In other words, the prefetching in this application occurs before the address translation request reaches the MMU, TLB miss, or Page Walk, thus the prefetching trigger time is earlier, improving timeliness.

[0033] In some implementations, the splitting unit may send a detection signal to the detection unit before sending a burst request, after sending a burst request, or while sending a burst request. In practice, the transmission frequency of the detection signal is consistent with the transmission frequency of the burst request.

[0034] In some implementations, the detection unit automatically generates the detection signal when it detects a burst request sent by the splitting unit.

[0035] This access information may include, but is not limited to, the access address current_addr, the remaining address length current_size, etc.

[0036] In some implementations, the access information may be data maintained in real time by the detection unit during the processing of the memory access request.

[0037] In some implementations, the access information may also be determined in real time based on the burst request, for example, by using the address of the target burst request as the access address.

[0038] Understandably, this access information is dynamically updated with each burst request, and it can be used to determine whether subsequent memory accesses cross a new page table entry range. In implementation, this access information is the core basis for the detection unit to make prefetching decisions.

[0039] In implementation, the target burst request output by the splitting unit is not only an input source for the memory system but can also be one of the direct data sources for the detection unit to construct access information. If the target burst request itself is chosen as the carrier of access information, the detection unit does not require additional computing hardware. It can quickly calculate the end address of the target burst request by simply parsing the address and length fields of the target burst request, thereby quickly making a decision on whether to prefetch. This design simplifies the hardware complexity of the detection unit and reduces the overhead of the status register. Conversely, if an independent maintenance mechanism is adopted within the detection unit, although a small amount of computational logic is added, it can more flexibly handle burst requests in various scenarios (such as equal-length, variable-length, etc.).

[0040] A prefetch request is a control request calculated by the detection unit based on access information, designed to allow the MMU to preload adjacent page table entries. The prefetch request may not contain a specific data payload, but rather a prefetch command pointing to a specific virtual address range, informing the MMU to prepare page table entries for that virtual address range in advance. In some implementations, the prefetch request may at least contain a target prefetch address (i.e., the starting virtual address for prefetching) so that the MMU can locate the corresponding page table entry.

[0041] In some implementations, the prefetch request can be sent directly to the memory system.

[0042] In some implementations, the detection result of the target prefetch address can be determined first; then, based on the detection result of the target prefetch address, it can be determined whether to send the prefetch request to the memory system. For example, if the detection result of the target prefetch address indicates that the second page table entry has not been prefetched, then the prefetch request is sent to the memory system; if the detection result of the target prefetch address indicates that the second page table entry has been prefetched, then the prefetch request is not sent to the memory system.

[0043] The second page table entry can be the page table entry that is adjacent to the first page table entry in the virtual address space. "Adjacent" means that the virtual address range covered by the second page table entry immediately follows (or precedes, depending on the access direction) the range covered by the first page table entry. The second page table entry is the target of prefetching; its purpose is to eliminate TLB miss penalties when the next burst request arrives.

[0044] Prefetching is a process where the MMU asynchronously performs a page table traversal operation for the second page table entry while or shortly after executing the normal address translation process for the target burst request, and stores the result of the page table traversal operation in the TLB or page table cache. This way, when a subsequent burst request that needs to access the second page table entry arrives at the MMU, since the second page table entry has already been prefetched and cached, the TLB directly hits it, thus avoiding the expensive page table traversal latency. This parallel mechanism significantly reduces the average memory access latency and improves the throughput of the GPU pipeline. It can be understood that if the MMU has not prefetched the second PTE, it will prefetch the second PTE when a prefetch request is received; conversely, if the MMU has already prefetched the second PTE, it will not prefetch the second PTE even if a prefetch request is received.

[0045] In practice, the target burst requests generated by the splitting unit serve as the trigger source and data foundation for the detection unit's operation. The detection unit does not operate in isolation; the generated prefetch requests are inferred forward based on access information. The entire process forms a closed-loop feedback chain of splitting-sending-detection-prefetching. These two work together to significantly reduce address translation latency without increasing the number of additional main memory accesses.

[0046] In this embodiment, on the one hand, memory access requests are split into burst requests and sent to the memory system by a splitting unit. This splitting mechanism not only adapts to the underlying transmission granularity but also enables the front end of the memory system (i.e., the request processing device) to monitor address changes in finer granular units, laying the foundation for precise prefetch triggering. On the other hand, by adding a hardware detection unit to the request processing device, and having the detection unit actively send prefetch requests for adjacent page table entries when responding to detection signals, the memory management unit can obtain and cache the second page table entry in advance. Compared to the mechanism in related technologies where the MMU can only passively trigger prefetching after the request arrives, this application achieves parallel execution of prefetching and business memory access request processing. This proactive triggering method not only avoids the problem of prefetching timing delay caused by processing split requests one by one but also ensures that the page table entries to be used later are ready before the actual address translation of the business request, thereby effectively hiding the page table traversal delay, reducing the waiting time of front-end memory access requests, and significantly improving the memory access efficiency of the GPU front end and the access efficiency of the storage system.

[0047] In some implementations, the prefetch request includes a target prefetch address, which is the starting address of the second page table entry; the detection unit 12 is further configured to determine the target prefetch address based on the access information; if the detection result of the target prefetch address is a first detection result, the prefetch request is sent to the memory system, whereby the first detection result indicates that the second page table entry has not been prefetched.

[0048] Here, access information serves as the fundamental data source for the detection unit's subsequent calculations. During implementation, by acquiring dynamically changing access information in real time, the memory access progress can be accurately perceived, thus providing a basis for predicting potentially needed page table entries. This access information includes at least the access address.

[0049] The target prefetch address is a specific target address calculated by the detection unit based on the access information, used to trigger the page table prefetch operation. In implementation, relative to the first page table entry currently being accessed or just completed (i.e., the page table range covering the starting address of the target burst request), the second page table entry is the next page table entry that immediately follows, covering the remaining portion of the target burst request or the range of subsequent burst requests. For example, if the target burst request spans both the [0, 32KB) and [32KB, 64KB) page table ranges, then [0, 32KB) corresponds to the first page table entry, and [32KB, 64KB) corresponds to the second page table entry.

[0050] The starting address is the initial offset of the page table entry's location in physical memory or cache. Since page table entries are typically managed in fixed-size units (e.g., 4KB, 32KB, etc., PTE_RANGE_SIZE), once the range of page table entries is determined, the starting address of each entry uniquely identifies its location in memory. Thus, by setting the target prefetch address to the starting address of the second page table entry, the MMU is instructed to precisely load the second page table entry, rather than blindly traversing the entire memory space.

[0051] The target prefetch address can be determined in any suitable way.

[0052] In some implementations, the target prefetch address can be determined based on the access address and the prefetch address set P_current_prefetch. The prefetch address set includes at least one prefetch address (i.e., the starting address of the page table entry to be prefetched).

[0053] In some implementations, the target prefetch address can be determined in real time based on the access address and brust_size. For example, the end address is calculated based on the access address and brust_size. If the end address does not exceed the range of the first page entries, or if the access address does not exceed the range of the first page entries but the end address exceeds the range of the first page entries, then the starting address of the second page entries (i.e., the end address of the first page entries) is used as the target prefetch address.

[0054] During implementation, the detection unit can use access information, combined with a preset page table entry size (PTE_RANGE_SIZE), to calculate whether the target burst request crosses the page table boundary. If it does, the starting position of the next page table entry (i.e., the second page table entry) is calculated, and the starting position of the second page table entry is the target prefetch address. This correlation ensures that the prefetch action always closely follows the business memory access request, resulting in extremely high timeliness and accuracy.

[0055] The detection result can be a feedback signal obtained by the detection unit after querying the internally maintained status register or flag bit for the calculated target prefetch address. The detection result reflects the resident status of the second page table entry in the memory system or MMU. This detection result can include a first detection result, a second detection result, etc. A first detection result indicates that the second page table entry has not been prefetched. Not prefetched means that the second page table entry does not exist in the MMU's cache structure (such as the TLB or other related translation caches). A second detection result indicates that the second page table entry has been prefetched.

[0056] The detection result of the target prefetch address can be determined in any suitable way.

[0057] In some implementations, if no prefetch request including the target prefetch address has been sent, the detection result of the target prefetch address is determined as the first detection result; if a prefetch request including the target prefetch address has been sent, the detection result of the target prefetch address is determined as the second detection result.

[0058] In some implementations, if no prefetch request including the target prefetch address has been sent (i.e., no prefetching), or if a prefetch request including the target prefetch address has been sent but the second page entry has not yet been loaded into the TLB or other relevant translation cache (i.e., missing), then the detection result of the target prefetch address is determined as the first detection result; if the second page entry has been loaded into the TLB or other relevant translation cache, then the detection result of the target prefetch address is determined as the second detection result.

[0059] During implementation, when the detection unit detects that the page table entry corresponding to the target prefetch address has not yet been loaded into the MMU's cache structure, the detection result is determined as the first detection result. This means that if prefetching is not initiated at this time, when the business memory access request progresses to the address range of the second page table entry, a TLB Miss will occur, which will trigger a time-consuming page table traversal operation, causing the pipeline to stall.

[0060] In some implementations, to determine whether prefetching has not occurred, the detection unit can maintain one or more flag bits (such as prefetched_addr_valid), a record table, etc. If the recorded prefetch address does not match the target prefetch address, or if the corresponding valid bit is 0, it is determined that prefetching has not occurred. This mechanism avoids repeatedly sending the same prefetch request, saving bus bandwidth and MMU processing resources.

[0061] In implementation, a prefetch request is sent to the memory system only if the first detection result (i.e., no prefetching) is met; this process is a condition-triggered mechanism. If the detection result is that the page table mapping is ready, it means that the required page table mapping relationship is ready, and there is no need to send a prefetch request again, thus avoiding redundant operations. Only when a missing value is confirmed is a prefetch request carrying the target prefetch address sent to the memory system, prompting the MMU to perform page table traversal in advance and fill the result into the cache. Throughout the implementation process, the target prefetch address is the object of judgment, the detection result is the basis for judgment, and the sending action is the final execution output. This design makes the prefetching behavior intelligent and adaptive. For example, when accessing different regions within the same page table consecutively, the second access may have already resulted in the page table entry being in the cache due to the first access or previous prefetch operations. In this case, the detection result is the second detection result, so no new prefetch request will be sent, thereby reducing system overhead.

[0062] For example, if a service request progresses to near the 32KB boundary, the detection unit calculates that the next data segment is located in [32KB, 64KB), determining the target prefetch address to be 32KB. Subsequently, the detection unit checks its internal status and finds that no page table entry at 32KB has been prefetched previously (first detection result), so it immediately sends a prefetch request to the memory system. Meanwhile, the service request continues to transmit data in the [0, 32KB) range. When the service request actually reaches 32KB and begins accessing new data, the MMU's TLB already contains the page table entry information for [32KB, 64KB), achieving zero-wait address translation, greatly improving throughput, and significantly shortening the service request's waiting time at the MMU.

[0063] In this embodiment, on the one hand, the detection unit calculates the target prefetch address pointing to the starting address of the prefetched page table entry based on the access information, so as to accurately locate adjacent page table entries that have not been prefetched, thereby improving the effectiveness and accuracy of prefetching. On the other hand, the prefetch request is sent only when it is confirmed that the page table entry has not yet been prefetched. This mechanism makes the prefetch operation have a clear target orientation, ensuring that the prefetch operation is only for page table entries that are about to be used, thereby avoiding resource waste caused by blind prefetching or address translation delays caused by missed prefetching.

[0064] In some implementations, the access information includes the access address; the memory access request includes the starting address and the request length; the detection unit 12 is used to determine the target prefetch address based on the access address and the prefetch address set; wherein, the prefetch address set is determined based on the starting address, the request length and the size of the page table entry, the size of the page table entry is dynamically configured, the address range corresponding to the burst request is located within the address range corresponding to the memory access request, and the address range corresponding to the memory access request is determined based on the starting address and the request length.

[0065] Here, the access address `current_addr` is a virtual address used to identify the location of the target burst request currently being processed. The purpose of the access address is to track the memory access progress in real time so as to determine whether subsequent memory access operations will cross the current page table boundary, thereby triggering the corresponding prefetch logic.

[0066] During implementation, with each burst request sent by the splitting unit, the access address advances according to the burst access length (burst_size), that is: current_addr = current_addr + burst_size.

[0067] A memory access request is a raw memory access instruction generated by the GPU front-end, containing a specific address and data length. A memory access request includes at least a start address (addr) and a request length (size). The start address is the virtual address corresponding to the first byte of data the memory access request needs to access. The request length is the total number of bytes of data that the memory access request needs to access consecutively. The address range corresponding to the memory access request (i.e., the total address range) is the length range covered by the memory access request, and the end address of this total address range is the start address + request length - 1. In implementation, the address ranges corresponding to each burst request after being split all fall within this total address range.

[0068] PTE_RANGE_SIZE is the length range of the virtual address space corresponding to a single PTE or a translation cache entry. PTE_RANGE_SIZE is a dynamically configurable hardware parameter. During implementation, it can be adjusted to 32KB, 64KB, or other values ​​depending on system architecture, software settings, or performance requirements. For example, when PTE_RANGE_SIZE is configured to 32KB, the virtual address space is divided into intervals such as [0, 32KB), [32KB, 64KB), and [64KB, 96KB). PTE_RANGE_SIZE directly determines the granularity of the detection unit's page cross-page judgment, thus affecting the size of the prefetch address set and the frequency of prefetch requests. A larger page table entry size can reduce the number of prefetches but may increase the amount of data per prefetch, while a smaller page table entry size has the opposite effect (i.e., increasing the number of prefetches but reducing the amount of data per prefetch). Dynamically configuring PTE_RANGE_SIZE during implementation allows the detection unit to adapt to different application scenarios and hardware environments.

[0069] The prefetch address set P_current_prefetch is a pre-computed set of all page table range indices or page table start addresses that may need to be prefetched for a single memory access request. The prefetch address set is determined based on the memory access request's starting address (addr), request length (size), and PTE_RANGE_SIZE. The starting address and request length are the fundamental inputs for determining the prefetch address set. In implementation, a large memory access request may be broken down into multiple smaller burst requests sent to the memory system, but the prefetch address set is calculated based on the original starting address and request length to ensure that all page tables involved within the entire access range are covered in advance.

[0070] The prefetch address set can be determined in any suitable way.

[0071] In some implementations, a correspondence can be pre-established between each starting address, each request length, each PTE_RANGE_SIZE, and each P_current_prefetch. Based on this correspondence, a P_current_prefetch that is compatible with the starting address, request length, and PTE_RANGE_SIZE can be obtained.

[0072] In some implementations, the end address of the memory access, `end_addr` (i.e., `addr + size - 1`), can be calculated first based on the start address and the request length. Then, based on the start address, end address, and `PTE_RANGE_SIZE`, the page table range index `first_range` (i.e., `floor(addr / PTE_RANGE_SIZE)`) where the start address is located and the page table range index `last_range` (i.e., `floor(end_addr / PTE_RANGE_SIZE)`) where the end address is located are calculated respectively. This yields the complete set of translation ranges covered by the current memory access request, `R_current` (i.e., `{first_range, first_range + 1, ..., last_range}`). Since the page table corresponding to the start range (`first_range`) is usually naturally loaded or hit when processing the current burst request, `P_current_prefetch` can be `R_current – ​​{first_range}`, that is, all subsequent page table ranges remaining after excluding the start range. The calculation mechanism of the prefetch address set ensures the accuracy of the prefetch operation and avoids redundant prefetching of unnecessary page tables.

[0073] In some implementations, each page table range index can be further converted into the corresponding page table entry start address (i.e., page table range index). PTE_RANGE_SIZE) is used as P_current_prefetch.

[0074] The target prefetch address is the specific page table prefetch target address that the detection unit determines and sends to the MMU based on the access address and the prefetch address set. Typically, the target prefetch address points to the starting address (i.e., the page table base address) of the next page table to be accessed. By loading the starting address of the page table, the MMU can obtain the entire page table content and update the TLB or other translation caches.

[0075] The target prefetch address can be determined in any suitable way.

[0076] In some implementations, the current page table range index (i.e., floor(current_addr / PTE_RANGE_SIZE)) can be determined first based on the access address and PTE_RANGE_SIZE; then, the current page table range index is compared with each page table range index in P_current_prefetch, and the next page table range index adjacent to the current page table range index is determined as the prefetch page table range index; finally, the target prefetch address (i.e., the prefetch page table range index) is determined based on the prefetch page table range index. PTE_RANGE_SIZE).

[0077] In some implementations, the access address is compared with the starting address of each page table entry in P_current_prefetch, and the starting address of the first page table entry that is greater than the access address is determined as the target prefetch address.

[0078] In some implementations, when the access address plus the remaining address length exceeds the range of the first page table entry, the next unprefetched page table range index is retrieved from the prefetch address set as the prefetch page table range index, and the starting address of the page table entry corresponding to the prefetch page table range index is used as the target prefetch address.

[0079] In implementation, the prefetch address set is a statically calculated list of addresses to be prefetched based on the global starting address and request length before memory access requests begin processing; while the access address is a dynamically changing progress pointer. The detection unit monitors changes in the access address to determine whether a prefetch condition has been triggered (such as the access address approaching or entering a new page table boundary), and then extracts the corresponding target prefetch address from the prefetch address set for prefetching. This mechanism of static planning plus dynamic triggering ensures the integrity of the prefetch range and avoids the problem of prefetching too early or too late.

[0080] For example, suppose the page table entry size PTE_RANGE_SIZE is 32KB, the starting address addr of a memory access request is 4KB, and the request length size is 96KB.

[0081] First, the end address end_addr is calculated to be 100KB (i.e., 4KB + 96KB - 1).

[0082] The starting range index is first_range = floor(4KB / 32KB) = 0.

[0083] The end range index is last_range = floor(100KB / 32KB) = 3.

[0084] The coverage set R_current = {0, 1, 2, 3} corresponds to the page table ranges [0, 32KB), [32KB, 64KB), [64KB, 96KB), and [96KB, 128KB).

[0085] The prefetch address set P_current_prefetch = {1, 2, 3} means that the range of page tables 1, 2, and 3 needs to be prefetched.

[0086] Initially, the access address current_addr = 4KB.

[0087] If the splitting unit sends the first burst, current_addr advances. When it is determined that subsequent access will cross the range [0, 32KB) (i.e., close to the 32KB boundary), the detection unit will retrieve index 1 from the prefetch address set, determine that the target prefetch address is 32KB (i.e., the starting address of the [32KB, 64KB) page table), and send a prefetch request for the target prefetch address to the MMU.

[0088] Subsequently, when current_addr advances to 32KB, it determines that it will cross the range [32KB, 64KB), retrieves index 2, determines that the target prefetch address is 64KB, and sends a prefetch request.

[0089] This process continues until all items in the prefetched address set have been processed or the accessed address exceeds the final range.

[0090] During the implementation, the prefetch address set is first calculated offline or online using the starting address and request length in the memory access request, combined with the dynamically configured page table entry size. This prefetch address set calculation process essentially creates a candidate list of future required page table entries. Subsequently, as the GPU frontend continuously issues burst requests, the access address is continuously updated as a real-time pointer. The detection unit does not prefetch all candidate page table entries at once, but rather accurately identifies the specific target prefetch address based on the access address and the prefetch address set. This mechanism, combining static planning and dynamic triggering, achieves a seamless connection from macro-level access interval planning to micro-level real-time prefetching actions, ensuring that the prefetching behavior is both forward-looking (based on the complete request length) and timely (based on the access address location), thereby minimizing unnecessary bandwidth consumption while ensuring data availability.

[0091] In some implementations, only one page table entry can be prefetched at a time, or multiple page table entries or even all page table entries can be prefetched. In practice, considering the limited capacity of the TLB or other translation cache, it is typically best to prefetch one page table entry at a time.

[0092] It is understood that the prefetch request can be sent at any suitable time, and this application embodiment is not limited to any particular time. In some implementations, the prefetch request can be sent when the first burst request is sent, or it can be sent when the second burst request is sent, or it can be sent when the third burst request (i.e., any burst request between the first and second burst requests) is sent. The first burst request is the first burst request to access the target page table range. The second burst request is the burst request when it is recognized that the next burst request will cross the target page table range.

[0093] In this embodiment, on the one hand, a prefetch address set is constructed by combining the dynamically configured page table entry size with the starting address and length of the original request. This allows the prefetch logic to adapt to page table granularity settings under different system architectures. Compared to fixed-granularity prefetching schemes, dynamic configuration enhances compatibility with diverse hardware and software environments, ensuring accurate identification of cross-page boundaries under different page table coverage ranges, thereby maintaining the flexibility and effectiveness of the prefetch strategy. On the other hand, by triggering specific prefetch actions through a pre-determined prefetch address set combined with real-time updated access addresses, the required page table range can be proactively and accurately identified before the business memory access request actually reaches the MMU. This allows the corresponding page table prefetch request to be sent to the MMU in advance, enabling the required page table entries to be loaded into the TLB or other translation caches in advance.

[0094] In some implementations, the access information also includes the remaining address length; the prefetch address set includes at least one prefetch address; the detection unit is used to determine the remaining address range based on the access address and the remaining address length; and if the end address of the first page entry is within the remaining address range, the prefetch address adjacent to the access address in the prefetch address set is used as the target prefetch address.

[0095] Here, the access information reflects in real time the location of the target burst request currently being processed and the amount of data remaining to be transmitted.

[0096] The remaining address range is the range of addresses that remain covered by the memory access request. This remaining address range can be determined in any suitable manner.

[0097] In some implementations, a correspondence between each access address, each address remaining length, and each remaining address range can be established in advance. Based on this correspondence, a remaining address range that matches both the access address and the address remaining length can be obtained.

[0098] In some implementations, the access address can be used as the first starting address, and the first ending address can be determined based on the access address and the remaining address length. The range formed by the first starting address and the first ending address is called the remaining address range.

[0099] The ending address of the first page entry can be within the remaining address range if: the ending address of the first page entry is not the first ending address, that is, the ending address of the first page entry can be the first starting address, or the ending address of the first page entry can be an address between the first starting address and the first ending address.

[0100] During implementation, when the end address of the first page table entry is determined to be within the remaining address range, it indicates that the remaining address range will extend across page table entries. Therefore, further prefetching may be necessary. Thus, the access address can be directly compared with the starting address of each page table entry in P_current_prefetch, and the starting address of the first page table entry greater than the access address can be determined as the target prefetch address.

[0101] In this embodiment, the target prefetch address is determined by real-time updated access address and address remaining length. This allows for precise determination of whether subsequent data crosses page table entry boundaries during each Burst transmission interval. Consequently, it enables timely and accurate triggering of prefetch requests for future required page table entries, allowing the necessary page table entries to be preloaded into the TLB or other translation cache.

[0102] In some implementations, the access information includes the access address and the remaining address length; the detection unit 12 is also used to update the access address and the remaining address length; wherein the initial value of the access address is the request address of the memory access request, and the initial value of the remaining address length is the request length of the memory access request.

[0103] Here, access information can be a dynamic data structure within the detection unit used to track the progress of raw memory access requests. Access information reflects in real time the location of the currently processing target burst request and the amount of data remaining to be transmitted. In implementation, the access address and remaining address length work together, enabling the hardware module to accurately calculate the address boundary after each burst transfer, thereby determining whether the page table entry's coverage has been exceeded.

[0104] The access address is the starting virtual address of a burst request that is currently being processed or about to be processed, recorded internally by the detection unit. Initially, when a new memory access request enters the processing flow, the access address is initialized to the request address of the memory access request. With each Burst request sent by the splitting unit, the access address advances according to the preset Burst granularity (burst_size). For example, if the Burst granularity is 64 bytes, the access address increases by 64 bytes after each update. This accumulation mechanism ensures that the address pointer always points to the starting position of the next data block to be transferred, providing an accurate reference point for subsequent cross-page table entry determination.

[0105] The remaining address length (current_size) is the total length of data in the current original memory access request that has not yet been transferred via Burst, recorded internally by the detection unit. Initially, the remaining address length is initialized to the request length of the memory access request. Each time the splitting unit successfully sends a Burst request, the remaining address length decreases by one Burst granularity. For example, if the original request length is 1KB and the Burst granularity is 64 bytes, after the first Burst transmission, the remaining address length becomes 976 bytes. The remaining address length not only indicates the remaining workload but is also a crucial basis for determining whether subsequent accesses will exceed the current page table range. In implementation, by comparing the first end address (i.e., access address + remaining address length) with the end address of the current page table entry, the detection unit can quickly predict whether a prefetch operation for the next page table entry is needed.

[0106] For example, suppose the GPU front end receives a memory access request with a starting address of 4KB and a length of 96KB. The detection unit initializes the access address to 4KB and the remaining address length to 96KB. After the first burst (assuming a size of 4KB) is sent, the detection unit updates the access address to 8KB and the remaining address length to 92KB. It then checks whether the new first ending address (i.e., the new access address + the new remaining address length) exceeds the current 32KB page table range. If it does, the prefetch logic is triggered. This state-updated mechanism ensures that prefetch decisions closely follow the actual progress of data transmission, avoiding premature or late prefetching issues caused by static judgments.

[0107] In implementation, the access address determines the physical starting point of data reading, while the remaining address length determines the expected ending point. The access address and the remaining address length together define the address range of the remaining data [current_addr, current_addr + current_Size-1]. When determining whether to cross PTE_RANGE_SIZE, the relationship between the range defined by the access address and the remaining address length and the page table boundary is used to make the decision. For example, if PTE_RANGE_SIZE is 32KB, the access address is 30KB, and the remaining address length is 10KB, then the end of the range is 40KB, clearly crossing the range [32KB, 64KB). In this case, it must be ensured that the next page table entry has been prefetched. This allows for accurate understanding of the remaining data distribution during the processing of the original memory access request, enabling precise determination of whether subsequent data crosses the page table entry boundary at each Burst transfer interval, and thus timely and accurately triggering prefetch requests for future required page table entries.

[0108] In some implementations, once the detection unit confirms that the current Burst has been completely sent to the bus or cache interface by the splitting unit, it triggers a synchronous update of the access address and the remaining address length. This strict timing dependency ensures the consistency of the state machine and prevents errors in prefetch address calculation caused by prematurely modifying state variables before data transmission is complete.

[0109] In practice, the state is first initialized based on the initial request. Then, after each Burst transfer cycle, the access information is updated, and the page table coverage is reassessed using the updated access information. This process is repeated until the remaining address length is zero, marking the completion of the entire memory access request. Through this fine-grained state management and dynamic update strategy, the timing of page table entry prefetching can be optimized to the maximum extent while ensuring data integrity, significantly reducing pipeline downtime caused by page table lookups, and ultimately achieving a high-performance memory access experience.

[0110] In this embodiment, the detection unit synchronously updates the access address and remaining length in real time as burst requests are sent, thereby realizing real-time tracking of the transmission status of external burst requests. This allows for accurate understanding of the current memory access progress relative to the entire request interval. This status tracking mechanism ensures that each detection is based on the latest access context, thus accurately capturing the moment when the page table entry boundary is about to be crossed. This provides an accurate time reference for advance prefetching, avoiding prefetching loss or premature prefetching due to status lag, and effectively hiding page table traversal delay.

[0111] In some implementations, the detection unit 12 is also used to determine the detection result of the target prefetch address based on the prefetch recording information.

[0112] Here, the prefetch log information is a set of status data maintained internally by the detection unit. It records the relevant status and address information of page table entry prefetch operations that have been initiated during the execution of the current memory access task. The core function of the prefetch log information is to implement idempotency control of prefetch operations, that is, to prevent repeated prefetch requests for the same page table entry, thereby saving bus bandwidth and MMU processing resources.

[0113] The prefetch record information may include, but is not limited to, the prefetch record address (prefetched_addr), the prefetch identifier corresponding to the prefetch record address (prefetched_addr_valid), the prefetch counter, and the timestamp.

[0114] `prefetched_addr` is the starting address of the page table entry corresponding to the most recently successfully sent prefetch request, recorded by the detection unit. When the detection unit determines that a subsequent burst request will cross the current page table entry range, it calculates the starting address of the next page table entry to be prefetched and writes this address into `prefetched_addr`. For example, if the current access address advances to the 32KB boundary and `PTE_RANGE_SIZE` is 32KB, `prefetched_addr` will be updated to 64KB (assuming the next page table base address), indicating that a prefetch action has been initiated for a page table entry starting at 64KB. This field ensures accurate tracking of which page table entry has been processed, preventing the same prefetch logic from being triggered again before `current_addr` has fully crossed the current page table coverage.

[0115] `prefetched_addr_valid` can be a Boolean status signal indicating whether the address stored in `prefetched_addr` is in a valid prefetch wait or completed state. When the detection unit sends a prefetch request for a page table entry for the first time, it sets `prefetched_addr_valid` to 1, indicating that the prefetch process corresponding to the first address of that page table entry has started; when the entire original memory access request is completed (i.e., `current_size` is reduced to 0), or when a new independent memory access task begins initialization, the `prefetched_addr_valid` signal is reset to 0.

[0116] In implementation, `prefetched_addr_valid` and `prefetched_addr` together form part of a state machine: only when `prefetched_addr_valid` is 1 and `current_addr` has not exceeded the prefetched record address represented by `prefetched_addr`, will the detection unit suppress the generation of new prefetch requests until `current_addr` advances to a threshold sufficient to trigger the prefetching of the next page entry. The address plus valid bit combination mechanism formed by `prefetched_addr` and `prefetched_addr_valid` ensures accurate matching of address information and avoids misjudgments caused by old data remaining in registers through the valid bit, thus ensuring the robustness of the pre-deduplication logic.

[0117] The detection result of the target prefetch address can be determined in any suitable way.

[0118] In some implementations, if the prefetch recording information includes a prefetch recording address, then if the prefetch recording address is different from the target prefetch address, the first detection result is used as the detection result of the target prefetch address; if the prefetch recording address is the same as the target prefetch address, the second detection result is used as the detection result of the target prefetch address.

[0119] In some implementations, if the prefetching record information includes a prefetch identifier corresponding to the prefetching record address, then if the prefetch identifier corresponding to the prefetching record address is not a first identifier, the first detection result is used as the detection result of the target prefetching address; if the prefetch identifier corresponding to the prefetching record address is a second identifier, the second detection result is used as the detection result of the target prefetching address.

[0120] In some implementations, if the prefetching record information includes a prefetching record address and a prefetching identifier corresponding to the prefetching record address, then if the prefetching record address is different from the target prefetching address, the first detection result is used as the detection result of the target prefetching address; if the prefetching record address is the same as the target prefetching address, the detection result of the target prefetching address can be further determined based on the prefetching identifier corresponding to the prefetching record address.

[0121] In some implementations, the detection unit first uses `current_addr` and `current_size` to monitor in real time whether the current burst transmission touches the page table entry boundary, which is a prerequisite for triggering detection. Then, the detection unit reads the prefetch record information, compares the consistency between the target prefetch address to be crossed and `prefetched_addr`, and combines this with the validity flag of `prefetched_addr_valid` to quickly determine whether the page table entry crossing behavior is a known and already processed situation. If it is determined to be processed, a second detection result (no prefetching required) is output, and subsequent data access is directly allowed. Conversely, if `prefetched_addr_valid` is 0, or `prefetched_addr` points to an earlier page table entry, it is confirmed as a new prefetch request, and a first detection result (i.e., prefetching is required) is generated. This mechanism makes the prefetching behavior both forward-looking (arriving at the MMU before the business request) and accurate (no redundancy, no missed transmissions). This series of operations is completed within a very short clock cycle, efficiently coordinating the timing relationship between prefetch requests and the main data flow without adding extra complex arbitration logic, ensuring the stable operation of the MMU pipeline under high-frequency access. Furthermore, by using prefetch record information to assist in determining the detection results, the detection unit can accurately identify the range of new page tables that truly need to be prefetched in the dynamically changing memory access flow. This avoids duplicate or missed prefetches caused by state synchronization lag, thereby significantly reducing the overhead of invalid operations within the MMU and improving the overall throughput efficiency of the address translation pipeline.

[0122] In some implementations, after sending a prefetch request, the prefetch record information can also be updated to lock in a new prefetch state.

[0123] In this embodiment, by introducing prefetch record information as a basis for judgment, the detection unit has the ability to remember historical prefetching behavior. By using query records rather than relying solely on the current state, it can evaluate from a global perspective which page table entries are already in the prefetching process, so as to accurately identify the range of new page tables that truly need to be prefetched, thereby achieving the coherence and consistency of prefetching decisions.

[0124] In some implementations, the prefetch recording information includes a prefetch recording address; the detection unit 12 is configured to, when the prefetch recording address is different from the target prefetch address, use a first detection result as the detection result of the target prefetch address; when the prefetch recording address is the same as the target prefetch address, use a second detection result as the detection result of the target prefetch address, wherein the second detection result indicates that the second page entry has been prefetched.

[0125] Here, the prefetch record information is a set of data used by the detection unit to manage the prefetch state. The prefetch record address is the core field in the prefetch record information, directly determining the basis for the deduplication logic. The prefetch record address can be a value in a hardware register or a memory unit. For example, when it is detected that a subsequent access will cross the range [32KB, 64KB), the detection unit will send a prefetch request with a prefetch address of 32KB, at which point the prefetch record address will be updated to 32KB.

[0126] The target prefetch address is the starting address of the next target page table entry that needs to be prefetched, calculated by the detection unit at the current moment.

[0127] The first detection result can characterize the state of either no repeated prefetching or the need for a new prefetch. In implementation, when the prefetch record address is inconsistent with the target prefetch address, it means that the page table entry corresponding to the target prefetch address has not yet been recorded as prefetched, and therefore it is determined that a new prefetch operation needs to be performed on the page table entry corresponding to the target prefetch address.

[0128] The second detection result indicates whether a prefetch has already been made or does not require further prefetching. When the prefetch record address is the same as the target prefetch address, it indicates that the second page table entry (or the page table range containing the second page table entry) has already been marked as a prefetch object, and the relevant prefetch request has been issued or is being processed. In this case, the second detection result is used as the detection result of the target prefetch address to instruct the hardware circuitry to suppress the generation of duplicate prefetch requests.

[0129] In implementation, the detection unit compares the prefetch record address with the current prefetch address to determine whether a prefetch of a new page table range is needed, accurately identifying which page table entries have just been prefetched. If the prefetch record address differs from the target prefetch address, it indicates that the current page table range to be prefetched exceeds the previously prefetched range. The first detection result is output, triggering the prefetch action for the target prefetch address. This mechanism prevents the same target prefetch address from being calculated multiple times during continuous burst request transmissions, as the access address pointer advances but remains within the same page table range, thus avoiding redundant prefetch traffic. Furthermore, this simple address comparison mechanism has lower hardware overhead and faster response speed, making it ideal for the high-throughput, low-latency processing requirements of GPU front-ends.

[0130] For example, suppose the prefetch record address has been set to 32KB. As burst requests continue to be sent, current_addr increases from 32KB+1, but before current_addr reaches 64KB, the calculated address to be prefetched is still 32KB (because the entire [32KB, 64KB] interval corresponds to the same prefetch granularity). At this point, the target prefetch address (32KB) equals the prefetch record address (32KB), and the second detection result is output, indicating that the second page table entry has been prefetched. No new prefetch requests are sent until current_addr crosses the 64KB boundary, and a new target prefetch address of 64KB is calculated, at which point prefetching will be triggered again.

[0131] In some implementations, the detection unit first calculates the target prefetch address in real time based on the current memory access context (current_addr, current_size); then, it compares the target prefetch address with the prefetch record address stored in a hardware register. If the comparison result indicates that the prefetch record address is different from the target prefetch address, a first detection result is generated to authorize a new prefetch request, and the prefetch record address is updated after the request is issued; if the comparison result indicates that the prefetch record address is the same as the target prefetch address, a second detection result is generated to mask redundant requests. This fast comparison mechanism based on a single address register ensures that prefetch decisions can be made with minimal latency in high-frequency burst memory access scenarios, guaranteeing timely loading of page table data while minimizing invalid transaction overhead, achieving an optimal balance between performance and power consumption.

[0132] In this embodiment, a simple and direct method is used to determine whether a prefetch has already been performed by comparing the prefetch record address with the current address to be prefetched. This address-matching-based determination logic has low implementation cost and fast response speed, effectively filtering out duplicate prefetch instructions and avoiding sending redundant requests to the memory management unit, thereby reducing bus load and queue pressure and ensuring the efficient operation of the prefetch channel.

[0133] In some implementations, the prefetch recording information includes a prefetch recording address and a prefetch identifier corresponding to the prefetch recording address; the detection unit 12 is used to take the first detection result as the detection result of the target prefetch address when the prefetch recording address is different from the target prefetch address; and to determine the detection result of the target prefetch address based on the prefetch identifier corresponding to the prefetch recording address when the prefetch recording address is the same as the target prefetch address.

[0134] Here, the prefetch record address is the starting address of the page table entry corresponding to the most recently successfully sent page table prefetch request. The target prefetch address is the prefetch address calculated by the detection unit based on the target burst request during the current clock cycle or current processing stage; it specifies the location of the specific prefetch page table entry.

[0135] The prefetch flag indicates whether a prefetch request pointed to by a prefetch record address has been validly issued. It indicates the validity status of the prefetch operation corresponding to the prefetch record address. When the detection unit sends a prefetch request, it writes the starting address of the page table entry of the prefetch request to the prefetch record address and sets the prefetch flag to valid (e.g., set to 1). When all memory access processes within the page table range pointed to by the prefetch record address are completed, or when a new independent prefetch request is detected, the prefetch flag may be reset or updated. The prefetch flag can be a first flag, a second flag, etc. The first flag indicates that the prefetch record address has not been prefetched; the first flag can be 0, FLASE, etc. The first flag indicates that the prefetch request corresponding to the prefetch record address has not taken effect, has been cancelled, or was never initiated; in this case, the prefetch flag is considered invalid. The second flag indicates that the prefetch record address has been prefetched; the second flag can be 1, TRUE, etc. The second identifier indicates that the MMU or prefetch engine has received and is processing (or has completed) the corresponding prefetch request for the page table region pointed to by the prefetch record address. At this time, the prefetch identifier is considered valid, which means that subsequent accesses to the same address range do not need to initiate a prefetch action again.

[0136] In implementation, the prefetch record address and the prefetch flag together constitute an atomic state unit. The prefetch record address provides spatial location, while the prefetch flag provides validity verification in the time or state dimension. In the hardware circuit, this atomic state unit can be a combinational logic block, taking the target prefetch address and the prefetch record address as inputs and the comparison result as output.

[0137] In some implementations, when the prefetch record address is different from the target prefetch address, it can be assumed that the state indicated by the prefetch flag does not affect the determination of the page table range corresponding to the target prefetch address, or that the page table range corresponding to the target prefetch address has not yet been included in previous prefetch batches. Therefore, the first detection result can be directly used as the final detection result. This mechanism avoids repeated queries or complex state backtracking, improving judgment efficiency.

[0138] In some implementations, when the prefetch record address is the same as the target prefetch address, it means that the page table range corresponding to the target prefetch address is exactly the same as the page table range corresponding to the prefetch record address. In this case, the first detection result cannot be simply reused; instead, the prefetch flag must be checked to further determine the detection result. For example, if the prefetch flag is valid, it indicates that the prefetch request for the prefetch record address is already in the queue or has been completed, and there is no need to send it again. The detection result can be determined as no need for repeated prefetching or that it has been processed. If the prefetch flag is invalid, it may indicate that the previous prefetch has been cleared or never actually taken effect. In this case, it may be necessary to re-evaluate or perform the prefetch action. Thus, by introducing the prefetch flag, it is possible to accurately distinguish between cases where the prefetch record address and the target prefetch address are the same but have different states, preventing redundant prefetch requests for the same page table entry, thereby saving MMU resources and bus bandwidth.

[0139] In implementation, the detection unit first obtains the comparison results between the prefetch record address and the target prefetch address in parallel through a comparator. If the comparison results are different, there is no need to read the value of the prefetch flag, and the first detection result is directly used as the final result; if the comparison results are the same, the state of the prefetch flag is sampled synchronously. If the prefetch flag is valid, the final detection result is forced to be set to no prefetching or hit, in order to reduce false positives; if the prefetch flag is invalid, the final detection result may fall back to the first detection result or trigger the re-prefetch logic. This serial dependency ensures that under high-frequency burst access, new addresses can be processed quickly, and duplicate requests for prefetched addresses can be accurately intercepted, achieving a balance between performance and accuracy. In addition, by introducing the prefetch flag into the prefetch record information and binding it to the prefetch record address, a dual judgment mechanism of address matching and state verification is implemented, accurately identifying the actual effective state of the prefetch request, thereby avoiding sending duplicate page table prefetch requests to the MMU.

[0140] In this embodiment, a prefetch flag is further introduced for refined judgment based on address matching, realizing a dual judgment mechanism of address matching and status verification. This enables the detection unit to not only know whether prefetching has occurred, but also to distinguish the specific status of prefetching, such as in progress or completed. This multi-dimensional status awareness capability provides a foundation for more complex prefetching scheduling strategies. For example, it can decide whether to immediately send a new request or wait for the current prefetching to complete based on the flag status, thereby optimizing the overall timing performance and improving the accuracy and resource utilization of prefetching.

[0141] In some implementations, the detection unit 12 is configured to use the first detection result as the detection result of the target prefetch address when the prefetch identifier corresponding to the prefetch record address is a first identifier; and to use the second detection result as the detection result of the target prefetch address when the prefetch identifier corresponding to the prefetch record address is a second identifier.

[0142] Here, the prefetch record address points to the starting address of a specific page table entry or the starting virtual address of the target burst request. The prefetch flag is used to mark the prefetch state of the page table entry corresponding to the prefetch record address. In implementation, there is a tight data binding relationship between the prefetch record address and the prefetch flag. Each time the detection unit updates current_addr and performs a cross-page table entry judgment, a new prefetch record address is generated, and the corresponding prefetch flag is set according to the judgment result. This mechanism accurately reflects the physical characteristics of the current memory access.

[0143] The first identifier indicates a page-crossing or prefetching state. The first detection result typically indicates whether to trigger page table entry prefetching or generate a prefetch request address. The logic for generating the first detection result is only activated when the prefetch identifier is the first identifier. This design makes the prefetching operation highly targeted, generating pre-traffic only when there is actual demand, avoiding bandwidth waste caused by blind prefetching.

[0144] The second flag indicates a steady state or a state requiring no additional action. The second detection result indicates that no new page table entry prefetch request needs to be sent. This means that the MMU can utilize existing TLBs or other translation buffers, and the front end does not need to send additional prefetch instructions to the MMU, thus avoiding unnecessary bus occupation and MMU resource consumption. For example, assuming PTE_RANGE_SIZE is 32KB, the current burst request's addr is 4KB, size is 8KB, and the current burst request's end address is 12KB, the entire access range [4KB, 12KB) falls within the range [0, 32KB). In this case, the detection unit determines that no page table entry needs to be prefetched, sets the prefetch flag corresponding to the prefetch record address to the second flag; then, the second detection result (i.e., no prefetch is triggered) is used as the final detection result for the target prefetch address.

[0145] In implementation, this dual-branch structure ensures that for any input prefetch record address, the detection result corresponding to the prefetch record address can be uniquely determined. It will not miss the requirement of cross-page table entry prefetching, nor will it generate redundant non-cross-page table entry prefetching operations. It can achieve real-time response to memory access patterns with minimal logical overhead.

[0146] In this embodiment, a dual-branch detection mechanism based on prefetch identifiers is introduced to distinguish between two distinct address access scenarios: no prefetching required and prefetching required. This allows for precise control over the timing of prefetch request transmission, thereby avoiding invalid prefetching due to misjudgment. Furthermore, this design makes the prefetch control logic clear and easily extensible, enabling flexible responses to different prefetch lifecycle stages and ensuring the correctness of prefetch decisions under various concurrent scenarios.

[0147] In some implementations, the detection unit 12 is also configured to update the prefetch record information based on the prefetch request.

[0148] Here, a prefetch request is a hardware signal or data packet sent by the detection unit to the memory system to preload second page table entries. A prefetch request may include at least the starting address or virtual address index of the prefetch page table entry. Its core purpose is to allow the MMU to cache the result in the TLB or other translation cache before the business memory access request actually arrives and needs to be translated.

[0149] Prefetch log information is a set of status variables or registers maintained internally by the detection unit. It is used to accurately track the execution status of prefetch operations in the current memory access task, so as to avoid redundant operations and ensure the correctness of prefetch timing. This prefetch log information may include the starting address of the page table entry that has sent a prefetch request (prefetched_addr), the prefetch flag (prefetched_addr_valid), etc.

[0150] The update is a logical process in which the detection unit performs write or flip operations on specific fields in the prefetch record information based on the currently generated prefetch request. Specifically, when the detection unit issues a prefetch request, it synchronously writes the target prefetch address pointed to by the prefetch request into the prefetched_addr field of the prefetch record information, and simultaneously sets the prefetched_addr_valid flag to a valid state (e.g., set to 1). This update operation establishes a causal link between the request being issued and the state being recorded. For example, if the prefetch request targets a page table at address 64KB, the update operation will update prefetched_addr to 64KB and set prefetched_addr_valid to 1.

[0151] In implementation, the prefetch request acts as the trigger source, driving changes to the prefetch record information; the updated prefetch record information, in turn, constrains subsequent prefetching behavior, establishing a closed-loop state management mechanism. Specifically, in subsequent detection cycles, the detection unit reads the prefetch record information. If the currently calculated address to be prefetched is the same as the recorded prefetched_addr and the prefetched_addr_valid flag is valid, it indicates that the target page table entry is in transit or ready. The detection unit will suppress the sending of new prefetch requests, thereby avoiding repeated prefetching of the same page table entry, saving bus bandwidth and MMU resources. This mechanism ensures the accuracy and efficiency of the prefetch operation.

[0152] In this embodiment, the local record is updated immediately after the prefetch request is issued, realizing atomic synchronization between the prefetch action and the state record, establishing a closed-loop state management mechanism, ensuring that subsequent detection logic can always make judgments based on the latest state, eliminating the risk of state inconsistency caused by record update lag, and providing reliable data support for continuous and stable prefetch service.

[0153] In some embodiments, the request processing apparatus 10 further includes a caching unit for caching memory access requests; and a splitting unit 11 for retrieving memory access requests from the caching unit.

[0154] Here, the request buffer is a high-speed storage area within the device used to temporarily store raw memory access requests from the GPU front-end or other request sources. The main function of the request buffer is to decouple the difference between the upstream command generation rate and the downstream splitting and sending rate, ensuring that memory access requests can smoothly and orderly enter the processing flow. In implementation, this request buffer can store one or more memory access requests, which are then sequentially provided to the splitting unit for processing. In some implementations, the request buffer can be composed of a FIFO (First In First Out) queue, an SRAM (Static Random Access Memory) array, etc., with sufficient depth to accommodate multiple concurrent memory access requests. Each cache entry not only stores the data payload of the memory access request but also records key metadata such as the starting address (addr), request length (size), read / write attributes, and request source identifier.

[0155] For example, a cache unit can be an SRAM array, which has fast read and write speeds and low power consumption, making it suitable for high-frequency access scenarios.

[0156] For example, a cache unit can be a FIFO queue, specifically used to temporarily store requests in sequence to ensure the consistency of request processing timing.

[0157] For example, a cache unit may be designed as a multi-port RAM (Random Access Memory) with a write port that receives new write requests and a read port that provides read services to the split unit.

[0158] In some implementations, in different hardware architecture designs, for the cache unit, if the front-end command generation speed fluctuates greatly, a deeper FIFO queue cache may be used to accommodate more burst traffic; while in resource-constrained scenarios, a shallower SRAM may be used in conjunction with flow control signals to manage request queuing.

[0159] In implementation, the cache unit acts as the direct data source for the splitting unit, outputting memory access requests one by one according to a time-ordered or priority strategy. For example, when the GPU front-end issues a large rendering texture read request, the memory access request is first written to the cache unit. After the cache unit confirms that the write is complete, the splitting unit reads the memory access request from the cache unit to initiate subsequent splitting operations. This mechanism avoids request loss or processing delays caused by sudden upstream traffic surges, improving the robustness of the device.

[0160] In practice, by setting up a cache unit in the prefetching device and limiting the splitting unit to fetch requests from the cache unit, buffering and ordered processing of memory access requests are achieved. This eliminates the rate mismatch between upstream command issuance and downstream bus transmission, ensuring that the splitting unit can stably and continuously generate burst requests. This provides a reliable data foundation for the front end to proactively initiate page table entry prefetching, ultimately improving overall memory access efficiency.

[0161] Memory access requests are raw instruction packets generated by the GPU front end that contain the complete access intent.

[0162] The splitting unit obtains memory access requests from the cache unit, indicating that it no longer directly listens to raw requests on the bus, but relies on a stable data stream provided by the cache unit. This change emphasizes the orderliness and stability of the data stream. The core function of the splitting unit is to break down a memory access request into one or more burst requests. A burst request is a sub-request output by the splitting unit, and a burst request can correspond to a continuous range of physical or virtual addresses.

[0163] In some implementations, the splitting unit and the cache unit can be connected via an internal bus or register interface. For example, in the GPU front end, the cache unit provides a complete memory access request descriptor to the splitting unit every clock cycle. After parsing the memory access request descriptor, the splitting unit begins executing the splitting logic. A counter or state machine within the splitting unit tracks the number of bursts sent until all burst requests of the original request have been sent, at which point it retrieves the next new memory access request from the cache unit.

[0164] In some implementations, after the splitting unit has completed sending all burst requests for the previous memory access request, it sends an empty or ready signal to the cache unit. Only then does the cache unit allow the next new memory access request to enter the splitting process. This mechanism ensures that the splitting unit is not interrupted by newly arriving requests while processing long transactions (such as large memory copying), thereby maintaining the continuity of burst transmission.

[0165] A memory system is a collection of backend modules that receive burst requests and perform actual data access or address translation, with the core component being the MMU (Memory Management Unit). The MMU is responsible for performing the translation from virtual addresses to physical addresses.

[0166] There is a close data supply relationship between the caching unit and the subsequent splitting unit. The caching unit acts as a data buffer, outputting stored memory access requests to the splitting unit according to a certain strategy (such as first-in-first-out or priority scheduling). This design allows the splitting unit to read continuously from the cache without waiting for the frontend to generate every request in real time, thereby improving pipeline efficiency and avoiding backend idleness caused by frontend pauses.

[0167] The first Page Entrance (PTE) is the mapping record of the page containing the starting virtual address of the target burst request, which is found by the MMU during address translation. The MMU obtains the first page entry by querying the TLB or traversing the page table, extracting information such as the physical page number and permission bits for subsequent data access.

[0168] In some implementations, the caching unit and the splitting unit can have a strict sequential dependency. The splitting unit can only initiate a read operation after the caching unit has completed the full write to the memory access request and set the valid flag. This synchronization mechanism ensures the integrity of the data obtained by the splitting unit and prevents splitting errors caused by data not being fully ready.

[0169] In some implementations, the splitting unit can monitor the remaining space status of the cache unit in real time during the generation of burst requests. If the cache unit is close to full load, the splitting unit may read the next memory access request while sending subsequent burst requests to the memory system, so that the cache unit has enough space to accept new upstream requests, thereby ensuring the stability of the entire data path.

[0170] In practical implementation, the cache unit acts as a reservoir for the front end, responsible for transforming discrete, potentially bursty memory access requests into a stable data stream. The splitting unit, on the other hand, acts as an shaper, retrieving requests from the cache unit as needed and transforming them into a standard burst request sequence conforming to the underlying bus specification. These two units are tightly coupled; the cache unit provides the splitting unit with a stable and lossless data source, while the splitting unit fully utilizes the buffering capacity of the cache unit to achieve high-throughput request delivery. This architecture not only solves the problem of mismatch between front-end generation speed and back-end processing capacity but also optimizes the memory system's access patterns through refined burst request splitting, ultimately achieving an overall improvement in GPU front-end memory access performance. It is understandable that only when the cache unit and the splitting unit's speeds are matched and their logic coordinated can the memory management unit continuously and efficiently retrieve page table entries, thereby supporting subsequent front-end prefetching logic.

[0171] In this embodiment, on the one hand, an independent cache unit is set up to temporarily store the original memory access requests, decoupling the timing dependency between request reception and request processing. On the other hand, the splitting unit can smoothly obtain complete request information from the cache unit for splitting, avoiding the impact of sudden upstream traffic on the backend processing unit, reducing the rate mismatch between upstream command issuance and downstream bus transmission, and providing a stable and complete source of contextual information for the detection unit, ensuring the continuity and stability of prefetch judgment.

[0172] Based on the above embodiments, this application also provides a request processing method, applied in any of the aforementioned request processing devices, such as... Figure 2 As shown, the request processing method includes steps S21 and S22, wherein: Step S21: Use the splitting unit to split the memory access request into at least two burst requests, and send the target burst request to the memory system; wherein, the target burst request is one of the two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; Step S22: In response to the detection signal corresponding to the target burst request, the detection unit sends the prefetch request corresponding to the access information to the memory system; wherein, the memory management unit is also used to prefetch the second page table entry corresponding to the prefetch request in advance, the second page table entry is adjacent to the first page table entry, and the access information represents the processing progress of the memory access request.

[0173] Here, a memory access request is a raw memory access instruction generated by the GPU front-end after reading and parsing from the command buffer or task queue. A burst request can correspond to a continuous range of physical or virtual addresses. In implementation, the process of splitting this memory access request can be found in the aforementioned device embodiment.

[0174] The memory system is a backend module that receives burst requests and performs actual data access, address translation, etc. In implementation, the process of sending this target burst request can be found in the aforementioned device embodiment.

[0175] The detection signal can be sent by the split unit or automatically generated by the detection unit.

[0176] This access information may include, but is not limited to, the access address current_addr, the remaining address length current_size, etc.

[0177] The second page table entry can be the page table entry that is adjacent to the first page table entry in the virtual address space.

[0178] A prefetch request is a control instruction calculated by the detection unit based on access information, designed to allow the MMU to load adjacent page table entries in advance. In implementation, the process of sending this prefetch request can be found in the aforementioned device embodiment.

[0179] In this embodiment, on the one hand, memory access requests are split into burst requests and sent to the memory system by a splitting unit. This splitting mechanism not only adapts to the underlying transmission granularity but also enables the front end of the memory system (i.e., the request processing device) to monitor address changes in finer granular units, laying the foundation for precise prefetch triggering. On the other hand, by adding a hardware detection unit to the request processing device, and having the detection unit actively send prefetch requests for adjacent page table entries when responding to detection signals, the memory management unit can obtain and cache the second page table entry in advance. Compared to the mechanism in related technologies where the MMU can only passively trigger prefetching after the request arrives, this application achieves parallel execution of prefetching and business memory access request processing. This proactive triggering method not only avoids the problem of prefetching timing delay caused by processing split requests one by one but also ensures that the page table entries to be used later are ready before the actual address translation of the business request, thereby effectively hiding the page table traversal delay, reducing the waiting time of front-end memory access requests, and significantly improving the memory access efficiency of the GPU front end and the access efficiency of the storage system.

[0180] In some implementations, the prefetch request includes a target prefetch address, which is the starting address of the second page table entry; the step S22 of "sending the prefetch request corresponding to the access information to the memory system using the detection unit" includes: using the detection unit to determine the target prefetch address based on the access information; if the detection result of the target prefetch address is a first detection result, using the detection unit to send the prefetch request to the memory system, where the first detection result indicates that the second page table entry has not been prefetched.

[0181] In some implementations, the access information includes the access address; the memory access request includes the starting address and the request length; "determining the target prefetch address based on the access information using the detection unit" includes: determining the target prefetch address based on the access address and the prefetch address set using the detection unit; wherein the prefetch address set is determined based on the starting address, the request length, and the size of the page table entry, the size of the page table entry is dynamically configured, the address range corresponding to the burst request is located within the address range corresponding to the memory access request, and the address range corresponding to the memory access request is determined based on the starting address and the request length.

[0182] In some implementations, the access information also includes the remaining address length; the prefetch address set includes at least one prefetch address; "determining the target prefetch address using the detection unit based on the access address and the prefetch address set" includes: using the detection unit to determine the remaining address range based on the access address and the remaining address length; if the end address of the first page entry is within the remaining address range, using the detection unit to select the prefetch address adjacent to the access address in the prefetch address set as the target prefetch address.

[0183] In some implementations, the access information includes an access address and a remaining address length; the request processing method further includes: updating the access address and the remaining address length using a detection unit; wherein the initial value of the access address is the request address of the memory access request, and the initial value of the remaining address length is the request length of the memory access request.

[0184] In some implementations, the request processing method further includes: using a detection unit to determine the detection result of the target prefetch address based on prefetch record information.

[0185] In some implementations, the prefetch record information includes a prefetch record address; "using the detection unit to determine the detection result of the target prefetch address based on the prefetch record information" includes: when the prefetch record address and the target prefetch address are different, using the detection unit to take the first detection result as the detection result of the target prefetch address; when the prefetch record address and the target prefetch address are the same, using the detection unit to take the second detection result as the detection result of the target prefetch address, wherein the second detection result indicates that the second page entry has been prefetched.

[0186] In some implementations, the prefetching recording information includes a prefetching recording address and a prefetching identifier corresponding to the prefetching recording address; "using the detection unit to determine the detection result of the target prefetching address based on the prefetching recording information" includes: when the prefetching recording address and the target prefetching address are different, using the detection unit to take the first detection result as the detection result of the target prefetching address; when the prefetching recording address and the target prefetching address are the same, using the detection unit to determine the detection result of the target prefetching address based on the prefetching identifier corresponding to the prefetching recording address.

[0187] In some implementations, "using the detection unit to determine the detection result of the target prefetch address based on the prefetch identifier corresponding to the prefetch record address" includes: when the prefetch identifier corresponding to the prefetch record address is a first identifier, using the detection unit to take the first detection result as the detection result of the target prefetch address; when the prefetch identifier corresponding to the prefetch record address is a second identifier, using the detection unit to take the second detection result as the detection result of the target prefetch address.

[0188] In some implementations, the request processing method further includes: using a detection unit to update prefetch record information based on the prefetch request.

[0189] In some embodiments, the request processing apparatus further includes a caching unit; the request processing method further includes: retrieving memory access requests from the caching unit using a splitting unit.

[0190] The descriptions of the above method embodiments are similar to those of the above device embodiments, and have similar beneficial effects. For technical details not disclosed in the method embodiments of this application, please refer to the descriptions of the device embodiments of this application for understanding.

[0191] The technical solution of this application is described in detail below.

[0192] The GPU front-end reads commands from the command buffer or task queue, parses the commands, checks their validity, and splits them into tasks. Based on the address, data length, and operation type described by the command, it generates execution tasks (i.e., tasks that do not require memory access) or memory access requests to be sent to subsequent modules.

[0193] A raw memory access request described by a command typically includes at least the starting address (addr) and the access length (size), and may also include read / write attributes, request source, address space identifier, command identifier, and burst attribute. Depending on the bus width, maximum burst length, and cache boundaries, a raw memory access request may be split into multiple sub-requests or may be transmitted using one or more bursts.

[0194] GPU front-ends and other request sources typically use virtual addresses to initiate memory accesses. Before accessing on-chip cache, video memory, system memory, or other storage resources, virtual addresses need to be translated into corresponding physical addresses by the Memory Management Unit (MMU). The MMU usually selects the corresponding page table based on the address space identifier or page table root identifier, and reads the page table entries level by level according to the index field in the virtual address, ultimately obtaining the physical page number, access permissions, page attributes, and other address translation information.

[0195] Page tables typically employ a multi-level structure. A Page Entries (PTE) or a translation cache entry can correspond to a virtual address range of a certain length, which depends on the specific MMU implementation. For example, a PTE can cover virtual address ranges of 4KB, 32KB, 64KB, or other sizes. Therefore, different virtual addresses, even if belonging to the same original request, may correspond to different PTEs.

[0196] To avoid fully traversing multiple levels of page tables for every memory access, the MMU typically sets up an address translation lookup buffer to cache recently used virtual address-to-physical address mappings. It can also configure a Page Table Walker, a page table cache, a Page Walk Cache (a dedicated high-speed cache designed specifically for the page table walker, a dedicated cache resource within the MMU), or other intermediate-level page table entry caches. When a memory access request arrives at the MMU, it first queries the TLB or relevant translation caches (i.e., the page table walker, page table cache, etc.). If a match is found, the physical address can be obtained directly; if a match is not found, the page table walker needs to access one or more levels of page tables to obtain the target PTE and update the translation cache.

[0197] When the TLB hits, address translation can generally be completed in a short time. When the TLB misses, page table traversal, especially when dealing with off-chip memory or system memory, consumes storage bandwidth and request queue resources. While the address translation result is pending, service memory access requests that depend on it may need to wait in the front-end, MMU, or downstream queues. This waiting can cause pipeline stalls, queue blockages, or prevent subsequent requests from being issued. It may also prevent the cache, storage controller, and external bus from continuously receiving sufficient valid requests. Therefore, address translation efficiency not only affects the completion time of a single request but also the task delivery rate of the GPU front-end, concurrent memory access capabilities, and storage bandwidth utilization.

[0198] Existing MMU prefetching operations perform prefetching on adjacent PTEs or subsequent translation items (i.e., translation requests) based on adjacent addresses, consecutive page numbers, or historical access patterns (usually accessing page tables sequentially by address) when processing arriving translation requests. These methods can improve translation efficiency to some extent, but the decision is usually made by the MMU based on the received business translation requests, the TLB misses that have been sent, or the ongoing page table traversal.

[0199] Because the MMU is downstream of the front end, it typically only obtains the address information of a memory access request after it arrives. Even after the original memory access request is split into multiple sub-requests or bursts, the MMU may not be able to directly know the complete address and size of the original memory access request, nor can it directly see the multiple future memory access requests that have not yet been issued in the GPU front end queue. Therefore, the adjacent item prefetching or historical pattern prefetching within the MMU is somewhat passive: the prefetching action is often triggered only after at least one related business request has entered the address translation stage, limiting the lead time it can provide for hiding Page Walk latency.

[0200] The software can also perform memory prefetching, page dwell, or migration control on the address range before task submission. However, the software has difficulty perceiving the GPU front-end's cycle-by-cycle request splitting, burst processes, and pending queue status. Its control granularity and triggering timing differ from hardware address translation prefetching. Furthermore, the goal of data prefetching or page migration is to prepare business data in advance or change the data dwell location, which is not equivalent to translation prefetching that only establishes virtual address and physical address mappings.

[0201] Therefore, the relevant technology has the following drawbacks: The existing MMU prefetching mechanism can only be activated after the address translation request reaches the MMU, a TLB miss occurs, or part of the PageWalk is completed. It is a passive triggering mechanism with poor timeliness.

[0202] When the original request is split into multiple sub-requests or bursts, the MMU can only see the split requests one by one and cannot know the complete access range of the original request at an earlier time.

[0203] This application provides an address translation prefetch module (i.e., the aforementioned request processing device) actively triggered by the GPU front-end. When the GPU front-end processes memory access tasks, it reads the starting virtual address and access length of the current memory access request through an address detection module (i.e., the aforementioned detection unit) to determine whether the current memory access request crosses the configurable PTE address coverage range. For current memory access requests that cross the PTE address coverage range, it actively sends an address translation prefetch request for the corresponding target range to the MMU. Before the actual address translation of the business memory access request, the MMU pre-compiles the page table traversal and loads the address translation results into the TLB, Page Walk Cache, or other translation caches. Ultimately, this reduces the time spent waiting for page table traversal for business memory access requests, improving the memory access efficiency of the GPU front-end and the access efficiency of the storage system.

[0204] like Figure 3 As shown, this application provides an address translation prefetching module 30 for a GPU front end, which includes a memory access request cache 31 (i.e., the aforementioned cache unit), a memory access request splitting module 32 (i.e., the aforementioned splitting unit), and an address detection module 33 (i.e., the aforementioned detection unit).

[0205] The memory access request cache is used to store one or more memory access requests from the GPU front end, and then send them to the memory access request splitting module in sequence.

[0206] The memory access request splitting module receives a memory access request at a time and splits it into one or more burst requests based on the virtual address addr and access length size, and sends them to the memory system (i.e., the aforementioned memory system).

[0207] The address detection module detects burst requests in the memory access request splitting module in real time. If the address of the original memory access request has a cross-page table entry, it sends a page table entry prefetch request to the memory system.

[0208] Define PTE_RANGE_SIZE as the virtual address coverage length corresponding to a PTE or a translation cache range. PTE_RANGE_SIZE is a configurable parameter and is not limited to 4KB or other fixed values.

[0209] When PTE_RANGE_SIZE is 32KB, the virtual address range can be divided into [0, 32KB), [32KB, 64KB), [64KB, 96KB), etc.

[0210] For memory access requests with virtual address addr and access length size, the following definition applies: end_addr = addr + size -1; first_range = floor(addr / PTE_RANGE_SIZE); last_range = floor(end_addr / PTE_RANGE_SIZE); Therefore, the set of translation ranges covered by the current memory access request is: R_current = {first_range, first_range + 1, …, last_range}; The target set triggered by the current request is: P_current_prefetch = R_current – ​​{first_range}. That is, translation prefetch requests are sent to the entire range covered by the current request, excluding the initial range.

[0211] Each memory access request includes a starting virtual address addr and an access length size. The memory access request splitting module will split it into one or more burst requests. Specifically, each time the memory access request splitting module generates a burst request, addr will advance according to the burst access length (i.e., burst_size), that is, addr = addr + burst_size, size = burst_size.

[0212] Each time the memory access request splitting module sends a burst request, it triggers the address detection module to perform a prefetch logic check. Based on the current burst request's addr and the remaining size, it determines whether subsequent burst requests will cross the page table cache range.

[0213] The address detection module internally maintains the current address of the burst request (current_addr), the current remaining memory access length (current_size), the address of the prefetched request that has been sent (prefetched_addr), and a signal (prefetched_addr_valid) indicating whether the prefetched request address has been sent.

[0214] Initially, current_addr and current_size are the starting virtual address addr and access length size of the memory access request, respectively. Each time the memory access request splitting module sends a burst request, the address detection module updates current_addr and current_size once: current_addr = current_addr + burst_size, current_size = current_size – burst_size.

[0215] If current_addr + current_size exceeds the current page table range, it means that subsequent burst requests will cross the current page table range. Therefore, the address detection module will send a prefetch request for the next page table entry, record prefetched_addr, and set prefetched_addr_valid to 1.

[0216] Assuming the page table cache size is 32KB, the starting virtual address addr of the currently being processed memory access request is 4KB, and the access length size is 20KB, then according to the addr and size of the memory access request, the address range it accesses does not exceed [0, 32KB). Therefore, the address detection module will not send a page table prefetch request.

[0217] Assuming the page table cache size is 32KB, and the currently being processed memory access request has an addr of 4KB and a size of 96KB, then the memory access request will sequentially access the page table ranges [0, 32KB), [32KB, 64KB), [64KB, 96KB), and [96KB, 128KB).

[0218] The memory access request splitting module will split the memory access request into multiple burst requests, each with a length of burst_size. At this time, the address detection module current_addr and current_size will be updated sequentially as follows: current_addr = current_addr + burst_size; current_size = current_size – burst_size; Initially, the memory access request splitting module will send a burst request with addr=4KB and size=burst_size. At this time, based on current_addr and current_size, it is determined that the current burst request will cross the page table range of [0, 32KB) (assuming it will cross the page table range). Therefore, the address detection module will send a 32KB page table prefetch request, update prefetched_addr to 32KB, and set prefetched_addr_valid to 1.

[0219] As long as current_addr has not advanced to 32KB, the next page table has already been prefetched, so the address detection module will not send a prefetch request again.

[0220] When current_addr advances to 32KB, based on current_addr and current_size, it is determined that the memory access request will span [32KB, 64KB). Therefore, the address detection module will send a 64KB page table prefetch request, update prefetched_addr to 64KB, and set prefetched_addr_valid to 1.

[0221] Similarly, when current_addr advances to 64KB, the address prefetch module sends a 96KB page table prefetch request. When current_addr advances to 96KB, based on current_addr and current_size, it is determined that the memory access request will not cross [96KB, 128KB), therefore the address detection module does not need to send a page table prefetch request again.

[0222] Once the memory access request is processed, i.e., when current_size is 0, prefetched_addr_valid will be set to 0.

[0223] In summary, this application provides a GPU front-end address translation prefetch module. Compared to the traditional passive prefetching operation triggered by the MMU, it can determine the range of page tables to be prefetched in advance based on the access request and send a page table prefetch request. This allows the MMU to prefetch page tables in advance and accurately, thereby reducing the time spent waiting for page table traversal for front-end memory access requests and greatly improving memory access efficiency.

[0224] This application involves the following key points: 1) The GPU front-end memory access module mainly calculates and initiates page table entry prefetch requests (PTE prefetch requests). Based on the addr and size of the memory access request, it determines the page table entries to be fetched in advance and sends the page table entry prefetch request. The MMU does not need to passively trigger the prefetch operation.

[0225] 2) The size range of page table entries can be dynamically adjusted to adapt to different system and software settings.

[0226] Compared to the traditional MMU passively triggering page table prefetching operations, this application actively determines and initiates page table entry prefetching requests based on the address and size of the front-end memory access request: 1) Reduce latency caused by page table cache misses. Before memory access requests reach the MMU, proactively send page table entry prefetch requests so that the page table entries that need to be used enter the MMU page table cache in advance, avoiding page table traversal time due to page table miss operations.

[0227] 2) Accurately send the required page table entry prefetching request according to the memory access request. Traditional MMU prefetching operation performs prefetching operation according to each page table translation request, which may result in prefetching page table entries that are not needed.

[0228] It should be noted that, in the embodiments of this application, if the above methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of software products. These software products are stored in a storage medium and include several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0229] This application also provides a graphics processor including any of the aforementioned request processing devices. The graphics processor can be a standalone GPU chip, a GPU module integrated into a System-on-Chip (SoC), or a dedicated graphics accelerator card in a high-performance computing device. In practical implementation, the graphics processor acts as a whole system, with its internal modules working collaboratively to achieve efficient address translation prefetching. Specifically, the splitting and detection units in the GPU front end constitute the core of the prefetching device, and they are tightly coupled with the downstream memory system (including the MMU, TLB, and external storage interfaces). The entire process forms a closed-loop feedback chain of splitting-sending-detecting-prefetching, significantly reducing address translation latency without increasing the number of main memory accesses. Compared to traditional graphics processor architectures that rely solely on the MMU to passively wait for a TLB miss before prefetching, this application utilizes the complete known request context (addr and size) in the front end, resulting in greater lead time and a higher prefetch hit rate. This not only hides the latency caused by page table traversal but also reduces pipeline bubbles caused by address translation waiting, thereby improving the overall computational efficiency of the graphics processor and the bandwidth utilization of the storage system.

[0230] This application also provides an electronic device including the aforementioned graphics processor. This electronic device can be various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or it can be implemented as a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0231] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0232] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0233] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0234] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0235] In addition, each functional unit in the embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0236] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory, magnetic disks, or optical disks.

[0237] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.

[0238] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A request processing apparatus, characterized in that, It includes a splitting unit and a detection unit, wherein: The splitting unit is used to split a memory access request into at least two burst requests and send a target burst request to the memory system; wherein, the target burst request is one of the at least two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; The detection unit is configured to send a prefetch request corresponding to the access information to the memory system in response to the detection signal corresponding to the target burst request; wherein, the memory management unit is further configured to prefetch the second page table entry corresponding to the prefetch request, the second page table entry being adjacent to the first page table entry, and the access information representing the processing progress of the memory access request.

2. The request processing apparatus according to claim 1, characterized in that, The prefetch request includes a target prefetch address, which is the starting address of the second page table entry; The detection unit is further configured to determine the target prefetch address based on the access information; If the detection result of the target prefetch address is the first detection result, the prefetch request is sent to the memory system, where the first detection result indicates that the second page table entry has not been prefetched.

3. The request processing apparatus according to claim 2, characterized in that, The access information includes the access address; the memory access request includes the starting address and the request length. The detection unit is used to determine the target prefetch address based on the access address and the prefetch address set; wherein the prefetch address set is determined based on the starting address, the request length and the size of the page table entry, the size of the page table entry is dynamically configured, the address range corresponding to the burst request is located within the address range corresponding to the memory access request, and the address range corresponding to the memory access request is determined based on the starting address and the request length.

4. The request processing apparatus according to claim 3, characterized in that, The access information also includes the remaining address length; the prefetch address set includes at least one prefetch address; The detection unit is configured to determine the remaining address range based on the access address and the remaining address length; and if the end address of the first page table entry is within the remaining address range, the prefetch address adjacent to the access address in the prefetch address set is used as the target prefetch address.

5. The request processing apparatus according to claim 2, characterized in that, The access information includes the access address and the remaining length of the address; The detection unit is further configured to update the access address and the remaining address length; wherein the initial value of the access address is the request address of the memory access request, and the initial value of the remaining address length is the request length of the memory access request.

6. The request processing apparatus according to claim 2, characterized in that, The detection unit is also used to determine the detection result of the target prefetch address based on the prefetch recording information.

7. The request processing apparatus according to claim 6, characterized in that, The prefetching record information includes the prefetching record address; The detection unit is configured to, when the prefetch record address is different from the target prefetch address, use the first detection result as the detection result of the target prefetch address; or, when the prefetch record address is the same as the target prefetch address, use the second detection result as the detection result of the target prefetch address, wherein the second detection result indicates that the second page table entry has been prefetched.

8. The request processing apparatus according to claim 6, characterized in that, The prefetch record information includes the prefetch record address and the prefetch identifier corresponding to the prefetch record address; The detection unit is configured to, when the prefetch record address is different from the target prefetch address, use the first detection result as the detection result of the target prefetch address; or, when the prefetch record address is the same as the target prefetch address, determine the detection result of the target prefetch address based on the prefetch identifier corresponding to the prefetch record address.

9. The request processing apparatus according to claim 8, characterized in that, The detection unit is configured to, when the prefetch identifier corresponding to the prefetch record address is a first identifier, use the first detection result as the detection result of the target prefetch address; or, when the prefetch identifier corresponding to the prefetch record address is a second identifier, use the second detection result as the detection result of the target prefetch address.

10. The request processing apparatus according to claim 6, characterized in that, The detection unit is also configured to update the prefetch record information based on the prefetch request.

11. The request processing apparatus according to any one of claims 1 to 10, characterized in that, The request processing device further includes a caching unit; The cache unit is used to cache the memory access request; The splitting unit is used to obtain the memory access request from the cache unit.

12. A request processing method, characterized in that, The request processing method, applied in a request processing apparatus including a splitting unit and a detection unit, includes: A splitting unit is used to split a memory access request into at least two burst requests, and a target burst request is sent to the memory system; wherein, the target burst request is one of the at least two burst requests, and the memory system includes a memory management unit, which is used to obtain the first page table entry corresponding to the target burst request; In response to the detection signal corresponding to the target burst request, the detection unit sends the prefetch request corresponding to the access information to the memory system; wherein, the memory management unit is further configured to prefetch the second page table entry corresponding to the prefetch request, the second page table entry being adjacent to the first page table entry, and the access information representing the processing progress of the memory access request.

13. A graphics processor, characterized in that, Includes the request processing apparatus according to any one of claims 1 to 11.

14. An electronic device, characterized in that, Includes the graphics processor as described in claim 13.