JP2005242897A - Flash disk drive - Google Patents

Flash disk drive Download PDF

Info

Publication number
JP2005242897A
JP2005242897A JP2004054726A JP2004054726A JP2005242897A JP 2005242897 A JP2005242897 A JP 2005242897A JP 2004054726 A JP2004054726 A JP 2004054726A JP 2004054726 A JP2004054726 A JP 2004054726A JP 2005242897 A JP2005242897 A JP 2005242897A
Authority
JP
Japan
Prior art keywords
data
flash memory
block
written
address
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.)
Pending
Application number
JP2004054726A
Other languages
Japanese (ja)
Inventor
Takenori Hoshino
武徳 星野
Katsuyoshi Tominaga
勝好 富永
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 JP2004054726A priority Critical patent/JP2005242897A/en
Publication of JP2005242897A publication Critical patent/JP2005242897A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a flash disk drive whose lifetime is prevented from dropping by equalizing the number of rewriting times in order to eliminate a frequent change in address table contents and suppress an increase in the number of rewriting times in a specified area. <P>SOLUTION: A free area for data storage is prepared in advance on a flash memory 20 regardless of a logical address designated from a host machine 1, and write data from the host machine 1 is sequentially written. Although a block 21 whose data becomes invalid is erased in the background in parallel with the sequential writing, an address table 30 holding the relation between a logical address and a physical address is then stored in a nonvolatile memory 12 rewritable in a word unit, such as a RAN. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、不揮発性メモリであるフラッシュメモリを使用した半導体ディスク装置であるフラッシュディスク装置に関するものである。   The present invention relates to a flash disk device that is a semiconductor disk device using a flash memory that is a nonvolatile memory.

従来、フラッシュディスク装置に関する技術としては、例えば、次のような文献に記載されるものがあった。   Conventionally, as a technique related to a flash disk device, for example, there are those described in the following documents.

特開平2−292798号公報(特許3226042号)「フラッシ ュEEpromシステム」JP-A-2-292798 (Patent No. 326042) "Flash EEprom System" 特開平11−339485号公報「フラッシュEEpromシステム 」Japanese Patent Application Laid-Open No. 11-339485 “Flash EEprom System” 特開平6−124596号公報「フラッシュメモリを使用した記憶装 置」Japanese Patent Laid-Open No. 6-124596 “Storage device using flash memory” 特開平5−27924号公報「半導体メモリを用いた外部記憶システ ム及びその制御方法」Japanese Laid-Open Patent Publication No. 5-27924 "External Storage System Using Semiconductor Memory and Control Method Therefor"

近年の不揮発性メモリの大容量化、低コスト化に伴い、不揮発性メモリを使用した半導体ディスク装置であるフラッシュディスク装置が作られるようになった。フラッシュディスク装置に一般的に使用されている大容量の不揮発性メモリ素子は、AND型/NAND型等のフラッシュメモリである。   With the recent increase in capacity and cost of non-volatile memories, flash disk devices, which are semiconductor disk devices using non-volatile memories, have been made. A large-capacity nonvolatile memory element generally used in a flash disk device is a flash memory of an AND type / NAND type or the like.

フラッシュメモリは複数のブロックにより構成され、更にこれらの各ブロックが、複数のページにより構成されている。ページは、リード(書込み)/ライト(読出し)の単位であり、通常、磁気ディスク装置等のハードディスク装置におけるリード/ライトの最小単位であるセクタと同じ大きさで、512バイト(Byte)である。ページ内のデータを書換える場合は、通常、前データを消去した後、新たなデータを書込む。ブロックは消去の単位(一般的には16KByte)であり、書換えがこのブロック内の一部のページであっても、この1つのブロック全部を消去する必要がある。   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) / write (read), and is usually 512 bytes (Bytes) in 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. When rewriting data in a page, normally, new data is written after erasing previous data. A block is an erasing unit (generally 16 Kbytes), and even if the rewriting is a partial page in the block, it is necessary to erase the entire block.

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

これらの制約を解決するために、特許文献1及び特許文献2の技術では、フラッシュメモリの全領域の内、一部のブロックを故障時の代替用に用意し、又、各ページに冗長の複数ビット(bit)を付加し、誤り訂正コードやビットエラーの代替情報(ページ内でビットの代替を行う)、更にはブロックの代替情報を保持し、前記制約の解決を行っている。   In order to solve these restrictions, in the techniques of Patent Document 1 and Patent Document 2, a part of the entire area of the flash memory is prepared for replacement at the time of failure, and each page has a redundant plurality of blocks. Bits are added, error correction code, bit error replacement information (perform bit replacement in a page), and block replacement information are held to solve the restriction.

しかしながら、従来のフラッシュディスク装置では、次のような課題があった。   However, the conventional flash disk device has the following problems.

フラッシュディスク装置をコンピュータシステムの2次記憶装置(補助記憶装置或いは外部記憶装置)として使用すると、オペレーティングシステム(OS)、アプリケーションプログラム、データ等が保存され、ディスク上の任意の箇所がリード/ライトされる。通常、こうしたコンピュータシステムでのライトは、特定の記憶領域に集中する。この場合、書込みが行われている記憶領域のブロックと、代替ブロックとして用意した分のブロックしかライトに使用できない。例えば、ブロック書換え制限が10万回の一般的なNAND型のフラッシュメモリを使用した場合、代替ブロックが20ブロックで、ライトが10ブロックに集中した場合は、30ブロック×10万回=300万回のライトしか出来ず、コンピュータシステムの寿命のネックとなる。   When a flash disk device is used as a secondary storage device (auxiliary storage device or external storage device) of a computer system, an operating system (OS), application programs, data, etc. are stored, and arbitrary locations on the disk are read / written. The Usually, the lights in such computer systems are concentrated in a specific storage area. In this case, only blocks in the storage area in which writing is performed and blocks prepared as alternative blocks can be used for writing. For example, when a general NAND flash memory with a block rewrite limit of 100,000 times is used, if the alternative block is 20 blocks and the write is concentrated on 10 blocks, 30 blocks × 100,000 times = 3 million times This is a bottleneck in the life of the computer system.

又、フラッシュディスク装置おける或るブロック中の或るページへデータをライトする場合、通常は、該当するページの前データを消去してから新たなデータをライトする必要がある。この際、ライトデータ量が小さい場合でも、当該ページを含むブロック全体のデータの消去が必要(ブロック単位の消去が必要)となり、当該ブロックでライトを行わない部分(ページ)についても消去前のデータを再びライトする必要がある。一般的なNAND型フラッシュメモリを使用したフラッシュディスク装置の場合、1ページのリードは100μs程度で完了するが、ライトは10ms以上掛かる。   Further, when data is written to a certain page in a certain block in the flash disk device, it is usually necessary to erase the previous data of the corresponding page and then write new data. At this time, even if the amount of write data is small, it is necessary to erase the data of the entire block including the page (erase in units of blocks is necessary), and the data before erasure is also performed on a portion (page) where writing is not performed in the block Need to be lighted again. In the case of a flash disk device using a general NAND flash memory, reading of one page is completed in about 100 μs, but writing takes 10 ms or more.

一方でこうした問題を解決するために、特許文献3、4では、ホストの中央処理装置(以下「CPU」という。)から指定される論理アドレスに関係無く、フラッシュディスク装置内に空き領域を予め用意し、ホストCPUから指定されるライトデータの論理アドレスを、アドレステーブル(論理アドレスを実アドレスに変換するためのデーブル)により、フラッシュメモリ上の空き領域の物理アドレスに変換し、この物理アドレスの空き領域にライトデータを順次書込んでいく方式が提案されている。しかし、この方式では、論理アドレスとフラッシュメモリ上の物理アドレスとの関係が頻繁に変化するために、その都度、アドレステーブルの内容を変更する必要がある。そのため、特許文献3の技術では、バッテリバックアップを行って、フラッシュメモリの特定の領域にアドレステーブルを退避し、特許文献4の技術では、既に書込まれている箇所への上書きが複数回可能な特殊なフラッシュメモリを使用することで対処しているが、何れも不利不便であって実現にあたっての制約となっている。   On the other hand, in order to solve such a problem, in Patent Documents 3 and 4, a free 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. Then, the logical address of the write data designated by the host CPU is converted into a physical address of an empty area in the flash memory by an address table (table for converting the logical address into a real address), and the free space of this physical address is converted. A method has been proposed in which write data is sequentially written in an area. However, in this method, since the relationship between the logical address and the physical address on the flash memory changes frequently, it is necessary to change the contents of the address table each time. Therefore, in the technique of Patent Document 3, battery backup is performed and the address table is saved in a specific area of the flash memory, and in the technique of Patent Document 4, overwriting of the already written location can be performed a plurality of times. Although this is dealt with by using a special flash memory, both are disadvantageous and inconvenient.

本発明は、前記従来技術の課題を解決し、アドレステーブルの内容の頻繁な変更をなくすと共に、特定の領域における書換え回数の増加を抑制するために、装置全体の書換え回数を平準化して寿命低下を防止出来るフラッシュディスク装置を提供することを目的とする。   The present invention solves the above-described problems of the prior art, eliminates frequent changes in the contents of the address table, and suppresses an increase in the number of rewrites in a specific area, thereby reducing the lifetime by leveling the number of rewrites in the entire apparatus. It is an object of the present invention to provide a flash disk device that can prevent the above-described problem.

前記課題を解決するために、本発明のフラッシュディスク装置では、次の(a)〜(e)のように構成している。   In order to solve the above-described problems, the flash disk device of the present invention is configured as follows (a) to (e).

(a) ホストから指定される論理アドレスに関係なく、フラッシュメモリ上にデータ格納用の空き領域を予め用意し、ホストからのライトデータを順次書込み、平行してバックグランドでデータの無効となったブロックを消去して行くが、その際に論理アドレスと物理アドレスの関係を保持するアドレステーブルを、随時読み書き可能なメモリ(以下「RAM」という。)のようなワード単位での書換え可能な不揮発性メモリに保持する。ワード単位での書換えとは、RAM等のメモリが1回のアクセスサイクルでアクセスできるデータの単位がワードであり、これは通常8ビット(bit)や16bitといった単位のデータであり、この単位での書換えをいう。   (A) Regardless of the logical address specified by the host, an empty area for storing data is prepared in advance on the flash memory, the write data from the host is sequentially written, and the data becomes invalid in the background in parallel. The block is erased, but the address table that holds the relationship between the logical address and the physical address at that time is rewritable in a word unit such as a readable / writable memory (hereinafter referred to as “RAM”). Keep in memory. In word-unit rewriting, a unit of data that can be accessed by a memory such as a RAM in one access cycle is a word, which is usually data in units of 8 bits (16 bits) or 16 bits. Rewrite.

(b) フラッシュメモリの特定領域に、アドレステーブルの変更内容をログのように順次追加する。ログとは、データベース管理等で使用しているログと同じ概念である。例えば、データベースのデータを書換える場合、実際のデータを書換えるのと同時に、「どの場所のデータをどの値で書換えた」という情報を残すが、これがログと呼ばれるものであり、ログ用の領域にライトデータをどんどん追加していき、ライトデータが壊れた場合でもログを用いてそのデータを復元出来る。本発明において、アドレステーブルを収めるには、フラッシュメモリの特性上、頻繁な書換えを行うと寿命が低下するので、消去してから書込むのではなく、変更した情報をログとして追加していって従来の課題を解決している。   (B) The address table changes are sequentially added to a specific area of the flash memory like a log. The log is the same concept as a log used in database management or the like. For example, when rewriting data in a database, at the same time as rewriting actual data, the information that “data at which location was rewritten with which value” is left. This is called a log and is an area for log. Write data can be continuously added to the disk, and even if the write data is broken, the data can be restored using the log. In the present invention, in order to store the address table, due to the characteristics of the flash memory, the lifetime decreases if it is frequently rewritten, so the changed information is added as a log instead of being erased and written. The conventional problem is solved.

(c) データをフラッシュメモリに書込む際に、一緒に論理アドレスの情報を保持することにより、アドレステーブルの頻繁な内容の変更を抑制する。   (C) When data is written to the flash memory, logical address information is held together to suppress frequent changes in the address table.

(d) 特定領域だけに書換えが集中しないように書換え回数の平準化を行うために、データをフラッシュメモリのブロックに書込む際に、同時に当該ブロックに書換え回数の値を保持し、次に消去すべきブロックの選択に使用する。   (D) In order to level the number of rewrites so that rewrite does not concentrate only on a specific area, when data is written to a block of the flash memory, the value of the number of rewrites is simultaneously held in the block, and then erased Used to select a block to be used.

(e) OS等のように更新が行われずに固定されているデータを保持するフラッシュメモリのブロックを有効に使用するために、書換え回数に或一定の差が生じた時に、書換え回数の少ないブロックのデータを他の空きブロックにコピーし、この固定されているデータを保持していたブロックを使えるようにすることにより、全体の書換え回数の平準化を行う。   (E) A block with a small number of rewrites when a certain difference occurs in the number of rewrites in order to effectively use a block of flash memory that holds fixed data without being updated, such as an OS Is copied to another empty block so that the block holding the fixed data can be used to level the total number of rewrites.

請求項1に係る発明によれば、論理アドレスに関係なくフラッシュメモリ上に空き領域を予め用意し、ホストからのライトデータを順次書込み、その際に論理アドレスと物理アドレスの関係を保持するアドレステーブルをワード単位での書換えの可能な不揮発性メモリに保持するようにしている。そのため、ホストからフラッシュメモリの特定の領域にライトアクセスが集中する場合でも、そのフラッシュメモリ内の特定の領域が、他の領域よりも摩耗することを防止することが出来る。これにより、フラッシュディスク装置全体の寿命低下を抑制出来る。   According to the first aspect of the present invention, an empty table is prepared in advance in the flash memory regardless of the logical address, the write data from the host is sequentially written, and the relationship between the logical address and the physical address is maintained at that time. Is stored in a rewritable nonvolatile memory in units of words. Therefore, even when write accesses are concentrated from the host to a specific area of the flash memory, it is possible to prevent the specific area in the flash memory from being worn more than other areas. Thereby, the lifetime reduction of the whole flash disk apparatus can be suppressed.

請求項2に係る発明によれば、フラッシュメモリの特定領域に、アドレステーブルをログのように順次追加するようにしているので、アドレステーブルの変更をフラッシュメモリに追加して行くことにより、高価なワード単位での書換え可能な不揮発性メモリを削除し、コストを削減することが出来る。   According to the second aspect of the present invention, since the address table is sequentially added to the specific area of the flash memory like a log, it is expensive to add the change of the address table to the flash memory. The rewritable nonvolatile memory in units of words can be deleted, and the cost can be reduced.

請求項3に係る発明によれば、フラッシュメモリの特定領域に、アドレステーブルの差分のみをログのように順次追加するようにしているので、アドレステーブルの変更部分のログ(アドレステーブルログ)を、フラッシュメモリに保存する構成により、ホストからのライトが特定のセクタに集中した場合でも、アドレステーブルログのフラッシュメモリ上のエリアは均一に書換えられ、特定エリアの消耗を防ぐことが出来る。   According to the invention of claim 3, since only the difference of the address table is sequentially added to the specific area of the flash memory like a log, the log of the changed part of the address table (address table log) With the configuration of storing in the flash memory, even if the write from the host concentrates on a specific sector, the area on the flash memory of the address table log can be rewritten uniformly, and consumption of the specific area can be prevented.

請求項4に係る発明によれば、データをフラッシュメモリに書込む際に一緒に論理アドレスの情報を保持して、立上げ時にアドレステーブルを構成することにより、アドレステーブルの保存を無くすようにしているので、アドレステーブルやアドレステーブルログをフラッシュメモリに書出すためのオーバヘッドを削除出来、しかも、データとアドレス等の情報がフラッシュメモリの1つのページに同時に書込まれるため、常に整合が保たれる。更に、フラッシュメモリの上書きの回数制限に制約されずに、使用するフラッシュメモリを選択することが出来る。   According to the fourth aspect of the present invention, when the data is written to the flash memory, the logical address information is held together, and the address table is configured at the start-up so that the address table is not saved. Therefore, the overhead for writing the address table and address table log to the flash memory can be eliminated, and information such as data and address is written to one page of the flash memory at the same time, so that consistency is always maintained. . Furthermore, the flash memory to be used can be selected without being restricted by the limitation on the number of times of overwriting of the flash memory.

請求項5に係る発明によれば、書換え回数の平準化を行うため、ブロック管理テーブルに書換え数の値を保持し、次に消去すべきブロックの選択に使用するようにしているので、各ブロックの書換え回数を管理して書換え回数の少ないブロックから使用することにより、各ブロックの消耗を均一化して、フラッシュディスク装置の寿命を延ばすことが出来る。   According to the fifth aspect of the invention, since the number of rewrites is leveled, the value of the number of rewrites is held in the block management table and used to select the block to be erased next. By managing the number of times of rewriting and using the blocks from the least number of times of rewriting, the consumption of each block can be made uniform and the life of the flash disk device can be extended.

請求項6に係る発明によれば、書換え回数の平準化を行うため、データをフラッシュメモリのブロックに書込む際に同時に当該ブロックに書換え数の値を保持し、次に消去すべきブロックの選択に使用するようにしているので、フラッシュメモリ上のブロック管理テーブルの書換えがブロック故障の時に限られ、ホストからの通常のデータの書込みではブロック管理テーブルの書換えが発生しなくなるため、オーバヘッドが削減される。   According to the invention of claim 6, in order to level the number of times of rewriting, when the data is written to the block of the flash memory, the value of the number of rewriting is simultaneously held in the block, and the block to be erased next is selected. Therefore, rewriting the block management table on the flash memory is limited to when a block failure occurs, and normal data writing from the host does not cause rewriting of the block management table, reducing overhead. The

請求項7に係る発明によれば、複数のセクタを纏めてリード/ライトの単位として、アドレステーブルの圧縮を行うようにしているので、複数のセクタを1つの纏まりとして管理することにより、高価なワード単位での書換え可能な不揮発性メモリの使用量を削減することが出来る。更に、サイズの大きいリード/ライトの処理を、1つの或る大きさ(以下「チャンク」という。)分のデータを一緒にフラッシュメモリにリード/ライトすることにより、オーバヘッドを削減することが出来る。   According to the invention of claim 7, since the address table is compressed as a unit of read / write by combining a plurality of sectors, it is expensive to manage a plurality of sectors as one group. The amount of rewritable nonvolatile memory in units of words can be reduced. Furthermore, the read / write processing with a large size can reduce overhead by reading / writing data of one certain size (hereinafter referred to as “chunk”) to the flash memory together.

請求項8に係る発明によれば、更新が行われずに固定されているデータを保持するフラッシュメモリのブロックを有効に使用するため、書換え回数に或る一定の差が生じた時に、書換え回数の少ないブロックのデータを他の空きブロックにコピーし、このブロックを使えるようにしたので、最初のインストール以降、ホストから更新されないフラッシュメモリの領域があった場合、そのデータが書込まれていたフラッシュメモリの領域も、運用中に順次ホストから更新されるデータの領域として使えるようになる。よって、本フラッシュディスク装置の書換え回数の全体量が増大する。   According to the invention of claim 8, in order to effectively use a block of flash memory that holds fixed data without being updated, when a certain difference occurs in the number of rewrites, Since a small block of data was copied to another free block so that this block could be used, if there was a flash memory area that was not updated from the host after the initial installation, the flash memory in which that data was written This area can also be used as a data area that is sequentially updated from the host during operation. Therefore, the total amount of rewriting of the flash disk device increases.

本発明のフラッシュディスク装置では、フラッシュメモリと、制御手段とを備えている。前記フラッシュメモリでは、物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われる。前記制御手段では、ホストから指定される論理アドレスを前記物理アドレスに変換するためのアドレステーブルを用いて、前記フラッシュメモリに対するデータの書込み及び読出しを制御する。前記アドレステーブルは、ワード単位での書換え可能な不揮発性メモリ、或いは前記フラッシュメモリに保存されている。又は、前記アドレステーブルは、前記フラッシュメモリに書込まれた論理アドレスの情報に基づいて前記制御手段により生成される。   The flash disk device of the present invention includes a flash memory and control means. The flash memory has a plurality of blocks each composed of a plurality of data storage pages with physical addresses, and data is written and read in units of pages, and data is erased in units of blocks. After that, data is written to a predetermined page in the erased block. The control means controls writing and reading of data to and from the flash memory using an address table for converting a logical address designated by a host into the physical address. The address table is stored in a rewritable nonvolatile memory in units of words or the flash memory. Alternatively, the address table is generated by the control means on the basis of logical address information written in the flash memory.

(構成)
図1(A)、(B)は本発明の実施例を示すフラッシュディスク装置の概略の構成図であり、同図(A)は全体の構成図、及び同図(B)は同図(A)中のフラッシュメモリの概略の構成図である。
(Constitution)
1A and 1B are schematic configuration diagrams of a flash disk device showing an embodiment of the present invention. FIG. 1A is an overall configuration diagram, and FIG. 2 is a schematic configuration diagram of the flash memory in FIG.

図1(A)において、ホストCPU等のホストマシン1には、ホストのインタフェース(以下)「I/F」という。)バス2により、本実施例で使用されるフラッシュディスク装置10が接続されている。フラッシュディスク装置10は、装置全体を制御する制御手段である例えばマイクロプロセッサユニット(以下「MPU」という。)11を有している。MPU11は、RAM11a、読出し専用メモリ(以下「ROM」という。)11b、及び入/出力(以下「I/O」という。)ポート11c等により構成され、これには不揮発性メモリ12が接続されている。不揮発性メモリ12は、MPU11によりアクセス制御され、管理用のテーブルやリスト等を保持するために、アクセス制御が容易であるRAM等のようなワード単位での書換えの可能なメモリ構造(FRAM、MRAM等)になっている。   In FIG. 1A, the host machine 1 such as a host CPU is referred to as a host interface (hereinafter referred to as “I / F”). The flash disk device 10 used in this embodiment is connected by the bus 2. The flash disk device 10 has, for example, a microprocessor unit (hereinafter referred to as “MPU”) 11 which is a control means for controlling the entire device. 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. 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が接続されている。バッファメモリ15は、ホストマシン1からのリード/ライトデータを一時的に保存し処理するメモリである。内部データバス14には、フラッシュメモリコントローラ16が接続され、このフラッシュメモリコントローラ16に、フラッシュメモリバス17を介して1つ又は複数のフラッシュメモリ20が接続されている。   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. 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.

図1(B)において、フラッシュメモリ20は、消去の単位であるデータ格納用の複数のブロック21−N,21−(N+1),・・・を有している。各ブロック21は、リード/ライトの単位であるデータ格納用の複数のページ22−0,22−1,・・・,22−31を有している。1ページ22は、例えば、512Byte等の記憶容量を有している。このようなフラッシュメモリ20では、書換えがブロック21内の一部のページ22であっても、1つのブロック全体を消去する必要がある。   In FIG. 1B, the flash memory 20 has a plurality of blocks 21-N, 21- (N + 1),. Each block 21 has a plurality of pages 22-0, 22-1,..., 22-31 for storing data, which are read / write units. One page 22 has a storage capacity of, for example, 512 bytes. In such a flash memory 20, it is necessary to erase one entire block even if rewriting is performed on some pages 22 in the block 21.

図2は、本発明の実施例1を示すものであって、図1(A)のフラッシュディスク装置10の論理構成図である。   FIG. 2 shows the first embodiment of the present invention and is a logical configuration diagram of the flash disk device 10 of FIG.

ホストマシン1から見える(即ち、指定される)セクタアドレス(即ち、論理アドレス)25である論理セクタナンバ(以下、このナンバを「No.」という。)0,1,2,・・・,Jを、フラッシュメモリ20上の物理アドレスであるページアドレスに変換するために、図1の不揮発性メモリ12内には、アドレステーブル30が格納されている。アドレステーブル30内には、論理セクタを物理ページに変換するための複数のアドレス変換データ31−0,31−1,31−2,・・・,31−Kが格納されている。更に、不揮発性メモリ12内には、フラッシュメモリ20内の空きページを管理する空きページリスト32と、フラッシュメモリ20内のブロック21−0,21−1,・・・,21−Lを管理するブロック管理テーブル33とが格納されている。フラッシュメモリ20に格納される複数のブロック21−0〜21−Lは、それぞれ複数のページ22−0,22−1,・・・,22−Mを有している。   A logical sector number (hereinafter, this number is referred to as “No.”) 0, 1, 2,..., J, which is a sector address (that is, a logical address) 25 that is visible (that is, designated) from the host machine 1. An address table 30 is stored in the nonvolatile memory 12 shown in FIG. 1 for conversion into a page address that is a physical address on the flash memory 20. The address table 30 stores a plurality of address conversion data 31-0, 31-1, 31-2,..., 31-K for converting a logical sector into a physical page. Further, in the nonvolatile memory 12, a free page list 32 for managing free pages in the flash memory 20 and blocks 21-0, 21-1,..., 21-L in the flash memory 20 are managed. A block management table 33 is stored. The plurality of blocks 21-0 to 21-L stored in the flash memory 20 have a plurality of pages 22-0, 22-1,.

本実施例1では、不揮発性メモリ12内にアドレステーブル30を用意し、ホストマシン1から見えるセクタアドレスである論理セクタNo.から、フラッシュメモリ20上の物理的なページNo.への写像を保持する。フラッシュメモリ20には、余分なページ22−iを複数用意し、空きページリスト32に登録して管理する。   In the first embodiment, an address table 30 is prepared in the non-volatile memory 12, and a logical sector No. that is a sector address that can be seen from the host machine 1. To the physical page number on the flash memory 20. Keep a mapping to. A plurality of extra pages 22-i are prepared in the flash memory 20 and registered in the free page list 32 for management.

(動作)
フラッシュメモリ20からのリード動作(1)、フラッシュメモリ20へのライト動作(2)、フラッシュメモリ20のガベージコレクション動作(3)、及びその他の動作(4)を説明する。
(Operation)
A read operation (1) from the flash memory 20, a write operation (2) to the flash memory 20, a garbage collection operation (3) of the flash memory 20, and other operations (4) will be described.

(1) リード動作
図3は、図2のフラッシュディスク装置10のリード動作を示すフローチャートである。
(1) Read Operation FIG. 3 is a flowchart showing the read operation of the flash disk device 10 of FIG.

ホストマシン1からの指示に従い、フラッシュメモリ20の記憶データをリードする場合、MPU11の制御によって次のような処理が行われる。   When reading data stored in the flash memory 20 in accordance with an instruction from the host machine 1, the following processing is performed under the control of the MPU 11.

リード処理が開始されると、ステップS1において、ホストマシン1から指定された論理アドレス25である論理セクタNo.(例えば、論理セクタNo.1)を得る。この論理セクタNo.1は、ホストI/Fコントローラ13を介してMPU11へ送られる。ステップS2において、MPU11は、不揮発性メモリ12内のアドレステーブル30から、指定された論理セクタNo.1に対応する物理ページNo.(例えば、アドレス変換データ31−1)を得て、これに対応するブロック(例えば、21−0)内のページNo.(例えば、22−0)を得る。このページNo.がフラッシュメモリコントローラ16へ送られる。   When the read process is started, in step S1, the logical sector No. which is the logical address 25 designated by the host machine 1 is displayed. (For example, logical sector No. 1) is obtained. This logical sector No. 1 is sent to the MPU 11 via the host I / F controller 13. In step S <b> 2, the MPU 11 reads the specified logical sector No. from the address table 30 in the nonvolatile memory 12. 1 corresponding to the physical page number. (For example, the address translation data 31-1) is obtained, and the page No. (For example, 22-0) is obtained. This page No. Is sent to the flash memory controller 16.

ステップS3において、フラッシュメモリコントローラ16内のデータ読出し部16aでは、ページNo.(22−0)の記憶データを読出し、バッファメモリ15に一時的に保存する。ステップS4において、バッファメモリ15に保存されたリードデータは、ホストI/Fコントローラ13及びホストI/Fバス2を介してホストマシン1へ転送される。これにより、リード処理が終了する。   In step S3, the data reading unit 16a in the flash memory controller 16 determines the page number. The stored data (22-0) is read out and temporarily stored in the buffer memory 15. In step S 4, the read data stored in the buffer memory 15 is transferred to the host machine 1 via the host I / F controller 13 and the host I / F bus 2. As a result, the read process ends.

(2) ライト動作
図4は、図2のフラッシュディスク装置10のライト動作を示すフローチャートである。
(2) Write Operation FIG. 4 is a flowchart showing the write operation of the flash disk device 10 of FIG.

ホストマシン1からの指示に従い、このホストマシン1からの書込みデータをフラッシュメモリ20にライトする場合、MPU11の制御によって次のような処理が行われる。   When the write data from the host machine 1 is written to the flash memory 20 in accordance with the instruction from the host machine 1, the following processing is performed under the control of the MPU 11.

ライト処理が開始されると、ステップS11において、ホストI/Fコントローラ13は、ホストマシン1から論理アドレス25である論理セクタNo.(例えば、論理セクタNo.1)と書込みデータを受取る。受取った論理セクタNo.1及び書込みデータの内、論理セクタNo.はMPU11へ送られ、書込みデータは一時的にバッファメモリ15に保存される。ステップS12において、MPU11は、不揮発性メモリ12内の空きページリスト32より、使えるブロック(例えば、21−L)内のページNo.(例えば、22−i)を得て、フラッシュメモリコントローラ13内のデータ書込み部11bへ送る。   When the write process is started, in step S 11, the host I / F controller 13 sends the logical sector No. corresponding to the logical address 25 from the host machine 1. (For example, logical sector No. 1) and write data are received. The received logical sector No. 1 and write data, the logical sector No. Is sent to the MPU 11 and the write data is temporarily stored in the buffer memory 15. In step S12, the MPU 11 determines the page number in the usable block (for example, 21-L) from the free page list 32 in the nonvolatile memory 12. (For example, 22-i) is obtained and sent to the data writing unit 11b in the flash memory controller 13.

ステップS13において、データ書込み部11bは、バッファメモリ15に保存された書込みデータを、当該ページNo.(22−i)のフラッシュメモリ箇所に書込む。MPU11は、ステップS14において、空きページリスト32より当該ページNo.(22−i)を削除すると共に、次のステップS15において、アドレステーブル30上の写像を変更(即ち、アドレス変換データを更新)し、ライト処理を終了する。   In step S13, the data writing unit 11b converts the write data stored in the buffer memory 15 into the page number. Write to the flash memory location (22-i). In step S14, the MPU 11 reads the page number from the empty page list 32. In addition to deleting (22-i), in the next step S15, the mapping on the address table 30 is changed (that is, the address conversion data is updated), and the write process is terminated.

(3) ガベージコレクション動作
図5は、図2のフラッシュディスク装置10のガベージコレクション動作を示すフローチャートである。
(3) Garbage Collection Operation FIG. 5 is a flowchart showing the garbage collection operation of the flash disk device 10 of FIG.

ライトを行っていると、フラッシュメモリ20内の空いているページが無くなるので、一定量の空きページを確保するために、定期的にガベージコレクションが行われる。ホストマシン1からのアクセスが一定時間無いときや、フラッシュメモリ20内の空きページが一定量以下になったときに、MPU11の制御によって次のようなガベージコレクション処理が行われる。   Since there are no free pages in the flash memory 20 when writing is performed, garbage collection is periodically performed in order to secure a certain amount of free pages. When there is no access from the host machine 1 for a certain period of time, or when the number of empty pages in the flash memory 20 becomes less than a certain amount, the following garbage collection process is performed under the control of the MPU 11.

ガベージコレクション処理が開始されると、MPU11は、ステップS21において、各ページの状態を示すリスト(一時ページリスト)を作成する。ステップS22において、アドレステーブル30で使用されていないページに該当する一時ページリストに未使用フラグを立てる。ステップ23において、一時ページリストより、全てのページ22−0〜22−Mが未使用のブロック21を検索し、ブロック消去部16cで消去し、該当ページ22−0〜22−Mのフラグを消去済みにし、空きページリスト32に追加する。MPU11は、ステップS24において、空きページ22が一定量以上か否かを判定し、イエスのときには、ガベージコレクション処理を終了し、ノーのときには、結合子1を介してステップS25へ進む。   When the garbage collection process is started, the MPU 11 creates a list (temporary page list) indicating the state of each page in step S21. In step S22, an unused flag is set in the temporary page list corresponding to a page that is not used in the address table 30. In step 23, the block 21 in which all the pages 22-0 to 22-M are unused is searched from the temporary page list, erased by the block eraser 16c, and the flags of the corresponding pages 22-0 to 22-M are erased. And add it to the free page list 32. In step S24, the MPU 11 determines whether or not the number of empty pages 22 is equal to or larger than a predetermined amount. If yes, the garbage collection process is terminated. If no, the process proceeds to step S25 via the connector 1.

MPU11は、ステップS25において、一時ページリストより、未使用ページ22の多いブロック21を検索する。ステップS26において、当該ブロック21の有効なページ22のデータを読出し、一時ページリストで未使用のフラグを立てる。MPU11は、ステップS27において、読出したデータを空きページリスト32で書込み可能なページ22を見つけて書出し、空きページリスト32、及びアドレステーブル30を更新し、結合子2を介してステップS23へ戻り、上記の処理を繰返す。   In step S25, the MPU 11 searches the temporary page list for a block 21 with many unused pages 22. In step S26, the valid page 22 data of the block 21 is read, and an unused flag is set in the temporary page list. In step S27, the MPU 11 finds and writes out the page 22 in which the read data can be written in the empty page list 32, updates the empty page list 32 and the address table 30, and returns to step S23 via the connector 2. Repeat the above process.

このように、ガベージコレクション処理では、アドレステーブル30上で無効となったページ22を検索し、或ブロック21中の全てのページ22−0〜22−Mが無効である場合は、そのブロック21を消去し、当該ページ22−0〜22−Mを空きページリスト32に登録する。全てのページ22−0〜22−Mが無効であるようなブロック21が見つからない場合、一部の有効ページ22のデータを空きページ22に転送して、アドレステーブル30、及び空きページリスト32の整合をとる。こうして全てのページ22−0〜22−Mが無効になったところで、ブロック消去部16cによりブロック21の消去を行う。   As described above, in the garbage collection process, the invalid page 22 is searched on the address table 30. If all the pages 22-0 to 22-M in the block 21 are invalid, the block 21 is searched. Erasing and registering the pages 22-0 to 22-M in the empty page list 32. If a block 21 in which all the pages 22-0 to 22-M are invalid is not found, data of some valid pages 22 is transferred to the empty pages 22, and the address table 30 and the empty page list 32 are stored. Align. When all the pages 22-0 to 22-M are invalidated in this way, the block 21 is erased by the block eraser 16c.

(4) その他の動作
フラッシュメモリ20のブロック21の故障は、消去時又は書込み時に発生するが、フラッシュメモリ20からMPU11へエラーステータスが返ることで検出される。MPU11では、ブロック21の故障があった場合は、ブロック管理デーブル33に故障であることを示すフラグを立て、以降そのブロック21を使用しないように管理する。
(4) Other Operations A failure of the block 21 of the flash memory 20 occurs at the time of erasing or writing, but is detected by returning an error status from the flash memory 20 to the MPU 11. In the MPU 11, if there is a failure in the block 21, a flag indicating that there is a failure is set in the block management table 33, and thereafter, the block 21 is managed not to be used.

なお、アドレステーブル30、空きページリスト32、及びブロック管理テーブル33は、ワード単位での書換えの可能なFRAM、MRAM等の不揮発性メモリ12に保存されるので、任意のタイミングで電源をオフしても、データが損なわれることは無い。   The address table 30, the free page list 32, and the block management table 33 are stored in the nonvolatile memory 12 such as FRAM and MRAM that can be rewritten in units of words. However, the data will not be lost.

(効果)
本実施例1では、ホストマシン1からフラッシュメモリ20内の特定の領域にライトアクセスが集中する場合でも、そのフラッシュメモリ20内の特定の領域が、他の領域よりも摩耗することを防止することが出来る。これにより、フラッシュディスク装置全体の寿命低下を抑制出来る。
(effect)
In the first embodiment, even when the write access is concentrated from the host machine 1 to a specific area in the flash memory 20, the specific area in the flash memory 20 is prevented from being worn more than other areas. I can do it. Thereby, the lifetime reduction of the whole flash disk apparatus can be suppressed.

実施例1では、フラッシュメモリ全体の容量が大きくなった場合、不揮発性メモリ12内に格納されるアドレステーブル30も大きくなるが、一般にワード単位での書換え可能な不揮発性メモリはビットコストが高いため、フラッシュディスク装置10が高価となる。又、通常のコンピュータシステムでは、ディスク装置へのアクセス単位が4セクタや16セクタ等、決まっている場合があるが、この場合、セクタ単位(即ち、ページ単位)でディスク管理を行うと、オーバヘッドが大きくなる。ここで、オーバヘッドとは、例えば、コンピュータがユーザプログラムを実行するに際して、直接的な関わりを持たない記憶領域や処理時間のことをいう。   In the first embodiment, when the capacity of the entire flash memory is increased, the address table 30 stored in the nonvolatile memory 12 is also increased. However, a rewritable nonvolatile memory in units of words generally has a high bit cost. The flash disk device 10 becomes expensive. In a normal computer system, there are cases where the unit of access to the disk device is determined to be 4 sectors, 16 sectors, etc. In this case, if the disk management is performed on a sector basis (ie, page basis), the overhead is reduced. growing. Here, the overhead refers to, for example, a storage area and processing time that are not directly related when the computer executes a user program.

そこで、本実施例2では、オーバヘッドを小さくするために、複数のセクタを纏めてディスク管理をする構成にしている。   Therefore, in the second embodiment, in order to reduce overhead, a configuration is adopted in which a plurality of sectors are collectively managed as a disk.

(構成)
図6は、本発明の実施例2を示すものであって、図1(A)のフラッシュディスク装置10の論理構成図である。
(Constitution)
FIG. 6 shows a second embodiment of the present invention, and is a logical configuration diagram of the flash disk device 10 of FIG.

複数のセクタ(又はページ)を纏めてチャンクという単位で管理するために、ホストマシン1からフラッシュメモリ20へのリード/ライトをチャンク単位にしている(即ち、ホストマシン1の論理アドレス25Aにおいて、複数の論理セクタを纏めて論理チャンクという単位でアクセスする構成にしている)。不揮発性メモリ12内には、アドレステーブル30A、及び空きチャンクリスト32Aが格納されている。アドレステーブル30A内には、ホストマシン1から指定される論理チャンクを、フラッシュメモリ20上の物理アドレスである物理チャンクに変換するための複数のアドレス変換情報が格納されている(即ち、チャンクに対する写像を持っている)。空きチャンクリスト32Aは、データの書込まれていない物理チャンクのリストである。   In order to collectively manage a plurality of sectors (or pages) in units of chunks, read / write from the host machine 1 to the flash memory 20 is performed in units of chunks (that is, a plurality of sectors in the logical address 25A of the host machine 1). The logical sectors are collectively accessed in units of logical chunks). In the nonvolatile memory 12, an address table 30A and an empty chunk list 32A are stored. The address table 30A stores a plurality of pieces 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 (that is, mapping to the chunk). have). The empty chunk list 32A is a list of physical chunks to which no data is written.

フラッシュメモリ20は、消去の単位であるデータ格納用の複数のフラッシュブロック(以下「Flashブロック」という。)21A−0,21A−1,・・・を有している。各Flashブロック21A−0,21A−1,・・・は、複数のページを纏めた物理チャンクを複数有している。   The flash memory 20 has a plurality of flash blocks (hereinafter referred to as “Flash blocks”) 21A-0, 21A-1,. Each of the Flash blocks 21A-0, 21A-1,... Has a plurality of physical chunks in which a plurality of pages are collected.

(動作)
フラッシュメモリ20からのリード動作(1)、及びフラッシュメモリ20へのライト動作(2)を説明する。
(Operation)
A read operation (1) from the flash memory 20 and a write operation (2) to the flash memory 20 will be described.

(1) リード動作
図7は、図6のフラッシュディスク装置10のリード動作を示すフローチャートである。
(1) Read Operation FIG. 7 is a flowchart showing the read operation of the flash disk device 10 of FIG.

ホストマシン1からの指示に従い、フラッシュメモリ20の記憶データをリードする場合、MPU11の制御によって次のような処理が行われる。   When reading data stored in the flash memory 20 in accordance with an instruction from the host machine 1, the following processing is performed under the control of the MPU 11.

リード処理が開始されると、ステップS31において、ホストマシン1から指定された論理セクタNo.をMPU11で得る。ステップS32において、MPU11は、論理セクタNo.を含む論理チャンクNo.より、アドレステーブル30Aで物理チャンクNo.を得る。ステップS33において、MPU11は、フラッシュメモリ20における物理チャンクのデータを読出し、バッファメモリ15に一時保存する。ステップS34において、ホストマシン1の要求する論理セクタNo.に該当するデータが、バッファメモリ15からホストマシン1へ転送され、リード処理が終了する。   When the read process is started, the logical sector No. designated by the host machine 1 is checked in step S31. Is obtained by MPU11. In step S32, the MPU 11 checks the logical sector number. Logical chunk No. including From the address table 30A, the physical chunk No. Get. In step S <b> 33, the MPU 11 reads the physical chunk data in the flash memory 20 and temporarily stores it in the buffer memory 15. In step S34, the logical sector number requested by the host machine 1 is set. The data corresponding to is transferred from the buffer memory 15 to the host machine 1, and the read process ends.

(2) ライト動作
図8は、図6のフラッシュディスク装置10のライト動作を示すフローチャートである。
(2) Write Operation FIG. 8 is a flowchart showing the write operation of the flash disk device 10 of FIG.

ホストマシン1からの指示に従い、このホストマシン1からの書込みデータをフラッシュメモリ20にライトする場合、MPU11の制御によって次のような処理が行われる。   When the write data from the host machine 1 is written to the flash memory 20 in accordance with the instruction from the host machine 1, the following processing is performed under the control of the MPU 11.

ライト処理が開始されると、ステップS41において、ホストマシン1より論理セクタNo.と書込むデータとをMPU11で受取る。ステップS43において、MPU11は、フラッシュメモリ20における物理チャンクのデータを読出し、バッファメモリ15に一時保存する。ステップS44において、MPU11は、読出したデータの論理セクタNo.に該当する箇所を、ホストマシン1から受取ったデータで書換える(即ち、一部の書換えであるモディファイを行う)。ステップS45において、MPU11は、空きチャンクリスト32Aを検索し、データを物理チャンクに書戻し、空きチャンクリスト32A、及びアドレステーブル30Aを更新する。このように、ライトの場合は、バッファメモリ15上で当該物理チャンクのリード/モディファイ/ライトが行われ、ライト処理が終了する。   When the write process is started, the logical sector No. is received from the host machine 1 in step S41. And the data to be written are received by the MPU 11. In step S 43, the MPU 11 reads the physical chunk data in the flash memory 20 and temporarily stores it in the buffer memory 15. In step S44, the MPU 11 checks the logical sector number of the read data. The portion corresponding to is rewritten with the data received from the host machine 1 (that is, modification that is partial rewriting is performed). In step S45, the MPU 11 searches the empty chunk list 32A, writes back the data to the physical chunk, and updates the empty chunk list 32A and the address table 30A. As described above, in the case of writing, the physical chunk is read / modified / written on the buffer memory 15, and the writing process is completed.

(効果)
本実施例2では、複数のセクタを1つの纏まりとして管理することにより、高価なワード単位での書換え可能な不揮発性メモリ12の使用量を削減することが出来る。更に、サイズの大きいリード/ライトの処理を、1つのチャンク分のデータを一緒にフラッシュメモリ20にリード/ライトすることにより、オーバヘッドを削減することが出来る。
(effect)
In the second embodiment, by managing a plurality of sectors as one group, it is possible to reduce the use amount of the rewritable nonvolatile memory 12 in expensive word units. Furthermore, the read / write processing with a large size can reduce overhead by reading / writing data for one chunk to the flash memory 20 together.

実施例1、2では、アドレステーブル30,30Aやブロック管理テーブル33を保存するために、高価なワード単位での書換え可能な不揮発性メモリ12を使用している。低コスト化を図るための対策として、不揮発性メモリ12を削除することが考えられる。しかし、アドレステーブル30,30Aは更新が頻繁なため、そのままではアドレステーブル30,30Aを保存するエリアが書換え制限のネックになり、又、その書換えのオーバヘッドが発生する。   In the first and second embodiments, in order to store the address tables 30 and 30A and the block management table 33, the rewritable nonvolatile memory 12 in units of expensive words is used. As a measure for reducing the cost, it is conceivable to delete the nonvolatile memory 12. However, since the address tables 30 and 30A are frequently updated, the area in which the address tables 30 and 30A are stored becomes a bottleneck for rewriting restriction, and the rewriting overhead occurs.

フラッシュメモリ20は、消去状態の値が“1”で、そこに“0”を書込むか、そのままにするかにより、値を保持する特徴を有している。そこで、このような特徴を使い、本実施例3では、アドレステーブル30の更新を行い、低コスト化を図ろうとしている。   The flash memory 20 has a feature that the value of the erased state is “1” and the value is held depending on whether “0” is written or left as it is. Therefore, using this feature, the third embodiment attempts to reduce the cost by updating the address table 30.

(構成)
図9は、本発明の実施例3を示すものであって、図1(A)のフラッシュディスク装置10に用いられるアドレステーブル30Bの論理構成図である。
(Constitution)
FIG. 9 shows the logical configuration of the address table 30B used in the flash disk device 10 of FIG. 1 (A), showing Embodiment 3 of the present invention.

このアドレステーブル30Bは、MPU11内の揮発性メモリであるRAM11aに形成され、その内容がフラッシュメモリ20の割当てられたエリアに保存される。即ち、ホストマシン1から指定される各論理チャンクN,N+1,N+2,・・・に対して、フラッシュメモリ20の物理チャンクNo.を保持するワードを複数用意する。最初は確定している物理チャンクを1つ保持し、その他は値“1”で埋める。このようなアドレステーブル30Bを、そのままフラッシュメモリ20の割当てられたエリアに保存する構成になっている。   The address table 30B is formed in the RAM 11a, which is a volatile memory in the MPU 11, and the contents are stored in the allocated area of the flash memory 20. That is, for each logical chunk N, N + 1, N + 2,. Prepare multiple words to hold First, one fixed physical chunk is held, and the others are filled with the value “1”. Such an address table 30B is stored in the allocated area of the flash memory 20 as it is.

(動作)
図10は、図9のアドレステーブル30Bの更新動作を示すフローチャートである。
(Operation)
FIG. 10 is a flowchart showing the update operation of the address table 30B of FIG.

書換えによりアドレステーブル30Bを更新する場合、MPU11の制御によって次のような処理が行われる。   When the address table 30B is updated by rewriting, the following processing is performed under the control of the MPU 11.

更新処理が開始されると、ステップS51において、MPU11は、RAM11a上のアドレステーブル30Bにおける論理チャンク(例えば、図9のチャンクNo.N+2)において、物理チャンクNo.を追加する場所が余っているか否かを判定する。論理チャンクN+2では、物理チャンクNo.を追加する場所(消去状態の“1”の領域)が余っているので、ステップS52において、RAM11a上のアドレステーブル30Bで当該論理チャンクの行(図9の横軸)に物理チャンクNo.(例えば、物理チャンクのデータ010・・・)を追加する。その後、ステップS53において、更新されたRAM11aの箇所に該当するフラッシュメモリ20のページを上書きする。つまり、フラッシュメモリ20への書込みの最小単位で、更新のあった箇所を含むアドレステーブル30Bの一部を書込む。その結果、フラッシュメモリ20の特徴により、消去無しで追加された物理チャンクNo.を保存でき、更新処理が終了する。   When the update process is started, in step S51, the MPU 11 determines the physical chunk No. in the logical chunk (for example, chunk No. N + 2 in FIG. 9) in the address table 30B on the RAM 11a. It is determined whether or not there is a surplus place to add. In the logical chunk N + 2, the physical chunk No. In this case, in step S52, in the address table 30B on the RAM 11a, the physical chunk number is added to the row of the logical chunk (horizontal axis in FIG. 9). (For example, physical chunk data 010...) Is added. Thereafter, in step S53, the page of the flash memory 20 corresponding to the updated location of the RAM 11a is overwritten. That is, a part of the address table 30B including the updated portion is written in the minimum unit of writing to the flash memory 20. As a result, due to the characteristics of the flash memory 20, the physical chunk No. Can be saved, and the update process ends.

ステップS51において、論理チャンクN,N+1,N+2,・・・の内の一部の行で、物理チャンクを保持する場所が無くなった場合は、ステップS54へ進む。ステップS54において、MPU11は、RAM11a上で更新すべき箇所に該当するフラッシュメモリ20上のブロックNo.(例えば、図2の21−0)を得る。ステップS55において、MPU11は、当該ブロックNo.21−0に該当するRAM11a上のアドレステーブル30Bのエリア(例えば、図9の論理チャンクN)を、最新の物理チャンク1つを残してクリアする(“1”を書込む)。その後、ステップS56において、MPU11は、フラッシュメモリ20の当該ブロック21−0を消去し、該当するRAM11a上のアドレステーブル30Bを書込む。   In step S51, if there is no place to hold the physical chunk in some of the logical chunks N, N + 1, N + 2,..., The process proceeds to step S54. In step S54, the MPU 11 checks the block number on the flash memory 20 corresponding to the location to be updated on the RAM 11a. (For example, 21-0 in FIG. 2) is obtained. In step S55, the MPU 11 checks the block No. The area of the address table 30B on the RAM 11a corresponding to 21-0 (for example, the logical chunk N in FIG. 9) is cleared except for the latest physical chunk ("1" is written). Thereafter, in step S56, the MPU 11 erases the block 21-0 of the flash memory 20, and writes the address table 30B on the corresponding RAM 11a.

このように、一部の行で物理チャンクを保持する場所が無くなった場合は、ステップS54〜S56の処理において、RAM11a上の最初の状態(物理チャンクを1つだけ保持している状態)にし、フラッシュメモリ20の消去・書込みを行う。なお、この時にはフラッシュメモリ20の消去単位の大きさに該当するアドレステーブル30Bの各項目を最初の状態にする。これにより、更新処理が終了する。   As described above, when there is no place to hold physical chunks in some rows, in the processing of steps S54 to S56, the initial state on the RAM 11a (a state in which only one physical chunk is held) is set. The flash memory 20 is erased / written. At this time, each item of the address table 30B corresponding to the size of the erase unit of the flash memory 20 is set to the initial state. Thereby, the update process ends.

ここで、フラッシュメモリ20のブロック21−0,・・・を管理するブロック管理テーブル(例えば、図2の33)は、更新の頻度がブロックの故障発生時に限られるため、更新の度にフラッシュメモリ20の割当てられた領域を消去して書出す。   Here, the block management table (for example, 33 in FIG. 2) for managing the blocks 21-0,... Of the flash memory 20 is updated only when a block failure occurs. The 20 allocated areas are erased and written.

又、本フラッシュディスク装置10の立上げ時は、MPU11により、フラッシュメモリ20に保存されているアドレステーブル30Bとブロック管理テーブル(例えば、図2の33)とを読出してRAM11a上に置く。空きページリスト(例えば、図2の32)は、アドレステーブル30Bを検索して割当てられていない物理チャンクを見つけることにより、RAM11a上に構成する。   When the flash disk device 10 is started up, the MPU 11 reads the address table 30B and the block management table (for example, 33 in FIG. 2) stored in the flash memory 20 and puts them on the RAM 11a. The free page list (for example, 32 in FIG. 2) is configured on the RAM 11a by searching the address table 30B to find a physical chunk that is not allocated.

(効果)
本実施例3では、アドレステーブル30Bの変更をフラッシュメモリ20に追加して行くことにより、高価なワード単位での書換え可能な不揮発性メモリ12を削除し、コストを削減することが出来る。
(effect)
In the third embodiment, by adding the change of the address table 30B to the flash memory 20, the expensive rewritable nonvolatile memory 12 can be deleted and the cost can be reduced.

実施例3では、特定のセクタに書換えが集中した場合に、フラッシュメモリ20上のアドレステーブル30Bの消去・書込みが頻繁に発生し、書換え回数・性能のネックとなる。   In the third embodiment, when rewriting concentrates on a specific sector, the address table 30B on the flash memory 20 is frequently erased / written, which becomes a bottleneck in the number of rewriting / performance.

そこで、本実施例4では、アドレステーブル30Bの更新の際、その変更部分のみログのように保存する。   Therefore, in the fourth embodiment, when the address table 30B is updated, only the changed part is saved like a log.

(構成)
図11は、本発明の実施例4で用いられるアドレステーブルログの論理構成図である。
(Constitution)
FIG. 11 is a logical configuration diagram of an address table log used in Embodiment 4 of the present invention.

本実施例4において、アドレステーブル30Cは、初期状態では実施例1での基本となる形式のもの(図2のアドレステーブル30)をRAM11aとフラッシュメモリ20上に保持する。更に、図11に示すように、論理チャンクから物理チャンクへの変換データを有するアドレステーブルログ34を、RAM11a上に構成し、これを保存するためのエリアをフラッシュメモリ20上に用意する。これらのアドレステーブル30C及びアドレステーブルログ34は、MPU11によって更新される。   In the fourth embodiment, the address table 30C holds the basic format (the address table 30 in FIG. 2) in the first embodiment on the RAM 11a and the flash memory 20 in the initial state. Furthermore, as shown in FIG. 11, an address table log 34 having conversion data from logical chunks to physical chunks is configured on the RAM 11a, and an area for storing this is prepared on the flash memory 20. The address table 30C and the address table log 34 are updated by the MPU 11.

(動作)
MPU11の制御により次のようにして、アドレステーブル30Cの更新動作(1)と、定期的に実施する動作(2)とが行われる。
(Operation)
Under the control of the MPU 11, an update operation (1) of the address table 30C and an operation (2) performed periodically are performed as follows.

(1) アドレステーブル30Cの更新動作
図12は、図11のアドレステーブル30Cの更新動作を示すフローチャートである。
(1) Update Operation of Address Table 30C FIG. 12 is a flowchart showing the update operation of the address table 30C of FIG.

アドレステーブル30Cの更新処理が開始されると、ステップS61において、RAM11a上のアドレステーブル30Cで物理チャンクNo.を更新する。ステップS61において、論理チャンクと物理チャンクの対を、RAM11a上のアドレステーブルログ34における“1”の領域に追加する。ステップS63において、追加されたログに該当するフラッシュメモリ20上のページに上書きする。   When the update process of the address table 30C is started, in step S61, a physical chunk No. is stored in the address table 30C on the RAM 11a. Update. In step S61, a pair of a logical chunk and a physical chunk is added to the “1” area in the address table log 34 on the RAM 11a. In step S63, the page on the flash memory 20 corresponding to the added log is overwritten.

このように、アドレステーブル30Cが更新される場合は、RAM11a上の項目は更新するが、フラッシュメモリ20上の項目は更新しない。その代わり、更新された論理チャンクと物理チャンクの対をログの1つの項目として、RAM11a上のアドレステーブルログ34に追加し、それをフラッシュメモリ20に書込む。これにより、更新処理が終了する。   Thus, when the address table 30C is updated, the items on the RAM 11a are updated, but the items on the flash memory 20 are not updated. Instead, the updated logical chunk / physical chunk pair is added to the address table log 34 on the RAM 11 a as one item of the log, and is written to the flash memory 20. Thereby, the update process ends.

(2) 定期的に実施する動作
図13は、図11の定期的に実施する動作を示すフローチャートである。
(2) Operations Performed Periodically FIG. 13 is a flowchart showing operations performed periodically in FIG.

定期的に実施する動作処理が開始されると、ステップS65において、フラッシュメモリ20上のアドレステーブル30Cとアドレステーブルログ34のエリアを消去する。ステップS66において、RAM11a上のアドレステーブル30Cのデータをフラッシュメモリ20に書出す。その後、ステップS67において、RAM11a上のアドレステーブルログ34のエリアをクリアする(“1”を書込む)。   When the operation process to be performed periodically is started, the areas of the address table 30C and the address table log 34 on the flash memory 20 are deleted in step S65. In step S66, the data of the address table 30C on the RAM 11a is written to the flash memory 20. Thereafter, in step S67, the area of the address table log 34 on the RAM 11a is cleared ("1" is written).

このように、定期的にRAM11a上のアドレステーブル30Cのデータをフラッシュメモリ20に消去・書込みを行い、同時にRAM11a上、フラッシュメモリ20上のアドレステーブルログ34のクリアを行う(RAM11a上は“1”で埋め、フラッシュメモリ20は消去を行う)。これにより、処理が終了する。   As described above, the data in the address table 30C on the RAM 11a is periodically erased / written to the flash memory 20, and at the same time, the address table log 34 on the RAM 11a and the flash memory 20 is cleared ("1" on the RAM 11a). And the flash memory 20 is erased). Thereby, the process ends.

なお、本フラッシュディスク装置10の立上げ時には、RAM11a上に、先ずフラッシュメモリ20に保存されているアドレステーブル30Cのデータを読込んだ後、フラッシュメモリ20上のアドレステーブルログ34を読出し、RAM11a上で値を更新することにより、電源オフ直前のアドレステーブル30Cを復元することが出来る。   When the flash disk device 10 is started up, the address table 30C stored in the flash memory 20 is first read onto the RAM 11a, and then the address table log 34 on the flash memory 20 is read out on the RAM 11a. By updating the value at, the address table 30C immediately before the power is turned off can be restored.

(効果)
本実施例4では、アドレステーブル30Cの変更部分のログ(アドレステーブルログ34)を、フラッシュメモリ20に保存するようにしているので、ホストマシン1からのライトが特定のセクタに集中した場合でも、アドレステーブルログ34のフラッシュメモリ20上のエリアは均一に書換えられるため、特定エリアの消耗を防ぐことが出来る。
(effect)
In the fourth embodiment, since the log (address table log 34) of the changed part of the address table 30C is stored in the flash memory 20, even when writes from the host machine 1 are concentrated on a specific sector, Since the area on the flash memory 20 of the address table log 34 is rewritten uniformly, it is possible to prevent the specific area from being consumed.

実施例1〜4までの構成では、フラッシュメモリ20上のアドレステーブル30,30A,30B,30Cやアドレステーブルログ34の更新にオーバヘッドが伴い、又、データの更新とアドレステーブル30,30A,30B,30Cやアドレステーブルログ34の更新タイミングが異なるために、その間に電源が切れる等の際に整合が取れなくなる場合がある。又、フラッシュメモリ20の種類によってはページへの上書き回数に制約が有るものがある。   In the configurations of the first to fourth embodiments, there is an overhead in updating the address tables 30, 30A, 30B, 30C and the address table log 34 on the flash memory 20, and the data update and the address tables 30, 30A, 30B, Since the update timings of 30C and the address table log 34 are different, there are cases where the alignment cannot be achieved when the power is turned off during that time. Further, depending on the type of flash memory 20, there is a restriction on the number of page overwrites.

そこで、これらを解決するために、本実施例5では、フラッシュメモリ20上のアドレステーブル30,30A,30B,30Cやこのアドレステーブルログ34を不要とする構成にしている。   In order to solve these problems, the fifth embodiment employs a configuration in which the address tables 30, 30A, 30B, 30C on the flash memory 20 and the address table log 34 are not required.

(構成)
図14(A)、(B)は、本発明の実施例5を示す論理構成図であり、同図(A)はRAM上のアドレステーブルの構成図、及び同図(B)はフラッシュメモリ上の1ページの内容を示す構成図である。
(Constitution)
FIGS. 14A and 14B are logical configuration diagrams showing Embodiment 5 of the present invention. FIG. 14A is a configuration diagram of an address table on the RAM, and FIG. It is a block diagram which shows the content of 1 page of.

図14(A)において、RAM11a上のアドレステーブル30Dは、図6、図9、図11の物理チャンクNo.に加え、初期化以降にその論理チャンクが何度目の更新を行ったかを示す更新No.を保存する。   14A, the address table 30D on the RAM 11a includes the physical chunk numbers of FIG. 6, FIG. 9, and FIG. In addition, an update No. indicating how many times the logical chunk has been updated since initialization. Save.

図14(B)において、フラッシュメモリ20の各ページ22Aの冗長ビットは、例えば、NANDフラッシュメモリの場合は通常16Byteあり、そこに管理データを保存する。管理データには、データの誤り訂正符号等、このページに対応する論理チャンクNo.、及びこの論理チャンクNo.に対応する更新No.を保存する。なお、誤り訂正符号には、管理データに対する符号を含めることも出来る。   In FIG. 14B, the redundancy bit of each page 22A of the flash memory 20 is normally 16 bytes in the case of a NAND flash memory, for example, and management data is stored there. The management data includes a logical chunk No. corresponding to this page, such as an error correction code of the data. , And this logical chunk No. Update No. corresponding to Save. The error correction code can also include a code for management data.

(動作)
本フラッシュディスク装置10の立上げ時の動作(1)、及びデータ書込み時の動作(2)を説明する。
(Operation)
The operation (1) at the time of starting up the flash disk device 10 and the operation (2) at the time of data writing will be described.

(1) 立上げ時の動作
図15は、図1のフラッシュディスク装置10の立上げ時の動作を示すフローチャートである。
(1) Operation at Startup FIG. 15 is a flowchart showing the operation at startup of the flash disk device 10 of FIG.

フラッシュディスク装置10の立上げ時においては、MPU11aの制御によって次のような処理が行われる。   When the flash disk device 10 is started up, the following processing is performed under the control of the MPU 11a.

立上げ処理が開始されると、ステップS71において、物理チャンクNo.Iを値0に設定すると共に、最後の物理チャンクNo.Mを検索する。ステップS72において、I<Mか否かの判定を行い、イエスのときには立上げ処理を終了し、ノーのときにはステップS73へ進む。ステップS73において、物理チャンクIの先頭ページの論理チャンクNo.と更新No.を読出す。ステップS74において、アドレステーブル30Dの当該倫理チャンクNo.Iは登録済み且つ更新No.が大きいか否かを判定し、ノーのときにはステップS75へ進み、イエスのときにはステップS76へ進む。ステップS75において、読出した論理チャンクNo.と更新No.でアドレステーブル30Dを更新し、ステップS76において、物理チャンクNo.Iに+1加算(インクリメント)してステップS72へ戻り、上記の処理を繰返す。   When the start-up process is started, in step S71, the physical chunk No. I is set to the value 0, and the last physical chunk No. Search for M. In step S72, it is determined whether I <M. If yes, the start-up process is terminated, and if no, the process proceeds to step S73. In step S73, the logical chunk No. of the first page of physical chunk I. And update No. Read out. In step S74, the ethical chunk number of the address table 30D. I is registered and the update No. If the answer is no, the program proceeds to step S75. If the answer is yes, the program proceeds to step S76. In step S75, the read logical chunk No. And update No. The address table 30D is updated at step S76. In step S76, the physical chunk No. +1 is added (incremented) to I, the process returns to step S72, and the above process is repeated.

このように、本フラッシュディスク装置10の立上げ時には、フラッシュメモリ20の各ページ20Aの管理データを読出し、保存されていた論理チャンクNo.に相当するアドレステーブル30D上で、物理チャンクNo.と更新No.を書込む。各ページ20Aを読出している過程で、既にアドレステーブル30D上で作成されている論理チャンクNo.と同じものがあった場合は、更新No.の大きい方を採用する。全てのページ20Aを処理し終わったところでアドレステーブル30Dが完成する。なお、チャンクのサイズがフラッシュメモリ20のページ20Aのサイズよりも大きい場合、各ページ20Aの管理データの内、論理チャンクNo.、及び更新No.はチャンクの先頭のページ20Aにのみ書込みを行い、立上げの際もそのページ20Aのみ読出すことで、高速化を図ることが出来る。   As described above, when the flash disk device 10 is started up, the management data of each page 20A of the flash memory 20 is read and the stored logical chunk No. In the address table 30D corresponding to the physical chunk No. And update No. Write. In the process of reading each page 20A, the logical chunk No. already created on the address table 30D. If there is the same as the update No. The larger one is adopted. When all the pages 20A have been processed, the address table 30D is completed. If the size of the chunk is larger than the size of the page 20A of the flash memory 20, the logical chunk No. in the management data of each page 20A is displayed. , And update No. By writing only to the first page 20A of the chunk and reading only the page 20A at the time of start-up, the speed can be increased.

(2) データ書込み時の動作
図16は、図1のフラッシュディスク装置10におけるデータ書込み時の動作を示すフローチャートである。
(2) Operation at Data Writing FIG. 16 is a flowchart showing an operation at the time of data writing in the flash disk device 10 of FIG.

データ書込み時においては、MPU11aの制御によって次のような処理が行われる。   At the time of data writing, the following processing is performed under the control of the MPU 11a.

データ書込み処理が開始されると、MPU11aは、ホストマシン1から指示された論理チャンクNo.に従い、ステップS81において、書込む物理チャンクNo.と更新No.をアドレステーブル30Dより求める。ステップS82において、更新No.をインクリメントし、ステップS83において、書込むデータに、論理チャンクNo.と更新No.で構成される管理データを加える。ステップS84において、データをフラッシュメモリ20に書込み、RAM11a上の空きチャンクリストを更新し、アドレステーブル30Dを新しい更新No.により更新し、データ書込み処理を終了する。   When the data writing process is started, the MPU 11a receives the logical chunk No. instructed from the host machine 1. In step S81, the physical chunk No. to be written is changed. And update No. Is obtained from the address table 30D. In step S82, the update No. In step S83, the logical chunk No. is added to the data to be written. And update No. Add management data consisting of In step S84, the data is written to the flash memory 20, the empty chunk list on the RAM 11a is updated, and the address table 30D is updated with a new update number. To update the data writing process.

このように、データの書込みがあった際は、アドレステーブル30Dの物理チャンクNo.を更新すると共に、更新No.をインクリメントする。そして、フラッシュメモリ20のページ20Aにデータを書込む際に、一緒に管理データを準備してフラッシュメモリ20に転送する。   As described above, when data is written, the physical chunk No. of the address table 30D. As well as update No. Is incremented. Then, when writing data to the page 20A of the flash memory 20, management data is prepared together and transferred to the flash memory 20.

(効果)
本実施例5では、フラッシュメモリ20のページ20Aの冗長ビット部分(管理データ部分)に、当該ページ20Aに対応する論理チャンクNo.と更新No.を保持することにより、実施例1〜4のようにアドレステーブル30,30A,30B,30Cやアドレステーブルログ34をフラッシュメモリ20に書出すためのオーバヘッドを削除出来、しかも、データとアドレス等の情報がフラッシュメモリ20の1つのページ22Aに同時に書込まれるため、常に整合が保たれる。更に、フラッシュメモリ20の上書きの回数制限に制約されずに、使用するフラッシュメモリを選択することが出来る。
(effect)
In the fifth embodiment, the redundant chunk portion (management data portion) of the page 20A of the flash memory 20 is assigned a logical chunk No. corresponding to the page 20A. And update No. , The overhead for writing the address tables 30, 30A, 30B, 30C and the address table log 34 to the flash memory 20 as in the first to fourth embodiments can be deleted, and information such as data and addresses can be deleted. Are simultaneously written in one page 22A of the flash memory 20, so that the matching is always maintained. Furthermore, the flash memory to be used can be selected without being restricted by the limit on the number of times of overwriting of the flash memory 20.

実施例5では、空きブロックを順番(ローテーション)で使用するため、フラッシュメモリ20内の個々のブロックの書換え回数に差が生じ、早く故障ブロックが発生する可能性があり、その結果、空き領域が少なくなり、性能が劣化する虞がある。   In the fifth embodiment, since empty blocks are used in order (rotation), there is a difference in the number of times of rewriting of individual blocks in the flash memory 20, and a failure block may occur earlier. There is a risk that performance will deteriorate.

そこで、本実施例6では、空きブロックの使用順序として、書換え回数の少ないブロックを優先させる構成にしている。   In the sixth embodiment, therefore, a block with a small number of rewrites is prioritized as the use order of empty blocks.

(構成)
図17(A)、(B)は、本発明の実施例6を示すブロック管理テーブルの論理構成図であり、同図(A)はRAM上のブロック管理テーブルの論理構成図、及び同図(B)はフラッシュメモリ上のブロック管理テーブルの論理構成図である。
(Constitution)
17A and 17B are logical configuration diagrams of the block management table showing the sixth embodiment of the present invention. FIG. 17A is a logical configuration diagram of the block management table on the RAM, and FIG. B) is a logical configuration diagram of a block management table on the flash memory.

図17(A)のブロック管理テーブル33Aは、RAM11a上に設けられ、管理対象となる各ブロックのフラグ、書換え数、及び書換え数SUBを有している。図17(B)のブロック管理テーブル33Bは、フラッシュメモリ20上に設けられ、管理対象となる各ブロックのフラグ、及び書換え数を有している。フラグは、当該ブロックが故障かどうかを示す。書換え数は、実際の書換え回数を或数αで割った数を保持する。或数αは、例えば、100とする。書換え数SUBは、0〜αまでの書換え回数を保持する。結果として、当該ブロックの実際の書換え回数は、
書換え数×α+書換え数SUB
で示される。
The block management table 33A in FIG. 17A is provided on the RAM 11a and has a flag, a rewrite number, and a rewrite number SUB of each block to be managed. A block management table 33B in FIG. 17B is provided on the flash memory 20, and has a flag and the number of rewrites of each block to be managed. The flag indicates whether the block is in failure. The number of rewrites holds the number obtained by dividing the actual number of rewrites by some number α. For example, the number α is 100. The number of rewrites SUB holds the number of rewrites from 0 to α. As a result, the actual number of rewrites of the block is
Number of rewrites x α + number of rewrites SUB
Indicated by

(動作)
図18は、図1のフラッシュディスク装置10におけるガベージコレクションでのブロック消去時の動作を示すフローチャートである。
(Operation)
FIG. 18 is a flowchart showing an operation at the time of block erasure in the garbage collection in the flash disk device 10 of FIG.

ガベージコレクションでブロックの消去が行われた時は、MPU11の制御により、次のような処理が行われる。   When a block is erased by garbage collection, the following processing is performed under the control of the MPU 11.

処理が開始されると、ステップS91において、RAM11a上のブロック管理テーブル33Aにおける消去したブロックの書換え数SUBをインクリメントする。ステップS92において、書換え数SUB>αか否かが判定され、ノーの時には処理が終了し、イエスの時にはステップS93へ進む。ステップS93において、RAM11a上のブロック管理テーブル33Aにおける書換え数をインクリメントし、書換え数SUBをクリアする。ステップS94において、フラッシュメモリ20上のブロック管理テーブル33Bを消去し、RAM11a上のブロック管理テーブル33Aを書込み、処理を終了する。   When the processing is started, in step S91, the erased block rewrite number SUB in the block management table 33A on the RAM 11a is incremented. In step S92, it is determined whether or not the number of rewrites SUB> α. If no, the process ends. If yes, the process proceeds to step S93. In step S93, the rewrite number in the block management table 33A on the RAM 11a is incremented, and the rewrite number SUB is cleared. In step S94, the block management table 33B on the flash memory 20 is erased, the block management table 33A on the RAM 11a is written, and the process ends.

このように、本実施例6では、ガベージコレクションでブロックの消去が行われた時は、書換え数SUBのインクリメントを行う。当該ブロックの書込み・消去が何度か行われ、書換え数SUBが或数α(=100)に達した時は書換え数をインクリメントし、書換え数SUBはクリアする。この時、RAM11a上のブロック管理テーブル33Aの内、フラグと書換え数の項目をフラッシュメモリ20におけるブロック管理テーブル33Bのエリアに消去・書込みを行う。   Thus, in the sixth embodiment, when the block is erased by the garbage collection, the rewrite number SUB is incremented. When the block is written / erased several times and the rewrite number SUB reaches a certain number α (= 100), the rewrite number is incremented and the rewrite number SUB is cleared. At this time, the flag and the number of rewrites in the block management table 33A on the RAM 11a are erased / written to the area of the block management table 33B in the flash memory 20.

電源オフで書換え数SUBの値は失われるが、各ブロックの書換え回数仕様10万回の内の0〜αの範囲であるため問題は無い。データへの書込みの際、書換え数と書換え数SUBより算出される書換え回数の少ないブロックから使用する。   Although the value of the number of rewrites SUB is lost when the power is turned off, there is no problem because it is in the range of 0 to α in the rewrite count specification of 100,000 for each block. When writing to data, the block is used from the block with a small number of rewrites calculated from the rewrite number and the rewrite number SUB.

(効果)
本実施例6では、各ブロックの書換え回数を管理して書換え回数の少ないブロックから使用することにより、各ブロックの消耗を均一化して、フラッシュディスク装置10の寿命を延ばすことが出来る。
(effect)
In the sixth embodiment, by managing the number of times of rewriting of each block and using the blocks from the least number of times of rewriting, the consumption of each block can be made uniform and the life of the flash disk device 10 can be extended.

実施例6では、ホストマシン1からの書込みが多い場合に、(ブロックのデータサイズ×α)のデータの書込みに1回の割合で、フラッシュメモリ20上のブロック管理テーブル33Bの書換えが発生するため、大きなオーバヘッドになる。   In the sixth embodiment, when the number of writes from the host machine 1 is large, the block management table 33B on the flash memory 20 is rewritten at a rate of once for writing the data of (block data size × α). , It becomes a big overhead.

そこで、本実施例7では、フラッシュメモリ20のページ内の管理データの中に書換え数に関する情報を保持する構成にしている。   Thus, in the seventh embodiment, information related to the number of rewrites is held in the management data in the page of the flash memory 20.

(構成)
図19(A)〜(C)は、本発明の実施例7を示すブロック管理テーブル及びページの論理構成図であり、同図(A)はRAM上のブロック管理テーブルの論理構成図、同図(B)はフラッシュメモリ上のブロック管理テーブルの論理構成図、及び同図(C)はフラッシュメモリ上のページの論理構成図である。
(Constitution)
FIGS. 19A to 19C are block management table and page logical configuration diagrams showing Embodiment 7 of the present invention, and FIG. 19A is a logical configuration diagram of the block management table on the RAM. (B) is a logical configuration diagram of a block management table on the flash memory, and (C) is a logical configuration diagram of pages on the flash memory.

図19(A)のブロック管理テーブル33Cは、RAM11a上に設けられ、管理対象となる各ブロックのフラグ、及び書換え数を有している。書換え数は、当該ブロックの書換え回数の実数を表す。実施例6の図17(A)に示す管理テーブル33Aに対し、書換え数SUBが不要となる。   The block management table 33C in FIG. 19A is provided on the RAM 11a and has a flag and the number of rewrites for each block to be managed. The number of rewrites represents the real number of rewrites of the block. The rewriting number SUB is not required for the management table 33A shown in FIG.

図19(B)のブロック管理テーブル33Dは、フラッシュメモリ20上に設けられ、管理対象となる各ブロックのフラグだけを有している。フラグは、ブロックの故障を示し、ブロックの故障があったときのみ更新される。実施例6の図17(B)に示すブロック管理テーブル33Bに対し、書換え数が不要となる。   The block management table 33D in FIG. 19B is provided on the flash memory 20 and has only flags for each block to be managed. The flag indicates a block failure and is updated only when there is a block failure. The number of rewrites is not required for the block management table 33B shown in FIG.

図19(C)におけるフラッシュメモリ20上の各ページ22Bは、実施例5の図14(B)に示すページ22Aに対して、管理データに書換え数が追加されている。即ち、各ページ22Bの冗長ビットは、例えば、NANDフラッシュメモリの場合は通常16Byteあり、そこに管理データを保存する。管理データには、データの誤り訂正符号等、このページに対応する論理チャンクNo.、この論理チャンクNo.に対応する更新No.、及び新たに追加された書換え数を保存する。   In each page 22B on the flash memory 20 in FIG. 19C, the number of rewrites is added to the management data with respect to the page 22A shown in FIG. 14B of the fifth embodiment. That is, the redundant bit of each page 22B is normally 16 bytes in the case of a NAND flash memory, for example, and management data is stored there. The management data includes a logical chunk No. corresponding to this page, such as an error correction code of the data. , This logical chunk No. Update No. corresponding to , And the newly added rewrite number is saved.

(動作)
図1のフラッシュディスク装置10におけるデータ書込み時の動作(1)、及び立上げ時の動作(2)を説明する。
(Operation)
An operation (1) at the time of data writing and an operation (2) at the time of start-up will be described in the flash disk device 10 of FIG.

(1) データ書込み時の動作
図20は、図1のフラッシュディスク装置10におけるデータ書込み時の動作を示すフローチャートである。
(1) Operation at Data Writing FIG. 20 is a flowchart showing the operation at the time of data writing in the flash disk device 10 of FIG.

データ書込み時においては、MPU11aの制御によって次のような処理が行われる。   At the time of data writing, the following processing is performed under the control of the MPU 11a.

ホストマシン1から与えられる論理アドレスに対するデータ書込み処理が開始されると、ステップS101において、RAM11a上のアドレステーブル(例えば、図14(A)の30D)より、書込む物理チャンクNo.と更新No.を求め、RAM11a上のブロック管理テーブル33Cより、書換え数を求める。ステップS102において、更新No.と書換え数をインクリメントする。ステップS103において、図19(C)に示すように、書込むデータに管理データとして論理チャンクNo.、更新No.、及び書換え数等を加える。その後、ステップS104において、データをフラッシュメモリ20に書込み、空きチャンクリスト(例えば、図6の32A)を更新する。更に、アドレステーブル(例えば、図14の30D)を新しい更新No.により更新し、ブロック管理テーブル33Cの書換え数を更新し、データ書込み動作を終了する。   When the data writing process for the logical address given from the host machine 1 is started, the physical chunk No. to be written is read from the address table (for example, 30D in FIG. 14A) on the RAM 11a in step S101. And update No. And the number of rewrites is obtained from the block management table 33C on the RAM 11a. In step S102, the update No. And the rewrite number is incremented. In step S103, as shown in FIG. 19C, the logical chunk No. , Update No. And the number of rewrites. Thereafter, in step S104, the data is written into the flash memory 20, and the free chunk list (for example, 32A in FIG. 6) is updated. Further, the address table (for example, 30D in FIG. To update the number of rewrites in the block management table 33C, and the data write operation is terminated.

このように、フラッシュメモリ20のブロックへのデータの書込みが行われる際は、フラッシュメモリ20上のページ22B中の管理データに、ブロック管理テーブル33Cから得られる当該ブロックの書換え数を付加する。   As described above, when data is written to a block of the flash memory 20, the number of rewrites of the block obtained from the block management table 33C is added to the management data in the page 22B on the flash memory 20.

なお、ガベージコレクションでブロックの消去が行われた時は、RAM11a上のブロック管理テーブル33Cにおける当該ブロックの書換え数がインクリメントされる。   When the block is erased by garbage collection, the number of rewrites of the block in the block management table 33C on the RAM 11a is incremented.

(2) 立上げ時の動作
図21は、図1のフラッシュディスク装置10における立上げ時の動作を示すフローチャートである。
(2) Operation at Startup FIG. 21 is a flowchart showing the operation at startup in the flash disk device 10 of FIG.

フラッシュディスク装置10の立上げ時においては、MPU11aの制御によって次のような処理が行われる。   When the flash disk device 10 is started up, the following processing is performed under the control of the MPU 11a.

立上げ処理が開始されると、ステップS111において、フラッシュメモリ20上のブロック管理テーブル33Dを読出し、RAM11a上のブロック管理テーブル33C中のフラグを構成する。ステップS112において、物理チャンクNo.Iに値0を設定すると共に、最後の物理チャンクNo.の値Mを設定する。ステップS113において、I<Mか否かを判定し、イエスのときには処理を終了し、ノーのときにはステップS113へ進む。ステップS113において、物理チャンクIの先頭ページの書換え数を読出す。次に、ステップS114において、RAM11a上のブロック管理テーブル33C中の書換え数に読出した値を入れる。その後、物理チャンクNo.の値IをインクリメントしてステップS113へ戻り、上記の処理を繰返す。   When the start-up process is started, in step S111, the block management table 33D on the flash memory 20 is read, and a flag in the block management table 33C on the RAM 11a is configured. In step S112, the physical chunk No. A value 0 is set in I and the last physical chunk No. Is set to the value M. In step S113, it is determined whether I <M. If yes, the process ends. If no, the process proceeds to step S113. In step S113, the number of rewrites of the first page of physical chunk I is read. In step S114, the read value is entered in the number of rewrites in the block management table 33C on the RAM 11a. Thereafter, the physical chunk No. The value I is incremented, the process returns to step S113, and the above process is repeated.

このように、本フラッシュディスク装置10の立上げ時では、先ず、フラッシュメモリ20上のブロック管理テーブル33Dを読出し、RAM11a上におけるブロック管理テーブル33Cのフラグを作成した後、フラッシュメモリ20上の各ページ22Bの管理データを読出し、書換え数より、RAM11a上のブロック管理テーブル33Cにおける当該ブロックの書換え数を作成する。   As described above, when the flash disk device 10 is started up, first, the block management table 33D on the flash memory 20 is read, the flag of the block management table 33C on the RAM 11a is created, and then each page on the flash memory 20 is created. The management data of 22B is read, and the rewrite number of the block in the block management table 33C on the RAM 11a is created from the rewrite number.

(効果)
本実施例7では、フラッシュメモリ20上のブロック管理テーブル33Dの書換えがブロック故障の時に限られ、ホストマシン1からの通常のデータの書込みではブロック管理テーブル33Dの書換えが発生しなくなるため、オーバヘッドが削減される。
(effect)
In the seventh embodiment, rewriting of the block management table 33D on the flash memory 20 is limited to when a block failure occurs, and rewriting of the block management table 33D does not occur when normal data is written from the host machine 1, so overhead is reduced. Reduced.

フラッシュディスク装置10をシステムで使用すると、一般に最初のインストールの時のみフラッシュメモリ20へプログラムの書込みが行われ、実際の運用ではフラッシュメモリ20において書換の行われない領域が存在する。その箇所に対応するフラッシュメモリ20上のブロック21は書換えが行われないため、一部の書換えの行われているブロックのみが消耗し、フラッシュディスク装置10としての書換え回数のネックとなる。   When the flash disk device 10 is used in a system, generally, a program is written into the flash memory 20 only at the time of the first installation, and there is an area in the flash memory 20 that is not rewritten in actual operation. Since the block 21 on the flash memory 20 corresponding to the location is not rewritten, only a part of the rewritten blocks is consumed, which becomes a bottleneck in the number of times of rewriting as the flash disk device 10.

そこで、本実施例8では、書換えの行われないブロックを置換える構成にしている。   Therefore, in the eighth embodiment, a configuration is adopted in which blocks that are not rewritten are replaced.

(構成)
図22は、本発明の実施例8における固定ブロックの内容を空きブロックに書換える様子を示す論理構成図である。
(Constitution)
FIG. 22 is a logical configuration diagram showing how fixed block contents are rewritten to empty blocks in the eighth embodiment of the present invention.

図22において、ホストマシン1で指定される論理アドレス25の内、斜線部分の論理アドレス25−0,25−iは、書換えの行われる箇所である。又、フラッシュメモリ20のブロック21(21−0,21−1,・・・,21−14,・・・)の内、斜線部分のブロック21−0,21−1,・・・は、書換えの行われる箇所である。斜線の無い空白部分のブロック21−2,21−3,・・・は、運用中に書換えが行われていない空きブロックである。   In FIG. 22, among the logical addresses 25 specified by the host machine 1, the hatched logical addresses 25-0 and 25-i are places where rewriting is performed. Among the blocks 21 (21-0, 21-1,..., 21-14,...) Of the flash memory 20, the shaded blocks 21-0, 21-1,. This is where it is done. The blank blocks 21-2, 21-3,... Without hatching are empty blocks that are not rewritten during operation.

(動作)
図23は、本フラッシュディスク装置10のブロック置換え動作を示すフローチャートである。
(Operation)
FIG. 23 is a flowchart showing the block replacement operation of the flash disk device 10.

本フラッシュディスク装置10のブロック置換え時においては、MPU11の制御によって次のような処理が行われる。   At the time of block replacement of the flash disk device 10, the following processing is performed under the control of the MPU 11.

本フラッシュディスク装置10の立上げ時にブロック管理テーブル(例えば、図2の33)が作成されたところ、及び、1回の電源オン中に装置全体で或る一定量の書換えが行われたところ(例えば、1万回毎)で、ブロック置換え処理が開始され、ステップS121へ進む。ステップS121において、ブロック管理テーブル33を検索し、有効データが埋まっているブロックで書換え数が最小のもの(例えば、21−5)と、空きブロックで書換え数が最大のもの(例えば、21−13)を求める。ステップS122において、書換え数の最大値と最小値の差が一定値(例えば、1万回)以上あるか否かを判定し、ノーのときには処理を終了し、イエスのときにはステップS123へ進む。   A block management table (for example, 33 in FIG. 2) is created when the flash disk device 10 is started up, and a certain amount of rewriting is performed in the entire device during one power-on ( For example, the block replacement process is started every 10,000 times, and the process proceeds to step S121. In step S121, the block management table 33 is searched, and a block in which valid data is embedded has a minimum number of rewrites (for example, 21-5) and a free block has a maximum number of rewrites (for example, 21-13). ) In step S122, it is determined whether or not the difference between the maximum value and the minimum value of the number of rewrites is a certain value (for example, 10,000 times) or more. If no, the process ends. If yes, the process proceeds to step S123.

ステップS123において、求めた書換え数最小のブロック(例えば、21−5)よりデータを読出し、当該ブロック21−5を消去して空きブロックにする。ステップS124において、求めた最大の空きブロック(例えば、21−13)にデータを書込み、ブロック管理テーブル33の書換え数を更新する。なお、通常のデータの書込みの際は、空きブロック21−2,・・・の内の書換え回数の少ないものを使用するが、この固定ブロックの書換えの際には、書換え回数の大きな空きブロック(例えば、21−13)に対してデータを書写す。その後、ステップS125において、アドレステーブル(例えば、図6の30A)と空きチャンクリスト(例えば、図6の32A)を更新し、ブロック置換え処理を終了する。   In step S123, data is read from the obtained block with the smallest number of rewrites (for example, 21-5), and the block 21-5 is erased to be an empty block. In step S124, data is written in the determined maximum empty block (for example, 21-13), and the number of rewrites in the block management table 33 is updated. When writing normal data, one of the empty blocks 21-2,... With a small number of rewrites is used. When rewriting this fixed block, a free block with a large number of rewrites ( For example, the data is copied for 21-13). Thereafter, in step S125, the address table (for example, 30A in FIG. 6) and the empty chunk list (for example, 32A in FIG. 6) are updated, and the block replacement process is terminated.

(効果)
本実施例8では、最初のインストール以降、ホストマシン1から更新されないフラッシュメモリ20の領域が例えば50%あった場合、そのデータが書込まれていたフラッシュメモリ20の領域も、運用中に順次ホストマシン1から更新されるデータの領域として使えるようになるため、本フラッシュディスク装置10の書換え回数の全体量が2倍になる。
(effect)
In the eighth embodiment, when the area of the flash memory 20 that has not been updated from the host machine 1 after the initial installation is 50%, for example, the area of the flash memory 20 in which the data has been written is also sequentially hosted during operation. Since it can be used as an area for data updated from the machine 1, the total number of rewrites of the flash disk device 10 is doubled.

本発明の実施例を示すフラッシュディスク装置の構成図である。1 is a configuration diagram of a flash disk device showing an embodiment of the present invention. FIG. 本発明の実施例1を示すフラッシュディスク装置の論理構成図である。1 is a logical configuration diagram of a flash disk device showing Embodiment 1 of the present invention. FIG. 図2のフラッシュディスク装置のリード動作を示すフローチャートである。3 is a flowchart showing a read operation of the flash disk device of FIG. 図2のフラッシュディスク装置のライト動作を示すフローチャートである。3 is a flowchart showing a write operation of the flash disk device of FIG. 図2のフラッシュディスク装置のガベージコレクション動作を示すフローチャートである。3 is a flowchart illustrating a garbage collection operation of the flash disk device of FIG. 2. 本発明の実施例2を示すフラッシュディスク装置の論理構成図である。It is a logical block diagram of the flash disk apparatus which shows Example 2 of this invention. 図6のフラッシュディスク装置のリード動作を示すフローチャートである。7 is a flowchart showing a read operation of the flash disk device of FIG. 6. 図6のフラッシュディスク装置のライト動作を示すフローチャートである。7 is a flowchart showing a write operation of the flash disk device of FIG. 6. 本発明の実施例3を示すアドレステーブルの論理構成図である。It is a logical block diagram of the address table which shows Example 3 of this invention. 図9のアドレステーブルの更新動作を示すフローチャートである。10 is a flowchart showing an update operation of the address table of FIG. 9. 本発明の実施例4で用いられるアドレステーブルログの論理構成図である。It is a logical block diagram of the address table log used in Example 4 of this invention. 本発明の実施例4で用いられるアドレステーブルの更新動作を示すフローチャートである。It is a flowchart which shows the update operation | movement of the address table used in Example 4 of this invention. 本発明の実施例4における定期的に実施する動作を示すフローチャートである。It is a flowchart which shows the operation | movement regularly implemented in Example 4 of this invention. 本発明の実施例5を示す論理構成図である。It is a logic block diagram which shows Example 5 of this invention. 本発明の実施例5における立上げ時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of starting in Example 5 of this invention. 本発明の実施例5におけるデータ書込み時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of the data writing in Example 5 of this invention. 本発明の実施例6を示すブロック管理テーブルの論理構成図である。It is a logical block diagram of the block management table which shows Example 6 of this invention. 本発明の実施例6におけるガベージコレクションでのブロック消去時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of the block erase in the garbage collection in Example 6 of this invention. 本発明の実施例7を示すブロック管理テーブル及びページの論理構成図である。FIG. 10 is a logical configuration diagram of a block management table and a page showing Embodiment 7 of the present invention. 本発明の実施例7におけるデータ書込み時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of the data writing in Example 7 of this invention. 本発明の実施例7における立上げ時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of starting in Example 7 of this invention. 本発明の実施例8における固定ブロックの内容を空きブロックに書換える様子を示す論理構成図である。It is a logic block diagram which shows a mode that the content of the fixed block in Example 8 of this invention is rewritten in an empty block. 本発明の実施例8におけるブロック書換え動作を示すフローチャートである。It is a flowchart which shows the block rewriting operation | movement in Example 8 of this invention.

符号の説明Explanation of symbols

1 ホストマシン
10 フラッシュディスク装置
11 MPU
11a RAM
12 不揮発性メモリ
16 フラッシュメモリコントローラ
20 フラッシュメモリ
21,21−0,21−1,21A−0,21A−1,・・・ ブロック
22,22A,22B,22−0,22−1,・・・ ページ
25,25A 論理アドレス
30,30A,30B,30C,30D アドレステーブル
32,32A 空きページリスト
33,33A,33B,33C,33D ブロック管理テーブル
34 アドレステーブルログ
1 Host machine 10 Flash disk device 11 MPU
11a RAM
12 Nonvolatile memory 16 Flash memory controller 20 Flash memory 21, 21-0, 21-1, 21A-0, 21A-1,... Block 22, 22A, 22B, 22-0, 22-1,. Page 25, 25A Logical address 30, 30A, 30B, 30C, 30D Address table 32, 32A Free page list 33, 33A, 33B, 33C, 33D Block management table 34 Address table log

Claims (8)

物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われるフラッシュメモリと、
ホストから指定される論理アドレスを前記物理アドレスに変換するための情報が記録されたアドレステーブルを保持する、ワード単位での書換え可能な不揮発性メモリと、
前記ホストからの命令に基づいて装置全体を制御する制御手段とを備え、
前記論理アドレスに関係無く前記フラッシュメモリ上にデータ格納用の空き領域を予め用意し、この用意された空き領域に前記ホストからのデータを順次書込む構成にしたことを特徴とするフラッシュディスク装置。
It has a plurality of blocks composed of a plurality of data storage pages with physical addresses, data is written and read in units of pages, and data is erased after erasing data in units of blocks. A flash memory in which data is written to a predetermined page in the block, and
A rewritable non-volatile memory in word units that holds an address table in which information for converting a logical address designated by a host into the physical address is recorded;
Control means for controlling the entire apparatus based on a command from the host,
1. A flash disk device comprising: an empty area for storing data in advance in the flash memory regardless of the logical address; and data from the host is sequentially written in the prepared empty area.
物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われるフラッシュメモリと、
ホストからの命令に基づいて装置全体を制御し、且つ、前記ホストから指定される論理アドレスを前記物理アドレスに変換するためのアドレステーブルを生成して前記フラッシュメモリの特定領域に保存させる制御手段とを備え、
前記論理アドレスに関係無く前記フラッシュメモリ上にデータ格納用の空き領域を予め用意し、この用意された空き領域に前記ホストからのデータを順次書込み、且つ、前記アドレステーブルの変更は前記制御手段にて行い、その変更後のアドレステーブルを前記フラッシュメモリの特定領域にログのように順次追加する構成にしたことを特徴とするフラッシュディスク装置。
It has a plurality of blocks composed of a plurality of data storage pages with physical addresses, data is written and read in units of pages, and data is erased after erasing data in units of blocks. A flash memory in which data is written to a predetermined page in the block, and
Control means for controlling the entire apparatus based on a command from the host, and generating an address table for converting a logical address designated by the host into the physical address and storing it in a specific area of the flash memory; With
Regardless of the logical address, an empty area for storing data is prepared in advance in the flash memory, data from the host is sequentially written in the prepared empty area, and the address table is changed by the control means. The flash disk device is configured to sequentially add the changed address table to the specific area of the flash memory like a log.
物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われるフラッシュメモリと、
ホストからの命令に基づいて装置全体を制御し、且つ、前記ホストから指定される論理アドレスを前記物理アドレスに変換するためのアドレステーブルを生成して前記フラッシュメモリの特定領域に保存させる制御手段とを備え、
前記論理アドレスに関係無く前記フラッシュメモリ上にデータ格納用の空き領域を予め用意し、この用意された空き領域に前記ホストからのデータを順次書込み、且つ、前記アドレステーブルの変更は前記制御手段にて行い、その変更部分を前記フラッシュメモリの特定領域にログのように順次追加する構成にしたことを特徴とするフラッシュディスク装置。
It has a plurality of blocks composed of a plurality of data storage pages with physical addresses, data is written and read in units of pages, and data is erased after erasing data in units of blocks. A flash memory in which data is written to a predetermined page in the block, and
Control means for controlling the entire apparatus based on a command from the host, and generating an address table for converting a logical address designated by the host into the physical address and storing it in a specific area of the flash memory; With
Regardless of the logical address, an empty area for storing data is prepared in advance in the flash memory, data from the host is sequentially written in the prepared empty area, and the address table is changed by the control means. The flash disk device is configured such that the changed portion is sequentially added to the specific area of the flash memory like a log.
物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われるフラッシュメモリと、
ホストからの命令に基づいて装置全体を制御する制御手段とを備え、
前記ホストから指定される論理アドレスに関係無く前記フラッシュメモリ上にデータ格納用の空き領域を予め用意し、この用意された空き領域に前記ホストからのデータと前記論理アドレスの情報とを順次書込み、且つ、装置立上げ時に、前記制御手段により、前記フラッシュメモリに書込まれた前記論理アドレスの情報に基づき、前記論理アドレスを前記物理アドレスに変換するためのアドレステーブルを生成し、このアドレステーブルを用いて前記フラッシュメモリに対するアクセス制御を行う構成にしたことを特徴とするフラッシュディスク装置。
It has a plurality of blocks composed of a plurality of data storage pages with physical addresses, data is written and read in units of pages, and data is erased after erasing data in units of blocks. A flash memory in which data is written to a predetermined page in the block, and
Control means for controlling the entire apparatus based on a command from the host,
Regardless of the logical address designated by the host, a free area for storing data is prepared in advance on the flash memory, and the data from the host and the logical address information are sequentially written in the prepared free area, At the time of starting up the apparatus, the control means generates an address table for converting the logical address into the physical address based on the logical address information written in the flash memory. A flash disk device characterized in that access control to the flash memory is used.
請求項1〜3のいずれか1項に記載のフラッシュディスク装置において、
前記ブロックを管理するブロック管理テーブルを設け、前記ブロック管理テーブルに前記ブロックの書換え数の値を保持し、次に消去すべきブロックの選択に使用する構成にしたことを特徴とするフラッシュディスク装置。
In the flash disk device according to any one of claims 1 to 3,
2. A flash disk device comprising: a block management table for managing the block, wherein the block management table holds a value of the number of rewrites of the block, and is used for selecting a block to be erased next.
請求項4記載のフラッシュディスク装置において、
前記データを前記フラッシュメモリのブロックに書込む際に、同時に当該ブロックに書換え数の値を保持し、次に消去すべきブロックの選択に使用する構成にしたことを特徴とするフラッシュディスク装置。
The flash disk device according to claim 4, wherein
A flash disk device characterized in that when the data is written to the block of the flash memory, the value of the number of rewrites is simultaneously held in the block and used to select a block to be erased next.
前記複数のページを纏めた或る大きさの単位でアクセス制御を行う構成にしたことを特徴とする請求項1〜6のいずれか1項に記載のフラッシュディスク装置。   7. The flash disk device according to claim 1, wherein access control is performed in a unit of a certain size in which the plurality of pages are collected. 物理アドレスが付された複数のデータ格納用のページにより構成されるブロックを複数有し、前記ページ単位でデータの書込みと読出しが行われ、前記ブロック単位でデータの消去を行った後にその消去されたブロック中の所定のページに対してデータの書込みが行われるフラッシュメモリと、
ホストから指定される論理アドレスを前記物理アドレスに変換するための情報が記録されたアドレステーブルを用いて、前記フラッシュメモリに対するデータの書込み及び読出しを制御する制御手段とを備え、
前記複数のブロックにおける書換え回数に所定の差が生じたときに、書換え回数の少ないブロックのデータを他の空きブロックにコピーし、このブロックを使用可能にする構成にしたことを特徴とするフラッシュディスク装置。
It has a plurality of blocks composed of a plurality of data storage pages with physical addresses, data is written and read in units of pages, and data is erased after erasing data in units of blocks. A flash memory in which data is written to a predetermined page in the block, and
Control means for controlling writing and reading of data to and from the flash memory using an address table in which information for converting a logical address designated by a host into the physical address is recorded;
A flash disk characterized in that, when a predetermined difference occurs in the number of times of rewriting in the plurality of blocks, data of a block with a small number of times of rewriting is copied to another empty block and the block can be used. apparatus.
JP2004054726A 2004-02-27 2004-02-27 Flash disk drive Pending JP2005242897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004054726A JP2005242897A (en) 2004-02-27 2004-02-27 Flash disk drive

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004054726A JP2005242897A (en) 2004-02-27 2004-02-27 Flash disk drive

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2009113190A Division JP2009205689A (en) 2009-05-08 2009-05-08 Flash disk device

Publications (1)

Publication Number Publication Date
JP2005242897A true JP2005242897A (en) 2005-09-08

Family

ID=35024547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004054726A Pending JP2005242897A (en) 2004-02-27 2004-02-27 Flash disk drive

Country Status (1)

Country Link
JP (1) JP2005242897A (en)

Cited By (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006028283A1 (en) * 2004-09-10 2006-03-16 Tokyo Electron Device Limited Storage device, memory management method and program
JP2007193883A (en) * 2006-01-18 2007-08-02 Sony Corp Data recording device and method, data reproducing device and method, and data recording and reproducing device and method
JP2007199828A (en) * 2006-01-24 2007-08-09 Matsushita Electric Ind Co Ltd Nonvolatile storage device and address management method
JP2008119341A (en) * 2006-11-15 2008-05-29 Daiman:Kk Game machine
JP2009211213A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP2009211196A (en) * 2008-02-29 2009-09-17 Toshiba Corp Memory system
JP2009211223A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP2009211221A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP2009211216A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system and storage method for management information
JP2009217754A (en) * 2008-03-12 2009-09-24 Toshiba Corp Memory system
KR100928037B1 (en) * 2007-05-04 2009-11-26 주식회사 롭테크놀러지 Semiconductor storage media disks with dynamic expansion and contraction of storage capacity and file system
JP2009276883A (en) * 2008-05-13 2009-11-26 Oki Electric Ind Co Ltd Semiconductor auxiliary storage device
JP2010033393A (en) * 2008-07-30 2010-02-12 Hitachi Ltd Storage apparatus, memory area managing method thereof, and flash memory package
JP2010152514A (en) * 2008-12-24 2010-07-08 Toshiba Corp Memory system
JP2010157141A (en) * 2008-12-27 2010-07-15 Toshiba Corp Memory system
JP2010157139A (en) * 2008-12-27 2010-07-15 Toshiba Corp Memory system
JP2011123560A (en) * 2009-12-08 2011-06-23 Oki Electric Industry Co Ltd Flash disk device
JP2011165179A (en) * 2010-02-08 2011-08-25 Samsung Electronics Co Ltd Data storage device, recording medium access method and recording medium therefor
JP2012128545A (en) * 2010-12-14 2012-07-05 Hitachi Ltd Memory controller and data recording apparatus
JP2012133416A (en) * 2010-12-17 2012-07-12 Toshiba Corp Memory system
JP2012133651A (en) * 2010-12-22 2012-07-12 Ricoh Co Ltd Control program of semiconductor storage, semiconductor storage medium control device, control method of semiconductor storage medium and image forming device
JP2012130785A (en) * 2012-04-09 2012-07-12 Daiichi Shokai Co Ltd Game machine
US8276043B2 (en) 2008-03-01 2012-09-25 Kabushiki Kaisha Toshiba Memory system
US8285954B2 (en) 2008-03-01 2012-10-09 Kabushiki Kaisha Toshiba Memory system managing a plurality of logs
WO2013046464A1 (en) * 2011-09-30 2013-04-04 株式会社日立製作所 Storage system having a non-volatile semiconductor storage medium
US8443133B2 (en) 2008-02-29 2013-05-14 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
JP2014059850A (en) * 2012-09-19 2014-04-03 Fujitsu Ltd Storage device, internal processing control method, and internal processing control program
US8812767B2 (en) 2011-03-08 2014-08-19 Fujitsu Semiconductor Limited Method of controlling memory, memory control circuit, storage device and electronic device
JP2016071447A (en) * 2014-09-26 2016-05-09 ラピスセミコンダクタ株式会社 Nonvolatile storage and control method thereof
JP2016517065A (en) * 2013-03-06 2016-06-09 アビニシオ テクノロジー エルエルシー Manage operations on stored data units
JP2016519795A (en) * 2013-03-06 2016-07-07 アビニシオ テクノロジー エルエルシー Manage operations on stored data units
JP2018516410A (en) * 2015-12-17 2018-06-21 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Method and apparatus for managing storage devices
CN108701089A (en) * 2016-04-01 2018-10-23 英特尔公司 For handling the method and apparatus being sequentially written in the part of addressable unit
JP2019049876A (en) * 2017-09-11 2019-03-28 大日本印刷株式会社 Electronic information storage medium, ic card, table management method with electronic information storage medium, and table management program
CN111078136A (en) * 2019-10-22 2020-04-28 安徽力高新能源技术有限公司 Method for preventing flash service life reduction caused by BMS dynamic data storage
CN117891410A (en) * 2024-03-14 2024-04-16 合肥康芯威存储技术有限公司 Memory system and data processing method of flash memory

Cited By (60)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006028283A1 (en) * 2004-09-10 2006-03-16 Tokyo Electron Device Limited Storage device, memory management method and program
JP2007193883A (en) * 2006-01-18 2007-08-02 Sony Corp Data recording device and method, data reproducing device and method, and data recording and reproducing device and method
JP2007199828A (en) * 2006-01-24 2007-08-09 Matsushita Electric Ind Co Ltd Nonvolatile storage device and address management method
JP2008119341A (en) * 2006-11-15 2008-05-29 Daiman:Kk Game machine
KR100928037B1 (en) * 2007-05-04 2009-11-26 주식회사 롭테크놀러지 Semiconductor storage media disks with dynamic expansion and contraction of storage capacity and file system
US9164896B2 (en) 2008-02-29 2015-10-20 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
US8850107B2 (en) 2008-02-29 2014-09-30 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
US8443133B2 (en) 2008-02-29 2013-05-14 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
US11573712B2 (en) 2008-02-29 2023-02-07 Kioxia Corporation Memory system storing management information and method of controlling same
US9582370B2 (en) 2008-02-29 2017-02-28 Kabushiki Kaisha Toshiba Memory system storing management information and method of controlling same
JP2009211196A (en) * 2008-02-29 2009-09-17 Toshiba Corp Memory system
US10067698B2 (en) 2008-02-29 2018-09-04 Toshiba Memory Corporation Memory system storing management information and method of controlling same
US10379762B2 (en) 2008-02-29 2019-08-13 Toshiba Memory Corporation Memory system storing management information and method of controlling same
US10996868B2 (en) 2008-02-29 2021-05-04 Toshiba Memory Corporation Memory system storing management information and method of controlling same
TWI419161B (en) * 2008-02-29 2013-12-11 Toshiba Kk Memory system storing management information and method of controlling the same
US11972115B2 (en) 2008-02-29 2024-04-30 Kioxia Corporation Memory system storing management information and method of controlling same
JP2009211216A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system and storage method for management information
JP2009211221A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP4558052B2 (en) * 2008-03-01 2010-10-06 株式会社東芝 Memory system
US8751901B2 (en) 2008-03-01 2014-06-10 Kabushiki Kaisha Toshiba Nonvolatile semiconductor memory system configured to control data transfer
JP4551938B2 (en) * 2008-03-01 2010-09-29 株式会社東芝 Memory system
JP2009211213A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP2009211223A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
JP4551939B2 (en) * 2008-03-01 2010-09-29 株式会社東芝 Memory system
US8285954B2 (en) 2008-03-01 2012-10-09 Kabushiki Kaisha Toshiba Memory system managing a plurality of logs
US9176816B2 (en) 2008-03-01 2015-11-03 Kabushiki Kaisha Toshiba Memory system configured to control data transfer
US8276043B2 (en) 2008-03-01 2012-09-25 Kabushiki Kaisha Toshiba Memory system
JP2009217754A (en) * 2008-03-12 2009-09-24 Toshiba Corp Memory system
JP4703673B2 (en) * 2008-03-12 2011-06-15 株式会社東芝 Memory system
JP2009276883A (en) * 2008-05-13 2009-11-26 Oki Electric Ind Co Ltd Semiconductor auxiliary storage device
JP2010033393A (en) * 2008-07-30 2010-02-12 Hitachi Ltd Storage apparatus, memory area managing method thereof, and flash memory package
US8706988B2 (en) 2008-12-24 2014-04-22 Kabushiki Kaisha Toshiba Memory system
JP2010152514A (en) * 2008-12-24 2010-07-08 Toshiba Corp Memory system
JP2010157141A (en) * 2008-12-27 2010-07-15 Toshiba Corp Memory system
JP2010157139A (en) * 2008-12-27 2010-07-15 Toshiba Corp Memory system
US8725932B2 (en) 2008-12-27 2014-05-13 Kabushiki Kaisha Toshiba Memory system and method of controlling memory system
JP2011123560A (en) * 2009-12-08 2011-06-23 Oki Electric Industry Co Ltd Flash disk device
JP2011165179A (en) * 2010-02-08 2011-08-25 Samsung Electronics Co Ltd Data storage device, recording medium access method and recording medium therefor
JP2012128545A (en) * 2010-12-14 2012-07-05 Hitachi Ltd Memory controller and data recording apparatus
JP2012133416A (en) * 2010-12-17 2012-07-12 Toshiba Corp Memory system
JP2012133651A (en) * 2010-12-22 2012-07-12 Ricoh Co Ltd Control program of semiconductor storage, semiconductor storage medium control device, control method of semiconductor storage medium and image forming device
US8812767B2 (en) 2011-03-08 2014-08-19 Fujitsu Semiconductor Limited Method of controlling memory, memory control circuit, storage device and electronic device
US8539142B2 (en) 2011-09-30 2013-09-17 Hitachi, Ltd. Storage system comprising nonvolatile semiconductor storage media
JPWO2013046464A1 (en) * 2011-09-30 2015-03-26 株式会社日立製作所 Storage system having nonvolatile semiconductor storage medium
WO2013046464A1 (en) * 2011-09-30 2013-04-04 株式会社日立製作所 Storage system having a non-volatile semiconductor storage medium
JP2012130785A (en) * 2012-04-09 2012-07-12 Daiichi Shokai Co Ltd Game machine
JP2014059850A (en) * 2012-09-19 2014-04-03 Fujitsu Ltd Storage device, internal processing control method, and internal processing control program
JP2016519795A (en) * 2013-03-06 2016-07-07 アビニシオ テクノロジー エルエルシー Manage operations on stored data units
US10133500B2 (en) 2013-03-06 2018-11-20 Ab Initio Technology Llc Managing operations on stored data units
JP2016517065A (en) * 2013-03-06 2016-06-09 アビニシオ テクノロジー エルエルシー Manage operations on stored data units
US9959070B2 (en) 2013-03-06 2018-05-01 Ab Initio Technology Llc Managing operations on stored data units
JP2016071447A (en) * 2014-09-26 2016-05-09 ラピスセミコンダクタ株式会社 Nonvolatile storage and control method thereof
US10198180B2 (en) 2015-12-17 2019-02-05 Tencent Technology (Shenzhen) Company Limited Method and apparatus for managing storage device
JP2018516410A (en) * 2015-12-17 2018-06-21 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Method and apparatus for managing storage devices
CN108701089A (en) * 2016-04-01 2018-10-23 英特尔公司 For handling the method and apparatus being sequentially written in the part of addressable unit
CN108701089B (en) * 2016-04-01 2024-01-30 英特尔公司 Method and apparatus for handling sequential writes to portions of addressable units
JP2019049876A (en) * 2017-09-11 2019-03-28 大日本印刷株式会社 Electronic information storage medium, ic card, table management method with electronic information storage medium, and table management program
CN111078136A (en) * 2019-10-22 2020-04-28 安徽力高新能源技术有限公司 Method for preventing flash service life reduction caused by BMS dynamic data storage
CN111078136B (en) * 2019-10-22 2023-05-05 力高(山东)新能源技术股份有限公司 Method for preventing flash life reduction caused by BMS dynamic data storage
CN117891410A (en) * 2024-03-14 2024-04-16 合肥康芯威存储技术有限公司 Memory system and data processing method of flash memory

Similar Documents

Publication Publication Date Title
JP2005242897A (en) Flash disk drive
KR100389867B1 (en) Flash memory management method
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
KR101038167B1 (en) Information processing device including memory management device managing access from processor to memory and memory management method
US7761655B2 (en) Storage system and method of preventing deterioration of write performance in storage system
US10509570B2 (en) Method, device, and program for managing a flash memory for mass storage
US8694722B2 (en) Memory systems
US8041884B2 (en) Controller for non-volatile memories and methods of operating the memory controller
US6865658B2 (en) Nonvolatile data management system using data segments and link information
KR100847506B1 (en) Storage device, memory management method and program
US8239612B2 (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP2009205689A (en) Flash disk device
KR20080037283A (en) System comprising flash memory device and data recovery method thereof
JP2005196736A (en) Address mapping method of flash memory, mapping information management method, and flash memory using same methods
KR20110117099A (en) Mapping address table maintenance in a memory device
JP2009086738A (en) Memory controller, flash memory system equipped with memory controller and method for controlling flash memory
KR100654344B1 (en) Memory device using flash memory and error correction method the same
KR101020781B1 (en) A method for log management in flash memory-based database systems
JP5100789B2 (en) Semiconductor memory device and method for controlling semiconductor memory device
US20220164135A1 (en) Apparatus, method and computer program for managing memory page updates within non-volatile memory
KR20050009045A (en) Memory device and error correction method using flash memory
JP2009211152A (en) Information processing apparatus, memory system, and control method therefor
JP2016071447A (en) Nonvolatile storage and control method thereof
JP2021140464A (en) Storage device, storage system and method
JP2021068129A (en) Memory controller and flash memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090508

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090811