WO2025148564A1 - Refilling data processing method and apparatus, and device, storage medium and program - Google Patents

Refilling data processing method and apparatus, and device, storage medium and program

Info

Publication number
WO2025148564A1
WO2025148564A1 PCT/CN2024/136263 CN2024136263W WO2025148564A1 WO 2025148564 A1 WO2025148564 A1 WO 2025148564A1 CN 2024136263 W CN2024136263 W CN 2024136263W WO 2025148564 A1 WO2025148564 A1 WO 2025148564A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
data
refill
memory access
access instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/136263
Other languages
French (fr)
Chinese (zh)
Inventor
陈熙
王凯帆
陈键
唐丹
包云岗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Open Source Chip
Original Assignee
Beijing Institute of Open Source Chip
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Open Source Chip filed Critical Beijing Institute of Open Source Chip
Publication of WO2025148564A1 publication Critical patent/WO2025148564A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of computer technology, and in particular to a method, device, electronic device, computer-readable storage medium and computer program for processing refill data.
  • Modern processors generally have three levels of cache: L1 cache, L2 cache and L3 cache.
  • L1 cache When the processor's memory access instruction misses the L1 cache, L2 cache needs to refill the data requested by the memory access instruction into the L1 cache to ensure normal data access.
  • L3 cache when the memory access instruction misses the L2 cache, L3 cache needs to refill the requested data into the L2 cache.
  • the upper-level cache first selects a data block (data is used to represent the location where data is stored) and releases the old data in it, and then writes the refill data into the data block when the lower-level cache sends the refill data to realize data refill.
  • Embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program for processing refill data to solve problems in related technologies.
  • an embodiment of the present application provides a method for processing refill data, the method comprising:
  • the memory access instruction is suspended, and a fetch request is sent to a second cache through the first cache;
  • the second cache is a lower-level cache of the first cache;
  • the target data block is determined from the first cache, the old data stored in the target data block is released, and the refill data is written into the target data block.
  • an embodiment of the present application provides a device for processing refill data, the device comprising:
  • An acquisition module configured to acquire a hit result of a memory access instruction in the first cache when a memory access instruction of the processor is acquired through the first cache;
  • a miss module configured to suspend the memory access instruction if the hit result is a miss, and send a fetch request to a second cache through the first cache;
  • the second cache is a lower-level cache of the first cache;
  • a write module is used to determine a target data block from the first cache, release old data stored in the target data block, and write the refill data into the target data block when receiving the refill data sent by the second cache in response to the acquisition request through the first cache.
  • an embodiment of the present application further provides an electronic device, including a processor
  • a memory for storing instructions executable by the processor
  • the processor is configured to execute the instructions to implement the method of the first aspect.
  • an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.
  • an embodiment of the present application provides a computer program, comprising a computer-readable code, which, when executed on a computing processing device, causes the computing processing device to execute the method of the first aspect.
  • the data block when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block.
  • the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally.
  • the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.
  • FIG1 is an architecture diagram of an implementation scenario provided by an embodiment of the present application.
  • FIG2 is a flowchart of a method for processing refill data provided by an embodiment of the present application.
  • FIG3 is a schematic diagram of the architecture of a first cache provided by an embodiment of the present invention.
  • FIG4 is a flowchart of specific steps of a method for processing refill data provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of another architecture of a first cache provided by an embodiment of the present invention.
  • FIG6 is a block diagram of a device for processing refill data provided by an embodiment of the present application.
  • FIG8 schematically shows a storage unit for holding or carrying a program code for implementing the method according to the present application
  • FIG. 9 is a block diagram of an electronic device provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first”, “second”, etc. are generally a class, and the number of objects is not limited.
  • the first object can be one or more.
  • the term “and/or” in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and/or B can be represented: A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" generally indicates that the front and back associated objects are a kind of "or” relationship.
  • the term “multiple” refers to two or more, and other quantifiers are similar.
  • FIG. 1 is an implementation scenario architecture diagram provided by an embodiment of the present application.
  • the common architecture is the three-level cache structure of Figure 1, including: Level 1 cache L1, Level 2 cache L2 and Level 3 cache L3.
  • Level 1 cache L1 is the cache closest to the processor, with the smallest capacity and the fastest speed;
  • Level 2 cache L2 has a larger capacity, but is slower than Level 1 cache L1.
  • Level 2 cache L2 is the buffer of Level 1 cache L1.
  • the function of Level 2 cache L2 is to store data that is needed for processor processing but cannot be stored by Level 1 cache L1;
  • Level 3 cache L3 has the largest capacity and is also the slowest level.
  • Level 3 cache L3 and memory can be regarded as buffers of Level 2 cache L2.
  • the processor When the processor is running, the processor will first go to the first-level cache L1 to find the required data according to the memory access instruction, then go to the second-level cache L2, and then go to the third-level cache L3. If the third-level cache does not find the data it needs, it will get the data from the memory. The longer the search path, the longer it takes, so if you need to get certain data very frequently, make sure that the data is in the first-level cache L1, so that the speed will be very fast.
  • the memory access instruction is an instruction to get data from a specified address in the memory, or to store data at a specified address in the memory.
  • the memory access instruction will continue to be searched whether it hits in the second-level cache L2. If it hits in the second-level cache L2, the second-level cache L2 will refill the data requested to be read by the memory access instruction into the first-level cache L1; if it does not hit in the second-level cache L2, the memory access instruction will continue to be searched whether it hits in the third-level cache L3. If it hits in the third-level cache L3, the third-level cache L3 will refill the data requested to be read by the memory access instruction into the second-level cache L2, and then the second-level cache L2 will refill the data into the first-level cache L1.
  • the related technology is that when the first cache notifies the lower-level second cache to refill data, it selects a data block in the first cache to release the old data therein, and when the lower-level cache sends the refill data, the refill data is written into the data block to achieve data refill. This will cause the vacant data block to be continuously occupied during the waiting process for the refill data. In addition, if there is a need to access the old data during this process, it cannot be successfully accessed because the old data has been released.
  • the embodiment of the present application may not select a data block for release when the memory access instruction does not hit the first cache, but instead notify the subordinate second cache to obtain the refill data required for the memory access request, wait for the second cache to obtain the refill data and send the refill data to the first cache, and then determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data to the target data block.
  • the data block storing the old data operates normally and is not vacant or occupied, and the old data can also be accessed normally.
  • the present application releases the old data stored in the selected target data block and writes the refill data to the target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.
  • FIG. 2 is a flowchart of a method for processing refill data provided by an embodiment of the present application. As shown in FIG. 2 , the method may include:
  • Step 101 when a memory access instruction of a processor is obtained through a first cache, a hit result of the memory access instruction in the first cache is obtained.
  • the process of determining whether the data exists can be understood as determining the hit result of the memory access instruction in the first cache.
  • the hit result includes a hit or a miss.
  • a hit represents that the first cache contains the data requested to be read by the memory access instruction; a miss represents that the first cache does not contain the data requested to be read by the memory access instruction.
  • FIG. 3 shows a schematic diagram of the architecture of the first cache.
  • the first cache can adopt a 5-level pipeline architecture, that is, it includes a pipeline queue with 5 sequentially arranged data bits, each data bit corresponds to a pipeline moment, and different data bits correspond to different pipeline moments.
  • the instruction is used to enter the pipeline from the initial data bit S1 of the pipeline queue, and change the data bit with the migration of time.
  • the embodiment of the present application can obtain the hit result of the memory access instruction in the first cache (obtain the hit result at the moment corresponding to the S3 data bit) after the memory access instruction enters the pipeline from the starting data bit (S1) of the pipeline queue, after a fixed number of data bits (for example, 2 data bits are separated). Since the hit result is obtained, and the hit result includes a hit or a miss. Therefore, the embodiment of the present application can subsequently perform corresponding instruction control operations according to the hit result.
  • the interval of a fixed number of data bits refers to the time required for the execution of the operation of waiting to determine the hit result of the memory access instruction in the first cache. Since the time length is fixed, and the data bits in the pipeline queue of the first cache represent the moment, the time length can be converted into a fixed number of data bits. Starting from the starting data bit (S1), a fixed number of data bits are spaced to represent the completion of the execution process of waiting to determine whether a hit is achieved after the memory access instruction enters the pipeline of the first cache, thereby obtaining the hit result of the memory access instruction in the first cache.
  • Step 102 If the hit result is a miss, the memory access instruction is suspended, and a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache.
  • the hit result of the memory access instruction in the first cache is a hit, indicating that the first cache has the data requested to be read by the memory access instruction. If the first cache also has a superior third cache, the first cache can refill the data requested to be read by the memory access instruction into the third cache; if the first cache does not have a superior third cache, the processor can read data directly from the first cache through the memory access instruction.
  • the hit result of the memory access instruction in the first cache is a miss, indicating that the first cache does not store the data requested to be read by the memory access instruction.
  • the second cache is a lower-level cache of the first cache.
  • first-level cache L1, second-level cache L2 and third-level cache L3 assuming that the first cache is first-level cache L1, then the second-level cache can be second-level cache L2; assuming that the first cache is second-level cache L2, then the second-level cache can be third-level cache L3.
  • miss status register is a register used to record each unfinished transaction, and the recorded information includes the invalid address, keyword information, and unfinished execution instructions.
  • Step 103 When the first cache receives the refill data sent by the second cache in response to the acquisition request, determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data into the target data block.
  • the process in which the second cache responds to the acquisition request to search and obtain the refill data and send it to the first cache usually takes a long time (it takes dozens to hundreds of data bits in the pipeline of the first cache).
  • the embodiment of the present application does not release or occupy the data block containing the old data, thereby improving the utilization rate of the cache resources while ensuring that the old data can be accessed normally.
  • the target data block is selected only when the refill data sent by the second cache is received through the first cache. If the target data block stores old data, the old data is released and the refill data is written into the target data block. In this way, during the period before the refill data arrives, the data block storing the old data in the first cache can operate normally and is not vacant or occupied, and the old data can also be accessed normally. After the first cache receives the refill data, the old data stored in the selected target data block is released, and the refill data is written into the target data block, which also ensures the normal implementation of the data reading process of the memory access instruction.
  • the data block when a memory access instruction does not hit in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and waits for the second cache to obtain the refill data and send the refill data to the first cache, and then the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block.
  • the data block storing the old data operates normally and is not vacant or occupied, and the old data can also be accessed normally.
  • the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.
  • FIG. 4 is a flowchart of specific steps of a method for processing refill data provided by an embodiment of the present application. As shown in FIG. 4 , the method may include:
  • Step 201 When a memory access instruction of a processor is obtained through a first cache, a hit result of the memory access instruction in the first cache is obtained.
  • This step may specifically refer to the above step 101, which will not be described in detail here.
  • Step 202 If the hit result is a miss, the memory access instruction is controlled to leave the pipeline queue and enter the missing state register for suspended waiting, and at the same time, a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache.
  • the hit result of the memory access instruction in the first cache is a miss, indicating that the data requested to be read by the memory access instruction is not stored in the first cache.
  • the memory access instruction can be removed from the pipeline queue of the first cache and enter an allocated miss status register (MSHR) for waiting.
  • MSHR miss status register
  • the miss status register is a register used to record each unfinished transaction.
  • the memory access instruction is separated from the pipeline queue of the first cache because the data requested by the memory access instruction is not stored in the first cache, which causes the memory access instruction to currently fail to realize data reading. Therefore, the memory access instruction is first separated from the pipeline queue of the first cache and enters the missing status register to wait, so as to avoid interfering with the execution of other requests of the first cache. After waiting for the lower-level second cache to send the data requested by the memory access instruction to the first cache, the data requested by the memory access instruction has been obtained by the first cache. Then, the memory access instruction in the missing status register can enter the pipeline queue of the first cache again, so as to correctly read the data in the first cache.
  • Step 203 When the refill data sent by the second cache in response to the acquisition request is received through the first cache, the first cache directory is read starting from the starting data bit of the pipeline queue of the first cache, and after an interval of a first number of data bits, the target data block is determined from the first cache according to the first cache directory.
  • FIG5 is a first cache processing process connected to FIG3.
  • the memory access instruction can enter the pipeline from the starting data bit (S1 data bit) of the pipeline queue of the first cache, and read the first cache directory from the starting data bit (S1 data bit).
  • the first cache directory is a data that represents the directory of data stored in the first cache. By reading the first cache directory, a target data block can be determined from the first cache to release and store the refill data.
  • step 203 may specifically include sub-steps 2031-2032:
  • Sub-step 2031 According to the first cache directory, obtain the last access time of each data block in the first cache.
  • Sub-step 2032 taking the data block with the earliest last access time as the target data block.
  • the first cache directory records the last access time of each data block in the first cache.
  • the embodiment of the present application can obtain the last access time of each data block in the first cache based on the first cache directory, and use the data block with the earliest last access time as the target data block.
  • the data block with the earliest last access time indicates that the data stored in the data block is the least active. Therefore, by using the data block with the earliest last access time as the target data block, the impact on the more active data in other data blocks can be minimized.
  • Sub-step 2034 when it is determined that the storage status is: there is no free data block in the first cache that can store the refill data, determine a target data block from the first cache.
  • the storage status of the first cache can be first detected. If the storage status is that there are free data blocks in the first cache that can store the refill data, the free data blocks are directly used as the target data blocks. However, when a capacity conflict occurs in the first cache (there are no free data blocks in the first cache that can store the refill data), it is necessary to determine the target data block from the first cache through the method of the above embodiment, release the old data in the target data block to make it a free data block, and write the refill data into the free target data block.
  • Step 204 Write the refill data into the refill buffer area of the first cache.
  • Step 205 read the refill buffer area at the data bit after the starting data bit, and read the refill data after an interval of a second number of data bits, write the read refill data into the write buffer area of the first cache, and read the old data in the target data block.
  • the operation of reading and refilling the buffer area is started at the next data bit (S2 data bit) of the starting data bit (S1 data bit) of the pipeline queue of the first cache. Since it takes a fixed time for the first cache to read the refill cache area from the beginning to read the refill data (corresponding to the pipeline, it takes a time corresponding to 1 data bit), the refill data can be read at the S3 data bit after an interval of the second number of data bits (an interval of 1 data bit).
  • Step 206 After a third number of data bits have been left, the old data obtained by reading is stored in the second cache, thereby completing the release of the target data block.
  • the first cache also synchronously starts the operation of reading the old data in the target data block in the S3 data bit of the pipeline queue of the first cache. Since it takes a fixed time for the first cache to read the target data block from the beginning to read the old data therein (corresponding to the pipeline, it takes a time corresponding to 2 data bits), after an interval of the third number of data bits (an interval of 2 data bits), the old data in the target data block can be read at the S5 data bit of the pipeline queue of the first cache. At this time, the old data is read out from the target data block.
  • the S5 data bit of the pipeline queue of the first cache can also send the read old data to the second cache to complete the release of the target data block.
  • the first cache still needs to obtain data from the second cache and refill the first cache according to steps 201 to 207 to meet the read instruction's requirement to read the old data.
  • Step 207 When it is detected that the operation of reading the target data block is completed, write the refill data in the write buffer area into the target data block.
  • the function of the write buffer area is to determine whether to write the refill data into the target data block according to the judgment of the read operation performed on the target data block. Specifically, the embodiment of the present application sets a higher priority for the operation of reading the target data block, so the write buffer needs to wait until all the read operations on the target data block are completed before starting the operation of writing the refill data in the write buffer area into the target data block. That is, when the write buffer area determines that all the read operations performed on the target data block are completed, the write buffer area executes the operation of writing the refill data in the write buffer area into the target data block, thereby completing the operation of storing the refill data into the first cache storage unit.
  • the method may further include:
  • Step 208 When the first address carried in the read request received by the first cache matches the second address of the target refill data in the write buffer area, return the target refill data as a response to the read request.
  • the target refill data in the write buffer area can be directly returned as a response to the read request.
  • the first address carried by the read request received by the first cache matches the second address of the target refill data in the write buffer area, it is determined that the data requested to be read by the read request is the target refill data in the refill buffer area.
  • the missing status register can establish two tasks.
  • the first task is used to implement the first cache obtaining refill data from the second cache during the above embodiment;
  • the second task is used to implement the target data block, release the target data block, write the refill data to the target data block, and continue to refill the refill data to the superior cache during the above embodiment.
  • the method may further include:
  • Step 209 After writing the refill data into the target data block, extract the memory access instruction from the missing status register, write the refill data into the third cache, and wake up the operation of reading data from the third cache through the memory access instruction.
  • the third cache is an upper-level cache of the first cache; and the memory access instruction misses in the third cache.
  • the memory access instruction when the first cache does not have a third cache of the upper level, can directly obtain the refill data from the first cache and feed it back to the processor.
  • the first cache after writing the refill data into the target data block, the first cache also needs to extract the memory access instruction from the missing status register, write the refill data into the third cache, and wake up the operation of reading data from the third cache through the memory access instruction, that is, the memory access instruction is to first access the upper cache, if the access to the upper cache does not hit, then access the data of the lower cache for data access, so when the memory access instruction does not hit in the upper third cache, after the lower second cache writes the refill data into the first cache of the current level, the first cache also needs to refill the refill data into the upper third cache, and when the third cache has no upper cache, the operation of reading data from the third cache through the memory access instruction can be awakened, and the awakened memory access instruction can directly obtain the refill data from the third
  • step 209 may specifically include sub-steps 2091-2092:
  • Sub-step 2091 Control the memory access instruction to enter the pipeline queue of the first cache from the starting data bit, and at the same time generate a wake-up instruction through the first cache and send it to the third cache through the wake-up queue.
  • Sub-step 2092 after spacing out the second number of data bits in the pipeline queue, obtain refill data through the first cache, and issue the memory access instruction as a refill instruction from the refill queue to the third cache.
  • the wake-up instruction is used to wake up the operation of reading data from the third cache through the memory access instruction; and the refill instruction is used to write the refill data into the third cache for reading by the memory access instruction.
  • the hit result is a miss, indicating that the data requested to be read by the memory access instruction is not stored in the first cache. At this time, it is necessary to check whether the data is stored in the lower-level second cache. If the data is stored in the second cache, the second cache is allowed to refill the data into the first cache for reading by the memory access instruction.
  • the memory access instruction is controlled to re-enter the pipeline queue from the starting data bit, and at the same time, a wake-up instruction is generated through the first cache and issued by the wake-up queue to the upper third cache (the moment of entering the wake-up queue and issuing the wake-up instruction is the moment corresponding to the data bit S1); and after an interval of the second number of data bits (an interval of 2 data bits), the refill data is obtained through the first cache, and the memory access instruction is issued from the refill queue to the third cache as a refill instruction.
  • the actual sending time of the wake-up request is the moment corresponding to data bit S1. Since the refill request has to wait in the refill queue for the length of time represented by a data bit (ensuring that the refill request at the exit of the refill queue is issued in time to reduce the probability of congestion in the refill queue), the actual sending time of the refill request is the moment corresponding to data bit S4. It can be seen that the embodiment of the present application can ensure that for each refill request, a wake-up request is issued three data bits in advance.
  • the embodiment of the present application realizes the management of memory access instructions through the concise and clear multi-level pipeline queue architecture of the first cache. Based on the pipeline queue, it is designed to obtain the hit result of the memory access instruction and send a wake-up request at a fixed data bit, and to obtain the refill data at another fixed data bit and send the refill request through the refill queue; based on the pipeline queue architecture and the design of each processing time of the instruction in the pipeline, it can achieve accurate and stable control of the fixed advance amount of the wake-up request, ensuring the accuracy and coverage of the memory access instruction reading process.
  • the whole process does not need to read the status of the pipeline requests at each level, and the real-time calculation of the advance issuance time based on the status of the refill queue request, so the complexity is extremely low, reducing the cost and power consumption of the circuit.
  • the method may further include:
  • Step 210 If the hit result is a hit, read the data in the data block hit by the memory access instruction in the first cache and return it.
  • the hit result of the memory access instruction in the first cache is a hit, indicating that the first cache has the data requested to be read by the memory access instruction. If the first cache also has a third cache of an upper level, the first cache can refill the data requested to be read by the memory access instruction into the third cache; if the first cache does not have a third cache of an upper level, the processor can read data directly from the first cache through the memory access instruction.
  • the data block when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block.
  • the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally.
  • the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.
  • FIG6 is a block diagram of a device for processing refill data provided by an embodiment of the present application, the device comprising:
  • the acquisition module 301 is used to acquire a hit result of the memory access instruction in the first cache when the memory access instruction of the processor is acquired through the first cache;
  • the write module 303 is used to determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data into the target data block when receiving the refill data sent by the second cache in response to the acquisition request through the first cache.
  • the writing module 303 includes:
  • the determination submodule is used to read the first cache directory starting from the start data bit of the pipeline queue of the first cache, and determine the target data block from the first cache according to the first cache directory after an interval of a first number of data bits.
  • the writing module 303 includes:
  • a first writing submodule used for writing the refill data into a refill buffer area of the first cache
  • a processing submodule configured to read the refill buffer area at a data bit following the start data bit, and read the refill data after a second number of data bits, write the read refill data into the write buffer area of the first cache, and read old data in the target data block;
  • the data block when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block.
  • the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally.
  • the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are generally portable or fixed storage units as described with reference to FIG. 8.
  • the storage unit can have storage segments, storage spaces, etc. arranged similarly to the memory 1020 in the computing processing device of FIG. 7.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 1031', i.e., code that can be read by a processor such as 1010, which, when executed by a computing processing device, causes the computing processing device to perform the various steps in the method described above.
  • the electronic device includes: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the processing method of refilling data in the above-mentioned embodiment.
  • the processor may be a CPU (Central Processing Unit), a general processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other editable devices, transistor logic devices, hardware components or any combination thereof.
  • the processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
  • the communication bus may include a path for transmitting information between the memory and the communication interface.
  • the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc.
  • the communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in FIG9 , but it does not mean that there is only one bus or one type of bus.
  • the memory can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access) or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM (Electrically Erasable Programmable Read Only), CD-ROM (Compact Disa Read Only), magnetic tape, floppy disk and optical data storage device, etc.
  • ROM Read Only Memory
  • RAM Random Access
  • EEPROM Electrically Erasable Programmable Read Only
  • CD-ROM Compact Disa Read Only
  • magnetic tape magnetic tape
  • floppy disk and optical data storage device etc.
  • references to "one embodiment,” “embodiment,” or “one or more embodiments” herein mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application.
  • examples of the term “in one embodiment” herein do not necessarily all refer to the same embodiment.
  • any reference signs placed between brackets shall not be construed as limiting the claims.
  • the word “comprising” does not exclude the presence of elements or steps not listed in the claims.
  • the word “a” or “an” preceding an element does not exclude the presence of a plurality of such elements.
  • the present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware.
  • the use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

Provided in the present application are a refilling data processing method and apparatus, and an electronic device, a computer-readable storage medium and a computer program. The method comprises: when a memory access instruction of a processor is acquired by means of a first cache, acquiring a hit result of the memory access instruction in the first cache; if the hit result is that the memory access instruction is not hit, suspending the memory access instruction, and sending an acquisition request to a second cache by means of the first cache at the same time; and upon receiving, by means of the first cache, refilling data sent by the second cache in response to the acquisition request, determining a target data block from the first cache, releasing old data stored in the target data block, and writing the refilling data into the target data block. In the present application, after receiving refilling data, a first cache releases old data stored in a selected target data block, thereby ensuring the normal implementation of the process of reading the old data by a memory access instruction during this period.

Description

重填数据的处理方法、装置、设备、存储介质及程序Method, device, equipment, storage medium and program for processing refill data

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求在2024年1月12日提交中国专利局、申请号为202410053386.6、申请名称为“重填数据的处理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on January 12, 2024, with application number 202410053386.6 and application name “Method, device, equipment and storage medium for processing refilled data”, the entire contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及计算机技术领域,尤其涉及一种重填数据的处理方法、装置、电子设备、计算机可读存储介质及计算机程序。The present application relates to the field of computer technology, and in particular to a method, device, electronic device, computer-readable storage medium and computer program for processing refill data.

背景技术Background Art

现代处理器中一般设有三级缓存:一级缓存L1、二级缓存L2和三级缓存L3,当处理器的访存指令访问一级缓存L1未命中时,二级缓存L2则需要将访存指令所请求的数据重填至一级缓存L1中,以保证数据访问的正常进行,同理,访存指令在二级缓存L2未命中时,三级缓存L3需要将请求的数据重填至二级缓存L2中。Modern processors generally have three levels of cache: L1 cache, L2 cache and L3 cache. When the processor's memory access instruction misses the L1 cache, L2 cache needs to refill the data requested by the memory access instruction into the L1 cache to ensure normal data access. Similarly, when the memory access instruction misses the L2 cache, L3 cache needs to refill the requested data into the L2 cache.

目前,在下级缓存向上级缓存重填数据的过程中,上级缓存首先选择一个数据块(数据用于表征指存放数据的位置)并将其中的旧数据释放,等待下级缓存将重填数据发送过来时,再将重填数据写入该数据块,实现数据的重填。Currently, in the process of refilling data from the lower-level cache to the upper-level cache, the upper-level cache first selects a data block (data is used to represent the location where data is stored) and releases the old data in it, and then writes the refill data into the data block when the lower-level cache sends the refill data to realize data refill.

但是,上述过程中,从下级缓存发送重填数据至上级缓存往往需要较长的时间,在等待重填数据的时间内,数据块中的旧数据已经被释放,而重填数据尚未收到,所以数据块中没有有效数据,但是数据块仍然被持续占用,从而造成了缓存资源的空闲和浪费。However, in the above process, it often takes a long time to send the refill data from the lower-level cache to the upper-level cache. During the waiting time for the refill data, the old data in the data block has been released, but the refill data has not yet been received, so there is no valid data in the data block, but the data block is still continuously occupied, resulting in idleness and waste of cache resources.

发明内容Summary of the invention

本申请实施例提供一种重填数据的处理方法、装置、电子设备、计算机可读存储介质及计算机程序,以解决相关技术中的问题。Embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program for processing refill data to solve problems in related technologies.

第一方面,本申请实施例提供了一种重填数据的处理方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for processing refill data, the method comprising:

在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果;In the case where a memory access instruction of the processor is obtained through the first cache, obtaining a hit result of the memory access instruction in the first cache;

若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存;If the hit result is a miss, the memory access instruction is suspended, and a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache;

在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。When the first cache receives the refill data sent by the second cache in response to the acquisition request, the target data block is determined from the first cache, the old data stored in the target data block is released, and the refill data is written into the target data block.

第二方面,本申请实施例提供了一种重填数据的处理装置,所述装置包括:In a second aspect, an embodiment of the present application provides a device for processing refill data, the device comprising:

获取模块,用于在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果;An acquisition module, configured to acquire a hit result of a memory access instruction in the first cache when a memory access instruction of the processor is acquired through the first cache;

未命中模块,用于若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存;a miss module, configured to suspend the memory access instruction if the hit result is a miss, and send a fetch request to a second cache through the first cache; the second cache is a lower-level cache of the first cache;

写入模块,用于在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。A write module is used to determine a target data block from the first cache, release old data stored in the target data block, and write the refill data into the target data block when receiving the refill data sent by the second cache in response to the acquisition request through the first cache.

第三方面,本申请实施例还提供了一种电子设备,包括处理器;In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;

用于存储所述处理器可执行指令的存储器;a memory for storing instructions executable by the processor;

其中,所述处理器被配置为执行所述指令,以实现所述第一方面的方法。The processor is configured to execute the instructions to implement the method of the first aspect.

第四方面,本申请实施例还提供了一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行所述第一方面的方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.

第五方面,本申请实施例提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算处理设备上运行时,导致所述计算处理设备执行第一方面的方法。In a fifth aspect, an embodiment of the present application provides a computer program, comprising a computer-readable code, which, when executed on a computing processing device, causes the computing processing device to execute the method of the first aspect.

本申请实施例中,可以在访存指令在第一缓存中未命中时,先不去选择数据块进行释放,而是通知下级的第二缓存去获取访存请求所需的重填数据,等待第二缓存获取到重填数据并发送重填数据至第一缓存时,再从第一缓存中确定目标数据块,并释放目标数据块中存储的旧数据,以及将重填数据写入目标数据块。这样,在重填数据到来之前的这段时间内,存储有旧数据的数据块正常运作,并未被空置及占用,旧数据也可正常被访问。另外,本申请在第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,也保证了此期间访存指令对旧数据读取过程的正常实现。In an embodiment of the present application, when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block. In this way, during the period before the arrival of the refill data, the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally. In addition, after the first cache receives the refill data, the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.

上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见的,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获取其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1是本申请实施例提供的一种实施场景架构图;FIG1 is an architecture diagram of an implementation scenario provided by an embodiment of the present application;

图2是本申请实施例提供的一种重填数据的处理方法的步骤流程图;FIG2 is a flowchart of a method for processing refill data provided by an embodiment of the present application;

图3是本发明实施例提供的一种第一缓存的架构示意图;FIG3 is a schematic diagram of the architecture of a first cache provided by an embodiment of the present invention;

图4是本申请实施例提供的一种重填数据的处理方法的具体步骤流程图;FIG4 is a flowchart of specific steps of a method for processing refill data provided in an embodiment of the present application;

图5是本发明实施例提供的另一种第一缓存的架构示意图;FIG5 is a schematic diagram of another architecture of a first cache provided by an embodiment of the present invention;

图6是本申请实施例提供的一种重填数据的处理装置的框图;FIG6 is a block diagram of a device for processing refill data provided by an embodiment of the present application;

图7示意性地示出了用于执行根据本申请的方法的计算处理设备的框图;FIG7 schematically shows a block diagram of a computing processing device for executing the method according to the present application;

图8示意性地示出了用于保持或者携带实现根据本申请的方法的程序代码的存储单元;FIG8 schematically shows a storage unit for holding or carrying a program code for implementing the method according to the present application;

图9是本申请实施例提供的一种电子设备的框图。FIG. 9 is a block diagram of an electronic device provided in an embodiment of the present application.

具体实施例Specific embodiments

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中的术语“和/或”用于描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。本申请实施例中术语“多个”是指两个或两个以上,其它量词与之类似。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and/or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and/or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.

参照图1,图1是本申请实施例提供的一种实施场景架构图,现代处理器为了提升执行效率,减少处理器与内存的交互,可以在处理器上集成多级缓存架构,常见的架构为图1的三级缓存结构,包括:一级缓存L1、二级缓存L2和三级缓存L3。一级缓存L1是最接近处理器的缓存,它容量最小,速度最快;二级缓存L2的容量更大一些,但速度相对一级缓存L1要慢一些,二级缓存L2就是一级缓存L1的缓冲器,二级缓存L2的作用就是存储那些处理器处理时需要用到,但一级缓存L1又无法存储的数据;三级缓存L3的容量最大,同时也是速度最慢的一级,三级缓存L3和内存可以看作是二级缓存L2的缓冲器。Referring to Figure 1, Figure 1 is an implementation scenario architecture diagram provided by an embodiment of the present application. In order to improve execution efficiency and reduce the interaction between the processor and the memory, modern processors can integrate a multi-level cache architecture on the processor. The common architecture is the three-level cache structure of Figure 1, including: Level 1 cache L1, Level 2 cache L2 and Level 3 cache L3. Level 1 cache L1 is the cache closest to the processor, with the smallest capacity and the fastest speed; Level 2 cache L2 has a larger capacity, but is slower than Level 1 cache L1. Level 2 cache L2 is the buffer of Level 1 cache L1. The function of Level 2 cache L2 is to store data that is needed for processor processing but cannot be stored by Level 1 cache L1; Level 3 cache L3 has the largest capacity and is also the slowest level. Level 3 cache L3 and memory can be regarded as buffers of Level 2 cache L2.

当处理器运作时,处理器会根据访存指令首先去一级缓存L1寻找所需要的数据,之后去二级缓存L2,之后再去三级缓存L3,如果三级缓存都没找到它需要的数据,则从内存里获取数据。寻找的路径越长,耗时越长,所以如果要非常频繁的获取某些数据,保证这些数据在一级缓存L1里,这样速度将非常快。其中,访存指令是从内存的指定地址获取数据,或往内存中的指定地址存储数据的指令。When the processor is running, the processor will first go to the first-level cache L1 to find the required data according to the memory access instruction, then go to the second-level cache L2, and then go to the third-level cache L3. If the third-level cache does not find the data it needs, it will get the data from the memory. The longer the search path, the longer it takes, so if you need to get certain data very frequently, make sure that the data is in the first-level cache L1, so that the speed will be very fast. Among them, the memory access instruction is an instruction to get data from a specified address in the memory, or to store data at a specified address in the memory.

在上述过程中,访存指令在一级缓存L1中未命中(指一级缓存L1中未存有访存指令请求读取的数据),则继续查找访存指令在二级缓存L2中是否命中,若在二级缓存L2中命中,则二级缓存L2将访存指令请求读取的数据重填入一级缓存L1;若在二级缓存L2中未命中,则继续查找访存指令在三级缓存L3中是否命中,若在三级缓存L3中命中,则三级缓存L3将访存指令请求读取的数据重填入二级缓存L2,再由二级缓存L2将数据重填入一级缓存L1。In the above process, if the memory access instruction does not hit in the first-level cache L1 (meaning that the first-level cache L1 does not store the data requested to be read by the memory access instruction), the memory access instruction will continue to be searched whether it hits in the second-level cache L2. If it hits in the second-level cache L2, the second-level cache L2 will refill the data requested to be read by the memory access instruction into the first-level cache L1; if it does not hit in the second-level cache L2, the memory access instruction will continue to be searched whether it hits in the third-level cache L3. If it hits in the third-level cache L3, the third-level cache L3 will refill the data requested to be read by the memory access instruction into the second-level cache L2, and then the second-level cache L2 will refill the data into the first-level cache L1.

但是,由于缓存的空间有限,在缓存发生容量冲突(即缓存空间已满,不足以继续存储重填数据)时,需要在等待重填的第一缓存中选择一个数据块释放其中的旧数据,从而腾出空间来存放重填数据。However, due to the limited cache space, when a cache capacity conflict occurs (i.e., the cache space is full and insufficient to continue storing the refill data), it is necessary to select a data block in the first cache waiting for refilling to release the old data therein, thereby freeing up space to store the refill data.

相关技术是在第一缓存通知下级的第二缓存进行数据重填的同时,在第一缓存中选择一个数据块释放其中的旧数据,等待下级缓存将重填数据发送过来时,再将重填数据写入该数据块,实现数据的重填。这会导致等待重填数据的过程中,该空置的数据块被持续占用,另外,该过程中若有对旧数据的访问需求,则由于旧数据已被释放而无法成功访问。The related technology is that when the first cache notifies the lower-level second cache to refill data, it selects a data block in the first cache to release the old data therein, and when the lower-level cache sends the refill data, the refill data is written into the data block to achieve data refill. This will cause the vacant data block to be continuously occupied during the waiting process for the refill data. In addition, if there is a need to access the old data during this process, it cannot be successfully accessed because the old data has been released.

为了解决该问题,本申请实施例可以在访存指令在第一缓存中未命中时,先不去选择数据块进行释放,而是通知下级的第二缓存去获取访存请求所需的重填数据,等待第二缓存获取到重填数据并发送重填数据至第一缓存时,再从第一缓存中确定目标数据块,并释放目标数据块中存储的旧数据,以及将重填数据写入目标数据块。这样,在重填数据到来之前的这段时间内,存储有旧数据的数据块正常运作,并未被空置及占用,旧数据也可正常被访问。另外,本申请在第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,以及将重填数据写入目标数据块,也保证了此期间访存指令对旧数据读取过程的正常实现。In order to solve this problem, the embodiment of the present application may not select a data block for release when the memory access instruction does not hit the first cache, but instead notify the subordinate second cache to obtain the refill data required for the memory access request, wait for the second cache to obtain the refill data and send the refill data to the first cache, and then determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data to the target data block. In this way, during the period before the arrival of the refill data, the data block storing the old data operates normally and is not vacant or occupied, and the old data can also be accessed normally. In addition, after the first cache receives the refill data, the present application releases the old data stored in the selected target data block and writes the refill data to the target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.

图2,是本申请实施例提供的一种重填数据的处理方法的步骤流程图,如图2所示,该方法可以包括:FIG. 2 is a flowchart of a method for processing refill data provided by an embodiment of the present application. As shown in FIG. 2 , the method may include:

步骤101、在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果。Step 101 : when a memory access instruction of a processor is obtained through a first cache, a hit result of the memory access instruction in the first cache is obtained.

在本申请实施例中,访存指令进入第一缓存的流水线后,需要进一步查看第一缓存中是否具有访存指令请求读取的数据,判断是否存在该数据的过程可以理解为判断访存指令在第一缓存中的命中结果,命中结果包括命中或未命中,命中代表第一缓存中具有访存指令请求读取的数据;未命中代表第一缓存中未存有访存指令请求读取的数据。In an embodiment of the present application, after the memory access instruction enters the pipeline of the first cache, it is necessary to further check whether the first cache contains the data requested to be read by the memory access instruction. The process of determining whether the data exists can be understood as determining the hit result of the memory access instruction in the first cache. The hit result includes a hit or a miss. A hit represents that the first cache contains the data requested to be read by the memory access instruction; a miss represents that the first cache does not contain the data requested to be read by the memory access instruction.

具体的,判断访存指令在第一缓存中的命中结果需要遍历第一缓存的缓存目录,因此需要花费一定的时长,该时长是固定的,参照图3,其示出了一种第一缓存的架构示意图,第一缓存可以采用5级流水线架构,即包含一个具有5个顺序排列的数据位的流水线队列,每个数据位对应一个流水线时刻,不同数据位对应的流水线时刻不同,指令用于从流水线队列的初始数据位S1进入流水线,并随着时间的迁移,改变所处的数据位。本申请实施例可以在访存指令从流水线队列的起始数据位(S1)进入流水线后,间隔固定数量的数据位(例如间隔2个数据位)后,再获取访存指令在第一缓存的命中结果(在S3数据位对应的时刻获取命中结果),由于获得了命中结果,且命中结果包括命中或未命中。因此本申请实施例后续可以根据命中结果执行相应的指令控制操作。Specifically, judging the hit result of the memory access instruction in the first cache requires traversing the cache directory of the first cache, so it takes a certain amount of time, which is fixed. Referring to Figure 3, it shows a schematic diagram of the architecture of the first cache. The first cache can adopt a 5-level pipeline architecture, that is, it includes a pipeline queue with 5 sequentially arranged data bits, each data bit corresponds to a pipeline moment, and different data bits correspond to different pipeline moments. The instruction is used to enter the pipeline from the initial data bit S1 of the pipeline queue, and change the data bit with the migration of time. The embodiment of the present application can obtain the hit result of the memory access instruction in the first cache (obtain the hit result at the moment corresponding to the S3 data bit) after the memory access instruction enters the pipeline from the starting data bit (S1) of the pipeline queue, after a fixed number of data bits (for example, 2 data bits are separated). Since the hit result is obtained, and the hit result includes a hit or a miss. Therefore, the embodiment of the present application can subsequently perform corresponding instruction control operations according to the hit result.

需要说明的是,间隔固定数量的数据位(图3为间隔2个数据位),是指等待判断访存指令在第一缓存中的命中结果的操作执行所需的时长,由于该时长是固定的,并且第一缓存的流水线队列中数据位表征时刻,因此该时长可以换算为固定数量的数据位,从起始数据位(S1)起间隔固定数量的数据位,表征在访存指令进入第一缓存的流水线后,等待判断是否命中的执行过程完成,从而获得访存指令在第一缓存中的命中结果。It should be noted that the interval of a fixed number of data bits (Figure 3 shows an interval of 2 data bits) refers to the time required for the execution of the operation of waiting to determine the hit result of the memory access instruction in the first cache. Since the time length is fixed, and the data bits in the pipeline queue of the first cache represent the moment, the time length can be converted into a fixed number of data bits. Starting from the starting data bit (S1), a fixed number of data bits are spaced to represent the completion of the execution process of waiting to determine whether a hit is achieved after the memory access instruction enters the pipeline of the first cache, thereby obtaining the hit result of the memory access instruction in the first cache.

步骤102、若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存。Step 102: If the hit result is a miss, the memory access instruction is suspended, and a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache.

在本申请实施例中,访存指令在所述第一缓存中的命中结果为命中,表征第一缓存中具有访存指令请求读取的数据,若第一缓存还具有上级的第三缓存,则第一缓存可以将访存指令请求读取的数据重填入第三缓存;若第一缓存没有上级的第三缓存,则处理器可以通过访存指令直接从第一缓存中读取数据。In an embodiment of the present application, the hit result of the memory access instruction in the first cache is a hit, indicating that the first cache has the data requested to be read by the memory access instruction. If the first cache also has a superior third cache, the first cache can refill the data requested to be read by the memory access instruction into the third cache; if the first cache does not have a superior third cache, the processor can read data directly from the first cache through the memory access instruction.

而在该步骤中,访存指令在所述第一缓存中的命中结果为未命中,表征第一缓存中未存有访存指令请求读取的数据,此时需要查看第一缓存下级的第二缓存中是否具有该数据,若第二缓存中存有该数据,则让第二缓存将该数据重填至第一缓存中,因此,在命中结果为未命中时,本申请实施例可以将访存指令挂起,同时通过第一缓存向第二缓存发送获取请求,以请求第二缓存找到访存指令所需的重填数据并发送至第一缓存。另外,在命中结果为未命中时,本申请实施例无需立即寻找第一缓存中的目标数据块进行释放,这样在重填数据到来之前的这段时间内,存储有旧数据的目标数据块可以正常运作,旧数据也可正常被访问。第二缓存是所述第一缓存的下级缓存,例如,针对三级缓存结构:一级缓存L1、二级缓存L2和三级缓存L3,假设第一缓存为一级缓存L1,则二级缓存可以为二级缓存L2;假设第一缓存为二级缓存L2,则二级缓存可以为三级缓存L3。In this step, the hit result of the memory access instruction in the first cache is a miss, indicating that the first cache does not store the data requested to be read by the memory access instruction. At this time, it is necessary to check whether the second cache under the first cache has the data. If the data is stored in the second cache, let the second cache refill the data into the first cache. Therefore, when the hit result is a miss, the embodiment of the present application can suspend the memory access instruction and send a fetch request to the second cache through the first cache to request the second cache to find the refill data required by the memory access instruction and send it to the first cache. In addition, when the hit result is a miss, the embodiment of the present application does not need to immediately find the target data block in the first cache for release, so that during the period before the refill data arrives, the target data block storing the old data can operate normally and the old data can also be accessed normally. The second cache is a lower-level cache of the first cache. For example, for the three-level cache structure: first-level cache L1, second-level cache L2 and third-level cache L3, assuming that the first cache is first-level cache L1, then the second-level cache can be second-level cache L2; assuming that the first cache is second-level cache L2, then the second-level cache can be third-level cache L3.

需要说明的是,参照图3,访存指令在所述第一缓存中的命中结果为未命中时,将访存指令挂起,是指将访存指令脱离第一缓存的流水线队列,并进入一个分配的缺失状态寄存器(MSHR,Miss-status Handling Registers)进行等待,缺失状态寄存器是用来记录每一项未完成的事务的寄存器,记录的信息包括失效地址、关键字信息以及未完成执行的指令等。一旦第二缓存对第一缓存重填完成后,缺失状态寄存器中的访存指令即可重新执行。重新执行的访存指令可以重新进入第一缓存的流水线队列。It should be noted that, referring to FIG. 3 , when the hit result of the memory access instruction in the first cache is a miss, the memory access instruction is suspended, which means that the memory access instruction is separated from the pipeline queue of the first cache and enters an allocated miss status register (MSHR, Miss-status Handling Registers) for waiting. The miss status register is a register used to record each unfinished transaction, and the recorded information includes the invalid address, keyword information, and unfinished execution instructions. Once the second cache completes the refill of the first cache, the memory access instruction in the miss status register can be re-executed. The re-executed memory access instruction can re-enter the pipeline queue of the first cache.

步骤103、在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。Step 103: When the first cache receives the refill data sent by the second cache in response to the acquisition request, determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data into the target data block.

在本申请实施例中,第二缓存响应于获取请求,去查找并获取重填数据发送至第一缓存的过程,通常需要较长的时间(需花费第一缓存的流水线中几十个数据位到上百个数据位的时长),而本申请实施例在第一缓存等待重填数据发来的这段时间中,并未对存有旧数据的数据块进行释放及占用,在保证旧数据可正常被访问的基础上,提高了对缓存资源的利用率。In an embodiment of the present application, the process in which the second cache responds to the acquisition request to search and obtain the refill data and send it to the first cache usually takes a long time (it takes dozens to hundreds of data bits in the pipeline of the first cache). During the time when the first cache waits for the refill data to be sent, the embodiment of the present application does not release or occupy the data block containing the old data, thereby improving the utilization rate of the cache resources while ensuring that the old data can be accessed normally.

进一步的,本申请实施例具体是在通过第一缓存接收到第二缓存发送的重填数据时,才开始进行目标数据块的选取,若目标数据块中存储有旧数据,则释放该旧数据,并将重填数据写入所述目标数据块。这样,在重填数据到来之前的这段时间内,第一缓存中存储有旧数据的数据块可以正常运作,并未被空置及占用,旧数据也可正常被访问。第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,以及将重填数据写入目标数据块,也保证了访存指令读取数据过程的正常实现。Furthermore, in the embodiment of the present application, the target data block is selected only when the refill data sent by the second cache is received through the first cache. If the target data block stores old data, the old data is released and the refill data is written into the target data block. In this way, during the period before the refill data arrives, the data block storing the old data in the first cache can operate normally and is not vacant or occupied, and the old data can also be accessed normally. After the first cache receives the refill data, the old data stored in the selected target data block is released, and the refill data is written into the target data block, which also ensures the normal implementation of the data reading process of the memory access instruction.

综上,本申请实施例中,可以在访存指令在第一缓存中未命中时,先不去选择数据块进行释放,而是通知下级的第二缓存去获取访存请求所需的重填数据,等待第二缓存获取到重填数据并发送重填数据至第一缓存时,再从第一缓存中确定目标数据块,并释放目标数据块中存储的旧数据,以及将重填数据写入目标数据块。这样,在重填数据到来之前的这段时间内,存储有旧数据的数据块正常运作,并未被空置及占用,旧数据也可正常被访问。另外,本申请在第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,也保证了此期间访存指令对旧数据读取过程的正常实现In summary, in the embodiments of the present application, when a memory access instruction does not hit in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and waits for the second cache to obtain the refill data and send the refill data to the first cache, and then the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block. In this way, during the period before the arrival of the refill data, the data block storing the old data operates normally and is not vacant or occupied, and the old data can also be accessed normally. In addition, after the first cache receives the refill data, the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.

图4是本申请实施例提供的一种重填数据的处理方法的具体步骤流程图,如图4所示,该方法可以包括:FIG. 4 is a flowchart of specific steps of a method for processing refill data provided by an embodiment of the present application. As shown in FIG. 4 , the method may include:

步骤201、在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果。Step 201: When a memory access instruction of a processor is obtained through a first cache, a hit result of the memory access instruction in the first cache is obtained.

该步骤具体可以参照上述步骤101,此处不做赘述。This step may specifically refer to the above step 101, which will not be described in detail here.

步骤202、若所述命中结果为未命中,则控制所述访存指令脱离所述流水线队列,并进入缺失状态寄存器进行挂起等待,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存。Step 202: If the hit result is a miss, the memory access instruction is controlled to leave the pipeline queue and enter the missing state register for suspended waiting, and at the same time, a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache.

在本申请实施例中,参照图3,访存指令在所述第一缓存中的命中结果为未命中,表征第一缓存中未存有访存指令请求读取的数据,此时需要通过第一缓存向下级的第二缓存发送获取请求,查看下级的第二缓存中是否具有该数据,若第二缓存中存有该数据,则让第二缓存响应于该获取请求,将该数据重填至第一缓存中。In an embodiment of the present application, referring to Figure 3, the hit result of the memory access instruction in the first cache is a miss, indicating that the data requested to be read by the memory access instruction is not stored in the first cache. At this time, it is necessary to send a get request to the lower-level second cache through the first cache to check whether the lower-level second cache has the data. If the data is stored in the second cache, the second cache responds to the get request and refills the data into the first cache.

具体的,在命中结果为未命中时,可以将访存指令脱离第一缓存的流水线队列,并进入一个分配的缺失状态寄存器(MSHR)进行等待,缺失状态寄存器是用来记录每一项未完成的事务的寄存器,一旦第二缓存对第一缓存重填完成后,缺失状态寄存器中的访存指令即可重新执行,重新执行的访存指令可以重新进入第一缓存的流水线队列。Specifically, when the hit result is a miss, the memory access instruction can be removed from the pipeline queue of the first cache and enter an allocated miss status register (MSHR) for waiting. The miss status register is a register used to record each unfinished transaction. Once the second cache completes the refill of the first cache, the memory access instruction in the miss status register can be re-executed, and the re-executed memory access instruction can re-enter the pipeline queue of the first cache.

其中,将访存指令脱离第一缓存的流水线队列,是因该访存指令所请求获取的数据在第一缓存中未存储,而导致该访存指令当前未能实现数据读取,从而将该访存指令先脱离第一缓存的流水线队列进入缺失状态寄存器进行等待,避免对第一缓存的其他请求的执行造成干扰,等待下级的第二缓存将该访存指令所请求获取的数据发送至第一缓存后,该访存指令所请求获取的数据已被第一缓存获得,则缺失状态寄存器中的该访存指令可以再次进入第一缓存的流水线队列,从而在第一缓存中正确读取该数据。Among them, the memory access instruction is separated from the pipeline queue of the first cache because the data requested by the memory access instruction is not stored in the first cache, which causes the memory access instruction to currently fail to realize data reading. Therefore, the memory access instruction is first separated from the pipeline queue of the first cache and enters the missing status register to wait, so as to avoid interfering with the execution of other requests of the first cache. After waiting for the lower-level second cache to send the data requested by the memory access instruction to the first cache, the data requested by the memory access instruction has been obtained by the first cache. Then, the memory access instruction in the missing status register can enter the pipeline queue of the first cache again, so as to correctly read the data in the first cache.

步骤203、在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存的流水线队列的起始数据位开始读取第一缓存目录,并在间隔第一数量的数据位后,根据所述第一缓存目录从所述第一缓存中确定所述目标数据块。Step 203: When the refill data sent by the second cache in response to the acquisition request is received through the first cache, the first cache directory is read starting from the starting data bit of the pipeline queue of the first cache, and after an interval of a first number of data bits, the target data block is determined from the first cache according to the first cache directory.

在本申请实施例中,参照图5,其示出了另一种第一缓存的架构示意图,图5是衔接图3的第一缓存处理过程,在通过第一缓存,接收到第二缓存响应于获取请求后发送的重填数据时,访存指令所请求获取的数据已被第一缓存获得,则缺失状态寄存器中的该访存指令可以再次进入第一缓存的流水线队列。具体的,访存指令可以从第一缓存的流水线队列的起始数据位(S1数据位)进入流水线,以及从起始数据位(S1数据位)开始读取第一缓存目录,第一缓存目录是一种表征第一缓存中存储数据的目录的数据,通过读取第一缓存目录,可以从第一缓存中确定出一个目标数据块进行释放和存储重填数据。In an embodiment of the present application, referring to FIG5, another schematic diagram of the architecture of the first cache is shown. FIG5 is a first cache processing process connected to FIG3. When the refill data sent by the second cache in response to the acquisition request is received through the first cache, the data requested by the memory access instruction has been obtained by the first cache, and the memory access instruction in the missing status register can enter the pipeline queue of the first cache again. Specifically, the memory access instruction can enter the pipeline from the starting data bit (S1 data bit) of the pipeline queue of the first cache, and read the first cache directory from the starting data bit (S1 data bit). The first cache directory is a data that represents the directory of data stored in the first cache. By reading the first cache directory, a target data block can be determined from the first cache to release and store the refill data.

可选的,步骤203具体可以包括子步骤2031-2032:Optionally, step 203 may specifically include sub-steps 2031-2032:

子步骤2031、根据所述第一缓存目录,获取所述第一缓存中每个数据块的上次访问时间。Sub-step 2031: According to the first cache directory, obtain the last access time of each data block in the first cache.

子步骤2032、将所述上次访问时间最早的数据块作为所述目标数据块。Sub-step 2032: taking the data block with the earliest last access time as the target data block.

在本申请实施例的一种实现方式中,针对子步骤2031-2032,第一缓存目录记录了第一缓存中各个数据块的上次访问时间,则本申请实施例可以基于第一缓存目录,获取第一缓存中每个数据块的上次访问时间,并将上次访问时间最早的数据块作为目标数据块,上次访问时间最早的数据块表示该数据块中存储的数据最不活跃,因此,将上次访问时间最早的数据块作为目标数据块,可以对其他数据块中的较活跃数据带来的影响降到最低。In one implementation of an embodiment of the present application, for sub-steps 2031-2032, the first cache directory records the last access time of each data block in the first cache. The embodiment of the present application can obtain the last access time of each data block in the first cache based on the first cache directory, and use the data block with the earliest last access time as the target data block. The data block with the earliest last access time indicates that the data stored in the data block is the least active. Therefore, by using the data block with the earliest last access time as the target data block, the impact on the more active data in other data blocks can be minimized.

在本申请实施例的另一种实现方式中,也可以在第一缓存中随机选取一个数据块作为目标数据块,对目标数据块的选取策略本申请实施例不作具体限定。In another implementation of the embodiment of the present application, a data block may be randomly selected from the first cache as the target data block, and the embodiment of the present application does not specifically limit the selection strategy of the target data block.

可选的,步骤203具体还可以包括子步骤2033-2034:Optionally, step 203 may further include sub-steps 2033-2034:

子步骤2033、在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,检测所述第一缓存的存储状况。Sub-step 2033: When receiving, through the first cache, the refill data sent by the second cache in response to the acquisition request, detecting the storage status of the first cache.

子步骤2034、在确定所述存储状况为:所述第一缓存中不存在能够存储所述重填数据的空闲数据块时,从所述第一缓存中确定目标数据块。Sub-step 2034: when it is determined that the storage status is: there is no free data block in the first cache that can store the refill data, determine a target data block from the first cache.

在本申请实施例中,针对子步骤2033-2034,具体在第一缓存中确定目标数据块之前,首先可以检测所述第一缓存的存储状况,若存储状况为第一缓存中存在能够存储重填数据的空闲数据块,则将空闲数据块直接作为目标数据块,但是,在第一缓存在发生容量冲突(第一缓存中不存在能够存储重填数据的空闲数据块)时,则需要通过上述实施例的方法,从第一缓存中确定目标数据块,并释放目标数据块中的旧数据使其变为空闲数据块,以及将重填数据写入空闲的目标数据块。In an embodiment of the present application, with respect to sub-steps 2033-2034, specifically before determining the target data block in the first cache, the storage status of the first cache can be first detected. If the storage status is that there are free data blocks in the first cache that can store the refill data, the free data blocks are directly used as the target data blocks. However, when a capacity conflict occurs in the first cache (there are no free data blocks in the first cache that can store the refill data), it is necessary to determine the target data block from the first cache through the method of the above embodiment, release the old data in the target data block to make it a free data block, and write the refill data into the free target data block.

步骤204、将所述重填数据写入所述第一缓存的重填缓冲片区。Step 204: Write the refill data into the refill buffer area of the first cache.

在本申请实施例中,参照图5,第一缓存在刚接收到下级的第二缓存发送的重填数据时(此时重填数据还未写入目标数据块),需要在将重填数据写入目标数据块之前,先将重填数据暂时存储,因此第一缓存中可以设立一个独立的重填缓冲片区,第一缓存可以将重填数据写入重填缓冲片区进行暂时存储。In an embodiment of the present application, referring to Figure 5, when the first cache just receives the refill data sent by the second cache of the lower level (the refill data has not yet been written to the target data block at this time), it is necessary to temporarily store the refill data before writing the refill data to the target data block. Therefore, an independent refill buffer area can be set up in the first cache, and the first cache can write the refill data into the refill buffer area for temporary storage.

步骤205、在所述起始数据位的后一数据位,读取所述重填缓冲片区,并在间隔第二数量的数据位后,读取得到所述重填数据,将读取得到的重填数据写入所述第一缓存的写缓冲片区,以及读取所述目标数据块中的旧数据。Step 205, read the refill buffer area at the data bit after the starting data bit, and read the refill data after an interval of a second number of data bits, write the read refill data into the write buffer area of the first cache, and read the old data in the target data block.

在本申请实施例中,参照图5,在第一缓存的流水线队列的起始数据位(S1数据位)的后一数据位(S2数据位),开启读取重填缓冲片区的操作,由于第一缓存从开始读取重填缓存片区至读取得到重填数据需要花费固定时长(对应流水线,需要花费1个数据位对应的时长),因此在间隔第二数量的数据位(间隔1个数据位)后,在S3数据位可以读取得到重填数据。In an embodiment of the present application, referring to Figure 5, the operation of reading and refilling the buffer area is started at the next data bit (S2 data bit) of the starting data bit (S1 data bit) of the pipeline queue of the first cache. Since it takes a fixed time for the first cache to read the refill cache area from the beginning to read the refill data (corresponding to the pipeline, it takes a time corresponding to 1 data bit), the refill data can be read at the S3 data bit after an interval of the second number of data bits (an interval of 1 data bit).

在第一缓存的流水线队列的S3数据位中,第一缓存从重填缓冲片区中读取到重填数据的同时,第一缓存还可以将重填数据写入第一缓存的写缓冲片区(图中未绘出),写缓冲片区是第一缓存中设立的一个独立存储片区,其功能是根据是否对目标数据块所执行的读操作,确定是否将重填数据写入目标数据块,以及在确定写入时,将重填数据写入目标数据块。In the S3 data bit of the pipeline queue of the first cache, while the first cache reads the refill data from the refill buffer area, the first cache can also write the refill data into the write buffer area of the first cache (not shown in the figure). The write buffer area is an independent storage area established in the first cache. Its function is to determine whether to write the refill data to the target data block based on whether a read operation is performed on the target data block, and to write the refill data to the target data block when determining to write.

进一步的,在第一缓存的流水线队列的S3数据位中,第一缓存还同步开启读取目标数据块中的旧数据的操作。Furthermore, in the S3 data bit of the pipeline queue of the first cache, the first cache also synchronously starts an operation of reading old data in the target data block.

步骤206、在间隔第三数量的数据位后,将读取得到的所述旧数据存入所述第二缓存,完成所述目标数据块的释放。Step 206: After a third number of data bits have been left, the old data obtained by reading is stored in the second cache, thereby completing the release of the target data block.

在本申请实施例中,参照图5,在第一缓存的流水线队列的S3数据位中第一缓存还同步开启读取目标数据块中的旧数据的操作,由于第一缓存从开始读取目标数据块至读取得到其中的旧数据需要花费固定时长(对应流水线,需要花费2个数据位对应的时长),因此在间隔第三数量的数据位(间隔2个数据位)后,在第一缓存的流水线队列的S5数据位可以读取得到目标数据块中的旧数据,此时旧数据被从目标数据块中读出。In an embodiment of the present application, referring to Figure 5, the first cache also synchronously starts the operation of reading the old data in the target data block in the S3 data bit of the pipeline queue of the first cache. Since it takes a fixed time for the first cache to read the target data block from the beginning to read the old data therein (corresponding to the pipeline, it takes a time corresponding to 2 data bits), after an interval of the third number of data bits (an interval of 2 data bits), the old data in the target data block can be read at the S5 data bit of the pipeline queue of the first cache. At this time, the old data is read out from the target data block.

进一步的,在第一缓存的流水线队列的S5数据位还可以将读取得到的旧数据向第二缓存发送,完成目标数据块的释放。Furthermore, the S5 data bit of the pipeline queue of the first cache can also send the read old data to the second cache to complete the release of the target data block.

需要说明的是,在目标数据块中的旧数据释放后,若后续再接收到对旧数据的读取指令,则第一缓存仍需按照步骤201~207,向第二缓存获取数据并重填入第一缓存,以满足读取指令读取旧数据的需求。It should be noted that after the old data in the target data block is released, if a read instruction for the old data is subsequently received, the first cache still needs to obtain data from the second cache and refill the first cache according to steps 201 to 207 to meet the read instruction's requirement to read the old data.

步骤207、在检测到读取所述目标数据块的操作结束时,将所述写缓冲片区中的所述重填数据写入所述目标数据块。Step 207: When it is detected that the operation of reading the target data block is completed, write the refill data in the write buffer area into the target data block.

在本申请实施例中,写缓冲片区的功能是根据针对目标数据块所执行的读操作的判断,确定是否将重填数据写入目标数据块。具体的,本申请实施例为读取目标数据块的操作设置较高优先级,因此写缓冲区需要等待对目标数据块的读操作全部结束后,才能开始进行将写缓冲片区中的重填数据写入目标数据块的操作。即写缓冲片区在判断针对目标数据块所执行的读操作全部结束的情况下,写缓冲片区执行将写缓冲片区中的重填数据写入目标数据块的操作,从而完成将重填数据存入第一缓存存储单元的操作。In the embodiment of the present application, the function of the write buffer area is to determine whether to write the refill data into the target data block according to the judgment of the read operation performed on the target data block. Specifically, the embodiment of the present application sets a higher priority for the operation of reading the target data block, so the write buffer needs to wait until all the read operations on the target data block are completed before starting the operation of writing the refill data in the write buffer area into the target data block. That is, when the write buffer area determines that all the read operations performed on the target data block are completed, the write buffer area executes the operation of writing the refill data in the write buffer area into the target data block, thereby completing the operation of storing the refill data into the first cache storage unit.

可选的,所述方法还可以包括:Optionally, the method may further include:

步骤208、在所述第一缓存接收到的读取请求所携带的第一地址,与所述写缓冲片区中目标重填数据的第二地址匹配的情况下,将所述目标重填数据作为对所述读取请求的响应进行返回。Step 208: When the first address carried in the read request received by the first cache matches the second address of the target refill data in the write buffer area, return the target refill data as a response to the read request.

在本申请实施例中,在目标重填数据处于写缓冲片区中,还未写入目标数据块的这段时间,若接收到对该目标重填数据的读取请求,则可以直接将写缓冲片区中的目标重填数据直接作为对读取请求的响应进行返回。其中,在第一缓存接收到的读取请求所携带的第一地址,与写缓冲片区中目标重填数据的第二地址匹配的情况下,确定读取请求所请求读取的数据为重填缓冲区中的目标重填数据。In an embodiment of the present application, during the period when the target refill data is in the write buffer area and has not yet been written into the target data block, if a read request for the target refill data is received, the target refill data in the write buffer area can be directly returned as a response to the read request. Wherein, when the first address carried by the read request received by the first cache matches the second address of the target refill data in the write buffer area, it is determined that the data requested to be read by the read request is the target refill data in the refill buffer area.

需要说明的是,综上,缺失状态寄存器可以建立两个任务,第一个任务用于实现上述实施例过程中第一缓存从第二缓存获取重填数据;第二个任务用于实现上述实施例过程中确定目标数据块、释放目标数据块、将重填数据写入目标数据块,以及向上级缓存继续重填该重填数据。It should be noted that, in summary, the missing status register can establish two tasks. The first task is used to implement the first cache obtaining refill data from the second cache during the above embodiment; the second task is used to implement the target data block, release the target data block, write the refill data to the target data block, and continue to refill the refill data to the superior cache during the above embodiment.

可选的,所述方法还可以包括:Optionally, the method may further include:

步骤209、在将所述重填数据写入所述目标数据块后,从所述缺失状态寄存器中提取所述访存指令,并将所述重填数据写入第三缓存,以及唤醒通过所述访存指令从所述第三缓存中读数据的操作。Step 209: After writing the refill data into the target data block, extract the memory access instruction from the missing status register, write the refill data into the third cache, and wake up the operation of reading data from the third cache through the memory access instruction.

其中,所述第三缓存是所述第一缓存的上级缓存;所述访存指令在所述第三缓存中未命中。The third cache is an upper-level cache of the first cache; and the memory access instruction misses in the third cache.

在本申请实施例中,在第一缓存不具有上级的第三缓存的情况下,访存指令可直接从第一缓存获得重填数据并反馈给处理器。而在第一缓存具有上级的第三缓存的情况下,将重填数据写入目标数据块后,第一缓存还需要从缺失状态寄存器中提取访存指令,并将重填数据写入第三缓存,以及唤醒通过访存指令从第三缓存中读数据的操作,即访存指令是按照先访问上级缓存,若访问上级缓存未命中,再访问下级缓存的数据进行数据访问的,因此访存指令在上级第三缓存中未命中的情况下,下级的第二缓存将重填数据写入本级第一缓存后,第一缓存还需将重填数据重填入上级的第三缓存,在第三缓存已无上级缓存的情况下,可以唤醒通过访存指令从第三缓存中读数据的操作,唤醒后的访存指令可直接从第三缓存获得重填数据并反馈给处理器。同理,在第三缓存还具有更上级的缓存的情况下,第三缓存还需继续将重填数据重填入更上级的缓存。In the embodiment of the present application, when the first cache does not have a third cache of the upper level, the memory access instruction can directly obtain the refill data from the first cache and feed it back to the processor. In the case where the first cache has a third cache of the upper level, after writing the refill data into the target data block, the first cache also needs to extract the memory access instruction from the missing status register, write the refill data into the third cache, and wake up the operation of reading data from the third cache through the memory access instruction, that is, the memory access instruction is to first access the upper cache, if the access to the upper cache does not hit, then access the data of the lower cache for data access, so when the memory access instruction does not hit in the upper third cache, after the lower second cache writes the refill data into the first cache of the current level, the first cache also needs to refill the refill data into the upper third cache, and when the third cache has no upper cache, the operation of reading data from the third cache through the memory access instruction can be awakened, and the awakened memory access instruction can directly obtain the refill data from the third cache and feed it back to the processor. Similarly, when the third cache also has a higher cache, the third cache still needs to continue to refill the refill data into the higher cache.

可选的,步骤209具体可以包括子步骤2091-2092:Optionally, step 209 may specifically include sub-steps 2091-2092:

子步骤2091、控制所述访存指令从起始数据位进入所述第一缓存的流水线队列,同时通过所述第一缓存生成唤醒指令并由唤醒队列发出至第三缓存。Sub-step 2091: Control the memory access instruction to enter the pipeline queue of the first cache from the starting data bit, and at the same time generate a wake-up instruction through the first cache and send it to the third cache through the wake-up queue.

子步骤2092、在所述流水线队列中间隔所述第二数量的数据位后,通过所述第一缓存获取重填数据,将所述访存指令作为重填指令由重填队列发出至所述第三缓存。Sub-step 2092: after spacing out the second number of data bits in the pipeline queue, obtain refill data through the first cache, and issue the memory access instruction as a refill instruction from the refill queue to the third cache.

其中,所述唤醒指令用于唤醒通过所述访存指令从所述第三缓存中读数据的操作;所述重填指令用于将所述重填数据写入所述第三缓存供所述访存指令读取。The wake-up instruction is used to wake up the operation of reading data from the third cache through the memory access instruction; and the refill instruction is used to write the refill data into the third cache for reading by the memory access instruction.

在本申请实施例中,命中结果为未命中,表征第一缓存中未存有访存指令请求读取的数据,此时需要查看下级的第二缓存中是否具有该数据,若第二缓存中存有该数据,则让第二缓存将该数据重填至第一缓存中,以供访存指令读取。In an embodiment of the present application, the hit result is a miss, indicating that the data requested to be read by the memory access instruction is not stored in the first cache. At this time, it is necessary to check whether the data is stored in the lower-level second cache. If the data is stored in the second cache, the second cache is allowed to refill the data into the first cache for reading by the memory access instruction.

具体的,参照图3,在等待第二缓存重填第一缓存后,再控制访存指令重新从起始数据位进入所述流水线队列,同时通过第一缓存生成唤醒指令并由唤醒队列发出至上级的第三缓存(进入唤醒队列以及发出唤醒指令的时刻为数据位S1对应的时刻);以及在间隔第二数量的数据位后(间隔2个数据位),通过第一缓存获取重填数据,将访存指令作为重填指令由重填队列发出至第三缓存。Specifically, referring to Figure 3, after waiting for the second cache to refill the first cache, the memory access instruction is controlled to re-enter the pipeline queue from the starting data bit, and at the same time, a wake-up instruction is generated through the first cache and issued by the wake-up queue to the upper third cache (the moment of entering the wake-up queue and issuing the wake-up instruction is the moment corresponding to the data bit S1); and after an interval of the second number of data bits (an interval of 2 data bits), the refill data is obtained through the first cache, and the memory access instruction is issued from the refill queue to the third cache as a refill instruction.

例如,参照图3,命中结果为未命中的情况下,唤醒请求的实际发送时机是数据位S1对应的时刻,重填请求由于要在重填队列中等待一个数据位表征的时长(确保位于重填队列出口处的重填请求及时发出,降低重填队列堵塞的几率),因此重填请求实际的发出时机为数据位S4对应的时刻,可见,本申请实施例可以保证针对每个重填请求,都有一个提前三个数据位的唤醒请求发出。For example, referring to Figure 3, when the hit result is a miss, the actual sending time of the wake-up request is the moment corresponding to data bit S1. Since the refill request has to wait in the refill queue for the length of time represented by a data bit (ensuring that the refill request at the exit of the refill queue is issued in time to reduce the probability of congestion in the refill queue), the actual sending time of the refill request is the moment corresponding to data bit S4. It can be seen that the embodiment of the present application can ensure that for each refill request, a wake-up request is issued three data bits in advance.

本申请实施例通过第一缓存简洁明了的多级流水线队列架构实现了对访存指令的管理,基于流水线队列,设计了在一个固定的数据位获取访存指令的命中结果和发送唤醒请求,以及在另一固定的数据位获取重填数据和将重填请求通过重填队列发出;基于流水线队列的架构和指令在流水线中各个处理时机的设计,可以达到对发出唤醒请求的固定提前量的精确且稳定的控制,保证了访存指令读取过程的准确率和覆盖率。整个过程无需读取流水线各级请求的状态,以及基于重填队列请求的状态实时计算提前发出时刻,因此复杂度极低,降低了电路的成本和功耗。The embodiment of the present application realizes the management of memory access instructions through the concise and clear multi-level pipeline queue architecture of the first cache. Based on the pipeline queue, it is designed to obtain the hit result of the memory access instruction and send a wake-up request at a fixed data bit, and to obtain the refill data at another fixed data bit and send the refill request through the refill queue; based on the pipeline queue architecture and the design of each processing time of the instruction in the pipeline, it can achieve accurate and stable control of the fixed advance amount of the wake-up request, ensuring the accuracy and coverage of the memory access instruction reading process. The whole process does not need to read the status of the pipeline requests at each level, and the real-time calculation of the advance issuance time based on the status of the refill queue request, so the complexity is extremely low, reducing the cost and power consumption of the circuit.

可选的,所述方法还可以包括:Optionally, the method may further include:

步骤210、若所述命中结果为命中,则读取所述访存指令在所述第一缓存内命中的数据块中的数据并进行返回。Step 210: If the hit result is a hit, read the data in the data block hit by the memory access instruction in the first cache and return it.

在本申请实施例中,访存指令在第一缓存中的命中结果为命中,表征第一缓存中具有访存指令请求读取的数据,若第一缓存还具有上级的第三缓存,则第一缓存可以将访存指令请求读取的数据重填入第三缓存;若第一缓存没有上级的第三缓存,则处理器可以通过访存指令直接从第一缓存中读取数据。In an embodiment of the present application, the hit result of the memory access instruction in the first cache is a hit, indicating that the first cache has the data requested to be read by the memory access instruction. If the first cache also has a third cache of an upper level, the first cache can refill the data requested to be read by the memory access instruction into the third cache; if the first cache does not have a third cache of an upper level, the processor can read data directly from the first cache through the memory access instruction.

综上所述,本申请实施例中,可以在访存指令在第一缓存中未命中时,先不去选择数据块进行释放,而是通知下级的第二缓存去获取访存请求所需的重填数据,等待第二缓存获取到重填数据并发送重填数据至第一缓存时,再从第一缓存中确定目标数据块,并释放目标数据块中存储的旧数据,以及将重填数据写入目标数据块。这样,在重填数据到来之前的这段时间内,存储有旧数据的数据块正常运作,并未被空置及占用,旧数据也可正常被访问。另外,本申请在第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,也保证了此期间访存指令对旧数据读取过程的正常实现。In summary, in the embodiments of the present application, when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block. In this way, during the period before the arrival of the refill data, the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally. In addition, after the first cache receives the refill data, the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.

图6是本申请实施例提供的一种重填数据的处理装置的框图,该装置包括:FIG6 is a block diagram of a device for processing refill data provided by an embodiment of the present application, the device comprising:

获取模块301,用于在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果;The acquisition module 301 is used to acquire a hit result of the memory access instruction in the first cache when the memory access instruction of the processor is acquired through the first cache;

未命中模块302,用于若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存;A miss module 302, configured to suspend the memory access instruction if the hit result is a miss, and send a fetch request to a second cache through the first cache; the second cache is a lower-level cache of the first cache;

写入模块303,用于在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。The write module 303 is used to determine the target data block from the first cache, release the old data stored in the target data block, and write the refill data into the target data block when receiving the refill data sent by the second cache in response to the acquisition request through the first cache.

可选的,所述写入模块303,包括:Optionally, the writing module 303 includes:

确定子模块,用于从所述第一缓存的流水线队列的起始数据位开始读取第一缓存目录,并在间隔第一数量的数据位后,根据所述第一缓存目录从所述第一缓存中确定所述目标数据块。The determination submodule is used to read the first cache directory starting from the start data bit of the pipeline queue of the first cache, and determine the target data block from the first cache according to the first cache directory after an interval of a first number of data bits.

可选的,所述写入模块303,包括:Optionally, the writing module 303 includes:

第一写入子模块,用于将所述重填数据写入所述第一缓存的重填缓冲片区;A first writing submodule, used for writing the refill data into a refill buffer area of the first cache;

处理子模块,用于在所述起始数据位的后一数据位,读取所述重填缓冲片区,并在间隔第二数量的数据位后,读取得到所述重填数据,将读取得到的重填数据写入所述第一缓存的写缓冲片区,以及读取所述目标数据块中的旧数据;a processing submodule, configured to read the refill buffer area at a data bit following the start data bit, and read the refill data after a second number of data bits, write the read refill data into the write buffer area of the first cache, and read old data in the target data block;

释放子模块,用于在间隔第三数量的数据位后,将读取得到的所述旧数据存入所述第二缓存,完成所述目标数据块的释放;A release submodule, used for storing the read old data into the second cache after a third number of data bits have passed, thereby completing the release of the target data block;

第二写入子模块,用于在检测到读取所述目标数据块的操作结束时,将所述写缓冲片区中的所述重填数据写入所述目标数据块。The second writing submodule is used to write the refill data in the write buffer area into the target data block when it is detected that the operation of reading the target data block is completed.

可选的,所述装置还包括:Optionally, the device further comprises:

返回模块,用于在所述第一缓存接收到的读取请求所携带的第一地址,与所述写缓冲片区中目标重填数据的第二地址匹配的情况下,将所述目标重填数据作为对所述读取请求的响应进行返回。A return module is used to return the target refill data as a response to the read request when the first address carried by the read request received by the first cache matches the second address of the target refill data in the write buffer area.

可选的,所述确定子模块,包括:Optionally, the determining submodule includes:

获取单元,用于根据所述第一缓存目录,获取所述第一缓存中每个数据块的上次访问时间;an acquiring unit, configured to acquire, according to the first cache directory, a last access time of each data block in the first cache;

确定单元,用于将所述上次访问时间最早的数据块作为所述目标数据块。The determination unit is used to take the data block with the earliest last access time as the target data block.

可选的,所述未命中模块302,包括:Optionally, the miss module 302 includes:

挂起子模块,用于若所述命中结果为未命中,则控制所述访存指令脱离所述流水线队列,并进入缺失状态寄存器进行挂起等待。The suspend submodule is used to control the memory access instruction to leave the pipeline queue and enter the missing state register to suspend and wait if the hit result is a miss.

可选的,所述装置还包括:Optionally, the device further comprises:

唤醒模块,用于在将所述重填数据写入所述目标数据块后,从所述缺失状态寄存器中提取所述访存指令,并将所述重填数据写入第三缓存,以及唤醒通过所述访存指令从所述第三缓存中读数据的操作;a wake-up module, configured to extract the memory access instruction from the missing status register after writing the refill data into the target data block, write the refill data into a third cache, and wake up an operation of reading data from the third cache through the memory access instruction;

其中,所述第三缓存是所述第一缓存的上级缓存;所述访存指令在所述第三缓存中未命中。The third cache is an upper-level cache of the first cache; and the memory access instruction misses in the third cache.

可选的,所述唤醒模块,包括:Optionally, the wake-up module includes:

进入子模块,用于控制所述访存指令从起始数据位进入所述第一缓存的流水线队列,同时通过所述第一缓存生成唤醒指令并由唤醒队列发出至第三缓存;An entry submodule, used for controlling the memory access instruction to enter the pipeline queue of the first cache from the starting data bit, and generating a wake-up instruction through the first cache and sending it to the third cache through the wake-up queue;

发送子模块,用于在所述流水线队列中间隔所述第二数量的数据位后,通过所述第一缓存获取重填数据,将所述访存指令作为重填指令由重填队列发出至所述第三缓存;a sending submodule, configured to obtain refill data through the first cache after the second number of data bits are spaced apart in the pipeline queue, and send the memory access instruction as a refill instruction from the refill queue to the third cache;

其中,所述唤醒指令用于唤醒通过所述访存指令从所述第三缓存中读数据的操作;所述重填指令用于将所述重填数据写入所述第三缓存供所述访存指令读取。The wake-up instruction is used to wake up the operation of reading data from the third cache through the memory access instruction; and the refill instruction is used to write the refill data into the third cache for reading by the memory access instruction.

可选的,所述装置还包括:Optionally, the device further comprises:

命中模块,用于若所述命中结果为命中,则读取所述访存指令在所述第一缓存内命中的数据块中的数据并进行返回。A hit module is used to read the data in the data block hit by the memory access instruction in the first cache and return it if the hit result is a hit.

可选的,所述写入模块303,包括:Optionally, the writing module 303 includes:

检测子模块,用于在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,检测所述第一缓存的存储状况;a detection submodule, configured to detect a storage status of the first cache when receiving, through the first cache, refill data sent by the second cache in response to the acquisition request;

满载子模块,用于在确定所述存储状况为:所述第一缓存中不存在能够存储所述重填数据的空闲数据块时,从所述第一缓存中确定目标数据块。The full-load submodule is used to determine a target data block from the first cache when it is determined that the storage status is: there is no free data block in the first cache that can store the refill data.

可选的,所述流水线队列包括五个依次排列的数据位。Optionally, the pipeline queue includes five data bits arranged in sequence.

可选的,所述第一数量为1。Optionally, the first number is 1.

可选的,所述第二数量为1。Optionally, the second number is 1.

可选的,所述第三数量为2。Optionally, the third quantity is 2.

可选的,所述缺失状态寄存器记录了未完成执行的访存指令、所述未完成执行的访存指令的失效地址、所述未完成执行的访存指令的关键字信息。Optionally, the missing status register records the memory access instruction that has not been completed, the failure address of the memory access instruction that has not been completed, and the keyword information of the memory access instruction that has not been completed.

可选的,所述装置还包括:Optionally, the device further comprises:

数据释放模块,用于释放所述目标数据块中的旧数据,使所述目标数据块变为空闲数据块。The data release module is used to release the old data in the target data block, so that the target data block becomes a free data block.

综上,本申请实施例中,可以在访存指令在第一缓存中未命中时,先不去选择数据块进行释放,而是通知下级的第二缓存去获取访存请求所需的重填数据,等待第二缓存获取到重填数据并发送重填数据至第一缓存时,再从第一缓存中确定目标数据块,并释放目标数据块中存储的旧数据,以及将重填数据写入目标数据块。这样,在重填数据到来之前的这段时间内,存储有旧数据的数据块正常运作,并未被空置及占用,旧数据也可正常被访问。另外,本申请在第一缓存接收到重填数据后,再释放所选取的目标数据块中存储的旧数据,也保证了此期间访存指令对旧数据读取过程的正常实现。In summary, in the embodiments of the present application, when a memory access instruction misses in the first cache, the data block is not selected for release first, but the subordinate second cache is notified to obtain the refill data required for the memory access request, and when the second cache obtains the refill data and sends the refill data to the first cache, the target data block is determined from the first cache, and the old data stored in the target data block is released, and the refill data is written into the target data block. In this way, during the period before the arrival of the refill data, the data block storing the old data operates normally, is not vacant or occupied, and the old data can also be accessed normally. In addition, after the first cache receives the refill data, the present application releases the old data stored in the selected target data block, which also ensures the normal implementation of the old data reading process of the memory access instruction during this period.

本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的计算处理设备中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the computing processing device according to the embodiment of the present application. The application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

例如,图7示出了可以实现根据本申请的方法的计算处理设备。该计算处理设备传统上包括处理器1010和以存储器1020形式的计算机程序产品或者计算机可读介质。存储器1020可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1020具有用于执行上述方法中的任何方法步骤的程序代码1031的存储空间1030。例如,用于程序代码的存储空间1030可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1031。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储单元可以具有与图7的计算处理设备中的存储器1020类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1031’,即可以由例如诸如1010之类的处理器读取的代码,这些代码当由计算处理设备运行时,导致该计算处理设备执行上面所描述的方法中的各个步骤。For example, FIG. 7 shows a computing processing device that can implement the method according to the present application. The computing processing device traditionally includes a processor 1010 and a computer program product or a computer-readable medium in the form of a memory 1020. The memory 1020 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. The memory 1020 has a storage space 1030 for a program code 1031 for executing any method step in the above method. For example, the storage space 1030 for the program code can include individual program codes 1031 for implementing the various steps in the above method respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are generally portable or fixed storage units as described with reference to FIG. 8. The storage unit can have storage segments, storage spaces, etc. arranged similarly to the memory 1020 in the computing processing device of FIG. 7. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer readable code 1031', i.e., code that can be read by a processor such as 1010, which, when executed by a computing processing device, causes the computing processing device to perform the various steps in the method described above.

参照图9,是本发明实施例提供的一种电子设备的结构框图。如图9所示,所述电子设备包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放可执行指令,所述可执行指令使所述处理器执行前述实施例的重填数据的处理方法。Referring to Fig. 9, it is a block diagram of a structure of an electronic device provided by an embodiment of the present invention. As shown in Fig. 9, the electronic device includes: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the processing method of refilling data in the above-mentioned embodiment.

所述处理器可以是CPU(Central Processing Unit,中央处理器),通用处理器、DSP(Digital Signal Processor,数字信号处理器),ASIC(Application Specific Integrated Circuit,专用集成电路),FPGA(Field Programmble Gate Array,现场可编程门阵列)或者其他可编辑器件、晶体管逻辑器件、硬件部件或者其任意组合。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The processor may be a CPU (Central Processing Unit), a general processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other editable devices, transistor logic devices, hardware components or any combination thereof. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

所述通信总线可包括一通路,在存储器和通信接口之间传送信息。通信总线可以是PCI(Peripheral Component Interconnect,外设部件互连标准)总线或EISA(Extended Industry Standard Architecture,扩展工业标准结构)总线等。所述通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus may include a path for transmitting information between the memory and the communication interface. The communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in FIG9 , but it does not mean that there is only one bus or one type of bus.

所述存储器可以是ROM(Read Only内存,只读内存)或可存储静态信息和指令的其他类型的静态存储设备、RAM(Random Access,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically Erasable Programmable Read Only,电可擦可编程只读内存)、CD-ROM(Compact Disa Read Only,只读光盘)、磁带、软盘和光数据存储设备等。The memory can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access) or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM (Electrically Erasable Programmable Read Only), CD-ROM (Compact Disa Read Only), magnetic tape, floppy disk and optical data storage device, etc.

本申请实施例还提供一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现的一种重填数据的处理方法。An embodiment of the present application also provides a computer program product, including a computer program, and a method for processing refill data implemented when the computer program is executed by a processor.

本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本申请的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。References to "one embodiment," "embodiment," or "one or more embodiments" herein mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that examples of the term "in one embodiment" herein do not necessarily all refer to the same embodiment.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

以上仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

以上对本申请所提供的一种重填数据的处理方法、装置、电子设备、计算机可读存储介质及计算机程序,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The above is a detailed introduction to a method, device, electronic device, computer-readable storage medium and computer program for processing refilled data provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims (20)

一种重填数据的处理方法,其中,所述方法包括:A method for processing refill data, wherein the method comprises: 在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果;In the case where a memory access instruction of the processor is obtained through the first cache, obtaining a hit result of the memory access instruction in the first cache; 若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存;If the hit result is a miss, the memory access instruction is suspended, and a fetch request is sent to a second cache through the first cache; the second cache is a lower-level cache of the first cache; 在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。When the first cache receives the refill data sent by the second cache in response to the acquisition request, the target data block is determined from the first cache, the old data stored in the target data block is released, and the refill data is written into the target data block. 根据权利要求1所述的重填数据的处理方法,其中,所述从所述第一缓存中确定目标数据块,包括:The method for processing refill data according to claim 1, wherein determining the target data block from the first cache comprises: 从所述第一缓存的流水线队列的起始数据位开始读取第一缓存目录,并在间隔第一数量的数据位后,根据所述第一缓存目录从所述第一缓存中确定所述目标数据块。The first cache directory is read starting from the start data bit of the pipeline queue of the first cache, and after an interval of a first number of data bits, the target data block is determined from the first cache according to the first cache directory. 根据权利要求2所述的重填数据的处理方法,其中,所述释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块,包括:The method for processing refilled data according to claim 2, wherein the releasing of the old data stored in the target data block and the writing of the refilled data into the target data block comprises: 将所述重填数据写入所述第一缓存的重填缓冲片区;Writing the refill data into a refill buffer area of the first cache; 在所述起始数据位的后一数据位,读取所述重填缓冲片区,并在间隔第二数量的数据位后,读取得到所述重填数据,将读取得到的重填数据写入所述第一缓存的写缓冲片区,以及读取所述目标数据块中的旧数据;At a data bit following the start data bit, the refill buffer area is read, and after a second number of data bits have passed, the refill data is read and obtained, the refill data obtained by reading is written into the write buffer area of the first cache, and old data in the target data block is read; 在间隔第三数量的数据位后,将读取得到的所述旧数据存入所述第二缓存,完成所述目标数据块的释放;After a third number of data bits have been left, storing the read old data into the second cache, and completing the release of the target data block; 在检测到读取所述目标数据块的操作结束时,将所述写缓冲片区中的所述重填数据写入所述目标数据块。When it is detected that the operation of reading the target data block is finished, the refill data in the write buffer area is written into the target data block. 根据权利要求3所述的重填数据的处理方法,其中,所述方法还包括:The method for processing refill data according to claim 3, wherein the method further comprises: 在所述第一缓存接收到的读取请求所携带的第一地址,与所述写缓冲片区中目标重填数据的第二地址匹配的情况下,将所述目标重填数据作为对所述读取请求的响应进行返回。When a first address carried in the read request received by the first cache matches a second address of target refill data in the write buffer area, the target refill data is returned as a response to the read request. 根据权利要求2所述的重填数据的处理方法,其中,所述根据所述第一缓存目录从所述第一缓存中确定所述目标数据块,包括:The method for processing refill data according to claim 2, wherein determining the target data block from the first cache according to the first cache directory comprises: 根据所述第一缓存目录,获取所述第一缓存中每个数据块的上次访问时间;According to the first cache directory, obtaining the last access time of each data block in the first cache; 将所述上次访问时间最早的数据块作为所述目标数据块。The data block with the earliest last access time is used as the target data block. 根据权利要求1所述的重填数据的处理方法,其中,所述若所述命中结果为未命中,则将所述访存指令挂起,包括:The method for processing refill data according to claim 1, wherein if the hit result is a miss, suspending the memory access instruction comprises: 若所述命中结果为未命中,则控制所述访存指令脱离流水线队列,并进入缺失状态寄存器进行挂起等待。If the hit result is a miss, the memory access instruction is controlled to leave the pipeline queue and enter the missing state register to suspend and wait. 根据权利要求6所述的重填数据的处理方法,其中,所述方法还包括:The method for processing refill data according to claim 6, wherein the method further comprises: 在将所述重填数据写入所述目标数据块后,从所述缺失状态寄存器中提取所述访存指令,并将所述重填数据写入第三缓存,以及唤醒通过所述访存指令从所述第三缓存中读数据的操作;After writing the refill data into the target data block, extracting the memory access instruction from the missing status register, writing the refill data into the third cache, and waking up the operation of reading data from the third cache through the memory access instruction; 其中,所述第三缓存是所述第一缓存的上级缓存;所述访存指令在所述第三缓存中未命中。The third cache is an upper-level cache of the first cache; and the memory access instruction misses in the third cache. 根据权利要求7所述的重填数据的处理方法,其中,所述将所述重填数据写入第三缓存,以及唤醒通过所述访存指令从所述第三缓存中读数据的操作,包括:The method for processing refill data according to claim 7, wherein the step of writing the refill data into a third cache and awakening the operation of reading data from the third cache through the memory access instruction comprises: 控制所述访存指令从起始数据位进入所述第一缓存的流水线队列,同时通过所述第一缓存生成唤醒指令并由唤醒队列发出至第三缓存;Control the memory access instruction to enter the pipeline queue of the first cache from the starting data bit, and at the same time generate a wake-up instruction through the first cache and send it to the third cache through the wake-up queue; 在所述流水线队列中间隔第二数量的数据位后,通过所述第一缓存获取重填数据,将所述访存指令作为重填指令由重填队列发出至所述第三缓存;After a second number of data bits are spaced in the pipeline queue, refill data is obtained through the first cache, and the memory access instruction is issued from the refill queue to the third cache as a refill instruction; 其中,所述唤醒指令用于唤醒通过所述访存指令从所述第三缓存中读数据的操作;所述重填指令用于将所述重填数据写入所述第三缓存供所述访存指令读取。The wake-up instruction is used to wake up the operation of reading data from the third cache through the memory access instruction; and the refill instruction is used to write the refill data into the third cache for reading by the memory access instruction. 根据权利要求1所述的重填数据的处理方法,其中,所述方法还包括:The method for processing refill data according to claim 1, wherein the method further comprises: 若所述命中结果为命中,则读取所述访存指令在所述第一缓存内命中的数据块中的数据并进行返回。If the hit result is a hit, the data in the data block hit by the memory access instruction in the first cache is read and returned. 根据权利要求1所述的重填数据的处理方法,其中,所述在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,包括:The method for processing refill data according to claim 1, wherein, when receiving, through the first cache, the refill data sent by the second cache in response to the acquisition request, determining the target data block from the first cache comprises: 在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,检测所述第一缓存的存储状况;When receiving, through the first cache, the refill data sent by the second cache in response to the acquisition request, detecting a storage status of the first cache; 在确定所述存储状况为:所述第一缓存中不存在能够存储所述重填数据的空闲数据块时,从所述第一缓存中确定目标数据块。When it is determined that the storage status is that there is no free data block in the first cache that can store the refill data, a target data block is determined from the first cache. 根据权利要求2所述的重填数据的处理方法,其中,所述流水线队列包括五个依次排列的数据位。The method for processing refill data according to claim 2, wherein the pipeline queue includes five data bits arranged in sequence. 根据权利要求2所述的重填数据的处理方法,其中,所述第一数量为1。The method for processing refill data according to claim 2, wherein the first number is 1. 根据权利要求3或8所述的重填数据的处理方法,其中,所述第二数量为1。The method for processing refill data according to claim 3 or 8, wherein the second number is 1. 根据权利要求3所述的重填数据的处理方法,其中,所述第三数量为2。The method for processing refill data according to claim 3, wherein the third number is 2. 根据权利要求6所述的重填数据的处理方法,其中,所述缺失状态寄存器记录了未完成执行的访存指令、所述未完成执行的访存指令的失效地址、所述未完成执行的访存指令的关键字信息。According to the processing method for refilling data according to claim 6, wherein the missing status register records the memory access instruction that has not been completed, the failure address of the memory access instruction that has not been completed, and the keyword information of the memory access instruction that has not been completed. 根据权利要求10所述的重填数据的处理方法,其中,在从所述第一缓存中确定目标数据块之后,还包括:The method for processing refill data according to claim 10, wherein after determining the target data block from the first cache, it further comprises: 释放所述目标数据块中的旧数据,使所述目标数据块变为空闲数据块。The old data in the target data block is released, so that the target data block becomes a free data block. 一种重填数据的处理装置,其中,所述装置包括:A device for processing refill data, wherein the device comprises: 获取模块,用于在通过第一缓存获取到处理器的访存指令的情况下,获取所述访存指令在所述第一缓存中的命中结果;An acquisition module, configured to acquire a hit result of a memory access instruction in the first cache when a memory access instruction of the processor is acquired through the first cache; 未命中模块,用于若所述命中结果为未命中,则将所述访存指令挂起,同时通过所述第一缓存向第二缓存发送获取请求;所述第二缓存是所述第一缓存的下级缓存;a miss module, configured to suspend the memory access instruction if the hit result is a miss, and send a fetch request to a second cache through the first cache; the second cache is a lower-level cache of the first cache; 写入模块,用于在通过所述第一缓存,接收到所述第二缓存响应于所述获取请求后发送的重填数据时,从所述第一缓存中确定目标数据块,并释放所述目标数据块中存储的旧数据,以及将所述重填数据写入所述目标数据块。A write module is used to determine a target data block from the first cache, release old data stored in the target data block, and write the refill data into the target data block when receiving the refill data sent by the second cache in response to the acquisition request through the first cache. 一种电子设备,其中,包括:处理器;An electronic device, comprising: a processor; 用于存储所述处理器可执行指令的存储器;a memory for storing instructions executable by the processor; 其中,所述处理器被配置为执行所述指令,以实现如权利要求1至16中任一项所述的方法。The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 16. 一种计算机可读存储介质,其中,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如权利要求1至16中任一项所述的方法。A computer-readable storage medium, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 16. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算处理设备上运行时,导致所述计算处理设备执行根据权利要求1-16中任一项所述的方法。A computer program comprises a computer readable code, which, when executed on a computing processing device, causes the computing processing device to execute the method according to any one of claims 1 to 16.
PCT/CN2024/136263 2024-01-12 2024-12-03 Refilling data processing method and apparatus, and device, storage medium and program Pending WO2025148564A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410053386.6A CN117573572B (en) 2024-01-12 2024-01-12 Method, device, equipment and storage medium for processing refill data
CN202410053386.6 2024-01-12

Publications (1)

Publication Number Publication Date
WO2025148564A1 true WO2025148564A1 (en) 2025-07-17

Family

ID=89895853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/136263 Pending WO2025148564A1 (en) 2024-01-12 2024-12-03 Refilling data processing method and apparatus, and device, storage medium and program

Country Status (2)

Country Link
CN (1) CN117573572B (en)
WO (1) WO2025148564A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120743353A (en) * 2025-09-04 2025-10-03 北京翼华云网科技有限公司 Processor instruction reading control method and system and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573572B (en) * 2024-01-12 2024-09-13 北京开源芯片研究院 Method, device, equipment and storage medium for processing refill data
CN121143730B (en) * 2025-11-14 2026-02-03 知合行一技术(上海)有限公司 Processor, memory access control method, device and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5689679A (en) * 1993-04-28 1997-11-18 Digital Equipment Corporation Memory system and method for selective multi-level caching using a cache level code
CN104346294A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Data reading/writing method and device and computer system on basis of multi-level Cache
CN113849494A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Data updating method and device
CN116303590A (en) * 2023-02-06 2023-06-23 杭州隆埠科技有限公司 A cache data access method, device, equipment and storage medium
CN117573572A (en) * 2024-01-12 2024-02-20 北京开源芯片研究院 Processing methods, devices, equipment and storage media for refilling data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650972B (en) * 2009-06-12 2013-05-29 东信和平科技股份有限公司 Method for updating data of nonvolatile memory of intelligent card
CN113515531B (en) * 2021-05-08 2022-12-02 重庆紫光华山智安科技有限公司 Data access method, device, client and storage medium
CN113961247B (en) * 2021-09-24 2022-10-11 北京睿芯众核科技有限公司 RISC-V processor based vector access/fetch instruction execution method, system and device
CN115203250A (en) * 2022-05-17 2022-10-18 广东好太太智能家居有限公司 Method and system for realizing high-performance distributed cache

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5689679A (en) * 1993-04-28 1997-11-18 Digital Equipment Corporation Memory system and method for selective multi-level caching using a cache level code
CN104346294A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Data reading/writing method and device and computer system on basis of multi-level Cache
CN113849494A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Data updating method and device
CN116303590A (en) * 2023-02-06 2023-06-23 杭州隆埠科技有限公司 A cache data access method, device, equipment and storage medium
CN117573572A (en) * 2024-01-12 2024-02-20 北京开源芯片研究院 Processing methods, devices, equipment and storage media for refilling data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120743353A (en) * 2025-09-04 2025-10-03 北京翼华云网科技有限公司 Processor instruction reading control method and system and electronic equipment

Also Published As

Publication number Publication date
CN117573572B (en) 2024-09-13
CN117573572A (en) 2024-02-20

Similar Documents

Publication Publication Date Title
WO2025148564A1 (en) Refilling data processing method and apparatus, and device, storage medium and program
CN102084345B (en) Detection of speculative precharge
US7149857B2 (en) Out of order DRAM sequencer
US6012106A (en) Prefetch management for DMA read transactions depending upon past history of actual transfer lengths
US6654837B1 (en) Dynamic priority external transaction system
US20030217251A1 (en) Prediction of load-store dependencies in a processing agent
WO2025152635A1 (en) Cache request processing method and apparatus, device, storage medium and program
CN100416529C (en) Method and apparatus for determining dynamic random access memory page management implementation
CN102063943A (en) NAND flash parameter automatic detection system
US8332590B1 (en) Multi-stage command processing pipeline and method for shared cache access
JP2000242558A (en) Cache system and operating method thereof
CN115938428A (en) Controller, control method, electronic device for dynamic random access memory
CN110603521B (en) Hyper-threading processor
CN113467935A (en) Method and system for realizing L1cache load forward
CN114816566B (en) A method, system, device and medium for transferring instructions
CN112767978B (en) DDR command scheduling method, device, equipment and medium
CN114217855A (en) Method and system for realizing store _ buffer merge
US20140189250A1 (en) Store Forwarding for Data Caches
CN1804792B (en) Method and system of permitting storage transmitting during long wait-time instruction execution
WO2025200126A1 (en) Instruction processing method and apparatus, processor, and computer-readable storage medium
US8452920B1 (en) System and method for controlling a dynamic random access memory
CN110688155A (en) Merging method for storage instruction accessing non-cacheable area
US20040059880A1 (en) Low latency memory access method using unified queue mechanism
CN116820579A (en) Scheduling method and device of access instruction, electronic equipment and storage medium
CN115686349A (en) Storage system for maintaining data consistency and operation method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24916612

Country of ref document: EP

Kind code of ref document: A1