Device Selection Memory Chapter-How to Choose Memory for Embedded System

Compiled version: V1.0

1. What are the memories of commonly used embedded operating systems?

Memory is roughly divided into two categories, one is that the stored information will be lost after power failure, which is called "volatile memory", and the other is that the stored information is retained after power failure, which is called "non-volatile memory". ,The branch is shown in the figure below:

Insert picture description here

2. The characteristics, usage scenarios and scope of each memory?

2.1 SRAM:

-Features:

1. SRAM uses bistable flip-flops to store information. As long as the power is not turned off, the information will not be lost.

2. SRAM read speed is the fastest in the current memory.

3. SRAM has low integration, high power consumption, large volume with the same capacity, and high price.

-Usage scenarios and scope:

Generally, small-capacity SRAM is used as a cache between a higher-speed CPU and a lower-speed DRAM.

2.2 SDRAM(Synchronous DRAM):

-Features:

1. DRAM uses MOS (Metal Oxide Semiconductor) capacitors to store charges to store information. Therefore, it is necessary to continuously charge the capacitors to maintain information.

2. SDRAM is based on a dual memory bank structure and contains two interleaved memory arrays. When the CPU accesses data from one memory bank or array, the other is ready for reading and writing data. With close switching, the reading efficiency can be doubled.

3. SDRAM locks the CPU and RAM together through the same clock, so that RAM and CPU can share a clock cycle and work synchronously at the same speed.

-Usage scenarios and scope:

Used to expand program code storage space, execution or calculation, similar to memory

2.3 DDR SDRAM

-Features:

DDR SDRAM is basically the same as SDRAM. The difference is that it can read and write data twice in one clock, which doubles the data transmission speed.

-Usage scenarios and scope:

It is generally used in systems that require high-speed buffering of large amounts of data, such as image processing and high-speed data acquisition.

2.4 EEPROM

-Features:

1. EEPROM can randomly access and modify any byte, and write 0 or 1 to each bit.

2. The data will not be lost after the EEPROM is powered off, it can be kept for 100 years and can be erased and written 100w times.

3. It has high reliability, but the circuit is complicated and the cost is high. Therefore, the current EEPROM is several kilobytes, and rarely exceeds 512k bytes.

-Usage scenarios and scope:

EEPROM can be used to store some variables (configuration parameters and a small amount of data), which can be modified as needed, and these variables will not change after power-off.

2.5 NOR FLASH

-Features:

1. Execution in the chip (XIP, execute in place), the program can be executed directly in the NOR FLASH chip, and it can be run directly without copying to RAM.

2. The data line is separated from the address line, which can realize the random addressing function like ram, and can read any byte.

3. NOR FLASH reads and RAM are of very different types. As long as the data address can be provided, the data bus can correctly give data, but it cannot be directly written. The write operation needs to follow a specific command series, which is ultimately determined by the internal chip The control unit completes the write operation.

4. From the perspective of the smallest access unit, NOR FLASH is generally divided into 8-bit and 16-bit (some support both 8-bit mode and 16-bit mode).

5. The transmission efficiency of NOR FLASH is very high, and it has high cost-effectiveness in the small capacity of 1~4MB, but the very low writing and erasing speed greatly affects its performance. (NOR requires that all bits in the target block be written as 1 before erasing. When erasing NOR devices, it is done in blocks of 64-128KB, and the time to perform a write/erase operation is 5s. )

-Usage scenarios and scope:

NOR FLASH is generally only used to store small-capacity program codes or data storage, and no modification is allowed during operation.

2.6 NAND FLASH

-Features:

1. NAND FLASH is erased by block, data line and address line are multiplexed, address line cannot be used for random addressing, and reading can only be read by page.

2. Due to the multiplexing of NAND FLASH pins, the reading speed is a bit slower than NOR FLASH, but the erasing and writing speed is much faster than NOR FLASH.

3. The internal circuit of NAND FLASH is simpler, so the data density is large, the volume is small, and the cost is also low. Therefore, the large-capacity FLASH is of NAND type.

4. In terms of service life, the erasing times of NAND FLASH is several times that of NOR. Moreover, NAND FLASH can mark bad blocks, so that the software skips the bad blocks. Once the NOR FLASH is damaged, it can no longer be used.

-Usage scenarios and scope

NAND FLASH structure can provide extremely high cell density, can reach high storage density, and write and erase speed is also very fast, suitable for high data storage density solutions.

3. How to select the memory type?

-According to the storage requirements in the system, and the use scenarios and scope of each memory to be selected (boot storage and configuration storage must be non-volatile memory, flash memory for program storage, or data storage requirements)

-Determine the memory capacity (large-capacity pin to pin can be replaced) and cost control (different memory production processes are different).

-Determine the memory interface type and development cycle (universal).

-Determine the life of the memory (different FLASH erasable times are different)

Guess you like

Origin blog.csdn.net/sinat_41653350/article/details/113751313