In those years, the memory we used

What is storage?

Storage is a very broad term. We only know that it is a medium for storing data, but it is difficult to sum it up in better words. I can't do it, I can only try my best.

So, let's look at a few pictures first.

 

Figure 1 is Kingston's 64G memory card, Figure 2 is the memory stick on the PC side, and Figure 3 is the USB flash drive commonly used in daily life.

These are the applications of storage technology in daily life. The main core is the storage chip. However, strictly speaking, these are not specific storage, but the finished application composed of storage chip + peripheral equipment.

What really plays a storage role in the memory chip are those memories such as SRAM, DRAM, EPROM, and EEPROM.

Storage is a big family. It has been passed down from generation to generation. There are many types of storage. To distinguish them, there is a rule to follow:

Is it volatile.

The so-called volatile means whether the data in it will be retained after power failure.

This is a direction of continuous development and technological breakthroughs in the early storage field. Later, the problem of volatility was solved, and speed and space became another direction.

First add a stored map:

RAM

  • random access memory, variable memory
  • Volatile
  • Family members: SRAM, DRAM, SDRAM, DDR SDRAM

As the name implies, RAM is characterized by random access, which can store data in any 1-bit area and can be read and written at any time, but once the power is turned off, the data will not be retained. If you really need that data, it can only be stored in a long-term storage before the power is turned off.

Later RAM was further divided into SRAM and DRAM

SRAM

  • SRAM, Static RAM
  • Volatile

Compared with its predecessor RAM, SRAM has a much faster read and write speed. It is currently the fastest memory for reading and writing data. The principle will be mentioned later. It is also because of this that it is quite expensive, and manufacturers can only use it in harsh places, such as the CPU's first-level cache and second-level cache.

DRAM

  • DRAM, Dynamic RAM
  • Volatile
  • Family members: SDRAM, DDR RAM

The read and write speed of DRAM is far from that of SRAM. Although the speed is not as good as that of others, the capacity of DRAM can be large, and the price is cheaper than SRAM, so DRAM will be more useful than SRAM.

Reasons why SRAM and DRAM rates are different:

Although both are developed using RAM, their methods of data storage on the RAM framework are completely different.

SRAM is a static SRAM. Its static is reflected in the use of registers to store information. As long as the power supply voltage is kept constant, the data in the registers will be kept forever, even without refreshing.

DRAM is a dynamic RAM. Its movement is reflected in its refresh mechanism, because it uses the charge on the gate capacitance of the MOS transistor to store information. For a period of time, a refresh mechanism is needed to replenish the charge to the capacitor, and it also needs to be refreshed after each piece of data is read. If one day, DRAM loses its refresh mechanism, even if the power supply is continuous, it will not be able to retain data for a long time.

However, although it has one more refresh mechanism than SRAM, the cost is worth it, because only one MOS is used, so the integration level on a ghost chip can be very high, resulting in its own capacity can also be very high.

That's right, when we play games, the data on the memory stick is refreshed every once in a while. The refresh mechanism regularly checks the gate capacitance. If the power is greater than 1/2 of the full power, it is considered a high level, which is 1, and the capacitor is fully charged. If it is less than 1/2 of the full power, it is considered a low level. , is 0, and the capacitor is discharged to ensure the continuity of the data.

Manufacturers think that DRAM can be further developed to become a new storage device SDRAM. The improvement is that a COU synchronous clock is added, and the communication method is improved to synchronous communication, which makes the speed one step faster, but only at the rising edge. represents a piece of data.

Only one data can be represented on the rising edge, isn't that...

That's right, the developer saw this point, and improved a new storage device - DDR SDRAM.

DDR SDRAM

  • DDR RAM,Date-Date RAM
  • Volatile

The improvement this time is that it can read and write twice with one clock, and both the rising edge and the falling edge can represent a piece of data. It has a very high status in the eyes of merchants and users.

DDR SDRAM has been improved from generation to generation, and has produced one, two, three, and four generations. Now the most used memory on PC is DDR SDRAM, my computer memory stick uses DDR3, and mobile phone memory uses DDR4.

Is there any memory that not only requires data retention, but also allows the existence of power failure? some.

ROM

  • only memory, read-only memory
  • non-volatile
  • Family members: MASK ROM, PROM, EPROM, EEPROM

Even if the ROM is powered off, the data in it will not be lost, and it can be read at any time, yes, it is reading, not reading and writing. This is the shortcoming of ROM. Its content data cannot be changed at will. Once the manufacturer makes it and writes the data, the user can no longer write it.

That is MASK ROM.

MASK ROM

The data in it is written by the manufacturer, and there is no way for the user to change it.

But later the technology matured, and the ROM can write data, but it can only be one-time or requires a special method.

The first to come out is the PROM.

PROM

This is programmable ROM, but it can only be programmed once, and the user can only write it once. Once the data is written, it will not be changed.

But it is still very inconvenient to think about it. Just imagine that if the user shakes his hands for a while or wants to change some parameters during the test, this piece will be scrapped and a new piece will have to be obtained.

Later, as the technology matured, EPROM appeared.

EPROM

EPROM can erase and write data multiple times, which is really a boon for developers, but it is very difficult to find out soon, because it can only erase data in ultraviolet environment, this special environment Erasing is really inconvenient. It takes more than half an hour to erase under ultraviolet light, and it can't be tossed several times in a day. Besides, ordinary developers can't get ultraviolet environment.

EEPROM。

  • Electrically Erasable Programmable Read-Only Memory

This god-like memory has saved countless developers from suffering. This is the most common ROM now, and it is electrically erasable. As long as the power is supplied, it can be erased and written at will.

Not only inherits the advantages of random access, the data can be retained for a hundred years after power failure, and the number of erasures can reach one million. While the reliability is high, the cost is also very obvious. Due to its complex circuit and high cost, EEPROM cannot achieve large-capacity commercial level. At present, it is tens of K to hundreds of K, and very few exceed 512K. Before the company I have used EEPROM for projects, and the highest I have seen is only 1024K.

But this does not prevent the memory from becoming a popular memory, and various types of EEPROMs have been derived, and even developers have considered EEPROM as a general term for such memories as ROM.

It can be seen that even a convenient memory like EEPROM has its limitations. The market has a large-capacity demand. In order to solve the demand, developers have produced Flash.

Flash

  • flash, flash memory
  • non-volatile
  • Family members: NOR Flash, NAND Flash

Strictly speaking, Flash is also a type of EEPROM, so it inherits the excellent qualities of EEPRM: power-off retention, electrical erasure, and million-time erasure.

The improvement of Flash is that it no longer uses bytes as the addressing unit like ROM, but uses "blocks".

The advantages of using "block" as the addressing unit are: first, the circuit is simplified, and second, the data density is reduced, which leads to a reduction in cost. So that flash can involve a large-capacity storage area that EEPROM cannot bear.

There are also two types of Flash in the manufacturer. Let's take a look at the first NOR Flash.

NOR Flash

NOR provides a complete and separate addressing and data bus, so it can read and write in the same way as RAM, all of which are random access, accessing any area on Flash.

But erasing still takes "block" as the unit, so it takes some time to erase in NOR. Just imagine, you want to write 2K data, but you need to erase 4K in advance. This kind of operation is also A bit redundant. Today's chip frequency can run very high, so erasing is a matter of a few milliseconds.

In terms of application, it is easy to understand that NOR can be byte-addressed like ROM, so users can directly read the program in NOR Flash and run it directly. Many single-chip microcomputers will have a NOR Flash to store the startup code.

Next is NAND Flash.

NAND Flash

In NAND, the data lines and address lines are multiplexed, so the ability of random access cannot be achieved, and reading and writing can only be done piece by piece.

It is easy to understand that there is no random access to the continuous storage of the external address bus. This data storage structure not only determines that this kind of NAND user cannot directly run the program in NAND, but also has slow reading speed, simple circuit and high data density. ,small volume.

All lead to the most authentic feedback - cheap.

Moreover, address lines and data lines are multiplexed, and this hard condition makes its reading speed slower than that of NOR; but the erasing and writing speeds are faster, because it is performed in units of "blocks". Write, and the cycle times are several times or even ten times that of NOR.

The most important point is that NAND can mark bad blocks, and even the manufacturer cannot guarantee that each piece of Flash is intact, NAND can skip the broken block, and NOR, if any block is broken, The whole Flash is useless.

NAND emphasizes higher performance, lower cost, smaller size, and longer service life. It is suitable for storing large-capacity data, such as the memory card in Figure 1 at the beginning, the U disk in Figure 3, and even It is a large-capacity solid-state drive, which uses NAND. Of course, it can be used in embedded systems to store file systems and kernels.

Look, use NOR to store the startup program (boot code), and use NAND to store the file system and kernel files.

Everything is clearly arranged by the market.

NADN Flash also has its own derivative product - EMMC.

EMMC

To be precise, this is not a new type of memory, but structurally it is a NAND+ master control IC.

The obvious advantage of this is that it is packaged into an integrated controller, which provides a set of standard interfaces to manage flash memory, mainly for the standard format of embedded memory in products such as mobile phones or tablets, so that developers can focus on product development other parts of .

 

 

Guess you like

Origin blog.csdn.net/weixin_41904238/article/details/105937249