Sections
Memory is a physical device used to store data and instructions. It can be divided into a large number of individually addressable small units called cells. Memories can be generally classified into two types, Random Access Memory and Read Only Memory.
(a). Random Access Memory (RAM)
A RAM or Random Access Memory constitutes of memory cells that can be randomly accessed. The time required to access every address location in the RAM is same. But in other types of memory, due to mechanical limitation, cells closer to the system can be accessed faster than cells farther from the system. Random Access Memory is very fast and also very expensive. Data stored in it is lost when the supply of the computer is turned off or if there is a power failure. Therefore, RAM is a volatile memory. When power failure occurs, uninterruptable power supply systems are used in computers to avoid errors due to instantaneous data loss.
RAM is classified into two types:
(i). Dynamic RAM (DRAM)
Dynamic RAM is cheap, small and a simple random access memory. It is a memory cell composed of only one capacitor and one transistor. Transistor is used to determine the logic state of the memory cell and the capacitor is used to store the data. Capacitor cannot store charge for a long period of time. Charge will decrease when it is kept idle for some time and the data will be lost. So in dynamic RAM, cells should be continuously refreshed within a certain period of time. For this, DRAM has a refresh circuit that rewrites the data several hundred times per second.
(ii). Static RAM (SRAM)
Unlike DRAM, in SRAM no periodic refreshing is required. Memory retains its contents as long as power is applied. As shown in the above figure, an SRAM memory cell consists of a matrix of six transistors. No capacitors are used to store charge. So, there is no capacitor leakage and therefore periodic refreshment is not required.
(b). Read Only Memory (ROM)
In Read Only Memory, information is stored permanently in the memory cell. We can only read that data but cannot write data on it. ROM is a non-volatile memory, that is, data remains even after power supply is turned off. In a computer, instructions required to start the computer (booting) is stored in the Read Only Memory. ROMs are also used not only in computers but in other electronic devices like washing machine, microwave oven etc. ROM is cheaper than RAM and therefore in applications where a large memory is required and speed is not the greatest concern Read Only Memory is used.
Various types of ROM are listed here.
(i). MROM (Masked Read Only Memory)
Masked ROM is hard-wired device that contains a pre-programmed data. Contents are programmed using photo masks by the integrated circuit manufacturer. The process is called photolithography. Data thus created cannot be reprogrammed by the user.
(ii). PROM (Programmable Read only Memory)
In Programmable Read Only Memory, memory chip is delivered blank, and the programmer transfers the data on to it. Once it is programmed, data is permanent and it cannot be erased. Blank PROMs are manufactured with many fuses and anti fuses which can be burned out during the first programming. PROM are used in applications like computer bios where reprogramming is not required.
(iii). EPROM (Erasable and Programmable Read Only Memory)
EPROM can be erased many number of times and old data can be replaced with new data. Data is erased by exposing the memory chip to ultra-violet light for duration of up to 40 minutes. During programming, an electrical charge is trapped in an insulated gate region of the transistor. Since there is no leakage path, data can be retained for more than ten years. As in the above figure, an EPROM can be easily recognizable by the transparent fused quartz window on the top of the package.
The above figure shows the structure of a memory cell which is similar to a field effect transistor. The only difference is that it has an extra floating gate in addition to a normal gate. EPROM consists of an array of such memory cells. Field-effect transistor is controlled by the voltage on the control gate of the transistor. Like in transistor, the presence of a voltage on this gate creates a conductive channel, switching it on and trapping a charge between floating gate and the channel. When the voltage at the gate is removed, charge stored on the floating gate remains since it is covered by the insulated silicon oxide. To erase this memory, the die is exposed to UV light which ionizes the silicon oxide allowing the stored charge on the floating gate to dissipate.
(iii). EEPROM (Electrically Erasable and Programmable Read Only Memory)
Exposing the memory chip to ultra violet rays each time to erase data is not practically possible. This disadvantage was covered in the EEPROM which can be both programmed and erased electrically. The process can be repeated many number of times without failure. Another advantage of EEPROM is that selective erasing is possible in this. Else for a small correction the entire data would have to be erased and re-written into the chip.
Flash memory is a type of electronically erasable programmable read-only memory. Flash memory is a type of non-volatile memory, that is, it can retain information even after power supply is removed. Unlike EEPROM which can only erase content byte by byte, flash memory can erase blocks of data at a time. Because of this reason, flash memories are preferred for large data storage which requires frequent updates.
Working
Flash memory stores information in an array of memory cells. Each memory cells are made from floating-gate transistors which can store one bit of information. Floating gate transistor resembles a standard MOSFET, except that transistor has two gates (control gate and floating gate) instead of one.
The figure shows the structure of floating gate transistor. Control gate is on top of floating gate, separated from each other by a thin oxide layer. Floating gate is completely isolated, therefore, under normal conditions electrons placed on it remains trapped for many years.
Single bit of data is stored as electric charge in the floating gate of transistor. When a high voltage is applied across gate, source electrons are trapped into the floating gate by either hot electron injection or Fowler-Nordheim tunneling. Charge in the floating gate influences the electric field from the Control Gate, which modifies the threshold voltage of the transistor. Therefore to read data stored in the cell, a possible threshold voltage is applied to the Control Gate and conductivity of the transistor is tested. Conductivity depends on the logic value of data stored in the cell. To erase data, a high voltage with opposite polarity is applied across gate and source of the transistor. Electrons trapped in the floating gate of the transistor are removed by Fowler-Nordheim tunneling. Electron placements in flash memory are altered using Fowler-Nordheim tunneling.
Based on the internal architecture, there are two major forms of flash memories, that is, NAND Flash and NOR Flash. NAND and NOR flash structure resembles the structure of NAND and NOR gate respectively.
In NOR gate flash, one end of each cell is connected directly to the ground line, and the other end directly connected to the bit line. Structure of NOR flash is shown below. This arrangement is similar to that of a NOR gate. That is, when any one of the word lines is set to high, the corresponding storage transistor pull down output bit line to ground level.
If no electrons are trapped in the floating gate of the transistor, bit line is pulled down to ground voltage when appropriate voltage is applied to the control gate. This condition is equivalent to logic one. A NOR flash cell can be set to logic zero by applying an elevated voltage to the Control Gate. Applied voltage initiates electron tunneling onto the Floating Gate by hot-electron injection.
Data store in the flash cell can be erased by applying a large voltage of the opposite polarity between the Control Gate and source terminal. Electric field across gate and source terminal pulls electrons off the Floating Gate through quantum tunneling. Memory cells are grouped into blocks in this architecture. Therefore, it is possible to erase a group of memory cells with a single flash.
In NAND flash, floating-gates of the transistors are connected in series. Internal transistor configuration of a NAND flash is shown in figure. Like NAND gate, output is pulled down to ground only if gates of all transistors are set to high. Extra two transistors at both ends will act as ground select and bit line select respectively.
NAND flash reads faster than it writes. NAND technology offers higher capacity for the same-size silicon therefore it is considerably more compact and less expensive than NOR flash.
Computer memory
A computer with fast and powerful processor needs quick and easy access to large amounts of data. The speed of a computer is in gigahertz range so a compatible memory should be able to access its data at that rate itself. Such memories are very expensive.
This problem can be resolved by memory hierarchy. This is done by using fast and expensive memory in small quantities kept closer to the system and then backing it up with larger quantity of slow and less expensive memory. For this three types are generally used.
(i). Cache Memory
Very high speed semiconductor memory is used as cache memory in the computer. It acts like a buffer between the CPU and main memory. Parts of data and program which are used most frequently by CPU are stored in cache memory. Certain algorithms are used to find out which data is to be kept and which is to be removed from the cache. Only then the efficiency of the processor can be improved. Cache memory is volatile therefore data is lost when power is turned off. It is very expensive, so only very limited capacity cache is used in computers.
(ii). Primary Memory (Main Memory)
Primary memory is at the second level after cache memory. It holds only those data and instructions on which the computer is currently working. Capacity of primary memory is also limited but it is more than cache memory. Primary memory is also a volatile memory in which data is lost when the computer is turned off. Almost every characteristics of primary memory is in between cache memory and secondary memory. The cost of the memory is in between cache and secondary memory. Primary memory is very fast but not as fast as registers.
(iii). Secondary Memory
Secondary memory is large and inexpensive memory when compared to cache and primary memory. It is also known as external memory. Secondary memories are made of magnetic and optical devices so it is non-volatile which means that the data remains even after power supply is removed. It is the slowest type of memory. Processor cannot directly access these memories. Instead they are accessed through input-output routines. First its contents are transferred to the main memory only after which the CPU can access it. Floppy disks, CD-ROM, DVD are some common examples of secondary memory.
Sections