NVDIMM controller and NVDIMM
Technical Field
The utility model relates to a non-volatile memory field, more specifically relate to a NVDIMM controller and NVDIMM of low-power consumption.
Background
NVDIMM is a non-volatile memory that includes DRAM, NAND Flash (NAND Flash), and NVDIMM controller. When the mainboard/CPU is abnormal or the power is down, the NVDIMM controller is informed through an interrupt or a message, and the NVDIMM controller can back up the data in the DRAM to the NAND flash memory. When the main board/CPU is powered on again later, the main board/CPU informs the NVDIMM controller to restore the data backed up in the NAND flash memory to the DRAM, and charges the super capacitor. The NVDIMM is powered by the super capacitor during data backup, but the super capacitor has limited power supply capacity and has larger attenuation along with the service time and the working temperature. For NVDIMMs, power consumption for data backup and data backup/restore time are two important performance indicators, which determine the capacity and reliability of the super capacitor and the cost of the product. The increase of data backup power consumption needs to be compensated by improving the capacity of the super capacitor, and the increase of the capacity of the super capacitor can increase the cost and reduce the reliability; data backup/restore time determines power consumption and user experience during data backup. Therefore, the fast backup and recovery of the NVDIMM data with low power consumption can obviously improve the competitiveness of products.
For the NVDIMM controller of DDR4, the power consumption mainly comes from DDR and NAND interfaces, and in the prior art, the power consumption can be reduced by about 25-40% by using dbi (data Bus inversion) on the DDR interface side, and since the NAND flash interface does not provide a signal for data inversion, the power consumption reduction for the NAND interface is difficult to achieve. While NAND flash typically operates at 1.8V (ONFI version 4.0) is a major source of NVDIMM controller interface power consumption.
Chinese patent publication CN107861901A discloses a storage method and system based on NVDIMM-F. The method comprises the following steps: when receiving data to be stored, the CPU sends the data to be stored to the NVDIMM-F; NVDIMM-F stores data to be stored. According to the method, the data to be stored are directly stored in the NVDIMM-F, so that the transmission rate of the data to be stored is greatly improved. However, this method only involves the operation of NVDIMM to store data in NAND and does not involve how to design low power consumption on NAND interface according to the operation data characteristics to reduce the power consumption of NAND interface.
SUMMERY OF THE UTILITY MODEL
The purpose of the utility model is to solve the following problems:
a) Reducing power consumption of the NAND interface with an NVDIMM controller;
b) Data recovery rates are improved with NVDIMM controllers.
According to a first aspect of the present invention, there is provided an NVDIMM controller comprising a DDR controller and a NAND flash memory controller, the NVDIMM controller for controlling an NVDIMM, the NVDIMM comprising a DRAM and a NAND flash memory, wherein the DRAM employs a DBI, characterized in that,
The NVDIMM controller further comprises:
A data backup module at DBIiComparison of DQ at 1iAnd DQi-1If DQiAnd DQi-1If the number of bits with different median values is greater than N/2, DQ is obtainediTurning over and DBIiset to 0, otherwise hold DQiAnd DBIiThe change is not changed; the data backup module is in DBIiHolding DQ at 0iAnd DBIiThe change is not changed; and
A data recovery module to determine DQs received from the NAND flash memory controlleriAnd DBIiIf DBIiIs equal to 0 and DQiIf the number of the middle 1 is less than or equal to N/2, the data recovery module converts the DQiTurning over and DBIiRewriting to 1, otherwise the data recovery module holds DQiAnd DBIiAnd is not changed.
According to a preferred embodiment of the first aspect of the present invention, wherein the data backup module arranges DQ in units of pages of the NAND flash memoryiAnd DBIiThe order of (a).
According to a preferred embodiment of the first aspect of the present invention, wherein the data recovery module recovers DQ in units of pages of the NAND flash memoryiAnd DBIi。
According to a preferred embodiment of the first aspect of the present invention, wherein the DRAM is DDR 4.
According to a preferred embodiment of the first aspect of the present invention, wherein the DRAM is DDR4 × 8 or DDR4 × 16.
According to the utility model discloses a second aspect provides a NVDIMM, this NVDIMM include according to the utility model discloses first aspect NVDIMM controller.
The utility model discloses a NVDIMM controller is to the DDR that has used DBI mechanism, wherein 1) NVDIMM controller's data backup module is at DBIiComparison of DQ at 1iand DQi-1If DQiand DQi-1If the number of bits with different median values is greater than N/2, DQ is obtainediTurning over and DBIiSet to 0, otherwise hold DQiAnd DBIiThe change is not changed; the data backup module is in DBIiHolding DQ at 0iAnd DBIiInvariant, and 2) the data recovery module of the NVDIMM controller determines DQ received from the NAND flash controlleriand DBIiIf DBIiIs equal to 0 and DQiIf the number of the middle 1 is less than or equal to N/2, the data recovery module converts the DQiTurning over and DBIiRewritten to 1, otherwise holds DQiAnd DBIiAnd is not changed. The NVDIMM adopting the NVDIMM controller can reduce the power consumption of the NAND interface and improve the data recovery rate.
Drawings
The invention will be better understood from the following detailed description taken in conjunction with the accompanying drawings. It is to be understood that these drawings are for illustrative purposes only and are not necessarily drawn to scale. In the drawings:
Fig. 1 is a system block diagram of an NVDIMM controller according to one embodiment of the present invention.
Fig. 2 is a schematic diagram of an NVDIMM in accordance with an embodiment of the present invention.
Detailed Description
According to the utility model discloses, NVDIMM controller realizes that nonvolatile function is mainly accomplished by DDR controller, NAND flash memory controller and data backup/recovery module triplex, and these triplex are realized using FPGA or ASIC. The utility model discloses to the DDR that has used the DBI function. Unless otherwise indicated, the DDR described herein is DDR4, but it should be understood that the present invention is not so limited and that the present invention is equally applicable to other existing and future DDR versions that support DBI.
Fig. 1 is a system block diagram of an NVDIMM controller according to one embodiment of the present invention. Taking DDR4x8 as an example, the interface signals associated with the DDR controller are 8 bits DQ and 1 bit DBI.
The operation of the NVDIMM controller will be described in detail below.
The DDR controller reads data from DRAM, due to the action of DBI, the number of '1' in DQ and DBI indication has 9 possibilities, as shown in Table 1, DBI is '0' indicating that there is a flip in DQ data, otherwise, DQ is not flipped.
Table 1: DQ and DBI values and relationships
And the data backup module processes the DQ and the DBI. For DQiIf the DQ isiDBI of 1, the data backup module will DQiAnd DQi-1Comparing and detecting DQiAnd DQi-1The number of bits in which the medians are not the same. If the bit number with different values is larger than N/2, wherein N is the bit number of DQ, the data backup module will convert DQiFlip over and convert DQiDBI of the data backup module is set to be 0, if the number of bits with different values is less than or equal to N/2, the data backup module keeps DQiAnd DBIiAnd is not changed. If DQiDBI of 0, the data backup module does not perform DQiAnd DQi-1To maintain DQiAnd DBIiAnd is not changed. The data backup module sends the processed DQ and DBI to the NAND controller, and the processed DQ and DBI are controlled by the NAND controllerThe device writes the processed DQ and DBI into the NAND flash memory to complete data backup.
The data backup module may use a page (page) of the NAND flash memory as a unit when processing DQ and DBI. Taking a 9KB sized page as an example, read 8KB DQ and 1KB DBI from the DDR interface, format DQ and DBI:
DQ0DQ1DQ2DQ3DQ4DQ5DQ6DQ7DBI0DBI1DBI2DBI3DBI4DBI5DBI6DBI7and (4) organizing. It should be understood that DQiIs 8KB, and DBIiIs 1 KB. Further, it should be understood that any other suitable format may be used.
When the NVDIMM controller restores the data, the NAND controller reads DQ and DBI from the NAND flash memory and sends to the data restoration module. If DBIi0 and corresponding DQiIs less than or equal to 4, the data recovery module converts the DQiTurning over and DBIiRewritten to 1, otherwise holds DQiAnd DBIiThe change is not changed; if DBIi0 and corresponding DQiIs greater than 4 or if DBIiData recovery module holds DQ 1iAnd DBIiAnd is not changed. And then the data recovery module recovers and writes the DQ into the DRAM through the DDR controller according to the rule of the DBI.
When the data backup module processes DQ and DBI by taking a page (page) of the NAND flash memory as a unit, reading backup written data by taking the page as a unit, and analyzing according to a written format to obtain DQ and DBI stored in the NAND flash memory.
Fig. 2 is a schematic diagram of an NVDIMM in accordance with an embodiment of the present invention. As shown in fig. 2, the NVDIMM controller 100 includes a DDR controller 101, a NAND flash controller 102, a data backup module 103 and a data restore module 104. The NVDIMM controller controls NVDIMM200 including DRAM201 and NAND flash memory 202, data backup/restore module data backup and data restore. The DDR controller is connected with the DRAM, the NAND flash memory controller is connected with the NAND flash memory, the data backup module is connected with the DDR controller and the NAND flash memory controller, and the data recovery module is connected with the DDR controller and the NAND flash memory controller.
it is understood that these embodiments are for illustrative purposes only and that many variations may be made by those skilled in the art, while the scope of the invention is defined by the claims.