Memory management device containing memory copy device with direct memory access (DMA) port

11354244 ยท 2022-06-07

Assignee

Inventors

Cpc classification

International classification

Abstract

Memory modules and associated devices and methods are provided using a memory copy function between a cache memory and a main memory that may be implemented in hardware. Address translation may additionally be provided.

Claims

1. A memory module for a computing device having a central processing unit (CPU), the memory module comprising: a main memory, at least one cache memory configured to store copies of frequently used data of the main memory, and a memory copy device being connected with the main memory and with the cache memory, wherein the memory copy device comprises at least one Direct Memory Access (DMA) port for accessing data in the main memory and data in the cache memory, the memory copy device being configured to, independently of the CPU, read and write data between the cache memory and the main memory via the DMA port, wherein the memory copy device further comprises an address translation device for translating between a memory physical address and a memory virtual address.

2. The memory module of claim 1, wherein the memory copy device further comprises: a cached access module device for the reading and writing data between the cache memory and the main memory via the DMA port and for maintaining data integrity and coherence between the cache memory and the main memory.

3. The memory module of claim 1, wherein the memory copy device is implemented in hardware.

4. The memory module of claim 1, wherein the memory copy device is configured to perform the reading and writing without having to use a processor external to the memory copy device.

5. A computing device having a central processing unit (CPU), comprising: at least one processing core module; and a memory module comprising: a main memory, at least one cache memory configured to store copies of frequently used data of the main memory, and a memory copy device being connected with the main memory and with the cache memory, wherein the memory copy device comprises at least one Direct Memory Access (DMA) port for accessing data in the main memory and data in the cache memory, the memory copy device being configured to, independently of the CPU, read and write data between the cache memory and the main memory via the DMA port, wherein the processing core module is configured to store data in the memory module and to read data from the memory module, wherein the memory copy device further comprises an address translation device for translating between a memory physical address and a memory virtual address.

6. The computing device of claim 5, wherein the memory copy device further comprises: a cached access module device for the reading and writing data between the cache memory and the main memory via the DMA port and for maintaining data integrity and coherence between the cache memory and the main memory.

7. The computing device of claim 5, wherein the memory copy device is implemented in hardware.

8. The computing device of claim 5, wherein the memory copy device is configured to perform the reading and writing without having to use a processor external to the memory copy device.

9. The computing device of claim 5, wherein the memory copy device of the memory module is configured to perform memory copy operations between the main memory and the cache memory of the memory module without using the processing core module.

10. The computing device of claim 5, further comprising a network module to operate in a network.

11. The computing device of claim 10, wherein the network module comprises one or more devices selected from a group consisting of a router device, a gateway device, and a Network Attached Storage (NAS) device.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 illustrates a memory copy engine.

DETAILED DESCRIPTION

(2) In the following detailed description, details are provided to describe embodiments of the application. It shall be apparent to one skilled in the art, however, that the embodiments may be practiced without such details. In other word, a description of an embodiment with a plurality of features or elements is merely to provide a better understanding to the skilled person, but is not to be construed as indicated that all these features or elements are necessary for implementation of an embodiment.

(3) Some embodiments described may have similar parts. The similar parts may have same names or similar reference number. The description of one such part applies by reference to another similar part, where appropriate, thereby reducing repetition of text and providing a more concise description. This, however, does not imply that the similar parts are necessarily implemented in the same manner.

(4) FIG. 1 shows a computing module 10 illustrating an embodiment. While module 10 will be described as comprising a plurality of modules or systems, two or more of these modules or systems may also be implemented together as a single module or system.

(5) The computing module 10 includes a processor sub-system 13, a Double Data Rate (DDR) synchronous Dynamic Random-Access Memory (DRAM) module 16, and a hardware memory copy (HWMemCopy) engine 19.

(6) The processor sub-system 13 comprises a first computing core 21 with a first cache memory 24, a second computing core 26 with a second cache memory 28, and an Input Output Control Port (IOCU) module 30. In other embodiments, only one such core or more than two cores may be provided. The cores may be implemented in a single processor (e.g. CPU or GPU), but may also be provided in different processors.

(7) The HWMemCopy engine 19 includes an address translation module 32 and a cached access module 34 with a memory input/output (I/O) module 37, with a command register 40, and with a result register 43.

(8) The memory I/O module 37 is connected to an Interconnect module 46, which is connected to ports 48 of the IOCU module 30 and to DDR ports 51 of the DDR DRAM module 16.

(9) The command register 40 is connected to computing cores 21 and 26.

(10) Result register 43 is connected to a Yield Manager module 52 that is in turn connected to the computing cores 21 and 26.

(11) A method of using the HWMemCopy engine 19 is described below.

(12) A software driver writes to registers of Address Translation module 32 of the HWMemCopy engine 19 for configuring translation of virtual memory address to physical memory address by the HWMemCopy engine 19. Instead of a software driver (running e.g. on one or both of cores, 21, 26) also another entity, e.g. a hardware module, may perform the corresponding functions in other embodiments.

(13) The software driver also configures Cache Memory Access Transform parameters in the HWMemCopy engine 19 to enable the HWMemCopy engine 19 to perform cache memory I/O operation.

(14) When a memory copy operation is initiated, the software driver provides the Command Register 40 of the HWMemCopy engine 19 with a source buffer memory address, a destination buffer memory address. The software driver also provides the Command Register 40 with a flag data regarding source address translation, a flag data regarding destination address translation, a flag data regarding cache source I/O buffer memory, and/or a flag data regarding cache destination I/O buffer memory.

(15) The Address Translation Module 32 of the HWMemCopy engine 19 then performs translation of the source main memory address and the destination main memory address, when needed.

(16) Address Translation Module 32 also may also performs translation of source cache memory address and destination cache memory address, when needed.

(17) HWMemCopy engine 19 then reads data from a source buffer memory and writes corresponding data to a destination buffer memory using the Memory I/O module 37 that couples a DMA read channel to a DMA write channel.

(18) A DMA-R engine 55 of the Memory I/O module 37 later may sends the physical source memory address and bytes per burst data to the Interconnect module 46 to read the source buffer memory.

(19) The Interconnect module 46 decides to present the request to either the DDR port 51 or to the IOCU port 48 based on an address range of the address, e.g. based on whether the address belongs to an address range for the DDR memory, which may be an example for a main memory, or to another memory like a cache memory or the processor sub-system in general.

(20) If the Interconnect module 46 directs the address to the IOCU port 48, the address has been adjusted to reflect its physical memory address.

(21) The cache memory sub-system then reads data from the DDR port 51 if the received address is not in the cache memory 24 and/or 28.

(22) The data, which is read by the DMA-R engine channel, is passed to the DMA-W engine channel, which transfers the source address and bytes per burst to the Interconnect module 46 for writing the data to a source buffer memory.

(23) The Interconnect module 46 later decides to present the data either to the DDR port 51 or to the IOCU port 48 based on themaddress range of the destination memory address.

(24) If the Interconnect module 46 transfers the memory address to IOCU port 48, the memory address has been adjusted to reflect its physical memory address of the destination memory.

(25) The cache memory sub-system later writes the desired data via the DDR port 51 to maintain cache coherency. Some data in the cache memory 24 and 28 may not be coherent and need not be written to the DDR port 51 for improving performance. Also, cache data in a level one (L1) data cache can be replaced appropriately.

(26) Once all burst segments of a DMA operation are complete, the HWMemCopy engine 19 issues an interrupt signal to the respective requesting CPU core 21 or 26 regarding completion of the requested memory copy (memcpy) operation.

(27) This manner of memory copy has an advantage of not hogging CPU time. The HWMemCopy engine 19 especially improves networking throughput and maximizes application performance for embedded CPU.

(28) This is different from many kinds of software systems using a memory copy, also called a memcpy function, which significantly hogs CPU time as the CPU has to run the respective software. Examples of systems using such a software approach are software system are routers, gateways, and Network Attached Storage (NAS) devices. In embodiments, the above-described techniques may be used in such systems instead of the conventional software approach.

(29) Although the above description contains much specificity, this should not be construed as limiting the scope of the embodiments but merely providing a more detailed illustration.

(30) The above stated advantages of some of the embodiments should not be construed as limiting the scope of the embodiments but merely to explain possible achievements if the described embodiments are put into practice. Other embodiments may not have such advantages as described. Thus, the scope of the application should be determined by the claims and their equivalents, rather than by the examples given.