This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2015-183279, filed on Sep. 16, 2015, the entire contents of which are incorporated herein by reference.
An embodiment of the present invention relates to a memory system.
Low power consumption is necessary for a processor used in a portable information terminal. An example of lowering the power consumption of the processor includes a method for replacing nonvolatile memories with cache memories using a static random access memory (SRAM) with large standby energy.
Examples of the nonvolatile memories include a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FeRAM), a resistance random access memory (ReRAM), and the like. Among the nonvolatile memories which have been proposed, especially, the MRAM may simultaneously satisfy the following three characteristics. That is, high rewriting resistance, operation performance capable of high-speed readout and writing, and a cell size capable of high integration.
However, the MRAM is high in a bit error rate, compared to the SRAM or DRAM.
According to one embodiment, a memory system has a first memory which comprises a nonvolatile memory data region, and a second memory which stores data before storing in a third memory, the data not being written back on the third memory in a lower-level with access priority lower than access priority of the first memory, among data inside the nonvolatile memory data region, wherein the second memory has a bit error rate lower than a bit error rate of the first memory.
Hereinafter, an embodiment of the present invention will be described in detail.
Similarly, each core unit 3 can also include one or a plurality of chips. Note that it is not indispensable to provide the plurality of sockets 2 or the plurality of core units 3 as illustrated in
The L2 cache bus 4 is connected to the plurality of core units 3. The plurality of core units 3 accesses the common L2 cache 5 through the L2 cache bus 4 and the L2 cache controller 6. Memory capacity of the L2 cache 5 is, for example, 256 KB. The L2 cache 5 includes an L2 tag unit (not illustrated) and an L2 data cache unit (not illustrated). The L2 error detection and correction unit 7 carries out error detection and error correction when reading out data written on the L2 data cache unit.
Each core unit 3 includes a CPU core 11, an L1 data cache (L1d$) 12, an L1 data cache controller (D cache controller) 13, an L1 command cache (L1i$) 14, and an I cache controller 15. Memory capacity of the L1 data cache 12 and the L1 command cache 14 may be any number, for example, 32 KB.
In addition, the memory system 1 in
Each socket 2 accesses the common L3 cache 17 through the L3 cache bus 16 and the L3 cache controller 18. Memory capacity of the L3 cache 17 is, for example, 32 MB.
The L3 cache 17 includes an L3 tag unit (not illustrated) and an L3 data cache unit (not illustrated). The L3 data cache unit is a nonvolatile memory data region including a nonvolatile memory such as an STT-MRAM and the like. The L3 tag unit is a memory having access speed faster than that of the L3 data cache unit such as the SRAM and the like. The L3 error detection and correction unit 19 carries out the error detection and the error correction when reading out data written on the L3 data cache unit.
The DLT 20 is accessed by the DLT controller 21. The DLT controller 21 is connected to the L3 cache controller 18. The DLT 20 can be regarded as a cache memory in a level between the L3 cache 17 and the main memory 23 and also as a cache memory in a level equivalent to the L3 cache 17. As mentioned later, the DLT 20 partially carries out operations similar to a normal cache memory, but also carries out operations different from the normal cache memory.
Memory capacity of the DLT 20 may be much smaller than the memory capacity of the L3 cache 17, for example, 64 KB approximately. Access speed of the DLT 20 is preferably set to be faster than access speed of the L3 cache 17, but may be equivalent to or less than the access speed of the L3 cache 17.
The DLT 20 includes a DLT tag unit (not illustrated) and a DLT data cache unit (not illustrated). The DLT data cache unit includes a memory such as the SRAM and the like with a bit error rate lower than that of the L3 data cache unit. As mentioned later, note that the DLT data cache unit and the L3 data cache unit may both include the MRAM. In this case, as mentioned later, by changing usage of the MRAM or changing an access method, it is possible to lower the bit error rate of the DLT data cache unit than the bit error rate of the L3 data cache unit.
The DLT error detection and correction unit 22 carries out the error detection and the error correction when reading out data stored in the DLT data cache unit.
The main memory 23 is accessed by the memory controller 24. The memory controller 24 is connected to the DLT controller 21. The main memory 23 includes, for example, the DRAM. The main error detection and correction unit 25 carries out the error detection and the error correction when reading out data stored in the main memory 23.
Note that among the memory system 1 in
Note that the LLC is not necessarily the L3 cache 17. For example, a cache memory of a higher level than the L4 cache may be the LLC. On the contrary, a cache level may be decreased to two levels so as to set the L2 cache 5 as the LLC.
As illustrated in
When storing new data in the LLC, the DLT 20 stores the data if it is dirty data. In other words, in a case where data newly stored in the LLC is yet written on the main memory 23 in a level lower than the LLC, the data will be stored in both the LLC and the DLT 20.
The reason for this process is that the DLT 20 has a bit error rate lower than that of the LLC so that even though there is an error in data readout from the LLC, it is possible to deliver correct data to the CPU by reading out the same data from the DLT 20.
If the L3 cache 17 is the LLC, the error correction can be carried out on data readout from the L3 cache 17 by the L3 error detection and correction unit 19. Therefore, the data whose error has been reliably corrected by the L3 error detection and correction unit 19 may be delivered to the CPU as it is.
Arrowed lines in
Among the data written on the LLC (L3 cache 17) (arrowed line y3), dirty data is also written on the DLT 20 (arrowed line y4). Among the data readout from the LLC (L3 cache 17) (arrowed line y5), data on which the error correction cannot be carried out by the L3 error detection and correction unit 19 will be read out from the DLT 20 (arrowed line y6).
The data written on the DLT 20 is written back on the main memory 23 at a predetermined timing (arrowed line y7). The predetermined timing is when new data is written on the DLT 20 or when a power source of the DLT 20 is turned off.
Data readout from the main memory 23 will not be written on the DLT 20 but on the LLC (L3 cache 17) (arrowed line y8).
In this manner, the DLT 20 stores the dirty data among the new data written on the LLC (L3 cache 17), and the data stored in the DLT 20 is written back on the main memory 23 at the predetermined timing. Therefore, the DLT 20 may have small memory capacity. Note that the DLT 20 having the bit error rate lower than that of the LLC (L3 cache 17) is a precondition. Accordingly, when there is an error in the data readout from the LLC (L3 cache 17) and the error cannot be corrected by the L3 error detection and correction unit 19, it is possible to read out correct data from the DLT 20. Herein, even in a case where the bit error rate of the DLT data cache unit inside the DLT 20 is not lower than that of the LLC (L3 cache 17), the DLT error detection and correction unit 22 connected to the DLT 20 may preferably achieve a bit error rate lower than that of the LLC (L3 cache 17) using detecting and correcting performance. In the present description, including a case where the low bit error rate is achieved by the DLT error detection and correction unit 22, the bit error rate of the DLT 20 is defined as being lower than the bit error rate of the LLC.
The DLT 20 is provided so as to improve reliability of data when reading out the data from the L3 cache 17. Accordingly, when reading out data from the main memory 23, it is not necessary to store the data in the DLT 20. In this manner, in a strict sense, the DLT 20 is not a cache memory in the level lower than the LLC (L3 cache 17).
As mentioned above, when writing new data on the L3 cache 17, if the data is dirty data which is not stored in the main memory 23, the data will also be written on the DLT 20. Therefore, at the time of writing the data on the DLT 20, the same data also exists in the L3 cache 17. Thereafter, there may be a case where the data equal to the data written on the DLT 20 is deleted (updated) from the L3 cache 17, for example, by writing clean data on the L3 cache 17. Accordingly, right after written on the DLT 20, the data also exists in the L3 cache 17. However, there is a possibility that the data may not exist in the L3 cache 17 as time proceeds.
The abovementioned description has explained an example where the DLT 20 is provided in accordance with the L3 cache 17 when the L3 cache 17 is the LLC. However, in a case where a cache memory in a level other than the L3 cache 17 is the LLC, the DLT 20 may be provided in accordance with the LLC. Furthermore, the DLT 20 is not necessarily provided in accordance with the LLC. For example, in a case where there exists a cache memory of a higher-level than the L3 cache 17, the DLT 20 may be provided in accordance with the L3 cache 17. In other words, there may exist a cache memory of a higher-level having priority lower than that of the DLT 20. Furthermore, in a level higher than the LLC, the DLT 20 can be provided between the cache levels. In this case, the DLT 20 can be provided, for example, between the L2 cache 5 and the L3 cache 17. Furthermore, in this case, the DLT 20 can be provided between the L2 cache 5 independent per socket 2 and the L3 cache 17 shared among the sockets 2.
The DLT 20 has a characteristic of having the bit error rate lower than that of the LLC (L3 cache 17). In a case where the L3 data cache unit of the LLC (L3 cache 17) includes the MRAM, the DLT data cache unit of the DLT 20 may be configured to include a memory having a bit error rate lower than that of the MRAM (for example, SRAM, DRAM, FeRAM, or ReRAM). Furthermore, in a case where the DLT data cache unit is similarly configured to include the MRAM, a plurality of MRAM cells may be included in one cell so as to lower the bit error rate. Alternatively, writing voltage of the MRAM in the DLT data cache unit may be set higher than writing voltage of the MRAM in the L3 data cache unit so as to lower the bit error rate. Alternatively, writing pulse width of the MRAM in the DLT data cache unit may be set longer than writing pulse width of the MRAM in the L3 data cache unit so as to lower the bit error rate. Alternatively, with regard to the DLT data cache unit, by providing a verify process of the MRAM, the bit error rate may be lowered. Alternatively, readout voltage of the MRAM in the DLT data cache unit may be set lower than readout voltage of the MRAM in the L3 data cache unit so as to lower the bit error rate. Alternatively, with regard to the DLT data cache unit, by providing the DLT error detection and correction unit 22 with much stronger error correction performance, the bit error rate may be lowered.
First, it is determined whether data to which the CPU 11 has issued readout request has been correctly read out from the L1 cache 12 or the L2 cache 5 (step S1). If the data is correctly read out, the readout data is send back to the CPU 11 (step S2).
A case where a result determined in step S1 is “NO” is when the data to which the readout request has been issued is not stored in the L1 cache 12 and the L2 cache 5. Alternatively, such a case is when the data to which the readout request has been issued is stored in the L1 cache 12 or the L2 cache 5 but the stored data has an uncorrectable error.
If the result determined in step S1 is “NO”, the L3 cache 17 is accessed (step S3). Herein, address of the data to which the CPU 11 has issued the readout request is determined whether it has hit in the L3 tag unit of the L3 cache 17 (step S4, hit determination unit). If the data has hit in the L3 tag unit, the hitting data is read out from the L3 data cache unit (step S5). If there is an error in the readout data, the error is determined whether it is correctable (step S6, error correction determination unit).
If a result determined in step S6 is “YES” and the data readout from the L3 cache 17 has no error, the data is directly send back to the CPU 11. Alternatively, if the data readout from the L3 cache 17 has an error, the L3 error detection and correction unit 19 carries out the error correction on the data and then the data is send back to the CPU 11 (step S7). If the result determined in step S6 is “NO,” the DLT 20 is accessed (step S8). In other words, the address of the data to which the CPU 11 has issued the readout request is determined whether it has hit in the DLT tag unit (step S9). If the address has hit in the DLT tag unit, the hitting data is read out from the DLT data cache unit (step S10). Herein, it is a precondition that reliability of the DLT data cache unit is high. Even though there is an error in the data readout from the DLT data cache unit, it is assumed that the data can be corrected by the DLT error detection and correction unit 22.
On the other hand, if the address has missed in the DLT tag unit in step S9, the main memory 23 is accessed (step S11). The data to which the CPU 11 has issued readout request is read out from the main memory 23 (step S12), and the readout data is written on (filled in) the L1 cache 12, the L2 cache 5, and the L3 cache 17 (step S13). In this case, the data readout from the main memory 23 will not be written on the DLT 20. In this manner, when reading out the data from the main memory, the data is not filled in the DLT. In this point of view, the DLT 20 is different in operation from the normal cache memory.
After finishing the processes of step S23 or S24, next, the DLT 20 is accessed (step S25). Herein, address of the data written back on the L3 cache 17 is determined whether it has hit in the DLT tag unit (step S26). If the address has hit in the DLT tag unit, the data written back on the L3 cache 17, namely, the data evicted from the L2 cache 5 is also written on the DLT 20 (step S27). If the address has missed in the DLT tag unit in step S26, old data inside the DLT 20 is evicted. In place of the old data, the data evicted from the L2 cache 5 is written on the DLT 20 (step S28). Next, the data evicted from the DLT 20 is written back on the main memory 23 (step S29).
In this manner, in the present embodiment, the DLT 20 is provided in accordance with at least a cache memory in one-level (for example, LLC) among a plurality of stratified cache memories. The DLT 20 is a memory having the bit error rate lower than that of the LLC. The LLC includes a nonvolatile memory data region. Furthermore, when writing new dirty data on the LLC, the same data will be written on the DLT 20. As a result, even in a case where correct data cannot be read out from the LLC, the correct data can be read out from the DLT 20. Therefore, even in a case where the nonvolatile memory data region is provided to the LLC, there is no possibility of decrease in the reliability of the data. In a case where the MRAM is used for the nonvolatile memory data region, it is possible to integrate higher and access speed is faster than an NAND-type flash memory. Therefore, access performance of the LLC can be improved.
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 methods and systems described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the methods and systems 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.
Number | Date | Country | Kind |
---|---|---|---|
2015-183279 | Sep 2015 | JP | national |