JP2008040723A - Memory controller, flash memory system using memory controller and control method of flash memory - Google Patents

Memory controller, flash memory system using memory controller and control method of flash memory Download PDF

Info

Publication number
JP2008040723A
JP2008040723A JP2006213075A JP2006213075A JP2008040723A JP 2008040723 A JP2008040723 A JP 2008040723A JP 2006213075 A JP2006213075 A JP 2006213075A JP 2006213075 A JP2006213075 A JP 2006213075A JP 2008040723 A JP2008040723 A JP 2008040723A
Authority
JP
Japan
Prior art keywords
physical
zone
block
address
flash memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006213075A
Other languages
Japanese (ja)
Other versions
JP4710753B2 (en
Inventor
Naoki Mukoda
直樹 向田
Takuma Mitsunaga
琢真 光永
Kenzo Kida
健三 木田
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.)
TDK Corp
Original Assignee
TDK 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 TDK Corp filed Critical TDK Corp
Priority to JP2006213075A priority Critical patent/JP4710753B2/en
Publication of JP2008040723A publication Critical patent/JP2008040723A/en
Application granted granted Critical
Publication of JP4710753B2 publication Critical patent/JP4710753B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide address management for converting the LBN of logical blocks included in the same logical zone to the PBA of physical blocks included in a physical zone comprising the physical blocks inside the same plane. <P>SOLUTION: A PBA' in which a PZIBN is connected below a PZN is generated and the PBA' is converted to the PBA. When the number of the physical blocks included in each physical zone is M (M=2<SP>n</SP>), in the conversion processing, the (n+1)-th bit from the last of the PBA' is moved to the least significant bit. Since the (n+1)-th bit from the last of the PBA' corresponds to the least significant bit of the PZN, by moving the (n+1)-th bit from the last to the least significant bit, the physical zone for the PZN having the even number of bits is constituted of the physical blocks within the plane #0 and the physical zone for the PZN having the odd number of bits is constituted of the physical blocks within the plane #1. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法に関する。より詳細には、2プレーン書き込み機能を備えたフラッシュメモリに対するアクセスを制御するメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法に関する。   The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method. More specifically, the present invention relates to a memory controller that controls access to a flash memory having a two-plane writing function, a flash memory system including the memory controller, and a flash memory control method.

近年、メモリカードやシリコンディスク等といったメモリシステムにて使用される半導体メモリに、フラッシュメモリが広く採用されている。フラッシュメモリは、不揮発性メモリの一種である。フラッシュメモリに格納されたデータは、電力が供給されていないときでも保持されていることが要求される。   In recent years, flash memories have been widely adopted as semiconductor memories used in memory systems such as memory cards and silicon disks. A flash memory is a kind of nonvolatile memory. Data stored in the flash memory is required to be retained even when power is not supplied.

ところで、上記のような装置に用いられるフラッシュメモリは、読み出しおよび書き込みの単位であるページと、複数のページを含む消去処理の単位であるブロックで構成されている。また、このフラッシュメモリでは、データの上書きができないため、既にデータの書き込まれたページに対し、これと異なる新しいデータを書き込むためには、一旦、既に書き込まれているデータを消去した後に新しいデータを書き込むという処理が必要となる。   By the way, the flash memory used in the apparatus as described above includes a page that is a unit of reading and writing and a block that is a unit of erasing processing including a plurality of pages. In addition, since data cannot be overwritten in this flash memory, in order to write new data different from this to a page in which data has already been written, once the data already written is erased, new data is written. A process of writing is required.

しかしながら、上述のように消去はブロック単位で処理されるため、新しいデータを書き込むページのデータを消去すると、そのページが含まれるブロックの全ページのデータが消去されてしまう。従って、あるページに書き込まれているデータを書き換える場合、書き換えるページが含まれるブロックの全ページのデータを、空きブロックに書き込み、元のブロックを消去するという処理が行なわれる。   However, as described above, erasure is processed in units of blocks. Therefore, when data of a page to which new data is written is erased, data of all pages of a block including the page is erased. Therefore, when data written on a certain page is rewritten, the process of writing the data of all the pages of the block including the page to be rewritten to the empty block and erasing the original block is performed.

上記のような処理では、書き換えの後のデータは書き換え前のブロックと異なるブロックに書き込まれるため、データを書き換えるごとにフラッシュメモリ内のブロックが変ってしまう。従って、フラッシュメモリシステムが装着されるホストシステムから供給されるブロックと、フラッシュメモリ内のブロック対応関係は、データを書き換えるごとに変化する。   In the processing as described above, since the data after rewriting is written in a block different from the block before rewriting, the block in the flash memory changes every time data is rewritten. Therefore, the correspondence relationship between the block supplied from the host system to which the flash memory system is mounted and the block in the flash memory changes every time data is rewritten.

上記のようにデータを書き換えるごとに変化する対応関係を管理するため、特許文献1ではホストシステムから供給される論理アドレスと、フラッシュメモリ内の物理アドレスの対応関係を示したアドレス変換テーブルを作成している。   In order to manage the correspondence that changes each time data is rewritten as described above, Patent Document 1 creates an address conversion table that shows the correspondence between the logical address supplied from the host system and the physical address in the flash memory. ing.

また、フラッシュメモリは、デジタルスチルカメラ等の情報機器(ホストシステム)の記憶媒体として普及している。このような情報機器が扱うデータが大容量化したことに伴い、フラッシュメモリの記憶容量も大容量化が進んでいる。   In addition, flash memories are widely used as storage media for information devices (host systems) such as digital still cameras. As the data handled by such information devices has increased in capacity, the storage capacity of flash memory has also increased.

このように大容量化したフラッシュメモリの記憶領域を円滑に管理するため、特許文献2では、この記憶領域を複数のゾーンに分割して管理する手法が用いられている。   In order to smoothly manage the storage area of the flash memory having a large capacity as described above, Patent Document 2 uses a technique of dividing the storage area into a plurality of zones.

[フラッシュメモリシステムのアドレス空間]
図6は、フラッシュメモリのアドレス空間の構造を概略的に示す図である。本図を用いて、アドレス変換テーブルおよびゾーン分割について具体的に説明する。
[Address space of flash memory system]
FIG. 6 is a diagram schematically showing the structure of the address space of the flash memory. The address conversion table and zone division will be specifically described with reference to FIG.

ホストシステム側のアドレス空間は、図6(a)に示したようにセクタ(512バイト)単位で分割した領域に付けた通番であるLBA(Logical Block Address)で管理されている。更に複数個のセクタをまとめたものを論理ブロックと呼び、複数個の論理ブロックをまとめたものを論理ゾーンと呼んでいる。また、図6(b)に示したように論理ブロックに付けられた通番を論理ブロック番号(LBN)と呼び、論理ゾーンに付けられた通番を論理ゾーン番号(LZN)と呼んでいる。また、各論理ゾーンに含まれた論理ブロックの各論理ゾーン内での通番を論理ゾーン内ブロック番号(LZIBN)と呼んでいる。一方、図6(c)に示したように、物理ブロックには、それぞれ固有の物理ブロックアドレス(PBA)が割り当てられている。さらに、複数個の物理ブロックで物理ゾーンを構成し、各物理ゾーンに固有の物理ゾーン番号(PZN)を割り当てている。各物理ゾーンに含まれる物理ブロックの各物理ゾーン内での通番を物理ゾーン内ブロック番号(PZIBN)と呼んでいる。   The address space on the host system side is managed by an LBA (Logical Block Address) that is a serial number assigned to an area divided in units of sectors (512 bytes) as shown in FIG. Further, a group of a plurality of sectors is called a logical block, and a group of a plurality of logical blocks is called a logical zone. Further, as shown in FIG. 6B, the serial numbers assigned to the logical blocks are called logical block numbers (LBN), and the serial numbers assigned to the logical zones are called logical zone numbers (LZN). In addition, a serial number in each logical zone of a logical block included in each logical zone is called a logical zone block number (LZIBN). On the other hand, as shown in FIG. 6C, each physical block is assigned a unique physical block address (PBA). Further, a physical zone is constituted by a plurality of physical blocks, and a unique physical zone number (PZN) is assigned to each physical zone. A serial number in each physical zone of a physical block included in each physical zone is called an intra-physical zone block number (PZIBN).

また、各論理ゾーンにはそれぞれ1個の物理ゾーンが割り当てられ、論理ゾーンに含まれる各論理ブロックに対応するデータは、その論理ゾーンに割り当てられた物理ゾーンに含まれる物理ブロックに書き込まれる。したがって、1個の論理ブロックに含まれるセクタ数は、1個の物理ブロックに含まれるセクタ領域の個数に応じて設定される。但し、1個の論理ブロックを複数個の物理ブロックに割り当てる場合には、その複数個の物理ブロックを1個の物理ブロックとみなして1個の論理ブロックに含まれるセクタ数を設定する。   In addition, one physical zone is allocated to each logical zone, and data corresponding to each logical block included in the logical zone is written to a physical block included in the physical zone allocated to the logical zone. Therefore, the number of sectors included in one logical block is set according to the number of sector areas included in one physical block. However, when one logical block is assigned to a plurality of physical blocks, the plurality of physical blocks are regarded as one physical block, and the number of sectors included in one logical block is set.

図6に示した例では、1個の物理ブロックが256個のセクタ領域で構成されたフラッシュメモリを想定しているため、256セクタが1個の論理ブロックに対応している。したがって、LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、LBA#0〜#127999の128000セクタの領域に対応している。以下同様に、LZN#1の論理ゾーンは、LBA#128000〜#255999の128000セクタの領域に対応し、LZN#2の論理ゾーンは、LBA#256000〜#383999の128000セクタの領域に対応し、LZN#3の論理ゾーンは、LBA#384000〜#511999の128000セクタの領域に対応している。   In the example shown in FIG. 6, since a flash memory in which one physical block is composed of 256 sector areas is assumed, 256 sectors correspond to one logical block. Therefore, the logical zone of LZN # 0 configured with 500 logical blocks of LBN # 0 to # 499 corresponds to the 128000 sector area of LBA # 0 to # 127999. Similarly, the logical zone of LZN # 1 corresponds to the 128000 sector area of LBA # 128000 to # 255999, the logical zone of LZN # 2 corresponds to the 128000 sector area of LBA # 256000 to # 383999, The logical zone of LZN # 3 corresponds to the 128000 sector area of LBA # 3840000 to # 511999.

また、LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、PBA#0〜#511の512個の物理ブロックで構成されたPZN#0の物理ゾーンに割り当てられている。以下同様に、LZN#1の論理ゾーンは、PZN#1の物理ゾーンに割り当てられ、LZN#2の論理ゾーンは、PZN#2の物理ゾーンに割り当てられ、LZN#3の論理ゾーンは、PZN#3の物理ゾーンに割り当てられている。ここで、物理ゾーンに含まれる物理ブロックの個数を、論理ゾーンに含まれる論理ブロックの個数より多くしているのは、同一の論理ブロックに対応する新データと旧データが別々の物理ブロックに並存する場合や、データを正常に書き込むことができない不良ブロックが発生した場合等を考慮したものである。   In addition, the logical zone of LZN # 0 configured with 500 logical blocks of LBN # 0 to # 499 is allocated to the physical zone of PZN # 0 configured with 512 physical blocks of PBA # 0 to # 511. It has been. Similarly, the logical zone of LZN # 1 is assigned to the physical zone of PZN # 1, the logical zone of LZN # 2 is assigned to the physical zone of PZN # 2, and the logical zone of LZN # 3 is assigned to PZN #. Assigned to three physical zones. Here, the reason why the number of physical blocks included in the physical zone is larger than the number of logical blocks included in the logical zone is that new data and old data corresponding to the same logical block coexist in different physical blocks. This is a case in which a case where a defective block in which data cannot be normally written is generated.

[フラッシュメモリのアドレス変換]
図7は、フラッシュメモリのアドレス変換を概念的に示す図である。本図を用いて、ホストシステム側のアドレス空間からフラッシュメモリのアドレス空間への変換、つまりLBNからPBAへの変換を説明する。
(S71)LBNからLZNおよびLZIBNを求める。各論理ゾーンに含まれる論理ブロックの数がNであるとき、LZNはLBNをNで割ったときの商に対応し、LZIBNはLBNをNで割ったときの余りに対応する。
(S721)LZNをPZNに変換する(LZNに対応するPZNを求める)。LZNとPZNは同じ番号同士が対応しているため、PZNはLZNと同じ値になる。
(S722)LZIBNをPZIBNに変換する(LZIBNに対応するPZIBNを求める)。アドレス変換テーブルを参照することにより、LZIBNに対応するPZIBNを求めることができる。または、書き込み処理の場合に、LZIBNに対応するPZIBNがアドレス変換テーブルに存在しない場合、空き物理ブロックのPZIBNがLZIBNに対応するPZIBNとして割り当てられる。
[Flash memory address conversion]
FIG. 7 is a diagram conceptually showing address conversion of the flash memory. The conversion from the address space on the host system side to the address space of the flash memory, that is, the conversion from LBN to PBA will be described with reference to FIG.
(S71) LZN and LZIBN are obtained from LBN. When the number of logical blocks included in each logical zone is N, LZN corresponds to the quotient when LBN is divided by N, and LZIBN corresponds to the remainder when LBN is divided by N.
(S721) LZN is converted to PZN (PZN corresponding to LZN is obtained). Since LZN and PZN correspond to each other, PZN has the same value as LZN.
(S722) LZIBN is converted to PZIBN (PZIBN corresponding to LZIBN is obtained). By referring to the address conversion table, PZIBN corresponding to LZIBN can be obtained. Alternatively, in the case of the writing process, when the PZIBN corresponding to LZIBN does not exist in the address translation table, the PZIBN of the free physical block is assigned as PZIBN corresponding to LZIBN.

図7(b)は、アドレス変換テーブルの構成の一例を示す図であり、アドレス変換テーブルはゾーンごとに作成される。この例では、左側は論理ブロックのLZIBNを示し、右側は物理ブロックのPZIBNを示している。LZIBN#0の論理ブロックがPZIBN#22の物理ブロックに、LZIBN#1の論理ブロックがPZIBN#12の物理ブロックに、LZIBN#2の論理ブロックがPZIBN#6の物理ブロックに対応している。
(S73)PZIBNおよびPZNからPBAを求める。PBAは、図7(c)に示されているようにPZNの下位側にPZIBNを連結することにより求められる。
FIG. 7B is a diagram showing an example of the configuration of the address conversion table, and the address conversion table is created for each zone. In this example, the left side shows the logical block LZIBN, and the right side shows the physical block PZIBN. The logical block of LZIBN # 0 corresponds to the physical block of PZIBN # 22, the logical block of LZIBN # 1 corresponds to the physical block of PZIBN # 12, and the logical block of LZIBN # 2 corresponds to the physical block of PZIBN # 6.
(S73) PBA is obtained from PZIBN and PZN. PBA is obtained by connecting PZIBN to the lower side of PZN as shown in FIG.

[2プレーンフラッシュメモリ]
複数個のメモリセルで構成されたメモリセルアレイと、このメモリセルアレイにアクセスするためのレジスタと、から構成されるプレーンを2つ備える2プレーンフラッシュメモリが知られている(例えば、非特許文献1参照)。この2プレーンフラッシュメモリの場合も、メモリセルアレイは消去処理の単位である物理ブロックに分割され、物理ブロックは書き込みまたは読み出しの処理単位であるページに分割されている。
[2-plane flash memory]
2. Description of the Related Art A two-plane flash memory having two planes each composed of a memory cell array composed of a plurality of memory cells and a register for accessing the memory cell array is known (for example, see Non-Patent Document 1). ). Also in the case of the two-plane flash memory, the memory cell array is divided into physical blocks that are units of erasing processing, and the physical blocks are divided into pages that are processing units of writing or reading.

図8に示した例のように、2プレーンフラッシュメモリは、プレーン#0およびプレーン#1から構成され、プレーン#0およびプレーン#1の物理ブロックには、交互にPBAの番号が割り振られている。例えば、プレーン#0はPBA#0、#2、#4の順にPBA#4094までの2048個の物理ブロックを備え、プレーン#1はPBA#1、#3、#5の順にPBA#4095までの2048個の物理ブロックを備える。   As in the example shown in FIG. 8, the two-plane flash memory is composed of plane # 0 and plane # 1, and PBA numbers are alternately allocated to the physical blocks of plane # 0 and plane # 1. . For example, plane # 0 includes 2048 physical blocks up to PBA # 4094 in the order of PBA # 0, # 2, and # 4, and plane # 1 has up to PBA # 4095 in the order of PBA # 1, # 3, and # 5. It has 2048 physical blocks.

2プレーンフラッシュメモリの各物理ブロックは、図9(a)に示すように、64ページから構成され、それぞれのページには#0から#63までの64個のページ番号が割り振られる。また、図9(b)に示すように、各ページは、ユーザ領域と冗長領域とから構成される。ユーザ領域はホストシステムから与えられるデータを格納するための4セクタ(512バイト×4=2048バイト)の領域であり、冗長領域はユーザ領域のデータに対応する誤り訂正符号などの付加情報を格納するための64バイトの領域である。図8に示すレジスタ#0及びレジスタ#1は、各ページのユーザ領域(2048バイト)および冗長領域(64バイト)に書き込むデータ、またはユーザ領域(2048バイト)および冗長領域(64バイト)から読み出したデータを一時的に保持するための記憶領域である。   Each physical block of the 2-plane flash memory is composed of 64 pages as shown in FIG. 9A, and 64 page numbers from # 0 to # 63 are assigned to each page. Further, as shown in FIG. 9B, each page includes a user area and a redundant area. The user area is an area of 4 sectors (512 bytes × 4 = 2048 bytes) for storing data given from the host system, and the redundant area stores additional information such as an error correction code corresponding to the data of the user area. This is a 64-byte area. Register # 0 and register # 1 shown in FIG. 8 are read from the user area (2048 bytes) and redundant area (64 bytes) of each page, or read from the user area (2048 bytes) and redundant area (64 bytes). This is a storage area for temporarily storing data.

2プレーンフラッシュメモリは、図8のレジスタ#0およびレジスタ#1に書き込まれたデータをフラッシュメモリに書き込むに際し、2プレーン書き込みと呼ばれる書き込み方式を用いることができる。この2プレーン書き込みでは、予め設定された一対の物理ブロック(プレーン#0内の物理ブロックとプレーン#1内の物理ブロック)にデータが書き込まれる。この一対の物理ブロックに1個の論理ブロックを割り当てた場合、論理ブロックに含まれる512セクタのデータ(セクタ#0〜#511)が、一対の物理ブロック内のページに書き込まれる。つまり、セクタ#0〜#3はプレーン#0のページ番号#0に、セクタ#4〜#7はプレーン#1のページ番号#0に、セクタ#8〜#11はプレーン#0のページ番号#1に、セクタ#12〜#15はプレーン#1のページ番号#1にという順序で書き込まれ、セクタ#504〜#507はプレーン#0のページ番号#63に、セクタ#508〜#511はプレーン#1のページ番号#63に書き込まれる。   The two-plane flash memory can use a writing method called two-plane writing when writing data written in the registers # 0 and # 1 in FIG. 8 to the flash memory. In this two-plane writing, data is written to a pair of preset physical blocks (physical block in plane # 0 and physical block in plane # 1). When one logical block is assigned to the pair of physical blocks, 512-sector data (sectors # 0 to # 511) included in the logical block is written to a page in the pair of physical blocks. That is, sectors # 0 to # 3 are assigned to page number # 0 of plane # 0, sectors # 4 to # 7 are assigned to page number # 0 of plane # 1, and sectors # 8 to # 11 are assigned to page number # of plane # 0. 1, sectors # 12 to # 15 are written in the order of page number # 1 of plane # 1, sectors # 504 to # 507 are written to page number # 63 of plane # 0, and sectors # 508 to # 511 are written to plane # 1. It is written in page number # 63 of # 1.

2プレーンフラッシュメモリは、図8のレジスタ#0およびレジスタ#1に書き込まれたデータをフラッシュメモリに書き込むに際し、通常の書き込み方式も用いることができる。つまり、プレーン毎に別々に書き込むことができる。2プレーンフラッシュメモリでは、プレーン#0内の物理ブロックとプレーン#1内の物理ブロックに交互にPBAの番号が振られているため、各物理ゾーンに対してPBAの順番で物理ブロック割り当てた場合、同一物理ゾーンにプレーン#0内の物理ブロックとプレーン#1内の物理ブロック含まれる。図10に示すように、PZN#0、PZIBN#0は、プレーン#0のPBA#0に対応し、PZN#0、PZIBN#1は、プレーン#1のPBA#1に対応する。同様にPZN#1、PZIBN#1022は、プレーン#0のPBA#2046に対応し、PZN#1、PZIBN#1023は、プレーン#1のPBA#2047に対応する。この変換は、図7(c)に示すように計算される。例えば、PZN#1は、2進数で「0001」、PZIBN#1022は、2進数で「11 1111 1110」であるため、PBA#は2進数で「0001 11 1111 1110」になり、10進数で2046になる。   The two-plane flash memory can use a normal writing method when writing data written in the register # 0 and the register # 1 in FIG. 8 to the flash memory. That is, it can be written separately for each plane. In the 2-plane flash memory, the physical block in plane # 0 and the physical block in plane # 1 are alternately assigned PBA numbers, so when physical blocks are assigned to each physical zone in the PBA order, A physical block in plane # 0 and a physical block in plane # 1 are included in the same physical zone. As shown in FIG. 10, PZN # 0 and PZIBN # 0 correspond to PBA # 0 of plane # 0, and PZN # 0 and PZIBN # 1 correspond to PBA # 1 of plane # 1. Similarly, PZN # 1 and PZIBN # 1022 correspond to PBA # 2046 of plane # 0, and PZN # 1 and PZIBN # 1023 correspond to PBA # 2047 of plane # 1. This conversion is calculated as shown in FIG. For example, since PZN # 1 is “0001” in binary number and PZIBN # 1022 is “11 1111 1110” in binary number, PBA # becomes “0001 11 1111 1110” in binary number and is 2046 in decimal number. become.

次に、通常の書き込みと2プレーン書き込みのタイミングチャートについて説明する。通常の書き込みでは、図11(a)のタイミングチャートに示すように、プレーン#0またはプレーン#1に対して、レジスタへのデータ書き込みを指示するインプットコマンドICと、書き込み先アドレスADおよび書き込むデータDTと、レジスタからメモリセルアレイへの書き込みを指示する書き込みコマンドPCとを順次フラッシュメモリに供給する。ここで、非特許文献1のフラッシュメモリでは、書き込みコマンドPCを供給してから、200μ秒のビジー時間が発生し、このビジー時間に、レジスタに書き込んだデータがメモリセルアレイに書き込まれる。   Next, a timing chart of normal writing and 2-plane writing will be described. In normal writing, as shown in the timing chart of FIG. 11A, an input command IC for instructing data writing to the register for the plane # 0 or the plane # 1, the write destination address AD, and the write data DT And a write command PC instructing writing from the register to the memory cell array are sequentially supplied to the flash memory. Here, in the flash memory of Non-Patent Document 1, a busy time of 200 μs occurs after the write command PC is supplied, and the data written in the register is written into the memory cell array during this busy time.

一方、2プレーン書き込みでは、図11(b)のタイミングチャートに示すように、プレーン#0に対して、インプットコマンドICと、書き込み先アドレスADおよび書き込みデータDTと、ダミー書き込みコマンドDPCとを供給した後、プレーン#1に対して、ダミーインプットコマンドDICと、書き込み先アドレスADおよび書き込みデータDTと、書き込みコマンドPCとを供給する。この2プレーン書き込みでは、ダミー書き込みコマンドDPCを供給した後、ダミーのビジー時間が0.5μ秒発生するが、プレーン#0のレジスタおよびプレーン#1のレジスタに書き込んだデータは、書き込みコマンドPCが供給された後に、同時にフラッシュメモリに書き込まれる。この書き込みの際に発生するビジー時間は、プレーン#0またはプレーン#1のいずれか1プレーンに書き込む際に発生するビジー時間である200μ秒と同じである。すなわち、2プレーン書き込みでは、フラッシュメモリに書き込まれるデータの量は、レジスタ2個分となるが、この書き込み処理で生じるビジー時間は、通常の書き込みで生じるビジー時間(200μ秒)とほとんど同じ(0.5μ+200μ=200.5μ秒)になるため、高速な書き込みを実現できる。   On the other hand, in 2-plane writing, as shown in the timing chart of FIG. 11B, an input command IC, a write destination address AD and write data DT, and a dummy write command DPC are supplied to the plane # 0. Thereafter, a dummy input command DIC, a write destination address AD and write data DT, and a write command PC are supplied to the plane # 1. In this two-plane writing, after the dummy write command DPC is supplied, a dummy busy time is generated for 0.5 μsec. However, the write command PC supplies data written to the plane # 0 register and the plane # 1 register. Are simultaneously written in the flash memory. The busy time that occurs at the time of writing is the same as the busy time that occurs at the time of writing to either plane # 0 or plane # 1, which is 200 μsec. That is, in 2-plane writing, the amount of data written to the flash memory is equivalent to two registers, but the busy time that occurs in this writing process is almost the same as the busy time (200 μsec) that occurs in normal writing (0 (5 μ + 200 μ = 200.5 μsec), high-speed writing can be realized.

[空きブロック検索]
LZIBNに対応するPZIBNがアドレス変換テーブルに存在しない場合、およびデータが書き込まれているページを書き換える場合、空きブロックを検索する必要がある。以下に空きブロック検索について具体的に説明する。
[Free block search]
When PZIBN corresponding to LZIBN does not exist in the address conversion table, and when a page in which data is written is rewritten, it is necessary to search for an empty block. The empty block search will be specifically described below.

図12は、空きブロック検索テーブルの構成の一例を示す図である。本図を用いて空きブロックを検索する処理について説明する。図12に示した空きブロック検索テーブルは、フラッシュメモリの物理ゾーンにおける物理ブロックの使用状況を表すテーブルであり、物理ゾーンごとに作成される。   FIG. 12 is a diagram illustrating an example of a configuration of an empty block search table. A process for searching for an empty block will be described with reference to FIG. The free block search table shown in FIG. 12 is a table showing the usage status of physical blocks in the physical zone of the flash memory, and is created for each physical zone.

この空きブロック検索テーブルは、128バイト(1024ビット)のデータから構成され、物理ゾーンに含まれる物理ブロックの使用状況を各ビットの論理値で示している。この空きブロック検索テーブルでは、空きブロックであることを論理値の"1"で示し、空きブロックでないことを論理値の"0"で示している。つまり、論理値の"1"は、そのビットに対応する物理ブロックが、データが書き込まれていない状態(消去状態)であることを示し、論理値の"0"は、そのビットに対応する物理ブロックが、データが書き込まれている状態、または、不良ブロックであることを示している。   This empty block search table is composed of 128 bytes (1024 bits) of data, and indicates the use status of physical blocks included in the physical zone by the logical value of each bit. In this empty block search table, the logical value “1” indicates that it is an empty block, and the logical value “0” indicates that it is not an empty block. That is, the logical value “1” indicates that the physical block corresponding to the bit is in a state where no data is written (erased state), and the logical value “0” indicates the physical block corresponding to the bit. The block indicates a state where data is written or a bad block.

図12では、1024個の物理ブロックの使用状況を示す128バイトのデータを、1バイトごとに改行して表示している。ここで、一番上の行は、PZIBN#0〜#7の物理ブロックの使用状況を示している。以下同様に、二番目の行は、PZIBN#8〜#15の物理ブロックの使用状況を示し、三番目の行は、PZIBN#16〜#23の物理ブロックの使用状況を示している。そして、一番下の行は、PZIBN#1016〜#1023の物理ブロックの使用状況を示している。また、各行の1バイトのデータには、下位ビット側からPZIBNの順番で物理ブロックが割り当てられている。従って、一番上の行の最下位ビットはPZIBN#0の物理ブロックの使用状況を示し、一番下の行の最上位ビットはPZIBN#1023の物理ブロックの使用状況を示している。   In FIG. 12, 128-byte data indicating the use status of 1024 physical blocks is displayed with a line feed for each byte. Here, the top row indicates the usage status of the physical blocks PZIBN # 0 to # 7. Similarly, the second row indicates the usage status of the physical blocks PZIBN # 8 to # 15, and the third row indicates the usage status of the physical blocks PZIBN # 16 to # 23. The bottom row shows the usage status of the physical blocks PZIBN # 1016 to # 1023. In addition, physical blocks are allocated to 1-byte data in each row in the order of PZIBN from the lower bit side. Therefore, the least significant bit of the top row indicates the usage status of the physical block of PZIBN # 0, and the most significant bit of the bottom row indicates the usage status of the physical block of PZIBN # 1023.

また、空きブロックを検索する場合は、各行の1バイトのデータを上の行から順番に読み出していき、読み出したデータが0(2進数表示:0000 0000)でないときは、そのデータをシフトレジスタに書き込み、シフトレジスタを下位方向にシフトさせる。何回のシフトでキャリーが発生したかにより、下位から何ビット目が"1"であるかを判別する。例えば、4番目の行の0001 1000(2進数表示)をシフトレジスタに書き込み、シフトレジスタを下位方向にシフトさせた場合は、4回のシフトでキャリーが発生するので、下位側から4ビット目に対応するPZIBN#27の物理ブロックが空きブロックとして検出される。   When searching for an empty block, 1-byte data of each row is read in order from the upper row, and when the read data is not 0 (binary number display: 0000 0000), the data is stored in the shift register. Write, shift shift register in lower direction. The number of bits from the lower order is determined to be “1” depending on how many times the carry has occurred. For example, if 0001 1000 (binary number display) in the fourth row is written to the shift register and the shift register is shifted in the lower direction, a carry occurs in four shifts, so the fourth bit from the lower side The corresponding physical block of PZIBN # 27 is detected as an empty block.

また、次回の空きブロック検索では、4番目の行の下位側から5ビット目のビットから検索が開始される。このように下位側から5ビット目のビットから検索が開始する場合は、シフトレジスタにデータを設定する前に、設定するデータの下位4ビットが"0"になるようなマスク処理が施される。   In the next empty block search, the search is started from the fifth bit from the lower side of the fourth row. When the search starts from the fifth bit from the lower side in this way, a mask process is performed so that the lower 4 bits of the data to be set become “0” before setting the data in the shift register. .

上述の空きブロック検索テーブルを用いて検出した空きブロックにデータを書き込んだときには、その物理ブロックに対応する空きブロック検索テーブル上のビットが"1"から"0"に書き換えられる。アドレス変換テーブルについては、書き込んだデータに対応する論理ブロックのLZIBNと対応関係にあるPZIBNが、書き込み先の物理ブロックのPZIBNに書き換えられる。データを書き込んだ物理ブロックの冗長領域26には、書き込んだデータに対応する論理ブロックのLZIBNが書き込まれる。   When data is written in the empty block detected using the above-described empty block search table, the bit on the empty block search table corresponding to the physical block is rewritten from “1” to “0”. In the address conversion table, PZIBN having a correspondence relationship with LZIBN of the logical block corresponding to the written data is rewritten to PZIBN of the write destination physical block. The logical block LZIBN corresponding to the written data is written in the redundant area 26 of the physical block in which the data is written.

上記のように、空きブロック検索は同一物理ゾーンに含まれている空きブロックのみを検索する。2プレーンフラッシュメモリでは、交互にPBAの番号が振られているため、プレーン#0内の空きブロックが検出される場合とプレーン#1内の空きブロックが検索される場合がある。   As described above, the empty block search searches only empty blocks included in the same physical zone. In the two-plane flash memory, PBA numbers are assigned alternately, so that there are cases where an empty block in plane # 0 is detected and an empty block in plane # 1 is searched.

特開2001−243110号公報JP 2001-243110 A 特開2005−018490号公報JP 2005-018490 A Samsung Electronics、“K9XXG08UXM”、[online]、[平成18年7月13日検索]、インターネット(URL:http://www.samsung.com/Products/Semiconductor/NANDFlash/SLC_LargeBlock/16Gbit/K9WAG08U1M/ds_k9xxg08uxm_rev10.pdf)Samsung Electronics, “K9XXG08UXM”, [online], [searched July 13, 2006], Internet (URL: http://www.samsung.com/Products/Semiconductor/NANDFlash/SLC_LargeBlock/16Gbit/K9WAG08U1M/ds_k9revgux08 (pdf)

上述したように、2プレーン書き込みは、通常の書き込みに比べて高速に書き込むことができる。しかし、2プレーン書き込みは、PBA#2nとPBA#2n+1(nは0以上の整数)を組み合わせた一対の物理ブロックに対してしか行うことができない。2プレーン書き込みを行うためには、1個の論理ブロックを上記一対の物理ブロックに割り当てる必要がある。そのため、2プレーン書き込みを可能とするアドレス変換テーブルの作成は、通常の書き込みのアドレス変換テーブルの作成に比べて多くの処理を必要とする。さらに、一対の物理ブロックの一方が不良ブロックになってしまった場合には、もう一方の物理ブロックには通常の書き込みしか行うことができない。従って、通常の書き込みしかできないブロックを別途管理する必要がある。   As described above, two-plane writing can be written at a higher speed than normal writing. However, 2-plane writing can be performed only on a pair of physical blocks in which PBA # 2n and PBA # 2n + 1 (n is an integer of 0 or more) are combined. In order to perform 2-plane writing, it is necessary to allocate one logical block to the pair of physical blocks. For this reason, the creation of an address translation table that enables two-plane writing requires more processing than the creation of an address translation table for normal writing. Furthermore, when one of the pair of physical blocks becomes a defective block, only normal writing can be performed on the other physical block. Therefore, it is necessary to separately manage blocks that can only be written normally.

以上のような理由から、2プレーンフラッシュメモリに対して、通常の書き込みを行いたいという要望がある。   For the reasons described above, there is a demand for performing normal writing on the two-plane flash memory.

しかしながら、2プレーンフラッシュメモリは、プレーンごとに交互にPBAの番号が割り振られているため、データの書き換えを行うときに従来技術の空きブロック検索処理で空きブロックを検出した場合、書き換え前のデータが記憶されている物理ブロックと書き換え後のデータを書き込む空きブロックが、異なるプレーン内の物理ブロックになってしまう場合がある。このような場合、書き換え前のデータが記憶されている物理ブロック内の書き替え対象でない記憶データをコピーバック処理(メモリセルアレイからレジスタに複写したデータを他のメモリセルアレイに複写する処理)で書き換え後のデータを書き込む空きブロックができない。つまり、コピーバック処理は同一のプレーン内でしか行うことができないので、このような場合には、書き替え対象でない記憶データを2プレーンフラッシュメモリから読み出して再度書き込む必要があり、データの書き換えに時間がかかるという課題がある。   However, in the 2-plane flash memory, the PBA number is alternately assigned to each plane. Therefore, when an empty block is detected by the prior art empty block search process when data is rewritten, the data before rewriting is stored. In some cases, the stored physical block and the empty block to which the rewritten data is written become a physical block in a different plane. In such a case, after rewriting the storage data that is not to be rewritten in the physical block in which the data before rewriting is stored, by copying back processing (processing for copying data copied from the memory cell array to the register to another memory cell array) Unable to write empty block to write data. In other words, since the copyback processing can be performed only within the same plane, in such a case, it is necessary to read out the storage data that is not the target of rewriting from the two-plane flash memory and rewrite it, and it takes time to rewrite data. There is a problem that it takes.

本発明は、各物理ゾーンに含まれる物理ブロックが、同一プレーン内の物理ブロックで構成されるようなアドレス管理を提供することができるメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法を提供することを目的とする。   The present invention relates to a memory controller capable of providing address management such that a physical block included in each physical zone is composed of physical blocks in the same plane, a flash memory system including the memory controller, and control of the flash memory It aims to provide a method.

上記目的を達成するために、2プレーン書き込み機能を備えたフラッシュメモリに対するアクセスを制御するメモリコントローラであって、フラッシュメモリの記憶領域を複数の物理ゾーンに分割して管理するメモリコントローラにおいて、物理ゾーンに割り当てる論理アドレスの領域である論理ゾーンを管理するゾーン管理手段と、論理ゾーンに含まれる論理アドレスの領域と、物理ゾーンに含まれる記憶領域の対応関係を管理するアドレス管理手段を備え、アドレス管理手段は、同一論理ゾーンに含まれる論理アドレスの領域が、同一プレーン内の物理ブロックで構成された物理ゾーンに割り当てられるように管理する手段である。   In order to achieve the above object, a memory controller for controlling access to a flash memory having a two-plane write function, wherein the memory controller manages a storage area of the flash memory by dividing it into a plurality of physical zones. A zone management means for managing a logical zone that is an area of logical addresses to be allocated to the address, an address management means for managing a correspondence relationship between a logical address area included in the logical zone and a storage area included in the physical zone, and The means is a means for managing so that the area of the logical address included in the same logical zone is allocated to a physical zone configured by physical blocks in the same plane.

また、アドレス管理手段は、物理ゾーンに付けられた通番である物理ゾーン番号と物理ゾーンに含まれる物理ブロックの物理ゾーン内での通番である物理ゾーン内ブロック番号に基づいて、仮の物理ブロックアドレスを生成するアドレス生成手段と、アドレス生成手段が生成した仮の物理ブロックアドレスを、同一プレーン内の物理ブロックで構成された物理ゾーンに含まれる物理ブロックの物理ブロックアドレスに変換するアドレス変換手段であることも好ましい。   In addition, the address management means determines the temporary physical block address based on the physical zone number that is a serial number assigned to the physical zone and the block number in the physical zone that is the serial number in the physical zone of the physical block included in the physical zone. The address generation means for generating the address, and the address conversion means for converting the temporary physical block address generated by the address generation means into the physical block address of the physical block included in the physical zone configured by the physical blocks in the same plane. It is also preferable.

また、アドレス変換手段は、物理ゾーンに含まれる物理ブロックの個数が2個の場合に、仮の物理ブロックアドレスをビット表示したときの下位側からn+1ビット目のビットを最下位ビットに移動させることにより、仮の物理ブロックアドレスを物理ブロックアドレスに変換する手段であることも好ましい。 In addition, when the number of physical blocks included in the physical zone is 2 n , the address conversion unit moves the bit of the (n + 1) th bit from the lower order when the temporary physical block address is displayed in bits to the least significant bit. Accordingly, it is also preferable that the temporary physical block address is converted into a physical block address.

また、アドレス管理手段は、物理ゾーンに付けられた通番である物理ゾーン番号と物理ゾーンに含まれる物理ブロックの物理ゾーン内での通番である物理ゾーン内ブロック番号に基づいて、同一プレーン内の物理ブロックで構成された物理ゾーンに含まれる物理ブロックの物理ブロックアドレスを生成する物理ブロックアドレス生成手段を備え、物理ブロックアドレス生成手段は、物理ゾーン番号をビット表示したときの下位側から1ビット目と2ビット目の間に、物理ゾーン内ブロック番号をビット表示したときのビットを挿入することにより物理ブロックアドレスを生成すること手段であることも好ましい。   In addition, the address management means uses the physical zone number, which is a serial number assigned to the physical zone, and the physical zone block number, which is the serial number within the physical zone, of the physical block included in the physical zone. Physical block address generating means for generating a physical block address of a physical block included in a physical zone composed of blocks, and the physical block address generating means includes the first bit from the lower order when the physical zone number is displayed in bits. It is also preferable that the physical block address is generated by inserting a bit when the block number in the physical zone is displayed in bits between the second bits.

上記目的を達成するために、本発明によるフラッシュメモリシステムは、前記メモリコントローラのいずれか1つとフラッシュメモリを備えている。   In order to achieve the above object, a flash memory system according to the present invention includes any one of the memory controllers and a flash memory.

上記目的を達成するために、2プレーン書き込み機能を備えたフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、フラッシュメモリの記憶領域を複数の物理ゾーンに分割し、該物理ゾーンに割り当てる論理アドレスの領域である論理ゾーンを管理するフラッシュメモリの制御方法において、アクセス対象の論理アドレスの領域が含まれる論理ゾーンを判別し、該論理ゾーンに割り当てられている物理ゾーンに付けられた通番である物理ゾーン番号を求める物理ゾーン番号特定ステップと、アクセス対象の論理アドレスの領域と対応関係にある物理ブロックの物理ゾーン内での通番である物理ゾーン内ブロック番号を求める物理ゾーン内ブロック番号特定ステップと、物理ゾーン番号と物理ゾーン内ブロック番号に基づいて、アクセス対象の論理アドレスの領域と対応関係にある物理ブロックの物理ブロックアドレスを生成する物理ブロックアドレス生成ステップを含み、物理ブロックアドレス生成ステップでは、物理ゾーン番号をビット表示したときの下位側から1ビット目と2ビット目の間に、物理ゾーン内ブロック番号をビット表示したときのビットを挿入することにより物理ブロックアドレスを生成する。   In order to achieve the above object, a flash memory control method for controlling access to a flash memory having a two-plane write function, which divides a storage area of a flash memory into a plurality of physical zones and allocates the physical zones In a flash memory control method for managing a logical zone which is a logical address area, a logical zone including a logical address area to be accessed is determined, and a serial number assigned to a physical zone assigned to the logical zone is determined. Physical zone number identification step for obtaining a physical zone number, and physical zone block number identification step for obtaining a physical zone block number that is a serial number in the physical zone of a physical block corresponding to the logical address area to be accessed And physical zone number and physical zone block Includes a physical block address generation step for generating a physical block address of a physical block corresponding to the area of the logical address to be accessed based on the number, and in the physical block address generation step, the physical zone number is displayed in bits. A physical block address is generated by inserting a bit when the block number in the physical zone is displayed between the first bit and the second bit from the lower side.

本発明によれば、同一論理ゾーンに含まれる論理アドレスの領域が、同一プレーン内の物理ブロックで構成された物理ゾーンに含まれる物理アドレスの領域に割り当てられるようなアドレス管理が行われる。このようなアドレス管理を行った場合、書き換え前のデータが記憶されている物理ブロックと書き換え後のデータを書き込む空きブロックが、異なるプレーン内の物理ブロックになってしまうことが無い。従って、書き換え前のデータが記憶されている物理ブロックと書き換え後のデータを書き込む物理ブロックが、コピーバック処理を行うことのできない組合せになってしまうことがなくなる。   According to the present invention, address management is performed such that a logical address area included in the same logical zone is allocated to a physical address area included in a physical zone configured by physical blocks in the same plane. When such address management is performed, a physical block in which data before rewriting is stored and a free block in which data after rewriting is written do not become physical blocks in different planes. Therefore, a combination of a physical block in which data before rewriting is stored and a physical block in which data after rewriting is written cannot be subjected to copy back processing is prevented.

以下、図面に基づき、本発明の実施形態について詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、フラッシュメモリシステム1を概略的に示すブロック図である。図1に示したようにフラッシュメモリシステム1は、フラッシュメモリ2(2プレーンフラッシュメモリ)と、それを制御するメモリコントローラ3とで構成されている。   FIG. 1 is a block diagram schematically showing the flash memory system 1. As shown in FIG. 1, the flash memory system 1 includes a flash memory 2 (2-plane flash memory) and a memory controller 3 that controls the flash memory 2.

なお、フラッシュメモリシステム1は、外部バス13を介してホストシステム4と接続される。ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等から構成される。ホストシステム4は、例えば、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。   The flash memory system 1 is connected to the host system 4 via the external bus 13. The host system 4 includes a CPU (Central Processing Unit) for controlling the entire operation of the host system 4, a companion chip for transferring information to and from the flash memory system 1, and the like. The host system 4 may be various information processing apparatuses such as a personal computer and a digital still camera that process various types of information such as characters, sounds, and image information.

[フラッシュメモリ2の説明]
フラッシュメモリ2は、不揮発性メモリであり、レジスタとメモリセルアレイとから構成される。フラッシュメモリ2は、レジスタとメモリセルアレイとの間でデータの複写を行って、データの書き込みまたは読み出しを行う。
[Description of flash memory 2]
The flash memory 2 is a non-volatile memory and includes a register and a memory cell array. The flash memory 2 performs data copying between the register and the memory cell array to write or read data.

メモリセルアレイは、複数のメモリセル群とワード線とを備える。各メモリセル群は、複数のメモリセルが直列に接続されたものである。ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、データの複写、即ち、レジスタから選択されたメモリセルへの複写または選択されたメモリセルからレジスタへのデータの複写が行われる。   The memory cell array includes a plurality of memory cell groups and word lines. Each memory cell group includes a plurality of memory cells connected in series. The word line is for selecting a specific memory cell in the memory cell group. Data is copied between the selected memory cell and the register via the word line, that is, data is copied from the register to the selected memory cell, or data is copied from the selected memory cell to the register. .

メモリセルアレイを構成するメモリセルは、2つのゲートを備えたMOSトランジスタによって構成される。ここで、上側のゲート、下側のゲートは、それぞれ、コントロールゲート、フローティングゲートと呼ばれており、フローティングゲートに電荷(電子)を注入若しくはフローティングゲートから電荷(電子)を排出することによって、データの書き込み若しくはデータの消去が行われる。   A memory cell constituting the memory cell array is constituted by a MOS transistor having two gates. Here, the upper gate and the lower gate are referred to as a control gate and a floating gate, respectively. By injecting charges (electrons) into the floating gate or discharging charges (electrons) from the floating gate, data can be obtained. Is written or data is erased.

このフローティングゲートは、周囲を絶縁体で囲まれているので、注入された電子は長期間にわたって保持される。なお、フローティングゲートに電子を注入するときは、コントロールゲートが高電位側となる高電圧をコントロールゲートとフローティングゲート間に印加する。また、フローティングゲートから電子を排出するときは、コントロールゲートが低電位側となる高電圧をコントロールゲートとフローティングゲート間に印加する。   Since the floating gate is surrounded by an insulator, the injected electrons are held for a long period of time. Note that, when electrons are injected into the floating gate, a high voltage at which the control gate is on the high potential side is applied between the control gate and the floating gate. Further, when electrons are discharged from the floating gate, a high voltage at which the control gate becomes a low potential side is applied between the control gate and the floating gate.

ここで、フローティングゲートに電子が注入されている状態が書き込み状態であり、論理値「0」に対応する。また、フローティングゲートから電子が排出されている状態が消去状態であり、論理値「1」に対応する。   Here, a state where electrons are injected into the floating gate is a write state, which corresponds to a logical value “0”. The state in which electrons are discharged from the floating gate is an erased state, which corresponds to a logical value “1”.

次に、2個のプレーン(プレーン#0及びプレーン#1)で構成されたフラッシュメモリ2のアドレス空間を図2に示す。フラッシュメモリ2(2プレーンフラッシュメモリ)のアドレス空間は、"ページ"、"ブロック(物理ブロック)"および"プレーン"で構成される。   Next, FIG. 2 shows an address space of the flash memory 2 composed of two planes (plane # 0 and plane # 1). The address space of the flash memory 2 (2-plane flash memory) is composed of “page”, “block (physical block)”, and “plane”.

ページは、一般のフラッシュメモリにて行われるデータ読み出し動作及びデータ書き込み動作における処理単位である。物理ブロックは、フラッシュメモリにて行われるデータ消去動作における処理単位であり、複数個のページで構成されている。   A page is a processing unit in a data read operation and a data write operation performed in a general flash memory. The physical block is a processing unit in the data erasing operation performed in the flash memory, and is composed of a plurality of pages.

図2に示したフラッシュメモリ2(2プレーンフラッシュメモリ)では、1つのページは、4セクタ(512×4バイト)のユーザ領域25と、64バイト(16×4バイト)の冗長領域26で構成され、1つの物理ブロックは64個のページで構成されている。   In the flash memory 2 (2-plane flash memory) shown in FIG. 2, one page is composed of a user area 25 of 4 sectors (512 × 4 bytes) and a redundant area 26 of 64 bytes (16 × 4 bytes). One physical block is composed of 64 pages.

プレーン#0およびプレーン#1内の物理ブロックには、交互にPBAが割り振られている。例えば、プレーン#0内の物理ブロックにはPBA#0、#2、#4の順で偶数のPBAが割り振られ、プレーン#1内の物理ブロックにはPBA#1、#3、#5、の順に奇数のPBAが割り振られている。   PBAs are alternately allocated to the physical blocks in the plane # 0 and the plane # 1. For example, even PBAs # 0, # 2, and # 4 are assigned to physical blocks in the plane # 0 in this order, and PBAs # 1, # 3, and # 5 are assigned to physical blocks in the plane # 1. An odd number of PBAs are allocated in order.

各ページはユーザ領域25と冗長領域26で構成されている。ユーザ領域25は、ホストシステム4から供給されるユーザデータを記憶するための領域である。冗長領域26は、ECC(Error Correcting Code)、論理アドレス情報、ブロックステータス(フラグ)等の付加データを記憶するための領域である。   Each page includes a user area 25 and a redundant area 26. The user area 25 is an area for storing user data supplied from the host system 4. The redundant area 26 is an area for storing additional data such as ECC (Error Correcting Code), logical address information, and block status (flag).

ECCは、ユーザ領域25に記憶されているデータに含まれる誤りを検出し、訂正するためのデータである。   The ECC is data for detecting and correcting an error included in the data stored in the user area 25.

論理アドレス情報は、物理ブロックにデータが格納されているとき、そのデータに対応する論理ブロックを特定するための情報である。   The logical address information is information for specifying a logical block corresponding to the data when the data is stored in the physical block.

従って、消去済みの物理ブロックには論理アドレス情報が書き込まれていないので、冗長領域26に論理アドレス情報が格納されているか否かを判定することにより、その冗長領域26が含まれている物理ブロックに有効なデータが格納されているか否かを判断することができる。つまり、冗長領域26に論理アドレス情報が格納されていないとき、その物理ブロックには、有効なデータが格納されていないと判断することができる。   Accordingly, since the logical address information is not written in the erased physical block, the physical block including the redundant area 26 is determined by determining whether or not the logical address information is stored in the redundant area 26. It is possible to determine whether or not valid data is stored. That is, when logical address information is not stored in the redundant area 26, it can be determined that valid data is not stored in the physical block.

ブロックステータス(フラグ)は、ブロックの良否を示すフラグである。正常にデータの書き込み等を行うことができないブロックは、不良ブロックと判別され、冗長領域26には、不良ブロックであることを示すブロックステータス(フラグ)が書き込まれる。   The block status (flag) is a flag indicating whether the block is good or bad. A block in which data cannot be normally written is determined as a defective block, and a block status (flag) indicating a defective block is written in the redundant area 26.

このようなフラッシュメモリ2は、コントローラ3から、データ、アドレス情報、内部コマンド等を受信して、データの読み出し処理、書き込み処理、ブロック消去処理、転送処理等の各処理を行う。   Such a flash memory 2 receives data, address information, internal commands, and the like from the controller 3 and performs various processes such as a data read process, a write process, a block erase process, and a transfer process.

ここで、内部コマンドとは、コントローラ3がフラッシュメモリ2に処理の実行を指示するためのコマンドであり、フラッシュメモリ2は、コントローラ3から与えられる内部コマンドに従って動作する。これに対して、外部コマンドとは、ホストシステム4がフラッシュメモリシステム1に対して処理の実行を指示するためのコマンドである。   Here, the internal command is a command for the controller 3 to instruct the flash memory 2 to execute processing, and the flash memory 2 operates in accordance with the internal command given from the controller 3. In contrast, the external command is a command for the host system 4 to instruct the flash memory system 1 to execute processing.

[コントローラ3の説明]
コントローラ3は、図1に示すように、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECCブロック11と、ROM(Read Only Memory)12と、から構成される。これら機能ブロックによって構成されるコントローラ3は、一つの半導体チップ上に集積される。以下に各機能ブロックについて説明する。
[Description of controller 3]
As shown in FIG. 1, the controller 3 includes a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, an ECC block 11, and a ROM (Read Only Memory) 12. And. The controller 3 constituted by these functional blocks is integrated on one semiconductor chip. Each functional block will be described below.

マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、コントローラ3の全体の動作を制御する。例えば、マイクロプロセッサ6は、各種処理等を定義したコマンドセットをROM12から読み出してフラッシュメモリインターフェースブロック10に供給し、フラッシュメモリインターフェースブロック10に処理を実行させる。ホストインターフェースブロック7は、ホストシステム4との間で、データ、アドレス情報、ステータス情報、外部コマンド等の授受を行う。ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口としてフラッシュメモリシステム1の内部(例えば、バッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。   The microprocessor 6 controls the overall operation of the controller 3 in accordance with a program stored in the ROM 12. For example, the microprocessor 6 reads a command set defining various processes from the ROM 12, supplies the command set to the flash memory interface block 10, and causes the flash memory interface block 10 to execute processes. The host interface block 7 exchanges data, address information, status information, external commands, and the like with the host system 4. Data or the like supplied from the host system 4 to the flash memory system 1 is taken into the flash memory system 1 (for example, the buffer 9) using the host interface block 7 as an entrance. Data supplied from the flash memory system 1 to the host system 4 is supplied to the host system 4 through the host interface block 7 as an exit.

図1に示すワークエリア8は、フラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される。   A work area 8 shown in FIG. 1 is a work area in which data necessary for controlling the flash memory 2 is temporarily stored, and includes a plurality of SRAM (Static Random Access Memory) cells.

バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込むべきデータを一時的に蓄積する。すなわち、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態となるまでバッファ9に保持され、フラッシュメモリ2に書き込むべきデータは、フラッシュメモリ2が書き込み可能な状態となるまでバッファ9に保持される。   The buffer 9 temporarily stores data read from the flash memory 2 and data to be written to the flash memory 2. That is, data read from the flash memory 2 is held in the buffer 9 until the host system 4 can receive the data, and data to be written to the flash memory 2 is stored until the flash memory 2 becomes writable. It is held in the buffer 9.

フラッシュメモリインターフェースブロック10は、内部バス14を介して、フラッシュメモリ2とデータ、アドレス情報、ステータス情報、内部コマンド等の授受を行う。   The flash memory interface block 10 exchanges data, address information, status information, internal commands, and the like with the flash memory 2 via the internal bus 14.

フラッシュメモリインターフェースブロック10は、ROM12から読み出したコマンドセットに基づいて内部コマンド、アドレス情報等をフラッシュメモリ2に供給することにより、フラッシュメモリ2に読み出し、書き込み等を実行させる。   The flash memory interface block 10 supplies an internal command, address information, and the like to the flash memory 2 based on a command set read from the ROM 12, thereby causing the flash memory 2 to read and write.

ECCブロック11は、フラッシュメモリ2に書き込むデータに付加されるECCを生成するとともに、フラッシュメモリ2から読み出したデータに付加されたECCに基づいて、読み出したデータに含まれる誤りを検出・訂正する。   The ECC block 11 generates an ECC added to data to be written to the flash memory 2 and detects and corrects an error included in the read data based on the ECC added to the data read from the flash memory 2.

ROM12は、マイクロプロセッサ6による処理の手順を定義するプログラムを格納する不揮発性の記憶素子である。具体的には、ROM12は、例えば、アドレス変換テーブルの作成等の処理手順を定義するプログラムを格納する。   The ROM 12 is a non-volatile storage element that stores a program that defines a processing procedure performed by the microprocessor 6. Specifically, the ROM 12 stores a program that defines a processing procedure such as creation of an address conversion table, for example.

アドレス変換テーブルは、ワークエリア8上に作成される。このアドレス変換テーブルは、対応する論理ゾーンと物理ゾーンにおける論理ゾーン内ブロック番号LZIBNと物理ゾーン内ブロック番号PZIBNとの対応関係を記憶する。   The address conversion table is created on the work area 8. This address conversion table stores the correspondence between the corresponding logical zone, the block number LZIBN in the logical zone in the physical zone, and the block number PZIBN in the physical zone.

[本発明のアドレス管理]
まず、本発明のアドレス管理手段に必要な機能について説明する。上述したように、空きブロック検索は、同一物理ゾーンに含まれている空きブロックのみを検索する。そのため、書き換え前のデータが記憶されている物理ブロックと書き換え後のデータを書き込む空きブロックが、常に同一のプレーン内の物理ブロックになるようにするには、同一物理ゾーンに含まれる物理ブロックが、同一プレーン内の物理ブロックだけになるようにすれば良いことになる。なお、同一論理ゾーンに含まれる論理ブロックは、同一物理ゾーンに含まれる物理ブロックに割り当てられる。
[Address management of the present invention]
First, functions necessary for the address management means of the present invention will be described. As described above, the empty block search searches only for empty blocks included in the same physical zone. Therefore, in order to ensure that the physical block in which the data before rewriting is stored and the free block in which the data after rewriting is written always become a physical block in the same plane, the physical blocks included in the same physical zone are: It suffices to have only physical blocks in the same plane. Note that logical blocks included in the same logical zone are allocated to physical blocks included in the same physical zone.

よって、本発明のアドレス管理手段は、同一論理ゾーンに含まれる論理ブロックが、同一プレーン内の物理ブロックに割り当てられるように、論理ブロック番号を物理ブロックアドレスに変換する。以下に本発明のアドレス管理手段を詳細に説明する。   Therefore, the address management means of the present invention converts the logical block number into a physical block address so that logical blocks included in the same logical zone are allocated to physical blocks in the same plane. The address management means of the present invention will be described in detail below.

図3は、本発明の第1の実施形態におけるアドレス変換を概念的に示す図である。図3(a)を用いて、本実施形態でのLBNからPBAへの変換を説明する。
(S31)LBNからLZNおよびLZIBNを求める。各論理ゾーンに含まれる論理ブロックの数がNであるとき、LZNはLBNをNで割ったときの商に対応し、LZIBNはLBNをNで割ったときの余りに対応する。
(S321)LZNをPZNに変換する(LZNに対応するPZNを求める)。LZNとPZNの同じ番号同士を対応させるようにした場合、PZNはLZNと同じ値になる。
(S322)LZIBNをPZIBNに変換する(LZIBNに対応するPZIBNを求める)。LZIBNとPZIBNの対応関係を示したアドレス変換テーブルを参照することにより、LZIBNに対応するPZIBNを求めることができる。または、書き込み処理の場合に、LZIBNに対応するPZIBNがアドレス変換テーブルに存在しない場合、空き物理ブロックのPZIBNがLZIBNに対応するPZIBNとして割り当てられる。
(S33)PZIBNおよびPZNからPBA'(仮の物理ブロックアドレス)を生成する。各物理ゾーンに含まれる物理ブロックの数が2のべき乗個の場合、PZNとPZIBNをビット表示し、PZNの下位側にPZIBNを連結すればPBA'が得られる。つまり、各物理ゾーンに含まれる物理ブロックの数がM(M=2)個であるとき、PZNにMを乗算し、その結果にPZIBNを加算すればよい。このように得られたPBA'を、ホストインターフェースブロック7は、フラッシュメモリインターフェースブロック10に供給する。
(S34)PBA'をPBAに変換する。この変換では、PBA'をビット表示したときの下位側からn+1ビット目のビットを最下位ビットに移動させる。ここで、各物理ゾーンに含まれる物理ブロックの数がM(M=2)個であるとき、PZIBN(#0〜#M−1)のビット長はnになり、下位側からn+1ビット目が、PZNの最下位ビットに対応する。従って、下位側からn+1ビット目のビットを最下位ビットに移動させるビット操作を行うことにより、PZNが偶数の物理ゾーンはプレーン#0内の物理ブロックで構成されることになり、PZNが奇数の物理ゾーンはプレーン#1内の物理ブロックで構成されることになる。
FIG. 3 is a diagram conceptually showing address conversion in the first embodiment of the present invention. The conversion from LBN to PBA in this embodiment will be described with reference to FIG.
(S31) LZN and LZIBN are obtained from LBN. When the number of logical blocks included in each logical zone is N, LZN corresponds to the quotient when LBN is divided by N, and LZIBN corresponds to the remainder when LBN is divided by N.
(S321) LZN is converted to PZN (PZN corresponding to LZN is obtained). When the same numbers of LZN and PZN are made to correspond to each other, PZN has the same value as LZN.
(S322) LZIBN is converted to PZIBN (PZIBN corresponding to LZIBN is obtained). PZIBN corresponding to LZIBN can be obtained by referring to the address conversion table showing the correspondence between LZIBN and PZIBN. Alternatively, in the case of the writing process, when the PZIBN corresponding to LZIBN does not exist in the address translation table, the PZIBN of the free physical block is assigned as PZIBN corresponding to LZIBN.
(S33) PBA ′ (provisional physical block address) is generated from PZIBN and PZN. When the number of physical blocks included in each physical zone is a power of 2, PZN and PZIBN are displayed in bits, and PZ ′ is obtained by connecting PZIBN to the lower side of PZN. That is, when the number of physical blocks included in each physical zone is M (M = 2 n ), PZN is multiplied by M, and PZIBN is added to the result. The host interface block 7 supplies the PBA ′ thus obtained to the flash memory interface block 10.
(S34) Convert PBA 'to PBA. In this conversion, the bit of the (n + 1) th bit from the lower order side when PBA ′ is displayed in bits is moved to the least significant bit. Here, when the number of physical blocks included in each physical zone is M (M = 2 n ), the bit length of PZIBN (# 0 to # M−1) is n, and the (n + 1) th bit from the lower side. Corresponds to the least significant bit of PZN. Therefore, by performing a bit operation to move the (n + 1) -th bit from the lower order side to the least significant bit, the physical zone with an even number of PZN is composed of physical blocks in the plane # 0, and the odd number of PZN is an odd number. The physical zone is composed of physical blocks in the plane # 1.

S34の変換により、同一の物理ゾーン内のLBNを同一プレーン内の物理ブロックで構成された物理ゾーンに含まれる物理ブロックのPBAに変換するという本発明の目的が実現される。フラッシュメモリインターフェースブロック10は、上記PBAに基づいたアドレス情報および内部コマンドをフラッシュメモリ2に供給することにより、フラッシュメモリ2に読み出しまたは書き込みを実行させる。   By the conversion of S34, the object of the present invention of converting the LBN in the same physical zone into the PBA of the physical block included in the physical zone configured with the physical blocks in the same plane is realized. The flash memory interface block 10 supplies the flash memory 2 with address information and internal commands based on the PBA, thereby causing the flash memory 2 to perform reading or writing.

図5は、本発明の実施形態における論理アドレス空間、物理アドレス空間およびアドレス変換テーブルの一例を示す図である。本図を用いて、本発明の第1の実施形態のアドレス変換手段の具体例を示す。   FIG. 5 is a diagram illustrating an example of a logical address space, a physical address space, and an address conversion table in the embodiment of the present invention. A specific example of the address conversion unit of the first embodiment of the present invention will be described with reference to FIG.

図5(a)は、論理アドレス空間を示しており、本例では各論理ゾーンに含まれる論理ブロックの数は1000である。それゆえ、LZIBNは0〜999になる。図5(b)は、物理アドレス空間を示しており、本例では各物理ゾーンに含まれる物理ブロックの数は1024である。それゆえ、PZIBNは0〜1023になる。また2プレーンフラッシュメモリの物理アドレス空間であるため、PZN#0およびPZN#2がプレーン#0内の物理ブロックであり、PZN#1およびPZN#3がプレーン#1内の物理ブロックになる。図5(c)は、アドレス変換テーブルを示している。アドレス変換テーブルは、各ゾーンごとに作成されている。1番目のアドレス変換テーブルは、ゾーン#0用のアドレス変換テーブル(LZN#0の論理ゾーンに含まれる論理ブロックとPZN#0の物理ゾーンに含まれる物理ブロックの対応関係を示したアドレス変換テーブル)であり、2番目のアドレス変換テーブルは、ゾーン#1用のアドレス変換テーブル(LZN#1の論理ゾーンに含まれる論理ブロックとPZN#1の物理ゾーンに含まれる物理ブロックの対応関係を示したアドレス変換テーブル)であり、以下同じようになっている。   FIG. 5A shows a logical address space. In this example, the number of logical blocks included in each logical zone is 1000. Therefore, LZIBN is 0-999. FIG. 5B shows a physical address space. In this example, the number of physical blocks included in each physical zone is 1024. Therefore, PZIBN is 0-1023. Further, since this is a physical address space of the two-plane flash memory, PZN # 0 and PZN # 2 are physical blocks in the plane # 0, and PZN # 1 and PZN # 3 are physical blocks in the plane # 1. FIG. 5C shows an address conversion table. An address conversion table is created for each zone. The first address conversion table is an address conversion table for zone # 0 (an address conversion table indicating the correspondence between the logical blocks included in the logical zone of LZN # 0 and the physical blocks included in the physical zone of PZN # 0). The second address conversion table is an address conversion table for zone # 1 (an address indicating the correspondence between the logical blocks included in the logical zone of LZN # 1 and the physical blocks included in the physical zone of PZN # 1) Conversion table), and so on.

まず、LBN#2000を変換する場合について説明する。S31で、LBN#2000から、LZN#2およびLZIBN#0が求められる(2000/1000=2余り0)。S321で、LZN#2はPZN#2に変換される。S322で、LZIBN#0は、アドレス変換テーブルによりPZIBN#1021に変換される。S33で、PZN#2およびPZIBN#1021に基づいて、PBA'#3069が生成される(2*1024+1021)。S34で、PBA'#3069がPBA#4090に変換される。   First, the case of converting LBN # 2000 will be described. In S31, LZN # 2 and LZIBN # 0 are obtained from LBN # 2000 (2000/1000 = 2 remainder 0). In S321, LZN # 2 is converted to PZN # 2. In S322, LZIBN # 0 is converted to PZIBN # 1021 by the address conversion table. In S33, PBA '# 3069 is generated based on PZN # 2 and PZIBN # 1021 (2 * 1024 + 1021). In S34, PBA '# 3069 is converted to PBA # 4090.

上記変換は、図3(b)に従い次のように行われる。PBA'#3069を2進数で表すと、「1011 1111 1101」になり、下位側から11ビット目を最下位ビットに移動させることにより、「1111 1111 1010」、10進数では4090が得られる。   The conversion is performed as follows in accordance with FIG. When PBA '# 3069 is expressed in binary, it becomes “1011 1111 1101”, and by moving the 11th bit from the lower side to the least significant bit, “1111 1111 1010” and 4090 in decimal are obtained.

次に、LBN#2001を変換する場合について説明する。S31で、LBN#2001から、LZN#2およびLZIBN#1が求められる(2001/1000=2余り1)。S321で、LZN#2はPZN#2に変換される。S322で、LZIBN#1は、アドレス変換テーブルによりPZIBN#1023に変換される。S33で、PZN#2およびPZIBN#1023に基づいて、PBA'#3071が生成される(2*1024+1023)。S34で、PBA'#3071がPBA#4094に変換される。   Next, the case of converting LBN # 2001 will be described. In S31, LZN # 2 and LZIBN # 1 are obtained from LBN # 2001 (2001/1000 = 2 remainder 1). In S321, LZN # 2 is converted to PZN # 2. In S322, LZIBN # 1 is converted to PZIBN # 1023 by the address conversion table. In S33, PBA '# 3071 is generated based on PZN # 2 and PZIBN # 1023 (2 * 1024 + 1023). In S34, PBA '# 3071 is converted to PBA # 4094.

以上のように、LZN#2内のLBN#2000とLBN#2001は、それぞれ同じPZN#2のPBA#4090とPBA#4092に変換される。このように本実施例のアドレス変換処理では、同一論理ゾーンに含まれる論理ブロックのLBNを同一物理ゾーンに含まれる物理ブロックのPBAに変換する。各物理ゾーンは、同一プレーン内の物理ブロックで構成されているため、結果として同一論理ゾーンに含まれる論理ブロックのLBAは、同一プレーンに含まれる物理ブロックのPBAに変換される。   As described above, LBN # 2000 and LBN # 2001 in LZN # 2 are converted into PBA # 4090 and PBA # 4092 of the same PZN # 2, respectively. As described above, in the address conversion process of this embodiment, the LBN of the logical block included in the same logical zone is converted into the PBA of the physical block included in the same physical zone. Since each physical zone is composed of physical blocks in the same plane, as a result, LBAs of logical blocks included in the same logical zone are converted to PBAs of physical blocks included in the same plane.

本発明の第1の実施形態で、図3(a)に示したS31〜S33は、一般的に行われているアドレス変換処理である。S34が新規に追加された処理である。尚、各物理ゾーンに含まれる物理ブロックの数がM(M=2)個であるときに、PBA'の下位側からn+1ビット目のビットを最下位ビットに移動させるビット操作(S34)は、ロジック回路で構成して行ってもよい。 In the first embodiment of the present invention, S31 to S33 shown in FIG. 3A are generally performed address conversion processes. S34 is a newly added process. When the number of physical blocks included in each physical zone is M (M = 2 n ), the bit operation (S34) for moving the (n + 1) th bit from the lower side of PBA ′ to the least significant bit is as follows. Alternatively, a logic circuit may be used.

図4は、本発明の第2の実施形態におけるアドレス変換を概念的に示す図である。図4(a)を用いて、本実施形態でのLBNからPBAへの変換を説明する。
(S41)、(S421)および(S422)は、それぞれ(S31)、(S321)および(S322)と同じ変換内容である。そのため、詳細は省略する。
(S43)PZIBNおよびPZNからPBAを生成する。ここでは、図4(b)に示したようにPZNの下位側から1ビット目と2ビット目の間にPZIBNを示すビットを挿入する。つまり、各物理ゾーンに含まれる物理ブロックの数がM(M=2)個であるときに、PZIBNを示すnビットがPZNの下位側から1ビット目と2ビット目の間に挿入される。例えば、各物理ゾーンに含まれる物理ブロックの数が1024である場合、PZIBNをビット表示したときの10ビットがPZNの下位側から1ビット目と2ビット目の間に挿入される。
FIG. 4 is a diagram conceptually showing address conversion in the second exemplary embodiment of the present invention. The conversion from LBN to PBA in this embodiment will be described with reference to FIG.
(S41), (S421), and (S422) are the same conversion contents as (S31), (S321), and (S322), respectively. Therefore, details are omitted.
(S43) PBA is generated from PZIBN and PZN. Here, as shown in FIG. 4B, a bit indicating PZIBN is inserted between the first bit and the second bit from the lower side of PZN. That is, when the number of physical blocks included in each physical zone is M (M = 2 n ), n bits indicating PZIBN are inserted between the first and second bits from the lower side of PZN. . For example, when the number of physical blocks included in each physical zone is 1024, 10 bits when PZIBN is displayed in bits are inserted between the first bit and the second bit from the lower side of PZN.

S43の変換により、同一の物理ゾーン内のLBNを同一プレーン内の物理ブロックで構成された物理ゾーンに含まれる物理ブロックのPBAに変換するという本発明の目的が実現される。フラッシュメモリインターフェースブロック10は、上記PBAに基づいたアドレス情報および内部コマンドをフラッシュメモリ2に供給することにより、フラッシュメモリ2に読み出しまたは書き込みを実行させる。   The object of the present invention is realized by converting the LBN in the same physical zone into the PBA of the physical block included in the physical zone configured by the physical blocks in the same plane by the conversion in S43. The flash memory interface block 10 supplies the flash memory 2 with address information and internal commands based on the PBA, thereby causing the flash memory 2 to perform reading or writing.

図5を用いて、本発明の第2の実施形態のアドレス変換手段の具体例を示す。なお、図5のPBA'は本実施形態では使用しない。   A specific example of the address conversion unit of the second exemplary embodiment of the present invention will be described with reference to FIG. Note that PBA ′ in FIG. 5 is not used in this embodiment.

まず、LBN#2000を変換する場合について説明する。S41で、LBN#2000から、LZN#2およびLZIBN#0が求められる(2000/1000=2余り0)。S421で、LZN#2はPZN#2に変換される。S422で、LZIBN#0は、アドレス変換テーブルによりPZIBN#1021に変換される。S43で、PZN#2およびPZIBN#1021に基づいて、PBA#4090が生成される。   First, the case of converting LBN # 2000 will be described. In S41, LZN # 2 and LZIBN # 0 are obtained from LBN # 2000 (2000/1000 = 2 remainder 0). In S421, LZN # 2 is converted to PZN # 2. In S422, LZIBN # 0 is converted to PZIBN # 1021 by the address conversion table. In S43, PBA # 4090 is generated based on PZN # 2 and PZIBN # 1021.

S43の生成処理は、図4(b)に従い次のように行われる。PZN#2を2進数で表すと「0010」になる。PZIBN#1021を2進数で表すと「11 1111 1101」となる。PZN#2の下位1ビット以外のビット「001」、PZIBN#1021の全ビット「11 1111 1101」、PZN#2の下位1ビット「0」を連結すると、「00 1111 1111 1010」になり、10進数で表すと、4090になる。   The generation process of S43 is performed as follows according to FIG. When PZN # 2 is expressed in binary, it becomes “0010”. When PZIBN # 1021 is expressed in binary, it becomes “11 1111 1101”. By concatenating bits “001” other than the lower 1 bit of PZN # 2, all bits “11 1111 1101” of PZIBN # 1021, and the lower 1 bit “0” of PZN # 2, “00 1111 1111 1010” is obtained. Expressed in decimal, it is 4090.

次に、LBN#2001を変換する場合について説明する。S41で、LBN#2001から、LZN#2およびLZIBN#1が求められる(2001/1000=2余り1)。S421で、LZN#2はPZN#2に変換される。S422で、LZIBN#1は、アドレス変換テーブルによりPZIBN#1023に変換される。S43で、PZN#2およびPZIBN#1023に基づいて、PBA#4094が生成される。   Next, the case of converting LBN # 2001 will be described. In S41, LZN # 2 and LZIBN # 1 are obtained from LBN # 2001 (2001/1000 = 2 remainder 1). In S421, LZN # 2 is converted to PZN # 2. In S422, LZIBN # 1 is converted to PZIBN # 1023 by the address conversion table. In S43, PBA # 4094 is generated based on PZN # 2 and PZIBN # 1023.

以上のように、LZN#2内のLBN#2000とLBN#2001は、それぞれ同じPZN#2のPBA#4090とPBA#4094に変換される。このように本実施例のアドレス変換処理も、同一論理ゾーンに含まれる論理ブロックのLBNを、同一物理ゾーンに含まれる物理ブロックのPBAに変換する。同一物理ゾーンは、同一プレーン内の物理ブロックで構成されているため、結果として同一論理ゾーンに含まれる論理ブロックのLBNが、同一プレーンに含まれる物理ブロックのPBAに変換される。   As described above, LBN # 2000 and LBN # 2001 in LZN # 2 are converted into PBA # 4090 and PBA # 4094 of the same PZN # 2, respectively. As described above, the address conversion process of this embodiment also converts the LBN of the logical block included in the same logical zone into the PBA of the physical block included in the same physical zone. Since the same physical zone is composed of physical blocks in the same plane, as a result, the LBN of the logical block included in the same logical zone is converted to the PBA of the physical block included in the same plane.

本発明の第2の実施形態では、変換S41、S421およびS422は、一般的に行われているアドレス変換処理である。変換S43が変更された処理である。以上のように本発明の第2の実施形態は、PZIBNおよびPZNからPBAを生成するときに、PZNの下位側から1ビット目と2ビット目の間にPZIBNを示すビットを挿入することにより、発明の目的を実現している。   In the second embodiment of the present invention, the conversions S41, S421, and S422 are generally performed address conversion processes. This is a process in which the conversion S43 is changed. As described above, in the second embodiment of the present invention, when generating PBA from PZIBN and PZN, a bit indicating PZIBN is inserted between the first and second bits from the lower side of PZN. The object of the invention is realized.

なお、各論理ゾーンの論理ブロック数は1000に限定されない。同様に各物理ゾーンの物理ブロック数は1024に限定されない。それぞれの値は、論理ブロック数≦物理ブロック数である限り自由に設定しても良い。また、PBAのビット数は14ビットに限定されない。   The number of logical blocks in each logical zone is not limited to 1000. Similarly, the number of physical blocks in each physical zone is not limited to 1024. Each value may be freely set as long as the number of logical blocks ≦ the number of physical blocks. Further, the number of bits of PBA is not limited to 14 bits.

上記の実施形態では、プレーン数は2個であったが、プレーン数は2個に限定されず、偶数個であればよい。   In the above embodiment, the number of planes is two. However, the number of planes is not limited to two, and may be an even number.

以上述べたように、本発明のアドレス管理では、同一論理ゾーンに含まれる論理ブロックのLBNが、同一プレーン内の物理ブロックで構成されている物理ゾーンに含まれる物理ブロックのPBAに変換される。従って、書き換え前のデータが記憶されている物理ブロックと書き換え後のデータを書き込む空きブロックが、異なるプレーン内の物理ブロックになってしまうことが無い。   As described above, in the address management of the present invention, the LBN of the logical block included in the same logical zone is converted into the PBA of the physical block included in the physical zone configured with the physical blocks in the same plane. Therefore, the physical block in which the data before rewriting is stored and the empty block in which the data after rewriting is written do not become physical blocks in different planes.

また、以上述べた実施形態は全て本発明を例示的に示すものであって限定的に示すものではなく、本発明は他の種々の変形態様及び変更態様で実施することができる。従って本発明の範囲は特許請求の範囲及びその均等範囲によってのみ規定されるものである。   Moreover, all the embodiment described above shows the present invention exemplarily, and does not limit the present invention, and the present invention can be implemented in other various modifications and changes. Therefore, the scope of the present invention is defined only by the claims and their equivalents.

本発明の実施形態におけるフラッシュメモリシステムを概略的に示すブロック図である。1 is a block diagram schematically showing a flash memory system in an embodiment of the present invention. FIG. 本発明の実施形態における2プレーンフラッシュメモリのアドレス空間の構造を概略的に示す図である。FIG. 3 is a diagram schematically showing a structure of an address space of a two-plane flash memory in an embodiment of the present invention. 本発明の第1の実施形態におけるアドレス変換を概念的に示す図である。It is a figure which shows notionally the address conversion in the 1st Embodiment of this invention. 本発明の第2の実施形態におけるアドレス変換を概念的に示す図である。It is a figure which shows notionally the address conversion in the 2nd Embodiment of this invention. 本発明の実施形態における論理アドレス空間、物理アドレス空間およびアドレス変換テーブルの一例を示す図である。It is a figure which shows an example of the logical address space in the embodiment of this invention, a physical address space, and an address conversion table. フラッシュメモリのアドレス空間の構造を概略的に示す図である。It is a figure which shows roughly the structure of the address space of flash memory. フラッシュメモリのアドレス変換を概念的に示す図である。It is a figure which shows notionally the address conversion of a flash memory. 2プレーンフラッシュメモリの物理アドレス空間の構造を概略的に示す図である。It is a figure which shows roughly the structure of the physical address space of 2 plane flash memory. (a)は、2プレーンフラッシュメモリの物理ブロックとページとの関係を概略的に示す図である。(b)は、2プレーンフラッシュメモリのページとユーザ領域および冗長領域との関係を概略的に示す図である。(A) is a figure which shows roughly the relationship between the physical block and page of 2 plane flash memory. (B) is a diagram schematically showing a relationship between a page of a two-plane flash memory, a user area, and a redundant area. 2プレーンフラッシュメモリに対して通常の書き込みを行う場合のゾーン内のブロックと物理ブロックの関係を概略的に示す図である。It is a figure which shows roughly the relationship between the block in a zone in the case of performing normal writing with respect to 2 plane flash memory, and a physical block. (a)は、フラッシュメモリに対して通常の書き込みを行う場合のタイムチャートを示す図である。(b)は、2プレーンフラッシュメモリに対して、2プレーン書き込みを行う場合のタイムチャートを示す図である。(A) is a figure which shows the time chart in the case of performing normal writing with respect to flash memory. (B) is a diagram showing a time chart when performing two-plane writing to a two-plane flash memory. 空きブロック検索テーブルの構成の一例を示す図である。It is a figure which shows an example of a structure of an empty block search table.

符号の説明Explanation of symbols

1 フラッシュメモリシステム
2 フラッシュメモリ
3 コントローラ
4 ホストシステム
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインターフェースブロック
11 ECCブロック
12 ROM
13 外部バス
14 内部バス
25 ユーザ領域
26 冗長領域
1 Flash memory system 2 Flash memory 3 Controller 4 Host system 6 Microprocessor 7 Host interface block 8 Work area 9 Buffer 10 Flash memory interface block 11 ECC block 12 ROM
13 External bus 14 Internal bus 25 User area 26 Redundant area

Claims (6)

2プレーン書き込み機能を備えたフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
上記フラッシュメモリの記憶領域を複数の物理ゾーンに分割して管理するメモリコントローラにおいて、
上記物理ゾーンに割り当てる論理アドレスの領域である論理ゾーンを管理するゾーン管理手段と、
上記論理ゾーンに含まれる論理アドレスの領域と、上記物理ゾーンに含まれる記憶領域の対応関係を管理するアドレス管理手段を備え、
上記アドレス管理手段は、同一論理ゾーンに含まれる論理アドレスの領域が、同一プレーン内の物理ブロックで構成された上記物理ゾーンに割り当てられるように管理する手段であることを特徴とするメモリコントローラ。
A memory controller for controlling access to a flash memory having a two-plane writing function,
In a memory controller that manages the storage area of the flash memory divided into a plurality of physical zones,
Zone management means for managing a logical zone that is an area of a logical address assigned to the physical zone;
An address management means for managing a correspondence relationship between a logical address area included in the logical zone and a storage area included in the physical zone;
The memory controller according to claim 1, wherein the address management means is a means for managing so that an area of a logical address included in the same logical zone is allocated to the physical zone composed of physical blocks in the same plane.
上記アドレス管理手段は、
上記物理ゾーンに付けられた通番である物理ゾーン番号と上記物理ゾーンに含まれる物理ブロックの上記物理ゾーン内での通番である物理ゾーン内ブロック番号に基づいて、仮の物理ブロックアドレスを生成するアドレス生成手段と、
上記アドレス生成手段が生成した上記仮の物理ブロックアドレスを、同一プレーン内の物理ブロックで構成された上記物理ゾーンに含まれる物理ブロックの物理ブロックアドレスに変換するアドレス変換手段を備える
ことを特徴とする請求項1に記載のメモリコントローラ。
The address management means is
An address for generating a temporary physical block address based on a physical zone number that is a serial number assigned to the physical zone and a block number in the physical zone that is a serial number in the physical zone of a physical block included in the physical zone Generating means;
An address conversion unit that converts the temporary physical block address generated by the address generation unit into a physical block address of a physical block included in the physical zone configured by physical blocks in the same plane is provided. The memory controller according to claim 1.
上記アドレス変換手段は、
上記物理ゾーンに含まれる物理ブロックの個数が2個の場合に、
上記仮の物理ブロックアドレスをビット表示したときの下位側からn+1ビット目のビットを最下位ビットに移動させることにより、上記仮の物理ブロックアドレスを上記物理ブロックアドレスに変換する
ことを特徴とする請求項2に記載のメモリコントローラ。
The address conversion means is
When the number of physical blocks included in the physical zone is 2n ,
The temporary physical block address is converted into the physical block address by moving the bit of the (n + 1) th bit from the lower order side when the temporary physical block address is displayed in bits to the least significant bit. Item 3. The memory controller according to Item 2.
上記アドレス管理手段は、上記物理ゾーンに付けられた通番である物理ゾーン番号と上記物理ゾーンに含まれる物理ブロックの上記物理ゾーン内での通番である物理ゾーン内ブロック番号に基づいて、同一プレーン内の物理ブロックで構成された上記物理ゾーンに含まれる物理ブロックの物理ブロックアドレスを生成する物理ブロックアドレス生成手段を備え、
上記物理ブロックアドレス生成手段は、上記物理ゾーン番号をビット表示したときの下位側から1ビット目と2ビット目の間に、上記物理ゾーン内ブロック番号をビット表示したときのビットを挿入することにより上記物理ブロックアドレスを生成することを特徴とする請求項1に記載のメモリコントローラ。
Based on the physical zone number that is the serial number assigned to the physical zone and the block number in the physical zone that is the serial number within the physical zone of the physical block included in the physical zone, the address management means Physical block address generating means for generating physical block addresses of physical blocks included in the physical zone composed of physical blocks of
The physical block address generation means inserts a bit when the physical zone block number is displayed in bits between the first and second bits from the lower side when the physical zone number is displayed in bits. The memory controller according to claim 1, wherein the physical block address is generated.
請求項1から4のいずれか1項に記載のメモリコントローラと2プレーン書き込み機能を備えたフラッシュメモリを備えることを特徴とするフラッシュメモリシステム。   5. A flash memory system comprising: the memory controller according to claim 1; and a flash memory having a two-plane write function. 2プレーン書き込み機能を備えたフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
上記フラッシュメモリの記憶領域を複数の物理ゾーンに分割し、該物理ゾーンに割り当てる論理アドレスの領域である論理ゾーンを管理するフラッシュメモリの制御方法において、
アクセス対象の論理アドレスの領域が含まれる上記論理ゾーンを判別し、該論理ゾーンに割り当てられている上記物理ゾーンに付けられた通番である物理ゾーン番号を求める物理ゾーン番号特定ステップと、
アクセス対象の論理アドレスの領域と対応関係にある物理ブロックの上記物理ゾーン内での通番である物理ゾーン内ブロック番号を求める物理ゾーン内ブロック番号特定ステップと、
上記物理ゾーン番号と上記物理ゾーン内ブロック番号に基づいて、アクセス対象の論理アドレスの領域と対応関係にある物理ブロックの物理ブロックアドレスを生成する物理ブロックアドレス生成ステップを含み、
上記物理ブロックアドレス生成ステップでは、上記物理ゾーン番号をビット表示したときの下位側から1ビット目と2ビット目の間に、上記物理ゾーン内ブロック番号をビット表示したときのビットを挿入することにより上記物理ブロックアドレスを生成することを特徴とするフラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory having a two-plane writing function,
In the flash memory control method for dividing a storage area of the flash memory into a plurality of physical zones and managing a logical zone that is an area of a logical address assigned to the physical zone,
A physical zone number specifying step of determining the logical zone including the area of the logical address to be accessed and obtaining a physical zone number that is a serial number assigned to the physical zone assigned to the logical zone;
A physical zone block number specifying step for obtaining a physical zone block number that is a serial number within the physical zone of a physical block corresponding to the area of the logical address to be accessed;
Based on the physical zone number and the block number in the physical zone, including a physical block address generation step of generating a physical block address of a physical block corresponding to the area of the logical address to be accessed,
In the physical block address generation step, by inserting the bit when the block number in the physical zone is displayed in bits between the first and second bits from the lower side when the physical zone number is displayed in bits. A method for controlling a flash memory, wherein the physical block address is generated.
JP2006213075A 2006-08-04 2006-08-04 MEMORY CONTROLLER, FLASH MEMORY SYSTEM USING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Active JP4710753B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006213075A JP4710753B2 (en) 2006-08-04 2006-08-04 MEMORY CONTROLLER, FLASH MEMORY SYSTEM USING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006213075A JP4710753B2 (en) 2006-08-04 2006-08-04 MEMORY CONTROLLER, FLASH MEMORY SYSTEM USING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2008040723A true JP2008040723A (en) 2008-02-21
JP4710753B2 JP4710753B2 (en) 2011-06-29

Family

ID=39175657

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006213075A Active JP4710753B2 (en) 2006-08-04 2006-08-04 MEMORY CONTROLLER, FLASH MEMORY SYSTEM USING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4710753B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014238871A (en) * 2014-08-01 2014-12-18 マイクロン テクノロジー, インク. Controller providing single virtualized ecc algorithm, storage system including this controller, and method of managing this storage system
CN106294195A (en) * 2016-07-19 2017-01-04 深圳市瑞耐斯技术有限公司 The control method of a kind of 3D flash memory and system
US9971536B2 (en) 2008-10-09 2018-05-15 Micron Technology, Inc. Controller to manage NAND memories
US10497459B2 (en) 2016-10-28 2019-12-03 Samsung Electronics Co., Ltd. Nonvolatile memory device including a plurality of input/output units and an operating method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001243110A (en) * 1999-12-20 2001-09-07 Tdk Corp Memory controller, flash memory system and access method to flash memory
JP2005018490A (en) * 2003-06-26 2005-01-20 Tdk Corp Memory controller and flash memory system equipped with memory controller
JP2006509304A (en) * 2002-12-09 2006-03-16 サンディスク コーポレイション Zone boundary alignment for defects in non-volatile memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001243110A (en) * 1999-12-20 2001-09-07 Tdk Corp Memory controller, flash memory system and access method to flash memory
JP2006509304A (en) * 2002-12-09 2006-03-16 サンディスク コーポレイション Zone boundary alignment for defects in non-volatile memory
JP2005018490A (en) * 2003-06-26 2005-01-20 Tdk Corp Memory controller and flash memory system equipped with memory controller

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9971536B2 (en) 2008-10-09 2018-05-15 Micron Technology, Inc. Controller to manage NAND memories
JP2014238871A (en) * 2014-08-01 2014-12-18 マイクロン テクノロジー, インク. Controller providing single virtualized ecc algorithm, storage system including this controller, and method of managing this storage system
CN106294195A (en) * 2016-07-19 2017-01-04 深圳市瑞耐斯技术有限公司 The control method of a kind of 3D flash memory and system
US10497459B2 (en) 2016-10-28 2019-12-03 Samsung Electronics Co., Ltd. Nonvolatile memory device including a plurality of input/output units and an operating method thereof
US11074990B2 (en) 2016-10-28 2021-07-27 Samsung Electronics Co., Ltd. Nonvolatile memory device including a plurality of input/output units and an operating method thereof
US11217327B2 (en) 2016-10-28 2022-01-04 Samsung Electronics Co., Ltd. Operating method of a storage device including a nonvolatile memory device and a controller

Also Published As

Publication number Publication date
JP4710753B2 (en) 2011-06-29

Similar Documents

Publication Publication Date Title
JP4171749B2 (en) Memory controller and flash memory system
JP4710753B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM USING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4235646B2 (en) Memory controller and flash memory system
US20070047308A1 (en) Memory controller, flash memory system and control method for flash memory
JP4661497B2 (en) Memory controller, flash memory system, and flash memory control method
JP4661191B2 (en) Memory controller, flash memory system, and flash memory control method
JP4636005B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4434171B2 (en) Memory controller and flash memory system
JP4241741B2 (en) Memory controller and flash memory system
JP4641338B2 (en) Nonvolatile semiconductor memory device and system
JP4661566B2 (en) Access controller, flash memory system, and access control method
JP2007323159A (en) Memory controller, flash memory system therewith, and method for controlling flash memory
JP4254933B2 (en) Memory controller and flash memory system
JP4213166B2 (en) Memory controller and flash memory system
JP4661748B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4273106B2 (en) Memory controller, flash memory system, and flash memory control method
JP4697146B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP3934659B1 (en) Memory controller and flash memory system
JP4000124B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP6260395B2 (en) Memory controller, memory system, and memory control method
JP4273109B2 (en) Memory controller and flash memory system
JP4569554B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4227989B2 (en) Memory controller and flash memory system
JP2011060415A (en) Nonvolatile semiconductor storage device and data storage system
JP2007323138A (en) Memory controller, flash memory system, and control method of flash memory

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100714

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100730

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110307

R150 Certificate of patent or registration of utility model

Ref document number: 4710753

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150