A clear introduction to definition and difference between DRAM and NAND Flash (1)

Source:   Editor: admin Update Time :2019-05-19

All users may be familiar with the term “memory", because all electronic products must use memory, and usually more than one kind of memory. However, many people are confused about their types, specifications and forms, such as NAND Flash with high price, DRAM mentioned in industrial news, SRAM, SDRAM, DDR 3, DDR 4 and NOR Flash. What are these?
Let's begin with a section of Baidu Encyclopedia.
Memory is used to store programs and data. For a computer, only with memory can it have memory function and ensure normal operation. There are many kinds of memory, which can be divided into main memory and assistant memory according to their uses. The main memory is also called internal memory, referred to as memory, and famous as inner memory in Hong Kong and Taiwan. External memory refers to the memory other than computer memory and CPU cache, which can still save data after power failure. Common external memory includes hard disk, floppy disk, compact disk, U disk, etc.
Simply put, DRAM is the memory we usually use, while NAND Flash is similar to hard disk.
The popularization of science below is designed for freshman, and experience people can skip it.
When choosing equipment, friends who are not familiar with PC knowledge often ask what is the difference between hard disk and memory? Why does PC still run slowly, even if the capacity of hard disk is 1TB.
In fact, the difference between hard disk and memory is whether the data stored in the space will be kept after the power is turned off. Even if the power is turned off, the data storage on the hard disk will not disappear.
However, when we are computing data, it takes too long if the CPU is going to grab data directly from the hard disk. So "memory" serves as a bridge. Data from the hard disk is copied to memory, and then CPU gets the data directly from the memory for calculation. This would be millions of times faster than grabbing data directly from hard disk.
Opening the task manager, you can see how much memory space the executing program is occupied. Many people are accusing Chrome of consuming high computing resources, higher than other browsers. If you open a few pages, memory will be exhausted.
So in a nutshell, computers like people working in the office. drinking drinks, reading books and listening to audio. The more things such as drinking drinks, reading books, listening to music and so on you want to doing at a time, the larger the desktop (memory) is. The other things that are not used for a while will be put in the drawer (hard disk). So even if the hard disk is big, when you want to perform many tasks at a time, it still depends on the size of memory.
Memory processing speed is faster than hard disk, but data in memory will disappear after power failure, and it is more expensive than hard disk.
Of course, there are more details in the hierarchy of memory. See below.
In addition, there is also a storage space called Register inside the CPU. The CPU loads the data from memory into Register, and then lets the digits stored in Register do the operation. After the operation, the CPU stores the results back into memory. CPU and memory are still two different chips, so the speed of grasping data is not as fast as that in the same chip.
There is also exiting another concept “Cache”, which is the intermediate bridge between CPU and memory.
Sorted by computing speed of memory from fast to slow, the order is Register, Cache, memory and Hard Disk. The higher the ranking (closer to the CPU), the faster the speed, the higher the price, and the lower the capacity.
Classification of memory
Electrical memory refers to memory that can read and write data only when powered on. Electrical memory is divided into two main categories, as shown in Figure 1.
Volatile Memory (VM): Data exists when power is turned on. However, data will be lost immediately if power is turned off. Such volatile memory includes SRAM, DRAM, SDRAM, DDR-SDRAM and so on.
Non-Volatile Memory (NVM): Data is present when power is turned on, and data can still be retained after power failure. ROM, PROM, EPROM, EEPROM, Flash ROM, FRAM, MRAM, RRAM, and PCR AM belong to non-volatile memory.


Figure. 1: Classification of memory.
Memory cell
The cell of memory refers to the minimum structure used to access data. If cell of memory consists of a MOS and a capacitor, it’s known as “1T1C”. If cell of memory contains a MOS and a resistor, it’s called “1T1R”. If cell of memory is made up of a diode and a resistor, it’s considered as “1D1R”.
Each cell of memory does not necessarily store only one-bit data. Due to the increasing demand for memory capacity, a cell can store more and more data. According to the number of data bits that a cell stores, it can be divided into single-level cell (SLC), multi-level cell (MLC), three-level cell (TLC) and quad-level cell (QLC), etc.
Memory hierarchy
To understand various memory configurations of electronic products, we must first know about the concept of memory hierarchy. Memory hierarchy refers to how to properly distribute various kinds of memory with different storage capacity, different operation speed and different unit price, in order to achieve the maximum economic benefits with reasonable operation speed, storage capacity and price.
Figure 2 is a schematic diagram of memory hierarchy. From top to bottom, there are register, cache memory, main memory and assistant memory.
Register: A memory within processor that sets the function of processor and stores setting value temporarily.
Cache memory: A memory within processor that is used to temporarily store programs and data when executing programs. SRAM is usually used as cache memory.
Main memory: A memory outside processor that temporarily stores programs and data. It is usually made of DRAM but it has been improved to SDRAM or DDR.
Assistant memory: A memory outside processor that permanently stores programs and data. Assistant memory includes Flash ROM, disk drive, CD-ROM, tape drive and so on.
Different types of memory have different storage capacity, working speed and unit price.
Storage capacity: Assistant memory (GB) is larger than main memory (MB), followed by cache memory (KB). Cache memory is larger than register (B).
Working speed: Assistant memory (1ms) is slower than main memory (10ns). The latter is slower than cache memory (1ns), while cache memory is slower than register (1ns).
Unit Price: Assistant memory is cheaper than main memory, and main memory is cheaper than cache memory. The most expensive is register.

Figure 2: Schematic diagram of memory hierarchy