JP2007293917A - Method for controlling memory system - Google Patents

Method for controlling memory system Download PDF

Info

Publication number
JP2007293917A
JP2007293917A JP2007199962A JP2007199962A JP2007293917A JP 2007293917 A JP2007293917 A JP 2007293917A JP 2007199962 A JP2007199962 A JP 2007199962A JP 2007199962 A JP2007199962 A JP 2007199962A JP 2007293917 A JP2007293917 A JP 2007293917A
Authority
JP
Japan
Prior art keywords
block
area
data
file
logical
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
JP2007199962A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Tanaka
中 義 幸 田
Makoto Yatabe
誠 谷田部
Takesuke Sato
藤 雄 亮 佐
Kazuya Kawamoto
本 和 也 河
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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
Priority claimed from JP9214561A external-priority patent/JPH10124384A/en
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007199962A priority Critical patent/JP2007293917A/en
Publication of JP2007293917A publication Critical patent/JP2007293917A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To achieve fast writing of data and significant cost reductions. <P>SOLUTION: In this method for controlling a memory system in which the content of files managed by a host in first predetermined units is stored in a storage region divided into second predetermined units, the second predetermined units are minimum units for deleting data in a nonvolatile semiconductor storage memory included in the memory system. The boundary of the first predetermined units is controlled to be located on the boundary of the second predetermined units. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、不揮発性半導体メモリシステムの制御方法に関し、特に不揮発性半導体メモリカードの制御に使用されるものである。   The present invention relates to a control method for a nonvolatile semiconductor memory system, and more particularly to a method for controlling a nonvolatile semiconductor memory card.

近年図1に示すようなフラッシュメモリカードがデジタルスチルカメラやPDA等の携帯情報機器の記憶媒体として注目されている。フラッシュメモリとしてNAND型フラッシュメモリと呼ばれるフラッシュメモリが使用され販売がなされている。   In recent years, a flash memory card as shown in FIG. 1 has attracted attention as a storage medium for portable information devices such as digital still cameras and PDAs. A flash memory called a NAND flash memory is used and sold as a flash memory.

このメモリカードは図1に示すように薄型のプラスチックパッケージ1にわずかな窪みが設けられておりその窪みに22ピンの平面電極を有するフラッシュメモリ2が埋め込まれている。本フラッシュメモリカードは専用のコネクタを介してホストシステムに電気的に接続され、データの入出力を行うというものである。   In this memory card, as shown in FIG. 1, a thin plastic package 1 is provided with a slight depression, and a flash memory 2 having a 22-pin planar electrode is embedded in the depression. This flash memory card is electrically connected to a host system via a dedicated connector, and performs data input / output.

これらのメモリカードはコネクタを介して信号のやり取りを行うので、メモリカードの各端子とコネクタの端子との接触が不完全だった場合には、誤動作する可能性が大きくなる。このため、メモリカードの各端子と情報処理機器のコネクタの端子とが確実に接触しているかどうかを確認する方法が考案されてきた。   Since these memory cards exchange signals via the connector, there is a high possibility of malfunction if the contact between each terminal of the memory card and the terminal of the connector is incomplete. For this reason, a method for confirming whether or not each terminal of the memory card and the terminal of the connector of the information processing device are in contact has been devised.

特に、従来のメモリカードを用いた制御システムでは、メモリカードの各端子とコネクタの対応する端子は同時に接続/切断されていたので、挿入/抜去時において、接続/切断のタイミングの僅かなズレが生じることがある。このため、例えば、電源が供給されている状態で、コマンドラッチイネーブル信号等の制御信号が不定になると、意図しない書込みまたは消去コマンド等が取り込まれデータを破壊する可能性があり、メモリカードとコネクタの挿抜制御には細心の注意が必要であった。   In particular, in a control system using a conventional memory card, each terminal of the memory card and the corresponding terminal of the connector are connected / disconnected at the same time, so there is a slight shift in connection / disconnection timing during insertion / removal. May occur. For this reason, for example, if a control signal such as a command latch enable signal becomes indefinite while power is supplied, an unintended write or erase command may be taken in and the data may be destroyed. Careful attention was required to control the insertion and removal of the.

フラッシュメモリとして、16MビットのNAND型フラッシュメモリの場合を例に取ると、図2に示すように、フラッシュメモリは512個の物理的なメモリブロックに分割されている。このブロックは消去時の最小単位となっている。1ブロックはさらに16ページに分割される。1ページは書き込みおよび読み出しの基本的な単位となる。1ページは264バイトから構成され、うち256バイトはユーザーデータ領域(データ部)、残りの8バイト(冗長部)はエラー訂正符号および管理情報等の格納(冗長部)に使用される。   Taking the case of a 16 Mbit NAND flash memory as an example of the flash memory, the flash memory is divided into 512 physical memory blocks as shown in FIG. This block is the minimum unit for erasing. One block is further divided into 16 pages. One page is a basic unit for writing and reading. One page is composed of 264 bytes, of which 256 bytes are used for the user data area (data part) and the remaining 8 bytes (redundant part) are used for storing error correction codes and management information (redundant part).

これに対して、パソコン側ではデータは図3に示す論理ブロックによって管理される。論理ブロック(LBA:Logical Block Address )は500個設定されており、1個の論理ブロックは連続した8セクタに相当する。すなわち、論理ブロック0は論理セクタ0〜7を意味する。   On the other hand, on the personal computer side, data is managed by the logical blocks shown in FIG. 500 logical blocks (LBA: Logical Block Address) are set, and one logical block corresponds to 8 consecutive sectors. That is, logical block 0 means logical sectors 0-7.

通常パソコン等ではデータはセクタ(512バイト)単位で管理されるため、本メモリカードでも512バイト単位でのデータ管理を基本とすべく物理ブロックの2ページをペアとして論理ブロックの1セクタ分のデータを記憶させる。データの具体的な格納方法を図4に示す。   Normally, data is managed in units of sectors (512 bytes) in a personal computer or the like, so in this memory card, data for one sector of a logical block is paired with two pages of physical blocks as a basis for data management in units of 512 bytes. Remember. A specific method for storing data is shown in FIG.

未使用の正常ブロックは、データ部、冗長部とも“FFh”に設定されている。下記に各々のバイトの意味あいにつき説明する。Data Area−1は512バイトデータのうち、前半の0〜255バイトのデータが格納される。Data Area−2には512バイトデータのうち、後半の256〜511バイトのデータが格納される。User Data Areaのデータは、ユーザーに解放されており使用方法はユーザーに一任される。Data Status Areaはデータが正常か否かを示す。通常は“FFh”だが、正常でないデータが書き込まれている場合に“00h”が設定される。Block StatusAreaはブロックが良か不良かを示す。通常は“FFh”だが、不良ブロックの場合、“00h”(初期不良ブロック)、“F0h”(後発不良ブロック)が設定される。2ビット以上“0”であった場合は、不良ブロックであると判断する。なお、本データは同一ブロック内では全て同じ値を書き込む。BlockAddress Area−1はブロックの論理アドレス情報を示す。なお、1論理ブロックを構成する8セクタには512の物理ブロックのうち1物理ブロックに相当するので、本データは同一ブロック内では全て同じ値が書込まれることになる。同様にして、Block Address Area−2はBlockAddress Area−1のデータと同じ内容が書かれている。ECCArea−1は偶数ページデータ(256バイト)の3バイトECCコードである。ECC Area−2は、奇数ページデータ(256バイト)の3バイトECCコードである。   An unused normal block is set to “FFh” in both the data portion and the redundant portion. The meaning of each byte is explained below. Data Area-1 stores data of 0 to 255 bytes in the first half of 512-byte data. Data Area-2 stores 256 to 511 bytes of the latter half of the 512 bytes of data. User Data Area data is released to the user and usage is left to the user. Data Status Area indicates whether the data is normal or not. Normally, “FFh” is set, but “00h” is set when abnormal data is written. Block Status Area indicates whether the block is good or bad. Normally, “FFh”, but in the case of a defective block, “00h” (initial defective block) and “F0h” (later defective block) are set. If it is “0” for 2 bits or more, it is determined that the block is defective. Note that the same value is written in this data in the same block. BlockAddress Area-1 indicates logical address information of the block. Since eight sectors constituting one logical block correspond to one physical block out of 512 physical blocks, the same value is written in this data in the same block. Similarly, the same contents as the data of Block Address Area-1 are written in Block Address Area-2. ECCArea-1 is a 3-byte ECC code of even page data (256 bytes). ECC Area-2 is a 3-byte ECC code of odd page data (256 bytes).

64MビットNAND型フラッシュメモリの場合を例に取ると、図5に示すように、フラッシュメモリは1024個の物理的なメモリブロックに分割されている。このブロックは消去時の最小単位となっている。1ブロックはさらに16ページに分割される。1ページは書き込みおよび読み出しの基本的な単位となる。1ページは528バイトから構成され、うち512バイトはユーザーデータ領域(データ部)、残りの16バイト(冗長部)はエラー訂正符号および管理情報等の格納(冗長部)に使用される。論理ブロックは図6に示すように、1000個に設定されており、1個の論理ブロックは連続した16セクタに相当する。すなわち論理ブロック0は論理セクタ0〜15を意味する。64MビットNAND型フラッシュメモリのデータ格納方法を図7に示す。   Taking the case of a 64-Mbit NAND flash memory as an example, as shown in FIG. 5, the flash memory is divided into 1024 physical memory blocks. This block is the minimum unit for erasing. One block is further divided into 16 pages. One page is a basic unit for writing and reading. One page is composed of 528 bytes, of which 512 bytes are used for the user data area (data part) and the remaining 16 bytes (redundant part) are used for storing error correction codes and management information (redundant part). As shown in FIG. 6, 1000 logical blocks are set, and one logical block corresponds to 16 consecutive sectors. That is, logical block 0 means logical sectors 0-15. FIG. 7 shows a data storage method of the 64-Mbit NAND flash memory.

このようなメモリカードの制御では、データ更新時は消去済み領域に更新データを書き込み、元のデータが存在する領域を消去するという、追加書き込み方式を採用しているため、ある論理ブロックに対応するデータが存在する物理ブロックは、固定では無く、常にメモリ内を移動している。したがって、図8に示すように物理ブロックの冗長部には自分がどの論理ブロックに対応するデータを保持しているかを示す論理ブロックアドレス情報を記憶している。ここで、図4および図7中のBlock Address Area−1及びBlock Address Area−2が、対応する論理ブロックアドレスに相当する。   Such a memory card control employs an additional writing method in which update data is written in the erased area and the area where the original data exists is erased at the time of data update, and thus corresponds to a certain logical block. The physical block in which the data exists is not fixed and always moves in the memory. Therefore, as shown in FIG. 8, logical block address information indicating which logical block is held by itself is stored in the redundant portion of the physical block. Here, Block Address Area-1 and Block Address Area-2 in FIGS. 4 and 7 correspond to the corresponding logical block addresses.

ゆえに、通常は電源投入時に、全物理ブロックの該論理ブロックアドレス情報格納領域をサーチし、システムRAM上に、論理ブロックと物理ブロックの変換テーブルを作る。一度テーブルを作成した後は、該テーブルを参照すれば、論理ブロックに対応する物理ブロックがすぐに判断可能なため、全ブロックのサーチ動作は電源投入時に1回行われる。当然のことながら、データの更新を行い、対応する物理ブロックの位置が変化した場合、メモリシステムは、論理番地/物理番地変換テーブルの更新作業を行い、次のアクセスに備えることになる。   Therefore, normally, when power is turned on, the logical block address information storage area of all physical blocks is searched, and a conversion table of logical blocks and physical blocks is created on the system RAM. Once the table is created, the physical block corresponding to the logical block can be immediately determined by referring to the table. Therefore, the search operation for all blocks is performed once when the power is turned on. As a matter of course, when the data is updated and the position of the corresponding physical block changes, the memory system updates the logical address / physical address conversion table and prepares for the next access.

しかし、従来のメモリシステムにおいては、前記論理番地/物理番地変換テーブルに要するRAM領域が膨大になってしまうという第1の問題点があった。以下にその内容を詳述する。   However, the conventional memory system has a first problem that the RAM area required for the logical address / physical address conversion table becomes enormous. The details will be described below.

従来の16MビットNAND型フラッシュメモリの論理番地/物理番地変換テーブルを図9に示す。上述したように、1論理ブロック分のデータ、すなわち連続した8セクタ分のデータは、フラッシュメモリ中の512ブロックのうちのいずれかの物理ブロックに存在する。512個の物理ブロックから1個のブロックを選択するには、9ビット必要となる。ソフトウェアの利便性に配慮してオフセットがそのまま物理ブロックを指し示す様にテーブルを構成すると、1論理ブロックに対し2バイト、計1KBのRAM領域が必要となる。例えば、論理ブロック5の情報が格納されている物理ブロックの番地はテーブルの先頭からオフセット5ワード(10バイト)目に格納される。   FIG. 9 shows a logical address / physical address conversion table of a conventional 16 Mbit NAND flash memory. As described above, data for one logical block, that is, data for eight consecutive sectors exists in any physical block of 512 blocks in the flash memory. In order to select one block from 512 physical blocks, 9 bits are required. If the table is configured so that the offset points directly to the physical block in consideration of the convenience of the software, a RAM area of 2 KB, 1 KB in total, is required for one logical block. For example, the address of the physical block in which the information of the logical block 5 is stored is stored at the offset 5 words (10 bytes) from the top of the table.

このように、従来用いられていた方法においては、論理番地/物理番地変換テーブルが必要とするRAM領域が非常に大きいという問題点があった。通常よく用いられる、汎用CPUでは内蔵RAMとして1KB程度のRAMを搭載しているのが一般的である。従って、従来は、論理番地/物理番地変換テーブルだけで1KBを使用する必要があり、内蔵RAMのみではシステム構成ができず、外づけのRAMをシステムとして有することが条件となりコストアップの大きな要因となっていた。   As described above, the conventional method has a problem that the RAM area required for the logical address / physical address conversion table is very large. A general-purpose CPU that is usually used generally has a RAM of about 1 KB as a built-in RAM. Therefore, conventionally, it is necessary to use 1 KB only with the logical address / physical address conversion table, and the system configuration cannot be made with only the built-in RAM, and it is necessary to have an external RAM as a system. It was.

図10に従来の64MビットNAND型フラッシュメモリの論理番地/物理番地変換テーブルを示す。この場合、1論理ブロック分のデータ、すなわち連続した16セクタ分のデータはフラッシュメモリ中の1024ブロックのうちのいずれかの物理ブロックに存在する。1024個の物理ブロックから1個の物理ブロックを選択するには、10ビット必要となることから、合計2KBのRAM領域が必要となる。このため、16ビットNAND型フラッシュメモリ同様膨大なRAM領域が必要となる。   FIG. 10 shows a logical address / physical address conversion table of a conventional 64-Mbit NAND flash memory. In this case, the data for one logical block, that is, the data for 16 consecutive sectors exist in any physical block of the 1024 blocks in the flash memory. Since 10 bits are required to select one physical block from 1024 physical blocks, a total of 2 KB of RAM area is required. Therefore, an enormous RAM area is required like the 16-bit NAND flash memory.

この問題は、フラッシュメモリの容量が大きくなるほど深刻になる。例えば、1Gビットの時代になるとブロック数は8192個になるため、16KBのRAM容量が必要となる。   This problem becomes more serious as the flash memory capacity increases. For example, in the 1 Gbit era, the number of blocks is 8192, so a 16 KB RAM capacity is required.

また、さらにメモリ容量が増加すると、フラッシュメモリの物理ブロックの冗長部に論理アドレスを格納できないという第2の問題が生じる。図7に示す16MビットNAND型フラッシュメモリの物理ブロックの冗長部のBlock Address Areaには自分がどの論理ブロックに対応するデータを保持しているかを示す論理ブロックアドレス情報が格納される。各物理ブロックの冗長部のBlock Address Areaの構造を図11に示す。図11中で、偶数ページの262バイトおよび奇数ページの259バイト目のD4〜D7の4ビットは“0”“0”“0”“1”、偶数ページの263バイトおよび奇数ページの260バイト目のD0の1ビットは“1”固定値となる。従って、格納可能なブロックアドレスの最大値は、BA0〜BA10で表される、2047である。512MビットのNAND型フラッシュメモリでは物理ブロックが4096個存在するため、Block Address Areaの記述方法を変更しない限り、アドレスを格納することはできない。従来のフラッシュメモリと冗長部の制御方法を異にするため、ホストが2種類のプログラムを用意しない限り、広範囲の容量のフラッシュメモリを制御できず、ホストシステムのプログラム格納領域の容量を圧迫する問題が発生する。   Further, when the memory capacity further increases, there arises a second problem that the logical address cannot be stored in the redundant part of the physical block of the flash memory. The block address area of the redundant part of the physical block of the 16M bit NAND flash memory shown in FIG. 7 stores logical block address information indicating which logical block it holds. FIG. 11 shows the structure of the block address area of the redundant part of each physical block. In FIG. 11, the four bits D4 to D7 of the even page 262 bytes and the odd page 259 bytes are “0” “0” “0” “1”, the even page 263 bytes and the odd page 260 bytes. One bit of D0 is fixed to “1”. Therefore, the maximum value of the block address that can be stored is 2047 represented by BA0 to BA10. Since a 512 Mbit NAND flash memory has 4096 physical blocks, an address cannot be stored unless the description method of the Block Address Area is changed. Since the control method of the redundant part is different from the conventional flash memory, unless the host prepares two types of programs, the flash memory with a wide range of capacity cannot be controlled, and the capacity of the program storage area of the host system is pressed. Will occur.

次に、フラッシュメモリの書き込み、消去について簡単に述べる。フラッシュメモリの書き込みはページ単位で一括して実行される。64MビットNAND型EEPROMの場合は1ページ528バイトである。また消去はブロック単位で実行される。64MビットNAND型EEPROMは16ページで1ブロックを構成する。このようにNAND EEPROMでは書き込みと消去の単位が異なる。従ってあるページのみを消去してデータを更新する事は出来ない。   Next, writing and erasing of the flash memory will be briefly described. Writing to the flash memory is executed in batches for each page. In the case of 64 Mbit NAND type EEPROM, one page is 528 bytes. Erasing is executed in units of blocks. The 64 Mbit NAND type EEPROM constitutes one block with 16 pages. Thus, the NAND EEPROM has different units for writing and erasing. Therefore, it is not possible to update data by deleting only a certain page.

フラッシュメモリカードをパソコンで使用する場合には一般的にDOS支配下のドライブとして取り扱われる。図12に従来のDOSフォーマットパラメータを示す。ここでは、図12(a)として、クラスタサイズ4KBの場合、図12(b)としてクラスタサイズが8KBの場合を示している。クラスタとはDOSのファイル管理の基本最小単位で、ファイルサイズが非常に小さくても1個のクラスタ分の容量は占有する。ファイルサイズが大きい場合は、複数個のクラスタのチェーンとして管理され、その管理情報はFAT(File Allocation Table)に格納される。クラスタのサイズやFATの管理方法等はブートセクタと呼ばれるセクタ内で管理される。1個のデバイスが複数個のドライブとして管理される場合は、マスターブートセクタにその情報が格納される。ファイルの書き込みとしては、OSからクラスタ単位で書き込み命令が発行される。   When a flash memory card is used in a personal computer, it is generally handled as a drive under the control of DOS. FIG. 12 shows conventional DOS format parameters. Here, FIG. 12A shows a case where the cluster size is 4 KB, and FIG. 12B shows a case where the cluster size is 8 KB. A cluster is a basic minimum unit for file management of DOS, and even if the file size is very small, it occupies the capacity of one cluster. When the file size is large, it is managed as a chain of a plurality of clusters, and the management information is stored in a FAT (File Allocation Table). The cluster size, FAT management method, and the like are managed in a sector called a boot sector. When one device is managed as a plurality of drives, the information is stored in the master boot sector. As a file write, a write command is issued in cluster units from the OS.

クラスタサイズが4KBの場合を図12(a)に示す。論理セクタ0にマスターブートセクタ、論理セクタ16にブートセクタ、論理セクタ17〜22にFAT、論理セクタ23〜28にFATのコピー、論理セクタ29〜44にディレクトリー、論理セクタ45以降にファイルデータ領域が配置されている。   FIG. 12A shows the case where the cluster size is 4 KB. The logical sector 0 is the master boot sector, the logical sector 16 is the boot sector, the logical sectors 17 to 22 are FAT, the logical sectors 23 to 28 are FAT copies, the logical sectors 29 to 44 are directories, and the logical sector 45 and later are file data areas. Has been placed.

クラスタサイズが8KBの場合を図12(b)に示す。論理セクタ0にマスターブートセクタ、論理セクタ16にブートセクタ、論理セクタ17〜19にFAT、論理セクタ20〜22にFATのコピー、論理セクタ23〜38にディレクトリー、論理セクタ39以降にファイルデータ領域が配置されている。 FIG. 12B shows a case where the cluster size is 8 KB. The logical sector 0 is the master boot sector, the logical sector 16 is the boot sector, the logical sectors 17 to 19 are FAT, the logical sectors 20 to 22 are FAT copies, the logical sectors 23 to 38 are directories, and the logical sector 39 and later are file data areas. Has been placed.

まず、図13を用いて、クラスタサイズ4KBの場合を例に従来の書き換えシーケンスを説明する。クラスタサイズは4KBなので、連続した8セクタ分の書き込み命令がOSから発行される。このとき論理セクタの45〜52(クラスタA)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ32〜44までを元ブロックから新領域NAND Block Cにコピーする。2) 論理セクタ45〜47の新データを新領域NAND Block Cに書き込む。3) 元ブロックNAND Block Aを消去する。4) 論理番地/物理番地変換テーブルの更新。5) 消去済み新領域を探し、論理セクタ48〜52の新データを新領域NAND Block Dに書き込む。6) 元ブロックNAND Block Bの論理セクタ53〜63のデータを新領域NAND Block Dにコピーする。7) 元ブロックNAND Block Bを消去する。8) 論理番地/物理番地変換テーブルの更新。従って、外部からみて8セクタの書き換えを実施した場合、実際デバイスとしては、論理セクタ32〜63の合計32セクタ(32ページ)の書き込み動作と、NAND Block A、NAND Block Bの合計2ブロックに対する消去動作が実施されたことになる。   First, a conventional rewrite sequence will be described using FIG. 13 as an example of a cluster size of 4 KB. Since the cluster size is 4 KB, a write command for 8 consecutive sectors is issued from the OS. At this time, writing (data update) to logical sectors 45 to 52 (cluster A) occurs. 1) Search the erased new area and copy logical sectors 32 to 44 from the original block to the new area NAND Block C. 2) Write new data of logical sectors 45 to 47 to the new area NAND Block C. 3) Erase the original block NAND Block A. 4) Update logical address / physical address conversion table. 5) Search for the erased new area and write new data of logical sectors 48 to 52 to the new area NAND Block D. 6) Copy the data of the logical sectors 53 to 63 of the original block NAND Block B to the new area NAND Block D. 7) Erasing the original block NAND Block B 8) Update logical address / physical address conversion table. Therefore, when rewriting 8 sectors as viewed from the outside, the actual device has a write operation of a total of 32 sectors (32 pages) of logical sectors 32 to 63 and erase for a total of 2 blocks of NAND Block A and NAND Block B. The operation has been carried out.

次に、図14を用いて、クラスタBに対する書き込みシーケンスを説明する。この場合論理セクタの53〜60(クラスタB)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ−48〜52までを元ブロックNAND Block Bから新領域NAND Block Cにコピーする。2) 論理セクタ−53〜60の新データを新領域NAND Block Cに書き込む。3) 論理セクタ−61〜63までを元ブロックNAND Block Bから新領域NAND Block Cにコピーする。4) 元ブロックNAND Block Bを消去する。5) 論理番地/物理番地変換テーブルの更新。従って、外部からみて8セクタの書き換えを実施した場合、実際デバイスとしては、論理セクタの48〜63の合計16セクタ(16ページ)の書き込み動作と、NAND Block Bの1ブロックに対する消去動作が実施されたことになる。   Next, a write sequence for cluster B will be described with reference to FIG. In this case, writing (data update) to logical sectors 53 to 60 (cluster B) occurs. 1) Find the erased new area and copy logical sectors -48 to 52 from the original block NAND Block B to the new area NAND Block C. 2) Write new data of logical sectors 53 to 60 to the new area NAND Block C. 3) Copy logical sectors 61 to 63 from the original block NAND Block B to the new area NAND Block C. 4) Delete the original block NAND Block B. 5) Update logical address / physical address conversion table. Therefore, when rewriting 8 sectors as viewed from the outside, the actual device performs a write operation for a total of 16 sectors (16 pages) of logical sectors 48 to 63 and an erase operation for one block of NAND Block B. That's right.

次に、図15を用いて、クラスタサイズ8KBの場合を例に従来の書き込みシーケンスを説明する。クラスタサイズは8KBなので、連続した16セクタ分の書き込み命令がOSから発行される。このとき論理セクタの39〜54(クラスタA)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ32〜38までを元ブロックNAND Block Aから新領域NAND Block Cにコピーする。2) 論理セクタ39〜47の新データを新領域NAND Block Cに書き込む。3) 元ブロックNAND Block Aを消去する。4) 論理番地/物理番地変換テーブルの更新。5) 消去済み新領域を探し、論理セクタ48〜54の新データを新領域NAND Block Dに書き込む。6) 元ブロックNAND Block Bの論理セクタ55〜63のデータを新領域NAND Block Dにコピーする。7) 元ブロックNAND Block Bを消去する。8) 論理番地/物理番地変換テーブルの更新。従って、外部からみて16セクタの書き換えを実施した場合、実際デバイスとしては、セクタ32〜63の合計32セクタ(32ページ)の書き込み動作と、NAND Block A、NAND BlockBの合計2ブロックに対する消去動作が実施されたことになる。   Next, a conventional write sequence will be described with reference to FIG. 15 taking a cluster size of 8 KB as an example. Since the cluster size is 8 KB, a write command for 16 consecutive sectors is issued from the OS. At this time, writing (data update) to logical sectors 39 to 54 (cluster A) occurs. 1) Find the erased new area and copy logical sectors 32 to 38 from the original block NAND Block A to the new area NAND Block C. 2) Write new data of logical sectors 39 to 47 to the new area NAND Block C. 3) Delete the original block NAND Block A. 4) Update logical address / physical address conversion table. 5) Search for the erased new area and write the new data of logical sectors 48 to 54 to the new area NAND Block D. 6) Copy the data in logical sectors 55 to 63 of the original block NAND Block B to the new area NAND Block D. 7) Delete the original block NAND Block B. 8) Update logical address / physical address conversion table. Therefore, when rewriting 16 sectors as viewed from the outside, the actual device has a write operation of a total of 32 sectors (32 pages) of sectors 32 to 63 and an erase operation for a total of 2 blocks of NAND Block A and NAND Block B. It has been implemented.

上記クラスタが4KBのものと8KBの場合を同じ8KBのデータが書き込まれる場合を想定し比較すると、クラスタサイズが4KBの場合は、2回の書き込みに処理が分割され合計48セクタの書き込みおよび3ブロック分の消去動作が発生する。クラスタサイズが8KBの場合は、クラスタサイズが4KBの場合に比べて1回の書き込みに処理が集約され合計32セクタの書き込みおよび2ブロック分の消去動作が発生する。   Comparing the case where the cluster is 4 KB and 8 KB, assuming that the same 8 KB data is written, if the cluster size is 4 KB, the processing is divided into two writes, a total of 48 sectors written and 3 blocks An erase operation for a minute occurs. When the cluster size is 8 KB, the processing is concentrated on one writing compared to the case where the cluster size is 4 KB, and a total of 32 sectors are written and two blocks are erased.

このように従来のメモリシステムは、外部から見て更新されたセクタ数に比較し、実際にデバイス上で実行された書き込み動作および消去動作がはるかに多くなるため、外部からみた書き換え速度が遅くなると言う第2の問題点があった。   As described above, the conventional memory system has much more write operations and erase operations actually executed on the device than the number of sectors updated as viewed from the outside. There was a second problem to say.

次に、従来のメモリシステムにおけるファイル消去コマンド実行時の動作について説明する。通常DOSのファイルシステムにおいては、ファイル消去コマンド実行時に、ディレクトリー上に該当ファイルが無効である旨のマーキングを行い、該当ファイルが占有していたメモリ領域をFAT(File Allocation Table)上で開放する。従って、ファイル本体のデータ部分はフラッシュメモリ上に消去されずに残っている。消去コマンド実行時の管理領域とデータ領域の関係を図16に示す。図16において、例えばFile−1とFile−4の消去コマンドを実行した場合、管理領域のFile−1とFile−4が開放されdel.markがマーキングされる。このときデータ領域においてはFile−1、File−4は消去されない。   Next, an operation at the time of executing a file erase command in the conventional memory system will be described. In a normal DOS file system, when a file erase command is executed, marking that a corresponding file is invalid is performed on a directory, and a memory area occupied by the corresponding file is released on a FAT (File Allocation Table). Therefore, the data portion of the file body remains on the flash memory without being erased. FIG. 16 shows the relationship between the management area and the data area when the erase command is executed. In FIG. 16, for example, when an erase command for File-1 and File-4 is executed, File-1 and File-4 in the management area are released and del. mark is marked. At this time, File-1 and File-4 are not erased in the data area.

このため、その後の書込みコマンド実行時に、前記開放された領域に対し新たなファイルのデータ部分が書き込まれる際に、まずフラッシュメモリの消去動作が必要となる。このため、ファイル書き込み時に必ずフラッシュメモリの消去動作を伴い、ファイル書き込み速度を劣化させるという第3の問題点が生じる。   For this reason, when a data portion of a new file is written in the released area when a write command is executed thereafter, the flash memory must first be erased. For this reason, a third problem arises that the flash memory erasure operation is always accompanied when the file is written, and the file writing speed is degraded.

図4に示す、ECC Area−1は偶数ページデータ(256バイト)の3バイトECCコードである。ECC Area−2は、奇数ページデータ(256バイト)の3バイトECCコードである。   4, ECC Area-1 is a 3-byte ECC code of even-numbered page data (256 bytes). ECC Area-2 is a 3-byte ECC code of odd page data (256 bytes).

ここでECC(Error Correction Code)とはエラー訂正のための符号をさす。システムはこのエラー訂正用の符号を利用し、読み出したデータにエラーがあるか否かを判定し、エラーが存在する場合、エラーを訂正することができる。必要なエラー訂正能力はフラッシュメモリ自身の信頼性、例えばメモリのセル構造に依存する。フラッシュメモリには複数のデータ記憶方法があり、これらのフラッシュメモリを例えばデジタルスチルカメラやPDA等のシステムに用いた場合のエラー訂正について考える。   Here, ECC (Error Correction Code) is a code for error correction. The system uses this error correction code to determine whether or not there is an error in the read data, and if an error exists, the error can be corrected. The required error correction capability depends on the reliability of the flash memory itself, for example, the cell structure of the memory. There are a plurality of data storage methods in the flash memory, and error correction when these flash memories are used in a system such as a digital still camera or a PDA will be considered.

例えば、第1のフラッシュメモリカードは、図17に示すようにメモリセルのしきい値に応じた、“0”と“1”の2値の値を保持し、1ページ(256バイト)に対して1ビットエラー訂正用の符号を持たせている。また、第2のフラッシュメモリカードは、図18に示すようにメモリセルのしきい値に応じた、“00”と“01”と“10”と“11”の4値(2ビット分)の値を保持し、1個のメモリセルが破壊されると2ビット分のデータが破壊される可能性があるため、1ページ(256バイト)に対して2ビットエラー訂正用の符号を持たせている。1ビットエラー訂正用と2ビットエラー訂正用では符号の生成、およびエラーの検出、訂正に関してはアルゴリズムが異なる。   For example, the first flash memory card holds binary values of “0” and “1” corresponding to the threshold value of the memory cell as shown in FIG. 17, and for one page (256 bytes) Thus, a 1-bit error correction code is provided. Further, as shown in FIG. 18, the second flash memory card has four values (for two bits) of “00”, “01”, “10”, and “11” according to the threshold value of the memory cell. The value is retained, and if one memory cell is destroyed, there is a possibility that the data for 2 bits may be destroyed. Therefore, a code for correcting 2-bit error is given to 1 page (256 bytes). Yes. For 1-bit error correction and 2-bit error correction, there are different algorithms for code generation and error detection and correction.

従来のシステム(例えば、デジタルスチルカメラや、PDA等)では図19に示すように1種類のエラー訂正アルゴリズムのみ搭載していた。このため、上記第1および第2のどちらかのフラッシュメモリカードしか読めないという第4の問題点が生じ、フラッシュメモリの市場での汎用性を高める上での障害となっていた。   Conventional systems (for example, digital still cameras and PDAs) have only one type of error correction algorithm as shown in FIG. For this reason, the fourth problem that only one of the first and second flash memory cards can be read occurs, which is an obstacle to improving the versatility of the flash memory in the market.

本発明の、第1、第4、第5の実施例に係る発明は、上記第1の問題点を鑑みてなされ、論理番地/物理番地変換テーブルで必要となるRAMの容量を低減し、汎用CPUの内蔵RAMのみでフラッシュメモリを制御する方法を提供し、これにより従来必要であった外付けRAMを不要となし、大幅なコストダウンを実現することを目的とする。   The inventions according to the first, fourth, and fifth embodiments of the present invention are made in view of the above first problem, reduce the capacity of RAM required for the logical address / physical address conversion table, An object of the present invention is to provide a method for controlling a flash memory only with a built-in RAM of a CPU, thereby eliminating the need for an external RAM, which has been conventionally required, and realizing a significant cost reduction.

さらに、本発明の第2の実施例に係る発明は、上記第2の問題点を鑑みてなされ、物理ブロックにおいて、DOS上のファイル管理の基本単位であるクラスタの区切れが、消去の単位となるブロックをまたがないようにする方法を提供し、データの高速書込みを実現することを目的とする。   Further, the invention according to the second embodiment of the present invention is made in view of the second problem, and in the physical block, the partition of the cluster, which is the basic unit of file management on DOS, is the erasure unit. It is an object of the present invention to provide a method that does not cross a certain block and realize high-speed data writing.

また、本発明の第3の実施例に係る発明は、上記第3の問題点を鑑みてなされ、消去コマンド実行時に物理ブロックの管理領域を解放すると同時に、そのデータ領域の消去も行うことにより、その後の書込みコマンド実行時の処理速度の向上を実現することを目的とする。   Further, the invention according to the third embodiment of the present invention is made in view of the third problem described above, by releasing the management area of the physical block at the time of executing the erase command and simultaneously erasing the data area, It is an object to realize an improvement in processing speed when the write command is executed thereafter.

さらに、本発明の第6の実施例に係る発明は、上記第4の問題点を鑑みてなされ、2値/多値等の2種類のフラッシュメモリカードのいずれもまたは更に複数のフラッシュメモリがサポート可能なシステムを提供することにある。   Furthermore, the invention according to the sixth embodiment of the present invention has been made in view of the above fourth problem, and is supported by any of two types of flash memory cards such as binary / multi-value or a plurality of flash memories. It is to provide a possible system.

上記目的を達成する手段として、本発明の実施例に係るメモリシステムの制御方法では、ホストにより第1の所定単位で管理されるファイルの内容を、第2の所定単位に分割された記憶領域内に記憶するメモリシステムの制御方法において、前記第2の所定単位は、前記メモリシステムに含まれる不揮発性半導体記憶メモリのデータ消去の最小単位であり、前記第1の所定単位の境界が、前記第2の所定単位の境界上に配置されるよう制御することを特徴とする。   As a means for achieving the above object, in the memory system control method according to the embodiment of the present invention, the contents of the file managed by the host in the first predetermined unit are stored in the storage area divided into the second predetermined unit. In the method of controlling a memory system stored in the memory system, the second predetermined unit is a minimum data erasing unit of a nonvolatile semiconductor memory included in the memory system, and the boundary of the first predetermined unit is the first unit. Control is performed so as to be arranged on the boundary of two predetermined units.

また、上記目的を達成する手段として、本発明の実施例に係るメモリシステムの制御方法では、複数の物理ブロックを有する不揮発性半導体メモリを含むメモリシステムの制御方法において、ホストのファイル管理単位であるクラスタの境界を、前記物理ブロックの境界上に配置することを特徴とする。   As a means for achieving the above object, the memory system control method according to the embodiment of the present invention is a host file management unit in the memory system control method including a nonvolatile semiconductor memory having a plurality of physical blocks. Cluster boundaries are arranged on the physical block boundaries.

また、上記目的を達成する手段として、本発明の実施例に係るメモリシステムの制御方法では、マスターブートセクタ、ブートセクタ、第1のファイルアロケーションテーブル、第2のファイルアロケーションテーブル、ディレクトリー、及びファイルデータを不揮発性半導体記憶メモリに格納するメモリシステムの制御方法であって、前記マスターブートセクタと前記ブートセクタとの間に所定数の空き論理セクタを割り当てることにより、前記マスターブートセクタ、前記ブートセクタ、前記第1のファイルアロケーションテーブル、前記第2のファイルアロケーションテーブル、及び前記ディレクトリーを、少なくとも1つの論理ブロックに対応する第1の物理ブロック領域に格納し、前記ファイルデータを第2の物理ブロック領域に格納し、ホストのファイル管理単位であるクラスタが、物理ブロックの境界をまたがないようにすることを特徴とする。   As a means for achieving the above object, in the method for controlling a memory system according to an embodiment of the present invention, a master boot sector, a boot sector, a first file allocation table, a second file allocation table, a directory, and file data Is stored in a non-volatile semiconductor storage memory, by assigning a predetermined number of free logical sectors between the master boot sector and the boot sector, the master boot sector, the boot sector, The first file allocation table, the second file allocation table, and the directory are stored in a first physical block area corresponding to at least one logical block, and the file data is stored in a second physical block area. It was paid, a file management unit of the host cluster, characterized in that to avoid cross the boundary of the physical block.

本発明の実施例によれば、論理アドレスと物理アドレスとを変換テーブルで変換するに際し、1個の論理ブロックに対して複数個の物理ブロックを割り振るようにしたので、テーブルが必要とするRAM領域を低減することが可能となる。   According to the embodiment of the present invention, when a logical address and a physical address are converted by a conversion table, a plurality of physical blocks are allocated to one logical block. Can be reduced.

さらに、本発明の実施例によれば、クラスタの区切れが消去単位となるブロックをまたがないようにしたので、データ書換え時に発生する消去同数及び書き込み同数を減らすことができる。   Furthermore, according to the embodiment of the present invention, since the partition of the cluster does not extend over the block that becomes the erase unit, the number of erases and the number of writes that occur at the time of data rewriting can be reduced.

さらに、本発明の実施例によれば、消去コマンド実行時に物理ブロックの管理領域を開放すると同時に、そのデータ領域の消去も行うことにしたので、その後の書込みコマンド実行時の処理速度の向上することが可能となる。   Furthermore, according to the embodiment of the present invention, the management area of the physical block is released at the same time when the erase command is executed, and at the same time, the data area is erased, so that the processing speed when the write command is executed thereafter is improved. Is possible.

さらに、本発明の実施例によれば、論理ブロックと物理ブロックの対応関係のうちの必要な領域の対応関係のみを逐次作成するようにしたので、最低限必要なRAM領域を低減することができる。   Furthermore, according to the embodiment of the present invention, only the necessary area correspondences among the logical block and physical block correspondences are sequentially created, so that the minimum required RAM area can be reduced. .

さらに、本発明の実施例によれば、不良ブロックを冗長ブロックに置き換えるに際し、論理的なゾーンのそれぞれにおいて、置き換え後には、各ゾーンに存在する不良ブロック数が所定値を越えないようにしたので、製品の歩留りを向上させることができる。   Furthermore, according to the embodiment of the present invention, when replacing a defective block with a redundant block, in each logical zone, after replacement, the number of defective blocks existing in each zone is prevented from exceeding a predetermined value. , Can improve the product yield.

さらに、本発明の実施例によれば、使用する記憶媒体の種別に応じてエラー訂正アルゴリズムを選択するようにしたので、各種の記憶媒体を使用でき、汎用性が向上する。   Furthermore, according to the embodiment of the present invention, since the error correction algorithm is selected according to the type of storage medium to be used, various storage media can be used, and versatility is improved.

発明の実施の形態BEST MODE FOR CARRYING OUT THE INVENTION

本発明の第1の実施例について詳細に説明する。本実施例は、論理番地/物理番地変換テーブルに必要なRAM領域の容量の削減を行ったフラッシュメモリカードについてである。   The first embodiment of the present invention will be described in detail. This embodiment relates to a flash memory card in which the capacity of a RAM area required for a logical address / physical address conversion table is reduced.

まず、繰返しになるが本発明のメモリシステムの、物理ブロックの構造と論理ブロックの関係について説明する。   First, although repeated, the relationship between the physical block structure and the logical block in the memory system of the present invention will be described.

本発明のメモリシステム物理ブロック構造及び物理ブロック内のデータ構成は、従来技術の項で説明したもの同様で、図2および図4に示される。以下に、図4を用いて、本発明のメモリシステムにおける物理ブロック内の各々のバイトの意味を説明する。   The memory system physical block structure and data structure in the physical block of the present invention are the same as those described in the section of the prior art, and are shown in FIGS. The meaning of each byte in the physical block in the memory system of the present invention will be described below with reference to FIG.

Data Area−1は512バイトデータのうち、前半の0〜255バイトでデータが格納される。Data Area−2には512バイトデータのうち、後半の256〜511バイトのデータが格納される。User DataAreaのデータは、ユーザーに解放されており使用方法はユーザーに一任される。Data Status Areaはデータが正常か否かを示す。通常は“FFh”だが、正常でないデータが書き込まれている場合に“00h”が設定される。Block Status Areaはブロックが良か不良化を示す。通常は“FFh”だが、不良ブロックの場合、“00h”(初期不良ブロック)、“F0h”(後発不良ブロック)が設定される。2ビット以上“0”であった場合は、不良ブロックであると判断する。なお、本データは同一ブロック内では全て同じ値を書き込む。Block Address Area−1はブロックの論理アドレス情報を示す。なお、1論理ブロックを構成する8セクタには512の物理ブロックのうち1物理ブロックに相当するので、本データは同一ブロック内では全て同じ値が書き込まれることになる。同様にして、Block Address Area−2はBlock Address Area−1のデータと同じ内容が書かれている。ECC Area−1は、偶数ページデータ(256バイト)の3バイトECCコードである。ECC Area−2は、奇数ページデータ(256バイト)の3バイトECCコードである。   Data Area-1 stores data in 0 to 255 bytes in the first half of 512-byte data. Data Area-2 stores 256 to 511 bytes of the latter half of the 512 bytes of data. User DataArea data is released to the user and usage is left to the user. Data Status Area indicates whether the data is normal or not. Normally, “FFh” is set, but “00h” is set when abnormal data is written. Block Status Area indicates whether the block is good or bad. Normally, “FFh”, but in the case of a defective block, “00h” (initial defective block) and “F0h” (later defective block) are set. If it is “0” for 2 bits or more, it is determined that the block is defective. Note that the same value is written in this data in the same block. Block Address Area-1 indicates logical address information of the block. Since eight sectors constituting one logical block correspond to one physical block out of 512 physical blocks, the same value is written in this data in the same block. Similarly, the same contents as the data of Block Address Area-1 are written in Block Address Area-2. ECC Area-1 is a 3-byte ECC code of even page data (256 bytes). ECC Area-2 is a 3-byte ECC code of odd page data (256 bytes).

ここで、ECCについて説明する。本実施例では256バイト(2048ビット)単位のデータに対しECC符号を生成する。1ビット訂正の機能を持たせるために、256バイトに対し22ビットのECCデータを使用している。256バイトは図20に示すように、データに並べたものである。   Here, ECC will be described. In this embodiment, an ECC code is generated for data in units of 256 bytes (2048 bits). In order to provide a 1-bit correction function, 22-bit ECC data is used for 256 bytes. As shown in FIG. 20, 256 bytes are arranged in data.

即ち、1Byte目の入力のbit0が2048bitの1bit目(アドレス;00000000 000)となり、256Byte目の入力のbit7が2048bitの2048bit目(アドレス;11111111 111)となる。   That is, the input bit 0 of the 1st byte is the 1st bit (address; 00000000 000) of 2048 bits, and the input 7 of the 256th byte is the 2048th bit (address; 11111111 111) of 2048 bits.

ECCコード(ラインパリティ(LP)とカラムパリティ(CP))は図21に示す条件を満足する1024ビットの奇数パリティとして算出される。   The ECC code (line parity (LP) and column parity (CP)) is calculated as an odd parity of 1024 bits that satisfies the conditions shown in FIG.

カラムパリティ−CP0〜CP5は1バイト(8ビット)でデータが入力される毎に更新される。ECC符号の生成をソフトウェアで行う場合は、1バイトの入力(256通り)に対してのカラムパリティ計算結果を予めシステム内のROM上に持つ方法が考えられる。この方法により、ビット単位の演算が不要になり、計算時間が大幅に短縮できる。またバイトの入力(256通り)に対してのカラムパリティ計算結果を電源投入時に一括で計算し、RAM上に保持する方法も考えられる。前案に比較しROMは無くて済むが、代わりにRAM領域が必要となる。   Column parity-CP0 to CP5 is updated every time data is input with 1 byte (8 bits). When the ECC code is generated by software, a method of preliminarily storing the column parity calculation result for 1-byte input (256 types) on the ROM in the system can be considered. This method eliminates the need for bit-by-bit operations and can greatly reduce the calculation time. Also, a method of calculating the column parity calculation results for byte input (256 ways) at the same time when the power is turned on and holding it on the RAM can be considered. Compared to the previous plan, there is no need for a ROM, but a RAM area is required instead.

図22は、本発明の第1の実施例に係るフラッシュメモリカードの電源投入時の制御フローチャートである。以下にフローに従い説明する。(ステップS1) コネクタにメモリカードが挿入されたことを受けて、電源電圧の検知を行う。(ステップS2) メモリカードのIDコードを読み出し、記憶容量を読みとる。(ステップS3) もしシステムがサポートしていないIDコードが読み出されたらリジェクトする。(ステップS4) 物理フォーマットの確認を行う。物理番地の先頭ブロックの情報を読む。(ステップS5) もしシステムがサポートしていないフォーマットがなされていればリジェクトする。(ステップS6) 論理番地/物理番地変換テーブルを作るとともに、次の書き込み動作で書き込みを行うための消去済み領域を選択する。   FIG. 22 is a control flowchart upon power-on of the flash memory card according to the first embodiment of the present invention. This will be described below according to the flow. (Step S1) In response to the insertion of the memory card into the connector, the power supply voltage is detected. (Step S2) The memory card ID code is read and the storage capacity is read. (Step S3) If an ID code that is not supported by the system is read, it is rejected. (Step S4) The physical format is confirmed. Read the information of the first block of the physical address. (Step S5) If the format is not supported by the system, it is rejected. (Step S6) A logical address / physical address conversion table is created, and an erased area for writing in the next writing operation is selected.

図23に上記ステップS6に示した電源投入時に作成する論理番地/物理番地変換テーブルの作成のフローチャートを示す。(ステップS1) 論理番地/物理番地変換テーブルが入るRAM領域をリセットする。(ステップS2) 次のデータ書き込みに使用される消去済みのブロックを記憶するテーブル領域をリセットする。(ステップS3) 物理ブロックの1からサーチを開始する。(ステップS4) ブロックの冗長部を読み出す。(ステップS5) 所定領域のデータを元に該ブロックが正常なブロックか否かを判断する。不良ブロックの場合以下に続く処理は不要となり、次のブロックのサーチに移行する。(ステップS6) 消去済みのエリアかどうかを判断する。(ステップS7) 消去済みのブロックであれば次の書き込みの際に使用するブロックの候補としてテーブル上に格納する。(ステップS8) 消去済みのエリアで無ければ、論理アドレス情報領域を抽出する。このとき、パリティチェックを行い妥当性を確認する。(ステップS9) 上記内容をもとに論理番地/物理番地変換テーブルを作成する。(ステップS10) 物理ブロック番号のカウントアップ。(ステップS11) 512ブロックサーチしたら終了。   FIG. 23 shows a flowchart for creating the logical address / physical address conversion table created at the time of power-on shown in step S6. (Step S1) The RAM area in which the logical address / physical address conversion table is stored is reset. (Step S2) The table area for storing the erased block used for the next data writing is reset. (Step S3) The search is started from 1 of the physical block. (Step S4) The redundant part of the block is read. (Step S5) Based on the data in the predetermined area, it is determined whether or not the block is a normal block. In the case of a defective block, the following processing is unnecessary, and the process proceeds to the search for the next block. (Step S6) It is determined whether it is an erased area. (Step S7) If it is an erased block, it is stored on the table as a block candidate to be used in the next writing. (Step S8) If it is not an erased area, a logical address information area is extracted. At this time, a parity check is performed to confirm the validity. (Step S9) A logical address / physical address conversion table is created based on the above contents. (Step S10) The physical block number is counted up. (Step S11) When 512 block search is completed.

このフローにしたがって作成された論理番地/物理番地変換テーブルを図24に示す。図24に示す物理ブロックエリア(Physical Block Area )とは、連続した2個の物理ブロックの集合体を意味する。例えば、物理ブロックエリア0とは、物理ブロック0と物理ブロック1を示す。本テーブルでは1個の論理ブロックに対して1個の物理ブロックエリアを割り付けている。例えば、論理ブロック0に対し、物理ブロックエリア5が割り振られている場合、物理ブロックの10もしくは11が実際の論理ブロック0のデータを記憶していることになる。従って、実際にアクセスする時には、物理ブロック10および11の冗長部の論理アドレスとの関連を示すデータ領域を検索し、どちらが論理ブロック0のデータを本当に格納しているのかを判断する必要がある。しかし、極めて限定された領域をリードするのみで済むため、メモリアクセスの性能に及ぼす影響はほとんどない。   FIG. 24 shows a logical address / physical address conversion table created in accordance with this flow. The physical block area (Physical Block Area) shown in FIG. 24 means an aggregate of two consecutive physical blocks. For example, physical block area 0 indicates physical block 0 and physical block 1. In this table, one physical block area is allocated to one logical block. For example, when the physical block area 5 is allocated to the logical block 0, the physical block 10 or 11 stores the actual logical block 0 data. Therefore, when actually accessing, it is necessary to search the data area indicating the relation with the logical address of the redundant portion of the physical blocks 10 and 11 and determine which one really stores the data of the logical block 0. However, since only a very limited area needs to be read, there is almost no influence on the memory access performance.

このとき、物理ブロックエリアは全体で256個(512/2)存在し、8ビットのデータによって記述する事が可能となる。ソフトウェアの利便性に配慮してオフセットがそのまま物理ブロックを指し示す様にテーブルを構成すると、1ブロックに対して1バイト、計0.5KBのRAM領域が必要となる。例えば、論理ブロック5の情報が格納されている物理ブロックエリアの番地はテーブルの先頭からオフセット5バイト目に格納される。   At this time, there are a total of 256 (512/2) physical block areas, which can be described by 8-bit data. If the table is configured so that the offset indicates the physical block as it is in consideration of the convenience of software, a RAM area of 0.5 KB in total is required for one block. For example, the address of the physical block area in which the information of the logical block 5 is stored is stored at the offset 5 bytes from the top of the table.

この0.5KBのRAM容量は、従来必要であった1KBのRAM容量に対し半分となる。汎用CPUは通常1KB程度のRAM領域をもっているが、本実施例によって得られた0.5KBのRAM領域の削減は非常に大きな役割をしめる。   This 0.5 KB RAM capacity is halved compared to the 1 KB RAM capacity conventionally required. A general-purpose CPU usually has a RAM area of about 1 KB, but the reduction of the 0.5 KB RAM area obtained by this embodiment plays a very important role.

すなわちコストアップを招く外付けRAMを設けなくても、本実施例によって得られた0.5KBの空き領域を使用する事によってシステムを構成する事が可能となりコストダウンをはかることができる。   That is, even if an external RAM that causes an increase in cost is not provided, the system can be configured by using the free space of 0.5 KB obtained in this embodiment, and the cost can be reduced.

また、上記実施形態に限らず、物理ブロックエリアとして4物理ブロックを定義しても良いし、さらに大きなブロック数を想定しても構わない。   Moreover, not only the said embodiment but 4 physical blocks may be defined as a physical block area, and a bigger block number may be assumed.

図25は本実施例に係るフラッシュメモリカードの読み出し時の動作フローチャートである。以下にフローに従い説明する。(ステップS1) 読み出しを行う先頭セクタアドレスと転送セクタ数をホストから受け取る。(ステップS2) 読み出し範囲が、妥当な範囲か検証する。(ステップS3) セクタを論理ブロックに変換。16Mビット品の場合は1ブロック8セクタ構成なので8で割ることになる。(ステップS4) 論理番地/物理番地変換テーブルを参照し、該当論理ブロックが存在する物理ブロックエリアを得る。(ステップS5) ブロックエリアにある2個の物理ブロックの論理アドレス情報領域を調べ、いずれがホストの指定した論理ブロックのデータを格納しているかを調べる。(ステップS6) 特定された物理ブロックから1セクタ分データを読み出す。例えばセクタ番号が0の時は、物理ブロックの先頭2ページのデータを読み、例えばセクタ番号が7の時は、物理ブロックの最終2ページのデータを読む。1個の物理ブロックの中では、8個のセクタのデータが順番に並んでいる。(ステップS7) 読み出したデータに対しエラーチェックを行い、エラーが無いか確認する。(ステップS8) エラーが検出されたら、訂正可能か否かを判断する。(ステップS9) エラーが検出され、なおかつ訂正可能な場合データを訂正する。(ステップS10) ホストが要求したセクタ数を読み出したら終了する。(ステップS11) 次の読み出しセクタが物理ブロックの境界を越えるかどうかを判断する。例えば、セクタ7から8に移行する場合、データは各々異なる物理ブロックに存在するため、新たに論理番地/物理番地変換テーブルを再度参照する。(ステップS12) 同一ブロック内で読み出しを継続する場合は、読み出すページをカウントアップする。(ステップS13) 別のブロックへ移動する場合は、論理ブロックをカウントアップし、ページのカウントもリセットする。   FIG. 25 is an operation flowchart at the time of reading from the flash memory card according to the present embodiment. This will be described below according to the flow. (Step S1) The head sector address to be read and the number of transfer sectors are received from the host. (Step S2) It is verified whether the reading range is an appropriate range. (Step S3) A sector is converted into a logical block. In the case of a 16M bit product, since one block has 8 sectors, it is divided by 8. (Step S4) With reference to the logical address / physical address conversion table, a physical block area in which the corresponding logical block exists is obtained. (Step S5) The logical address information areas of the two physical blocks in the block area are checked to determine which stores the data of the logical block designated by the host. (Step S6) Data for one sector is read from the identified physical block. For example, when the sector number is 0, the data of the first two pages of the physical block is read. For example, when the sector number is 7, the data of the last two pages of the physical block is read. In one physical block, data of 8 sectors are arranged in order. (Step S7) An error check is performed on the read data to confirm whether there is any error. (Step S8) If an error is detected, it is determined whether correction is possible. (Step S9) If an error is detected and correctable, the data is corrected. (Step S10) When the number of sectors requested by the host is read, the process ends. (Step S11) It is determined whether or not the next read sector exceeds the boundary of the physical block. For example, when moving from sector 7 to sector 8, since data exists in different physical blocks, the logical address / physical address conversion table is newly referenced again. (Step S12) When reading is continued in the same block, the pages to be read are counted up. (Step S13) When moving to another block, the logical block is counted up and the page count is also reset.

次に、本実施例の書込み時の動作について説明する。書き込みは基本的に以下の3部分の処理に大別される。論理セクタ3を書き換える場合を例に説明する。更新はセクタ3のみだが、セクタ0から7の8セクタ分のデータは同一ブロック上に存在するので、1ブロックに対する処理が必要になる。書き込みは基本的に以下の3部分の処理に大別される。   Next, the operation at the time of writing in this embodiment will be described. Writing is basically divided into the following three parts. A case where the logical sector 3 is rewritten will be described as an example. The update is for sector 3 only, but the data for 8 sectors from sectors 0 to 7 are on the same block, so processing for one block is required. Writing is basically divided into the following three parts.

第1に、論理セクタ0、1及び2に関しては、データの更新は無いので、論理セクタ0、1及び2のデータは、元々格納されていた論理ブロックから新しく書き込みを行う物理ブロックへコピーされる。   First, since there is no data update for logical sectors 0, 1, and 2, the data in logical sectors 0, 1, and 2 are copied from the originally stored logical block to the physical block to be newly written. .

第2に、論理セクタ3は更新するので、元のデータをコピーする必要はなく、ホストから与えられたデータを新たに書込みを行うブロックへ書き込む。   Second, since the logical sector 3 is updated, there is no need to copy the original data, and the data given from the host is written to the block to be newly written.

第3に、論理セクタ4〜7はデータの更新はないので、論理セクタ4〜7のデータは、元々格納されていた物理ブロックから新しく書き込みを行う物理ブロックへコピーする。   Third, since the data in the logical sectors 4 to 7 is not updated, the data in the logical sectors 4 to 7 is copied from the originally stored physical block to the physical block to be newly written.

以上のように、1ブロックに対して、コピー/更新データ書き込み/コピーの動作が基本となる。勿論、書き込みがセクタ0〜7の様な場合は、1ブロック分全てのデータが更新されるのでコピー動作は不要となることは自明である。以下に示すフローチャートの分岐は主にこれから書き込むセクタが更新データか、もしくはコピー動作なのかを判断しながら進行することになる。   As described above, the copy / update data write / copy operation is basically performed for one block. Of course, when writing is performed in sectors 0 to 7, it is obvious that all the data for one block is updated, so that the copying operation is unnecessary. The branch of the flowchart shown below proceeds mainly while determining whether the sector to be written is update data or a copy operation.

図26は本実施例に係るフラッシュメモリカードの書き込み時の動作フローチャートである。以下にフローに従い説明する。(ステップS1) ホストからデータの更新を行う先頭セクタ番地と転送セクタ数を受け取る。(ステップS2) 論理ブロック番号に変換し、論理番地/物理番地変換テーブルを参照する。読み出し動作と同様に論理ブロックエリアの2個のブロックから本当の物理ブロックを選択する。ここで選択したブロックからコピーすべきデータを吸い上げることになる。(ステップS3) 物理ブロックの先頭から処理を開始する。(ステップS4) ブロック前半のコピー動作かもしくはデータの更新かを判断する。(ステップS5) コピーであれば、元ブロックからデータを読み出し、新ブロックに書き込みを実行する。(ステップS6) 次のセクタの処理に移行する。(ステップS7) (ステップS4)で更新領域と判断されたら、ホストから受け取った更新データを基に書き込みを行う。(ステップS8) 次のセクタの処理に移行する。(ステップS9) ホストが要求するセクタ数書き込んだか確認する。(ステップS10) (ステップS9)で要求数の書き込みが終了したと判断された場合、ブロックの境界か否かを判断する。未書き込みの領域が残っていれば、ブロック後半のコピー動作に移行。ブロック境界であれば、これ以上コピー動作を実行する必要はない。(ステップS11) 元のブロックからデータを読み出し、新ブロックに書き込む。(ステップS12) 次のセクタの処理に移行する。(ステップS13) (ステップS4)でホストの要求するセクタ数の書き込みが終了していない場合は更なる書き込みが必要だが、ブロック境界であれば、次の物理ブロックに対する処理に移行する。(ステップS14) 次にブロック処理に移行または、処理を終了する前に、書き込みを行った結果をもとに論理番地/物理番地変換テーブルの更新を行い、さらに元データが存在した物理ブロックを消去し、次の処理での新たな書き込み領域としての候補領域として登録する。(ステップS15) 次のブロックの処理に移行する。   FIG. 26 is an operation flowchart at the time of writing in the flash memory card according to the present embodiment. This will be described below according to the flow. (Step S1) The head sector address and the number of transfer sectors for updating data are received from the host. (Step S2) It converts into a logical block number and refers to a logical address / physical address conversion table. Similar to the read operation, a real physical block is selected from two blocks in the logical block area. Data to be copied is picked up from the block selected here. (Step S3) Processing is started from the top of the physical block. (Step S4) Whether the copy operation in the first half of the block or data update is determined. (Step S5) If it is a copy, data is read from the original block and written to the new block. (Step S6) The processing shifts to the next sector. (Step S7) If it is determined in step S4 that it is an update area, writing is performed based on the update data received from the host. (Step S8) The processing shifts to the next sector. (Step S9) It is confirmed whether the number of sectors requested by the host has been written. (Step S10) When it is determined in (Step S9) that the request number has been written, it is determined whether or not it is a block boundary. If an unwritten area remains, the operation moves to the copy operation in the second half of the block. If it is a block boundary, there is no need to perform any more copy operations. (Step S11) Data is read from the original block and written to the new block. (Step S12) The process shifts to the next sector. (Step S13) If the writing of the number of sectors requested by the host is not completed in (Step S4), further writing is necessary, but if it is a block boundary, the processing moves to the next physical block. (Step S14) Before proceeding to block processing or ending the processing, the logical address / physical address conversion table is updated based on the result of writing, and the physical block in which the original data exists is deleted. Then, it is registered as a candidate area as a new writing area in the next processing. (Step S15) The processing shifts to the next block.

以上に述べたように、本実施例のメモリシステムの制御方法によれば、RAM領域の大幅な削減が実現できる。これは、従来のメモリカードシステムは論理番地/物理番地変換テーブルで必要なRAM容量が大きく、汎用CPUの内蔵RAMのみではシステム構成ができず、外づけのRAMを設けることが条件となっていたに対して、本発明のメモリカードシステムは論理番地/物理番地変換テーブルとして必要なRAMの容量を低減し、汎用CPUの内蔵RAMのみ制御可能としたフラッシュメモリを制御する方法を用いるからである。このことにより、従来必要であった外付けRAMを不要とし、大幅なコストダウンを実現することが可能となる。   As described above, according to the control method of the memory system of this embodiment, the RAM area can be greatly reduced. This is because the conventional memory card system has a large RAM capacity required for the logical address / physical address conversion table, and the system configuration cannot be configured only with the built-in RAM of the general-purpose CPU, and an external RAM is provided. On the other hand, the memory card system of the present invention uses a method for controlling a flash memory in which the RAM capacity required for the logical address / physical address conversion table is reduced and only the built-in RAM of the general-purpose CPU can be controlled. This eliminates the need for an external RAM, which has been necessary in the past, and enables a significant cost reduction.

次に、本発明の第2の実施例について詳細に説明する。本実施例はDOSフォーマット形式で用いた場合に、データの書き換え動作を高速化したフラッシュメモリカードについてである。   Next, a second embodiment of the present invention will be described in detail. This embodiment relates to a flash memory card in which data rewrite operation is accelerated when used in the DOS format.

図27に本実施例によるDOSフォーマットパラメータを示す。ここでは、図27(a)として、クラスタサイズ4KBの場合、図27(b)としてクラスタサイズが8KBの場合を示している。クラスタサイズが4KBの場合、論理セクタ0にマスターブートセクタ、論理セクタ19にブートセクタ、論理セクタ20〜25にFAT、論理セクタ26〜31にFATのコピー、論理セクタ32〜47にディレクトリー、論理セクタ48以降にファイルデータ領域が配置されている。クラスタサイズが8KBの場合、論理セクタ0にマスターブートセクタ、論理セクタ25にブートセクタ、論理セクタ26〜28にFAT、論理セクタ29〜31にFATのコピー、論理セクタ32〜47にディレクトリー、論理セクタ48以降にファイルデータ領域が配置されている。このように、クラスタサイズが4KBおよび8KBの場合とも、クラスタの区切れが物理的なブロックの区切れをまたがないようパラメータが設定されている。これは、DOSフォーマットパラメータの内、ブートセクタの配置される場所を調整することにより実現できる。   FIG. 27 shows DOS format parameters according to this embodiment. Here, FIG. 27A shows a case where the cluster size is 4 KB, and FIG. 27B shows a case where the cluster size is 8 KB. When the cluster size is 4 KB, the master boot sector in logical sector 0, the boot sector in logical sector 19, FAT in logical sectors 20-25, the FAT copy in logical sectors 26-31, the directory in logical sectors 32-47, and the logical sector A file data area is arranged after 48. When the cluster size is 8 KB, the master boot sector in logical sector 0, the boot sector in logical sector 25, the FAT in logical sectors 26-28, the FAT copy in logical sectors 29-31, the directory in logical sectors 32-47, the logical sector A file data area is arranged after 48. Thus, even when the cluster size is 4 KB and 8 KB, the parameters are set so that the partition of the cluster does not cross the block of the physical block. This can be realized by adjusting the location of the boot sector in the DOS format parameters.

まず、図28を用いて、クラスタサイズ4KBの場合を例に書き込みシーケンスを説明する。クラスタサイズは4KBなので、連続した8セクタ分の書き込み命令がOSから発行される。このとき論理セクタの48〜55(クラスタA)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ48〜55までの新データを新領域NAND BlockCに書き込む2) 論理セクタ56〜63の元データを新領域NAND BlockCにコピーする。3) 元ブロックNAND BlockBを消去する。4) 論理番地/物理番地変換テーブルの更新。   First, the write sequence will be described using FIG. 28 as an example of the cluster size of 4 KB. Since the cluster size is 4 KB, a write command for 8 consecutive sectors is issued from the OS. At this time, writing (data update) to logical sectors 48 to 55 (cluster A) occurs. 1) Search for the erased new area and write new data of logical sectors 48 to 55 to the new area NAND Block C. 2) Copy the original data of logical sectors 56 to 63 to the new area NAND Block C. 3) Delete the original block NAND BlockB. 4) Update logical address / physical address conversion table.

従って、外部からみて8セクタの書き換えを実施した場合、実際デバイスとしては、論理セクタ48〜63の合計16セクタ(16ページ)の書き込み動作と、NAND BlockBの1ブロックに対する消去動作が実施されたことになる。   Therefore, when 8 sectors are rewritten from the outside, the actual device has performed a write operation of a total of 16 sectors (16 pages) of logical sectors 48 to 63 and an erase operation for one block of NAND Block B. become.

次に、図29を用いて、またクラスタBに対する書き込みシーケンスを説明する。この場合論理セクタの56〜63(クラスタB)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ48〜55までの元データを新領域NAND BlockCにコピーする。2) 論理セクタ56〜63の新データを新領域NAND BlockCに書き込む。3) 元ブロックNAND BlockBを消去する。4) 論理番地/物理番地変換テーブルの更新。   Next, a write sequence for cluster B will be described with reference to FIG. In this case, writing (data update) to logical sectors 56 to 63 (cluster B) occurs. 1) Search for the erased new area, and copy the original data of logical sectors 48 to 55 to the new area NAND Block C. 2) Write new data of logical sectors 56 to 63 to new area NAND BlockC. 3) Delete the original block NAND BlockB. 4) Update logical address / physical address conversion table.

従って、外部からみて8セクタの書き換えを実施した場合、実際デバイスとしては、論理セクタ48〜63の合計16セクタ(16ページ)の書き込み動作と、NAND BlockBの1ブロックに対する消去動作が実施されたことになる。   Therefore, when 8 sectors are rewritten from the outside, the actual device has performed a write operation of a total of 16 sectors (16 pages) of logical sectors 48 to 63 and an erase operation for one block of NAND Block B. become.

次に、図30を用いて、クラスタサイズ8KBの場合を例に書き込みシーケンスを説明する。クラスタサイズは8KBなので、連続した16セクタ分の書込み命令がOSから発行される。このとき論理セクタの48〜63(クラスタA)に対する書き込み(データ更新)が発生する。1) 消去済み新領域を探し、論理セクタ48〜63までの新データを新領域NAND Block Cに書き込む。2) 元ブロックNAND BlockBを消去する。3) 論理番地/物理番地変換テーブルの更新。   Next, a write sequence will be described using FIG. 30 as an example of a cluster size of 8 KB. Since the cluster size is 8 KB, a write command for 16 consecutive sectors is issued from the OS. At this time, writing (data update) to logical sectors 48 to 63 (cluster A) occurs. 1) Search for the erased new area and write new data for logical sectors 48 to 63 to the new area NAND Block C. 2) Delete the original block NAND BlockB. 3) Update logical address / physical address conversion table.

従って、外部からみて16セクタの書き換えを実施した場合、実際デバイスとしては、論理セクタ48〜63の合計16セクタ(16ページ)の書き込み動作と、 NAND Block Bの1ブロックに対する消去動作が実施されたことになる。   Therefore, when rewriting 16 sectors as viewed from the outside, as an actual device, a total of 16 sectors (16 pages) of the logical sectors 48 to 63 were written, and an erase operation for one block of NAND Block B was performed. It will be.

上記クラスタが4KBのものと8KBの場合を同じ8KBのデータが書き込まれる場合を想定し比較すると、クラスタサイズが4KBの場合は、2回の書き込みに処理が分割され合計32セクタの書き込みおよび2ブロック分の消去動作が発生する。これに対し、クラスタサイズが8KBの場合は、1回の書き込みに処理が集約され合計16セクタの書き込みおよび1ブロック分の消去動作が発生することになる。   Comparing the case where the above cluster is 4 KB and 8 KB, assuming that the same 8 KB data is written, if the cluster size is 4 KB, the processing is divided into two writes, a total of 32 sectors written and 2 blocks An erase operation for a minute occurs. On the other hand, when the cluster size is 8 KB, the processing is consolidated into one write, and a total of 16 sectors are written and an erase operation for one block occurs.

図12〜図15に示した従来のメモリシステムの書き換え速度と比較すると、クラスタが4KBの場合では、8KBのデータを更新するのに48セクタの書き込みおよび3ブロック分の消去動作が発生していたものが、32セクタの書き込みおよび2ブロック分の消去動作となり、時間的に2/3に短縮されたことになる。また、クラスタが8KBの場合では、8KBのデータを更新するのに32セクタの書き込みおよび2ブロック分の消去動作が発生していたものが、16セクタの書き込みおよび1ブロック分の消去動作となり、時間的に1/2に短縮されたことになる。   Compared with the rewriting speed of the conventional memory system shown in FIGS. 12 to 15, when the cluster is 4 KB, the writing of 48 sectors and the erasing operation for 3 blocks occur to update the data of 8 KB. This is a 32-sector write and 2-block erase operation, which is reduced to 2/3 in time. Also, when the cluster is 8 KB, the writing of 32 sectors and the erasing operation for 2 blocks to update the 8 KB data becomes the writing operation of 16 sectors and the erasing operation for 1 block. Therefore, it is reduced to 1/2.

このように、DOSのファイル管理の単位であるクラスタの区切れが、フラッシュメモリの物理的なブロックの境界をまたがないことにより、書き換え速度の高速化がはかれる。   As described above, since the partition of the cluster, which is a unit of DOS file management, does not cross the physical block boundary of the flash memory, the rewriting speed can be increased.

また、クラスタのサイズに着目するとクラスタが4KBの場合では、8KBのデータを更新するのに32セクタの書き込みおよび2ブロック分の消去動作が発生していたものが、クラスタが8KBの場合では16セクタの書き込みおよび1ブロック分の消去動作となり、時間的に1/2になる。すなわち、クラスタのサイズをフラッシュメモリの物理ブロックのサイズと同じにすることによってより高速な書き込みが可能となる。勿論、クラスタのサイズがフラッシュメモリの物理ブロックのサイズの整数倍の場合も同様の効果を得ることができる。   Focusing on the size of the cluster, when the cluster is 4 KB, the writing of 32 sectors and the erasing operation for 2 blocks occurred when updating the 8 KB data, but when the cluster is 8 KB, the 16 sectors Writing and erasing operations for one block, and the time is halved. That is, by making the size of the cluster the same as the size of the physical block of the flash memory, higher speed writing is possible. Of course, the same effect can be obtained when the cluster size is an integral multiple of the physical block size of the flash memory.

次に、本発明の第3の実施例について詳細に説明する。本実施例は消去後の書込みコマンド実行時の処理速度を向上させるフラッシュメモリカードについてである。   Next, a third embodiment of the present invention will be described in detail. This embodiment relates to a flash memory card that improves the processing speed when executing a write command after erasure.

本実施例のフラッシュメモリカードシステムは、通常DOSのファイルシステムにおけるファイル消去と異なり、ディレクトリー上に該当ファイルが無効である旨のマーキングを行い、該当ファイルが占有していたメモリ領域をFAT(File Allocation Table )上で開放するのみならず、ファイル本体のデータ部分をフラッシュメモリ上で消去することを特徴とする。すなわちファイルの消去命令時に、開放されたクラスタの領域に対する消去動作を実施する。   In the flash memory card system of this embodiment, unlike the file deletion in the normal DOS file system, marking that the corresponding file is invalid is performed on the directory, and the memory area occupied by the corresponding file is set to FAT (File Allocation). Table) is characterized by not only releasing on the top but also erasing the data part of the file body on the flash memory. That is, at the time of a file erase command, an erase operation is performed on the released cluster area.

図31に消去コマンド実行時の管理領域とデータ領域の関係を示す。図31において、例えばFile−1とFile−4の消去コマンドを実行した場合、管理領域のFile−1とFile−4が開放されdel.markがマーキングされ、さらにデータ領域においてFile−1とFile−4が記憶されていた領域は消去される。   FIG. 31 shows the relationship between the management area and the data area when the erase command is executed. In FIG. 31, for example, when an erase command for File-1 and File-4 is executed, File-1 and File-4 in the management area are released and del. The mark is marked, and the area where File-1 and File-4 are stored in the data area is deleted.

従って、次に新たなファイル書き込み命令が発生したときに選択されるクラスタは既に消去済みであるので、即座に書き込みが可能となり、ファイル書き込み速度が向上する。一般にフラッシュメモリにおいては書き込みより消去の方が時間がかかるため、本実施例によって達成されるファイル書き込み速度の向上効果は顕著である。   Therefore, since the cluster selected when the next new file write command is generated has already been erased, it becomes possible to write immediately and the file write speed is improved. In general, in a flash memory, erasing takes more time than writing, so the effect of improving the file writing speed achieved by this embodiment is remarkable.

また本実施例における効果が最も顕著に現れる条件は上述した第2の実施例から分かる様に、クラスタサイズとフラッシュメモリのブロックサイズを一致させた場合である。クラスタサイズがフラッシュメモリのブロックサイズより小さい場合は、ブロックの一部分を消去することになるが、処理が煩雑であることに加え、仕様上ブロックの一部分のみが消去されている状態を許さない場合もある。クラスタサイズとブロックサイズが一致していれば、単純にブロックを消去する事によってクラスタを開放できる。勿論クラスタサイズが物理ブロックサイズの整数倍の場合も同様の効果が得られる。   Further, the condition in which the effect of the present embodiment is most prominent is the case where the cluster size and the block size of the flash memory are matched, as can be seen from the second embodiment described above. If the cluster size is smaller than the block size of the flash memory, a part of the block will be erased. However, in addition to the complicated processing, there may be cases where only a part of the block is erased due to the specification. is there. If the cluster size matches the block size, the cluster can be released by simply erasing the block. Of course, the same effect can be obtained when the cluster size is an integral multiple of the physical block size.

また、本実施例はその主旨を変えない範囲で様々拡張が可能である。例えば、本実施例では、ファイル消去時にデータ領域の該当するクラスタへの消去動作を実行したが、消去動作の実行タイミングはそれに限られない。例えば、フォーマット動作を実行する時点で全クラスタの消去動作を実行しても良い。勿論メモリカードの出荷時点でデータ領域のクラスタを消去済みの状態で出荷すると良い。通常メモリカードの出荷時にはメモリカードの出荷試験を実施する。このテスト終了時にディレクトリーおよびFATの書き換えによって、ファイルが無い状態にするだけでなく、本実施例のようにデータ領域の消去動作を実行しておくと、エンドユーザーの手に渡った時点で、ユーザーが手を加えることなく高速なファイル書き込みが期待できる。   Further, the present embodiment can be extended in various ways without changing the gist thereof. For example, in this embodiment, the erase operation to the corresponding cluster in the data area is executed at the time of file erase, but the execution timing of the erase operation is not limited thereto. For example, the erase operation for all clusters may be executed at the time when the format operation is executed. Of course, it is preferable to ship the data area cluster after the memory card is shipped. Usually, when a memory card is shipped, a memory card shipping test is performed. At the end of this test, not only does the file not exist by rewriting the directory and FAT, but if the data area erasing operation is executed as in this embodiment, the user will be able to use it when it reaches the end user. Can expect high-speed file writing without any changes.

さらに例えばデジタルスチルカメラ等で使用する場合を考えると、カメラ上でのファイルの消去、再フォーマット等の画像ファイルの消去を伴う動作時において、FAT等の書換のみならず、ファイル本体が格納されていたクラスタ領域の消去を同時に実行すれば、その後の画像書き込みシーケンスにおいて、高速書き込みが可能となり、連写や動画の取り込み等が可能となる。この際には、クラスタサイズがデバイスのブロックサイズの正数倍で、クラスタの区切れがブロックサイズの区切れと一致しているとファイル本体部分の消去が容易となる。またデジタルカメラ等で電源の投入時等に自動的に不要なファイル部分を消去するようにしても良い。こうすれば、パソコン上で単純にFAT等の更新によってファイル消去がなされていたメモリカードに対しても、ユーザーの手を煩わせることなく書き込み高速化が計れる。またそのタイミングは電源投入時にのみならずいつでもかまわない。また、本発明はコンピュータシステム上等で本メモリカードを使用する場合も同様の手段により書き込みの高速化が計れる。   Furthermore, considering the use with a digital still camera, for example, not only rewriting of FAT and the like but also the file itself is stored in the operation accompanied by erasing of the image file such as erasing and reformatting on the camera. If the cluster area is erased at the same time, high-speed writing can be performed in the subsequent image writing sequence, and continuous shooting, moving image capturing, and the like can be performed. At this time, if the cluster size is a positive multiple of the device block size and the partition of the cluster matches the partition of the block size, the file body portion can be easily erased. Further, an unnecessary file portion may be automatically deleted when the power is turned on with a digital camera or the like. In this way, it is possible to increase the writing speed without troublesome user's hand even for a memory card that has been erased by simply updating the FAT on the personal computer. The timing may be any time as well as when the power is turned on. In the present invention, even when this memory card is used on a computer system or the like, the writing speed can be increased by the same means.

また、本実施例によれば、データの書き換え時に発生する、消去および書き込み回数を減らすことが可能なため、一般的に書き換え回数に制限のあるフラッシュメモリを使用する場合には、メモリの寿命をのばす効果も有する。   In addition, according to the present embodiment, the number of times of erasing and writing that occurs at the time of data rewriting can be reduced. Therefore, in general, when using a flash memory with a limited number of times of rewriting, the life of the memory is reduced. It also has the effect of extending.

以上に述べたように、本実施例のメモリシステムの制御方法によれば、DOSのファイル管理の単位であるクラスタの区切れが、フラッシュメモリの物理的なブロックの境界をまたがないことにより、データの書き換え時に発生する消去および書き込み回数を減らすことが可能なため、書き換え速度の高速化が可能となる。さらに、一般的に書き換え回数に制限のあるフラッシュメモリを使用する場合には、メモリの寿命をのばすことも可能となる。   As described above, according to the control method of the memory system of this embodiment, the partition of the cluster, which is the unit of file management of DOS, does not cross the physical block boundary of the flash memory. Since it is possible to reduce the number of erasures and writings that occur at the time of data rewriting, the rewriting speed can be increased. Further, when a flash memory having a limited number of rewrites is used, it is possible to extend the life of the memory.

次に、本発明の第4の実施例について詳細に説明する。本実施例は、論理番地/物理番地変換テーブルに必要なRAM領域の容量の削減を行ったフラッシュメモリカードについてである。   Next, a fourth embodiment of the present invention will be described in detail. This embodiment relates to a flash memory card in which the capacity of a RAM area required for a logical address / physical address conversion table is reduced.

本実施例では、論理番地/物理番地変換テーブル作成に際し、ホストからのアクセスを2種類に分類する。例えば、ケース1は論理ブロック500個の内、前半の250個の論理ブロックをアクセスしている状態、ケース2は論理ブロック500個の内、後半の250個の論理ブロックをアクセスしている状態とする。ケース1の場合は、論理番地/物理番地変換テーブルには前半250ブロック分のテーブルを保持させ、上記ケース2の場合は、論理番地/物理番地変換テーブルは後半250ブロック分のテーブルを保持させる。ケース1の場合のテーブルの状態を図32(a)に示し、ケース2の場合のテーブルの状態を図32(b)に示す。   In this embodiment, when creating a logical address / physical address conversion table, access from the host is classified into two types. For example, Case 1 is a state in which 250 logical blocks in the first half of 500 logical blocks are accessed, and Case 2 is a state in which 250 logical blocks in the latter half are accessed out of 500 logical blocks. To do. In case 1, the logical address / physical address conversion table holds the table for the first half 250 blocks, and in case 2 above, the logical address / physical address conversion table holds the table for the second half 250 blocks. The table status in case 1 is shown in FIG. 32 (a), and the table status in case 2 is shown in FIG. 32 (b).

ある瞬間、テーブル上に論理ブロックの前半250個分のテーブルが存在していたとすると、ホストからのアクセス範囲が論理ブロックの後半0〜249ならば、既存のテーブルを使用して論理ブロック−物理ブロックの対応を検索することができる。   If there is a table for the first half of the logical block on the table at a certain moment, if the access range from the host is 0 to 249 in the second half of the logical block, the existing table is used to create a logical block-physical block. You can search for correspondence.

同様にある瞬間、テーブル上に論理ブロックの後半250個分のテーブルが存在していたとすると、ホストからのアクセス範囲が論理ブロックの後半250〜499ならば、既存のテーブルを使用して論理ブロック−物理ブロックの対応を検索することができる。   Similarly, if a table corresponding to the latter half 250 of the logical block exists on the table at a certain moment, if the access range from the host is the second half 250 to 499 of the logical block, the existing table is used to create the logical block − The correspondence of the physical block can be searched.

次に、ある瞬間、テーブル上に論理ブロックの前半250個分のテーブルが存在していたとし、ホストからのアクセス範囲が論理ブロックの後半250〜499ならば、既存のテーブルを使用して論理ブロック−物理ブロックの対応を検索することができない。従ってこの場合は、論理ブロックの後半250個分に相当する論理番地/物理番地変換テーブルを作り直す。これにはフラッシュメモリの全領域の再度の参照が必要となる。   Next, if there is a table for the first half 250 of the logical block on the table at a certain moment, and the access range from the host is 250 to 499 in the second half of the logical block, then the existing block is used for the logical block. -The correspondence of the physical block cannot be searched. Accordingly, in this case, a logical address / physical address conversion table corresponding to the latter half 250 logical blocks is recreated. This requires re-referencing the entire area of the flash memory.

同様に、ある瞬間、テーブル上に論理ブロックの後半250個分のテーブルが存在していたとし、ホストからのアクセス範囲が論理ブロックの前半0〜249ならば、既存のテーブルを使用して論理ブロック−物理ブロックの対応を検索することができない。従ってこの場合は、論理ブロックの前半250個分に相当する論理番地/物理番地変換テーブルを作り直す。これにはフラッシュメモリの再度の参照が必要となる。   Similarly, if a table corresponding to the latter half 250 logical blocks exists on the table at a certain moment, and the access range from the host is 0 to 249 in the first half of the logical block, the existing block is used for the logical block. -The correspondence of the physical block cannot be searched. Therefore, in this case, a logical address / physical address conversion table corresponding to the first half 250 logical blocks is recreated. This requires a reference to the flash memory again.

このように、ホストからアクセスした領域に相当する論理番地/物理番地変換テーブルがRAM上になければ再度フラッシュメモリの全領域を参照し必要な論理番地/物理番地変換テーブルを作りなおす。   As described above, if the logical address / physical address conversion table corresponding to the area accessed from the host is not on the RAM, the entire logical area / physical address conversion table is recreated by referring to the entire area of the flash memory again.

この場合の論理番地/物理番地変換テーブル作成のフローチャートを図33に示す。(ステップS0) アクセスの最初で既に必要な論理番地/物理番地変換テーブルの有無を確認し必要であればテーブル作成ルーチンへ移行。(ステップS1) 論理番地/物理番地変換テーブルが入るRAM領域をリセットする。(ステップS2) 物理ブロックの先頭からサーチを開始する。(ステップS3) ブロックの冗長部を読み出す。(ステップS4) 所定領域のデータを元に該ブロックが正常なブロックか否かを判断する。   FIG. 33 shows a flowchart for creating a logical address / physical address conversion table in this case. (Step S0) The presence / absence of a logical address / physical address conversion table already required at the beginning of access is checked, and if necessary, the process proceeds to a table creation routine. (Step S1) The RAM area in which the logical address / physical address conversion table is stored is reset. (Step S2) Search is started from the top of the physical block. (Step S3) The redundant part of the block is read. (Step S4) It is determined whether or not the block is a normal block based on data in a predetermined area.

不良ブロックの場合以下に続く処理は不要となり、次のブロックのサーチに移行する。(ステップS5) 消去済みのエリアかどうかを判断する。(ステップS6) 消去済みのブロックであれば次の書き込みの際に使用するブロックの候補としてテーブル上に格納する。(ステップS7) 消去済みのエリアで無ければ、論理アドレス情報領域を抽出する。(ステップS8) 上記内容をもとに論理番地/物理番地変換テーブルを作成する。(ステップS9) 物理ブロック番号のカウントアップ。全ブロックサーチしたら終了。   In the case of a defective block, the following processing is unnecessary, and the process proceeds to the search for the next block. (Step S5) It is determined whether it is an erased area. (Step S6) If it is an erased block, it is stored on the table as a block candidate to be used in the next writing. (Step S7) If it is not an erased area, a logical address information area is extracted. (Step S8) A logical address / physical address conversion table is created based on the above contents. (Step S9) The physical block number is counted up. Finish when all blocks are searched.

以上のような動作で必要に応じ論理番地/物理番地変換テーブルを作成する。   The logical address / physical address conversion table is created as necessary by the above operation.

また本発明は上記実施例にかぎられない。主旨を逸脱しない範囲で種々変更が可能である。   The present invention is not limited to the above-described embodiments. Various changes can be made without departing from the spirit of the invention.

例えば本実施例では、フラッシュメモリを前半、後半の2分割したが、分割の数は2個に限定されず、任意の数に分割できる。   For example, in this embodiment, the flash memory is divided into the first half and the second half, but the number of divisions is not limited to two, and the flash memory can be divided into any number.

また本実施例ではフラッシュメモリを前半、後半の等しい大きさに分割したが、本発明はこれに限られない。このように分割の個数、また大きさは自由度を有する。   In this embodiment, the flash memory is divided into the same size in the first half and the second half, but the present invention is not limited to this. Thus, the number and size of the divisions have a degree of freedom.

3個以上の領域に分割した際、常に1個のみのテーブルを保持する必要はない。たとえば本フラッシュメモリカードがDOSのデバイスとして、画像ファイル等を格納する場合を考えてみる。通常デバイスの先頭には、ファイルの管理領域、すなわちマスターブートセクタ、パーティションブートセクタ、ファイルアロケーションテーブル(FAT)、ディレクトリー領域が存在する。これらのファイル管理領域はファイルの更新が行われたり、アクセスされるたび頻繁にアクセスされる領域である。この場合このファイル管理領域に相当するエリアを1個の領域、その他のファイルデータ格納領域を2分割する。ファイル管理領域に相当する領域の論理番地/物理番地変換テーブルは、常に保持するようにしても良い。この場合、論理アドレスの後半部分にファイルを書き込む動作を行う際、ファイル管理領域と論理アドレス後半のテーブルを交互に頻繁に作り直す必要はなくなるので性能の劣化が防げる。ここでファイルの管理領域と記述したが、ファイル管理領域以上の領域に対しテーブルを常に保持すれば同様の効果が得られる。   When dividing into three or more areas, it is not always necessary to hold only one table. For example, consider the case where the flash memory card stores an image file or the like as a DOS device. Usually, a file management area, that is, a master boot sector, a partition boot sector, a file allocation table (FAT), and a directory area exist at the head of the device. These file management areas are frequently accessed whenever a file is updated or accessed. In this case, the area corresponding to the file management area is divided into one area and the other file data storage area is divided into two. The logical address / physical address conversion table of the area corresponding to the file management area may always be held. In this case, when performing an operation of writing a file to the latter half of the logical address, it is not necessary to frequently recreate the file management area and the second half of the logical address alternately, thereby preventing performance degradation. Although the file management area is described here, the same effect can be obtained if the table is always held in an area larger than the file management area.

以上に述べたように本実施例によれば、論理ブロックと物理ブロックの対応関係のすべてをRAM上に常時保持するのではなく、ホストからのアクセスに応じて必要な領域のみの対応関係をシステム内のRAM上に逐次作成するので、全領域の対応関係を常時RAM上に保持する場合に比べ、システムとして最低限必要なRAM領域を低減でき、これまで不可能であった汎用CPUの内蔵RAMのみでメモリを制御することが可能となり、外付けRAMを有していた従来のケースに対して大幅なコスト削減が可能となる。   As described above, according to the present embodiment, not all of the correspondence relationship between the logical block and the physical block is always held in the RAM, but the correspondence relationship of only the necessary area according to the access from the host. Since it is created sequentially on the internal RAM, the minimum required RAM area for the system can be reduced compared to the case where the correspondence of all areas is always kept on the RAM, and the built-in RAM of the general-purpose CPU that has been impossible until now Thus, the memory can be controlled only by this, and the cost can be greatly reduced as compared with the conventional case having the external RAM.

次に、本発明の第5の実施例について詳細に説明する。本実施例は、論理番地/物理番地変換テーブルに必要なRAM領域の容量の削減を行ったフラッシュメモリカードについてである。   Next, a fifth embodiment of the present invention will be described in detail. This embodiment relates to a flash memory card in which the capacity of a RAM area required for a logical address / physical address conversion table is reduced.

本実施例では、フラッシュメモリの物理ブロックアドレスを複数の論理的な領域(以下ゾーンと呼ぶ)に分割する。このとき各ゾーンに割り当てられる物理ブロック数、すなわちゾーン毎の容量は均一であっても、不均一であってもかまわない。またゾーンの数は1個であっても複数個であってもかまわない。また偶数個であっても奇数個であってもかまわない。   In this embodiment, the physical block address of the flash memory is divided into a plurality of logical areas (hereinafter referred to as zones). At this time, the number of physical blocks allocated to each zone, that is, the capacity of each zone may be uniform or non-uniform. Further, the number of zones may be one or plural. Further, it may be an even number or an odd number.

図34は、16MビットNAND型フラッシュメモリを2つの均等な容量のゾーンに分割した場合の物理ブロックの構造と論理アドレスと物理アドレスの関係を示した図である。   FIG. 34 is a diagram showing the relationship between the physical block structure, logical addresses, and physical addresses when a 16 Mbit NAND flash memory is divided into two equal capacity zones.

ホストが該フラッシュメモリを制御する場合に、必要となる論理ブロック数は500個と定義され、論理ブロックアドレス0〜499の値をとる。物理ブロックの冗長部には自分がどの論理ブロックに対応するデータを保持しているかを示す論理ブロックアドレス情報が格納されるが、本実施例では、論理ブロックアドレスは、ゾーン毎に0からシリーズに付与される。従って、ゾーン1には論理ブロックアドレス0〜249が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス0〜255の256個の物理ブロックのいずれかに対応する。また物理ブロックの冗長部に格納される論理ブロックアドレスは0〜249のいずれかが格納される。また、ゾーン2には論理ブロックアドレス250〜499が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス256〜511の256個の物理ブロックのいずれかに対応する。また物理ブロックの冗長部に格納される論理ブロックアドレスは0〜249のいずれかが格納される。   When the host controls the flash memory, the required number of logical blocks is defined as 500, and takes values of logical block addresses 0 to 499. In the redundant part of the physical block, logical block address information indicating which logical block is held by itself is stored. In this embodiment, the logical block address is changed from 0 to a series for each zone. Is granted. Accordingly, logical block addresses 0 to 249 are assigned to zone 1, and each logical block corresponds to one of 256 physical blocks of physical block addresses 0 to 255. In addition, the logical block address stored in the redundant portion of the physical block is stored as 0 to 249. In addition, logical block addresses 250 to 499 are assigned to zone 2, and each logical block corresponds to one of 256 physical blocks of physical block addresses 256 to 511. In addition, the logical block address stored in the redundant portion of the physical block is stored as 0 to 249.

データ更新時の追加書き込み方式は、更新対象となる論理ブロックアドレスを含むゾーン内で行われ、ある論理ブロックに対応するデータが存在する物理ブロックは、固定では無く、常に各ゾーン内で移動している。   The additional write method at the time of data update is performed in the zone including the logical block address to be updated, and the physical block where the data corresponding to a certain logical block exists is not fixed and always moves within each zone. Yes.

本実施例では、通常は電源投入時に、ゾーン内の全物理ブロックの冗長部に格納された論理ブロックアドレス情報をサーチし、システムRAM上に論理ブロックと物理ブロックの変換テーブルを作成するが、RAM上に作成するゾーンは、どのゾーンについて行ってもかまわない。通常、該フラッシュメモリがDOS管理下で使用される場合、管理情報であるFATや、ディレクトリー領域等が最初のゾーンに置かれるため、先頭のゾーンについてテーブルを作成すると効率が良い。またRAM上に作成するテーブルは1ゾーンに制限されず、RAM容量が許されるのであれば、複数ゾーン分作成してもかまわない。   In this embodiment, normally, when power is turned on, logical block address information stored in the redundant part of all physical blocks in the zone is searched, and a conversion table of logical blocks and physical blocks is created on the system RAM. The zone created above may be performed for any zone. Normally, when the flash memory is used under DOS management, the FAT, the directory area, etc., which are management information, are placed in the first zone, so it is efficient to create a table for the first zone. Further, the table created on the RAM is not limited to one zone, and a plurality of zones may be created as long as the RAM capacity is allowed.

ホストからアクセス要求に対する変換テーブルの作成過程について以下に説明する。物理ブロックアドレス0〜255を包括する領域を設定し、ゾーン1と呼ぶ。また物理ブロックアドレス256〜511を包括する領域を設定し、ゾーン2と呼ぶことにする。ホストは現在RAM上に作成されている変換テーブルがどのゾーンのものであるかを覚えている。   A process of creating a conversion table for an access request from the host will be described below. An area including physical block addresses 0 to 255 is set and is called zone 1. An area including the physical block addresses 256 to 511 is set and is called zone 2. The host remembers which zone the conversion table currently created on the RAM belongs to.

RAM上にゾーン1の変換テーブルが作成されており、論理ブロックアドレス128に対するアクセス要求が来た場合の手順を以下に説明する。(1)論理ブロックアドレス128−250×(n-1 )<250となるようなnを求めるとn=1である事から、ゾーン1の変換テーブルが必要であることが分かる。(2)RAM上にある変換テーブルがゾーン1である為、テーブルの作成は行わない。(3)変換テーブル上のアドレスは0〜249の値をとるため、ホストが要求した論理ブロックアドレス128から、変換テーブル上の参照すべきアドレスを求める。128−250×(1-1 )=128より、変換テーブル上のアドレス128に対応する物理ブロックアドレスに対しアクセスすればよい。(4)書き換えが発生した場合は変換テーブルを更新し、次のアクセスに備える。   A procedure when a conversion table for zone 1 is created on the RAM and an access request for the logical block address 128 is received will be described below. (1) When n is obtained such that the logical block address 128-250 × (n−1) <250, it is found that a conversion table for zone 1 is necessary because n = 1. (2) Since the conversion table on the RAM is zone 1, no table is created. (3) Since the address on the conversion table takes a value from 0 to 249, the address to be referred to on the conversion table is obtained from the logical block address 128 requested by the host. From 128−250 × (1-1) = 128, the physical block address corresponding to the address 128 on the conversion table may be accessed. (4) When rewriting occurs, the conversion table is updated to prepare for the next access.

次に、RAM上にゾーン1の変換テーブルが作成されており、論理ブロックアドレス324に対するアクセス要求がきた場合の手順を以下に説明する。(1)論理ブロックアドレス324−250×(n−1)<250となるようなnを求めるとn=2である事から、ゾーン2の変換テーブルが必要であることが分かる。(2)RAM上にある変換テーブルがゾーン1である為、ゾーン2に包括された物理ブロックアドレス256〜511の冗長部の論理ブロックアドレス情報をサーチし、RAM上にゾーン2の変換テーブルの作成を行う。(3)変換テーブル上のアドレスは0〜249の値をとるため、ホストが要求した論理ブロックアドレス324から、変換テーブル上の参照すべきアドレスを求める。324−250×(2−1)=74より、変換テーブル上のアドレス74に対応する物理ブロックアドレスに対しアクセスすればよい。(4)書き換えが発生した場合は変換テーブルを更新し、次のアクセスに備える。以上のように、アクセスする論理ブロックに応じて、変換テーブルを作成することで、従来より、RAM領域を容易に小さくすることが可能である。システムRAM上にゾーン2のテーブルが作成されている場合も、同様の過程で容易に目的のアドレスにアクセスすることができる。   Next, a procedure when a conversion table for zone 1 is created on the RAM and an access request for the logical block address 324 is received will be described below. (1) When n is obtained such that logical block address 324-250 × (n−1) <250, it is found that a conversion table for zone 2 is necessary because n = 2. (2) Since the conversion table on the RAM is zone 1, the logical block address information of the redundant part of physical block addresses 256 to 511 included in zone 2 is searched, and the conversion table for zone 2 is created on the RAM. I do. (3) Since the address on the conversion table takes a value from 0 to 249, the address to be referred to on the conversion table is obtained from the logical block address 324 requested by the host. From 324-250 × (2-1) = 74, the physical block address corresponding to the address 74 on the conversion table may be accessed. (4) When rewriting occurs, the conversion table is updated to prepare for the next access. As described above, by creating a conversion table according to a logical block to be accessed, it is possible to easily reduce the RAM area as compared with the conventional case. Even when the zone 2 table is created on the system RAM, the target address can be easily accessed in the same process.

論理番地/物理番地変換テーブルを作成するときに、RAM上に論理ブロックと物理ブロックの変換テーブルを作成するが、このとき、作成するゾーンNO.が分かっているため、変換テーブル上の物理ブロックアドレスは0〜255の値を取ればよい。実際に物理ブロックにアクセスするときは、OFFSETとして、変換テーブル上の物理アドレスに256×ゾーンNO.を加える事で、容易にフラッシュメモリに入力すべき新の物理ブロックアドレスを得る事ができる。   When creating a logical address / physical address conversion table, a logical block / physical block conversion table is created on the RAM. Therefore, the physical block address on the conversion table may take a value from 0 to 255. When actually accessing the physical block, the physical address on the conversion table is set to 256 × zone No. as OFFSET. By adding, it is possible to easily obtain a new physical block address to be input to the flash memory.

16MビットNAND型フラッシュメモリを用いた場合、従来制御方法では、物理ブロックアドレスを表すために9ビット必要であり、ソフトの利便性からは、2バイトを費やしていた。本実施例では、図35に示すように、物理ブロックアドレスを表すには8ビットあればよく、1バイトで済む。したがって、従来1Kバイト必要であったRAM容量は半分に節約できる。論理ブロックアドレスが増加すると、当然、論理番地/物理番地変換テーブルの容量はそれにともなって増加するため、本実施例の効果はフラッシュメモリの容量が大きくなるほど、大きく貢献する。   When a 16 Mbit NAND flash memory is used, the conventional control method requires 9 bits to represent a physical block address, and 2 bytes are consumed for the convenience of software. In this embodiment, as shown in FIG. 35, 8 bits are sufficient to represent the physical block address, and 1 byte is sufficient. Therefore, the RAM capacity that conventionally required 1 Kbyte can be saved in half. As the logical block address increases, the capacity of the logical address / physical address conversion table naturally increases accordingly. Therefore, the effect of this embodiment greatly contributes as the capacity of the flash memory increases.

また、本実施例によれば、図11に示した物理ブロックの冗長部のBlockAddress Areaに格納可能なブロックアドレスで、大容量のフラッシュメモリシステムを制御可能とする。すなわち、1つのゾーンを上記冗長部のBlock Address Areaに格納可能なブロックアドレス値の物理ブロックで構成されるように分割すれば、大容量の論理アドレスに対応可能となる。   In addition, according to the present embodiment, a large-capacity flash memory system can be controlled with a block address that can be stored in the Block Address Area of the redundant portion of the physical block shown in FIG. That is, if one zone is divided into physical blocks having block address values that can be stored in the block address area of the redundant portion, a large-capacity logical address can be handled.

図36は、16MビットNAND型フラッシュメモリを4つの均等な容量のゾーンに分割した場合の物理ブロックの構造を示した図である。   FIG. 36 is a diagram showing the structure of a physical block when a 16 Mbit NAND flash memory is divided into four equal capacity zones.

ホストが該フラッシュメモリを制御する場合に、必要となる論理ブロック数は500個と定義され、論理ブロックアドレス0〜499の値をとる。物理ブロックの冗長部には自分がどの論理ブロックに対応するデータを保持しているかを示す論理ブロックアドレス情報が格納されるが、本実施例では、論理ブロックアドレスは、ゾーン毎に0からシリーズに付与される。これらの論理ブロックアドレスに対応する物理ブロックアドレスは下記のようになる。ゾーン1には論理ブロックアドレス0〜124が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス0〜127の128個の物理ブロックのいずれかに対応する。ゾーン2には論理ブロックアドレス125〜249が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス128〜255の128個の物理ブロックのいずれかに対応する。ゾーン3には論理ブロックアドレス126〜374が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス256〜383の128個の物理ブロックのいずれかに対応する。ゾーン4には論理ブロックアドレス384〜499が割り当てられ、それぞれの論理ブロックは物理ブロックアドレス384〜511の128個の物理ブロックのいずれかに対応する。   When the host controls the flash memory, the required number of logical blocks is defined as 500, and takes values of logical block addresses 0 to 499. In the redundant part of the physical block, logical block address information indicating which logical block is held by itself is stored. In this embodiment, the logical block address is changed from 0 to a series for each zone. Is granted. The physical block addresses corresponding to these logical block addresses are as follows. Zone 1 is assigned logical block addresses 0 to 124, and each logical block corresponds to one of 128 physical blocks of physical block addresses 0 to 127. Zone 2 is assigned logical block addresses 125 to 249, and each logical block corresponds to one of 128 physical blocks of physical block addresses 128 to 255. Zone 3 is assigned logical block addresses 126 to 374, and each logical block corresponds to one of 128 physical blocks of physical block addresses 256 to 383. Zone 4 is assigned logical block addresses 384 to 499, and each logical block corresponds to one of 128 physical blocks of physical block addresses 384 to 511.

データ更新時の追加書き込み方式は、書き込み要求の発生した論理ブロックが存在するゾーン内のみで行われ、ある論理ブロックアドレスに対応するデータが格納された物理ブロックアドレスは、固定では無く、常にゾーン内で移動している。それぞれの物理ブロックの冗長部には自分がどの論理ブロックアドレスのデータを保持しているかを示す論理ブロックアドレス情報を格納している。   The additional write method at the time of data update is performed only in the zone where the logical block where the write request has occurred, and the physical block address where the data corresponding to a certain logical block address is stored is not fixed and is always in the zone Is moving in. Each redundant block of each physical block stores logical block address information indicating which logical block address data is held by itself.

上述のように、各ゾーンには125個の論理ブロックが割り当てられ、また128個の物理ブロックが割り当てられる。以上のように物理ブロックを4つのゾーンに分割した場合も、2つのゾーンに分割した時同様の効果を有する。   As described above, 125 logical blocks are assigned to each zone, and 128 physical blocks are assigned. As described above, when the physical block is divided into four zones, the same effect is obtained when the physical block is divided into two zones.

次に、本実施例のリダンダンシー動作について、上記物理ブロック4つのゾーンに分割した場合を例に説明する。   Next, the redundancy operation of this embodiment will be described by taking as an example the case where the physical block is divided into four zones.

本実施例の説明に先立って、ゾーン分割を行わない従来のフラッシュメモリのリダンダンシー動作について、16MビットNAND型フラッシュメモリを例に説明する。図2に示すように、16MビットのNAND型フラッシュメモリは512個の物理ブロックを有するが、図3に示すように、ホストから見た論理ブロックは500個に規定される。またPCカードATAインターフェースを容易に構築するための情報を格納するために1ブロック、追加書き込み方式を採用しているために1ブロック必要となる。従って本フラッシュメモリを制御する場合502個のブロックが必要となる。従って16MビットのNAND型フラッシュメモリでは10個までの不良ブロックの存在は許される。   Prior to the description of the present embodiment, the redundancy operation of a conventional flash memory that does not perform zone division will be described using a 16 Mbit NAND flash memory as an example. As shown in FIG. 2, the 16 Mbit NAND flash memory has 512 physical blocks, but as shown in FIG. 3, the number of logical blocks as viewed from the host is defined as 500. In addition, one block is required to store information for easily constructing the PC card ATA interface, and one block is required because the additional writing method is employed. Therefore, 502 blocks are required to control this flash memory. Therefore, the presence of up to 10 defective blocks is allowed in a 16 Mbit NAND flash memory.

しかし、フラッシュメモリには書き換え回数の上限が存在し、使用中に不良ブロックが発生することがあり、十分な記憶領域を確保するために、不良ブロックが発生した場合の、置換先として、書き込み、消去可能な有効ブロックを持っておく必要がある。また、10個以上の不良ブロックを有するフラッシュメモリについては、出荷時の容量が十分に無いことから出荷できず、製品歩留まりを下げるという問題も発生する。   However, there is an upper limit on the number of rewrites in the flash memory, and a bad block may occur during use.In order to secure a sufficient storage area, if a bad block occurs, write, It is necessary to have a valid block that can be erased. Further, a flash memory having 10 or more defective blocks cannot be shipped because there is not enough capacity at the time of shipment, and there is a problem that the product yield is lowered.

このため、有効ブロック数を多く確保し、使用中の不良ブロックの発生に備えると共に、出荷時の製品歩留まりを向上させるために、16MビットNAND型フラッシュメモリには、512個の本体ブロックの他に複数の冗長ブロックが設けられている。この冗長ブロックは出荷前に、冗長回路により、512個の本体ブロック中に発生している不良ブロックと、ハード的に置き換えられる。冗長回路を使用すると、冗長ブロックは、不良ブロックのアドレスに割り付けられる。ハード的な置き換え後は、不良ブロックが存在したアドレスを選択すると、置き換えられた冗長ブロックが選択されるようになる。ここで、冗長ブロックは無限にあるわけではないため、出荷時に、置き換えきれなかった不良ブロックは、先天性不良ブロックとして扱われる。また、ユーザーの使用中に発生した不良ブロックは、後天性不良ブロックとして扱われる。この先天性不良ブロックと後天性不良ブロックは上記有効ブロックによって救済される。   For this reason, in order to secure a large number of effective blocks, to prepare for the occurrence of defective blocks in use, and to improve the product yield at the time of shipment, the 16 Mbit NAND flash memory has 512 body blocks in addition to 512 main body blocks. A plurality of redundant blocks are provided. Prior to shipment, the redundant block is replaced by a redundant circuit in hardware with a defective block generated in 512 main body blocks. When the redundant circuit is used, the redundant block is assigned to the address of the defective block. After the hardware replacement, when the address where the defective block exists is selected, the replaced redundant block is selected. Here, since the redundant blocks are not infinite, a defective block that cannot be replaced at the time of shipment is treated as a congenital defective block. In addition, a defective block generated during use by the user is treated as an acquired defective block. The congenital defective block and the acquired defective block are relieved by the effective block.

通常、本体ブロックと冗長ブロックとの置き換えを行う場合、冗長回路を使用し、ハード的に置き換えが行われるが、図37に示したように、置き換え作業の利便性から、ブロックアドレスの小さい不良ブロックから順に連続的に、あるいは、ブロックアドレスの大きい不良ブロックから順に連続的に置き換えが行われる。従って、ブロックの置き換え後は、ブロックアドレスの小さい方から、あるいはブロックアドレスの大きい方から連続的に書き込み、消去可能なブロックが存在している。   Normally, when replacing a main body block with a redundant block, a redundant circuit is used and replaced with hardware. However, as shown in FIG. 37, a defective block with a small block address is used for convenience of replacement. Are sequentially replaced in order from the beginning or from the defective block having the largest block address. Therefore, after block replacement, there are blocks that can be written and erased continuously from the smaller block address or the larger block address.

このように、従来のフラッシュメモリの制御方法では、上述したように512個の物理ブロックに対し、論理ブロックが500個、PCカードATAインターフェースを容易に構築するための情報を格納するために1ブロック、追加書き込み方式を採用しているために空き領域として1ブロック必要であったため、都合、502個の書き換え可能なブロックがあれば制御可能であった。従って、従来の制御方法では、512個の物理ブロックに対し、10個の不良ブロックが許されていた。   Thus, in the conventional flash memory control method, as described above, for 512 physical blocks, 500 logical blocks and 1 block for storing information for easily constructing a PC card ATA interface are stored. Since the additional writing method is employed, one block is required as a free area. For convenience, it is possible to control if there are 502 rewritable blocks. Therefore, in the conventional control method, 10 defective blocks are allowed for 512 physical blocks.

次に、本実施例のリダンダンシー動作について説明する。ゾーン1について考えると、PCカードATAインターフェースを容易に構築するための情報を格納するために1ブロック、追加書き込み方式を採用しているために空き領域として1ブロック必要となる。従って、125個の論理ブロックに対し、127個の書き換え可能な物理ブロックが必要となり、ゾーン内で許される、書き換え不可能な不良ブロックは1個までとなる。ゾーン2〜4については追加書き込み用の空きブロックとして、1ブロック余分に必要であることから、126個の書き換え可能な物理ブロックが必要となり、ゾーン内で許される、書き換え不可能な不良ブロックは2個までとなる。以下、説明を容易にするため、1〜4ゾーンに対し、許される不良ブロック数はそれぞれ1個とする。従って、従来制御方法で許容された不良ブロック数のスペックに対し、非常に厳しくなる。   Next, the redundancy operation of this embodiment will be described. Considering zone 1, one block is required to store information for easily constructing the PC card ATA interface, and one block is required as an empty area because the additional writing method is employed. Therefore, 127 rewritable physical blocks are required for 125 logical blocks, and only one non-rewritable bad block is permitted in the zone. For zones 2 to 4, one extra block is required as a free block for additional writing, so 126 rewritable physical blocks are required, and there are 2 non-rewritable bad blocks allowed in the zone. It becomes up to pieces. Hereinafter, for ease of explanation, it is assumed that the number of allowed bad blocks is one for each of the first to fourth zones. Therefore, the specification of the number of defective blocks allowed by the conventional control method becomes very strict.

図36に示す16MビットNAND型フラッシュメモリにおいて、例えば、ブロックアドレス2,5,129,131,132,385,389の7ブロックが不良ブロックであり、このフラッシュメモリは4個の冗長ブロックを有しているとする。図36に示すように、冗長回路を使用し、従来のようにブロックアドレスの小さい不良ブロックから順に、冗長ブロックと置き換えた場合、置き換え後の不良ブロックは物理ブロックアドレス132、385、389の3個のブロックとなり、これらは先天性ブロックとし、該ブロックの冗長部に先天性不良ブロックのマークがつけられる。ここで従来の制御方法では、先天性不良ブロックは10個まで許されたため、該フラッシュメモリを制御する上で特に問題はない。しかしゾーンに分割して制御することを前提とした場合、ゾーン4には物理ブロックアドレス385、389の2個の不良ブロックが存在するため制御を行えず、この製品は出荷できなくなる。   In the 16 Mbit NAND flash memory shown in FIG. 36, for example, 7 blocks of block addresses 2, 5, 129, 131, 132, 385, and 389 are defective blocks, and this flash memory has four redundant blocks. Suppose that As shown in FIG. 36, when a redundant circuit is used and replaced with a redundant block in order from a defective block having a smaller block address as in the prior art, the replaced defective blocks are three physical block addresses 132, 385, and 389. These blocks are congenital blocks, and the redundant portion of the block is marked with a congenital defective block. Here, in the conventional control method, since up to 10 congenital defective blocks are allowed, there is no particular problem in controlling the flash memory. However, if it is assumed that the control is divided into zones, since there are two defective blocks with physical block addresses 385 and 389 in zone 4, control cannot be performed and this product cannot be shipped.

このように、本実施例のフラッシュメモリにおいて、不良ブロックがあった場合、本体の不良ブロックと冗長ブロックとの置き換えを、従来のフラッシュメモリ同様、単に置き換え作業の利便性から、ブロックアドレスの小さい不良ブロックから順に連続的に、あるいは、ブロックアドレスの大きい不良ブロックから順に連続的に置き換えを行うと、必要な良ブロックが確保できず、使用できないゾーンが発生する可能性が高くなる。   As described above, in the flash memory according to the present embodiment, when there is a defective block, the replacement of the defective block and the redundant block of the main body is simply a defect with a small block address just like the conventional flash memory for the convenience of replacement work. If replacement is performed sequentially from the block or sequentially from the defective block having the largest block address, the necessary good blocks cannot be secured, and there is a high possibility that unusable zones will occur.

このため、本実施例では、フラッシュメモリがゾーンに分割され制御される場合、全てのゾーンが有効ブロック数を満たすよう、各ゾーンに存在する不良ブロックと冗長ブロックとの置き換えを行う。   For this reason, in the present embodiment, when the flash memory is divided into zones and controlled, defective blocks and redundant blocks existing in each zone are replaced so that all zones satisfy the number of valid blocks.

図38は、ゾーン毎に存在する不良ブロックが、各ゾーンで許される不良ブロック数を越えないように、冗長ブロックとの置き換えを行った場合の物理ブロックの状態を示す図である。図38のフラッシュメモリも、図36に示したもの同様、ブロックアドレス2,5,129,131,132,385,389の7ブロックが不良ブロックと、4個の冗長ブロックを有している。従来の置き換え方法では出荷できなかったものが、良品として出荷できることが分かる。置き換え手順の一例を以下に説明する。   FIG. 38 is a diagram showing the state of physical blocks when replacement with redundant blocks is performed so that the number of defective blocks existing in each zone does not exceed the number of defective blocks allowed in each zone. Similarly to the flash memory shown in FIG. 36, the flash memory of FIG. 38 has 7 blocks of block addresses 2, 5, 129, 131, 132, 385, and 389 having defective blocks and 4 redundant blocks. It turns out that what could not be shipped by the conventional replacement method can be shipped as a non-defective product. An example of the replacement procedure will be described below.

(1)ゾーン1〜ゾーン4までをサーチし、以下の変数の値を求める。・不良物理ブロックアドレスの抽出を行う。Z(n) BA(m) (n=1〜4 、m=1 〜それぞれのゾーン内の不良ブロック数)・ゾーン毎の不良ブロック数を求める。Z(n) BN (n=1 〜4 )(2)Z(n) BNの n=1〜4 のうち、1つでも冗長ブロックを全て使用しても、有効ブロック数を満たせないものがあれば、置換を行わず作業を終了する。(3)Z(n) BAのn=1 〜4 のうち、最も値の大きなnを抽出する。(4)(3)で抽出されたnについてZ(n) BA(m) (m=1〜ゾーン内の不良ブロック数)の内、ブロックアドレス情報が格納されている最も小さいか、大きいmについてZ(n) BA(m) に格納された物理ブロックアドレスに該当するブロックを冗長ブロックと置き換える。(5)Z(n) BN=Z(n) BN−1(6)(3)で選択されたmについてZ(n) BA(m) のブロックアドレス情報を削除する。(7)(3)〜(6)を繰り返す。冗長ブロックを使いきれば、(9)の処理へ移る。(8)Z(n) BN (n=1 〜4 )が等しければ最も小さいか、最も大きいnのゾーンについて(3)〜(7)を繰り返す。(9)Z(n) BN (n=1 〜4 )をチェックし、スペックを越えるnが存在すれば、不良品とする。(10)終了
当然、本体ブロックと冗長ブロックとの置き換え手順は種々考えられる。本実施例では4つのゾーンに分割された場合を例に説明したが、ゾーンが、2つあるいは、奇数に分割されるケースも考えられる。また分割されたゾーンの容量(ブロック数)が異なる場合も考えられる。いずれの場合においても、本実施例は、本体ブロックと冗長ブロックを置き換える場合、置き換え作業後の各ゾーンに存在する不良ブロックの個数が、それぞれのゾーンで許される不良ブロック数を越えないよう、それぞれのゾーンに存在する不良ブロック数を監視しながら、冗長ブロックとの置き換えを行うところであり、本実施例の趣旨を逸脱しない範囲で、置き換えの手順は異なってもかまわない。
(1) Search from zone 1 to zone 4 to obtain the values of the following variables. -Extract bad physical block addresses. Z (n) BA (m) (n = 1 to 4, m = 1 to the number of defective blocks in each zone) and the number of defective blocks for each zone are obtained. Z (n) BN (n = 1 to 4) (2) Among Z (n) BN n = 1 to 4, even if one or all redundant blocks are used, there are cases where the number of effective blocks cannot be satisfied. For example, the work is finished without performing replacement. (3) Extract n with the largest value from n = 1 to 4 of Z (n) BA. (4) For n extracted in (3), for the smallest or largest m in which block address information is stored in Z (n) BA (m) (m = 1 to the number of defective blocks in the zone) The block corresponding to the physical block address stored in Z (n) BA (m) is replaced with a redundant block. (5) Z (n) BN = Z (n) BN-1 (6) The block address information of Z (n) BA (m) is deleted for m selected in (3). (7) Repeat (3) to (6). If the redundant block is used up, the process proceeds to (9). (8) If Z (n) BN (n = 1 to 4) is equal, steps (3) to (7) are repeated for the smallest or largest zone of n. (9) Z (n) BN (n = 1 to 4) is checked, and if n exceeds the specification, it is regarded as a defective product. (10) End
Naturally, various procedures for replacing the main body block and the redundant block are conceivable. In the present embodiment, the case where it is divided into four zones has been described as an example. However, there may be a case where the zone is divided into two or odd numbers. In addition, the divided zones may have different capacities (number of blocks). In any case, in this embodiment, when replacing the main body block and the redundant block, the number of defective blocks existing in each zone after the replacement work is not to exceed the number of defective blocks allowed in each zone. While replacing the redundant block while monitoring the number of defective blocks existing in this zone, the replacement procedure may be different without departing from the spirit of the present embodiment.

以上に述べたように実施例によれば、論理ブロックとフラッシュメモリの物理ブロックが1対1で対応づけられているテーブルを使用する場合に比べ、アクセス対象となるゾーン単位でテーブルを作成するため、テーブルに必要とするRAM領域を低減することが可能で、これまで不可能であった汎用CPUの内蔵RAMのみでメモリを制御することが可能となり、外付けRAMを有していた従来のケースに対して大幅なコスト削減が可能となり、特に物理ブロック数の多い不揮発性半導体メモリの制御に効果が大きい。また、物理ブロックの冗長部のBlock Address Areaで決められたビット数で、大容量の論理アドレスに対応できる。   As described above, according to the embodiment, a table is created for each zone to be accessed as compared with the case where a table in which a logical block and a physical block of a flash memory are associated one-to-one. The RAM area required for the table can be reduced, and the memory can be controlled only by the built-in RAM of the general-purpose CPU, which has been impossible until now. In contrast, the cost can be greatly reduced, and it is particularly effective in controlling a nonvolatile semiconductor memory having a large number of physical blocks. In addition, the number of bits determined by the block address area of the redundant portion of the physical block can be used for a large-capacity logical address.

また、本実施例によれば、複数の物理ブロックを論理的な複数のゾーンに割り振り、ゾーン毎に論理ブロックと物理ブロックの変換テーブルを作成し、メモリアクセスを行う制御方法を行うシステムに使用されるフラッシュメモリにおいて、本体の不良ブロックと冗長ブロックとを置き換える場合、従来アドレスの小さい(大きい)方から連続的に置き換えていたのに対し、本発明では、置き換え後の各ゾーンに存在する不良ブロックの個数が、それぞれのゾーンで許される不良ブロック数を越えないよう、それぞれのゾーンに存在する不良ブロック数を監視しながら、置き換えを行うため、使用不可能なゾーンを有するために出荷できなくなる製品が減り、製品歩留りが向上する。   Further, according to this embodiment, a plurality of physical blocks are allocated to a plurality of logical zones, a conversion table of logical blocks and physical blocks is created for each zone, and the system is used for a control method for performing memory access. In a flash memory, when replacing a defective block and a redundant block of a main body, a conventional block is continuously replaced from a smaller (larger) address, whereas in the present invention, a defective block exists in each replaced zone. Products that cannot be shipped because there are unusable zones for replacement while monitoring the number of bad blocks in each zone so that the number of blocks does not exceed the number of bad blocks allowed in each zone And product yield is improved.

次に、本発明の第6の実施例について詳細に説明する。本実施例は、2値/多値等のいずれのタイプにもサポート可能なフラッシュメモリカードについてである。   Next, a sixth embodiment of the present invention will be described in detail. The present embodiment relates to a flash memory card that can support any type such as binary / multilevel.

図39は本実施例をPCカードアダプターに適応した図である。フラッシュメモリカード101Aは図17に示される2値対応のものであり、フラッシュメモリカード101Bは図18に示される4値対応のものである。PCカードアダプター102は、フラッシュメモリカード101Aおよび101Bのデータをパソコンに転送するためのものである。PCカードアダプター102は、PCカードスロット用の68ピンのコネクタおよびフラッシュメモリカード用のコネクタを具備している。内部にはフラッシュメモリカードの制御およびPCカードスロットとの電気的なインターフェースを取るためのコントローラ103および、コントローラ内部のCPU用の発振子104、バッファ用のRAM105等がある。コントローラ103中には、本発明に直接的に関係する2種類のエラー訂正用の回路、ECC回路1およびECC回路2がある。   FIG. 39 is a diagram in which this embodiment is applied to a PC card adapter. The flash memory card 101A corresponds to the binary shown in FIG. 17, and the flash memory card 101B corresponds to the four-value shown in FIG. The PC card adapter 102 is for transferring the data of the flash memory cards 101A and 101B to the personal computer. The PC card adapter 102 includes a 68-pin connector for a PC card slot and a connector for a flash memory card. Inside, there are a controller 103 for controlling the flash memory card and taking an electrical interface with the PC card slot, an oscillator 104 for CPU in the controller, a RAM 105 for buffer, and the like. In the controller 103, there are two types of error correction circuits, ECC circuit 1 and ECC circuit 2, which are directly related to the present invention.

図40に電源投入時の制御例を示す。(ステップS1) 電源電圧検知本メモリカードには、5V電源電圧と、3.3V電源電圧の製品があるが、3.3V電源電圧動作のメモリカードに5Vの電源が印加されると、電圧破壊等の問題が発生する可能性がある。これを回避するため、システムは電源電圧を検知している。(ステップS2、3)IDチェックフラッシュメモリカードには記憶容量またはインターフェース仕様の異なる複数種類の物がある。システムにメモリカードが挿入された時には、デバイスのメーカーコードおよびデバイスコード等を判別し、想定外のコードの場合は新たなアクセスはしないようにする。またメーカーコード、デバイスコード等の読み出しには正規の電源電圧を投入する。(ステップS4〜8)ECCのチェックここではECCの方式についてのチェックを行う。   FIG. 40 shows an example of control when the power is turned on. (Step S1) Power supply voltage detection There are 5V power supply voltage and 3.3V power supply voltage products in this memory card, but if a 5V power supply is applied to a memory card operating at 3.3V power supply voltage, the voltage will be destroyed. Such a problem may occur. In order to avoid this, the system detects the power supply voltage. (Steps S2, 3) There are a plurality of types of ID check flash memory cards having different storage capacities or interface specifications. When a memory card is inserted into the system, the device manufacturer code, device code, etc. are discriminated, and new access is not made in the case of an unexpected code. In addition, a normal power supply voltage is input to read out the manufacturer code, device code, and the like. (Steps S4 to S8) Checking ECC Here, a check on the ECC method is performed.

以下に、ECC方式を認識させる方法の一例を示す。第1の方法は、上記ステップS2、3と同様にデバイスコードにより判別する方法がある。例えば、同じ容量のフラッシュメモリであっても、メモリ構成によってデバイスコードを変えれば良い。   An example of a method for recognizing the ECC method is shown below. As a first method, there is a method of discriminating by a device code as in steps S2 and S3. For example, even if the flash memory has the same capacity, the device code may be changed depending on the memory configuration.

図41は、本実施例の16Mビットフラッシュメモリのデータ部と冗長部の構成を示した図である。図4に示す従来のものと異なる点は、冗長部のUsreData AreaがECC Flag AreaとECC Area−3とに割り当てられている点である。図41に示すようにECCの符号を格納する領域としてECC Area−1から3までの3個の領域を定義している。上記3個の領域の使用方法を図42を用いて説明する。ここでは、ECC Flag Areaバイト中にECCの方式に関する情報を記憶させておく。例えば、ECC方式1の場合Flagデータとしては“AAh”、ECC方式2の場合は“55h”と定義しておく。   FIG. 41 is a diagram showing the configuration of the data portion and the redundant portion of the 16M bit flash memory of this embodiment. The difference from the conventional one shown in FIG. 4 is that the redundant data area is assigned to ECC Flag Area and ECC Area-3. As shown in FIG. 41, three areas from ECC Area-1 to 3 are defined as areas for storing ECC codes. A method of using the three areas will be described with reference to FIG. Here, information related to the ECC system is stored in the ECC Flag Area byte. For example, the flag data is defined as “AAh” in the case of the ECC system 1, and “55h” in the case of the ECC system 2.

ECC方式1に基づく、フラッシュメモリカードの場合、ECC Area−1には、偶数ページデータ(256バイト)の3バイトECCコードが、ECC Area−2は、奇数ページデータ(256バイト)の3バイトECCコードが入り、ECC Area−3は空白である。ECC Area−1および2は各々256バイトのデータの内、2ビットのエラーを訂正できる。   In the case of a flash memory card based on the ECC method 1, the ECC Area-1 has a 3-byte ECC code of even-numbered page data (256 bytes), and the ECC Area-2 has a 3-byte ECC of odd-numbered page data (256 bytes). A code is entered and ECC Area-3 is blank. Each of ECC Areas 1 and 2 can correct a 2-bit error in 256-byte data.

ECC方式2に基づく、フラッシュメモリカードの場合、ECC Area−1、ECC Area−2、ECC Area−3に512バイトに対するECC符号が分散して記憶される。この場合512バイトのデータの内、2ビットのエラーを訂正できる。   In the case of a flash memory card based on the ECC system 2, ECC codes for 512 bytes are distributed and stored in ECC Area-1, ECC Area-2, and ECC Area-3. In this case, a 2-bit error in 512-byte data can be corrected.

図39のPCカードアダプター102内のコントローラ103はフラッシュメモリカードがアダプターに挿入されるとECC Flag Areaを読み出し、ECC方式を判別する。   When the flash memory card is inserted into the adapter, the controller 103 in the PC card adapter 102 in FIG. 39 reads the ECC Flag Area and determines the ECC method.

図39中では、ECC方式1およびECC方式2それぞれに対応した符号生成、およびエラー検出回路が選択される。コントローラ中のCPUはホストとバッファ用RAMとフラッシュメモリ間のデータの流れを制御する。また図39中のECC回路は、必ずしもハードウェアである必要性はない、ECC符号の生成等すべてをソフトウェアで実行することも勿論可能である。   In FIG. 39, code generation and error detection circuits corresponding to the ECC system 1 and the ECC system 2 are selected. The CPU in the controller controls the flow of data among the host, buffer RAM, and flash memory. Further, the ECC circuit in FIG. 39 is not necessarily hardware, and it is of course possible to execute all of the generation of the ECC code by software.

また本発明は上記実施例に限られない。発明の主旨を逸脱しない範囲で種々変更可能である。   The present invention is not limited to the above embodiment. Various modifications can be made without departing from the spirit of the invention.

上記実施例では、2種類のECC方式の存在を仮定したが、方式は2種類には限られない。3種類以上のECC方式を設定可能である。   In the above embodiment, it is assumed that there are two types of ECC systems, but the system is not limited to two types. Three or more ECC systems can be set.

また、ECC方式の選択には、ECCを使用しないという選択も含まれる。信頼性の非常に高いフラッシュメモリカードや、音声分野等のデーダで特に高い信頼性を必要としない分野等ではECCは必須ではない。その場合、上記ECCFlag Areaの内容が“FFh”であればECCを使用していないと定義しても良い。   Further, the selection of the ECC method includes a selection of not using the ECC. ECC is not indispensable in highly reliable flash memory cards and fields that do not require particularly high reliability in data such as voice fields. In that case, if the content of the ECCFlag Area is “FFh”, it may be defined that ECC is not used.

また上記実施例では、フラッシュメモリ毎にECCの方式を定義していたが、本発明はそれにかぎられない。例えば、セクタ単位、もしくはブロック単位等、任意の単位でECCの方式を切り替えてもよい。この場合、単純に電源投入時にECCの方式を判別するのではなく前述の所定単位にアクセスする都度ECCの方式を切り替えてもよい。また例えば、ECCの方式1で読み出されたデータを方式2に変換して再格納するような動作も想定可能である。   In the above embodiment, the ECC system is defined for each flash memory, but the present invention is not limited to this. For example, the ECC method may be switched in an arbitrary unit such as a sector unit or a block unit. In this case, instead of simply determining the ECC method when the power is turned on, the ECC method may be switched every time the predetermined unit is accessed. Further, for example, it is possible to assume an operation in which data read by the ECC method 1 is converted into the method 2 and stored again.

また上記実施例では、PCカードアダプターを例に説明したが、本実施例はPCカードアダプターに限られない。例えば、デジタルスチルカメラやPDA、ワードプロセッサー、音声録音機等各種機器に対しても同様に議論可能である。このように本実施例を使用すれば、非常に広い使用範囲のフラッシュメモリカードを1つのシステムで使用可能となる。   In the above embodiment, the PC card adapter is described as an example. However, the present embodiment is not limited to the PC card adapter. For example, the same discussion can be made for various devices such as a digital still camera, a PDA, a word processor, and a voice recorder. As described above, when this embodiment is used, a flash memory card having a very wide usage range can be used in one system.

以上に述べたように、本実施例によれば、エラー訂正アルゴリズムの異なる複数のフラッシュメモリカードを一つのシステムが取り扱い可能となるので、飛躍的に汎用性が向上する。   As described above, according to the present embodiment, a single system can handle a plurality of flash memory cards having different error correction algorithms, so that versatility is dramatically improved.

メモリカード外観図である。It is a memory card external view. フラッシュメモリの物理ブロック構成を示す図である。It is a figure which shows the physical block structure of flash memory. パソコンにおけるデータを示す図である。It is a figure which shows the data in a personal computer. フラッシュメモリのデータ格納方法を示す図である。It is a figure which shows the data storage method of flash memory. フラッシュメモリの物理ブロック構成を示す図である。It is a figure which shows the physical block structure of flash memory. フラッシュメモリの物理ブロック構成を示す図である。It is a figure which shows the physical block structure of flash memory. フラッシュメモリのデータ格納方法を示す図である。It is a figure which shows the data storage method of flash memory. 従来例の論理・物理ブロック変換テーブルを示す図である。It is a figure which shows the logical / physical block conversion table of a prior art example. 従来のメモリシステムにおける論理アドレスと物理アドレスの変換テーブル構成を示す図である。It is a figure which shows the conversion table structure of the logical address and physical address in the conventional memory system. 64MビットNAND型フラッシュメモリシステムにおける論理アドレスと物理アドレスの変換テーブル構成を示す図である。It is a figure which shows the conversion table structure of a logical address and a physical address in a 64M bit NAND type flash memory system. フラッシュメモリのブロックアドレスのデータ配置を示す図である。It is a figure which shows the data arrangement | positioning of the block address of flash memory. 従来のDOSフォーマットのパラメータを示す図である。It is a figure which shows the parameter of the conventional DOS format. 従来の書き替えシーケンスを示す図である。It is a figure which shows the conventional rewriting sequence. 従来の書き替えシーケンスを示す図である。It is a figure which shows the conventional rewriting sequence. 従来の書き替えシーケンスを示す図である。It is a figure which shows the conventional rewriting sequence. 従来の消去コマンド実行時の管理領域とデータ領域の関係を示した図である。FIG. 10 is a diagram showing a relationship between a management area and a data area when executing a conventional erase command. フラッシュメモリの格納データ例を示す図である。It is a figure which shows the example of data stored in flash memory. フラッシュメモリの格納データ例を示す図である。It is a figure which shows the example of data stored in flash memory. 従来のシステムを示す図である。It is a figure which shows the conventional system. 本発明のメモリシステムにおけるECCデータ構成を示す図である。It is a figure which shows the ECC data structure in the memory system of this invention. 本発明のメモリシステムにおけるECCコードを算出するための条件を示した図である。It is the figure which showed the conditions for calculating the ECC code in the memory system of this invention. 本発明のメモリシステムにおける電源投入時の制御フローチャートである。It is a control flowchart at the time of power activation in the memory system of the present invention. 本発明のメモリシステムにおける論理アドレス/物理アドレス変換テーブル作成のフローチャートである。It is a flowchart of logical address / physical address conversion table creation in the memory system of the present invention. 本発明のメモリシステムにおける論理アドレスと物理アドレスの変換テーブル構成を示す図である。It is a figure which shows the conversion table structure of a logical address and a physical address in the memory system of this invention. 本発明のメモリシステムにおける読み出し時のフローチャートである。It is a flowchart at the time of reading in the memory system of this invention. 本発明のメモリシステムにおける書き込み時のフローチャートである。It is a flowchart at the time of writing in the memory system of this invention. 本発明のDOSフォーマットのパラメータを示す図である。It is a figure which shows the parameter of the DOS format of this invention. 本発明の書き換えシーケンスを示す図である。It is a figure which shows the rewriting sequence of this invention. 本発明の書き換えシーケンスを示す図である。It is a figure which shows the rewriting sequence of this invention. 本発明の書き換えシーケンスを示す図である。It is a figure which shows the rewriting sequence of this invention. 本発明の消去コマンド実行時の管理領域とデータ領域の関係を示した図である。It is the figure which showed the relationship between the management area at the time of execution of the deletion command of this invention and the data area. 本実施例による論理ブロック−物理ブロック変換テーブル例を示す図である。It is a figure which shows the example of a logical block-physical block conversion table by a present Example. 本実施例による論理ブロック−物理ブロック変換テーブル作成例を示す図である。It is a figure which shows the example of logical block-physical block conversion table creation by a present Example. 実施例の論理・物理ブロック変換テーブルを示す図である。It is a figure which shows the logical / physical block conversion table of an Example. 実施例での物理ブロックアドレスの表現方法を示す図である。It is a figure which shows the representation method of the physical block address in an Example. 従来の不良ブロックと冗長ブロックの置換えを行った場合の実施例を説明するための図である。It is a figure for demonstrating the Example at the time of replacing the conventional defective block and a redundant block. 不良ブロックと冗長ブロックの置き換えの従来例を説明するための図である。It is a figure for demonstrating the prior art example of replacement of a defective block and a redundant block. ゾーン分割制御を前提に不良ブロックと冗長ブロックの置き換えを行った場合の実施例を説明するための図である。It is a figure for demonstrating the Example at the time of replacing a defective block and a redundant block on the assumption of zone division control. 本発明のPCカードアダプターの構成を示す図である。It is a figure which shows the structure of the PC card adapter of this invention. フラッシュメモリカードをPCカードアダプターに挿入したときの、フローチャートを示す図である。It is a figure which shows a flowchart when a flash memory card is inserted in a PC card adapter. 本実施例に係るフラッシュメモリのDOSフォーマットのパラメータを示す図である。It is a figure which shows the parameter of the DOS format of the flash memory which concerns on a present Example. ECC符号領域の使用方法を示す図である。It is a figure which shows the usage method of an ECC code area.

Claims (7)

ホストにより第1の所定単位で管理されるファイルの内容を、第2の所定単位に分割された記憶領域内に記憶するメモリシステムの制御方法において、
前記第2の所定単位は、前記メモリシステムに含まれる不揮発性半導体記憶メモリのデータ消去の最小単位であり、
前記第1の所定単位の境界が、前記第2の所定単位の境界上に配置されるよう制御することを特徴とするメモリシステムの制御方法。
In a control method of a memory system for storing contents of a file managed by a host in a first predetermined unit in a storage area divided into second predetermined units,
The second predetermined unit is a minimum unit of data erasure of a nonvolatile semiconductor memory included in the memory system,
A control method for a memory system, wherein control is performed so that a boundary of the first predetermined unit is arranged on a boundary of the second predetermined unit.
ホストにより管理される前記ファイルの内容を、前記記憶領域内のデータ領域に格納し、前記ファイルと前記データ領域との対応関係を、前記記憶領域内の管理領域に格納し、
前記ファイルの消去を行う際に、前記ファイルに対応する前記データ領域が空き領域である旨を前記管理領域にマークし、且つ、前記データ領域に格納された前記ファイルの内容を消去することを特徴とする請求項1に記載のメモリシステムの制御方法。
The contents of the file managed by the host are stored in the data area in the storage area, and the correspondence between the file and the data area is stored in the management area in the storage area,
When erasing the file, the management area is marked that the data area corresponding to the file is an empty area, and the contents of the file stored in the data area are erased. The method of controlling a memory system according to claim 1.
ホストにより管理される前記ファイルの内容を、前記記憶領域内のデータ領域に格納し、前記ファイルと前記データ領域との対応関係を、前記記憶領域内の管理領域に格納し、
前記ファイルの消去を行う際に、前記ファイルに対応する前記データ領域が空き領域である旨を前記管理領域にマークし、
前記メモリシステムに入力される信号に基づいて、前記管理領域の前記マークを検知し、前記データ領域に格納された前記ファイルの内容を消去することを特徴とする請求項1に記載のメモリシステムの制御方法。
The contents of the file managed by the host are stored in the data area in the storage area, and the correspondence between the file and the data area is stored in the management area in the storage area,
When erasing the file, mark the management area that the data area corresponding to the file is a free area,
2. The memory system according to claim 1, wherein the mark in the management area is detected based on a signal input to the memory system, and the contents of the file stored in the data area are deleted. Control method.
複数の物理ブロックを有する不揮発性半導体メモリを含むメモリシステムの制御方法において、
ホストのファイル管理単位であるクラスタの境界を、前記物理ブロックの境界上に配置することを特徴とするメモリシステムの制御方法。
In a control method of a memory system including a nonvolatile semiconductor memory having a plurality of physical blocks,
A method of controlling a memory system, characterized in that a cluster boundary, which is a file management unit of a host, is arranged on a boundary of the physical block.
マスターブートセクタ、ブートセクタ、第1のファイルアロケーションテーブル、第2のファイルアロケーションテーブル、ディレクトリー、及びファイルデータを不揮発性半導体記憶メモリに格納するメモリシステムの制御方法であって、
前記マスターブートセクタと前記ブートセクタとの間に所定数の空き論理セクタを割り当てることにより、前記マスターブートセクタ、前記ブートセクタ、前記第1のファイルアロケーションテーブル、前記第2のファイルアロケーションテーブル、及び前記ディレクトリーを、少なくとも1つの論理ブロックに対応する第1の物理ブロック領域に格納し、
前記ファイルデータを第2の物理ブロック領域に格納し、
ホストのファイル管理単位であるクラスタが、物理ブロックの境界をまたがないようにすることを特徴とするメモリシステムの制御方法。
A control method of a memory system for storing a master boot sector, a boot sector, a first file allocation table, a second file allocation table, a directory, and file data in a nonvolatile semiconductor memory,
By assigning a predetermined number of free logical sectors between the master boot sector and the boot sector, the master boot sector, the boot sector, the first file allocation table, the second file allocation table, and the Storing the directory in a first physical block area corresponding to at least one logical block;
Storing the file data in a second physical block area;
A method of controlling a memory system, characterized in that a cluster which is a file management unit of a host does not cross a physical block boundary.
前記ホストから前記メモリシステムに入力される前記ファイルの消去命令を受けて、前記ファイルデータが無効である旨を前記ディレクトリーにマークし、
前記ホストから前記メモリシステムに入力される信号に基づいて、前記ディレクトリーの内容を検知し、前記第2の物理ブロック領域において、マークされた前記ファイルデータを格納する前記物理ブロックのデータ消去を行うことを特徴とする請求項5に記載のメモリシステムの制御方法。
In response to an erase command for the file input from the host to the memory system, the file data is marked as invalid in the directory,
Based on a signal input from the host to the memory system, the contents of the directory are detected, and in the second physical block area, the physical block storing the marked file data is erased. The method of controlling a memory system according to claim 5.
前記不揮発性半導体メモリはNAND型フラッシュメモリであり、前記物理ブロックはデータ消去の最小単位であることを特徴とする請求項4乃至請求項6のいずれか1項に記載のメモリシステムの制御方法。   7. The memory system control method according to claim 4, wherein the nonvolatile semiconductor memory is a NAND flash memory, and the physical block is a minimum unit of data erasure.
JP2007199962A 1997-08-08 2007-07-31 Method for controlling memory system Pending JP2007293917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007199962A JP2007293917A (en) 1997-08-08 2007-07-31 Method for controlling memory system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP9214561A JPH10124384A (en) 1996-08-28 1997-08-08 Method for controlling non-volatile semiconductor memory
JP2007199962A JP2007293917A (en) 1997-08-08 2007-07-31 Method for controlling memory system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP11909998A Division JP4079506B2 (en) 1997-08-08 1998-04-28 Method for controlling nonvolatile semiconductor memory system

Publications (1)

Publication Number Publication Date
JP2007293917A true JP2007293917A (en) 2007-11-08

Family

ID=38764406

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007199962A Pending JP2007293917A (en) 1997-08-08 2007-07-31 Method for controlling memory system

Country Status (1)

Country Link
JP (1) JP2007293917A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186563A (en) * 2010-03-04 2011-09-22 Toshiba Corp Device and method for managing memory
JP4881469B1 (en) * 2010-09-22 2012-02-22 株式会社東芝 Information processing apparatus and information processing method
JP2012515955A (en) * 2009-01-21 2012-07-12 マイクロン テクノロジー, インク. Solid memory formatting
CN102880562A (en) * 2011-05-20 2013-01-16 株式会社东海理化电机制作所 Flash memory device
JP2015507798A (en) * 2011-12-29 2015-03-12 メモリー テクノロジーズ リミティド ライアビリティ カンパニー Method for erasing data entities in a memory module
US9280466B2 (en) 2008-09-09 2016-03-08 Kabushiki Kaisha Toshiba Information processing device including memory management device managing access from processor to memory and memory management method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280466B2 (en) 2008-09-09 2016-03-08 Kabushiki Kaisha Toshiba Information processing device including memory management device managing access from processor to memory and memory management method
JP2012515955A (en) * 2009-01-21 2012-07-12 マイクロン テクノロジー, インク. Solid memory formatting
US9626287B2 (en) 2009-01-21 2017-04-18 Micron Technology, Inc. Solid state memory formatting
JP2011186563A (en) * 2010-03-04 2011-09-22 Toshiba Corp Device and method for managing memory
JP4881469B1 (en) * 2010-09-22 2012-02-22 株式会社東芝 Information processing apparatus and information processing method
CN102880562A (en) * 2011-05-20 2013-01-16 株式会社东海理化电机制作所 Flash memory device
US9021184B2 (en) 2011-05-20 2015-04-28 Kabushiki Kaisha Tokai Rika Denki Seisakusho Flash memory device
CN102880562B (en) * 2011-05-20 2015-08-05 株式会社东海理化电机制作所 Flash memory device
JP2015507798A (en) * 2011-12-29 2015-03-12 メモリー テクノロジーズ リミティド ライアビリティ カンパニー Method for erasing data entities in a memory module
US10048884B2 (en) 2011-12-29 2018-08-14 Memory Technologies Llc Method for erasing data entity in memory module

Similar Documents

Publication Publication Date Title
JP4079506B2 (en) Method for controlling nonvolatile semiconductor memory system
US7890732B2 (en) Memory card and semiconductor device
US9280460B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
US9176865B2 (en) Data writing method, memory controller, and memory storage device
TWI423026B (en) Data writing method, memory controller and memory storage apparatus
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
WO2006009322A2 (en) Memory card, nonvolatile semiconductor memory, and method of controlling semiconductor memory
JPH10124384A (en) Method for controlling non-volatile semiconductor memory
US11809328B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US7657697B2 (en) Method of controlling a semiconductor memory device applied to a memory card
JP2007293917A (en) Method for controlling memory system
JP4242245B2 (en) Flash ROM control device
US9778862B2 (en) Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP2005115562A (en) Flash rom controller
JP3620478B2 (en) Storage device, data processing system using the storage device, and data read method
CN110162493B (en) Memory management method and memory controller using same
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory
CN106326131B (en) Memory management method, memory control circuit unit and memory storage device
CN116009790A (en) Effective node management method, storage device and memory control circuit unit
CN111858389A (en) Data writing method, memory control circuit unit and memory storage device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070731

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070823

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080822

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081021

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081114

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090306