CN101872318A - Data access method for flash memory, its storage system and controller - Google Patents
Data access method for flash memory, its storage system and controller Download PDFInfo
- Publication number
- CN101872318A CN101872318A CN200910133685A CN200910133685A CN101872318A CN 101872318 A CN101872318 A CN 101872318A CN 200910133685 A CN200910133685 A CN 200910133685A CN 200910133685 A CN200910133685 A CN 200910133685A CN 101872318 A CN101872318 A CN 101872318A
- Authority
- CN
- China
- Prior art keywords
- data
- flash memory
- sub
- read
- fast
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000012937 correction Methods 0.000 claims abstract description 89
- 230000005540 biological transmission Effects 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 7
- 125000004122 cyclic group Chemical group 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 5
- 238000007689 inspection Methods 0.000 claims 6
- 230000005055 memory storage Effects 0.000 description 26
- 238000010586 diagram Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 4
- 208000034100 susceptibility to 1 basal cell carcinoma Diseases 0.000 description 4
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 208000033079 susceptibility to 2 basal cell carcinoma Diseases 0.000 description 2
- 208000033072 susceptibility to 3 basal cell carcinoma Diseases 0.000 description 2
- 208000033074 susceptibility to 4 basal cell carcinoma Diseases 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Read Only Memory (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种用于快闪记忆体的资料存取方法及使用此方法的快闪记忆体储存系统与快闪记忆体控制器。The invention relates to a data access method for flash memory, a flash memory storage system and a flash memory controller using the method.
背景技术Background technique
数码相机、手机与MP3在这几年来的成长十分迅速,使得消费者对数码内容的储存需求也急速增加。由于快闪记忆体(Flash Memory)具有资料非挥发性、省电、体积小与无机械结构等的特性,适合使用者随身携带作为数码档案传递与交换的储存媒体。固态硬碟(Solid State Drive,SSD)就是以快闪记忆体作为储存媒体的一个例子,并且已广泛使用于电脑主机系统中作为主硬碟。The rapid growth of digital cameras, mobile phones and MP3 players in recent years has led to a rapid increase in consumers' demand for digital content storage. Due to the characteristics of non-volatile data, power saving, small size and no mechanical structure, Flash Memory is suitable for users to carry as a storage medium for digital file transmission and exchange. Solid State Drive (SSD) is an example of using flash memory as a storage medium, and has been widely used as a main hard disk in computer host systems.
在使用快闪记忆体作为储存媒体的快闪记忆体储存系统中进行资料存取时,快闪记忆体储存系统会通过一错误校正电路来执行一错误校正程序来验证所存取的资料是否正确。具体来说,当使用者欲写入资料至快闪记忆体储存系统时,系统会为此资料产生一错误校正码并且将欲写入的资料与所产生的错误校正码写入快闪记忆体中。之后,当使用者欲读取此资料时,系统会从快闪记忆体中读取此资料及其错误校正码并且根据所读取的错误校正码检查与校正所读取的资料,由此确保所读取资料的正确性。特别是,错误校正电路与错误校正码会根据不同的校正能力而有所不同。也就是说,较低阶的错误校正电路与错误校正码仅能检查与校正较少的错误位元,而较高阶的错误校正电路与错误校正码可检查与校正较多的错误位元,其中储存较高阶的错误校正码所需的储存空间会大于储存较低阶的错误校正码所需的储存空间。When accessing data in a flash memory storage system that uses flash memory as a storage medium, the flash memory storage system will perform an error correction process through an error correction circuit to verify whether the accessed data is correct . Specifically, when the user intends to write data into the flash memory storage system, the system will generate an error correction code for the data and write the data to be written and the generated error correction code into the flash memory middle. Later, when the user wants to read the data, the system will read the data and its error correction code from the flash memory and check and correct the read data according to the read error correction code, thus ensuring The correctness of the information read. In particular, the error correction circuits and error correction codes vary according to different correction capabilities. That is to say, lower-order error correction circuits and error correction codes can only check and correct fewer error bits, while higher-order error correction circuits and error correction codes can check and correct more error bits. The storage space required for storing the higher order error correction codes is greater than the storage space required for storing the lower order error correction codes.
在快闪记忆体储存系统的设计上,一般来说,快闪记忆体储存系统的快闪记忆体包括多个实体区块(physical block),并且每一实体区块具有多个页面(page),而资料是以页面为单位写入快闪记忆体中。每一页面由资料位元区与冗余位元区所组成,资料位元区用以储存欲写入的资料,而冗余位元区用以储存此页面相关的控制资讯与错误校正码(Error Correction Code,ECC)。例如,当页面以1个扇区(即,512位元组)来配置时,此页面的资料位元区会以512个位元组来配置且冗余位元区会以16个位元组来配置,其中在冗余位元区中的6个位元组用以储存此页面的控制资讯而10个位元组用以储存用于此页面的错误校正码,也就是说10个位元组即足够储存对应512个位元组资料的错误校正码。In the design of the flash memory storage system, generally speaking, the flash memory of the flash memory storage system includes a plurality of physical blocks (physical blocks), and each physical block has a plurality of pages (pages). , and the data is written into the flash memory in units of pages. Each page is composed of a data bit area and a redundant bit area. The data bit area is used to store the data to be written, and the redundant bit area is used to store the control information and error correction code related to this page ( Error Correction Code, ECC). For example, when a page is configured with 1 sector (i.e., 512 bytes), the data byte area of this page will be configured with 512 bytes and the redundant byte area will be configured with 16 bytes To configure, in which 6 bytes in the redundant byte area are used to store the control information of this page and 10 bytes are used to store the error correction code for this page, that is to say, 10 bits One set is enough to store an error correction code corresponding to 512 bytes of data.
随着快闪记忆体技术的发展,每一页面的容量不断的增加。例如,目前已发展出1个页面具有4个扇区(即,2048位元组)的快闪记忆体。随着1个页面中可储存的位元组的数目增加,因此用于此页面错误校正码的校正能力也需提升,方能有效的确保页面中资料的正确性。因此,在以2048位元组来配置资料位元区的页面中,冗余位元区会以61位元组来配置,其中8位元组用以储存控制资讯而53位元组用以储存对应2048位元组的资料的错误校正码。With the development of flash memory technology, the capacity of each page continues to increase. For example, a flash memory with 4 sectors (ie, 2048 bytes) per page has been developed. As the number of bytes that can be stored in a page increases, the correction capability of the error correction code for this page also needs to be improved, so as to effectively ensure the correctness of the data in the page. Therefore, in a page that configures the data byte area with 2048 bytes, the redundant byte area will be configured with 61 bytes, of which 8 bytes are used to store control information and 53 bytes are used to store Error correction code corresponding to 2048 bytes of data.
一般来说,电脑系统以扇区为单元来存取资料,因此在快闪记忆体的页面由4个扇区所组成的快闪记忆体储存系统的例子中,由于页面中的错误校正码根据4个扇区的资料来产生,所以既使电脑系统仅读取此页面中的1个扇区的资料时,快闪记忆体储存系统仍须读取此页面中完整的资料(即,4个扇区内的资料)并且以其对应的错误校正码来执行错误校正程序。基此,在电脑系统读取少量资料的例子中,此种存取方式将会严重影响快闪记忆体储存系统的存取速度。Generally speaking, a computer system accesses data in units of sectors. Therefore, in the example of a flash memory storage system in which a page of a flash memory consists of 4 sectors, since the error correction code in the page is based on The data of 4 sectors is generated, so even if the computer system only reads the data of 1 sector in this page, the flash memory storage system still has to read the complete data in this page (that is, 4 sector data) and perform error correction procedures with their corresponding error correction codes. Based on this, in an example where a computer system reads a small amount of data, this access method will seriously affect the access speed of the flash memory storage system.
发明内容Contents of the invention
本发明的一目的是提供一种资料存取方法,其能够有效地提升在快闪记忆体中读取资料的速度。An object of the present invention is to provide a data access method, which can effectively increase the speed of reading data in a flash memory.
本发明的另一目的是提供一种快闪记忆体控制器,其能够有效地提升在快闪记忆体中读取资料的速度。Another object of the present invention is to provide a flash memory controller, which can effectively increase the speed of reading data in the flash memory.
本发明的再一目的是提供一种快闪记忆体储存系统,其能够有效地提升在快闪记忆体中读取资料的速度。Another object of the present invention is to provide a flash memory storage system, which can effectively increase the speed of reading data in the flash memory.
为实现上述目的,本发明提出一种资料存取方法,用于在一快闪记忆体中存取一资料。此资料存取方法包括从一主机系统中接收资料,其中所接收的资料包括多个子资料。此资料存取方法也包括为所接收的资料产生一错误校正码(Error Correction Code,ECC),并且将所接收的资料和所产生的错误校正码写入快闪记忆体中。并且,此资料存取方法还包括为每一子资料产生对应的一位元检查码,以及将所产生的位元检查码写至快闪记忆体中。To achieve the above object, the present invention provides a data access method for accessing a data in a flash memory. The data access method includes receiving data from a host system, wherein the received data includes multiple sub-data. The data access method also includes generating an error correction code (Error Correction Code, ECC) for the received data, and writing the received data and the generated ECC into the flash memory. Moreover, the data access method also includes generating a corresponding one-bit check code for each sub-data, and writing the generated one-bit check code into the flash memory.
为实现上述目的,本发明还提出一种快闪记忆体控制器,用以在一快闪记忆体中存取一资料,此快闪记忆体控制器包括微处理器单元以及连接此微处理器单元的主机界面单元、快闪记忆体界面单元、记忆体操作单元、错误校正单元与位元检查单元。主机界面单元用以连接一主机系统并从主机系统中接收资料,其中所接收的资料包括多个子资料。快闪记忆体界面单元并且用以连接快闪记忆体。错误校正单元用以为所接收的资料产生一错误校正码,其中记忆体操作单元会将所接收的资料和所产生的错误校正码写入快闪记忆体中。位元检查单元用以为每一子资料产生一位元检查码,其中记忆体操作单元会将所产生的位元检查码写入快闪记忆体中。In order to achieve the above object, the present invention also proposes a flash memory controller for accessing a data in a flash memory, the flash memory controller includes a microprocessor unit and is connected to the microprocessor The host interface unit of the unit, the flash memory interface unit, the memory operation unit, the error correction unit and the bit checking unit. The host interface unit is used for connecting a host system and receiving data from the host system, wherein the received data includes multiple sub-data. The flash memory interface unit is used for connecting the flash memory. The error correction unit is used to generate an error correction code for the received data, wherein the memory operation unit writes the received data and the generated error correction code into the flash memory. The bit check unit is used to generate a bit check code for each sub-data, and the memory operation unit writes the generated bit check code into the flash memory.
本发明提出一种快闪记忆体储存系统,其包括快闪记忆体与连接此快闪记忆体的快闪记忆体控制器。快闪记忆体控制器用以从一主机系统中接收具有多个子资料的一资料,快闪记忆体控制器会为所接收的资料产生一错误校正码,并且将所接收的资料和所产生的错误校正码写入快闪记忆体中。此外,快闪记忆体控制器会为每一子资料产生一位元检查码,并且将所产生的位元检查码写入快闪记忆体中。The invention provides a flash memory storage system, which includes a flash memory and a flash memory controller connected to the flash memory. The flash memory controller is used to receive a data with a plurality of sub-data from a host system, the flash memory controller will generate an error correction code for the received data, and combine the received data with the generated error The correction code is written into the flash memory. In addition, the flash memory controller generates a bit check code for each sub-data, and writes the generated bit check code into the flash memory.
由上述技术方案可知,本发明能够在主机系统所欲读取少于一个页面的小资料时,仅需针对欲读取的小资料检查是否存取错误位元而不需读取整个页面中的资料及其错误校正码,由此提升资料存取的速度。It can be seen from the above technical solution that when the host system wants to read less than one page of small data, it only needs to check whether there is an access error bit for the small data to be read without reading the data in the entire page. Data and their error correction codes, thereby increasing the speed of data access.
为让本发明上述特征和优点能更明显易懂,下文特举实施例,并配合所附图式作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.
附图说明Description of drawings
图1是根据本发明一范例实施例所绘示的快闪记忆体储存系统的概要框图;FIG. 1 is a schematic block diagram of a flash memory storage system according to an exemplary embodiment of the present invention;
图2是根据本发明范例实施例所绘示实体区块的概要框图;FIG. 2 is a schematic block diagram of a physical block according to an exemplary embodiment of the present invention;
图3是根据本范例实施例所绘示的资料写入步骤的流程图;FIG. 3 is a flow chart of the steps of writing data according to this exemplary embodiment;
图4是根据本发明范例实施例所绘示的写入范例的资料流示意图;FIG. 4 is a schematic diagram of a data flow of a writing example according to an exemplary embodiment of the present invention;
图5是根据本发明一范例实施例所绘示在实体区块中储存位元检查码表的范例;FIG. 5 is an example of storing a bit check code table in a physical block according to an exemplary embodiment of the present invention;
图6是根据本范例实施例所绘示的资料读取步骤的流程图。FIG. 6 is a flow chart of data reading steps according to this exemplary embodiment.
附图主要元件符号说明Explanation of symbols of main components in the drawings
110:快闪记忆体控制器; 110a:微处理器单元;110: flash memory controller; 110a: microprocessor unit;
110b:记忆体操作单元; 110c:快闪记忆体界面单元;110b: memory operation unit; 110c: flash memory interface unit;
110d:主机界面单元; 110e:错误校正单元;110d: host interface unit; 110e: error correction unit;
110f:位元检查单元; 120:快闪记忆体晶片;110f: bit checking unit; 120: flash memory chip;
120-0~120-N:实体区块; D:资料位元区;120-0~120-N: physical block; D: data bit area;
R:冗余位元区; 400:位元检查码表;R: redundant bit area; 400: bit check code table;
S301、S303、S305、S307、S309:资料写入步骤;S301, S303, S305, S307, S309: data writing steps;
S601、S603、S605、S607、S609、S611、S613、S615、S617、S619、S621:资料读取步骤。S601, S603, S605, S607, S609, S611, S613, S615, S617, S619, S621: data reading steps.
具体实施方式Detailed ways
图1是根据本发明一范例实施例所绘示的快闪记忆体储存系统的概要框图。FIG. 1 is a schematic block diagram of a flash memory storage system according to an exemplary embodiment of the present invention.
请参照图1,通常快闪记忆体储存系统100与主机系统200一起使用,以使主机系统200可将资料写入快闪记忆体储存系统100或从快闪记忆体储存系统100中读取资料。在本范例实施例中,快闪记忆体储存系统100为固态硬碟(Solid State Drive,SSD)。但必须了解的是,在本发明另一实施例中快闪记忆体储存系统100也可以是记忆卡或随身碟。Please refer to FIG. 1 , usually the flash
快闪记忆体储存系统100包括快闪记忆体控制器110与快闪记忆体晶片120。The flash
快闪记忆体控制器110会执行以硬件型式或固化软件型式设计的多个逻辑闸或控制指令,并且根据主机系统200的指令在快闪记忆体晶片120中进行资料的写入、读取与抹除等运作。快闪记忆体控制器110包括微处理器单元110a、记忆体操作单元110b、快闪记忆体界面单元110c、主机界面单元110d、错误校正单元110e与位元检查单元110f。The
微处理器单元110a用以控制快闪记忆体控制器110的整体运作。具体来说,微处理器单元110a与记忆体操作单元110b、快闪记忆体界面单元110c、主机界面单元110d、错误校正单元110e与位元检查单元110f等一起运作以进行快闪记忆体储存系统100的写入、读取、抹除等运作。The
记忆体操作单元110b连接微处理器单元110a,并且用以执行区块管理机制。特别是,记忆体操作单元110b用以执行根据本范例实施例的资料存取机制。The
在本实施例中,记忆体操作单元110b以一固化软件型式设计在控制器110中。例如,将包括多个控制指令烧录至一程式记忆体(例如,唯读记忆体(Read Only Memory,ROM))中并且将此程式记忆体嵌入在快闪记忆体控制器110中以设计出记忆体操作单元110b,其中当快闪记忆体储存系统100启动时,记忆体操作单元110b的多个机器指令会由微处理器单元110a来执行以完成根据本发明实施例的区块管理机制与资料写入机制。In this embodiment, the
在本发明另一实施例中,记忆体操作单元110b的控制指令也可以软件型式储存于快闪记忆体晶片120的特定区域中。同样的,当快闪记忆体储存系统100启动时,记忆体操作单元110b的控制指令会由微处理器单元110a来执行。此外,在本发明另一实施例中,记忆体操作单元110b也可以一硬件型式设计在快闪记忆体控制器110中。In another embodiment of the present invention, the control instructions of the
快闪记忆体界面单元110c连接微处理器单元110a并且用以存取快闪记忆体晶片120。也就是说,欲写入快闪记忆体晶片120的资料会经由快闪记忆体界面单元110c转换为快闪记忆体晶片120所能接受的格式。The flash
主机界面单元110d连接微处理器单元110a并且用以接收与识别主机系统200所传送的指令。也就是说,主机系统200所传送的指令与资料会透过主机界面单元110d来传送至微处理器单元110a。在本范例实施例中,主机界面单元110d为SATA界面。然而,必须了解的是本发明不限于此,主机界面单元110d也可以是USB界面、IEEE 1394界面、PCIExpress界面、MS界面、MMC界面、SD界面、CF界面、IDE界面或其他适合的资料传输界面。The
错误校正单元110e连接微处理器单元110a并且用以执行一错误校正程序。具体来说,当在错误校正单元110e中输入一资料时,错误校正单元110e会根据此资料产生一错误校正码,并且当在错误校正单元110e输入一资料与一错误校正码时,错误校正单元110e会根据所接收的错误校正码来为所接收的资料进行错误检查与校正。错误校正程序为资料储存媒体中常见的技术,在此不详细描述。值得一提的是,错误校正单元110e的错误校正能力必须能够支援快闪记忆体晶片120的规格。在本范例实施例中,错误校正单元110e具有检查与校正48个错误位元的能力。然而,必须了解的是,本发明不限于此,只要能够支援快闪记忆体晶片120规格的错误校正单元皆可应用于本发明。The
位元检查单元110f连接微处理器单元110a并且用以执行一错误侦测程序。具体来说,当在位元检查单元110f中输入一资料时,位元检查单元110f会根据此资料产生一位元检查码,并且当在位元检查单元110f输入一资料与一位元检查码时,位元检查单元110f会根据所接收的位元检查码来为所接收的资料进行错误检查。例如,在本范例实施例中,位元检查单元110f以错误侦测电路(error detecting circuit)来设计,并且位元检查单元110f会产生错误侦测码(error detection code)作为位元检查码。然而,在本发明另一实施例中,位元检查单元110f也可以循环冗余检查电路(cyclicr edundancy check circuit)来设计,并且位元检查单元110f会产生循环冗余检查(cyclic redundancy check)码作为位元检查码。或者,在本发明另一实施例中,位元检查单元110f也可以低阶错误校正电路(error correcting circuit)来设计,并且位元检查单元110f会产生低阶错误校正码作为位元检查码,在此低阶错误校正电路与低阶错误校正码是指相对于错误校正单元110e与其错误校正码而言具较低错误校正能力的错误校正电路与错误校正码。The bit checking unit 110f is connected to the
此外,虽未绘示于本范例实施例,但快闪记忆体控制器110还包括缓冲记忆体、电源管理单元等用于控制快闪记忆体的一般功能模组。In addition, although not shown in this exemplary embodiment, the
快闪记忆体晶片120连接快闪记忆体控制器110并且具有多个实体区块120-0~120-N以储存资料。在本范例实施例中,快闪记忆体晶片120为多层记忆单元(Multi Level Cell,MLC)NAND快闪记忆体。然而,必须了解的是,本发明不限于此。在本发明另一实施例中,单层记忆单元(Single Level Cell,SLC)NAND快闪记忆体也可应用于本发明。The
图2是根据本发明范例实施例所绘示实体区块的概要框图。在本范例实施例中每一实体区块120-1~120-N的结构是相同的,图2的概要框图适用于每一实体区块120-0~120-N。FIG. 2 is a schematic block diagram of a physical block according to an exemplary embodiment of the present invention. In this exemplary embodiment, the structure of each physical block 120 - 1 ~ 120 -N is the same, and the schematic block diagram of FIG. 2 is applicable to each physical block 120 - 0 ~ 120 -N.
请参照图2,实体区块包括128个页面,并且每一页面可储存4个扇区的资料。具体来说,每一页面的资料位元区D为2048位元组,且每一页面的冗余位元区R为61位元组,其中冗余位元区R中8个位元组用于储存与页面相关的控制资讯并且53个位元组用于储存用于页面的错误校正码。Referring to FIG. 2, the physical block includes 128 pages, and each page can store data of 4 sectors. Specifically, the data bit area D of each page is 2048 bytes, and the redundant bit area R of each page is 61 bytes, wherein 8 bytes in the redundant bit area R are used It stores control information associated with the page and 53 bytes are used to store the error correction code for the page.
图3是根据本范例实施例所绘示的资料写入步骤的流程图。FIG. 3 is a flow chart of data writing steps according to this exemplary embodiment.
请参照图2和图3,当主机系统200欲写入资料至快闪记忆体储存系统100时,在步骤S301中,快闪记忆体控制器110会从主机系统200接收欲写入的资料。在本范例实施例中,所接收的资料具有至少一子资料,并且此多个子资料的大小为主机系统200的最小存取单位(即,扇区)。例如,主机系统200的存取单位为512位元组时,子资料的大小也为512位元组。具体来说,快闪记忆体控制器110会透过主机界面单元110d从主机系统200接收到写入指令与对应此写入指令的子资料。Referring to FIG. 2 and FIG. 3 , when the
接着,在步骤S303中,快闪记忆体控制器110会为所接收的资料产生对应的错误校正码。具体来说,主机界面单元110d所接收到的资料会传送至错误校正单元110e,并且由错误校正单元110e产生对应的错误校正码。Next, in step S303, the
之后,在步骤S305中,快闪记忆体控制器110的记忆体操作单元110b会将欲写入的资料及其对应错误校正码透过快闪记忆体界面单元110c写入快闪记忆体晶片120的实体区块120-0~120-N中。After that, in step S305, the
然后,在步骤S307中,快闪记忆体控制器110会为每一子资料产生对应的位元检查码。具体来说,每一子资料会被传送至位元检查单元110f,并且位元检查单元110f会为每一子资料产生对应的位元检查码。Then, in step S307, the
最后,在步骤S309中,记忆体操作单元110b会将所产生的位元检查码透过快闪记忆体界面单元110c写入快闪记忆体晶片120的实体区块120-0~120N中。值得一提的是,由于在页面中写入资料时冗余位元区仅足够储存对应此资料的错误校正码,因此在本范例实施例会中所产生对应子资料的位元检查码储存在另一实体区块的资料位元区中。也就是说,记忆体操作单元110b将所述多个位元检查码视为一般资料写入快闪记忆体晶片120中。值得一提的是,在本发明范例实施例中,记忆体操作单元110b会建立一位元检查码表400来记录所产生的位元检查码。Finally, in step S309, the
图4是根据本发明范例实施例所绘示的一写入范例的资料流示意图。FIG. 4 is a schematic diagram of a data flow of a writing example according to an exemplary embodiment of the present invention.
请参照图4,倘若快闪记忆体控制器110从主机系统200接收到资料量为2048位元组的资料DATA,快闪记忆体控制器110会为资料DATA产生错误校正码ECC。此外,快闪记忆体控制器110会将资料DATA分割为子资料DATA1、子资料DATA2、子资料DATA3与子资料DATA4并且依序产生对应的位元检查码BCC1、位元检查码BCC2、位元检查码BCC3与位元检查码BCC4。之后,由子资料DATA1、子资料DATA2、子资料DATA3与子资料DATA4所组成的资料DATA会与错误校正码ECC写入实体区块120-0的页面0中。同时,快闪记忆体控制器110会将记录位元检查码BCC1、位元检查码BCC2、位元检查码BCC3与位元检查码BCC4的位元检查码表400会被写入实体区块120-N的页面0中。Referring to FIG. 4 , if the
图5是根据本发明一范例实施例所绘示在实体区块中储存位元检查码表的范例。FIG. 5 is an example of storing a checksum table in a physical block according to an exemplary embodiment of the present invention.
请参照图2和图5,例如,记录实体区块120-0~120-127位元检查码的位元检查码表400储存在实体区块120-N中。在本范例实施例中,由于子资料为512位元组且每一子资料的位元检查码所需的储存空间为4位元组,因此1个实体区块可储存对应128个实体区块的位元检查码。特别是,由于记忆体操作单元110b以储存一般资料的方式来储存位元检查码表400,因此实体区块的冗余位元区中会存有对应位元检查码的错误校正码。此外,在本发明另一范例实施例中,记忆体操作单元110b会建立一位元检查码对映表以记录位元检查码表中位元检查码与子资料之间的对应关系,由此以利于从位元检查码表中读取对应子资料的位元检查码。Referring to FIG. 2 and FIG. 5 , for example, the bit check code table 400 recording the bit check codes of the physical blocks 120 - 0 - 120 - 127 is stored in the physical block 120 -N. In this exemplary embodiment, since the sub-data is 512 bytes and the storage space required for the bit check code of each sub-data is 4 bytes, one physical block can store corresponding 128 physical blocks The bitcheck code for . In particular, since the
值得一提的是,由于为快闪记忆体晶片120中所有实体区块建立位元检查码表400会需要较大的储存空间,因此在本发明另一范例实施例中,记忆体操作单元110b仅会针对经常以读取小资料(即,小于一个页面的资料量)方式进行存取的实体区块建立位元检查码表400。例如,主机系统200会经常在储存档案配置表(File Allocation Table,FAT)的实体区块中读取小资料,由此可减少储存位元检查码表400所需的记忆体空间。It is worth mentioning that since the bit check code table 400 for all physical blocks in the
此外,由于在存取过程中位元检查码表400会不断的被更新,因此在快闪记忆体储存系统100的运作期间,位元检查码表400会从快闪记忆体晶片120中载入缓冲记忆体(未绘示)中以利更新,并且当快闪记忆体储存系统100关机时,位元检查码表400会被回写至快闪记忆体晶片120。In addition, since the check code table 400 will be continuously updated during the access process, the check code table 400 will be loaded from the
图6是根据本范例实施例所绘示的资料读取步骤的流程图。请参照图2、图5和图6,当主机系统200欲从快闪记忆体储存系统100中读取资料时,在步骤S601中,快闪记忆体控制器110会判断主机系统200欲读取的资料量是否小于1个页面。具体来说,快闪记忆体控制器110会透过主机界面单元110d从主机系统200中接收到读取指令,并且记忆体操作单元110b会根据读取指令中欲读取的位址来判断主机系统200欲读取的资料量是否小于1个页面。FIG. 6 is a flow chart of data reading steps according to this exemplary embodiment. Please refer to FIG. 2, FIG. 5 and FIG. 6, when the
例如,在所述实体区块120-0的页面0储存有以子资料DATA1、子资料DATA2、子资料DATA3与子资料DATA4所组成资料DATA的例子中,倘若主机系统200仅欲读取子资料DATA1、子资料DATA2、子资料DATA3与子资料DATA4的一部份而非整个资料DATA时,则表示主机系统200欲读取的资料量是小于1个页面。For example, in the example where the
倘若在步骤S601中判断主机系统200欲读取的资料量非小于1个页面时,则在步骤S603中记忆体操作单元110b会透过快闪记忆体界面单元110c从快闪记忆体晶片120中读取资料及其对应的错误校正码,并且在步骤S605中错误校正单元110e会根据所读取的资料与错误校正码执行错误校正程序。之后,在步骤S607中,记忆体操作单元110b会透过主机界面单元110d将已执行错误校正程序的资料传送给主机系统200。例如,若主机系统200欲读取实体区块120-0的页面0的资料DATA时,快闪记忆体控制器110会读取资料DATA及其错误校正码ECC,并且执行错误校正程序,然后再将已执行错误校正程序的资料DATA传送至主机系统200。If it is determined in step S601 that the amount of data to be read by the
倘若在步骤S 601中判断主机系统200欲读取的资料量小于1个页面时,则在步骤S609中记忆体操作单元110b会透过快闪记忆体界面单元110c从快闪记忆体晶片120中读取所欲读取的子资料,并且在步骤S611中记忆体操作单元110b会从位元检查码表400中获取对应的位元检查码,其中倘若位元检查码表400未载入缓冲记忆体(未绘示)时,记忆体操作单元110b会从快闪记忆体晶片120中读取位元检查码表400。If it is determined in step S601 that the amount of data to be read by the
之后,在步骤S613中位元检查单元110f会根据所读取的子资料及对应的位元检查码来判断所读取的子资料中是否存有错误位元。倘若所读取的子资料无存有错误位元时,则在步骤S615中记忆体操作单元110b会将所读取的子资料传送至主机系统200。Afterwards, in step S613, the bit checking unit 110f determines whether there is an error bit in the read sub-data according to the read sub-data and the corresponding bit check code. If there is no error bit in the read sub-data, the
倘若所读取的子资料存有错误位元时,则在步骤S617中会透过快闪记忆体界面单元110c从快闪记忆体晶片120中读取完整的资料及其对应的错误校正码,并且在步骤S619中错误校正单元110e会根据所读取的资料与错误校正码执行错误校正程序。最后,在步骤S621中记忆体操作单元110b会从已校正的资料中获取主机系统200欲读取的子资料并将所获取的子资料传送给主机系统200。If there is an error bit in the read sub-data, then in step S617, the complete data and its corresponding error correction code will be read from the
例如,若主机系统200欲读取实体区块120-0的页面0的子资料DATA1时,快闪记忆体控制器110会读取子资料DATA1与位元检查码BCC1,并且根据位元检查码BCC1判断所读取的子资料DATA1中是否存有错误位元。若所读取的子资料DATA1中无存有错误位元时,则快闪记忆体控制器110会直接将所读取的子资料DATA1传送给主机系统200。反之,若所读取的子资料DATA1中存有错误位元时,则快闪记忆体控制器110会从快闪记忆体晶片120中重新读取资料DATA及其错误校正码ECC,并且执行错误校正程序,然后再从已执行错误校正程序的资料DATA获取子资料DATA1并且将所获取的子资料DATA1传送至主机系统200。For example, if the
必须了解的是,图3与图6所述的执行顺序并非限制本发明,此领域技术人员可根据本发明的精神下以不同于图3与图6所述的顺序执行上述步骤。It should be understood that the execution sequence shown in FIG. 3 and FIG. 6 does not limit the present invention, and those skilled in the art may perform the above steps in a sequence different from that shown in FIG. 3 and FIG. 6 according to the spirit of the present invention.
综上所述,本发明是在对快闪记忆体的页面中写入资料时将资料对应主机系统的存取单位分割为数个子资料,并且为每一资料产生一位元检查码,由此当主机系统从快闪记忆体的页面中读取子资料时,可透过对应的位元检查码执行位元检查,并且仅在发生位元错误时才从快闪记忆体中读取整个页面的资料进行错误校正,由此可提升快闪记忆体的读取速度。To sum up, the present invention divides the access unit of the data corresponding to the host system into several sub-data when writing data in the page of the flash memory, and generates a one-bit check code for each data, thus when When the host system reads subdata from a page of flash memory, it can perform bit checking through the corresponding bit check code, and only when a bit error occurs, it reads the entire page from flash memory. Error correction is performed on the data, thereby increasing the read speed of the flash memory.
最后应说明的是:以上实施例仅用以说明本发明的技术方案而非对其进行限制,尽管参照较佳实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对本发明的技术方案进行修改或者等同替换,而这些修改或者等同替换亦不能使修改后的技术方案脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: it still Modifications or equivalent replacements can be made to the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims (25)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910133685A CN101872318B (en) | 2009-04-22 | 2009-04-22 | Data access method for flash memory and storage system and controller thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910133685A CN101872318B (en) | 2009-04-22 | 2009-04-22 | Data access method for flash memory and storage system and controller thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101872318A true CN101872318A (en) | 2010-10-27 |
CN101872318B CN101872318B (en) | 2012-10-24 |
Family
ID=42997188
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910133685A Active CN101872318B (en) | 2009-04-22 | 2009-04-22 | Data access method for flash memory and storage system and controller thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101872318B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819467A (en) * | 2012-03-06 | 2012-12-12 | 宜鼎国际股份有限公司 | Flash memory device capable of improving data correction capability |
TWI497511B (en) * | 2012-11-08 | 2015-08-21 | Ind Tech Res Inst | Chip with embedded non-volatile memory and testing method therefor |
CN106021035A (en) * | 2016-05-25 | 2016-10-12 | 浪潮电子信息产业股份有限公司 | Method for realizing fault verification on memory particles to enhance stability of module bar |
CN106155581A (en) * | 2015-02-05 | 2016-11-23 | 慧荣科技股份有限公司 | Data storage device and data maintenance method thereof |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4074029B2 (en) * | 1999-06-28 | 2008-04-09 | 株式会社東芝 | Flash memory |
KR100680473B1 (en) * | 2005-04-11 | 2007-02-08 | 주식회사 하이닉스반도체 | Flash memory device with reduced access time |
CN100465910C (en) * | 2006-06-02 | 2009-03-04 | 上海思必得通讯技术有限公司 | Method for error protecting and error correcting of flash memory data in products |
-
2009
- 2009-04-22 CN CN200910133685A patent/CN101872318B/en active Active
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819467A (en) * | 2012-03-06 | 2012-12-12 | 宜鼎国际股份有限公司 | Flash memory device capable of improving data correction capability |
TWI497511B (en) * | 2012-11-08 | 2015-08-21 | Ind Tech Res Inst | Chip with embedded non-volatile memory and testing method therefor |
CN106155581A (en) * | 2015-02-05 | 2016-11-23 | 慧荣科技股份有限公司 | Data storage device and data maintenance method thereof |
CN106155581B (en) * | 2015-02-05 | 2019-04-12 | 慧荣科技股份有限公司 | Data storage device and data maintenance method thereof |
CN106021035A (en) * | 2016-05-25 | 2016-10-12 | 浪潮电子信息产业股份有限公司 | Method for realizing fault verification on memory particles to enhance stability of module bar |
Also Published As
Publication number | Publication date |
---|---|
CN101872318B (en) | 2012-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI516927B (en) | Data writing method, memory controller and memory storage apparatus | |
CN104102585B (en) | Mapping information recording method, memory controller and memory storage device | |
US8589619B2 (en) | Data writing method, memory controller, and memory storage apparatus | |
CN104765569B (en) | Data writing method, memory control circuit unit and memory storage device | |
TWI486766B (en) | Data processing method, and memory controller and memory storage apparatus using the same | |
TWI419169B (en) | Data access method for a flash memory and storage system and controller thereof | |
CN101576853A (en) | Data access method, controller and memory system using the same | |
CN105005450A (en) | Data writing method, memory storage device and memory control circuit unit | |
US9063888B2 (en) | Program code loading and accessing method, memory controller, and memory storage apparatus | |
CN111078146B (en) | Memory management method, memory storage device and memory control circuit unit | |
CN113140253B (en) | Memory management method, memory storage device and memory control circuit unit | |
CN111028877B (en) | Data access method, memory storage device and memory control circuit unit | |
US8943289B2 (en) | Data moving method for flash memory module, and memory controller and memory storage apparatus using the same | |
CN103678162B (en) | System data storage method, memory controller and memory storage device | |
TW202040370A (en) | Data writing method, memory controlling circuit unit and memory storage device | |
CN101872318B (en) | Data access method for flash memory and storage system and controller thereof | |
CN102800357B (en) | Program code loading and accessing method, memory controller and memory storage device | |
CN113138720B (en) | Data storage method, memory control circuit unit and memory storage device | |
CN109273033B (en) | Memory management method, memory control circuit unit and memory storage device | |
US10289334B2 (en) | Valid data merging method, memory controller and memory storage apparatus | |
TWI814501B (en) | Mapping table re-building method, memory storage device and memory control circuit unit | |
TWI436209B (en) | Memory management table proceesing method, memory controller and memory storage apparatus | |
CN103425594B (en) | Data processing method, memory controller and memory storage device | |
CN117608501B (en) | Voltage adjustment method, memory storage device and memory control circuit unit | |
CN111858389B (en) | Data writing method, memory control circuit unit and memory storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |