JP2012238259A - Control unit, storage device and control method - Google Patents

Control unit, storage device and control method Download PDF

Info

Publication number
JP2012238259A
JP2012238259A JP2011108095A JP2011108095A JP2012238259A JP 2012238259 A JP2012238259 A JP 2012238259A JP 2011108095 A JP2011108095 A JP 2011108095A JP 2011108095 A JP2011108095 A JP 2011108095A JP 2012238259 A JP2012238259 A JP 2012238259A
Authority
JP
Japan
Prior art keywords
data
clone
refresh
management information
evaluation information
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.)
Withdrawn
Application number
JP2011108095A
Other languages
Japanese (ja)
Inventor
Satoshi Fujisawa
聡 藤澤
Yuto Hosogaya
祐人 細萱
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2011108095A priority Critical patent/JP2012238259A/en
Publication of JP2012238259A publication Critical patent/JP2012238259A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To enhance data reliability of non-volatile memory and increase speed and stability of reading access time.SOLUTION: Data stored in non-volatile memory are estimated whether refreshing is required in near future; i.e. whether refreshing timing is coming close. This estimation uses a piece of estimation information which stores the number of bit errors at every access. When a piece of data is determined that the refreshing timing of which is close, a piece of clone data identical to original data is generated in the non-volatile memory using the data as the original data. In this case, a piece of management information is updated so that either one of the original data and the clone data should be a target of the access.

Description

本開示は、制御装置、記憶装置、読出制御方法に関し、特に不揮発性メモリの信頼性向上やアクセスタイムの高速化、安定化を実現する技術に関する。   The present disclosure relates to a control device, a storage device, and a read control method, and more particularly to a technique for improving the reliability of a non-volatile memory and speeding up and stabilizing an access time.

特開2009−70098号公報JP 2009-70098 A 特開2007−334852号公報JP 2007-334852 A 特開2007−193838号公報JP 2007-193838 A 特開2007−58840号公報JP 2007-58840 A

例えばNAND型フラッシュメモリなどの不揮発性メモリを用いた記憶装置が普及している。不揮発性メモリは、例えば各種電子機器、情報処理装置などで使用されるメモリカード、SSD(Solid State Drive)、eMMC(Embedded MultiMedia Card)などで利用されている。
上記特許文献1〜4にはフラッシュメモリを用いた記憶装置が開示されている。
For example, a storage device using a non-volatile memory such as a NAND flash memory has become widespread. Nonvolatile memories are used in, for example, memory cards used in various electronic devices and information processing apparatuses, SSDs (Solid State Drives), eMMCs (Embedded MultiMedia Cards), and the like.
Patent Documents 1 to 4 disclose a storage device using a flash memory.

不揮発性メモリでは、物理的な記憶領域のアドレスとして物理アドレスが使用される。これにより物理ブロック、物理ページ、物理セクタが設定されている。複数の物理セクタで物理ページが構成され、また複数の物理ページで物理ブロックが構成される。
消去(イレーズ)は物理ブロック単位で行われ、書込(プログラム)及び読出(リード)は物理ページ単位で可能とされる。
ホスト側やメモリ制御部側からのアドレス指定は、論理アドレスが用いられる。論理アドレスによる論理ブロック、論理ページ、論理セクタが、上記の物理アドレスに対応づけられる。これによりアクセス要求時には論理アドレスが物理アドレスに変換されて、実際のフラッシュメモリへのアクセスが実行される。
In a nonvolatile memory, a physical address is used as an address of a physical storage area. Thereby, a physical block, a physical page, and a physical sector are set. A physical page is composed of a plurality of physical sectors, and a physical block is composed of a plurality of physical pages.
Erasing (erasing) is performed in units of physical blocks, and writing (programming) and reading (reading) are possible in units of physical pages.
A logical address is used for address designation from the host side or the memory control unit side. Logical blocks, logical pages, and logical sectors based on logical addresses are associated with the physical addresses. As a result, when an access request is made, the logical address is converted into a physical address, and access to the actual flash memory is executed.

ところでNAND型フラッシュメモリでは、書き込まれたデータを読み出した際に、ビット化け(ビットエラー)などが発生した場合に備えて、誤り訂正符号を用いて、データの信頼性を高めてきた。
しかし、近年、NAND型フラッシュメモリのプロセス微細化により、書き込まれたデータを繰り返し読み出し続けるとデータのビット化けが発生する現象が発生しやすくなっており、訂正しきれないほどのビット化けが発生しやすくなってきている。
By the way, in the NAND flash memory, the reliability of data has been improved by using an error correction code in preparation for the occurrence of bit corruption (bit error) when the written data is read.
However, in recent years, due to the process miniaturization of NAND flash memory, the phenomenon that data is garbled easily occurs when the written data is repeatedly read repeatedly, and garbled bits that cannot be corrected occur. It's getting easier.

こうした状況に対して、ビット化けが発生したものを訂正するだけではなく、訂正が可能なうちにデータのリフレッシュ動作を行うことにより、ビット化けが発生しにくい状況にする手法が知られている。
従来のリフレッシュ手法は、ビット化けの発生数や、読み出しや書き換えの回数などが、一定の閾値を超えたら、リフレッシュ機会に至ったと判断し、リフレッシュ動作を行うものである。
In such a situation, there is known a method for making a situation in which bit corruption is unlikely to occur by performing a data refresh operation while not only correcting a bit corruption but also correcting it.
In the conventional refresh method, when the number of occurrences of bit corruption, the number of times of reading or rewriting exceeds a certain threshold, it is determined that a refresh opportunity has been reached, and a refresh operation is performed.

ところがこうした従来手法を用いると、閾値を超える状態が発生すると、すぐにリフレッシュ動作を開始するため、読出アクセスの際の処理速度を低下させてしまうという問題がある。またリフレッシュ動作が起きる場合と起きない場合とで処理速度にバラつきが生じる。   However, when such a conventional method is used, a refresh operation is started immediately when a state exceeding the threshold value is generated, so that the processing speed at the time of read access is lowered. Also, the processing speed varies depending on whether or not the refresh operation occurs.

本開示ではこのような問題に鑑みて、不揮発性メモリに記憶されたデータの信頼性を高めるとともに、アクセスの際の処理速度の高速化、安定化を実現することを目的とする。   In view of such a problem, the present disclosure aims to increase the reliability of data stored in a nonvolatile memory and to increase the processing speed and stabilize the access speed.

本開示の制御装置は、不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成処理部と、上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理部と、上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理部とを備える。   The control device of the present disclosure is data stored in a non-volatile memory, and for data determined to be close to a refresh opportunity based on information for evaluation regarding refresh necessity, the data is used as original data. A clone generation processing unit that performs processing for generating the same clone data as the original data in the nonvolatile memory, and so that either the original data or the clone data becomes an access target at the time of access execution. A management information processing unit for updating the management information; and an evaluation information processing unit for generating the evaluation information for the data when accessing the data stored in the nonvolatile memory.

本開示の記憶装置は、不揮発性メモリと、上記不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成処理部と、上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理部と、上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理部とを備える。   The storage device according to the present disclosure includes a nonvolatile memory and data stored in the nonvolatile memory, the data determined to be close to each other based on evaluation information regarding the necessity for refresh. Using the data as original data, the clone generation processing unit that performs processing for generating the same clone data as the original data in the nonvolatile memory, and either the original data or the clone data is A management information processing unit that updates management information so as to be an access target, and an evaluation information processing unit that generates the evaluation information for the data when the data stored in the nonvolatile memory is accessed .

本開示の制御方法は、不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成ステップと、上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理ステップと、上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理ステップとを備える。   The control method of the present disclosure is data stored in a non-volatile memory, and for data for which it is determined that a refresh opportunity is close based on information for evaluation regarding refresh necessity, the data is used as original data. A clone generation step for generating the same clone data as the original data in the non-volatile memory, and so that either the original data or the clone data is an access target at the time of access execution, A management information processing step for updating the management information; and an evaluation information processing step for generating the evaluation information for the data when the data stored in the nonvolatile memory is accessed.

これらの本開示の技術では、記憶されたデータについての信頼性を表す値が一定の閾値を超えた時などのリフレッシュ動作が必要に迫られた場合(リフレッシュ機会に至った場合)ではなく、信頼性を示す値を記憶した評価用情報を用いて、リフレッシュ動作がいずれ必要となる可能性が高いデータを推測する。そして事前にそのデータについてクローンデータを複製することで、読み出し時の処理速度の低下させることなく信頼性低下を防ぐ。
即ち、リフレッシュ動作が近いうちに必要となると推測されるデータについてクローンデータを複製し、同一内容のデータを2重に保持する。そしてオリジナルデータとクローンデータのいずれか一方をアクセス対象の主データとして管理し、他方をアクセス対象でない副データとする。そのデータを読み出す際には、主データ(例えばクローンデータ)から読み出しを行い、繰り返しの読出により信頼性の低下が起こった場合、その時点でリフレッシュを行うことなく、論理的な管理情報において主データと副データを入れ替えたうえで新たな主データ(例えばオリジナルデータ)から読出が行われるようにする。
これにより、読出時に信頼性低下が起きた場合でも、即時のリフレッシュ動作が不要となる。
In the techniques of the present disclosure, the reliability is not a case where a refresh operation is required (such as when a refresh opportunity is reached) such as when a value representing the reliability of stored data exceeds a certain threshold value. Data for which a refresh operation is likely to be necessary is estimated by using the evaluation information storing the value indicating the property. Then, by replicating the clone data for the data in advance, a decrease in reliability is prevented without reducing the processing speed at the time of reading.
That is, clone data is duplicated for data that is expected to be required soon after a refresh operation, and data having the same content is held twice. One of the original data and the clone data is managed as main data to be accessed, and the other is set as sub data that is not to be accessed. When reading the data, the main data (for example, clone data) is read, and if the reliability is reduced due to repeated reading, the main data is logically managed without refreshing at that time. And sub data are exchanged, and new main data (for example, original data) is read out.
This eliminates the need for an immediate refresh operation even when reliability is reduced during reading.

本開示の技術によれば、信頼性が比較的低下傾向にあるデータについて、クローンデータを生成し、データ内容を2重に保持するため、データの信頼性を向上できる。特にクローンデータ側を主データとして読出アクセスの対象とすれば、リフレッシュと同様の新たなデータであるため、信頼性が回復した状態となる。
さらにその上で、読み出していた方の主データについてリフレッシュ機会に至ったら、主データと副データを入れ替えて、以降は新たな主データに対して読出を行うようにする。これらのことにより、リフレッシュ動作を実行する機会を非常に希とすることができ、殆どの場合で、リフレッシュを伴わないことで、アクセス速度の高速化、安定化を実現できる。
According to the technique of the present disclosure, clone data is generated for data whose reliability tends to be relatively low, and the data contents are held twice, so that the reliability of the data can be improved. In particular, if the clone data side is the target of read access as the main data, the new data is the same as the refresh, and the reliability is restored.
Furthermore, when the refresh opportunity is reached for the main data that has been read, the main data and the sub data are switched, and thereafter, the new main data is read. As a result, the opportunity to perform the refresh operation can be made very rare, and in most cases, the access speed can be increased and stabilized without refresh.

本開示の実施の形態のメモリカードの構成のブロック図である。It is a block diagram of the composition of the memory card of an embodiment of this indication. 実施の形態の制御部の機能構成の説明図である。It is explanatory drawing of a function structure of the control part of embodiment. 従来手法でリフレッシュが実行される場合、及び信頼性低下の説明図である。It is explanatory drawing of the case where refresh is performed by the conventional method, and a reliability fall. リフレッシュの実行によるアクセス時間の変動の説明図である。It is explanatory drawing of the fluctuation | variation of the access time by execution of refresh. 実施の形態でのアクセス時間の安定化の説明図である。It is explanatory drawing of stabilization of the access time in embodiment. 第1、第2の実施の形態のクローンデータ生成に伴う動作の説明図である。It is explanatory drawing of the operation | movement accompanying the clone data production | generation of 1st, 2nd embodiment. 実施の形態の評価用情報の一例の説明図である。It is explanatory drawing of an example of the information for evaluation of embodiment. 第1の実施の形態の起動時の処理のフローチャートである。It is a flowchart of the process at the time of starting of 1st Embodiment. 第1の実施の形態のリード時の処理のフローチャートである。It is a flowchart of the process at the time of the read of 1st Embodiment. 実施の形態のリフレッシュ機会近接推定の説明図である。It is explanatory drawing of the refresh opportunity proximity | contact estimation of embodiment. 実施の形態の動作によるデータ読出回数の説明図である。It is explanatory drawing of the data read count by operation | movement of embodiment. 第2の実施の形態の評価用情報の更新の説明図である。It is explanatory drawing of the update of the information for evaluation of 2nd Embodiment. 第2の実施の形態の起動時の処理のフローチャートである。It is a flowchart of the process at the time of starting of 2nd Embodiment. 第2の実施の形態のリード時の処理のフローチャートである。It is a flowchart of the process at the time of the read of 2nd Embodiment. 第3の実施の形態のクローンデータ生成に伴う動作の説明図である。It is explanatory drawing of operation | movement accompanying the clone data production | generation of 3rd Embodiment.

以下、実施の形態について次の順序で説明する。なお、実施の形態で示すメモリカード1が請求項でいう記憶装置の実施の形態となる。またメモリカード1内の制御部11が、請求項でいう制御装置の実施の形態であり、制御部11による処理が請求項でいう制御方法の実施の形態となる。

<1.メモリカード構成>
<2.リフレッシュによる処理速度の低下及びバラツキの解消>
<3.第1の実施の形態>
[3−1:動作概要]
[3−2:評価用情報]
[3−3:処理例]
<4.第2の実施の形態>
<5.第3の実施の形態>
<6.変形例>
Hereinafter, embodiments will be described in the following order. Note that the memory card 1 shown in the embodiment is an embodiment of a storage device referred to in the claims. Further, the control unit 11 in the memory card 1 is an embodiment of the control device referred to in the claims, and the processing by the control unit 11 is an embodiment of the control method referred to in the claims.

<1. Memory card configuration>
<2. Reduction in processing speed and variation due to refresh>
<3. First Embodiment>
[3-1: Operation overview]
[3-2: Information for evaluation]
[3-3: Processing example]
<4. Second Embodiment>
<5. Third Embodiment>
<6. Modification>

<1.メモリカード構成>

図1に実施の形態のメモリカード1の構成例を示す。
メモリカード1はホスト機器2に接続され、記憶装置として用いられる。ホスト機器2とは、例えばパーソナルコンピュータ、デジタルスチルカメラ、ビデオカメラ、オーディオプレーヤ、ビデオプレーヤ、ゲーム機器、携帯電話機、PDA(Personal Digital Assistant)等の情報端末など、各種の電子機器、情報処理装置が想定される。
<1. Memory card configuration>

FIG. 1 shows a configuration example of the memory card 1 according to the embodiment.
The memory card 1 is connected to the host device 2 and used as a storage device. Examples of the host device 2 include various electronic devices and information processing apparatuses such as personal computers, digital still cameras, video cameras, audio players, video players, game devices, mobile phones, and information terminals such as PDAs (Personal Digital Assistants). is assumed.

メモリカード1は、制御部(CPU:Central Processing Unit)11、SRAM(Static Random Access Memory)12、デバイスインターフェース13、バッファRAM、及び不揮発性メモリ(Non-Volatile Memory)15を備える。   The memory card 1 includes a control unit (CPU: Central Processing Unit) 11, an SRAM (Static Random Access Memory) 12, a device interface 13, a buffer RAM, and a non-volatile memory (Non-Volatile Memory) 15.

制御部11はメモリカード1の全体を制御する。このため制御部11はSRAM12に置かれた命令コードを逐次実行する。主に制御部11は、ホスト機器2からのコマンドに応じたデータの書込や読出を実行させる。このため制御部11は、デバイスインターフェース13のホスト機器2とのデータ送受信動作制御、バッファRAM14の書込/読出動作の制御、不揮発性メモリ15へのアクセス動作の制御を行う。
SRAM12は、制御部11が実行するプログラム(ファームウェア)の記憶や、ワーク領域として使用される。
デバイスインターフェース13はホスト機器2との間の通信を行う。
バッファRAM14はホスト機器2との間の転送データ(書込データや読出データ)のバッファリングに用いられる。
不揮発性メモリ15は、例えばNAND型フラッシュメモリである。
The control unit 11 controls the entire memory card 1. Therefore, the control unit 11 sequentially executes instruction codes placed in the SRAM 12. The control unit 11 mainly executes data writing and reading in accordance with commands from the host device 2. Therefore, the control unit 11 performs data transmission / reception operation control of the device interface 13 with the host device 2, control of write / read operation of the buffer RAM 14, and control of access operation to the nonvolatile memory 15.
The SRAM 12 is used as a storage of a program (firmware) executed by the control unit 11 and a work area.
The device interface 13 performs communication with the host device 2.
The buffer RAM 14 is used for buffering transfer data (write data and read data) with the host device 2.
The nonvolatile memory 15 is, for example, a NAND flash memory.

メモリカード1の基本的な動作としては、データ書込時には、ホスト機器2から書込要求とともに、書込アドレス、データサイズ、さらに書き込むべきデータが送られてくる。
ホスト機器2から送られてくる書き込むデータは、デバイスインターフェース13で受信されてバッファRAM14にバッファリングされる。そして制御部11の制御の元、データが不揮発性メモリ15に書き込まれる。制御部11は書込要求、書込アドレス、データサイズに応じてこれらの動作を制御する。
データ読出時にはホスト機器2から読出要求とともに、読出アドレス、データサイズが送られてくる。制御部11は、読出アドレス、データサイズに基づいて不揮発性メモリ15から指示されたデータの読出を行い、バッファRAM14にバッファリングする。また制御部11はバッファリングされた読出データに対してエラー訂正処理等を行う。そして読出データはバッファRAM14からデバイスインターフェース13に転送され、ホスト機器2に送信される。
As a basic operation of the memory card 1, at the time of data writing, a write request, a data size, and data to be written are sent from the host device 2 together with a write request.
Data to be written sent from the host device 2 is received by the device interface 13 and buffered in the buffer RAM 14. Then, data is written into the nonvolatile memory 15 under the control of the control unit 11. The control unit 11 controls these operations according to the write request, write address, and data size.
When reading data, a read address and data size are sent from the host device 2 together with a read request. The control unit 11 reads the data instructed from the nonvolatile memory 15 based on the read address and the data size, and buffers the data in the buffer RAM 14. The control unit 11 also performs error correction processing on the buffered read data. The read data is transferred from the buffer RAM 14 to the device interface 13 and transmitted to the host device 2.

ところで不揮発性メモリ15は、物理的な記憶領域のアドレスとして物理アドレスが使用される。これにより物理ブロック(Physical Block)、物理ページ(Physical Page)、物理セクタ(Physical Sector)が設定されている。複数の物理セクタで物理ページが構成され、また複数の物理ページで物理ブロックが構成される。
消去(イレーズ)は物理ブロック単位で行われ、書込(プログラム)及び読出(リード)は物理ページ単位で可能とされる。
ホスト機器2側からのアドレス指定は、論理アドレスが用いられる。論理アドレスによる論理ブロック、論理ページ、論理セクタが、上記の物理アドレスに対応づけられる。即ち制御部11は論理アドレスと物理アドレスを対応づける管理情報を有し、ホスト機器2からのアクセス要求時には、指定される論理アドレスを管理情報を参照して物理アドレスに変換する。そして物理アドレスにより、実際の不揮発性メモリ15へのアクセスを実行する。
By the way, the non-volatile memory 15 uses a physical address as an address of a physical storage area. Thereby, a physical block, a physical page, and a physical sector are set. A physical page is composed of a plurality of physical sectors, and a physical block is composed of a plurality of physical pages.
Erasing (erasing) is performed in units of physical blocks, and writing (programming) and reading (reading) are possible in units of physical pages.
A logical address is used for address designation from the host device 2 side. Logical blocks, logical pages, and logical sectors based on logical addresses are associated with the physical addresses. That is, the control unit 11 has management information for associating a logical address with a physical address, and when an access request is made from the host device 2, converts the designated logical address into a physical address with reference to the management information. Then, the actual nonvolatile memory 15 is accessed using the physical address.

ここで本実施の形態の場合、後述する動作を実行するための機能(ソフトウエアにより実現される処理機能)として、図2に示すようにアクセス制御部31、クローン生成処理部32、管理情報処理部33、評価用情報処理部34、リフレッシュ制御部35を備える。
なお、ここではこれらの機能部位がCPU11の処理として発現するソフトウエア機能として設けられているとするが、これらがハードウエアにより形成されてもかまわない。
また制御部11の管理のもと、例えばSRAM12に、管理情報部41、評価用情報テーブル42としての領域が用意され、管理情報や評価用情報が記憶される。
Here, in the case of the present embodiment, as a function (a processing function realized by software) for executing an operation to be described later, as shown in FIG. 2, an access control unit 31, a clone generation processing unit 32, a management information processing Unit 33, evaluation information processing unit 34, and refresh control unit 35.
In addition, although it is assumed here that these functional parts are provided as software functions that are manifested as processing by the CPU 11, these may be formed by hardware.
Further, under the management of the control unit 11, for example, an area as a management information unit 41 and an evaluation information table 42 is prepared in the SRAM 12, and management information and evaluation information are stored.

管理情報部41は、上述の論理アドレスと物理アドレスの変換情報や、不揮発性メモリ15に記憶されているデータのディレクトリ情報等の管理情報を記憶する。即ち、ホスト機器2からのコマンドに応じて、制御部11が不揮発性メモリ15への書込や読出を実行させるために必要となる情報である。
なお、管理情報では、後述するクローンデータが生成されたデータについては、オリジナルデータとクローンデータの一方をアクセス対象として管理する。つまり或る論理アドレスに対応して、オリジナルデータとクローンデータの一方の物理アドレスが導かれる状態とする。他方のデータについては、アクセス対象ではないデータであって、アクセス対象のデータと同一のデータであるものとして管理する。
The management information unit 41 stores management information such as the above-described logical address / physical address conversion information and directory information of data stored in the nonvolatile memory 15. That is, the information is necessary for the control unit 11 to execute writing to and reading from the nonvolatile memory 15 in accordance with a command from the host device 2.
In the management information, one of the original data and the clone data is managed as an access target for data in which clone data described later is generated. In other words, one physical address of the original data and the clone data is derived corresponding to a certain logical address. The other data is managed as data that is not an access target and is the same data as the access target data.

評価用情報テーブル42は、詳しくは後述するが、各データ単位(一例としては物理ブロック単位)について、信頼性の度合いを評価するための情報としての評価用情報を記憶する。本実施の形態の場合、評価用情報は、各データ単位について、近い将来にリフレッシュ機会に至るか否かを推定するための情報となる。例えば所定のデータ単位毎についての、ビットエラー発生数、読出回数、消去回数の、少なくとも1つを含む情報である。   As will be described in detail later, the evaluation information table 42 stores evaluation information as information for evaluating the degree of reliability for each data unit (physical block unit as an example). In the case of the present embodiment, the evaluation information is information for estimating whether or not each data unit will reach a refresh opportunity in the near future. For example, the information includes at least one of the number of bit error occurrences, the number of reads, and the number of erasures for each predetermined data unit.

なお、管理情報,評価用情報の一方又は両方は、不揮発性メモリ15に常時格納されても良いし、不揮発性メモリ15内に記憶され、起動時にSRAM12に展開されて制御部11によって参照・更新されるようにしてもよい。或いは不揮発性メモリ15以外に不揮発的な記憶領域を用意して、そこに格納してもよい。
即ち管理情報、評価用情報は、不揮発的に保持され、メモリカード1の起動中に制御部11が参照・更新できるようにされていれば、どのような形態で保持されていても良い。
One or both of the management information and the evaluation information may be always stored in the nonvolatile memory 15, or stored in the nonvolatile memory 15, expanded in the SRAM 12 at the time of startup, and referenced / updated by the control unit 11. You may be made to do. Alternatively, a nonvolatile storage area other than the nonvolatile memory 15 may be prepared and stored therein.
That is, the management information and the evaluation information may be held in any form as long as they are held in a nonvolatile manner and can be referred to / updated by the control unit 11 while the memory card 1 is activated.

制御部11におけるアクセス制御部31は、ホスト機器2からのコマンドに応じて不揮発性メモリ15へのデータ書込アクセス又はデータ読出アクセスを実行制御する機能である。アクセス制御部31は管理情報部41の管理情報を参照して、ホスト機器2からのコマンドに対応した不揮発性メモリ15へのアクセスを実行する。   The access control unit 31 in the control unit 11 has a function of executing and controlling data write access or data read access to the nonvolatile memory 15 in accordance with a command from the host device 2. The access control unit 31 refers to the management information in the management information unit 41 and executes access to the nonvolatile memory 15 corresponding to the command from the host device 2.

クローン生成処理部32は、不揮発性メモリ15に記憶されたデータであって、リフレッシュ必要性に関する評価用情報テーブル42の評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、不揮発性メモリ15内に生成する処理を行う機能である。
例えば後述する第1、第3の実施の形態では、クローン生成処理部32は、メモリカード1の起動時に、不揮発性メモリ15に記憶されたデータについて、評価用情報に基づいてリフレッシュ機会が近接しているか否かを判定する。そしてリフレッシュ機会が近接していると判定したデータについて、クローンデータの生成処理を行う。
また第2の実施の形態では、メモリカード1の起動時に、既にリフレッシュ機会が近接しているデータ単位について記憶された評価用情報を参照し、そのデータについてクローンデータの生成処理を行う。
The clone generation processing unit 32 stores the data stored in the nonvolatile memory 15 and determines that the refresh opportunity is close based on the evaluation information in the evaluation information table 42 regarding the need for refresh. This function is a function for generating the same clone data as the original data in the nonvolatile memory 15 using the data as the original data.
For example, in the first and third embodiments to be described later, the clone generation processing unit 32 makes a refresh opportunity close to the data stored in the nonvolatile memory 15 based on the evaluation information when the memory card 1 is activated. It is determined whether or not. Then, clone data generation processing is performed for the data determined to have close refresh opportunities.
In the second embodiment, when the memory card 1 is activated, the evaluation information stored for the data unit in which the refresh opportunity is already close is referred to, and clone data generation processing is performed for the data.

管理情報処理部33は、管理情報部41の内容(管理情報)の更新を行う。特にクローン生成処理部32によってクローンデータが生成された場合は、オリジナルデータとクローンデータのいずれか一方がアクセス対象となるように、管理情報を更新する。
例えば第1、第2の実施の形態では、管理情報処理部33は、クローンデータが生成されたデータについては、クローンデータがアクセス対象となる主データとし、オリジナルデータがアクセス対象とはならない副データとして管理されるように、管理情報を更新する。
さらにその場合において、主データがリフレッシュ機会に至ったと判断される場合、管理情報処理部33は、主副データを入れ替える。つまりオリジナルデータがアクセス対象の主データとして管理されるように、管理情報を更新する。
また管理情報処理部33は、起動時において、クローンデータが生成されているデータについて、主データ又は副データの一方が破棄されるように、管理情報を更新する。
The management information processing unit 33 updates the contents (management information) of the management information unit 41. In particular, when clone data is generated by the clone generation processing unit 32, the management information is updated so that either the original data or the clone data becomes an access target.
For example, in the first and second embodiments, the management information processing unit 33 uses the clone data as the main data to be accessed and the sub data from which the original data is not the access target for the data for which the clone data has been generated. Management information is updated so that it is managed as
Further, in this case, when it is determined that the main data has reached the refresh opportunity, the management information processing unit 33 replaces the main / sub data. That is, the management information is updated so that the original data is managed as main data to be accessed.
Further, the management information processing unit 33 updates the management information so that one of the main data and the sub data is discarded for the data for which the clone data is generated at the time of activation.

また第3の実施の形態では、管理情報処理部33は、クローンデータが生成されたデータについては、オリジナルデータがアクセス対象となる主データとし、クローンデータがアクセス対象とはならない副データとして管理されるように、管理情報を更新する。
その場合において主データがリフレッシュ機会に至った場合、管理情報処理部33は主副データを入れ替える。つまり、クローンデータがアクセス対象の主データとして管理されるように管理情報を更新する。この場合も管理情報処理部33は、起動時において、クローンデータが生成されているデータについて、主データ又は副データの一方が破棄されるように、管理情報を更新する。
In the third embodiment, the management information processing unit 33 manages the data for which the clone data is generated as the main data that is the access target of the original data and the sub data that is not the access target of the clone data. Management information is updated.
In this case, when the main data reaches the refresh opportunity, the management information processing unit 33 replaces the main / sub data. That is, the management information is updated so that the clone data is managed as main data to be accessed. Also in this case, the management information processing unit 33 updates the management information so that one of the main data and the sub data is discarded for the data for which the clone data is generated at the time of activation.

評価用情報処理部34は、不揮発性メモリ15に記憶されたデータのアクセス時に、該データについての信頼性の評価用情報(ビットエラー数等の値)を検出或いは生成し、評価用情報テーブル42に追加・更新を行う。
また評価用情報処理部34は、クローン生成処理部32がクローンデータの生成処理を行ったデータに関する評価用情報を、評価用情報テーブル42からクリアする処理も行う。
また第2の実施の形態の場合、評価用情報処理部34は、不揮発性メモリ15に記憶されたデータのアクセス時に、該データについて、リフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定した場合に、該データについての上記評価用情報を生成し、評価用情報テーブル42に追加する処理を行う。
The evaluation information processing unit 34 detects or generates reliability evaluation information (value such as the number of bit errors) for the data stored in the nonvolatile memory 15 and accesses the evaluation information table 42. Add / update to.
The evaluation information processing unit 34 also performs processing for clearing the evaluation information about the data for which the clone generation processing unit 32 has generated the clone data from the evaluation information table 42.
In the case of the second embodiment, the evaluation information processing unit 34 determines whether or not the refresh opportunity is close to the data stored in the nonvolatile memory 15 and accesses the refresh opportunity. When it is determined that the data are close to each other, the above-described evaluation information for the data is generated and added to the evaluation information table 42.

リフレッシュ制御部35は、不揮発性メモリ15に記憶されているデータのリフレッシュ動作の実行を制御する機能である。リフレッシュ動作は、簡単に言えば、或るデータ単位で、当該データについて、不揮発性メモリ15内の他の領域にコピーする動作である。実質的には、上述のクローンデータ生成と同様の動作となる。本実施の形態の場合、リフレッシュ動作に至ることは希となるが、リフレッシュを行う場合は、リフレッシュ制御部35が不揮発性メモリ15上でのデータコピーによるリフレッシュの実行を制御することになる。
The refresh control unit 35 has a function of controlling execution of a refresh operation for data stored in the nonvolatile memory 15. Simply speaking, the refresh operation is an operation of copying the data to another area in the nonvolatile memory 15 in a certain data unit. The operation is substantially the same as the above-described clone data generation. In the case of the present embodiment, the refresh operation rarely occurs, but when refresh is performed, the refresh control unit 35 controls execution of refresh by data copy on the nonvolatile memory 15.

<2.リフレッシュによる処理速度の低下及びバラツキの解消>

ここで、本実施の形態に至る従前のアクセスの場合の処理速度に関して説明した上で、本実施の形態で処理速度の低下及び速度バラツキを解消する手法の概要について説明する。
<2. Reduction in processing speed and variation due to refresh>

Here, after describing the processing speed in the case of the previous access leading to the present embodiment, an outline of a technique for eliminating the decrease in the processing speed and the speed variation in the present embodiment will be described.

まず図3で、従前の方式でリフレッシュが行われる場合を説明する。
先にも述べたように、近年、NAND型フラッシュメモリのプロセス微細化により、書き込まれたデータを繰り返し読み出し続けるとデータのビット化けが発生する現象が発生しやすくなっており、訂正しきれないほどのビット化けが発生しやすくなってきている。
図3Bには、半導体不揮発性メモリに対するリード/ライト回数と信頼性の関係を示している。図示のように、半導体不揮発性メモリは、読み出し処理や書き換え処理を繰り返し行うことによりデータの信頼性が低下する特性を持つ。
こうした半導体不揮発性メモリを用いた記憶システムにおいて、データの信頼性低下を防ぐ方法として、信頼性を表す値が一定の閾値を超えた場合に、不揮発性メモリ上のデータのリフレッシュを行う手法が用いられている。
具体的には、リード時等にビット化けの発生数や、読み出しや書き換えの回数などが、一定の閾値を超えた場合に即座にリフレッシュ動作を行うようにしていた。
First, referring to FIG. 3, the case where refresh is performed by the conventional method will be described.
As described above, in recent years, due to the process miniaturization of NAND flash memory, the phenomenon that data bits are garbled easily occurs when the written data is repeatedly read, and it cannot be corrected. Bits are becoming more garbled.
FIG. 3B shows the relationship between the number of reads / writes and the reliability of the semiconductor nonvolatile memory. As shown in the figure, the semiconductor nonvolatile memory has a characteristic that the reliability of data is lowered by repeatedly performing the reading process and the rewriting process.
In a storage system using such a semiconductor non-volatile memory, a method of refreshing data on the non-volatile memory is used as a method for preventing a decrease in data reliability when a value representing the reliability exceeds a certain threshold. It has been.
Specifically, the refresh operation is performed immediately when the number of bits garbled at the time of reading or the like, the number of times of reading or rewriting exceeds a certain threshold.

図3Aにその動作を示す。図3では、ホスト機器3、制御部11、不揮発性メモリ15の動作として、従来手法を実行する場合を示している。
ホスト機器2からリードコマンドが送信されると、制御部11は不揮発性メモリ15に対してのリードオペレーションを実行する。これにより不揮発性メモリ15からバッファRAM14にデータが読み出される。この間、不揮発性メモリ15はビジー状態となる。
制御部11はバッファRAM14に読み出したデータに対して、エラー検出、エラー訂正を行い、またエラー検出の結果としてのビット化け数等を判定する。即ち今回読み出したデータについてリフレッシュが必要か否かを判定する。
そしてリフレッシュが必要と判定したら、制御部11はリフレッシュオペレーションを実行する。即ち不揮発性メモリ15において、今回のデータを、不揮発性メモリ15内の他の領域にコピーして、元のデータをコピーデータに置き換える処理を行う。この間、不揮発性メモリ15はビジー状態となる。
リフレッシュが完了したら、読み出したデータを、ホスト機器2に転送する。
FIG. 3A shows the operation. FIG. 3 shows a case where the conventional method is executed as the operation of the host device 3, the control unit 11, and the nonvolatile memory 15.
When a read command is transmitted from the host device 2, the control unit 11 executes a read operation for the nonvolatile memory 15. As a result, data is read from the nonvolatile memory 15 to the buffer RAM 14. During this time, the nonvolatile memory 15 is in a busy state.
The control unit 11 performs error detection and error correction on the data read out to the buffer RAM 14, and determines the number of bits garbled as a result of error detection. That is, it is determined whether or not the data read this time needs to be refreshed.
When it is determined that refresh is necessary, the control unit 11 executes a refresh operation. That is, in the nonvolatile memory 15, the current data is copied to another area in the nonvolatile memory 15, and the original data is replaced with copy data. During this time, the nonvolatile memory 15 is in a busy state.
When the refresh is completed, the read data is transferred to the host device 2.

このように、ビット化け数等の評価指標を用い、それが閾値を超えたら直ぐにリフレッシュを行うことで、訂正しきれないほどのエラーが生じることとなる前にデータを置き換え、信頼性を回復させる。
ところが、このようにリフレッシュ動作を行うと、ホスト機器2からみての処理速度が低下することになる。つまりコマンド発行からリードデータ受信までの時間が長くなる。
In this way, by using an evaluation index such as the number of bits garbled and refreshing as soon as it exceeds the threshold, the data is replaced before an error that cannot be corrected occurs and the reliability is restored. .
However, when the refresh operation is performed in this way, the processing speed viewed from the host device 2 is reduced. That is, the time from command issue to read data reception becomes longer.

また、リフレッシュ動作が起きる場合と起きない場合とで処理速度にバラつきが生じるということもある。
図4は、リフレッシュ動作が行われない場合と行われる場合の処理時間を示している。
ホスト機器2が時点ts1にリードコマンドを送信して、制御部11がリードオペレーションを実行したとする。この場合は、リフレッシュが必要とは判断されず、時点ts2でリードデータがホスト機器2に転送されたとしている。
一方、ホスト機器2が時点ts3にもリードコマンドを送信して、制御部11がリードオペレーションを実行したとする。この場合は、リフレッシュが必要と判断され、リフレッシュオペレーションが実行され、その後、時点ts4でリードデータがホスト機器2に転送されたとしている。
この各場合のように、リフレッシュ動作が実行されるか否かで、ホスト機器2からみての処理時間は、時間T1、T2と大きく異なる。
In addition, the processing speed may vary depending on whether the refresh operation occurs or not.
FIG. 4 shows the processing time when the refresh operation is not performed and when it is performed.
It is assumed that the host device 2 transmits a read command at time ts1 and the control unit 11 executes a read operation. In this case, it is not determined that the refresh is necessary, and it is assumed that the read data is transferred to the host device 2 at the time ts2.
On the other hand, it is assumed that the host device 2 also transmits a read command at time ts3 and the control unit 11 executes a read operation. In this case, it is determined that refresh is necessary, a refresh operation is performed, and then read data is transferred to the host device 2 at time ts4.
As in each of these cases, the processing time seen from the host device 2 differs greatly from the times T1 and T2 depending on whether or not the refresh operation is executed.

これらの状況に対し、本実施の形態では、不揮発性メモリ15のデータの信頼性を維持しつつ、リフレッシュ動作が行われる機会を最小限とし、処理速度低下の防止や処理時間のバラツキを殆ど発生しなくなるようにする。
このため本実施の形態では、データの信頼性を表す値が一定の閾値を超えた時など、リフレッシュ動作が必要に迫られた場合ではなく、信頼性を示す値(評価用情報)を用いてリフレッシュ動作がいずれ必要となる可能性が高いデータを推測し、事前にそのデータをクローンデータとして複製する。これにより読み出し時の処理速度を低下させることなく信頼性低下を防ぐ。
For these situations, in the present embodiment, while maintaining the reliability of the data in the nonvolatile memory 15, the opportunity to perform the refresh operation is minimized, and the processing speed is prevented from being reduced and the processing time is almost varied. Try not to.
For this reason, in the present embodiment, a value indicating reliability (evaluation information) is used instead of a case where a refresh operation is required, such as when a value indicating the reliability of data exceeds a certain threshold. Data that is likely to require a refresh operation is estimated, and the data is copied as clone data in advance. This prevents a decrease in reliability without reducing the processing speed during reading.

具体例は第1〜第3の実施の形態として後述するが、本例の場合、処理時間に関しては殆どの場合、図5に示すようになる。
図5において、ホスト機器2が時点ts11にリードコマンドを送信して、制御部11がリードオペレーションを実行したとする。この場合は、リフレッシュが必要とは判断されず、時点ts12でリードデータがホスト機器2に転送されたとしている。
一方、ホスト機器2が時点ts13にもリードコマンドを送信して、制御部11がリードオペレーションを実行したとする。この場合は、リフレッシュが必要と判断される状況だったとする。しかしこの場合、リフレッシュオペレーションは実行せず、管理情報を更新する。これは、それまでクローンデータとオリジナルデータの一方が、管理情報上でアクセス対象のデータとされていたところ、これを入れ替えて、他方をアクセス対象のデータとする処理である。
この処理を行って、時点ts14でリードデータをホスト機器2に転送する。
Specific examples will be described later as first to third embodiments. In this example, the processing time is almost as shown in FIG.
In FIG. 5, it is assumed that the host device 2 transmits a read command at time ts11 and the control unit 11 executes a read operation. In this case, it is not determined that refresh is necessary, and it is assumed that the read data is transferred to the host device 2 at time ts12.
On the other hand, it is assumed that the host device 2 also transmits a read command at time ts13 and the control unit 11 executes a read operation. In this case, it is assumed that the situation is determined to require refreshing. In this case, however, the refresh operation is not executed and the management information is updated. This is a process in which one of the clone data and the original data is the data to be accessed in the management information until then, and the other is replaced with the data to be accessed.
This processing is performed, and the read data is transferred to the host device 2 at time ts14.

管理情報の更新は、リフレッシュ動作に比べて極めて短い時間で完了できる。この結果、リフレッシュ必要性の判定に関わらず、ホスト機器2からみての処理時間は、時間T3、T4で殆ど変わらない。
また、リフレッシュ必要性の判定がなされたとしても、その後は、アクセス対象がクローンデータとオリジナルデータの間で置き換えられているため、次回のアクセス時からのデータの信頼性は回復されている。
The management information update can be completed in an extremely short time compared to the refresh operation. As a result, the processing time viewed from the host device 2 hardly changes between times T3 and T4 regardless of the determination of the necessity of refresh.
Even if the necessity of refresh is determined, since the access target is replaced between the clone data and the original data after that, the reliability of the data from the next access is recovered.

<3.第1の実施の形態>
[3−1:動作概要]

以下、具体的な処理例として第1の実施の形態を説明する。
第1の実施の形態は、メモリカード1の起動時に、信頼性を表す値をもとに記録した評価用情報を用いて、不揮発性メモリ15に記憶されている各データにつき、リフレッシュ動作が近い将来に必要となるか否かを推測する。
この判定の対象の各データとは、例えば物理ブロック単位のデータとして説明するが、これに限られない。消去単位が物理ブロックであるため、少なくとも物理ブロック単位の以上の単位のデータであればよい。例えば管理情報上で、1つのデータファイルとして管理される単位でもよいし、データファイルをいくつかに分割した単位でもよい。また複数の物理ブロックの単位でもよい。
<3. First Embodiment>
[3-1: Operation overview]

Hereinafter, the first embodiment will be described as a specific processing example.
In the first embodiment, when the memory card 1 is activated, the refresh operation is similar for each data stored in the nonvolatile memory 15 using the evaluation information recorded based on the value representing the reliability. Guess if it will be needed in the future.
Each data to be determined is described as data in units of physical blocks, for example, but is not limited thereto. Since the erasure unit is a physical block, it is sufficient that the data is at least a unit of the physical block unit. For example, a unit managed as one data file on the management information may be used, or a unit obtained by dividing the data file into several units may be used. It may be a unit of a plurality of physical blocks.

リフレッシュ動作が近く必要になると判定されたデータについては、事前に(起動時に)クローンデータを複製する。即ち該当データを、不揮発性メモリ15内でオリジナルデータとクローンデータという形で2重に保持する。管理情報上では、クローンデータとオリジナルデータの一方をアクセス対象のデータとして管理する。
なお、管理情報において、アクセス対象として管理されるデータ、つまりホストからのコマンドに応じてアクセスされるデータを説明上「主データ」とし、他方を「副データ」ということとする。
第1の実施の形態では、クローンデータ側を主データとする。
For data determined to require a refresh operation soon, clone data is copied in advance (at startup). That is, the corresponding data is held in the nonvolatile memory 15 in the form of original data and clone data. On the management information, one of clone data and original data is managed as access target data.
In the management information, data managed as an access target, that is, data accessed in response to a command from the host is referred to as “main data”, and the other is referred to as “sub data”.
In the first embodiment, the clone data side is the main data.

実際に、ホスト機器2からのアクセス要求があった場合は、制御部11は管理情報に基づいて主データのアクセスを行い、読み出されたデータをホスト機器2に転送する。
この場合に、読み出したデータが、即時リフレッシュが必要な状態になっていたら、主データと副データを入れ替える。これによりデータ信頼性を回復させる。
Actually, when there is an access request from the host device 2, the control unit 11 accesses the main data based on the management information, and transfers the read data to the host device 2.
In this case, if the read data is in a state that requires immediate refresh, the main data and the sub data are switched. This restores data reliability.

このような動作を、図6で、不揮発性メモリ15内の或るデータDTを代表例として、その変遷を模式的に示す。状態ST0〜ST6として、各時点での不揮発性メモリ15内でのデータDTに関する状態を示している。データDTとは、例えば1つの物理ブロック単位などである。   FIG. 6 schematically shows the transition of such an operation with a certain data DT in the nonvolatile memory 15 as a representative example. As states ST0 to ST6, states relating to the data DT in the nonvolatile memory 15 at each time point are shown. The data DT is, for example, one physical block unit.

例えば起動時に、図6の状態ST0であるとする。即ち不揮発性メモリ15内にあるデータDTが記憶されているとする。ここでデータDTについて、図6では「DTm」「DTs」の表記をしているが、「DTm」は、上記の主データ、つまり管理情報において、リードコマンドに応じたアクセス対象として管理されているデータを意味する。一方、「DTs」は、アクセス対象としては管理されていない副データを意味する。クローンデータが形成されていないデータDTについては、当然「DTm]となる。   For example, assume that the state is the state ST0 in FIG. That is, it is assumed that data DT in the nonvolatile memory 15 is stored. Here, the data DT is represented as “DTm” and “DTs” in FIG. 6, but “DTm” is managed as an access target according to the read command in the main data, that is, the management information. Means data. On the other hand, “DTs” means secondary data that is not managed as an access target. Of course, the data DT for which no clone data is formed is “DTm”.

まず起動時に、制御部11は各データ単位について、リフレッシュ動作が近く必要になるか否かを判定する。状態ST0におけるデータDTmが、リフレッシュ動作が近く必要に成るデータでは無いと判断したときは、そのままである。即ち状態ST1として、その後のリードコマンドに対しては、データDTmがアクセス対象となる。   First, at the time of activation, the control unit 11 determines whether or not a refresh operation is necessary for each data unit. When it is determined that the data DTm in the state ST0 is not data that will soon require a refresh operation, it remains as it is. That is, in the state ST1, the data DTm becomes an access target for the subsequent read command.

一方、データDTmについて、リフレッシュ機会が近接していると判断される場合は、状態ST2に示すように、クローンデータを生成する。
さらに、状態ST3として、生成したクローンデータを主データ、オリジナルデータを副データとするように管理情報の更新を行う。
従ってその後のリードコマンドに対しては、クローンデータであるデータDTmがアクセス対象となる。クローンデータは、この時点でフレッシュなデータであり、オリジナルデータに比して信頼性が回復されたものとなっている。そのため、その後のリード機会があっても、かなりのリード回数までは、即時リフレッシュ必要と判定されることは、殆ど無い。
On the other hand, if it is determined that the refresh opportunity is close for data DTm, clone data is generated as shown in state ST2.
Further, in the state ST3, the management information is updated so that the generated clone data is the main data and the original data is the sub data.
Therefore, for subsequent read commands, the data DTm, which is clone data, becomes an access target. The clone data is fresh data at this point, and reliability is restored compared to the original data. Therefore, even if there is a subsequent read opportunity, it is rarely determined that an immediate refresh is necessary until a considerable number of reads.

この状態ST3で通常のメモリカード1の動作が継続して行われた後、一旦、ホスト機器2からの接続が解消、或いはホスト機器2電源オフなどに伴って、メモリカード1の動作がオフとされたとする。そしてその後、ホスト機器2との接続、或いはホスト機器2の電源オンなどに伴って、メモリカード1が起動されたとする。
その場合の起動時は、状態ST5となっている。この場合には、主データと副データの一方、例えば副データDTsを破棄(消去)する。そして状態ST0に戻り、上記同様の処理を行う。副データ(オリジナルデータ側)を破棄するのは、そのオリジナルデータが、前回の起動時においてリフレッシュ機会近接と判断され、信頼性が比較的低下しているためである。つまり主データ(クローンデータ側)を残した方が、信頼性の点で好適と考えられるためである。
なお、クローンデータ側も、前回の起動中に非常に多数回アクセスされるなどして、信頼性が低下し、リフレッシュ機会が近接している場合もある。ところがその場合は、今回の起動時に状態ST0→ST2として、前回のクローンデータをオリジナルとして、新たにクローンデータが生成されることとなるため、信頼性は回復される。
After the normal operation of the memory card 1 is continuously performed in this state ST3, the operation of the memory card 1 is turned off once the connection from the host device 2 is canceled or the host device 2 is turned off. Suppose that After that, it is assumed that the memory card 1 is activated in connection with connection with the host device 2 or power-on of the host device 2.
At the time of starting in that case, the state is ST5. In this case, one of the main data and the sub data, for example, the sub data DTs is discarded (erased). Then, the process returns to the state ST0 and the same processing as described above is performed. The reason why the sub-data (original data side) is discarded is that the original data is judged to be close to the refresh opportunity at the time of the previous activation, and the reliability is relatively lowered. That is, it is considered that it is preferable to leave the main data (clone data side) in terms of reliability.
Note that the clone data side may be accessed very many times during the previous activation, resulting in a decrease in reliability and close refresh opportunities. However, in this case, since the clone data is newly generated with the previous clone data as the original in the state ST0 → ST2 at the time of this activation, the reliability is restored.

ところで、上記のように状態ST3で通常のメモリカード1の動作が継続して行われた場合において、或る時点でのデータDTmのリードの際に、即時リフレッシュが必要と判断されることがある。
その場合は、状態ST4として示すように、主データと副データを入れ替えるように管理情報を更新する。この場合、クローンデータが主データとされていたところを、オリジナルデータが主データとされるように管理情報を更新する。
従って、その後のリード機会が発生すると、オリジナルデータ側がアクセスされることとなる。
By the way, when the normal operation of the memory card 1 is continuously performed in the state ST3 as described above, it may be determined that an immediate refresh is necessary when reading the data DTm at a certain time. .
In this case, as shown as state ST4, the management information is updated so that the main data and the sub data are exchanged. In this case, the management information is updated so that the original data is the main data where the clone data is the main data.
Therefore, when a subsequent read opportunity occurs, the original data side is accessed.

オリジナルデータ側は起動時に、リフレッシュ機会近接と判断されたデータであるが、これは、即時リフレッシュが必要とされるレベルではない。従って、まだ正常なデータ読出は十分に可能である。
従ってこの場合は、もしもクローンデータ側がリフレッシュ必要の状態までも信頼性が悪化したとしても、オリジナルデータ側で伴うことで、そのリード時点で即時のリフレッシュを行う必要性を解消するという意味を持つ。
そもそも、状態ST3においてはフレッシュなデータであるクローンデータ側が主データとされているため、継続起動中に、そのクローンデータ側が即時リフレッシュ必要と判定されることは希である。起動中によほどの回数のリードが、同一のデータに集中したような場合である。このような希な場合であったとしても、もしデータDTm(クローンデータ側)が即時リフレッシュ必要とされた場合は、オリジナルデータ側を用いることで、即時のリフレッシュ動作を不要とできるということである。
The original data side is data determined to be close to a refresh opportunity at the time of activation, but this is not a level that requires immediate refresh. Accordingly, normal data reading is still possible.
Therefore, in this case, even if the reliability is deteriorated even when the clone data side needs to be refreshed, it is accompanied by the original data side, thereby eliminating the necessity of performing an immediate refresh at the time of reading.
In the first place, since the clone data side, which is fresh data, is the main data in the state ST3, it is rare that the clone data side is determined to be immediately refreshed during the continuous activation. This is a case where a large number of reads are concentrated on the same data during startup. Even in such a rare case, if the data DTm (clone data side) is required to be refreshed immediately, the use of the original data side can eliminate the need for an immediate refresh operation. .

この状態ST4で通常のメモリカード1の動作が継続して行われた後、オフとされ、さらにその後メモリカード1が起動された場合は、状態ST6となっている。この場合も、主データと副データの一方、例えば副データDTsを破棄(消去)する。そして状態ST0に戻り、上記同様の処理を行う。
ここで副データ(この場合はクローンデータ側)を破棄するのは、そのクローンデータが、既に即時リフレッシュ必要と判断され、信頼性が低下しているためである。つまり主データ(オリジナルデータ側)を残した方が、まだ信頼性の点で好適と考えられるためである。
なお、この場合のオリジナルデータ側は、前回の起動時にリフレッシュ機会近接と判断されているため、信頼性はさほど高くない。ところが、今回の起動時に状態ST0→ST2として、再び当該オリジナルデータ側をオリジナルとして、新たにクローンデータが生成されることとなるため、信頼性は回復される。
If the normal operation of the memory card 1 is continued in this state ST4 and then turned off, and then the memory card 1 is activated, the state ST6 is entered. Also in this case, one of the main data and the sub data, for example, the sub data DTs is discarded (erased). Then, the process returns to the state ST0 and the same processing as described above is performed.
The reason why the sub data (in this case, the clone data side) is discarded is that the clone data has already been determined to be immediately refreshed, and reliability has been lowered. In other words, it is because it is still considered preferable in terms of reliability to leave the main data (original data side).
In this case, since the original data side is determined to be close to the refresh opportunity at the previous activation, the reliability is not so high. However, since the clone data is newly generated with the original data side as the original again in the state ST0 → ST2 at the time of this activation, the reliability is restored.

上記の状態ST4で、通常のメモリカード1の動作が継続して行われた場合において、或る時点でのデータDTm(この場合オリジナルデータ側)のリードの際に、即時リフレッシュが必要と判断されることがある。
その場合は、信頼性低下に対処するため、データDTmについてのリフレッシュ動作を行う。
上述のようにそもそも状態ST4に至ること(クローンデータ側が即時リフレッシュ必要となること)ことが希である。その上で、状態ST4において動作が継続され、オリジナルデータ側も即時リフレッシュ必要となるのは、さらに希である。従って、実際上、リフレッシュ動作を実行する機会は殆ど無いと言える。但し、皆無とは言えないため、その場合の補償として、リフレッシュ動作が用意される。
When the normal operation of the memory card 1 is continuously performed in the above-described state ST4, it is determined that an immediate refresh is necessary when reading the data DTm (in this case, the original data side) at a certain point in time. Sometimes.
In that case, a refresh operation is performed on the data DTm in order to deal with a decrease in reliability.
As described above, it is rare that the state ST4 is originally reached (the clone data side needs immediate refresh). In addition, it is rare that the operation is continued in the state ST4 and the original data side needs to be immediately refreshed. Therefore, it can be said that there is practically no opportunity to execute the refresh operation. However, since it cannot be said that there is nothing, a refresh operation is prepared as compensation in that case.

リフレッシュ動作が行われた後は、状態ST4に戻ると考えれば良い。但しその場合のデータDTmは、信頼性が回復されている。
その後、メモリカード1の動作がオフとされ、さらにその後メモリカード1が起動された場合は、状態ST6となっている。この場合も、主データと副データの一方、例えば副データDTsを破棄(消去)する。そして状態ST0に戻り、上記同様の処理を行う。
ここで副データ(この場合はクローンデータ側)を破棄するのは、そのクローンデータが、既に即時リフレッシュ必要と判断され、信頼性が低下しているためである。一方、この場合の主データは、リフレッシュデータであり、信頼性が回復されているためである。
なお、リフレッシュデータ側も、前回の起動中のリフレッシュ後に非常に多数回アクセスされるなどして、信頼性が低下し、リフレッシュ機会が近接している場合もある。ところがその場合は、今回の起動時に状態ST0→ST2として、前回のリフレッシュデータをオリジナルとして、新たにクローンデータが生成されることとなるため、信頼性は回復される。
It may be considered that after the refresh operation is performed, the state returns to the state ST4. However, the reliability of the data DTm in that case is recovered.
After that, when the operation of the memory card 1 is turned off and the memory card 1 is further activated, the state is ST6. Also in this case, one of the main data and the sub data, for example, the sub data DTs is discarded (erased). Then, the process returns to the state ST0 and the same processing as described above is performed.
The reason why the sub data (in this case, the clone data side) is discarded is that the clone data has already been determined to be immediately refreshed, and reliability has been lowered. On the other hand, the main data in this case is refresh data, and the reliability has been recovered.
Note that the refresh data side may be accessed very many times after the refresh during the previous activation, so that the reliability is lowered and the refresh opportunity is close. However, in this case, the clone data is newly generated with the previous refresh data as the original in the state ST0 → ST2 at the time of the current activation, so that the reliability is recovered.

第1の実施の形態では、概略以上のようにデータDTが変遷し、これによって信頼性の維持と、リフレッシュ動作の最小限化によるアクセス時間の減少、安定化が実現できる。
In the first embodiment, the data DT changes as described above, thereby maintaining the reliability and reducing the access time and stabilizing by minimizing the refresh operation.

[3−2:評価用情報]

ここで、制御部11が起動時に行うリフレッシュ機会近接の判断のための評価用情報について説明する。
上記の図6で例示したデータDT(DTm、DTs)とは、一例としては物理ブロック単位のデータである。その場合、不揮発性メモリ15に記憶されているデータについて、リフレッシュ機会近接の判断を行うには、評価用情報が、物理ブロック毎に、信頼性を評価できる情報となっていればよい。
[3-2: Information for evaluation]

Here, the evaluation information for determining the proximity of the refresh opportunity performed by the control unit 11 at startup will be described.
The data DT (DTm, DTs) illustrated in FIG. 6 is, for example, data in units of physical blocks. In that case, in order to determine the proximity of the refresh opportunity for the data stored in the nonvolatile memory 15, the evaluation information only needs to be information that can evaluate the reliability for each physical block.

消去単位とされる物理ブロックは、図7Aのように複数の物理ページPUで構成される(ページナンバ0〜nの物理ページ)。
1つの物理ブロックに対する評価用情報としては、物理ブロック全体に対して各種の値を記憶しても良いし、物理ページ毎に各種の値を記憶してもよい。
A physical block as an erasure unit is composed of a plurality of physical pages PU as shown in FIG. 7A (physical pages with page numbers 0 to n).
As evaluation information for one physical block, various values may be stored for the entire physical block, or various values may be stored for each physical page.

図7Bに、或る1つの物理ブロックPBxに対応する評価用情報の例を示す。
この例では、物理ページ毎に、エマージェンシーレベル、前回のエマージェンシーレベル、前々回のエマージェンシーレベル、エマージェンシーレベルの累積数、エマージェンシーレベルの最大数、リード回数、消去(書換)回数の各値を、評価用情報とするものとしている。
また、この物理ブロックPBx全体としての、エマージェンシーレベルの累積数、エマージェンシーレベルの最大数、リード回数、消去(書換)回数も記憶するものとしている。
FIG. 7B shows an example of evaluation information corresponding to one certain physical block PBx.
In this example, for each physical page, the emergency level, the previous emergency level, the previous emergency level, the cumulative number of emergency levels, the maximum number of emergency levels, the number of reads, the number of erases (rewrites), and the evaluation information It is supposed to be.
Further, the cumulative number of emergency levels, the maximum number of emergency levels, the number of reads, and the number of erasures (rewrites) as a whole of the physical block PBx are also stored.

エマージェンシーレベルとは、例えばリード時のビットエラー(ビット化け)数をそのまま用いてもよい。或いは、ビットエラー数を複数の範囲に区切って、該当する緊急レベルの値を形成するようにしてもよい。いずれにしてもエマージェンシーレベルとは、リフレッシュの必要性が推測できる情報であればよい。
そしてエマージェンシーレベルとしては、例えば各物理ページでのリード時のビットエラー数として、今回(リード時)と、前回、前々回の数を記憶する。もちろん、さらに過去のリード時にさかのぼって記憶しておいてもよい。
またビットエラーの累積数、これまでの最大数も、信頼性の推測に利用できる。
また、各物理ページ毎のリード回数、消去回数も、信頼性の推測に利用できる。
As the emergency level, for example, the number of bit errors (bit corruption) at the time of reading may be used as it is. Alternatively, the number of bit errors may be divided into a plurality of ranges to form a corresponding emergency level value. In any case, the emergency level may be information that can be used to estimate the necessity of refresh.
As the emergency level, for example, as the number of bit errors at the time of reading in each physical page, the current (at the time of reading) and the previous and previous times are stored. Of course, you may go back and memorize at the time of the past lead.
The cumulative number of bit errors and the maximum number so far can also be used for reliability estimation.
In addition, the number of reads and the number of erases for each physical page can also be used for reliability estimation.

この図7Bは、あくまでも評価用情報の内容の一例に過ぎない。
例えばあくまでも物理ブロック単位で、データの信頼性を評価できれば良いため、物理ページ毎の情報を評価用情報に含めなくても良い。即ち図7Bの右端の物理ブロックPBx全体についてのエマージェンシーレベルの累積数、エマージェンシーレベルの最大数、リード回数、消去(書換)回数のみを、評価用情報の内容としてもよい。
或いは、各物理ページ毎の情報を記憶しておけば、物理ブロック単位での各情報の値は算出できるため、各物理ページ毎の情報のみを評価用情報の内容としてもよい。
また、例えばページナンバ0の物理ページなど、1つ(或いは複数)の物理ページのみのビットエラー数等を記憶し、それを物理ブロックを代表する評価値として扱っても良い。
また、評価用情報に含める情報内容は、上記以外にも考えられる。エマージェンシーレベルのみでも良いし、リード回数のみでもよい。また消去回数のみでもよい。
FIG. 7B is merely an example of the content of the evaluation information.
For example, since it is only necessary to evaluate the reliability of data in units of physical blocks, it is not necessary to include information for each physical page in the evaluation information. That is, only the cumulative number of emergency levels, the maximum number of emergency levels, the number of reads, and the number of erases (rewrites) for the entire physical block PBx at the right end in FIG. 7B may be used as the contents of the evaluation information.
Alternatively, if the information for each physical page is stored, the value of each information can be calculated in units of physical blocks, so only the information for each physical page may be used as the content of the evaluation information.
Further, for example, the number of bit errors of only one (or a plurality of) physical pages such as a physical page of page number 0 may be stored and handled as an evaluation value representing a physical block.
Further, the information content included in the evaluation information may be considered other than the above. Only the emergency level or the number of reads may be used. Further, only the number of erasures may be used.

ここでは上述のクローンデータ生成を物理ブロック単位で行う場合を想定して、評価用情報は物理ブロック単位で持つ必要としたが、例えばクローンデータ生成を複数物理ブロックの単位や、データファイル単位などとすることも考えられる。その場合、その複数物理ブロック単位であったり、データファイル単位毎に、評価用情報が設けられれば良い。それらの場合は、各物理ブロックのエマージェンシーレベル等が記憶されても良いし、代表する一部の物理ブロックのエマージェンシーレベル等が記憶されても良い。もちろんその場合に物理ページでのエマージェンシーレベル等の情報が記憶されても良い。   Here, assuming that the above-described clone data generation is performed in units of physical blocks, it is necessary to have the evaluation information in units of physical blocks. For example, clone data generation may be performed in units of multiple physical blocks, data files, or the like. It is also possible to do. In that case, the evaluation information may be provided in units of the plurality of physical blocks or in units of data files. In those cases, the emergency level of each physical block may be stored, or the emergency levels of some representative physical blocks may be stored. Of course, information such as an emergency level in a physical page may be stored in that case.

第1の実施の形態では、このような評価用情報の各値を、リード時やライト(消去/書換)時に、追加又は更新して記憶していく。
或る物理ブロックPBxや物理ページPUに対しての、リード或いはライトの際に毎回、その物理ブロックPBx或いは物理ページPUに対しての情報内容を更新していってもよいし、所定アクセス回数おきに更新するようにしてもよい。またリード回数が所定値mで割り切れる場合のみエマージェンシーレベルを記憶するなどとしてもよいし、或いはリード回数や消去(書換/ライト回数が所定の回数(例えば1回目、10回目、50回目、100回目・・・など)となったときに、エマージェンシーレベルを記憶するような例も考えられる。これらのように或る条件に合致した場合のみ、評価用情報を更新記録するようにしても良い。
In the first embodiment, each value of such evaluation information is added or updated and stored at the time of reading or writing (erasing / rewriting).
The information content for the physical block PBx or physical page PU may be updated every time the physical block PBx or physical page PU is read or written. You may make it update to. The emergency level may be stored only when the read count is divisible by the predetermined value m, or the read count or erase (the rewrite / write count is a predetermined count (for example, the first time, the tenth time, the 50th time, the 100th time) In other cases, the emergency level may be stored when the condition is met, etc. The evaluation information may be updated and recorded only when certain conditions are met.

また、保持しておく情報数は、物理ページ単位或いは物理ブロック単位ごとに1つと限定しない。
例えば1つの物理ブロックPBxについて、今回のエマージェンシーレベルを時点k0の評価用情報として記憶するとしたときに、時点k1,k2・・・という各時点で、物理ブロックPBxに対する評価用情報を追加的に記憶保持していくことも考えられる。
Further, the number of pieces of information to be held is not limited to one per physical page unit or physical block unit.
For example, when the current emergency level is stored as evaluation information at the time point k0 for one physical block PBx, the evaluation information for the physical block PBx is additionally stored at each time point k1, k2,. It is possible to keep it.

評価用情報のリセット(クリア)は、起動時、クローンデータ生成時、または、対応するデータ単位(物理ブロック等)の書き換え(消去)時などとするとよい。但し、書き換え(消去)回数の情報を含める場合は、書換回数の値は原則リセット(クリア)しないものとすることが適切である。   The evaluation information may be reset (cleared) at the time of activation, when clone data is generated, or when the corresponding data unit (physical block or the like) is rewritten (erased). However, when information on the number of times of rewriting (erasing) is included, it is appropriate that the value of the number of times of rewriting should not be reset (cleared) in principle.

このような評価用情報は、情報を更新するたびに不揮発性メモリ15上に記録しても良いし、システム内のSRAM12などに一時的に記録し、一定のタイミングで、不揮発性メモリ15に記録するようにしても良い。   Such evaluation information may be recorded on the nonvolatile memory 15 every time the information is updated, or temporarily recorded in the SRAM 12 or the like in the system, and recorded in the nonvolatile memory 15 at a fixed timing. You may make it do.

起動時のリフレッシュ機会近接の判断の際には、その時点で記憶されている各物理ブロックについてのエマージェンシーレベル、リード回数、消去回数等から、各物理ブロックが、近い将来にリフレッシュが必要となるか否かを推定する情報(信頼性の情報)を算出する。或いは、記憶されている各情報を、そのまま信頼性の情報として用いても良い。
When determining the proximity of a refresh opportunity at startup, whether each physical block needs to be refreshed in the near future based on the emergency level, read count, erase count, etc. for each physical block stored at that time Information for estimating whether or not (reliability information) is calculated. Alternatively, each stored information may be used as reliability information as it is.

[3−3:処理例]

第1の実施の形態として、図6で説明した動作を実現するための制御部11の処理を説明する。以下説明する処理は、制御部11が図2で説明した各機能を備えることで実行されるものである。
[3-3: Processing example]

As the first embodiment, a process of the control unit 11 for realizing the operation described in FIG. 6 will be described. The process described below is executed by the control unit 11 having the functions described in FIG.

図8はメモリカード1の起動時に制御部11が実行する処理を示している。図2の機能構成に沿っていえば、ステップF101は管理情報処理部33の機能、ステップF102〜F104はクローン生成処理部32の機能、ステップF105は管理情報処理部33と評価用情報処理部34の機能により実行される。   FIG. 8 shows processing executed by the control unit 11 when the memory card 1 is activated. 2, step F101 is a function of the management information processing unit 33, steps F102 to F104 are functions of the clone generation processing unit 32, and step F105 is a process of the management information processing unit 33 and the evaluation information processing unit 34. Performed by function.

ステップF101で制御部11は、主副データの一方を破棄する処理を行う。不揮発性メモリ15に記憶されている各データ単位については、過去にクローンデータ生成が行われ、管理情報上で主データと副データが存在するものがある。そのため、起動時には一旦この状態を解消する目的で、主副データが存在するデータ単位を管理情報から検索し、該当するデータ単位について、主副データの一方を破棄する。
具体的には、主データ又は副データの一方の管理状態を解消するように管理情報を更新すればよく、実際にこの時点で、不揮発性メモリ15上でデータ消去を行う必要は無い。
第1の実施の形態の場合、図6の状態ST5,ST6で説明したように、副データを破棄することとなる。
このステップF101の処理により、不揮発性メモリ15に記憶された全てのデータは、起動時に図6の状態ST0のようになる。
In step F101, the control unit 11 performs processing for discarding one of the main and sub data. For each data unit stored in the non-volatile memory 15, clone data is generated in the past, and there are main data and sub data in the management information. Therefore, at the time of activation, for the purpose of once canceling this state, a data unit in which main / sub data is present is retrieved from the management information, and one of the main / sub data is discarded for the corresponding data unit.
Specifically, the management information may be updated so as to cancel the management state of one of the main data and the sub data, and it is not actually necessary to erase data on the nonvolatile memory 15 at this time.
In the case of the first embodiment, as described in the states ST5 and ST6 in FIG. 6, the sub data is discarded.
By the process of step F101, all data stored in the nonvolatile memory 15 is in a state ST0 in FIG. 6 at the time of activation.

ステップF102で制御部11は、各データについて評価用情報の解析を行う。例えばデータ記憶が為されている各物理ブロックについて、それぞれ評価用情報を解析し、その物理ブロックが、近い将来にリフレッシュ機会となるであろう程度に信頼性が低下しているか否かを判定する。判定の具体例は後述する。   In step F102, the control unit 11 analyzes the evaluation information for each data. For example, for each physical block in which data is stored, the evaluation information is analyzed, and it is determined whether or not the reliability of the physical block is lowered to the extent that it will become a refresh opportunity in the near future. . A specific example of the determination will be described later.

全てのデータについて、リフレッシュ機会近接ではないと判断した場合は、ステップF103から図8の処理を終える。これは全てのデータが図6の状態ST1となる場合である。   If it is determined that all the data are not in the vicinity of the refresh opportunity, the processing of FIG. This is a case where all data is in the state ST1 in FIG.

少なくとも1つ以上のデータについて、リフレッシュ機会近接と判断した場合、制御部11はステップF103からF104に進み、クローンデータ生成を行う。即ちそのリフレッシュ機会近接と判断したデータについて、コピーデータを不揮発性メモリ15内の他の領域に生成する。当該データは図6の状態ST2となる。
さらに制御部11は、ステップF105で管理情報の更新及び不要な評価用情報のクリアを行う。
管理情報については、生成したクローンデータをアクセス対象の主データとし、オリジナルデータを副データとするように更新する。即ち図6の状態ST3とする。
評価用情報としては、クローンデータを生成したデータについては、その時点ではオリジナルデータの物理ブロックの、それまでの評価用情報であり、現時点以降はクローンデータがアクセスされることから、不要としてクリアする。
但し、図6で状態ST4においてオリジナルデータ側がアクセスされ、その後、状態ST0に至ることもあり、その際に必要として、クリアしないような処理も考えられる。(付言すれば、この場合でも、実際にオリジナルデータ側がアクセスされることで新たに評価用情報が生成されるため、必ずしもクリアしないで保存しておく必要は無い。)
When it is determined that at least one or more pieces of data are close to the refresh opportunity, the control unit 11 proceeds from step F103 to F104 to generate clone data. That is, for the data determined to be close to the refresh opportunity, copy data is generated in another area in the nonvolatile memory 15. The data is in the state ST2 in FIG.
Further, the control unit 11 updates management information and clears unnecessary evaluation information in step F105.
The management information is updated so that the generated clone data is the main data to be accessed and the original data is the sub data. That is, state ST3 in FIG.
As the information for evaluation, the data for which the clone data has been generated is the information for evaluation of the physical block of the original data at that time, and since the clone data is accessed after this time, it is cleared as unnecessary. .
However, in FIG. 6, the original data side may be accessed in state ST4, and then the state ST0 may be reached, and processing that is not cleared is necessary as necessary. (Additionally, even in this case, since the evaluation information is newly generated when the original data side is actually accessed, it is not always necessary to clear and store the information.)

以上のように、クローンデータ生成が行われた場合、リフレッシュ機会近接と判断されたデータ(例えば物理ブロック単位)は図6の状態ST3となり、他のデータは状態ST1となる。
制御部11は以上の処理を起動時に行った後、ホスト機器2からのコマンドを待機する。
As described above, when clone data is generated, data determined to be close to the refresh opportunity (for example, physical block unit) is in the state ST3 in FIG. 6, and other data is in the state ST1.
The control unit 11 waits for a command from the host device 2 after performing the above processing at startup.

図9は、ホスト機器2からのリードコマンドが送信された際の制御部11の処理を示している。
図2の機能構成に即していえば、ステップF151、F158はアクセス制御部31の機能、ステップF152は評価用情報処理部34の機能、ステップF153→F154→F156はリフレッシュ制御部35の機能、ステップF153→F154→F155は管理情報処理部33の機能、ステップF157は管理情報処理部33及び評価用情報処理部34の機能として実行される。
FIG. 9 shows processing of the control unit 11 when a read command is transmitted from the host device 2.
2, steps F151 and F158 are functions of the access control unit 31, steps F152 are functions of the information processing unit for evaluation 34, steps F153 → F154 → F156 are functions of the refresh control unit 35, and steps. F153 → F154 → F155 is executed as a function of the management information processing unit 33, and step F157 is executed as a function of the management information processing unit 33 and the evaluation information processing unit 34.

ホスト機器2からのリードコマンドがあると、制御部11はステップF151で不揮発性メモリ15へのリードオペレーションを実行する。即ちリードコマンドにおいて論理アドで指定されたデータについて管理情報を参照して物理アドレスに変換し、不揮発性メモリ15の当該物理アドのデータを読み出してバッファRAM14に転送させる。また、制御部11はバッファRAM14に取り込んだデータについて、エラー検出・エラー訂正処理を行う。   When there is a read command from the host device 2, the control unit 11 executes a read operation to the nonvolatile memory 15 in step F151. That is, the data specified by the logical add in the read command is converted into a physical address with reference to the management information, and the data of the physical add in the nonvolatile memory 15 is read and transferred to the buffer RAM 14. Further, the control unit 11 performs error detection / error correction processing on the data fetched into the buffer RAM 14.

ステップF152で制御部11は、評価用情報の更新を行う。例えば今回のリードにおけるビットエラー数を、評価用情報に追加し、またリード回数を+1するように評価用情報を更新する。   In step F152, the control unit 11 updates the evaluation information. For example, the number of bit errors in the current read is added to the evaluation information, and the evaluation information is updated so that the number of reads is incremented by one.

ここで制御部11はステップF153で、例えばビットエラー数が所定の閾値を超えた数値であったか否か、或いはリード回数が閾値以上となったか否かなどとして、今回のリードデータについて信頼性判断を行う。ここでいう信頼性判断とは、即時リフレッシュが必要な程度にまで信頼性が低下しているか否かの判断である。
それらの条件に該当せず、信頼性が維持されていると判断された場合は、そのままステップF158に進んで、リードデータをホスト機器2に送信させる。つまりバッファRAM14に取り込み、エラー訂正をしたデータを、デバイスインターフェース13を介してホスト機器2に送信させる。
Here, in step F153, the control unit 11 determines the reliability of the current read data, for example, whether the number of bit errors exceeds a predetermined threshold or whether the number of reads exceeds a threshold. Do. Here, the reliability determination is a determination as to whether or not the reliability has decreased to the extent that immediate refresh is necessary.
If it is determined that the reliability is maintained without satisfying these conditions, the process proceeds to step F158 and the read data is transmitted to the host device 2. That is, the data that has been taken into the buffer RAM 14 and error-corrected is transmitted to the host device 2 via the device interface 13.

一方、ステップF153の時点で信頼性低下、即ち今後の信頼性維持のためにはリフレッシュが必要な状況と判断された場合は、制御部11はステップF154で、現在の主データ、つまり今回読み出したデータが、起動時にクローンデータとして生成したものか、オリジナルデータであるかにより、処理を分岐する。   On the other hand, if it is determined at step F153 that the reliability is reduced, that is, it is necessary to refresh to maintain the reliability in the future, the control unit 11 reads the current main data, that is, this time, at step F154. The processing branches depending on whether the data is generated as clone data at the time of activation or is original data.

ステップF154の時点で、主データがクローンデータであるのは、図6の状態ST3の場合である。この場合は、制御部11はステップF155に進み、管理情報の更新を行う。この場合は、主データと副データを入れ替えるように管理情報を更新する。従って、起動時のオリジナルデータ側を主データとし、クローンデータ側を副データとする。即ち図6の状態ST4とする。
そしてステップF158でリードデータを転送してアクセスコマンドに対応した処理を終える。
この場合、次のリードコマンド発生時には、起動時のオリジナルデータ側が主データとして読み出されることになる。
At step F154, the main data is clone data in the case of state ST3 in FIG. In this case, the control unit 11 proceeds to step F155 and updates the management information. In this case, the management information is updated so that the main data and the sub data are exchanged. Therefore, the original data side at the time of activation is set as main data, and the clone data side is set as sub data. That is, state ST4 in FIG.
In step F158, the read data is transferred and the processing corresponding to the access command is completed.
In this case, when the next read command is generated, the original data side at the time of activation is read as main data.

またステップF154で、主データがクローンデータでないのは、図6の状態ST4、又は状態ST1の場合である。
ここで状態ST4となっている場合とは、クローンデータがリフレッシュ必要となった後、さらにオリジナルデータ側までもがリフレッシュ必要な状況に至った場合となる。
そこで、制御部11はステップF156でデータのリフレッシュ動作を実行させる。
そしてリフレッシュ動作に伴って、ステップF157で管理情報と評価用情報を更新する。管理情報については、リフレッシュ動作でコピーした新たなデータを、主データとするように更新する。評価用情報については、今回のリフレッシュ動作により、これまでの評価用情報は不要となるため、これをクリアする。
そしてステップF158でリードデータを転送してアクセスコマンドに対応した処理を終える。
In step F154, the main data is not clone data in the case of state ST4 or state ST1 in FIG.
Here, the case where the state is ST4 is a case where after the clone data is required to be refreshed, the original data side is also required to be refreshed.
Therefore, the control unit 11 causes a data refresh operation to be executed in step F156.
With the refresh operation, the management information and the evaluation information are updated in step F157. The management information is updated so that the new data copied by the refresh operation becomes the main data. With respect to the evaluation information, since the previous evaluation information is no longer necessary by the current refresh operation, it is cleared.
In step F158, the read data is transferred and the processing corresponding to the access command is completed.

なお、ステップF154で状態ST1であって、主データがクローンデータでないと判断される場合もリフレッシュ動作、及び管理情報の更新と評価用情報のクリアが行われる。ただし、状態ST1となっているのは、起動時にリフレッシュ機会が未だ遠いと判断されたデータであるので、このような事態は希である。   Even when it is determined in step F154 that the state is ST1 and the main data is not clone data, the refresh operation, the management information update, and the evaluation information are cleared. However, since the state ST1 is data that has been determined that the refresh opportunity is still far from the start-up, such a situation is rare.

制御部11が以上の図8,図9の処理を行うことで、図6で説明した動作が実現されることとなる。   The operation described with reference to FIG. 6 is realized by the control unit 11 performing the processes of FIGS.

ここで、図8のステップF102での評価用情報を用いたリフレッシュ機会近接の判定処理の例を述べておく。
ここでは、ビットエラー発生数、リード回数、書換(消去)回数を含む評価用情報を用いて、リフレッシュ動作が近く必要となるか否かを推測するのに用いる判断基準値を導きだす例を3例示す。
第1例と第2例では、記録したビットエラー発生数、リード回数をもとに一次方程式を求め、不揮発性メモリ15から読み出しができなくなる限界を迎えるまでの読み出し回数を逆算する。そして限界を迎えるまでの残り読み出し回数が少ないデータ(物理ブロック等)を、リフレッシュ機会近接と判断するものである。
第3例は、ビットエラー発生数、リード回数をそのまま判断基準値とするものである。
Here, an example of the refresh opportunity proximity determination process using the evaluation information in step F102 of FIG. 8 will be described.
In this example, the evaluation reference value including the number of bit error occurrences, the number of reads, and the number of rewrites (erase) is used to derive a criterion value used to estimate whether or not a refresh operation is necessary soon. For example.
In the first example and the second example, a linear equation is obtained based on the number of recorded bit errors and the number of reads, and the number of times of reading until the limit at which reading from the nonvolatile memory 15 becomes impossible is calculated. Data (physical block or the like) with a small number of remaining readings until the limit is reached is determined as a refresh opportunity proximity.
In the third example, the number of bit error occurrences and the number of reads are directly used as judgment reference values.

・第1例
データ毎(例えば物理ブロック毎)に、当該データ内のリード回数(x)の時のビットエラー累積数(y)と、その後の時点のリード回数(x+n)の時のビットエラー発生数の累積数(y+m)の2点の値から一次方程式を導き出す。このとき、上記2点の間隔(n)は、書換(消去)回数の累積数をもとに決定するとする。但し任意の間隔でもよい。例えばn=50とした場合、例えばリード回数50回目と100回目の値となる。実際の判定の際には、どのリード回数時点での評価用情報が保存されているかにも依存するが、例えば最も新しいリード回数時点と、それよりもn回前のリード回数時点の値とすればよい。
First example For each data (for example, for each physical block), a bit error occurs when the number of read times (x) in the data is the number of read times (x) and the number of read times (x + n) thereafter A linear equation is derived from the two values of the cumulative number (y + m) of the number. At this time, the interval (n) between the two points is determined based on the cumulative number of rewrite (erase) times. However, any interval may be used. For example, when n = 50, the values are, for example, the 50th and 100th reads. The actual determination depends on the number of read times at which the evaluation information is stored, but for example, the most recent read time point and the value of the read number time n times before that are used. That's fine.

図10Aに、リード回数とエマージェンシーレベルの座標上の一次方程式を破線で示している。エマージェンシーレベルとは、この場合ビットエラー累積数に相当する。
導き出した一次方程式を用いて、不揮発性メモリ15から読み出しできなくなる限界を迎える読み出し回数を算出する。例えばビットエラー累積数E1が、信頼性限度とすると、一次方程式から、リード回数の限界はN1回となる。
ここで、限界を迎える迄の残りのリード回数はN1−N2のNR回となる。このNR回を、或る閾値と比較し、残り回数が少ないか否かを判定することで、リフレッシュ機会近接か否かを判定できる。
In FIG. 10A, a linear equation on the coordinates of the number of reads and the emergency level is indicated by a broken line. In this case, the emergency level corresponds to the cumulative number of bit errors.
Using the derived linear equation, the number of readings reaching the limit at which reading from the nonvolatile memory 15 becomes impossible is calculated. For example, if the bit error accumulation number E1 is a reliability limit, the limit of the number of reads is N1 from the linear equation.
Here, the remaining number of reads until reaching the limit is N1-N2 NR times. By comparing the NR times with a certain threshold and determining whether or not the remaining number is small, it is possible to determine whether or not the refresh opportunity is close.

・第2例
各データについて、リード回数が一定の回数に達するごとに、その時のビットエラー発生数の最大数をもとに、最小二乗法を用いて一次方程式の近似式を算出する。図10Bに近似式で求めた一次方程式を破線で示している。
導き出した一次方程式(近似式)を用いて、上記の第1例と同様、不揮発性メモリ15が読み出しできなくなる限界を迎える読み出し回数を逆算する。例えばリード回数の限界数N1回を求める。そして、限界を迎える迄の残りのリード回数はN1−N2のNR回を求め、このNR回を、或る閾値と比較し、残り回数が少ないか否かを判定する。これによりリフレッシュ機会近接か否かを判定できる。
Second Example For each data, each time the number of reads reaches a certain number, an approximate expression of a linear equation is calculated using the least square method based on the maximum number of bit error occurrences at that time. The linear equation calculated | required by the approximate expression is shown with the broken line in FIG. 10B.
Using the derived linear equation (approximate equation), the number of readings reaching the limit at which the non-volatile memory 15 cannot be read is calculated in the same manner as in the first example. For example, the limit number N1 of the number of reads is obtained. The remaining number of reads until reaching the limit is obtained as N1-N2 NR times, and this NR number is compared with a certain threshold value to determine whether the remaining number is small. This makes it possible to determine whether or not the refresh opportunity is close.

なお、第1例、第2例のどちらの場合も、必要に応じて、一次方程式の傾きに書換(消去)回数の累積回数を係数として考慮しても良い。   In either case of the first example or the second example, the accumulated number of rewrites (erasures) may be considered as a coefficient in the slope of the linear equation as necessary.

・第3例
各データ(例えば各物理ブロック)でのビットエラー発生数の最大数を判断基準値とし、最大数が多い上位一定数のデータ(例えば物理ブロック)を、リフレッシュ機会近接と判断する。つまり、各物理ブロックのうちで、相対的にビットエラー発生数の多い物理ブロックを抽出し、それを、リフレッシュ機会近接の物理ブロックとする。
最大数が同数となる物理ブロックが、複数存在する場合には、物理ブロックでのリード回数も併せて判断基準値として用い、リード回数が多い方を優先とするものとする。
なお、ビットエラー発生数の最大数は少ないが、物理ブロックでのリード回数は一定の基準値以上あるような場合、上記の別枠として、リフレッシュ機会近接の物理ブロックと判断するようにしてもよい。
Third Example The maximum number of bit error occurrences in each data (for example, each physical block) is used as a determination reference value, and the upper fixed number of data (for example, physical blocks) having the largest maximum number is determined to be near the refresh opportunity. That is, a physical block having a relatively large number of bit error occurrences is extracted from each physical block, and is set as a physical block near the refresh opportunity.
When there are a plurality of physical blocks having the same maximum number, the number of reads in the physical block is also used as a determination reference value, and the higher number of reads is given priority.
If the maximum number of bit errors is small but the number of reads in a physical block is greater than or equal to a certain reference value, it may be determined as a physical block close to a refresh opportunity as another frame.

以上、第1の実施の形態について説明してきたが、第1の実施の形態により次のような効果が得られる。
従来手法では、リフレッシュ動作が必要となった場合には即座にリフレッシュ動作を行ってしまうため、リード時のパフォーマンスの低下を引き起こす。また、対象のデータのビットエラーの発生数がある閾値を超えたか否かなど内部的な要因によってリフレッシュ動作を開始するため、リード時のパフォーマンスにバラつきが起こる。
これに対して本実施の形態の手法では、まず図6の状態ST3の場合には、主データ(クローンデータ側)について、読出限界の回数まで繰り返しリードできる。つまり図11で信頼性限度E1となるようなリード回数N1まで、リードし続けることができる。さらに繰り返し読み出し続けたことによりデータのビット化けが多くなるなどでリフレッシュ必要となった場合でも、状態ST4に移行して、主データ(オリジナルデータ側)について、さらに読出限界の回数まで繰り返しリードできる。
結局、データの信頼性を維持したままで、リード時にリフレッシュ動作を行うという機会を殆ど無くすことができ、リード時のパフォーマンス(読出処理時間)の低下やバラツキは殆どなくなる。
Although the first embodiment has been described above, the following effects can be obtained by the first embodiment.
In the conventional method, when a refresh operation is required, the refresh operation is immediately performed, which causes a decrease in performance during reading. Further, since the refresh operation is started by an internal factor such as whether or not the number of occurrences of bit errors in the target data exceeds a certain threshold value, the read performance varies.
On the other hand, in the method of the present embodiment, first, in the case of state ST3 in FIG. 6, the main data (clone data side) can be repeatedly read up to the number of times of reading limit. That is, it is possible to continue to read until the number of times of reading N1 that becomes the reliability limit E1 in FIG. Further, even when refreshing is necessary due to the repeated data being read and the data becomes garbled, the process moves to the state ST4 and the main data (original data side) can be repeatedly read up to the number of times of reading limit.
Eventually, the opportunity to perform a refresh operation at the time of reading while maintaining the reliability of data can be almost eliminated, and there is almost no decrease in performance (reading processing time) and variations at the time of reading.

また、起動時に複製したクローンデータを主データとして管理し、オリジナルデータ側を副データとすることで、クローンデータを複製するごとに評価用情報もリセット(クリア)できる。このため、次回の起動時には、リフレッシュ動作がいずれ必要となると推測される可能性が下がる。
このため、1起動内において特定のデータへの読み出し回数が著しく多い場合を除き、起動するたびに、前回の起動時のオリジナルデータとは別のデータ(前回のクローンデータ)からのクローンデータが必要であれば複製される。よって、起動をくり返すような使用状況下においては、リフレッシュ動作が近く必要となるようなデータが存在しない、データとしての信頼性が高い状態を維持することができる。
Further, by managing the clone data replicated at the time of activation as the main data and using the original data side as the secondary data, the evaluation information can be reset (cleared) each time the clone data is replicated. For this reason, at the next start-up, there is a lower possibility that a refresh operation will be necessary.
For this reason, unless the number of readings to specific data within one start-up is extremely large, each time start-up requires clone data from data different from the original data at the previous start-up (previous clone data) If so, it is duplicated. Therefore, under a use situation where the activation is repeated, there is no data that needs a refresh operation soon, and it is possible to maintain a highly reliable state as data.

また、クローンデータを複製する前提条件としてのリフレッシュ機会近接の判定において、上記の第1例、第2例では、限界を迎える迄の残りリード回数が一定の基準回数以上に満たないデータをリフレッシュ機会近接とする。これにより、近々にリフレッシュ動作の必要となる対象データがないような場合に、無駄に不揮発性メモリ15の記憶領域を使用してのクローンデータ複製をしないようにすることができる。これは不揮発性メモリ15の各領域の使用頻度を必要以上に多くしないことになり好適である。
第3例のように、ビットエラー発生数の最大数が一定の基準数以上あるものをリフレッシュ機会近接と判断してクローンデータ生成対象とする場合も、同様である。
In addition, in the determination of the proximity of refresh opportunities as a precondition for replicating clone data, in the first example and the second example described above, data for which the remaining number of reads until reaching the limit is less than a certain reference number is refreshed. Proximity. As a result, when there is no target data that needs to be refreshed in the near future, it is possible to avoid duplicating clone data using the storage area of the nonvolatile memory 15 in vain. This is preferable because the frequency of use of each area of the nonvolatile memory 15 is not increased more than necessary.
The same applies to a case where the maximum number of bit error occurrences equal to or greater than a certain reference number is determined as a refresh opportunity proximity and is targeted for clone data generation as in the third example.

<4.第2の実施の形態>

続いて第2の実施の形態について説明する。
第2の実施の形態は、制御部11(評価用情報処理部34)が、不揮発性メモリ15に記憶されたデータのアクセス時に、該データについて、リフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定した場合に、該データについての評価用情報を生成するようにするものである。そして制御部11(クローン生成処理部32)は、起動時に、評価用情報に基づいて、リフレッシュ機会が近接していると判定されたデータについて、クローンデータの生成処理を行う
<4. Second Embodiment>

Next, a second embodiment will be described.
In the second embodiment, when the control unit 11 (the evaluation information processing unit 34) accesses the data stored in the nonvolatile memory 15, the control unit 11 determines whether or not the refresh opportunity is close to the data. When it is determined that refresh opportunities are close, evaluation information for the data is generated. Then, the control unit 11 (clone generation processing unit 32) performs clone data generation processing on data that is determined to be close to the refresh opportunity based on the evaluation information at the time of activation.

例えば図12Aに示すように、評価用情報テーブル42として、x個の記憶枠を設定しておく。ここでは物理ブロック単位で評価用情報を記憶するとした場合に、物理ブロックナンバと、その物理ブロックのリード時に発生したビットエラー数を、必要に応じて評価用情報として各記憶枠に記憶するものとする。
例えば或る物理ブロックに対してリードを行った場合に、その物理ブロックから読み出したデータにおいて発生したビットエラー数が所定数以上の場合に、リフレッシュ機会近接と判定し、当該物理ブロックのナンバ(物理ブロックアドレス)と、ビットエラー数を、評価用情報テーブル42に追加する。
For example, as shown in FIG. 12A, x storage frames are set as the evaluation information table 42. Here, when the evaluation information is stored in units of physical blocks, the physical block number and the number of bit errors generated when reading the physical block are stored in each storage frame as evaluation information as necessary. To do.
For example, when a read is performed on a physical block and the number of bit errors occurring in data read from the physical block is greater than or equal to a predetermined number, it is determined that the refresh opportunity is close and the number of the physical block (physical Block address) and the number of bit errors are added to the evaluation information table 42.

図12に示しているのは、一例として、ビットエラー数が4個以上の場合に、リフレッシュ機会近接と判断して、評価用情報テーブル42を更新する例である。
図12Aは、起動後に行われたアクセスにおいて、物理ブロックPB105、PB8、PB35、PB36において、ビットエラー数が4以上だった場合に、その時点で評価用情報テーブル42に記憶された評価用情報の内容を示している。
その後も、ホスト機器2からのリードコマンドに応じてデータ読出が行われるが、例えば物理ブロックPB210のリード時にビットエラー数が6であったとしたら、その情報が図12Bの斜線部のように評価用情報テーブル42に追加される。以降も同様にビットエラー数の多い物理ブロックの情報が評価用情報として追加される。
FIG. 12 shows an example in which when the number of bit errors is 4 or more, it is determined that the refresh opportunity is close and the evaluation information table 42 is updated.
FIG. 12A shows an example of the evaluation information stored in the evaluation information table 42 at that time when the number of bit errors in the physical blocks PB105, PB8, PB35, and PB36 is 4 or more in the access performed after activation. The contents are shown.
Thereafter, data is read in response to a read command from the host device 2. For example, if the number of bit errors is 6 when reading the physical block PB210, the information is for evaluation as indicated by the hatched portion in FIG. 12B. It is added to the information table 42. Similarly, information on physical blocks with a large number of bit errors is added as evaluation information.

図12Cは、さらに斜線部の評価用情報が追加され、評価用情報テーブル42のx個の記憶枠が全て埋まった状態を示している。
このような状態になった後のアクセスにより、例えばビットエラー数の多い、物理ブロックが発見されたら、例えば記憶されている評価用情報においてビットエラー数の少ない物理ブロックの内容を書き換えるようにするとよい。
例えば新たに物理ブロックPB511のアクセス時にビットエラー数が6であったとしたら、図12Cの時点の評価用情報テーブル内でビットエラー数が最小の4である物理ブロックPB36を削除し、図12Dの斜線部のように、物理ブロックPB511の評価用情報を記憶させる。
FIG. 12C shows a state in which the evaluation information in the shaded area is further added and all the x storage frames in the evaluation information table 42 are filled.
For example, if a physical block with a large number of bit errors is discovered by accessing after such a state, for example, the contents of the physical block with a small number of bit errors in the stored evaluation information may be rewritten. .
For example, if the number of bit errors is 6 when the physical block PB511 is newly accessed, the physical block PB36 having the smallest number of bit errors of 4 is deleted from the evaluation information table at the time of FIG. As in the section, the evaluation information of the physical block PB511 is stored.

このようにすることで評価用情報テーブル42は、リフレッシュ機会近接と推定されるx個以下の物理ブロックが示されることとなる。
起動時には、制御部11は評価用情報テーブル42に挙げられている物理ブロックは、自動的にリフレッシュ機会近接の物理ブロックと判断すれば良い。
なお、ここでは物理ブロックを単位として評価用情報を記憶することとしたが、もちろん評価用情報を生成する単位の「データ」としては、データファイル単位、複数の物理ブロック単位などでもよい。
By doing so, the evaluation information table 42 indicates x or less physical blocks estimated to be close to the refresh opportunity.
At the time of activation, the control unit 11 may automatically determine that the physical block listed in the evaluation information table 42 is a physical block near the refresh opportunity.
Here, the evaluation information is stored in units of physical blocks. However, as a unit of “data” for generating the evaluation information, a data file unit, a plurality of physical block units, or the like may be used.

図13、図14で第2の実施の形態の処理を説明する。
なお第2の実施の形態においてデータ状態の変遷は、図6で説明した第1の実施の形態のものと同様であるため、図6を参照しながら説明する。
The processing of the second embodiment will be described with reference to FIGS.
In the second embodiment, the transition of the data state is the same as that of the first embodiment described with reference to FIG. 6, and will be described with reference to FIG.

図13はメモリカード1の起動時に制御部11が実行する処理を示している。図2の機能構成に沿っていえば、ステップF201は管理情報処理部33の機能、ステップF202、F203はクローン生成処理部32の機能、ステップF204は管理情報処理部33と評価用情報処理部34の機能により実行される。   FIG. 13 shows processing executed by the control unit 11 when the memory card 1 is activated. 2, step F201 is a function of the management information processing unit 33, steps F202 and F203 are functions of the clone generation processing unit 32, and step F204 is a process of the management information processing unit 33 and the evaluation information processing unit 34. Performed by function.

ステップF201で制御部11は、主副データの一方を破棄する処理を行う。第1の実施の形態の場合と同様、図6の状態ST5,ST6で説明したように副データを破棄する。
このステップF201の処理により、不揮発性メモリ15に記憶された全てのデータは、起動時に図6の状態ST0となる。
In step F201, the control unit 11 performs processing for discarding one of the main and sub data. As in the case of the first embodiment, the sub data is discarded as described in the states ST5 and ST6 of FIG.
By the process of step F201, all data stored in the nonvolatile memory 15 is in the state ST0 in FIG. 6 at the time of activation.

ステップF202で制御部11は、クローンデータ生成の必要性により、処理を分岐する。この第2の実施の形態の場合、上述したように、評価用情報テーブル42に挙げられているデータ(物理ブロック単位等)があれば、それがリフレッシュ機会近接のデータとされる。即ちステップF202では、制御部11は評価用情報テーブル42に1以上のデータが記憶されているか否かを判定する。
評価用情報テーブル42に1つもデータが挙げられていなければ、ステップF202から図13の処理を終える。これは全てのデータが図6の状態ST1となる場合である。
In step F202, the control unit 11 branches the process depending on the necessity of generating clone data. In the case of the second embodiment, as described above, if there is data (such as a physical block unit) listed in the evaluation information table 42, it is regarded as data near the refresh opportunity. That is, in step F202, the control unit 11 determines whether or not one or more data is stored in the evaluation information table 42.
If no data is listed in the evaluation information table 42, the processing of FIG. 13 is terminated from step F202. This is a case where all data is in the state ST1 in FIG.

少なくとも1つ以上のデータが評価用情報テーブル42に挙げられていた場合、制御部11はステップF202からF203に進み、クローンデータ生成を行う。即ちリフレッシュ機会近接と判断されていたデータについて、コピーデータを不揮発性メモリ15内の他の領域に生成する。当該データは図6の状態ST2となる。
さらに制御部11は、ステップF204で管理情報の更新及び不要な評価用情報のクリアを行う。第1の実施の形態の図8のステップF105と同様の処理である。
結果として、クローンデータ生成が行われたデータ(例えば物理ブロック単位)は図6の状態ST3となり、他のデータは状態ST1となる。
制御部11は以上の処理を起動時に行った後、ホスト機器2からのコマンドを待機する。
If at least one or more data is listed in the evaluation information table 42, the control unit 11 proceeds from step F202 to F203, and generates clone data. That is, copy data is generated in another area in the nonvolatile memory 15 for the data that has been determined to be close to the refresh opportunity. The data is in the state ST2 in FIG.
In step F204, the control unit 11 updates management information and clears unnecessary evaluation information. This is the same processing as step F105 in FIG. 8 of the first embodiment.
As a result, the data (for example, physical block unit) for which clone data has been generated is in the state ST3 in FIG. 6, and the other data is in the state ST1.
The control unit 11 waits for a command from the host device 2 after performing the above processing at startup.

図14は、ホスト機器2からのリードコマンドが送信された際の制御部11の処理を示している。
図2の機能構成に即していえば、ステップF251、F259はアクセス制御部31の機能、ステップF252→F255→F257はリフレッシュ制御部35の機能、ステップF252→F255→F256は管理情報処理部33の機能、ステップF253,F254は評価用情報処理部34の機能、ステップF258は管理情報処理部33及び評価用情報処理部34の機能として実行される。
FIG. 14 shows processing of the control unit 11 when a read command is transmitted from the host device 2.
2, steps F251 and F259 are functions of the access control unit 31, steps F252 → F255 → F257 are functions of the refresh control unit 35, and steps F252 → F255 → F256 are functions of the management information processing unit 33. Steps F253 and F254 are executed as functions of the evaluation information processing unit 34, and step F258 is executed as functions of the management information processing unit 33 and the evaluation information processing unit 34.

ホスト機器2からのリードコマンドがあると、制御部11はステップF251で不揮発性メモリ15へのリードオペレーションを実行する。即ちリードコマンドにおいて論理アドで指定されたデータについて管理情報を参照して物理アドレスに変換し、不揮発性メモリ15の当該物理アドのデータを読み出してバッファRAM14に転送させる。また、制御部11はバッファRAM14に取り込んだデータについて、エラー検出・エラー訂正処理を行う。   When there is a read command from the host device 2, the control unit 11 executes a read operation to the nonvolatile memory 15 in step F251. That is, the data specified by the logical add in the read command is converted into a physical address with reference to the management information, and the data of the physical add in the nonvolatile memory 15 is read and transferred to the buffer RAM 14. Further, the control unit 11 performs error detection / error correction processing on the data fetched into the buffer RAM 14.

ここで制御部11はステップF252で、例えばビットエラー数が所定の閾値を超えた数値であったか否か、或いはリード回数が閾値以上となったか否かなどとして、今回のリードデータについて信頼性判断を行う。即ち、即時リフレッシュが必要な程度にまで信頼性が低下しているか否かの判断である。   Here, in step F252, the control unit 11 determines the reliability of the current read data, for example, whether the number of bit errors is a numerical value exceeding a predetermined threshold or whether the number of reads exceeds a threshold. Do. That is, it is a determination as to whether or not the reliability has decreased to such an extent that an immediate refresh is necessary.

それらの条件に該当せず、信頼性が維持されていると判断された場合は、ステップF253に進む。ここで制御部11は、当該アクセス対象のデータが、近い将来にリフレッシュ機会となるであろう程度に信頼性が低下しているか否かを判定する。
この場合、例えばステップF252の信頼性判断より緩い条件で、信頼性が低下傾向にあるか否かを判断することなどが考えられる。
例えばビットエラー数がp回というのを第1の閾値として、ステップF252の信頼性判断に用いる場合に、q回(但しq<p)というのをリフレッシュ機会近接の判断のための第2の閾値とする。
リード回数や書換回数なども管理しておき、それらについて、即時リフレッシュ必要か否かの信頼性判断よりも緩やかな条件でリフレッシュ機会近接判断にもちいてもよい。
If it is determined that the reliability is maintained without satisfying these conditions, the process proceeds to step F253. Here, the control unit 11 determines whether or not the reliability of the access target data has decreased to the extent that it will become a refresh opportunity in the near future.
In this case, for example, it is conceivable to determine whether or not the reliability tends to be lowered under conditions looser than the reliability determination in step F252.
For example, when the number of bit errors is p times as the first threshold value and used for the reliability determination in step F252, q times (where q <p) is the second threshold value for determining the proximity of the refresh opportunity. And
The number of reads and the number of rewrites are also managed, and these may be used for the refresh opportunity proximity determination under milder conditions than the reliability determination of whether or not immediate refresh is necessary.

アクセス対象のデータについて、リフレッシュ機会近接ではないと判断した場合は、制御部11はそのままステップF259に進み、リードデータをホスト機器2に送信させる。つまりバッファRAM14に取り込み、エラー訂正をしたデータを、デバイスインターフェース13を介してホスト機器2に送信させる。   If it is determined that the access target data is not near the refresh opportunity, the control unit 11 proceeds to step F259 as it is and transmits read data to the host device 2. That is, the data that has been taken into the buffer RAM 14 and error-corrected is transmitted to the host device 2 via the device interface 13.

一方、ステップF253でリフレッシュ機会近接と判断した場合は、制御部11は、そのデータに関する評価用情報を評価用情報テーブル42に追加するように、評価用情報テーブル42の更新を行う。即ち、図12で説明した処理である。このステップF254で追加され、その後も評価用情報テーブル42に評価用情報が保持されたデータが、次の起動時に図13のステップF203でのクローンデータ生成対象のデータとなる。   On the other hand, when it is determined in step F253 that the refresh opportunity is close, the control unit 11 updates the evaluation information table 42 so as to add the evaluation information related to the data to the evaluation information table 42. That is, the processing described with reference to FIG. The data added in this step F254 and holding the evaluation information in the evaluation information table 42 thereafter becomes the clone data generation target data in step F203 in FIG.

一方、ステップF252の時点で信頼性低下、即ち今後の信頼性維持のためにはリフレッシュが必要な状況と判断された場合は、制御部11はステップF255で、現在の主データ、つまり今回読み出したデータが、起動時にクローンデータとして生成したものか、オリジナルデータであるかにより、処理を分岐する。   On the other hand, if it is determined at step F252 that the reliability is lowered, that is, it is necessary to refresh to maintain the reliability in the future, the control unit 11 reads the current main data, that is, this time, at step F255. The processing branches depending on whether the data is generated as clone data at the time of activation or is original data.

ステップF255の時点で、主データがクローンデータであるのは、図6の状態ST3の場合である。この場合は、制御部11はステップF256に進み、管理情報の更新を行う。この場合は、主データと副データを入れ替えるように管理情報を更新する。従って、起動時のオリジナルデータ側を主データとし、クローンデータ側を副データとする。即ち図6の状態ST4とする。
そしてステップF259でリードデータを転送してアクセスコマンドに対応した処理を終える。この場合、次のリードコマンド発生時には、起動時のオリジナルデータ側が主データとして読み出されることになる。
At step F255, the main data is clone data in the case of state ST3 in FIG. In this case, the control unit 11 proceeds to step F256 and updates the management information. In this case, the management information is updated so that the main data and the sub data are exchanged. Therefore, the original data side at the time of activation is set as main data, and the clone data side is set as sub data. That is, state ST4 in FIG.
In step F259, the read data is transferred and the processing corresponding to the access command is completed. In this case, when the next read command is generated, the original data side at the time of activation is read as main data.

またステップF255で、主データがクローンデータでないのは、図6の状態ST4、又は状態ST1の場合である。
ここで状態ST4となっている場合とは、クローンデータがリフレッシュ必要となった後、さらにオリジナルデータ側までもがリフレッシュ必要な状況に至った場合となる。
そこで、制御部11はステップF257でデータのリフレッシュ動作を実行させる。
そしてリフレッシュ動作に伴って、ステップF258で管理情報と評価用情報を更新する。管理情報については、リフレッシュ動作でコピーした新たなデータを、主データとするように更新する。評価用情報については、今回のリフレッシュ動作により、これまでの評価用情報は不要となるため、これをクリアする。
そしてステップF259でリードデータを転送してアクセスコマンドに対応した処理を終える。
なお、ステップF255の時点で状態ST1であって、主データがクローンデータでないと判断される場合もリフレッシュ動作、及び管理情報の更新と評価用情報のクリアが行われる。
In step F255, the main data is not clone data in the case of state ST4 or state ST1 in FIG.
Here, the case where the state is ST4 is a case where after the clone data is required to be refreshed, the original data side is also required to be refreshed.
Therefore, the control unit 11 executes a data refresh operation in step F257.
With the refresh operation, the management information and the evaluation information are updated in step F258. The management information is updated so that the new data copied by the refresh operation becomes the main data. With respect to the evaluation information, since the previous evaluation information is no longer necessary by the current refresh operation, it is cleared.
In step F259, the read data is transferred and the processing corresponding to the access command is completed.
Even when it is determined that the main data is not clone data in the state ST1 at the time of step F255, the refresh operation, the management information update, and the evaluation information are cleared.

制御部11が以上の図13,図14の処理を行うことで、図6で説明した動作であって、かつ評価用情報に追加更新時にリフレッシュ機会近接の判断が行われる第2の実施の形態の動作が実現されることとなる。   The second embodiment in which the control unit 11 performs the processes of FIGS. 13 and 14 described above, and the operation described in FIG. 6 is performed, and the determination of the proximity of the refresh opportunity is performed when the evaluation information is additionally updated. Will be realized.

このような第2の実施の形態では、第1の実施の形態の効果に加え、次の効果が得られる。即ち。第1の実施の形態では、起動時に評価用情報をもとに判断基準値を導き、リフレッシュ機会近接判断を行う例を示したが、第2の実施の形態では、起動時にはこのような判断を全データについて行う必要は無い。従って起動時の制御部11の処理負担が軽減される。
また、リフレッシュ動作が近い将来に必要となる判断(推測)されるデータが存在しない場合には、評価用情報テーブル42には何も評価用情報が記録されない。従って、評価用情報の記録量(サイズ)を絞ることができる。
In the second embodiment as described above, the following effects are obtained in addition to the effects of the first embodiment. That is. In the first embodiment, an example in which a determination reference value is derived based on evaluation information at the time of startup and a refresh opportunity proximity determination is performed has been described. In the second embodiment, such a determination is performed at the time of startup. There is no need to do this for all data. Therefore, the processing load on the control unit 11 at the time of activation is reduced.
Further, when there is no data to be judged (estimated) that will be required in the near future for the refresh operation, no evaluation information is recorded in the evaluation information table 42. Therefore, the recording amount (size) of the evaluation information can be reduced.

なお、図12では、評価用情報テーブル42において保存する評価用情報の記憶枠をx個としたが、特に制限を設けず、ステップF253でリフレッシュ機会近接と判断されるデータは全て(容量的に可能な限り)評価用情報を保存するようにしてもよい。
また評価用情報の内容としては、図12のような物理ブロックに対応するビットエラー数だけでなく、リード回数、書換回数を用いても良いし、これらを併用してもよい。
さらに、結果的に評価用情報テーブル42に挙げられたデータ(物理ブロック等)を全てクローンデータ生成対象とするのであれば、評価用情報テーブル42には、リード時にリフレッシュ機会近接と判断されたデータの識別情報(例えば物理ブロックアドレス)のみを記憶するようにしても良い。
In FIG. 12, the number of storage frames for evaluation information stored in the evaluation information table 42 is x. However, no particular limitation is imposed, and all data determined to be close to the refresh opportunity in step F253 (capacitatively). Information for evaluation may be stored (as much as possible).
As the contents of the evaluation information, not only the number of bit errors corresponding to the physical block as shown in FIG. 12, but also the number of reads and the number of rewrites may be used, or these may be used in combination.
Furthermore, if all the data (physical blocks and the like) listed in the evaluation information table 42 are to be generated as clone data as a result, the evaluation information table 42 contains data determined to be close to the refresh opportunity at the time of reading. Only the identification information (for example, physical block address) may be stored.

また、アクセス実行毎に、アクセス対象のデータの評価用情報を評価用情報テーブル42に追加することも考えられる。但し、その場合に評価用情報テーブル42に図12のようにx個の記憶枠を設定しておき、図12C→図12Dで説明したように、例えばビットエラー数が多いものが残るように更新していく。もちろんリード回数や書換回数を用いても良い。
すると、評価用情報テーブル42には、アクセス対象となったデータの中で、ビットエラー数が多かったx個のデータが残ることになり、結果的にアクセス時にリフレッシュ機会近接の判断が行われたこととなる。その場合も起動時は、評価用情報テーブル42に挙げられているデータ(物理ブロック)をクローンデータ生成対象とすればよい。
It is also conceivable to add information for evaluation of data to be accessed to the evaluation information table 42 every time access is executed. In this case, however, x storage frames are set in the evaluation information table 42 as shown in FIG. 12, and the update is performed so that, for example, the one with a large number of bit errors remains as described in FIGS. 12C to 12D. I will do it. Of course, the number of reads and the number of rewrites may be used.
Then, in the evaluation information table 42, x data having a large number of bit errors remain among the data to be accessed, and as a result, the determination of the proximity of the refresh opportunity is made at the time of access. It will be. In this case as well, at the time of activation, the data (physical block) listed in the evaluation information table 42 may be the clone data generation target.

もちろん、その場合に、評価用情報テーブル42に残されたデータの内で、所定のビットエラー数以上のデータをクローンデータ生成対象としたり、上位所定数個のデータをクローンデータ生成対象とするなど、評価用情報テーブル42に挙げられた内の一部をクローンデータ生成対象としてもよい。
Of course, in that case, among the data remaining in the evaluation information table 42, data having a predetermined number of bit errors or more is set as a clone data generation target, or the upper predetermined number of data is set as a clone data generation target. A part of the evaluation information table 42 may be a clone data generation target.

<5.第3の実施の形態>

第3の実施の形態を図15で説明する。図15は図6と同様にデータの変遷を示したものである。
第3の実施の形態は、起動時にクローンデータが生成されたデータについては、当初は、オリジナルデータがアクセス対象となる主データとし、クローンデータがアクセス対象とはならない副データとして管理されるようにする例である。
そして主データ(オリジナルデータ側)がリフレッシュ機会に至った場合、クローンデータがアクセス対象の主データとして管理されるように、上記管理情報を更新する。
<5. Third Embodiment>

A third embodiment will be described with reference to FIG. FIG. 15 shows the transition of data as in FIG.
In the third embodiment, for the data for which clone data is generated at the time of startup, the original data is initially managed as main data to be accessed, and the clone data is managed as sub data that is not to be accessed. This is an example.
When the main data (original data side) reaches a refresh opportunity, the management information is updated so that the clone data is managed as the main data to be accessed.

起動時を状態ST10とする。起動時に、制御部11は各データ単位について、リフレッシュ動作が近く必要になるか否かを判定する。状態ST0におけるデータDTmが、リフレッシュ動作が近く必要に成るデータでは無いと判断したときは、そのまま状態ST11として、その後のリードコマンドに対しては、データDTmがアクセス対象となる。   The start-up time is set to state ST10. At the time of startup, the control unit 11 determines whether or not a refresh operation is necessary for each data unit. When it is determined that the data DTm in the state ST0 is not data that will soon require a refresh operation, the data DTm becomes an access target for the subsequent read command as it is as the state ST11.

一方、データDTmについて、リフレッシュ機会が近接していると判断される場合は、状態ST12に示すように、クローンデータを生成する。
この第3の実施の形態では、生成したクローンデータを副データとして管理し、主データはオリジナルデータのままである。
従ってその後のリードコマンドに対しては、オリジナルデータであるデータDTmがアクセス対象となる。
オリジナルデータ側は起動時に、リフレッシュ機会近接と判断されたデータであるが、これは、即時リフレッシュが必要とされるレベルではない。従って、まだ正常なデータ読出は十分に可能である。
On the other hand, if it is determined that the refresh opportunity is close for data DTm, clone data is generated as shown in state ST12.
In the third embodiment, the generated clone data is managed as sub-data, and the main data remains the original data.
Therefore, for subsequent read commands, the data DTm, which is the original data, becomes the access target.
The original data side is data determined to be close to a refresh opportunity at the time of activation, but this is not a level that requires immediate refresh. Accordingly, normal data reading is still possible.

この状態ST12で通常のメモリカード1の動作が継続して行われた後、一旦、メモリカード1の動作がオフとされ、その後起動されたとする。
その場合の起動時は、状態ST14となっている。この場合に、主データと副データの一方を破棄する。
この場合は、主データDTm(オリジナルデータ側)を破棄し、同時に副データDTs(クローンデータ側)を主データDTmに変更するように管理情報を更新することが好ましい。なぜならこの場合では、主データDTm(オリジナルデータ側)は、前回の起動時にリフレッシュ機会近接と判断され、比較的信頼性が低くなっており、一方、副データDTs(クローンデータ側)はフレッシュなデータである。従って、クローンデータ側を残した方が、信頼性の点でも、また当該データについてリフレッシュ機会を遠ざけるためにも、好適と考えられるためである。換言すれば、この場合の管理情報の更新は、リフレッシュを行ったのと同等な状態となる。
It is assumed that after the normal operation of the memory card 1 is continuously performed in this state ST12, the operation of the memory card 1 is once turned off and then activated.
At the time of starting in that case, the state is ST14. In this case, one of the main data and the sub data is discarded.
In this case, it is preferable to update the management information so that the main data DTm (original data side) is discarded, and at the same time, the sub data DTs (clone data side) is changed to the main data DTm. This is because in this case, the main data DTm (original data side) is judged to be close to a refresh opportunity at the time of the previous activation and is relatively unreliable, while the sub data DTs (clone data side) is fresh data. It is. Therefore, it is considered that it is preferable to leave the clone data side in terms of reliability and also to keep a refresh opportunity away from the data. In other words, the update of the management information in this case is equivalent to the state where the refresh is performed.

なお、この場合に副データDTs(クローンデータ側)を破棄することとすることも考えられないわけではない。その場合は、今回の起動時に、主データDTm(オリジナルデータ側)はリフレッシュ機会近接としてクローンデータ生成対象となる。   In this case, it is not unthinkable to discard the sub data DTs (clone data side). In this case, at the time of this activation, the main data DTm (original data side) becomes a clone data generation target as a refresh opportunity proximity.

ところで、上記のように状態ST12で通常のメモリカード1の動作が継続して行われた場合において、或る時点でのデータDTm(オリジナルデータ側)のリードの際に、即時リフレッシュが必要と判断されることがある。
その場合は、状態ST13として示すように、主データと副データを入れ替えるように管理情報を更新する。この場合、オリジナルデータが主データとされていたところを、クローンデータが主データとされるように管理情報を更新する。
従って、その後のリード機会が発生すると、クローンデータ側がアクセスされることとなる。
即ち、この場合、オリジナルデータが、フレッシュ必要の状態にまで信頼性が悪化したときに、リード対象をクローンデータに置き換えることで、即時のリフレッシュを行う必要性を解消するという意味を持つ。
By the way, when the normal operation of the memory card 1 is continuously performed in the state ST12 as described above, it is determined that immediate refresh is necessary when reading the data DTm (original data side) at a certain time. May be.
In this case, as shown as state ST13, the management information is updated so that the main data and the sub data are exchanged. In this case, the management information is updated so that the original data is the main data and the clone data is the main data.
Therefore, when a subsequent read opportunity occurs, the clone data side is accessed.
In other words, in this case, when the reliability of the original data has deteriorated to a state where it is necessary to be fresh, the necessity of performing an immediate refresh is eliminated by replacing the read target with the clone data.

この状態ST13で通常のメモリカード1の動作が継続して行われた後、オフとされ、さらにその後メモリカード1が起動された場合は、状態ST15となっている。この場合も、主データと副データの一方を破棄(消去)する。そして状態ST0に戻り、上記同様の処理を行う。
この場合は、この時点での副データ(オリジナルデータ側)を破棄することが適切である。オリジナルデータ側は、前回の起動中にリフレッシュ必要と判断されたデータだからである。
If the normal operation of the memory card 1 is continuously performed in this state ST13, the memory card 1 is turned off and then the memory card 1 is activated, then the state ST15 is entered. Also in this case, one of the main data and the sub data is discarded (erased). Then, the process returns to the state ST0 and the same processing as described above is performed.
In this case, it is appropriate to discard the sub data (original data side) at this time. This is because the original data side is data determined to be refreshed during the previous activation.

上記の状態ST13で、通常のメモリカード1の動作が継続して行われた場合において、或る時点でのデータDTm(この場合クローンデータ側)のリードの際に、即時リフレッシュが必要と判断されることがある。
その場合は、信頼性低下に対処するため、データDTmについてのリフレッシュ動作を行う。
状態ST13としては、フレッシュなクローンデータ側が主データDTmとされたものであるため、状態ST13において即時リフレッシュ必要となることは希である。従って、実際上、リフレッシュ動作を実行する機会は殆ど無いと言える。但し、皆無では無いため、その場合の補償として、リフレッシュ動作が用意される。
When the normal operation of the memory card 1 is continuously performed in the above-described state ST13, it is determined that an immediate refresh is necessary when reading the data DTm (in this case, the clone data side) at a certain point in time. Sometimes.
In that case, a refresh operation is performed on the data DTm in order to deal with a decrease in reliability.
In the state ST13, since the fresh clone data side is the main data DTm, it is rare that an immediate refresh is necessary in the state ST13. Therefore, it can be said that there is practically no opportunity to execute the refresh operation. However, since there is nothing at all, a refresh operation is prepared as compensation in that case.

リフレッシュ動作が行われた後は、状態ST13に戻ると考えれば良い。但しその場合のデータDTmは、信頼性が回復されている。
その後、メモリカード1の動作がオフとされ、さらにその後メモリカード1が起動された場合は、状態ST15となっている。この場合も、副データDTsを破棄(消去)することが適切である。この場合の副データDTsとは、前回の起動中にリフレッシュ必要と判断されたオリジナルデータ側のデータだからである。
そして状態ST0に戻り、上記同様の処理を行う。
After the refresh operation is performed, it can be considered that the process returns to the state ST13. However, the reliability of the data DTm in that case is recovered.
Thereafter, when the operation of the memory card 1 is turned off and the memory card 1 is further activated, the state is ST15. Also in this case, it is appropriate to discard (erase) the sub data DTs. This is because the sub data DTs in this case is data on the original data side determined to be refreshed during the previous activation.
Then, the process returns to the state ST0 and the same processing as described above is performed.

第3の実施の形態では、概略以上のようにデータDTが変遷し、これによって信頼性の維持と、リフレッシュ動作の最小限化によるアクセス時間の減少、安定化が実現できる。
この第3の実施の形態のための制御部11の処理は、基本的には図8,図9のとおりであるが、詳細な点として、以下の点を異なるようにすればよい。
In the third embodiment, the data DT changes as described above, thereby maintaining the reliability and reducing the access time and stabilizing by minimizing the refresh operation.
The processing of the control unit 11 for the third embodiment is basically as shown in FIGS. 8 and 9, but the following points may be different as detailed points.

まず図8のステップF101では、図15の状態ST14の場合は主データDTmを破棄し、状態ST15の場合は副データDTsを破棄することとする。
ステップF105では、管理情報の更新は、生成したクローンデータを副データDTsとして管理するように更新すればよい。
また評価用情報については次のようにする。
状態ST14→ST10と遷移した場合は、主データDTmは前回起動時に作成されたクローンデータであり、そのクローンデータについてはまだリードされていない。従って、当該データに関してはそれまでの評価用情報はクリアすれば良い。
状態ST15→ST10と遷移した場合であって、リフレッシュが行われていない場合は、主データDTmは、前回起動時に作成されたクローンデータである。しかしそのクローンデータについてはリードされている可能性がある。従って、当該データに関してはそれまでの評価用情報は維持するとよい。
First, in step F101 in FIG. 8, the main data DTm is discarded in the case of state ST14 in FIG. 15, and the sub data DTs is discarded in the case of state ST15.
In step F105, the management information may be updated so that the generated clone data is managed as the sub data DTs.
The evaluation information is as follows.
When the state is changed from ST14 to ST10, the main data DTm is clone data created at the previous activation, and the clone data has not been read yet. Therefore, the information for evaluation up to that point may be cleared for the data.
When the state transitions from ST15 to ST10 and no refresh is performed, the main data DTm is clone data created at the previous activation. However, the clone data may have been read. Therefore, it is preferable to maintain the previous evaluation information for the data.

図9のステップF155では、図15の状態ST12からST13に遷移する処理となるが、従って管理情報の更新とは、オリジナルデータ側を副データDTsとし、クローンデータ側を主データDTmとする処理とすればよい。
In step F155 of FIG. 9, the process transits from the state ST12 to ST13 of FIG. 15. Therefore, the management information update is a process of setting the original data side as the sub data DTs and the clone data side as the main data DTm. do it.

<6.変形例>

以上、実施の形態について説明してきたが、本開示の技術には次のような変形例も考えられる。
第3の実施の形態では、第1の実施の形態と同様に、起動時に各データについてリフレッシュ機会近接の判断を行うようにしたが、第2の実施の形態のように、リード時に、そのデータについてのリフレッシュ機会近接の判断を行って評価用情報を記憶するような処理を適用することもできる。
<6. Modification>

Although the embodiments have been described above, the following modifications may be considered for the technology of the present disclosure.
In the third embodiment, as in the first embodiment, the proximity of refresh opportunities is determined for each data at the time of startup. However, as in the second embodiment, the data at the time of reading is determined. It is also possible to apply a process for determining the proximity of the refresh opportunity and storing the evaluation information.

評価用情報の内容としては、ビットエラー数、リード回数、書換回数などとしたが、他の例も考えられる。
またビットエラー数、リード回数、書換回数などのそれぞれに異なる重みづけを与えたうえで、それらのデータから、リフレッシュ機会近接の判断の指標を求めてもよい。
The content of the evaluation information is the number of bit errors, the number of reads, the number of rewrites, etc., but other examples are also conceivable.
In addition, after giving different weights to the number of bit errors, the number of reads, the number of rewrites, and the like, an index for determining the proximity of refresh opportunities may be obtained from these data.

実施の形態では、クローンデータ生成を起動時に行うとしたが、起動時以外に行うことも考えられる。例えば動作をオフとする際や、メモリカード1の取り外し時などに行うことも可能である。   In the embodiment, the clone data generation is performed at the time of activation, but it may be performed at other times than the activation. For example, it can be performed when the operation is turned off or when the memory card 1 is removed.

また実施の形態ではメモリカード1の例を挙げたが、不揮発性メモリ15と、制御部11が別体の構成の場合でも本開示の技術は適用可能である。例えば不揮発性メモリに対しての読出・書込アクセスを制御する制御装置としても実現できる。
本開示の技術は、各種メモリカード、SSD、eMMCなどに適用できる。
Moreover, although the example of the memory card 1 has been described in the embodiment, the technology of the present disclosure can be applied even when the nonvolatile memory 15 and the control unit 11 are configured separately. For example, it can be realized as a control device for controlling read / write access to a nonvolatile memory.
The technology of the present disclosure can be applied to various memory cards, SSDs, eMMCs, and the like.

なお本技術は以下のような構成も採ることができる。
(1)不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成処理部と、
上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理部と、
上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理部と、
を備えた制御装置。
(2)上記管理情報処理部は、上記クローンデータが生成されたデータについては、上記クローンデータがアクセス対象となる主データとし、上記オリジナルデータがアクセス対象とはならない副データとして管理されるように、上記管理情報を更新する上記(1)に記載の制御装置。
(3)上記主データがリフレッシュ機会に至ったと判断される場合、上記管理情報処理部は、上記オリジナルデータがアクセス対象の主データとして管理されるように、上記管理情報を更新する上記(2)に記載の制御装置。
(4)上記オリジナルデータが上記主データとされた後、該主データがリフレッシュ機会に至ったと判断される場合に、上記オリジナルデータについてのリフレッシュ動作制御を行うリフレッシュ制御部を、さらに備える上記(3)に記載の制御装置。
(5)上記管理情報処理部は、上記不揮発性メモリの起動時において、上記クローンデータが生成されているデータについて、上記主データ又は上記副データの一方が破棄されるように、上記管理情報を更新する上記(2)乃至(4)のいずれかに記載の制御装置。
(6)上記評価用情報処理部は、上記クローン生成処理部が上記クローンデータの生成処理を行ったデータに関する上記評価用情報をクリアする上記(2)乃至(5)のいずれかに記載の制御装置。
(7)上記クローン生成処理部は、上記不揮発性メモリの起動時に、不揮発性メモリに記憶されたデータについて、上記評価用情報に基づいてリフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定したデータについて、上記クローンデータの生成処理を行う上記(1)乃至(6)のいずれかに記載の制御装置。
(8)上記評価用情報処理部は、上記不揮発性メモリに記憶されたデータのアクセス時に、該データについて、リフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定した場合に、該データについての上記評価用情報を生成し、
上記クローン生成処理部は、上記不揮発性メモリの起動時に、上記評価用情報に基づいて、リフレッシュ機会が近接していると判定されたデータについて、上記クローンデータの生成処理を行う上記(1)乃至(6)のいずれかに記載の制御装置。
(9)上記管理情報処理部は、上記クローンデータが生成されたデータについては、上記オリジナルデータがアクセス対象となる主データとし、上記クローンデータがアクセス対象とはならない副データとして管理されるように、上記管理情報を更新する上記(1)に記載の制御装置。
(10)上記主データがリフレッシュ機会に至った場合、上記管理情報処理部は、上記クローンデータがアクセス対象の主データとして管理されるように、上記管理情報を更新する上記(9)に記載の制御装置。
(11)上記管理情報処理部は、上記不揮発性メモリの起動時において、上記クローンデータが生成されているデータについて、上記主データ又は上記副データの一方が破棄されるように、上記管理情報を更新する上記(9)又は(10)に記載の制御装置。
(12)上記評価用情報は、所定データ単位についての、ビットエラー発生数、読出回数、消去回数の、少なくとも1つを含む上記(1)乃至(11)のいずれかに記載の制御装置。
In addition, this technique can also take the following structures.
(1) Data stored in a non-volatile memory, for which it is determined that a refresh opportunity is close based on information for evaluation regarding refresh necessity, is the same as the original data, using the data as original data Clone generation processing unit for performing processing to generate the clone data in the nonvolatile memory,
A management information processing unit that updates management information so that either one of the original data or the clone data becomes an access target at the time of access execution;
An evaluation information processing unit that generates the evaluation information for the data when accessing the data stored in the nonvolatile memory;
A control device comprising:
(2) The management information processing unit manages the data for which the clone data is generated so that the clone data is managed as main data to be accessed and the original data is managed as sub data that is not to be accessed. The control device according to (1), wherein the management information is updated.
(3) When it is determined that the main data has reached a refresh opportunity, the management information processing unit updates the management information so that the original data is managed as main data to be accessed (2) The control device described in 1.
(4) The above-described (3) further comprising a refresh control unit that performs a refresh operation control on the original data when it is determined that the main data has reached a refresh opportunity after the original data is the main data. ).
(5) The management information processing unit stores the management information so that one of the main data and the sub data is discarded for the data for which the clone data is generated when the nonvolatile memory is activated. The control device according to any one of (2) to (4), which is updated.
(6) The control according to any one of (2) to (5), wherein the evaluation information processing unit clears the evaluation information related to data for which the clone generation processing unit has performed the generation processing of the clone data. apparatus.
(7) When the nonvolatile memory is activated, the clone generation processing unit determines whether or not the refresh opportunity is close to the data stored in the nonvolatile memory based on the evaluation information, and the refresh opportunity The control device according to any one of (1) to (6), wherein the clone data generation process is performed on data determined to be close to each other.
(8) When accessing the data stored in the nonvolatile memory, the evaluation information processing unit determines whether or not a refresh opportunity is close to the data, and determines that the refresh opportunity is close When the above information is generated, the evaluation information for the data is generated,
The clone generation processing unit performs the clone data generation processing on data determined to be close to a refresh opportunity based on the evaluation information when the nonvolatile memory is activated. The control device according to any one of (6).
(9) The management information processing unit manages the data for which the clone data is generated as the main data to be accessed as the original data and the sub data as the sub data that is not to be accessed. The control device according to (1), wherein the management information is updated.
(10) When the main data has reached a refresh opportunity, the management information processing unit updates the management information so that the clone data is managed as main data to be accessed. Control device.
(11) The management information processing unit stores the management information so that one of the main data and the sub data is discarded for the data for which the clone data is generated when the nonvolatile memory is activated. The control device according to (9) or (10) to be updated.
(12) The control device according to any one of (1) to (11), wherein the evaluation information includes at least one of a bit error occurrence count, a read count, and an erase count for a predetermined data unit.

1 メモリカード、2 ホスト機器、11 制御部、12 SRAM、13 デバイスインターフェース、14 バッファRAM、15 不揮発性メモリ   DESCRIPTION OF SYMBOLS 1 Memory card, 2 Host apparatus, 11 Control part, 12 SRAM, 13 Device interface, 14 Buffer RAM, 15 Nonvolatile memory

Claims (14)

不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成処理部と、
上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理部と、
上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理部と、
を備えた制御装置。
For data stored in a non-volatile memory and for which it is determined that refresh opportunities are close based on information for evaluation regarding refresh necessity, the same clone data as the original data is used as the original data. A clone generation processing unit for performing processing to generate in the nonvolatile memory,
A management information processing unit that updates management information so that either one of the original data or the clone data becomes an access target at the time of access execution;
An evaluation information processing unit that generates the evaluation information for the data when accessing the data stored in the nonvolatile memory;
A control device comprising:
上記管理情報処理部は、上記クローンデータが生成されたデータについては、上記クローンデータがアクセス対象となる主データとし、上記オリジナルデータがアクセス対象とはならない副データとして管理されるように、上記管理情報を更新する請求項1に記載の制御装置。   The management information processing unit is configured to manage the clone data so that the clone data is managed as main data to be accessed and the original data is managed as sub data that is not to be accessed. The control device according to claim 1 which updates information. 上記主データがリフレッシュ機会に至ったと判断される場合、上記管理情報処理部は、上記オリジナルデータがアクセス対象の主データとして管理されるように、上記管理情報を更新する請求項2に記載の制御装置。   3. The control according to claim 2, wherein when it is determined that the main data has reached a refresh opportunity, the management information processing unit updates the management information so that the original data is managed as main data to be accessed. apparatus. 上記オリジナルデータが上記主データとされた後、該主データがリフレッシュ機会に至ったと判断される場合に、上記オリジナルデータについてのリフレッシュ動作制御を行うリフレッシュ制御部を、さらに備える請求項3に記載の制御装置。   The refresh control unit according to claim 3, further comprising: a refresh control unit configured to perform refresh operation control on the original data when it is determined that the main data has reached a refresh opportunity after the original data is the main data. Control device. 上記管理情報処理部は、上記不揮発性メモリの起動時において、上記クローンデータが生成されているデータについて、上記主データ又は上記副データの一方が破棄されるように、上記管理情報を更新する請求項2に記載の制御装置。   The management information processing unit is configured to update the management information so that one of the main data and the sub data is discarded with respect to data for which the clone data is generated when the nonvolatile memory is activated. Item 3. The control device according to Item 2. 上記評価用情報処理部は、上記クローン生成処理部が上記クローンデータの生成処理を行ったデータに関する上記評価用情報をクリアする請求項2に記載の制御装置。   The control apparatus according to claim 2, wherein the evaluation information processing unit clears the evaluation information related to data for which the clone generation processing unit has performed the generation processing of the clone data. 上記クローン生成処理部は、上記不揮発性メモリの起動時に、不揮発性メモリに記憶されたデータについて、上記評価用情報に基づいてリフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定したデータについて、上記クローンデータの生成処理を行う請求項1に記載の制御装置。   The clone generation processing unit determines whether or not a refresh opportunity is close based on the evaluation information for data stored in the nonvolatile memory when the nonvolatile memory is activated, and the refresh opportunity is close The control device according to claim 1, wherein the clone data generation process is performed on the data determined to be. 上記評価用情報処理部は、上記不揮発性メモリに記憶されたデータのアクセス時に、該データについて、リフレッシュ機会が近接しているか否かを判定し、リフレッシュ機会が近接していると判定した場合に、該データについての上記評価用情報を生成し、
上記クローン生成処理部は、上記不揮発性メモリの起動時に、上記評価用情報に基づいて、リフレッシュ機会が近接していると判定されたデータについて、上記クローンデータの生成処理を行う請求項1に記載の制御装置。
The evaluation information processing unit determines whether or not a refresh opportunity is close to the data stored in the nonvolatile memory, and determines that the refresh opportunity is close. , Generating the evaluation information for the data,
The clone generation processing unit performs the clone data generation processing on data determined to be close to a refresh opportunity based on the evaluation information when the nonvolatile memory is activated. Control device.
上記管理情報処理部は、上記クローンデータが生成されたデータについては、上記オリジナルデータがアクセス対象となる主データとし、上記クローンデータがアクセス対象とはならない副データとして管理されるように、上記管理情報を更新する請求項1に記載の制御装置。   The management information processing unit is configured to manage the clone data so that the original data is managed as main data to be accessed and the clone data is managed as sub data that is not to be accessed. The control device according to claim 1 which updates information. 上記主データがリフレッシュ機会に至った場合、上記管理情報処理部は、上記クローンデータがアクセス対象の主データとして管理されるように、上記管理情報を更新する請求項9に記載の制御装置。   The control device according to claim 9, wherein, when the main data reaches a refresh opportunity, the management information processing unit updates the management information so that the clone data is managed as main data to be accessed. 上記管理情報処理部は、上記不揮発性メモリの起動時において、上記クローンデータが生成されているデータについて、上記主データ又は上記副データの一方が破棄されるように、上記管理情報を更新する請求項8に記載の制御装置。   The management information processing unit is configured to update the management information so that one of the main data and the sub data is discarded with respect to data for which the clone data is generated when the nonvolatile memory is activated. Item 9. The control device according to Item 8. 上記評価用情報は、所定データ単位についての、ビットエラー発生数、読出回数、消去回数の、少なくとも1つを含む請求項1に記載の制御装置。   The control device according to claim 1, wherein the evaluation information includes at least one of a bit error occurrence count, a read count, and an erase count for a predetermined data unit. 不揮発性メモリと、
上記不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成処理部と、
上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理部と、
上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理部と、
を備えた記憶装置。
Non-volatile memory;
The data stored in the non-volatile memory that is determined to be close to the refresh opportunity based on the evaluation information regarding the necessity for refresh, and the same clone as the original data is used as the original data. A clone generation processing unit for performing processing for generating data in the nonvolatile memory;
A management information processing unit that updates management information so that either one of the original data or the clone data becomes an access target at the time of access execution;
An evaluation information processing unit that generates the evaluation information for the data when accessing the data stored in the nonvolatile memory;
A storage device.
不揮発性メモリに記憶されたデータであって、リフレッシュ必要性に関する評価用情報に基づいてリフレッシュ機会が近接していると判定されるデータについて、該データをオリジナルデータとして、オリジナルデータと同一のクローンデータを、上記不揮発性メモリ内に生成する処理を行うクローン生成ステップと、
上記オリジナルデータと上記クローンデータのいずれか一方が、アクセス実行の際のアクセス対象となるように、管理情報を更新する管理情報処理ステップと、
上記不揮発性メモリに記憶されたデータのアクセス時に、該データについての上記評価用情報を生成する評価用情報処理ステップと、
を備えた制御方法。
For data stored in a non-volatile memory and for which it is determined that refresh opportunities are close based on information for evaluation regarding refresh necessity, the same clone data as the original data is used as the original data. A clone generation step for performing processing to generate in the nonvolatile memory,
A management information processing step for updating the management information so that either the original data or the clone data is an access target at the time of access execution;
An evaluation information processing step for generating the evaluation information for the data when accessing the data stored in the nonvolatile memory;
Control method with.
JP2011108095A 2011-05-13 2011-05-13 Control unit, storage device and control method Withdrawn JP2012238259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011108095A JP2012238259A (en) 2011-05-13 2011-05-13 Control unit, storage device and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011108095A JP2012238259A (en) 2011-05-13 2011-05-13 Control unit, storage device and control method

Publications (1)

Publication Number Publication Date
JP2012238259A true JP2012238259A (en) 2012-12-06

Family

ID=47461075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011108095A Withdrawn JP2012238259A (en) 2011-05-13 2011-05-13 Control unit, storage device and control method

Country Status (1)

Country Link
JP (1) JP2012238259A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014147735A1 (en) * 2013-03-19 2014-09-25 株式会社日立製作所 Recording device and method for controlling recording device
JP2015118572A (en) * 2013-12-18 2015-06-25 富士通株式会社 Storage control device, control method and control program
JP2017134440A (en) * 2016-01-25 2017-08-03 Necプラットフォームズ株式会社 Memory control circuit, memory control system, memory control method, and memory control program
US9983809B2 (en) 2013-10-29 2018-05-29 Denso Corporation Data-refresh apparatus
JP2021047721A (en) * 2019-09-19 2021-03-25 キオクシア株式会社 Memory system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014147735A1 (en) * 2013-03-19 2014-09-25 株式会社日立製作所 Recording device and method for controlling recording device
JP5956675B2 (en) * 2013-03-19 2016-07-27 株式会社日立製作所 Storage device and storage device control method
US9983809B2 (en) 2013-10-29 2018-05-29 Denso Corporation Data-refresh apparatus
JP2015118572A (en) * 2013-12-18 2015-06-25 富士通株式会社 Storage control device, control method and control program
US9857994B2 (en) 2013-12-18 2018-01-02 Fujitsu Limited Storage controller, control method, and computer product
JP2017134440A (en) * 2016-01-25 2017-08-03 Necプラットフォームズ株式会社 Memory control circuit, memory control system, memory control method, and memory control program
JP2021047721A (en) * 2019-09-19 2021-03-25 キオクシア株式会社 Memory system and method
JP7353889B2 (en) 2019-09-19 2023-10-02 キオクシア株式会社 Memory systems and methods

Similar Documents

Publication Publication Date Title
JP5983019B2 (en) Control device, storage device, and storage control method
US9384123B2 (en) Memory system
US10592410B2 (en) Backup mechanism of writing sequential data to single-level cell buffer and multi-level cell buffer
KR101394845B1 (en) Systems and methods for obtaining and using nonvolatile memory health information
US20130024623A1 (en) Method and apparatus for high speed cache flushing in a non-volatile memory
US20070214309A1 (en) Nonvolatile storage device and data writing method thereof
US20080028132A1 (en) Non-volatile storage device, data storage system, and data storage method
US10152280B2 (en) Storage device and control method
JP2012238259A (en) Control unit, storage device and control method
JP5874525B2 (en) Control device, storage device, and storage control method
TW201234378A (en) Memory device, memory control method, and program
US10168940B2 (en) Data storage using SLC and TLC memory banks and data maintenance method thereof
US20150178001A1 (en) Data Storage Device and Data Maintenance Method Thereof
JP5073402B2 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE USING THE SAME, AND NONVOLATILE MEMORY SYSTEM
US11209999B2 (en) Memory controller and method capable of using different storing modes to store data units having different data sizes
JP5592478B2 (en) Nonvolatile storage device and memory controller
JP2007241618A (en) Nonvolatile storage device and its write determination method
CN108762670B (en) Management method, system and device for data blocks in SSD (solid State disk) firmware
CN113467713A (en) Data separation method and solid state disk
JP6072428B2 (en) Control device, storage device, and storage control method
JP5949122B2 (en) Control device, storage device, and storage control method
CN109388343A (en) A kind of date storage method and memory
CN111758086B (en) Method for refreshing mapping table of SSD
CN108255437B (en) Data storage device and method
JP4696500B2 (en) Memory management method and apparatus

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140805