This disclosure relates generally to memory devices and more particularly to memory devices with embedded error correction codes.
The following U.S. patents and papers provide useful background information, for which they are incorporated herein by reference in their entirety.
Data protection is a key component in system design, and specifically so within memory devices. Typically, this is part of the protection means against soft errors in such devices. A soft error is not a result of a defect or permanent damage to a device, but rather an error that, in the case of memory, if re-written to, or corrected by means of error correction, the soft error is overcome. Different mechanisms are used to handle soft error data corruption. Some of these mechanisms aim at merely the detection of an error. Examples for such detection are a multitude of parity based solutions. Another class of solutions provides one or another level of correction, for example, the error correction code (ECC) approach. Any one of these techniques uses a code to define the detection/correction information, and such code requires storage space in memory making it ready for usage as may be necessary. In some implementations a hardware implementation of an algorithm is used for error recovery.
In related art solutions, code storage requirements are addressed in several ways. For example, a SRAM device may include additional memory space, by providing an additional bit per byte, supporting both parity and ECC code storage within the SRAM itself. A typical DRAM device does not include such extra storage but is commonly used in large quantities in a plurality of applications. Notably, most of the DRAM devices consumed are used in personal computers (PCs) main memory and the memory for graphics devices, such as graphics accelerators used in PCs. From the two types of applications the PC main memory is the one which is more sensitive to errors and therefore error handling for that application is of paramount importance.
The typical PC memories are Dual Inline Memory Modules (DIMMs) which are designed out of dense 8-bit wide components. Therefore to design a 64-bit wide PC memory, 8 devices are required. If ECC is implemented, an additional and identical 8-bit device can be added. This allows for an efficient design since the ECC part cost is entirely justified as it is fully occupied while providing the protection. However, in embedded systems, such as an HBA, where space is limited, the system is designed to save footprint by using denser memories. In the case where the available memories in the market are sufficiently dense, the number of components used for the embedded system can be reduced. Not only will that save on precious footprint space but will also result in the reduction of the bill of materials (BOM) for a given implementation.
By means of example, one may consider a memory having a 64-bit interface requiring X mbits. There are several options to achieve this density: eight 8-bit wide devices of X/8 mbits, four 16-bit wide devices of X/4 mbits, or, two 32-bit wide devices of X/2 mbits. Once the system is designed with either 16- or 32-bit wide parts, an 8-bit wide part for the additional storage required for ECC cannot be added. The reason preventing such addition is that the row and column addressing, being different in the different devices, prevents the memory controller from accessing simultaneously all types of memory architectures in a correct manner. As a result, a device matching the other devices must be used, resulting in significant inefficiency. This is simply because the ECC code per matching data word requires only 8-bits out of 16- or 32-bits available, or an efficiency of 50% or 25% respectively. Effectively, the BOM is increased for no good reason due to this inefficiency. An example of such a prior art organization in a unified data and ECC path is shown in
Due to the limitations of related art solutions it would be beneficial to provide a solution whereby the use of higher density memory components requiring ECC support, will not result in significant inefficiencies of utilization.
To overcome some of the problems noted above, the disclosed teachings provide a memory system with folding error correction. The memory comprises a first memory bank and a second memory bank. A means for generating error correction code for data to be written to said memory system is provided. A means for writing said received data to a location in said first memory bank corresponding to a received address of said received data is provided. Further, a means for generating an error correction code write address in said second memory bank based on said received address. Still further, a means for writing said error correction code to said error correction code write address is provided.
Another aspect of the disclosed teachings is a memory system with folding error correction comprising at least a memory bank. A means for generating error correction code for data to be written to said memory system is provided. A means for writing said received data to a location in said memory bank corresponding to a received address of said received data is further provided. Still further, a means for generating an error correction code write address in said memory bank based on said received address is provided. Still further, a means for writing said error correction code to said error correction code write address is provided.
Yet another aspect of the disclosed teachings is a memory controller with folding error correction comprising a means for accessing a first memory bank. A means for accessing a second memory bank is provided. A means for generating error correction code for received data to be written to said first memory bank is provided. A means for writing said received data to a location in said first memory bank corresponding to a received address of said received data is further provided. A means for generating an error correction code write address in said second memory bank based on said received address is further provided. A means for writing said error correction code to said error correction code write address is further provided.
Still another aspect of the disclosed teachings is a memory controller with folding error correction, the memory controller comprises means for generating error correction code for data to be written to a memory bank. A means for writing said received data to a location in said memory bank corresponding to a received address of said received data is provided. A means for generating an error correction code write address in said memory bank based on said received address is further provided. A means for writing said error correction code to said error correction code write address is further provided.
Still another aspect of the disclosed teachings is a method for placing an error correction code respective of a data received by a memory controller with folding error correction. The method comprises writing said data into a first memory bank of the memory. The error correction code respective of said data is generated. An address in a second memory bank of the memory is generated. The error correction code is written to said address in a second memory bank.
Still another aspect of the disclosed teachings is a method for retrieving data and its respective error correction code of a read address received by a memory controller with folding error correction. The method comprised reading the data from a first memory bank of the memory. An address of a second memory bank of the memory for retrieval of said respective error correction code is generated. The error correction code respective of said data is retrieved. The data read is returned after error correction.
Still another aspect of the disclosed teachings is a method for placing an error correction code respective of a data received by a memory controller with folding error correction. The method comprises writing said data into a memory bank of the memory. The error correction code respective of said data is generated. An address in said memory bank of the memory is generated. The error correction code is written to said address in said memory bank.
Still another aspect of the disclosed teachings is a method for retrieving data and its respective error correction code of a read address received by a memory controller with folding error correction. The method comprises reading the data from a memory bank of the memory. An address in said memory bank for retrieval of said respective error correction code is generated. The error correction code respective of said data is generated. The data read after error correction is returned.
In other aspects of the disclosed teachings, the techniques are incorporated as part of a computer software product. The software product includes computer readable media having a plurality of instructions, which, when executed on a computing machine, perform the techniques disclosed herein.
The above objectives and advantages of the disclosed teachings will become more apparent by describing in detail preferred embodiments thereof with reference to the attached drawings in which:
In accordance with the disclosed teachings there is shown embodiments of a folding error correction code (ECC) for the purpose of including the ECC within the same memory devices rather than adding additional devices as done in prior art solutions. By including the ECC within the same memories, there is achieved the ability to use denser memory devices, including those having wider architectures such as 16- and 32-bits
Reference is now made to
Referring now to
The process of reading data in a system in accordance to the system disclosed above involved in ECC controller 410 receiving an address. ECC controller generates the address of the ECC data in the bank where it is located and provides both addresses to memory controller 420. Memory controller generates a read request to a first memory bank to receive the data and to a second memory bank to receive the ECC data. The data is then checked together with its respective ECC information by ECC controller 410. In one embodiment of the disclosed teachings the ECC information is stored in ECC cache 415. In such a case a subsequent access to the same data, if the ECC data is found in ECC cache 415 there is no need to generate an access to a second memory bank to retrieve the ECC data. It is further possible to pre-fetch ECC information in anticipation that future data to be read from a first memory bank, for example memory bank 210, will also require its respective ECC information from a second memory bank, for example memory bank 220. In an equivalent write operation, ECC controller 410 receives an address and a respective data to be written in a first data bank, for example data bank 210. ECC controller 410 generates the ECC information for the respective data and an address for the ECC data, the address placing the data in a second memory bank, for example memory bank 220. Memory controller 420 writes the data using its respective address to a first memory bank, and the respective ECC information into a second memory bank.
Reference is now made to
Ap=A+(A>>3)+1
The function can be easily accomplished with a single adder by adding the address, shifted right by 3 bits, to itself with carry in. In order to find the physical ECC address (Aep) for a specific logical address (A) a similar simple translation is required, and comprises the function:
Aep=A′+(A′>>3)
where A′ is the address with the 3 least significant bits reset. This function can be easily accomplished with a single adder by adding the address, with its 3 least significant bits reset and shifted right by 3 bits, to itself. A person skilled in the art would note that neither address translation nor the ECC generation and check performed by memory controller 420 and ECC controller 410 have to be exposed to the user.
The length (L) of the transfer would also have to be increased to account for the ECC data by dividing by 8 and multiplying by 9, depicted by the function:
Lp=((L+7)>>3)*9
a function that can easily be implemented using a mere two adders. For performance reasons it may be desirable to cut short the last access thereby skipping over any unused data and issuance of another read of just the ECC data. In that case there would be one read of a length depicted by the function:
Lp=L+(L>>3)
and a second access of length 1.
In another embodiment of the disclosed teachings all the ECC codes of a DRAM column are placed at the end of the column, while maintaining all the data in a consecutive segment. Performance impact is generally negligible since as long as the data and the ECC codes share the same column, no activation is required between the accesses. The difference would be in the address translation only.
The entire translation and ECC operations may be designed to be an internal operation of the system. The advantage over prior art solutions is that the disclosed embodiments allows for the use of ECC in a system using dense memory devices having wide data buses, e.g., data busses of 16-, 32 or 64-bits, or for that matter any number of bits, with good utilization and system cost. This allows for the use of the standard memories without adding special memory to handle the ECC requirements. In comparison to prior art solutions the user will notice a certain decrease in the memory available for use as ECC data uses memory locations that would otherwise be used for data, however, as systems are designed to have excess memory this should not present a problem. As is well-known in the art, typically the commercially available densities of memories (e.g. 256 Mb, 512 Mb, etc.) are larger than the amount of memory that is actually required or used. A person skilled in the art would further note that for debug purposes there is a mode where the address translation and ECC correction would not be done.
A person skilled-in-the-art would appreciate the fact that the teachings disclosed herein can be easily adapted for use with different types of memory devices not having integrated ECC and are therefore hereby included as part of this teachings. In one embodiment of the disclosed invention, the techniques are incorporated as part of a computer software product, including computer readable media, the media comprises a plurality of instructions designed, when executed, to perform the techniques disclosed herein. A person skilled-in-the-art would further note that the entire memory system in accordance with the disclosed teachings may be implemented on a monolithic semiconductor device.
Apart from systems and methods, as noted above, computer program products are also within the scope of the disclosed teaching. These computer program products comprise instructions on a computer readable medium that enable a computer to perform the techniques disclosed herein. The instructions are not limited, and include but not limited to, source code, object code and executables. The computers on which the instructions are implemented include, but not limited to, minis, micros, and mainframes as well as implementations over a network. The computer readable medium includes, but not limited to, floppies, RAMs, ROMs, hard drives, magnetic tapes, cartridges, CDs, DVDs, and internet downloads.
It should be noted that the techniques disclosed can be implemented in any way on a computer. These include, software implementations, hardware implementations or a hardware/software combination. In the software implementation, there is no restriction regarding the choice or level of computer languages.
Other modifications and variations to the invention will be apparent to those skilled in the art from the foregoing disclosure and teachings. Thus, while only certain embodiments of the invention have been specifically described herein, it will be apparent that numerous modifications may be made thereto without departing from the spirit and scope of the invention.
This application claims priority from U.S. provisional patent application Ser. No. 60/667,093 filed on Apr. 1, 2005, and which is hereby incorporated by reference for all that it contains.
Number | Date | Country | |
---|---|---|---|
60667093 | Apr 2005 | US |