JPH06222985A - Memory controller - Google Patents

Memory controller

Info

Publication number
JPH06222985A
JPH06222985A JP5029937A JP2993793A JPH06222985A JP H06222985 A JPH06222985 A JP H06222985A JP 5029937 A JP5029937 A JP 5029937A JP 2993793 A JP2993793 A JP 2993793A JP H06222985 A JPH06222985 A JP H06222985A
Authority
JP
Japan
Prior art keywords
memory
unit
data
host
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.)
Pending
Application number
JP5029937A
Other languages
Japanese (ja)
Inventor
Yusaku Unno
雄策 海野
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP5029937A priority Critical patent/JPH06222985A/en
Publication of JPH06222985A publication Critical patent/JPH06222985A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)

Abstract

PURPOSE:To perform access from a host to a memory part in a short period of time. CONSTITUTION:A table part 19 is provided with a valid bit part 192 for showing relation between an instructed address from a host and a logical address of each memory block in a memory part 16 and identifying whether data are written in each memory block or not. An access control means 14a controls access from the host to the memory part 16 by converting the instructed address from the host to the logical address of the memory part while referring to the table part 19 when there is an access request from the host to the memory part 16.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、フラッシュメモリを用
いたメモリ制御装置に関し、特にその書換え制御とガー
ベジコレクション制御に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control device using a flash memory, and more particularly to rewriting control and garbage collection control thereof.

【0002】[0002]

【従来の技術】半導体ディスク装置とは、ホストから見
て磁気ディスク装置等と同様に制御が可能で、かつ機械
的な動作部分がないため、高速アクセスが可能な装置で
ある。従来、このような半導体ディスク装置は、揮発性
メモリチップと、それをバックアップするための電池と
で構成されていた。しかしながら、このような構成は完
全な不揮発性ではないため、長期の電源オフ時等にデー
タの内容を保証することができなかった。
2. Description of the Related Art A semiconductor disk device is a device which can be controlled at the same speed as a magnetic disk device or the like from the viewpoint of a host, and has no mechanical operation part, and therefore can be accessed at high speed. Conventionally, such a semiconductor disk device has been composed of a volatile memory chip and a battery for backing it up. However, since such a configuration is not completely non-volatile, the content of data cannot be guaranteed when the power is turned off for a long period of time.

【0003】ところが、近年、不揮発性メモリチップと
して、フラッシュメモリ、即ちフラッシュEEPROM
(以下、FEEPROMと称す)が実用化されるように
なり、このチップを使用した半導体ディスク装置の開発
が盛んに行われている。このFEEPROMとは、EE
PROM(電気的消去、再書込み可能リード・オンリ・
メモリ)の一種であり、電気的に消去ができ、かつ、バ
イト毎にプログラム書込みができ、また電源を必要とせ
ず、メモリの内容が保証できるという特長を持つ。
However, in recent years, a flash memory, that is, a flash EEPROM, has been used as a nonvolatile memory chip.
(Hereinafter referred to as FEEPROM) has been put into practical use, and a semiconductor disk device using this chip has been actively developed. This FEEPROM is EE
PROM (electrically erasable, rewritable read-only
Memory), which can be electrically erased, can be program-written byte by byte, does not require a power supply, and can guarantee the contents of memory.

【0004】一方、上記の長所とは逆に、次のような短
所を有している。即ち、メモリへの書込みの際に、上書
きができないため、一旦消去してからバイト毎に書込み
(データを書換える)を行う必要がある。なお、ここで
消去する単位は、チップによって異なるが、チップ単位
に消去を行うものが主流である。
On the other hand, contrary to the above advantages, it has the following disadvantages. That is, since overwriting cannot be performed when writing to the memory, it is necessary to erase (write) data byte by byte (rewrite data). The unit to be erased here differs depending on the chip, but the mainstream is to erase on a chip-by-chip basis.

【0005】次に、FEEPROMを使用した従来の不
揮発性記憶装置を説明する。図9は、従来のメモリ制御
装置としての不揮発性半導体ディスク装置の構成を示す
ブロック図である。この図9において、1は不揮発性記
憶装置(不揮発性半導体ディスク装置)、2はこの不揮
発性記憶装置1が図示しないホストと接続されるための
システムバスである。不揮発性記憶装置1は、ホストイ
ンタフェース部3、プロセッサ部4、プロセッサメモリ
部5、メモリ部6、バッファ部7、内部バス8から構成
されている。尚、ここで不揮発性記憶装置1に対するホ
ストとは、マイクロコンピュータ等の上位装置を指して
いる。
Next, a conventional nonvolatile memory device using FEEPROM will be described. FIG. 9 is a block diagram showing the configuration of a non-volatile semiconductor disk device as a conventional memory control device. In FIG. 9, reference numeral 1 is a non-volatile memory device (non-volatile semiconductor disk device), and 2 is a system bus for connecting the non-volatile memory device 1 to a host (not shown). The non-volatile storage device 1 is composed of a host interface unit 3, a processor unit 4, a processor memory unit 5, a memory unit 6, a buffer unit 7, and an internal bus 8. The host for the non-volatile storage device 1 refers to a host device such as a microcomputer.

【0006】ホストインタフェース部3は、ホストとの
インタフェース制御を行う部分であり、プロセッサ部4
は、ホストからのコマンドを解釈し、不揮発性記憶装置
1をディスク装置に見せるよう制御等を行う部分であ
る。また、プロセッサメモリ部5はプロセッサ部4の動
作を制御するプログラムが格納されているメモリであ
る。メモリ部6は、FEEPROMで構成され、データ
等を格納するフラッシュメモリである。バッファ部7
は、メモリ部6に対し、データの上書きを行う際、メモ
リ部6を消去する前にメモリ部6の内容を一旦待避させ
ておくためのメモリである。また、内部バス8は不揮発
性記憶装置1内の構成要素を接続するためのバスであ
る。
The host interface section 3 is a section for performing interface control with the host, and is a processor section 4
Is a part that interprets a command from the host and controls the non-volatile storage device 1 to appear as a disk device. The processor memory unit 5 is a memory in which a program for controlling the operation of the processor unit 4 is stored. The memory unit 6 is a flash memory configured by FEEPROM and storing data and the like. Buffer section 7
Is a memory for temporarily saving the contents of the memory unit 6 before erasing the memory unit 6 when the memory unit 6 is overwritten with data. The internal bus 8 is a bus for connecting the constituent elements in the nonvolatile memory device 1.

【0007】図10は、メモリ部6に格納しているデー
タのフォーマットを論理的に示す説明図である。即ち、
メモリ部6のフォーマットは、バリットビット91、ポ
インタ部92、データ部93からなり、これらを合わせ
て1フレームと称する。バリットビット91は、本フレ
ームにデータが書かれているか否かを示すビットであ
り、例えば、バリットビット91が“1”の場合はデー
タ書込み有り、“0”の場合はデータ書込みなしとして
いる。
FIG. 10 is an explanatory diagram logically showing the format of the data stored in the memory section 6. That is,
The format of the memory unit 6 includes a valid bit 91, a pointer unit 92, and a data unit 93, and these are collectively referred to as one frame. The valid bit 91 is a bit indicating whether or not data is written in this frame. For example, when the valid bit 91 is “1”, data writing is performed, and when the valid bit 91 is “0”, data writing is not performed.

【0008】また、ポインタ部92は、本フレームに書
かれているデータの新しいバージョンが書かれているフ
レームの先頭アドレスを格納するポインタである。即
ち、ポインタ部92に、他のフレームの先頭アドレスが
書かれている場合は、本フレームに書込まれているデー
タは旧バージョンであり、新しいバージョンはポインタ
部92の示すアドレスに書込まれていることになる。更
に、データ部93は、ホストからの書込みデータが格納
されているデータ部である。
The pointer section 92 is a pointer for storing the start address of the frame in which the new version of the data written in this frame is written. That is, when the head address of another frame is written in the pointer section 92, the data written in this frame is the old version, and the new version is written in the address indicated by the pointer section 92. Will be there. Further, the data section 93 is a data section in which write data from the host is stored.

【0009】次に、ホストからのライト要求により不揮
発性記憶装置1が上書き処理を実行する動作を説明す
る。図11は、従来の書換え時のメモリ構成例を示す説
明図である。先ず、図中(a)に示すように、メモリ部
6のアドレス(A,a)(B,a)〜(A,m)にデー
タが書込まれていたとする。そして、この状態におい
て、ホストから(A,a)上のデータを書換えるための
ライト要求がきたとする。この場合、(A,a)に対し
て上書きができないため(上述したように、FEEPR
OMに対して上書きする場合、一旦FEEPROM内の
データを消去する必要がある)、データが書込まれてい
ないフレームをバリットビット91に基づき探す。
Next, the operation of the non-volatile storage device 1 executing the overwrite process in response to a write request from the host will be described. FIG. 11 is an explanatory diagram showing a conventional memory configuration example at the time of rewriting. First, it is assumed that data is written in addresses (A, a) (B, a) to (A, m) of the memory section 6 as shown in (a) in the figure. Then, in this state, it is assumed that the host makes a write request for rewriting the data on (A, a). In this case, (A, a) cannot be overwritten (as described above, FEEPR
When the OM is overwritten, it is necessary to erase the data in the FEEPROM once), and a frame in which no data is written is searched based on the valid bit 91.

【0010】図示例では、アドレス(B,m)以降にデ
ータが書込まれていないため、アドレス(B,m)にデ
ータを書込む。即ち、アドレス(B,m)のフレームの
バリットビット91に“1”をセットし、データ部93
にデータを書込む。また、これと同時に、アドレス
(A,a)のポインタ部92に“m”を書込む。これ
が、図中、(b)の状態である。
In the illustrated example, data is not written after the address (B, m), so data is written at the address (B, m). That is, the valid bit 91 of the frame of the address (B, m) is set to "1", and the data portion 93
Write the data to. At the same time, "m" is written in the pointer portion 92 of the address (A, a). This is the state of (b) in the figure.

【0011】次に、不揮発性記憶装置1のメモリ部6の
全てにデータが格納された場合に実行するガーベジコレ
クションの動作を説明する。図12は、その説明図であ
る。今、メモリ部6の全てにデータが格納されるまでの
経過として、図示(a)のようなリンク関係を考える。
先ず、メモリ部6のアドレス(A,a)にホストからの
ライト要求に基づき、データDが書込まれる。その後、
再度ホストからアドレス(A,a)のフレームにライト
要求があり、この場合は上述したように、そのバリット
ビット91が“1”であるため、データが書込まれてい
ないフレームを探し、これがアドレス(B,m)である
とする。従って、アドレス(B,m)のフレームは、そ
のバリットビットが“1”となって、データDの新しい
バージョンであるデータD−1がデータ部93に書込ま
れる。また、アドレス(A,a)のポインタ部92に
は、リンク先のアドレスとして“B,m”が書込まれ
る。
Next, the operation of garbage collection executed when data is stored in all the memory units 6 of the non-volatile memory device 1 will be described. FIG. 12 is an explanatory diagram thereof. Now, let us consider a link relationship as shown in FIG. 4A as a process until data is stored in all of the memory section 6.
First, the data D is written in the address (A, a) of the memory unit 6 based on the write request from the host. afterwards,
The host again makes a write request to the frame at address (A, a). In this case, since the valid bit 91 is "1" as described above, a frame in which no data is written is searched for, and this is the address. (B, m). Therefore, the valid bit of the frame of the address (B, m) becomes "1", and the data D-1 which is a new version of the data D is written in the data section 93. Further, "B, m" is written as the link destination address in the pointer portion 92 of the address (A, a).

【0012】その後、更にホストからアドレス(A,
a)にライト要求があると、上記の場合と同様に、デー
タが書込まれていないフレームを探し、これを(C,
n)とする。従って、アドレス(C,n)のバリットビ
ット91は“1”、データ部93にはデータD−2が書
込まれ、同時に、アドレス(B,m)のポインタ部92
は、そのリンク先として“C,n”が書込まれる。
After that, the address (A,
When there is a write request in a), as in the above case, a frame in which no data has been written is searched for and the (C,
n). Therefore, the valid bit 91 of the address (C, n) is "1", the data D-2 is written in the data part 93, and at the same time, the pointer part 92 of the address (B, m) is written.
"C, n" is written as its link destination.

【0013】このような状態で、ガーベジコレクション
を行う場合、アドレス(B,m)のフレームは、単にリ
ンク関係を示しているだけであって、データとしては意
味を持たないものである。従って、ガーベジコレクショ
ンは、この(B,m)のフレームを消去する。
When garbage collection is performed in such a state, the frame of address (B, m) merely indicates a link relationship and has no meaning as data. Therefore, garbage collection erases this (B, m) frame.

【0014】この処理としては、先ず、アドレス(A,
a)のフレームのデータを、バッファ部7に退避させ、
バッファ部7上で、そのポインタ部92を“C,n”と
書換える。これと共に、メモリ部6のアドレス(B,
m)のフレームおよびアドレス(A,a)のフレームの
データを消去する。その後、ポインタ部92を書換えた
アドレス(A,a)のフレームのデータを、メモリ部6
の同一アドレスに書込む。これによって、図示(b)に
示すように、アドレス(A,a)のフレームのリンク先
は直接アドレス(C,n)となり、アドレス(B,m)
のフレームは、データが書込み可能なフレームとなる
(バリットビット91が何も書かれていない“0”とな
る)。
As this processing, first, the address (A,
The data of the frame of a) is saved in the buffer unit 7,
On the buffer unit 7, the pointer unit 92 is rewritten as "C, n". At the same time, the address (B,
The data of the frame of m) and the frame of the address (A, a) are erased. After that, the data of the frame of the address (A, a) in which the pointer section 92 is rewritten is stored in the memory section 6
Write to the same address of. As a result, the link destination of the frame of the address (A, a) becomes the direct address (C, n) and the address (B, m) as shown in FIG.
Is a frame in which data can be written (the valid bit 91 is "0" in which nothing is written).

【0015】[0015]

【発明が解決しようとする課題】しかしながら、上記従
来のメモリ制御装置は、以下のような問題点を有してい
た。 書換え制御を、メモリ部6内のポインタ部92に従っ
て実行するため、ホストからのライト要求やリード要求
に対して、そのリンク先をたどっていく必要があり、従
って、その要求に対するメモリ部6のデータにたどりつ
くまでに時間がかかってしまっていた。 ガーベジコレクションを行う際、メモリ部6の全ての
フレーム(領域)にデータが書込まれてから実行してい
たため、ホストからのライト要求を実行している最中に
ガーベジコレクションを実施する必要が生じた場合、ホ
ストへの終了通知が遅くなってしまっていた。
However, the above-described conventional memory control device has the following problems. Since the rewrite control is executed in accordance with the pointer section 92 in the memory section 6, it is necessary to follow the link destination for the write request or read request from the host, and therefore the data in the memory section 6 for the request. It took me a while to get to. When performing the garbage collection, since it was executed after the data was written in all the frames (areas) of the memory unit 6, it is necessary to execute the garbage collection while executing the write request from the host. In that case, the end notification to the host was delayed.

【0016】本発明は、上記従来の問題点を解決するた
めになされたもので、メモリ部へのデータ書換え時間を
短縮すると共に、ホストからのライト要求に対する終了
通知を速やかに行うことのできるメモリ制御装置を提供
することを目的とする。
The present invention has been made in order to solve the above-mentioned conventional problems, and shortens the time for rewriting data to the memory unit and can promptly notify the end of the write request from the host memory. An object is to provide a control device.

【0017】[0017]

【課題を解決するための手段】本発明における第1発明
のメモリ制御装置は、複数のメモリブロックからなるフ
ラッシュメモリで構成されたメモリ部と、前記メモリ部
に対してアクセス要求を行うホストからの指示アドレス
と、前記各メモリブロックの論理アドレスとの関係を示
すと共に、当該メモリブロックにデータが書込まれてい
るか否かを識別するバリットビット部を備えたテーブル
部と、前記ホストから前記メモリ部に対してアクセス要
求があった場合、前記テーブル部を参照し、前記ホスト
からの指示アドレスを、前記メモリ部の論理アドレスに
変換して当該メモリ部へのアクセス制御を行うアクセス
制御手段とを備えたことを特徴とするものである。
According to a first aspect of the present invention, there is provided a memory control device comprising: a memory section composed of a flash memory including a plurality of memory blocks; and a host for making an access request to the memory section. A table unit having a valid bit unit for indicating the relationship between the instruction address and the logical address of each memory block and for identifying whether or not data is written in the memory block, and the memory unit from the host. Access control means for referencing the table section, converting an instruction address from the host into a logical address of the memory section and controlling access to the memory section when there is an access request to the memory section. It is characterized by that.

【0018】第2発明のメモリ制御装置は、複数のメモ
リブロックからなるフラッシュメモリで構成されたメモ
リ部と、前記メモリ部における各メモリブロックのデー
タ書込みの有無を示すテーブル部と、予め設定したしき
い値を有し、前記テーブル部を参照して、各メモリブロ
ックのデータ書込み状態を監視し、当該メモリブロック
のデータ書込み済みブロック数が前記しきい値を超えた
場合は、前記メモリ部のガーベジコレクションを行うガ
ーベジコレクション制御手段を備えたことを特徴とする
ものである。
The memory control device according to the second aspect of the present invention has a memory section composed of a flash memory composed of a plurality of memory blocks, a table section indicating whether or not data is written in each memory block in the memory section, and preset. A threshold value, monitoring the data writing state of each memory block by referring to the table section, and when the number of data written blocks of the memory block exceeds the threshold value, the garbage of the memory section is It is characterized by comprising a garbage collection control means for performing collection.

【0019】第3発明のメモリ制御装置は、複数のメモ
リブロックからなるフラッシュメモリで構成されたメモ
リ部と、前記メモリ部に対してアクセス要求を行うホス
トに設けられ、前記メモリ部における各メモリブロック
のデータ書込みの有無を示すテーブル部と、前記ホスト
に設けられ、前記テーブル部を参照し、当該ホストのラ
イト要求を実行するためのメモリブロック数と、前記メ
モリ部のデータが書込まれていない残りのメモリブロッ
ク数とを比較し、前記ライト要求を実行するためのメモ
リブロック数が、前記残りメモリブロック数を超えてい
た場合は、ガーベジコレクションを行った後にライト処
理を行い、前記ライト要求を実行するためのメモリブロ
ック数が前記残りメモリブロック数を超えておらず、か
つ、前記メモリ部のデータ書込み済みブロック数と前記
ライト要求を実行するためのメモリブロック数との加算
値が、予め設定したしきい値を超えていた場合は、ライ
ト処理を行った後にガーベジコレクションを行う書込み
制御手段を備えたことを特徴とするものである。
A memory control device according to a third aspect of the present invention is provided in a memory section composed of a flash memory composed of a plurality of memory blocks and a host for making an access request to the memory section, and each memory block in the memory section. Table portion indicating whether or not the data is written, the number of memory blocks provided in the host for executing the write request of the host by referring to the table portion, and the data in the memory portion is not written. The number of memory blocks for executing the write request is compared with the number of remaining memory blocks, and if the number of memory blocks exceeds the number of remaining memory blocks, write processing is performed after garbage collection, and the write request is issued. The number of memory blocks for execution does not exceed the number of remaining memory blocks, and the memory unit When the added value of the number of data written blocks and the number of memory blocks for executing the write request exceeds a preset threshold value, write control means for performing garbage collection after performing write processing is provided. It is characterized by having.

【0020】第4発明のメモリ制御装置は、複数のメモ
リブロックからなるフラッシュメモリで構成されたメモ
リ部と、前記メモリ部における各メモリブロックのデー
タ書込みの有無を示すテーブル部と、予め設定したしき
い値とタイマとを有し、前記テーブル部を参照して前記
複数のメモリブロックのデータ書込み状態を監視し、当
該メモリブロックのデータ書込み数が前記しきい値を超
えていない場合は、前記複数のメモリブロックに書込み
を行うと共に、タイマをセット状態とし、前記複数のメ
モリブロックのデータ書込み数が前記しきい値を超えて
いる場合は、前記メモリ部のガーベジコレクションを行
うと共に、前記タイマをリセットし、前記タイマがセッ
ト状態でかつ、前記タイマによる所定時間経過後は、ガ
ーベジコレクションを実行するガーベジコレクション制
御手段を備えたことを特徴とするものである。
The memory control device according to the fourth aspect of the present invention has a memory section composed of a flash memory composed of a plurality of memory blocks, a table section indicating whether or not data has been written to each memory block in the memory section, and is preset. A threshold value and a timer, monitoring the data write state of the plurality of memory blocks by referring to the table section, and if the number of data writes of the memory block does not exceed the threshold value, When the number of data writes in the plurality of memory blocks exceeds the threshold value, the timer is set and the timer is reset. However, if the timer is in the set state and the timer has elapsed a predetermined time, the garbage collection It is characterized in that it comprises a garbage collection control means for performing.

【0021】[0021]

【作用】本発明における第1発明のメモリ制御装置にお
いては、ホストからメモリ部に対してリードあるいはラ
イト要求があった場合、アクセス制御手段は、テーブル
部を参照し、ホストからの指示アドレスに対応するメモ
リブロックの論理アドレスを取出す。そして、この論理
アドレスのメモリブロックに対してホストからのアクセ
ス要求処理を行う。
In the memory control device of the first aspect of the present invention, when the host makes a read or write request to the memory section, the access control means refers to the table section and responds to the instruction address from the host. The logical address of the memory block to be fetched. Then, the access request process from the host is performed for the memory block of this logical address.

【0022】第2発明のメモリ制御装置においては、ホ
ストからライト要求があった場合、ガーベジコレクショ
ン制御手段は、テーブル部を参照して、メモリブロック
のデータ書込み済みブロック数と、ライト要求を実行す
るためのメモリブロック数との加算値がしきい値を超え
るか否かを判定し、その加算値がしきい値を超えた場合
は、メモリ部のガーベジコレクションを行う。
In the memory control device according to the second aspect of the present invention, when a write request is issued from the host, the garbage collection control means refers to the table section and executes the number of data written blocks of the memory block and the write request. It is determined whether the added value with the number of memory blocks exceeds the threshold value. If the added value exceeds the threshold value, garbage collection of the memory unit is performed.

【0023】第3発明のメモリ制御装置においては、ホ
ストの書込み制御手段は、一定周期あるいはライト要求
発生時に、テーブル部を参照する。そして、ホストのラ
イト要求を実行するためのメモリブロック数と、メモリ
部のデータが書込まれていない残りのメモリブロック数
とを比較し、ライト要求を実行するためのメモリブロッ
ク数が、残りメモリブロック数を超えていた場合は、ガ
ーベジコレクションを行った後にライト処理を行う。ま
た、ライト要求を実行するためのメモリブロック数が、
残りメモリブロック数を超えておらず、かつ、メモリ部
のデータ書込み済みブロック数とライト要求を実行する
ためのメモリブロック数との加算値が、予め設定したし
きい値を超えていた場合は、ライト処理を行った後にガ
ーベジコレクションを行う。
In the memory control device of the third aspect of the present invention, the write control means of the host refers to the table section at a constant cycle or when a write request is issued. Then, the number of memory blocks for executing the write request of the host is compared with the number of remaining memory blocks in which the data of the memory section is not written, and the number of memory blocks for executing the write request is calculated as the remaining memory. If the number of blocks exceeds the limit, write processing is performed after garbage collection. In addition, the number of memory blocks for executing the write request is
If the number of remaining memory blocks is not exceeded, and the added value of the number of data written blocks in the memory section and the number of memory blocks for executing the write request exceeds the preset threshold value, Garbage collection is performed after write processing.

【0024】第4発明のメモリ制御装置においては、ホ
ストからライト要求があった場合、ガーベジコレクショ
ン制御手段は、テーブル部を参照して、各メモリブロッ
クのデータ書込み状態を調べる。そして、メモリブロッ
クのデータ書込み済みブロック数と、ホストからのライ
ト要求を実行するためのメモリブロック数との加算値が
しきい値を超えていない場合は、該当するメモリブロッ
クに書込みを行うと共に、タイマをセット状態とする。
一方、加算値がしきい値を超えている場合は、メモリ部
のガーベジコレクションを行うと共に、前記タイマをリ
セットする。また、タイマがセット状態でかつ、タイマ
による所定時間経過後は、ガーベジコレクションを実行
する。
In the memory control device of the fourth aspect of the invention, when a write request is issued from the host, the garbage collection control means refers to the table part to check the data write state of each memory block. If the added value of the number of data written blocks of the memory block and the number of memory blocks for executing the write request from the host does not exceed the threshold value, the corresponding memory block is written and Set the timer.
On the other hand, when the added value exceeds the threshold value, the memory is garbage collected and the timer is reset. Further, the garbage collection is executed after the timer is in the set state and the predetermined time by the timer has elapsed.

【0025】[0025]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。図1は本発明のメモリ制御装置の第1実施例
を示すブロック図である。図において、11は不揮発性
記憶装置(不揮発性半導体ディスク装置)、12はこの
不揮発性記憶装置11が図示しないホストと接続される
ためのシステムバスである。不揮発性記憶装置11は、
ホストインタフェース部13、プロセッサ部14、プロ
セッサメモリ部15、メモリ部16、バッファ部17、
内部バス18、テーブル部19から構成されている。
尚、本実施例においても、ホストとはマイクロコンピュ
ータ等の上位装置を指している。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a first embodiment of a memory control device of the present invention. In the figure, 11 is a non-volatile memory device (non-volatile semiconductor disk device), and 12 is a system bus for connecting the non-volatile memory device 11 to a host (not shown). The non-volatile storage device 11 is
Host interface unit 13, processor unit 14, processor memory unit 15, memory unit 16, buffer unit 17,
It is composed of an internal bus 18 and a table section 19.
In the present embodiment as well, the host refers to a host device such as a microcomputer.

【0026】ここで、ホストインタフェース部13は、
従来と同様にホストとのインタフェース制御を行う部分
である。また、プロセッサ部14は、ホストからのコマ
ンドを解釈し、不揮発性記憶装置11をディスク装置に
見せるような制御等を行う部分であり、アクセス制御手
段14aを備えている。尚、このアクセス制御手段14
aに関しては後述する。
Here, the host interface unit 13 is
This is a part that controls the interface with the host as in the conventional case. The processor unit 14 is a unit that interprets a command from the host and controls the non-volatile storage device 11 to appear as a disk device, and includes an access control unit 14a. The access control means 14
A will be described later.

【0027】また、プロセッサメモリ部15はプロセッ
サ部14の動作を制御するプログラムを格納するメモリ
である。メモリ部16は、FEEPROMで構成され、
従来と同様、データを格納するためのものである。ま
た、バッファ部17は、その機能として、メモリ部16
に対してデータの上書きを行う際、メモリ部16を消去
する前にその内容を一旦待避させておくためのものであ
り、RAM等の揮発性のメモリチップで構成されてい
る。尚、内部バス18は従来と同様、不揮発性記憶装置
11内の構成要素を接続するためのバスである。
The processor memory unit 15 is a memory for storing a program for controlling the operation of the processor unit 14. The memory unit 16 is composed of FEEPROM,
As in the conventional case, it is for storing data. Further, the buffer unit 17 has, as its function, the memory unit 16
On the other hand, when the data is overwritten, the contents are temporarily saved before the memory section 16 is erased, and it is composed of a volatile memory chip such as a RAM. The internal bus 18 is a bus for connecting the constituent elements in the non-volatile memory device 11, as in the conventional case.

【0028】テーブル部19は、EEPROMやNVR
AM等の書換え可能な不揮発性メモリで構成され、指示
アドレス部191、バリットビット部192、論理アド
レス部193から構成されている。指示アドレス部19
1は、ホストから不揮発性記憶装置11に対してデータ
をアクセスする際に、ホストから指示されるアドレスを
示す部分である。また、バリットビット部192は、従
来のバリットビット部と同様に、該当するメモリ部16
のメモリブロックにデータが格納されているか否かを示
す部分であり、バリットビット部192が“1”である
場合にデータが書込まれており、“0”の場合にデータ
が書込まれていないことを示している。論理アドレス部
193は、ホストから指示されたアドレスを論理的に変
換し、メモリ部16のメモリブロックのアドレスを決定
する部分である。
The table section 19 includes an EEPROM and an NVR.
It is composed of a rewritable nonvolatile memory such as AM, and is composed of an instruction address part 191, a valid bit part 192, and a logical address part 193. Instruction address part 19
Reference numeral 1 is a part indicating an address designated by the host when the host accesses data to the nonvolatile memory device 11. The valid bit unit 192 is similar to the conventional valid bit unit in that the corresponding memory unit 16
Is a portion indicating whether or not the data is stored in the memory block of No. 2, the data is written when the valid bit portion 192 is “1”, and the data is written when the valid bit portion 192 is “0”. It shows that there is no. The logical address unit 193 is a unit that logically converts the address designated by the host and determines the address of the memory block of the memory unit 16.

【0029】また、メモリ部16は、ホストからのアク
セスサイズ(例えば、セクタ単位)を1ブロックとし、
テーブル部19は、メモリ部16の1ブロックに対して
1ワードを有している。そして、メモリ部16は、ホス
トから見える領域であるアクセス可能領域と、ホストか
らは直接アクセスできない代替領域で構成されている。
Further, the memory section 16 sets the access size (for example, sector unit) from the host as one block,
The table unit 19 has one word for one block of the memory unit 16. The memory section 16 is composed of an accessible area which is an area visible from the host and an alternative area which cannot be directly accessed from the host.

【0030】図2に、メモリ部16の構成とテーブル部
19の関係を示す。即ち、メモリ部16のブロックは、
アクセス可能領域と代替領域とで構成され、ここでは、
アドレス“0”〜“m−1”がアクセス可能領域、アド
レス“m”〜“n”が代替領域に設定されている。そし
て、テーブル部19も、メモリ部16のメモリブロック
数に対応してテーブル項目が設定されている。
FIG. 2 shows the relationship between the structure of the memory section 16 and the table section 19. That is, the blocks of the memory unit 16 are
It consists of an accessible area and an alternative area.
Addresses "0" to "m-1" are set as accessible areas, and addresses "m" to "n" are set as alternative areas. In the table section 19 as well, table items are set corresponding to the number of memory blocks in the memory section 16.

【0031】次にホストからのライト要求により、不揮
発性記憶装置11が書換え処理を実行する動作を説明す
る。図3は、メモリ部16における書換え動作の説明図
である。図示の例は、ホストから不揮発性記憶装置11
のアドレス=0の領域に対して複数回ライトアクセスし
た場合の動作説明を示している。先ず、ホストは不揮発
性記憶装置11に対してアドレス=0を指定する。これ
により、プロセッサ部14のアクセス制御手段14a
は、テーブル部19を参照し、指示アドレス部191が
“0”の1ワードをアクセスし、該当するバリットビッ
ト部192を検査する。ここでは、バリットビットは
“0”であったとし、そのため、論理アドレス部193
のアドレス“0”に従って、メモリ部16のアドレス
“0”のブロックにデータを書込む(図中、斜線部で示
す)。そして、テーブル部19のバリットビット部19
2を“1”とする。この状態が図中に示す状態であ
る。
Next, the operation of the non-volatile memory device 11 for executing the rewriting process in response to a write request from the host will be described. FIG. 3 is an explanatory diagram of the rewriting operation in the memory unit 16. In the illustrated example, from the host to the nonvolatile storage device 11
7 shows an operation description when a write access is performed a plurality of times to the area of address = 0. First, the host specifies address = 0 for the nonvolatile memory device 11. Thereby, the access control means 14a of the processor unit 14
Refers to the table section 19, the instruction address section 191 accesses one word "0", and inspects the corresponding valid bit section 192. Here, it is assumed that the valid bit is "0", and therefore the logical address portion 193
According to the address "0" of the memory section 16, the data is written in the block of the address "0" of the memory section 16 (indicated by the hatched portion in the figure). Then, the ballit bit portion 19 of the table portion 19
Set 2 to “1”. This state is the state shown in the figure.

【0032】次に、ホストから不揮発性記憶装置11の
アドレス=0に2度目のライトアクセス要求があった場
合、アクセス制御手段14aは上記ライトアクセス時と
同様にテーブル部19を参照する。そして、指示アドレ
ス部191が“0”の1ワードをアクセスし、そのバリ
ットビット部192を検査する。この場合は、最初のラ
イトアクセスによって、そのバリットビットは“1”と
なっているため、代替領域中のデータが書込まれていな
いブロックを探す。即ち、テーブル部19において、指
示アドレス部191が“m”以降のバリットビットが
“0”であるブロックを検索する。
Next, when the host makes a second write access request to the address = 0 of the nonvolatile memory device 11, the access control means 14a refers to the table section 19 as in the above write access. Then, the designated address portion 191 accesses one word of "0" and checks the valid bit portion 192. In this case, since the valid bit is set to "1" by the first write access, a block in which data is not written in the alternative area is searched. That is, in the table section 19, the designated address section 191 searches for a block in which the valid bit after "m" is "0".

【0033】今、指示アドレス部191が“m”のバリ
ットビットが“0”であったとすると、プロセッサ部1
4は、その論理アドレス部193のアドレス(この場合
“m”とする)に従い、新たなデータを、メモリ部16
の代替領域のアドレス“m”のブロック(図中、二重斜
線部)にライトする。そして、アクセス制御手段14a
は、テーブル部19における論理アドレス部193の値
を、リンク先であるアドレス“m”と書換える。この状
態が図示のの状態である。
Assuming now that the valid address of the "m" in the designated address section 191 is "0", the processor section 1
4 stores new data in the memory unit 16 according to the address of the logical address unit 193 (in this case, “m”).
The block is written in the block of the address "m" of the substitute area (indicated by the double-hatched line). And the access control means 14a
Rewrites the value of the logical address part 193 in the table part 19 with the address “m” which is the link destination. This state is shown in the figure.

【0034】更に、ホストから不揮発性記憶装置11の
アドレス=0に3度目のライトアクセス要求があった場
合、アクセス制御手段14aは、同様にテーブル部19
を参照し、先ず、指示アドレス部191が“0”の1ワ
ードをアクセスする。このブロックは上述したように、
そのバリットビットが“1”であるため、2度目のライ
トアクセス時と同様に、代替領域中のデータが書込まれ
ていないブロックを探す。今、指示アドレス部191が
“m+1”のバリットビットが“0”であったとする
と、アクセス制御手段14aは、その論理アドレス部1
93のアドレス(この場合“m+2”とする)に従い、
新たなデータを、メモリ部16の代替領域のアドレス
“m+2”のブロック(図中、二重斜線部)にライトす
る。
Further, when there is a third write access request from the host to the address = 0 of the non-volatile memory device 11, the access control means 14a similarly performs the table unit 19a.
First, the instruction address portion 191 accesses one word of "0". This block, as described above,
Since the valid bit is "1", a block in which data is not written in the alternative area is searched for, as in the second write access. Now, assuming that the valid bit of "m + 1" in the designated address part 191 is "0", the access control means 14a determines the logical address part 1
According to the address of 93 (in this case, "m + 2"),
New data is written in the block (double shaded portion in the figure) at the address “m + 2” in the alternative area of the memory unit 16.

【0035】そして、アクセス制御手段14aは、テー
ブル部19における論理アドレス部193の値を、リン
ク先であるアドレス“m+2”と書換える。この状態が
図示のの状態である。
Then, the access control means 14a rewrites the value of the logical address part 193 in the table part 19 with the address "m + 2" which is the link destination. This state is shown in the figure.

【0036】また、ホストから不揮発性記憶装置11の
アドレス=0にリードアクセス要求があった場合は、ア
クセス制御手段14aがテーブル部19を参照し、その
論理アドレス部193のアドレスに対してアクセスを行
う。例えば、上述した図3におけるの状態を例にとっ
て説明すると、指示アドレス部191のアドレス=0の
論理アドレスは“m+2”であるため、アクセス制御手
段14aは、メモリ部16のアドレス“m+2”のデー
タをリードアクセスする。従って、従来のようにリンク
先のチェーンをたどっていく必要がなく、ホストへの応
答時間を短縮することができる。
When a read access request is issued from the host to the address = 0 of the nonvolatile memory device 11, the access control means 14a refers to the table section 19 and accesses the address of the logical address section 193. To do. For example, taking the state of FIG. 3 described above as an example, since the logical address of the address = 0 of the instruction address part 191 is “m + 2”, the access control means 14a uses the data of the address “m + 2” of the memory part 16. Read access. Therefore, it is not necessary to follow the link destination chain as in the conventional case, and the response time to the host can be shortened.

【0037】次に、ガーベジコレクションの動作を図3
を用いて説明する。先ず、図3のの状態を考えると、
メモリ部16におけるアドレス“0”、“m”のデータ
は意味を持たないデータである。即ち、アドレス
“0”、“m”のデータは旧データであり、ホストから
の指示アドレス=0のデータとしては、メモリ部16の
アドレス“m+2”のデータだけが必要だからである。
Next, the operation of garbage collection is shown in FIG.
Will be explained. First, considering the state of FIG. 3,
The data at addresses "0" and "m" in the memory section 16 are meaningless data. That is, the data at the addresses “0” and “m” are old data, and only the data at the address “m + 2” in the memory unit 16 is required as the data at the designated address = 0 from the host.

【0038】従って、ガーベジコレクションを行う場
合、先ず、メモリ部16のアドレス“0”、“m”、
“m+2”のデータを、一旦バッファ部17に退避させ
る。そして、メモリ部16におけるこれらのアドレスの
データを消去すると共に、バッファ部17に退避させた
データのうち、アドレス“0”、“m”のデータを消去
し、“m+2”のデータをメモリ部16におけるアドレ
ス“0”のブロックにライトする。これと同時に、テー
ブル部19における指示アドレス部191のアドレス=
0の論理アドレスを“0”と書換え、かつ、指示アドレ
ス部191のアドレス=m,m+2のそれぞれのバリッ
トビットを“0”にする。これによって、メモリ部16
における代替領域のデータは、消去され、代替領域のメ
モリブロックが使用可能となる。
Therefore, when performing garbage collection, first, the addresses "0", "m", and
The data of “m + 2” is temporarily saved in the buffer unit 17. Then, while erasing the data of these addresses in the memory unit 16, erasing the data of the addresses “0” and “m” among the data saved in the buffer unit 17, the data of “m + 2” is stored in the memory unit 16 Write to the block of the address "0" in. At the same time, the address of the instruction address part 191 in the table part 19 =
The logical address of 0 is rewritten as “0”, and the valid bits of the address = m and m + 2 of the instruction address portion 191 are set to “0”. As a result, the memory unit 16
The data in the alternative area in is erased and the memory block in the alternative area becomes usable.

【0039】次に、ガーベジコレクション制御を行う第
2〜4実施例を説明する。図4は、第2実施例の構成を
示す図である。図の装置は、プロセッサ部14に、ガー
ベジコレクション制御手段14bを備えたものである。
このガーベジコレクション制御手段14bは、予め設定
したしきい値を有し、ホストからライト要求があった場
合、テーブル部19を参照して、データ書込み済みブロ
ック数と、ライト要求を実行するためのメモリブロック
数の加算値がしきい値を超えているか否かを判定し、そ
の加算値がしきい値を超えている場合は、メモリ部16
のガーベジコレクションを実行する機能を有している。
尚、このしきい値は、例えば、メモリ部16の代替領域
の90%を示す値等、適宜の値が設定されている。
Next, second to fourth embodiments for performing garbage collection control will be described. FIG. 4 is a diagram showing the configuration of the second embodiment. In the illustrated apparatus, the processor section 14 is provided with a garbage collection control means 14b.
This garbage collection control means 14b has a preset threshold value, and when there is a write request from the host, it refers to the table section 19 and refers to the number of blocks in which data has been written and a memory for executing the write request. It is determined whether the added value of the number of blocks exceeds the threshold value. If the added value exceeds the threshold value, the memory unit 16
It has a function to execute garbage collection of.
The threshold value is set to an appropriate value, such as a value indicating 90% of the alternative area of the memory unit 16.

【0040】また、上記ガーベジコレクション制御手段
14bは、プロセッサメモリ部15に格納されているプ
ログラムからなり、プロセッサ部14が、これらをプロ
セッサメモリ部15から読込んで実行するものである。
The garbage collection control means 14b is composed of a program stored in the processor memory unit 15, and the processor unit 14 reads these from the processor memory unit 15 and executes them.

【0041】次に、第2実施例によるガーベジコレクシ
ョンの動作を説明する。図5は、第2実施例によるガー
ベジコレクション制御手段14bの制御動作を示すフロ
ーチャートである。今、ホストからライト要求が発生
し、不揮発性記憶装置11がライト要求処理を行うとす
る。この場合、先ず、ガーベジコレクション制御手段1
4bは、テーブル部19を参照し、メモリ部16の代替
領域における書込み済みブロック数と、ホストからのラ
イト要求のブロック数(上書き要求のブロック、即ち代
替領域に書込まれるデータのブロック数)とを加算し、
その値がしきい値以上か否かを判断する(ステップS
1)。尚、メモリ部16における書込み済みブロック数
とは、テーブル部19におけるバリットビット部192
の値が“1”のブロックを指している。
Next, the operation of garbage collection according to the second embodiment will be described. FIG. 5 is a flowchart showing the control operation of the garbage collection control means 14b according to the second embodiment. Now, it is assumed that a write request is generated from the host and the non-volatile storage device 11 performs the write request process. In this case, first, the garbage collection control means 1
4b refers to the table unit 19 and indicates the number of written blocks in the alternative area of the memory unit 16 and the number of write request blocks from the host (the block of the overwrite request, that is, the number of blocks of data written in the alternative area). And add
It is determined whether or not the value is greater than or equal to the threshold value (step S
1). The number of written blocks in the memory unit 16 means the valid bit unit 192 in the table unit 19.
Indicates a block whose value is "1".

【0042】ステップS1において、その加算値がしき
い値より小さい場合は、代替領域へのライト要求のブロ
ックに対して書込みを行い(ステップS2)、加算値が
しきい値より大きい場合は、書込み可能なブロック数
(残りブロック数)とライト要求ブロック数を比較する
(ステップS3)。ステップS3において、書込み可能
なブロック数の方が大きかった場合は、書込み処理を行
い(ステップS4)、その後、ガーベジコレクション処
理を行う(ステップS5)。一方、ステップS3におい
て、書込み可能なブロック数の方が小さかった場合は、
先ず、ガーベジコレクション処理を行い(ステップS
6)、その後、書込み処理を行う(ステップS7)。
In step S1, if the added value is smaller than the threshold value, writing is performed on the block requesting the write to the alternative area (step S2). If the added value is larger than the threshold value, writing is performed. The possible block number (remaining block number) is compared with the write request block number (step S3). When the number of writable blocks is larger in step S3, the writing process is performed (step S4), and then the garbage collection process is performed (step S5). On the other hand, if the number of writable blocks is smaller in step S3,
First, a garbage collection process is performed (step S
6) After that, write processing is performed (step S7).

【0043】このように、第2実施例では、ガーベジコ
レクション制御手段14bが、しきい値を基にガーベジ
コレクション処理を行うため、ホストからのライト要求
を実行している最中にガーベジコレクション処理を実行
しなければならないといったことを防止することができ
る。
As described above, in the second embodiment, since the garbage collection control means 14b performs the garbage collection process based on the threshold value, the garbage collection process is executed while the write request from the host is being executed. You can avoid having to do it.

【0044】次に、ホスト側が不揮発性記憶装置11に
対してガーベジコレクションを指示する第3実施例を説
明する。図6に、その構成を示す。図において、不揮発
性記憶装置11およびシステムバス12の構成は、不揮
発性記憶装置11のプロセッサ部14がガーベジコレク
ション制御手段14bを備えていない点以外は、上記第
2実施例と同様であるため、その説明は省略する。
Next, a third embodiment in which the host side instructs the non-volatile memory device 11 to perform garbage collection will be described. FIG. 6 shows the configuration. In the figure, the configurations of the non-volatile memory device 11 and the system bus 12 are the same as those in the second embodiment except that the processor unit 14 of the non-volatile memory device 11 does not include the garbage collection control means 14b. The description is omitted.

【0045】図中、20はシステムバス12を介して不
揮発性記憶装置11にリード/ライト要求を行うホスト
であり、書込み制御手段21、テーブル部22、ライト
要求キュー23を有している。書込み制御手段21は、
専用のプロセッサあるいはプログラム等で構成され、所
定のしきい値を有すると共に、テーブル部22とライト
要求キュー23を管理し、ホスト20からライト要求が
発生した場合、これらテーブル部22とライト要求キュ
ー23に格納されているライト要求数に基づき、ガーベ
ジコレクション指示等の制御を行う機能を有している。
テーブル部22は、第1、2実施例で説明した不揮発性
記憶装置11のテーブル部19と同様の構成であり、不
揮発性記憶装置11におけるメモリ部16の格納状態を
示すテーブルである。また、ライト要求キュー23は、
不揮発性記憶装置11へのライト要求が発生した場合
は、そのライト要求を格納するための機能を有してい
る。
In the figure, reference numeral 20 denotes a host which issues a read / write request to the non-volatile memory device 11 via the system bus 12, and has a write control means 21, a table section 22, and a write request queue 23. The writing control means 21
It is composed of a dedicated processor or program, has a predetermined threshold value, manages the table unit 22 and the write request queue 23, and when a write request is issued from the host 20, these table unit 22 and the write request queue 23. It has a function of controlling a garbage collection instruction and the like based on the number of write requests stored in.
The table unit 22 has the same configuration as the table unit 19 of the nonvolatile storage device 11 described in the first and second embodiments, and is a table showing the storage state of the memory unit 16 in the nonvolatile storage device 11. Also, the write request queue 23 is
When a write request is made to the non-volatile storage device 11, it has a function of storing the write request.

【0046】次に、上記第3実施例の動作を説明する。
図7に、ホスト20のライト要求処理のフローチャート
を示す。先ず、書込み制御手段21は、一定周期あるい
はライト要求の発生により、ライト要求キュー23に格
納されているライト要求の総ブロック数を検査する。ま
た、テーブル部22を参照し、メモリ部16における代
替領域の書込みブロック状態を調べる。そして、これら
ライト要求の総ブロック数と書込み済みブロック数との
和を求め、その和がしきい値を超えているか否かを判定
する(ステップS1)。
Next, the operation of the third embodiment will be described.
FIG. 7 shows a flowchart of the write request process of the host 20. First, the write control means 21 inspects the total number of blocks of write requests stored in the write request queue 23 at regular intervals or when a write request is generated. Further, the write block state of the alternative area in the memory unit 16 is checked with reference to the table unit 22. Then, the sum of the total number of blocks of these write requests and the number of written blocks is obtained, and it is determined whether or not the sum exceeds a threshold value (step S1).

【0047】このステップS1において、ライト要求を
実行するための総ブロック数と書込み済みブロック数と
の和がしきい値より小さい場合は、そのまま不揮発性記
憶装置11に対して書込み処理を行い(ステップS
2)、その和がしきい値より大きい場合は、書込み可能
ブロック数(残りブロック数)とライト要求の総ブロッ
ク数とを比較する(ステップS3)。
In step S1, if the sum of the total number of blocks for executing the write request and the number of written blocks is smaller than the threshold value, the write processing is performed on the nonvolatile memory device 11 as it is (step S
2) If the sum is larger than the threshold value, the number of writable blocks (the number of remaining blocks) is compared with the total number of blocks for write requests (step S3).

【0048】ステップS3において、ライト要求を実行
するための総ブロック数が書込み可能ブロック数より小
さい場合、書込み制御手段21は、最初に書込み処理を
行い(ステップS4)、不揮発性記憶装置11側から書
込み終了通知を受け取ると(ステップS5)、次に、ガ
ーベジコレクション処理の指示を行う(ステップS
6)。一方、ステップS3において、ライト要求のため
の総ブロック数が書込み可能ブロック数より大きい場合
は、最初にガーベジコレクション処理の指示を行い(ス
テップS7)、不揮発性記憶装置11側からガーベジコ
レクションの終了通知を受け取った後(ステップS
8)、書込み処理を行う(ステップS9)。
In step S3, when the total number of blocks for executing the write request is smaller than the number of writable blocks, the write control means 21 first performs the write processing (step S4), and the nonvolatile memory device 11 side When the write end notification is received (step S5), next, a garbage collection process instruction is given (step S5).
6). On the other hand, in step S3, when the total number of blocks for the write request is larger than the number of writable blocks, the garbage collection process is first instructed (step S7), and the non-volatile storage device 11 notifies the end of the garbage collection. After receiving (step S
8) The writing process is performed (step S9).

【0049】このように、上記第3実施例では、ホスト
20側で、メモリ部16のガーベジコレクションの指示
を行うようにしたため、予め、メモリ部16に対してラ
イト要求を出す前に、そのライト要求をメモリ部16が
実行できるか否かを知ることができる。このため、その
ライト要求が多くのメモリブロックに対するものであっ
た場合でも、メモリ部16が、ホスト20からのライト
要求を実行している最中にガーベジコレクションを行わ
なくてはならないといった事態を防止することができ
る。
As described above, in the third embodiment, since the host 20 side issues the garbage collection instruction of the memory section 16, the write operation is issued before the write request is issued to the memory section 16. It is possible to know whether the memory unit 16 can execute the request. Therefore, even if the write request is for many memory blocks, it is possible to prevent a situation in which the memory unit 16 has to perform garbage collection while executing the write request from the host 20. can do.

【0050】次に、不揮発性記憶装置11が定期的にガ
ーベジコレクションを実施する第4実施例を説明する。
尚、この第4実施例において、図面上の構成は、図4に
示した第2実施例と同様であるためその図示は省略する
が、ガーベジコレクション制御手段14bの機能が異な
っている。即ち、本実施例のガーベジコレクション制御
手段14bは、上述した第2、3実施例と同様のしきい
値とを備えていると共に、タイマ機能を備えている。ま
た、メモリ部16におけるメモリブロックの使用状況を
テーブル部19を参照して監視し、当該メモリブロック
の使用状況がしきい値を超えていない場合は、メモリブ
ロックに書込みを行うと共に、タイマをセットし、メモ
リブロックの使用状況がしきい値を超えている場合は、
メモリ部16のガーベジコレクションを行うと共に、タ
イマをリセットする。そして、タイマがセット状態でか
つ、その所定時間経過後は、ガーベジコレクションを実
行するといった機能を有しているものである。
Next, a fourth embodiment in which the non-volatile memory device 11 periodically performs garbage collection will be described.
The fourth embodiment has the same structure as that of the second embodiment shown in FIG. 4, and therefore the illustration thereof is omitted, but the function of the garbage collection control means 14b is different. That is, the garbage collection control means 14b of this embodiment has the same threshold value as that of the second and third embodiments described above, and also has the timer function. Also, the usage status of the memory block in the memory unit 16 is monitored by referring to the table unit 19, and if the usage status of the memory block does not exceed the threshold value, the memory block is written and the timer is set. If the memory block usage exceeds the threshold,
Garbage collection of the memory unit 16 is performed and the timer is reset. Further, it has a function of executing garbage collection after the timer has been set and a predetermined time has elapsed.

【0051】次に、第4実施例の動作について説明す
る。図8に、第4実施例におけるライト要求処理のフロ
ーチャートを示す。先ず、ホストからライト要求がくる
と、プロセッサ部14は、メモリ部16に書込み可能な
ブロック数と、ライト要求のブロック数とを加算し、こ
の和がしきい値以上か否かを判断する(ステップS
1)。このステップS1において、和がしきい値より小
さい場合は、ライト要求のブロックに対して書込み処理
を行い(ステップS2)、その後、ガーベジコレクショ
ン処理の起動となるタイマをセット状態とする(ステッ
プS3)。尚、ここで、既にタイマがセット状態であっ
た場合は、再セット(初期値から計測開始)を行う。
Next, the operation of the fourth embodiment will be described. FIG. 8 shows a flowchart of the write request process in the fourth embodiment. First, when a write request comes from the host, the processor unit 14 adds the number of blocks writable in the memory unit 16 and the number of blocks of the write request, and determines whether or not this sum is equal to or more than a threshold value ( Step S
1). In step S1, if the sum is smaller than the threshold value, write processing is performed on the write request block (step S2), and then the timer for starting the garbage collection processing is set (step S3). . If the timer has already been set, the timer is reset (measurement is started from the initial value).

【0052】一方、ステップS1において、和がしきい
値以上であった場合は、ライト要求のブロック数を全て
メモリ部16に書込みができるか否かを判断する(ステ
ップS4)。ここで、メモリ部16に対して全てのブロ
ックを書込みできる場合は、書込み処理を行った(ステ
ップS5)後、ガーベジコレクションを行い(ステップ
S6)、その後、タイマをリセットする(ステップS
7)。また、ステップS4において、メモリ部16に対
して全てのブロックの書込みができない場合は、最初に
ガーベジコレクションを行って(ステップS8)、次
に、書込み処理を行い(ステップS9)、その後、タイ
マをリセットする(ステップS10)。
On the other hand, if the sum is greater than or equal to the threshold value in step S1, it is determined whether or not all the write request blocks can be written in the memory section 16 (step S4). If all the blocks can be written in the memory unit 16, write processing is performed (step S5), garbage collection is performed (step S6), and then the timer is reset (step S).
7). If all blocks cannot be written in the memory unit 16 in step S4, garbage collection is first performed (step S8), then write processing is performed (step S9), and then a timer is set. Reset (step S10).

【0053】更に、ガーベジコレクション制御手段14
bは、上述したようにタイマの監視を行っており、タイ
マが規定値をカウントした場合は、図示しない割込みが
発生し、ガーベジコレクション制御手段14bは、ガー
ベジコレクションを実行する。
Further, the garbage collection control means 14
b monitors the timer as described above, and when the timer counts the specified value, an interrupt (not shown) occurs, and the garbage collection control means 14b executes the garbage collection.

【0054】このように、上記第4実施例では、メモリ
部16のガーベジコレクションを定期的に行うため、ホ
ストからのライト要求に対する終了通知を上記第3実施
例と同程度の性能で行うことができる。
As described above, in the fourth embodiment, since the garbage collection of the memory section 16 is periodically performed, the end notification for the write request from the host can be performed with the same performance as that of the third embodiment. it can.

【0055】尚、上記各実施例では、しきい値によるガ
ーベジコレクションの実行を、メモリ部16の代替領域
に関して行ったが、これに限定されるものではなく、メ
モリ部16のアクセス領域に関して行うよう構成しても
よい。
In each of the above embodiments, the threshold-based garbage collection is executed for the alternative area of the memory section 16, but the present invention is not limited to this, and it may be executed for the access area of the memory section 16. You may comprise.

【0056】[0056]

【発明の効果】以上説明したように、第1発明のメモリ
制御装置によれば、ホストからの指示アドレスと、メモ
リブロックの論理アドレスとの関係を示すテーブル部を
設け、ホストからメモリ部に対してアクセス要求があっ
た場合は、テーブル部を参照して、ホストからの指示ア
ドレスをメモリ部の論理アドレスに変換し、メモリ部へ
のアクセス制御を行うようにしたので、ホストからメモ
リ部へのアクセス要求に対して速やかに応答することが
できる。
As described above, according to the memory control device of the first aspect of the present invention, the table section for indicating the relationship between the instruction address from the host and the logical address of the memory block is provided so that the host can control the memory section. When there is an access request from the host, the table part is referred to, the instruction address from the host is converted into the logical address of the memory part, and the access control to the memory part is performed. It is possible to promptly respond to the access request.

【0057】第2発明のメモリ制御装置によれば、メモ
リ部における各メモリブロックのデータ書込みの有無を
示すテーブル部を設けると共に、予め所定のしきい値を
設定し、メモリブロックのデータ書込み済みブロック数
が、このしきい値を超えた場合は、メモリ部のガーベジ
コレクションを行うようにしたので、ホストからのライ
ト要求を実行している最中にガーベジコレクションを行
わなくてはならないといったことを防止することができ
る。
According to the memory control device of the second aspect of the present invention, the table indicating the presence / absence of data writing in each memory block in the memory unit is provided, and a predetermined threshold value is set in advance, and the data written block of the memory block is set. When the number exceeds this threshold, the memory part is garbage collected. Therefore, it is possible to prevent the garbage collection from being performed while the write request from the host is being executed. can do.

【0058】第3発明のメモリ制御装置によれば、ホス
ト側がメモリ部における各メモリブロックのデータ書込
みの有無を示すテーブル部を備え、ホスト側がこのテー
ブル部を参照してメモリ部へのガーベジコレクションを
指示するようにしたので、ホストからメモリ部に対して
ライト要求を出す前に、そのライト要求をメモリ部が実
行できるか否かを知ることができ、従って、メモリ部
が、ホストからのライト要求を実行している最中にガー
ベジコレクションを行わなくてはならないといったこと
をより一層防止することができる。
According to the memory control device of the third aspect of the invention, the host side is provided with a table section indicating whether or not data is written in each memory block in the memory section, and the host side refers to this table section to perform garbage collection in the memory section. Since the instruction is given, it is possible to know whether the memory unit can execute the write request before the host issues the write request to the memory unit. Therefore, the memory unit requests the write request from the host. It is possible to further prevent that garbage collection must be performed during execution of.

【0059】第4発明のメモリ制御装置によれば、メモ
リ部のガーベジコレクションを定期的に行うようにした
ので、上記第3発明と同程度に、メモリ部が、ホストか
らのライト要求を実行している最中にガーベジコレクシ
ョンを行わなくてはならないといったことを防止するこ
とができる。
According to the memory control device of the fourth aspect of the invention, since the garbage collection of the memory part is periodically performed, the memory part executes the write request from the host to the same extent as the third invention. It is possible to prevent having to perform garbage collection during the operation.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のメモリ制御装置の第1実施例を示すブ
ロック図である。
FIG. 1 is a block diagram showing a first embodiment of a memory control device of the present invention.

【図2】本発明のメモリ制御装置におけるメモリ部とテ
ーブル部の関係を示す説明図である。
FIG. 2 is an explanatory diagram showing a relationship between a memory unit and a table unit in the memory control device of the present invention.

【図3】本発明のメモリ制御装置の第1実施例における
データ書換え動作の説明図である。
FIG. 3 is an explanatory diagram of a data rewriting operation in the first embodiment of the memory control device of the present invention.

【図4】本発明のメモリ制御装置の第2実施例を示すブ
ロック図である。
FIG. 4 is a block diagram showing a second embodiment of the memory control device of the present invention.

【図5】本発明のメモリ制御装置の第2実施例の動作を
示すフローチャートである。
FIG. 5 is a flowchart showing the operation of the second embodiment of the memory control device of the present invention.

【図6】本発明のメモリ制御装置の第3実施例を示すブ
ロック図である。
FIG. 6 is a block diagram showing a third embodiment of the memory control device of the present invention.

【図7】本発明のメモリ制御装置の第3実施例の動作を
示すフローチャートである。
FIG. 7 is a flowchart showing an operation of a third embodiment of the memory control device of the present invention.

【図8】本発明のメモリ制御装置の第4実施例の動作を
示すフローチャートである。
FIG. 8 is a flowchart showing the operation of the fourth embodiment of the memory control device of the present invention.

【図9】従来のメモリ制御装置のブロック図である。FIG. 9 is a block diagram of a conventional memory control device.

【図10】従来のメモリ制御装置におけるメモリ部のフ
ォーマットの説明図である。
FIG. 10 is an explanatory diagram of a format of a memory unit in a conventional memory control device.

【図11】従来のメモリ制御装置におけるデータ書換え
時の説明図である。
FIG. 11 is an explanatory diagram at the time of rewriting data in the conventional memory control device.

【図12】従来のメモリ制御装置におけるガーベジコレ
クションの動作説明図である。
FIG. 12 is an operation explanatory diagram of garbage collection in the conventional memory control device.

【符号の説明】[Explanation of symbols]

11 不揮発性記憶装置 14a アクセス制御手段 14b ガーベジコレクション制御手段 16 メモリ部 19 テーブル部 20 ホスト 21 書込み制御手段 22 テーブル部 11 non-volatile storage device 14a access control means 14b garbage collection control means 16 memory unit 19 table unit 20 host 21 write control unit 22 table unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数のメモリブロックからなるフラッシ
ュメモリで構成されたメモリ部と、 前記メモリ部に対してアクセス要求を行うホストからの
指示アドレスと、前記各メモリブロックの論理アドレス
との関係を示すと共に、当該メモリブロックにデータが
書込まれているか否かを識別するバリットビット部を備
えたテーブル部と、 前記ホストから前記メモリ部に対してアクセス要求があ
った場合、前記テーブル部を参照し、前記ホストからの
指示アドレスを、前記メモリ部の論理アドレスに変換し
て当該メモリ部へのアクセス制御を行うアクセス制御手
段とを備えたことを特徴とするメモリ制御装置。
1. A relationship between a memory unit configured by a flash memory including a plurality of memory blocks, an instruction address from a host that makes an access request to the memory unit, and a logical address of each memory block is shown. At the same time, a table unit having a valid bit unit for identifying whether or not data is written in the memory block, and when the host makes an access request to the memory unit, the table unit is referred to. A memory control device, comprising: an access control unit that converts an instruction address from the host into a logical address of the memory unit to control access to the memory unit.
【請求項2】 複数のメモリブロックからなるフラッシ
ュメモリで構成されたメモリ部と、 前記メモリ部における各メモリブロックのデータ書込み
の有無を示すテーブル部と、 予め設定したしきい値を有し、前記テーブル部を参照し
て、各メモリブロックのデータ書込み状態を監視し、当
該メモリブロックのデータ書込み済みブロック数が前記
しきい値を超えた場合は、前記メモリ部のガーベジコレ
クションを行うガーベジコレクション制御手段を備えた
ことを特徴とするメモリ制御装置。
2. A memory unit configured by a flash memory including a plurality of memory blocks, a table unit indicating whether or not data is written in each memory block in the memory unit, and a preset threshold value, A garbage collection control means for monitoring the data writing state of each memory block with reference to the table portion and performing a garbage collection of the memory portion when the number of data written blocks of the memory block exceeds the threshold value. A memory control device comprising:
【請求項3】 複数のメモリブロックからなるフラッシ
ュメモリで構成されたメモリ部と、 前記メモリ部に対してアクセス要求を行うホストに設け
られ、前記メモリ部における各メモリブロックのデータ
書込みの有無を示すテーブル部と、 前記ホストに設けられ、前記テーブル部を参照し、当該
ホストのライト要求を実行するためのメモリブロック数
と、前記メモリ部のデータが書込まれていない残りのメ
モリブロック数とを比較し、前記ライト要求を実行する
ためのメモリブロック数が、前記残りメモリブロック数
を超えていた場合は、ガーベジコレクションを行った後
にライト処理を行い、前記ライト要求を実行するための
メモリブロック数が前記残りメモリブロック数を超えて
おらず、かつ、前記メモリ部のデータ書込み済みブロッ
ク数と前記ライト要求を実行するためのメモリブロック
数との加算値が、予め設定したしきい値を超えていた場
合は、ライト処理を行った後にガーベジコレクションを
行う書込み制御手段を備えたことを特徴とするメモリ制
御装置。
3. A memory unit composed of a flash memory composed of a plurality of memory blocks, and a host that makes an access request to the memory unit and indicates whether or not data is written to each memory block in the memory unit. A table unit, the number of memory blocks that are provided in the host and refer to the table unit for executing the write request of the host, and the number of remaining memory blocks in which the data of the memory unit is not written. In comparison, if the number of memory blocks for executing the write request exceeds the number of remaining memory blocks, the number of memory blocks for executing the write process after performing garbage collection and executing the write request. Does not exceed the number of remaining memory blocks, and the data written block of the memory section And the number of memory blocks for executing the write request exceeds a preset threshold, a write control means is provided for performing garbage collection after performing write processing. And a memory control device.
【請求項4】 複数のメモリブロックからなるフラッシ
ュメモリで構成されたメモリ部と、 前記メモリ部における各メモリブロックのデータ書込み
の有無を示すテーブル部と、 予め設定したしきい値とタイマとを有し、前記テーブル
部を参照して前記複数のメモリブロックのデータ書込み
状態を監視し、当該メモリブロックのデータ書込み数が
前記しきい値を超えていない場合は、前記複数のメモリ
ブロックに書込みを行うと共に、タイマをセット状態と
し、前記複数のメモリブロックのデータ書込み数が前記
しきい値を超えている場合は、前記メモリ部のガーベジ
コレクションを行うと共に、前記タイマをリセットし、
前記タイマがセット状態でかつ、前記タイマによる所定
時間経過後は、ガーベジコレクションを実行するガーベ
ジコレクション制御手段を備えたことを特徴とするメモ
リ制御装置。
4. A memory unit comprising a flash memory composed of a plurality of memory blocks, a table unit indicating whether or not data is written to each memory block in the memory unit, a preset threshold value and a timer. Then, referring to the table section, the data write states of the plurality of memory blocks are monitored, and when the number of data writes of the memory block does not exceed the threshold value, the write is performed to the plurality of memory blocks. Together with the timer in a set state, when the number of data writes of the plurality of memory blocks exceeds the threshold value, while performing garbage collection of the memory unit, reset the timer,
A memory control device comprising: garbage collection control means for executing garbage collection after the timer is in a set state and a predetermined time has elapsed by the timer.
JP5029937A 1993-01-26 1993-01-26 Memory controller Pending JPH06222985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5029937A JPH06222985A (en) 1993-01-26 1993-01-26 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5029937A JPH06222985A (en) 1993-01-26 1993-01-26 Memory controller

Publications (1)

Publication Number Publication Date
JPH06222985A true JPH06222985A (en) 1994-08-12

Family

ID=12289910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5029937A Pending JPH06222985A (en) 1993-01-26 1993-01-26 Memory controller

Country Status (1)

Country Link
JP (1) JPH06222985A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11126488A (en) * 1997-10-21 1999-05-11 Hitachi Ltd Method and device for storing and controlling data of external memory using plural flash memories
WO2003012647A1 (en) * 2001-07-27 2003-02-13 Matsushita Electric Industrial Co., Ltd. Flash memory apparatus and method for merging data stored in the same
WO2004077447A1 (en) * 2003-02-28 2004-09-10 Fujitsu Limited Flash memory and memory control method
JP2007094571A (en) * 2005-09-27 2007-04-12 Tdk Corp Memory controller, flash memory system, and control method of flash memory
US8140741B2 (en) 2010-01-29 2012-03-20 Kabushiki Kaisha Toshiba Semiconductor storage device and control method thereof
JP2018156600A (en) * 2017-03-21 2018-10-04 東芝メモリ株式会社 Memory system and control method
JP2020177415A (en) * 2019-04-17 2020-10-29 キヤノン株式会社 Information processing device, control method thereof and program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11126488A (en) * 1997-10-21 1999-05-11 Hitachi Ltd Method and device for storing and controlling data of external memory using plural flash memories
WO2003012647A1 (en) * 2001-07-27 2003-02-13 Matsushita Electric Industrial Co., Ltd. Flash memory apparatus and method for merging data stored in the same
JP2003044351A (en) * 2001-07-27 2003-02-14 Matsushita Electric Ind Co Ltd Flash memory device and method for merging data stored in the same
US7039781B2 (en) 2001-07-27 2006-05-02 Matsushtia Electric Industrial Co., Ltd. Flash memory apparatus and method for merging stored data items
WO2004077447A1 (en) * 2003-02-28 2004-09-10 Fujitsu Limited Flash memory and memory control method
US7487286B2 (en) 2003-02-28 2009-02-03 Spansion Llc Flash memory and method for controlling the memory
JP2007094571A (en) * 2005-09-27 2007-04-12 Tdk Corp Memory controller, flash memory system, and control method of flash memory
US8140741B2 (en) 2010-01-29 2012-03-20 Kabushiki Kaisha Toshiba Semiconductor storage device and control method thereof
US8275935B2 (en) 2010-01-29 2012-09-25 Kabushiki Kaisha Toshiba Semiconductor storage device and control method thereof
JP2018156600A (en) * 2017-03-21 2018-10-04 東芝メモリ株式会社 Memory system and control method
JP2020177415A (en) * 2019-04-17 2020-10-29 キヤノン株式会社 Information processing device, control method thereof and program

Similar Documents

Publication Publication Date Title
US5553261A (en) Method of performing clean-up of a solid state disk while executing a read command
JP3485938B2 (en) Nonvolatile semiconductor memory device
TWI628542B (en) Methods for gc (garbage collection) por (power off recovery) of a flash memory device and apparatuses using the same
JP4802284B2 (en) Semiconductor memory device and control method thereof
JP3544610B2 (en) Memory device
JPH07146820A (en) Control method for flash memory and information processor using the same
JP2549034B2 (en) Storage device
JP2003015929A (en) Control method for nonvolatile memory
JPH11126488A (en) Method and device for storing and controlling data of external memory using plural flash memories
JP3773607B2 (en) Microcomputer with built-in flash EEPROM
JP2002278781A (en) Storage device, method for controlling storage device and program
JP3421581B2 (en) Storage device using nonvolatile semiconductor memory
KR100590150B1 (en) Method for making memory management table and memory device
US5307470A (en) Microcomputer having EEPROM provided with detector for detecting data write request issued before data write operation responsive to preceding data write request is completed
JP3627915B2 (en) BOOT BLOCK FLASH MEMORY CONTROL CIRCUIT, IC MEMORY CARD WITH THE SAME, SEMICONDUCTOR STORAGE DEVICE, AND BOOT BLOCK FLASH MEMORY METHOD
JPH0728690A (en) Flash memory system
JPH06222985A (en) Memory controller
JPH11272569A (en) Data restoration system for outer storage device using flash memory
JP3503448B2 (en) Flash type memory and its management device
JPH0695955A (en) Flash file system
JP3166659B2 (en) Storage device
JPH07160569A (en) Memory controller
JPH10289144A (en) Memory control method
JP2003242788A (en) Nonvolatile semiconductor memory device and control method therefor
JPH11297083A (en) Backup memory utilizing nonvolatile memory