JP2008097339A - Memory controller, flash memory system having memory controller, and control method of flash memory - Google Patents
Memory controller, flash memory system having memory controller, and control method of flash memory Download PDFInfo
- Publication number
- JP2008097339A JP2008097339A JP2006278629A JP2006278629A JP2008097339A JP 2008097339 A JP2008097339 A JP 2008097339A JP 2006278629 A JP2006278629 A JP 2006278629A JP 2006278629 A JP2006278629 A JP 2006278629A JP 2008097339 A JP2008097339 A JP 2008097339A
- Authority
- JP
- Japan
- Prior art keywords
- block
- pair
- physical
- data
- blocks
- 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
Links
Images
Abstract
Description
本発明はメモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム、及びフラッシュメモリの制御方法に関する。 The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method.
近年、メモリカードやシリコンディスクなどに、NAND型フラッシュメモリが用いられることが多い。このNAND型フラッシュメモリは不揮発性のメモリであり、記憶データを消去するとき、つまり、メモリセルを書込状態(論理値=0)から消去状態(論理値=1)に変化させる場合は、ブロック単位でしか記憶データを消去することができない。従って、記憶データを書き替える場合には、書換えデータを元のデータが記憶されていた物理ブロック(第1の物理ブロック)とは別の物理ブロック(第2の物理ブロック)に書き込んだ後、第1の物理ブロックの記憶データを消去していた。 In recent years, NAND flash memories are often used for memory cards and silicon disks. This NAND flash memory is a non-volatile memory. When the stored data is erased, that is, when the memory cell is changed from the write state (logical value = 0) to the erased state (logical value = 1), a block is used. Stored data can be erased only in units. Therefore, when rewriting the stored data, after rewriting the rewritten data in a physical block (second physical block) different from the physical block (first physical block) in which the original data was stored, The stored data of 1 physical block was erased.
このような書換え処理では、第1の物理ブロックに記憶されている書換え対象でない記憶データを、第1の物理ブロックから第2の物理ブロックに転送(複写)しなければならない。しかし、この書換え対象でない記憶データを転送(複写)した後に、ホストシステムから転送(複写)した記憶データの書換え指示が与えられた場合、その指示前に実行した記憶データの転送(複写)が無駄になってしまう。 In such rewriting processing, storage data that is not subject to rewriting stored in the first physical block must be transferred (copied) from the first physical block to the second physical block. However, if the host system gives an instruction to rewrite the storage data that has been transferred (copied) after the storage data that is not to be rewritten is transferred (copied), the storage data transfer (copy) that was executed before that instruction is wasted Become.
このような問題を回避するため、書換えデータを第2の物理ブロックに書き込んだ後、書換え対象でない記憶データの転送(複写)を行わず、第1の物理ブロックと第2の物理ブロックを並存させる技術が特許文献1に開示されている。
特許文献1に開示されているように、第1の物理ブロックと第2の物理ブロックを並存させれば、無駄な記憶データの転送(複写)を減少させることができる。しかし、上記第1の物理ブロックと第2の物理ブロックのようなペアブロックが多くなり過ぎると、空きブロックを確保することができなくなってしまう。又、空きブロックを確保することができなくなることを回避するために、一定の論理アドレスの領域に割り当てる物理ブロックの数を増加させた場合には、同一の記憶容量のフラッシュメモリに記憶できるデータの実質的な容量が小さくなってしまう。
As disclosed in
尚、ペアブロックが多くなり過ぎて、空きブロックを確保することができなくなった場合、いずれかのペアブロックについて、第1の物理ブロックから第2の物理ブロックに記憶データの転送(複写)を行い、第1の物理ブロックの記憶データを消去すれば、空きブロックを確保することができる。しかし、このようなペアブロックの解消を行うときの優先順位の管理については、特許文献1に開示されていない。
If there are too many pair blocks and an empty block cannot be secured, storage data is transferred (copied) from the first physical block to the second physical block for any pair block. If the data stored in the first physical block is erased, an empty block can be secured. However,
そこで、本発明は、上記のような問題を回避しつつペアブロックを有効に活用するため、ペアブロックの組数(ペア数)が所定の範囲を超えないように管理するメモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム、及びフラッシュメモリの制御方法を提供しようとするものである。 Therefore, the present invention provides a memory controller and a memory controller for managing the number of pairs of pairs (number of pairs) so as not to exceed a predetermined range in order to effectively use the pair blocks while avoiding the above problems. A flash memory system and a flash memory control method are provided.
上記目的を達成するために、本発明によるメモリコントローラは、ホストシステムから与えられる指示情報に応じて、物理ブロック単位で記憶データの消去を実行するフラッシュメモリに対するアクセスを制御するメモリコントローラであって、前記指示情報に基づく論理アドレスと、該論理アドレスと対応するデータが記憶されている前記物理ブロックの対応関係を管理するアドレス管理手段と、前記指示情報に基づく論理アドレスに対応するデータが記憶されている前記物理ブロックが存在するとき、該物理ブロックと異なる物理ブロックに前記指示情報に基づく論理アドレスに対応するデータを書き込む書込み手段と、前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックからなるペアブロックの対応関係、及び該ペアブロックの組数を管理するペアブロック管理手段と、前記ペアブロックの組数が所定数に達したときに、ペアブロック状態になった順番が最先の前記ペアブロックのペアブロック状態を解消するペアブロック解消手段と、を備えることを特徴とする。 In order to achieve the above object, a memory controller according to the present invention is a memory controller that controls access to a flash memory that erases stored data in units of physical blocks in accordance with instruction information given from a host system, Address management means for managing the correspondence between the logical address based on the instruction information and the physical block in which data corresponding to the logical address is stored; and data corresponding to the logical address based on the instruction information are stored. Writing means for writing data corresponding to a logical address based on the instruction information in a physical block different from the physical block when the physical block is present, and two pieces of data in which the same logical address is stored Correspondence between pair blocks consisting of physical blocks, and Pair block management means for managing the number of pairs of pair blocks, and when the number of pairs of pair blocks reaches a predetermined number, the pair block status of the pair block whose earliest is the pair block status is canceled And a pair block elimination means.
このような構成によると、ペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果を維持しつつ、ペアブロックの増加に伴う空きブロック数の減少を所定の範囲内に抑えることができる。更に、ペアブロック状態になった順番が先のペアブロックから順番にペアブロック状態が解消されるので、ペアブロックの組数を制限してもペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果の低下を最小限に抑えることができる。 According to such a configuration, it is possible to suppress the decrease in the number of empty blocks due to the increase in the pair blocks within a predetermined range while maintaining the effect of reducing the transfer (copying) of useless storage data between the pair blocks. it can. Furthermore, since the pair block state is canceled in the order of the pair block state from the previous pair block, even if the number of pairs of pair blocks is limited, transfer (copy) of storage data between the pair blocks is wasted. The decrease in the effect of reducing can be minimized.
又、前記書込み手段は、前記異なる物理ブロックの冗長領域にペアブロック状態になった順番の先後関係を判断するためのペアブロックシリアル番号を書き込むことが好ましい。 Further, it is preferable that the writing means writes a pair block serial number for determining a first-to-last relationship of the order of the pair block state in the redundant area of the different physical block.
このようにすれば、複数組のペアブロックが存在するときに、ペアブロックシリアル番号を読み出せば、ペアブロック状態になった順番の先後関係を判別することができる。 In this way, if a pair block serial number is read out when there are a plurality of pairs of pairs, the prior relationship in the order of the pair block state can be determined.
又、前記ペアブロック管理手段は、前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックの新旧関係が新しいデータが記憶されている方の前記物理ブロックの冗長領域に書き込まれているペアブロックシリアル番号に基づいて、ペアブロック状態になった順番の先後を判別することが好ましい。 Further, the pair block management means writes the new / old relationship between the two physical blocks in which the data having the same logical address is stored in the redundant area of the physical block in which the new data is stored. It is preferable to determine the order of the order of the pair block state based on the pair block serial number.
尚、前記論理アドレスが同一のデータが記憶される前記物理ブロックの冗長領域に、記憶データの新旧関係を判断するためのシリアル番号を書き込んでもよい。 It should be noted that a serial number for determining the new / old relationship of stored data may be written in the redundant area of the physical block in which data having the same logical address is stored.
本発明によるフラッシュメモリシステムは、前記メモリコントローラと前記フラッシュメモリを備えることを特徴とする。 A flash memory system according to the present invention includes the memory controller and the flash memory.
本発明によるフラッシュメモリの制御方法は、ホストシステムから与えられる指示情報に応じて、物理ブロック単位で記憶データの消去を実行するフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、前記指示情報に基づく論理アドレスと、該論理アドレスと対応するデータが記憶されている前記物理ブロックの対応関係を判別するアドレス判別ステップと、前記指示情報に基づく論理アドレスに対応するデータが記憶されている前記物理ブロックが存在するとき、該物理ブロックと異なる物理ブロックに前記指示情報に基づく論理アドレスに対応するデータを書き込む書込みステップと、前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックからなるペアブロックの対応関係、及び該ペアブロックの組数を管理する情報を保持するペアブロック管理ステップと、前記ペアブロックの組数が所定数に達したときに、ペアブロック状態になった順番が最先の前記ペアブロックのペアブロック状態を解消するペアブロック解消ステップと、を有することを特徴とする。 A flash memory control method according to the present invention is a flash memory control method for controlling access to a flash memory that performs erasure of stored data in units of physical blocks in accordance with instruction information given from a host system. A logical address based on the information, an address determination step for determining a correspondence relationship between the physical block in which the data corresponding to the logical address is stored, and the data corresponding to the logical address based on the instruction information is stored A write step of writing data corresponding to a logical address based on the instruction information to a physical block different from the physical block when the physical block exists, and two physical blocks in which data having the same logical address is stored And the correspondence of the pair block consisting of A pair block management step for holding information for managing the number of pairs of blocks, and the pair block of the pair block having the earliest pair block state when the number of pairs of pair blocks reaches a predetermined number And a pair block elimination step for eliminating the state.
このような方法によると、ペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果を維持しつつ、ペアブロックの増加に伴う空きブロック数の減少を所定の範囲内に抑えることができる。更に、ペアブロック状態になった順番が先のペアブロックから順番にペアブロック状態が解消されるので、ペアブロックの組数を制限してもペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果の低下を最小限に抑えることができる。 According to such a method, while maintaining the effect of reducing the transfer (copying) of useless storage data between the pair blocks, it is possible to suppress the decrease in the number of free blocks due to the increase in the pair blocks within a predetermined range. it can. Furthermore, since the pair block state is canceled in the order of the pair block state from the previous pair block, even if the number of pairs of pair blocks is limited, transfer (copy) of storage data between the pair blocks is wasted. The decrease in the effect of reducing can be minimized.
又、前記書込みステップにおいて、前記異なる物理ブロックの冗長領域にペアブロック状態になった順番の先後関係を判断するためのペアブロックシリアル番号を書き込むことが好ましい。 Further, in the writing step, it is preferable to write a pair block serial number for judging a first-to-last relationship of the order of the pair block state in the redundant area of the different physical block.
このようにすれば、複数組のペアブロックが存在するときに、ペアブロックシリアル番号を読み出せば、ペアブロック状態になった順番の先後関係を判別することができる。 In this way, if a pair block serial number is read out when there are a plurality of pairs of pairs, the prior relationship in the order of the pair block state can be determined.
又、前記ペアブロック管理ステップにおいて、前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックの新旧関係が新しいデータが記憶されている方の前記物理ブロックの冗長領域に書き込まれているペアブロックシリアル番号に基づいて、ペアブロック状態になった順番の先後を判別するための情報を保持することが好ましい。 In the pair block management step, the new / old relationship between the two physical blocks in which the data having the same logical address is stored is written in the redundant area of the physical block in which the new data is stored. It is preferable to hold information for determining the order of the order of the pair block state based on the pair block serial number.
尚、前記論理アドレスが同一のデータが記憶される前記物理ブロックの冗長領域に、記憶データの新旧関係を判断するためのシリアル番号を書き込んでもよい。 It should be noted that a serial number for determining the new / old relationship of stored data may be written in the redundant area of the physical block in which data having the same logical address is stored.
本発明のメモリコントローラ、フラッシュメモリシステム、並びにフラッシュメモリの制御方法によれば、ペアブロックの組数(ペア数)が所定の範囲を超えないように管理することにより、ペアブロック間(同一の論理アドレスに対応するデータが記憶された2個の物理ブロック間)の無駄な記憶データの転送(複写)を減少させるという効果を維持しつつ、ペアブロックの増加に伴う空きブロック数の減少を所定の範囲内に抑えることができる。 According to the memory controller, the flash memory system, and the flash memory control method of the present invention, by managing the number of pairs of pairs (number of pairs) so as not to exceed a predetermined range, While maintaining the effect of reducing the transfer (copying) of useless storage data between two physical blocks in which data corresponding to the address is stored, a decrease in the number of free blocks due to an increase in the number of pair blocks is predetermined. Can be kept within the range.
更に、ペアブロックを解消するときの優先順位を管理することにより、ペアブロックの組数(ペア数)が所定の範囲を超えないように管理することによる効果(ペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果)の低下を最小限に抑えることができる。 Furthermore, by managing the priority when the pair blocks are eliminated, the effect of managing the number of pairs of pairs (number of pairs) so as not to exceed a predetermined range (required storage data between pair blocks). The effect of reducing the transfer (copying) can be minimized.
以下、本発明の実施の形態について図面を参照して説明する。図1は、本発明に係るフラッシュメモリシステムの、一実施の形態の概略構成を示すブロック図である。図1に示したように、フラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するメモリコントローラ3で構成されている。また、フラッシュメモリシステム1は、外部バス13を介してホストシステム4と接続される。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an embodiment of a flash memory system according to the present invention. As shown in FIG. 1, the
ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)と、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等とから構成される。ホストシステム4は、たとえば文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。
The
フラッシュメモリ2は、不揮発性メモリであり、フラッシュメモリ2内のレジスタとメモリセルアレイとの間でデータの複写を行って、データの書き込み又は読み出しを行う。メモリセルアレイは、複数のメモリセル群と、ワード線とを備える。各メモリセル群は、複数のメモリセルが直列に接続されたものである。ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、データの複写、すなわち、レジスタから選択されたメモリセルへのデータの書き込み(複写)、又は選択されたメモリセルからレジスタへのデータの読み出し(複写)が行われる。つまり、メモリコントローラ3から与えられたデータは、レジスタを介してメモリセルアレイに書き込まれ、メモリセルアレイに記憶されているデータはレジスタを介してメモリコントローラ3に供給される。
The
メモリセルアレイを構成するメモリセルは、2つゲートを備えたMOSトランジスタによって構成される。ここで、一方のゲートはコントロールゲート、他方のゲートはフローティングゲートとそれぞれ呼ばれている。フローティングゲートに電荷(電子)を注入若しくはフローティングゲートから電荷(電子)を排出することによって、データの書き込み若しくはデータの消去が行われる。 A memory cell constituting the memory cell array is constituted by a MOS transistor having two gates. Here, one gate is called a control gate, and the other gate is called a floating gate. Data is written or erased by injecting charges (electrons) into the floating gate or discharging charges (electrons) from the floating gate.
このフローティングゲートは、周囲が絶縁体で囲まれているので、注入された電子は長期間にわたって保持される。なお、フローティングゲートに電子を注入するときは、コントロールゲートが高電位側となる高電圧がコントロールゲートとフローティングゲートとの間に印加される。また、フローティングゲートから電子を排出するときは、コントロールゲートが低電位側となる高電圧がコントロールゲートとフローティングゲートとの間に印加される。ここで、フローティングゲートに電子が注入されている状態が書き込み状態であり、論理値「0」に対応する。また、フローティングゲートから電子が排出されている状態が消去状態であり、論理値「1」に対応する。 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. In addition, when electrons are discharged from the floating gate, a high voltage at which the control gate is on the low potential side is applied between the control gate and the floating gate. 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のアドレス空間は、図2に示したように“ページ”及び“ブロック(物理ブロック)”で構成されている。ページは、フラッシュメモリ2で行われるデータ読み出し動作及びデータ書き込み動作における処理単位である。物理ブロックは、フラッシュメモリ2で行われるデータ消去動作における処理単位であり、複数個のページで構成されている。図2は、大ブロックの場合の構造を示しており、1個のページは、4セクタ(2048バイト)のユーザ領域25と64バイトの冗長領域26とで構成され、1個の物理ブロックは64個のページで構成されている。
Such an address space of the
尚、小ブロックの場合は、1個のページは、1セクタ(512バイト)のユーザ領域と16バイトの冗長領域とで構成され、1個の物理ブロックは32個のページで構成されている。又、大ブロックの場合は、ユーザ領域25を4分割した512バイトの領域をサブページといい、各サブページに冗長領域26内の一部の領域が割り当てられている。従って、大ブロックの場合、1個の物理ブロックには、256個のサブページが含まれている。
In the case of a small block, one page is composed of a user area of 1 sector (512 bytes) and a redundant area of 16 bytes, and one physical block is composed of 32 pages. In the case of a large block, a 512-byte area obtained by dividing the
次に、ホストシステム4側のアドレス空間とフラッシュメモリ2側のアドレス空間について図3を参照して説明する。ホストシステム4側のアドレス空間は、図3(a)に示したように、セクタ(512バイト)単位で分割した領域に付けた通番であるLBA(Logical Block Address)で管理されている。メモリコントローラ3内では、複数個のセクタをまとめたものを論理ブロックとして、複数個の論理ブロックをまとめたものを論理ゾーンとしている。ここで、図3(b)に示したように、論理ブロックに付けられた通番を論理ブロック番号(LBN)と言い、論理ゾーンに付けられた通番を論理ゾーン番号(LZN)と言う。また、各論理ゾーンに含まれる論理ブロックの、各論理ゾーン内での通番を論理ゾーン内ブロック番号(LZIBN)と言う。
Next, the address space on the
フラッシュメモリ2側のアドレス空間は、図3(c)に示したように、各物理ブロックに固有の物理ブロックアドレス(PBA)が割り当てられている。さらに、記憶領域を複数のゾーンに分割して管理する場合には、複数個の物理ブロックで物理ゾーンを構成し、各物理ゾーンに固有の物理ゾーン番号(PZN)を割り当てている。各物理ゾーンに含まれる物理ブロックの、各物理ゾーン内での通番を物理ゾーン内ブロック番号(PZIBN)と言う。
In the address space on the
また、各論理ゾーンにはそれぞれ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.
図3は、1個の論理ブロックを、256個のサブページで構成さている1個の物理ブロックに割り当てた場合を示している。従って、256セクタが1個の論理ブロックに対応し、LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、LBA#0〜#127999の128000セクタの領域に対応している。LZN#1以降の論理ゾーンについても同様に、LZN#1の論理ゾーンは、LBA#128000〜#255999の128000セクタの領域に対応し、LZN#2の論理ゾーンは、LBA#256000〜#383999の128000セクタの領域に対応し、LZN#3の論理ゾーンは、LBA#384000〜#511999の128000セクタの領域に対応している。
FIG. 3 shows a case where one logical block is allocated to one physical block composed of 256 subpages. Therefore, 256 sectors correspond to one logical block, and the logical zone of
LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、PBA#0〜#511の512個の物理ブロックで構成されたPZN#0の物理ゾーンに割り当てられている。LZN#1以降の論理ゾーンについても同様に、LZN#1の論理ゾーンは、PZN#1の物理ゾーンに割り当てられ、LZN#2の論理ゾーンは、PZN#2の物理ゾーンに割り当てられ、LZN#3の論理ゾーンは、PZN#3の物理ゾーンに割り当てられている。
The logical zone of
ここで、物理ゾーンに含まれる物理ブロックの個数を、論理ゾーンに含まれる論理ブロックの個数より多くしているのは、ペアブロック(同一の論理ブロックに対応する新データと旧データが記憶された1対の物理ブロック)を許容するためである。従って、ペアブロックの許容数を多くしたい場合には、物理ゾーンに含まれる物理ブロックの個数を多くすればよい。又、物理ゾーンに含まれる物理ブロックの個数は、データを正常に書き込むことができない不良ブロックが発生した場合等も考慮して設定しなければならない。 Here, the number of physical blocks included in the physical zone is larger than the number of logical blocks included in the logical zone because the pair blocks (new data and old data corresponding to the same logical block are stored) This is to allow a pair of physical blocks). Therefore, in order to increase the allowable number of pair blocks, the number of physical blocks included in the physical zone may be increased. In addition, the number of physical blocks included in the physical zone must be set in consideration of a case where a defective block in which data cannot be normally written occurs.
尚、本実施の形態では、各物理ブロックには、その物理ブロックに割り当てられた論理ブロックに含まれるセクタに対応するデータをLBAの順番で書き込んでいる。従って、物理ブロックと論理ブロックとの対応関係を管理することにより、ホストシステム4側でLBAで管理されている領域とフラッシュメモリ2内の記憶領域の対応関係を管理することができる。
In this embodiment, in each physical block, data corresponding to the sectors included in the logical block assigned to the physical block is written in the LBA order. Therefore, by managing the correspondence between the physical block and the logical block, the correspondence between the area managed by the LBA on the
この物理ブロックと論理ブロックの対応関係は、データの書き込みや消去が行われる毎に変化する。従って、物理ブロックと論理ブロックの対応関係を示すアドレス変換テーブルを作成し、対応関係が変化する毎にアドレス変換テーブルを更新している。このアドレス変換テーブルは、論理ゾーン(論理ゾーンと対応する物理ゾーン)毎に作成される。このアドレス変換テーブルは起動時に作成してもよいが、アクセスの対象になった論理ゾーンについて、その都度作成するようにしてもよい。 The correspondence between the physical block and the logical block changes every time data is written or erased. Therefore, an address conversion table showing the correspondence between physical blocks and logical blocks is created, and the address conversion table is updated each time the correspondence changes. This address conversion table is created for each logical zone (physical zone corresponding to the logical zone). This address conversion table may be created at the time of activation, but may be created each time for a logical zone that is an access target.
アドレス変換テーブルを作成するときは、物理ブロックの先頭ページの冗長領域26に書き込まれる論理ブロックを示す情報(以下、論理アドレス情報という)が読み出される。冗長領域26に書き込まれる論理アドレス情報としては、LBN等の論理ブロックを特定する情報が用いられる。なお、本実施の形態のように論理ゾーンと物理ゾーンとの対応関係が予め設定されている場合は、LZIBNに基づいてアドレス変換テーブルを作成することができるので、LBNよりデータ量の少ないLZIBNを論理アドレス情報として用いることが好ましい。
When creating the address conversion table, information indicating the logical block written in the
図6はアドレス変換テーブル31の一例であり、論理ブロックと物理ブロックの対応関係を、LZIBNとPZIBNの対応関係で示している。このアドレス変換テーブル31では、論理ゾーンに含まれるLZIBN#0〜#499の500個の論理ブロックに対応する物理ブロックを、この論理ゾーンに割り当てられている物理ゾーン内の物理ブロックに付けられたPZIBNで示している。
FIG. 6 shows an example of the address conversion table 31. The correspondence between logical blocks and physical blocks is shown as the correspondence between LZIBN and PZIBN. In this address conversion table 31, physical blocks corresponding to 500 logical
また、物理ブロックの先頭ページの冗長領域26には、その物理ブロックが不良ブロックであるか否かを示すブロックステータス(フラグ)が書き込まれる。更に、冗長領域26の各サブページに割り当てられた領域には、各サブページに書き込まれたユーザデータに対応するエラーコレクションコード(ECC)等の付加情報が書き込まれる。
Further, a block status (flag) indicating whether or not the physical block is a defective block is written in the
次に、フラッシュメモリ2に対してアクセス処理を行うメモリコントローラ3について説明する。メモリコントローラ3は、フラッシュメモリ2にデータ、アドレス情報、内部コマンド等を供給することにより読み出し処理、書き込み処理、ブロック消去処理等の各処理を行う。
Next, the
ここで、内部コマンドとは、メモリコントローラ3がフラッシュメモリ2に処理の実行を指示するためのコマンドであり、フラッシュメモリ2はメモリコントローラ3から与えられる内部コマンドに従って動作する。一方、ホストシステム4からメモリコントローラ3に与えられるコマンドを外部コマンドと言う。
Here, the internal command is a command for the
メモリコントローラ3は、図1に示したように、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(エラー・コレクション・コード)ブロック11と、ROM(Read Only Memory)12とを備えている。これら機能ブロックによって構成されるメモリコントローラ3は、1つの半導体チップ上に集積される。
As shown in FIG. 1, the
マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、メモリコントローラ3の全体の動作を制御する。
The
また、マイクロプロセッサ6は、ROM12に記憶されているプログラムに基づいてフラッシュメモリインターフェースブロック10等の動作を制御することにより、アドレス管理手段、書込み手段、ペアブロック管理手段、ペアブロック解消手段等の各手段を実現している。
Further, the
ROM12は、不揮発性の記憶素子であり、マイクロプロセッサ6の動作プログラムの他に、フラッシュメモリインターフェースブロック10の動作プログラムであるシーケンスコマンド等を記憶している。
The
ワークエリア8は、フラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される。上述のアドレス変換テーブルは、このワークエリア8上に作成される。
The
バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込むべきデータを一時的に蓄積する。すなわち、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態となるまでバッファ9に保持され、フラッシュメモリ2に書き込むべきデータは、フラッシュメモリ2が書き込み可能な状態となるまでバッファ9に保持される。
The
ECCブロック11は、フラッシュメモリ2に書き込むデータに付加されるエラーコレクションコードを生成するとともに、読み出しデータに付加されたエラーコレクションコードに基づいて、読み出したデータに含まれる誤りを検出・訂正する。
The
ホストインターフェースブロック7は、ホストシステム4との間で、外部バス13を介し、データ、アドレス情報、外部コマンド等の授受を行う。ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口としてフラッシュメモリシステム1の内部(たとえば、バッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。
The
フラッシュメモリインターフェースブロック10は、内部バス14を介して、フラッシュメモリ2とデータ、アドレス情報、ステータス情報、内部コマンド等の授受を行う。フラッシュメモリインターフェースブロック10は、書き込み処理、読み出し処理等の処理毎に設定されているシーケンスコマンドに従って、各種の処理を実行する。
The flash
ホストインターフェースブロック7及びフラッシュメモリインターフェースブロック10は、図4に示したような各種レジスタを備えている。ホストインターフェースブロック7は、コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3等を備えている。フラッシュメモリインターフェースブロック10は、物理ブロックアドレスレジスタR11、セクタ番号レジスタR12、カウンタR13等を備えている。
The
コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3には、ホストシステム4から与えられる情報が書き込まれる。コマンドレジスタR1には、書き込みコマンド、読み出しコマンド等の外部コマンドが書き込まれる。セクタ数レジスタR2にはアクセス対象領域のセクタ数が書き込まれる。LBAレジスタR3には、アクセス対象領域の先頭のLBAが書き込まれる。
Information given from the
物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13には、セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて、アクセスする物理ブロックの物理ブロックアドレス(PBA)、アクセスを開始するサブページの番号(0〜255)、アクセスするセクタ数(サブページの数)が設定される。 In the physical block address register R11, the sector number register R12, and the counter R13, based on the information written in the sector number register R2 and the LBA register R3, the physical block address (PBA) of the physical block to be accessed, the sub that starts access The page number (0 to 255) and the number of sectors to be accessed (number of subpages) are set.
ここで、物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13に設定される物理ブロックアドレス(PBA)、サブページの番号及びセクタ数(サブページの数)について説明する。図3に示したように、1個の論理ブロックに、LBAが連続する256セクタの領域を含んでいる場合、LBAの下位8ビットは論理ブロックに含まれるセクタに付けられた通番(以下、セクタ番号(SN)と言う)に対応する。一方、この下位8ビットを除いた上位側のビットは、論理ブロックに付けられた通番である論理ブロック番号(LBN)に対応する。 Here, the physical block address (PBA), subpage number, and sector number (number of subpages) set in the physical block address register R11, sector number register R12, and counter R13 will be described. As shown in FIG. 3, when one logical block includes an area of 256 sectors in which LBAs are continuous, the lower 8 bits of the LBA are serial numbers (hereinafter referred to as sectors) assigned to the sectors included in the logical block. Number (SN)). On the other hand, the upper bits excluding the lower 8 bits correspond to a logical block number (LBN) which is a serial number assigned to the logical block.
物理ブロックアドレスレジスタR11には、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて求めた論理ブロック番号(LBN)で特定される論理ブロックと対応する物理ブロックの物理ブロックアドレス(PBA)又は空きブロックの物理ブロックアドレス(PBA)が設定される。ここで、空きブロックの物理ブロックアドレス(PBA)が設定されるのは、データの書換え等を行う場合、つまり、空きブロックに書替えデータを書き込む場合である。 In the physical block address register R11, the physical block address (PBA) of the physical block corresponding to the logical block specified by the logical block number (LBN) obtained based on the information written in the LBA register R3 and the sector number register R2 Alternatively, a physical block address (PBA) of an empty block is set. Here, the physical block address (PBA) of the empty block is set when data is rewritten, that is, when rewritten data is written in the empty block.
次に、セクタ番号(SN)とサブページ番号の対応関係について説明する。本実施の形態では、論理ブロックに含まれる各セクタに対応するデータをLBAの順番で物理ブロック内のサブページに書き込んでいる。従って、物理ブロック内の256個のサブページに付けられた通番であるサブページ番号(0〜255)とセクタ番号(SN)は、同じ番号同士が対応する。つまり、セクタ番号#0に対応するデータは、サブページ番号#0のサブページに書き込まれ、セクタ番号#1に対応するデータは、サブページ番号#1のサブページに書き込まれ、セクタ番号#2に対応するデータは、サブページ番号#2のサブページに書き込まれる。
Next, the correspondence between sector numbers (SN) and subpage numbers will be described. In the present embodiment, data corresponding to each sector included in the logical block is written to subpages in the physical block in the LBA order. Therefore, the same number corresponds to the subpage number (0-255) and the sector number (SN), which are serial numbers assigned to 256 subpages in the physical block. That is, data corresponding to
セクタ番号(SN)とサブページ番号がこのような対応関係になっているため、セクタ番号レジスタR12には、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて求めたアクセス対象領域の先頭セクタのセクタ番号(SN)が設定される。つまり、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて求めたアクセス対象領域の先頭セクタのセクタ番号(SN)は、アクセスを開始するサブページのサブページ番号に一致する。 Since the sector number (SN) and the subpage number have such a correspondence, the sector number register R12 stores the access target area obtained based on the information written in the LBA register R3 and the sector number register R2. The sector number (SN) of the first sector is set. That is, the sector number (SN) of the head sector of the access target area obtained based on the information written in the LBA register R3 and the sector number register R2 matches the subpage number of the subpage from which access is started.
カウンタR13には、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて求めたアクセス対象領域に含まれるセクタ数が設定される。つまり、アクセス対象領域に含まれるセクタ数は、アクセスされるサブページの個数に一致する。 In the counter R13, the number of sectors included in the access target area obtained based on the information written in the LBA register R3 and the sector number register R2 is set. That is, the number of sectors included in the access target area matches the number of subpages to be accessed.
尚、LBAレジスタR3及びセクタ数レジスタR2に設定された情報に基づいて特定されるアクセス対象領域が複数の論理ブロックに跨っている場合には、そのアクセス対象領域と対応する物理ブロックも複数の物理ブロックに跨っているので、物理ブロックアドレスレジスタR11、セクタ番号レジスタR12、カウンタR13に対する情報の設定は論理ブロック毎に行われる。 When the access target area specified based on the information set in the LBA register R3 and the sector number register R2 extends over a plurality of logical blocks, the physical block corresponding to the access target area also has a plurality of physical blocks. Since it extends over blocks, information is set for each physical block address register R11, sector number register R12, and counter R13 for each logical block.
フラッシュメモリインターフェースブロック10は、このようにして物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13に設定された値に基づいて書き込み処理や読み出し処理を実行する。
The flash
書き込み処理では、1セクタのデータがバッファ9からフラッシュメモリ2に供給される毎にセクタ番号レジスタR12に設定されている値がインクリメント(1ずつ増加)され、カウンタR13に設定されている値がデクリメント(1ずつ減少)される。カウンタR13に設定されている値が0になったときに書き込み処理が終了する。従って、セクタ番号レジスタR12に最初に設定された値に対応するサブページからカウンタR13に最初に設定された値に対応するサブページ分のデータが書き込まれる。
In the writing process, every time data of one sector is supplied from the
同様に、読み出し処理では、1セクタのデータがフラッシュメモリ2からバッファ9に読み出される毎にセクタ番号レジスタR12に設定されている値がインクリメント(1ずつ増加)され、カウンタR13に設定されている値がデクリメント(1ずつ減少)される。カウンタR13に設定されている値が0になったときに読み出し処理が終了する。従って、セクタ番号レジスタR12に最初に設定された値に対応するサブページからカウンタR13に最初に設定された値に対応するサブページ分のデータが読み出される。
Similarly, in the read process, every time data of one sector is read from the
例えば、セクタ番号レジスタR12に「10」を設定し、カウンタR13に「8」を設定して書き込み処理を開始した場合、サブページ番号#10〜#17のサブページにユーザデータが書き込まれる。 For example, when “10” is set in the sector number register R12 and “8” is set in the counter R13 and the writing process is started, user data is written in the subpages of the subpage numbers # 10 to # 17.
次に空きブロック検索について説明する。フラッシュメモリに記憶されているデータを書き替えるときには、書換えデータを元のデータが記憶されていた物理ブロックとは別の物理ブロックに書き込んでいる。従って、フラッシュメモリに記憶されているデータを書き替えるときには、書換えデータの書き込み先になる空きブロックの検索が行われる。図5は、空きブロックを検索するときに用いられる空きブロック検索テーブル33の一例を示している。 Next, the empty block search will be described. When the data stored in the flash memory is rewritten, the rewritten data is written in a physical block different from the physical block in which the original data is stored. Therefore, when the data stored in the flash memory is rewritten, a search for an empty block to which the rewritten data is to be written is performed. FIG. 5 shows an example of an empty block search table 33 used when searching for empty blocks.
この空きブロック検索テーブル33は、64バイト(512ビット)のデータから構成され、物理ゾーンに含まれる物理ブロックの使用状況を各ビットの論理値で示している。つまり、各ビットが物理ゾーンに含まれる1個の物理ブロックに対応しており、空きブロックに対応するビットには論理値「1」が設定されている。データが書き込まれている物理ブロックに対応するビットと、不良ブロックに対応するビットには論理値「0」が設定されている。 This empty block search table 33 is composed of 64 bytes (512 bits) of data, and indicates the use status of the physical blocks included in the physical zone by the logical value of each bit. That is, each bit corresponds to one physical block included in the physical zone, and a logical value “1” is set to the bit corresponding to the empty block. A logical value “0” is set in the bit corresponding to the physical block in which data is written and the bit corresponding to the defective block.
図5では、一番上の行の8ビット(1バイト)は、下位側から順番にPZIBN#0〜#7の物理ブロックの使用状況を示している。以下同様に、二番目の行は、PZIBN#8〜#15の物理ブロックの使用状況を示し、三番目の行は、PZIBN#16〜#23の物理ブロックの使用状況を示している。そして、一番下の行は、PZIBN#504〜#511の物理ブロックの使用状況を示している。従って、一番上の行の最下位ビットはPZIBN#0の物理ブロックの使用状況を示し、一番下の行の最上位ビットはPZIBN#511の物理ブロックの使用状況を示している。
In FIG. 5, 8 bits (1 byte) in the top row indicate the usage status of physical
この空きブロック検索テーブル33を用いて空きブロックを検索する場合は、各行の1バイトのデータを上の行から順番に読み出していき、読み出したデータが0(2進数表示:0000 0000)でないときは、そのデータをシフトレジスタに書き込み、シフトレジスタを下位方向にシフトさせる。何回のシフトでキャリーが発生したかにより、下位から何ビット目が「1」であるかを判別する。例えば、4番目の行(PZIBN#24〜#31)の0001 1000(2進数表示)をシフトレジスタに書き込み、シフトレジスタを下位方向にシフトさせた場合は、4回のシフトでキャリーが発生するので、下位側から4ビット目に対応するPZIBN#27の物理ブロックが空きブロックとして検出される。
When searching for an empty block using this empty block search table 33, 1-byte data of each row is read sequentially from the upper row, and when the read data is not 0 (binary number display: 0000 0000) The data is written to the shift register, and the shift register is shifted in the lower direction. It is determined how many bits from the lower order are “1” depending on how many times the shift has occurred. For example, if 0001 1000 (binary number display) in the fourth row (
また、次回の空きブロック検索では、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. .
尚、検出した空きブロックにデータを書き込んだときには、その物理ブロックに対応する空きブロック検索テーブル33上のビットが「1」から「0」に書き換えられる。又、データの書替えで、元のデータが記憶されていた物理ブロックの記憶データを消去したときには、その物理ブロックに対応する空きブロック検索テーブル33上のビットが「0」から「1」に書き換えられる。一方、アドレス変換テーブル(論理ブロックと物理ブロックの対応関係をLZIBNとPZIBNの対応関係で示したアドレス変換テーブル)については、書き込んだデータに対応する論理ブロックのLZIBNと対応関係にあるPZIBNが、元のデータが記憶されていた物理ブロックのPZIBNから書換えデータを書き込んだ物理ブロックのPZIBNに変更する。 When data is written in the detected empty block, the bit on the empty block search table 33 corresponding to the physical block is rewritten from “1” to “0”. Further, when the data stored in the physical block in which the original data is stored is erased by rewriting the data, the bit on the empty block search table 33 corresponding to the physical block is rewritten from “0” to “1”. . On the other hand, for the address translation table (the address translation table showing the correspondence between the logical block and the physical block by the correspondence between LZIBN and PZIBN), the PZIBN corresponding to the LZIBN of the logical block corresponding to the written data is the original Is changed from PZIBN of the physical block in which the data is stored to PZIBN of the physical block in which the rewrite data is written.
次に、本発明に係るペアブロックの管理について説明する。このペアブロックは、同一の論理ブロックに対応する2個の物理ブロックである。上述のように、フラッシュメモリ2に記憶されているデータを書き換える場合には、元のデータが記憶されている物理ブロック(第1の物理ブロック)とは別の物理ブロック(第2の物理ブロック)に書換えデータが書き込まれる。ここで、書換え範囲に含まれるサブページの後に、書換え範囲に含まれないサブページがあった場合、この書換え範囲に含まれないサブページについては、第1の物理ブロックから第2の物理ブロックへのデータの転送(複写)を行わずに、同一の論理ブロックに対応する2個の物理ブロック(第1の物理ブロックと第2の物理ブロック)を並存させている。ここで、ペアブロックに記憶されているLBAが同一のデータ(サブページ番号が同一のサブページに記憶されているデータ)については、第2の物理ブロックに記憶されているデータが優先され、第1の物理ブロックにだけ記憶されているデータについては、第1の物理ブロックに記憶されているデータが有効になる。
Next, management of pair blocks according to the present invention will be described. This pair block is two physical blocks corresponding to the same logical block. As described above, when data stored in the
このようにすることにより、アクセス対象領域が連続する書き込み指示がホストシステム側から与えられた場合、つまり、ホストシステム側から与えられた書き込み指示に基づいた書換え範囲が連続している場合に、第1の物理ブロックから第2の物理ブロックへの無駄なデータの転送(複写)を行わずに、第2の物理ブロックに対して書換えデータを継続して書き込むことができる。しかし、ペアブロックの数が多くなりすぎると、空きブロックを確保することができなくなる。 In this way, when the host system side gives a write instruction with continuous access target areas, that is, when the rewrite range based on the write instruction given from the host system side is continuous, Rewrite data can be continuously written to the second physical block without transferring (duplicating) useless data from one physical block to the second physical block. However, if the number of pair blocks becomes too large, it becomes impossible to secure empty blocks.
そこで、本発明に係るペアブロックの管理では、このペアブロックの最大数を設定し、ペアブロックの組数(ペア数)が最大数に達したときに、最も古いペアブロック(ペアブロック状態になった順番が最先のペアブロック)の第1の物理ブロックにだけ記憶されているデータについて、第1の物理ブロックから第2の物理ブロックへのデータの転送(複写)を行い、このデータの転送(複写)が終了した後に、第1の物理ブロックの記憶データを消去して、ペアブロックの組数(ペア数)が所定の最大数を超えないように管理している。 Therefore, in the management of pair blocks according to the present invention, the maximum number of pair blocks is set, and when the number of pair blocks (number of pairs) reaches the maximum number, the oldest pair block (the pair block state is set). For the data stored only in the first physical block of the first paired block), the data is transferred (copied) from the first physical block to the second physical block, and this data is transferred. After the (copying) is completed, the storage data of the first physical block is erased, and the number of pairs of pairs (number of pairs) is managed so as not to exceed a predetermined maximum number.
このペアブロックを管理する方法について図7〜図10を参照しながら説明する。尚、本実施の形態では、ペアブロックの最大数を2としている。又、ペアブロックの新旧関係(ペアブロック状態になった順番の先後関係)を判断するために、物理ブロックの先頭ページの冗長領域に2ビットのペアブロックシリアル番号(#0〜#3)を書き込んでいる。このペアブロックシリアル番号のビット数については、ペアブロックの最大数に応じて適宜設定する。例えば、ペアブロックの最大数が3以下であれば、2ビットのペアブロックシリアル番号でペアブロックの新旧関係を判断することができるが、ペアブロックの最大数が4の場合は、ペアブロックシリアル番号を3ビット(#0〜#7)にしなければ、ペアブロックの新旧関係を判断することができなくなる。 A method for managing the pair blocks will be described with reference to FIGS. In the present embodiment, the maximum number of pair blocks is 2. Also, in order to determine the new / old relationship of the pair block (first-to-last relationship in the order of the pair block state), the 2-bit pair block serial number (# 0 to # 3) is written in the redundant area of the first page of the physical block. It is out. The number of bits of the pair block serial number is appropriately set according to the maximum number of pair blocks. For example, if the maximum number of pair blocks is 3 or less, it is possible to determine the new / old relationship of the pair blocks with a 2-bit pair block serial number, but if the maximum number of pair blocks is 4, the pair block serial number Unless 3 is set to 3 bits (# 0 to # 7), it is impossible to determine the new / old relationship between the pair blocks.
又、以下の説明では、ホストシステム4から与えられる書込み(書換え)の指示に基づいたアクセス対象領域は、LZN#0の論理ゾーンに含まれるものとして説明する。このLZN#0の論理ゾーンについては、図6に示したようなアドレス変換テーブル31及び図5に示したような空きブロック検索テーブル33が作成されているものとする。又、以下の処理を開始する時点では、ペアブロックは存在せず、後述するペアブロックテーブルには、何の情報も設定されていないものとする。
In the following description, it is assumed that the access target area based on the write (rewrite) instruction given from the
まず、ホストシステムから与えられた書込み(書換え)の指示に基づいたアクセス対象領域が、LBN#0(=LZIBN#0)の論理ブロックのSN#64〜#159の96セクタの領域であった場合の書込み(書換え)処理について説明する(図7(a)に示した*1)。 First, when the access target area based on the write (rewrite) instruction given from the host system is the area of 96 sectors of SN # 64 to # 159 of the logical block of LBN # 0 (= LZIBN # 0) Will be described (* 1 shown in FIG. 7A).
まず、アドレス変換テーブル31を参照することにより、LZIBN#0(=LBN#0)の論理ブロックに対応するデータがPZIBN#22(=PBA#22)の物理ブロックに記憶されていることが分かる。更に、後述するペアブロックテーブルを参照することにより、ペアブロックは存在しないことが分かる。 First, by referring to the address conversion table 31, it can be seen that data corresponding to a logical block of LZIBN # 0 (= LBN # 0) is stored in a physical block of PZIBN # 22 (= PBA # 22). Furthermore, it can be seen that there is no pair block by referring to a pair block table described later.
続いて、PZIBN#22(=PBA#22)の物理ブロックの書込み状態を調べ、全てのサブページにデータが書き込まれているため、空きブロック検索テーブル33を用いた空きブロック検索が行われる。この空きブロック検索で、PZIBN#27(=PBA#27)が検出され、このPBA#27(PZIBN#27)の物理ブロックに対する書込み(書換え)処理が開始される。 Subsequently, the write state of the physical block of PZIBN # 22 (= PBA # 22) is checked, and data is written in all the subpages, so that a free block search using the free block search table 33 is performed. In this empty block search, PZIBN # 27 (= PBA # 27) is detected, and writing (rewriting) processing for the physical block of PBA # 27 (PZIBN # 27) is started.
この書込み(書換え)処理では、まず、PZIBN#22(=PBA#22)の物理ブロックのサブページ番号#0〜#63のサブページに記憶されているデータが、PZIBN#27(=PBA#27)の物理ブロックのサブページ番号#0〜#63のサブページに転送(複写)される。続いて、ホストシステム4から与えられるLBN#0(=LZIBN#0)の論理ブロックのSN#64〜#159のセクタに対応する書換えデータ(書換えデータA)が、PZIBN#27(=PBA#27)の物理ブロックのサブページ番号#64〜#159のサブページに書き込まれる。
In this writing (rewriting) process, first, the data stored in the subpages of
尚、この書込み(書換え)処理を開始する時点でペアブロックは存在しないので、PZIBN#27(=PBA#27)の物理ブロックの冗長領域には、ペアブロックシリアル番号として#0が書き込まれる。又、同一の論理ブロックに対応するPZIBN#22(=PBA#22)の物理ブロックとPZIBN#27(=PBA#27)の物理ブロックの新旧関係を判断するため、PZIBN#27(=PBA#27)の物理ブロックの冗長領域にシリアル番号が書き込まれる。PZIBN#27(=PBA#27)の物理ブロックに書き込まれるシリアル番号は、PZIBN#22(=PBA#22)の物理ブロックに書き込まれているシリアル番号をインクリメント(1を加算)した#1になる。又、空きブロック検索テーブル33のPZIBN#27(=PBA#27)の物理ブロックに対応するビットの論理値が「1」から「0」に書き換えられる。
Since no pair block exists at the time of starting this writing (rewriting) process, # 0 is written as the pair block serial number in the redundant area of the physical block of PZIBN # 27 (= PBA # 27). Further, in order to determine the new and old relationship between the physical block of PZIBN # 22 (= PBA # 22) and the physical block of PZIBN # 27 (= PBA # 27) corresponding to the same logical block, PZIBN # 27 (=
この後、アクセス対象領域にLBN#0(=LZIBN#0)の論理ブロックのSN#160以降のセクタが含まれる書込み(書換え)の指示が与えられた場合は、PZIBN#27(=PBA#27)の物理ブロックのサブページ番号#160以降のサブページに対してその書込み(書換え)処理が続行される。従って、PZIBN#22(=PBA#22)の物理ブロックのサブページ番号#160〜#255のサブページに記憶されているデータを、PZIBN#27(=PBA#27)の物理ブロックのサブページ番号#160〜#255のサブページに転送(複写)する、データの転送(複写)を行わない。つまり、書換え範囲に含まれるサブページの後に、書換え範囲に含まれないサブページがあった場合、この書換え範囲に含まれないサブページについては、書換え対象でない記憶データの転送(複写)を行わない。 After this, if a write (rewrite) instruction including a sector after SN # 160 of the logical block of LBN # 0 (= LZIBN # 0) is given to the access target area, PZIBN # 27 (= PBA # 27) The write (rewrite) processing is continued for the subpages after the subpage number # 160 of the physical block (). Therefore, the data stored in the subpages # 160 to # 255 of the physical block of PZIBN # 22 (= PBA # 22) is changed to the subpage number of the physical block of PZIBN # 27 (= PBA # 27). Data transfer (copying) to the subpages # 160 to # 255 is not performed. In other words, if there is a subpage not included in the rewrite range after the subpage included in the rewrite range, the storage data that is not the rewrite target is not transferred (duplicated) to the subpage not included in the rewrite range. .
ここで、PZIBN#22(=PBA#22)の物理ブロックとPZIBN#27(=PBA#27)の物理ブロックがペアブロックになるため、ペアブロックテーブルにペアブロックを管理するための情報が設定される。 Here, since the physical block of PZIBN # 22 (= PBA # 22) and the physical block of PZIBN # 27 (= PBA # 27) become a pair block, information for managing the pair block is set in the pair block table. The
図8はペアブロックテーブル32の一例であり、このペアブロックテーブル32には、ペアブロックと対応関係にある論理ブロックのLZIBN、ペアブロックの新旧関係が新しい方の物理ブロックのPZIBN、及び新旧関係が新しい方の物理ブロックに書き込まれたペアブロックシリアル番号が設定される。ここでは、図8(a)に示したように、PZIBN#22(=PBA#22)の物理ブロック及びPZIBN#27(=PBA#27)の物理ブロックと対応関係にある論理ブロックのLZIBNである#0、新旧関係が新しい方の物理ブロックのPZIBNである#27、PZIBN#27(=PBA#27)の物理ブロックの冗長領域に書き込んだペアブロックシリアル番号である#0をそれぞれ設定する。 FIG. 8 shows an example of the pair block table 32. In this pair block table 32, the logical block LZIBN corresponding to the pair block, the pair block new and old physical block PZIBN, and the old and new relationship are shown. The pair block serial number written in the newer physical block is set. Here, as shown in FIG. 8A, the LZIBN of the logical block corresponding to the physical block of PZIBN # 22 (= PBA # 22) and the physical block of PZIBN # 27 (= PBA # 27). # 0, # 27 which is the PZIBN of the physical block with the newer old / new relationship, and # 0 which is the pair block serial number written in the redundant area of the physical block of PZIBN # 27 (= PBA # 27) are set.
次に、ホストシステムから与えられた書込み(書換え)の指示に基づいたアクセス対象領域が、LBN#2(=LZIBN#2)の論理ブロックのSN#32〜#127の96セクタの領域であった場合の書込み(書換え)処理について説明する(図7(b)に示した*2)。
Next, the access target area based on the write (rewrite) instruction given from the host system is the area of 96 sectors of
この書込み(書換え)処理の場合も、まず、アドレス変換テーブル31とペアブロックテーブルが参照される。アドレス変換テーブル31を参照することにより、LZIBN#2(=LBN#2)の論理ブロックに対応するデータがPZIBN#6(=PBA#6)の物理ブロックに記憶されていることが分かる。更に、ペアブロックテーブル32を参照することにより、ペアブロックが存在し、そのペアブロックに対応するペアブロックシリアル番号が#0であることが分かる。 Also in the case of this writing (rewriting) process, first, the address conversion table 31 and the pair block table are referred to. By referring to the address conversion table 31, it can be seen that data corresponding to the logical block of LZIBN # 2 (= LBN # 2) is stored in the physical block of PZIBN # 6 (= PBA # 6). Further, by referring to the pair block table 32, it can be seen that a pair block exists and the pair block serial number corresponding to the pair block is # 0.
続いて、PZIBN#6(=PBA#6)の物理ブロックの書込み状態を調べ、全てのサブページにデータが書き込まれいるため、空きブロック検索テーブル33を用いた空きブロック検索が行われる。この空きブロック検索で、PZIBN#28(=PBA#28)が検出され、このPBA#28(PZIBN#28)の物理ブロックに対する書込み(書換え)処理が開始される。 Subsequently, the writing state of the physical block of PZIBN # 6 (= PBA # 6) is checked, and data is written in all the subpages, so that a free block search using the free block search table 33 is performed. In this empty block search, PZIBN # 28 (= PBA # 28) is detected, and writing (rewriting) processing for the physical block of PBA # 28 (PZIBN # 28) is started.
この書込み(書換え)処理では、まず、PZIBN#6(=PBA#6)の物理ブロックのサブページ番号#0〜#31のサブページに記憶されているデータが、PZIBN#28(=PBA#28)の物理ブロックのサブページ番号#0〜#31のサブページに転送(複写)される。続いて、ホストシステム4から与えられるLBN#2(=LZIBN#2)の論理ブロックのSN#32〜#127のセクタに対応する書換えデータ(書換えデータB)が、PZIBN#28(=PBA#28)の物理ブロックのサブページ番号#32〜#127のサブページに書き込まれる。
In this writing (rewriting) process, first, data stored in subpages of
尚、PZIBN#28(=PBA#28)の物理ブロックの冗長領域には、シリアル番号として#0が書き込まれ、ペアブロックシリアル番号として#1が書き込まれる。ここで、PZIBN#28(=PBA#28)の物理ブロックの冗長領域に書き込まれるシリアル番号は、PZIBN#6(=PBA#6)の物理ブロックの冗長領域に書き込まれているシリアル番号をインクリメント(1を加算)した番号になる。又、PZIBN#28(=PBA#28)の物理ブロックの冗長領域に書き込まれるペアブロックシリアル番号は、PZIBN#27(=PBA#27)の物理ブロックの冗長領域に書き込まれているペアブロックシリアル番号をインクリメント(1を加算)した番号になる。又、空きブロック検索テーブル33のPZIBN#28(=PBA#28)の物理ブロックに対応するビットの論理値は、「1」から「0」に書き換えられる。 In addition, in the redundant area of the physical block of PZIBN # 28 (= PBA # 28), # 0 is written as the serial number, and # 1 is written as the pair block serial number. Here, the serial number written in the redundant area of the physical block of PZIBN # 28 (= PBA # 28) is incremented from the serial number written in the redundant area of the physical block of PZIBN # 6 (= PBA # 6) ( 1). The pair block serial number written in the redundant area of the physical block of PZIBN # 28 (= PBA # 28) is the pair block serial number written in the redundant area of the physical block of PZIBN # 27 (= PBA # 27). The number is incremented (added 1). Further, the logical value of the bit corresponding to the physical block of PZIBN # 28 (= PBA # 28) in the empty block search table 33 is rewritten from “1” to “0”.
ここで、PZIBN#6(=PBA#6)の物理ブロックとPZIBN#28(=PBA#28)の物理ブロックがペアブロックになるため、ペアブロックが2つになる。従って、PZIBN#6(=PBA#6)の物理ブロックとPZIBN#28(=PBA#28)の物理ブロックからなるペアブロックの情報をペアブロックテーブル32に設定するためには、ペアブロックテーブルに設定されているPZIBN#22(=PBA#22)の物理ブロックとPZIBN#27(=PBA#27)の物理ブロックのペアブロック状態を解消しなければならない。このペアブロック状態を解消するため、図7(a)の*3に示したデータの転送(複写)を行わなければならない。 Here, since the physical block of PZIBN # 6 (= PBA # 6) and the physical block of PZIBN # 28 (= PBA # 28) are pair blocks, there are two pair blocks. Therefore, in order to set the pair block information including the physical block of PZIBN # 6 (= PBA # 6) and the physical block of PZIBN # 28 (= PBA # 28) in the pair block table 32, set in the pair block table The pair block state of the physical block of PZIBN # 22 (= PBA # 22) and the physical block of PZIBN # 27 (= PBA # 27) must be canceled. In order to eliminate this pair block state, data transfer (copying) indicated by * 3 in FIG. 7A must be performed.
このデータの転送(複写)では、PZIBN#22(=PBA#22)の物理ブロックのサブページ番号#160〜#255のサブページに記憶されているデータが、PZIBN#27(=PBA#27)の物理ブロックのサブページ番号#160〜#255のサブページに転送(複写)される。このデータの転送(複写)が終了した後、PZIBN#22(=PBA#22)の物理ブロックの記憶データが消去される。又、アドレス変換テーブル31のLZIBN#0に対応するPZIBNは#22から#27に書き換えられ、空きブロック検索テーブル33のPZIBN#22(=PBA#22)の物理ブロックに対応するビットの論理値は0から1に書き換えられる。
In this data transfer (copying), the data stored in the subpages of subpage numbers # 160 to # 255 of the physical block of PZIBN # 22 (= PBA # 22) is PZIBN # 27 (= PBA # 27). Are transferred (copied) to subpages of subpage numbers # 160 to # 255 of the physical block. After this data transfer (copying) is completed, the storage data of the physical block of PZIBN # 22 (= PBA # 22) is erased. The PZIBN corresponding to
一方、ペアブロックテーブル32には、図8(b)に示したようにPZIBN#6(=PBA#6)の物理ブロックとPZIBN#28(=PBA#28)の物理ブロックからなるペアブロックの情報が設定される。つまり、PZIBN#6(=PBA#6)の物理ブロック及びPZIBN#28(=PBA#28)の物理ブロックと対応関係にある論理ブロックのLZIBNである#2、新旧関係が新しい方の物理ブロックのPZIBNである#28、PZIBN#28(=PBA#28)の物理ブロックの冗長領域に書き込んだペアブロックシリアル番号である#1をそれぞれ設定する。
On the other hand, in the pair block table 32, as shown in FIG. 8B, information on a pair block consisting of a physical block of PZIBN # 6 (= PBA # 6) and a physical block of PZIBN # 28 (= PBA # 28). Is set. That is, the physical block of PZIBN # 6 (= PBA # 6) and the physical block of PZIBN # 28 (= PBA # 28) are LZIBN of the logical block corresponding to # 2, and the physical block with the newer and older relationship is the
次に、LBN#1(=LZIBN#1)の論理ブロックのSN#64〜#255の192セクタの領域に対する書込み(書換え)の指示がホストシステムから与えられた場合について説明する(図9(b)に示した*4)。 Next, a description will be given of a case where the host system gives a write (rewrite) instruction to the 192 sector area of SN # 64 to # 255 of the logical block of LBN # 1 (= LZIBN # 1) (FIG. 9B). * 4).
この書込み(書換え)処理は、ペアブロック状態を解消するためのデータの転送(複写)(図7(a)の*3)が終了した後に開始される。従って、この書換え処理を開始するときに存在するペアブロックは、PZIBN#6(=PBA#6)の物理ブロックとPZIBN#28(=PBA#28)の物理ブロックからなるペアブロック(図9(a))だけである。 This writing (rewriting) process is started after data transfer (copying) (* 3 in FIG. 7A) for canceling the pair block state is completed. Therefore, a pair block existing when starting the rewriting process is a pair block composed of a physical block of PZIBN # 6 (= PBA # 6) and a physical block of PZIBN # 28 (= PBA # 28) (FIG. 9A )) Only.
この書込み(書換え)処理の場合も、まず、アドレス変換テーブル31とペアブロックテーブルが参照される。アドレス変換テーブル31を参照することにより、LZIBN#1(=LBN#1)の論理ブロックに対応するデータがPZIBN#12(=PBA#12)の物理ブロックに記憶されていることが分かる。更に、ペアブロックテーブル32を参照することにより、ペアブロックが存在し、そのペアブロックに対応するペアブロックシリアル番号が#1であることが分かる。 Also in the case of this writing (rewriting) process, first, the address conversion table 31 and the pair block table are referred to. By referring to the address conversion table 31, it can be seen that data corresponding to the logical block of LZIBN # 1 (= LBN # 1) is stored in the physical block of PZIBN # 12 (= PBA # 12). Further, by referring to the pair block table 32, it can be seen that a pair block exists and the pair block serial number corresponding to the pair block is # 1.
続いて、PZIBN#12(=PBA#12)の物理ブロックの書込み状態を調べ、全てのサブページにデータが書き込まれいるため、空きブロック検索テーブル33を用いた空きブロック検索が行われる。この空きブロック検索で、PZIBN#50(=PBA#50)が検出され、このPBA#50(PZIBN#50)の物理ブロックに対する書込み(書換え)処理が開始される。 Subsequently, the writing state of the physical block of PZIBN # 12 (= PBA # 12) is checked, and data is written in all the subpages, so that a free block search using the free block search table 33 is performed. In this empty block search, PZIBN # 50 (= PBA # 50) is detected, and writing (rewriting) processing for the physical block of PBA # 50 (PZIBN # 50) is started.
この書込み(書換え)処理では、まず、PZIBN#12(=PBA#12)の物理ブロックのサブページ番号#0〜#63のサブページに記憶されているデータが、PZIBN#50(=PBA#50)の物理ブロックのサブページ番号#0〜#63のサブページに転送(複写)される。続いて、ホストシステム4から与えられるLBN#1(=LZIBN#1)の論理ブロックのSN#64〜#255のセクタに対応する書換えデータ(書換えデータC)が、PZIBN#50(=PBA#50)の物理ブロックのサブページ番号#64〜#255のサブページに書き込まれる。
In this writing (rewriting) process, first, the data stored in the subpages of
尚、PZIBN#50(=PBA#50)の物理ブロックの冗長領域には、シリアル番号として#3が書き込まれ、ペアブロックシリアル番号として#2が書き込まれる。ここで、PZIBN#50(=PBA#50)の物理ブロックの冗長領域に書き込まれるシリアル番号は、PZIBN#12(=PBA#12)の物理ブロックの冗長領域に書き込まれているシリアル番号をインクリメント(1を加算)した番号になる。又、PZIBN#50(=PBA#50)の物理ブロックの冗長領域に書き込まれるペアブロックシリアル番号は、PZIBN#28(=PBA#28)の物理ブロックの冗長領域に書き込まれているペアブロックシリアル番号をインクリメント(1を加算)した番号になる。又、空きブロック検索テーブル33のPZIBN#50(=PBA#50)の物理ブロックに対応するビットの論理値は、「1」から「0」に書き換えられる。 It should be noted that # 3 is written as the serial number and # 2 is written as the pair block serial number in the redundant area of the physical block of PZIBN # 50 (= PBA # 50). Here, the serial number written in the redundant area of the physical block of PZIBN # 50 (= PBA # 50) is incremented by the serial number written in the redundant area of the physical block of PZIBN # 12 (= PBA # 12) ( 1). The pair block serial number written in the redundant area of the physical block of PZIBN # 50 (= PBA # 50) is the pair block serial number written in the redundant area of the physical block of PZIBN # 28 (= PBA # 28). The number is incremented (added 1). Further, the logical value of the bit corresponding to the physical block of PZIBN # 50 (= PBA # 50) in the empty block search table 33 is rewritten from “1” to “0”.
この書込み(書換え)処理が終了したときにPZIBN#12(=PBA#12)の物理ブロックに記憶されている全てのデータは、PZIBN#50(=PBA#50)の物理ブロックに記憶されているデータで置き換えられているので、アドレス変換テーブル31は更新されるが、ペアブロックテーブル32は更新されない。つまり、この書込み(書換え)処理が終了した後にPZIBN#12(=PBA#12)の物理ブロックに記憶されているデータが消去され、アドレス変換テーブル31のLZIBN#1に対応するPZIBNは#12から#50に書き換えられ、空きブロック検索テーブル33のPZIBN#12(=PBA#12)の物理ブロックに対応するビットの論理値は0から1に書き換えられる。
All data stored in the physical block of PZIBN # 12 (= PBA # 12) when this writing (rewriting) process is completed is stored in the physical block of PZIBN # 50 (= PBA # 50). Since it is replaced with data, the address conversion table 31 is updated, but the pair block table 32 is not updated. That is, after this write (rewrite) process is completed, the data stored in the physical block of PZIBN # 12 (= PBA # 12) is erased, and PZIBN corresponding to
この後、更にホストシステムから書込み(書換え)の指示が与えられた場合、ホストシステム4から与えられる書換えデータが書込まれる物理ブロックの冗長領域には、ペアブロックテーブル32に設定されているペアブロックシリアル番号をインクリメント(1を加算)した番号、つまり、PZIBN#28(=PBA#28)の物理ブロックの冗長領域に書き込まれているペアブロックシリアル番号をインクリメント(1を加算)した番号が書き込まれる。
Thereafter, when a write (rewrite) instruction is given from the host system, the pair block set in the pair block table 32 is set in the redundant area of the physical block in which the rewrite data given from the
以上に説明した実施の形態では、ペアブロックの最大数を2としため、ペアブロックテーブル32に設定される情報(LZIBN、PZIBN及びペアブロックシリアル番号)は1組であったが、ペアブロックの最大数をnとした場合は、ペアブロックテーブル32に設定できる情報をn−1組とすればよい。例えば、ペアブロックの最大数を3とした場合は、図10に示したようにペアブロックテーブル32には2組までの情報が設定される。 In the embodiment described above, since the maximum number of pair blocks is 2, the information (LZIBN, PZIBN and pair block serial number) set in the pair block table 32 is one set. When the number is n, information that can be set in the pair block table 32 may be n-1 sets. For example, when the maximum number of pair blocks is 3, up to two sets of information are set in the pair block table 32 as shown in FIG.
図10に示したようにペアブロックテーブル32に2組の情報が設定されていた場合において、新たなペアブロックの新旧関係が新しい方の物理ブロックの冗長領域には、順番が後のペアブロックシリアル番号をインクリメント(1を加算)した番号が書き込まれる。つまり、図10に示したようにペアブロックテーブル32に設定されているペアブロックシリアル番号が#3と#0の場合には、#0をインクリメント(1を加算)した#1が新たなペアブロックの新旧関係が新しい方の物理ブロックの冗長領域に書き込まれる。 As shown in FIG. 10, when two sets of information are set in the pair block table 32, the pair block serials in the next order are included in the redundant area of the physical block with the newer relationship between the new pair block and the newer one. A number obtained by incrementing the number (adding 1) is written. That is, as shown in FIG. 10, when the pair block serial numbers set in the pair block table 32 are # 3 and # 0, # 1 obtained by incrementing # 0 (adding 1) is the new pair block. Are written in the redundant area of the newer physical block.
又、新たなペアブロックができた場合には、順番が先のペアブロックシリアル番号に対応するペアブロックのペアブロック状態が解消される。つまり、図10に示したようにペアブロックテーブル32に設定されているペアブロックシリアル番号が#3と#0の場合には、LZIBN#7の論理ブロックに対応するペアブロックのペアブロック状態が解消される。
When a new pair block is created, the pair block state of the pair block corresponding to the pair block serial number in the order is canceled. That is, as shown in FIG. 10, when the pair block serial numbers set in the pair block table 32 are # 3 and # 0, the pair block state of the pair block corresponding to the logical block of
以上に説明したように、本発明のメモリコントローラ、メモリコントローラを備えるフラッシュメモリ、並びに、フラッシュメモリの制御方法においては、ペアブロックの組数及びペアブロックの新旧関係(ペアブロック状態になった順番の先後関係)を管理し、ペアブロックの組数が予め設定した最大数に達したときに、一番古いペアブロック(ペアブロック状態になった順番が最先のペアブロック)のペアブロック状態を解消している。従って、ペアブロック間の無駄な記憶データの転送(複写)を減少させるという効果を維持しつつ、ペアブロックの増加に伴う空きブロック数の減少を所定の範囲内に抑えることが可能となる。 As described above, in the memory controller of the present invention, the flash memory including the memory controller, and the flash memory control method, the number of pairs of pairs and the old and new relationships of the pair blocks (the order of the order of the pair blocks) When the number of pair blocks reaches the preset maximum number, the pair block status of the oldest pair block (the pair block status is the earliest pair block) is canceled. is doing. Accordingly, it is possible to suppress the decrease in the number of empty blocks accompanying the increase in the pair blocks within a predetermined range while maintaining the effect of reducing the transfer (copying) of useless storage data between the pair blocks.
尚、本発明のメモリコントローラ、メモリコントローラを備えるフラッシュメモリ、並びに、フラッシュメモリの制御方法は上述した実施の形態に限定されず、特許請求の範囲に記載した範囲で様々の変形や改良が可能である。例えば、ペアブロックシリアル番号、ペアブロックテーブル等は、ペアブロック状態になった順番の先後関係を判別できれば、様々の変形や改良が可能である。 The memory controller of the present invention, the flash memory including the memory controller, and the flash memory control method are not limited to the above-described embodiments, and various modifications and improvements can be made within the scope of the claims. is there. For example, the pair block serial number, the pair block table, and the like can be variously modified and improved as long as the relationship between the order of the pair block state can be determined.
1 フラッシュメモリシステム
2 フラッシュメモリ
3 コントローラ
4 ホストシステム
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインターフェースブロック
11 ECCブロック
12 ROM
13 外部バス
14 内部バス
DESCRIPTION OF
13
Claims (7)
前記指示情報に基づく論理アドレスと、該論理アドレスと対応するデータが記憶されている前記物理ブロックの対応関係を管理するアドレス管理手段と、
前記指示情報に基づく論理アドレスに対応するデータが記憶されている前記物理ブロックが存在するとき、該物理ブロックと異なる物理ブロックに前記指示情報に基づく論理アドレスに対応するデータを書き込む書込み手段と、
前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックからなるペアブロックの対応関係、及び該ペアブロックの組数を管理するペアブロック管理手段と、
前記ペアブロックの組数が所定数に達したときに、ペアブロック状態になった順番が最先の前記ペアブロックのペアブロック状態を解消するペアブロック解消手段と、
を備えることを特徴とするメモリコントローラ。 A memory controller that controls access to a flash memory that performs erasure of stored data in units of physical blocks in accordance with instruction information given from a host system,
Address management means for managing the correspondence between the logical address based on the instruction information and the physical block in which data corresponding to the logical address is stored;
Write means for writing data corresponding to the logical address based on the instruction information to a physical block different from the physical block when there is the physical block storing data corresponding to the logical address based on the instruction information;
A pair block management means for managing the correspondence between the pair blocks consisting of two physical blocks in which data having the same logical address is stored, and the number of pairs of the pair blocks;
When the number of pairs of the pair blocks reaches a predetermined number, a pair block canceling unit that cancels the pair block state of the pair block that is the earliest in the order of the pair block state;
A memory controller comprising:
前記指示情報に基づく論理アドレスと、該論理アドレスと対応するデータが記憶されている前記物理ブロックの対応関係を判別するアドレス判別ステップと、
前記指示情報に基づく論理アドレスに対応するデータが記憶されている前記物理ブロックが存在するとき、該物理ブロックと異なる物理ブロックに前記指示情報に基づく論理アドレスに対応するデータを書き込む書込みステップと、
前記論理アドレスが同一のデータが記憶されている2個の前記物理ブロックからなるペアブロックの対応関係、及び該ペアブロックの組数を管理する情報を保持するペアブロック管理ステップと、
前記ペアブロックの組数が所定数に達したときに、ペアブロック状態になった順番が最先の前記ペアブロックのペアブロック状態を解消するペアブロック解消ステップと、
を有することを特徴とするフラッシュメモリの制御方法。 A flash memory control method for controlling access to a flash memory that performs erasure of stored data in units of physical blocks in accordance with instruction information given from a host system,
An address determination step of determining a correspondence relationship between a logical address based on the instruction information and the physical block in which data corresponding to the logical address is stored;
A writing step of writing data corresponding to the logical address based on the instruction information in a physical block different from the physical block when there is the physical block storing data corresponding to the logical address based on the instruction information;
A pair block management step for holding a correspondence relationship between a pair block composed of two physical blocks in which data having the same logical address is stored, and information for managing the number of pairs of the pair block;
When the number of pairs of the pair blocks reaches a predetermined number, a pair block cancellation step of canceling the pair block state of the earliest pair block in the order of the pair block state,
A method for controlling a flash memory, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006278629A JP4609406B2 (en) | 2006-10-12 | 2006-10-12 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006278629A JP4609406B2 (en) | 2006-10-12 | 2006-10-12 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008097339A true JP2008097339A (en) | 2008-04-24 |
JP4609406B2 JP4609406B2 (en) | 2011-01-12 |
Family
ID=39380117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006278629A Active JP4609406B2 (en) | 2006-10-12 | 2006-10-12 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4609406B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010191782A (en) * | 2009-02-19 | 2010-09-02 | Tdk Corp | Memory controller, flash memory system with the memory controller, and method of controlling flash memory |
US9948809B2 (en) | 2013-02-01 | 2018-04-17 | Canon Kabushiki Kaisha | Image forming apparatus, memory management method for image forming apparatus, and program, using discretely arranged blocks in prioritizing information |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107786299B (en) * | 2016-08-25 | 2021-06-08 | 华为技术有限公司 | Method, device and network system for sending and receiving service |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002366423A (en) * | 2001-06-04 | 2002-12-20 | Samsung Electronics Co Ltd | Method for managing flash memory |
WO2005066972A1 (en) * | 2003-12-30 | 2005-07-21 | Sandisk Corporation | Non-volatile memory and method with block management system |
US20050235097A1 (en) * | 2004-04-19 | 2005-10-20 | Phison Electronics Corp. | [storage controlling and judging method of flash memory] |
JP2007280108A (en) * | 2006-04-07 | 2007-10-25 | Sony Corp | Storage medium controller, storage medium control method, and program |
-
2006
- 2006-10-12 JP JP2006278629A patent/JP4609406B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002366423A (en) * | 2001-06-04 | 2002-12-20 | Samsung Electronics Co Ltd | Method for managing flash memory |
WO2005066972A1 (en) * | 2003-12-30 | 2005-07-21 | Sandisk Corporation | Non-volatile memory and method with block management system |
US20050235097A1 (en) * | 2004-04-19 | 2005-10-20 | Phison Electronics Corp. | [storage controlling and judging method of flash memory] |
JP2007280108A (en) * | 2006-04-07 | 2007-10-25 | Sony Corp | Storage medium controller, storage medium control method, and program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010191782A (en) * | 2009-02-19 | 2010-09-02 | Tdk Corp | Memory controller, flash memory system with the memory controller, and method of controlling flash memory |
US9948809B2 (en) | 2013-02-01 | 2018-04-17 | Canon Kabushiki Kaisha | Image forming apparatus, memory management method for image forming apparatus, and program, using discretely arranged blocks in prioritizing information |
Also Published As
Publication number | Publication date |
---|---|
JP4609406B2 (en) | 2011-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2006018373A (en) | Memory controller, flash memory system and control method for flash memory | |
JP2007034581A (en) | Memory controller, flash memory system and method for controlling flash memory | |
JP4501881B2 (en) | Memory controller and flash memory system | |
JP4609406B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4661497B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4661191B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4153535B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4513786B2 (en) | Memory controller, memory system, and memory control method | |
JP4177292B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM, AND FLASH MEMORY CONTROL METHOD | |
JP3934659B1 (en) | Memory controller and flash memory system | |
JP2005292925A (en) | Memory controller, flash memory system, and control method for flash memory | |
JP4000124B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
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 | |
JP4194518B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4177301B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4235595B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4304167B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4569554B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4539621B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4497124B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4332108B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4254930B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP2005293177A (en) | Memory controller and flash memory system | |
JP4366283B2 (en) | Memory controller and flash memory system including the memory controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100707 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100713 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100826 |
|
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: 20100914 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100927 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131022 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4609406 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |