Random access memory

Internal memory for direct data exchange with CPU
Collection
zero Useful+1
zero
synonym RAM (RAM) generally refers to random access memory
Random Access Memory RAM ), also called main memory, is the same as CPU Direct data exchange Internal memory It can read and write at any time (except when refreshing), and is fast. It is usually used as a temporary for the operating system or other running programs Data storage media RAM can write (store) or read (retrieve) information from any specified address at any time during operation. It is related to ROM The biggest difference between Volatility That is, the stored data will be lost once the power is cut off. RAM in computer and digital system Used temporarily in Stored program , data and intermediate results. [1]
Chinese name
Random access memory
Foreign name
random access memory
Storage principle
from trigger Store data
Unit structure
Six tube NMOS or OS composition
Abbreviation
RAM

brief introduction

Announce
edit
Memory is digital system The device or component used to store a large amount of information in is an important part of computers and digital equipment. Memory can be divided into random access memory (RAM) and read-only memory (ROM).
Random access memory (RAM) can not only store information to the designated unit, but also read information from the designated unit. Any information stored in RAM will be lost after power failure, so RAM is Volatile memory
ROM is read-only memory, except fixed Store data , tables, curing procedures Combinational logic circuit It also has a wide range of uses. [2]

characteristic

Announce
edit

random access

Static random access memory
The so-called“ random access ”, which means that when the data in the memory is read or written, the time required is independent of the position where the information is located or written. Relative, read or write sequential access storage device The time it takes is related to the location. It is mainly used to store operating systems application program , data, etc. [3]
When RAM is in normal operation, data can be read from or written to RAM. Compared with ROM, RAM has the advantages of convenient read/write and flexible use, especially suitable for situations where data is frequently and quickly changed. [4]

Volatility

When the power is turned off, RAM cannot retain data. If data needs to be saved, they must be written to a long-term storage device (such as a hard disk). [3]
The working feature of RAM is that after power on, data information can be accessed at any location unit at any time. After power off internal information It also disappeared. [5]

Sensitive to static electricity

Like other fine integrated circuits, random access memory (RAM) electrostatic charge Very sensitive. Static electricity will interfere with the memory capacitor Data loss and even circuit burnout are caused by the charge of. Therefore, before touching the RAM, you should touch the metal grounding with your hands. [3]

Access speed

Modern random access memory has the fastest write and read speed among almost all access devices, and the access delay is insignificant compared with other storage devices involving mechanical operation. [3]

Refresh required

Modern random access memories rely on capacitors to store data. After the capacitor is fully charged, it represents 1( Binary ), which is not charged represents 0. Since the capacitor has more or less leakage, if not Special treatment , data will gradually lose over time. Refresh refers to reading the state of the capacitor regularly, and then recharging the capacitor according to the original state to make up for the lost charge. The need to refresh just explains the Volatility [3]

form

Announce
edit
RAM working principle
RAM consists of storage matrix and address decoder , read/write controller, input/output, chip selection control, etc. [6]
(1) Storage matrix. As shown in the figure, the core part of RAM is a register Matrix, for Store information , called the storage matrix. [6]
(2) Address decoder. The function of the address decoder is to translate Binary number Translate into valid row selection signal and column selection signal, so as to select the Storage unit [6]
(3) Read/write controller. When accessing RAM, perform Read operation It is also controlled by reading and writing signals. During the read operation, the data of the selected cell data line , I/O line to CPU Central processing unit ); During the write operation, the CPU stores the data into the selected unit through the input/output line and data line. [6]
(4) Input/output. RAM exchanges data with the CPU of the computer through the input/output terminal. It is the output terminal when reading, and the input terminal when writing. It is controlled by the read/write control line. The number of data lines at the input/output end is the same as the number of registers corresponding to an address. Some RAM chips have separate input/output ends. Usually, the output end of RAM has Open collector or Tristate Output structure. [6]
(5) Chip selection control. Due to RAM Integration Limitations. One computer storage The system is often composed of many RAM. When the CPU accesses the memory, it can only access one piece (or several pieces) of RAM at a time, that is, only one address in one piece (or several pieces) of RAM in the memory receives CPU access and exchanges information with it, while other pieces of RAM have no connection with the CPU. Chip selection is used to achieve this control. Usually one piece of RAM has one or several pieces Route selection , when a piece of Segment selection When the active level is accessed, the chip is selected, and the output signal of the address decoder controls an address register of the chip to connect with the CPU; When the chip line selection is connected to the invalid power level, the chip is disconnected from the CPU. [6]

category

Announce
edit
according to Storage unit RAM is divided into static RAM and dynamic RAM. [7]

SRAM

The static storage unit is trigger It is formed by adding door control tube on the basis of. Therefore, it depends on the self protection function of the trigger Store data Of. SRAM The stored information can be kept for a long time without power failure, and the state is stable, without additional refresh circuit, thus simplifying the external circuit design. However, because the SRAM basic storage circuit contains transistor More, so Integration Low and high power consumption. [7]
SRAM features are as follows:
● Storage principle: trigger Store data. [8]
● Unit structure: six tubes NMOS or OS Composition. [8]
● Advantages: fast, simple to use, no need to refresh Static power consumption Very low; It is often used as a cache. [8]
● Disadvantages: many components, low integration, and large power consumption. [8]
● Common SRAM integrated chip :6116( 2K × 8 bits), 6264 (8K × 8 bits), 62256 (32K × 8 bits), 2114 (1K × 4 bits). [8]

Dynamic random access memory

DRAM The principle of using capacitance to store charge is used to store information. The circuit is simple and the integration is high. Because any capacitor has leakage, when the capacitor stores charge, the discharge of the capacitor will lead to the loss of charge for a period of time, and the stored information will be lost. The solution is to read and re write DRAM every certain time (usually 2ms), so that the original is in logic level "L" capacitor Discharge The charge of "0" is supplemented again, and the capacitor at the original level "0" remains "0". This process is called DRAM refresh. [7]
The refresh operation of DRAM is different from storage Read/write operations are mainly shown in the following points:
(1) Refresh address is refreshed by Address counter Generated not by Address bus Yes. [7]
(2) The DRAM basic storage circuit can be refreshed at the same time by line, so only the Line Address , no column address is required. [7]
(3) During the refresh operation, the data line of the memory chip appears High resistance state That is, the on-chip data line is completely isolated from the external data line. [7]
Compared with SRAM, DRAM has the advantages of high integration, low power consumption and low price a large capacity memory Generally used in. The disadvantage of DRAM is that it needs to be refreshed logical circuit , and normal read and write operations cannot be performed during the refresh operation. [7]
DRAM features are as follows:
● Storage principle: the principle that MOS tube grid capacitor can store charge needs to be refreshed (early: three tube basic unit; later: single tube basic unit). [8]
● Refresh (regeneration): in order to supplement the missing charge in time to avoid the loss of stored information, it is necessary to supplement the charge to the grid capacitor regularly. [8]
● Refresh time: the time for regular refresh operation. This time must be less than the grid capacitance Natural conservation Information time (less than 2ms). [8]
● Advantages: far higher integration than SRAM, low power consumption and low price. [8]
● Disadvantages: the peripheral circuit is complicated due to the need to refresh; Refresh also makes Access speed It is slower than SRAM, so in computer, DRAM is often used for Main memory [8]
However, due to DRAM Storage unit Because of its simple structure, less components, high integration and low power consumption, it has become the mainstream product of large capacity RAM. [8]

Related concepts

Announce
edit

Different from read-only memory

Dynamic random access memory
In a computer, RAM and ROM are data memory. RAM is random access memory, which is characterized by easy volatility , i.e. power failure Amnesia ROM usually refers to fixed memory (write once, read repeatedly), which is the opposite of RAM. For example, if a power failure occurs suddenly or the file is closed without saving, the ROM can randomly save the previously unsaved file, but RAM will make the previously unsaved file disappear. [8]

Relationship with memory

Notebook memory
There is a very important part in the computer structure, that is storage Memory is used to Stored program And data components. For computers, only with memory can there be memory function To ensure normal operation. There are many kinds of memory, which can be divided into Main memory and Auxiliary memory , main memory is also called internal memory Memory ), auxiliary memory is also called External memory (referred to as external storage). External storage is usually magnetic media or optical disks, such as hard disks, floppy disk , tape, CD, etc., can store information for a long time, and does not rely on electricity to store information, but is driven by mechanical parts, with speed CPU It's much slower than that. Memory refers to the storage part on the motherboard. It is the part with which the CPU communicates directly and stores data. It stores data and programs currently in use (i.e., in execution). Its physical essence is that one or more groups have data input/output and data storage The memory of functional integrated circuits is only used to temporarily store programs and data. Once the power is turned off or power is cut off, the programs and data will be lost. [8]
Fast periodic random access memory
There is memory as soon as there is a computer. Memory has also undergone many technical improvements since its development DRAM Up to FPMDRAM, EDODRAM SDRAM The speed of memory has been improving and the capacity has also been increasing. What kind of memory does the server use today? Registered ECC SDRAM is commonly used by IA servers. [8]
Since memory is used to store data and programs currently in use (that is, in execution), how does it work? The computer memory we usually refer to is Dynamic memory (DRAM). The so-called "dynamic" in dynamic memory means that after we write data to DRAM, the data will be lost after a period of time, so we need to set an additional circuit to Memory Refresh Operation. [8]