• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 论文 •    下一篇

基于堆排序的片上Nor Flash损耗均衡硬件快速实现

徐书韬1,黄凯1,黄凯杰2,蒋小文1,张晓濛1   

  1. (1.浙江大学信息与电子工程学院,浙江 杭州 310027;2.杭州朔天科技有限公司,浙江 杭州 310012)
  • 收稿日期:2016-05-18 修回日期:2016-10-17 出版日期:2017-11-25 发布日期:2017-11-25
  • 基金资助:

    国家863计划(2012AA041701)

Fast hardware implementation of on-chip
Nor Flash wear leveling based on heap-sort
 

XU Shu-tao1,HUANG Kai1,HUANG Kai-jie2,JIANG Xiao-wen1,ZHANG Xiao-meng1   

  1. (1.College of Information Science & Electronic Engineering,Zhejiang University,Hangzhou 310027;
    2.Sec-Chip Co.,Ltd.,Hangzhou 310012,China)
  • Received:2016-05-18 Revised:2016-10-17 Online:2017-11-25 Published:2017-11-25

摘要:

传统的Flash损耗均衡的实现大部分都是针对Nand Flash,且基本都是通过文件系统进行的。针对Nor Flash损耗均衡的研究较少,而且对于无法植入操作系统或者植入代价过大的情况,文件系统的方法将不再适用。在硬件层面实现了Flash损耗均衡算法,以满足上述应用条件,同时大大减少了芯片软件层面的开销。通过Verilog语言实现了损耗均衡、地址映射、垃圾回收、Flash接口等四个模块,每次写操作到来时通过堆排序寻找擦写次数最小的块,将其物理地址与虚拟地址对应并更新到地址映射表,并在垃圾块达到一定数量时进行回收操作,从而实现Flash的损耗均衡。实验结果表明,硬件实现的损耗均衡算法在初始化、堆删除、读操作的时间消耗上分别比软件算法最多快了14、16.4、17.8倍,获得了较大的速度提升。
 

关键词: Nor Flash, 损耗均衡, 硬件实现, 堆排序, Verilog

Abstract:

Traditional implementation methods of Flash wear leveling mainly base on file system and focus on Nand Flash, while the wear leveling of Nor Flash is ignored. Nor Flash sometimes fails to be embedded in the operating system, and the cost can be too huge, so wear leveling cannot be implemented through the file system. We implement Flash wear leveling on hardware to solve this problem and reduce software cost. Four modules, which are wear leveling, address mapping, garbage collection and Flash interface unit, are implemented by Verilog. When a write request arrives, the sector which has the minimum erase time is found by the heap-sort, the virtual address is connected to the sector's physical address, and the address mapping list is updated. When the number of garbage sectors reaches a threshold value, garbage collection starts. Finally,  experimental results show that the operation time of initialization, heap deletion and read in hardware wear leveling algorithm is at most 14, 16.4 and 17.8 times faster than those of software algorithms respectively.

Key words: Nor Flash, wear leveling, hardware implementation, heap-sort, Verilog