JP5707695B2 - Flash disk device - Google Patents

Flash disk device Download PDF

Info

Publication number
JP5707695B2
JP5707695B2 JP2009278780A JP2009278780A JP5707695B2 JP 5707695 B2 JP5707695 B2 JP 5707695B2 JP 2009278780 A JP2009278780 A JP 2009278780A JP 2009278780 A JP2009278780 A JP 2009278780A JP 5707695 B2 JP5707695 B2 JP 5707695B2
Authority
JP
Japan
Prior art keywords
address
data
physical
chunk
flash memory
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.)
Active
Application number
JP2009278780A
Other languages
Japanese (ja)
Other versions
JP2011123560A (en
Inventor
実 一ノ関
実 一ノ関
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2009278780A priority Critical patent/JP5707695B2/en
Publication of JP2011123560A publication Critical patent/JP2011123560A/en
Application granted granted Critical
Publication of JP5707695B2 publication Critical patent/JP5707695B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、半導体ディスク装置、特にフラッシュメモリを使用したフラッシュディスク装置に関する。   The present invention relates to a semiconductor disk device, and more particularly to a flash disk device using a flash memory.

近年の不揮発性メモリの大容量化、低コスト化に伴い、不揮発性メモリを使用したディスクであるフラッシュディスク装置が開発され、多くの製品が市場に流通し始めている。   With the recent increase in capacity and cost of non-volatile memories, flash disk devices, which are disks using non-volatile memories, have been developed, and many products are beginning to circulate in the market.

フラッシュメモリは複数のブロックにより構成され、更にこれらの各ブロックが、複数のページにより構成されている。ページは、リード/ライトの単位であり、通常、磁気ディスク装置等のハードディスク装置におけるリード/ライトの最小単位であるセクタと同じ大きさで、512バイトである。   The flash memory is composed of a plurality of blocks, and each of these blocks is composed of a plurality of pages. A page is a unit of read / write, and is usually 512 bytes with the same size as a sector which is the minimum unit of read / write in a hard disk device such as a magnetic disk device.

ページ内のデータを書換える場合は、通常、前データを消去した後、新たなデータを書込む。ブロックは消去の単位であり、一般的には16Kバイトあり、書換えがこのブロック内の一部のページであっても、この1つのブロック全部を消去する必要がある。   When rewriting data in a page, normally, new data is written after erasing previous data. A block is a unit of erasure, generally 16 Kbytes, and even if rewriting is a partial page in this block, it is necessary to erase the entire block.

このようなフラッシュメモリを使用したフラッシュディスク装置では、フラッシュメモリに保存されたデータが或る一定の確率でビットエラーを発生すること、及び、ブロック単位で消去を行うがブロック毎に消去回数の寿命が例えば10万回〜100万回の短寿命であるという制約がある。   In a flash disk device using such a flash memory, a bit error occurs in the data stored in the flash memory with a certain probability, and erasure is performed for each block, but the lifetime of the number of erasures for each block. However, there is a restriction that it has a short life of, for example, 100,000 times to 1 million times.

これらの制約を解決するために、ホストの中央処理装置(以下「CPU」という。)から指定される論理アドレスに関係無く、フラッシュディスク装置内に空き領域を予め用意し、ホストCPUから指定されるライトデータの論理アドレスを、論理アドレスを物理アドレスに変換するためのアドレステーブルにより、フラッシュメモリ上の空き領域の物理アドレスに変換し、この物理アドレスの空き領域にライトデータを順次書込んでいく方式が提案されている。   In order to solve these restrictions, an empty area is prepared in advance in the flash disk device regardless of the logical address designated by the central processing unit (hereinafter referred to as “CPU”) of the host, and designated by the host CPU. A method in which the logical address of the write data is converted into a physical address in an empty area on the flash memory by an address table for converting the logical address into a physical address, and the write data is sequentially written in the empty area in the physical address Has been proposed.

そして、フラッシュメモリの複数ページから構成される物理チャンクごとの冗長ビット部分である管理データ部分に、当該物理チャンクに対応する論理チャンク番号とデータ書込み完了ごとにデータの新旧を表わす更新番号を保持し、アドレステーブルをフラッシュメモリとは別の不揮発性メモリに格納するようにして、アドレステーブルやアドレステーブルログをフラッシュメモリに書出すためのオーバヘッドをなくし、しかも、データとともに論理チャンクや更新番号等の管理データをフラッシュメモリのそれぞれの物理チャンクに同時に書込み、常にデータと管理データの整合性を保つ技術が提案されている(例えば、特許文献1参照)。   The management data part, which is a redundant bit part for each physical chunk composed of a plurality of pages in the flash memory, holds a logical chunk number corresponding to the physical chunk and an update number indicating the new and old data every time data writing is completed. The address table is stored in a non-volatile memory separate from the flash memory, eliminating the overhead of writing the address table and address table log to the flash memory, and managing the logical chunks and update numbers along with the data A technique has been proposed in which data is simultaneously written in each physical chunk of the flash memory and the consistency between the data and the management data is always maintained (see, for example, Patent Document 1).

特開2005−242897号公報 (第14−16頁、第14図、第15図)Japanese Patent Laying-Open No. 2005-242897 (pages 14-16, FIGS. 14, 15)

しかしながら、上記従来の技術では、起動時に行うアドレスデータ再構成において、前記管理データ部分の読み出しを行い、管理データ部分のチェックしか行わないため、データ書き込みの途中で電源が落ちた場合などでは、管理データ部分は正常となり、不完全な書込みデータが有効データとして扱われ、データ領域が壊れたままの状態となってしまうという問題があった。   However, in the above conventional technique, in the address data reconfiguration performed at startup, the management data part is read and only the management data part is checked. Therefore, when the power is cut off during data writing, the management data part is managed. There is a problem that the data portion is normal, incomplete write data is treated as valid data, and the data area remains broken.

本発明は、前述の課題を解決するため次の手段を採用する。すなわち、所定の容量ごとに、データの誤り訂正を行う誤り訂正符号と、物理アドレスに対応する論理アドレスと、書き換えたデータの新旧を表わす更新番号を格納する管理データを備えたフラッシュメモリと、前記論理アドレスと物理アドレスを対応付けるアドレステーブルを格納する不揮発性メモリと、前記フラッシュメモリおよび不揮発性メモリを制御する制御手段と、を備え、起動時のアドレステーブル再構成時の処理のときに、前記物理アドレスのデータの誤り訂正処理を行って誤りがない場合のみ、前記アドレステーブルに同じ物理アドレスがあるときはそれぞれの前記更新番号により新しい番号の物理アドレスにてアドレステーブルを更新するようにした。   The present invention employs the following means in order to solve the aforementioned problems. That is, for each predetermined capacity, an error correction code for performing error correction of data, a logical address corresponding to a physical address, and a flash memory including management data for storing update numbers indicating new and old of the rewritten data, A non-volatile memory for storing an address table for associating a logical address and a physical address, and a control means for controlling the flash memory and the non-volatile memory. Only when there is no error after performing an error correction process of the address data, when there is the same physical address in the address table, the address table is updated with the physical address of the new number by the respective update numbers.

本発明のフラッシュメモリ装置によれば、所定の容量ごとに、データの誤り訂正を行う誤り訂正符号と、物理アドレスに対応する論理アドレスと、書き換えたデータの新旧を表わす更新番号を格納する管理データを備えたフラッシュメモリと、前記論理アドレスと物理アドレスを対応付けるアドレステーブルを格納する不揮発性メモリと、前記フラッシュメモリおよび不揮発性メモリを制御する制御手段と、を備え、起動時のアドレステーブル再構成時の処理のときに、前記物理アドレスのデータの誤り訂正処理を行って誤りがない場合のみ、前記アドレステーブルに同じ物理アドレスがあるときはそれぞれの前記更新番号により新しい番号の物理アドレスにてアドレステーブルを更新するようにしたので、データ書き込みの途中で電源が落ちた場合などでも不完全な書込みデータによりデータ領域が壊れたままの状態とならないようにすることができる。   According to the flash memory device of the present invention, for each predetermined capacity, management data for storing an error correction code for performing error correction of data, a logical address corresponding to a physical address, and an update number indicating the new and old of the rewritten data A flash memory, a non-volatile memory for storing an address table for associating the logical address with a physical address, and a control means for controlling the flash memory and the non-volatile memory. When there is no error by performing error correction processing of the data at the physical address at the time of the processing, when there is the same physical address in the address table, the address table with the physical address of the new number by the respective update numbers The power is turned off during data writing. It is possible to avoid a state that broke data area by incomplete write data in a case was.

実施例1のフラッシュディスク装置の構成図である。1 is a configuration diagram of a flash disk device according to Embodiment 1. FIG. 実施例1のフラッシュメモリの論理構成図である。1 is a logical configuration diagram of a flash memory according to Embodiment 1. FIG. 実施例1のフラッシュメモリおよびアドレステーブルの例示図である。3 is an exemplary diagram of a flash memory and an address table according to Embodiment 1. FIG. 実施例1のフラッシュディスク装置の起動時の動作フローチャート図である。FIG. 3 is an operation flowchart when starting up the flash disk device according to the first embodiment.

以下、本発明に係わる実施の形態例を、図面を用いて説明する。図面に共通する要素には同一の符号を付す。   Embodiments of the present invention will be described below with reference to the drawings. Elements common to the drawings are given the same reference numerals.

(構成)
図1は、実施例1のフラッシュディスク装置の概略構成図であり、図2は図1のフラッシュメモリの論理構成図である。まず、図1に示したように、ホストCPU等のホストマシン1には、ホストのインタフェース(以下、「I/F」という)バス2により、本実施例で使用されるフラッシュディスク装置10が接続されている。フラッシュディスク装置10は、フラッシュメモリおよび不揮発性メモリ等の制御手段として機能する、例えばマイクロプロセッサユニット(以下、「MPU」という)11を有している。
(Constitution)
FIG. 1 is a schematic configuration diagram of the flash disk device according to the first embodiment, and FIG. 2 is a logical configuration diagram of the flash memory of FIG. First, as shown in FIG. 1, a flash disk device 10 used in this embodiment is connected to a host machine 1 such as a host CPU by a host interface (hereinafter referred to as “I / F”) bus 2. Has been. The flash disk device 10 includes, for example, a microprocessor unit (hereinafter referred to as “MPU”) 11 that functions as control means such as a flash memory and a nonvolatile memory.

MPU11は、RAM11a、読出し専用メモリ(以下、「ROM」という)11b、及び入/出力(以下、「I/O」という)ポート11c等により構成され、これには不揮発性メモリ12が接続されている。   The MPU 11 includes a RAM 11a, a read-only memory (hereinafter referred to as “ROM”) 11b, an input / output (hereinafter referred to as “I / O”) port 11c, and the like, to which a nonvolatile memory 12 is connected. Yes.

不揮発性メモリ12は、MPU11によりアクセス制御され、管理用のテーブルやリスト等を保持するために、アクセス制御が容易であるRAM等のようなワード単位での書換えの可能なメモリ構造(FRAM、MRAM等)になっている。   The nonvolatile memory 12 is access-controlled by the MPU 11 and has a memory structure (FRAM, MRAM) that can be rewritten in units of words, such as a RAM that can be easily controlled to hold a management table or list. Etc.).

フラッシュディスク装置10には、ホストI/Fバス2に接続されたホストI/Fコントローラ13が設けられている。ホストI/Fコントローラ13は、ホストI/Fのプロトコルを処理してホストマシン1との間でデータの授受を行う回路であり、これには内部データバス14を介してバッファメモリ15が接続されている。   The flash disk device 10 is provided with a host I / F controller 13 connected to the host I / F bus 2. The host I / F controller 13 is a circuit that processes the protocol of the host I / F and exchanges data with the host machine 1. A buffer memory 15 is connected to the host I / F controller 13 via the internal data bus 14. ing.

バッファメモリ15は、ホストマシン1からのリード/ライトデータを一時的に保存し処理するメモリである。内部データバス14には、フラッシュメモリコントローラ16が接続され、このフラッシュメモリコントローラ16に、フラッシュメモリバス17を介して1つ又は複数のフラッシュメモリ20が接続されている。   The buffer memory 15 is a memory that temporarily stores and processes read / write data from the host machine 1. A flash memory controller 16 is connected to the internal data bus 14, and one or more flash memories 20 are connected to the flash memory controller 16 via a flash memory bus 17.

フラッシュメモリコントローラ16は、MPU11からの命令に従ってフラッシュメモリ20をアクセス制御する回路であり、データ読出し部16a、データ書込み部16b及びブロック消去部16c等により構成されている。1つ又は複数のフラッシュメモリ20は、ホストマシン1からのライトデータを不揮発に保存するメモリである。   The flash memory controller 16 is a circuit that controls access to the flash memory 20 in accordance with an instruction from the MPU 11, and includes a data reading unit 16a, a data writing unit 16b, a block erasing unit 16c, and the like. The one or more flash memories 20 are memories that store write data from the host machine 1 in a nonvolatile manner.

次に、図2を用いて前述の図1のフラッシュメモリ20の論理構成を説明する。同図に示したように、フラッシュメモリ20は、消去の単位であるデータ格納用の複数のブロック21−0、・・・、21−Nを有している。各ブロック21は、リード/ライトの単位であるデータ格納用の複数のページを有している。   Next, the logical configuration of the flash memory 20 shown in FIG. 1 will be described with reference to FIG. As shown in the figure, the flash memory 20 has a plurality of blocks 21-0,..., 21-N for storing data, which are erase units. Each block 21 has a plurality of pages for storing data, which is a read / write unit.

1ページは、例えば、512バイト等の記憶容量を有している。このようなフラッシュメモリ20では、書換えがブロック21内の一部のページであっても、1つのブロック全体を消去する必要がある。   One page has a storage capacity of 512 bytes, for example. In such a flash memory 20, it is necessary to erase one entire block even if rewriting is performed on some pages in the block 21.

そして、複数のセクタ(ページ)を纏めてチャンクという単位で管理するために、ホストマシン1からフラッシュメモリ20へのリード/ライトをチャンク単位にしている。すなわち、ホストマシン1の論理アドレス25において、複数の論理セクタを纏めて論理チャンクという単位でアクセスする構成となっている。本実施例では、8ページを纏めて1チャンクとした場合を一例として以下説明するが、16ページを纏めて1チャンクとしてもよいし、さらに多く或いは逆に4ページなどのように少なくするようにしてもよい。8ページを纏めて1チャンクとした場合では、8*512バイト=4096バイトが1チャンクのデータとなる。   In order to manage a plurality of sectors (pages) in units of chunks, read / write from the host machine 1 to the flash memory 20 is performed in units of chunks. In other words, at the logical address 25 of the host machine 1, a plurality of logical sectors are collectively accessed in units of logical chunks. In this embodiment, the case where 8 pages are grouped into one chunk will be described as an example. However, 16 pages may be grouped into one chunk, or more or vice versa. May be. When 8 pages are grouped into one chunk, 8 * 512 bytes = 4096 bytes is one chunk of data.

不揮発性メモリ12内には、アドレステーブル30が格納されている。アドレステーブル30内には、ホストマシン1から指定される論理チャンクを、フラッシュメモリ20上の物理アドレスである物理チャンクに変換するための複数のアドレス変換情報が格納されている。   An address table 30 is stored in the nonvolatile memory 12. The address table 30 stores a plurality of address conversion information for converting a logical chunk designated by the host machine 1 into a physical chunk that is a physical address on the flash memory 20.

また、アドレステーブル30内には、データの書込まれていない物理チャンクのリストである空きチャンク情報30aが格納されている。なお、空きチャンク情報30aは、後述の図3のようにそれぞれの論理チャンクごとに持つ形態としてもよい。   The address table 30 stores empty chunk information 30a that is a list of physical chunks to which no data is written. The empty chunk information 30a may be provided for each logical chunk as shown in FIG.

フラッシュメモリ20は、消去の単位であるデータ格納用の複数のブロック21−0、21−1、・・・を有しており、各ブロック21−0、21−1、・・・は、複数のページ(本例では前述のように8ページ)を纏めた物理チャンクを複数有している。   The flash memory 20 has a plurality of blocks 21-0, 21-1,... For storing data, which is a unit of erasure, and each block 21-0, 21-1,. This page has a plurality of physical chunks (8 pages as described above in this example).

図3は、フラッシュメモリ上のデータ内容と、アドレステーブル30の内容の例示図である。同図に示したように、各物理チャンクには、4096バイトのデータ21dとこれを管理する例えば16バイトの管理データ21kが格納される。   FIG. 3 is a view showing an example of the data contents on the flash memory and the contents of the address table 30. As shown in the figure, each physical chunk stores 4096-byte data 21d and, for example, 16-byte management data 21k for managing the data.

そして、管理データ21kは、データの誤り訂正のための誤り訂正符号と、当該物理チャンクに対応する論理チャンク番号と、当該物理チャンクのデータ書込みを完了する都度に例えば+1加算して更新する更新番号、当該物理チャンクの消去状態などの状態を示す状態フラッグを格納できるような構成となっている。   The management data 21k includes an error correction code for data error correction, a logical chunk number corresponding to the physical chunk, and an update number that is updated by adding, for example, +1 each time data writing of the physical chunk is completed. The state flag indicating the state such as the erased state of the physical chunk can be stored.

図3において、最初の物理チャンク0は、論理チャンク番号として“4”が格納されており、したがって論理チャンク4と対応付けられ、更新番号が”10”で、状態フラッグが”0”で書込み状態であることを示している。そして、最後の物理チャンクMは、論理チャンク番号として“1”が格納されており、したがって論理チャンク1と対応付けられ、更新番号が”6”で、状態フラッグが”0”で書込み状態であることを示している。   In FIG. 3, the first physical chunk 0 stores “4” as the logical chunk number, and is therefore associated with the logical chunk 4, the update number is “10”, the status flag is “0”, and the write state It is shown that. The last physical chunk M stores “1” as the logical chunk number. Therefore, the last physical chunk M is associated with the logical chunk 1, the update number is “6”, the status flag is “0”, and is in the write state. It is shown that.

次の物理チャンク1は、対応付けられる論理チャンクはなく、すべて”1”となっており、未使用の状態であることを示している。   The next physical chunk 1 has no associated logical chunk and is all “1”, indicating that it is unused.

また、物理チャンク9は、データ書込みの際に電源がオフされた場合の一例として、物理チャンク0と同じ論理チャンク4に対応付けられ、更新番号が”11”で、状態フラッグが”0”で書込み状態であることを示している。   The physical chunk 9 is associated with the same logical chunk 4 as the physical chunk 0 as an example when the power is turned off at the time of data writing, the update number is “11”, and the status flag is “0”. Indicates that it is in a writing state.

(動作)
以上の構成により実施例1のフラッシュディスク装置は、以下のように動作する。このフラッシュディスク装置の立上げ時に行うアドレステーブル30の再構成の動作を図3のフラッシュメモリおよびアドレステーブルの例示図、図4の起動時の動作フローチャート図を用いて以下詳細に説明する。なお、リード/ライト動作については、特許文献1のフラッシュメモリ装置と同様であるので、その詳細な説明は省略する。
(Operation)
With the above configuration, the flash disk device of the first embodiment operates as follows. The reconfiguration operation of the address table 30 performed when the flash disk device is started up will be described in detail below with reference to the flash memory and the address table illustrated in FIG. 3 and the operation flowchart shown in FIG. Since the read / write operation is the same as that of the flash memory device of Patent Document 1, detailed description thereof is omitted.

まず、立上げ処理が開始されると、物理チャンク番号となるIを”0”に初期化し、最後の物理チャンク番号をMに設定する(ステップS01)。   First, when start-up processing is started, I, which is a physical chunk number, is initialized to “0”, and the last physical chunk number is set to M (step S01).

次に、物理チャンク番号IがMより大きいかどうかを判定し(ステップS02)、IがMより大きい場合は、すべての物理チャンクの処理を終了したとし、本処理を終了する。   Next, it is determined whether or not the physical chunk number I is greater than M (step S02). If I is greater than M, it is determined that all physical chunks have been processed, and this process ends.

一方、物理チャンク番号IがM以下の場合は、当該物理チャンクに記録されている論理チャンク番号と更新番号を読み出す(ステップS03)。   On the other hand, when the physical chunk number I is equal to or less than M, the logical chunk number and the update number recorded in the physical chunk are read (step S03).

この場合、I=0であるので、物理チャンク0の管理データ21k0から、論理チャンク番号として”4”と、更新番号として”10”が読み出される。   In this case, since I = 0, “4” as the logical chunk number and “10” as the update number are read from the management data 21k0 of the physical chunk 0.

次に、管理データ21k0から読み出された論理チャンク番号からアドレステーブル30の論理チャンクの内容が”空き”であるかを判定し(ステップS04)、この場合、論理チャンク番号が”4”であり、論理チャンク4は”空き”ではなく、”物理チャンク0”が格納されているのでステップS05に進み、当該物理チャンク、すなわち物理チャンク0の誤り訂正処理を行い。ビットエラーがないかどうかを確認する(ステップS06)。   Next, it is determined from the logical chunk number read from the management data 21k0 whether the content of the logical chunk in the address table 30 is “free” (step S04). In this case, the logical chunk number is “4”. Since the logical chunk 4 is not “empty” but stores “physical chunk 0”, the process proceeds to step S05, and error correction processing of the physical chunk, that is, physical chunk 0 is performed. It is confirmed whether there is no bit error (step S06).

そして、ステップS06にて、物理チャンク0のデータにビットエラーがないときは、物理チャンク0に対応する論理チャンク4としてアドレステーブル30に登録されている物理チャンク番号を参照し、登録済みの物理チャンク番号として”0”を取得し、これと物理チャンク番号(I=0)とを比較し(ステップS07)、同じときは、重複して別に登録された物理チャンクはないと判定しステップ09に進み、Iをインクリメントして、ステップS02に戻り、次の物理チャンクの処理を同様に行う。   If there is no bit error in the data of physical chunk 0 in step S06, the physical chunk number registered in the address table 30 as the logical chunk 4 corresponding to the physical chunk 0 is referred to, and the registered physical chunk “0” is acquired as the number, and this is compared with the physical chunk number (I = 0) (step S07). If the numbers are the same, it is determined that there are no duplicated physical chunks, and the process proceeds to step 09. , I is incremented, and the process returns to step S02 to similarly process the next physical chunk.

一方、例えば、物理チャンク9(I=9)のときの場合では、対応する論理チャンク番号が”4”で、アドレステーブル30にこの論理チャンク番号として記載されている物理チャンク番号が”0”で当該物理チャンク番号(I=9)と異なるときは、重複してすでに登録された物理チャンクがあるので、登録済みの物理チャンク0の更新番号(”10”)と当該物理チャンク9の更新番号(”11”)と比較し(ステップS07)、更新番号が大きく新しい物理チャンクの方の番号、この場合、物理チャンク番号“9”にてアドレステーブルを更新し(ステップS08)、Iをインクリメントして(ステップS09)、ステップS02に戻り、次の物理チャンクの処理を行う。なお、図示していないが、更新番号が小さい方の物理チャンク、この場合では物理チャンク0の方は空きとし、すべて”1”を書込むようにする。   On the other hand, for example, in the case of physical chunk 9 (I = 9), the corresponding logical chunk number is “4”, and the physical chunk number described as this logical chunk number in the address table 30 is “0”. If it is different from the physical chunk number (I = 9), there are already duplicated physical chunks, so the update number of the registered physical chunk 0 (“10”) and the update number of the physical chunk 9 ( "11") (step S07), the address table is updated with the number of the new physical chunk with the larger update number, in this case the physical chunk number "9" (step S08), and I is incremented. (Step S09), the process returns to Step S02 to process the next physical chunk. Although not shown, the physical chunk with the smaller update number, in this case the physical chunk 0, is empty and all “1” s are written.

再びステップ04に戻って、ステップ04にて、I=1の場合のように、物理チャンク1が空きで、すべて”1”の場合は、ステップS08に進み、アドレステーブル30を参照し、空きとなっている論理チャンク、例えば論理チャンク3を選出し、論理チャンク3の物理チャンク番号として“1”をアドレステーブル30に格納するとともに、論理チャンク番号として“3”を物理チャンク1の管理データ21k1に格納する(ステップS08)。そして、Iをインクリメントして(ステップS09)、ステップS02に戻り、次の物理チャンクの処理を同様に行う。   Returning to step 04 again, if the physical chunk 1 is empty and all are “1” as in the case of I = 1 in step 04, the process proceeds to step S08, and the address table 30 is referred to. The selected logical chunk, for example, logical chunk 3 is selected, “1” is stored in the address table 30 as the physical chunk number of logical chunk 3, and “3” is stored in the management data 21k1 of physical chunk 1 as the logical chunk number. Store (step S08). Then, I is incremented (step S09), the process returns to step S02, and the next physical chunk is similarly processed.

(実施例1の効果)
以上のように、実施例1のフラッシュディスク装置によれば、起動時のアドレステーブル再構成時の処理のときに、物理チャンクのデータ領域の誤り訂正処理を行って誤りがない場合のみ、前記アドレステーブルに同じ物理チャンク番号があるときはそれぞれの前記更新番号により新しい番号の物理チャンク番号にてアドレステーブルを更新するようにしたので、データ書き込みの途中で電源が落ちた場合などでも不完全な書込みデータによりデータ領域が壊れたままの状態とならないようにすることができる。
(Effect of Example 1)
As described above, according to the flash disk device of the first embodiment, only when there is no error by performing error correction processing on the data area of the physical chunk at the time of processing at the time of reconfiguration of the address table, the address When there is the same physical chunk number in the table, the address table is updated with the new physical chunk number by each update number, so incomplete writing even when the power is cut off during data writing It is possible to prevent the data area from being broken by data.

以上述べたように、本発明は、複数回書換え可能な不揮発性メモリからなるフラッシュメモリ装置などの不揮発性記憶装置に広く利用することができる。   As described above, the present invention can be widely used for nonvolatile storage devices such as flash memory devices composed of a nonvolatile memory that can be rewritten a plurality of times.

1 ホストマシン
10 フラッシュディスク
11 MPU
12 不揮発性メモリ
16 フラッシュメモリコントローラ
21 フラッシュメモリ
21d データ領域
21k 管理データ
30 アドレステーブル
1 Host machine 10 Flash disk 11 MPU
12 Nonvolatile memory 16 Flash memory controller 21 Flash memory 21d Data area 21k Management data 30 Address table

Claims (2)

所定の容量ごとに、データの誤り訂正を行う誤り訂正符号と、物理アドレスに対応する論理アドレスと、書き換えたデータの新旧を表わす更新番号と、前記物理アドレスが使用可能であるか否かを示す状態フラグとを格納する管理データを備えたフラッシュメモリと、
前記論理アドレスと物理アドレスを対応付けるアドレステーブルを格納する不揮発性メモリと、前記フラッシュメモリおよび不揮発性メモリを制御する制御手段とを備え、
起動時のアドレステーブル再構成時の処理のときに、前記論理アドレスが空きでない場合に、前記物理アドレスのデータの誤り訂正処理を行って、誤りがないと判断されると、重複して既に登録された物理アドレスがあるときは、それぞれの前記更新番号により新しい番号の物理アドレスにてアドレステーブルを更新するようにし、
前記アドレステーブルを更新した後、更新番号が旧い方の物理アドレスの、前記状態フラグ、誤り訂正符号、論理アドレス及び更新番号に同一の規定値を格納することを特徴とするフラッシュメモリ装置。
For each predetermined capacity, an error correction code for performing error correction of data, a logical address corresponding to the physical address, an update number indicating the new and old of the rewritten data, and whether or not the physical address is usable Flash memory with management data for storing status flags ;
A nonvolatile memory that stores an address table that associates the logical address with the physical address, and a control unit that controls the flash memory and the nonvolatile memory,
When the address table is reconfigured at startup, if the logical address is not empty, an error correction process is performed on the data of the physical address, and if it is determined that there is no error, it is already registered in duplicate. When there is a physical address that has been updated, the address table is updated with the physical address of the new number according to each of the update numbers,
After updating the address table, the flash memory device stores the same specified value in the status flag, error correction code, logical address, and update number of the physical address with the oldest update number.
前記状態フラグを格納された前記同一の規定値に基づいて、物理アドレスが使用可能であるか否かを判断することを特徴とする請求項1記載のフラッシュメモリ装置。2. The flash memory device according to claim 1, wherein whether or not a physical address is usable is determined based on the same specified value in which the status flag is stored.
JP2009278780A 2009-12-08 2009-12-08 Flash disk device Active JP5707695B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009278780A JP5707695B2 (en) 2009-12-08 2009-12-08 Flash disk device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009278780A JP5707695B2 (en) 2009-12-08 2009-12-08 Flash disk device

Publications (2)

Publication Number Publication Date
JP2011123560A JP2011123560A (en) 2011-06-23
JP5707695B2 true JP5707695B2 (en) 2015-04-30

Family

ID=44287419

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009278780A Active JP5707695B2 (en) 2009-12-08 2009-12-08 Flash disk device

Country Status (1)

Country Link
JP (1) JP5707695B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9104614B2 (en) * 2011-09-16 2015-08-11 Apple Inc. Handling unclean shutdowns for a system having non-volatile memory

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05143468A (en) * 1991-11-20 1993-06-11 Toshiba Corp Restoring device for power source turn-off
JP3319361B2 (en) * 1997-09-30 2002-08-26 ソニー株式会社 Storage device, data processing device and data processing method
JP2914360B2 (en) * 1997-09-30 1999-06-28 ソニー株式会社 External storage device and data processing method
JP3070539B2 (en) * 1997-09-30 2000-07-31 ソニー株式会社 External storage device, data processing device, and data processing method
JP2910745B2 (en) * 1997-09-30 1999-06-23 ソニー株式会社 Storage device and data processing method
JP4200710B2 (en) * 2002-08-08 2008-12-24 ソニー株式会社 Recording apparatus, recording method, and program
US7234036B1 (en) * 2002-10-28 2007-06-19 Sandisk Corporation Method and apparatus for resolving physical blocks associated with a common logical block
JP2005190288A (en) * 2003-12-26 2005-07-14 Tdk Corp Memory controller, flash memory system therewith, and method for controlling flash memory
JP2005242897A (en) * 2004-02-27 2005-09-08 Oki Electric Ind Co Ltd Flash disk drive
JP2009276883A (en) * 2008-05-13 2009-11-26 Oki Electric Ind Co Ltd Semiconductor auxiliary storage device
JP2009205689A (en) * 2009-05-08 2009-09-10 Oki Electric Ind Co Ltd Flash disk device

Also Published As

Publication number Publication date
JP2011123560A (en) 2011-06-23

Similar Documents

Publication Publication Date Title
JP4058322B2 (en) Memory card
JP4418439B2 (en) Nonvolatile storage device and data writing method thereof
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
JP3977370B2 (en) Flash memory address mapping method, mapping information management method, and flash memory using these methods
US20080028132A1 (en) Non-volatile storage device, data storage system, and data storage method
JP2013211056A (en) Method and system for facilitating quick startup of flash memory system
JPWO2005083573A1 (en) Semiconductor memory device
JPWO2007000862A1 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND DATA WRITE METHOD
JP2013222435A (en) Semiconductor storage device and method of controlling the same
JP2010267290A (en) Method and apparatus for resolving physical block associated with common logical block
JP2006195565A (en) Control method for semiconductor storage device, memory card, and host apparatus
JPWO2007105688A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
CN111506255B (en) NVM-based solid-state hard disk metadata management method and system
JP2009259145A (en) Memory controller, flash memory system provided with memory controller, and method for controlling flash memory
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP5707695B2 (en) Flash disk device
JP2007233838A (en) Control method for memory system
JP5395163B2 (en) Memory management device and memory area setting method
JP3826115B2 (en) Storage device, memory management method, and program
JP2004078902A (en) Storage device, memory management method, and program thereof
CN103389943A (en) Control device, storage device, and storage control method
JP4888333B2 (en) Flash disk device
JP2009276883A (en) Semiconductor auxiliary storage device
JP2008112455A (en) Memory card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120904

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131022

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140624

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140822

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150203

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150216

R150 Certificate of patent or registration of utility model

Ref document number: 5707695

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150