JP4829202B2 - Storage device and memory control method - Google Patents

Storage device and memory control method Download PDF

Info

Publication number
JP4829202B2
JP4829202B2 JP2007286428A JP2007286428A JP4829202B2 JP 4829202 B2 JP4829202 B2 JP 4829202B2 JP 2007286428 A JP2007286428 A JP 2007286428A JP 2007286428 A JP2007286428 A JP 2007286428A JP 4829202 B2 JP4829202 B2 JP 4829202B2
Authority
JP
Japan
Prior art keywords
data
block
replacement
area
memory control
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.)
Active
Application number
JP2007286428A
Other languages
Japanese (ja)
Other versions
JP2009116465A (en
Inventor
譲 高橋
広昭 福丸
敬 梅原
守 市村
義弘 中野
克裕 小原
芳巳 藤又
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.)
Hitachi Ltd
Hitachi Information and Control Solutions Ltd
Original Assignee
Hitachi Ltd
Hitachi Information and Control Solutions Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Information and Control Solutions Ltd filed Critical Hitachi Ltd
Priority to JP2007286428A priority Critical patent/JP4829202B2/en
Publication of JP2009116465A publication Critical patent/JP2009116465A/en
Application granted granted Critical
Publication of JP4829202B2 publication Critical patent/JP4829202B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、記憶装置及びメモリ制御方法に係り、特に不揮発性の半導体メモリを用いた比較的小規模のデータのライト/リードを行う記憶装置及びその制御方法に関するものである。   The present invention relates to a storage device and a memory control method, and more particularly to a storage device that performs writing / reading of relatively small data using a nonvolatile semiconductor memory and a control method thereof.

一般に、情報機器の補助記憶装置として、従来から磁気ディスク記憶装置が用いられている。この磁気ディスク記憶装置では、データの書込みや読出しの単位をセクタと呼ばれる記憶単位に分割し、磁気円盤上に記憶するものである。   Generally, a magnetic disk storage device has been conventionally used as an auxiliary storage device for information equipment. In this magnetic disk storage device, data writing and reading units are divided into storage units called sectors and stored on a magnetic disk.

この従来型の磁気ディスク記憶装置では、データの書き換えにおいて、基本的に磁気円盤上の同一の記録位置に書き換えが行われるようになっている。また、磁気ディスク記憶装置は、記憶媒体となる磁気円盤を回転させた状態で磁気ヘッドを磁気円盤上の記録位置にアクセスさせることにより記憶している。   In this conventional magnetic disk storage device, data rewriting is basically performed at the same recording position on the magnetic disk. Further, the magnetic disk storage device stores the magnetic head by accessing the recording position on the magnetic disk while rotating the magnetic disk serving as a storage medium.

これに対し、近年、半導体メモリを記憶媒体とする補助記憶装置が脚光を浴びている。特に電気的に消去可能で再書込み可能な不揮発性半導体メモリ(例えば、EEPROM(Electrically Erasable Programmable Read Only Memory)やその一種であるフラッシュメモリ)を用いたものが、情報機器の補助記憶装置の主流となっている。   On the other hand, in recent years, auxiliary storage devices using a semiconductor memory as a storage medium have attracted attention. In particular, the use of electrically erasable and rewritable nonvolatile semiconductor memories (for example, EEPROM (Electrically Erasable Programmable Read Only Memory) or a kind of flash memory) is the mainstream of auxiliary storage devices of information equipment. It has become.

従来、このような不揮発性半導体メモリのメモリ制御方式として、消去単位である物理ブロックの書換え回数をカウントし、一定回数になった場合に予備のブロックに移行する方式が知られている。このメモリ制御方式は、上記ブロック内を更に分割し、各々の領域の書換え回数をカウントし、一定回数になった場合に予備領域に移行する制御を施すものである(特許文献1参照)。   Conventionally, as a memory control method for such a nonvolatile semiconductor memory, a method is known in which the number of times of rewriting a physical block, which is an erasure unit, is counted, and when a predetermined number of times is reached, a transition is made to a spare block. This memory control system further divides the block, counts the number of rewrites in each area, and performs control to shift to a spare area when the number reaches a certain number (see Patent Document 1).

また、フラッシュメモリに接続され、フラッシュメモリに対するホストシステムからのアクセスを制御するメモリコントローラが提案されている。このフラッシュメモリは、複数ページからなる物理ブロックが複数含まれる記憶領域を有し、データの消去が物理ブロック単位で行われるとともに、物理ブロックのデータの消去済の部分にページ単位でデータの書き込みが可能なメモリである。これらのデータの消去あるいは書き込み制御がメモリコントローラによって行われるのである。   A memory controller that is connected to a flash memory and controls access from the host system to the flash memory has been proposed. This flash memory has a storage area containing a plurality of physical blocks consisting of a plurality of pages, and data is erased in units of physical blocks, and data is written in units of pages in the erased portion of the physical blocks. Possible memory. Erase or write control of these data is performed by the memory controller.

また、このフラッシュメモリは、各物理ブロックの複数のページのうちの一部のページを、書き替え前のデータを書き込むためのオリジナルデータ記憶部としている。また、オリジナルデータ記憶部以外のページを、書き替え後のデータを書き込むための更新データ記憶部としており、書き替えデータがホストシステムから与えられたときに、これを更新データ記憶部に書き込むようにしている(特許文献2参照)。
特開2000−20252号公報 特開2007−94571号公報
In addition, in this flash memory, a part of a plurality of pages of each physical block is used as an original data storage unit for writing data before rewriting. In addition, pages other than the original data storage unit are used as update data storage units for writing the rewritten data, and when rewritten data is given from the host system, these are written to the update data storage unit. (See Patent Document 2).
JP 2000-20252 A JP 2007-94571 A

上述した不揮発性メモリの一種であるフラッシュメモリは、電気的に消去可能でかつ再書き込みが可能なPROM(Programmable Read Only Memory)であり、上述したEEPROM(Electrically Erasable PROM)もその一種である。このため、データの書込み単位と消去(書換え)単位が同一ではなく、消去単位の方が極めて大きいという特徴がある。   A flash memory, which is a kind of the above-described nonvolatile memory, is an electrically erasable and rewritable PROM (Programmable Read Only Memory), and the above-mentioned EEPROM (Electrically Erasable PROM) is also a kind thereof. Therefore, the data writing unit and the erasing (rewriting) unit are not the same, and the erasing unit is extremely large.

従って、一度書込んだデータを書換えるためには、他の多くのデータも同時に消去しなければならない。そこで、特許文献1記載の技術のように大容量のデータを取り扱う場合は、消去単位を気にせずに、特定エリアの書換え回数を管理し、その書き換えの頻度が高い場合に交替エリアへ移行するようにする。   Therefore, in order to rewrite data once written, many other data must be erased at the same time. Therefore, when handling a large amount of data as in the technique described in Patent Document 1, the number of times of rewriting in a specific area is managed without worrying about the erasing unit, and when the frequency of rewriting is high, the shift to the replacement area is performed. Like that.

しかし、小容量のデータを取り扱う場合に上記同様の管理を行うと、書換えの度に、書換えするメモリ領域より大きな領域を消去することになる。このため、その都度発生する、消去動作や書き込み位置の特定動作により応答性能が低下するという問題が生じる。また、メモリ装置の許容書換え回数が十分に確保できないという問題も発生する。   However, if the same management is performed when handling a small amount of data, an area larger than the memory area to be rewritten is erased each time rewriting is performed. For this reason, there arises a problem that the response performance deteriorates due to the erasing operation or the write position specifying operation that occurs each time. Further, there arises a problem that the allowable number of rewrites of the memory device cannot be secured sufficiently.

また、特許文献2記載の技術では、書き替えデータの書き込みの際に、オリジナルデータ記憶部のページに対応する更新データ記憶部のページに、書き替えデータを書き込むため、更新データ記憶部のページ数をオリジナルデータ記憶部のページ数と同じだけ用意しなければならないという問題が起こる。   In the technique described in Patent Document 2, when the rewrite data is written, the rewrite data is written into the page of the update data storage unit corresponding to the page of the original data storage unit. There arises a problem that as many as the number of pages in the original data storage section must be prepared.

このため、オリジナルデータ記憶部の特定ページに書き替えが集中した場合、更新のないデータ部分は、書き替えがされないまま、ブロック交替されるため、無駄があるという問題がある。   For this reason, when rewriting concentrates on a specific page in the original data storage unit, there is a problem that a data portion that is not updated is wasted because the block is replaced without being rewritten.

そこで、本発明の目的は、書換えによる応答性能を落とすことなく、半導体メモリの消去回数の制約による影響を小さくし、かつ書換え後の不要な占有領域を低減させることができる記憶装置及びメモリ制御方法を提供することである。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a storage device and a memory control method capable of reducing the influence of restrictions on the number of erasures of a semiconductor memory and reducing an unnecessary occupied area after rewriting without degrading response performance due to rewriting. Is to provide.

上記課題を解決するために、本発明の記憶装置は、記憶領域に対するデータの書き込み及び読み出しの単位より大きな物理ブロックの単位でデータの消去を行う不揮発性半導体メモリと、外部のホストシステムからの指示に従い、半導体メモリに対する読み出し又は書き込みを制御するメモリ制御部とを具備する。   In order to solve the above problems, a storage device according to the present invention includes a nonvolatile semiconductor memory that erases data in units of physical blocks larger than a unit for writing and reading data to and from a storage area, and an instruction from an external host system. And a memory control unit for controlling reading or writing to the semiconductor memory.

ここで、記憶領域は、1又は複数の物理ブロックからなるデータブロックと1又は複数の物理ブロックからなる交替ブロックとから構成されており、データブロックは、データを記憶するデータ領域と、消去済みでデータ領域に記憶したデータの再書き込みが可能な交替領域とから構成されている。そして、交替ブロックは、消去済み領域を有するようにメモリ制御装置によって制御される。   Here, the storage area is composed of a data block composed of one or a plurality of physical blocks and a replacement block composed of one or a plurality of physical blocks. The data block includes a data area for storing data and an erased block. It consists of a replacement area where data stored in the data area can be rewritten. The replacement block is controlled by the memory control device so as to have an erased area.

ここで、交替ブロックは、データブロックのうちの有効データを消去済み領域に書き込み可能に制御される。
また、交替ブロックに有効データが書き込まれた後に、データブロックは、交替ブロックの候補となるようにデータ領域と交替領域とを消去済み領域とするように制御される。
Here, the replacement block is controlled so that valid data in the data block can be written to the erased area.
Further, after valid data is written in the replacement block, the data block is controlled so that the data area and the replacement area are erased areas so that they become candidates for the replacement block.

本発明によれば、使用する半導体メモリがデータの書き込み、読み出しの単位に比べ、より大きな物理ブロックの単位でデータの消去を行う場合であっても、書込み毎に半導体メモリの消去を行う必要がなくなるため、書込み時の応答性能を飛躍的に向上させることができる。   According to the present invention, even if the semiconductor memory to be used erases data in units of physical blocks larger than the unit of data writing and reading, it is necessary to erase the semiconductor memory for each writing. Therefore, the response performance at the time of writing can be drastically improved.

また、半導体メモリの消去が書き込み毎に発生しないため、半導体メモリの消去回数の制約を緩和することができる。
また、書込み毎に“リード・モディファイ・ライト”をしないため、応答性能を向上できる。また、オリジナルデータ毎に更新データを対応付けしていないため、全体的なメモリ容量の使用性を向上できる。
In addition, since the erasure of the semiconductor memory does not occur every writing, the restriction on the number of erasures of the semiconductor memory can be relaxed.
Further, since “read-modify-write” is not performed for each writing, the response performance can be improved. In addition, since the update data is not associated with each original data, the usability of the overall memory capacity can be improved.

以下、本発明の実施の形態例を図1〜図11を用いて説明する。
図1は本発明の実施の形態を実現するためのハードウェア構成例を示す図である。
最初に図1に基づいて本実施例のハードウェア構成について説明する。
Hereinafter, embodiments of the present invention will be described with reference to FIGS.
FIG. 1 is a diagram showing an example of a hardware configuration for realizing an embodiment of the present invention.
First, the hardware configuration of this embodiment will be described with reference to FIG.

図1に示す記憶装置6は、ホスト装置3とデータバス4を介してアクセス可能に接続される。
記憶装置6は、メモリ制御部1と半導体メモリ2とから構成される。メモリ制御部1は、マイクロプロセッサ11と、メモリI/F(インターフェース)制御部12と、ホストI/F制御部13と、メモリ14とを有している。
The storage device 6 shown in FIG. 1 is connected to the host device 3 via the data bus 4 so as to be accessible.
The storage device 6 includes a memory control unit 1 and a semiconductor memory 2. The memory control unit 1 includes a microprocessor 11, a memory I / F (interface) control unit 12, a host I / F control unit 13, and a memory 14.

マイクロプロセッサ11は、半導体メモリ2内に、記憶装置6の物理的記憶領域に対応する論理的記憶領域を構築すると共に、この論理的記憶領域へのデータの書き込み及び読み出しを制御する。   The microprocessor 11 constructs a logical storage area corresponding to the physical storage area of the storage device 6 in the semiconductor memory 2 and controls writing and reading of data to and from this logical storage area.

メモリI/F制御部12は、マイクロプロセッサ11からの指示により半導体メモリ2とのアクセス制御を行う。なお、マイクロプロセッサ11から半導体メモリ2を直接制御可能であれば、メモリI/F制御部12は必ずしも必要ではない。   The memory I / F control unit 12 performs access control with the semiconductor memory 2 according to an instruction from the microprocessor 11. Note that the memory I / F control unit 12 is not necessarily required if the microprocessor 11 can directly control the semiconductor memory 2.

ホストI/F制御部13は、ホスト装置3からのデータの書き込み及び読み出し要求に従って、ホスト装置3とのデータの送受を制御する。ホスト装置3からのデータの書き込み及び読み出し要求は、半導体メモリ2内に構築された論理的記憶領域に対して行われるものである。   The host I / F control unit 13 controls data transmission / reception with the host device 3 in accordance with data write / read requests from the host device 3. Data write and read requests from the host device 3 are made to a logical storage area constructed in the semiconductor memory 2.

メモリ14は、論理/物理変換テーブル141と、次回書込みページ管理テーブル142と、交替ブロックリストテーブル143と、消去回数管理テーブル144と、消去候補管理テーブル145とを有している。
本発明の実施の形態においては、メモリの種類については言及しないが、SRAM(Static Random Access Memory)やDRAM(Dynamic RAM)又はMRAM(Magneto-resistive RAM)等のメモリ素子を使用することができる。
The memory 14 has a logical / physical conversion table 141, a next write page management table 142, a replacement block list table 143, an erase count management table 144, and an erase candidate management table 145.
In the embodiment of the present invention, a memory element such as SRAM (Static Random Access Memory), DRAM (Dynamic RAM), or MRAM (Magneto-resistive RAM) can be used, although the type of memory is not mentioned.

本実施の形態例では、説明に必要な各種テーブルの構成のみを記載する。テーブルの内容は、記憶装置6自体の初期化時にマイクロプロセッサ11が設定するものとする。また、各テーブルの更新方法の詳細については、ここでは言及しない。   In the present embodiment, only the configuration of various tables necessary for explanation is described. The contents of the table are set by the microprocessor 11 when the storage device 6 itself is initialized. Further, details of the updating method of each table are not mentioned here.

メモリ14中の論理/物理変換テーブル141は、ホスト装置3からのアクセスによって示される論理アドレスと半導体メモリ2上の物理アドレスとの対応付けを行うテーブルである。   The logical / physical conversion table 141 in the memory 14 is a table that associates a logical address indicated by an access from the host device 3 with a physical address on the semiconductor memory 2.

ここで、図2以降の説明に入る前に、図7〜図11に基づいて、上述した図1のメモリ14中のテーブル構成について説明しておく。
図7は、論理/物理変換テーブル141の構成例を示した図である。図7Aは初期状態、図7Bはページ書き換え後、図7Cはブロック交替後の状態を示している。
論理/物理変換テーブル141は、ホスト装置3からのアクセスにて示される論理アドレス1410と半導体メモリ2上のブロック番号とページ番号からなる物理アドレス1411で構成される。
Here, before entering the description of FIG. 2 and subsequent figures, the table configuration in the memory 14 of FIG. 1 described above will be described based on FIGS.
FIG. 7 is a diagram illustrating a configuration example of the logical / physical conversion table 141. 7A shows an initial state, FIG. 7B shows a state after page rewriting, and FIG. 7C shows a state after block replacement.
The logical / physical conversion table 141 includes a logical address 1410 indicated by an access from the host device 3 and a physical address 1411 including a block number and a page number on the semiconductor memory 2.

なお、ブロック番号とページ番号の他にチップ番号を追加することで半導体メモリ2が複数ある場合にも、図7に示す論理/物理変換テーブル141の構成を容易に拡張することができる。   Note that the configuration of the logical / physical conversion table 141 shown in FIG. 7 can be easily expanded even when there are a plurality of semiconductor memories 2 by adding a chip number in addition to a block number and a page number.

図7に示す物理アドレス1411は、後述する動作によって物理アドレス1411の値が変わり、例えば図7Aに示す初期状態や、図7Bに示すページ書換え後や、図7Cに示すブロック交替後のような状態に移り変わる。   The physical address 1411 shown in FIG. 7 changes in the value of the physical address 1411 by an operation described later. For example, the initial state shown in FIG. 7A, the state after page rewriting shown in FIG. 7B, or the state after block replacement shown in FIG. Change to.

次回書込みページ管理テーブル142は、各ブロックの次に書込むページの先頭アドレスを格納するテーブルである。図8に次回書込みページ管理テーブル142の構成例を示す。図8Aは初期状態、図8Bはページ書き換え後、図8Cはブロック交替後である。   The next write page management table 142 is a table for storing the top address of the page to be written next to each block. FIG. 8 shows a configuration example of the next write page management table 142. 8A shows the initial state, FIG. 8B shows the page after rewriting, and FIG. 8C shows the block replacement.

次回書込みページ管理テーブル142は、各ブロックの番号を示すブロック番号1420と各々の次回書込むべきページを示す次回書込みページ1421で構成されている。次回書込みページ管理テーブル142は、例えば図8Aに示す初期状態や、図8Bに示すページ書換え後や、図8Cに示すブロック交替後のような状態に移り変わる。   The next write page management table 142 includes a block number 1420 indicating the number of each block and a next write page 1421 indicating each page to be written next time. For example, the next write page management table 142 changes to an initial state shown in FIG. 8A, a state after page rewriting shown in FIG. 8B, or a block change shown in FIG. 8C.

交替ブロックリストテーブル143は、図3に示した交替ブロック23中の次に使用するブロックを並べたテーブルである。図9に交替ブロックリストテーブル143の構成例を示す。図9Aは初期状態、図9Bはブロック交替後である。
交替ブロックリストテーブル143は使用可能な交替ブロックの番号が使用する順番に並んでおり、交替ブロックが使用されると、例えば図9Aに示す初期状態から図9Bに示すブロック交替後のような状態に移り変わる。
The replacement block list table 143 is a table in which blocks to be used next in the replacement block 23 shown in FIG. 3 are arranged. FIG. 9 shows a configuration example of the replacement block list table 143. FIG. 9A shows an initial state, and FIG. 9B shows after block replacement.
The replacement block list table 143 is arranged in the order in which the numbers of usable replacement blocks are used, and when the replacement block is used, for example, the state is changed from the initial state shown in FIG. 9A to the state after the block replacement shown in FIG. 9B. Change.

消去回数管理テーブル144は、各ブロックの消去回数を保持するテーブルである。図10に消去回数管理テーブル144の構成例を示す。図10Aは初期状態、図10Bはブロック交替処理後である。
消去管理テーブル144は各ブロックのブロック番号1440と対応するブロックの消去回数1441から構成される。各ブロックに存在しているデータの消去が行われると、例えば、図10Aに示す初期状態から図10Bに示す交替処理後のような状態に移り変わる。
The erase count management table 144 is a table that holds the erase count of each block. FIG. 10 shows a configuration example of the erase count management table 144. FIG. 10A shows an initial state, and FIG. 10B shows after block replacement processing.
The erasure management table 144 is composed of the block number 1440 of each block and the erase count 1441 of the corresponding block. When the data existing in each block is erased, for example, the initial state shown in FIG. 10A changes to the state after the replacement process shown in FIG. 10B.

消去候補管理テーブル145は、消去待ちブロックのブロック番号を消去順に並べたテーブルである。図11に消去候補管理テーブル145の構成例を示す。図11Aは初期状態(一度も消去されていない状態)、図11Bはブロック交替処理後である。
消去候補管理テーブル145は、ブロックの消去がなされると、図11Aに示す初期状態から図11Bに示すブロック交替処理後の状態に移り変わる。
The erase candidate management table 145 is a table in which block numbers of blocks to be erased are arranged in the order of erase. FIG. 11 shows a configuration example of the deletion candidate management table 145. FIG. 11A shows an initial state (a state that has never been erased), and FIG. 11B shows a state after block replacement processing.
When a block is erased, the erase candidate management table 145 changes from the initial state shown in FIG. 11A to the state after the block replacement process shown in FIG. 11B.

以上、図1のメモリ14の中の各テーブルの構成である。なお、図1中の半導体メモリ2は、説明の簡単化のため1個の半導体メモリ2しか記載していないが、上述のように記憶装置6の論理的記憶領域に対応して、半導体メモリ2の物理的記憶領域を管理することにより、複数個の半導体メモリを接続して使用できることはいうまでもない。   The above is the configuration of each table in the memory 14 of FIG. 1 shows only one semiconductor memory 2 for simplification of explanation, the semiconductor memory 2 corresponds to the logical storage area of the storage device 6 as described above. It goes without saying that a plurality of semiconductor memories can be connected and used by managing the physical storage area.

図2は、本発明の実施の形態で前提とする半導体メモリ2の内部構成を示した図である。図2では、半導体メモリ2内に構築されている論理的記憶領域を示している。図1に示したホスト装置3からは、記憶装置6に対しては、この論理的記憶領域のみが認識されることになる。   FIG. 2 is a diagram showing an internal configuration of the semiconductor memory 2 premised on the embodiment of the present invention. FIG. 2 shows a logical storage area constructed in the semiconductor memory 2. The host device 3 shown in FIG. 1 recognizes only this logical storage area for the storage device 6.

図中の番号21はデータ消去の最小単位を示し、これをブロックと呼ぶ。同様に番号211はデータ読み出し及び書き込みの最小単位を示し、これをページと呼ぶこととする。図2においては、半導体メモリ2の論理的記憶領域は、一つ以上のブロック21で構成されており、ブロック21は一つ以上のページ211により構成されている。すなわち、半導体メモリ2の論理的記憶領域は、ブロック1からブロックm(整数)までのm個の各ブロック21を有し、それぞれのブロックは、ページ1からページn(整数)までのn個のページを有している。   The number 21 in the figure indicates the minimum unit of data erasure, which is called a block. Similarly, the number 211 indicates the minimum unit of data reading and writing, and this is called a page. In FIG. 2, the logical storage area of the semiconductor memory 2 is composed of one or more blocks 21, and the block 21 is composed of one or more pages 211. That is, the logical storage area of the semiconductor memory 2 has m blocks 21 from block 1 to block m (integer), and each block includes n blocks from page 1 to page n (integer). Has a page.

上述したように、ホスト装置3は、データバス4を介して、記憶装置6との間でデータのやり取りを行っているが、ここで、データバス4としては、例えばSCSI(Small Computer System Interface)やATA(Advanced Technology Attachment)などが用いられる。しかし、本発明の実施の形態例では、これらのデータバスに限定されるものではなく、他のデータバスによって代用できることは勿論である。
また、半導体メモリ2とメモリ制御部1とのデータのやり取りは、データバス5によって行われる。記憶装置6はホスト装置3からの指示に基づいてデータの記憶を行う装置である。
As described above, the host device 3 exchanges data with the storage device 6 via the data bus 4. Here, the data bus 4 is, for example, a SCSI (Small Computer System Interface). Or ATA (Advanced Technology Attachment) is used. However, the embodiment of the present invention is not limited to these data buses, and other data buses can be used as a matter of course.
Data exchange between the semiconductor memory 2 and the memory control unit 1 is performed by the data bus 5. The storage device 6 is a device that stores data based on an instruction from the host device 3.

次に、本発明の実施の形態の特徴であるメモリ制御方式を実現するためのメモリの使用態様を、図3に基づいて説明する。
図3は、本発明の実施の形態の特徴であるメモリ制御方式を実現するためのメモリの使用態様を示す図であり、メモリ制御部1の制御により半導体メモリ2内に構築される論理的記憶領域を示している。
Next, the use mode of the memory for realizing the memory control system which is a feature of the embodiment of the present invention will be described with reference to FIG.
FIG. 3 is a diagram showing how the memory is used to realize the memory control system that is a feature of the embodiment of the present invention. The logical storage constructed in the semiconductor memory 2 under the control of the memory control unit 1 Indicates the area.

図の番号2はメモリチップ全体の論理的記憶領域を示しており、その中部構造は、データブロック22と交替ブロック23から構成されている。
データブロック22は、データを記憶する一つあるいは複数のブロックからなるブロックであり、ブロック1からブロックp(整数)までの論理ブロックを有している。各ブロックは、図示のようにデータページ222と交替ページ223で構成されている。
Reference numeral 2 in the figure indicates a logical storage area of the entire memory chip, and its central structure is composed of a data block 22 and a replacement block 23.
The data block 22 is a block composed of one or a plurality of blocks for storing data, and has logical blocks from a block 1 to a block p (integer). Each block includes a data page 222 and a replacement page 223 as shown in the figure.

データページ222は、ページ1からページq(整数)までのデータを保持するページを有していて、交替ページ223は、ページ(q+1)からページn(整数)までを有している。この交替ページ223は、消去済みの再書込み可能なページである。   The data page 222 has pages that hold data from page 1 to page q (integer), and the replacement page 223 has pages (q + 1) to page n (integer). The replacement page 223 is an erased rewritable page.

また、交替ブロック23は、ブロック(p+1)からブロックm(整数)までの消去済みの交替用のブロックであり、各ブロックは、ページ1からページn(整数)までの消去済みページ232で構成されている。   The replacement block 23 is an erased replacement block from the block (p + 1) to the block m (integer), and each block includes erased pages 232 from page 1 to page n (integer). ing.

ここで、データページ222は、ユーザがホスト装置からの指示に従いデータを読み書きすることができる領域である。このデータページ222には、半導体メモリ2の制約上から上書きができないため、メモリ制御部1の制御による上書き処理後の上書きデータは交替ページ223に記憶される。   Here, the data page 222 is an area where the user can read and write data in accordance with an instruction from the host device. Since the data page 222 cannot be overwritten due to restrictions of the semiconductor memory 2, the overwritten data after the overwriting process under the control of the memory control unit 1 is stored in the replacement page 223.

そして、交替ページ223に記憶できないときは、新たに交替ブロック23を割り当て書き込みをする。このとき、上書き処理後の有効部分である、交替ページ223の上書きデータ及びデータページ222の非上書きデータを交替ブロック23に書き写して交替させる。さらに、交替後の交替ページ223及びデータページ222はデータ消去して交替ブロック23の候補とする。   If the replacement page 223 cannot be stored, a replacement block 23 is newly allocated and written. At this time, the overwritten data of the replacement page 223 and the non-overwritten data of the data page 222, which are valid portions after the overwriting process, are copied and replaced in the replacement block 23. Further, the replacement page 223 and the data page 222 after replacement are erased to be candidates for the replacement block 23.

図3中のブロックp及びページqは、本実施の形態例では記憶装置6の製造時に初期値として設定するものである。このブロックpとページqの設定方法については、特に限定しないが、メモリ上に予め設定しておくことや、マイクロプロセッサ11へデバッガを接続して行うようにしてもよい。   Block p and page q in FIG. 3 are set as initial values when the storage device 6 is manufactured in this embodiment. The setting method of the block p and the page q is not particularly limited, but may be set in advance on a memory or connected to a microprocessor 11 with a debugger.

また、ホスト装置3から予め決められたコマンドを発行して設定する等で実現可能である。また、ブロックp、ページqを可変としてテーブル管理することも可能であるが、本実施の形態例では簡単化のために固定値として扱う。   Further, it can be realized by issuing and setting a predetermined command from the host device 3. Further, it is possible to manage the table by making the block p and the page q variable, but in this embodiment, they are handled as fixed values for the sake of simplicity.

以上を踏まえ、図4〜図6のフローチャートに基づいて、本実施の形態例の動作について説明する。
図4〜図6に示したフローチャートでは、本発明の実施の形態の特徴である、書込み処理とそれに関連したブロック交替処理、及びブロック消去処理の手順を示している。
まず、ホスト装置3からデータの書込み要求があった場合の処理について、図4、図5を用いて説明する。
Based on the above, the operation of the present embodiment will be described based on the flowcharts of FIGS.
The flowcharts shown in FIG. 4 to FIG. 6 show the procedure of the write process and the related block replacement process and block erase process, which are the features of the embodiment of the present invention.
First, processing when a data write request is received from the host apparatus 3 will be described with reference to FIGS.

[書込み処理]
図4のフローチャートは、マイクロプロセッサ11の半導体メモリ2への書込み処理のフローチャートである。以下その処理の流れを説明する。
まず、マイクロプロセッサ11は、ホストI/F制御部13を介して、ホスト装置3から論理アドレス、データ、データサイズを受信する(ステップS700)。
[Write processing]
The flowchart of FIG. 4 is a flowchart of the writing process to the semiconductor memory 2 of the microprocessor 11. The processing flow will be described below.
First, the microprocessor 11 receives a logical address, data, and data size from the host device 3 via the host I / F control unit 13 (step S700).

次に、マイクロプロセッサ11は、書込み対象となる半導体メモリ2の物理アドレスを確認するために、図7に示す論理/物理変換テーブル141を参照し、論理アドレス1410から該当するブロック番号を示す物理アドレス1411を特定する(ステップS701)。   Next, the microprocessor 11 refers to the logical / physical conversion table 141 shown in FIG. 7 in order to confirm the physical address of the semiconductor memory 2 to be written, and the physical address indicating the corresponding block number from the logical address 1410. 1411 is specified (step S701).

例えば、論理/物理変換テーブル141の状態が図7Aの初期状態のときにホスト装置3からの論理アドレス1410が1であった場合、ブロック番号は141のブロック1となる。   For example, if the logical address 1410 from the host device 3 is 1 when the state of the logical / physical conversion table 141 is the initial state of FIG. 7A, the block number is block 1 of 141.

次に、マイクロプロセッサ11は、特定したブロック内のどこのページに書込めば良いかを確認するために、図8に示す次回書込みページ管理テーブル142を参照し、先頭の次回書込みページ1421を特定する(ステップS702)。
例えば、次回書込みページ管理テーブル142が図8Aに示す初期状態であったとき、ステップS701にてブロック1を特定した場合、1421の次回書込みページはq+1となる。
Next, the microprocessor 11 refers to the next write page management table 142 shown in FIG. 8 and identifies the first next write page 1421 in order to confirm which page in the identified block should be written. (Step S702).
For example, when the next write page management table 142 is in the initial state shown in FIG. 8A, if block 1 is specified in step S701, the next write page 1421 is q + 1.

次に、マイクロプロセッサ11は、特定したブロック内の交替ページの空き容量が十分であるかを確認するために、特定した先頭の次回書込みページと書込むデータの必要ページ数の和と、最大ページ数nを比較する(ステップS703)。   Next, in order to confirm whether the spare page in the specified block has sufficient free space, the microprocessor 11 adds the specified next next page to be written and the required number of pages of data to be written and the maximum page. The numbers n are compared (step S703).

ステップS703で比較した結果、特定した先頭の次回書込みページと書込むデータの必要ページ数の和が最大ページ数nより小さいか、又は等しい場合、マイクロプロセッサ11は、重複書込み防止のために先ず、次回書込みページ管理テーブル142の値を、書込むページ数を加算した値へ更新する(ステップS704)。   As a result of the comparison in step S703, when the sum of the specified next next write page and the required number of pages of data to be written is smaller than or equal to the maximum page number n, the microprocessor 11 firstly prevents duplication in writing. The value of the next page management table 142 is updated to a value obtained by adding the number of pages to be written (step S704).

例えば、ステップS702で特定した次回書込みページがq+1であり、書込むデータの必要ページ数が1ページであれば、和はq+2となる。このq+2の値を図8Bのページ書換え後の1422のように書き換える。   For example, if the next writing page specified in step S702 is q + 1 and the required number of pages of data to be written is one page, the sum is q + 2. The value of q + 2 is rewritten as 1422 after the page rewriting in FIG. 8B.

次に、マイクロプロセッサ11は、交替ページ223の中のステップS702にて特定した次回書込みページにデータを書込む(ステップS705)。
次に、マイクロプロセッサ11は、書込み後の物理アドレスとの関連付けのために、論理/物理変換テーブル141を書込み完了した物理アドレスへ更新する(ステップS706)。
Next, the microprocessor 11 writes data in the next write page specified in step S702 in the replacement page 223 (step S705).
Next, the microprocessor 11 updates the logical / physical conversion table 141 to the physical address for which writing has been completed for association with the physical address after writing (step S706).

例えば、ステップS702にて特定した次回書込みページがq+1であれば、図7Bのページ書換え後の1412に示すように書き換える。
次に、マイクロプロセッサ11は、ホストI/F制御部13を介して、ホスト装置3に書込み終了を報告する(ステップS707)。
For example, if the next writing page specified in step S702 is q + 1, the page is rewritten as shown in 1412 after page rewriting in FIG. 7B.
Next, the microprocessor 11 reports the end of writing to the host device 3 via the host I / F control unit 13 (step S707).

なお、ステップS703で比較した結果、特定した先頭の次回書込みページと書込むデータの必要ページ数の和が最大ページ数nより大きい場合、マイクロプロセッサ11は、ブロック交替処理を実行し(ステップS710)、ホスト装置3に書込み終了を報告する(ステップS707)。   Note that, as a result of the comparison in step S703, if the sum of the specified next next page to be written and the required number of pages of data to be written is larger than the maximum page number n, the microprocessor 11 executes block replacement processing (step S710). Then, the end of writing is reported to the host device 3 (step S707).

[ブロック交替処理]
次に、上述した図4に示すステップ710のブロック交替処理について、図5のフローチャートを用いて説明する。
まず、マイクロプロセッサ11は、交替元ブロックの有効なデータを交替先のブロックへコピーするために、論理/物理変換テーブル141を参照して、該当する物理アドレスから該当のブロックに関連付けられた全ページのデータを読み出す(ステップS711)。
[Block replacement process]
Next, the block replacement process at step 710 shown in FIG. 4 will be described with reference to the flowchart of FIG.
First, the microprocessor 11 refers to the logical / physical conversion table 141 in order to copy the valid data of the replacement source block to the replacement block, and all pages associated with the corresponding block from the corresponding physical address. Is read (step S711).

例えば、ブロック1を交替しなければならないのであれば、論理/物理変換テーブル141の状態が図7Bのページ書換え後の状態のときは、物理アドレス1411のブロック1に関連付けされている全ページのデータを読み出す。   For example, if block 1 must be replaced, if the state of logical / physical conversion table 141 is the state after page rewriting in FIG. 7B, the data of all pages associated with block 1 of physical address 1411 Is read.

次に、マイクロプロセッサ11は、読み出したデータに対して、図4内ステップS700の処理において受信したデータに該当するページのデータを更新する(ステップS712)。
次に、マイクロプロセッサ11は、交替先のブロックを確認するために、交替ブロックリストテーブル143を参照し、交替ブロック23の中の一つのブロックを特定する。
Next, the microprocessor 11 updates the data of the page corresponding to the data received in the process of step S700 in FIG. 4 with respect to the read data (step S712).
Next, the microprocessor 11 refers to the replacement block list table 143 to identify one block in the replacement block 23 in order to confirm the replacement block.

特定したブロックを重複して使用しないようにするために、交替ブロックリストテーブル143の内容はひとつ更新する(ステップS713)。
例えば、交替ブロックリストテーブル143の状態が図9Aの初期状態であれば、ブロックp+1を特定し、図9Bのブロック交替後の1431に示す状態に更新する。
In order not to use the identified block redundantly, the content of the replacement block list table 143 is updated by one (step S713).
For example, if the state of the replacement block list table 143 is the initial state of FIG. 9A, the block p + 1 is identified and updated to the state indicated by 1431 after the block replacement of FIG. 9B.

ここで、マイクロプロセッサ11は、特定したブロック内のどこのページに書込めば良いかを確認するために、書込みページ管理テーブル142を参照し、特定したブロックの次回書込みページを特定する(ステップS714)。   Here, the microprocessor 11 refers to the write page management table 142 to identify the page to be written in the identified block, and identifies the next write page of the identified block (step S714). ).

例えば、ステップS713にてブロックp+1と特定したとき、書込みページ管理テーブル142が図8Bのページ書換え後であるならば、次回書込みページは1となる。なお、ブロック交替の場合、交替先ブロックは消去後の状態のため無条件でページ1から書込むことも可能である。   For example, when the block p + 1 is specified in step S713, if the write page management table 142 is after the page rewrite in FIG. 8B, the next write page is 1. In the case of block replacement, since the replacement block is in the state after erasure, it is possible to write from page 1 unconditionally.

次に、マイクロプロセッサ11は、特定した交替先ブロックの次回書込みページからデータを書込む(ステップS715)。
ステップS715でデータ書込みが終了したら、マイクロプロセッサ11は、次回書込みページ管理テーブル142の内容に書込み完了したページ数を加算することで、テーブルを更新する(ステップS716)。
Next, the microprocessor 11 writes data from the next write page of the specified replacement block (step S715).
When the data writing is completed in step S715, the microprocessor 11 updates the table by adding the number of pages for which writing has been completed to the contents of the next writing page management table 142 (step S716).

例えば、次回書込みページ管理テーブル142の状態が図8Bのページ書換え後に示す状態であれば、テーブル更新後は図8Cのブロック交替後の1423に示すような状態となる。   For example, if the next write page management table 142 is in the state shown after page rewriting in FIG. 8B, the table is updated as shown in 1423 after block replacement in FIG. 8C.

次に、マイクロプロセッサ11は、書込み後の物理アドレスとの関連付けのために、論理/物理変換テーブル141の該当する論理アドレス1410の物理アドレス1411を更新する(ステップS717)。   Next, the microprocessor 11 updates the physical address 1411 of the corresponding logical address 1410 in the logical / physical conversion table 141 for association with the physical address after writing (step S717).

例えば、論理/物理変換テーブル141の状態が図7Bのページ書換え後であれば、テーブルを更新後は図7Cのブロック交替後の1413に示すような状態となる。ここでは、ブロック交替後のp+1は、元のページの順番に並べ替えられている。   For example, if the state of the logical / physical conversion table 141 is after page rewriting in FIG. 7B, after updating the table, the state becomes as shown at 1413 after block replacement in FIG. 7C. Here, p + 1 after block replacement is rearranged in the order of the original page.

次に、マイクロプロセッサ11は、交替元のブロックを再度使用可能とするために、消去候補管理テーブル145に交替元のブロックを追加する(ステップS718)。例えば、消去候補管理テーブル145が図11Aの初期状態であれば、図11Bのブロック交替処理後の1451のようにブロック1を追加する。   Next, the microprocessor 11 adds the replacement source block to the erasure candidate management table 145 so that the replacement source block can be used again (step S718). For example, if the erasure candidate management table 145 is in the initial state of FIG. 11A, block 1 is added as 1451 after the block replacement process of FIG. 11B.

[読出し処理]
ホスト装置3からデータの読出し要求に対しては、処理数が少ないので、フローチャートなしで、以下に文章で示す。
まず、マイクロプロセッサ11は、ホストI/F制御部13を介して、ホスト装置3から論理アドレス、データサイズを受信する。
[Reading process]
In response to a data read request from the host device 3, since the number of processes is small, it is shown in the following text without a flowchart.
First, the microprocessor 11 receives a logical address and a data size from the host device 3 via the host I / F control unit 13.

そして、マイクロプロセッサ11は、読み出す物理アドレスを特定するために、論理/物理変換テーブル141を参照し、ホスト装置3から指定された論理アドレス1410から物理アドレス1411を特定する。   The microprocessor 11 then refers to the logical / physical conversion table 141 to identify the physical address to be read, and identifies the physical address 1411 from the logical address 1410 designated by the host device 3.

次に、マイクロプロセッサ11は、該当するページのデータをメモリI/F制御部12を介して読出し、ホストI/F制御部13を介してホスト装置3に読み出したデータを送信する。以上のステップを経て、読出し処理が実現される。   Next, the microprocessor 11 reads the data of the corresponding page via the memory I / F control unit 12 and transmits the read data to the host device 3 via the host I / F control unit 13. The reading process is realized through the above steps.

[消去処理]
次に、図6のフローチャートに基づいて、ブロック消去処理の流れを説明する。
マイクロプロセッサ11は、ホスト装置3からデータの書込みや読出しの要求が無いときに、消去候補管理テーブル145に関連付けされているブロックの消去処理を実施する。
[Erase processing]
Next, the flow of block erase processing will be described based on the flowchart of FIG.
When there is no data write or read request from the host device 3, the microprocessor 11 performs an erase process on the block associated with the erase candidate management table 145.

まず、マイクロプロセッサ11は、消去候補管理テーブル145を参照し、消去対象となるブロックがあるか否かを判定する(ステップS800)。
ステップS800で判定した結果、消去対象となるブロックがない場合は処理を終了する。
消去対象となるブロックがある場合は、マイクロプロセッサ11は、消去回数管理テーブル144に対し、当該ブロックの消去回数を一つ加算する(ステップS801)。
First, the microprocessor 11 refers to the erasure candidate management table 145 and determines whether there is a block to be erased (step S800).
If it is determined in step S800 that there is no block to be erased, the process is terminated.
If there is a block to be erased, the microprocessor 11 adds one erase count of the block to the erase count management table 144 (step S801).

例えば、マイクロプロセッサ11は、ステップS800にて消去候補管理テーブル145を参照したとき図11Bのブロック交替処理後の状態であれば、1451にて示されるブロック1を特定する。消去回数管理テーブル144の状態が図10Aの初期状態であれば、図10Bの交替処理後の1442のようにブロック1の消去回数を1とする。   For example, when referring to the erasure candidate management table 145 in step S800, the microprocessor 11 specifies the block 1 indicated by 1451 if it is in the state after the block replacement process of FIG. 11B. If the erase count management table 144 is in the initial state of FIG. 10A, the erase count of block 1 is set to 1 as in 1442 after the replacement process in FIG. 10B.

次に、マイクロプロセッサ11は、当該ブロックのデータを消去する(ステップS802)。
次に、マイクロプロセッサ11は、消去候補管理テーブル145にある、消去済みブロックの情報を削除し、テーブルを更新する(ステップS803)。
Next, the microprocessor 11 erases the data in the block (step S802).
Next, the microprocessor 11 deletes the erased block information in the erase candidate management table 145 and updates the table (step S803).

例えば、マイクロプロセッサ11は、消去候補管理テーブル145が図11のBブロック交替処理後であれば、図11Aの初期状態のように更新する。
次に、マイクロプロセッサ11は、同図内ステップS800の判定処理に戻り、消去候補管理テーブル145の該当するブロックが無くなるまで処理を続ける。
For example, if the erasure candidate management table 145 is after the B block replacement process in FIG. 11, the microprocessor 11 updates it as in the initial state in FIG. 11A.
Next, the microprocessor 11 returns to the determination process in step S800 in the figure, and continues the process until there is no corresponding block in the erasure candidate management table 145.

なお、本発明は、上述した実施の形態例に限らず、特許請求の範囲に記載した本発明の要旨を逸脱しない限りにおいて、上述の実施形態例を適宜変更して用いることができることはいうまでもない。   It should be noted that the present invention is not limited to the above-described embodiment example, and can be used by appropriately modifying the above-described embodiment example without departing from the gist of the present invention described in the claims. Nor.

本発明は、計算機システムに接続した記憶装置に係るものであり、産業上の利用可能性があることは明らかである。   It is obvious that the present invention relates to a storage device connected to a computer system and has industrial applicability.

本発明の実施の形態を実現するためのハードウェア構成例を示す説明図である。It is explanatory drawing which shows the hardware structural example for implement | achieving embodiment of this invention. 半導体メモリの内部構成図である。It is an internal block diagram of a semiconductor memory. メモリ制御方式を実現するためのメモリの使用態様を示す図である。It is a figure which shows the usage condition of the memory for implement | achieving a memory control system. 書込み処理のフローチャートである。It is a flowchart of a writing process. ブロック交替処理のフローチャートである。It is a flowchart of a block replacement process. ブロック消去処理のフローチャートである。It is a flowchart of a block erase process. 論理/物理変換テーブルの構成例を示す図であり、図7Aは初期状態、図7Bはページ書き換え後、図7Cはブロック交替後である。FIG. 7A is a diagram showing a configuration example of a logical / physical conversion table, FIG. 7A is in an initial state, FIG. 7B is after page rewriting, and FIG. 7C is after block replacement. 次回書込みページ管理テーブルの構成例を示す図であり、図8Aは初期状態、図8Bはページ書き換え後、図8Cはブロック交替後である。8A and 8B are diagrams illustrating a configuration example of a next write page management table, in which FIG. 8A is in an initial state, FIG. 8B is after page rewriting, and FIG. 8C is after block replacement. 交替ブロックリストテーブルの構成例を示す図であり、図9Aは初期状態、図9Bはブロック交替後である。FIG. 9A is a diagram illustrating a configuration example of a replacement block list table, FIG. 9A is in an initial state, and FIG. 9B is after block replacement. 消去回数管理テーブルの構成例を示す図であり、図10Aは初期状態、図10Bはブロック交替処理後である。FIG. 10A is a diagram showing a configuration example of an erasure count management table, FIG. 10A is in an initial state, and FIG. 10B is after block replacement processing. 消去候補管理テーブルの構成例を示す図であり、図11Aは初期状態、図11Bはブロック交替処理後である。FIG. 11A is a diagram illustrating a configuration example of an erasure candidate management table, FIG. 11A is in an initial state, and FIG. 11B is after block replacement processing.

符号の説明Explanation of symbols

1…メモリ制御部、2…半導体メモリ、3…ホスト装置、4…データバス、5…メモリバス、6…記憶装置、11…マイクロプロセッサ、12…メモリI/F制御部、13…ホストI/F制御部、14…メモリ、141…論理/物理変換テーブル、142…次回書込みページ管理テーブル、143…交替ブロックリストテーブル、144…消去回数管理テーブル、145…消去候補管理テーブル、21…ブロック、211…ページ、22…データブロック、23…交替ブロック、222…データページ、223…交替ページ、232…消去済みページ、1410…論理アドレス、1411…物理アドレス、1420…ブロック番号、1421…次回書き込みページ、1440…ブロック番号、1441…消去回数   DESCRIPTION OF SYMBOLS 1 ... Memory control part, 2 ... Semiconductor memory, 3 ... Host apparatus, 4 ... Data bus, 5 ... Memory bus, 6 ... Memory | storage device, 11 ... Microprocessor, 12 ... Memory I / F control part, 13 ... Host I / F control unit, 14 ... memory, 141 ... logical / physical conversion table, 142 ... next write page management table, 143 ... alternate block list table, 144 ... erase count management table, 145 ... erase candidate management table, 21 ... block, 211 ... page, 22 ... data block, 23 ... replacement block, 222 ... data page, 223 ... replacement page, 232 ... erased page, 1410 ... logical address, 1411 ... physical address, 1420 ... block number, 1421 ... next write page, 1440 ... Block number, 1441 ... Erase count

Claims (12)

記憶領域に対するデータの書き込みを所定の単位で行うと共に、その所定の単位よりデータ量が大きな物理ブロックの単位でデータの消去を行う不揮発性半導体メモリと、
外部のホストシステムからの指示に従い、前記不揮発性半導体メモリに対する読み出し又は書き込みを制御するメモリ制御部と、
を具備する記憶装置であって、
前記不揮発性半導体メモリの記憶領域は、1又は複数の前記物理ブロックからなるデータブロックと、1又は複数の前記物理ブロックからなる交替ブロックとから構成され、
前記データブロックは、前記所定の単位で書き込まれたデータを記憶するデータ領域と、同じデータブロック内の前記データ領域に記憶したデータの再書き込みが前記所定の単位で可能な交替領域とから構成され、
前記メモリ制御部は、前記ホストシステムからの指示に係わる論理アドレスに対応する前記不揮発性半導体メモリの物理アドレスを格納するテーブルのうち、前記ホストシステムからのデータの書き込み要求時に示される論理アドレスに対応する物理アドレスを書換え、さらに、次回の前記データの書き込み要求時にデータの書き込みが行われるべき物理アドレスを管理する、次回書込み領域管理テーブルにおける、次回書込みページを更新することにより前記交替領域を管理し、
前記データブロックにおいて交替領域への新たな書き込みができない場合、又は新たな書き込みができなくなる可能性がある場合に、前記再書き込みがされた前記交替領域内のデータと、前記再書き込みがされていない前記データ領域内のデータとを、前記交替ブロックに書き写し、前記データが書き移された交替ブロックをデータブロックとして使用することを特徴とする
記憶装置。
A nonvolatile semiconductor memory that performs data writing to a storage area in a predetermined unit and erases data in a unit of a physical block having a data amount larger than the predetermined unit;
In accordance with an instruction from an external host system, a memory control unit that controls reading or writing to the nonvolatile semiconductor memory;
A storage device comprising:
The storage area of the nonvolatile semiconductor memory is composed of a data block composed of one or a plurality of the physical blocks and a replacement block composed of one or a plurality of the physical blocks,
The data block includes a data area for storing data written in the predetermined unit, and a replacement area in which the data stored in the data area in the same data block can be rewritten in the predetermined unit. ,
The memory control unit corresponds to a logical address indicated at the time of a data write request from the host system in a table storing a physical address of the nonvolatile semiconductor memory corresponding to a logical address related to an instruction from the host system. rewrites the physical address and further manages physical address to write the data is performed during a write request next time the data for the next write area management table, managing the replacement area by users update the next write page And
When new writing to the replacement area in the data block is impossible or when there is a possibility that new writing cannot be performed, the data in the replacement area that has been rewritten and the rewriting is not performed. The storage device, wherein data in the data area is copied to the replacement block, and the replacement block to which the data has been transferred is used as a data block.
請求項1記載の記憶装置において、
前記交替ブロックに再書き込み後に、その再書き込みされたデータが記憶されていた前記データブロックは、前記交替ブロックの候補となるように前記データ領域と前記交替領域とを前記メモリ制御部が消去することを特徴とする
記憶装置。
The storage device according to claim 1.
The memory control unit erases the data area and the replacement area so that the data block in which the rewritten data is stored after being rewritten to the replacement block becomes a candidate for the replacement block. A storage device.
請求項1記載の記憶装置において、
前記物理ブロックの各ブロック毎の消去回数を記載した手段を持ち、消去回数を一括管理することを可能とすることを特徴とする
記憶装置。
The storage device according to claim 1.
A storage device having means for describing the number of times of erasure of each physical block and capable of collectively managing the number of times of erasure.
請求項1記載の記憶装置において、
前記物理ブロックの消去予定のブロックを管理する手段を持ち、前記メモリ制御部のマイクロプロセッサの空き時間に、消去処理を行うことを特徴とする
記憶装置。
The storage device according to claim 1.
A storage device having means for managing a block to be erased of the physical block, and performing an erasing process in a free time of a microprocessor of the memory control unit.
請求項1記載の記憶装置において、
前記次回書込み領域管理テーブルに保持されている情報を更新した後に、新たな交替領域にデータの書き込みを行うことを特徴とする
記憶装置。
The storage device according to claim 1.
A storage device, wherein after the information held in the next write area management table is updated, data is written to a new replacement area.
請求項1記載の記憶装置において、
前記交替ブロックのデータ領域にデータの書込み後の前記データブロックのうちの有効なデータを移す際に、前記ホストシステムからの論理アドレスの順に最新のデータを並び替えることを特徴とする
記憶装置。
The storage device according to claim 1.
A storage device, wherein the latest data is rearranged in the order of logical addresses from the host system when valid data in the data block after data writing is transferred to the data area of the replacement block.
データの書き込みを行う所定の単位に比べ、よりデータ量の大きな物理ブロックの単位でデータの消去を行う記憶領域を備えた不揮発性半導体メモリに対して、
外部のホストシステムからの指示に従い、メモリ制御部により読み出し又は書き込みを行うメモリ制御方法であって、
前記不揮発性半導体メモリの記憶領域は、1又は複数の前記物理ブロックからなるデータブロックと、1又は複数の前記物理ブロックからなる交替ブロックとから構成され、
前記データブロックは、前記所定の単位で書き込まれたデータを記憶するデータ領域と、同じデータブロック内の前記データ領域に記憶したデータの再書き込みが前記所定の単位で可能な交替領域とから構成され、
前記ホストシステムからの指示に係わる論理アドレスに対応する前記不揮発性半導体メモリの物理アドレスを格納するテーブルのうち、前記ホストシステムからのデータの書込み要求時に示される論理アドレスに対応する物理アドレスを書換え、さらに、次回の前記データの書き込み要求時にデータの書き込みが行われるべき物理アドレスを管理する、次回書込み領域管理テーブルにおける、次回書込みページを更新することにより前記交替領域を管理し、
前記それぞれのデータブロックにおいて交替領域への新たな書き込みができない場合、又は新たな書き込みができなくなる可能性がある場合に、前記再書き込みがされた前記交替領域内のデータと、前記再書き込みがされていない前記データ領域内のデータとを、前記交替ブロックに書き写し、前記データが書き写された交替ブロックをデータブロックとして使用することを特徴とする
メモリ制御方法。
Compared to a predetermined unit for writing data, a nonvolatile semiconductor memory having a storage area for erasing data in units of physical blocks having a larger amount of data,
A memory control method for performing reading or writing by a memory control unit in accordance with an instruction from an external host system,
The storage area of the nonvolatile semiconductor memory is composed of a data block composed of one or a plurality of the physical blocks and a replacement block composed of one or a plurality of the physical blocks,
The data block includes a data area for storing data written in the predetermined unit, and a replacement area in which the data stored in the data area in the same data block can be rewritten in the predetermined unit. ,
Of the table storing the physical address of the nonvolatile semiconductor memory corresponding to the logical address related to the instruction from the host system, the physical address corresponding to the logical address indicated at the time of the data write request from the host system is rewritten , Furthermore, managing the physical address to write the data is performed during a write request next time the data for the next write area management table manages the spare area by users update the next write page,
When new writing to the replacement area cannot be performed in each of the data blocks, or when there is a possibility that new writing cannot be performed, the data in the replacement area that has been rewritten and the rewriting are performed. A memory control method, wherein data in the data area that is not copied is copied to the replacement block, and the replacement block on which the data is copied is used as a data block.
請求項記載のメモリ制御方法において、
前記交替ブロックに再書き込み後に、その再書き込みされたデータが記憶されていた前記データブロックは、前記交替ブロックの候補となるように前記データ領域と前記交替領域とが消去されることを特徴とする
メモリ制御方法。
The memory control method according to claim 7 ,
The data area and the replacement area are erased so that the data block in which the rewritten data is stored after rewriting to the replacement block is a candidate for the replacement block. Memory control method.
請求項記載のメモリ制御方法において、
前記物理ブロックの各ブロック毎の消去回数を記載することにより、消去回数を一括管理することを可能とすることを特徴とする
メモリ制御方法。
The memory control method according to claim 7 ,
A memory control method characterized in that it is possible to collectively manage the number of erasures by describing the number of erasures for each physical block.
請求項記載のメモリ制御方法において、
前記物理ブロックの消去予定のブロックを管理することにより、前記メモリ制御部のマイクロプロセッサの空き時間に、消去処理を行うことを特徴とする
メモリ制御方法。
The memory control method according to claim 7 ,
A memory control method, comprising: managing a block to be erased of the physical block, and performing an erasure process in a free time of a microprocessor of the memory control unit.
請求項記載のメモリ制御方法において、
前記次回書込み領域管理テーブルに保持されている情報を更新した後に、新たな交替領域にデータの書き込みを行うことを特徴とする
メモリ制御方法。
The memory control method according to claim 7 ,
A memory control method, comprising: writing data to a new replacement area after updating information held in the next write area management table .
請求項記載のメモリ制御方法において、
前記交替ブロックのデータ領域にデータの書込み後の前記データブロックのうちの有効なデータを移す際に、前記ホストシステムからの論理アドレスの順に最新のデータを並び替えることを特徴とする
メモリ制御方法。
The memory control method according to claim 7 ,
A memory control method comprising rearranging the latest data in the order of logical addresses from the host system when transferring valid data in the data block after data is written to the data area of the replacement block.
JP2007286428A 2007-11-02 2007-11-02 Storage device and memory control method Active JP4829202B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007286428A JP4829202B2 (en) 2007-11-02 2007-11-02 Storage device and memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007286428A JP4829202B2 (en) 2007-11-02 2007-11-02 Storage device and memory control method

Publications (2)

Publication Number Publication Date
JP2009116465A JP2009116465A (en) 2009-05-28
JP4829202B2 true JP4829202B2 (en) 2011-12-07

Family

ID=40783572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007286428A Active JP4829202B2 (en) 2007-11-02 2007-11-02 Storage device and memory control method

Country Status (1)

Country Link
JP (1) JP4829202B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011007511A1 (en) * 2009-07-16 2011-01-20 パナソニック株式会社 Memory controller, nonvolatile storage device, accessing device, and nonvolatile storage system
US8949515B2 (en) 2009-12-03 2015-02-03 Hitachi, Ltd. Storage device and memory controller
JP5666273B2 (en) * 2010-12-03 2015-02-12 矢崎エナジーシステム株式会社 Data storage device and data storage method
JP5614337B2 (en) 2011-03-08 2014-10-29 富士通セミコンダクター株式会社 MEMORY CONTROL METHOD, MEMORY CONTROL CIRCUIT, STORAGE DEVICE, AND ELECTRONIC DEVICE
JP6102800B2 (en) * 2014-03-04 2017-03-29 ソニー株式会社 Memory controller, storage device, information processing system, and control method therefor.
JP6618941B2 (en) * 2017-03-03 2019-12-11 株式会社東芝 Management apparatus, information processing apparatus, and management method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3485938B2 (en) * 1992-03-31 2004-01-13 株式会社東芝 Nonvolatile semiconductor memory device
US7617352B2 (en) * 2000-12-27 2009-11-10 Tdk Corporation Memory controller, flash memory system having memory controller and method for controlling flash memory device
DE10349595B3 (en) * 2003-10-24 2004-12-09 Hyperstone Ag Writing sectors of block-deletable memory, writes to alternative memory block sectors in sequence, storing their positions in sector table
US7139864B2 (en) * 2003-12-30 2006-11-21 Sandisk Corporation Non-volatile memory and method with block management system
JP4661497B2 (en) * 2005-09-27 2011-03-30 Tdk株式会社 Memory controller, flash memory system, and flash memory control method

Also Published As

Publication number Publication date
JP2009116465A (en) 2009-05-28

Similar Documents

Publication Publication Date Title
US8386698B2 (en) Data accessing method for flash memory and storage system and controller using the same
JP5480913B2 (en) Storage device and memory controller
JP5612514B2 (en) Nonvolatile memory controller and nonvolatile storage device
KR100684942B1 (en) Adaptive flash memory control device with multiple mapping schemes and flash memory system havintg the same
KR101437123B1 (en) Memory system and wear leveling method thereof
US8037232B2 (en) Data protection method for power failure and controller using the same
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
JP4004468B2 (en) Method and system for having large pages supported
JP5418808B2 (en) Adaptive hybrid density memory storage control method and adaptive hybrid density memory storage
TWI385519B (en) Data writing method, and flash storage system and controller using the same
KR100568115B1 (en) Incremental merge method and memory system using the same
WO2009096180A1 (en) Memory controller, nonvolatile storage device, and nonvolatile storage system
CN110955384B (en) Data storage device and non-volatile memory control method
WO2014074449A2 (en) Wear leveling in flash memory devices with trim commands
JP2018101411A (en) Data storage device and operating method therefor
JP4829202B2 (en) Storage device and memory control method
JP5570406B2 (en) Memory controller and data recording apparatus
US20100318726A1 (en) Memory system and memory system managing method
US8271721B2 (en) Data writing method and data storage device
US20090210612A1 (en) Memory controller, nonvolatile memory device, and nonvolatile memory system
JP4308780B2 (en) Semiconductor memory device, memory controller, and data recording method
JP2009146539A (en) Information recording apparatus and information recording method
CN111949212B (en) File system and file management method based on self-defined open channel SSD
JP5180726B2 (en) Storage device and data write control method
CN111610929A (en) Data storage device and non-volatile memory control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110805

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: 20110823

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: 20110915

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140922

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4829202

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150