Search

CN-122019406-A - Data loading method, device and equipment

CN122019406ACN 122019406 ACN122019406 ACN 122019406ACN-122019406-A

Abstract

The invention discloses a data loading method, a device and equipment, and relates to the technical field of memory management, wherein the method comprises the steps of utilizing a memory management unit to acquire a target physical page frame number corresponding to virtual network index information in a virtual address of a loading instruction through page table traversal when the target physical page frame number is not found in a conversion bypass buffer zone; according to the method, a physical address corresponding to a loading instruction is generated according to a target physical page frame number and an offset, target data corresponding to the physical address is acquired from a physical memory, and the target data is sent to a loading storage unit pipeline to finish data loading of the loading instruction.

Inventors

  • ZHANG WENJIN
  • KONG LINGJUN
  • FAN QINGXIN
  • WANG ZEQIAN
  • YANG JIACHENG
  • ZOU XIAOFENG

Assignees

  • 山东博算智新信息科技有限公司

Dates

Publication Date
20260512
Application Date
20260129

Claims (10)

  1. 1. A method of loading data, comprising: When the target physical page frame number is not found from the conversion bypass buffer zone, the memory management unit is utilized to obtain the target physical page frame number corresponding to the virtual network index information in the virtual address of the loading instruction through page table traversal, wherein the virtual address comprises the virtual network index information and the offset; Generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset, and acquiring target data corresponding to the physical address from a physical memory; And sending the target data to a load storage unit pipeline to finish data loading of the load instruction.
  2. 2. The method of loading data according to claim 1, wherein generating the physical address corresponding to the load instruction according to the target physical page frame number and the offset includes: The memory management unit is used for sending the target physical page frame number to the loading storage unit pipeline, and generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset; Correspondingly, after the target physical page frame number is sent to the load storage unit pipeline, the method further includes: Generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset by using the loading storage unit pipeline, and detecting whether the target data is stored in a preset data cache area; if yes, acquiring the target data from the preset data cache area; if not, acquiring the target data sent by the memory management unit.
  3. 3. The data loading method according to claim 2, wherein the obtaining the target data from the preset data buffer zone includes: And acquiring the target data from the preset data cache area, and sending a cache hit signal of the target data to the memory management unit so as to control the memory management unit to stop acquiring or sending the target data.
  4. 4. The method for loading data according to claim 2, wherein after the target data sent by the memory management unit is obtained, further comprising: and storing the target data into the preset data cache area.
  5. 5. The method according to claim 2, wherein the predetermined data buffer comprises a first level data buffer and a second level data buffer, and the detecting whether the target data is stored in the predetermined data buffer comprises: Detecting whether the target data is stored in the first-level data cache area; if the target data is stored in the first-level data cache area, acquiring the target data from the first-level data cache area; if the target data is not stored in the first-stage data cache region, detecting whether the target data is stored in the second-stage data cache region; If the target data are stored in the second-stage data cache area, acquiring the target data from the second-stage data cache area; And if the target data is not stored in the second-stage data cache area, executing the step of acquiring the target data sent by the memory management unit.
  6. 6. The method for loading data according to claim 1, wherein the using the memory management unit, when no target physical page frame number is found in the translation bypass buffer, further comprises, before the step of obtaining the target physical page frame number corresponding to the virtual network index information in the virtual address of the load instruction by page table walk: Detecting whether the target physical page frame number is stored in the conversion bypass buffer area by using the memory management unit; If the target physical page frame number is stored, acquiring the target physical page frame number from the conversion bypass buffer area, and sending the target physical page frame number to the load storage unit pipeline; And if the target physical page frame number is not stored, executing the step of utilizing the memory management unit to acquire the target physical page frame number corresponding to the virtual network index information in the virtual address of the loading instruction through page table traversal when the target physical page frame number is not found in the conversion bypass buffer.
  7. 7. The data loading method of claim 1, wherein the translation bypass buffer comprises a first stage translation bypass buffer and a second stage translation bypass buffer.
  8. 8. The method according to any one of claims 1 to 7, wherein the obtaining, by the memory management unit, the target physical page frame number corresponding to the virtual network index information in the virtual address of the load instruction through page table traversal when the target physical page frame number is not found from the translation bypass buffer, includes: when the target physical page frame number is not found from the conversion bypass buffer area, starting page table traversal, obtaining the target physical page frame number corresponding to the virtual network index information in the virtual address of the loading instruction, and registering the offset in the virtual address by using the memory management unit; Correspondingly, the generating the physical address corresponding to the loading instruction according to the target physical page frame number and the offset, and obtaining the target data corresponding to the physical address from the physical memory, includes: And generating a physical address corresponding to the loading instruction by using the target physical page frame number and the registered offset, and acquiring target data corresponding to the physical address from the physical memory.
  9. 9. A data loading apparatus, comprising: the page table traversing module is used for acquiring a target physical page frame number corresponding to virtual network index information in a virtual address of a loading instruction through page table traversal when the target physical page frame number is not found from the conversion bypass buffer area by using the memory management unit, wherein the virtual address comprises the virtual network index information and an offset; the data acquisition module is used for generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset, and acquiring target data corresponding to the physical address from a physical memory; And the data sending module is used for sending the target data to a loading storage unit pipeline so as to finish the data loading of the loading instruction.
  10. 10. A data loading device, comprising: A memory for storing a computer program; Processor for implementing the steps of the data loading method according to any of claims 1 to 8 when executing said computer program.

Description

Data loading method, device and equipment Technical Field The present invention relates to the field of memory management technologies, and in particular, to a data loading method, apparatus, and device. Background The MMU (Memory Management Unit ) is a hardware module, located between the CPU (Central Processing Unit ) and the physical memory, and is mainly responsible for converting Virtual Addresses (VA) into physical addresses (PHYSICAL ADDRESS, PA), and providing functions of memory access authority control, multitasking support, virtual memory management, and the like. A TLB (Translation Lookaside Buffer, translation bypass buffer) may be provided in the MMU for caching the results of page table translations to speed up the virtual to physical address translation process and improve system performance. In the related art, when a Load instruction is executed by an MMU, if a miss occurs in a TLB, the MMU gradually searches a Page Table through a PTW (Page Table Walk) until a final PFN (PAGE FRAME Number, physical Page frame Number) is obtained in a last stage Page Table entry, and then returns the PFN to an LSU (Load Store Unit) pipeline, where the LSU pipeline splices the PFN and an offset portion of a virtual address to obtain a complete physical address, and then searches a data cache according to the physical address, thereby obtaining data corresponding to the physical address. However, occurrence of a miss in a TLB generally means that the program is accessing a new memory region (e.g., a new page or segment) where data should not yet be loaded into the data cache, and thus, when searching the data cache using the physical address obtained by the PTW, the data cache is also a large probability of a miss, and then the data cache is searched in a physical memory (memory), and the delay of searching the data in the physical memory is high, and the time spent by the PTW is also much, which causes a considerable stall to the processor pipeline, and seriously affects the performance of the processor. Therefore, how to reduce the delay of searching data from the physical memory, reduce the stall delay of the processor pipeline, and realize the performance improvement is a problem that needs to be solved nowadays. Disclosure of Invention The invention aims to provide a data loading method, a data loading device and data loading equipment, which are used for reducing delay of searching data from a physical memory, reducing stall delay of a processor pipeline and realizing performance improvement. In order to solve the above technical problems, the present invention provides a data loading method, including: When the target physical page frame number is not found from the conversion bypass buffer zone, the memory management unit is utilized to obtain the target physical page frame number corresponding to the virtual network index information in the virtual address of the loading instruction through page table traversal, wherein the virtual address comprises the virtual network index information and the offset; Generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset, and acquiring target data corresponding to the physical address from a physical memory; And sending the target data to a load storage unit pipeline to finish data loading of the load instruction. In another aspect, the generating, according to the target physical page frame number and the offset, a physical address corresponding to the load instruction includes: The memory management unit is used for sending the target physical page frame number to the loading storage unit pipeline, and generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset; Correspondingly, after the target physical page frame number is sent to the load storage unit pipeline, the method further includes: Generating a physical address corresponding to the loading instruction according to the target physical page frame number and the offset by using the loading storage unit pipeline, and detecting whether the target data is stored in a preset data cache area; if yes, acquiring the target data from the preset data cache area; if not, acquiring the target data sent by the memory management unit. In another aspect, the obtaining the target data from the preset data buffer area includes: And acquiring the target data from the preset data cache area, and sending a cache hit signal of the target data to the memory management unit so as to control the memory management unit to stop acquiring or sending the target data. In another aspect, after the obtaining the target data sent by the memory management unit, the method further includes: and storing the target data into the preset data cache area. In another aspect, the preset data buffer area includes a first level data buffer area and a second level data buffer area; the dete