|Computer memory types|
|Early stage NVRAM|
Semiconductor memory has the property of random access, which means that it takes the same amount of time to access any memory location, so data can be efficiently accessed in any random order. This contrasts with data storage media such as hard disks and CDs which read and write data consecutively and therefore the data can only be accessed in the same sequence it was written. Semiconductor memory also has much faster access times than other types of data storage; a byte of data can be written to or read from semiconductor memory within a few nanoseconds, while access time for rotating storage such as hard disks is in the range of milliseconds. For these reasons it is used for main computer memory (primary storage), to hold data the computer is currently working on, among other uses.
In a semiconductor memory chip, each bit of binary data is stored in a tiny circuit called a memory cell consisting of one to several transistors. The memory cells are laid out in rectangular arrays on the surface of the chip. The 1-bit memory cells are grouped in small units called words which are accessed together as a single memory address. Memory is manufactured in word length that is usually a power of two, typically N=1, 2, 4 or 8 bits.
Data is accessed by means of a binary number called a memory address applied to the chip's address pins, which specifies which word in the chip is to be accessed. If the memory address consists of M bits, the number of addresses on the chip is 2M, each containing an N bit word. Consequently, the amount of data stored in each chip is N2M bits. The data capacity is usually a power of two: 2, 4, 8, 16, 32, 64, 128, 256 and 512 and measured in kibibits, mebibits, gibibits or tebibits, etc. Currently (2014) the largest semiconductor memory chips hold a few gibibits of data, but higher capacity memory is constantly being developed. By combining several integrated circuits, memory can be arranged into a larger word length and/or address space than what is offered by each chip, often but not necessarily a power of two.
The two basic operations performed by a memory chip are "read", in which the data contents of a memory word is read out (nondestructively), and "write" in which data is stored in a memory word, replacing any data that was previously stored there. To increase data rate, in some of the latest types of memory chips such as DDR SDRAM multiple words are accessed with each read or write operation.
In addition to standalone memory chips, blocks of semiconductor memory are integral parts of many computer and data processing integrated circuits. For example the microprocessor chips that run computers contain cache memory to store instructions awaiting execution.
RAM (Random-access memory) has become a generic term for any semiconductor memory that can be written to, as well as read from, in contrast to ROM (below), which can only be read. All semiconductor memory, not just RAM, has the property of random access.
Volatile memory loses its stored data when the power to the memory chip is turned off. However it can be faster and less expensive than non-volatile memory. This type is used for the main memory in most computers, since data is stored on the hard disk while the computer is off. Major types are:
- DRAM (Dynamic random-access memory) which uses memory cells consisting of one capacitor and one transistor to store each bit. This is the cheapest and highest in density, so it is used for the main memory in computers. However the electric charge that stores the data in the memory cells slowly leaks off, so the memory cells must be periodically refreshed (rewritten), requiring additional circuitry. The refresh process is automatic and transparent to the user.
- FPM DRAM (Fast page mode DRAM) An older type of asynchronous DRAM that improved on previous types by allowing repeated accesses to a single "page" of memory to occur at a faster rate. Used in the mid-1990s.
- EDO DRAM (Extended data out DRAM) An older type of asynchronous DRAM which had faster access time than earlier types by being able to initiate a new memory access while data from the previous access was still being transferred. Used in the later part of the 1990s.
- VRAM (Video random access memory) An older type of dual-ported memory once used for the frame buffers of video adapters (video cards).
- SDRAM (Synchronous dynamic random-access memory) This was a reorganization of the DRAM memory chip, which added a clock line to enable it to operate in synchronism with the computer's memory bus clock. The data on the chip is divided into banks so it can work on several memory accesses simultaneously, in separate banks. It became the dominant type of computer memory by about the year 2000.
- DDR SDRAM (Double data rate SDRAM) This was an increased data rate modification, enabling the chip to transfer twice the memory data (two consecutive words) on each clock cycle by double pumping, transferring data on both the leading and trailing edges of the clock pulse. Extensions of this idea are the current (2012) technique being used to increase memory access rate and bandwidth. Since it is proving difficult to further increase the internal clock speed of memory chips, these chips increase data rate by transferring data in larger blocks:
- RDRAM (Rambus DRAM) an alternate double data rate memory standard that was used on some Intel systems but ultimately lost out to DDR SDRAM.
- SGRAM (Synchronous graphics RAM) a specialized type of SDRAM made for graphics adaptors (video cards). It can perform graphics-related operations such as bit masking and block write, and can open two pages of memory at once.
- PSRAM (Pseudostatic RAM) This is DRAM which has circuitry to perform memory refresh on the chip, so that it acts like SRAM, allowing the external memory controller to be shut down to save energy. It is used in a few portable game controllers such as the Wii.
- SRAM (Static random-access memory) which relies on several transistors forming a digital flip-flop to store each bit. This is less dense and more expensive per bit than DRAM, but faster and does not require memory refresh. It is used for smaller cache memories in computers.
- Content-addressable memory This is a specialized type in which, instead of accessing data using an address, a data word is applied and the memory returns the location if the word is stored in the memory. It is mostly incorporated in other chips such as microprocessors where it is used for cache memory.
Nonvolatile memory preserves the data stored in it during periods when the power to the chip is turned off. Therefore it is used for the memory in portable devices, which don't have disks, and for removable memory cards among other uses. Major types are:
- ROM (Read-only memory) This is designed to hold permanent data, and in normal operation is only read from, not written to. Although many types can be written to, the writing process is slow and usually all the data in the chip must be rewritten at once. It is usually used to store system software which must be immediately accessible to the computer, such as the BIOS program which starts the computer, and the software (microcode) for portable devices and embedded computers such as microcontrollers.
- Mask programmed ROM In this type the data is programmed into the chip during manufacture, so it is only used for large production runs. It cannot be rewritten with new data.
- PROM (Programmable read-only memory) In this type the data is written into the chip before it is installed in the circuit, but it can only be written once. The data is written by plugging the chip into a device called a PROM programmer.
- EPROM (Erasable programmable read-only memory) In this type the data in it can be rewritten by removing the chip from the circuit board, exposing it to an ultraviolet light to erase the existing data, and plugging it into a PROM programmer. The IC package has a small transparent "window" in the top to admit the UV light. It is often used for prototypes and small production run devices, where the program in it may have to be changed at the factory.
- EEPROM (Electrically erasable programmable read-only memory) In this type the data can be rewritten electrically, while the chip is on the circuit board, but the writing process is slow. This type is used to hold firmware, the low level microcode which runs hardware devices, such as the BIOS program in most computers, so that it can be updated.
- NVRAM (Flash memory) In this type the writing process is intermediate in speed between EEPROMS and RAM memory; it can be written to, but not fast enough to serve as main memory. It is often used as a semiconductor version of a hard disk, to store files. It is used in portable devices such as PDAs, USB flash drives, and removable memory cards used in digital cameras and cellphones.
- Dawoud, Dawoud Shenouda; R. Peplow (2010). Digital System Design - Use of Microcontroller. River Publishers. pp. 255–258. ISBN 8792329403.
- Godse, A.P.; D.A.Godse (2008). Fundamentals of Computing and Programing. India: Technical Publications. p. 1.35. ISBN 8184315090.
- Arora, Ashok (2006). Foundations of Computer Science. Laxmi Publications. pp. 39–41. ISBN 8170089719.