A memory management circuit and a shared memory method

By designing memory management circuits in shared memory technology, including configuration management modules and multiple interface management circuits, the problem that the bandwidth of multiple data processing units cannot be guaranteed is solved, exclusive interface management of each data processing unit is realized, and the efficiency is improved Memory space utilization efficiency and performance.

CN114328309BActive Publication Date: 2024-10-29SHANGHAI XINZHENG ELECTRONICS TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111466188.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-10-29
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

In fields such as computer vision and natural language processing, the bandwidth of multiple data processing units in shared memory technology cannot be effectively guaranteed, resulting in performance bottlenecks caused by time-division multiplexing of memory space.

Method used

Design a memory management circuit, including a configuration management module, a memory core and multiple interface management circuits. The configuration management module is responsible for allocating the address space of each data processing unit to ensure that each data processing unit has an exclusive interface management circuit to realize data processing. Routing and conflict control, the memory core provides multiple memory access interfaces to meet the storage needs of different data processing units.

Benefits of technology

The bandwidth requirement of each data processing unit is guaranteed, the time-division multiplexing problem in the bus system is avoided, and the utilization efficiency and performance of the memory space are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328309B_ABST
    Figure CN114328309B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer storage technology, and provides a memory management circuit and a method for sharing memory, wherein the memory management circuit includes a configuration management module, a memory core, and a plurality of interface management circuits, and the configuration management module is responsible for the address space allocation of each external data processing unit, ensuring that each data processing unit can allocate the memory access space required by each data processing unit, and the memory access space of different data processing units can be flexibly allocated, and the memory core stores data and receives data requests from the interface management circuit, and multiple interface management circuits are configured to be connected to the external data processing units one by one, ensuring that each data processing unit can monopolize an interface management circuit. The memory management circuit provided by the present application can guarantee the bandwidth requirements of each data processing unit while sharing the memory space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer storage technology, and in particular to a memory management circuit and a method for sharing a memory. Background Art

[0002] Shared memory refers to a parallel architecture in which two or more data processing units share a main memory, and each data processing unit can store information in the main memory or retrieve information from it. The shared memory architecture allows several processors to share the address space of their memory, which can be better applied to various practical fields of large-scale computing and high-performance computing, such as computer vision and natural language processing.

[0003] In technical fields such as computer vision and natural language processing, convolutional neural networks have broad application prospects due to their hardware accelerators' high computing power, high computing efficiency and low computing power consumption. With the continuous development of neural network processors, different data processing units are needed to implement different functions, such as pre-processing units, post-processing units, convolution computing units and pooling units, etc., and the data required by different data processing units occupy different storage spaces, so it is crucial to share and manage these storage spaces.

[0004] In the prior art, when a data processing module is initiating a data request and communicating with the memory, other data processing modules are suspended. That is, the interface in the bus system is time-division multiplexed, and after sharing the memory space, the bandwidth of multiple data processing units cannot be guaranteed. Summary of the invention

[0005] The present application provides a memory management circuit and a shared memory method to solve the problem of existing shared memory technology that in a scenario with multiple data processing units, the space of the shared memory cannot guarantee the bandwidth requirement.

[0006] In a first aspect, the present application provides a memory management circuit, the memory management circuit comprising a configuration management module, a memory core and a plurality of interface management circuits, wherein the configuration management module is connected to a CPU via a bus, the memory core provides a plurality of memory access interfaces, and is connected to the interface management circuit via the memory access interfaces, and each of the interface management circuits is connected to an external data processing unit;

[0007] The configuration management module is responsible for allocating address space of each data processing unit;

[0008] The memory core is used to store data and receive data requests from the interface management circuit;

[0009] The interface management circuit is used to provide data routing and conflict control functions for the corresponding connected data processing units according to the allocated address space.

[0010] Optionally, the memory core includes multiple memory bodies, a cross switch matrix and memory IO, the memory bodies and the memory IO are connected through the cross switch matrix, and the cross switch matrix is ​​used to provide a fully connected cross matrix between all memory bodies and memory IO.

[0011] Optionally, the storage body is a unit inside the storage core responsible for data storage, and all storage bodies are uniformly addressed for external access, wherein each storage body can be controlled individually.

[0012] Optionally, when the configuration management module allocates the address space of each data processing unit, the address space of each storage body in the memory core is allocated to only one data processing unit.

[0013] Optionally, the memory IO is an external access interface provided by the memory core, and is connected to the interface management circuit in a one-to-one correspondence.

[0014] Optionally, the interface management circuit includes an address offset module, an address request module, a physical address generation module and a physical address request module;

[0015] The address request module is used to process the data request of the corresponding connected data processing unit;

[0016] The physical address generation module is used to generate a real physical space address according to the address space allocated by the configuration management module;

[0017] The physical address request module is used to send a data request to the memory core according to the real physical space address.

[0018] Optionally, the interface management circuit further includes a data return module, wherein the data return module is used to receive data returned by the memory core and return the data to a correspondingly connected data processing unit.

[0019] Optionally, the number of the interface management circuits can be flexibly configured to ensure that each data processing unit is individually connected to the interface management circuit.

[0020] A second aspect of the present application provides a method for sharing a memory, and the method for sharing a memory is applied to a memory management circuit provided in the first aspect of the present application, comprising:

[0021] The configuration management module configures the accessible space range of each data processing unit according to the instructions of the CPU to obtain the address space of each data processing unit;

[0022] Receive and process data requests from corresponding connected data processing units;

[0023] Generate a real physical space address according to the address space allocated by the corresponding connected data processing unit;

[0024] According to the real physical space address, a data request is sent to the memory core, and the memory core returns the corresponding data according to the physical space address.

[0025] Optionally, the configuration management module configures the accessible space range of each data processing unit according to the instruction of the CPU to obtain the address space of each data processing unit, including:

[0026] When allocating address space for a data processing unit, obtaining the allocation status of each memory bank in the memory core;

[0027] Unallocated storage bodies are screened, and one or more storage bodies are selected from the unallocated storage bodies to obtain the address space allocated by the data processing unit.

[0028] It can be seen from the above technical solutions that the present application provides a memory management circuit and a method for sharing memory, including a configuration management module, a memory core and multiple interface management circuits. The configuration management module is responsible for the address space allocation of each external data processing unit, ensuring that each data processing unit can allocate the memory access space it requires, and the memory access space of different data processing units can be flexibly allocated. The memory core stores data and receives data requests from the interface management circuit. By configuring multiple interface management circuits, they are connected one-to-one with external data processing units to ensure that each data processing unit can exclusively occupy an interface management circuit, instead of the interface being time-division multiplexed like other bus systems. The memory management circuit provided by the present application can guarantee the bandwidth requirements of each data processing unit while sharing the memory space. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 An example diagram of the connection between the memory management circuit and the data processing unit provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of the structure of a memory management circuit provided in an embodiment of the present application;

[0032] Figure 3A schematic diagram of the structure of a memory core provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of a fully connected crossbar matrix is ​​provided for the crossbar switch matrix provided in an embodiment of the present application;

[0034] Figure 5 A schematic diagram of the structure of the interface management circuit provided in the embodiment of the present application;

[0035] Figure 6 An exemplary diagram of the physical connection between the storage body and the memory IO provided in the embodiment of the present application;

[0036] Figure 7 An example diagram of an effective logical connection between a storage body and a memory IO provided in an embodiment of the present application;

[0037] Figure 8 Another example diagram of the effective logical connection between the storage body and the memory IO provided in the embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] See also Figure 1 , which is an example diagram of the connection between the memory management circuit and the data processing unit provided in an embodiment of the present application. In the application scenario of the present application, a shared memory is connected to multiple external data processing units to meet the sharing of storage space by different data processing units. In the prior art, multiple data processing units share the memory space, but the bandwidth of each data processing unit cannot be guaranteed. The memory management circuit provided by the present application realizes efficient management of storage space and storage bandwidth to meet the bandwidth requirements of each data processing unit.

[0040] See also Figure 2 The memory management circuit provided in the embodiment of the present application includes a configuration management module 100, a memory core 200 and multiple interface management circuits 300, wherein the configuration management module 100 is connected to the CPU through a bus, the memory core 200 provides multiple memory access interfaces, and is connected to the interface management circuit 300 through the memory access interfaces, and each of the interface management circuits 300 is connected to an external data processing unit.

[0041] The configuration management module 100 is responsible for allocating address space to each data processing unit; the memory core 200 is used to store data and receive data requests from the interface management circuit 300; the interface management circuit 300 is used to provide data routing and conflict control functions for the corresponding connected data processing unit according to the allocated address space.

[0042] In the embodiment of the present application, a plurality of interface management circuits 300 are provided, and the interface management circuits 300 are connected one-to-one with the external data processing units, wherein the number of interface management circuits 300 can be flexibly configured to ensure that each data processing unit can exclusively occupy one interface management circuit. When the data processing unit executes the data processing task assigned by the CPU, different data processing units can independently access the memory at the same time through their correspondingly connected interface management circuits 300 without affecting each other, and the export bandwidth of each interface management circuit 300 is used to ensure the bandwidth requirement of each data processing unit.

[0043] join Figure 3 The memory core 200 provided in the embodiment of the present application includes a plurality of memory banks 201, a cross bar 202 and a memory IO (input output unit) 203, wherein the memory banks 201 and the memory IO 203 are connected via the cross bar 202.

[0044] The memory body 201 is a unit responsible for data storage inside the memory core 200, and improves the read and write functions externally. All memory bodies are uniformly addressed for external access, wherein each memory body 201 can be controlled individually. The memory IO 203 is an external access interface provided by the memory core 200, and is connected to the interface management circuit 300 in a one-to-one correspondence, so as to provide a data transmission channel for the correspondingly connected data processing unit through the interface management circuit 300.

[0045] The crossbar switch matrix 202 is used to provide a fully connected crossbar matrix between all storage banks 201 and memory IO 203. Figure 4, a schematic diagram of a fully connected cross matrix is ​​provided for the cross matrix provided in the embodiment of the present application, the cross matrix 202 provides a flexible data routing function, and through the setting of the cross matrix 202, each memory IO 203 can be connected to any memory bank 201, and access the memory space of any memory bank 201. For example, the first memory IO can be connected to any memory bank of the first memory bank (bank0), the second memory bank (bank1), the third memory bank (bank2) and the fourth memory bank (bank3), and can also be connected to multiple memory banks at the same time; the second memory IO can be connected to any memory bank of the first memory bank (bank0), the second memory bank (bank1), the third memory bank (bank2) and the fourth memory bank (bank3), and can also be connected to multiple memory banks at the same time.

[0046] The first memory IO may be any memory IO among the multiple memory IOs 203, and is referred to as the first memory IO, which is only used to distinguish it from the second memory IO that appears later, and the first and the second have no other practical meanings.

[0047] Among them, the first storage bank (bank0), the second storage bank (bank1), the third storage bank (bank2) or the fourth storage bank (bank3) can be any storage bank among the multiple storage banks 201, which is only used to distinguish between the storage banks and has no other practical meaning.

[0048] See also Figure 5 , is a structural diagram of the interface management circuit provided in an embodiment of the present application, the interface management circuit 300 includes an address offset module 301, an address request module 302, a physical address generation module 303 and a physical address request module 304, the address request module 302 is used to process the data request of the corresponding connected data processing unit, the physical address generation module 303 is used to generate a real physical space address according to the address space allocated by the configuration management module 100, and the physical address request module 304 is used to send a data request to the memory core 200 according to the real physical space address.

[0049] The interface management circuit 300 further includes a data return module, which is used to receive data returned by the memory core 200 and return the data to a correspondingly connected data processing unit.

[0050] When the configuration management module 100 of the embodiment of the present application allocates the address space of each data processing unit, the address space of each storage body 201 in the memory core 200 is allocated to only one data processing unit. For example, the space of the first storage body is allocated to the first data processing unit. Then, when allocating space to other data processing units, such as the second data processing unit, the space of the first storage body will not be allocated again. In the physical address generation stage, the physical address generation module 303 generates a real physical space address according to the address space allocated by the configuration management module 100. The real physical space address will only be the space address in the allocated storage body. Through the physical address generation module 303, only some connections are activated as logically valid connections to generate valid storage body addresses, which effectively prevents bank conflicts.

[0051] In order to more clearly illustrate the execution method process of the memory management circuit provided in this embodiment and the beneficial effects achieved, this embodiment further provides a method for sharing a memory, which is executed by the memory management circuit provided in the above embodiment. The method for sharing a memory provided in this embodiment includes the following steps:

[0052] S1. The configuration management module configures the accessible space range of each data processing unit according to the instructions of the CPU to obtain the address space of each data processing unit.

[0053] S2. Receive and process data requests from corresponding connected data processing units.

[0054] S3. Generate a real physical space address according to the address space allocated by the corresponding connected data processing unit.

[0055] S4. Send a data request to the memory core according to the real physical space address, and the memory core returns the corresponding data according to the physical space address.

[0056] In a preferred embodiment, the shared memory method provided by the present application obtains the allocation status of each storage body in the memory core, filters the unallocated storage bodies, and selects one or more storage bodies from the unallocated storage bodies to obtain the address space allocated to the data processing unit when allocating address space to a data processing unit. The space of multiple storage bodies can be allocated to the same data processing unit at the same time, but the space of each storage body is only allocated to a unique data processing unit.

[0057] See also Figure 6, is an example diagram of the physical connection between the storage body and the memory IO provided in the embodiment of the present application. The memory core in the figure has 4 storage bodies (banks) and two external interfaces, namely, memory IOs. Each bank has a storage space of 4KB. Through the crossbar switch matrix, the connection between the storage body and the memory IO is as follows: Figure 6 As shown, each memory IO can be connected to any bank.

[0058] In one embodiment, the memory IO0 is connected to the first data processing unit through an interface management circuit, and the memory IO1 is connected to the second data processing unit through another interface management circuit. The above storage space is allocated, and the space of bank0, bank1 and bank2 is allocated to the first data processing unit, and the space of bank3 is allocated to the second data processing unit. The configuration management module configures the above allocation information, and then through the interface management circuit, only some connections are activated as valid connections, that is, in the physical address generation stage, only the bank address of the valid connection can be generated, and the logical valid connection is as follows: Figure 7 As shown, IO0 is allocated to 12KB space, IO1 is allocated to 4KB space, and IO0 is allocated to 3 banks, and IO1 is allocated to 1 bank.

[0059] In one embodiment, the memory IO0 is connected to the first data processing unit through an interface management circuit, and the memory IO1 is connected to the second data processing unit through another interface management circuit. The above storage space is allocated, and the space of bank0, bank1 and bank2 is allocated to the first data processing unit, and the space of bank3 is allocated to the second data processing unit. The configuration management module configures the above allocation information, and then through the interface management circuit, only some connections are activated as valid connections, that is, in the physical address generation stage, only the bank address of the valid connection can be generated, and the logical valid connection is as follows: Figure 7 As shown, IO0 is allocated to 12KB space, IO1 is allocated to 4KB space, and IO0 is allocated to 3 banks, and IO1 is allocated to 1 bank.

[0060] In another embodiment, the memory IO0 is connected to the first data processing unit through an interface management circuit, and the memory IO1 is connected to the second data processing unit through another interface management circuit. The above storage space is allocated, the space of bank0 and bank1 is allocated to the first data processing unit, and the space of bank2 and bank3 is allocated to the second data processing unit. The configuration management module configures the above allocation information, and then through the interface management circuit, only some connections are activated as valid connections, that is, in the physical address generation stage, only the bank address of the valid connection can be generated, and the logical valid connection is as follows: Figure 8As shown, IO0 is allocated to 8KB space, IO1 is allocated to 8KB space, and IO0 is allocated to 2 banks, IO1 is allocated to 2 banks.

[0061] A memory management circuit and a method for sharing memory provided by an embodiment of the present application include a configuration management module, a memory core and multiple interface management circuits. The configuration management module is responsible for allocating the address space of each external data processing unit to ensure that each data processing unit can allocate the memory access space it requires. The memory access space of different data processing units can be flexibly allocated. The memory core stores data and receives data requests from the interface management circuit. By configuring multiple interface management circuits, they are connected to the external data processing units one by one to ensure that each data processing unit can exclusively occupy an interface management circuit, rather than the interface being time-division multiplexed like other bus systems. The memory management circuit provided by the present application can guarantee the bandwidth requirements of each data processing unit while sharing the memory space.

[0062] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.

Claims

1. A memory management circuit, characterized in that: It includes a configuration management module, a memory core and a plurality of interface management circuits, wherein the configuration management module is connected to the CPU via a bus, the memory core provides a plurality of memory access interfaces, and is connected to the interface management circuit via the memory access interfaces, and each of the interface management circuits is connected to an external data processing unit; The configuration management module is responsible for allocating address space of each data processing unit; The memory core is used to store data and receive data requests from the interface management circuit; The memory core includes a plurality of memory banks, a crossbar switch matrix and a memory IO, wherein the memory banks and the memory IO are connected via the crossbar switch matrix, and the crossbar switch matrix is ​​used to provide a fully connected crossbar matrix between all memory banks and the memory IO; The memory bank is a unit in the memory core responsible for data storage. All memory banks are uniformly addressed for external access, wherein each memory bank can be controlled individually; When the configuration management module allocates the address space of each data processing unit, the address space of each storage body in the memory core is allocated to only one data processing unit; The memory IO is an external access interface provided by the memory core, and is connected to the interface management circuit in a one-to-one correspondence; The interface management circuit is used to provide data routing and conflict control functions for the corresponding connected data processing unit according to the allocated address space, and the interface management circuit includes an address offset module, an address request module, a physical address generation module and a physical address request module; The address request module is used to process the data request of the corresponding connected data processing unit; The physical address generation module is used to generate a real physical space address according to the address space allocated by the configuration management module; The physical address request module is used to send a data request to the memory core according to the real physical space address.

2. A memory management circuit according to claim 1, characterized in that: The interface management circuit also includes a data return module, which is used to receive data returned by the memory core and return the data to the corresponding connected data processing unit.

3. A memory management circuit according to claim 1, characterized in that: The number of the interface management circuits can be flexibly configured to ensure that each data processing unit is individually connected to an interface management circuit.

4. A method for sharing a memory, characterized in that: The method for sharing a memory is performed by a memory management circuit according to any one of claims 1 to 3, comprising: The configuration management module configures the accessible space range of each data processing unit according to the instructions of the CPU to obtain the address space of each data processing unit; When allocating address space for a data processing unit, obtaining the allocation status of each memory bank in the memory core; Screening unallocated storage bodies, and selecting one or more storage bodies from the unallocated storage bodies to obtain the address space allocated by the data processing unit; A plurality of interface management circuits receive and process data requests from corresponding connected data processing units; Generate a real physical space address according to the address space allocated by the corresponding connected data processing unit; According to the real physical space address, a data request is sent to the memory core, and the memory core returns the corresponding data according to the physical space address.

Citation Information

Patent Citations

  • Container based dynamic arrangement method for application environment and system applying method

    CN105550130A

  • On-chip atomic transaction engine

    CN108027804A

  • Method of proceeding access multikind storage on chip select outer unibus

    CN1758208A

  • Local space shared memory method of heterogeneous multi-kernel microprocessor

    CN1758229A

  • Multiprocessor system

    JP2010224671A