Embodiments described herein relate generally to a memory module, an electronic device, and a method.
Conventionally, there are two kinds of storage devices, i.e., a high-speed volatile storage device and a lower-speed nonvolatile storage device than the volatile storage device. By a conventional technique, it is not possible to directly refer to data in the nonvolatile storage device from a processor of a computer. The data stored in the nonvolatile storage device is loaded into the volatile storage device before used.
Such a conventional technique does not consider access efficiency to the storage device.
In general, according to one embodiment, a memory module includes a volatile memory, a nonvolatile memory, and a controller. The volatile memory is data readable and writable. The nonvolatile memory is data readable and writable and stores therein correspondence information containing an attribute indicating any of volatile, nonvolatile, and both of volatile and nonvolatile associated with an address in an address space assigned to the volatile memory and the nonvolatile memory. The controller reads data from and writes data to the volatile memory or the nonvolatile memory, referring to the correspondence information.
Exemplary embodiments of a memory module, an electronic device, and a method will be explained below in detail with reference to the accompanying drawings. The present invention should be not limited to the following embodiments.
The CPU 22 controls the entire electronic device 21. The north bridge 23 and the south bridge 24 function as input/output interfaces.
The south bridge 24 is an interface handling relatively low-speed data. For example, a PCIe, a SATA, or the like (not illustrated) is connected to the south bridge 24.
The north bridge 23 is an interface that has a memory management unit (MMU) 23a, for example, and handles high-speed data. For example, the memory module 12, a graphic board (not illustrated), or the like is connected to the north bridge 23.
The MMU 23a controls the memory module 12 and other elements in accordance with an operating system executed by the CPU 22. In the present embodiment, when receiving a data read/write command from the CPU 22, the MMU 23a starts an access to the memory module 12 for data read or data write. upon receiving such a command, the MMU 23a checks validity of the access, reads out a page table 13a that is arranged on a memory and stores necessity of information conversion and the like, performs a necessary processing to the table, and outputs an access command to the memory module 12.
The memory module 12 includes a NAND flash memory (NAND) 13, a DRAM 14, a memory controller 15, and a plurality of pins 16. The memory module 12 according to the present embodiment is a memory device connected to the north bridge 23 via the plurality of pins 16.
The plurality of pins 16 are connecting terminals to the electronic device 21, and are used in transmission/reception of information after the connection.
The NAND flash memory (NAND) 13 is used as a nonvolatile memory. In the present embodiment, the nonvolatile memory should not be limited to the NAND flash memory, and can be an MRAM (Magnetoresistive RAM) or a ReRAM (Resistive RAM), for example.
The NAND flash memory (NAND) 13 is data readable and writable and includes the page table 13a. The page table 13a is a table for enabling an access to an address space formed by the NAND flash memory (NAND) 13 and the DRAM 14. Due to this configuration, the CPU 22 can make a direct access to a memory space formed by the NAND flash memory (NAND) 13 and the DRAM 14.
The DRAM 14 is used as a data readable and writable volatile memory.
The memory controller 15 controls an access to the NAND 13 and the DRAM 14 in response to a request from the CPU 22. For example, the memory controller 15 converts a virtual address into a physical address, referring to the page table 13a and accesses the DRAM 14 or the NAND 13 in accordance with the physical address. The memory controller 15 according to the present embodiment recognizes the structure of the page table 13a so that it can recognize information stored in the page table 13a and execute the access control in accordance with the information.
The plurality of pins 16 are inserted into a slot (not illustrated) electrically connected to the north bridge 23, so that the memory module 12 is connected to the north bridge 23.
The memory module 12 according to the present embodiment is a memory device conforming to a DIMM standard. However, the memory device in the present embodiment should not be limited to devices conforming to the DIMM standard, but may be a different memory device. For example, the memory device according to the present embodiment may be a memory device applicable to a memory board other than boards conforming to the DIMM standard. Further, the memory device according to the present embodiment may be one other than the memory device applicable to the memory board, for example, a memory device that is mounted on a board or a semiconductor substrate together with other circuit components.
The virtual address space is formed of a volatile memory address space, a shared address space, and a nonvolatile memory address space, as illustrated in
Further, the shared address space is assigned to both the DRAM 14 and the NAND 13 and defined in the virtual address space according to the present embodiment. The shared address space is provided for a high-speed access to data stored in the nonvolatile memory. In the present embodiment, data is stored in the NAND 13 and copied onto the DRAM 14 when a data access is requested from the CPU 22. Thereafter, both a high-speed access and data holding at occurrence of power-off can be achieved by making an access to the DRAM 14.
As illustrated in
The attribute is set to any one of “volatile” (DRAM 14), “nonvolatile” (NAND 13), and “both” (DRAM 14 and NAND 13). The CPU 22 can identify an access destination, referring to the attribute. In this manner, the page table 13a according to the present embodiment associates the attribute (indicating one of “volatile”, “nonvolatile”, and “both” of “volatile” and “nonvolatile”) with each virtual address in the virtual address space assigned to the DRAM 14 and the NAND 13.
The attribute “both” (DRAM 14 and NAND 13) means that an address concerned is nonvolatile (NAND 13) and an object of a high-speed access. That is, to store data at the address concerned d in the NAND 13 and access the address, the data at the address is loaded into the DRAM 14. In addition, when the attribute of a virtual address is “both” (DRAM 14 and NAND 13) in the page table 13a, the virtual address is convertible to both a physical address in the DRAM 14 and a physical address in the NAND 13.
The copy flag is a flag for holding a copied or uncopied state of data at the address concerned on the DRAM 14 when its attribute is “both”. “Uncopied” is set in a case where the data has not been copied into the DRAM 14, and “copied” is set in a case where the data has been copied into the DRAM 14.
The nonvolatilization is a flag for holding a timing at which updated data is written to the NAND 13, when at a virtual address having the attribute “both”, copied data on the DRAM 14 has been updated. In the present embodiment, the nonvolatilization timing is set to “immediately”, “after a certain period of time”, and “at an instructed time”.
In the present embodiment, the memory controller 15 also executes various controls such as data read/write over the DRAM 14 and the NAND 13, referring to the page table 13a.
Next, an example of a memory access to a virtual address having an attribute “both” in the electronic device 21 according to the present embodiment is described.
As illustrated in
The memory controller 15 then accesses the page table 13a of the NAND 13 for the memory attribute query (S503). Thereby, the memory controller 15 acquires information on the virtual address indicated by the memory access command as a memory attribute response (S504).
The memory controller 15 then passes the information on the virtual address indicated by the memory access command to the MMU 23a as the memory attribute response (S505). Thereby, the MMU 23a can control a memory access based on the information on the virtual address indicated by the memory access command.
Meanwhile, when determining that the attribute associated with the virtual address is “both”, the memory controller 15 determines whether the copy flag for the virtual address is “uncopied”. Upon determining that the copy flag is “uncopied”, the memory controller 15 accesses a physical address of the NAND 13 corresponding to the virtual address and reads out the data for copy (S506). The memory controller 15 writes the read data to a physical address of the DRAM 14 corresponding to the virtual address (S507). Thereafter, a high-speed access to the data is feasible.
When reading out data from a virtual address with the attribute “both” in the page table 13a, the memory controller 15 according to the present embodiment controls a data read from the NAND 13 assigned a physical address converted from the virtual address and a data write to the DRAM 14 assigned a physical address converted from the virtual address. Such control is executed when the copy flag is “uncopied”. In other words, when reading out the data from the virtual address with the attribute “both”, the memory controller 15 writes the data to the DRAM 14 assigned the physical address converted from the virtual address in a case where the copy flag for the virtual address indicates “uncopied”, that is, that the data has not been written to the DRAM 14. This makes it possible for the memory controller 15 to generate a response from the DRAM 14 and respond to a new command from the MMU 23a more quickly than to generate the response from the NAND 13 access command.
In the present embodiment, the CPU 22 issues an instruction for referring to the page table 13a as the memory attribute query, triggered by the memory access command sent to the MMU 23a. The memory controller 15 compares the instruction with position information of the page table stored therein, to able to recognize that the received instruction is an instruction for the page table.
Next, described is an example of a memory access after the process of
First, the CPU 22 outputs a memory access command (a data read command or a data write command) to the MMU 23a (S601). The MMU 23a identifies a physical address of the DRAM 14 corresponding to a virtual address of the memory access command input at S601 from the memory attribute response received at S505, and outputs a memory access command for the physical address to the memory controller 15 (S602).
The memory controller 15 then accesses the physical address specified by the memory access command (S603). This access destination is a write destination at S507.
The memory controller 15 reads out or writes data from/to the physical address (S604) and outputs the read data or a write response to the MMU 23a as a memory access response (S605). The MMU 23a passes the data or the write response received from the memory controller 15 to the CPU 22 as the memory access response (S606).
Subsequently, the memory controller 15 performs nonvolatilization, that is, copying data updated in the DRAM 14 onto the NAND 13 (S607). This nonvolatilization is performed based on a parameter (“immediately”, “after a certain period of time”, and “at an instructed time”) set as the nonvolatilization in the page table 13a.
By the above process, the memory controller 15 can read or write the data from/to the DRAM 14 at a high speed after copying data stored in the NAND 13 onto the DRAM 14. In the present embodiment, when the memory access command received from the MMU 23a is a data write, data is copied onto the NAND 13 for nonvolatilization in accordance with a requirement of nonvolatilization. Therefore, both a high-speed response from the DRAM 14 and nonvolatilization can be achieved.
Next, described is an example of a memory access to a virtual address having an attribute “nonvolatile” or “volatile” in the electronic device 21 according to the present embodiment. First, an example of the attribute “nonvolatile” and data stored in the NAND 13 as a non-object of a high-speed access is described.
As illustrated in
The memory controller 15 then accesses the page table 13a of the NAND 13 for the memory attribute query (S703). Thereby, the memory controller 15 acquires information on the virtual address indicated by the memory access command as a memory attribute response (S704).
The memory controller 15 then passes the information on the virtual address indicated by the memory access command to the MMU 23a as the memory attribute response (S705). The information on the virtual address contains the attribute “nonvolatile” or “volatile” and a physical address. Therefore, the MMU 23a can control a memory access to the physical address corresponding to the memory access command.
Next, another example of a memory access when the information on the virtual address acquired as the memory attribute response contains the attribute “nonvolatile” is described.
First, the CPU 22 outputs a memory access command (a data read command or a data write command) to the MMU 23a (S801). The MMU 23a identifies a physical address of the NAND 13 corresponding to a virtual address of the memory access command input at S801 from the memory attribute response received at S705, and outputs a memory access command for the physical address to the memory controller 15 (S802).
The memory controller 15 then accesses the physical address on the NAND 13 specified by the memory access command (S803).
The memory controller 15 then reads out or writes data from/to the physical address (S804) and outputs the read data or written data to the MMU 23a as a memory access response (S805). The MMU 23a receives the memory access response from the memory controller 15 and passes it to the CPU 22 (S806).
By the above process, the memory controller 15 can achieve data read and data write from/to the NAND 13. As described in the above process, the memory controller 15 recognizes a virtual address having the attribute “nonvolatile” as a non-object of a high-speed memory access, and directly generates a response from the NAND 13 when newly receiving a memory access command from the MMU 23a. In this manner, the memory controller 15 is able to control unnecessary data not to be copied onto the DRAM 14.
Referring to
First, the CPU 22 outputs a memory access command (a data read command or a data write command) to the MMU 23a (S901). The MMU 23a identifies a physical address of the DRAM 14 corresponding to a virtual address of the memory access command input at S901 from the memory attribute response, and outputs the memory access command for the physical address to the memory controller 15 (S902).
The memory controller 15 then accesses the physical address specified by the memory access command on the DRAM 14 (S903).
The memory controller 15 reads out or writes data from/to the physical address (S904) and outputs the read data or the written data to the MMU 23a as a memory access response (3905). The MMU 23a receives the memory access response from the memory controller 15 and passes it to the CPU 22 (S906).
By the above process, the memory controller 15 is able to read and write the data from/to the DRAM 14.
Next, described is a process by the memory controller 15 when having received a memory attribute query for a virtual address.
First, the memory controller 15 receives the memory attribute query from the MMU 23a (S1001).
The memory controller 15 then acquires information on the virtual address included in the received memory attribute query from the page table 13a (S1002).
The memory controller 15 sends the acquired information on the virtual address to the MMU 23a as a memory attribute response (S1003).
The memory controller 15 determines whether an attribute included in the acquired information is “both” (S1004). The memory controller 15 ends the process when determining that the attribute is not “both” (NO at S1004). On the other hand, upon determining that the attribute is “both” (YES at S1004), the memory controller 15 then determines whether a copy flag included in the acquired information is “uncopied” (S1005). The memory controller 15 ends the process, upon determining that the copy flag is not “uncopied” (NO at S1005).
When determining that the copy flag included in the acquired information is “uncopied” (YES at S1005), the memory controller 15 copies data at the address designated by the memory attribute query onto the DRAM 14 (S1006).
The memory controller 15 then updates the copy flag for the virtual address of the copied data to “copied” (S1007).
By the above process, the memory controller 15 can perform an operation in accordance with the memory attribute query from the MMU 23a and can copy the data stored in the NAND 13 onto the DRAM 14.
By the conventional technique, an operating system of an electronic device cannot directly access data stored in a nonvolatile memory such as an SSD. For this reason, the conventional operating system needs to load the data stored in a storage device such as an SSD into a DRAM and the like for executing an operation.
On the other hand, the electronic device 21 and the memory module 12 including the above configurations according to the present embodiment can directly access the data stored in the nonvolatile memory such as the NAND 13. That is, they can improve processing efficiency because of the direct data access to the NAND 13 as long as the data is stored in the NAND 13, eliminating the necessity to load the data from the SSD into the DRAM.
Further, in the electronic device 21 according to the present embodiment, the operating system can be stored in the NAND 13 of the memory module 12 starts up from the NAND 13. Thereby the start-up of the operating system can be improved.
Furthermore, when writing data, the operating system may specify the attribute of the data. Due to this configuration, when receiving a data storing command from an application or the like, the operating system can designate an appropriate storing destination for the data from the DRAM 14 and the NAND 13 in accordance with the storing command.
In the electronic device 21 and the memory module 12 according to the present embodiment, deterioration of the NAND 13 can be prevented because unnecessary nonvolatilization is not performed. Also, it is unnecessary to load all data into the DRAM 14, making it possible to reduce the memory capacity of the DRAM 14.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
This application is based upon and claims the benefit of priority from U.S. Provisional Application No. 62/216,890, filed on Sep. 10, 2015; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62216890 | Sep 2015 | US |