当前位置:网站首页>This is the best flash popular science article I have ever seen!
This is the best flash popular science article I have ever seen!
2022-07-01 09:45:00 【Li Xiaoyao】
Focus on 、 Official account of star standard , Straight to the highlights
source : Bread board community
One 、Flash Memory brief introduction
Flash Memory Is a nonvolatile memory . In embedded system, it is usually used to store the system 、 Applications and data . stay PC In the system , It is mainly used in SSD and motherboard BIOS in .
in addition , Most of them U disc 、SDCard And other mobile storage devices are also used Flash Memory As a storage medium .
Two 、Flash Memory The main characteristics of
Compared with traditional hard disk storage ,Flash Memory With light weight 、 Low energy consumption 、 Small volume 、 Strong anti-seismic ability , But there are also many limitations , Mainly as follows :
You need to erase before writing
Flash Memory There are certain restrictions on writing data . It can only set the current as 1 The bits of are rewritten as 0, It is not possible to have 0 The bits of are rewritten as 1, Only in the erase operation , To rewrite the whole block of bits into 1.The number of block erasures is limited
Flash Memory There is a limit on the number of erasures for each block of data ( 100000 to millions of times ), After more than a certain number of erasures , This data block will not be able to reliably store data , Become a bad block .
In order to maximize the extension Flash Memory Life span of , In software, you need to do erasure balance (Wear Leveling), Write through dispersion 、 Dynamic mapping and other means to balance the use of various data blocks . meanwhile , The software also needs bad block management (Bad Block Management,BBM), Identify bad block , Do not let bad blocks participate in data storage .( notes : In addition to the bad blocks caused by erasure ,Flash Memory Bad blocks will also be produced in the production process , That is, inherent bad block .)Read and write interference
Due to the physical characteristics of hardware implementation ,Flash Memory When reading and writing , It may cause bit flipping of other adjacent bits , Cause data exception . This exception can be recovered by re erasing .Flash Memory It is often used in applications ECC And other algorithms for error detection and data correction .Charge leakage
Stored in Flash Memory Charge of storage unit , If not used for a long time , There will be a charge leak , Causing data errors . But it takes a long time , Usually about ten years . This abnormality is not permanent , Re erasure can restore .
3、 ... and 、NOR Flash and NAND Flash
According to the different storage principles on the hardware ,Flash Memory Mainly can be divided into NOR Flash and NAND Flash Two types of . The main differences are as follows :
NAND Flash The reading speed is the same as NOR Flash Close , It varies according to the interface ;
NAND Flash Write speed ratio of NOR Flash Much faster ;
NAND Flash Erase speed ratio NOR Flash Much faster ;
NAND Flash Maximum wipe times ratio NOR Flash many ;
NOR Flash Support on-chip execution , You can run code directly on it ;
NOR Flash Software driver ratio NAND Flash Simple ;
NOR Flash Data can be read randomly by byte ,NAND Flash Need to read by block .
Large capacity NAND Flash Than NOR Flash The cost is much lower , And smaller ;
( notes :NOR Flash and NAND Flash All erasures are performed in blocks , When performing an erase or write operation ,NOR Flash About need 5s, and NAND Flash Usually no more than 4ms.)
1、NOR Flash
NOR Flash According to CPU Different end interfaces , Can be divided into Parallel NOR Flash and Serial NOR Flash Two types of .
Parallel NOR Flash You can access Host Of SRAM/DRAM Controller On , The stored content can be directly mapped to CPU address space , No need to copy to RAM Can be CPU visit , Therefore, on-chip execution is supported .Serial NOR Flash Cost ratio Parallel NOR Flash low , Mainly through SPI Interface and Host Connect .

Whereas NOR Flash The erasure speed is slow , High cost characteristics ,NOR Flash Mainly used in small capacity 、 Scenarios with less content updates , for example PC a main board BIOS、 Router system storage, etc .
2、NAND Flash
NAND Flash It needs to be done through special NFI(NAND Flash Interface) And Host End to end communication , As shown in the figure below :

NAND Flash According to the number of memory bits in each storage unit , Can be divided into SLC(Single-Level Cell)、MLC(Multi-Level Cell) and TLC(Triple-Level Cell) Three types of . among , In a storage unit ,SLC Can be stored 1 A bit ,MLC Can be stored 2 A bit ,TLC You can store 3 A bit .
NAND Flash Inside a storage unit of , Through different voltage levels , To represent the stored information . stay SLC in , The voltage of the storage unit is divided into two levels , respectively 0 and 1 Two states , namely 1 A bit . stay MLC in , The voltage of the memory cell is divided into 4 Level , respectively 00 01 10 11 Four states , namely 2 A bit . Empathy , stay TLC in , The voltage of the memory cell is divided into 8 Level , Storage 3 Bits of information .

NAND Flash The more bits are stored in a single storage unit of , The worse the read-write performance will be , The shorter the life , But the cost will be lower .Table 1 in , The cost and life data under the specific process and technical level are given .

Compared with NOR Flash,NAND Flash Good write performance , Low cost with large capacity . at present , The vast majority of mobile devices such as mobile phones and tablets eMMC Inside Flash Memory All belong to NAND Flash.PC It is also used in the solid state drive in NAND Flash.
Four 、ROW flash and managed flash
because Flash Memory There is erasure by block 、 Limit of erasure times 、 Read and write interference 、 Limitation of charge leakage , In order to give full play to Flash Memory The value of , Usually there needs to be a special software layer , Implement bad block management 、 Erasure balance 、ECC、 Garbage collection, etc , This software layer is called FTL(Flash Translation Layer).
In the implementation , according to FTL Different locations , You can put Flash Memory It is divided into Raw Flash and Managed Flash Two types of .

1、Raw Flash
In such applications , stay Host The end usually has a special FTL perhaps Flash File system to achieve bad block management 、 Functions such as erasure balance .Host The software complexity of the terminal is high , But the cost of the overall scheme is low , It is often used in price sensitive embedded products .
What we usually say is NOR Flash and NAND Flash All belong to this type .
2、Managed Flash
Managed Flash In its internal integration Flash Controller, Used to complete erasure equalization 、 Bad block management 、ECC Check and other functions . Compare with directly Flash Access to Host End ,Managed Flash Shielded Flash The physical properties of , Yes Host Provide standardized interfaces , Can reduce the Host The complexity of end software , Give Way Host Focus on the upper business , Omit right Flash Take special care of .
The copyright belongs to the original author , If there is any infringement , Please contact to delete .
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
Pay attention to my WeChat official account , reply “ Add group ” Join the technical exchange group according to the rules . Focus on the programmer programming base , reply “pdf” Get the list of classic books that programmers must read , Program together and advance together . Click on “ Read the original ” See more sharing , Welcome to share 、 Collection 、 give the thumbs-up 、 Looking at .边栏推荐
- js变量提升(hoisting)
- How Kolo enables NFT music industry
- Live broadcast management project
- SQL学习笔记(04)——数据更新、查询操作
- PHP string to binary conversion
- MT7628K eCos开发入门
- Niuke monthly race 22 tree sub chain
- 7-Zip 遭抵制?呼吁者定下“三宗罪”:伪开源、不安全、作者来自俄罗斯!
- Swag init error: cannot find type definition: response Response
- Introduction to expressions and operators in C language
猜你喜欢

Wechat emoticons are written into the judgment, and the OK and bomb you send may become "testimony in court"

HMS core audio editing service 3D audio technology helps create an immersive auditory feast

云原生到底是什么?它会是未来发展的趋势吗?

SQL learning notes (01) - basic knowledge of database

SQL学习笔记(01)——数据库基本知识

JS原型链

那个程序员,被打了。

主流实时流处理计算框架Flink初体验

Dotnet console uses microsoft Maui. Getting started with graphics and skia

炒币,亏了1000万。
随机推荐
硬件中台项目
JS functionarguments object
2022.02.15_ Daily question leetcode six hundred and ninety
嵌入式开发用到的一些工具
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
Precautions for lvgl v8.2 string display on keil MDK (take little bear pie as an example)
睡了二哥。。。
富文本实现插值
LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
CSDN一站式云服务开放内测,诚邀新老用户来抢鲜
PHP array functions (merge, split, append, find, delete, etc.)
js作用域链与闭包
The latest masterpiece of Alibaba, which took 182 days to produce 1015 pages of distributed full stack manual, is so delicious
PHP merges multiple arrays. The same element takes the intersection of different elements to form an array
123. how to stop a thread?
【无标题】
JS prototype inheritance can only inherit instances, not constructors
HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴
ES6 const essence and completely immutable implementation (object.free)
JS use toString to distinguish between object and array
