[go: up one dir, main page]

JP2009099112A - Memory system - Google Patents

Memory system Download PDF

Info

Publication number
JP2009099112A
JP2009099112A JP2008074918A JP2008074918A JP2009099112A JP 2009099112 A JP2009099112 A JP 2009099112A JP 2008074918 A JP2008074918 A JP 2008074918A JP 2008074918 A JP2008074918 A JP 2008074918A JP 2009099112 A JP2009099112 A JP 2009099112A
Authority
JP
Japan
Prior art keywords
controller
data
memory
nand flash
card
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
JP2008074918A
Other languages
Japanese (ja)
Inventor
Takashi Oshima
貴志 大嶋
Isao Ozawa
勲 小澤
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
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008074918A priority Critical patent/JP2009099112A/en
Priority to US12/239,179 priority patent/US8131912B2/en
Publication of JP2009099112A publication Critical patent/JP2009099112A/en
Pending legal-status Critical Current

Links

Images

Abstract

【課題】不揮発性メモリの仕様等が変更された場合に、第2のコントローラの機能を変更するたけでメモリシステムを再構築することができるメモリシステムを提供する。
【解決手段】本発明の実施の形態に係るメモリシステムは、ホスト機器に接続される第1のコントローラと、前記第1のコントローラに接続されるとともに、不揮発性メモリに接続される第2のコントローラと、前記第2のコントローラに接続される前記不揮発性メモリと、を具備し、前記第2のコントローラは、前記第1のコントローラと前記不揮発性メモリとの間でデータの授受を行う。
【選択図】図1
To provide a memory system capable of reconfiguring a memory system only by changing a function of a second controller when a specification or the like of a nonvolatile memory is changed.
A memory system according to an embodiment of the present invention includes a first controller connected to a host device, and a second controller connected to the first controller and connected to a nonvolatile memory. And the non-volatile memory connected to the second controller, and the second controller exchanges data between the first controller and the non-volatile memory.
[Selection] Figure 1

Description

本発明は、メモリシステムに関し、特に不揮発性メモリを備えたメモリシステムに関する。   The present invention relates to a memory system, and more particularly to a memory system including a nonvolatile memory.

NAND型フラッシュメモリ等の不揮発性メモリでは、チップレイアウトを形成する線幅の微細化に伴い、書き込み時、読み出し時のページサイズや消去ブロックサイズ、各種コマンドシーケンス、信頼性を保持するために必要なエラー訂正符号等に変更が発生する。このため、メモリカード等の不揮発性メモリとコントローラとを備えたメモリシステムでは、不揮発性メモリの世代変更に伴ってコントローラ機能の変更が必須になる。   In a nonvolatile memory such as a NAND flash memory, as the line width forming the chip layout becomes finer, it is necessary to maintain the page size and erase block size during writing and reading, various command sequences, and reliability. A change occurs in the error correction code. For this reason, in a memory system including a nonvolatile memory such as a memory card and a controller, it is essential to change the controller function as the generation of the nonvolatile memory changes.

例えば、特許文献1に記載されたメモリカードでは、コントローラがメモリデバイスの複数のデバイスコードを保存し、メモリデバイスから読み出したデバイスコードと保存したデバイスコードを比較して、対応可能なメモリデバイスの種類を判別して、デバイスコードが確定されていないメモリデバイスに対応可能としている。
特開2005−157684号公報
For example, in the memory card described in Patent Document 1, the controller stores a plurality of device codes of the memory device, compares the device code read from the memory device with the stored device code, and can cope with the types of memory devices And a memory device whose device code is not fixed can be handled.
JP 2005-157684 A

本発明は、不揮発性メモリの仕様等が変更された場合に、第2のコントローラの機能を変更するたけでメモリシステムを再構築することができるメモリシステムを提供する。   The present invention provides a memory system capable of reconfiguring a memory system only by changing the function of a second controller when the specification or the like of a nonvolatile memory is changed.

本発明の実施の形態に係るメモリシステムは、ホスト機器に接続される第1のコントローラと、前記第1のコントローラに接続されるとともに、不揮発性メモリに接続される第2のコントローラと、前記第2のコントローラに接続される前記不揮発性メモリと、を具備し、前記第2のコントローラは、前記第1のコントローラと前記不揮発性メモリとの間でデータの授受を行うことを特徴とする。   A memory system according to an embodiment of the present invention includes a first controller connected to a host device, a second controller connected to the first controller and connected to a nonvolatile memory, and the first controller. The non-volatile memory connected to the second controller, and the second controller exchanges data between the first controller and the non-volatile memory.

本発明の実施の形態に係るメモリシステムは、ホスト機器に接続される第1のコントローラと、前記第1のコントローラに接続されるとともに、複数の不揮発性メモリに接続される第2のコントローラと、前記第2のコントローラに接続される前記複数の不揮発性メモリと、を具備し、前記第2のコントローラは、前記第1のコントローラと前記複数の不揮発性メモリとの間でデータの授受を行うことを特徴とすることを特徴とする。   A memory system according to an embodiment of the present invention includes a first controller connected to a host device, a second controller connected to the first controller and connected to a plurality of nonvolatile memories, A plurality of nonvolatile memories connected to the second controller, wherein the second controller exchanges data between the first controller and the plurality of nonvolatile memories. It is characterized by.

本発明よれば、不揮発性メモリの仕様等が変更された場合に、第2のコントローラの機能を変更するたけでメモリシステムを再構築するメモリシステムを提供することができる。   According to the present invention, it is possible to provide a memory system that reconstructs a memory system only by changing the function of the second controller when the specification or the like of the nonvolatile memory is changed.

以下、本発明の実施の形態を、図面を参照しつつ、説明する。実施の形態に係るメモリシステムはここではNAND型フラッシュメモリを例に取って説明する。なお、実施の形態において、同一構成要素には同一符号を付け、実施の形態の間において重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. Here, the memory system according to the embodiment will be described by taking a NAND flash memory as an example. Note that, in the embodiments, the same components are denoted by the same reference numerals, and redundant description among the embodiments is omitted.

(第1の実施の形態)

図1は、本発明のメモリシステムを適用した第1の実施の形態に係るメモリカードの概略構成を示す図である。図1に示すようにメモリカード1は、コントローラA2、コントローラB3及びNANDフラッシュメモリ4を有する。コントローラA2は、ホストバス11によりホスト装置20に接続され、NANDバス12によりコントローラB3に接続されている。コントローラB3は、NANDバス12によりコントローラA2に接続され、NANDバス13によりNANDフラッシュメモリ4に接続されている。NANDフラッシュメモリ4は、NANDバス13によりコントローラB3に接続されている。なお、NANDフラッシュメモリ4は、一つのメモリセルに1ビットのデータを記憶する2値メモリであっても良いし、一つのメモリセルに1ビットより多いデータ(例えば、2ビット)を記憶する多値メモリであっても良い。ここでは、不揮発性メモリの例としてNAND型フラッシュメモリを挙げて説明するが、不揮発性メモリはNAND型フラッシュメモリに限らず、例えば、NOR型フラッシュメモリ等でもよい。
(First embodiment)

FIG. 1 is a diagram showing a schematic configuration of a memory card according to a first embodiment to which a memory system of the present invention is applied. As shown in FIG. 1, the memory card 1 includes a controller A2, a controller B3, and a NAND flash memory 4. The controller A2 is connected to the host device 20 via the host bus 11, and is connected to the controller B3 via the NAND bus 12. The controller B3 is connected to the controller A2 via the NAND bus 12, and is connected to the NAND flash memory 4 via the NAND bus 13. The NAND flash memory 4 is connected to the controller B3 by a NAND bus 13. The NAND flash memory 4 may be a binary memory that stores 1-bit data in one memory cell, or may store multiple data (for example, 2 bits) larger than 1 bit in one memory cell. It may be a value memory. Here, a NAND flash memory will be described as an example of the nonvolatile memory. However, the nonvolatile memory is not limited to the NAND flash memory, and may be a NOR flash memory, for example.

以下の説明において使用する用語「論理ブロックアドレス」、「物理ブロックアドレス」は、それぞれ、NANDフラッシュメモリ4内のブロック自体に割り当てられる論理アドレス、物理アドレスを意味するものである。また、「論理アドレス」、「物理アドレス」は、主に、ブロック自体の論理アドレス、物理アドレスを意味するものであるが、ブロック単位よりも細かい分解能の単位に相当するアドレスである場合もあり得る。   The terms “logical block address” and “physical block address” used in the following description mean a logical address and a physical address assigned to the block itself in the NAND flash memory 4, respectively. Further, “logical address” and “physical address” mainly mean the logical address and physical address of the block itself, but may be an address corresponding to a unit of resolution smaller than the block unit. .

ホスト装置20は、接続されるメモリカード1に対してアクセスを行うためのハードウェア及びソフトウェアを備えている。ホスト装置20は、メモリカード1内部の物理状態(何処の物理ブロックアドレスに、何番目の何番目の論理セクタアドレスデータが含まれているか、或いは、何処のブロックが消去状態であるか)を管理し、メモリカード1内のNANDフラッシュメモリ4を直接制御するものとして構築されている。   The host device 20 includes hardware and software for accessing the connected memory card 1. The host device 20 manages the internal physical state of the memory card 1 (where the physical block address includes what number and what number logical sector address data, or where the block is in the erased state). The NAND flash memory 4 in the memory card 1 is directly controlled.

また、ホスト装置20は、消去時の消去ブロックサイズが16kByteに定められているNANDフラッシュメモリ(NANDフラッシュメモリ4を限定するものではない)を使用することを前提として、16kByte単位で論理・物理アドレスの割り当てを行う。すなわち、ホスト装置20は、多くの場合、論理アドレス16kByte分に関してシーケンシャルにライトアクセス又はリードアクセスを行う(該当するコマンドを発行する)。   In addition, the host device 20 is assumed to use a NAND flash memory (not limited to the NAND flash memory 4) whose erase block size at the time of erasure is set to 16 kbytes. Make assignments. That is, in many cases, the host device 20 performs write access or read access sequentially (issues a corresponding command) for the logical address of 16 kbytes.

メモリカード1は、ホスト装置20に接続されたときに電源供給を受けて動作し、ホスト装置20からのアクセスに応じた処理を行う。コントローラA2は、図2に示すように、ホストインターフェース(以下、ホストI/Fという)21、バッファRAM22、NANDインターフェース(以下、NAND_I/Fという)23、CPU(Central Processing Unit)24、及びROM(Read Only Memory)25を有する。   The memory card 1 operates upon receiving power supply when connected to the host device 20, and performs processing in accordance with access from the host device 20. As shown in FIG. 2, the controller A2 includes a host interface (hereinafter referred to as host I / F) 21, a buffer RAM 22, a NAND interface (hereinafter referred to as NAND_I / F) 23, a CPU (Central Processing Unit) 24, and a ROM ( Read Only Memory) 25.

ホストI/F21は、ホストバス11に接続され、ホスト装置20とバッファRAM22及びCPU24との間のインターフェース処理を行う。NAND_I/F23は、NANDバス12に接続され、コントローラB3とバッファRAM22及びCPU24との間のインターフェース処理を行う。   The host I / F 21 is connected to the host bus 11 and performs interface processing between the host device 20 and the buffer RAM 22 and the CPU 24. The NAND_I / F 23 is connected to the NAND bus 12 and performs interface processing between the controller B3, the buffer RAM 22, and the CPU 24.

バッファRAM22は、ホスト装置20から入力されるデータをNANDフラッシュメモリ4に書き込む際に、一定量のデータ(例えば、1ページ分)を一時的に記憶し、NANDフラッシュメモリ4から読み出されるデータをホスト装置20に出力する際に、一定量のデータを一時的に記憶する。また、バッファRAM22は、CPU24の作業領域として使用され、制御プログラム等を記憶する。   The buffer RAM 22 temporarily stores a certain amount of data (for example, one page) when data input from the host device 20 is written to the NAND flash memory 4, and the data read from the NAND flash memory 4 is stored in the host RAM 20. When outputting to the device 20, a certain amount of data is temporarily stored. The buffer RAM 22 is used as a work area for the CPU 24 and stores a control program and the like.

CPU24は、メモリカード1全体の動作を制御するものである。CPU24は、例えば、メモリカード1が電源供給を受けた際に、ROM25内に格納されているファームウェア(後述する制御プログラム)をバッファRAM22にロードして所定の処理を実行することにより、ホスト装置20から書込コマンド、読出コマンド、消去コマンドを受けてNANDフラッシュメモリ4内の該当領域に対するアクセス処理をコントローラB3との間で実行し、バッファRAM22を通じたデータ転送処理を制御する。   The CPU 24 controls the operation of the entire memory card 1. For example, when the memory card 1 is supplied with power, the CPU 24 loads firmware (a control program described later) stored in the ROM 25 into the buffer RAM 22 and executes a predetermined process, thereby executing the host device 20. In response to a write command, a read command, and an erase command, the access process for the corresponding area in the NAND flash memory 4 is executed with the controller B3, and the data transfer process through the buffer RAM 22 is controlled.

ROM25は、CPU24により使用される制御プログラム等を格納するメモリである。なお、コントローラA2は、NANDバス13によりコントローラB3と接続されており、CPU24は、コントローラB3をNANDフラッシュメモリ4であるものとして各種の処理を実行する。すなわち、CPU24は、ホスト装置20から書込コマンド、読出コマンド、消去コマンドを受け付けた際に、コントローラB3に対して書込コマンド、読出コマンド、消去コマンドを転送する処理を実行する。   The ROM 25 is a memory that stores a control program used by the CPU 24. The controller A2 is connected to the controller B3 via the NAND bus 13, and the CPU 24 executes various processes assuming that the controller B3 is the NAND flash memory 4. That is, when receiving a write command, a read command, and an erase command from the host device 20, the CPU 24 executes a process of transferring the write command, the read command, and the erase command to the controller B3.

コントローラB3は、図3に示すように、NAND_I/F31、バッファRAM32、ECC(Error Correcting Code)回路33、NAND_I/F34、CPU35、及びROM36を有する。   As illustrated in FIG. 3, the controller B3 includes a NAND_I / F 31, a buffer RAM 32, an ECC (Error Correcting Code) circuit 33, a NAND_I / F 34, a CPU 35, and a ROM 36.

NAND_I/F31は、NANDバス12に接続され、コントローラA2とバッファRAM32及びCPU35との間のインターフェース処理を行う。NAND_I/F34は、NANDバス13に接続され、NANDフラッシュメモリ4とECC回路33及びCPU35との間のインターフェース処理を行う。   The NAND_I / F 31 is connected to the NAND bus 12 and performs interface processing between the controller A2, the buffer RAM 32, and the CPU 35. The NAND_I / F 34 is connected to the NAND bus 13 and performs interface processing between the NAND flash memory 4, the ECC circuit 33, and the CPU 35.

バッファRAM32は、コントローラA2から入力されるデータをNANDフラッシュメモリ4に書き込む際に、一定量のデータ(例えば、1ページ分)を一時的に記憶し、NANDフラッシュメモリ4から読み出されるデータをコントローラA2に出力する際に、一定量のデータを一時的に記憶する。また、バッファRAM32は、CPU34の作業領域として使用され、制御プログラムや各種のテーブル等を記憶する。   When the data input from the controller A2 is written to the NAND flash memory 4, the buffer RAM 32 temporarily stores a certain amount of data (for example, for one page), and the data read from the NAND flash memory 4 is stored in the controller A2. A certain amount of data is temporarily stored when data is output. The buffer RAM 32 is used as a work area for the CPU 34, and stores a control program, various tables, and the like.

ECC回路33は、NANDフラッシュメモリ4に書き込む書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理、NANDフラッシュメモリ4から読み出される読出データに対してECCデータを付加する処理等を行う。   The ECC circuit 33 performs error correction processing of the write data based on ECC data added to the write data to be written to the NAND flash memory 4, processing to add ECC data to the read data read from the NAND flash memory 4, etc. I do.

CPU35は、NANDフラッシュメモリ4に対するアクセス処理を制御するものである。CPU35は、例えば、メモリカード1が電源供給を受けた際に、ROM36内に格納されているファームウェアをバッファRAM32にロードして所定の処理を実行する。CPU35は、所定の処理において、後述する各種のテーブルをバッファRAM32上で作成し、コントローラA2から書込コマンド、読出コマンド、消去コマンドを受け付けてNANDフラッシュメモリ4内の該当領域に対するアクセス処理を実行し、バッファRAM32を通じたデータ転送処理を実行する。   The CPU 35 controls access processing to the NAND flash memory 4. For example, when the memory card 1 receives power supply, the CPU 35 loads firmware stored in the ROM 36 into the buffer RAM 32 and executes predetermined processing. In a predetermined process, the CPU 35 creates various tables, which will be described later, on the buffer RAM 32, receives a write command, a read command, and an erase command from the controller A2, and executes an access process for the corresponding area in the NAND flash memory 4. The data transfer process through the buffer RAM 32 is executed.

ROM36は、CPU35により使用される制御プログラム等を格納するメモリである。なお、コントローラB3は、NANDバス12によりコントローラA2と接続されており、CPU35は、コントローラA2に対してNANDフラッシュメモリ4であるものとして処理を実行する。すなわち、CPU35は、コントローラA2から書込コマンド、読出コマンド、消去コマンドを受け付けた際に、NANDフラッシュメモリ4内の該当領域に対するアクセス処理を実行する。   The ROM 36 is a memory that stores a control program used by the CPU 35. Note that the controller B3 is connected to the controller A2 via the NAND bus 12, and the CPU 35 executes processing assuming that the controller A2 is the NAND flash memory 4. That is, when the CPU 35 receives a write command, a read command, and an erase command from the controller A2, the CPU 35 executes an access process for the corresponding area in the NAND flash memory 4.

図4は、ホスト装置20が想定しているフラッシュメモリと、実際に使用するフラッシュメモリ、すなわち、メモリカード1内のNANDフラッシュメモリ4との、データ配置の違いを示している。ホスト装置20が想定しているフラッシュメモリでは、各ページが528Byte(512Byte分のデータ記憶部+16Byte分の冗長部)を有しており、32ページ分が1つの消去単位、すなわち、16kByte+0.5kByte(ここでは、kは1024)となる。以下では、このようなフラッシュメモリを搭載したカードを、「小ブロックカード」と称す場合がある。   FIG. 4 shows the difference in data arrangement between the flash memory assumed by the host device 20 and the flash memory actually used, that is, the NAND flash memory 4 in the memory card 1. In the flash memory assumed by the host device 20, each page has 528 bytes (512 bytes of data storage unit + 16 bytes of redundant unit), and 32 pages have one erase unit, that is, 16 kbytes + 0.5 kbytes ( Here, k is 1024). Hereinafter, a card equipped with such a flash memory may be referred to as a “small block card”.

一方、実際に使用するNANDフラッシュメモリ4では、各ページは2112Byte(512Byte分のデータ記憶部×4+24Byte分の管理データ記憶部)を有しており、128ページ分が1つの消去単位、すなわち、256kByte+8kByteとなる。以下では、このようなNANDフラッシュメモリ4を搭載したカードを、「大ブロックカード」と称す場合がある。なお、以下の説明では、便宜上、小ブロックカードの消去単位を16kByteと呼び、大ブロックカードの消去単位を256kByteと呼ぶ。   On the other hand, in the NAND flash memory 4 to be actually used, each page has 2112 bytes (512 bytes of data storage unit × 4 + 24 bytes of management data storage unit), and 128 pages have one erasure unit, that is, 256 kBytes + 8 kBytes. It becomes. Hereinafter, a card equipped with such a NAND flash memory 4 may be referred to as a “large block card”. In the following description, for the sake of convenience, the erase unit of the small block card is referred to as 16 kbytes, and the erase unit of the large block card is referred to as 256 kbytes.

また、ホスト装置20が想定しているフラッシュメモリと、実際に使用するNANDフラッシュメモリ4とは、それぞれ、フラッシュメモリへのデータ入出力を行うためのページバッファを備えている。ホスト装置20が想定しているフラッシュメモリに備えられるページバッファの記憶容量は、528Byte(512Byte+16Byte)である。一方、実際に使用するNANDフラッシュメモリ4に備えられるページバッファの記憶容量は、2112Byte(2048Byte+64Byte)である。データ書込等の際には、自身の記憶容量に相当する1ページ分の単位で実行する。   Each of the flash memory assumed by the host device 20 and the NAND flash memory 4 that is actually used includes a page buffer for inputting / outputting data to / from the flash memory. The storage capacity of the page buffer provided in the flash memory assumed by the host device 20 is 528 bytes (512 bytes + 16 bytes). On the other hand, the storage capacity of the page buffer provided in the NAND flash memory 4 actually used is 2112 bytes (2048 bytes + 64 bytes). When writing data, etc., it is executed in units of one page corresponding to its own storage capacity.

図4の例では、実際に使用するNANDフラッシュメモリ4の消去サイズが、ホスト装置20が想定しているフラッシュメモリの消去サイズの16倍である場合を示したが、本発明はこれに限定されるものではなく、略整数倍であれば別の倍率となるように構成することも可能である。   In the example of FIG. 4, the erase size of the NAND flash memory 4 actually used is 16 times the erase size of the flash memory assumed by the host device 20, but the present invention is not limited to this. It is not a thing, but it can also be comprised so that it may become another magnification if it is a substantially integer multiple.

大ブロックカードを実用上有効な製品とするためには、図4に示したNANDフラッシュメモリ4の記憶容量は1Gビット以上であることが望ましい。NANDフラッシュメモリ4の記憶容量が、例えば、1Gビットである場合、256kByteブロック(消去単位)の数は、512個となる。   In order to make the large block card a practically effective product, it is desirable that the storage capacity of the NAND flash memory 4 shown in FIG. 4 is 1 Gbit or more. When the storage capacity of the NAND flash memory 4 is, for example, 1 Gbit, the number of 256 kByte blocks (erase units) is 512.

また、図4においては消去単位が256kByteである場合を例示しているが、消去単位が例えば128kByteブロックとなるように構築することも実用上有効である。この場合、128kByteブロックの数は、1024個となる。   FIG. 4 illustrates the case where the erasure unit is 256 kBytes, but it is also practically effective to construct the erasure unit to be, for example, a 128 kByte block. In this case, the number of 128 kByte blocks is 1024.

図5は、ホスト装置20側のシステム及びメモリカード1(大ブロックカード)の各コミュニケーション階層を示す図である。   FIG. 5 is a diagram showing each communication hierarchy of the system on the host device 20 side and the memory card 1 (large block card).

ホスト装置20側のシステムは、アプリケーションソフト41、ファイルシステム42、ドライバソフト43、及び小ブロックカード物理アクセス層44を有する。一方、メモリカード1(大ブロックカード)は、小ブロックカード物理アクセス層51、小ブロックカード物理・小ブロックカード論理変換層52、小ブロックカード物理・大ブロックカード論理変換層53、及び大ブロックカード物理アクセス層54を有する。   The system on the host device 20 side includes application software 41, file system 42, driver software 43, and small block card physical access layer 44. On the other hand, the memory card 1 (large block card) includes a small block card physical access layer 51, a small block card physical / small block card logical conversion layer 52, a small block card physical / large block card logical conversion layer 53, and a large block card. It has a physical access layer 54.

例えば、ホスト装置20側のアプリケーションソフト41がファイルの書込をファイルシステム42に要求すると、ファイルシステム42は、小ブロックカードの論理ブロックアドレスに基づきシーケンシャルなセクタ書込をドライバソフト43に指示する。これを受けて、ドライバソフト43は、小ブロックカードの論理ブロックアドレスに基づく16kByteブロック毎のシーケンシャルな書込を実現する処理を実行する。この場合、ドライバソフト43は、論理・物理ブロック変換を行い、小ブロックカード物理アクセス層44を通じて、小ブロックカードの物理ブロックアドレスによるランダムな書込コマンドを大ブロックカードに対して発行し、データ転送を行う。   For example, when the application software 41 on the host device 20 side requests the file system 42 to write a file, the file system 42 instructs the driver software 43 to perform sequential sector writing based on the logical block address of the small block card. In response to this, the driver software 43 executes processing for realizing sequential writing for each 16 kByte block based on the logical block address of the small block card. In this case, the driver software 43 performs logical / physical block conversion, issues a random write command based on the physical block address of the small block card to the large block card through the small block card physical access layer 44, and transfers the data. I do.

なお、ライトアクセスにおいては、小ブロックカードの場合も大ブロックカードの場合も、プロトコル上、(1)コマンド、(2)ページアドレス(ロウアドレス)、(3)カラムアドレス、(4)データ、(5)プログラム確認コマンド、といった順序で情報の授受が行われることが前提となっている。   In write access, for both small block cards and large block cards, (1) command, (2) page address (row address), (3) column address, (4) data, ( 5) It is assumed that information is exchanged in the order of program confirmation commands.

大ブロックカード側の小ブロックカード物理アクセス層51は、ホスト装置20から小ブロックカードの物理ブロックアドレスによる書込コマンドを受けると、物理ブロックアドレスやデータのほか、これに付随する付随データに含まれている論理ブロックアドレスを取得する。   When receiving a write command based on the physical block address of the small block card from the host device 20, the small block card physical access layer 51 on the large block card side is included in the accompanying data accompanying the physical block address and data. Get the current logical block address.

小ブロックカード物理・小ブロックカード論理変換層52は、データ読出などの際に小ブロックカードの論理ブロックアドレス(16kByte分に対応)から小ブロックカードの論理ブロックアドレス(16kByte分に対応)への変換処理を行うための第1のテーブルを有している。小ブロックカード物理・小ブロックカード論理変換層52は、小ブロックカード物理アクセス層51が書込コマンドを受けて小ブロックカードの論理ブロックアドレスを取得したときには、これを第1のテーブルに反映させる。小ブロックカード物理・小ブロックカード論理変換層52は、物理ブロックアドレスに関しても、第1のテーブルに反映させる。   The small block card physical / small block card logical conversion layer 52 converts the logical block address of the small block card (corresponding to 16 kBytes) to the logical block address of the small block card (corresponding to 16 kBytes) when reading data. It has a first table for processing. The small block card physical / small block card logical conversion layer 52 reflects this in the first table when the small block card physical access layer 51 receives the write command and acquires the logical block address of the small block card. The small block card physical / small block card logical conversion layer 52 also reflects the physical block address in the first table.

小ブロックカード物理・大ブロックカード論理変換層53は、データ読出などの際小ブロックカードの論理ブロックアドレス(シーケンシャルな16kByteブロック×16個分に対応)から大ブロックカードの物理ブロックアドレス(256kByte物理ブロック分に対応)への変換処理を行うための第2のテーブルを有している。小ブロックカード物理・大ブロックカード論理変換層53は、小ブロックカード物理アクセス層51が読出コマンドを受けて小ブロックカードの論理アドレスを取得したときには、これを第2のテーブルに反映させる。   The small block card physical / large block card logical conversion layer 53 performs the physical block address (256 kByte physical block) of the large block card from the logical block address of the small block card (corresponding to 16 sequential 16 kByte blocks) at the time of data reading or the like. A second table for performing a conversion process to the corresponding (minute). The small block card physical / large block card logical conversion layer 53 reflects this in the second table when the small block card physical access layer 51 receives the read command and acquires the logical address of the small block card.

大ブロックカード物理アクセス層54は、小ブロックカード物理アクセス層51が書込コマンドを受けて取得した小ブロックカードの論理ブロックアドレスに基づき、NANDフラッシュメモリ4内のデータ配置を決定し、256kByte物理ブロック内において2kByte(1ページ)単位でシーケンシャルに16kByte分のデータを書き込む。また、大ブロックカード物理アクセス層54は、取得した小ブロックカードの論理ブロックアドレスや物理ブロックアドレスをNANDフラッシュメモリ4内部の管理データ領域内の所定の領域に格納する。   The large block card physical access layer 54 determines the data arrangement in the NAND flash memory 4 based on the logical block address of the small block card acquired by the small block card physical access layer 51 upon receiving the write command, and determines a 256 kByte physical block. The data for 16 kBytes is sequentially written in units of 2 kBytes (one page). The large block card physical access layer 54 stores the acquired logical block address and physical block address of the small block card in a predetermined area in the management data area inside the NAND flash memory 4.

このようにホスト装置20は、小ブロックカードの物理ブロックアドレスに基づくコマンドを発行するため、大ブロックカード側では、小ブロックカードの物理ブロックアドレスに対応するデータがどの256kByte物理ブロックの中に存在するのかが分かるように管理する。具体的には、16kByte毎に小ブロックカードの論理・物理ブロックアドレスの対応関係を管理すると共に、小ブロックカードの連続した256kByteブロック分の論理ブロックアドレスに対応するデータが大ブロックカード内のどの256kByte物理ブロックに格納されているかが分かるように管理する。   Since the host device 20 issues a command based on the physical block address of the small block card in this way, on the large block card side, the data corresponding to the physical block address of the small block card exists in which 256 kByte physical block. Manage so that you know. Specifically, the correspondence between the logical and physical block addresses of the small block card is managed every 16 kbytes, and the data corresponding to the logical block addresses of 256 kbyte blocks of the small block card is stored in any 256 kbytes in the large block card. It is managed so that it can be seen whether it is stored in the physical block.

また、ホスト装置20は、消去単位が16kByteブロックであることを前提として、256kByte物理ブロックを消去単位としている大ブロックカードにアクセスしてくる。これに対し、大ブロックカードは、ホスト装置20が使用している制御アルゴリズムや物理フォーマットに合わせて柔軟に応答する。例えば、「新たな16kByteの論理ブロックアドレスにより書込操作が発生した場合は、それ以前に同一の論理ブロックアドレスにより書込操作が発生したときの小ブロックカードの16kByte物理ブロックアドレスに対応するブロック(以下、「旧アサイン論理ブロック」と称す)のデータ消去が行われる」というホスト装置20側のアルゴリズムに鑑み、消去対象の旧アサイン論理ブロックが消去状態であることをエミュレートする。しかし、実際には、大ブロックカード側では消去対象の16kByteブロック分の消去を行わない。こりにより、NANDフラッシュメモリ4への物理的な操作に関するオーバーヘッドを大幅に削減することができる。   Further, the host device 20 accesses a large block card having a 256 kByte physical block as an erasure unit on the assumption that the erasure unit is a 16 kByte block. On the other hand, the large block card responds flexibly in accordance with the control algorithm and physical format used by the host device 20. For example, “if a write operation has occurred with a new 16 kByte logical block address, the block corresponding to the 16 kByte physical block address of the small block card when the write operation has previously occurred with the same logical block address ( In view of the algorithm on the side of the host device 20 that “the data erasure of“ the old assignment logical block ”is performed” is emulated, the old assignment logical block to be erased is emulated. However, in practice, the large block card does not erase the 16 kByte block to be erased. As a result, the overhead related to the physical operation on the NAND flash memory 4 can be greatly reduced.

図6は、ホスト装置20側から送られてくるコマンドのフォーマットを示す図である。ホスト装置20側から送られてくるコマンドのパケットは、図6(a)に示すように、コマンド種別情報(ここでは「書込」)、アドレス(物理ブロックアドレス)、データ(コンテンツ等の実データ及び付随データ(512Byte+16Byte))といった各種情報を含んでいる。   FIG. 6 is a diagram showing a format of a command sent from the host device 20 side. As shown in FIG. 6A, the command packet sent from the host device 20 side includes command type information (here, “write”), address (physical block address), data (actual data such as contents). And various information such as accompanying data (512 bytes + 16 bytes).

このようなフォーマットのパケットにおいては、図6(b)に示すように、付随データ16Byte中の所定の位置に小ブロックカードの「論理ブロックアドレス」(アクセス対象となる16Byteブロックに対応する論理アドレス)が配置されている。大ブロックカードは、コマンド種別情報、物理ブロックアドレス、データを取得するほか、特に上記「論理ブロックアドレス」を取得する。   In a packet of such a format, as shown in FIG. 6B, the “logical block address” (logical address corresponding to the 16-byte block to be accessed) of the small block card at a predetermined position in the accompanying data 16-byte. Is arranged. The large block card acquires command type information, physical block address, and data, and particularly acquires the “logical block address”.

図7は、ホスト装置20側が想定しているブロック書込操作と、メモリカード1(大ブロックカード)側が実際に行う書込処理とを、対比して示す図である。ホスト装置20側(図中の左側)では、小ブロックカードの論理アドレスに基づく16kByte物理ブロック単位のシーケンシャルな書込操作の発生時に、小ブロックカードの物理ブロックアドレスによる16kByteブロック単位のランダムな書込操作を行う。また、これに伴い、旧アサイン論理ブロックが16kByteブロック単位で消去されることを前提としている。   FIG. 7 is a diagram showing a comparison between a block writing operation assumed on the host device 20 side and a writing process actually performed on the memory card 1 (large block card) side. On the host device 20 side (left side in the figure), when a sequential writing operation in units of 16 kByte physical blocks based on the logical address of the small block card occurs, random writing in units of 16 kByte blocks using the physical block address of the small block card Perform the operation. Along with this, it is assumed that the old assign logical block is erased in units of 16 kByte blocks.

一方、大ブロックカード(図中の右側)では、ホスト装置20側から書込コマンドを受けた場合、小ブロックカードの論理ブロックアドレスに基づく16kByteブロック単位のデータをNANDフラッシュメモリ4内にシーケンシャルに書き込む。この場合、上記前提に合わせ、ホスト装置20側に対しては大ブロックカード側小ブロックカード内の旧アサイン論理ブロックは消去の状態にあるものとして対応する。例えば、旧アサイン論理ブロックに対する読出アクセスがあった場合には、そのブロックは消去状態にある旨をホスト装置20に応答する。また、小ブロックについても、消去の状態にあるものとして対応する。   On the other hand, in the large block card (right side in the figure), when a write command is received from the host device 20 side, data in units of 16 kByte blocks based on the logical block address of the small block card is sequentially written in the NAND flash memory 4. . In this case, in accordance with the above assumption, the old assign logical block in the small block card on the large block card side corresponds to the host device 20 side as being in an erased state. For example, when there is a read access to the old assign logical block, the host device 20 is responded that the block is in the erased state. A small block is also handled as being in an erased state.

前述のように、ホスト装置20は、小ブロックの物理アドレスによる16kByte単位のランダムな書込操作を行う。このようなランダムな書込操作では、一般に、大ブロック(256kByte)の一部のみを書き換えるための処理が多発する。NANDフラッシュメモリでは、ブロック単位でしか消去を行えないため、フロックの一部のみを書き換える場合は、書き換える新データを消去済みの新ブロックに書き込み、新データに書き換えられる旧データを含む旧ブロックから、書き換えられないデータのコピー動作(以下、「巻き添えデータコピー」と称す)を伴うため、ブロックの一部のみを書き換える処理が多発すると、オーバーヘッドが増大することになる。   As described above, the host device 20 performs a random writing operation in units of 16 kBytes using the physical address of the small block. In such a random writing operation, generally, a process for rewriting only a part of a large block (256 kBytes) frequently occurs. In NAND flash memory, erasing can only be performed in block units, so when rewriting only a part of the flock, new data to be rewritten is written into the erased new block, and from the old block including old data that is rewritten to new data, Since it involves a copy operation of data that cannot be rewritten (hereinafter referred to as “wrapping data copy”), overhead frequently increases if a process of rewriting only a part of the block occurs frequently.

そこで、本実施形態では、ホスト装置20側から得られる論理アドレスの順序にし従って、大ブロックカード側で物理アドレスを再度割り当てることにより、ブロックの一部のみの書込の発生を低減し、オーバーヘッドの増大を抑制する。   Therefore, in the present embodiment, according to the order of the logical addresses obtained from the host device 20, the physical addresses are reassigned on the large block card side, thereby reducing the occurrence of writing of only a part of the block and reducing the overhead. Suppress the increase.

図8は、大ブロックカード内のNANDフラッシュメモリ4のブロックフォーマット(消去単位である256kByte物理ブロック分)を示す図である。大ブロックカードでは、消去単位である256kByte物理ブロックの中に、ホスト装置20側が管理する単位である16kByteに相当するデータを書き込むためのブロック(以下、ホスト管理ブロックと称す)が16個分含まれている。データ書込の際には、小ブロックカードの論理ブロックアドレスの順に個々のデータが配置される。   FIG. 8 is a diagram showing a block format of the NAND flash memory 4 in the large block card (for 256 kByte physical block which is an erasing unit). In the large block card, 16 blocks (hereinafter referred to as host management blocks) for writing data corresponding to 16 kBytes, which is a unit managed by the host device 20, are included in the 256 kByte physical blocks, which are erasure units. ing. At the time of data writing, individual data is arranged in the order of the logical block addresses of the small block card.

各ホスト管理ブロックは、8個のページで構成される。各ページは、512Byteデータ領域を4個分含むとともに、各データ領域に対応する10ByteECC領域を含んでいる。また、ページ中の最後の512Byteデータ領域(4番目の512Byteデータ領域)の後には、24Byte管理データ領域も設けられる。このため、ページ中の最後の10ByteECC領域は、4番目の512Byteデータ領域と24Byte管理データ領域の両方に対応する構成となっている。   Each host management block is composed of 8 pages. Each page includes four 512-byte data areas and a 10-byte ECC area corresponding to each data area. In addition, a 24-byte management data area is provided after the last 512-byte data area (fourth 512-byte data area) in the page. For this reason, the last 10-byte ECC area in the page has a configuration corresponding to both the fourth 512-byte data area and the 24-byte management data area.

消去単位である256kByte物理ブロックに含まれる128個の24Byte管理データ領域のうち、最後の24Byte管理データ領域60には、ホスト装置20側から送られてくるコマンドから取得された物理ブロックアドレスに相当するアドレス情報(以下、「ホスト管理物理アドレス」と称す)及び論理ブロックアドレスに相当するアドレス情報(以下、「ホスト管理論理ブロックアドレス」と称す)がまとめて格納される。   Of the 128 24-byte management data areas included in the 256 kByte physical block, which is an erasure unit, the last 24-byte management data area 60 corresponds to a physical block address acquired from a command sent from the host device 20 side. Address information (hereinafter referred to as “host management physical address”) and address information corresponding to the logical block address (hereinafter referred to as “host management logical block address”) are collectively stored.

具体的には、16kByteデータが1つの16kByteホスト管理ブロックに書き込まれる毎に、対応するホスト管理物理アドレス(例えば、10bit分)が管理データ領域60内の所定の領域に格納される。これにより、16個の16kByteホスト管理ブロックに対応する16個のホスト管理物理アドレスが管理データ領域60内の所定の領域に格納される。一方、ホスト管理論理アドレスに関しては、16個の16kByteホスト管理ブロックに対応する連続した16個の論理ブロックアドレスのうち、その代表として、先頭の論理ブロックアドレス(例えば、10bit分)がホスト管理論理アドレスとして管理データ領域60内の所定の領域に格納される。   Specifically, each time 16 kByte data is written to one 16 kByte host management block, the corresponding host management physical address (for example, 10 bits) is stored in a predetermined area in the management data area 60. As a result, 16 host management physical addresses corresponding to 16 16 kByte host management blocks are stored in a predetermined area in the management data area 60. On the other hand, with respect to the host management logical address, the head logical block address (for example, 10 bits) is the host management logical address as a representative of 16 consecutive logical block addresses corresponding to 16 16 kByte host management blocks. Is stored in a predetermined area in the management data area 60.

上記構成において、各256Byteブロック内の最終領域(512Byte+24Byte+10Byteの領域)に配置されている情報を読み出して、その中の24Byte管理データを参照することにより、当該256kByteブロックに対応する16ブロック分の「ホスト管理物理アドレス」及び「ホスト管理論理ブロックアドレス」をまとめて取得することができる。   In the above configuration, by reading the information arranged in the last area (512 bytes + 24 bytes + 10 bytes area) in each 256 byte block and referring to the 24 bytes management data therein, the “host” corresponding to the 256 kbyte block “Management physical address” and “host management logical block address” can be acquired together.

各256Byteブロック内に格納された「ホスト管理物理アドレス」及び「ホスト管理論理ブロックアドレス」は、図5で説明した小ブロックカード物理・小ブロックカード論理変換層52が有する第1のテーブルと、小ブロックカード論理・大ブロックカード物理変換層53が有する第2のテーブルとを作成する際に使用される。   The “host management physical address” and “host management logical block address” stored in each 256-byte block are the same as the first table of the small block card physical / small block card logical conversion layer 52 described in FIG. It is used when creating the second table of the block card logic / large block card physical conversion layer 53.

図9は、コントローラB3のバッファRAM32内に作成される各種のテーブルを示す図である。「小ブロックカード論理・物理ブロックアドレス」テーブル32a及び「小ブロックカード論理ブロックアドレス・大ブロックカード物理ブロックアドレス」テーブル32bは、それぞれ前述した第1のテーブル及び第2のテーブルに相当するものであり、データ管理領域60(図8参照)に格納されている「ホスト管理物理アドレス」及び「ホスト管理論理アドレス」を利用してバッファRAM32内に作成される。   FIG. 9 is a diagram showing various tables created in the buffer RAM 32 of the controller B3. The “small block card logical / physical block address” table 32a and the “small block card logical block address / large block card physical block address” table 32b correspond to the first table and the second table, respectively. The “host management physical address” and the “host management logical address” stored in the data management area 60 (see FIG. 8) are created in the buffer RAM 32.

「小ブロックカード論理・物理ブロックアドレス」テーブル32aは、データ読出などの際に小ブロックカードの物理ブロックアドレス(16kByteブロック分に対応)から小ブロックカードの論理ブロックアドレス(16kByteブロック分に対応)への変換処理を行うために使用される。   The “small block card logical / physical block address” table 32a is changed from the physical block address of the small block card (corresponding to 16 kByte blocks) to the logical block address of the small block card (corresponding to 16 kByte blocks) at the time of data reading or the like. Used to perform the conversion process.

「小ブロックカード論理ブロックアドレス・大ブロックカード物理ブロックアドレス」テーブル32bは、データ読出などの際に小ブロックカードの論理ブロックアドレス(シーケンシャルな16kByteブロック×16個分に対応)から大ブロックカードの論理ブロックアドレス(256kByte物理ブロック分に対応)への変換処理を行うために使用される。   The “small block card logical block address / large block card physical block address” table 32b is used to read the logic of the large block card from the logical block address of the small block card (corresponding to 16 sequential 16 kbyte blocks) when data is read. It is used to perform conversion processing to block addresses (corresponding to 256 kByte physical blocks).

次に、図10のフローチャートを参照して、各種テーブルの作成処理の流れを説明する。例えば、メモリカード1(大ブロックカード)がホスト装置20側から電源供給を受けると(ステップA1)、コントローラB3内のCPU35は動作を開始し、ROM36に格納されている制御プログラム(小ブロックカードにおける物理・論理ブロックアドレスと当該NANDフラッシュメモリ4における物理ブロックアドレスとの対応付けを管理するためのプログラム)等をバッファRAM32上にロードして処理する(ステップA2)。なお、この時、コントローラA2内のCPU24も動作を開始し、ROM25に格納されている制御プログラム(メモリカード1全体の動作を制御するためのプログラム)等をバッファRAM22上にロードして処理する。   Next, a flow of various table creation processing will be described with reference to the flowchart of FIG. For example, when the memory card 1 (large block card) is supplied with power from the host device 20 side (step A1), the CPU 35 in the controller B3 starts operation, and the control program stored in the ROM 36 (in the small block card) A program for managing the correspondence between the physical / logical block address and the physical block address in the NAND flash memory 4) is loaded on the buffer RAM 32 and processed (step A2). At this time, the CPU 24 in the controller A2 also starts operating, and loads a control program (program for controlling the operation of the entire memory card 1) stored in the ROM 25 onto the buffer RAM 22 for processing.

次に、CPU35は、NANDフラッシュメモリ4のデータ管理領域60内に格納されている「ホスト管理物理アドレス」及び「ホスト管理論理ブロックアドレス」を利用することによって、バッファRAM32上に「小ブロックカード論理・物理ブロックアドレス」テーブル32aと「小ブロックカード論理ブロックアドレス・大ブロックカード物理ブロックアドレス」テーブル32bとを作成する(ステップA3)。そして、CPU35は、ホスト装置20からのコマンド待ち状態になり(ステップA4)、制御プログラムに従ってライトアクセス、リードアクセス、消去アクセスに対する各処理が行えるようになる。   Next, the CPU 35 uses the “host management physical address” and the “host management logical block address” stored in the data management area 60 of the NAND flash memory 4, so that the “small block card logic” is stored on the buffer RAM 32. A "physical block address" table 32a and a "small block card logical block address / large block card physical block address" table 32b are created (step A3). Then, the CPU 35 waits for a command from the host device 20 (step A4), and can perform each processing for write access, read access, and erase access according to the control program.

次に、図11のフローチャートを参照して、ライトアクセスに対する処理の流れを説明する。CPU35は、ホスト装置20側からコントローラA2を経由して、例えば、16kByteブロックに対する書込コマンドを受けると(ステップB1)、小ブロックカードの物理ブロックアドレスやデータのほか、これに付随する付随データに含まれている論理ブロックアドレスを取得する(ステップB2)。   Next, the flow of processing for write access will be described with reference to the flowchart of FIG. When the CPU 35 receives a write command for, for example, a 16 kbyte block from the host device 20 via the controller A2 (step B1), the CPU 35 converts the physical block address and data of the small block card, and accompanying data associated therewith. An included logical block address is acquired (step B2).

CPU35は、取得した小ブロックカードの論理ブロックアドレスの順に、16kByteデータを256kByte物理ブロック内に書き込むと共に、当該小ブロックカードの論理ブロックアドレス及び物理ブロックアドレスに相当する「ホスト管理論理アドレス」及び「ホスト管理物理アドレス」を管理データ領域60内の所定の領域に格納する(ステップB3)。また、CPU35は、取得した上記小ブロックカードの論理ブロックアドレス及び物理ブロックアドレスをバッファRAM32上の「小ブロックカード論理・物理ブロックアドレス」テーブル32aと「小ブロックカード論理ブロックアドレス・大ブロックカード物理ブロックアドレス」テーブル32bに反映させる(ステップB4)。最後に、CPU35は、ホスト装置20に書込処理の完了を通知する(ステップB5)。   The CPU 35 writes 16 kByte data in the 256 kByte physical block in the order of the acquired logical block addresses of the small block card, and also “host management logical address” and “host” corresponding to the logical block address and physical block address of the small block card. "Management physical address" is stored in a predetermined area in the management data area 60 (step B3). In addition, the CPU 35 obtains the logical block address and physical block address of the small block card obtained from the “small block card logical / physical block address” table 32 a on the buffer RAM 32 and “small block card logical block address / large block card physical block”. It is reflected in the “address” table 32b (step B4). Finally, the CPU 35 notifies the host device 20 of the completion of the writing process (step B5).

次に、図12のフローチャート及び図13〜図16の概念図を参照して、前述の図11に示したステップB3におけるデータ書込処理の詳細について説明する。   Next, details of the data writing process in step B3 shown in FIG. 11 will be described with reference to the flowchart of FIG. 12 and conceptual diagrams of FIGS.

CPU35は、データ書込に際し、対象となっている論理ブロックアドレス(16kByteブロック分に対応)が、先行する論理ブロックアドレス(16kByteブロック分に対応)に連続するものであるか否かを判定する(図12のステップC1)。すなわち、図13に示すように、16kByte物理ブロックアドレスX1へのデータ書込まで済んでいる状態において、次に書き込むべき物理ブロックが上記物理ブロックX1に続く16kByte物理ブロックアX2に該当するか否かを判定する。   When writing data, the CPU 35 determines whether the target logical block address (corresponding to 16 kByte blocks) is consecutive to the preceding logical block address (corresponding to 16 kByte blocks) ( Step C1 in FIG. That is, as shown in FIG. 13, in the state where data writing to the 16 kByte physical block address X1 has been completed, whether or not the physical block to be written next corresponds to the 16 kByte physical block array X2 following the physical block X1. Determine.

連続するものであれば、CPU35は、大ブロックカードの256kByte物理ブロック内に、先に書き込んだ16kByteデータに引き続き、書込対象の16kByteデータを書き込む(図12のステップC2)。すなわち、図14に示すように、前述の16kByte物理ブロックアX2へのデータ書込を行う。   If it is continuous, the CPU 35 writes the 16 kByte data to be written in the 256 kByte physical block of the large block card following the previously written 16 kByte data (step C2 in FIG. 12). That is, as shown in FIG. 14, data is written to the aforementioned 16 kByte physical block X2.

一方、連続するものでなければ、大ブロックカードの256kByte物理ブロック内の後半データに関して巻き添えデータコピー操作を実施する(図12のステップC3)。すなわち、図15に示すように、対象となっている256kByte物理ブロックには、上記物理ブロックX1までの書込(更新)によって不要となった旧データを有する旧アサイン16kByte論理ブロック群の物理領域Y1と、更新がないために有効に残っている有効データを有する物理領域Y2とが存在する。そこで、この物理ブロックY2のデータを、対象となっている256kByteブロック内の上記物理ブロックX1の後に続く物理領域Y3にコピーする。また、コピー後、CPU35は、不要となった旧256kByteブロック内のデータを消去する。   On the other hand, if it is not continuous, an accompanying data copy operation is performed on the latter half data in the 256 kByte physical block of the large block card (step C3 in FIG. 12). That is, as shown in FIG. 15, the target 256 kByte physical block includes the physical area Y1 of the old assignment 16 kByte logical block group having the old data that is no longer needed by writing (updating) up to the physical block X1. And a physical area Y2 having valid data that remains valid because there is no update. Therefore, the data of this physical block Y2 is copied to the physical area Y3 following the physical block X1 in the 256 kByte block of interest. Further, after copying, the CPU 35 erases data in the old 256 kByte block that is no longer needed.

次いで、大ブロックカードの新たな256kByte物理ブロック(データ消去済み)への書込を実施し、待機する(図12のステップC4)。なお、書込対象となる領域が256kByte区切りの先頭であるか否かによって、処理が異なる。すなわち、書込対象となる領域が256kByte区切りの先頭の場合、図16(a)に示すように、当該先頭の位置にある物理ブロックZ1に16kByteデータを書き込む。一方、書込対象となる領域が256kByte区切りの先頭でない場合、前半データに関して巻き添えデータコピー操作を実施する。すなわち、図16(b)に示すように、先頭から上記書込対象の直前までの物理領域Z2に、旧アサイン16kByte物理ブロック群のデータをコピーし、その後、書込対象となる物理領域X3に16kByteデータを書き込む。   Next, writing to a new 256 kByte physical block (data erased) of the large block card is performed and waiting is performed (step C4 in FIG. 12). Note that the processing differs depending on whether or not the area to be written is at the head of a 256 kByte segment. That is, when the area to be written is at the head of 256 kBytes, as shown in FIG. 16A, 16 kByte data is written into the physical block Z1 at the head position. On the other hand, if the area to be written is not at the head of 256 kByte delimiters, a wrapping data copy operation is performed on the first half data. That is, as shown in FIG. 16B, the data of the old assignment 16 kByte physical block group is copied to the physical area Z2 from the beginning to immediately before the write target, and then the physical area X3 to be written is copied. Write 16 kByte data.

次に、図17に示すフローチャートを参照して、リードアクセスに対する処理の流れを説明する。CPU35は、ホスト装置20から、例えば16kByteブロックに対する読出コマンドを受けると(ステップD1)、そのコマンドに付加されている小ブロックカードの物理ブロックアドレスを取得する(ステップd2)。   Next, the flow of processing for read access will be described with reference to the flowchart shown in FIG. When the CPU 35 receives a read command for, for example, a 16 kByte block from the host device 20 (step D1), the CPU 35 acquires the physical block address of the small block card added to the command (step d2).

次に、CPU35は、「小ブロックカード論理・物理ブロックアドレス」テーブル32aを参照することにより、取得した小ブロックカードの物理ブロックアドレスから小ブロックの論理ブロックアドレスを取得する(ステップD3)。次いで、CPU35は、「小ブロックカード論理ブロックアドレス・大ブロックカード物理ブロックアドレス」テーブル32bを参照することにより、取得した小ブロックの論理ブロックアドレスから大ブロックカードの物理ブロックアドレスを取得する(ステップD4)。   Next, the CPU 35 refers to the “small block card logical / physical block address” table 32a to acquire the logical block address of the small block from the acquired physical block address of the small block card (step D3). Next, the CPU 35 acquires the physical block address of the large block card from the acquired logical block address of the small block by referring to the “small block card logical block address / large block card physical block address” table 32b (step D4). ).

次に、図18に示すフローチャートを参照して、消去アクセスに対する処理の流れを説明する。CPU35は、ホスト装置20から、例えば16kByte物理ブロックに対する消去コマンドを受けると(ステップE1)、必要に応じて、該当するブロックが消去状態にあることを示す情報をバッファRAM32上の所定の領域に記録する(所定のテーブルを更新する)(ステップE2)。   Next, the flow of processing for erase access will be described with reference to the flowchart shown in FIG. When the CPU 35 receives an erase command for, for example, a 16 kByte physical block from the host device 20 (step E1), it records information indicating that the corresponding block is in an erased state in a predetermined area on the buffer RAM 32 as necessary. (Update a predetermined table) (step E2).

なお、このステップE2の処理は省略してもよい。ステップE2の処理を行っておくと、電源オフもしくは電源オンのときにホスト装置20側から消去状態の確認要求があった場合に、当該消去状態を正しく応答することができる。   Note that the process of step E2 may be omitted. If the processing of step E2 is performed, when there is a request for confirmation of the erase state from the host device 20 side when the power is off or the power is on, the erase state can be correctly answered.

最後に、CPU35は、実際には指定されたブロックに対する消去処理を行わずに、消去を行った旨をホスト装置20へ通知する(ステップE3)。   Finally, the CPU 35 notifies the host device 20 that the erase has been performed without actually performing the erase process on the designated block (step E3).

図19は、本実施の形態のメモリカード1に対してホスト装置20が書き込みを行う際の当該メモリカード1のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。   FIG. 19 is a timing chart showing an example of signals input to and output from the I / O pin and the R / B pin of the memory card 1 when the host device 20 writes to the memory card 1 of the present embodiment. is there.

ホスト装置20は、メモリカード1は16kByteの消去ブロックサイズを有する不揮発性メモリであると仮定してメモリカード1を制御している。例えば、メモリカード1に対する書込の際には、ホスト装置20は、シリアルデータインプットコマンド80H(Hは16進を示す)をI/Oピン1〜8へ入力する。次に、ホスト装置20は、カラムアドレスC/A及びページアドレスP/Aを、I/Oピン1〜8へ入力する。なお、ここでカラムアドレスC/A及びページアドレスP/Aは、ホスト装置20がメモリカード1に対して想定している仮想物理アドレス空間におけるカラムアドレス及びページアドレスである。   The host device 20 controls the memory card 1 on the assumption that the memory card 1 is a non-volatile memory having an erase block size of 16 kBytes. For example, when writing to the memory card 1, the host device 20 inputs a serial data input command 80H (H indicates hexadecimal) to the I / O pins 1 to 8. Next, the host device 20 inputs the column address C / A and the page address P / A to the I / O pins 1 to 8. Here, the column address C / A and the page address P / A are a column address and a page address in the virtual physical address space that the host device 20 assumes for the memory card 1.

更に、ホスト装置20は、書込データを、I/Oピン1〜8の個々に対し、528回入力する。具体的には、ホスト装置20は、ライトイネーブルピンへの入力信号を528回クロッキングしながら、それぞれのI/Oピンに対して528ビット(すべてのI/Oピン合計で528バイト)のデータを順次シフトインする。データをシフトインが完了すると、ホスト装置20は、プログラムコマンド10HをI/Oピン1〜8へ入力する。これに応答してメモリカード1は、そのR/Bピンにロウレベルの信号を出力し、メモリカード1がビジー状態であることを示す。その後、所定時間後にR/Bピンにハイレベルの信号を出力することでレディ状態になったことを示す。   Further, the host device 20 inputs the write data 528 times for each of the I / O pins 1 to 8. Specifically, the host device 20 clocks the input signal to the write enable pin 528 times, and data of 528 bits (total 528 bytes for all I / O pins) for each I / O pin. Are sequentially shifted in. When the data shift-in is completed, the host device 20 inputs a program command 10H to the I / O pins 1-8. In response to this, the memory card 1 outputs a low level signal to its R / B pin, indicating that the memory card 1 is busy. Thereafter, a high level signal is output to the R / B pin after a predetermined time, indicating that the ready state has been reached.

しかしながら、図19におけるR/Bピンの状態は、あくまでもホスト装置20に対してメモリカード1がどのような状態かを示すものである。つまり、図19において、プログラムコマンド10Hの入力に応答して、R/Bピンがビジー状態(つまりロウレベルを出力)を示したとしても、メモリカード1内部でNANDフラッシュメモリ4に対する書込動作(つまり、ページバッファからメモリセルアレイへのデータ転送)が実際に行われているとは限らない。また、R/Bピンがレディ状態に復帰したとしても、メモリカード1内部でNANDフラッシュメモリ4に対する書込動作が実際に完了しているとは限らない。   However, the state of the R / B pin in FIG. 19 only indicates the state of the memory card 1 with respect to the host device 20. That is, in FIG. 19, even if the R / B pin indicates a busy state (that is, outputs a low level) in response to the input of the program command 10H, the write operation (that is, the NAND flash memory 4) within the memory card 1 (that is, Data transfer from the page buffer to the memory cell array is not always actually performed. Even if the R / B pin returns to the ready state, the writing operation to the NAND flash memory 4 in the memory card 1 is not always completed.

図20は、本実施の形態のメモリカード1内のNANDフラッシュメモリ4に対して、当該メモリカード1内のコントローラB3が書き込みを行う際のNANDフラッシュメモリ4のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。   FIG. 20 shows the NAND flash memory 4 in the memory card 1 of the present embodiment with the I / O pin and R / B pin of the NAND flash memory 4 when the controller B3 in the memory card 1 performs writing. It is a timing chart which shows the example of the signal input / output.

コントローラB3は、NANDフラッシュメモリ4は256kByteの消去ブロックサイズを有する不揮発性メモリであると認識している。同様に、コントローラA2もNANDフラッシュメモリ4は256kByteの消去ブロックサイズを有する不揮発性メモリであると認識している。例えば、NANDフラッシュメモリ4に対する書込の際には、コントローラB3は、シリアルデータインプットコマンド80H(Hは16進を示す)をI/Oピン1〜8へ入力する。次に、コントローラB3は、カラムアドレスC/A及びページアドレスP/Aを、I/Oピン1〜8へ入力する。なお、ここでカラムアドレスC/A及びページアドレスP/Aは、コントローラB3がNANDフラッシュメモリ4に対して想定している実物理アドレス空間におけるカラムアドレス及びページアドレスとは必ずしも一致していない。   The controller B3 recognizes that the NAND flash memory 4 is a non-volatile memory having an erase block size of 256 kBytes. Similarly, the controller A2 recognizes that the NAND flash memory 4 is a non-volatile memory having an erase block size of 256 kBytes. For example, when writing to the NAND flash memory 4, the controller B3 inputs a serial data input command 80H (H indicates hexadecimal) to the I / O pins 1-8. Next, the controller B3 inputs the column address C / A and the page address P / A to the I / O pins 1 to 8. Here, the column address C / A and the page address P / A do not necessarily match the column address and the page address in the real physical address space assumed by the controller B3 for the NAND flash memory 4.

更に、コントローラB3は、書込データを、I/Oピン1〜8の個々に対し、2112回入力する。具体的には、コントローラB3は、ライトイネーブルピンへの入力信号を2112回クロッキングしながら、それぞれのI/Oピンに対して2112ビット(すべてのI/Oピン合計で2112バイト)のデータを順次シフトインする。データをシフトインが完了すると、コントローラB3は、プログラムコマンド10HをI/Oピン1〜8へ入力する。これに応答してメモリカード1は、そのR/Bピンにロウレベルの信号を出力し、メモリカード1がビジー状態であることを示す。その後、所定時間後にR/Bピンにハイレベルの信号を出力することでレディ状態になったことを示す。   Further, the controller B3 inputs write data 2112 times for each of the I / O pins 1 to 8. Specifically, the controller B3 clocks the input signal to the write enable pin 2112 times and outputs 2112 bits of data for each I / O pin (2112 bytes in total for all I / O pins). Shift in sequentially. When the data shift-in is completed, the controller B3 inputs a program command 10H to the I / O pins 1-8. In response to this, the memory card 1 outputs a low level signal to its R / B pin, indicating that the memory card 1 is busy. Thereafter, a high level signal is output to the R / B pin after a predetermined time, indicating that the ready state has been reached.

図20におけるR/Bピンの状態は、コントローラB3に対してNANDフラッシュメモリ4が実際にどのような状態かを示すものである。   The state of the R / B pin in FIG. 20 indicates what state the NAND flash memory 4 is actually with respect to the controller B3.

なお、上記図19及び図20においては、カラムアドレスC/A及びページアドレスP/Aの入力それぞれを1つのサイクルで示しているが、メモリカード1の容量またはNANDフラッシュメモリ4の容量に応じて、適宜2サイクル以上になる場合もある。   In FIG. 19 and FIG. 20, the column address C / A and the page address P / A are each input in one cycle, but depending on the capacity of the memory card 1 or the capacity of the NAND flash memory 4 In some cases, the number of cycles may be two or more.

図21は、本実施の形態のメモリカード1の使用方法を模式的に示す図である。   FIG. 21 is a diagram schematically showing a method of using the memory card 1 of the present embodiment.

例えば、ホスト装置20に予め搭載されているコントローラが、16kByteの消去ブロック単位を有する小ブロックカード100の使用を前提としているものとする。この場合、メモリカード内に適切なコントローラを内蔵することなく256kByteの消去ブロック単位を有するメモリを使用して大ブロックカードを実現すると、消去単位が異なることから正常なアクセスができない虞がある。これに対し、本実施の形態に基づき256kByteの消去ブロック単位を有するメモリ用のコントローラB3を含む大ブロックカード1を実現すれば、小ブロックカード対応のホスト装置20に対しても大ブロックカード1を挿入して使用することが可能となる。   For example, it is assumed that the controller mounted in advance in the host device 20 is premised on the use of the small block card 100 having an erase block unit of 16 kbytes. In this case, if a large block card is realized using a memory having an erase block unit of 256 kBytes without incorporating an appropriate controller in the memory card, there is a possibility that normal access cannot be performed because the erase unit is different. On the other hand, if the large block card 1 including the memory controller B3 having an erase block unit of 256 kBytes is realized based on the present embodiment, the large block card 1 can be used for the host device 20 corresponding to the small block card. It can be inserted and used.

このように本実施の形態によれば、小ブロックカードをアクセス対象とするホスト装置20側から送られてくる書込コマンドに付随されている情報から連続する論理ブロックアドレスを取得して、大ブロックカードの物理ブロック内において小ブロックカードの論理ブロックアドレスの順にデータを配置することによりデータ配置の最適化を実現し、書込時のオーバーヘッドの削減を実現している。また、小ブロックカードの物理・論理ブロックアドレス及び大ブロックカードの物理ブロックアドレスの対応関係を管理することにより、小ブロックカードと大ブロックカードの整合性を効率的に維持することができる。また、ホスト装置20からの消去コマンドに対しても、それを実際に大ブロックカードの消去ブロックサイズの一部に反映させる(部分的に消去状態とする)のではなく、あたかもメモリカード内の該当消去ブロックが消去されたように振る舞うことにより、大ブロックカード内部の操作負荷を軽減することが可能となる。   As described above, according to the present embodiment, a continuous logical block address is acquired from information attached to a write command sent from the host device 20 side to which a small block card is to be accessed, and a large block card is obtained. Data placement is optimized by arranging data in the order of logical block addresses of small block cards in the physical block of the card, thereby reducing overhead during writing. Also, by managing the correspondence between the physical / logical block address of the small block card and the physical block address of the large block card, the consistency between the small block card and the large block card can be efficiently maintained. Also, the erase command from the host device 20 is not actually reflected in a part of the erase block size of the large block card (partially erased), but as if it is in the memory card. By acting as if the erase block has been erased, it is possible to reduce the operation load inside the large block card.

また、本実施の形態のメモリカード1では、メモリカード1全体の動作を制御するコントローラA2と、NANDフラッシュメモリ4に対するアクセス処理を制御するコントローラB3とを有する構成とした。コントローラB3は、NANDバス12によりコントローラA2と接続して、コントローラB3がコントローラA2に対してNANDフラッシュメモリとして認識されるように構成した。このため、例えば、NANDフラッシュメモリ4の世代が変更されて、NANDバス13を介して行われる制御コマンド等のプロトコルが変更されたり、信頼性を維持するためのECC回路33を変更する必要が発生した場合等は、コントローラB3のNAND_I/F34及びECC回路33を変更することにより、コントローラA2やホストバス11に接続されるホスト装置20に変更を加えずにメモリカード1を再構築することが可能になる。   In addition, the memory card 1 of the present embodiment has a configuration including a controller A2 that controls the operation of the entire memory card 1 and a controller B3 that controls access processing to the NAND flash memory 4. The controller B3 is connected to the controller A2 via the NAND bus 12 so that the controller B3 is recognized as a NAND flash memory by the controller A2. For this reason, for example, when the generation of the NAND flash memory 4 is changed, a protocol such as a control command performed via the NAND bus 13 needs to be changed, or the ECC circuit 33 for maintaining reliability needs to be changed. In such a case, by changing the NAND_I / F 34 and the ECC circuit 33 of the controller B3, the memory card 1 can be reconstructed without changing the controller A2 or the host device 20 connected to the host bus 11. become.

なお、上記図1に示したメモリカード1を構築する際には、2つのコントローラA2,B3とNANDフラッシュメモリ4を別々のパッケージとして構成しても良い。例えば、図22に示すように、メモリカード1は、コントローラA2を含むコントローラチップ201と、コントローラB3及びNANDフラッシュメモリ4を含むメモリチップ202として構成しても良い。このように構成することにより、NANDフラッシュメモリ4の世代が変わっても、メモリチップ202を交換するだけで、メモリカード1全体に影響を与えずにメモリカード1を再構築することが可能になる。   When constructing the memory card 1 shown in FIG. 1, the two controllers A2 and B3 and the NAND flash memory 4 may be configured as separate packages. For example, as shown in FIG. 22, the memory card 1 may be configured as a controller chip 201 including a controller A2 and a memory chip 202 including a controller B3 and a NAND flash memory 4. With this configuration, even if the generation of the NAND flash memory 4 changes, it is possible to reconstruct the memory card 1 without affecting the entire memory card 1 simply by replacing the memory chip 202. .

(第2の実施の形態)
本第2の実施の形態では、NANDバス12とNANDバス13を直接接続する経路を形成する構成としたコントローラBを有するメモリカードを提供する。図23は、本発明のメモリシステムを適用した第2の実施の形態に係るメモリカードの概略構成を示す図である。なお、図23において、上記第1の実施の形態において図22に示したメモリカード1と同一の構成部分には同一の符号を付しており、その同一構成の構成説明は省略する。
(Second Embodiment)
In the second embodiment, a memory card having a controller B configured to form a path for directly connecting the NAND bus 12 and the NAND bus 13 is provided. FIG. 23 is a diagram showing a schematic configuration of a memory card according to the second embodiment to which the memory system of the present invention is applied. In FIG. 23, the same components as those of the memory card 1 shown in FIG. 22 in the first embodiment are denoted by the same reference numerals, and the description of the same configuration is omitted.

図23に示すように、メモリカード200は、コントローラA2を含むコントローラチップ201と、コントローラB2021及びNANDフラッシュメモリ4を含むメモリチップ202とを有する。コントローラA2は、ホストバス11によりホスト装置20に接続され、NANDバス12によりコントローラB2021に接続されている。コントローラB2021は、NANDバス12によりコントローラA2に接続され、NANDバス13によりNANDフラッシュメモリ4に接続されている。NANDフラッシュメモリ4は、NANDバス13によりコントローラB3に接続されている。なお、NANDフラッシュメモリ4は、一つのメモリセルに1ビットのデータを記憶する2値メモリであっても良いし、一つのメモリセルに1ビットより多いデータ(例えば、2ビット)を記憶する多値メモリであっても良い。ここでは、不揮発性メモリの例としてNAND型フラッシュメモリを挙げて説明するが、不揮発性メモリはNAND型フラッシュメモリに限らず、例えば、NOR型フラッシュメモリ等でもよい。   As shown in FIG. 23, the memory card 200 includes a controller chip 201 including a controller A2 and a memory chip 202 including a controller B2021 and the NAND flash memory 4. The controller A2 is connected to the host device 20 via the host bus 11, and is connected to the controller B2021 via the NAND bus 12. The controller B 2021 is connected to the controller A 2 via the NAND bus 12 and connected to the NAND flash memory 4 via the NAND bus 13. The NAND flash memory 4 is connected to the controller B3 by a NAND bus 13. The NAND flash memory 4 may be a binary memory that stores 1-bit data in one memory cell, or may store multiple data (for example, 2 bits) larger than 1 bit in one memory cell. It may be a value memory. Here, a NAND flash memory will be described as an example of the nonvolatile memory. However, the nonvolatile memory is not limited to the NAND flash memory, and may be a NOR flash memory, for example.

本第2の実施の形態では、ホスト装置20は、メモリカード200の出荷テスト時において、テスタとしてメモリカード200と電気的に接続されるものとする。コントローラB2021は、NAND_I/F31が受け取ったアドレスを変換し、この変換したアドレスを用いてNANDフラッシュメモリ4にアクセスする第1モードと、NAND_I/F31が受け取ったアドレスを用いてNANDフラッシュメモリ4に直接アクセスする第2モードとで動作し、第1モードと第2モードとの動作モードの切り替えをコマンドに応じて制御する。   In the second embodiment, it is assumed that the host device 20 is electrically connected to the memory card 200 as a tester during a shipping test of the memory card 200. The controller B 2021 converts the address received by the NAND_I / F 31, accesses the NAND flash memory 4 using the converted address, and directly accesses the NAND flash memory 4 using the address received by the NAND_I / F 31. And switching the operation mode between the first mode and the second mode according to the command.

以下において、第1モードから第2モードへの切り替え動作を移行動作と呼び、第2モードから第1モードへの切り替え動作を復帰動作と呼ぶ。なお、「第1モード」とは、ホスト装置20がNANDフラッシュメモリ4に直接アクセスしない動作モードであり、メモリカード200を実際に使用する時と同様の動作モードを意味する。   Hereinafter, the switching operation from the first mode to the second mode is referred to as a transition operation, and the switching operation from the second mode to the first mode is referred to as a return operation. The “first mode” is an operation mode in which the host device 20 does not directly access the NAND flash memory 4 and means an operation mode similar to that when the memory card 200 is actually used.

出荷テスト時において、ホスト装置20は、コントローラB2021とNANDフラッシュメモリ4を個別にテストする。以下の説明では、コントローラB2021のみを対象にして実行するテストを「コントローラ単体テスト」、NANDフラッシュメモリ4のみを対象にして実行するテストを「NAND単体テスト」とそれぞれ呼ぶ。コントローラ単体テスト時においては、動作モードが第1モードに設定され、NAND単体テスト時においては、動作モードが第2モードに設定される。   During the shipping test, the host device 20 individually tests the controller B 2021 and the NAND flash memory 4. In the following description, a test executed only for the controller B 2021 is called a “controller unit test”, and a test executed only for the NAND flash memory 4 is called a “NAND unit test”. In the controller unit test, the operation mode is set to the first mode, and in the NAND unit test, the operation mode is set to the second mode.

NANDフラッシュメモリ4は、例えば、1Gビット以上の記憶容量を有し、消去単位である消去ブロックサイズが256kByteに設定され、データの書き込み及び読み出しは16kByte単位で行われるものとする。なお、NANDフラッシュメモリ4は、例えば、0.09μmプロセス技術を用いて製造され、デザインルールは0.1μm未満であるものとする。   For example, the NAND flash memory 4 has a storage capacity of 1 Gbit or more, an erase block size as an erase unit is set to 256 kbytes, and data writing and reading are performed in 16 kbyte units. The NAND flash memory 4 is manufactured using, for example, a 0.09 μm process technology, and the design rule is less than 0.1 μm.

コントローラB2021は、図24に示すように、NAND_I/F31、バッファRAM32、ECC回路33、NAND_I/F34、CPU35、ROM36、及びアクセス経路設定部2022を有する。   As shown in FIG. 24, the controller B 2021 includes a NAND_I / F 31, a buffer RAM 32, an ECC circuit 33, a NAND_I / F 34, a CPU 35, a ROM 36, and an access path setting unit 2022.

CPU35は、NANDフラッシュメモリ4に対するアクセス処理を制御するものである。CPU35は、第1モードにおいて、ROM36内に格納されているファームウェアをバッファRAM32にロードして所定の処理を実行する。CPU35は、第1モード時に実行する処理により、各種のテーブルをバッファRAM32内に作成し、ホスト装置20から書込コマンド、読出コマンド、及び消去コマンドを受け付けてNANDフラッシュメモリ4に対するアクセスを実行し、バッファRAM32を通じたデータ転送処理を制御する。   The CPU 35 controls access processing to the NAND flash memory 4. In the first mode, the CPU 35 loads firmware stored in the ROM 36 into the buffer RAM 32 and executes predetermined processing. The CPU 35 creates various tables in the buffer RAM 32 by processing executed in the first mode, receives write commands, read commands, and erase commands from the host device 20 and executes access to the NAND flash memory 4, Data transfer processing through the buffer RAM 32 is controlled.

アクセス経路設定部2022は、第2モードにおいて、ホスト装置20がNANDフラッシュメモリ4に直接アクセスするアクセス経路を設定する。図24に示すように、アクセス経路設定部2022は、NAND_I/F31及びバッファRAM32の間に接続された第1のスイッチSW1と、ECC回路33及びNAND_I/F34の間に接続された第2のスイッチSW2を有する。第1及び第2のスイッチSW1,SW2は、CPU35から入力される切り替え制御信号に応じて、NAND_I/F31、バッファRAM32、ECC回路33及びNAND_I/F34の接続関係を切り替える。この切り替えにより、第2モードでは、書込データ及び読出データ等がバッファRAM32及びECC回路33を迂回し、且つホスト装置20が発行するコマンド等をNANDフラッシュメモリ4に直接伝達できる。   The access path setting unit 2022 sets an access path for the host device 20 to directly access the NAND flash memory 4 in the second mode. As shown in FIG. 24, the access path setting unit 2022 includes a first switch SW1 connected between the NAND_I / F 31 and the buffer RAM 32, and a second switch connected between the ECC circuit 33 and the NAND_I / F 34. It has SW2. The first and second switches SW1 and SW2 switch the connection relationship of the NAND_I / F 31, the buffer RAM 32, the ECC circuit 33, and the NAND_I / F 34 according to the switching control signal input from the CPU 35. By this switching, in the second mode, write data, read data, etc. can bypass the buffer RAM 32 and the ECC circuit 33, and commands issued by the host device 20 can be directly transmitted to the NAND flash memory 4.

以上のように、コントローラB2021は、移行動作と復帰動作をコマンドに応じて制御する構成としているため、メモリカード200の外部接続ピン数を増加させることなく第2モードを実現することができる。   As described above, since the controller B 2021 is configured to control the transition operation and the return operation according to the command, the second mode can be realized without increasing the number of external connection pins of the memory card 200.

メモリカード200の外部接続ピンの配置例を図25に示す。図25は、メモリカード200をピン形成面から見た平面図である。メモリカード200は、第1〜第18ピンP1〜P18の合計18個の外部接続ピンを有している。第1〜第18ピンP1〜P18の各ピンと各ピンに割り当てられる信号例を図26に示す。なお、図26の属性“タイプ”において、記号“S”は電源電圧を示し、記号“I”はメモリカード200への入力であることを示し、記号“O”はメモリカード200からの出力であることを示し、記号“I/O”はメモリカード200に対する入出力であることを示す。また、ピン名(記号名)の先頭に付した記号“−”は、ロウ・トゥルー信号であること、すなわち、“Low”レベルの時に活性化する信号であることを示す。   An arrangement example of the external connection pins of the memory card 200 is shown in FIG. FIG. 25 is a plan view of the memory card 200 as viewed from the pin forming surface. The memory card 200 has a total of 18 external connection pins of first to 18th pins P1 to P18. FIG. 26 shows an example of signals assigned to the first to eighteenth pins P1 to P18 and the pins. In the attribute “type” of FIG. 26, the symbol “S” indicates a power supply voltage, the symbol “I” indicates an input to the memory card 200, and the symbol “O” indicates an output from the memory card 200. The symbol “I / O” indicates an input / output to / from the memory card 200. The symbol “-” added to the head of the pin name (symbol name) indicates that the signal is a low true signal, that is, a signal that is activated at the “Low” level.

図26において、第1及び第9ピンP1,P9は接地電圧GNDに、第18ピンP18は電源電圧Vccにそれぞれ割り当てられている。   In FIG. 26, the first and ninth pins P1, P9 are assigned to the ground voltage GND, and the eighteenth pin P18 is assigned to the power supply voltage Vcc.

第2ピンP2は、メモリカード200の内部動作状態をホスト装置20に知らせるためのレディ/ビジー(R/−B)信号に割り当てられている。メモリカード200内において、データの書き込み、読み出し、及び消去時等の動作実行中は第2ピンP2からビジー信号が出力され、動作が完了すると第2ピンP2からレディ信号が出力される。   The second pin P2 is assigned to a ready / busy (R / -B) signal for notifying the host device 20 of the internal operation state of the memory card 200. In the memory card 200, a busy signal is output from the second pin P2 during operations such as data writing, reading, and erasing, and a ready signal is output from the second pin P2 when the operation is completed.

第3ピンP3は、メモリカード200からデータを出力させるリード・イネーブル(−RE)信号に、第4ピンP4は、メモリカード200を動作可能状態にするカード・イネーブル(−CE)信号にそれぞれ割り当てられている。   The third pin P3 is assigned to a read enable (-RE) signal for outputting data from the memory card 200, and the fourth pin P4 is assigned to a card enable (-CE) signal for making the memory card 200 operable. It has been.

第5ピンP5は、コマンドの取り込みを制御するためのコマンド・ラッチ・イネーブル(CLE)信号に、第6ピンP6は、アドレスの取り込みを制御するためのアドレス・ラッチ・イネーブル(ALE)信号にそれぞれ割り当てられている。   The fifth pin P5 is a command latch enable (CLE) signal for controlling command fetching, and the sixth pin P6 is an address latch enable (ALE) signal for controlling address fetching. Assigned.

第7ピンP7は、データをメモリカード200に書き込むためのライト・イネーブル(−WE)信号に、第8ピンP8は、書き込み及び消去を強制的に禁止させるためのライト・プロテクト(−WP)信号にそれぞれ割り当てられている。   The seventh pin P7 is a write enable (-WE) signal for writing data to the memory card 200, and the eighth pin P8 is a write protect (-WP) signal for forcibly prohibiting writing and erasing. Assigned to each.

第10〜第17ピンP10〜P17は、コマンド、アドレス、及びデータの各ビットD0〜D7にそれぞれ割り当てられている。なお、図26に示した外部接続ピンの配置例は、図24に示したホストバス11に接続されたコントローラA2内のホストI/F21(図2参照)が有するピン(図示せず)と1対1で対応するものである。   The tenth to seventeenth pins P10 to P17 are assigned to the bits D0 to D7 of the command, address, and data, respectively. The example of the arrangement of the external connection pins shown in FIG. 26 is the same as the pin (not shown) of the host I / F 21 (see FIG. 2) in the controller A2 connected to the host bus 11 shown in FIG. One-to-one correspondence.

一方、NANDフラッシュメモリ4及びNAND_I/F34は、図26に示したホストI/F21が有するピンと同様のピン構成を有している。具体的には、NANDフラッシュメモリ4及びNAND_I/F34は、コマンド、アドレス、及びデータが入出力される入出力(I/O)ピン1〜8と、レディ・ビジー信号を出力するR/−Bピンと、リード・イネーブル信号が入力される−REピンと、チップ・イネーブル信号が入力される−CEピンと、コマンド・ラッチ・イネーブル信号が入力されるCLEピンと、アドレス・ラッチ・イネーブル信号が入力されるALEピンと、ライト・イネーブル信号が入力される−WEピンと、ライト・プロテクト信号が入力される−WPピンと、を備える。   On the other hand, the NAND flash memory 4 and the NAND_I / F 34 have the same pin configuration as that of the host I / F 21 shown in FIG. Specifically, the NAND flash memory 4 and the NAND_I / F 34 output input / output (I / O) pins 1 to 8 for inputting / outputting commands, addresses, and data, and R / -B for outputting a ready / busy signal. A pin, a -RE pin to which a read enable signal is input, a -CE pin to which a chip enable signal is input, a CLE pin to which a command latch enable signal is input, and an ALE to which an address latch enable signal is input A pin, a -WE pin to which a write enable signal is input, and a -WP pin to which a write protect signal is input.

以上のように、メモリカード200は、NANDフラッシュメモリ4のピン構成に対応したピン構成を有しており、ホスト装置20がNANDフラッシュメモリ4に対するコマンドシーケンスによりメモリカード200にアクセスを行うことが可能である。ここで、「コマンドシーケンス」とは、1つのコマンドとアドレス等との組み合わせ、複数のコマンドの組み合わせ、あるいは、コマンド、アドレス、データを何れかもしくは全てを1つ又は複数組み合わせたものを意味する。   As described above, the memory card 200 has a pin configuration corresponding to the pin configuration of the NAND flash memory 4, and the host device 20 can access the memory card 200 by a command sequence for the NAND flash memory 4. It is. Here, the “command sequence” means a combination of one command and an address, a combination of a plurality of commands, or a combination of any one or all of commands, addresses, and data.

上述したように、コントローラB2021は、移行動作と復帰動作をコマンドに応じて制御する。しかし、コントローラB2021は、ホスト装置20から入力される移行動作及び復帰動作に係るコマンドを書き込みコマンドや読み出しコマンドと認識して誤動作する虞がある。また、ホスト装置20から復帰動作を指示するコマンド(例えば、“FFh”コマンド(h;16進を示す))と同一のアドレス又はデータが入力された場合、コントローラB2021は、意図しない復帰動作を実行する虞がある。   As described above, the controller B 2021 controls the transition operation and the return operation according to the command. However, the controller B 2021 may recognize a command related to the transition operation and the return operation input from the host device 20 as a write command or a read command and malfunction. In addition, when the same address or data as a command (for example, “FFh” command (h; indicating hexadecimal)) instructing a return operation is input from the host device 20, the controller B2021 executes an unintended return operation. There is a risk of doing.

そこで、本第2の実施の形態では、コントローラB2021がホスト装置20から入力されるコマンドシーケンスにより移行動作及び復帰動作を制御することにより、コントローラB2021の誤動作を回避することを可能にする。具体的には、NAND単体テストを実行する場合、ホスト装置20は、メモリカード200の電源投入後、移行動作を指示するコマンドシーケンスを発行する。コントローラB2021は、当該コマンドシーケンス受け付けることより動作モードを第2モードに設定し、ホスト装置20から復帰動作を指示するコマンドシーケンスが発行されるまで第2モードを維持する。
このようにコマンドシーケンスを用いることにより、コントローラB2021が第2モード中に意図しない復帰動作を実行することを回避できる。
Therefore, in the second embodiment, the controller B 2021 controls the transition operation and the return operation according to the command sequence input from the host device 20, thereby making it possible to avoid the malfunction of the controller B 2021. Specifically, when executing the NAND unit test, the host device 20 issues a command sequence for instructing a migration operation after the memory card 200 is powered on. The controller B 2021 sets the operation mode to the second mode by receiving the command sequence, and maintains the second mode until a command sequence instructing the return operation is issued from the host device 20.
By using the command sequence in this way, it is possible to avoid the controller B 2021 from executing an unintended return operation during the second mode.

更に、ホスト装置20は、第1モードにおいて、消去ブロックサイズが16kByteに設定されているNANDフラッシュメモリ4を使用することを前提として、16kByte単位で論理アドレス及び物理アドレスの割り当てを行う。ホスト装置20は、第1モードにおいて、論理アドレス16kByte分に関してシーケンシャルに書き込みアクセス又は読み出しアクセスを行うため、該当するコマンドを発行する。なお、以下の説明において使用する用語「論理ブロックアドレス」及び「物理ブロックアドレス」は、それぞれ、NANDフラッシュメモリ4内のブロック自体に割り当てられる論理アドレス、物理アドレスを意味するものである。また、「論理アドレス」、「物理アドレス」は、主に、ブロック自体の論理アドレス、物理アドレスを意味するものであるが、ブロック単位よりも細かい分解能の単位に相当するアドレスである場合もあり得る。   Further, in the first mode, the host device 20 assigns logical addresses and physical addresses in units of 16 kbytes on the assumption that the NAND flash memory 4 whose erase block size is set to 16 kbytes is used. In the first mode, the host device 20 issues a corresponding command in order to perform sequential write access or read access for the logical address of 16 kbytes. Note that the terms “logical block address” and “physical block address” used in the following description mean a logical address and a physical address assigned to the block itself in the NAND flash memory 4, respectively. Further, “logical address” and “physical address” mainly mean the logical address and physical address of the block itself, but may be an address corresponding to a unit of resolution smaller than the block unit. .

また、ホスト装置20は、メモリカード200内部の物理状態、例えば、何処の物理ブロックアドレスに、何番番目の論理セクタアドレスデータが含まれているか、あるいは何処のブロックが消去状態であるか等を管理し、メモリカード200内のNANDフラッシュメモリ4を直接制御するものとして構築されている。   The host device 20 also determines the internal physical state of the memory card 200, for example, what physical block address contains the number of logical sector address data, or what block is in the erased state. It is constructed to manage and directly control the NAND flash memory 4 in the memory card 200.

消去ブロックサイズが16kByteに設定されているNANDフラッシュメモリ4を使用することを想定してホスト装置20が動作する場合、NANDフラッシュメモリ4の実際の消去ブロックサイズは256kByteであるため、メモリカード200は正常に応答できずに誤動作することになる。   When the host device 20 operates assuming that the NAND flash memory 4 whose erase block size is set to 16 kbytes is used, the actual erase block size of the NAND flash memory 4 is 256 kbytes. It cannot operate normally and malfunctions.

このメモリカード200の誤動作を回避するため、コントローラB2021は、第1モードにおいて、ホスト装置20がNANDフラッシュメモリ4の消去ブロックサイズよりも小さい消去ブロックサイズを想定して発行するコマンドシーケンスを処理し、NANDフラッシュメモリ4に対する書き込み、読み出し、及び消去の各動作を制御する。   In order to avoid this malfunction of the memory card 200, the controller B 2021 processes a command sequence issued by the host device 20 assuming an erase block size smaller than the erase block size of the NAND flash memory 4 in the first mode, Controls write, read, and erase operations on the NAND flash memory 4.

図27を用いて、ホスト装置20が想定しているNANDフラッシュメモリと、実際に使用するNANDフラッシュメモリ4とのデータ配置の差異を説明する。   The difference in data arrangement between the NAND flash memory assumed by the host device 20 and the NAND flash memory 4 actually used will be described with reference to FIG.

ホスト装置20が想定しているNANDフラッシュメモリでは、各ページが512Byte分のデータ記憶部と、16Byte分の冗長部とからなる528Byteの記憶容量を有しており、32ページ分が1つの消去単位(16kByte+0.5kByte)となる。以下では、説明の便宜上、このようなページ構成のNANDフラッシュメモリを搭載したメモリカードを「小ブロックカード」と称する場合がある。   In the NAND flash memory assumed by the host device 20, each page has a storage capacity of 528 bytes consisting of a data storage part for 512 bytes and a redundant part for 16 bytes, and 32 pages have one erasure unit. (16 kByte + 0.5 kByte). Hereinafter, for convenience of explanation, a memory card equipped with a NAND flash memory having such a page configuration may be referred to as a “small block card”.

一方、実際に使用するNANDフラッシュメモリ4では、各ページは、例えば、512Byte分のデータ記憶部が4つと、10Byte分の冗長部が4つと、24Byte分の管理データ記憶部とからなる2112Byteの記憶容量を有しており、128ページ分が1つの消去単位(256kByte+8kByte)となる。以下では、説明の便宜上、このようなページ構成のNANDフラッシュメモリ4を搭載したメモリカード200を「大ブロックカード」と称する場合がある。   On the other hand, in the NAND flash memory 4 that is actually used, each page has, for example, a storage of 2112 bytes including four data storage units for 512 bytes, four redundant units for 10 bytes, and a management data storage unit for 24 bytes. It has a capacity, and 128 pages are one erasure unit (256 kByte + 8 kByte). Hereinafter, for convenience of explanation, the memory card 200 on which the NAND flash memory 4 having such a page configuration is mounted may be referred to as a “large block card”.

また、図27に示すように、ホスト装置20が想定しているNANDフラッシュメモリ及び実際に使用するNANDフラッシュメモリ4は、NANDフラッシュメモリへのデータ入出力を行うためのページバッファ401,402をそれぞれ備えている。ホスト装置20が想定しているNANDフラッシュメモリに備えられるページバッファ401の記憶容量は、528Byte(512Byte+16Byte)である。一方、実際に使用するNANDフラッシュメモリ4に備えられるページバッファ402の記憶容量は、2112Byte(2048Byte+64Byte)である。データ書き込み等の際には、NANDフラッシュメモリに対するデータ入出力は、各ページバッファ401,402の記憶容量に相当する1ページ単位で実行される。   As shown in FIG. 27, the NAND flash memory assumed by the host device 20 and the NAND flash memory 4 actually used include page buffers 401 and 402 for inputting / outputting data to / from the NAND flash memory, respectively. I have. The storage capacity of the page buffer 401 provided in the NAND flash memory assumed by the host device 20 is 528 bytes (512 bytes + 16 bytes). On the other hand, the storage capacity of the page buffer 402 included in the NAND flash memory 4 that is actually used is 2112 bytes (2048 bytes + 64 bytes). At the time of data writing or the like, data input / output with respect to the NAND flash memory is executed in units of one page corresponding to the storage capacity of each of the page buffers 401 and 402.

上述したように、ホスト装置20が想定しているNANDフラッシュメモリと実際に使用するNANDフラッシュメモリ4は、ページ構成が異なるため、コントローラB2021は、ホスト装置20がNANDフラッシュメモリ4にアクセス可能とするための各種処理を実行する。   As described above, since the NAND flash memory 4 that the host device 20 assumes and the NAND flash memory 4 that is actually used have different page configurations, the controller B 2021 allows the host device 20 to access the NAND flash memory 4. Various processes are executed.

ホスト装置20及びメモリカード200内のコントローラB2021の各機能構成例を図28に示す。ホスト装置20は、ホスト装置20側のROM(図示せず)等に格納されたプログラムをCPU(図示せず)等にて実行することにより、図28に示すアプリケーション処理部71、ファイルシステム部72、ドライバ部73、及び物理アクセス部74の各機能を実現する。   FIG. 28 shows functional configuration examples of the host device 20 and the controller B 2021 in the memory card 200. The host device 20 executes a program stored in a ROM (not shown) or the like on the host device 20 side by a CPU (not shown) or the like, thereby causing the application processing unit 71 and the file system unit 72 shown in FIG. Each function of the driver unit 73 and the physical access unit 74 is realized.

一方、コントローラB2021は、例えば、ROM36に格納された制御プログラムをCPU35にて実行することにより、図28に示す第1物理アクセス部81、物理/論理変換部82、論理/物理変換部83、及び第2物理アクセス部84の各機能を実現する。   On the other hand, the controller B 2021 executes, for example, a control program stored in the ROM 36 by the CPU 35, whereby the first physical access unit 81, the physical / logical conversion unit 82, the logical / physical conversion unit 83, and the like shown in FIG. Each function of the second physical access unit 84 is realized.

ホスト装置20側のアプリケーション処理部71がファイルの書き込みをファイルシステム部72に要求すると、ファイルシステム部72は、小ブロックカードの論理ブロックアドレスに基づきシーケンシャルなセクタ書き込みをドライバ部73に指示する。これを受けて、ドライバ部73は、小ブロックカードの論理ブロックアドレスに基づく16kByte毎のシーケンシャルな書き込みを実現するため、論理/物理ブロック変換を行い、物理アクセス部74を通じて、小ブロックカードの物理ブロックアドレスによるランダムな書き込みコマンドを大ブロックカードに対して発行し、データ転送を行う。   When the application processing unit 71 on the host device 20 side requests the file system unit 72 to write a file, the file system unit 72 instructs the driver unit 73 to perform sequential sector writing based on the logical block address of the small block card. In response to this, the driver unit 73 performs logical / physical block conversion in order to realize sequential writing every 16 kbytes based on the logical block address of the small block card, and passes the physical block of the small block card through the physical access unit 74. A random write command by address is issued to the large block card to perform data transfer.

書き込みアクセスにおいては、小ブロックカードの場合も大ブロックカードの場合も、プロトコル上、(1)コマンド、(2)ページアドレス(ロウアドレス)、(3)カラムアドレス、(4)データ、(5)プログラム確認コマンド、といった順序で情報の授受が行われる。   In the write access, in the case of a small block card and a large block card, according to the protocol, (1) command, (2) page address (row address), (3) column address, (4) data, (5) Information is exchanged in the order of program confirmation commands.

コントローラB2021側の第1物理アクセス部81は、ホスト装置20から小ブロックカードの物理ブロックアドレスによる書き込みコマンドを受け付けると、物理ブロックアドレスやデータのほか、これに付随する付随データに含まれている論理ブロックアドレスを取得する。   When the first physical access unit 81 on the controller B 2021 side receives a write command based on the physical block address of the small block card from the host device 20, the logical block included in the accompanying data associated with the physical block address and data is received. Get block address.

物理/論理変換部82は、データ読み出しの際に小ブロックカードの物理ブロックアドレス(16kByte分に対応)から小ブロックカードの論理ブロックアドレス(16kByte分に対応)への変換処理を行うための第1テーブルを作成する。第1テーブルは、バッファRAM32の第1テーブル格納領域321に格納される。物理/論理変換部82は、第1物理アクセス部81が書き込みコマンドを受け付けて小ブロックカードの論理ブロックアドレスを取得したときに、その論理ブロックアドレスを第1テーブルに反映させる。また、物理/論理変換部82は、物理ブロックアドレスに関しても第1テーブルに反映させる。   The physical / logical conversion unit 82 performs a first conversion process for converting the physical block address of the small block card (corresponding to 16 kBytes) to the logical block address of the small block card (corresponding to 16 kBytes) when reading data. Create a table. The first table is stored in the first table storage area 321 of the buffer RAM 32. When the first physical access unit 81 receives the write command and acquires the logical block address of the small block card, the physical / logical conversion unit 82 reflects the logical block address in the first table. Further, the physical / logical conversion unit 82 also reflects the physical block address in the first table.

論理/物理変換部83は、データ読み出しの際に小ブロックカードの論理ブロックアドレス(シーケンシャルな16kByte×16個分に対応)から大ブロックカードの物理ブロックアドレス(256kByte物理ブロック分に対応)への変換処理を行うための第2テーブルを作成する。第2テーブルは、バッファRAM32の第2テーブル格納領域322に格納される。論理/物理変換部83は、第1物理アクセス部81が書き込みコマンドを受け付けて小ブロックカードの論理ブロックアドレスを取得したときに、その論理ブロックアドレスを第2テーブルに反映させる。   The logical / physical conversion unit 83 converts the logical block address of the small block card (corresponding to 16 sequential 16 kbytes) to the physical block address of the large block card (corresponding to 256 kbyte physical blocks) when reading data. A second table for processing is created. The second table is stored in the second table storage area 322 of the buffer RAM 32. When the first physical access unit 81 receives a write command and acquires the logical block address of the small block card, the logical / physical conversion unit 83 reflects the logical block address in the second table.

第2物理アクセス部84は、第1物理アクセス部81が書き込みコマンドを受け付けて取得した小ブロックカードの論理ブロックアドレスに基づき、NANDフラッシュメモリ4内部のデータ配置を決定し、256kByte物理ブロック内において2kByte(1ページ)単位でシーケンシャルに16kByte分のデータを書き込む。また、第2物理アクセス部84は、取得した小ブロックカードの論理ブロックアドレスや物理ブロックアドレスをNANDフラッシュメモリ4内部における管理データ領域内の所定の領域に格納する。   The second physical access unit 84 determines the data arrangement inside the NAND flash memory 4 based on the logical block address of the small block card acquired by the first physical access unit 81 receiving the write command, and 2 kBytes in the 256 kByte physical block. Data for 16 kBytes is written sequentially in units of (1 page). The second physical access unit 84 stores the acquired logical block address and physical block address of the small block card in a predetermined area in the management data area in the NAND flash memory 4.

このように、ホスト装置20は小ブロックカードの物理ブロックアドレスに基づくコマンドを発行するため、メモリカード200側では、小ブロックカードの物理ブロックアドレスに対応するデータが何処の256kByte物理ブロックの内に存在するかが分かるように管理する。具体的には、コントローラB2021は、16kByteブロック毎に小ブロックカードの論理/物理ブロックアドレスの対応関係を管理するともに、小ブロックカードの連続した256kByte分の論理ブロックアドレスに対応するデータがメモリカード200のNANDフラッシュメモリ4内の何処の256kByte物理ブロックに格納されているかが分かるように管理する。   As described above, since the host device 20 issues a command based on the physical block address of the small block card, on the memory card 200 side, data corresponding to the physical block address of the small block card exists in any 256 kByte physical block. Manage so that you know what to do. Specifically, the controller B 2021 manages the correspondence relationship between the logical / physical block addresses of the small block card for every 16 kByte block, and data corresponding to the logical block addresses for 256 kBytes of the continuous small block card is stored in the memory card 200. The NAND flash memory 4 is managed so that it can be seen where it is stored in a 256 kByte physical block.

次に、図29を参照してホスト装置20からメモリカード200に送られるコマンドのフォーマット例を説明する。ホスト装置20から送られるコマンドのパケットは、図29(a)に示すように、コマンド種別情報(例えば、書込コマンド)と、アドレス(物理ブロックアドレス)と、データ(コンテンツ等の実データ及び付随データ(512Byte+16Byte))といった各種情報を含んでいる。   Next, a format example of a command sent from the host device 20 to the memory card 200 will be described with reference to FIG. As shown in FIG. 29A, the command packet sent from the host device 20 includes command type information (for example, a write command), an address (physical block address), and data (actual data such as contents and accompanying data). Various information such as data (512 bytes + 16 bytes) is included.

このようなフォーマットのパケットでは、図29(b)に示すように、付随データ16Byte中の所定の位置に小ブロックカードの論理ブロックアドレス(アクセス対象となる16kByteブロックに対応する論理アドレス)が配置されている。メモリカード200は、ホスト装置20から送られるコマンドからコマンド種別情報、物理ブロックアドレス、及びデータを取得するほか、特に論理ブロックアドレスを取得する。なお、論理ブロックアドレスは、読み出しコマンドの場合には付加されない。   In the packet of such a format, as shown in FIG. 29B, the logical block address of the small block card (logical address corresponding to the 16 kByte block to be accessed) is arranged at a predetermined position in the accompanying data 16 bytes. ing. The memory card 200 acquires command type information, a physical block address, and data from a command sent from the host device 20, and particularly acquires a logical block address. The logical block address is not added in the case of a read command.

次に、図30を参照して、第1モードにおいて、ホスト装置20が想定しているブロック書き込み操作と、メモリカード200が実際に行う書き込み処理とを対比して説明する。   Next, with reference to FIG. 30, the block write operation assumed by the host device 20 in the first mode and the write process actually performed by the memory card 200 will be compared.

ホスト装置20側では、図30(a)に示すように、小ブロックカードの論理アドレスに基づく16kByteブロック単位のシーケンシャルな書き込み操作の発生時に、小ブロックカードの物理ブロックアドレスによる16kByteブロック単位のランダムな書き込み操作が行われる。   On the host device 20 side, as shown in FIG. 30 (a), when a sequential writing operation in units of 16 kByte blocks based on the logical address of the small block card occurs, random in units of 16 kByte blocks based on the physical block address of the small block card. A write operation is performed.

一方、メモリカード200側では、図30(b)に示すように、ホスト装置20から書き込みコマンドを受け付けた場合、小ブロックカードの論理ブロックアドレスに基づく16kByteブロック単位のデータがNANDフラッシュメモリ4内にシーケンシャルに書き込まれる。   On the other hand, on the memory card 200 side, as shown in FIG. 30B, when a write command is received from the host device 20, 16 kByte block unit data based on the logical block address of the small block card is stored in the NAND flash memory 4. Sequentially written.

上述のように、ホスト装置20は、小ブロックカードの物理アドレスによる16kByteブロック単位のランダムな書き込み操作を行う。このようなランダムな書き込み操作では、一般に、大ブロック(256kByte)の一部のみを書き換える処理が多発する。NANDフラッシュメモリ4では、ブロック単位でしか消去を行えないため、ブロックの一部のみを書き換える場合は、書き換える新データを消去済みの新ブロックに書き込み、新データにより書き換えられる旧ブロックから、書き換えられない残りのデータを新ブロックにコピーする必要がある。   As described above, the host device 20 performs a random writing operation in units of 16 kByte blocks using the physical address of the small block card. In such a random write operation, generally, a process of rewriting only a part of a large block (256 kBytes) frequently occurs. Since the NAND flash memory 4 can be erased only in units of blocks, when only a part of the block is rewritten, new data to be rewritten is written into the erased new block and cannot be rewritten from the old block rewritten with the new data. The remaining data needs to be copied to the new block.

上記のように、ブロックの一部のみを書き換える処理は、書き換えられないデータのコピー動作(巻き添えデータコピー)を伴うため、ブロックの一部のみを書き換える処理が多発すると、オーバーヘッドが増大することになる。そこで、本第2の実施の形態では、ホスト装置20側から得られる論理アドレスの順序に従って、メモリカード200側で物理アドレスを再度割り当てることにより、ブロックの一部のみの書き換えの発生を低減し、オーバーヘッドの増大を抑制可能にしている。   As described above, since the process of rewriting only a part of the block involves a copy operation of data that cannot be rewritten (wrapped data copy), if the process of rewriting only a part of the block occurs frequently, the overhead increases. . Therefore, in the second embodiment, by reassigning physical addresses on the memory card 200 side according to the order of logical addresses obtained from the host device 20 side, the occurrence of rewriting of only a part of the block is reduced, An increase in overhead can be suppressed.

次に、図31を参照して、NANDフラッシュメモリ4のブロックフォーマット(消去単位である256kByte物理ブロック分)について説明する。   Next, with reference to FIG. 31, the block format of the NAND flash memory 4 (for 256 kByte physical blocks as an erase unit) will be described.

NANDフラッシュメモリ4では、消去単位である256kByte物理ブロックの中に、ホスト装置20が管理する単位である16kByteに相当するデータを書き込むためのブロック(以下、「ホスト管理ブロック」という)が16個分含まれている。データ書き込みの際には、小ブロックカードの論理ブロックアドレスの順序に従って個々のデータが配置される。   In the NAND flash memory 4, 16 blocks (hereinafter referred to as “host management block”) for writing data corresponding to 16 kByte, which is a unit managed by the host device 20, are included in the 256 kByte physical block, which is an erase unit. include. When data is written, individual data is arranged according to the order of logical block addresses of the small block card.

各ホスト管理ブロックは、8個のページで構成される。各ページは、512Byteデータ領域を4個分含むと共に、各データ領域に対応する10Byteの誤り訂正符号(ECC)領域を含んでいる。また、ページ中の最後の512Byteデータ領域(4番目の512Byteデータ領域)の後には、24Byte管理データ領域が設けられる。このため、ページ中の最後の10ByteECC領域は、4番目の512Byteデータ領域と24Byte管理データ領域の両方に対応する構成となっている。   Each host management block is composed of 8 pages. Each page includes four 512-byte data areas and a 10-byte error correction code (ECC) area corresponding to each data area. Also, a 24-byte management data area is provided after the last 512-byte data area (fourth 512-byte data area) in the page. For this reason, the last 10-byte ECC area in the page has a configuration corresponding to both the fourth 512-byte data area and the 24-byte management data area.

消去単位である256kByteの物理ブロックに含まれる128個の24Byte管理データ領域のうち、例えば、最後の24Byte管理データ領域には、ホスト装置20から送られてくるコマンドから取得された物理ブロックアドレスに相当するアドレス情報、及び論理ブロックアドレスに相当するアドレス情報がまとめて格納される。これらのアドレス情報は、上述した第1及び第2テーブルを作成する際に使用される。   Of the 128 24-byte management data areas included in the 256 kByte physical block that is an erasure unit, for example, the last 24-byte management data area corresponds to the physical block address acquired from the command sent from the host device 20 Address information corresponding to the logical block address and the address information corresponding to the logical block address are stored together. These pieces of address information are used when creating the first and second tables described above.

次に、図32を参照して、第1モードにおいて、メモリカード200に対してホスト装置20が書き込みを行う際に、メモリカード200の入出力(I/O)ピン(第10〜第17ピンP10〜P17)とレディ/ビジー(R/−B)ピン(第2ピンP2)に入出力される信号例を説明する。   Next, referring to FIG. 32, when the host device 20 writes to the memory card 200 in the first mode, the input / output (I / O) pins (10th to 17th pins) of the memory card 200 are displayed. An example of signals input / output to / from the ready / busy (R / -B) pin (second pin P2) will be described.

ホスト装置20は、メモリカード200が16kByteの消去ブロックサイズを有する不揮発性メモリであると仮定してメモリカード200を制御している。このため、メモリカード200に対する書き込みの際に、ホスト装置20は、シリアルデータインプットコマンド“80H”をI/Oピン(第10〜第17ピンP10〜P17)へ入力する。次に、ホスト装置20は、カラムアドレス“C/A”及びページアドレス“P/A”をI/Oピン(第10〜第17ピンP10〜P17)へ入力する。なお、ここで、カラムアドレス“C/A”及びページアドレス“P/A”は、ホスト装置20がメモリカード200に対して想定している仮想物理アドレス空間におけるカラムアドレス及びページアドレスである。   The host device 20 controls the memory card 200 on the assumption that the memory card 200 is a non-volatile memory having an erase block size of 16 kBytes. Therefore, the host device 20 inputs the serial data input command “80H” to the I / O pins (10th to 17th pins P10 to P17) when writing to the memory card 200. Next, the host device 20 inputs the column address “C / A” and the page address “P / A” to the I / O pins (10th to 17th pins P10 to P17). Here, the column address “C / A” and the page address “P / A” are the column address and page address in the virtual physical address space that the host device 20 assumes for the memory card 200.

更に、ホスト装置20は、書き込みデータを、I/Oピン(第10〜第17ピンP10〜P17)の各々に対して528回入力する。具体的には、ホスト装置20は、ライト・イネーブルピン(第7ピンP7)への入力信号を528回クロッキングしながら、それぞれのI/Oピン(第10〜第17ピンP10〜P17)に対し528ビット(全てのI/Oピン合計で528Byte)のデータを順次シフトインする。データのシフトインが完了すると、ホスト装置20は、プログラムコマンド“10H”をI/Oピン(第10〜第17ピンP10〜P17)へ入力する。これに応答してメモリカード200は、そのレディ/ビジー(R/−B)ピンに“L”信号を出力し、メモリカード200がビジー状態であることをホスト装置20に伝達する。その後、所定期間後にレディ/ビジー(R/−B)ピンに“H”信号を出力することで、メモリカード200がレディ状態になったことをホスト装置20に伝達する。   Further, the host device 20 inputs the write data 528 times to each of the I / O pins (10th to 17th pins P10 to P17). Specifically, the host device 20 clocks the input signal to the write enable pin (seventh pin P7) to each I / O pin (10th to 17th pins P10 to P17) while clocking 528 times. On the other hand, data of 528 bits (a total of 528 bytes in total for all I / O pins) is sequentially shifted in. When the data shift-in is completed, the host device 20 inputs the program command “10H” to the I / O pins (10th to 17th pins P10 to P17). In response to this, the memory card 200 outputs an “L” signal to its ready / busy (R / −B) pin, and notifies the host device 20 that the memory card 200 is busy. Thereafter, by outputting an “H” signal to the ready / busy (R / −B) pin after a predetermined period, it is transmitted to the host device 20 that the memory card 200 has become ready.

しかしながら、図32におけるレディ/ビジー(R/−B)ピンの状態は、あくまでもホスト装置20に対してメモリカード200がどのような状態かを示すものである。つまり、図32において、プログラムコマンド“10H”の入力に応答して、メモリカード200のレディ/ビジー(R/−B)ピンがビジー状態(つまり、“L”信号を出力)を示したとしても、メモリカード200の内部ではNANDフラッシュメモリ4に対する書き込み動作(ページバッファ401からメモリセルアレイのデータ転送)が実際に行われているとは限らない。また、レディ/ビジー(R/−B)ピンがレディ状態に復帰したとしても、メモリカード200の内部ではNANDフラッシュメモリ4に対する書き込み動作が実際に終了しているとは限らない。   However, the ready / busy (R / -B) pin state in FIG. 32 only indicates the state of the memory card 200 with respect to the host device 20. That is, in FIG. 32, even if the ready / busy (R / -B) pin of the memory card 200 indicates the busy state (that is, outputs the “L” signal) in response to the input of the program command “10H”. In the memory card 200, the write operation (data transfer from the page buffer 401 to the memory cell array) to the NAND flash memory 4 is not always actually performed. Further, even if the ready / busy (R / -B) pin returns to the ready state, the writing operation to the NAND flash memory 4 is not necessarily actually finished inside the memory card 200.

一方、第1モードにおいて、メモリカード200の内部ではNANDフラッシュメモリ4に対して、メモリカード200内のコントローラB2021が書き込みを行う際に、NANDフラッシュメモリ4のI/Oピン1〜8とR/−Bピンに入出力される信号例を図33に示す。   On the other hand, in the first mode, when the controller B 2021 in the memory card 200 performs writing to the NAND flash memory 4 in the memory card 200, the I / O pins 1 to 8 and R / An example of signals input to and output from the -B pin is shown in FIG.

コントローラB2021は、NANDフラッシュメモリ4が256kByteの消去ブロックサイズを有する不揮発性メモリであると認識している。コントローラB2021は、例えば、NANDフラッシュメモリ4に対する書き込みの際には、シリアルデータインプットコマンド“80H”をI/Oピン1〜8へ入力する。次に、コントローラB2021は、カラムアドレス“C/A”及びページアドレス“P/A”をI/Oピン1〜8へ入力する。なお、ここで、カラムアドレス“C/A”及びページアドレス“P/A”は、NANDフラッシュメモリ4の実物理アドレス空間におけるカラムアドレス及びページアドレスである。したがって、図32におけるカラムアドレス及びページアドレスと、図33におけるカラムアドレス及びページアドレスは、必ずしも一致していない。   The controller B 2021 recognizes that the NAND flash memory 4 is a nonvolatile memory having an erase block size of 256 kBytes. For example, the controller B 2021 inputs a serial data input command “80H” to the I / O pins 1 to 8 when writing to the NAND flash memory 4. Next, the controller B 2021 inputs the column address “C / A” and the page address “P / A” to the I / O pins 1 to 8. Here, the column address “C / A” and the page address “P / A” are the column address and the page address in the real physical address space of the NAND flash memory 4. Therefore, the column address and page address in FIG. 32 do not necessarily match the column address and page address in FIG.

更に、コントローラB2021は、書き込みデータを、I/Oピン1〜8の各々に対して2112回入力する。具体的には、コントローラB2021は、ライトイネーブルピンへの入力信号を2112回クロッキングしながら、それぞれのI/Oピン1〜8に対して2112ビット(全てのI/Oピン合計で2112Byte)のデータを順次シフトインする。データのシフトインが完了すると、コントローラB2021は、プログラムコマンド“10H”をI/Oピン1〜8へ入力する。これに応答してメモリカード200は、そのR/−Bピンに“L”信号を出力し、メモリカード200がビジー状態であることをホスト装置20に伝達する。その後、所定期間後にR/−Bピンに“H”信号を出力することで、メモリカード200がレディ状態になったことをホスト装置20に伝達する。図33におけるR/−Bピンの状態は、コントローラB2021に対してNANDフラッシュメモリ4が実際にどのような状態かを示すものである。   Further, the controller B 2021 inputs write data to the I / O pins 1 to 8 2112 times. Specifically, the controller B 2021 clocks the input signal to the write enable pin 2112 times, and performs 2112 bits for each of the I / O pins 1 to 8 (2112 bytes in total for all I / O pins). Shift data in sequentially. When the data shift-in is completed, the controller B 2021 inputs the program command “10H” to the I / O pins 1 to 8. In response to this, the memory card 200 outputs an “L” signal to its R / −B pin to notify the host device 20 that the memory card 200 is busy. Thereafter, by outputting an “H” signal to the R / −B pin after a predetermined period, it is transmitted to the host device 20 that the memory card 200 is ready. The state of the R / -B pin in FIG. 33 indicates what state the NAND flash memory 4 is actually with respect to the controller B2021.

なお、図32及び図33においては、カラムアドレス“C/A”及びページアドレス“P/A”の入力を、それぞれ1つのサイクルで示しているが、メモリカード200の容量又はNANDフラッシュメモリ4の容量に応じて、適宜2サイクル以上になる場合もある。   32 and 33, the input of the column address “C / A” and the page address “P / A” is shown in one cycle, but the capacity of the memory card 200 or the NAND flash memory 4 Depending on the capacity, there may be two or more cycles as appropriate.

また、図32及び図33においては、第1モードにおける書き込み動作を説明したが、第2モードにおいてはホスト装置20がメモリカード200のNANDフラッシュメモリ4に対して図33に示す書き込み動作を直接実行することになる。   32 and 33, the write operation in the first mode has been described. In the second mode, the host device 20 directly executes the write operation shown in FIG. 33 to the NAND flash memory 4 of the memory card 200. Will do.

以下、図34に示すフローチャートを参照して、第2の実施の形態に係るメモリカードテスト方法について説明する。   Hereinafter, the memory card test method according to the second embodiment will be described with reference to the flowchart shown in FIG.

まず、ステップF1において、コントローラB2021ではNAND単体テストを実行するか否かが判定される。NAND単体テストを実行する場合(ステップF1:YES)、ステップF2に進む。NAND単体テストを実行しない場合(ステップF1:NO)、ステップF5に進む。   First, in step F1, the controller B 2021 determines whether or not to execute a NAND unit test. When the NAND unit test is executed (step F1: YES), the process proceeds to step F2. When the NAND unit test is not executed (step F1: NO), the process proceeds to step F5.

ステップF2において、ホスト装置20は、メモリカード200に対して移行動作を指示するコマンドシーケンス、例えば、“XX−YY−ZZ”等を出力する。コントローラB2021内のCPU35は、移行動作を指示するコマンドシーケンスに応じて動作モードを第2モードに設定する。具体的には、CPU35が、アクセス経路設定部2022の第1及び第2スイッチSW1,SW2に切り替え制御信号を供給することによりアクセス経路が設定される。動作モードが第2モードに設定されると、ステップF3に進む。   In step F2, the host device 20 outputs a command sequence for instructing the migration operation to the memory card 200, for example, “XX-YY-ZZ”. The CPU 35 in the controller B 2021 sets the operation mode to the second mode in accordance with the command sequence for instructing the transition operation. Specifically, the CPU 35 supplies the switching control signal to the first and second switches SW1 and SW2 of the access path setting unit 2022, so that the access path is set. When the operation mode is set to the second mode, the process proceeds to Step F3.

ステップF3において、ホスト装置20は、NAND単体テストを実行する。ホスト装置20は、例えば、書き込みデータと読み出しデータの整合性を確認することで、NANDフラッシュメモリ4に不具合箇所が含まれているかを判定する。この結果、NANDフラッシュメモリ4において、誤ったデータが保持されるビット(フェイルビット)、及び書き込みも読み出しもできないビット(バッドブロック)等の有無が判定される。NAND単体テストが完了すると、ステップF4に進む。   In step F3, the host device 20 executes a NAND unit test. For example, the host device 20 determines whether the NAND flash memory 4 includes a defective portion by confirming the consistency between the write data and the read data. As a result, in the NAND flash memory 4, the presence / absence of a bit (fail bit) in which erroneous data is held, a bit (bad block) that cannot be written or read, and the like are determined. When the NAND unit test is completed, the process proceeds to step F4.

ステップF4において、ホスト装置20は、メモリカード200に対して復帰動作を指示するコマンドシーケンスを出力する。復帰動作を指示するコマンドシーケンスがメモリカード200に伝達されると、ステップF5に進む。   In step F4, the host device 20 outputs a command sequence for instructing the memory card 200 to perform a return operation. When the command sequence for instructing the return operation is transmitted to the memory card 200, the process proceeds to Step F5.

ステップF5において、CPU35は、動作モードを第1モードに設定する。   In step F5, the CPU 35 sets the operation mode to the first mode.

ステップF6において、コントローラB2021ではコントローラ単体テストを実行するか否かが判定される。コントローラB2021は、コントローラ単体テストを実行する場合(ステップF6:YES)、ステップF7に進む。コントローラ単体テストを実行しない場合(ステップF6:NO)、ステップF5に戻る。   In step F6, the controller B 2021 determines whether or not to execute a controller unit test. When executing the controller unit test (step F6: YES), the controller B 2021 proceeds to step F7. When the controller unit test is not executed (step F6: NO), the process returns to step F5.

ステップF7において、ホスト装置20は、コントローラ単体テストを実行する。一例として、ホスト装置20がコントローラB2021に任意のコマンド等を入力し、コントローラB2021が正常に応答するか等のテストが実行される。コントローラ単体テストが完了すると、ステップF8に進む。   In step F7, the host device 20 executes a controller unit test. As an example, the host device 20 inputs an arbitrary command or the like to the controller B 2021, and a test is performed to determine whether the controller B 2021 responds normally. When the controller unit test is completed, the process proceeds to step F8.

ステップF8において、コントローラB2021ではNAND単体テストを実行するか否かが判定される。NAND単体テストを実行する場合(ステップF8:YES)、ステップF2に戻る。NAND単体テストを実行しない場合(ステップF8:NO)、テスト動作を終了する。   In step F8, the controller B2021 determines whether or not to execute the NAND unit test. When the NAND unit test is executed (step F8: YES), the process returns to step F2. When the NAND unit test is not executed (step F8: NO), the test operation is terminated.

以上のように、第2の実施の形態のメモリカード200では、ホスト装置20から送られてくるコマンドにより移行動作及び復帰動作が制御されるため、メモリカード200のピン数を増加させることなく第2モードを実現できる。更に、特定のコマンドシーケンスによって第2モードを制御することで、メモリカード200が書き込み時や読み出し時であると誤認識して誤動作することを回避できる。また、ホスト装置20が、第2モードにおいて第1モードよりも大きい消去ブロックサイズを取り扱うため、NANDフラッシュメモリ4の単体テストに要する時間を短縮できる。   As described above, in the memory card 200 according to the second embodiment, the transition operation and the return operation are controlled by the command sent from the host device 20, so that the number of pins of the memory card 200 is not increased. Two modes can be realized. Furthermore, by controlling the second mode with a specific command sequence, it is possible to avoid erroneous recognition that the memory card 200 is in writing or reading. Further, since the host device 20 handles an erase block size larger in the second mode than in the first mode, the time required for the unit test of the NAND flash memory 4 can be shortened.

また、第2の実施の形態のメモリカード200では、コントローラA2を含むコントローラチップ201と、コントローラB2021及びNANDフラッシュメモリ4を含むメモリチップ202として構成した。このように構成することにより、メモリチップ202を交換するだけで、コントローラB2021に変更を加えずに異なるブロックサイズや信頼性を持ったNANDフラッシュメモリに置き換えることが可能になる。   The memory card 200 according to the second embodiment is configured as a controller chip 201 including the controller A2 and a memory chip 202 including the controller B2021 and the NAND flash memory 4. With this configuration, it is possible to replace the controller B 2021 with a NAND flash memory having a different block size or reliability without changing the controller B 2021 simply by replacing the memory chip 202.

なお、上記第2の実施の形態では、メモリカード200がホスト装置20から送られてくるコマンドによりアクセス経路設定部2022がアクセス経路を設定する場合を示した。この構成に限定するものではなく、例えば、図35に示すメモリカード200のように、アクセス経路設定部2022が電源投入を検知して、アクセス経路を自動的に設定する構成としても良い。   In the second embodiment, the case where the access path setting unit 2022 sets an access path by a command sent from the host device 20 to the memory card 200 is shown. For example, a memory card 200 shown in FIG. 35 may be used, and the access path setting unit 2022 may detect the power-on and automatically set the access path.

上述の図24に示したコントローラB2021では、CPU35等の起動中に不具合が発生した場合、第2モードに移行できず、ホスト装置20は解析(テスト)を進めることができない。このため、電源投入時は自動的に第2モードに設定することでNAND単体テストを実行可能になる。   In the controller B 2021 shown in FIG. 24 described above, if a problem occurs during the activation of the CPU 35 or the like, the controller 20202 cannot shift to the second mode, and the host device 20 cannot proceed with the analysis (test). Therefore, the NAND unit test can be executed by automatically setting the second mode when the power is turned on.

アクセス経路設定部2022は、図25及び図26に示す第1及び第9ピンP1,P9に接地電圧GNDが印加され、第18ピンP18に電源電圧Vccが印加されると、例えば、電源電圧Vccの立ち上がりをトリガとしてアクセス経路を設定する。   When the ground voltage GND is applied to the first and ninth pins P1 and P9 shown in FIGS. 25 and 26 and the power supply voltage Vcc is applied to the 18th pin P18, the access path setting unit 2022, for example, the power supply voltage Vcc The access path is set using the rising edge of

メモリカード200の電源投入時に自動的に設定された第2モードから第1モードに復帰する際には、復帰動作を指示するコマンドシーケンスに限らず、復帰動作を指示するコマンド、例えば、“FFH”コマンドを使用すれば良い。すなわち、図35に示すコントローラB2021は、コマンド及びコマンドシーケンスのいずれによっても復帰動作を実行可能である。但し、図24に示すコントローラB2021と同様に、移行動作を指示するコマンドシーケンスによって第2モードが設定された場合、復帰動作を指示するコマンドシーケンスでなければ第1モードに復帰できないものとする。   When returning to the first mode from the second mode that is automatically set when the memory card 200 is turned on, not only the command sequence that instructs the return operation, but also a command that instructs the return operation, for example, “FFH” Use the command. That is, the controller B 2021 shown in FIG. 35 can execute the return operation by either a command or a command sequence. However, as in the case of the controller B 2021 shown in FIG. 24, when the second mode is set by a command sequence instructing a transition operation, it is not possible to return to the first mode unless a command sequence instructing a return operation.

以下、図36に示すフローチャートを参照して、図35に示したコントローラB2021によるメモリカードテスト方法を説明する。但し、図34に示したメモリカードテスト方法と重複する処理については同一のステップ符号を付して、その説明を省略する。   Hereinafter, a memory card test method by the controller B 2021 shown in FIG. 35 will be described with reference to a flowchart shown in FIG. However, the same steps as those in the memory card test method shown in FIG.

まず、ステップG1において、メモリカード200がホスト装置20の図示しないカードスロットに挿入され、ホスト装置20からメモリカード200に電源が供給される。メモリカード200に電源が供給されると、コントローラB2021内のアクセス経路設定部2022によりアクセス経路が自動的に設定されて、動作モードが第2モードに自動的に設定される。   First, in step G1, the memory card 200 is inserted into a card slot (not shown) of the host device 20, and power is supplied from the host device 20 to the memory card 200. When power is supplied to the memory card 200, the access path setting unit 2022 in the controller B 2021 automatically sets the access path, and the operation mode is automatically set to the second mode.

ステップF1において、コントローラB2021では、NAND単体テストを実行するか否かが判定される。NAND単体テストを実行する場合(ステップF1:YES)、ステップF2に進む。NAND単体テストを実行しない場合(ステップF1:NO)、ステップF5に進む。   In step F1, the controller B 2021 determines whether or not to execute the NAND unit test. When the NAND unit test is executed (step F1: YES), the process proceeds to step F2. When the NAND unit test is not executed (step F1: NO), the process proceeds to step F5.

ステップG2においては、復帰動作を指示するコマンドがホスト装置20からメモリカード200へ入力される。復帰動作を指示するコマンドがホスト装置20からメモリカード200へ入力されると、ステップF5に進む。   In step G 2, a command for instructing a return operation is input from the host device 20 to the memory card 200. When a command for instructing a return operation is input from the host device 20 to the memory card 200, the process proceeds to step F5.

ステップF2〜ステップF8の各処理は、図34と同様に実行される。   Each process of step F2 to step F8 is executed in the same manner as in FIG.

以上のように、図35に示したコントローラB2021の構成によれば、電源投入直後は自動的に第2モードに設定することにより、コントローラB2021に異常があった場合でもNAND単体テストが実行可能になる。   As described above, according to the configuration of the controller B 2021 shown in FIG. 35, the NAND unit test can be executed even when the controller B 2021 has an abnormality by automatically setting the second mode immediately after the power is turned on. .

(第3の実施の形態)
本第3の実施の形態では、上記第1の実施の形態に示したメモリカード1をパッケージ化する際の構成を例示する。図37は、本第3の実施の形態に係るメモリカード300をパッケージ化した際の構成を示す断面図である。なお、図37において、上記第1の実施の形態において図1に示したメモリカード1と同一の構成部分には同一の符号を付している。
(Third embodiment)
The third embodiment exemplifies a configuration when the memory card 1 shown in the first embodiment is packaged. FIG. 37 is a cross-sectional view showing a configuration when the memory card 300 according to the third embodiment is packaged. In FIG. 37, the same components as those of the memory card 1 shown in FIG. 1 in the first embodiment are denoted by the same reference numerals.

図37において、70は基板である。この基板70上には、層間膜71を介して上記NANDフラッシュメモリ4が形成されている。NANDフラッシュメモリ4上には、上記コントローラA2及び上記コントローラB3がそれぞれ層間膜71を介して形成されている。基板70、NANDフラッシュメモリ4、及びコントローラB3において、図中左端部の各上面にはボンディングワイヤ72を接続するためのパッド73〜75が形成されている。また、コントローラB3の図中右端部の上面と、コントローラA2の図中左端部の上面には、ボンディングワイヤ72を接続するためのパッド76,77がそれぞれ形成されている。また、基板70の図中左端部の下面側には、上記図25に示した第1〜第18ピンP1〜P18に対応する外部接続ピン78が形成されている。   In FIG. 37, reference numeral 70 denotes a substrate. The NAND flash memory 4 is formed on the substrate 70 with an interlayer film 71 interposed therebetween. On the NAND flash memory 4, the controller A2 and the controller B3 are formed via an interlayer film 71, respectively. In the substrate 70, the NAND flash memory 4, and the controller B 3, pads 73 to 75 for connecting the bonding wires 72 are formed on each upper surface at the left end portion in the drawing. Also, pads 76 and 77 for connecting the bonding wires 72 are formed on the upper surface of the right end portion of the controller B3 in the drawing and the upper surface of the left end portion of the controller A2 in the drawing, respectively. Also, external connection pins 78 corresponding to the first to eighteenth pins P1 to P18 shown in FIG. 25 are formed on the lower surface side of the left end portion of the substrate 70 in the drawing.

図38は、本第3の実施の形態に係るメモリカード300をパッケージ化した際の他の構成を示す断面図である。なお、図38において、上記第1の実施の形態において図1に示したメモリカード1と同一の構成部分と、図37に示した構成と同一の構成部分には同一の符号を付しており、その説明を省略する。   FIG. 38 is a cross-sectional view showing another configuration when the memory card 300 according to the third embodiment is packaged. In FIG. 38, the same components as those of the memory card 1 shown in FIG. 1 in the first embodiment and the same components as those shown in FIG. The description is omitted.

図38において、NANDフラッシュメモリ4上には、コントローラB3が層間膜71を介して形成されている。コントローラB3上には、コントローラA2が層間膜71を介して形成されている。基板70、NANDフラッシュメモリ4、コントローラB3、及びコントローラA2において、図中左端部の各上面にはボンディングワイヤ72を接続するためのパッド73〜75,77がそれぞれ形成されている。   In FIG. 38, a controller B 3 is formed on the NAND flash memory 4 via an interlayer film 71. On the controller B3, a controller A2 is formed via an interlayer film 71. In the substrate 70, the NAND flash memory 4, the controller B3, and the controller A2, pads 73 to 75 and 77 for connecting the bonding wires 72 are formed on the respective upper surfaces at the left end in the drawing.

上記図37及び図38に示した各パッケージの断面図は、NANDフラッシュメモリ4上にコントローラB3及びコントローラA2を積層して形成した場合を例示したものである。図37及び図38に示した各メモリカード300は、NANDフラッシュメモリ4上にコントローラB3及びコントローラA2を積層し、ボンディングワイヤ72を接続した後、外部接続ピン78を除く全体が樹脂等により封止される。   The cross-sectional views of the packages shown in FIGS. 37 and 38 exemplify the case where the controller B3 and the controller A2 are stacked on the NAND flash memory 4. 37 and 38, the controller B3 and the controller A2 are stacked on the NAND flash memory 4, the bonding wires 72 are connected, and then the whole except for the external connection pins 78 is sealed with resin or the like. Is done.

上述のように、積層構造とすることにより、実質的にNANDフラッシュメモリ4を実装可能な基板70の大きさでメモリカード300を形成することができ、メモリカード300としてのパッケージの大きさを縮小することが可能になる。   As described above, the stacked structure allows the memory card 300 to be formed with the size of the substrate 70 on which the NAND flash memory 4 can be substantially mounted, and the size of the package as the memory card 300 is reduced. It becomes possible to do.

図39は、本第3の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。なお、図39において、上記第1の実施の形態において図1に示したメモリカード1と同一の構成部分と、図37に示した構成と同一の構成部分には同一の符号を付しており、その説明を省略する。   FIG. 39 is a cross-sectional view showing another configuration when the memory card according to the third embodiment is packaged. 39, the same reference numerals are given to the same components as those of the memory card 1 shown in FIG. 1 and the same components as those shown in FIG. 37 in the first embodiment. The description is omitted.

図39において、メモリカード400の基板70上には、NANDフラッシュメモリ4、コントローラB3、及びコントローラA2がそれぞれ層間膜71を介して形成されている。コントローラB3の図中左端部の上面にはボンディングワイヤ72を接続するためのパッド75が形成されている。また、コントローラB3の図中右端部の上面と、コントローラA2の図中左端部の上面には、ボンディングワイヤ72を接続するためのパッド76,77がそれぞれ形成されている。また、コントローラA2の図中右端部の上面と、NANDフラッシュメモリ4の図中左端部の上面には、ボンディングワイヤ72を接続するためのパッド81,82がそれぞれ形成されている。   In FIG. 39, on the substrate 70 of the memory card 400, the NAND flash memory 4, the controller B3, and the controller A2 are formed via the interlayer film 71, respectively. A pad 75 for connecting the bonding wire 72 is formed on the upper surface of the left end portion of the controller B3 in the drawing. Also, pads 76 and 77 for connecting the bonding wires 72 are formed on the upper surface of the right end portion of the controller B3 in the drawing and the upper surface of the left end portion of the controller A2 in the drawing, respectively. Pads 81 and 82 for connecting bonding wires 72 are formed on the upper surface of the right end portion of the controller A2 in the drawing and the upper surface of the left end portion of the NAND flash memory 4 in the drawing, respectively.

図39に示したメモリカード400は、基板70上にNANDフラッシュメモリ4、コントローラB3、及びコントローラA2を形成し、ボンディングワイヤ72を接続した後、外部接続ピン78を除く全体が樹脂等により封止される。   In the memory card 400 shown in FIG. 39, the NAND flash memory 4, the controller B3, and the controller A2 are formed on the substrate 70, the bonding wires 72 are connected, and the whole except the external connection pins 78 is sealed with resin or the like. Is done.

上記図39に示したパッケージの断面図は、NANDフラッシュメモリ4、コントローラB3、及びコントローラA2を基板70上に配置した場合を例示したものである。このような構造とすることにより、NANDフラッシュメモリ4の世代を変更する際に、NANDフラッシュメモリ4やコントローラB3の交換が容易になる。   The sectional view of the package shown in FIG. 39 exemplifies the case where the NAND flash memory 4, the controller B3, and the controller A2 are arranged on the substrate 70. With such a structure, when the generation of the NAND flash memory 4 is changed, the NAND flash memory 4 and the controller B3 can be easily replaced.

なお、上記図37〜図39に示した各パッケージの構成は、メモリカード1,200に対応するものとして示したが、メモリカード以外に、例えば、マルチチップパッケージ(MCM)、システム・イン・パッケージ(SiP)等としても適用可能である。   The configurations of the packages shown in FIGS. 37 to 39 are shown as corresponding to the memory cards 1 and 200, but other than the memory card, for example, a multi-chip package (MCM), a system-in-package It can also be applied as (SiP) or the like.

(第4の実施の形態)
本第4の実施の形態では、上記第3の実施の形態において例示したパッケージをUSB(Universal Serial Bus )メモリとして適用する場合の構成を例示する。図40は、本第3の実施の形態に係るUSBメモリの構成を示す断面図である。なお、図40において、上記第3の実施の形態において図37に示したメモリカードのパッケージ構成と同一の構成部分には同一の符号を付して、その説明を省略する。
(Fourth embodiment)
The fourth embodiment exemplifies a configuration when the package exemplified in the third embodiment is applied as a USB (Universal Serial Bus) memory. FIG. 40 is a cross-sectional view showing the configuration of the USB memory according to the third embodiment. In FIG. 40, the same components as those in the package configuration of the memory card shown in FIG. 37 in the third embodiment are denoted by the same reference numerals, and the description thereof is omitted.

図40に示すUSBメモリ500において、501は回路基板である。この回路基板501の上面側には、電子部品502及びUSBコントローラ等の制御チップ503が実装されると共に、USBコネクタの入出力端子となる導体層504が形成されている。また、回路基板501の下面側には、上記図37に示したパッケージ化したメモリカード300が実装されている。また、505はUSBメモリ500の外装ケースである。   In the USB memory 500 shown in FIG. 40, reference numeral 501 denotes a circuit board. On the upper surface side of the circuit board 501, a control chip 503 such as an electronic component 502 and a USB controller is mounted, and a conductor layer 504 serving as an input / output terminal of a USB connector is formed. The packaged memory card 300 shown in FIG. 37 is mounted on the lower surface side of the circuit board 501. Reference numeral 505 denotes an exterior case of the USB memory 500.

図40に示したUSBメモリ500では、メモリカード300をそのまま回路基板501に実装するようにしたため、USBメモリの製造を容易にすることができるとともに、メモリカード300の利用範囲を拡大することができる。また、USBメモリ500内のNANDフラッシュメモリ4の世代を変更する場合に、その世代に合わせて製造されたメモリカード300を利用して実装することが可能になり、USBメモリとしての仕様変更も容易になる。   In the USB memory 500 shown in FIG. 40, the memory card 300 is mounted on the circuit board 501 as it is, so that the USB memory can be easily manufactured and the range of use of the memory card 300 can be expanded. . Further, when the generation of the NAND flash memory 4 in the USB memory 500 is changed, it can be mounted using the memory card 300 manufactured according to the generation, and the specification change as the USB memory is easy. become.

なお、本第4の実施の形態では、USBメモリ内に図37に示したメモリカード300を適用した場合を例示したが、これに限定するものではなく、上記図38に示したメモリカード300や図39に示したメモリカード400等を適用しても良い。   In the fourth embodiment, the case where the memory card 300 shown in FIG. 37 is applied to the USB memory is illustrated. However, the present invention is not limited to this, and the memory card 300 and the memory card 300 shown in FIG. The memory card 400 shown in FIG. 39 may be applied.

(第5の実施の形態)
本第5の実施の形態では、コントローラBに構成が異なる2つのNANDフラッシュメモリを接続し、ホスト装置20から入力される書込データの書換回数に基づいて、2つのNANDフラッシュメモリに対する書込データの記憶先を変更する場合を説明する。図41は、本第5の実施の形態に係るメモリカードの概略構成を示す図である。なお、図41において、上記第1の実施の形態において図1に示したメモリカード1と同一の構成部分には同一の符号を付している。
(Fifth embodiment)
In the fifth embodiment, two NAND flash memories having different configurations are connected to the controller B, and the write data to the two NAND flash memories is based on the number of rewrites of the write data input from the host device 20. A case of changing the storage destination of will be described. FIG. 41 is a diagram showing a schematic configuration of the memory card according to the fifth embodiment. In FIG. 41, the same components as those in the memory card 1 shown in FIG. 1 in the first embodiment are denoted by the same reference numerals.

図41に示すようにメモリカード600は、コントローラA601、コントローラB602及びNANDフラッシュメモリM1,M2を有する。コントローラA601は、ホストバス11によりホスト装置20に接続され、NANDバス611によりコントローラB602に接続されている。コントローラB602は、NANDバス611によりコントローラA601に接続され、NANDバス612によりNANDフラッシュメモリM1に接続され、NANDバス613によりNANDフラッシュメモリM2に接続されている。NANDフラッシュメモリM1は、NANDバス612によりコントローラB602に接続されている。NANDフラッシュメモリM2は、NANDバス613によりコントローラB602に接続されている。  As shown in FIG. 41, the memory card 600 includes a controller A601, a controller B602, and NAND flash memories M1 and M2. The controller A 601 is connected to the host device 20 via the host bus 11 and is connected to the controller B 602 via the NAND bus 611. The controller B 602 is connected to the controller A 601 via the NAND bus 611, connected to the NAND flash memory M1 via the NAND bus 612, and connected to the NAND flash memory M2 via the NAND bus 613. The NAND flash memory M1 is connected to the controller B 602 via a NAND bus 612. The NAND flash memory M2 is connected to the controller B 602 via a NAND bus 613.

なお、NANDフラッシュメモリM1,M2は、一つのメモリセルに1ビットのデータを記憶する2値メモリであっても良いし、一つのメモリセルに1ビットより多いデータ(例えば、2ビット)を記憶する多値メモリであっても良い。ここでは、不揮発性メモリの例としてNAND型フラッシュメモリを挙げて説明するが、不揮発性メモリはNAND型フラッシュメモリに限らず、例えば、NOR型フラッシュメモリ等でもよい。また、2つのNANDフラッシュメモリM1,M2を接続する例を示したが、更に複数のNANDフラッシュメモリを接続するようにしてもよい。   The NAND flash memories M1 and M2 may be binary memories that store 1-bit data in one memory cell, or store more data (for example, 2 bits) than 1 bit in one memory cell. It may be a multi-valued memory. Here, a NAND flash memory will be described as an example of the nonvolatile memory. However, the nonvolatile memory is not limited to the NAND flash memory, and may be a NOR flash memory, for example. In addition, although an example in which two NAND flash memories M1 and M2 are connected has been shown, a plurality of NAND flash memories may be further connected.

NANDフラッシュメモリM1,M2としては、例えば、記憶容量が異なるもの(大容量と小容量)、記憶するデータのビット数がことなるもの(2値と多値)、デザインルールが異なるもの、データのブロックサイズが異なるもの(大ブロックと小ブロック)等の異なる構成のものを用いるものとする。本第5の実施の形態では、NANDフラッシュメモリM1として大容量のものを用い、NANDフラッシュメモリM2として小容量のものを用いるものとする。一般的に、NANDフラッシュメは、大容量化とチップ面積の縮小を実現するため設計ルールを縮小している。しかし、設計ルールを縮小するに従って、保証されるデータ書換回数が低減する傾向にあり、NANDフラッシュメの信頼性を低下させることが懸念されている。このため、設計ルールが異なる2種類のNANDフラッシュメモリを使用して、書換要求される回数が異なるデータに応じて記憶先のNANDフラッシュメモリを適宜変更することにより、信頼性の低下を回避することが可能になる。   For example, the NAND flash memories M1 and M2 have different storage capacities (large capacity and small capacity), different numbers of bits of data to be stored (binary and multivalued), different design rules, Those having different configurations such as those having different block sizes (large block and small block) are used. In the fifth embodiment, a large capacity memory is used as the NAND flash memory M1, and a small capacity memory is used as the NAND flash memory M2. In general, NAND flash memory has a reduced design rule in order to realize a larger capacity and a smaller chip area. However, as the design rule is reduced, the guaranteed number of data rewrites tends to decrease, and there is a concern that the reliability of the NAND flash memory is lowered. For this reason, using two types of NAND flash memories with different design rules and appropriately changing the NAND flash memory at the storage destination according to the data with different number of rewrite requests can avoid a decrease in reliability. Is possible.

以下の説明において使用する用語「論理ブロックアドレス」、「物理ブロックアドレス」は、それぞれ、NANDフラッシュメモリM1,M2内のブロック自体に割り当てられる論理アドレス、物理アドレスを意味するものである。また、「論理アドレス」、「物理アドレス」は、主に、ブロック自体の論理アドレス、物理アドレスを意味するものであるが、ブロック単位よりも細かい分解能の単位に相当するアドレスである場合もあり得る。   The terms “logical block address” and “physical block address” used in the following description mean a logical address and a physical address assigned to the blocks in the NAND flash memories M1 and M2, respectively. Further, “logical address” and “physical address” mainly mean the logical address and physical address of the block itself, but may be an address corresponding to a unit of resolution smaller than the block unit. .

ホスト装置20は、接続されるメモリカード600に対してアクセスを行うためのハードウェア及びソフトウェアを備えている。ホスト装置20は、メモリカード600内部の物理状態(何処の物理ブロックアドレスに、何番目の何番目の論理セクタアドレスデータが含まれているか、或いは、何処のブロックが消去状態であるか)を管理し、メモリカード600内のNANDフラッシュメモリM1,M2を直接制御するものとして構築されている。   The host device 20 includes hardware and software for accessing the connected memory card 600. The host device 20 manages the internal physical state of the memory card 600 (which physical block address includes what number and what logical sector address data, or which block is in an erased state). The NAND flash memories M1 and M2 in the memory card 600 are directly controlled.

また、ホスト装置20は、消去時の消去ブロックサイズが16kByteに定められているNANDフラッシュメモリ(NANDフラッシュメモリM1,M2を限定するものではない)を使用することを前提として、16kByte単位で論理・物理アドレスの割り当てを行う。すなわち、ホスト装置20は、多くの場合、論理アドレス16kByte分に関してシーケンシャルにライトアクセス又はリードアクセスを行う(該当するコマンドを発行する)。   Further, the host device 20 is assumed to use a NAND flash memory (not limited to the NAND flash memories M1 and M2) in which the erase block size at the time of erasure is set to 16 kbytes. Assign physical addresses. That is, in many cases, the host device 20 performs write access or read access sequentially (issues a corresponding command) for the logical address of 16 kbytes.

メモリカード600は、ホスト装置20に接続されたときに電源供給を受けて動作し、ホスト装置20からのアクセスに応じた処理を行う。コントローラA601は、図42に示すように、ホストインターフェース(以下、ホストI/Fという)621、バッファRAM622、NANDインターフェース(以下、NAND_I/Fという)623、CPU(Central Processing Unit)624、及びROM(Read Only Memory)625を有する。   The memory card 600 operates upon receiving power supply when connected to the host device 20, and performs processing in accordance with access from the host device 20. As shown in FIG. 42, the controller A 601 includes a host interface (hereinafter referred to as host I / F) 621, a buffer RAM 622, a NAND interface (hereinafter referred to as NAND_I / F) 623, a CPU (Central Processing Unit) 624, and a ROM ( Read Only Memory) 625.

ホストI/F621は、ホストバス11に接続され、ホスト装置20とバッファRAM622及びCPU624との間のインターフェース処理を行う。NAND_I/F623は、NANDバス611に接続され、コントローラB602とバッファRAM622及びCPU624との間のインターフェース処理を行う。   The host I / F 621 is connected to the host bus 11 and performs interface processing between the host device 20 and the buffer RAM 622 and the CPU 624. The NAND_I / F 623 is connected to the NAND bus 611 and performs interface processing between the controller B 602, the buffer RAM 622, and the CPU 624.

バッファRAM622は、ホスト装置20から入力されるデータをNANDフラッシュメモリM1,M2に書き込む際に、一定量のデータ(例えば、1ページ分)を一時的に記憶し、NANDフラッシュメモリM1,M2から読み出されるデータをホスト装置20に出力する際に、一定量のデータを一時的に記憶する。また、バッファRAM622は、CPU624の作業領域として使用され、制御プログラム等を記憶する。   The buffer RAM 622 temporarily stores a certain amount of data (for example, one page) when data input from the host device 20 is written to the NAND flash memories M1 and M2, and is read from the NAND flash memories M1 and M2. When outputting data to the host device 20, a certain amount of data is temporarily stored. The buffer RAM 622 is used as a work area for the CPU 624 and stores a control program and the like.

CPU624は、メモリカード600全体の動作を制御するものである。CPU624は、例えば、メモリカード600が電源供給を受けた際に、ROM625内に格納されているファームウェア(後述する制御プログラム)をバッファRAM622にロードして所定の処理を実行することにより、ホスト装置20から書込コマンド、読出コマンド、消去コマンドを受けてNANDフラッシュメモリM1,M2内の該当領域に対するアクセス処理をコントローラB602との間で実行し、バッファRAM622を通じたデータ転送処理を制御する。   The CPU 624 controls the operation of the entire memory card 600. For example, when the memory card 600 is supplied with power, the CPU 624 loads firmware (a control program described later) stored in the ROM 625 into the buffer RAM 622 and executes predetermined processing, thereby executing the host device 20. In response to a write command, a read command, and an erase command from, an access process for the corresponding area in the NAND flash memories M1 and M2 is executed with the controller B602, and a data transfer process through the buffer RAM 622 is controlled.

ROM625は、CPU624により使用される制御プログラム等を格納するメモリである。なお、コントローラA601は、NANDバス611によりコントローラB602と接続されており、CPU624は、コントローラB602をNANDフラッシュメモリM1,M2であるものとして各種の処理を実行する。すなわち、CPU624は、ホスト装置20から書込コマンド、読出コマンド、消去コマンドを受け付けた際に、コントローラB602に対して書込コマンド、読出コマンド、消去コマンドを転送する処理を実行する。   The ROM 625 is a memory that stores a control program used by the CPU 624. The controller A601 is connected to the controller B602 via the NAND bus 611, and the CPU 624 executes various processes assuming that the controller B602 is the NAND flash memories M1 and M2. That is, when the CPU 624 receives a write command, a read command, and an erase command from the host device 20, the CPU 624 executes a process of transferring the write command, the read command, and the erase command to the controller B 602.

コントローラB602は、図43に示すように、NAND_I/F631、バッファRAM632、ECC(Error Correcting Code)回路633、NAND_I/F634,635、CPU636、ROM637、及びカウンタ638を有する。   As shown in FIG. 43, the controller B 602 includes a NAND_I / F 631, a buffer RAM 632, an ECC (Error Correcting Code) circuit 633, NAND_I / Fs 634 and 635, a CPU 636, a ROM 637, and a counter 638.

NAND_I/F31は、NANDバス12に接続され、コントローラA2とバッファRAM32及びCPU35との間のインターフェース処理を行う。NAND_I/F34は、NANDバス13に接続され、NANDフラッシュメモリ4とECC回路33及びCPU35との間のインターフェース処理を行う。   The NAND_I / F 31 is connected to the NAND bus 12 and performs interface processing between the controller A2, the buffer RAM 32, and the CPU 35. The NAND_I / F 34 is connected to the NAND bus 13 and performs interface processing between the NAND flash memory 4, the ECC circuit 33, and the CPU 35.

バッファRAM632は、コントローラA601から入力されるデータをNANDフラッシュメモリM1,M2に書き込む際に、一定量のデータ(例えば、1ページ分)を一時的に記憶し、NANDフラッシュメモリM1,M2から読み出されるデータをコントローラA601に出力する際に、一定量のデータを一時的に記憶する。また、バッファRAM632は、CPU636の作業領域として使用され、制御プログラムや各種のテーブル等を記憶する。   The buffer RAM 632 temporarily stores a certain amount of data (for example, one page) when the data input from the controller A601 is written to the NAND flash memories M1 and M2, and is read from the NAND flash memories M1 and M2. When outputting data to the controller A601, a certain amount of data is temporarily stored. The buffer RAM 632 is used as a work area for the CPU 636 and stores a control program, various tables, and the like.

ECC回路633は、NANDフラッシュメモリM1,M2に書き込む書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理、NANDフラッシュメモリM1,M2から読み出される読出データに対してECCデータを付加する処理等を行う。   The ECC circuit 633 performs error correction processing of the write data based on the ECC data added to the write data written to the NAND flash memories M1 and M2, and ECC data for the read data read from the NAND flash memories M1 and M2. Perform additional processing.

CPU636は、NANDフラッシュメモリM1,M2に対するアクセス処理を制御するものである。CPU636は、例えば、メモリカード600が電源供給を受けた際に、ROM637内に格納されているファームウェアをバッファRAM632にロードして所定の処理を実行する。CPU636は、所定の処理において、後述する各種のテーブルをバッファRAM632上で作成し、コントローラA601から書込コマンド、読出コマンド、消去コマンドを受け付けてNANDフラッシュメモリM1,M2内の該当領域に対するアクセス処理を実行し、バッファRAM632を通じたデータ転送処理を実行する。   The CPU 636 controls access processing to the NAND flash memories M1 and M2. For example, when the memory card 600 is supplied with power, the CPU 636 loads firmware stored in the ROM 637 into the buffer RAM 632 and executes predetermined processing. In a predetermined process, the CPU 636 creates various tables, which will be described later, on the buffer RAM 632, receives a write command, a read command, and an erase command from the controller A601, and performs an access process for the corresponding area in the NAND flash memories M1 and M2. And execute data transfer processing through the buffer RAM 632.

ROM637は、CPU636により使用される制御プログラムと書込制御プログラム等を格納するメモリである。なお、コントローラB602は、NANDバス611によりコントローラA601と接続されており、CPU636は、コントローラA601に対してNANDフラッシュメモリM1,M2であるものとして処理を実行する。すなわち、CPU636は、コントローラA601から書込コマンド、読出コマンド、消去コマンドを受け付けた際に、NANDフラッシュメモリM1,M2内の該当領域に対するアクセス処理を実行する。また、CPU636は、コントローラA601から書込コマンドと書込データを受け付けた際に、書込制御プログラムに応じた書込処理(図45に示すフローチャート参照)を実行する。   The ROM 637 is a memory that stores a control program used by the CPU 636, a write control program, and the like. Note that the controller B 602 is connected to the controller A 601 via the NAND bus 611, and the CPU 636 executes processing on the controller A 601 assuming that the NAND flash memories M1 and M2 are provided. That is, when the CPU 636 receives a write command, a read command, and an erase command from the controller A601, the CPU 636 executes an access process for the corresponding area in the NAND flash memories M1 and M2. Further, when the CPU 636 receives a write command and write data from the controller A 601, the CPU 636 executes a write process (see the flowchart shown in FIG. 45) according to the write control program.

カウンタ638は、上記書込処理において書込データの書込論理ブロックアドレスLBA毎に書換回数nをカウントするものである。カウンタ638は、CPU636の制御下で書込データの書込論理ブロックアドレスLBA毎に書換回数nをカウントアップし、カウントアップした書換回数nをCPU636に出力する。   The counter 638 counts the number of rewrites n for each write logical block address LBA of the write data in the write process. The counter 638 counts up the number of rewrites n for each write logical block address LBA of the write data under the control of the CPU 636, and outputs the counted number of rewrites n to the CPU 636.

図44は、コントローラB602の上記書込処理に関わる構成を示す図である。なお、図44において図43に示したコントローラB602内の構成と同一の構成部分には同一符号を付している。図44に示すようにコントローラB602は、バッファRAM632内に書換回数nに基づいてNANDフラッシュメモリM1,M2に対して記憶先を変更する書込データの論理ブロックアドレスLBAと物理ブロックアドレスPBAを記憶する領域として第1データLBA・PBA記憶部M1Pと第2データLBA・PBA記憶部M2Pを設けている。第1データLBA・PBA記憶部M1Pは、書換回数nが少ないデータ(以下、第1データという)の書換回数nと論理ブロックアドレスLBAと物理ブロックアドレスPBAとを、書込論理ブロックアドレスブロック(以下、書込LBAブロックという)毎に記憶する領域である。第2データLBA・PBA記憶部M2Pは、書換回数nが多いデータ(以下、第2データという)の書換回数nと論理ブロックアドレスLBAと物理ブロックアドレスPBAとを、書込LBAブロック毎に記憶する領域である。   FIG. 44 is a diagram showing a configuration related to the writing process of the controller B602. In FIG. 44, the same components as those in the controller B 602 shown in FIG. 43 are denoted by the same reference numerals. As shown in FIG. 44, the controller B 602 stores the logical block address LBA and physical block address PBA of the write data whose storage destination is changed for the NAND flash memories M1 and M2 based on the number of times of rewriting n in the buffer RAM 632. As areas, a first data LBA / PBA storage unit M1P and a second data LBA / PBA storage unit M2P are provided. The first data LBA / PBA storage unit M1P stores a rewrite count n, a logical block address LBA, and a physical block address PBA of data with a small rewrite count n (hereinafter referred to as first data) as a write logical block address block (hereinafter referred to as a “write logical block address block”). This is an area to be stored for each write LBA block). The second data LBA / PBA storage unit M2P stores, for each write LBA block, the number of times of rewriting of data having a large number of times of rewriting n (hereinafter referred to as second data), the logical block address LBA, and the physical block address PBA. It is an area.

図44に示すように、NANDフラッシュメモリM1は第1データ記憶部とし、NANDフラッシュメモリM2は第2データ記憶部とする。したがって、NANDフラッシュメモリM1に記憶した第1データの論理ブロックアドレスLBAと物理ブロックアドレスPBAを第1データLBA・PBA記憶部M1Pに記憶し、NANDフラッシュメモリM2に記憶した第2データの論理ブロックアドレスLBAと物理ブロックアドレスPBAを第2データLBA・PBA記憶部M2Pに記憶する。   As shown in FIG. 44, the NAND flash memory M1 is a first data storage unit, and the NAND flash memory M2 is a second data storage unit. Accordingly, the logical block address LBA and physical block address PBA of the first data stored in the NAND flash memory M1 are stored in the first data LBA / PBA storage unit M1P, and the logical block address of the second data stored in the NAND flash memory M2 The LBA and physical block address PBA are stored in the second data LBA / PBA storage unit M2P.

次に、図45に示すフローチャートを参照して、コントローラB602において実行される書込処理について説明する。   Next, the writing process executed in the controller B 602 will be described with reference to the flowchart shown in FIG.

CPU636は、ホスト装置20側からコントローラA601を経由して書き込み要求コマンドと書込データを受けると(ステップG1)、この書き込み要求コマンドに付加された付加データに含まれている論理ブロックアドレスLBAを取得する。次いで、CPU636は、取得した論理ブロックアドレスLBAが第1データLBA・PBA記憶部M1Pに登録されているか否かを確認する(ステップG2)。CPU636は、第1データLBA・PBA記憶部M1Pに登録されていることを確認すると(ステップG2:YES)、当該書込論理ブロックアドレス(以下、書込LBAという)の書換回数nをカウンタ638によりカウントアップする(ステップG3)。   When the CPU 636 receives a write request command and write data from the host device 20 via the controller A 601 (step G1), the CPU 636 acquires a logical block address LBA included in the additional data added to the write request command. To do. Next, the CPU 636 confirms whether or not the acquired logical block address LBA is registered in the first data LBA / PBA storage unit M1P (step G2). When the CPU 636 confirms that it is registered in the first data LBA / PBA storage unit M1P (step G2: YES), the counter 638 indicates the number n of rewrites of the write logical block address (hereinafter referred to as write LBA). Count up (step G3).

次いで、CPU636は、第1データLBA・PBA記憶部M1P内に当該書込LBAが登録されている書込LBAブロック内の書換回数nの最大値nmaxと最小値nminの差分nd1を算出する(ステップG4)。次いで、CPU636は、差分nd1が基準値N1(第1データの書換回数を判定する値)より大きいか否かを判定する(nd1>N1)(ステップG5)。差分nd1が基準値N1より大きい場合(ステップG5:YES)、CPU636は、当該書込LBAの登録先を第1データLBA・PBA記憶部M1Pから第2データLBA・PBA記憶部M2Pに変更する(ステップG6)。   Next, the CPU 636 calculates a difference nd1 between the maximum value nmax and the minimum value nmin of the number of rewrites n in the write LBA block in which the write LBA is registered in the first data LBA / PBA storage unit M1P (step S1). G4). Next, the CPU 636 determines whether or not the difference nd1 is larger than a reference value N1 (a value for determining the number of times of rewriting the first data) (nd1> N1) (step G5). When the difference nd1 is larger than the reference value N1 (step G5: YES), the CPU 636 changes the registration destination of the write LBA from the first data LBA / PBA storage unit M1P to the second data LBA / PBA storage unit M2P ( Step G6).

次いで、CPU636は、当該書込データを第2データとして記憶先をNANDフラッシュメモリM1からNANDフラッシュメモリM2に変更する(ステップG7)。この時、CPU636は、第2データを記憶したNANDフラッシュメモリM2内の書込物理アドレス(以下、書込PBAという)を書込LBAと対応付けて第2データLBA・PBA記憶部M2Pに登録する(ステップG7)。なお、この第2データをNANDフラッシュメモリM2に記憶する前に、ECC回路633では書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理が行われる。次いで、CPU636は、第1データLBA・PBA記憶部M1P内で登録先を変更した書込LBAの書換回数nをリセットする(“0”にする)(ステップG8)。   Next, the CPU 636 changes the storage destination from the NAND flash memory M1 to the NAND flash memory M2 using the write data as second data (step G7). At this time, the CPU 636 registers a write physical address (hereinafter referred to as a write PBA) in the NAND flash memory M2 storing the second data in the second data LBA / PBA storage unit M2P in association with the write LBA. (Step G7). Note that before the second data is stored in the NAND flash memory M2, the ECC circuit 633 performs an error correction process on the write data based on the ECC data added to the write data. Next, the CPU 636 resets the rewrite count n of the write LBA whose registration destination is changed in the first data LBA / PBA storage unit M1P (sets it to “0”) (step G8).

また、差分nd1が基準値N1以下の場合(ステップG5:NO)、CPU636は、当該書込データ、すなわち、第1データをNANDフラッシュメモリM1に記憶する(ステップG9)。この時、CPU636は、当該第1データを記憶したNANDフラッシュメモリM1内の書込PBAを第1データLBA・PBA記憶部M1Pに登録する。なお、第1データをNANDフラッシュメモリM1に記憶する前に、ECC回路633では書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理が行われる。   When the difference nd1 is equal to or less than the reference value N1 (step G5: NO), the CPU 636 stores the write data, that is, the first data in the NAND flash memory M1 (step G9). At this time, the CPU 636 registers the write PBA in the NAND flash memory M1 storing the first data in the first data LBA / PBA storage unit M1P. Note that before the first data is stored in the NAND flash memory M1, the ECC circuit 633 performs an error correction process on the write data based on the ECC data added to the write data.

また、ステップG2において、当該書込LBAが第1データLBA・PBA記憶部M1Pに登録されていない場合(ステップG2:NO)、当該書込LBAは第2データLBA・PBA記憶部M2Pに登録されている。この時、CPU636は、当該書込LBAの書換回数nをカウンタ638によりカウントアップする(ステップG10)。   In step G2, if the write LBA is not registered in the first data LBA / PBA storage unit M1P (step G2: NO), the write LBA is registered in the second data LBA / PBA storage unit M2P. ing. At this time, the CPU 636 counts up the number of rewrites n of the write LBA by the counter 638 (step G10).

次いで、CPU636は、第2データLBA・PBA記憶部M2P内に当該書込LBAが登録されている書込LBAブロック内の書換回数nの最大値nmaxと最小値nminの差分nd2を算出する(ステップG11)。次いで、CPU636は、差分nd2が基準値N2(第2データの書換回数を判定する値)より小さいか否かを判定する(nd2<N1)(ステップG12)。差分n2が基準値N2より小さい場合(ステップG11:YES)、CPU636は、当該書込LBAの登録先を第2データLBA・PBA記憶部M2Pから第1データLBA・PBA記憶部M1Pに変更する(ステップG14)。   Next, the CPU 636 calculates a difference nd2 between the maximum value nmax and the minimum value nmin of the number of rewrites n in the write LBA block in which the write LBA is registered in the second data LBA / PBA storage unit M2P (step S3). G11). Next, the CPU 636 determines whether or not the difference nd2 is smaller than a reference value N2 (a value for determining the number of times of rewriting the second data) (nd2 <N1) (step G12). When the difference n2 is smaller than the reference value N2 (step G11: YES), the CPU 636 changes the registration destination of the write LBA from the second data LBA / PBA storage unit M2P to the first data LBA / PBA storage unit M1P ( Step G14).

次いで、CPU636は、当該書込データを第1データとして記憶先をNANDフラッシュメモリM2からNANDフラッシュメモリM1に変更する(ステップG15)。この時、CPU636は、第1データを記憶したNANDフラッシュメモリM1内の書込PBAを書込LBAと対応付けて第1データLBA・PBA記憶部M1Pに登録する(ステップG15)。なお、この第1データをNANDフラッシュメモリM1に記憶する前に、ECC回路633では書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理が行われる。次いで、CPU636は、第2データLBA・PBA記憶部M1P内で登録先を変更した書込LBAの書換回数nをリセットする(“0”にする)(ステップG16)。   Next, the CPU 636 changes the storage destination from the NAND flash memory M2 to the NAND flash memory M1 using the write data as first data (step G15). At this time, the CPU 636 registers the write PBA in the NAND flash memory M1 storing the first data in the first data LBA / PBA storage unit M1P in association with the write LBA (step G15). Note that before the first data is stored in the NAND flash memory M1, the ECC circuit 633 performs an error correction process on the write data based on the ECC data added to the write data. Next, the CPU 636 resets the rewrite count n of the write LBA whose registration destination has been changed in the second data LBA / PBA storage unit M1P (sets it to “0”) (step G16).

また、差分nd2が基準値N2以上の場合(ステップG12:NO)、CPU636は、当該書込データ、すなわち、第2データをNANDフラッシュメモリM2に記憶する(ステップG13)。この時、CPU636は、当該第2データを記憶したNANDフラッシュメモリM2内の書込PBAを第2データLBA・PBA記憶部M2Pに登録する。なお、第2データをNANDフラッシュメモリM2に記憶する前に、ECC回路633では書込データに付加されたECCデータに基づく当該書込データの誤り訂正処理が行われる。   If the difference nd2 is greater than or equal to the reference value N2 (step G12: NO), the CPU 636 stores the write data, that is, the second data in the NAND flash memory M2 (step G13). At this time, the CPU 636 registers the write PBA in the NAND flash memory M2 storing the second data in the second data LBA / PBA storage unit M2P. Note that before the second data is stored in the NAND flash memory M2, the ECC circuit 633 performs an error correction process on the write data based on the ECC data added to the write data.

以上のように、本第5の実施の形態に係るメモリカード600では、異なる記憶容量を有する2つのNANDフラッシュメモリM1,M2をコントローラB602に接続し、コントローラB602により書込データの書換回数nに基づいてNANDフラッシュメモリM1,M2に対する書込データの記憶先を変更するようにした。この場合、書換回数nが少ない第1データを大容量のNANDフラッシュメモリM1に記憶し、書換回数nが多い第2データを小容量のNANDフラッシュメモリM2に記憶するようにした。また、第1データに関する書換回数nの差分nd1が基準値N1より大きくなった場合は、第2データとして記憶先をNANDフラッシュメモリM1からNANDフラッシュメモリM2に変更するようにした。さらに、第2データに関する書換回数nの差分nd2が基準値N2より小さくなった場合は、第1データとして記憶先をNANDフラッシュメモリM2からNANDフラッシュメモリM1に変更するようにした。   As described above, in the memory card 600 according to the fifth embodiment, two NAND flash memories M1 and M2 having different storage capacities are connected to the controller B602, and the controller B602 sets the write data rewrite count n. Based on this, the storage location of the write data for the NAND flash memories M1 and M2 is changed. In this case, the first data with a small number of rewrites n is stored in the large capacity NAND flash memory M1, and the second data with a large number of rewrites n is stored in the small capacity NAND flash memory M2. In addition, when the difference nd1 of the number of rewrites n regarding the first data becomes larger than the reference value N1, the storage destination is changed from the NAND flash memory M1 to the NAND flash memory M2 as the second data. Furthermore, when the difference nd2 of the number of rewrites n regarding the second data becomes smaller than the reference value N2, the storage destination is changed from the NAND flash memory M2 to the NAND flash memory M1 as the first data.

したがって、メモリカード内に記憶容量が異なる2つのNANDフラッシュメモリを搭載した場合、ホスト装置から受け付ける書込データの書換回数に応じて記憶先を動的に変更することが可能になる。例えば、ホスト装置から受け付ける書込データとして、アプリケーションプログラムや画像データ等の書換回数が少ない大容量データ(第1データ)と、ファイルシステム等の書換回数が多い小容量データ(第2データ)を大容量のNANDフラッシュメモリM1と小容量のNANDフラッシュメモリM2に振り分けて記憶することが可能になる。その結果、構成が異なる2つのNANDフラッシュメモリM1,M2を有効に利用することが可能なメモリカードを提供することが可能になる。   Therefore, when two NAND flash memories having different storage capacities are mounted in the memory card, the storage destination can be dynamically changed according to the number of rewrites of the write data received from the host device. For example, as write data received from the host device, large-capacity data (first data) with a small number of rewrites such as an application program or image data and small-capacity data (second data) with a large number of rewrites such as a file system are large. It becomes possible to distribute and store in the NAND flash memory M1 having a capacity and the NAND flash memory M2 having a small capacity. As a result, it is possible to provide a memory card that can effectively use two NAND flash memories M1 and M2 having different configurations.

さらに、ブロック単位でデータの書き込みを行うNANDフラッシュメモリM1,M2において、第2データの書き込みに伴うデータ引越動作等を一方のNANDフラッシュメモリM2に止めることができる。その結果、第2データの書き換え動作に伴うオーバーヘッドの影響を限定的なものとすることが可能になり、メモリカードの性能及び信頼性を向上させることができる。   Furthermore, in the NAND flash memories M1 and M2 that write data in units of blocks, the data moving operation associated with the writing of the second data can be stopped in one NAND flash memory M2. As a result, it is possible to limit the influence of overhead associated with the rewriting operation of the second data, and the performance and reliability of the memory card can be improved.

なお、本第5の実施の形態に係るメモリカード600では、記憶容量が異なるNANDフラッシュメモリM1,M2をコントローラB602に接続する場合を示したが、この構成に限定するものではない。例えば、図46に示すようなメモリカード700の構成としてもよい。なお、図46に示すメモリカード700では、図41に示したメモリカード600と同一の構成部分には同一符号を付している。   In the memory card 600 according to the fifth embodiment, the NAND flash memories M1 and M2 having different storage capacities are connected to the controller B602. However, the present invention is not limited to this configuration. For example, a configuration of a memory card 700 as shown in FIG. 46 may be adopted. In the memory card 700 shown in FIG. 46, the same components as those of the memory card 600 shown in FIG.

図46に示すメモリカード700では、コントローラA601をコントローラチップ701とし、コントローラB602とNANDフラッシュメモリM1を混載したメモリチップ702とし、NANDフラッシュメモリM2を別チップとして構成している。   In the memory card 700 shown in FIG. 46, the controller A601 is a controller chip 701, the controller B602 and the NAND flash memory M1 are mixedly mounted, and the NAND flash memory M2 is configured as a separate chip.

このように構成することにより、NANDフラッシュメモリM2の世代(設計ルール)が変更された際に、NANDフラッシュメモリM2のみを交換し、コントローラB602の制御プログラムを変更するだけで対応可能になり、メモリカード全体の設計に影響を与えずにメモリシステムを更新することが可能になる。   With this configuration, when the generation (design rule) of the NAND flash memory M2 is changed, only the NAND flash memory M2 is replaced, and only the control program of the controller B602 is changed. It becomes possible to update the memory system without affecting the design of the entire card.

なお、図45に示したフローチャートにおいて設定した基準値N1,N2は、NANDフラッシュメモリM1,M2の仕様や、メモリカード600が接続されるホストから入力されるデータの種類等に応じて適宜変更してもよい。要は、基準値N1,N2は、第1データと第2データの記憶先がNANDフラッシュメモリM1,M2間で変更される回数を低減するように設定すれば良い。   The reference values N1 and N2 set in the flowchart shown in FIG. 45 are appropriately changed according to the specifications of the NAND flash memories M1 and M2, the type of data input from the host to which the memory card 600 is connected, and the like. May be. In short, the reference values N1 and N2 may be set so as to reduce the number of times the storage destination of the first data and the second data is changed between the NAND flash memories M1 and M2.

(第6の実施の形態)
本第6の実施の形態では、コントローラBに構成が異なる2つのNANDフラッシュメモリを接続し、ホスト装置20から入力される書込データと付加データ(パリティデータ等)を分離し、2つのNANDフラッシュメモリに対して書込データと付加データの記憶先を振り分ける場合を説明する。図47は、本第6の実施の形態に係るメモリカード800の概略構成を示す図である。なお、図47において、上記第5の実施の形態において図41に示したメモリカード600と同一の構成部分には同一の符号を付している。
(Sixth embodiment)
In the sixth embodiment, two NAND flash memories having different configurations are connected to the controller B, and write data and additional data (parity data, etc.) input from the host device 20 are separated, and two NAND flash A case will be described in which write data and additional data storage destinations are allocated to the memory. FIG. 47 is a diagram showing a schematic configuration of a memory card 800 according to the sixth embodiment. In FIG. 47, the same components as those of the memory card 600 shown in FIG. 41 in the fifth embodiment are denoted by the same reference numerals.

図47に示すメモリカード800において、図41に示したメモリカード600と異なる構成部分は、コントローラB802としたことであり、他の構成と構成間の接続関係は同一である。   The memory card 800 shown in FIG. 47 is different from the memory card 600 shown in FIG. 41 in that the controller B 802 is used, and the connection between the other components is the same.

なお、NANDフラッシュメモリM1,M2は、一つのメモリセルに1ビットのデータを記憶する2値メモリであっても良いし、一つのメモリセルに1ビットより多いデータ(例えば、2ビット)を記憶する多値メモリであっても良い。ここでは、不揮発性メモリの例としてNAND型フラッシュメモリを挙げて説明するが、不揮発性メモリはNAND型フラッシュメモリに限らず、例えば、NOR型フラッシュメモリ等でもよい。また、2つのNANDフラッシュメモリM1,M2を接続する例を示したが、更に複数のNANDフラッシュメモリを接続するようにしてもよい。   The NAND flash memories M1 and M2 may be binary memories that store 1-bit data in one memory cell, or store more data (for example, 2 bits) than 1 bit in one memory cell. It may be a multi-valued memory. Here, a NAND flash memory will be described as an example of the nonvolatile memory. However, the nonvolatile memory is not limited to the NAND flash memory, and may be a NOR flash memory, for example. In addition, although an example in which two NAND flash memories M1 and M2 are connected has been shown, a plurality of NAND flash memories may be further connected.

NANDフラッシュメモリM1,M2としては、例えば、記憶容量が異なるもの(大容量と小容量)、記憶するデータのビット数がことなるもの(2値と多値)、デザインルールが異なるもの、データのブロックサイズが異なるもの(大ブロックと小ブロック)等の異なる構成のものを用いるものとする。本第5の実施の形態では、NANDフラッシュメモリM1として大容量のものを用い、NANDフラッシュメモリM2として小容量のものを用いるものとする。   For example, the NAND flash memories M1 and M2 have different storage capacities (large capacity and small capacity), different numbers of bits of data to be stored (binary and multivalued), different design rules, Those having different configurations such as those having different block sizes (large block and small block) are used. In the fifth embodiment, a large capacity memory is used as the NAND flash memory M1, and a small capacity memory is used as the NAND flash memory M2.

以下の説明において使用する用語「論理ブロックアドレス」、「物理ブロックアドレス」は、それぞれ、NANDフラッシュメモリM1,M2内のブロック自体に割り当てられる論理アドレス、物理アドレスを意味するものである。また、「論理アドレス」、「物理アドレス」は、主に、ブロック自体の論理アドレス、物理アドレスを意味するものであるが、ブロック単位よりも細かい分解能の単位に相当するアドレスである場合もあり得る。 The terms “logical block address” and “physical block address” used in the following description mean a logical address and a physical address assigned to the blocks in the NAND flash memories M1 and M2, respectively. Further, “logical address” and “physical address” mainly mean the logical address and physical address of the block itself, but may be an address corresponding to a unit of resolution smaller than the block unit. .

コントローラB802は、図48に示すように、NAND_I/F631、バッファRAM803、ECC(Error Correcting Code)回路633、データ振分部804、NAND_I/F634,635、CPU805、ROM806、及びアクセス経路設定部807を有する。なお、図48において、上記第5の実施の形態において図42に示したコントローラB602と同一の構成部分には同一の符号を付している。同一符号を付した構成部分の説明は省略する。   As shown in FIG. 48, the controller B 802 includes a NAND_I / F 631, a buffer RAM 803, an ECC (Error Correcting Code) circuit 633, a data distribution unit 804, a NAND_I / F 634, 635, a CPU 805, a ROM 806, and an access path setting unit 807. Have. In FIG. 48, the same components as those of the controller B 602 shown in FIG. 42 in the fifth embodiment are denoted by the same reference numerals. The description of the components with the same reference numerals is omitted.

バッファRAM803は、コントローラA601から入力されるデータをNANDフラッシュメモリM1,M2に書き込む際に、一定量のデータ(例えば、1ページ分)を一時的に記憶し、NANDフラッシュメモリM1,M2から読み出されるデータをコントローラA601に出力する際に、一定量のデータを一時的に記憶する。また、バッファRAM803は、CPU805の作業領域として使用され、制御プログラムや各種のテーブル等を記憶する。さらに、バッファRAM803は、NANDフラッシュメモリM1,M2に振り分けて記憶する実データとECCデータの記憶先を管理するための実データLBA・PBA記憶部M1PとECCデータLBA・PBA記憶部M2Pを有する。   The buffer RAM 803 temporarily stores a certain amount of data (for example, one page) when the data input from the controller A 601 is written to the NAND flash memories M1 and M2, and is read from the NAND flash memories M1 and M2. When outputting data to the controller A601, a certain amount of data is temporarily stored. The buffer RAM 803 is used as a work area for the CPU 805 and stores a control program, various tables, and the like. Further, the buffer RAM 803 has an actual data LBA / PBA storage unit M1P and an ECC data LBA / PBA storage unit M2P for managing the storage destinations of the actual data and ECC data distributed and stored in the NAND flash memories M1 and M2.

CPU805は、NANDフラッシュメモリM1,M2に対するアクセス処理を制御するものである。CPU805は、例えば、メモリカード800が電源供給を受けた際に、ROM806内に格納されているファームウェアをバッファRAM803にロードして所定の処理を実行する。CPU805は、所定の処理において、後述する各種のテーブルをバッファRAM803上で作成し、コントローラA601から書込コマンド、読出コマンド、消去コマンドを受け付けてNANDフラッシュメモリM1,M2内の該当領域に対するアクセス処理を実行し、バッファRAM803を通じたデータ転送処理を実行する。   The CPU 805 controls access processing to the NAND flash memories M1 and M2. For example, when the memory card 800 is supplied with power, the CPU 805 loads firmware stored in the ROM 806 into the buffer RAM 803 and executes predetermined processing. In a predetermined process, the CPU 805 creates various tables, which will be described later, on the buffer RAM 803, receives a write command, a read command, and an erase command from the controller A601 and performs an access process for the corresponding area in the NAND flash memories M1 and M2. And execute data transfer processing through the buffer RAM 803.

ROM806は、CPU805により使用される制御プログラムと書込制御プログラム等を格納するメモリである。なお、コントローラB802は、NANDバス611によりコントローラA601と接続されており、CPU636は、コントローラA601に対してNANDフラッシュメモリM1,M2であるものとして処理を実行する。すなわち、CPU805は、コントローラA601から書込コマンド、読出コマンド、消去コマンドを受け付けた際に、NANDフラッシュメモリM1,M2内の該当領域に対するアクセス処理を実行する。   The ROM 806 is a memory that stores a control program used by the CPU 805, a write control program, and the like. Note that the controller B 802 is connected to the controller A 601 via the NAND bus 611, and the CPU 636 executes processing with respect to the controller A 601 as the NAND flash memories M1 and M2. That is, when the CPU 805 receives a write command, a read command, and an erase command from the controller A 601, the CPU 805 executes an access process for the corresponding area in the NAND flash memories M1 and M2.

また、CPU805は、コントローラA601から書込コマンドと書込データを受け付けた際に、書込制御プログラムに応じた書込処理(図50に示すフローチャート参照)を実行する。さらに、CPU805は、コントローラA601から読出コマンドを受け付けた際に、読出制御プログラムに応じた読出処理(図51に示すフローチャート参照)を実行する。また、CPU805は、コントローラA601から消去コマンドを受け付けた際に、消去制御プログラムに応じた消去処理(図52に示すフローチャート参照)を実行する。   Further, when the CPU 805 receives a write command and write data from the controller A 601, the CPU 805 executes a write process (see the flowchart shown in FIG. 50) according to the write control program. Furthermore, when receiving a read command from controller A601, CPU 805 executes a read process (see the flowchart shown in FIG. 51) according to the read control program. Further, when the CPU 805 receives an erase command from the controller A601, it executes an erase process (see the flowchart shown in FIG. 52) according to the erase control program.

データ振分部804は、CPU805により書込処理が実行される際に、実データとECCデータの記憶先をNANDフラッシュメモリM1,M2に振り分けて記憶する動作を実行する。また、データ振分部804は、CPU805により読出処理が実行される際に、NANDフラッシュメモリM1,M2から該当する実データとECCデータを読み出す動作を実行する。   When the CPU 805 executes the writing process, the data distribution unit 804 executes an operation of distributing the storage destination of the actual data and the ECC data to the NAND flash memories M1 and M2. In addition, when the CPU 805 executes a read process, the data distribution unit 804 executes an operation of reading out corresponding real data and ECC data from the NAND flash memories M1 and M2.

アクセス経路設定部807は、ホスト装置20がNANDフラッシュメモリM1,M2に直接アクセスするアクセス経路を設定する。図48に示すように、アクセス経路設定部807は、NAND_I/F631及びバッファRAM803の間に接続された第1のスイッチSW1と、データ振分部804及びNAND_I/F634,635の間に接続された第2のスイッチSW2及び第3のスイッチSW3を有する。第1〜第3のスイッチSW1〜SW3は、CPU805から入力される切り替え制御信号に応じて、NAND_I/F631、バッファRAM803、データ振分部804及びNAND_I/F634,635の接続関係を切り替える。この切り替えにより、書込データ及び読出データ等がバッファRAM803、ECC回路33、データ振分部804を迂回し、且つホスト装置20が発行するコマンド等をNANDフラッシュメモリM1,M2に直接伝達できる。   The access path setting unit 807 sets an access path for the host device 20 to directly access the NAND flash memories M1 and M2. As shown in FIG. 48, the access path setting unit 807 is connected between the first switch SW1 connected between the NAND_I / F 631 and the buffer RAM 803, and between the data distribution unit 804 and the NAND_I / Fs 634 and 635. It has a second switch SW2 and a third switch SW3. The first to third switches SW1 to SW3 switch the connection relationship between the NAND_I / F 631, the buffer RAM 803, the data distribution unit 804, and the NAND_I / Fs 634 and 635 in accordance with a switching control signal input from the CPU 805. By this switching, write data, read data, and the like can bypass the buffer RAM 803, the ECC circuit 33, and the data distribution unit 804, and a command issued by the host device 20 can be directly transmitted to the NAND flash memories M1 and M2.

図49は、コントローラB802の上記書込処理に関わる構成を示す図である。なお、図49において図48に示したコントローラB802内の構成と同一の構成部分には同一符号を付している。図49に示すようにコントローラB802は、バッファRAM803内にNANDフラッシュメモリM1,M2に対して記憶先が振り分けられる実データとECCデータの各論理ブロックアドレスLBAと物理ブロックアドレスPBAを記憶する領域として実データLBA・PBA記憶部M1PとECCデータLBA・PBA記憶部M2Pを設けている。実データLBA・PBA記憶部M1Pは、ホスト装置20から書込要求された書込データから分離されたデータ本体(本第6の実施の形態では実データという)の記憶先の論理ブロックアドレスLBAと物理ブロックアドレスPBAを記憶する領域である。ECCデータLBA・PBA記憶部M2Pは、実データに付加されるECCデータ(付加データ)の記憶先の論理ブロックアドレスLBAと物理ブロックアドレスPBAを記憶する領域である。   FIG. 49 is a diagram showing a configuration relating to the writing process of the controller B 802. 49, the same components as those in the controller B 802 shown in FIG. 48 are denoted by the same reference numerals. As shown in FIG. 49, the controller B 802 is an area in the buffer RAM 803 that stores the actual data that is allocated to the NAND flash memories M1 and M2, the logical block address LBA of the ECC data, and the physical block address PBA. A data LBA / PBA storage unit M1P and an ECC data LBA / PBA storage unit M2P are provided. The actual data LBA / PBA storage unit M1P includes the logical block address LBA of the storage destination of the data body (referred to as actual data in the sixth embodiment) separated from the write data requested to be written from the host device 20. This is an area for storing the physical block address PBA. The ECC data LBA / PBA storage unit M2P is an area for storing a logical block address LBA and a physical block address PBA of a storage destination of ECC data (additional data) added to actual data.

図49に示すように、NANDフラッシュメモリM1は実データ記憶部とし、NANDフラッシュメモリM2はECCデータ記憶部とする。したがって、NANDフラッシュメモリM1に記憶した実データの論理ブロックアドレスLBAと物理ブロックアドレスPBAを実データLBA・PBA記憶部M1Pに記憶し、NANDフラッシュメモリM2に記憶したECCデータの論理ブロックアドレスLBAと物理ブロックアドレスPBAをECCデータLBA・PBA記憶部M2Pに記憶する。また、実データLBA・PBA記憶部M1Pは、実データの消去状態を示す消去情報を対応付けて記憶する。ECCデータLBA・PBA記憶部M2Pは、ECCデータの消去状態を示す消去情報を対応付けて記憶する。   As shown in FIG. 49, the NAND flash memory M1 is an actual data storage unit, and the NAND flash memory M2 is an ECC data storage unit. Accordingly, the logical block address LBA and physical block address PBA of the actual data stored in the NAND flash memory M1 are stored in the actual data LBA / PBA storage unit M1P, and the logical block address LBA and the physical block of the ECC data stored in the NAND flash memory M2 are stored. The block address PBA is stored in the ECC data LBA / PBA storage unit M2P. The actual data LBA / PBA storage unit M1P stores erasure information indicating the erasure state of the actual data in association with each other. The ECC data LBA / PBA storage unit M2P stores erasure information indicating the erasure state of the ECC data in association with each other.

次に、図50に示すフローチャートを参照して、コントローラB802において実行される書込処理について説明する。   Next, the writing process executed in the controller B 802 will be described with reference to the flowchart shown in FIG.

CPU805は、ホスト装置20側からコントローラA601を経由して書き込み要求コマンドと書込データを受け付けると(ステップH1)、この書き込み要求コマンドに付加された付加データに含まれている書込論理ブロックアドレスLBAと書込データに付加されたECCデータを取り出す(ステップH2)。この処理により実データとECCデータが分離される。   When the CPU 805 receives a write request command and write data from the host device 20 via the controller A 601 (step H1), the write logical block address LBA included in the additional data added to the write request command. ECC data added to the write data is extracted (step H2). By this process, the actual data and the ECC data are separated.

次いで、CPU805は、書込論理ブロックアドレスLBA順に分離した実データとECCデータをNANDフラッシュメモリM1,M2に振り分けて記憶する(ステップH3)。この処理に際して、データ振分部804は、CPU805から分離されて入力される実データとECCデータを、CPU805から入力される書込論理ブロックアドレスLBA順にNANDフラッシュメモリM1,M2に振り分けて記憶する。なお、この実データをNANDフラッシュメモリM1に記憶する前に、ECC回路633では実データに付加されたECCデータに基づく当該実データの誤り訂正処理が行われる。   Next, the CPU 805 distributes and stores the actual data and ECC data separated in the order of the write logical block addresses LBA in the NAND flash memories M1 and M2 (step H3). In this processing, the data distribution unit 804 distributes and stores the actual data and the ECC data separated from the CPU 805 in the NAND flash memories M1 and M2 in the order of the write logical block address LBA input from the CPU 805. Note that before the actual data is stored in the NAND flash memory M1, the ECC circuit 633 performs an error correction process on the actual data based on the ECC data added to the actual data.

次いで、CPU805は、実データを記憶したNANDフラッシュメモリM1内の論理ブロックアドレスLBAと物理ブロックアドレスPBAを実データLBA・PBA記憶部M1Pに記憶し、ECCデータを記憶したNANDフラッシュメモリM2内の論理ブロックアドレスLBAと物理ブロックアドレスPBAをECCデータLBA・PBA記憶部M2Pに記憶する(ステップH4)。   Next, the CPU 805 stores the logical block address LBA and physical block address PBA in the NAND flash memory M1 storing actual data in the actual data LBA / PBA storage unit M1P, and stores the logical data in the NAND flash memory M2 storing ECC data. The block address LBA and the physical block address PBA are stored in the ECC data LBA / PBA storage unit M2P (step H4).

次いで、CPU805は、ホスト装置20へ書込処理の完了を通知する(ステップH5)。この書込処理の完了通知は、コントローラB802からコントローラA601を通じてホスト装置20に通知される。   Next, the CPU 805 notifies the host device 20 of the completion of the writing process (step H5). This write processing completion notification is sent from the controller B 802 to the host device 20 through the controller A 601.

次に、図51に示すフローチャートを参照して、コントローラB802において実行される読出処理について説明する。   Next, the reading process executed in the controller B 802 will be described with reference to the flowchart shown in FIG.

CPU805は、ホスト装置20側からコントローラA601を経由して読み出し要求コマンドを受けると(ステップI1)、この読み出し要求コマンドに含まれる物理ブロックアドレスPBAを参照する(ステップI2)。次いで、CPU805は、読み出し要求コマンドから参照した物理ブロックアドレスPBAに基づいて、実データLBA・PBA記憶部M1Pを参照して読み出し対象実データの論理ブロックアドレスLBAと物理ブロックアドレスPBAを取得する(ステップI3)。   When the CPU 805 receives a read request command from the host device 20 via the controller A 601 (step I1), the CPU 805 refers to the physical block address PBA included in the read request command (step I2). Next, based on the physical block address PBA referred from the read request command, the CPU 805 refers to the actual data LBA / PBA storage unit M1P and acquires the logical block address LBA and the physical block address PBA of the read target actual data (step). I3).

次いで、CPU805は、読み出し要求コマンドから参照した物理ブロックアドレスPBAに基づいて、ECCデータLBA・PBA記憶部M2Pを読み出し対象ECCデータの論理ブロックアドレスLBAと物理ブロックアドレスPBAを取得する(ステップI4)。   Next, the CPU 805 acquires the logical block address LBA and the physical block address PBA of the ECC data to be read from the ECC data LBA / PBA storage unit M2P based on the physical block address PBA referred from the read request command (step I4).

次いで、CPU805は、ステップI3で取得した実データの論理ブロックアドレスLBAと物理ブロックアドレスPBAに対応するNANDフラッシュメモリM1内の領域から実データを読み出し、ステップI4で取得したECCデータの論理ブロックアドレスLBAと物理ブロックアドレスPBAに対応するNANDフラッシュメモリM2内の領域からECCデータを読み出し、ホスト装置20に返送する(ステップI5)。この処理に際して、データ振分部804は、CPU805から入力される実データとECCデータの各論理ブロックアドレスLBAと各物理ブロックアドレスPBAによりNANDフラッシュメモリM1,M2内の各領域から実データとECCデータを読み出してECC回路633に出力する。ECC回路633は、入力された実データにECCデータを付加してCPU805に出力する。そして、コントローラB802からコントローラA601を通じてホスト装置20に読み出し対象データが返送される。   Next, the CPU 805 reads the actual data from the area in the NAND flash memory M1 corresponding to the logical block address LBA of the actual data acquired in step I3 and the physical block address PBA, and the logical block address LBA of the ECC data acquired in step I4. ECC data is read from the area in the NAND flash memory M2 corresponding to the physical block address PBA and returned to the host device 20 (step I5). In this processing, the data allocating unit 804 receives the actual data and ECC data from each area in the NAND flash memories M1 and M2 based on each logical block address LBA and each physical block address PBA of the actual data and ECC data input from the CPU 805. Is output to the ECC circuit 633. The ECC circuit 633 adds ECC data to the input actual data and outputs it to the CPU 805. Then, the read target data is returned from the controller B 802 to the host device 20 through the controller A 601.

次に、図52に示すフローチャートを参照して、コントローラB802において実行される消去処理について説明する。   Next, the erasing process executed in the controller B 802 will be described with reference to the flowchart shown in FIG.

CPU805は、ホスト装置20側からコントローラA601を経由して消去要求コマンドを受け付けると(ステップJ1)、この消去要求コマンドに含まれる物理ブロックアドレスPBAを参照する(ステップJ2)。   When the CPU 805 receives an erase request command from the host device 20 via the controller A 601 (step J1), the CPU 805 refers to the physical block address PBA included in the erase request command (step J2).

次いで、ステップJ3において、CPU805は、消去要求コマンドから参照した物理ブロックアドレスPBAに基づいて、実データLBA・PBA記憶部M1P内の対応する実データの論理ブロックアドレスLBAと物理ブロックアドレスPBAの記憶領域に消去状態であることを示す消去情報を記憶する。さらに、ステップJ3において、CPU805は、消去要求コマンドから参照した物理ブロックアドレスPBAに基づいて、ECCデータLBA・PBA記憶部M2P内の対応するECCデータ論理ブロックアドレスLBAと物理ブロックアドレスPBAの記憶領域に消去状態であることを示す消去情報を記憶する。   Next, in step J3, the CPU 805 stores the storage area of the corresponding logical block address LBA and physical block address PBA of the actual data in the actual data LBA / PBA storage unit M1P based on the physical block address PBA referenced from the erase request command. Stores erasure information indicating the erasure state. Further, in step J3, the CPU 805 stores the corresponding ECC data logical block address LBA and physical block address PBA in the ECC data LBA / PBA storage unit M2P based on the physical block address PBA referenced from the erase request command. Erase information indicating the erase state is stored.

次いで、CPU805は、消去要求された物理ブロックアドレスPBAに対応するNANDフラッシュメモリM1,M2内の実データ及びECCデータの消去は行わず、消去を行った旨をホスト装置20に通知する(ステップJ4)。この消去通知は、コントローラB802からコントローラA601を通じてホスト装置20に通知される。   Next, the CPU 805 does not erase the actual data and ECC data in the NAND flash memories M1 and M2 corresponding to the physical block address PBA requested to be erased, but notifies the host device 20 that the erase has been performed (step J4). ). This deletion notification is sent from the controller B 802 to the host device 20 through the controller A 601.

以上のように、本第6の実施の形態に係るメモリカード800では、異なる記憶容量を有する2つのNANDフラッシュメモリM1,M2をコントローラB802に接続し、コントローラB802とデータ振分部804によりホスト装置20から書き込み要求された書込データを実データとECCデータに分離し、NANDフラッシュメモリM1,M2に対して振り分けて記憶するようにした。   As described above, in the memory card 800 according to the sixth embodiment, the two NAND flash memories M1 and M2 having different storage capacities are connected to the controller B802, and the host device is connected by the controller B802 and the data distribution unit 804. The write data requested to be written from 20 is separated into actual data and ECC data, and distributed and stored in the NAND flash memories M1 and M2.

したがって、メモリカード内に記憶容量が異なる2つのNANDフラッシュメモリM1,M2を搭載した場合、ホスト装置から受け付ける書込データを実データとECCデータに分離してNANDフラッシュメモリM1,M2に振り分けて記憶先することが可能になる。その結果、構成が異なる2つのNANDフラッシュメモリM1,M2を有効に利用することが可能なメモリカードを提供することが可能になる。   Therefore, when two NAND flash memories M1 and M2 having different storage capacities are mounted in the memory card, the write data received from the host device is separated into actual data and ECC data, and distributed to the NAND flash memories M1 and M2. It is possible to go ahead. As a result, it is possible to provide a memory card that can effectively use two NAND flash memories M1 and M2 having different configurations.

また、本第6の実施の形態に係るメモリカード800では、コントローラB802内にアクセス経路設定部807を有する構成とした。このため、上記第2の実施の形態に示したように、メモリカード800の出荷テスト時において、ホスト装置20をテスタとしてメモリカード800と電気的に接続することが可能になる。この場合、コントローラB802は、ホスト装置20から受け取ったアドレスを変換し、この変換したアドレスを用いてNANDフラッシュメモリM1,M2にアクセスする第1モードと、ホスト装置20から受け取ったアドレスを用いてNANDフラッシュメモリM1,M2に直接アクセスする第2モードとで動作することが可能になる。また、コントローラB802は、ホスト装置20から受け取る動作モードの切り替えコマンドに応じて第1モードと第2モードを切り替える切替制御を実行する。   Further, the memory card 800 according to the sixth embodiment is configured to have the access path setting unit 807 in the controller B 802. Therefore, as shown in the second embodiment, when the memory card 800 is tested for shipping, the host device 20 can be electrically connected to the memory card 800 as a tester. In this case, the controller B 802 converts the address received from the host device 20, uses the converted address to access the NAND flash memories M1 and M2, and uses the address received from the host device 20 to perform NAND. It becomes possible to operate in the second mode in which the flash memories M1 and M2 are directly accessed. In addition, the controller B 802 executes switching control for switching between the first mode and the second mode in accordance with an operation mode switching command received from the host device 20.

そして、上記第2の実施の形態に示したように、出荷テスト時において、ホスト装置20は、メモリカード800内のコントローラB802とNANDフラッシュメモリM1,M2を個別にテストすることが可能になる。さらに、コントローラB802は、第1モードから第2モードに移行する移行動作と、第2モードから第1モードに復帰する復帰動作を、ホスト装置20から受け取るコマンドに応じて制御する構成であるため、メモリカード800の外部接続ピン数を増加させることなく第2モードを実現することができる。   As shown in the second embodiment, the host device 20 can individually test the controller B 802 and the NAND flash memories M1 and M2 in the memory card 800 during the shipping test. Further, the controller B 802 is configured to control the transition operation for shifting from the first mode to the second mode and the return operation for returning from the second mode to the first mode in accordance with a command received from the host device 20. The second mode can be realized without increasing the number of external connection pins of the memory card 800.

また、NAND単体テストを実行する場合、ホスト装置20は、メモリカード800の電源投入後、移行動作を指示するコマンドシーケンスを発行する。コントローラB802は、当該コマンドシーケンス受け付けることより動作モードを第2モードに設定し、ホスト装置20から復帰動作を指示するコマンドシーケンスが発行されるまで第2モードを維持する。このようにコマンドシーケンスを用いることにより、コントローラB802が第2モード中に意図しない復帰動作を実行することを回避できる。   When executing the NAND unit test, the host device 20 issues a command sequence for instructing a migration operation after the memory card 800 is powered on. The controller B 802 sets the operation mode to the second mode by receiving the command sequence, and maintains the second mode until a command sequence instructing the return operation is issued from the host device 20. By using the command sequence in this way, it is possible to avoid that the controller B 802 performs an unintended return operation during the second mode.

なお、図48では、メモリカード800がホスト装置20から送られてくるコマンドによりアクセス経路設定部807がアクセス経路を設定する場合を示した。この構成に限定するものではなく、例えば、図35に示したメモリカード200のように、アクセス経路設定部2022が電源投入を検知してアクセス経路を自動的に設定する構成を、メモリカード800に適用するようにしても良い。この場合、電源投入直後は自動的に第2モードに設定することにより、コントローラB802に異常があった場合でもNAND単体テストが実行可能になる。   48 shows a case where the access path setting unit 807 sets an access path by a command sent from the host device 20 to the memory card 800. The configuration is not limited to this configuration. For example, a configuration in which the access path setting unit 2022 detects power-on and automatically sets an access path as in the memory card 200 illustrated in FIG. You may make it apply. In this case, the NAND unit test can be executed even if there is an abnormality in the controller B802 by automatically setting the second mode immediately after the power is turned on.

なお、本第6の実施の形態に係るメモリカード800では、記憶容量が異なるNANDフラッシュメモリM1,M2をコントローラB802に接続する場合を示したが、この構成に限定するものではない。例えば、図53に示すようなメモリカード900の構成としてもよい。なお、図53に示すメモリカード900では、図48に示したメモリカード800と同一の構成部分には同一符号を付している。   In the memory card 800 according to the sixth embodiment, NAND flash memories M1 and M2 having different storage capacities are connected to the controller B 802. However, the present invention is not limited to this configuration. For example, a memory card 900 as shown in FIG. 53 may be configured. In the memory card 900 shown in FIG. 53, the same components as those of the memory card 800 shown in FIG.

図53に示すメモリカード900では、コントローラA601をコントローラチップ901とし、コントローラA601にNANDバス613を介して外部にNANDフラッシュメモリM1を接続し、コントローラB802とNANDフラッシュメモリM2を混載したメモリチップ902として構成している。   In the memory card 900 shown in FIG. 53, the controller A601 is a controller chip 901, the NAND flash memory M1 is connected to the controller A601 through the NAND bus 613, and the controller B802 and the NAND flash memory M2 are mixedly mounted as a memory chip 902. It is composed.

このように構成することにより、NANDフラッシュメモリM1の世代(設計ルール)が変更された際に、NANDフラッシュメモリM1のみを交換し、コントローラA601の制御プログラムを変更するだけで対応可能になり、メモリカード全体の設計に影響を与えずにメモリシステムを更新することが可能になる。また、NANDフラッシュメモリM2の世代(設計ルール)が変更された際に、メモリチップ902のみを交換し、コントローラB802の制御プログラムを変更するだけで対応可能になり、メモリカード全体の設計に影響を与えずにメモリシステムを更新することが可能になる。   With this configuration, when the generation (design rule) of the NAND flash memory M1 is changed, only the NAND flash memory M1 is replaced and only the control program of the controller A601 is changed. It becomes possible to update the memory system without affecting the design of the entire card. In addition, when the generation (design rule) of the NAND flash memory M2 is changed, it is possible to cope only by exchanging only the memory chip 902 and changing the control program of the controller B802, which affects the design of the entire memory card. It becomes possible to update the memory system without giving.

(第7の実施の形態)
本第7の実施の形態では、上記第5の実施の形態に示したメモリカード600をパッケージ化する際の構成を例示する。図54は、本第7の実施の形態に係るメモリカード600をパッケージ化した際の構成を示す断面図である。なお、図54において、上記第5の実施の形態において図41に示したメモリカード600と同一の構成部分には同一の符号を付している。
(Seventh embodiment)
In the seventh embodiment, a configuration when the memory card 600 shown in the fifth embodiment is packaged is exemplified. FIG. 54 is a cross-sectional view showing a configuration when the memory card 600 according to the seventh embodiment is packaged. In FIG. 54, the same components as those of the memory card 600 shown in FIG. 41 in the fifth embodiment are denoted by the same reference numerals.

図54において、650は基板である。この基板650上には、層間膜651を介して上記NANDフラッシュメモリM1,M2が積層されている。NANDフラッシュメモリM2上には、上記コントローラA601及び上記コントローラB602がそれぞれ層間膜651を介して形成されている。基板650、NANDフラッシュメモリM1,M2、及びコントローラB602において、図中左端部の各上面にはボンディングワイヤ658を接続するためのパッド652〜655が形成されている。また、コントローラB602の図中右端部の上面と、コントローラA601の図中左端部の上面には、ボンディングワイヤ658を接続するためのパッド656,657がそれぞれ形成されている。また、基板650の図中左端部の下面側には、上記図25に示した第1〜第18ピンP1〜P18に対応する外部接続ピン659が形成されている。   In FIG. 54, reference numeral 650 denotes a substrate. On the substrate 650, the NAND flash memories M1 and M2 are stacked via an interlayer film 651. On the NAND flash memory M2, the controller A601 and the controller B602 are formed via an interlayer film 651, respectively. In the substrate 650, the NAND flash memories M1 and M2, and the controller B602, pads 652 to 655 for connecting the bonding wires 658 are formed on the upper surfaces of the left end portions in the drawing. Also, pads 656 and 657 for connecting bonding wires 658 are formed on the upper surface of the right end portion of the controller B602 in the drawing and the upper surface of the left end portion of the controller A601 in the drawing, respectively. Further, external connection pins 659 corresponding to the first to eighteenth pins P1 to P18 shown in FIG. 25 are formed on the lower surface side of the left end portion of the substrate 650 in the drawing.

図55は、本第7の実施の形態に係るメモリカード600をパッケージ化した際の他の構成を示す断面図である。なお、図55において、上記第5の実施の形態において図41に示したメモリカード600と同一の構成部分と、図54に示した構成と同一の構成部分には同一の符号を付しており、その説明を省略する。   FIG. 55 is a cross-sectional view showing another configuration when the memory card 600 according to the seventh embodiment is packaged. In FIG. 55, the same components as those of the memory card 600 shown in FIG. 41 in the fifth embodiment and the same components as those shown in FIG. The description is omitted.

図55において、NANDフラッシュメモリM2上には、コントローラB602が層間膜651を介して形成されている。コントローラB602上には、コントローラA601が層間膜651を介して形成されている。基板650、NANDフラッシュメモリM1,M2、コントローラB601、及びコントローラA601において、図中左端部の各上面にはボンディングワイヤ658を接続するためのパッド652〜656がそれぞれ形成されている。   In FIG. 55, a controller B 602 is formed on the NAND flash memory M 2 via an interlayer film 651. On the controller B 602, a controller A 601 is formed via an interlayer film 651. In the substrate 650, the NAND flash memories M1 and M2, the controller B601, and the controller A601, pads 652 to 656 for connecting bonding wires 658 are formed on the upper surfaces of the left end portions in the drawing.

上記図54及び図55に示した各パッケージの断面図は、NANDフラッシュメモリM2上にコントローラB602及びコントローラA603を積層して形成した場合を例示したものである。図54及び図55に示した各メモリカード600は、NANDフラッシュメモリM2上にコントローラB602及びコントローラA601を積層し、ボンディングワイヤ658を接続した後、外部接続ピン659を除く全体が樹脂等により封止される。   The cross-sectional views of the packages shown in FIGS. 54 and 55 exemplify the case where the controller B 602 and the controller A 603 are stacked on the NAND flash memory M2. 54 and 55, the controller B602 and controller A601 are stacked on the NAND flash memory M2, and after bonding wires 658 are connected, the whole except the external connection pins 659 is sealed with resin or the like. Is done.

上述のように、積層構造とすることにより、実質的にNANDフラッシュメモリM1,M2を実装可能な基板650の大きさでメモリカード600を形成することができ、メモリカード600としてのパッケージの大きさを縮小することが可能になる。   As described above, the stacked structure allows the memory card 600 to be formed with the size of the substrate 650 on which the NAND flash memories M1 and M2 can be substantially mounted. The size of the package as the memory card 600 Can be reduced.

図56は、本第7の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。なお、図56において、上記第5の実施の形態において図41に示したメモリカード600と同一の構成部分と、図54に示した構成と同一の構成部分には同一の符号を付しており、その説明を省略する。   FIG. 56 is a cross-sectional view showing another configuration when the memory card according to the seventh embodiment is packaged. In FIG. 56, the same components as those of the memory card 600 shown in FIG. 41 in the fifth embodiment and the same components as those shown in FIG. The description is omitted.

図56において、メモリカード600の基板650上には、NANDフラッシュメモリM1、コントローラB602、及びコントローラA601がそれぞれ層間膜651を介して形成されている。NANDフラッシュメモリM1上には、NANDフラッシュメモリM2が層間膜651を介して形成されている。コントローラA601の図中左端部の上面にはボンディングワイヤ658を接続するためのパッド655が形成されている。また、コントローラA601の図中右端部の上面と、コントローラB602の図中左端部の上面には、ボンディングワイヤ658を接続するためのパッド656,657がそれぞれ形成されている。また、コントローラB601の図中右端部の上面と、NANDフラッシュメモリM1の図中左端部の上面には、ボンディングワイヤ658を接続するためのパッド661,662がそれぞれ形成されている。さらに、NANDフラッシュメモリM2の図中左端部の上面には、ボンディングワイヤ658を接続するためのパッド663が形成されている。   In FIG. 56, on the substrate 650 of the memory card 600, a NAND flash memory M1, a controller B602, and a controller A601 are respectively formed via an interlayer film 651. On the NAND flash memory M1, a NAND flash memory M2 is formed via an interlayer film 651. A pad 655 for connecting a bonding wire 658 is formed on the upper surface of the left end portion of the controller A601 in the drawing. Further, pads 656 and 657 for connecting the bonding wires 658 are formed on the upper surface of the right end portion of the controller A601 in the drawing and the upper surface of the left end portion of the controller B602 in the drawing, respectively. Also, pads 661 and 662 for connecting bonding wires 658 are formed on the upper surface of the right end portion of the controller B601 in the drawing and the upper surface of the left end portion of the NAND flash memory M1 in the drawing, respectively. Further, a pad 663 for connecting the bonding wire 658 is formed on the upper surface of the left end portion of the NAND flash memory M2 in the drawing.

図56に示したメモリカード600は、基板650上にNANDフラッシュメモリM1,M2、コントローラB602、及びコントローラA601を形成し、ボンディングワイヤ658を接続した後、外部接続ピン659を除く全体が樹脂等により封止される。   The memory card 600 shown in FIG. 56 includes NAND flash memories M1 and M2, a controller B602, and a controller A601 formed on a substrate 650. After the bonding wires 658 are connected, the whole except for the external connection pins 659 is made of resin or the like. Sealed.

上記図56に示したパッケージの断面図は、NANDフラッシュメモリM1,M2、コントローラB602、及びコントローラA601を基板650上に配置した場合を例示したものである。このような構造とすることにより、NANDフラッシュメモリM1,M2の世代を変更する際に、NANDフラッシュメモリM1やコントローラB602の交換が容易になる。   The cross-sectional view of the package shown in FIG. 56 exemplifies a case where the NAND flash memories M1 and M2, the controller B602, and the controller A601 are arranged on the substrate 650. With such a structure, when changing the generation of the NAND flash memories M1 and M2, the NAND flash memory M1 and the controller B602 can be easily replaced.

なお、上記図54〜図56に示した各パッケージの構成は、メモリカード600に対応するものとして示したが、メモリカード以外に、例えば、マルチチップパッケージ(MCM)、システム・イン・パッケージ(SiP)等としても適用可能である。   The configurations of the packages shown in FIGS. 54 to 56 are shown as corresponding to the memory card 600, but other than the memory card, for example, a multi-chip package (MCM), a system-in-package (SiP) ) And the like.

(第8の実施の形態)
本第8の実施の形態では、上記第7の実施の形態において例示したパッケージをUSB(Universal Serial Bus )メモリとして適用する場合の構成を例示する。図57は、本第8の実施の形態に係るUSBメモリの構成を示す断面図である。なお、図57において、上記第7の実施の形態において図54に示したメモリカードのパッケージ構成と同一の構成部分には同一の符号を付して、その説明を省略する。
(Eighth embodiment)
The eighth embodiment exemplifies a configuration when the package exemplified in the seventh embodiment is applied as a USB (Universal Serial Bus) memory. FIG. 57 is a cross-sectional view showing the configuration of the USB memory according to the eighth embodiment. 57, the same reference numerals are given to the same components as those of the memory card package shown in FIG. 54 in the seventh embodiment, and the description thereof is omitted.

図57に示すUSBメモリ1000において、1001は回路基板である。この回路基板1001の上面側には、電子部品1002及びUSBコントローラ等の制御チップ1003が実装されると共に、USBコネクタの入出力端子となる導体層1004が形成されている。また、回路基板1001の下面側には、上記図54に示したパッケージ化したメモリカード600が実装されている。また、1005はUSBメモリ1000の外装ケースである。   In the USB memory 1000 shown in FIG. 57, reference numeral 1001 denotes a circuit board. On the upper surface side of the circuit board 1001, an electronic component 1002 and a control chip 1003 such as a USB controller are mounted, and a conductor layer 1004 serving as an input / output terminal of a USB connector is formed. The packaged memory card 600 shown in FIG. 54 is mounted on the lower surface side of the circuit board 1001. Reference numeral 1005 denotes an outer case of the USB memory 1000.

図57に示したUSBメモリ1000では、メモリカード600をそのまま回路基板1001に実装するようにしたため、USBメモリの製造を容易にすることができるとともに、メモリカード600の利用範囲を拡大することができる。また、USBメモリ1000内のNANDフラッシュメモリM1,M2の世代を変更する場合に、その世代に合わせて製造されたメモリカード600を利用して実装することが可能になり、USBメモリとしての仕様変更も容易になる。   In the USB memory 1000 shown in FIG. 57, the memory card 600 is mounted on the circuit board 1001 as it is, so that the USB memory can be easily manufactured and the use range of the memory card 600 can be expanded. . In addition, when the generation of the NAND flash memories M1 and M2 in the USB memory 1000 is changed, it can be mounted using the memory card 600 manufactured according to the generation, and the specification changes as the USB memory. Will also be easier.

なお、本第8の実施の形態では、USBメモリ内に図54に示したメモリカード600を適用した場合を例示したが、これに限定するものではなく、上記図55に示したメモリカード600や図56に示したメモリカード600等を適用しても良い。   In the eighth embodiment, the case where the memory card 600 shown in FIG. 54 is applied to the USB memory is illustrated. However, the present invention is not limited to this, and the memory card 600 shown in FIG. The memory card 600 shown in FIG. 56 may be applied.

また、上記第5〜第8の実施の形態では、本発明のメモリシステムをメモリカードとUSBメモリに適用した場合を示したが、これらに限定するものではない。例えば、複数のNANDフラッシュメモリを搭載して、アプリケーションプログラム等により利用することを可能にしたデジタルカメラ、デジタルビデオカメラ、パーソナルコンピュータ等の各種電子機器にも適用可能である。   In the fifth to eighth embodiments, the memory system of the present invention is applied to a memory card and a USB memory. However, the present invention is not limited to these. For example, the present invention can be applied to various electronic devices such as a digital camera, a digital video camera, and a personal computer that are equipped with a plurality of NAND flash memories and can be used by an application program or the like.

本発明の第1の実施の形態に係るメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the memory card based on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るコントローラAの概略構成を示す図である。It is a figure which shows schematic structure of the controller A which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るコントローラBの概略構成を示す図である。It is a figure which shows schematic structure of the controller B which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るホスト装置が想定しているフラッシュメモリと、実際に使用するNANDフラッシュメモリとのデータ配置の違いを示す図である。It is a figure which shows the difference in the data arrangement of the flash memory which the host apparatus which concerns on the 1st Embodiment of this invention assumes, and the NAND flash memory actually used. 本発明の第1の実施の形態に係るホスト側システム及びメモリカード(大ブロックカード)の各コミュニケーション階層を示す図である。It is a figure which shows each communication hierarchy of the host side system which concerns on the 1st Embodiment of this invention, and a memory card (large block card). 本発明の第1の実施の形態に係る(a)はホスト装置側から送られてくるコマンドのフォーマットと、(b)はメモリカード内部で処理されるコマンドフォーマットとを示す図である。(A) according to the first embodiment of the present invention is a diagram showing a format of a command sent from the host device side, and (b) is a diagram showing a command format processed inside the memory card. 本発明の第1の実施の形態に係るホスト装置が想定しているブロック書込操作と、メモリカード(大ブロックカード)側が実際に行う書込処理とを対比して示す図である。FIG. 5 is a diagram showing a comparison between a block writing operation assumed by the host device according to the first embodiment of the present invention and a writing process actually performed on the memory card (large block card) side. 本発明の第1の実施の形態に係る大ブロックカード内のフラッシュメモリのブロックフォーマット(256kByte物理ブロック分)を示す図である。It is a figure which shows the block format (for 256 kByte physical block) of the flash memory in the large block card based on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るコントローラB内のバッファRAM上に作成される各種のテーブルを示す図である。It is a figure which shows the various tables produced on the buffer RAM in the controller B which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る各種テーブルの作成処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the creation process of the various tables which concern on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るライトアクセスに対する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process with respect to the write access which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る図11のステップB3におけるデータ書込処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the data writing process in step B3 of FIG. 11 which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る図12のステップC1の処理を模式的に示す図である。It is a figure which shows typically the process of step C1 of FIG. 12 which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る図12のステップC2の処理を模式的に示す図である。It is a figure which shows typically the process of step C2 of FIG. 12 which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る図12のステップC3の処理を模式的に示す図である。It is a figure which shows typically the process of step C3 of FIG. 12 which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る図12のステップC4の処理を模式的に示す図である。It is a figure which shows typically the process of step C4 of FIG. 12 which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るリードアクセスに対する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process with respect to the read access which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る消去アクセスに対する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process with respect to the erase access which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るメモリカードに対してホスト装置が書込を行う際のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。4 is a timing chart illustrating an example of signals input to and output from an I / O pin and an R / B pin when the host device writes to the memory card according to the first embodiment of the present invention. 本発明の第1の実施の形態に係るメモリカード内の不揮発性メモリに対してコントローラBが書き込みを行う際のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。4 is a timing chart showing an example of signals input to and output from the I / O pin and the R / B pin when the controller B writes to the nonvolatile memory in the memory card according to the first embodiment of the present invention. is there. 本発明の第1の実施の形態に係るメモリカードの使用方法を模式的に示す図である。It is a figure which shows typically the usage method of the memory card based on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る他のメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the other memory card based on the 1st Embodiment of this invention. 本発明の第2の実施の形態に係るメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the memory card based on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るコントローラBの概略構成を示す図である。It is a figure which shows schematic structure of the controller B which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るメモリカードの外部接続ピンの配置例を示す図である。It is a figure which shows the example of arrangement | positioning of the external connection pin of the memory card based on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るメモリカードの各外部接続ピンに割り当てられる信号例を示す図である。It is a figure which shows the example of a signal allocated to each external connection pin of the memory card based on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るホスト装置が想定しているフラッシュメモリと、実際に使用するNANDフラッシュメモリとのデータ配置の違いを示す図である。It is a figure which shows the difference in the data arrangement of the flash memory which the host apparatus which concerns on the 2nd Embodiment of this invention assumes, and the NAND flash memory actually used. 本発明の第2の実施の形態に係るホスト装置及びメモリカード内のコントローラBの各機能構成例を示す図である。It is a figure which shows each function structural example of the host apparatus which concerns on the 2nd Embodiment of this invention, and the controller B in a memory card. 本発明の第2の実施の形態に係る(a)はホスト装置側から送られてくるコマンドのフォーマットと、(b)はメモリカード内部で処理されるコマンドフォーマットとを示す図である。(A) according to the second embodiment of the present invention is a diagram showing a format of a command sent from the host device side, and (b) is a diagram showing a command format processed inside the memory card. 本発明の第2の実施の形態に係る(a)はホスト装置が想定しているブロック書込操作、(b)はメモリカード(大ブロックカード)側が実際に行う書込処理とを対比して示す図である。(A) according to the second embodiment of the present invention is a block write operation assumed by the host device, and (b) is compared with a write process actually performed by the memory card (large block card) side. FIG. 本発明の第2の実施の形態に係る大ブロックカード内のフラッシュメモリのブロックフォーマット(256kByte物理ブロック分)を示す図である。It is a figure which shows the block format (for 256 kByte physical block) of the flash memory in the large block card based on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るメモリカードに対してホスト装置が書込を行う際のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。10 is a timing chart illustrating an example of signals input to and output from an I / O pin and an R / B pin when a host device writes to a memory card according to a second embodiment of the present invention. 本発明の第2の実施の形態に係るメモリカード内の不揮発性メモリに対してコントローラBが書き込みを行う際のI/OピンとR/Bピンに入出力される信号の例を示すタイミングチャートである。6 is a timing chart showing an example of signals input to and output from the I / O pin and the R / B pin when the controller B performs writing to the nonvolatile memory in the memory card according to the second embodiment of the present invention. is there. 本発明の第2の実施の形態に係るメモリカードにおけるテスト動作例を示すフローチャートである。It is a flowchart which shows the test operation example in the memory card based on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係る他のコントローラBの概略構成を示す図である。It is a figure which shows schematic structure of the other controller B which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るメモリカードにおける他のテスト動作例を示すフローチャートである。It is a flowchart which shows the other test operation example in the memory card based on the 2nd Embodiment of this invention. 本発明の第3の実施の形態に係るメモリカードをパッケージ化した際の構成を示す断面図である。It is sectional drawing which shows the structure at the time of packaging the memory card based on the 3rd Embodiment of this invention. 本発明の第3の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。It is sectional drawing which shows the other structure at the time of packaging the memory card based on the 3rd Embodiment of this invention. 本発明の第3の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。It is sectional drawing which shows the other structure at the time of packaging the memory card based on the 3rd Embodiment of this invention. 本発明の第4の実施の形態に係るメモリカードを適用したUSBメモリ概略構成を示す断面図である。It is sectional drawing which shows USB memory schematic structure to which the memory card based on the 4th Embodiment of this invention is applied. 本発明の第5の実施の形態に係るメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the memory card based on the 5th Embodiment of this invention. 本発明の第5の実施の形態に係るコントローラAの概略構成を示す図である。It is a figure which shows schematic structure of the controller A which concerns on the 5th Embodiment of this invention. 本発明の第5の実施の形態に係るコントローラBの概略構成を示す図である。It is a figure which shows schematic structure of the controller B which concerns on the 5th Embodiment of this invention. 本発明の第5の実施の形態に係るコントローラBの書込処理に関わる構成を示す図である。It is a figure which shows the structure in connection with the write-in process of the controller B which concerns on the 5th Embodiment of this invention. 本発明の第5の実施の形態に係るコントローラBにおいて実行される書込処理を示すフローチャートである。It is a flowchart which shows the write-in process performed in the controller B which concerns on the 5th Embodiment of this invention. 本発明の第5の実施の形態に係る他のメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the other memory card based on the 5th Embodiment of this invention. 本発明の第6の実施の形態に係るメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the memory card based on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係るコントローラBの概略構成を示す図である。It is a figure which shows schematic structure of the controller B which concerns on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係るコントローラBの書込処理に関わる構成を示す図である。It is a figure which shows the structure in connection with the write-in process of the controller B which concerns on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係るコントローラBにおいて実行される書込処理を示すフローチャートである。It is a flowchart which shows the write-in process performed in the controller B which concerns on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係るコントローラBにおいて実行される読出処理を示すフローチャートである。It is a flowchart which shows the read-out process performed in the controller B which concerns on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係るコントローラBにおいて実行される消去処理を示すフローチャートである。It is a flowchart which shows the erasure | elimination process performed in the controller B which concerns on the 6th Embodiment of this invention. 本発明の第6の実施の形態に係る他のメモリカードの概略構成を示す図である。It is a figure which shows schematic structure of the other memory card based on the 6th Embodiment of this invention. 本発明の第7の実施の形態に係るメモリカードをパッケージ化した際の構成を示す断面図である。It is sectional drawing which shows the structure at the time of packaging the memory card based on the 7th Embodiment of this invention. 本発明の第7の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。It is sectional drawing which shows the other structure at the time of packaging the memory card based on the 7th Embodiment of this invention. 本発明の第7の実施の形態に係るメモリカードをパッケージ化した際の他の構成を示す断面図である。It is sectional drawing which shows the other structure at the time of packaging the memory card based on the 7th Embodiment of this invention. 本発明の第8の実施の形態に係るメモリカードを適用したUSBメモリ概略構成を示す断面図である。It is sectional drawing which shows USB memory schematic structure to which the memory card based on the 8th Embodiment of this invention is applied.

符号の説明Explanation of symbols

1,200,600,700,800,900…メモリカード、2,601…コントローラA、3,602,802…コントローラB、4,M1,M2…NANDフラッシュメモリ、11…ホストバス、12,13,611〜613…NANDバス、20…ホスト装置、31,34,634,635…NAND_I/F、35,624,636,805…CPU、2022,807…アクセス経路設定部、M1P…第1データLBA・PBA記憶部,実データLBA・PBA記憶部、M2P…第2データLBA・PBA記憶部,ECCデータLBA・PBA記憶部。
1,200,600,700,800,900 ... memory card, 2,601 ... controller A, 3,602,802 ... controller B, 4, M1, M2 ... NAND flash memory, 11 ... host bus, 12,13, 611 to 613: NAND bus, 20: host device, 31, 34, 634, 635 ... NAND_I / F, 35, 624, 636, 805 ... CPU, 2022, 807 ... access path setting unit, M1P: first data LBA PBA storage unit, actual data LBA / PBA storage unit, M2P... Second data LBA / PBA storage unit, ECC data LBA / PBA storage unit.

Claims (8)

ホスト機器に接続される第1のコントローラと、
前記第1のコントローラに接続されるとともに、不揮発性メモリに接続される第2のコントローラと、
前記第2のコントローラに接続される前記不揮発性メモリと、を具備し、
前記第2のコントローラは、前記第1のコントローラと前記不揮発性メモリとの間でデータの授受を行うことを特徴とするメモリシステム。
A first controller connected to the host device;
A second controller connected to the first controller and connected to a non-volatile memory;
The nonvolatile memory connected to the second controller,
The memory system, wherein the second controller exchanges data between the first controller and the nonvolatile memory.
前記第2のコントローラは、前記第1のコントローラと接続する第1のメモリインターフェースと、前記不揮発性メモリと接続する第2のメモリインターフェースと、を有し、前記第1のメモリインターフェース及び前記第2のメモリインターフェースは、前記第1のコントローラ及び前記不揮発性メモリとの間で同一の制御信号を授受することを特徴とする請求項1記載のメモリシステム。   The second controller has a first memory interface connected to the first controller, and a second memory interface connected to the nonvolatile memory, and the first memory interface and the second memory interface 2. The memory system according to claim 1, wherein the memory interface exchanges the same control signal between the first controller and the nonvolatile memory. 前記第1のコントローラ及び前記第2のコントローラは、個別の半導体素子により構成したことを特徴とする請求項1又は2に記載のメモリシステム。   The memory system according to claim 1, wherein the first controller and the second controller are configured by individual semiconductor elements. 前記第2のコントローラは、前記第1のメモリインターフェースと前記第2のメモリインターフェースとを直接接続する経路を有し、
前記第2のコントローラ及び前記不揮発性メモリは、同一の半導体パッケージに封入されたことを特徴とする請求項1乃至3の何れかに記載のメモリシステム。
The second controller has a path for directly connecting the first memory interface and the second memory interface;
4. The memory system according to claim 1, wherein the second controller and the non-volatile memory are sealed in the same semiconductor package.
一方の端部にUSBコネクタの入出力端子となるUSB端子を形成した回路基板を具備し、
前記回路基板に前記第2のコントローラ及び前記不揮発性メモリを封入した半導体パッケージを実装したことを特徴とする請求項4記載のメモリシステム。
A circuit board having a USB terminal serving as an input / output terminal of a USB connector at one end is provided.
5. The memory system according to claim 4, wherein a semiconductor package enclosing the second controller and the nonvolatile memory is mounted on the circuit board.
ホスト機器に接続される第1のコントローラと、
前記第1のコントローラに接続されるとともに、複数の不揮発性メモリに接続される第2のコントローラと、
前記第2のコントローラに接続される前記複数の不揮発性メモリと、を具備し、
前記第2のコントローラは、前記第1のコントローラと前記複数の不揮発性メモリとの間でデータの授受を行うことを特徴とするメモリシステム。
A first controller connected to the host device;
A second controller connected to the first controller and connected to a plurality of nonvolatile memories;
A plurality of nonvolatile memories connected to the second controller;
The memory system, wherein the second controller exchanges data between the first controller and the plurality of nonvolatile memories.
前記第2のコントローラは、前記ホスト機器から入力される書込データの書換回数をカウントするカウンタを有し、前記カウンタによりカウントされる書換回数に基づいて、前記複数の不揮発性メモリに対する前記書込データの記憶先を変更することを特徴とする請求項6記載のメモリシステム。   The second controller has a counter that counts the number of rewrites of write data input from the host device, and the write to the plurality of nonvolatile memories is performed based on the number of rewrites counted by the counter. 7. The memory system according to claim 6, wherein a data storage destination is changed. 前記第2のコントローラは、前記ホスト機器から入力される書込データと当該書込データの付加データとを分離し、前記複数の不揮発性メモリに対する前記書込データと前記付加データの記憶先を振り分けるデータ振分部を有することを特徴とする請求項6記載のメモリシステム。   The second controller separates write data input from the host device and additional data of the write data, and allocates storage destinations of the write data and the additional data to the plurality of nonvolatile memories. 7. The memory system according to claim 6, further comprising a data distribution unit.
JP2008074918A 2007-09-27 2008-03-24 Memory system Pending JP2009099112A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008074918A JP2009099112A (en) 2007-09-27 2008-03-24 Memory system
US12/239,179 US8131912B2 (en) 2007-09-27 2008-09-26 Memory system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2007250962 2007-09-27
JP2008074918A JP2009099112A (en) 2007-09-27 2008-03-24 Memory system

Publications (1)

Publication Number Publication Date
JP2009099112A true JP2009099112A (en) 2009-05-07

Family

ID=40702022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008074918A Pending JP2009099112A (en) 2007-09-27 2008-03-24 Memory system

Country Status (1)

Country Link
JP (1) JP2009099112A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068862A (en) * 2010-09-22 2012-04-05 Toshiba Corp Semiconductor memory controller
US8755246B2 (en) 2011-03-24 2014-06-17 Kabushiki Kaisha Toshiba Semiconductor memory device and method of setting operation environment therein

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04268284A (en) * 1991-02-22 1992-09-24 Fuji Photo Film Co Ltd Memory card
JP2007066101A (en) * 2005-08-31 2007-03-15 Matsushita Electric Ind Co Ltd MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04268284A (en) * 1991-02-22 1992-09-24 Fuji Photo Film Co Ltd Memory card
JP2007066101A (en) * 2005-08-31 2007-03-15 Matsushita Electric Ind Co Ltd MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068862A (en) * 2010-09-22 2012-04-05 Toshiba Corp Semiconductor memory controller
US8555027B2 (en) 2010-09-22 2013-10-08 Kabushiki Kaisha Toshiba Semiconductor memory controlling device
US9213604B2 (en) 2010-09-22 2015-12-15 Kabushiki Kaisha Toshiba Semiconductor memory controlling device which writes data and error correction codes into different semiconductor storage drives
US8755246B2 (en) 2011-03-24 2014-06-17 Kabushiki Kaisha Toshiba Semiconductor memory device and method of setting operation environment therein

Similar Documents

Publication Publication Date Title
US8131912B2 (en) Memory system
JP3892851B2 (en) Memory card and semiconductor device
US10204040B2 (en) High speed flash controllers
JP2007272635A (en) Memory system and controller
JP4406339B2 (en) Controller, memory card and control method thereof
EP2519879B1 (en) Method and controller for performing a copy-back operation
TWI454906B (en) Data read method, and flash memory controller and storage system using the same
JP5677336B2 (en) Memory device
JP4828816B2 (en) Memory card, semiconductor device, and memory card control method
JP4253272B2 (en) Memory card, semiconductor device, and control method of semiconductor memory
JP4460967B2 (en) MEMORY CARD, NONVOLATILE SEMICONDUCTOR MEMORY, AND SEMICONDUCTOR MEMORY CONTROL METHOD
CN103377129A (en) Data writing method, memory controller and memory storage device
JP4751037B2 (en) Memory card
JPWO2005083573A1 (en) Semiconductor memory device
JP2006004367A (en) Memory card and semiconductor device
JP4843222B2 (en) Semiconductor memory device control method, memory card, and host device
JP2009099112A (en) Memory system
JP2007233838A (en) Memory system control method
CN105573661B (en) Data writing method, memory storage device and memory control circuit unit
JP4498341B2 (en) Memory system
CN118643783A (en) EEPROM emulation method
CN119148924A (en) Semiconductor device and method of operating the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120522

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121009