Electronic device for prefetching data by predicting memory address and method for operating same
By predicting memory addresses and prefetching data into a preloader cache, the processor reduces pipeline stalls and improves performance by ensuring data is readily available for subsequent operations, addressing the inefficiency of repeated data loading from the L1 cache.
Patent Information
- Application Number
- PCT/KR2023/012771
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-11
- Filing Date
- 2023-08-29
- Publication Date
- 2024-10-17
AI Technical Summary
Pipeline stalls occur in processors when executing applications like machine learning and blockchain, leading to reduced performance due to the need to reload data from the L1 cache for subsequent operations, which can be time-consuming and inefficient.
The electronic device predicts memory addresses using stride patterns to prefetch data into a preloader cache, allowing it to bypass loading data from the L1 cache again, thereby reducing pipeline stalls by preloading memory required for the next operation into the preloader cache.
This approach reduces pipeline stalls by ensuring that data needed for the next operation is already in the preloader cache, eliminating the need for repeated data loading from the L1 cache, thus enhancing processor performance.
Smart Images

Figure KR2023012771_17102024_PF_FP_ABST
Abstract
Description
Electronic device for prefetching data by predicting memory addresses and its operating method
[0001] An electronic device and method of operating the same for prefetching data by predicting a memory address are described.
[0002] This application is the result of research conducted with the support of the National IT Industry Promotion Agency (NIPA) with funding from the government (Ministry of Science and ICT) in 2023 (Project No.: RS-2022-00155966, Project Name: Artificial Intelligence Convergence Innovation Human Resources Development (Ewha Womans University), National Project Number: 1711179344).
[0003] In addition, this application is the result of research conducted with the support of the National IT Industry Promotion Agency (NIPA) with funding from the government (Ministry of Science and ICT) in 2023 (Project No.: 2021-0-02068, Project Name: Artificial Intelligence Innovation Hub Research and Development, National Project Unique Number: 1711193622).
[0004] In addition, this application is the result of research conducted with the support of the National Research Foundation of Korea with funding from the government (Ministry of Science and ICT) in 2023 (Project No.: 2021R1G1A1092196, Project Name: Fine Power Management Techniques for Massively Parallel Processors, National Project Unique Number: 1711189100).
[0005] Processors can run applications such as machine learning and blockchain. When executing applications on a processor, pipeline stalls can occur, as one instruction completes its computation before the next instruction begins. Reducing pipeline stalls leads to higher processor performance. Therefore, active research is being conducted to reduce these pipeline stalls.
[0006] The present disclosure can reduce pipeline stalls by preloading memory required for the next operation into a preloader cache using the memory address used in the operation.
[0007] The present disclosure can reduce pipeline stalls by prefetching memory required for the next operation into the preloader cache, thereby eliminating the need to load data into the L1 cache again even if the data is fetched from the L1 cache.
[0008] An operating method of an electronic device according to one embodiment of the present disclosure may include the steps of sampling prior demand memory addresses included in a prior demand memory request, generating a prefetch memory request based on a stride between the sampled prior demand memory addresses, transmitting a prefetch memory response according to the prefetch memory request to a preloader, and storing prefetch data included in the prefetch memory response and a prefetch memory address corresponding to the prefetch data in a preloader cache.
[0009] The step of generating the prefetch memory request may predict the prefetch memory address based on the step width and generate the prefetch memory request including the prefetch memory address.
[0010] The stride includes one or a combination of two or more of an intra-warp pattern stride and an inter-warp pattern stride, and the step of generating the prefetch memory request may determine the prefetch memory request by determining a priority of the intra-warp pattern stride higher than the inter-warp pattern stride.
[0011] The step of generating the above prefetch memory request may generate the prefetch memory request based on the intra-warp pattern stride when the stride includes both an intra-warp pattern stride and an inter-warp pattern stride and the prefetch memory address based on each of the intra-warp pattern stride and the inter-warp pattern stride are different.
[0012] The method may further include a step of transmitting a demand memory request for the next operation from the LDST unit (load / store unit) to the preloader, and a step of transmitting data required for the next operation to the LDST unit based on a demand memory address included in the demand memory request and the prefetch memory address.
[0013] The step of transmitting data required for the above-described next operation to the LDST unit may include transmitting the prefetch data corresponding to the prefetch memory address from the preloader cache to the LDST unit when the requested memory address and the prefetch memory address match.
[0014] The step of transmitting data required for the above-described next operation to the LDST unit may include, when the requested memory address and the prefetch memory address are different, transmitting the requested memory request to a lower cache and transmitting the data from the lower cache that received the requested memory request to the LDST unit.
[0015] The above preloader cache may include a plurality of entries, and each of the plurality of entries may include a status bit indicating the status of the entry.
[0016] The method may further include updating the status bits depending on whether the prefetch memory request has been generated, whether the prefetch memory response has reached the preloader before the requested memory request is generated, and whether the requested memory address and the prefetch memory address match.
[0017] The step of storing in the above preloader cache may generate a plurality of sub-prefetch memory requests and store the prefetch memory address based on the plurality of sub-prefetch memory requests.
[0018] According to one embodiment of the present disclosure, an operating method of an electronic device may include the steps of generating a prefetch memory request based on a stride of sampled previous request memory addresses, storing prefetch data included in a prefetch memory response which is a response to the prefetch memory request and a prefetch memory address corresponding to the prefetch data in a preloader cache, determining whether a request memory address included in a request memory request for a next operation generated from an LDST unit and the prefetch memory address stored in the preloader cache match, and if the request memory address and the prefetch memory address match, transmitting the prefetch data to the LDST unit, and if the request memory address and the prefetch memory address do not match, forwarding the request memory request to a lower cache of the preloader cache.
[0019] An electronic device according to an embodiment of the present invention includes a processor that samples prior demand memory addresses included in a prior demand memory request, generates a prefetch memory request based on a stride between the sampled prior demand memory addresses, transmits a prefetch memory response according to the prefetch memory request to a preloader, and stores prefetch data included in the prefetch memory response and a prefetch memory address corresponding to the prefetch data in a preloader cache, wherein the processor includes the preloader that generates the prefetch memory request, and the preloader may include the preloader cache that stores the prefetch memory address and the prefetch data.
[0020] The processor can predict the prefetch memory address based on the step and generate the prefetch memory request including the prefetch memory address.
[0021] The above stride includes one or a combination of two or more of an intra-warp pattern stride and an inter-warp pattern stride, and the processor can determine the prefetch memory request by determining a priority of the intra-warp pattern stride higher than the inter-warp pattern stride.
[0022] The processor may generate the prefetch memory request based on the intra-warp pattern stride when the stride includes both an intra-warp pattern stride and an inter-warp pattern stride and the prefetch memory address based on each of the intra-warp pattern stride and the inter-warp pattern stride are different.
[0023] The processor can transmit a demand memory request for the next operation from the LDST unit to the preloader, and transmit data required for the next operation to the LDST unit based on a demand memory address included in the demand memory request and the prefetch memory address.
[0024] The processor may transmit the prefetch data corresponding to the prefetch memory address from the preloader cache to the LDST unit when the requested memory address and the prefetch memory address match.
[0025] The processor may, when the requested memory address and the prefetch memory address are different, transfer the requested memory request to a lower cache and transmit the data from the lower cache that received the requested memory request to the LDST unit.
[0026] The above preloader cache may include status bits indicating the status of entries included in the above preloader cache.
[0027] The processor can generate a plurality of sub-prefetch memory requests and merge the plurality of sub-prefetch memory requests to generate the prefetch memory address.
[0028] According to one embodiment of the present disclosure, pipeline stalls can be reduced by preloading memory required for the next operation into a preloader cache.
[0029] According to one embodiment of the present disclosure, by prefetching memory required for the next operation into the preloader cache, even if data is fetched from the L1 cache, there is no need to load the data into the L1 cache again.
[0030] FIG. 1 is a diagram illustrating an electronic device according to one embodiment of the present disclosure.
[0031] FIG. 2 is a drawing for explaining a GPU according to one embodiment of the present disclosure.
[0032] Figures 3a and 3b are drawings for explaining the stride.
[0033] Figures 4a to 4d are diagrams for explaining multiple prefetching scenarios.
[0034] FIG. 5 is a flowchart illustrating the operation of an electronic device including a preloader according to one embodiment of the present disclosure.
[0035] FIG. 6 is a flowchart illustrating the operation of a GPU according to one embodiment of the present disclosure.
[0036] FIGS. 7A to 7C are drawings for explaining the operation of a preloader according to one embodiment of the present disclosure.
[0037] FIG. 8 is a diagram for explaining a status update of an entry according to one embodiment of the present disclosure.
[0038] FIG. 9 is a flowchart illustrating the operation of an electronic device according to one embodiment of the present disclosure.
[0039] Hereinafter, embodiments will be described in detail with reference to the attached drawings. However, the scope of the patent application is not limited or restricted by these embodiments. The same reference numerals in each drawing represent the same components.
[0040] The embodiments described below may be modified in various ways. The embodiments described below are not intended to be limiting in their specific form, and should be understood to encompass all modifications, equivalents, and alternatives thereof.
[0041] While terms like "first" and "second" may be used to describe various components, these terms should be understood only to distinguish one component from another. For example, a "first" component may be referred to as a "second" component, and similarly, a "second" component may also be referred to as a "first" component.
[0042] The terms used in the examples are used only to describe specific embodiments and are not intended to limit the embodiments. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this specification, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among the phrases, or all possible combinations thereof. In this specification, it should be understood that the terms "comprise" or "have" and the like specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0043] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the art to which the embodiments pertain. Terms defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and shall not be interpreted in an idealized or overly formal sense unless explicitly defined herein.
[0044] In addition, when describing with reference to the attached drawings, identical components will be assigned the same reference numerals regardless of the drawing numbers, and redundant descriptions thereof will be omitted. When describing embodiments, if a detailed description of a related known technology is judged to unnecessarily obscure the gist of the embodiment, the detailed description will be omitted.
[0045] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.
[0046]
[0047] FIG. 1 is a diagram illustrating an electronic device according to one embodiment of the present disclosure.
[0048] Referring to FIG. 1, an electronic device (100) is illustrated. The electronic device (100) may include a processor (110). Only components related to embodiments of the present disclosure are illustrated in the electronic device (100) illustrated in FIG. 1. Accordingly, it will be apparent to those skilled in the art that the electronic device (100) may further include other general-purpose components in addition to the components illustrated in FIG. 5.
[0049] The processor (110) may perform a role of performing overall functions for controlling the electronic device (100). The processor (110) may control the electronic device (100) overall by executing programs and / or commands stored in a memory (not shown). The processor (110) may be implemented as a central processing unit (CPU), a graphics processing unit (GPU), a tensor processing unit (TPU), and a neural processing unit (NPU) provided in the electronic device (100), but is not limited thereto.
[0050] The processor (110) may include a preloader (111). The preloader (111) may include a cache (not shown). The preloader (111) is a type of prefetcher, but will be referred to as a preloader (111) to distinguish it from a prefetcher that does not include a cache (not shown). The cache (not shown) included in the preloader (111) may be referred to as a preloader cache. The preloader (111) may calculate a stride using a memory address already generated in a previous operation. The preloader (111) may predict the next memory address using this stride. The preloader (111) may generate a prefetch memory request to preload data stored in the predicted next memory address into the preloader cache.
[0051] For convenience of explanation, the present disclosure will be described below using a GPU, which is an example of a processor (110). However, it will be apparent to those skilled in the art that the following description can also be applied to a CPU, TPU, and NPU, as long as they include a preloader, in addition to a GPU.
[0052]
[0053] FIG. 2 is a drawing for explaining a GPU according to one embodiment of the present disclosure.
[0054] Referring to FIG. 2, a GPU (200) according to an embodiment of the present disclosure is illustrated. The GPU (200) may include a thread block scheduler, a plurality of streaming multiprocessors (210-1, 210-2, 210-N), an interconnection, a shared L2 cache (220), and a global memory (230).
[0055] Each of a plurality of streaming multiprocessors (210-1, 210-2, 210-N) (hereinafter, SM) can execute thousands of threads simultaneously. Each SM can include hundreds of cores called streaming processors (hereinafter, SPs) (213). The SPs (213) can perform arithmetic operations. Threads scheduled to the SMs can be divided into a plurality of warps. The plurality of warps can be scheduled to the SPs (213) by a warp scheduler (211) using various scheduling policies.
[0056] The GPU (200) may have a memory hierarchy similar to that of a CPU. The SM may include a large-sized register file (212). The SM may include an L1 cache (216) and a scratchpad memory (217) as lower layers of the register file (212). Finally, the GPU (200) may include a shared L2 cache (220) and a global memory (230) shared by all scheduled threads.
[0057] Data may need to be loaded into the register file (212) to be used by an instruction. Therefore, memory latency can be reduced through prefetching, which loads data in advance into the immediate lower cache of the register file (212).
[0058] The SM may include a preloader (215). The preloader (215) may perform prefetching. The preloader (215) may be a type of prefetcher that performs prefetching. However, the preloader (215) may further include a preloader cache that stores prefetch memory addresses and prefetch data within it.
[0059] The preloader (215) can prefetch data from the lower cache, L1 cache (216), shared L2 cache (220), or global memory (230). Hereinafter, data prefetched from the L1 cache (216), shared L2 cache (220), or global memory (230) will be referred to as prefetch data. In addition, the address of the memory where the prefetch data is stored will be referred to as a prefetch memory address. The preloader (215) can store the prefetch data in the preloader cache. The preloader cache can also be referred to as an L0 cache in the sense that it is higher than the L1 cache. In other words, the L0 cache can be used to store the prefetch data. When the preloader (215) receives a demand memory request from the LDST unit (load / store unit), it can compare the demand memory address included in the demand memory request with the prefetch memory address included in the preloader cache. Depending on the comparison result, the preloader (215) can pass the prefetch data to the LDST unit or pass the required memory request to the lower cache.
[0060] Below, we will explain how the preloader (215) and the prefetcher predict the prefetch memory address.
[0061]
[0062] Figures 3a and 3b are diagrams illustrating the stride. In Figures 3a and 3b, we will explain a method for determining the stride and prefetching data into the L1 cache based on a prefetcher that does not include a preloader cache, rather than a preloader that includes the preloader cache described above.
[0063] However, it will be apparent to those skilled in the art that the method described below can also be applied to a preloader that includes a preloader cache. In this case, when the preloader performs the method described below, the prefetch data may be stored in the preloader cache rather than the L1 cache, as illustrated in FIGS. 6, 7a, 7b, and 7c.
[0064] Referring to FIGS. 3A and 3B , a method for determining a stride for predicting a prefetch memory address is illustrated. Specifically, FIG. 3A illustrates a method for determining an intra-warp pattern stride and prefetching data. FIG. 3B illustrates a method for determining an inter-warp pattern stride and prefetching data.
[0065] In FIGS. 3A and 3B, block (301) may represent a previous requested memory address according to a previous requested memory request. Block (303) may represent a prefetch memory address included in a prefetch memory request. Block (305) may represent a requested memory address included in a requested memory request for a next operation.
[0066] The previous requested memory address in a previous request for memory may refer to the memory address where data used in the previous operation is stored. The prefetch memory address included in a prefetch memory request may refer to the memory address where data predicted by the prefetcher to be used in the next operation is stored. The requested memory address included in a request for memory for the next operation may refer to the memory address where data required for the next operation requested by the LDST unit is stored.
[0067] Intra-warp pattern stride may be an algorithm that predicts prefetch memory addresses using the stride between request memory requests generated from the same warp. The prefetcher may sample previous request memory addresses included in previous request memory requests generated from the same warp. The prefetcher may determine a prefetch memory address based on the stride between the sampled previous request memory addresses. The prefetcher may load and store prefetch data, which is data stored at the determined prefetch memory address, into the L1 cache. In other words, the prefetcher may perform prefetching on the prefetch data. Subsequently, when a request memory request for the next operation occurs, the prefetcher may compare the request memory address included in the request memory request with the prefetch memory address stored in the L1 cache. If the request memory address and the prefetch memory address match, the prefetcher may transfer the prefetch data from the L1 cache to the LDST unit.
[0068] For example, referring to FIG. 3a, the prefetcher can sample previous request memory addresses included in the previous request memory request generated from the same warp #00. The prefetcher can calculate the stride between the previous request memory addresses 0x0100 and 0x0200 (① in FIG. 3a). At this time, the stride may be 0x0100, which is the difference between 0x0100 and 0x0200. Using the stride, the prefetcher can predict the prefetch memory address where the prefetch data required for the next operation is stored as 0x0300 (② in FIG. 3a). The prefetcher can load and store the prefetch data located at 0x0300 in the L1 cache. When a request memory request with a request memory address of 0x0300 is generated from warp #00 for the next operation, the LDST unit can transmit the request memory request to the L1 cache. At this time, the prefetch data stored in the L1 cache and corresponding to the prefetch memory address 0x0300 can be transmitted to the LDST unit. On the other hand, if the requested memory address and the prefetch memory address are different, the requested memory request can be forwarded to a lower cache (e.g., the L2 cache).
[0069] Inter-warp pattern stride can be an algorithm that predicts prefetch memory addresses using the stride between request memory requests generated from different warps. The prefetcher can sample previous request memory addresses included in previous request memory requests generated from different warps. The step of determining the stride using the sampled previous request memory addresses is identical to the intra-warp pattern stride, so a detailed explanation will be omitted.
[0070] For example, referring to FIG. 3b, the prefetcher can sample previous request memory addresses 0x0100 and 0x0200 from different warps #00 and #01, respectively. The prefetcher can determine a stride as 0x0100 using the previous request memory addresses 0x0100 and 0x0200 (① in FIG. 3b). Using the stride, the prefetcher can predict a prefetch memory address where prefetch data required by warp #02 for the next operation is located as 0x0300 (② in FIG. 3b). The prefetcher can load and store the prefetch data located at 0x0300 into the L1 cache. When a request memory request with a request memory address of 0x0300 is generated from warp #02 for the next operation, the LDST unit can transmit the request memory request to the L1 cache. At this time, the prefetch data stored in the L1 cache and corresponding to the prefetch memory address 0x0300 can be transmitted to the LDST unit. On the other hand, if the requested memory address and the prefetch memory address are different, the requested memory request can be transmitted to a lower cache (e.g., the L2 cache).
[0071] Below, we will describe scenarios that can occur when data is prefetched into the L1 cache.
[0072]
[0073] Figures 4a to 4d are diagrams for explaining multiple prefetching scenarios.
[0074] Referring to FIGS. 4A to 4D , a GPU (400) may include a streaming multiprocessor (410), an interconnection (420), an L2 cache (430), and a global memory (440). The streaming multiprocessor (410) may include a register file (411), an LDST unit (413), a prefetcher (415), and an L1 cache (417).
[0075] Referring to FIG. 4A, in ①, the prefetcher (415) can predict a prefetch memory address, which is an address of prefetch data to be used in the next operation. The prefetcher (415) can generate a prefetch memory request including the prefetch memory address and transmit the prefetch memory request to the L1 cache. The prefetch memory request can check whether the prefetch data corresponding to the prefetcher memory address is loaded in the L1 cache. If the prefetch data is not loaded, a cache miss may occur. If a cache miss occurs, the prefetch memory request may be transmitted to the L2 cache (430), which is a lower cache, and / or the global memory (440) through the interconnection (420).
[0076] ② In case that prefetch data corresponding to the prefetcher memory address exists in the L2 cache (430) and / or global memory (440), a prefetch memory response according to the prefetch memory request may be generated. The prefetch memory response may be transmitted to the L1 cache (417) via the interconnection (420). The prefetch memory response may include prefetch data corresponding to the prefetcher memory address. The prefetch data and the prefetch memory address corresponding to the prefetch data may be stored in the L1 cache (417).
[0077] ③ In the LDST unit (413), a request memory request can be generated to load data stored in the L1 cache (417) into the register file (411). When the request memory request is transmitted to the L1 cache (417), the request memory address included in the request memory request can be compared with a prefetch memory address stored in the L1 cache (417). If the request memory address and the prefetch memory address match, a cache hit can occur.
[0078] ④ In case of a cache hit, prefetch data may be transferred from the L1 cache (417) to the register file (411) via the LDST unit (413). If a cache hit occurs, the requested memory request may not be transferred to a lower cache of the L1 cache (417). If a cache miss occurs, the requested memory request may be transferred to the L2 cache (430), which is a lower cache of the L1 cache (417), and / or the global memory (440).
[0079] That is, after a prefetch memory request occurs, a demand memory request occurs so that prefetch data can be loaded into the L1 cache (417) in advance. At this time, the demand memory request does not need to be transferred to a lower cache of the L1 cache (417), so memory delay is reduced and a high performance improvement can be obtained.
[0080] Referring to FIG. 4B, in ①, the prefetcher (415) can predict a prefetch memory address, which is the address of the prefetch data to be used in the next operation. The prefetcher (415) can generate a prefetch memory request including the prefetch memory address and transmit the prefetch memory request to the L1 cache. At this time, a cache hit may occur because the prefetch data has already been loaded into the L1 cache (417). The prefetch memory request may be deleted due to a cache hit.
[0081] ②, the LDST unit (413) may generate a request memory request to load data stored in the L1 cache into the register file (411). When the request memory request is transmitted to the L1 cache (417), the request memory address included in the request memory request may be compared with a prefetch memory address stored in the L1 cache (417). If the request memory address and the prefetch memory address match, a cache hit may occur.
[0082] ③ In case a cache hit occurs, prefetch data can be transferred from the L1 cache (417) to the register file (411) through the LDST unit (413).
[0083] However, since data has already been loaded into the L1 cache (417) in Fig. 4b, there is no effect due to prefetching.
[0084] Referring to Fig. 4c, steps ① and ② described in Fig. 4a will be omitted.
[0085] A GPU may be structured to execute thousands of threads simultaneously and share an L1 cache (417). Therefore, the size of the L1 cache (417) may be limited.
[0086] Accordingly, in ③, the prefetch data stored in the L1 cache (417) can be eviction through steps ① and ②. For example, before the required memory request reaches the L1 cache (417), the prefetch data can be eviction by a required memory request of another warp (or thread), and the data required by the other warp (or thread) can be written.
[0087] ④ In the request memory request, a request may be made after the prefetch data has already been extracted. Therefore, even if the request memory request is delivered to the L1 cache (417), a cache miss may occur because the prefetch data has already been extracted. Accordingly, the request memory request may be delivered to the L2 cache (430) or global memory (440) via the interconnection (420).
[0088] ⑤ In response to a memory request, data can be transferred from the L2 cache (430) or global memory (440) to the register file (411) through the LDST unit (413).
[0089] In other words, even though the prefetch data was normally loaded into the L1 cache (417), there may be a problem in which hundreds of cycles are required to load the data again from the L2 cache (430) or global memory (440) due to the extraction. Accordingly, the load on the L1 cache (417), interconnection (420), L2 cache (430), and global memory (440) may increase. Ultimately, memory latency may increase sharply, which may reduce the performance of the GPU.
[0090] Referring to FIG. 4d, in ①, the prefetcher (415) predicts the prefetch memory address where the prefetch data required for the next operation is located, but the prediction may be incorrect. That is, although the prefetch data can be loaded into the L1 cache (417) through steps ① and ② described in FIG. 4a, the prediction may be incorrect, and the prefetch data may unnecessarily occupy only the space of the L1 cache (417).
[0091] ③ In step ③, the LDST unit (413) generates a memory request to load data stored in the L1 cache (417) into the register file (411), but a cache miss may occur due to an error in the prediction of the prefetch memory address. The steps after the cache miss occurs will be omitted as described above in FIG. 4c.
[0092] As a result, even if the prediction is incorrect, memory latency can increase dramatically, leading to a decrease in GPU performance, similar to when prefetch data is extracted. However, since applications running on GPUs generally have a consistent cadence, the occurrence of incorrect predictions is limited.
[0093] Below, we will explain how to solve the above problem by using a preloader that includes a separate preloader cache.
[0094]
[0095] FIG. 5 is a flowchart illustrating the operation of an electronic device including a preloader according to one embodiment of the present disclosure.
[0096] In the following embodiments, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel. Steps (501) to (509) may be performed by a processor, but the embodiment is not limited thereto, and may also be performed by a preloader.
[0097] In step (501), the processor may sample previous requested memory addresses included in the previous requested memory request.
[0098] The processor may sample previous request memory addresses included in previous request memory requests of the same warp. Alternatively, the processor may sample previous request memory addresses included in previous request memory requests of a different warp.
[0099] At step (502), the processor may generate a prefetch memory request based on the stride between sampled previous requested memory addresses.
[0100] The processor can determine the intra-warp pattern stride based on the stride between previous requested memory addresses of the same warp. The processor can determine the inter-warp pattern stride based on the stride between previous requested memory addresses of different warps. The processor can predict the prefetch memory address where data required for the next operation is stored based on the intra-warp pattern stride and / or the inter-warp pattern stride. The prefetch memory request can include the predicted prefetch memory address.
[0101] When the processor determines the stride, the stride may include both the intra-warp pattern stride and the inter-warp pattern stride. In this case, the intra-warp pattern stride may have a higher priority than the inter-warp pattern stride. Therefore, when the stride determines the stride and includes both the intra-warp pattern stride and the inter-warp pattern stride, and the intra-warp pattern stride and the inter-warp pattern stride are different, the processor may generate a prefetch memory request based on the intra-warp pattern stride.
[0102] In step (503), a prefetch memory response according to a prefetch memory request can be transmitted to the preloader.
[0103] The processor can forward a prefetch memory request to a sub-cache of the preloader cache included in the preloader. The sub-caches of the preloader cache may be an L1 cache, an L2 cache, and a global memory. If prefetch data is stored in the sub-cache that received the prefetch memory request, a prefetch memory response may be generated. The processor can transmit the generated prefetch memory response to the preloader. The prefetch memory response may include the prefetch data. For example, if the prefetch data exists in the L2 cache, the prefetch memory response may be generated in the L2 cache. The prefetch memory response may be transmitted from the L2 cache to the preloader, and the prefetch memory response may include the prefetch data.
[0104] In step (504), the processor can store prefetch data included in the prefetch memory request and a prefetch memory address corresponding to the prefetch data in the preloader cache.
[0105] The processor may store the prefetch memory address to determine whether the prefetch memory address was correctly predicted when a demand memory request is received by the preloader. The demand memory request may include the demand memory address. The demand memory address may indicate the address where the data required by the instruction for the next operation is stored. Therefore, if the prefetch data is correctly loaded into the preloader cache, the prefetch memory address and the demand memory address may match.
[0106] At step (505), the processor may forward a request for memory for the next operation generated in the LDST unit to the preloader.
[0107] In step (506), the processor can check whether the requested memory address matches the prefetch memory address stored in the preloader cache.
[0108] In step (507), if the requested memory address does not match the prefetch memory address stored in the preloader cache, the processor may forward the requested memory request to the lower cache.
[0109] In other words, the processor can forward the requested memory request to a sub-cach of the cache included in the preloader, where the sub-caches may include the L1 cache, the L2 cache, and the global memory.
[0110] At step (508), the processor can transfer data stored in the lower cache to the LDST unit.
[0111] If the lower cache that received the requested memory request contains data corresponding to the requested memory address, the processor may transmit a requested memory response to the LDST unit. The requested memory response may contain data corresponding to the requested memory address.
[0112] In step (509), if the requested memory address matches the prefetch memory address stored in the preloader cache, the processor can transmit the prefetch data stored in the preloader cache to the LDST unit.
[0113] In other words, the processor can transfer prefetch data stored in the preloader cache to the LDST unit in response to a demand memory request.
[0114] Ultimately, data predicted to be required for the next operation can be stored in the preloader cache rather than the L1 cache, thereby preventing data extraction as in Fig. 4c.
[0115] Below, the operation of a processor including the above-described preloader will be explained using drawings.
[0116]
[0117] FIG. 6 is a flowchart illustrating the operation of a GPU according to one embodiment of the present disclosure.
[0118] Referring to FIG. 6, the GPU (600) may include a streaming multiprocessor (610), an interconnection (620), an L2 cache (630), and a global memory (640). The streaming multiprocessor (610) may include a register file (611), an LDST unit (613), a preloader (615), and an L1 cache (617). The preloader (615) may include a cache (not shown), which is an internal storage device. Hereinafter, the cache (not shown) included in the preloader (615) will be referred to as a preloader cache.
[0119] The preloader (615) can sample the previous request memory addresses included in the previous request memory request. The preloader (615) can determine the stride using the sampled previous request memory addresses. The preloader (615) can determine whether the stride is an inter-warp pattern stride and / or an intra-warp pattern stride using the sampled previous request memory addresses. Based on the determined stride, the preloader (615) can predict a prefetch memory address, which is an address where data to be used in the next operation is stored. In other words, the preloader (615) can predict the request memory address to be included in the request memory request to be generated by the LDST unit.
[0120] Thereafter, the preloader (615) may generate a prefetch memory request including a prefetch memory address. The prefetch memory request may be transmitted to the L1 cache (617). If prefetch data corresponding to the prefetch memory address exists in the L1 cache, a cache hit may occur. If a cache hit occurs, a prefetch memory response according to the prefetch memory request may be transmitted from the L1 cache (617) to the preloader (615). At this time, the prefetch memory response may include prefetch data. The preloader (615) may receive the prefetch memory response and store the prefetch data in the preloader cache.
[0121] On the other hand, if there is no prefetch data corresponding to the prefetch memory address in the L1 cache (617), a cache miss may occur. At this time, the prefetch memory request may be transmitted to a lower cache via the interconnection (620). If there is prefetch data corresponding to the prefetch memory address in the lower cache that received the prefetch memory request, a cache hit may occur and a prefetch memory response may be generated in the lower cache. At this time, the prefetch memory response may be transmitted to the preloader (615). The preloader (615) may store the prefetch data included in the prefetch memory response in the preloader cache.
[0122] For example, if prefetch data does not exist in the L2 cache, a cache miss occurs and a prefetch memory request may be forwarded to the global memory (640). If prefetch data exists in the global memory (640), a prefetch memory response may be generated. The generated prefetch memory response may be transmitted to the preloader (615).
[0123] Next, the LDST unit (613) may generate a demand memory request to load data required for the next operation into the register file (611). The demand memory request may include a demand memory address where the data required for the next operation is stored.
[0124] The requested memory request can be forwarded to the preloader (615). If the prefetch data address of the prefetch data stored in the preloader cache is compared with the requested memory address of the requested memory request and they are identical, the prefetch data can be loaded into the register file (611) via the LDST unit (613).
[0125] Ultimately, prefetch data can be loaded into the register file (611) even if the requested memory request does not access the L1 cache (617) or lower caches. In other words, the required data can be loaded into the register file (611) with minimal memory delay.
[0126] Below, the internal operation of the preloader (615) will be explained.
[0127]
[0128] FIGS. 7A to 7C are drawings for explaining the operation of a preloader according to one embodiment of the present disclosure.
[0129] Referring to FIGS. 7A to 7C, an LDST unit (710), a preloader (720), and an L1 cache (730) are illustrated. The preloader (720) may include a prefetch address generator (721) and a preloader cache (723). The preloader cache (723) may be an internal storage device of the preloader (720). The preloader (720) may be connected to the LDST unit (710). Therefore, all required memory requests generated from the LDST unit (710) may pass through the preloader (720). Recent GPUs may utilize a sector L1 cache that divides a 128-byte cache line into four 32-byte sectors. The sector L1 cache may load data sector-wise instead of loading the entire 128-byte cache line. The L1 cache (730) may be a sector L1 cache.
[0130] The preloader cache (723) may include one entry per warp to store the status of the entry, the prefetch memory address, and the prefetch data. Therefore, the preloader cache (723) may include a total of 64 entries. In other words, the preloader cache (723) may have a total of 64 rows. Each entry may be indexed by a warp ID. For example, the first entry may be indexed by warp #00, the second entry may be indexed by warp #01, and so on. Each entry may include 4 status bits indicating the status of the entry, 106 bits indicating the prefetch memory address, and 1024 bits indicating the prefetch data.
[0131] The preloader (720) can generate multiple sub-prefetch memory requests to prefetch sector-sized data. For convenience of explanation, it will be assumed below that a prefetch memory request consists of four sub-prefetch memory requests. Therefore, it will be apparent to those skilled in the art that the present disclosure is not limited to the case where there are four prefetch memory requests. In this case, each of the four sub-prefetch memory requests can access data in sectors located in four different cache lines.
[0132] Figure 7a is a diagram illustrating a method for generating a prefetch memory request. In the following, numbers ① through ⑦ are merely numbers for convenience of explanation and do not imply that the operations are performed sequentially.
[0133] ① In the prefetch address generator (721), a prefetch memory request can be generated. The prefetch memory request includes a prefetch memory address and can be forwarded to the L1 cache (730). The prefetch address generator (721) can generate up to four sub-prefetch memory requests for each warp. Each sub-prefetch memory request can be a request for one sector forwarded to the L1 cache. In other words, the prefetch memory request can be composed of four sub-prefetch memory requests. Each of the sub-prefetch memory requests can include an address. The prefetch memory address can be composed of addresses included in the four sub-prefetch memory requests.
[0134] ② In order to check whether the requested memory address included in the requested memory request matches the prefetch memory address included in the prefetch memory request, the preloader (720) may store the prefetch memory address in the preloader cache (723). At this time, rather than storing the entire prefetch memory address, only a portion of the addresses of the four sub-prefetch memory requests that constitute the prefetch memory address may be stored.
[0135] That is, in ③, rather than storing all addresses of the four sub-prefetch memory requests, the offsets of the addresses included in the first sub-prefetch memory request and the addresses included in the other sub-prefetch memory requests can be stored. The offset is limited to 20 bits, but only 14 bits, excluding the 6 least significant bits (LSBs), can be stored as sector offsets.
[0136] Therefore, in ⑥, the 64-bit address included in the first sub-prefetch memory request and the 14-bit offset of each of the other sub-prefetch memory requests can be combined.
[0137] Finally, in ⑦, the prefetch memory address can be converted to 106 bits and stored in the preloader cache (723).
[0138] ④ In order to store the 106-bit converted address described above in the preloader cache (723), the preloader (720) can use the warp ID as an index. Since the preloader (720) can generate one prefetch memory request for one warp, the preloader cache (723) can have 64 entries to store the status of the entry, the converted address, and the prefetch data. Since each entry is indexed by the warp ID, the preloader (720) can use the warp ID as an index to store the converted address.
[0139] ⑤ In case a prefetch memory request is transmitted to the L1 cache (730), a status bit indicating the status of the entry may be updated. The status bit may be updated to indicate that a prefetch memory request has been generated. The method by which the status of the entry is updated will be further described in FIG. 8.
[0140] Figure 7b is a diagram for explaining when a memory request is transmitted from the LDST unit (710) to the preloader (720). ① to ⑥ are numbers for convenience of explanation and do not mean that the operations are performed sequentially.
[0141] A demand memory request may be composed of four demand sub-memory requests. For convenience of explanation, it will be assumed below that a demand memory request is composed of four demand sub-memory requests. However, it will be apparent to those skilled in the art that the present disclosure is not limited to the case where there are four demand sub-memory requests. Each of the demand sub-memory requests may include a demand address. A demand memory request may include a demand memory address. The demand memory address may be composed of the demand addresses of the demand sub-memory requests.
[0142] ① When a demand memory request arrives at the preloader (720), the preloader (720) can select an entry from the preloader cache (723) using the warp ID. The demand memory request may be for the next operation of a specific warp. Therefore, the preloader (720) can select an entry from the preloader cache (723) using the warp ID of this specific warp.
[0143] ② In ②, the offsets of the request sub-memory requests can be calculated in the same manner as the prefetch sub-memory address in Fig. 7a. That is, the offsets in the request addresses of the request sub-memory requests other than the first request sub-memory request are limited to 20 bits, but only 14 bits excluding the LSB 6 bits can be calculated as the offset.
[0144] ③ In the first request sub-memory request address 64 bits and the offset 14 bits of each of the other request sub-memory requests can be combined.
[0145] In ④, the prefetch memory address stored in the entry of the preloader cache (723) can be compared with the converted address and the address combined in ③. In other words, the prefetch memory address and the requested memory address can be compared.
[0146] ⑤, based on the comparison result and the status of the selected entry, the status bit can be updated. Then, based on the comparison result and the selected entry, a required memory request can be transmitted to the L1 cache (730).
[0147] If the comparison result addresses are identical and the status of the entry is such that a prefetch request has already been generated, the requested memory request may be deleted and not forwarded to the L1 cache (730). In other words, if the comparison result addresses are identical and the status of the entry is such that a prefetch request has already been generated, this may mean that the prefetch memory address stored in the preloader cache (723) was accurately predicted.
[0148] Accordingly, in this case, in ⑥, the prefetch data may be transferred from the preloader cache (723) to the LDST unit (710) through a writeback operation, and there may be no need to transfer the required memory request to the L1 cache (730).
[0149] However, if the addresses of the comparison results in ⑤ are different, the write back operation is not performed and the required memory request may be transferred to the Ll cache (730).
[0150] After the above-described operation, the status of the entry can be updated. The method for updating the status of the entry is described in Figure 8.
[0151] Figure 7c is a diagram illustrating a method for managing prefetch memory responses.
[0152] A prefetch memory request is forwarded to a lower cache of the preloader cache (723), and in response, a prefetch memory response may be forwarded from the lower cache to the preloader (720). The prefetch memory response may include prefetch data. At this time, the prefetch data may be stored in the preloader cache (723) or bypassed to the LDST unit (710).
[0153] Specifically, in ①, the preloader (720) can use the warp ID to select an entry containing detailed information about a prefetch memory request. The preloader (720) can use the warp ID to select an entry indexed by the warp ID from the preloader cache (723).
[0154] ② In ②, it can be determined whether the status of the entry is a state in which a requested memory request has already been created and whether the prefetch memory address stored in the entry and the requested memory address included in the requested memory request match.
[0155] ③ In case the status of the entry is such that a requested memory request has already been generated and the prefetch memory address stored in the entry matches the requested memory address included in the requested memory request, the prefetch memory response can be written back to the LDST unit using a demultiplexer. That is, if a requested memory request has already been generated, the prefetch data can be bypassed to the LDST unit without being stored in the preloader cache (723).
[0156] ④ In case the status of the entry is not a state in which a requested memory request has already been generated or the prefetch memory address stored in the entry and the requested memory address included in the requested memory request do not match, the prefetch data included in the prefetch memory response may be stored in the preloader cache (723). At this time, the stored prefetch data may be transmitted to the LDST unit according to the method described in Fig. 7b when a requested memory request is generated by the LDST unit later.
[0157] Below, we will explain how the status of an entry is updated according to the status of the preloader (720).
[0158]
[0159] FIG. 8 is a diagram for explaining a status update of an entry according to one embodiment of the present disclosure.
[0160] Each entry included in the preloader cache can have five states individually. The state of an entry can be expressed by a state bit. The state bit can include multiple bits. The lower two bits of the state bits can indicate the state of the entry. The upper bits of the state bits excluding the lower two bits can be used to manage multiple sub-prefetch memory requests. The number of upper bits excluding the lower two bits of the multiple bits can be based on the number of multiple sub-prefetch memory requests. In other words, if there are N upper bits excluding the lower two bits, 2 N Multiple sub-prefetch memory requests can be managed. The upper bits, excluding the lower two bits, can be updated according to the number of sub-prefetch memory responses corresponding to multiple sub-prefetch memory requests arriving at the preloader.
[0161] In the following, for the convenience of explanation, we will assume that there are 4 status bits. In this case, the lower 2 bits can indicate the status of the entry, and the upper 2 bits can indicate 2 2 It can be used to manage sub-prefetch memory requests. However, it is obvious to those skilled in the art that the following description is not limited to the case where the status bit is 4 bits.
[0162] The state of an entry can always start in the Invalid state, and in the Invalid state, the state bits can be represented as [0 0 0 0].
[0163] ① In case a prefetch memory request is generated and a 106-bit address is stored in the entry, the state of the entry can be updated from the Invalid state to the Pref. Gen. state. The Pref. Gen. state can be expressed as [0 0 0 1].
[0164] The Pref. Gen. state may be a state indicating that a prefetch memory request has been generated.
[0165] The status of an entry can be updated to one of three states from Pref. Gen. status.
[0166] ② In ②, if a demand memory request is generated and the prefetch data address stored in the entry matches the demand memory address included in the demand memory request, the state of the entry can be updated from Pref. Gen. state to Dem. Gen. state. The Dem. Gen. state can be expressed as [# # 1 1].
[0167] Here, the upper two bits can be updated according to the number of sub-prefetch memory responses corresponding to the sub-prefetch memory request. For example, if only two request sub-memory responses arrive at the preloader in response to four request sub-memory requests, the upper two bits can be represented as
[0010] .
[0168] ③ In ③, if a demand memory request is generated and the prefetch data address stored in the entry does not match the demand memory address included in the demand memory request, the status of the entry can be updated from the Pref. Gen. status to the Miss Match status. The Miss Match status can be expressed as [# # 1 0].
[0169] ④ In case a prefetch memory response according to a prefetch memory request arrives before a demand memory request is generated, the status of the entry can be updated from the Pref. Gen. status to the Pre. Data Ack. status. The Pre. Data Ack. status can be expressed as [# # 0 1].
[0170] At this time, the upper two bits of the Dem. Gen. status, Miss Match status, and Pre. Data Ack. status may indicate the number of sub-prefetch memory responses that arrived at the preloader in response to multiple sub-prefetch memory requests.
[0171] A Miss Match condition may indicate that the prefetch memory address and the requested memory address do not match.
[0172] Therefore, in ⑤, when all sub-prefetch memory responses for the sub-prefetch memory request arrive, the status of the entry can be updated from the Miss Match state to the Invalid state. Furthermore, in the Miss Match state, the requested memory request can be forwarded to the lower cache to load the data.
[0173] The Dem. Gen. state can indicate a state where the prefetch memory address matches the requested memory address. In this case, the requested memory address can be removed from the L1 cache.
[0174] ⑥ In case all sub-prefetch memory responses according to sub-prefetch memory requests arrive at the preloader, the status of the entry can be updated from Dem. Gen. status to Invalid status.
[0175] The Pre. Data Ack. state can indicate that a sub-prefetch memory response has arrived at the preloader before the requested memory request is generated. Therefore, data loaded into the preloader can be stored in the preloader cache (i.e., entries).
[0176] ⑦ In ⑦, when a memory request is generated and the requested memory address matches the prefetch memory address stored in the preloader cache, the prefetch data stored in the preloader cache can be transferred to the LDST unit. Then, the status of the entry can be updated from the Pre. Data Ack. state to the Dem. Gen. state.
[0177] If, in ⑧, the requested memory address does not match the prefetch memory address stored in the preloader cache, the entry's status can be updated from the Pre. Data Ack. state to the Miss Match state. Then, the requested memory request can be propagated to the lower cache.
[0178]
[0179] FIG. 9 is a flowchart illustrating the operation of an electronic device according to one embodiment of the present disclosure.
[0180] In the following embodiments, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel. Steps (901) to (907) may be performed by a processor, but the embodiment is not limited thereto, and may also be performed by a preloader.
[0181] At step (901), the processor may generate a prefetch memory request based on the stride of the sampled previous requested memory addresses.
[0182] In step (903), the processor may store prefetch data included in a prefetch memory response, which is a response to a prefetch memory request, and a prefetch memory address corresponding to the prefetch data in a preloader cache.
[0183] In step (905), the processor can determine whether the requested memory address included in the requested memory request for the next operation generated from the LDST unit and the prefetch memory address stored in the preloader cache match.
[0184] In step (907), if the requested memory address and the prefetch memory address match, the processor may transmit the prefetch data to the LDST unit, and if the requested memory address and the prefetch memory address do not match, the processor may forward the requested memory request to a lower cache of the preloader cache.
[0185]
[0186] Meanwhile, the method according to the present invention can be written as a program that can be executed on a computer and implemented in various recording media such as a magnetic storage medium, an optical reading medium, and a digital storage medium.
[0187] Implementations of the various technologies described herein may be implemented as digital electronic circuitry, or as computer hardware, firmware, software, or combinations thereof. Implementations may be implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier, e.g., a machine-readable storage medium (computer-readable medium) or a radio signal, for processing by the operation of a data processing device, e.g., a programmable processor, a computer, or multiple computers, or for controlling the operation thereof. A computer program, such as the computer program(s) described above, may be written in any form of programming language, including compiled or interpreted languages, and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may be deployed to be processed on one computer or multiple computers at a single site, or to be distributed across multiple sites and interconnected by a communications network.
[0188] Processors suitable for processing a computer program include, for example, both general-purpose and special-purpose microprocessors, and any one or more processors of any type of digital computer. Typically, a processor will receive instructions and data from read-only memory or random-access memory, or both. Components of a computer may include at least one processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer may include, or be coupled to receive data from, transmit data to, or both, one or more mass storage devices, such as magnetic, magneto-optical, or optical disks, for storing data. Information carriers suitable for embodying computer program instructions and data include, for example, semiconductor memory devices, magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as compact disk read only memory (CD-ROM), digital video disks (DVD), magneto-optical media such as floptical disks, read only memory (ROM), random access memory (RAM), flash memory, erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), etc. The processor and memory may be supplemented by, or included in, special purpose logic circuitry.
[0189] Additionally, the computer-readable medium may be any available medium that can be accessed by a computer, and may include both computer storage media and transmission media.
[0190] While this specification contains details of a number of specific implementations, these should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of features that may be unique to particular embodiments of particular inventions. Certain features described herein in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments, either individually or in any suitable subcombination. Furthermore, although features may operate in a particular combination and may initially be described as being claimed as such, one or more features from a claimed combination may in some cases be excluded from that combination, and the claimed combination may be transformed into a subcombination or variation of a subcombination.
[0191] Likewise, while operations are depicted in the drawings in a particular order, this should not be construed as requiring that those operations be performed in the particular or sequential order depicted to achieve desired results, or that all depicted operations be performed. In certain instances, multitasking and parallel processing may be advantageous. Furthermore, the separation of the various device components of the embodiments described above should not be construed as requiring such separation in all embodiments, and it should be understood that the program components and devices described may generally be integrated together in a single software product or packaged into multiple software products.
[0192] Meanwhile, the embodiments of the present invention disclosed in this specification and drawings are merely specific examples presented to aid understanding and are not intended to limit the scope of the present invention. It will be apparent to those skilled in the art that other modifications based on the technical concepts of the present invention are possible in addition to the embodiments disclosed herein.
Claims
1. In the method of operating an electronic device, A step of sampling previously requested memory addresses included in a previously requested memory request; A step of generating a prefetch memory request based on the step between the sampled previous requested memory addresses; A step of transmitting a prefetch memory response according to the above prefetch memory request to the preloader; and A step of storing prefetch data included in the above prefetch memory response and a prefetch memory address corresponding to the above prefetch data in a preloader cache. A method of operating an electronic device comprising:
2. In paragraph 1, The step of generating the above prefetch memory request is: An operating method for predicting the prefetch memory address based on the step and generating the prefetch memory request including the prefetch memory address.
3. In paragraph 2, The above stride is, Including one or more combinations of intra-warp pattern strides and inter-warp pattern strides, The step of generating the above prefetch memory request is: An operating method for determining the prefetch memory request by determining the priority of the intra-warp pattern stride to be higher than the inter-warp pattern stride.
4. In paragraph 2, The step of generating the above prefetch memory request is: An operating method for generating a prefetch memory request based on the intra-warp pattern stride, when the stride includes both an intra-warp pattern stride and an inter-warp pattern stride and the prefetch memory address based on each of the intra-warp pattern stride and the inter-warp pattern stride are different.
5. In paragraph 1, a step of transmitting a memory request for the next operation from the LDST unit to the preloader; and A step of transmitting data required for the next operation to the LDST unit based on the requested memory address included in the requested memory request and the prefetch memory address. A method of operation, further comprising:
6. In paragraph 5, The step of transmitting the data required for the above-mentioned next operation to the LDST unit is: An operating method for transmitting the prefetch data corresponding to the prefetch memory address from the preloader cache to the LDST unit when the requested memory address and the prefetch memory address match.
7. In paragraph 5, The step of transmitting the data required for the above-mentioned next operation to the LDST unit is: An operating method for transmitting the requested memory request to a lower cache when the requested memory address and the prefetch memory address are different, and transmitting the data from the lower cache that received the requested memory request to the LDST unit.
8. In paragraph 1, The above preloader cache is, Contains multiple entries, A method of operation, wherein each of the plurality of entries includes a status bit indicating the status of the entry.
9. In paragraph 8, A method of operation, further comprising the step of updating the status bits depending on whether the prefetch memory request has been generated, whether the prefetch memory response has reached the preloader before the requested memory request is generated, and whether the requested memory address and the prefetch memory address match.
10. In paragraph 1, The step of saving to the above preloader cache is: An operating method for generating a plurality of sub-prefetch memory requests and storing the prefetch memory address based on the plurality of sub-prefetch memory requests.
11. In the method of operating an electronic device, A step of generating a prefetch memory request based on the stride of sampled previous requested memory addresses; A step of storing prefetch data included in a prefetch memory response, which is a response to the prefetch memory request, and a prefetch memory address corresponding to the prefetch data in a preloader cache; A step of determining whether the requested memory address included in the requested memory request for the next operation generated from the LDST unit and the prefetch memory address stored in the preloader cache match; and If the requested memory address and the prefetch memory address match, the step of transmitting the prefetch data to the LDST unit, and if the requested memory address and the prefetch memory address do not match, the step of transmitting the requested memory request to a lower cache of the preloader cache. A method of operating an electronic device, comprising:
12. A processor that samples previous request memory addresses included in a previous request memory request, generates a prefetch memory request based on a step between the sampled previous request memory addresses, transmits a prefetch memory response according to the prefetch memory request to a preloader, and stores prefetch data included in the prefetch memory response and a prefetch memory address corresponding to the prefetch data in a preloader cache. The above processor, including the preloader generating the above pre-fetch memory request, The above preloader, The preloader cache storing the prefetch memory address and the prefetch data. An electronic device comprising:
13. In paragraph 12, The above processor, An electronic device that predicts the prefetch memory address based on the step and generates the prefetch memory request including the prefetch memory address.
14. In paragraph 13, The above stride is, Including one or more combinations of intra-warp pattern strides and inter-warp pattern strides, The above processor, An electronic device that determines the prefetch memory request by determining the priority of the intra-warp pattern stride to be higher than the inter-warp pattern stride.
15. In paragraph 13, The above processor, An electronic device that generates the prefetch memory request based on the intra-warp pattern stride, when the stride includes both an intra-warp pattern stride and an inter-warp pattern stride and the prefetch memory address based on each of the intra-warp pattern stride and the inter-warp pattern stride are different.
16. In paragraph 12, The above processor, An electronic device that transmits a request for a memory for the next operation from the LDST unit to the preloader, and transmits data required for the next operation to the LDST unit based on a request memory address included in the request memory request and the prefetch memory address.
17. In paragraph 16, The above processor, An electronic device that transmits the prefetch data corresponding to the prefetch memory address from the preloader cache to the LDST unit when the requested memory address and the prefetch memory address match.
18. In paragraph 16, The above processor, An electronic device that, when the requested memory address and the prefetch memory address are different, transmits the requested memory request to a lower cache and transmits the data from the lower cache that received the requested memory request to the LDST unit.
19. In paragraph 12, The above preloader cache is, Contains multiple entries, An electronic device, wherein each of the plurality of entries includes a status bit indicating the status of the entry.
20. In paragraph 12, The above processor, An electronic device that generates a plurality of sub-prefetch memory requests and generates the prefetch memory address based on the plurality of sub-prefetch memory requests.
Citation Information
Patent Citations
Data prefetcher with complex stride predictor
US20140006718A1
Prefetching of data and instructions in a data processing apparatus
US20140258622A1
Managing prefetch requests based on stream information for previously recognized streams
US20210406184A1
Stride-based prefetch mechanism using a prediction confidence value
US6976147B1
Prefetch mechanism based on page table attributes
US7383391B2
