[go: up one dir, main page]

CN118760627A - Address updating device and method, processor and chip - Google Patents

Address updating device and method, processor and chip Download PDF

Info

Publication number
CN118760627A
CN118760627A CN202410737193.2A CN202410737193A CN118760627A CN 118760627 A CN118760627 A CN 118760627A CN 202410737193 A CN202410737193 A CN 202410737193A CN 118760627 A CN118760627 A CN 118760627A
Authority
CN
China
Prior art keywords
address
memory
page table
update
request
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.)
Granted
Application number
CN202410737193.2A
Other languages
Chinese (zh)
Other versions
CN118760627B (en
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.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads Technology Co Ltd
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 Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202410737193.2A priority Critical patent/CN118760627B/en
Publication of CN118760627A publication Critical patent/CN118760627A/en
Application granted granted Critical
Publication of CN118760627B publication Critical patent/CN118760627B/en
Active 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/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • 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

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

The present disclosure relates to an address updating apparatus and method, a processor and a chip, the address updating apparatus comprising: an address updating unit, a page table updating source, a memory address management unit and a memory; the address updating unit receives an updating request from a page table updating source, wherein the updating request comprises a virtual address and a first physical address corresponding to the virtual address; and the address updating unit updates page table information which is respectively corresponding to the memory and the memory address management unit and is used for describing the mapping relation between the virtual address and the first physical address according to the acquired updating request. According to the embodiment of the disclosure, the address updating unit is introduced, and the address updating unit serving as hardware directly updates the page table information in the memory and the page table information of the memory address management unit, so that software and hardware interaction in system operation is reduced, the page table updating flow is simplified, and the system operation efficiency is improved.

Description

地址更新装置及方法、处理器和芯片Address updating device and method, processor and chip

技术领域Technical Field

本公开涉及计算机技术领域,尤其涉及一种地址更新装置及方法、处理器和芯片。The present disclosure relates to the field of computer technology, and in particular to an address updating device and method, a processor and a chip.

背景技术Background Art

在编译后的可执行代码中,如果涉及处理器存取指令或数据,会为存取的指令或数据提供一个虚拟地址,查询内存地址管理单元中记录了虚拟地址和物理地址之间映射关系的页表,以便将虚拟地址转换为物理地址,从内存中存取指令或数据。In the compiled executable code, if the processor accesses instructions or data, a virtual address will be provided for the accessed instruction or data, and the page table in the memory address management unit that records the mapping relationship between the virtual address and the physical address will be queried to convert the virtual address into a physical address and access the instruction or data from the memory.

内存地址管理单元的页表更新由软件(例如驱动程序)完成,软件会将更新后的页表写入内存,再向内存地址管理单元发起无效操作,通知内存地址管理单元页表已经过时。这样,内存地址管理单元在收到新的请求之后,会重新去内存中取页表,最后会缓存在内存地址管理单元的片上缓存中。The memory address management unit's page table update is completed by software (such as a driver). The software will write the updated page table to the memory, and then initiate an invalidation operation to the memory address management unit to notify the memory address management unit that the page table is outdated. In this way, after receiving a new request, the memory address management unit will go to the memory to fetch the page table again, and finally cache it in the on-chip cache of the memory address management unit.

然而,当硬件需要更新页表时,会先通过软硬件接口,通知软件需要如何分配页表,然后由软件写入内存,再通知内存地址管理单元从内存中重新获取页表。对于高性能处理器,这个流程消耗的时间比较长,会影响处理器的整体性能。However, when the hardware needs to update the page table, it will first inform the software how to allocate the page table through the hardware-software interface, then write it to the memory, and then notify the memory address management unit to re-obtain the page table from the memory. For high-performance processors, this process takes a long time and affects the overall performance of the processor.

发明内容Summary of the invention

本公开提出了一种地址更新技术方案。The present disclosure proposes a technical solution for address updating.

根据本公开的一方面,提供了一种地址更新装置,所述地址更新装置包括:地址更新单元、页表更新源、内存地址管理单元、内存;所述地址更新单元接收来自所述页表更新源的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。According to one aspect of the present disclosure, an address updating device is provided, the address updating device comprising: an address updating unit, a page table update source, a memory address management unit, and a memory; the address updating unit receives an update request from the page table update source, the update request comprising a virtual address, and a first physical address corresponding to the virtual address; the address updating unit updates page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, the page table information being used to describe a mapping relationship between the virtual address and the first physical address.

在一种可能的实现方式中,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求;所述内存地址管理单元根据所述第一虚拟地址请求生成用于访问所述内存的读请求;所述地址更新单元拦截所述读请求,并向所述内存地址管理单元发送所述第一物理地址;所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置。In a possible implementation, the address update unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, including: the address update unit sends a first virtual address request carrying the virtual address to the memory address management unit according to the virtual address carried in the update request; the memory address management unit generates a read request for accessing the memory according to the first virtual address request; the address update unit intercepts the read request and sends the first physical address to the memory address management unit; the address update unit obtains a second physical address from the page table update source, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory.

在一种可能的实现方式中,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:所述地址更新单元等待所述页表更新源发送更新请求,并根据在先获取的未处理的更新请求,生成待更新页表信息;所述地址更新单元拦截来自所述内存地址管理单元的读请求,所述读请求用于访问所述内存;所述地址更新单元对所述读请求与所述待更新页表信息进行比对,得到比对结果;所述地址更新单元响应于所述比对结果指示所述读请求与所述待更新页表信息中存在相同的虚拟地址,更新所述待更新页表信息以及所述内存和所述内存地址管理单元分别对应的页表信息。In a possible implementation, the address update unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, including: the address update unit waits for the page table update source to send an update request, and generates the page table information to be updated according to the previously obtained unprocessed update request; the address update unit intercepts the read request from the memory address management unit, and the read request is used to access the memory; the address update unit compares the read request with the page table information to be updated to obtain a comparison result; the address update unit updates the page table information to be updated and the page table information corresponding to the memory and the memory address management unit respectively in response to the comparison result indicating that the read request and the page table information to be updated have the same virtual address.

在一种可能的实现方式中,所述地址更新单元还用于向所述页表更新源反馈更新结果,所述更新结果用于表征所述地址更新单元完成所述内存和所述内存地址管理单元的更新。In a possible implementation, the address update unit is further used to feed back an update result to the page table update source, where the update result is used to indicate that the address update unit has completed the update of the memory and the memory address management unit.

在一种可能的实现方式中,所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求,包括:所述地址更新单元向所述内存地址管理单元发送携带有第一标识和所述虚拟地址的第一虚拟地址请求;所述读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求;所述地址更新单元拦截所述读请求,包括:所述地址更新单元响应于所述读请求包含所述第一标识,拦截所述读请求。In a possible implementation, the address update unit sends a first virtual address request carrying the virtual address to the memory address management unit based on the virtual address carried in the update request, including: the address update unit sends a first virtual address request carrying a first identifier and the virtual address to the memory address management unit; the read request includes the virtual address and the first identifier, and the first identifier is used to indicate that the source category of the virtual address is the update request; the address update unit intercepts the read request, including: the address update unit intercepts the read request in response to the read request containing the first identifier.

在一种可能的实现方式中,在所述页表信息包括多级页表的情况下,所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置,包括:所述地址更新单元向所述页表更新源发送物理地址请求,物理地址请求包括用于指示页表级数的第三标识;所述地址更新单元接收所述页表更新源反馈的第二物理地址,所述第二物理地址与所述第三标识对应;所述地址更新单元根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存中所述第二物理地址指示的存储位置。In a possible implementation, when the page table information includes a multi-level page table, the address update unit obtains a second physical address from the page table update source, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory, including: the address update unit sends a physical address request to the page table update source, and the physical address request includes a third identifier used to indicate the number of page table levels; the address update unit receives the second physical address fed back by the page table update source, and the second physical address corresponds to the third identifier; the address update unit writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory according to the second physical address corresponding to each third identifier.

在一种可能的实现方式中,所述内存地址管理单元接收来自所述页表更新源的第二虚拟地址请求,所述第二虚拟地址请求携带虚拟地址和第二标识;响应于所述内存地址管理单元根据所述第二标识识别出所述虚拟地址的来源类别为所述更新请求以外的其它类别请求,所述内存地址管理单元将所述虚拟地址对应的第一物理地址返回所述页表更新源。In one possible implementation, the memory address management unit receives a second virtual address request from the page table update source, the second virtual address request carrying a virtual address and a second identifier; in response to the memory address management unit identifying, based on the second identifier, that the source category of the virtual address is a request of a category other than the update request, the memory address management unit returns a first physical address corresponding to the virtual address to the page table update source.

在一种可能的实现方式中,所述地址更新单元响应于所述内存地址管理单元发送的读请求包含第二标识,将来自所述内存地址管理单元的读请求透传至所述内存;所述地址更新单元将所述内存响应所述读请求的返回结果透传至所述内存地址管理单元,所述第二标识用于指示所述读请求的虚拟地址的来源类别为所述更新请求以外的其它类别请求。In one possible implementation, the address update unit transmits the read request from the memory address management unit to the memory in response to a read request including a second identifier; the address update unit transmits the return result of the memory in response to the read request to the memory address management unit, and the second identifier is used to indicate that the source category of the virtual address of the read request is a request of a category other than the update request.

在一种可能的实现方式中,所述内存地址管理单元收到所述第一虚拟地址请求,在所述内存地址管理单元的缓存中查询所述第一虚拟地址请求携带的虚拟地址;在所述内存地址管理单元的缓存中未查询到所述虚拟地址的情况下,在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间;或者,在所述内存地址管理单元的缓存中查询到所述虚拟地址的情况下,在缓存中清空所述虚拟地址的关联空间,并在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间。In one possible implementation, the memory address management unit receives the first virtual address request, and queries the cache of the memory address management unit for the virtual address carried by the first virtual address request; if the virtual address is not found in the cache of the memory address management unit, space for storing page table information is allocated in the cache for the first virtual address request; or, if the virtual address is found in the cache of the memory address management unit, the associated space of the virtual address is cleared in the cache, and space for storing page table information is allocated in the cache for the first virtual address request.

根据本公开的一方面,提供了一种地址更新方法,所述方法应用于所述地址更新装置,所述地址更新装置包括:地址更新单元、页表更新源、内存地址管理单元、内存;所述方法包括:所述地址更新单元接收来自所述页表更新源的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。According to one aspect of the present disclosure, there is provided an address updating method, which is applied to the address updating device, wherein the address updating device comprises: an address updating unit, a page table update source, a memory address management unit, and a memory; the method comprises: the address updating unit receiving an update request from the page table update source, the update request comprising a virtual address, and a first physical address corresponding to the virtual address; the address updating unit updates page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, the page table information being used to describe a mapping relationship between the virtual address and the first physical address.

在一种可能的实现方式中,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求;所述内存地址管理单元根据所述第一虚拟地址请求生成用于访问所述内存的读请求;所述地址更新单元拦截所述读请求,并向所述内存地址管理单元发送所述第一物理地址;所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置。In a possible implementation, the address update unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, including: the address update unit sends a first virtual address request carrying the virtual address to the memory address management unit according to the virtual address carried in the update request; the memory address management unit generates a read request for accessing the memory according to the first virtual address request; the address update unit intercepts the read request and sends the first physical address to the memory address management unit; the address update unit obtains a second physical address from the page table update source, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory.

在一种可能的实现方式中,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:所述地址更新单元等待所述页表更新源发送更新请求,并根据在先获取的未处理的更新请求,生成待更新页表信息;所述地址更新单元拦截来自所述内存地址管理单元的读请求,所述读请求用于访问所述内存;所述地址更新单元对所述读请求与所述待更新页表信息进行比对,得到比对结果;所述地址更新单元响应于所述比对结果指示所述读请求与所述待更新页表信息中存在相同的虚拟地址,更新所述待更新页表信息以及所述内存和所述内存地址管理单元分别对应的页表信息。In a possible implementation, the address update unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the obtained update request, including: the address update unit waits for the page table update source to send an update request, and generates the page table information to be updated according to the previously obtained unprocessed update request; the address update unit intercepts the read request from the memory address management unit, and the read request is used to access the memory; the address update unit compares the read request with the page table information to be updated to obtain a comparison result; the address update unit updates the page table information to be updated and the page table information corresponding to the memory and the memory address management unit respectively in response to the comparison result indicating that the read request and the page table information to be updated have the same virtual address.

在一种可能的实现方式中,所述方法还包括:所述地址更新单元向所述页表更新源反馈更新结果,所述更新结果用于表征所述地址更新单元完成所述内存和所述内存地址管理单元的更新。In a possible implementation, the method further includes: the address update unit feeding back an update result to the page table update source, wherein the update result is used to indicate that the address update unit completes the update of the memory and the memory address management unit.

在一种可能的实现方式中,所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求,包括:所述地址更新单元向所述内存地址管理单元发送携带有第一标识和所述虚拟地址的第一虚拟地址请求;所述读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求;所述地址更新单元拦截所述读请求,包括:所述地址更新单元响应于所述读请求包含所述第一标识,拦截所述读请求。In a possible implementation, the address update unit sends a first virtual address request carrying the virtual address to the memory address management unit based on the virtual address carried in the update request, including: the address update unit sends a first virtual address request carrying a first identifier and the virtual address to the memory address management unit; the read request includes the virtual address and the first identifier, and the first identifier is used to indicate that the source category of the virtual address is the update request; the address update unit intercepts the read request, including: the address update unit intercepts the read request in response to the read request containing the first identifier.

在一种可能的实现方式中,在所述页表信息包括多级页表的情况下,所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置,包括:所述地址更新单元向所述页表更新源发送物理地址请求,物理地址请求包括用于指示页表级数的第三标识;所述地址更新单元接收所述页表更新源反馈的第二物理地址,所述第二物理地址与所述第三标识对应;所述地址更新单元根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存中所述第二物理地址指示的存储位置。In a possible implementation, when the page table information includes a multi-level page table, the address update unit obtains a second physical address from the page table update source, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory, including: the address update unit sends a physical address request to the page table update source, and the physical address request includes a third identifier used to indicate the number of page table levels; the address update unit receives the second physical address fed back by the page table update source, and the second physical address corresponds to the third identifier; the address update unit writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory according to the second physical address corresponding to each third identifier.

在一种可能的实现方式中,所述方法还包括:所述内存地址管理单元接收来自所述页表更新源的第二虚拟地址请求,所述第二虚拟地址请求携带虚拟地址和第二标识;响应于所述内存地址管理单元根据所述第二标识识别出所述虚拟地址的来源类别为所述更新请求以外的其它类别请求,所述内存地址管理单元将所述虚拟地址对应的第一物理地址返回所述页表更新源。In one possible implementation, the method also includes: the memory address management unit receives a second virtual address request from the page table update source, the second virtual address request carries a virtual address and a second identifier; in response to the memory address management unit identifying, based on the second identifier, that the source category of the virtual address is a request of a category other than the update request, the memory address management unit returns the first physical address corresponding to the virtual address to the page table update source.

在一种可能的实现方式中,所述方法还包括:所述地址更新单元响应于所述内存地址管理单元发送的读请求包含第二标识,将来自所述内存地址管理单元的读请求透传至所述内存;所述地址更新单元将所述内存响应所述读请求的返回结果透传至所述内存地址管理单元,所述第二标识用于指示所述读请求的虚拟地址的来源类别为所述更新请求以外的其它类别请求。In a possible implementation, the method also includes: the address update unit transmits the read request from the memory address management unit to the memory in response to the read request sent by the memory address management unit including a second identifier; the address update unit transmits the return result of the memory in response to the read request to the memory address management unit, and the second identifier is used to indicate that the source category of the virtual address of the read request is a category request other than the update request.

在一种可能的实现方式中,所述方法还包括:所述内存地址管理单元收到所述第一虚拟地址请求,在所述内存地址管理单元的缓存中查询所述第一虚拟地址请求携带的虚拟地址;在所述内存地址管理单元的缓存中未查询到所述虚拟地址的情况下,在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间;或者,在所述内存地址管理单元的缓存中查询到所述虚拟地址的情况下,在缓存中清空所述虚拟地址的关联空间,并在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间。In a possible implementation, the method also includes: the memory address management unit receives the first virtual address request, and queries the cache of the memory address management unit for the virtual address carried by the first virtual address request; if the virtual address is not found in the cache of the memory address management unit, space for storing page table information is allocated in the cache for the first virtual address request; or, if the virtual address is found in the cache of the memory address management unit, the associated space of the virtual address is cleared in the cache, and space for storing page table information is allocated in the cache for the first virtual address request.

根据本公开的一方面,提供了一种处理器,所述处理器包括如上所述的地址更新装置。According to one aspect of the present disclosure, a processor is provided, wherein the processor includes the address updating device as described above.

根据本公开的一方面,提供了一种芯片,所述芯片包括如上所述的处理器。According to one aspect of the present disclosure, a chip is provided, wherein the chip includes the processor as described above.

根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.

在本公开实施例中,所述地址更新装置包括:地址更新单元、页表更新源、内存地址管理单元、内存;所述地址更新单元接收来自所述页表更新源的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。这样,通过引入地址更新单元,由作为硬件的地址更新单元直接更新内存中的页表信息,以及内存地址管理单元的页表信息,减少系统运行中的软硬件交互,简化了页表更新流程,提高了系统运行效率。In the disclosed embodiment, the address update device includes: an address update unit, a page table update source, a memory address management unit, and a memory; the address update unit receives an update request from the page table update source, the update request includes a virtual address, and a first physical address corresponding to the virtual address; the address update unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the acquired update request, and the page table information is used to describe the mapping relationship between the virtual address and the first physical address. In this way, by introducing the address update unit, the address update unit as hardware directly updates the page table information in the memory and the page table information of the memory address management unit, thereby reducing the software and hardware interaction in the system operation, simplifying the page table update process, and improving the system operation efficiency.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.

图1示出根据本公开实施例的地址更新装置的框图。FIG. 1 shows a block diagram of an address updating device according to an embodiment of the present disclosure.

图2示出根据本公开实施例的地址更新装置的示意图。FIG. 2 shows a schematic diagram of an address updating device according to an embodiment of the present disclosure.

图3示出根据本公开实施例的地址更新方法的示意图。FIG3 is a schematic diagram showing an address updating method according to an embodiment of the present disclosure.

图4示出根据本公开实施例的一种电子设备的框图。FIG. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

图1示出根据本公开实施例的地址更新装置的框图,如图1所示,所述地址更新装置包括:地址更新单元1、页表更新源2、内存地址管理单元3、内存4;所述地址更新单元1连接所述页表更新源2,所述地址更新单元1接收来自所述页表更新源2的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;所述地址更新单元1连接于所述内存地址管理单元3和所述内存4之间,所述地址更新单元1根据获取的更新请求,更新所述内存4和所述内存地址管理单元3分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。Figure 1 shows a block diagram of an address updating device according to an embodiment of the present disclosure. As shown in Figure 1, the address updating device includes: an address updating unit 1, a page table update source 2, a memory address management unit 3, and a memory 4; the address updating unit 1 is connected to the page table update source 2, and the address updating unit 1 receives an update request from the page table update source 2, and the update request includes a virtual address and a first physical address corresponding to the virtual address; the address updating unit 1 is connected between the memory address management unit 3 and the memory 4, and the address updating unit 1 updates the page table information corresponding to the memory 4 and the memory address management unit 3 respectively according to the obtained update request, and the page table information is used to describe the mapping relationship between the virtual address and the first physical address.

在一种可能的实现方式中,地址更新单元1、页表更新源2,以及内存地址管理单元3,可以通过通用的模拟元器件、数字电路元器件等构成的电路板卡或集成电路实现,本公开对地址更新单元1、页表更新源2,以及内存地址管理单元3的具体实现方式不作限定。In one possible implementation, the address update unit 1, the page table update source 2, and the memory address management unit 3 can be implemented by a circuit board card or an integrated circuit composed of general analog components, digital circuit components, etc. The present disclosure does not limit the specific implementation method of the address update unit 1, the page table update source 2, and the memory address management unit 3.

在一种可能的实现方式中,内存4可以采用半导体存储单元构成,例如包括随机存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、静态随机存取存储器(Static Random-Access Memory,SRAM)、动态随机存取存储器(Dynamic Random AccessMemory,DRAM)、快闪存储器(Flash Memory)等,本公开的实施例对内存4的具体形式不作限制。In one possible implementation, the memory 4 can be composed of semiconductor storage units, such as random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), dynamic random access memory (DRAM), flash memory, etc. The embodiments of the present disclosure do not limit the specific form of the memory 4.

在一种可能的实现方式中,页表更新源2用于生成更新请求,该更新请求用于更改内存地址管理单元3以及内存4中的页表信息,该页表信息可以用于描述所述虚拟地址与所述第一物理地址的映射关系。可选的,页表信息可以包括N个(N≥1)虚拟地址,以及与每个虚拟地址对应的第一物理地址。例如,虚拟地址VA1对应第一物理地址PA1,虚拟地址VA2对应第一物理地址PA2,以此类推,虚拟地址VAN对应第一物理地址PAN。其中,虚拟地址是程序代码在运行时所使用的逻辑地址,程序代码可以通过虚拟地址来访问内存4,而不是直接访问内存4的第一物理地址。In one possible implementation, the page table update source 2 is used to generate an update request, which is used to change the memory address management unit 3 and the page table information in the memory 4, and the page table information can be used to describe the mapping relationship between the virtual address and the first physical address. Optionally, the page table information may include N (N≥1) virtual addresses, and the first physical address corresponding to each virtual address. For example, the virtual address VA1 corresponds to the first physical address PA1, the virtual address VA2 corresponds to the first physical address PA2, and so on, the virtual address VAN corresponds to the first physical address PAN. Among them, the virtual address is the logical address used by the program code when it is running, and the program code can access the memory 4 through the virtual address instead of directly accessing the first physical address of the memory 4.

可选的,页表更新源2可以响应上游软件的页表更新需求,生成用于更改内存地址管理单元3以及内存4中页表信息的更新请求;例如,假设某一线程请求更多的内存空间,该线程可以指示页表更新源2生成页表更新请求,更改内存地址管理单元3以及内存4中的页表信息,将其它线程(例如无效的历史线程)占用的第一物理地址分配给该线程的虚拟地址。Optionally, the page table update source 2 can respond to the page table update requirements of the upstream software and generate an update request for changing the memory address management unit 3 and the page table information in the memory 4; for example, assuming that a thread requests more memory space, the thread can instruct the page table update source 2 to generate a page table update request, change the memory address management unit 3 and the page table information in the memory 4, and assign the first physical address occupied by other threads (such as invalid historical threads) to the virtual address of the thread.

可选的,页表更新源2也可以响应上游硬件的页表更新需求,生成用于更改内存地址管理单元3以及内存4中页表信息的更新请求。例如,假设设备驱动程序更改了某一硬件的寄存器的值,由于这种更改会影响该寄存器关联的物理地址,因此需要更新内存地址管理单元3以及内存4中的页表信息以反映这种变化。该硬件可以向页表更新源2发送时序信号,指示页表更新源2生成页表更新请求,更改内存地址管理单元3以及内存4中的页表信息,为该硬件寄存器的虚拟地址更新对应的第一物理地址。Optionally, the page table update source 2 may also respond to the page table update requirements of the upstream hardware and generate an update request for changing the page table information in the memory address management unit 3 and the memory 4. For example, assuming that the device driver changes the value of a register of a certain hardware, since such a change will affect the physical address associated with the register, the page table information in the memory address management unit 3 and the memory 4 needs to be updated to reflect such a change. The hardware may send a timing signal to the page table update source 2, instructing the page table update source 2 to generate a page table update request, change the page table information in the memory address management unit 3 and the memory 4, and update the first physical address corresponding to the virtual address of the hardware register.

应当理解,页表更新源2可以响应上游的软件(或硬件)的页表更新需求,生成用于更改内存地址管理单元3以及内存4中页表信息的更新请求,本公开的实施例对此不作限制。It should be understood that the page table update source 2 can respond to the page table update requirements of the upstream software (or hardware) and generate an update request for changing the memory address management unit 3 and the page table information in the memory 4, and the embodiments of the present disclosure are not limited to this.

在一种可能的实现方式中,内存地址管理单元3可存储当前最新的用于描述虚拟地址与第一物理地址映射关系的页表信息,用于负责虚拟地址到第一物理地址的映射,提供硬件机制的内存访问权限检查(例如,可在页表信息中查询携带某一虚拟地址的访问请求是否存在对应的第一物理地址,以便确定访问请求是否具有内存访问权限),以提高内存的使用效率和系统的安全性。内存地址管理单元3还可以为用户程序提供内存4的申请、释放等操作接口。In a possible implementation, the memory address management unit 3 can store the latest page table information for describing the mapping relationship between the virtual address and the first physical address, and is responsible for the mapping of the virtual address to the first physical address, and provides a hardware mechanism for memory access permission check (for example, it can be queried in the page table information whether there is a corresponding first physical address for an access request carrying a certain virtual address, so as to determine whether the access request has memory access permission), so as to improve the memory usage efficiency and system security. The memory address management unit 3 can also provide the user program with an operation interface such as the application and release of the memory 4.

可选的,内存地址管理单元3可以包括缓存,所述缓存为数据访问速度快于内存4的高速存储器,例如包括高速缓冲存储器(Cache)。内存地址管理单元3的缓存中,可以存放用于描述虚拟地址与第一物理地址映射关系的页表信息。其中,内存地址管理单元3缓存的页表信息,可以是内存4中存储的页表信息的部分页表信息(例如预计近期会使用的最新页表信息),也可以是内存4中存储的全部页表信息,本公开对此不作限制。Optionally, the memory address management unit 3 may include a cache, which is a high-speed memory having a data access speed faster than the memory 4, such as a cache memory. In the cache of the memory address management unit 3, page table information for describing the mapping relationship between the virtual address and the first physical address may be stored. The page table information cached by the memory address management unit 3 may be part of the page table information stored in the memory 4 (such as the latest page table information expected to be used in the near future), or may be all the page table information stored in the memory 4, and the present disclosure does not limit this.

在示例中,可根据内存地址管理单元3缓存的页表信息,进行虚拟地址查询,如果虚拟地址所需的第一物理地址在缓存中,可以直接返回第一物理地址;如果虚拟地址所需的第一物理地址不在缓存中,可以发起对内存4的访问。In the example, a virtual address query can be performed based on the page table information cached by the memory address management unit 3. If the first physical address required by the virtual address is in the cache, the first physical address can be returned directly; if the first physical address required by the virtual address is not in the cache, access to the memory 4 can be initiated.

在一种可能的实现方式中,地址更新单元1可以分别连接页表更新源2、内存地址管理单元3,以及内存4,用于接收来自页表更新源2的携带有虚拟地址,以及虚拟地址对应的第一物理地址的更新请求,并根据收到的更新请求,更新内存4和内存地址管理单元3的页表信息,使该页表信息具有更新请求指示的虚拟地址与第一物理地址的映射关系。In one possible implementation, the address update unit 1 can be connected to the page table update source 2, the memory address management unit 3, and the memory 4, respectively, to receive an update request from the page table update source 2 carrying a virtual address and a first physical address corresponding to the virtual address, and update the page table information of the memory 4 and the memory address management unit 3 according to the received update request, so that the page table information has a mapping relationship between the virtual address indicated by the update request and the first physical address.

这样,当页表更新源2有页表映射需要更新到内存地址管理单元3以及内存4中时,可以先将新的页表信息更新至地址更新单元1,再由地址更新单元1将新的页表信息更新至内存4和内存地址管理单元3。In this way, when the page table update source 2 has a page table mapping that needs to be updated to the memory address management unit 3 and the memory 4, the new page table information can be updated to the address update unit 1 first, and then the address update unit 1 updates the new page table information to the memory 4 and the memory address management unit 3.

对于硬件要更新页表的场景,对比相关技术中先通过软硬件接口通知软件如何分配页表,然后由软件将页表信息写入内存4,再通知内存地址管理单元3重新获取页表信息。相关技术中的这个流程因为涉及到软硬件之间的同步,访问内存,其所消耗的时间过大,进而会影响处理器的性能。而在本公开实施例的地址更新装置中,通过引入地址更新单元1,由作为硬件的地址更新单元1直接更新内存4中的页表信息,以及内存地址管理单元3的页表信息,减少系统运行中的软硬件交互(地址更新单元1经由页表更新源2获取由硬件发起的如何分配页表的更新请求),简化了页表更新流程,提高了系统运行效率。For the scenario where the hardware needs to update the page table, compared with the related art, the software is first notified through the software-hardware interface how to allocate the page table, and then the software writes the page table information into the memory 4, and then notifies the memory address management unit 3 to re-acquire the page table information. This process in the related art involves synchronization between software and hardware, and accessing the memory, which consumes too much time, which in turn affects the performance of the processor. In the address update device of the embodiment of the present disclosure, by introducing the address update unit 1, the address update unit 1 as hardware directly updates the page table information in the memory 4 and the page table information of the memory address management unit 3, thereby reducing the software and hardware interaction during system operation (the address update unit 1 obtains the update request on how to allocate the page table initiated by the hardware via the page table update source 2), simplifying the page table update process and improving the system operation efficiency.

图2示出根据本公开实施例的地址更新装置的示意图,如图2所述,内存地址管理单元3在访问内存4的过程中,会经过地址更新单元1。对于常规的内存访问(例如,与地址更新无关的访问请求),地址更新单元1会将其透传至内存4,内存4返回的结果也会进行透传,返回至内存地址管理单元3。对于由页表更新源2发起的地址更新请求,地址更新单元1会进行拦截,将之前页表更新源2更新的页表信息进行返回,这样,内存地址管理单3会得到更新后的页表信息。同时地址更新单元1会将新的页表信息写入内存4中,这样内存4中也有了一份新的页表信息的拷贝,供给软件或其它内存地址管理单元3后续使用。FIG2 shows a schematic diagram of an address updating device according to an embodiment of the present disclosure. As shown in FIG2 , the memory address management unit 3 will pass through the address updating unit 1 during the process of accessing the memory 4. For conventional memory accesses (e.g., access requests unrelated to address updates), the address updating unit 1 will pass them through to the memory 4, and the result returned by the memory 4 will also be passed through and returned to the memory address management unit 3. For the address update request initiated by the page table update source 2, the address update unit 1 will intercept it and return the page table information previously updated by the page table update source 2, so that the memory address management unit 3 will obtain the updated page table information. At the same time, the address update unit 1 will write the new page table information into the memory 4, so that there is also a new copy of the page table information in the memory 4, which is provided to the software or other memory address management units 3 for subsequent use.

下面以图2为例,对本公开实施例的地址更新装置的更新流程进行示例性说明。The following takes FIG. 2 as an example to exemplarily illustrate the update process of the address update device in the embodiment of the present disclosure.

在一种可能的实现方式中,所述地址更新单元1根据获取的更新请求,更新所述内存4和所述内存地址管理单元3分别对应的页表信息,包括:所述地址更新单元1根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元3发送携带所述虚拟地址的第一虚拟地址请求;所述内存地址管理单元3根据所述第一虚拟地址请求生成用于访问所述内存4的读请求;所述地址更新单元1拦截所述读请求,并向所述内存地址管理单元3发送所述第一物理地址,以实现所述内存地址管理单元3的更新;所述地址更新单元1从所述页表更新源2获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存4中第二物理地址指示的存储位置,以实现所述内存4的更新;所述地址更新单元1向所述页表更新源2反馈更新结果,所述更新结果用于表征所述地址更新单元1完成所述内存4和所述内存地址管理单元3的更新。In a possible implementation, the address update unit 1 updates the page table information corresponding to the memory 4 and the memory address management unit 3 respectively according to the obtained update request, including: the address update unit 1 sends a first virtual address request carrying the virtual address to the memory address management unit 3 according to the virtual address carried in the update request; the memory address management unit 3 generates a read request for accessing the memory 4 according to the first virtual address request; the address update unit 1 intercepts the read request and sends the first physical address to the memory address management unit 3 to implement the update of the memory address management unit 3; the address update unit 1 obtains the second physical address from the page table update source 2, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address to the storage location indicated by the second physical address in the memory 4 to implement the update of the memory 4; the address update unit 1 feeds back the update result to the page table update source 2, and the update result is used to indicate that the address update unit 1 completes the update of the memory 4 and the memory address management unit 3.

通过在本公开实施例的地址更新装置中引入地址更新单元1,由作为硬件的地址更新单元1直接更新内存4中的页表信息,以及内存地址管理单元3的页表信息,简化了页表信息更新流程,对于经由页表更新源2获取的来自各类硬件模块的更新需要,不再涉及软件与硬件之间的同步(例如,不涉及通过软硬件接口通知软件需要如何分配页表,由软件写入内存4,再通知内存地址管理单元3重新获取页表这些过程),减少系统运行中的软硬件交互,提高了地址更新效率。By introducing the address update unit 1 in the address update device of the embodiment of the present invention, the address update unit 1 as hardware directly updates the page table information in the memory 4 and the page table information of the memory address management unit 3, thereby simplifying the page table information update process, and the update needs from various hardware modules obtained via the page table update source 2 no longer involve synchronization between software and hardware (for example, it does not involve notifying the software through the software-hardware interface how to allocate the page table, the software writing to the memory 4, and then notifying the memory address management unit 3 to re-acquire the page table). This reduces the software-hardware interaction during system operation and improves the address update efficiency.

示例性地,如图2中S1所示,页表更新源2可以向地址更新单元1发送更新请求,该更新请求中可以包含虚拟地址,以及其对应的第一物理地址。其中,该更新请求可以是指示在内存地址管理单3和内存4中,建立新的虚拟地址与第一物理地址映射关系的建表请求,也可以是在内存地址管理单3和内存4中,更改虚拟地址与第一物理地址映射关系的请求,本公开对此不作限制。Exemplarily, as shown in S1 in FIG. 2 , the page table update source 2 may send an update request to the address update unit 1, and the update request may include a virtual address and its corresponding first physical address. The update request may be a table creation request indicating that a new mapping relationship between a virtual address and a first physical address is established in the memory address management unit 3 and the memory 4, or may be a request to change the mapping relationship between a virtual address and a first physical address in the memory address management unit 3 and the memory 4, and the present disclosure does not limit this.

例如,假设页表更新源2发出的更新请求携带虚拟地址VA和第一物理地址PA,如果内存地址管理单3和内存4中没有记录虚拟地址VA,该更新请求为建表请求,请求建立虚拟地址VA与物理地址PA的映射关系;如果内存地址管理单3和内存4中已经记录了虚拟地址VA,但是虚拟地址VA对应的第一物理地址并不是第一物理地址PA,该更新请求为更改请求,请求将虚拟地址VA与其它物理地址的映射关系,更改为将虚拟地址VA对应第一物理地址PA。For example, assuming that the update request issued by the page table update source 2 carries the virtual address VA and the first physical address PA, if the virtual address VA is not recorded in the memory address management unit 3 and the memory 4, the update request is a table creation request, requesting to establish a mapping relationship between the virtual address VA and the physical address PA; if the virtual address VA has been recorded in the memory address management unit 3 and the memory 4, but the first physical address corresponding to the virtual address VA is not the first physical address PA, the update request is a change request, requesting to change the mapping relationship between the virtual address VA and other physical addresses to change the virtual address VA to correspond to the first physical address PA.

地址更新单元1可以收到页表更新源2的更新请求,该更新请求携带了虚拟地址,以及虚拟地址对应的第一物理地址。地址更新单元1可以留存第一物理地址,并如图2中S2所示,根据收到的虚拟地址生成第一虚拟地址请求,向内存地址管理单元3发送携带虚拟地址的第一虚拟地址请求。The address update unit 1 may receive an update request from the page table update source 2, the update request carrying the virtual address and the first physical address corresponding to the virtual address. The address update unit 1 may retain the first physical address, and as shown in S2 in FIG. 2 , generate a first virtual address request according to the received virtual address, and send the first virtual address request carrying the virtual address to the memory address management unit 3.

在一种可能的实现方式中,所述地址更新单元1根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元3发送携带所述虚拟地址的第一虚拟地址请求,包括:所述地址更新单元1根据所述更新请求携带的所述虚拟地址,生成第一标识;所述地址更新单元1向所述内存地址管理单元3发送携带有第一标识和所述虚拟地址的第一虚拟地址请求;通过设置第一标识,便于内存地址管理单元3快速识别出收到的第一虚拟地址请求是与地址更新相关的请求。In a possible implementation, the address update unit 1 sends a first virtual address request carrying the virtual address to the memory address management unit 3 according to the virtual address carried in the update request, including: the address update unit 1 generates a first identifier according to the virtual address carried in the update request; the address update unit 1 sends a first virtual address request carrying the first identifier and the virtual address to the memory address management unit 3; by setting the first identifier, the memory address management unit 3 can quickly identify that the received first virtual address request is a request related to address update.

示例性地,由于第一虚拟地址请求是基于来自页表更新源2的更新请求生成的,为了指出第一虚拟地址请求中携带的虚拟地址的来源是更新请求中的虚拟地址,地址更新单元1可以为该虚拟地址生成第一标识,用于标记该虚拟地址的来源类别是用于更新内存地址管理单元3和内存4中页表信息的更新请求。然后,在图2中S2中,地址更新单元1可向内存地址管理单元3发送携带有第一标识和虚拟地址的第一虚拟地址请求。Exemplarily, since the first virtual address request is generated based on the update request from the page table update source 2, in order to indicate that the source of the virtual address carried in the first virtual address request is the virtual address in the update request, the address update unit 1 may generate a first identifier for the virtual address, which is used to mark that the source category of the virtual address is an update request for updating the page table information in the memory address management unit 3 and the memory 4. Then, in S2 in FIG. 2 , the address update unit 1 may send the first virtual address request carrying the first identifier and the virtual address to the memory address management unit 3.

这样,页表更新源2向内存地址管理单元3缓存发起更新请求时,会先告知地址更新单元1。地址更新单元1会向内存地址管理单元3发送第一虚拟地址请求,这类第一虚拟地址请求需要有第一标识,以区分该第一虚拟地址请求不是普通的虚拟地址请求,而是与页表更新相关的第一虚拟地址请求。In this way, when the page table update source 2 initiates an update request to the memory address management unit 3 cache, it will first inform the address update unit 1. The address update unit 1 will send a first virtual address request to the memory address management unit 3. This type of first virtual address request needs to have a first identifier to distinguish that the first virtual address request is not an ordinary virtual address request, but a first virtual address request related to the page table update.

其中,内存地址管理单元3接收的各类虚拟地址请求可以有一个标识信息,用以区分不同类型的虚拟地址请求,例如,携带有第一标识(例如第一标识为1)的第一虚拟地址请求用于表示与地址更新相关的请求;携带有第二标识(例如第二标识为0)的第二虚拟地址请求用于表示与地址更新无关的其他类请求。其中,第一标识和第二标识可以是数字、字母、符号中的至少一种或多种的组合,本公开对此不作限制。Among them, each type of virtual address request received by the memory address management unit 3 may have an identification information to distinguish different types of virtual address requests. For example, a first virtual address request carrying a first identification (for example, the first identification is 1) is used to represent a request related to address update; a second virtual address request carrying a second identification (for example, the second identification is 0) is used to represent other types of requests not related to address update. Among them, the first identification and the second identification can be a combination of at least one or more of numbers, letters, and symbols, and the present disclosure does not limit this.

在一种可能的实现方式中,所述内存地址管理单元3收到所述第一虚拟地址请求,在所述内存地址管理单元3的缓存中查询所述第一虚拟地址请求携带的虚拟地址;在所述内存地址管理单元3的缓存中未查询到所述虚拟地址的情况下,在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间;或者,在所述内存地址管理单元3的缓存中查询到所述虚拟地址的情况下,在缓存中清空所述虚拟地址的关联空间,并在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间。In one possible implementation, the memory address management unit 3 receives the first virtual address request, and queries the virtual address carried by the first virtual address request in the cache of the memory address management unit 3; if the virtual address is not found in the cache of the memory address management unit 3, space for storing page table information is allocated in the cache for the first virtual address request; or, if the virtual address is found in the cache of the memory address management unit 3, the associated space of the virtual address is cleared in the cache, and space for storing page table information is allocated in the cache for the first virtual address request.

其中,内存地址管理单元3在缓存中分配了用于存储页表信息的空间,可以标记该缓存空间用于存储页表更新信息,可便于后续的页表更新,以及减少其它数据占用该空间的概率。The memory address management unit 3 allocates space in the cache for storing page table information, and can mark the cache space for storing page table update information, which can facilitate subsequent page table updates and reduce the probability of other data occupying the space.

通过这种方式,内存地址管理单元3即可以新建用于表示虚拟地址与第一物理地址之间映射关系的页表信息,还可以更改缓存中已有的虚拟地址与第一物理地址之间的映射关系,可适用更多的场景。In this way, the memory address management unit 3 can create new page table information for representing the mapping relationship between the virtual address and the first physical address, and can also change the mapping relationship between the existing virtual address and the first physical address in the cache, which can be applied to more scenarios.

如图2中S3所示,内存地址管理单元3可根据第一虚拟地址请求生成用于访问内存4的读请求。例如,内存地址管理单元3在收到第一虚拟地址请求,可在片上缓存中进行查询判断,因为该虚拟地址是新建的虚拟地址,内存地址管理单元3的片上缓存中查询不到该虚拟地址对应的第一物理地址,按照相关技术中的流程,内存地址管理单元3会向内存4发送读请求,读取内存4中的页表信息,以得到其对应的第一物理地址。As shown in S3 in FIG. 2 , the memory address management unit 3 may generate a read request for accessing the memory 4 according to the first virtual address request. For example, after receiving the first virtual address request, the memory address management unit 3 may query and judge in the on-chip cache. Because the virtual address is a newly created virtual address, the first physical address corresponding to the virtual address cannot be found in the on-chip cache of the memory address management unit 3. According to the process in the related art, the memory address management unit 3 will send a read request to the memory 4, read the page table information in the memory 4, and obtain the corresponding first physical address.

而在本公开的实施例中,内存地址管理单元3根据第一虚拟地址请求生成的用于访问内存4的读请求,所述读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求,以便后续地址更新单元1可以根据第一标识来拦截读请求。In an embodiment of the present disclosure, the memory address management unit 3 generates a read request for accessing the memory 4 based on the first virtual address request, and the read request includes the virtual address and the first identifier, and the first identifier is used to indicate that the source category of the virtual address is the update request, so that the subsequent address update unit 1 can intercept the read request based on the first identifier.

应当理解,读请求虽然是用于发往内存4的,但是实际的传输路径允许地址更新单元1实现拦截,具体地址更新单元1是否对读请求进行拦截,可根据实际的应用场景进行确定,本公开的实施例对此不作限制。It should be understood that although the read request is used to be sent to the memory 4, the actual transmission path allows the address update unit 1 to intercept it. Whether the address update unit 1 intercepts the read request can be determined according to the actual application scenario, and the embodiments of the present disclosure do not limit this.

在一种可能的实现方式中,如图2中S4所示,所述地址更新单元1响应于所述读请求包含所述第一标识,拦截所述读请求,并向所述内存地址管理单元3发送所述第一物理地址,以实现所述内存地址管理单元3的更新。In a possible implementation, as shown in S4 in Figure 2, the address update unit 1 intercepts the read request in response to the read request containing the first identifier, and sends the first physical address to the memory address management unit 3 to implement the update of the memory address management unit 3.

例如,地址更新单元1收到来自内存地址管理单元3的读请求后,会根据读请求携带的第一标识判断出该读请求是一个与地址更新相关的请求,对于这种与地址更新相关的读请求,地址更新单元1会拦截其访问内存4,同时会向内存地址管理单元3返回第一物理地址,也即如图2中S1中请求信息携带的第一物理地址,以实现内存地址管理单元3的更新。这样,后续内存地址管理单元3收到携带有第二标识和虚拟地址的第二虚拟地址请求,就可以查询到虚拟地址对应的第一物理地址。For example, after receiving a read request from the memory address management unit 3, the address update unit 1 will determine that the read request is a request related to address update based on the first identifier carried in the read request. For such a read request related to address update, the address update unit 1 will intercept its access to the memory 4, and at the same time return the first physical address to the memory address management unit 3, that is, the first physical address carried by the request information in S1 in FIG2, to implement the update of the memory address management unit 3. In this way, when the memory address management unit 3 subsequently receives a second virtual address request carrying a second identifier and a virtual address, it can query the first physical address corresponding to the virtual address.

如图2中S5所示,地址更新单元1会向页表更新源2发送物理地址请求,该物理地址请求需要地址更新单元1反馈一个第二物理地址,该第二物理地址的目的在于告诉地址更新单元1,之前页表更新源2所建立的虚拟地址与物理地址的映射关系信息需要存储在内存4中的位置。如图2中S6所示,地址更新单元1在得到第二物理地址后,会向内存4发起写操作,将页表更新源2所建立的虚拟地址与物理地址的映射关系,写入内存4中第二物理地址指示的位置处。As shown in S5 in FIG. 2 , the address update unit 1 sends a physical address request to the page table update source 2. The physical address request requires the address update unit 1 to feedback a second physical address. The purpose of the second physical address is to tell the address update unit 1 that the mapping relationship information between the virtual address and the physical address previously established by the page table update source 2 needs to be stored in the location in the memory 4. As shown in S6 in FIG. 2 , after obtaining the second physical address, the address update unit 1 initiates a write operation to the memory 4, and writes the mapping relationship between the virtual address and the physical address established by the page table update source 2 to the location indicated by the second physical address in the memory 4.

写入完成后,如图2中S7所示,地址更新单元1已经将新的页表映射关系更新至内存地址单元3以及内存4中,可以向页表更新源2反馈页表更新已完成的更新结果。After the writing is completed, as shown in S7 in FIG. 2 , the address update unit 1 has updated the new page table mapping relationship to the memory address unit 3 and the memory 4 , and can feed back the update result of the page table update completion to the page table update source 2 .

在本公开的实施例中,所述地址更新单元1可以根据获取的更新请求,按照主动触发的方式更新内存4和内存地址管理单元3的页表信息;或者,所述地址更新单元1也可以被动等待页表更新源2发送更新请求,地址更新单元1中可保存没更新过的页表信息,地址更新单元1每次收到内存地址管理单元3的读请求时,可以和保存的没更新过的页表信息比对,并在读请求携带的虚拟地址满足在没更新过的页表信息中,更新内存4和内存地址管理单元3的页表信息,并从没更新过的页表信息中删除与该虚拟地址相关的内容。In an embodiment of the present disclosure, the address update unit 1 can update the page table information of the memory 4 and the memory address management unit 3 in an actively triggered manner based on the acquired update request; alternatively, the address update unit 1 can also passively wait for the page table update source 2 to send an update request, and the address update unit 1 can save the page table information that has not been updated. Each time the address update unit 1 receives a read request from the memory address management unit 3, it can compare it with the saved page table information that has not been updated, and if the virtual address carried in the read request satisfies the page table information that has not been updated, update the page table information of the memory 4 and the memory address management unit 3, and delete the content related to the virtual address from the page table information that has not been updated.

示例性地,所述地址更新单元1根据获取的更新请求,更新所述内存4和所述内存地址管理单元3分别对应的页表信息,包括:所述地址更新单元1等待所述页表更新源2发送更新请求,并根据在先获取的未处理的更新请求,生成待更新页表信息;所述地址更新单元1拦截来自所述内存地址管理单元3的读请求,所述读请求用于访问所述内存4;所述地址更新单元1对所述读请求与所述待更新页表信息进行比对,得到比对结果;所述地址更新单元1响应于所述比对结果指示所述读请求与所述待更新页表信息中存在相同的虚拟地址,更新所述待更新页表信息(例如从所述待更新页表信息中删除已更新的虚拟地址),以及所述内存4和所述内存地址管理单元3分别对应的页表信息;所述地址更新单元1向所述页表更新源2反馈更新结果,所述更新结果用于表征所述地址更新单元1完成所述内存4和所述内存地址管理单元3的更新。Exemplarily, the address update unit 1 updates the page table information corresponding to the memory 4 and the memory address management unit 3 respectively according to the obtained update request, including: the address update unit 1 waits for the page table update source 2 to send an update request, and generates the page table information to be updated according to the previously obtained unprocessed update request; the address update unit 1 intercepts the read request from the memory address management unit 3, and the read request is used to access the memory 4; the address update unit 1 compares the read request with the page table information to be updated to obtain a comparison result; the address update unit 1 responds to the comparison result indicating that the read request and the page table information to be updated have the same virtual address, updates the page table information to be updated (for example, deletes the updated virtual address from the page table information to be updated), and the page table information corresponding to the memory 4 and the memory address management unit 3 respectively; the address update unit 1 feeds back the update result to the page table update source 2, and the update result is used to indicate that the address update unit 1 completes the update of the memory 4 and the memory address management unit 3.

这样,通过待更新页表信息,地址更新单元1在等待页表更新源2发送更新请求的同时,可以处理之前已经获取的未处理更新请求,可以确保页表信息的更新及时且连续,减少了因等待新的更新请求而导致更新延迟的概率。并且,地址更新单元1通过对比读请求与待更新页表信息,地址更新单元1可以精确判断哪些读请求可以立即进行,可以减少不必要的内存访问等待,降低系统开销,提高系统运行效率。In this way, through the page table information to be updated, the address update unit 1 can process the previously obtained unprocessed update requests while waiting for the page table update source 2 to send an update request, which can ensure that the page table information is updated in a timely and continuous manner, and reduce the probability of update delays due to waiting for new update requests. In addition, by comparing the read request with the page table information to be updated, the address update unit 1 can accurately determine which read requests can be performed immediately, which can reduce unnecessary memory access waits, reduce system overhead, and improve system operation efficiency.

应当理解,地址更新单元1根据获取的更新请求,更新内存4和内存地址管理单元3分别对应的页表信息,既可以采用主动触发内存地址管理单元3更新的触发方式,也可以被动等待页表更新源2发送访问请求,本公开的实施例对此不作限制,可根据实现的应用场景进行设置。It should be understood that the address update unit 1 updates the page table information corresponding to the memory 4 and the memory address management unit 3 respectively according to the obtained update request. It can adopt the triggering method of actively triggering the update of the memory address management unit 3, or passively wait for the page table update source 2 to send an access request. The embodiments of the present disclosure do not limit this and can be set according to the application scenario to be implemented.

在一种可能的实现方式中,如图2中S8所示,所述页表更新源2连接所述内存地址管理单元3,所述内存地址管理单元3接收来自所述页表更新源2的第二虚拟地址请求,所述第二虚拟地址请求携带虚拟地址和第二标识;响应于所述内存地址管理单元3根据所述第二标识识别出所述虚拟地址的来源类别为所述更新请求以外的其它类别请求,所述内存地址管理单元3将所述虚拟地址对应的第一物理地址返回所述页表更新源2。In one possible implementation, as shown in S8 in Figure 2, the page table update source 2 is connected to the memory address management unit 3, and the memory address management unit 3 receives a second virtual address request from the page table update source 2, and the second virtual address request carries a virtual address and a second identifier; in response to the memory address management unit 3 identifying that the source category of the virtual address is a category request other than the update request according to the second identifier, the memory address management unit 3 returns the first physical address corresponding to the virtual address to the page table update source 2.

示例性地,所述页表更新源2在收到所述地址更新单元1反馈的所述更新结果之后,可向所述内存地址管理单元3发送携带有虚拟地址和第二标识的第二虚拟地址请求,从所述内存地址管理单元3的缓存中读取所述第二虚拟地址请求中的虚拟地址对应的第一物理地址,所述第二标识用于指示所述虚拟地址的来源类别为所述更新请求以外的其它类别请求。Exemplarily, after receiving the update result fed back by the address update unit 1, the page table update source 2 may send a second virtual address request carrying a virtual address and a second identifier to the memory address management unit 3, and read the first physical address corresponding to the virtual address in the second virtual address request from the cache of the memory address management unit 3, where the second identifier is used to indicate that the source category of the virtual address is a category request other than the update request.

例如,页表更新完成后,内存地址管理单元3的缓存中存储了最新的用于表示虚拟地址与第一物理地址映射关系的页表信息。例如,页表信息中包含了虚拟地址A以及虚拟地址对应的第一物理地址A。内存地址管理单元3收到携带有虚拟地址A和第二标识的第二虚拟地址请求,内存地址管理单元3在识别到第二虚拟地址请求中的第二标识,可以知道该第二虚拟地址请求是与地址更新无法的请求,可以在缓存中的页表信息中查询虚拟地址A,并查询到虚拟地址A对应的是第一物理地址A,可以将第一物理地址A返回页表更新源2。For example, after the page table update is completed, the latest page table information for indicating the mapping relationship between the virtual address and the first physical address is stored in the cache of the memory address management unit 3. For example, the page table information contains the virtual address A and the first physical address A corresponding to the virtual address. The memory address management unit 3 receives a second virtual address request carrying the virtual address A and the second identifier. When the memory address management unit 3 recognizes the second identifier in the second virtual address request, it can be known that the second virtual address request is a request that cannot be updated with the address. The virtual address A can be queried in the page table information in the cache, and it can be found that the virtual address A corresponds to the first physical address A. The first physical address A can be returned to the page table update source 2.

这样,页表更新源2收到页表更新完成的通知后,可以向内存地址管理单元3发送虚第二拟地址请求,也可以通知其他的硬件模块或软件,该映射关系可用。In this way, after receiving the notification of page table update completion, the page table update source 2 may send a virtual address request to the memory address management unit 3, or may notify other hardware modules or software that the mapping relationship is available.

在上述更新流程中,如果涉及到多级页表,在如图2所示的S3中,地址更新单元1会向页表更新源2发送多次物理地址请求。在一种可能的实现方式中,在所述页表信息包括多级页表的情况下,所述地址更新单元1从所述页表更新源2获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存4中第二物理地址指示的存储位置,包括:所述地址更新单元1向所述页表更新源2发送物理地址请求,物理地址请求包括用于指示页表级数的第三标识;所述地址更新单元1接收所述页表更新源2反馈的第二物理地址,所述第二物理地址与所述第三标识对应;所述地址更新单元1根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存4中所述第二物理地址指示的存储位置。In the above update process, if a multi-level page table is involved, in S3 as shown in Figure 2, the address update unit 1 will send multiple physical address requests to the page table update source 2. In a possible implementation, when the page table information includes a multi-level page table, the address update unit 1 obtains a second physical address from the page table update source 2, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory 4, including: the address update unit 1 sends a physical address request to the page table update source 2, and the physical address request includes a third identifier for indicating the number of page table levels; the address update unit 1 receives the second physical address fed back by the page table update source 2, and the second physical address corresponds to the third identifier; the address update unit 1 writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory 4 according to the second physical address corresponding to each third identifier.

可选的,所述地址更新单元1向所述页表更新源2发送的物理地址请求,该物理地址请求一次可携带多个不同级数的第三标识,页表更新源2可一次收到多个第三标识,并根据多个第三标识一次把所有级数对应的多个第二物理地址反馈给地址更新单元1,地址更新单元1可根据每个第三标识对应的第二物理地址,将第三标识指示级数的页表信息写入内存4中第二物理地址指示的存储位置。Optionally, the physical address request sent by the address update unit 1 to the page table update source 2 may carry multiple third identifiers of different levels at a time. The page table update source 2 may receive multiple third identifiers at a time and feed back multiple second physical addresses corresponding to all levels to the address update unit 1 at a time based on the multiple third identifiers. The address update unit 1 may write the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory 4 based on the second physical address corresponding to each third identifier.

可选的,所述地址更新单元1向所述页表更新源2多次发送物理地址请求,每个物理地址请求一次可携带一个指示页表级数的第三标识,所述发送次数由所述多级页表的级数确定;所述地址更新单元1接收所述页表更新源2每次反馈第二物理地址,所述第二物理地址是所述页表更新源2根据携带有第三标识的物理地址请求,生成的与所述第三标识对应的第二物理地址;所述地址更新单元1根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存4中所述第二物理地址指示的存储位置。Optionally, the address update unit 1 sends physical address requests to the page table update source 2 multiple times, each physical address request may carry a third identifier indicating the page table level at one time, and the number of transmissions is determined by the level of the multi-level page table; the address update unit 1 receives the second physical address fed back by the page table update source 2 each time, the second physical address is a second physical address corresponding to the third identifier generated by the page table update source 2 according to the physical address request carrying the third identifier; the address update unit 1 writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory 4 according to the second physical address corresponding to each third identifier.

应当理解,在地址更新单元1与页表更新源2在交互过程中,每个物理地址请求一次可携带一个或多个第三标识,不同的第三标识可对应不同的页表级数,本公开的实施例对地址更新单元1与页表更新源2之间的具体交互方式不作限制,可根据实际的应用场景进行设置。It should be understood that during the interaction between the address update unit 1 and the page table update source 2, each physical address request can carry one or more third identifiers at a time, and different third identifiers can correspond to different page table levels. The embodiments of the present disclosure do not limit the specific interaction method between the address update unit 1 and the page table update source 2, and can be set according to the actual application scenario.

通过设置多级页表,可以优化内存空间、提高内存利用率、支持更大的虚拟地址空间,提高地址转换速度。By setting up a multi-level page table, you can optimize memory space, improve memory utilization, support a larger virtual address space, and increase address translation speed.

举例来说,如果内存地址管理单元3中有多级页表,地址更新单元1要多次向页表更新源2发送物理地址请求,因为每一级页表的建立,都需要可用的第二物理地址。同时,为了使地址更新单元1知道当前建立的页表属于哪一级页表,地址更新单元1每次发送的物理地址请求包括用于指示页表级数的第三标识,页表更新源2可根据携带有第三标识的物理地址请求,生成与第三标识对应的第二物理地址。For example, if there are multiple levels of page tables in the memory address management unit 3, the address update unit 1 needs to send physical address requests to the page table update source 2 multiple times, because the establishment of each level of page table requires an available second physical address. At the same time, in order to let the address update unit 1 know which level of page table the currently established page table belongs to, the physical address request sent by the address update unit 1 each time includes a third identifier for indicating the number of page table levels, and the page table update source 2 can generate a second physical address corresponding to the third identifier based on the physical address request carrying the third identifier.

例如,多级页表可包括M级(M>1),地址更新单元1可以向页表更新源2发送M次物理地址请求。For example, the multi-level page table may include M levels (M>1), and the address update unit 1 may send M physical address requests to the page table update source 2.

地址更新单元1第一次向页表更新源2发送的物理地址请求1,可携带用于指示第一级列表的第三标识1。页表更新源2可根据携带第三标识1的物理地址请求1,生成与第三标识1对应的第二物理地址1,用于指示内存4中写入第一级页表信息的位置。页表更新源2可以向地址更新单元1反馈与第三标识1对应的第二物理地址1,地址更新单元1根据第二物理地址1,将第一级页表信息写入内存4中第二物理地址1位置处,实现内存4中第一级页表信息的更新。The physical address request 1 sent by the address update unit 1 to the page table update source 2 for the first time may carry a third identifier 1 for indicating the first-level list. The page table update source 2 may generate a second physical address 1 corresponding to the third identifier 1 according to the physical address request 1 carrying the third identifier 1, which is used to indicate the location where the first-level page table information is written in the memory 4. The page table update source 2 may feedback the second physical address 1 corresponding to the third identifier 1 to the address update unit 1, and the address update unit 1 may write the first-level page table information to the second physical address 1 in the memory 4 according to the second physical address 1, thereby updating the first-level page table information in the memory 4.

类似的,地址更新单元1第一次向页表更新源2发送的物理地址请求2,可携带用于指示第二级列表的第三标识2。页表更新源2可根据携带第三标识2的物理地址请求2,生成与第三标识2对应的第二物理地址2,用于指示内存4中写入第二级页表信息的位置。页表更新源2可以向地址更新单元1反馈与第三标识2对应的第二物理地址2,地址更新单元1根据第二物理地址2,将第二级页表信息写入内存4中第二物理地址2位置处,实现内存4中第二级页表信息的更新。Similarly, the physical address request 2 sent by the address update unit 1 to the page table update source 2 for the first time may carry a third identifier 2 for indicating the second-level list. The page table update source 2 may generate a second physical address 2 corresponding to the third identifier 2 based on the physical address request 2 carrying the third identifier 2, which is used to indicate the location where the second-level page table information is written in the memory 4. The page table update source 2 may feed back the second physical address 2 corresponding to the third identifier 2 to the address update unit 1, and the address update unit 1 may write the second-level page table information to the second physical address 2 in the memory 4 based on the second physical address 2, thereby updating the second-level page table information in the memory 4.

以此类推,地址更新单元1第M次向页表更新源2发送的物理地址请求M,可携带用于指示第M级列表的第三标识M。页表更新源2可根据携带第三标识M的物理地址请求M,生成与第三标识M对应的第二物理地址M,用于指示内存4中写入第M级页表信息的位置。页表更新源2可以向地址更新单元1反馈与第三标识M对应的第二物理地址M,地址更新单元1根据第二物理地址M,将第M级页表信息写入内存4中第二物理地址M位置处,实现内存4中第M级页表信息的更新。By analogy, the physical address request M sent by the address update unit 1 to the page table update source 2 for the Mth time may carry a third identifier M for indicating the Mth level list. The page table update source 2 may generate a second physical address M corresponding to the third identifier M according to the physical address request M carrying the third identifier M, which is used to indicate the location in the memory 4 where the Mth level page table information is written. The page table update source 2 may feed back the second physical address M corresponding to the third identifier M to the address update unit 1, and the address update unit 1 may write the Mth level page table information to the second physical address M in the memory 4 according to the second physical address M, thereby updating the Mth level page table information in the memory 4.

在一种可能的实现方式中,在所述页表信息包括多级页表的情况下,内存地址管理单元3生成的用于访问内存4的读请求,还可以包括用于指示页表级数信息的第三标识,地址更新单元1收到携带有第一标识和第三标识的读请求,会根据第一标识拦截读请求,不让其发往内存4,同时根据表示页表级数信息的第三标识,将页表更新源2更新的页表内容(例如与虚拟地址对应的第一物理地址)返回给内存地址管理单元3片上缓存。In one possible implementation, when the page table information includes a multi-level page table, the read request generated by the memory address management unit 3 for accessing the memory 4 may also include a third identifier for indicating the page table level information. When the address update unit 1 receives the read request carrying the first identifier and the third identifier, it will intercept the read request based on the first identifier and prevent it from being sent to the memory 4. At the same time, based on the third identifier representing the page table level information, it will return the page table content updated by the page table update source 2 (for example, the first physical address corresponding to the virtual address) to the on-chip cache of the memory address management unit 3.

其中,根据内存地址管理单元3的工作流程,假设多级页表为三级页表,内存地址管理单元3可以依次向地址更新单元1发送携带有第三标识的读请求。例如,第一次读请求携带的第三标识用于表示第一级页表PC,第二次读请求携带的第三标识用于表示第二级页表PD,第三次读请求携带的第三标识用于表示第三级页表PD。地址更新单元1则会根据页表更新源2下发用于描述虚拟地址和第一物理地址映射关系的页表信息,向内存地址管理单元3进行返回第一物理地址。同时地址更新单元1可以根据物理地址请求,记录内存地址管理单元3访问内存4的第二物理地址,并发起对第二物理地址进行写操作,写数据可以来自页表更新源2的第一物理地址。这样页表更新源2的页表信息,会同步到内存4和内存地址管理单元3。Among them, according to the working process of the memory address management unit 3, assuming that the multi-level page table is a three-level page table, the memory address management unit 3 can send read requests carrying the third identifier to the address update unit 1 in sequence. For example, the third identifier carried by the first read request is used to represent the first-level page table PC, the third identifier carried by the second read request is used to represent the second-level page table PD, and the third identifier carried by the third read request is used to represent the third-level page table PD. The address update unit 1 will issue page table information for describing the mapping relationship between the virtual address and the first physical address according to the page table update source 2, and return the first physical address to the memory address management unit 3. At the same time, the address update unit 1 can record the second physical address of the memory 4 accessed by the memory address management unit 3 according to the physical address request, and initiate a write operation on the second physical address, and the write data can come from the first physical address of the page table update source 2. In this way, the page table information of the page table update source 2 will be synchronized to the memory 4 and the memory address management unit 3.

在一种可能的实现方式中,所述地址更新单元1响应于所述内存地址管理单元3发送的读请求包含第二标识,所述地址更新单元1将来自所述内存地址管理单元3的读请求透传至所述内存4,所述地址更新单元1将所述内存4响应所述读请求的返回结果透传至所述内存地址管理单元3,所述第二标识用于指示所述读请求的虚拟地址的来源类别为所述更新请求以外的其它类别请求。In one possible implementation, the address update unit 1 includes a second identifier in response to a read request sent by the memory address management unit 3, and the address update unit 1 transmits the read request from the memory address management unit 3 to the memory 4, and the address update unit 1 transmits the return result of the memory 4 in response to the read request to the memory address management unit 3, and the second identifier is used to indicate that the source category of the virtual address of the read request is a category request other than the update request.

这样,在内存地址管理单元3和内存4之间引入地址更新单元1,其作用是为了识别内存地址管理单元3向内存4发送的读请求,如果是包含第二标识的读请求,说明是普通的读请求,该读请求的虚拟地址的来源类别为更新请求以外的其它类别请求,地址更新单元1可以对携带第二标识的读请求放行,将来自内存地址管理单元3的读请求透传至内存4,让其正常进行读内存4操作;如果读请求包含第一标识,说明与是页表更新相关的读请求,地址更新单元1可以对其进行拦截。地址更新单元1不仅提高了地址更新效率,而且不会对内存地址管理单元3和内存4之间与地址更新无关的操作产生影响。In this way, an address update unit 1 is introduced between the memory address management unit 3 and the memory 4, and its function is to identify the read request sent by the memory address management unit 3 to the memory 4. If it is a read request containing the second identifier, it means it is an ordinary read request, and the source category of the virtual address of the read request is other category requests other than the update request. The address update unit 1 can release the read request carrying the second identifier, and pass the read request from the memory address management unit 3 to the memory 4, so that it can perform the memory 4 read operation normally; if the read request contains the first identifier, it means it is a read request related to the page table update, and the address update unit 1 can intercept it. The address update unit 1 not only improves the address update efficiency, but also does not affect the operations between the memory address management unit 3 and the memory 4 that are not related to the address update.

其中,内存地址管理单元3向地址更新单元1发送读请求时,包含的第一标识或第二标识,可以用以区分读请求是否是与页表更新相关请求。进一步,读请求还可以包括第三标识,用于指示读请求是哪一级的页表更新请求。本公开对第一标识~第三标识的具体形式不作限制。Among them, when the memory address management unit 3 sends a read request to the address update unit 1, the first identifier or the second identifier included can be used to distinguish whether the read request is a request related to the page table update. Further, the read request can also include a third identifier to indicate which level of page table update request the read request is. The present disclosure does not limit the specific forms of the first identifier to the third identifier.

综上所述,本公开实施例的地址更新装置可以包括:地址更新单元1、页表更新源2、内存地址管理单元3、内存4,其中,页表更新源2可以连接内存地址管理单元3及地址更新单元1,地址更新单元1连接于内存地址管理单元3和内存4之间。所述地址更新单元1接收来自所述页表更新源2的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;所述地址更新单元1根据所述更新请求携带的所述虚拟地址,生成第一标识;所述地址更新单元1向所述内存地址管理单元3发送携带有所述第一标识和所述虚拟地址的第一虚拟地址请求;所述内存地址管理单元3根据所述第一虚拟地址请求生成用于访问所述内存4的读请求,该读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求,以便地址更新单元1可以根据第一标识来拦截携带有第一标识的读请求,并向所述内存地址管理单元3发送所述第一物理地址,以实现所述内存地址管理单元3的更新;所述地址更新单元1向页表更新源2发送物理地址请求,以便从所述页表更新源2获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存4中第二物理地址指示的存储位置,以实现所述内存4的更新;然后,所述地址更新单元1向所述页表更新源2反馈更新结果,所述更新结果用于表征所述地址更新单元1完成所述内存4和所述内存地址管理单元3的更新。In summary, the address updating device of the embodiment of the present disclosure may include: an address updating unit 1, a page table update source 2, a memory address management unit 3, and a memory 4, wherein the page table update source 2 may be connected to the memory address management unit 3 and the address updating unit 1, and the address updating unit 1 is connected between the memory address management unit 3 and the memory 4. The address updating unit 1 receives an update request from the page table update source 2, the update request including a virtual address and a first physical address corresponding to the virtual address; the address updating unit 1 generates a first identifier according to the virtual address carried by the update request; the address updating unit 1 sends a first virtual address request carrying the first identifier and the virtual address to the memory address management unit 3; the memory address management unit 3 generates a read request for accessing the memory 4 according to the first virtual address request, the read request including the virtual address and the first identifier, the first identifier being used to indicate that the source category of the virtual address is the update request, so that the address updating unit 1 can A read request carrying a first identifier is intercepted according to the first identifier, and the first physical address is sent to the memory address management unit 3 to update the memory address management unit 3; the address update unit 1 sends a physical address request to the page table update source 2 to obtain the second physical address from the page table update source 2, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory 4 to update the memory 4; then, the address update unit 1 feeds back the update result to the page table update source 2, and the update result is used to indicate that the address update unit 1 completes the update of the memory 4 and the memory address management unit 3.

更新完成后,页表更新源2就可以向所述内存地址管理单元3发送携带有虚拟地址和第二标识的第二虚拟地址请求,从所述内存地址管理单元3的缓存中读取所述第二虚拟地址请求中的虚拟地址对应的第一物理地址,所述第二标识用于指示所述虚拟地址的来源类别为所述更新请求以外的其它类别请求。After the update is completed, the page table update source 2 can send a second virtual address request carrying the virtual address and the second identifier to the memory address management unit 3, and read the first physical address corresponding to the virtual address in the second virtual address request from the cache of the memory address management unit 3. The second identifier is used to indicate that the source category of the virtual address is other category requests other than the update request.

这样,对于硬件要更新页表的场景,对比相关技术中先通过软硬件接口通知软件如何分配页表,然后由软件将页表信息写入内存4,再通知内存地址管理单元3重新获取页表信息。相关技术中的这个流程因为涉及到软硬件之间的同步,访问内存,其所消耗的时间过大,进而会影响处理器的性能。而在本公开实施例的地址更新装置中,通过引入地址更新单元1,由作为硬件的地址更新单元1直接更新内存4中的页表信息,以及内存地址管理单元3的页表信息,减少系统运行中的软硬件交互(地址更新单元1经由页表更新源2获取由硬件发起的如何分配页表的更新请求),简化了页表更新流程,提高了系统运行效率。In this way, for the scenario where the hardware needs to update the page table, compared with the related art, the software is first notified through the software-hardware interface how to allocate the page table, and then the software writes the page table information into the memory 4, and then notifies the memory address management unit 3 to re-acquire the page table information. This process in the related art involves synchronization between software and hardware, and accessing the memory, which consumes too much time, thereby affecting the performance of the processor. In the address update device of the embodiment of the present disclosure, by introducing the address update unit 1, the address update unit 1 as hardware directly updates the page table information in the memory 4 and the page table information of the memory address management unit 3, thereby reducing the software-hardware interaction during system operation (the address update unit 1 obtains the update request on how to allocate the page table initiated by the hardware via the page table update source 2), simplifying the page table update process, and improving the system operation efficiency.

可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

此外,本公开还提供了地址更新方法、处理器、芯片、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种地址更新方案,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides an address update method, a processor, a chip, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any address update scheme provided by the present disclosure. The corresponding technical scheme and description refer to the corresponding records in the method part and will not be repeated here.

图3示出根据本公开实施例的地址更新方法的示意图,如图3所示,所述方法应用于所述地址更新装置,所述地址更新装置包括:地址更新单元1、页表更新源2、内存地址管理单元3、内存4;所述方法包括:在步骤S31中,所述地址更新单元1接收来自所述页表更新源2的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;在步骤S32中,所述地址更新单元1根据获取的更新请求,更新所述内存4和所述内存地址管理单元3分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。Figure 3 shows a schematic diagram of the address updating method according to an embodiment of the present disclosure. As shown in Figure 3, the method is applied to the address updating device, and the address updating device includes: an address updating unit 1, a page table update source 2, a memory address management unit 3, and a memory 4; the method includes: in step S31, the address updating unit 1 receives an update request from the page table update source 2, and the update request includes a virtual address and a first physical address corresponding to the virtual address; in step S32, the address updating unit 1 updates the page table information corresponding to the memory 4 and the memory address management unit 3 respectively according to the obtained update request, and the page table information is used to describe the mapping relationship between the virtual address and the first physical address.

在一种可能的实现方式中,步骤S32可包括:所述地址更新单元1根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元3发送携带所述虚拟地址的第一虚拟地址请求;所述内存地址管理单元3根据所述第一虚拟地址请求生成用于访问所述内存4的读请求;所述地址更新单元1拦截所述读请求,并向所述内存地址管理单元3发送所述第一物理地址;所述地址更新单元1从所述页表更新源2获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存4中第二物理地址指示的存储位置。In a possible implementation, step S32 may include: the address update unit 1 sends a first virtual address request carrying the virtual address to the memory address management unit 3 according to the virtual address carried by the update request; the memory address management unit 3 generates a read request for accessing the memory 4 according to the first virtual address request; the address update unit 1 intercepts the read request and sends the first physical address to the memory address management unit 3; the address update unit 1 obtains a second physical address from the page table update source 2, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address to the storage location indicated by the second physical address in the memory 4.

在一种可能的实现方式中,步骤S32可包括:所述地址更新单元1等待所述页表更新源2发送更新请求,并根据在先获取的未处理的更新请求,生成待更新页表信息;所述地址更新单元1拦截来自所述内存地址管理单元3的读请求,所述读请求用于访问所述内存4;所述地址更新单元1对所述读请求与所述待更新页表信息进行比对,得到比对结果;所述地址更新单元1响应于所述比对结果指示所述读请求与所述待更新页表信息中存在相同的虚拟地址,更新所述待更新页表信息以及所述内存4和所述内存地址管理单元3分别对应的页表信息。In a possible implementation, step S32 may include: the address update unit 1 waits for the page table update source 2 to send an update request, and generates page table information to be updated based on the previously obtained and unprocessed update request; the address update unit 1 intercepts a read request from the memory address management unit 3, and the read request is used to access the memory 4; the address update unit 1 compares the read request with the page table information to be updated to obtain a comparison result; the address update unit 1 updates the page table information to be updated and the page table information corresponding to the memory 4 and the memory address management unit 3 in response to the comparison result indicating that the read request and the page table information to be updated have the same virtual address.

在一种可能的实现方式中,所述方法还包括:所述地址更新单元1向所述页表更新源2反馈更新结果,所述更新结果用于表征所述地址更新单元1完成所述内存4和所述内存地址管理单元3的更新。In a possible implementation, the method further includes: the address update unit 1 feeds back an update result to the page table update source 2 , wherein the update result is used to indicate that the address update unit 1 completes the update of the memory 4 and the memory address management unit 3 .

在一种可能的实现方式中,所述地址更新单元1根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元3发送携带所述虚拟地址的第一虚拟地址请求,包括:所述地址更新单元1向所述内存地址管理单元3发送携带有第一标识和所述虚拟地址的第一虚拟地址请求;所述读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求;所述地址更新单元1拦截所述读请求,包括:所述地址更新单元1响应于所述读请求包含所述第一标识,拦截所述读请求。In a possible implementation, the address update unit 1 sends a first virtual address request carrying the virtual address to the memory address management unit 3 according to the virtual address carried in the update request, including: the address update unit 1 sends a first virtual address request carrying a first identifier and the virtual address to the memory address management unit 3; the read request includes the virtual address and the first identifier, and the first identifier is used to indicate that the source category of the virtual address is the update request; the address update unit 1 intercepts the read request, including: the address update unit 1 intercepts the read request in response to the read request containing the first identifier.

在一种可能的实现方式中,在所述页表信息包括多级页表的情况下,所述地址更新单元1从所述页表更新源2获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存4中第二物理地址指示的存储位置,包括:所述地址更新单元1向所述页表更新源2发送物理地址请求,物理地址请求包括用于指示页表级数的第三标识;所述地址更新单元1接收所述页表更新源2反馈的第二物理地址,所述第二物理地址与所述第三标识对应;所述地址更新单元1根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存4中所述第二物理地址指示的存储位置。In one possible implementation, when the page table information includes a multi-level page table, the address update unit 1 obtains a second physical address from the page table update source 2, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory 4, including: the address update unit 1 sends a physical address request to the page table update source 2, and the physical address request includes a third identifier for indicating the number of page table levels; the address update unit 1 receives the second physical address fed back by the page table update source 2, and the second physical address corresponds to the third identifier; the address update unit 1 writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory 4 according to the second physical address corresponding to each third identifier.

在一种可能的实现方式中,所述方法还包括:所述内存地址管理单元3接收来自所述页表更新源2的第二虚拟地址请求,所述第二虚拟地址请求携带虚拟地址和第二标识;响应于所述内存地址管理单元3根据所述第二标识识别出所述虚拟地址的来源类别为所述更新请求以外的其它类别请求,所述内存地址管理单元3将所述虚拟地址对应的第一物理地址返回所述页表更新源2。In a possible implementation, the method also includes: the memory address management unit 3 receives a second virtual address request from the page table update source 2, the second virtual address request carries a virtual address and a second identifier; in response to the memory address management unit 3 identifying, based on the second identifier, that the source category of the virtual address is a request of a category other than the update request, the memory address management unit 3 returns the first physical address corresponding to the virtual address to the page table update source 2.

在一种可能的实现方式中,所述方法还包括:所述地址更新单元1响应于所述内存地址管理单元3发送的读请求包含第二标识,将来自所述内存地址管理单元3的读请求透传至所述内存4;所述地址更新单元1将所述内存4响应所述读请求的返回结果透传至所述内存地址管理单元3,所述第二标识用于指示所述读请求的虚拟地址的来源类别为所述更新请求以外的其它类别请求。In a possible implementation, the method also includes: the address update unit 1 transmits the read request from the memory address management unit 3 to the memory 4 in response to the read request sent by the memory address management unit 3 including a second identifier; the address update unit 1 transmits the return result of the memory 4 in response to the read request to the memory address management unit 3, and the second identifier is used to indicate that the source category of the virtual address of the read request is a category request other than the update request.

在一种可能的实现方式中,所述方法还包括:所述内存地址管理单元3收到所述第一虚拟地址请求,在所述内存地址管理单元3的缓存中查询所述第一虚拟地址请求携带的虚拟地址;在所述内存地址管理单元3的缓存中未查询到所述虚拟地址的情况下,在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间;或者,在所述内存地址管理单元3的缓存中查询到所述虚拟地址的情况下,在缓存中清空所述虚拟地址的关联空间,并在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间。In a possible implementation, the method also includes: the memory address management unit 3 receives the first virtual address request, and queries the virtual address carried by the first virtual address request in the cache of the memory address management unit 3; if the virtual address is not found in the cache of the memory address management unit 3, space for storing page table information is allocated in the cache to the first virtual address request; or, if the virtual address is found in the cache of the memory address management unit 3, the associated space of the virtual address is cleared in the cache, and space for storing page table information is allocated in the cache to the first virtual address request.

在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

本公开实施例还提出一种处理器,所述处理器包括如上文所述的地址更新装置。The embodiment of the present disclosure further provides a processor, which includes the address updating device as described above.

本公开实施例还提出一种芯片,所述芯片包括如上文所述的处理器。The embodiment of the present disclosure also provides a chip, which includes the processor as described above.

本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。The embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

电子设备可以被提供为终端、服务器或其它形态的设备,例如用户设备(UserEquipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(PersonalDigital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。The electronic device can be provided as a terminal, a server or other form of device, such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.

图4示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器或终端设备。参照图4,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,任一处理器可包括如上文所述的地址更新装置,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG4 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Referring to FIG4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, any of which may include an address updating device as described above, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each of which corresponds to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows ServerTM),苹果公司推出的基于图形用户界面操作系统(Mac OS XTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Microsoft's server operating system (Windows Server ), Apple's graphical user interface-based operating system (Mac OS X ), a multi-user multi-process computer operating system (Unix ), a free and open source Unix-like operating system (Linux ), an open source Unix-like operating system (FreeBSD ), or the like.

在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, a method and/or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing/processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device.

用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Various aspects of the present disclosure are described herein with reference to the flowcharts and/or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and/or block diagram and the combination of each box in the flowchart and/or block diagram can be implemented by computer-readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1.一种地址更新装置,其特征在于,所述地址更新装置包括:地址更新单元、页表更新源、内存地址管理单元、内存;1. An address updating device, characterized in that the address updating device comprises: an address updating unit, a page table updating source, a memory address management unit, and a memory; 所述地址更新单元接收来自所述页表更新源的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;The address updating unit receives an update request from the page table update source, wherein the update request includes a virtual address and a first physical address corresponding to the virtual address; 所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。The address updating unit updates page table information corresponding to the memory and the memory address management unit respectively according to the acquired update request, wherein the page table information is used to describe a mapping relationship between the virtual address and the first physical address. 2.根据权利要求1所述的地址更新装置,其特征在于,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:2. The address updating device according to claim 1, wherein the address updating unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the acquired update request, comprising: 所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求;The address updating unit sends a first virtual address request carrying the virtual address to the memory address management unit according to the virtual address carried in the update request; 所述内存地址管理单元根据所述第一虚拟地址请求生成用于访问所述内存的读请求;The memory address management unit generates a read request for accessing the memory according to the first virtual address request; 所述地址更新单元拦截所述读请求,并向所述内存地址管理单元发送所述第一物理地址;The address updating unit intercepts the read request and sends the first physical address to the memory address management unit; 所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置。The address updating unit obtains a second physical address from the page table update source, and writes page table information describing a mapping relationship between the virtual address and the first physical address into a storage location indicated by the second physical address in the memory. 3.根据权利要求1所述的地址更新装置,其特征在于,所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,包括:3. The address updating device according to claim 1, wherein the address updating unit updates the page table information corresponding to the memory and the memory address management unit respectively according to the acquired update request, comprising: 所述地址更新单元等待所述页表更新源发送更新请求,并根据在先获取的未处理的更新请求,生成待更新页表信息;The address update unit waits for the page table update source to send an update request, and generates the page table information to be updated according to the previously obtained unprocessed update request; 所述地址更新单元拦截来自所述内存地址管理单元的读请求,所述读请求用于访问所述内存;The address updating unit intercepts a read request from the memory address management unit, wherein the read request is used to access the memory; 所述地址更新单元对所述读请求与所述待更新页表信息进行比对,得到比对结果;The address updating unit compares the read request with the page table information to be updated to obtain a comparison result; 所述地址更新单元响应于所述比对结果指示所述读请求与所述待更新页表信息中存在相同的虚拟地址,更新所述待更新页表信息以及所述内存和所述内存地址管理单元分别对应的页表信息。In response to the comparison result indicating that the read request and the page table information to be updated have the same virtual address, the address update unit updates the page table information to be updated and the page table information corresponding to the memory and the memory address management unit respectively. 4.根据权利要求2或3所述的地址更新装置,其特征在于,所述地址更新单元还用于向所述页表更新源反馈更新结果,所述更新结果用于表征所述地址更新单元完成所述内存和所述内存地址管理单元的更新。4. The address updating device according to claim 2 or 3 is characterized in that the address updating unit is also used to feed back an update result to the page table update source, and the update result is used to indicate that the address updating unit completes the update of the memory and the memory address management unit. 5.根据权利要求2所述的地址更新装置,其特征在于,所述地址更新单元根据所述更新请求携带的所述虚拟地址,向所述内存地址管理单元发送携带所述虚拟地址的第一虚拟地址请求,包括:5. The address updating device according to claim 2, wherein the address updating unit sends a first virtual address request carrying the virtual address to the memory address management unit according to the virtual address carried in the update request, comprising: 所述地址更新单元向所述内存地址管理单元发送携带有第一标识和所述虚拟地址的第一虚拟地址请求;The address updating unit sends a first virtual address request carrying a first identifier and the virtual address to the memory address management unit; 所述读请求包括所述虚拟地址和所述第一标识,所述第一标识用于指示所述虚拟地址的来源类别为所述更新请求;The read request includes the virtual address and the first identifier, where the first identifier is used to indicate that the source category of the virtual address is the update request; 所述地址更新单元拦截所述读请求,包括:The address updating unit intercepts the read request, comprising: 所述地址更新单元响应于所述读请求包含所述第一标识,拦截所述读请求。In response to the read request containing the first identifier, the address update unit intercepts the read request. 6.根据权利要求2所述的地址更新装置,其特征在于,在所述页表信息包括多级页表的情况下,所述地址更新单元从所述页表更新源获取第二物理地址,将用于描述所述虚拟地址与所述第一物理地址映射关系的页表信息写入所述内存中第二物理地址指示的存储位置,包括:6. The address updating device according to claim 2, characterized in that, when the page table information includes a multi-level page table, the address updating unit obtains a second physical address from the page table update source, and writes the page table information used to describe the mapping relationship between the virtual address and the first physical address into the storage location indicated by the second physical address in the memory, comprising: 所述地址更新单元向所述页表更新源发送物理地址请求,物理地址请求包括用于指示页表级数的第三标识;The address updating unit sends a physical address request to the page table update source, where the physical address request includes a third identifier for indicating a page table level; 所述地址更新单元接收所述页表更新源反馈的第二物理地址,所述第二物理地址与所述第三标识对应;The address updating unit receives a second physical address fed back by the page table update source, where the second physical address corresponds to the third identifier; 所述地址更新单元根据每个第三标识对应的第二物理地址,将所述第三标识指示级数的页表信息写入所述内存中所述第二物理地址指示的存储位置。The address updating unit writes the page table information of the level indicated by the third identifier into the storage location indicated by the second physical address in the memory according to the second physical address corresponding to each third identifier. 7.根据权利要求2或3所述的地址更新装置,其特征在于,所述内存地址管理单元接收来自所述页表更新源的第二虚拟地址请求,所述第二虚拟地址请求携带虚拟地址和第二标识;7. The address updating device according to claim 2 or 3, characterized in that the memory address management unit receives a second virtual address request from the page table update source, the second virtual address request carries a virtual address and a second identifier; 响应于所述内存地址管理单元根据所述第二标识识别出所述虚拟地址的来源类别为所述更新请求以外的其它类别请求,所述内存地址管理单元将所述虚拟地址对应的第一物理地址返回所述页表更新源。In response to the memory address management unit identifying, according to the second identifier, that the source category of the virtual address is a request of another category other than the update request, the memory address management unit returns the first physical address corresponding to the virtual address to the page table update source. 8.根据权利要求2或3所述的地址更新装置,其特征在于,所述地址更新单元响应于所述内存地址管理单元发送的读请求包含第二标识,将来自所述内存地址管理单元的读请求透传至所述内存;8. The address updating device according to claim 2 or 3, characterized in that the address updating unit transmits the read request from the memory address management unit to the memory in response to the read request sent by the memory address management unit containing the second identifier; 所述地址更新单元将所述内存响应所述读请求的返回结果透传至所述内存地址管理单元,所述第二标识用于指示所述读请求的虚拟地址的来源类别为所述更新请求以外的其它类别请求。The address update unit transparently transmits the return result of the memory in response to the read request to the memory address management unit, and the second identifier is used to indicate that the source category of the virtual address of the read request is other category requests other than the update request. 9.根据权利要求2所述的地址更新装置,其特征在于,所述内存地址管理单元收到所述第一虚拟地址请求,在所述内存地址管理单元的缓存中查询所述第一虚拟地址请求携带的虚拟地址;9. The address updating device according to claim 2, wherein the memory address management unit receives the first virtual address request and searches the cache of the memory address management unit for the virtual address carried in the first virtual address request; 在所述内存地址管理单元的缓存中未查询到所述虚拟地址的情况下,在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间;或者,In the case where the virtual address is not found in the cache of the memory address management unit, allocating space for storing page table information in the cache for the first virtual address request; or 在所述内存地址管理单元的缓存中查询到所述虚拟地址的情况下,在缓存中清空所述虚拟地址的关联空间,并在所述缓存中为所述第一虚拟地址请求分配用于存储页表信息的空间。When the virtual address is found in the cache of the memory address management unit, the associated space of the virtual address is cleared in the cache, and space for storing page table information is allocated in the cache for the first virtual address request. 10.一种地址更新方法,其特征在于,所述方法应用于所述地址更新装置,所述地址更新装置包括:地址更新单元、页表更新源、内存地址管理单元、内存;10. An address updating method, characterized in that the method is applied to the address updating device, the address updating device comprising: an address updating unit, a page table updating source, a memory address management unit, and a memory; 所述方法包括:The method comprises: 所述地址更新单元接收来自所述页表更新源的更新请求,所述更新请求包括虚拟地址,以及所述虚拟地址对应的第一物理地址;The address updating unit receives an update request from the page table update source, wherein the update request includes a virtual address and a first physical address corresponding to the virtual address; 所述地址更新单元根据获取的更新请求,更新所述内存和所述内存地址管理单元分别对应的页表信息,所述页表信息用于描述所述虚拟地址与所述第一物理地址的映射关系。The address updating unit updates page table information corresponding to the memory and the memory address management unit respectively according to the acquired update request, wherein the page table information is used to describe a mapping relationship between the virtual address and the first physical address. 11.一种处理器,其特征在于,所述处理器包括如权利要求1至9所述的地址更新装置。11. A processor, characterized in that the processor comprises the address updating device according to claims 1 to 9. 12.一种芯片,其特征在于,所述芯片包括如权利要求11所述的处理器。12. A chip, characterized in that the chip comprises the processor according to claim 11.
CN202410737193.2A 2024-06-07 2024-06-07 Address updating device and method, processor and chip Active CN118760627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410737193.2A CN118760627B (en) 2024-06-07 2024-06-07 Address updating device and method, processor and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410737193.2A CN118760627B (en) 2024-06-07 2024-06-07 Address updating device and method, processor and chip

Publications (2)

Publication Number Publication Date
CN118760627A true CN118760627A (en) 2024-10-11
CN118760627B CN118760627B (en) 2025-06-24

Family

ID=92942615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410737193.2A Active CN118760627B (en) 2024-06-07 2024-06-07 Address updating device and method, processor and chip

Country Status (1)

Country Link
CN (1) CN118760627B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119960705A (en) * 2025-04-11 2025-05-09 超睿科技(上海)有限公司 Micro-operation extraction method, device and electronic device based on physical memory protection

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177332A1 (en) * 2002-02-25 2003-09-18 Noriyuki Shiota Information processing apparatus in which processes can reduce overhead of memory access and efficiently share memory
WO2016082191A1 (en) * 2014-11-28 2016-06-02 华为技术有限公司 File access method and apparatus
CN112363960A (en) * 2020-10-12 2021-02-12 北京大学 Novel memory virtualization method and system based on shadow page table mechanism
CN114328295A (en) * 2021-11-23 2022-04-12 平头哥(上海)半导体技术有限公司 Storage management apparatus, processor, related apparatus and related method
US20220121383A1 (en) * 2020-10-21 2022-04-21 Montage Technology Co., Ltd. Computing system and method for sharing device memories of different computing devices
CN115422098A (en) * 2022-02-15 2022-12-02 摩尔线程智能科技(北京)有限责任公司 GPU memory access adaptive optimization method and device based on extended page table
US20230018412A1 (en) * 2020-04-13 2023-01-19 Red Hat, Inc. Reverse shadow page tables for nested virtual machines
CN116681578A (en) * 2023-08-02 2023-09-01 南京砺算科技有限公司 Memory management method, graphic processing unit, storage medium and terminal equipment
CN116991762A (en) * 2023-08-15 2023-11-03 飞腾信息技术有限公司 Method for updating page table attribute, processor and chip
CN117785740A (en) * 2022-09-21 2024-03-29 北京罗克维尔斯科技有限公司 Memory page table update method, device, electronic device and storage medium
WO2024073864A1 (en) * 2022-10-02 2024-04-11 Intel Corporation Distributed address translation services

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177332A1 (en) * 2002-02-25 2003-09-18 Noriyuki Shiota Information processing apparatus in which processes can reduce overhead of memory access and efficiently share memory
WO2016082191A1 (en) * 2014-11-28 2016-06-02 华为技术有限公司 File access method and apparatus
US20230018412A1 (en) * 2020-04-13 2023-01-19 Red Hat, Inc. Reverse shadow page tables for nested virtual machines
CN112363960A (en) * 2020-10-12 2021-02-12 北京大学 Novel memory virtualization method and system based on shadow page table mechanism
US20220121383A1 (en) * 2020-10-21 2022-04-21 Montage Technology Co., Ltd. Computing system and method for sharing device memories of different computing devices
CN114328295A (en) * 2021-11-23 2022-04-12 平头哥(上海)半导体技术有限公司 Storage management apparatus, processor, related apparatus and related method
CN115422098A (en) * 2022-02-15 2022-12-02 摩尔线程智能科技(北京)有限责任公司 GPU memory access adaptive optimization method and device based on extended page table
CN117785740A (en) * 2022-09-21 2024-03-29 北京罗克维尔斯科技有限公司 Memory page table update method, device, electronic device and storage medium
WO2024073864A1 (en) * 2022-10-02 2024-04-11 Intel Corporation Distributed address translation services
CN116681578A (en) * 2023-08-02 2023-09-01 南京砺算科技有限公司 Memory management method, graphic processing unit, storage medium and terminal equipment
CN116991762A (en) * 2023-08-15 2023-11-03 飞腾信息技术有限公司 Method for updating page table attribute, processor and chip

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
EDUARDO H.M. CRUZ ET AL.: "Optimizing Memory Locality Using a Locality-Aware Page Table", 《IEEEXPLORE》, 4 December 2014 (2014-12-04) *
朱贺飞;陆超;周晓方;闵昊;周电;: "针对嵌入式系统的存储器管理单元设计", 计算机工程与应用, no. 01, 1 January 2007 (2007-01-01) *
王涛: "基于分布式异构内存池的虚拟内存换页机制", 《万方数据库》, 5 July 2023 (2023-07-05) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119960705A (en) * 2025-04-11 2025-05-09 超睿科技(上海)有限公司 Micro-operation extraction method, device and electronic device based on physical memory protection

Also Published As

Publication number Publication date
CN118760627B (en) 2025-06-24

Similar Documents

Publication Publication Date Title
WO2023098032A1 (en) Memory space extension method and apparatus, electronic device, and storage medium
CN111124270B (en) Method, apparatus and computer program product for cache management
CN105518631B (en) EMS memory management process, device and system and network-on-chip
CN103412822B (en) Operation Nonvolatile memory and the method and relevant apparatus of data manipulation
US11586388B2 (en) Method, device, and computer program product for managing storage system
CN110175174B (en) Data query method, device, equipment and storage medium
US10936499B2 (en) Method, device and computer programme product for storage management
CN106095698A (en) OO caching write, read method and device
CN117130663B (en) Instruction reading method, L2 instruction cache, electronic device and storage medium
CN115061955B (en) Processor, electronic device, address translation method and cache page table entry method
TWI863808B (en) Caching methods, device, electronic equipment and computer readable storage media
TW202349214A (en) Address translation prefetching for input/output devices
CN118760627A (en) Address updating device and method, processor and chip
CN116644006A (en) Memory page management method, system, device, equipment and computer medium
CN113806655A (en) Data processing method, device, electronic device and storage medium
CN119512719A (en) Memory resource access method, address translation method, device, equipment and medium
JP2018508894A (en) Method and device for accessing a data visitor directory in a multi-core system
CN115562871A (en) Memory allocation management method and device
JP2020194522A (en) Methods, devices, devices and media for processing data
CN119473938A (en) Task processing device and method, electronic device and computer readable storage medium
US11467766B2 (en) Information processing method, apparatus, device, and system
US12174749B2 (en) Page table manager
CN115080464B (en) Data processing method and data processing device
CN117271107A (en) Data processing method, device, electronic equipment and computer readable storage medium
CN117806526A (en) Data migration method, device, chip and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: B655, 4th Floor, Building 14, Cuiwei Zhongli, Haidian District, Beijing, 100036

Applicant after: Mole Thread Intelligent Technology (Beijing) Co.,Ltd.

Address before: 209, 2nd Floor, No. 31 Haidian Street, Haidian District, Beijing

Applicant before: Moore Threads Technology Co., Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant