Random Access MemoryRAM), also called main memory, is the same asCPUDirect data exchangeInternal 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 programsData storage media。RAM can write (store) or read (retrieve) information from any specified address at any time during operation.It is related toROMThe biggest difference betweenVolatilityThat is, the stored data will be lost once the power is cut off.RAM in computer anddigital systemUsed temporarily inStored program, data and intermediate results.[1]
Memory isdigital systemThe 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) andread-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 isVolatile 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 accessstorage deviceThe time it takes is related to the location.It is mainly used to store operating systemsapplication 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 offinternal information It also disappeared.[5]
Sensitive to static electricity
Like other fine integrated circuits, random access memory (RAM)electrostatic chargeVery sensitive.Static electricity will interfere with the memorycapacitorData 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 notSpecial 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 theVolatility。[3]
form
Announce
edit
RAM working principle
RAM consists of storage matrix and addressdecoder, read/write controller, input/output, chip selection control, etc.[6]
(1) Storage matrix.As shown in the figure, the core part of RAM is aregisterMatrix, forStore information, called the storage matrix.[6]
(2) Address decoder.The function of the address decoder is to translateBinary numberTranslate into valid row selection signal and column selection signal, so as to select theStorage unit。[6]
(3) Read/write controller.When accessing RAM, performRead operationIt is also controlled by reading and writing signals.During the read operation, the data of the selected celldata line, I/O line toCPU(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 hasOpen collectororTristateOutput structure.[6]
(5) Chip selection control.Due to RAMIntegrationLimitations.One computerstorageThe 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 piecesRoute selection, when a piece ofSegment selectionWhen 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 toStorage unitRAM is divided into static RAM and dynamic RAM.[7]
SRAM
The static storage unit istriggerIt is formed by adding door control tube on the basis of.Therefore, it depends on the self protection function of the triggerStore dataOf.SRAMThe 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 containstransistorMore, soIntegrationLow and high power consumption.[7]
DRAMThe 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 logiclevel"L" capacitorDischargeThe 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 fromstorageRead/write operations are mainly shown in the following points:
(2) The DRAM basic storage circuit can be refreshed at the same time by line, so only theLine Address, no column address is required.[7]
(3) During the refresh operation, the data line of the memory chip appearsHigh resistance stateThat 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 pricea large capacity memoryGenerally used in.The disadvantage of DRAM is that it needs to be refreshedlogical 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 capacitanceNatural conservationInformation 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 makesAccess speedIt is slower than SRAM, so in computer, DRAM is often used forMain memory。[8]
However, due to DRAMStorage unitBecause 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 easyvolatility, i.e. power failureAmnesia。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 isstorage。Memory is used toStored programAnd data components. For computers, only with memory can there bememory function To ensure normal operation.There are many kinds of memory, which can be divided intoMain memoryandAuxiliary memory, main memory is also called internal memoryMemory), auxiliary memory is also calledExternal 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 speedCPUIt'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 anddata 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 developmentDRAMUp to FPMDRAM, EDODRAMSDRAMThe 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 isDynamic 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 toMemory Refresh Operation.[8]