JP6129635B2 - Control method, control program, and control apparatus - Google Patents

Control method, control program, and control apparatus Download PDF

Info

Publication number
JP6129635B2
JP6129635B2 JP2013095769A JP2013095769A JP6129635B2 JP 6129635 B2 JP6129635 B2 JP 6129635B2 JP 2013095769 A JP2013095769 A JP 2013095769A JP 2013095769 A JP2013095769 A JP 2013095769A JP 6129635 B2 JP6129635 B2 JP 6129635B2
Authority
JP
Japan
Prior art keywords
sector
data
writing
bit string
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013095769A
Other languages
Japanese (ja)
Other versions
JP2014215986A (en
Inventor
恒俊 藤木
恒俊 藤木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cypress Semiconductor Corp
Original Assignee
Cypress Semiconductor 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 Cypress Semiconductor Corp filed Critical Cypress Semiconductor Corp
Priority to JP2013095769A priority Critical patent/JP6129635B2/en
Publication of JP2014215986A publication Critical patent/JP2014215986A/en
Application granted granted Critical
Publication of JP6129635B2 publication Critical patent/JP6129635B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Description

本発明は、制御方法、制御プログラム、および制御装置に関する。   The present invention relates to a control method, a control program, and a control device.

フラッシュメモリへのデータの書き込み動作は、書き込み対象のセルを一旦すべて「1」にした後、書き込みデータ内の「0」に対応するセルを「1」から「0」に書き換えることによって行われる。「0」が書き込まれることによってセルが劣化するため、書き込みの回数に限度がある。   The data write operation to the flash memory is performed by once setting all the cells to be written to “1” and then rewriting the cell corresponding to “0” in the write data from “1” to “0”. Since the cell is deteriorated by writing “0”, the number of times of writing is limited.

そこで、従来では、セクタ単位で書き込みと読み出しが可能なフラッシュメモリにおいて、特定のセクタに書き込みが集中しないように制御する技術が知られている(たとえば、下記特許文献1,2参照。)。   Therefore, conventionally, in a flash memory capable of writing and reading in units of sectors, a technique for controlling the writing so as not to concentrate on a specific sector is known (for example, see Patent Documents 1 and 2 below).

また、書き込むデータに含まれる「0」のビット数が多ければ書き込むデータをビット反転してフラッシュメモリに書き込むことにより、「0」の書き込み回数を減らす技術が知られている(たとえば、下記特許文献3参照。)。   In addition, a technique is known in which if the number of bits of “0” included in the data to be written is large, the data to be written is bit-inverted and written to the flash memory, thereby reducing the number of times of writing “0” (for example, the following patent document 3).

特開2009−110314号公報JP 2009-110314 A 特開平8−16482号公報JP-A-8-16482 特表2011−508358号公報Special table 2011-508358 gazette

しかしながら、従来技術では、書き込むデータによっては「0」の書き込み回数を十分に減らすことができず、セルの劣化を遅くすることができないという問題点がある。   However, the conventional technique has a problem that the number of times of writing “0” cannot be sufficiently reduced depending on the data to be written, and the cell deterioration cannot be delayed.

1つの側面では、本発明は、セルの劣化を遅くすることができる制御方法、制御プログラム、および制御装置を提供することを目的とする。   In one aspect, an object of the present invention is to provide a control method, a control program, and a control device that can slow down cell degradation.

本発明の一側面によれば、特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御し、値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数である第1の個数を導出し、前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、前記第1の個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、生成した前記テーブルを前記第2セクタに記憶させ、前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む制御方法、制御プログラム、および制御装置が提案される。   According to one aspect of the present invention, writing and reading with respect to a memory in which a target sector for writing and reading is switched by wear leveling, which is a memory control method for preventing concentration of writing to a specific sector, and a plurality of values having different values are controlled. For data, when the target sector is the first sector in the memory, a first number that is the number of each of the plurality of data included in the storage content of the first sector is derived, and the target sector is When switching from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of data, the more the first number of data, the smaller the number of bits of a specific value corresponds The attached table is generated, the generated table is stored in the second sector, and the first sector is recorded. The content is converted into the bit string based on the generated table and written into the second sector, and each data to be written to the second sector is converted into the bit string based on the generated table and converted into the bit string. A control method, a control program, and a control device for writing in two sectors are proposed.

本発明の一態様によれば、セルの劣化を遅くすることができる。   According to one embodiment of the present invention, cell deterioration can be delayed.

図1は、本発明の制御装置による一動作例を示す説明図である。FIG. 1 is an explanatory diagram showing an operation example by the control device of the present invention. 図2は、フラッシュメモリの書き込みと消去の仕組みを示す説明図である。FIG. 2 is an explanatory diagram showing a mechanism for writing and erasing the flash memory. 図3は、フラッシュメモリ内の記憶例を示す説明図である。FIG. 3 is an explanatory diagram showing an example of storage in the flash memory. 図4は、文字コード表を示す説明図である。FIG. 4 is an explanatory diagram showing a character code table. 図5は、制御装置を含むシステム例を示すブロック図である。FIG. 5 is a block diagram illustrating an example of a system including a control device. 図6は、制御装置の機能的構成例を示すブロック図である。FIG. 6 is a block diagram illustrating a functional configuration example of the control device. 図7は、文字変換テーブルの作成例を示す説明図である。FIG. 7 is an explanatory diagram of an example of creating a character conversion table. 図8は、書き込み時の変換例を示す説明図である。FIG. 8 is an explanatory diagram showing a conversion example at the time of writing. 図9は、読み出し時の変換例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a conversion example at the time of reading. 図10は、レコードローテーションおよびビットローテーションを示す説明図である。FIG. 10 is an explanatory diagram showing record rotation and bit rotation. 図11は、実施例1にかかる制御装置による制御処理手順例を示すフローチャート(その1)である。FIG. 11 is a flowchart (part 1) illustrating an example of a control processing procedure by the control device according to the first embodiment. 図12は、実施例1にかかる制御装置による制御処理手順例を示すフローチャート(その2)である。FIG. 12 is a flowchart (part 2) illustrating a control processing procedure example by the control device according to the first embodiment. 図13は、移行データのローテーションを示す説明図である。FIG. 13 is an explanatory diagram showing rotation of migration data. 図14は、実施例2にかかる制御装置による制御処理手順例を示すフローチャートである。FIG. 14 is a flowchart of a control processing procedure example performed by the control device according to the second embodiment. 図15は、制御装置による書き込み処理手順の一例を示すフローチャートである。FIG. 15 is a flowchart illustrating an example of a write processing procedure by the control device. 図16は、制御装置による読み出し処理手順の一例を示すフローチャートである。FIG. 16 is a flowchart illustrating an example of a read processing procedure by the control device. 図17Aは、本実施の形態と文字データの反転との比較例を示す説明図(その1)である。FIG. 17A is an explanatory diagram (part 1) illustrating a comparative example between the present embodiment and character data inversion. 図17Bは、本実施の形態と文字データの反転との比較例を示す説明図(その2)である。FIG. 17B is an explanatory diagram (part 2) illustrating a comparative example between the present embodiment and inversion of character data. 図17Cは、本実施の形態と文字データの反転との比較例を示す説明図(その3)である。FIG. 17C is an explanatory diagram (part 3) illustrating a comparative example between the present embodiment and character data inversion.

以下に添付図面を参照して、本発明にかかる制御方法、制御プログラム、および制御装置の実施の形態を詳細に説明する。   Hereinafter, embodiments of a control method, a control program, and a control device according to the present invention will be described in detail with reference to the accompanying drawings.

図1は、本発明の制御装置による一動作例を示す説明図である。制御装置100は、メモリに対する書き込みを制御する。ここで、メモリは、たとえば、フラッシュメモリであり、メモリはデータを格納する領域が複数のセクタに区切られてある。メモリでは、ウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わる。ウェアレベリングとは、特定のセクタに書き込みが集中しないように制御する技術である。制御装置100は、たとえば、マイコンであればMPU(Micro Processing Unit)であったり、PC(Personal Computer)であればCPU(Central Processing Unit)であったり、またはCPUからの書き込み要求や読み出し要求を制御する装置であってもよい。   FIG. 1 is an explanatory diagram showing an operation example by the control device of the present invention. The control device 100 controls writing to the memory. Here, the memory is, for example, a flash memory. In the memory, an area for storing data is divided into a plurality of sectors. In the memory, write and read target sectors are switched by wear leveling. Wear leveling is a technique for controlling so that writing does not concentrate on a specific sector. The control device 100 is, for example, an MPU (Micro Processing Unit) if it is a microcomputer, a CPU (Central Processing Unit) if it is a PC (Personal Computer), or a write request or read request from the CPU. It may be a device that performs.

制御装置100は、値が異なる複数のデータについて、対象セクタがメモリ内の第1セクタ101−1である時に第1セクタ101−1の記憶内容に含まれる数を導出する。複数のデータは、複数種類の文字データであってもよいし、文字データの組み合わせであってもよい。図1の例では、値が異なる複数のデータは、「a」、「b」、「c」、「d」である。実際には、複数のデータは、「a」、「b」、「c」、「d」を符号化したデータであるが、理解の容易化のため、各文字をデータとして扱う。制御装置100は、対象セクタが第1セクタ101−1から第2セクタ101−2に切り替わると、複数のデータの各々に異なるビット列が対応付けられたテーブルを生成する。テーブルでは、導出された数が多いデータほど、特定の値のビットが少ないビット列が対応付けられる。テーブルを文字変換テーブル110と称する。ここで、特定の値とは、「0」である。フラッシュメモリのセルでは、「0」の記憶状態がセルに含まれる浮遊ゲートに電子が保持される状態であり、「1」の記憶状態がセルに含まれる浮遊ゲートに電子が保持されない状態である。   The control device 100 derives the number included in the storage contents of the first sector 101-1 when the target sector is the first sector 101-1 in the memory for a plurality of data having different values. The plurality of data may be a plurality of types of character data or a combination of character data. In the example of FIG. 1, a plurality of data having different values are “a”, “b”, “c”, and “d”. Actually, the plurality of data is data obtained by encoding “a”, “b”, “c”, and “d”, but each character is handled as data for easy understanding. When the target sector is switched from the first sector 101-1 to the second sector 101-2, the control device 100 generates a table in which different bit strings are associated with each of the plurality of data. In the table, a bit string having a smaller number of specific values is associated with a larger number of derived data. The table is referred to as a character conversion table 110. Here, the specific value is “0”. In a cell of a flash memory, a storage state of “0” is a state in which electrons are held in the floating gate included in the cell, and a storage state of “1” is a state in which electrons are not held in the floating gate included in the cell. .

制御装置100は、生成した文字変換テーブル110を第2セクタ101−2に記憶する。そして、制御装置100は、第1セクタ101−1の記憶内容を、生成した文字変換テーブル110に基づいてビット列に変換して第2セクタ101−2に書き込むことにより、第1セクタ101−1の記憶内容を第2セクタ101−2に移行させる。ここで移行される第1セクタ101−1の記憶内容は有効データだけでよく、有効データであるか否かは、各データが有するフラグによって判断してもよい。図1の例では、第1セクタ101−1の記憶内容の先頭の記憶データは「abcd」であり、この記憶データの変換後のデータは「11100100」であり、この変換後のデータが第2セクタ101−2に書き込まれる。   The control device 100 stores the generated character conversion table 110 in the second sector 101-2. Then, the control device 100 converts the stored contents of the first sector 101-1 into a bit string based on the generated character conversion table 110 and writes the bit string in the second sector 101-2. The stored contents are transferred to the second sector 101-2. The stored contents of the first sector 101-1 to be transferred here may be only valid data, and whether or not it is valid data may be determined by a flag included in each data. In the example of FIG. 1, the first storage data of the storage contents of the first sector 101-1 is “abcd”, the converted data of this storage data is “11100100”, and the converted data is the second data. Written in sector 101-2.

制御装置100は、第2セクタ101−2に対する書き込み対象の各データを、生成した文字変換テーブル110に基づいてビット列に変換して第2セクタ101−2に書き込む。たとえば、書き込み対象のデータは「abc」である。制御装置100は、文字変換テーブル110に基づいて、データ「a」を変換文字データ「11」に変換し、データ「b」を変換文字データ「10」に変換し、データ「c」を変換文字データ「01」に変換する。そして、制御装置100は、変換後のデータ「111001」を第2セクタ101−2に書き込む。   The control device 100 converts each data to be written to the second sector 101-2 into a bit string based on the generated character conversion table 110, and writes it to the second sector 101-2. For example, the data to be written is “abc”. Based on the character conversion table 110, the control device 100 converts the data “a” into the converted character data “11”, converts the data “b” into the converted character data “10”, and converts the data “c” into the converted character. Convert to data “01”. Then, the control device 100 writes the converted data “111001” in the second sector 101-2.

これにより、書き込まれる回数が多いデータほど「0」が少ないデータに変換されるため、「0」の書き込みの回数を低減させることができ、セルの劣化を遅らせることができる。   As a result, data with a larger number of times of writing is converted into data with a smaller number of “0”, so that the number of times of writing “0” can be reduced and cell deterioration can be delayed.

図2は、フラッシュメモリの書き込みと消去の仕組みを示す説明図である。書き込み時は制御ゲートに高電圧を印加する。たとえば、高電圧とは、20[V]程度である。制御ゲートに高電圧が印加されると、ソース領域とドレイン領域の電極間を流れる電子が、絶縁体であるシリコン酸化膜によって形成された浮遊ゲートの内部に引き寄せられる。引き寄せられた状態が「0」である。   FIG. 2 is an explanatory diagram showing a mechanism for writing and erasing the flash memory. During writing, a high voltage is applied to the control gate. For example, the high voltage is about 20 [V]. When a high voltage is applied to the control gate, electrons flowing between the electrodes of the source region and the drain region are attracted to the inside of the floating gate formed by the silicon oxide film that is an insulator. The attracted state is “0”.

消去時はシリコン基板側から高電圧を印加すると、浮遊ゲート内の電子が放出される。放出された状態が「1」である。セルの劣化は、絶縁体からの電子の通過により引き起こされる。そのため、浮遊ゲートに電子を移動させないほどセルの劣化を遅らせることになる。すなわち、「0」の書込み回数を減らすことによって、セルの劣化を遅らせることになる。   At the time of erasing, when a high voltage is applied from the silicon substrate side, electrons in the floating gate are emitted. The released state is “1”. Cell degradation is caused by the passage of electrons from the insulator. Therefore, the deterioration of the cell is delayed so that electrons are not moved to the floating gate. In other words, cell deterioration is delayed by reducing the number of times of writing “0”.

フラッシュメモリの書き込み動作では、すべてのセルが「1」の値に初期化された状態で、書き込み対象のデータに「0」があれば、「1」から「0」の値に変更する。このように、記憶されたデータを新しい値に更新するためには、該当位置のすべてのセルが「1」の値に初期化された後に、再び、書き込み動作が行われる。そのため、同一のセルに対して「0」の書き込みが多いと、セルの劣化が早くなる。   In the write operation of the flash memory, if all the cells are initialized to the value “1” and the data to be written has “0”, the value is changed from “1” to “0”. As described above, in order to update the stored data to a new value, the writing operation is performed again after all the cells at the corresponding position are initialized to the value “1”. For this reason, if many “0” s are written to the same cell, the deterioration of the cell is accelerated.

図3は、フラッシュメモリ内の記憶例を示す説明図である。たとえば、フラッシュメモリ300内の記憶領域は、セクタ1〜セクタnまでの複数のセクタと、プログラムデータを記憶する領域301と、に区別される。たとえば、複数のセクタには、プロセッサからの書き込みのデータが記憶される。本実施の形態では、データの他に、文字変換テーブル110が記憶される。領域301には、制御プログラム、アプリケーションプログラム、起動プログラムなどのCPUが実行するプログラムや予め用意可能な変更されないテーブルなどが記憶される。複数のセクタは、ウェアレベリングによって書き込み読み出しの対象セクタとして順に切り替わる。   FIG. 3 is an explanatory diagram showing an example of storage in the flash memory. For example, the storage area in the flash memory 300 is classified into a plurality of sectors from sector 1 to sector n and an area 301 for storing program data. For example, write data from the processor is stored in the plurality of sectors. In the present embodiment, a character conversion table 110 is stored in addition to data. The area 301 stores a program executed by the CPU such as a control program, an application program, a startup program, an unchangeable table that can be prepared in advance. The plurality of sectors are sequentially switched as write / read target sectors by wear leveling.

図4は、文字コード表を示す説明図である。文字コード表310は、複数種類の文字データと同一数の異なるビット列の「0」を含む数に基づく順序を示す情報である。より具体的には、文字コード表310は、複数種類の文字データと同一数の異なるビット列の各々と、「0」を含む数に基づく順序と、が対応付けられた情報である。文字コード表310は、複数種類の文字データと同一数のビット列を「0」のビットが少ない順に並べてある。ここでは、ビット列を変換文字データと称する。文字コード表310については、フラッシュメモリ300内の領域301に記憶される。ここでは、複数の変換文字データは、固定ビット幅とし、図4の例では1バイトである。   FIG. 4 is an explanatory diagram showing a character code table. The character code table 310 is information indicating an order based on a number including “0” of the same number of different bit strings as a plurality of types of character data. More specifically, the character code table 310 is information in which a plurality of types of character data, the same number of different bit strings, and an order based on a number including “0” are associated with each other. In the character code table 310, the same number of bit strings as a plurality of types of character data are arranged in ascending order of “0” bits. Here, the bit string is referred to as converted character data. The character code table 310 is stored in the area 301 in the flash memory 300. Here, the plurality of converted character data has a fixed bit width, and is 1 byte in the example of FIG.

図5は、制御装置を含むシステム例を示すブロック図である。図5の例では、システム500をマイコンとし、制御装置100は、マイコン内に含まれるMPU100とする。システム500は、MPU100と、RAM501と、フラッシュメモリ300と、を有する。MPU100は、システム500の全体を制御する。RAM501は、MPU100のワークエリアとして使用される。フラッシュメモリ300は、上述したように、プログラムやデータなどを記憶する。   FIG. 5 is a block diagram illustrating an example of a system including a control device. In the example of FIG. 5, the system 500 is a microcomputer, and the control device 100 is an MPU 100 included in the microcomputer. The system 500 includes an MPU 100, a RAM 501, and a flash memory 300. The MPU 100 controls the entire system 500. The RAM 501 is used as a work area for the MPU 100. As described above, the flash memory 300 stores programs, data, and the like.

また、システム500がPCなどの場合、制御装置100はCPUであり、システム500は、インターネットなどに接続可能なI/F、ディスプレイなどの出力装置、キーボードやマウスなどの入力装置などを有していてもよい。   When the system 500 is a PC or the like, the control device 100 is a CPU, and the system 500 includes an I / F that can be connected to the Internet, an output device such as a display, an input device such as a keyboard and a mouse, and the like. May be.

図6は、制御装置の機能的構成例を示すブロック図である。制御装置100は、導出部601と、生成部602と、格納部603と、移行部604と、変換部605と、を有する。各部が示す処理が、フラッシュメモリ300内の領域301に記憶された制御プログラム内にコーディングされてある。そして、MPU100が、制御プログラムをフラッシュメモリ300から読み出して制御プログラムにコーディングされた処理を実行することにより、各部の機能が実現される。   FIG. 6 is a block diagram illustrating a functional configuration example of the control device. The control device 100 includes a derivation unit 601, a generation unit 602, a storage unit 603, a migration unit 604, and a conversion unit 605. The processing indicated by each unit is coded in the control program stored in the area 301 in the flash memory 300. Then, the MPU 100 reads the control program from the flash memory 300 and executes the process coded in the control program, thereby realizing the functions of the respective units.

また、各部は、論理積回路であるAND、否定論理回路であるINVERTER、論理和回路であるORや、ラッチ回路であるFF(Flip Flop)などの素子によって形成されてもよい。また、各部は、スタンダードセルやストラクチャードASIC(Application Specific Integrated Circuit)などの特定用途向けIC(以下、単に「ASIC」と称す。)やFPGAなどのPLD(Programmable Logic Device)によって実現されてもよい。具体的には、たとえば、上述した各部の機能をハードウェア記述言語などによってネットリストに機能定義し、そのネットリストを論理合成してASICやPLDに与えることにより、各部を実現してもよい。   Each unit may be formed by an element such as an AND circuit that is a logical product circuit, an INVERTER that is a negative logic circuit, an OR that is a logical sum circuit, or an FF (Flip Flop) that is a latch circuit. Each unit may be realized by an application-specific IC (hereinafter simply referred to as “ASIC”) such as a standard cell or a structured ASIC (Application Specific Integrated Circuit), or a PLD (Programmable Logic Device) such as an FPGA. Specifically, for example, the functions of the respective units described above may be defined in a netlist using a hardware description language or the like, and the netlist may be logically synthesized and provided to the ASIC or PLD to implement each unit.

まず、導出部601は、複数のデータの各々について、対象セクタであるフラッシュメモリ300内の第1セクタ101−1の記憶内容に含まれる数を導出する。複数のデータがどのようなデータであるかを判別するための情報は、フラッシュメモリ300内の領域301などに記憶されていてもよい。導出するタイミングは、たとえば、対象セクタが切り替わる都度であってもよい。または、フラッシュメモリ300などの使用方法が限定されていると、フラッシュメモリ300への書き込み内容に大きな変化がないため、各文字データが記憶された数に大きな変化が発生しない可能性がある。そのため、導出するタイミングは、書き込み先が複数のセクタのうちの特定のセクタに切り替わるタイミングであってもよいし、指定されたタイミングであってもよい。   First, the deriving unit 601 derives the number included in the storage contents of the first sector 101-1 in the flash memory 300, which is the target sector, for each of a plurality of data. Information for determining what kind of data is a plurality of data may be stored in the area 301 in the flash memory 300 or the like. The timing to derive may be, for example, every time the target sector is switched. Alternatively, if the method of using the flash memory 300 or the like is limited, there is no large change in the contents written to the flash memory 300, and there is a possibility that the number of stored character data does not change greatly. Therefore, the timing to derive may be a timing at which the write destination is switched to a specific sector among a plurality of sectors, or may be a designated timing.

また、本実施の形態では、書き込まれるデータを文字に限定し、複数のデータとして複数種類の文字を例に挙げて説明する。複数種類の文字とは、たとえば、「a」、「b」、「c」などのアルファベット文字、やスペース文字などである。   Further, in the present embodiment, data to be written is limited to characters, and a plurality of types of characters are described as an example as a plurality of data. The plural types of characters are, for example, alphabet characters such as “a”, “b”, “c”, and space characters.

図7は、文字変換テーブルの作成例を示す説明図である。ここでは、対象セクタが第1セクタ101−1から第2セクタ101−2へ切り替わる場合を例に挙げる。第1セクタ101−1には、文字変換テーブル110と、文字変換テーブル110に基づいて書き込み対象の文字データが変換された変換文字データと、が記憶されてある。そして、導出部601は、各変換文字データを読み出す。導出部601は、読み出した各変換文字データを文字変換テーブル110に基づいて文字データに復元する。   FIG. 7 is an explanatory diagram of an example of creating a character conversion table. Here, a case where the target sector is switched from the first sector 101-1 to the second sector 101-2 will be described as an example. The first sector 101-1 stores a character conversion table 110 and converted character data obtained by converting character data to be written based on the character conversion table 110. Then, the deriving unit 601 reads each converted character data. The deriving unit 601 restores each read converted character data to character data based on the character conversion table 110.

そして、(1)導出部601は、複数種類の文字の各々について、復元後の文字データが示す文字に基づいて、第1セクタ101−1内の記憶内容に含まれる数をカウントする。ここでは、記憶内容に含まれる数を出現回数と称する。出現回数情報は、出現回数のカウント結果を示す。理解の容易化のために、文字データと、文字と、を対応付けた出現回数情報を示す。出現回数は、空白文字が最も多く、つぎに「e」、「a」、「r」、「t」の順に多い。導出部601は、出現回数情報内の文字データを出現回数が多い順にソートする。   Then, (1) the deriving unit 601 counts the number included in the storage content in the first sector 101-1 based on the character indicated by the restored character data for each of a plurality of types of characters. Here, the number included in the stored content is referred to as the number of appearances. The appearance count information indicates the count result of the appearance count. For ease of understanding, the appearance number information in which character data is associated with a character is shown. The number of appearances is the largest number of blank characters, followed by “e”, “a”, “r”, and “t”. The deriving unit 601 sorts the character data in the appearance count information in descending order of appearance counts.

そして、生成部602は、複数種類の文字の各々に異なる変換文字データが対応付けられた文字変換テーブル110を生成する。文字変換テーブル110は、複数種類の文字の中で導出した出現回数が多い文字ほど、「0」のビットが少ない変換文字データが対応付けられる。   Then, the generation unit 602 generates a character conversion table 110 in which different conversion character data is associated with each of a plurality of types of characters. In the character conversion table 110, a character having a larger number of appearances derived from a plurality of types of characters is associated with converted character data having a smaller number of “0” bits.

具体的には、(2)生成部602は、フラッシュメモリ300内に記憶された文字コード表310を取得する。つぎに、(3)生成部602は、出現回数が多い順に並べられた出現回数情報内の各文字データと、0のビットが少ない順に並べられた文字コード表310に含まれる変換文字データと、をそれぞれの並び順に対応付けることにより、文字変換テーブル110を生成する。これにより、生成部602は、出現回数が多い文字データほど、「0」のビットが少ない変換文字データを対応付けることができる。   Specifically, (2) the generation unit 602 acquires the character code table 310 stored in the flash memory 300. Next, (3) the generation unit 602 includes the character data in the appearance count information arranged in descending order of the number of appearances, the converted character data included in the character code table 310 arranged in ascending order of 0 bits, Are associated with each other in the order of arrangement, thereby generating the character conversion table 110. As a result, the generation unit 602 can associate the converted character data with fewer “0” bits as the character data has a larger number of appearances.

そして、格納部603は、生成された文字変換テーブル110をフラッシュメモリ300内の対象セクタに記憶させる。   Then, the storage unit 603 stores the generated character conversion table 110 in the target sector in the flash memory 300.

たとえば、文字変換テーブル110は、元文字を示す文字データと、対応付けられる変換文字データと、が対応付けられる。各文字について2[バイト]のデータ領域が使用され、255文字であれば、0.5[kバイト]が文字変換テーブル110に使用される。1セクタが8[Kバイト]とすると、1セクタのうちの6[%]が文字変換テーブル110によって使用される。   For example, in the character conversion table 110, character data indicating an original character and associated converted character data are associated with each other. A data area of 2 [bytes] is used for each character, and if it is 255 characters, 0.5 [k bytes] is used for the character conversion table 110. If one sector is 8 [K bytes], 6 [%] of one sector is used by the character conversion table 110.

さらに、移行部604は、切り替え前の第1セクタ101−1の記憶内容を、切り替え後に対象セクタとなる第2セクタ101−2に記憶した文字変換テーブル110によって変換文字データに変換して第2セクタ101−2に書き込む。また、第1セクタ101−1に記憶された記憶内容に含まれる複数の記憶データのうちの有効データだけが切り替え後の対象セクタに書き込まれる。上述したように、有効データか無効データかを特定するために、各記憶データはフラグを有していてもよい。   Further, the transition unit 604 converts the stored contents of the first sector 101-1 before the switching into the converted character data by the character conversion table 110 stored in the second sector 101-2 that becomes the target sector after the switching, to the second Write to sector 101-2. In addition, only valid data among a plurality of stored data included in the storage content stored in the first sector 101-1 is written in the target sector after switching. As described above, in order to specify valid data or invalid data, each stored data may have a flag.

また、たとえば、第1セクタ101−1の記憶データが第1セクタ101−1の文字変換テーブル110−1によって変換されたデータである場合、移行部604は、記憶データを第1セクタ101−1の文字変換テーブル110−1によって文字データに変換する。つぎに、移行部604は、第2セクタ101−2に記憶した文字変換テーブル110−2に基づいて変換文字データに変換して第2セクタ101−2に書き込む。また、ここで、書き込みと読み出しについて簡単に説明する。   For example, when the storage data of the first sector 101-1 is data converted by the character conversion table 110-1 of the first sector 101-1, the migration unit 604 transfers the storage data to the first sector 101-1. Are converted into character data by the character conversion table 110-1. Next, the transfer unit 604 converts the converted character data into the second sector 101-2 based on the character conversion table 110-2 stored in the second sector 101-2. Here, writing and reading will be briefly described.

図8は、書き込み時の変換例を示す説明図である。変換部605は、書き込みデータを文字データのサイズごとに分割する。そして、変換部605は、分割した文字データを文字変換テーブル110に基づいて変換して対象セクタに書き込む。図8の例では、「abcd ABCD」をフラッシュメモリ300に書き込む。「abcd ABCD」を示す書き込みデータは「0x61 0x62 0x63 0x64 0x20 0x41 0x42 0x43 0x44」である。たとえば、書き込みデータに含まれる文字データ「0x61」は文字変換テーブル110によって「0xFD」に変換される。たとえば、「0xFD 0xF1 0xF2 0xF3 0xFF 0xE1 0xE2 0xE3 0xE4」がフラッシュメモリ300の対象セクタに書き込まれる。   FIG. 8 is an explanatory diagram showing a conversion example at the time of writing. The conversion unit 605 divides the write data for each character data size. Then, the conversion unit 605 converts the divided character data based on the character conversion table 110 and writes it in the target sector. In the example of FIG. 8, “abcd ABCD” is written into the flash memory 300. The write data indicating “abcd ABCD” is “0x61 0x62 0x63 0x64 0x20 0x41 0x42 0x43 0x44”. For example, character data “0x61” included in the write data is converted to “0xFD” by the character conversion table 110. For example, “0xFD 0xF1 0xF2 0xF3 0xFF 0xE1 0xE2 0xE3 0xE4” is written to the target sector of the flash memory 300.

図9は、読み出し時の変換例を示す説明図である。変換部605は、読み出し先のデータを読み出す。変換部605は、読み出したデータを文字データのサイズごとに分割する。ここでは、制御装置100は、読み出したデータを1バイト単位で分割する。制御装置100は、分割したデータを文字変換テーブル110に基づいて復元する。図9の例では、読み出しデータ「0xFD 0xF1 0xF2 0xF3 0xFF 0xE1 0xE2 0xE3 0xE4」が文字ごとに分割される。「0xFD」は「0x61」に変換される。「0x61」は「a」を示す文字データである。復元されたデータは、「0x61 0x62 0x63 0x64 0x20 0x41 0x42 0x43 0x44」である。   FIG. 9 is an explanatory diagram illustrating a conversion example at the time of reading. The conversion unit 605 reads out the read destination data. The conversion unit 605 divides the read data for each character data size. Here, the control device 100 divides the read data in units of 1 byte. The control device 100 restores the divided data based on the character conversion table 110. In the example of FIG. 9, the read data “0xFD 0xF1 0xF2 0xF3 0xFF 0xE1 0xE2 0xE3 0xE4” is divided for each character. “0xFD” is converted to “0x61”. “0x61” is character data indicating “a”. The restored data is “0x61 0x62 0x63 0x64 0x20 0x41 0x42 0x43 0x44”.

また、文字の出現回数の変動が少ない場合、フラッシュメモリ300内の同一の領域に同一のレコードが何度も記憶される可能性があり、同一のセルだけに何度も0書き込みが行われる可能性がある。そこで、実施例1では、文字変換テーブル110のレコードの位置を変更したテーブルを生成する。また、実施例1では、変換文字データの一端のビットを他端に移動させたテーブルを生成する。これにより、文字変換テーブル110の記憶によって特定のメモリ素子のみが劣化することを防ぐ。また、文字の出現回数の変動が少なく、有効データに変化が少ないと、フラッシュメモリ300内の同一の領域に同一の有効データが何度も記憶される可能性がある。そこで、実施例2では、切り替え前の対象セクタ内の有効データのうちの先頭の有効データが切り替え後の対象セクタ内の有効データのうちの最後尾に記憶されるように、切り替え後の対象セクタに書き込む。これにより、移行データによって特定のメモリ素子のみが劣化することを防ぐ。   In addition, when the variation in the number of appearances of the character is small, the same record may be stored in the same area in the flash memory 300 many times, and 0 may be written to only the same cell many times. There is sex. Therefore, in the first embodiment, a table in which the position of the record in the character conversion table 110 is changed is generated. In the first embodiment, a table is generated in which the bit at one end of the converted character data is moved to the other end. This prevents only a specific memory element from being deteriorated by storing the character conversion table 110. Also, if the variation in the number of appearances of the characters is small and the change in the effective data is small, the same effective data may be stored in the same area in the flash memory 300 many times. Therefore, in the second embodiment, the target sector after switching is stored such that the first valid data among the valid data in the target sector before switching is stored at the end of the valid data in the target sector after switching. Write to. This prevents only specific memory elements from deteriorating due to the migration data.

ただし、実施例1および2では、出現回数に基づく文字データの順序と、文字コード表310と、に基づいて文字変換テーブル110を生成することを前提とする。また、実施例1および2では、全変換文字データのビット幅がすべて同一とする。   However, in the first and second embodiments, it is assumed that the character conversion table 110 is generated based on the character data order based on the number of appearances and the character code table 310. In the first and second embodiments, all the converted character data have the same bit width.

(実施例1)
実施例1では、文字変換テーブル110のレコードの位置を変更したテーブルであって、変換文字データの一端のビットを他端に移動させたテーブルを生成する。これにより、文字変換テーブル110をフラッシュメモリ300に書き込むことによって特定のメモリ素子のみが劣化することを防ぐ。
Example 1
In the first embodiment, a table in which the position of the record in the character conversion table 110 is changed and a bit at one end of the converted character data is moved to the other end is generated. This prevents only a specific memory element from being deteriorated by writing the character conversion table 110 into the flash memory 300.

図10は、レコードローテーションおよびビットローテーションを示す説明図である。生成部602は、たとえば、文字変換テーブル110を生成する都度、各変換文字データの文字変換テーブル110における相対的位置を変更する。図10では、第1セクタ101−1から第2セクタ101−2に対象セクタが切り替わる場合において、左側には、第1セクタ101−1に記憶された文字変換テーブル110−1を示す。さらに、図10では、右側には、あらたに第2セクタ101−2に対して生成される文字変換テーブル110−2を示す。ここで、第1セクタ101−1の文字変換テーブル110−1を第1文字変換テーブル110−1と称し、第2セクタ101−2の文字変換テーブル110−2を第2文字変換テーブル110−2と称する。   FIG. 10 is an explanatory diagram showing record rotation and bit rotation. For example, each time the character conversion table 110 is generated, the generation unit 602 changes the relative position of the converted character data in the character conversion table 110. In FIG. 10, when the target sector is switched from the first sector 101-1 to the second sector 101-2, the character conversion table 110-1 stored in the first sector 101-1 is shown on the left side. Further, in FIG. 10, the character conversion table 110-2 generated for the second sector 101-2 is newly shown on the right side. Here, the character conversion table 110-1 of the first sector 101-1 is referred to as the first character conversion table 110-1, and the character conversion table 110-2 of the second sector 101-2 is referred to as the second character conversion table 110-2. Called.

たとえば、生成部602は、第1文字変換テーブル110−1内の変換文字データ「0xFF」を含むレコードの相対的な位置を特定する。そして、生成部602は、特定した位置を基準にして、変換文字データの各々の位置を、第1文字変換テーブル110−1における位置と異なる位置に変更された第2文字変換テーブル110−2を生成する。たとえば、生成部602は、先頭のレコードを最後尾に移動させることにより、各変換文字データの相対的な位置を変更する。この変更をレコードローテーションと称する。そのため、変換文字データ「0x00」の位置が255番目であったが、254番目の位置になる。   For example, the generation unit 602 specifies the relative position of the record including the converted character data “0xFF” in the first character conversion table 110-1. Then, the generation unit 602 uses the second character conversion table 110-2 in which each position of the converted character data is changed to a position different from the position in the first character conversion table 110-1 with the specified position as a reference. Generate. For example, the generation unit 602 changes the relative position of each converted character data by moving the head record to the tail. This change is called record rotation. For this reason, the position of the converted character data “0x00” is the 255th position, but becomes the 254th position.

文字変換テーブル110が生成される都度、変換文字データ「0xFF」が同一位置に何度も書き込みされても、その位置のセルの劣化が発生しないが、変換文字データ「0x00」が何度も同一位置に書き込まれると、その位置のセルの劣化が早くなる。したがって、レコードローテーションにより、常時同一位置に同一変換文字データが何度も書き込まれないため、「0」の書き込みが分散され、特定のセルのみが劣化することを防ぐことができる。   Each time the character conversion table 110 is generated, even if the converted character data “0xFF” is written to the same position many times, the cell at that position does not deteriorate, but the converted character data “0x00” is the same many times. When written at a location, the cell at that location is quickly degraded. Therefore, since the same converted character data is not always written to the same position many times by record rotation, writing of “0” is dispersed and only a specific cell can be prevented from deteriorating.

また、文字変換テーブル110の内容に変更が生じない場合には、レコードローテーションにより、同一位置に同一内容が何度も書き込まれないため、「0」の書き込みが分散され、特定のセルのみが劣化することを防ぐことができる。   In addition, when there is no change in the contents of the character conversion table 110, the same contents are not written to the same position many times by the record rotation, so the writing of “0” is distributed and only specific cells are deteriorated. Can be prevented.

また、生成部602は、文字変換テーブル110を生成する処理を行う都度、変換文字データの各々について変換文字データの一端のビットを他端に移動させた文字変換テーブル110を生成する。ここでの移動をビットローテーションと称する。図10の例では、生成部602は、第1文字変換テーブル110−1内の変換文字データの左端のビットを右端に移動させ、残余のビットを左ビットシフトした第2文字変換テーブル110−2を生成する。これにより、変換文字データ内の「0」の数を変えることなく、「0」の書き込みが行われる位置を変更することができる。これにより、常時同一位置に同一変換文字データを有するレコードが記憶されないため、特定のメモリ素子のみが劣化することを防ぐことができる。   Further, each time the generation unit 602 performs the process of generating the character conversion table 110, the generation unit 602 generates the character conversion table 110 in which the bit at one end of the converted character data is moved to the other end for each converted character data. This movement is called bit rotation. In the example of FIG. 10, the generation unit 602 moves the leftmost bit of the converted character data in the first character conversion table 110-1 to the right end, and shifts the remaining bits to the left bit, and the second character conversion table 110-2. Is generated. Thereby, the position where “0” is written can be changed without changing the number of “0” in the converted character data. Thereby, since the record which has the same conversion character data in the same position is not always memorize | stored, it can prevent that only a specific memory element deteriorates.

(実施例1にかかる制御装置100による制御処理手順例)
図11および図12は、実施例1にかかる制御装置による制御処理手順例を示すフローチャートである。制御装置100は、切り替え前の対象セクタから文字変換テーブル110を読み出す(ステップS1101)。制御装置100は、読み出した文字変換テーブル110内の変換文字データ「0xFF」の文字変換テーブル110における相対的な位置を特定し(ステップS1102)、読み出していない記憶データがあるか否かを判断する(ステップS1103)。
(Example of control processing procedure by the control device 100 according to the first embodiment)
11 and 12 are flowcharts illustrating an example of a control processing procedure performed by the control device according to the first embodiment. The control device 100 reads the character conversion table 110 from the target sector before switching (step S1101). The control device 100 identifies the relative position in the character conversion table 110 of the converted character data “0xFF” in the read character conversion table 110 (step S1102), and determines whether there is storage data that has not been read. (Step S1103).

読み出していない記憶データがある場合(ステップS1103:Yes)、制御装置100は、切り替え前の対象セクタの中で読み出していない記憶データから1つの記憶データを読み出す(ステップS1104)。制御装置100は、読み出した記憶データを1バイトごとに文字変換テーブル110によって復元し(ステップS1105)、1バイトごとに復元した文字データの種類を特定する(ステップS1106)。制御装置100は、特定した種類の出現回数をカウントアップし(ステップS1107)、ステップS1103へ戻る。   When there is storage data that has not been read (step S1103: Yes), the control device 100 reads one storage data from the storage data that has not been read in the target sector before switching (step S1104). The control device 100 restores the read storage data for each byte using the character conversion table 110 (step S1105), and specifies the type of character data restored for each byte (step S1106). The control device 100 counts up the number of occurrences of the identified type (step S1107), and returns to step S1103.

読み出していない記憶データがない場合(ステップS1103:No)、制御装置100は、複数種類の文字データを出現回数が多い順に並べた出現回数情報を生成し(ステップS1108)、領域301から文字コード表310を読み出す(ステップS1109)。そして、制御装置100は、出現回数情報の文字データと文字コード表310の変換文字データとを先頭から順に組み合わせて文字変換テーブル110を生成する(ステップS1110)。   When there is no storage data that has not been read (step S1103: No), the control device 100 generates appearance count information in which a plurality of types of character data are arranged in descending order of appearance count (step S1108). 310 is read (step S1109). Then, the control device 100 generates the character conversion table 110 by combining the character data of the appearance count information and the converted character data of the character code table 310 in order from the top (step S1110).

つぎに、制御装置100は、変換文字データ「0xFF」の相対的な位置を基準にして、文字変換テーブル110のレコードの位置を変更するレコードローテーションを行う(ステップS1201)。制御装置100は、文字変換テーブル110の各変換文字データの左端のビットを右端に移動させるビットローテーションを行う(ステップS1202)。そして、制御装置100は、レコードローテーションとビットローテーションを行って生成した文字変換テーブル110を、切り替え後の対象セクタの先頭に書き込む(ステップS1203)。   Next, the control device 100 performs record rotation for changing the position of the record in the character conversion table 110 with reference to the relative position of the converted character data “0xFF” (step S1201). The control device 100 performs bit rotation for moving the leftmost bit of each converted character data in the character conversion table 110 to the right end (step S1202). Then, the control device 100 writes the character conversion table 110 generated by performing record rotation and bit rotation at the head of the target sector after switching (step S1203).

制御装置100は、読み出していない記憶データがあるか否かを判断する(ステップS1204)。読み出していない記憶データがある場合(ステップS1204:Yes)、制御装置100は、切り替え前の対象セクタの中で読み出していない記憶データから1つの記憶データを読み出す(ステップS1205)。制御装置100は、読み出した記憶データが有効データであるか否かを判断する(ステップS1206)。有効データでない場合(ステップS1206:No)、ステップS1204へ戻る。有効データである場合(ステップS1206:Yes)、制御装置100は、切り替え前の対象セクタの文字変換テーブル110によって読み出した記憶データを1バイトごとに復元する(ステップS1207)。   The control device 100 determines whether there is stored data that has not been read (step S1204). When there is storage data that has not been read (step S1204: Yes), the control device 100 reads one storage data from the storage data that has not been read in the target sector before switching (step S1205). The control device 100 determines whether or not the read storage data is valid data (step S1206). If it is not valid data (step S1206: No), the process returns to step S1204. When the data is valid data (step S1206: Yes), the control device 100 restores the storage data read by the character conversion table 110 of the target sector before switching for each byte (step S1207).

制御装置100は、復元したデータを切り替え後の対象セクタに記憶した文字変換テーブル110によって変換し(ステップS1208)、変換した変換文字データを切り替え後の対象セクタに書き込み(ステップS1209)、ステップS1204へ戻る。読み出していない記憶データがない場合(ステップS1204:No)、一連の処理を終了する。   The control device 100 converts the restored data using the character conversion table 110 stored in the target sector after switching (step S1208), writes the converted character data into the target sector after switching (step S1209), and proceeds to step S1204. Return. If there is no storage data that has not been read (step S1204: NO), the series of processing ends.

(実施例2)
実施例2では、切り替え前の対象セクタ内の有効データのうちの先頭の有効データが切り替え後の対象セクタ内の有効データのうちの最後尾に記憶されるように、切り替え後の対象セクタに書き込む。これにより、移行データによって特定のメモリ素子のみが劣化することを防ぐ。
(Example 2)
In the second embodiment, the effective data at the beginning of the effective data in the target sector before the switching is written in the target sector after the switching so that it is stored at the end of the effective data in the target sector after the switching. . This prevents only specific memory elements from deteriorating due to the migration data.

図13は、移行データのローテーションを示す説明図である。各文字データの出現回数の変動が少ないと同一の文字変換テーブル110が生成され、かつセクタに記憶される有効データに変化が少ないと、フラッシュメモリ300内の同一の領域に同一の有効データが何度も記憶される可能性がある。   FIG. 13 is an explanatory diagram showing rotation of migration data. If the variation in the number of appearances of each character data is small, the same character conversion table 110 is generated, and if there is little change in the effective data stored in the sector, what is the same effective data in the same area in the flash memory 300? The degree may also be remembered.

そこで、移行部604は、第1セクタ101−1の記憶内容に含まれる複数の記憶データの各々を文字変換テーブル110に基づいて変換文字データに変換する。そして、移行部604は、複数の記憶データの先頭の記憶データを変換した変換文字データが、複数の記憶データの各々を変換した複数の変換文字データの中で最後尾に記憶されるように第2セクタ101−2に書き込む。   Therefore, the migration unit 604 converts each of a plurality of stored data included in the stored contents of the first sector 101-1 into converted character data based on the character conversion table 110. Then, the transition unit 604 stores the converted character data obtained by converting the first stored data of the plurality of stored data so that the converted character data is stored at the end of the plurality of converted character data obtained by converting each of the plurality of stored data. Write to 2 sectors 101-2.

具体的には、移行部604は、第1セクタ101−1内の文字変換テーブル110以外の記憶内容に含まれる記憶データを順に読み出す。移行部604は、読み出した記憶データが有効データか否かを判断する。移行部604は、有効データである場合、読み出した記憶データを第1セクタ101−1に記憶された第1文字変換テーブル110−1に基づいて変換文字データに変換することにより、変換文字データに復元する。そして、移行部604は、読み出した記憶データが先頭の有効データであるか否かを判断する。先頭の有効データである場合、移行部604は、読み出した記憶データを変換した変換文字データを先頭の有効データとしてRAM501などに一時的に記憶しておく。   Specifically, the migration unit 604 sequentially reads stored data included in the stored contents other than the character conversion table 110 in the first sector 101-1. The migration unit 604 determines whether the read stored data is valid data. If the data is valid data, the transfer unit 604 converts the read storage data into converted character data based on the first character conversion table 110-1 stored in the first sector 101-1, thereby converting the stored data into converted character data. Restore. Then, the migration unit 604 determines whether or not the read storage data is the first valid data. If it is the first valid data, the transition unit 604 temporarily stores the converted character data obtained by converting the read storage data as the first valid data in the RAM 501 or the like.

つぎに、読み出した記憶データが先頭の有効データでない場合、移行部604は、変換した変換文字データを第2セクタ101−2内のデータを記憶可能な領域の先頭から順に書き込む。そして、読み出していない記憶データがない場合、移行部604は、RAM501などに先頭の有効データとして記憶しておいた変換文字データを第2セクタ101−2に書き込む。これにより、移行される記憶データによって特定のメモリ素子のみが劣化することを防ぐ。   Next, when the read storage data is not the first valid data, the transition unit 604 writes the converted converted character data in order from the top of the area where the data in the second sector 101-2 can be stored. If there is no storage data that has not been read, the transition unit 604 writes the converted character data stored as the first valid data in the RAM 501 or the like to the second sector 101-2. This prevents only specific memory elements from being deteriorated by the stored data to be transferred.

(実施例2にかかる制御装置100による制御処理手順例)
図14は、実施例2にかかる制御装置による制御処理手順例を示すフローチャートである。文字変換テーブル110の生成処理手順については、図11に示した例と同一であるため、詳細な説明を省略する。制御装置100は、文字変換テーブル110を切り替え後の対象セクタの先頭に書き込み(ステップS1401)、読み出していない記憶データがあるか否かを判断する(ステップS1402)。読み出していない記憶データがある場合(ステップS1402:Yes)、制御装置100は、切り替え前の対象セクタの中で読み出していない記憶データから1つの記憶データを読み出し(ステップS1403)、読み出した記憶データが有効データであるか否かを判断する(ステップS1404)。
(Example of control processing procedure by the control device 100 according to the second embodiment)
FIG. 14 is a flowchart of a control processing procedure example performed by the control device according to the second embodiment. The generation process procedure of the character conversion table 110 is the same as the example shown in FIG. The control device 100 writes the character conversion table 110 at the head of the target sector after switching (step S1401), and determines whether there is storage data that has not been read (step S1402). When there is storage data that has not been read (step S1402: Yes), the control device 100 reads one storage data from storage data that has not been read in the target sector before switching (step S1403). It is determined whether the data is valid data (step S1404).

有効データでない場合(ステップS1404:No)、ステップS1402へ戻る。有効データである場合(ステップS1404:Yes)、制御装置100は、切り替え前の対象セクタの文字変換テーブル110によって読み出した記憶データを1バイトごとに復元する(ステップS1405)。制御装置100は、復元した文字データを切り替え後の対象セクタに記憶した文字変換テーブル110によって変換し(ステップS1406)、読み出した記憶データが切り替え前の対象セクタに記憶された記憶データの中で先頭の有効データであるか否かを判断する(ステップS1407)。   If it is not valid data (step S1404: No), the process returns to step S1402. When the data is valid data (step S1404: Yes), the control device 100 restores the storage data read by the character conversion table 110 of the target sector before switching for each byte (step S1405). The control device 100 converts the restored character data by the character conversion table 110 stored in the target sector after switching (step S1406), and the read storage data is the first among the stored data stored in the target sector before switching. It is determined whether the data is valid data (step S1407).

先頭の有効データである場合(ステップS1407:Yes)、制御装置100は、読み出した変換後の文字データを先頭の有効データとして記憶し(ステップS1408)、ステップS1402へ移行する。ステップS1408における記憶は、RAM501などに一時的に記憶することを示す。先頭の有効データでない場合(ステップS1407:No)、制御装置100は、変換後の文字データを切り替え後の対象セクタに書き込み(ステップS1409)、ステップS1402へ移行する。ステップS1402において、読み出していないデータがない場合(ステップS1402:No)、制御装置100は、先頭の有効データとして記憶した文字データを切り替え後の対象セクタに書き込み(ステップS1410)、一連の処理を終了する。また、実施例1と実施例2とを組み合わせてもよい。   If it is the first valid data (step S1407: Yes), the control device 100 stores the read converted character data as the first valid data (step S1408), and proceeds to step S1402. The storage in step S1408 indicates that it is temporarily stored in the RAM 501 or the like. If it is not the first valid data (step S1407: No), the control device 100 writes the converted character data in the target sector after switching (step S1409), and proceeds to step S1402. If there is no unread data in step S1402 (step S1402: No), the control device 100 writes the character data stored as the first valid data in the target sector after switching (step S1410), and ends the series of processing. To do. Further, the first embodiment and the second embodiment may be combined.

(制御装置100による書き込み処理手順例)
図15は、制御装置による書き込み処理手順の一例を示すフローチャートである。制御装置100は、文字変換テーブル110を読み出し(ステップS1501)、1バイトごとに文字変換テーブル110に基づいて書き込み対象の各データを変換し(ステップS1502)、変換後の文字データをセクタに書き込み(ステップS1503)、一連の処理を終了する。ステップS1501については、対象セクタに切り替えがない状態で読み出し処理または書き込み処理が連続している場合には1番初めの読み出し処理または書き込み処理の際に読み出されればよい。
(Example of write processing procedure by control device 100)
FIG. 15 is a flowchart illustrating an example of a write processing procedure by the control device. The control device 100 reads the character conversion table 110 (step S1501), converts each data to be written based on the character conversion table 110 for each byte (step S1502), and writes the converted character data in the sector (step S1502). In step S1503), a series of processing ends. Step S1501 may be read at the time of the first read process or write process when the read process or the write process is continued in a state where the target sector is not switched.

(制御装置100による読み出し処理手順例)
図16は、制御装置による読み出し処理手順の一例を示すフローチャートである。制御装置100は、文字変換テーブル110を読み出し(ステップS1601)、読み出し対象のデータを読み出し(ステップS1602)、読み出したデータを1バイトごとに文字変換テーブル110に基づいて復元し(ステップS1603)、一連の処理を終了する。ステップS1601については、対象セクタに切り替えがない状態で読み出し処理または書き込み処理が連続している場合には1番初めの読み出し処理または書き込み処理の際に読み出されればよい。
(Example of read processing procedure by control device 100)
FIG. 16 is a flowchart illustrating an example of a read processing procedure by the control device. The control device 100 reads the character conversion table 110 (step S1601), reads the data to be read (step S1602), restores the read data for each byte based on the character conversion table 110 (step S1603), Terminate the process. Step S1601 may be read at the time of the first read process or write process when the read process or the write process is continued in a state where the target sector is not switched.

図17A〜図17Cは、本実施の形態と文字データの反転との比較例を示す説明図である。従来技術の一例として、文字データを反転して記憶する例を示す。図17Aに示すように、データに含まれる「1」と「0」の個数に基づいてビット「0」の数を減らすようにビット反転が行われた場合、出現回数が考慮されていない。出現回数とは、同一のデータが書き込まれる回数である。図17Aの上側で示すように、ビット「0」の数が多い文字「A」、文字「B」の出現回数が、ビット「0」の数が少ない文字「O」、文字「W」の出現回数と同じ場合、書き込み回数の減少率は55[%]と大きい。一方、図17Aの下側で示すように、文字「A」、文字「B」の出現回数が、文字「O」、文字「W」の出現回数よりも大幅に少ない場合、書き込み回数の減少率は13[%]と小さい。   FIGS. 17A to 17C are explanatory diagrams illustrating a comparative example between the present embodiment and the inversion of character data. As an example of the prior art, an example in which character data is inverted and stored is shown. As shown in FIG. 17A, when bit inversion is performed so as to reduce the number of bits “0” based on the number of “1” and “0” included in the data, the number of appearances is not considered. The number of appearances is the number of times the same data is written. As shown in the upper side of FIG. 17A, the appearance number of the character “A” and the character “B” having a large number of bits “0” is the appearance number of the character “O” and the character “W” having a small number of bits “0”. In the same case as the number of times, the reduction rate of the number of times of writing is as large as 55 [%]. On the other hand, as shown in the lower side of FIG. 17A, when the number of appearances of the characters “A” and “B” is significantly smaller than the number of appearances of the characters “O” and “W”, the reduction rate of the number of writings Is as small as 13 [%].

そして、図17Bでは、制御装置100がいくつかのテキストデータを使用してフラッシュメモリ300に書き込みを行った場合のビット「0」が書き込まれる数の減少率を示す。ビット反転無しの場合と、ビット反転有りの場合と、本実施の形態による制御との各々について、テキストデータ内の各データを書き込む動作を行った場合に、フラッシュメモリ300に「0」と「1」の各々が書き込まれた回数を示す。ビット反転無しの場合とは、テキストデータ内の各データをそのままフラッシュメモリ300に書き込んだ例である。   FIG. 17B shows a reduction rate of the number of bits “0” written when the control device 100 writes to the flash memory 300 using some text data. When the operation of writing each data in the text data is performed for each of the case where there is no bit inversion, the case where there is bit inversion, and the control according to this embodiment, “0” and “1” are stored in the flash memory 300. "Indicates the number of times each is written. The case of no bit inversion is an example in which each data in the text data is written in the flash memory 300 as it is.

ビット反転無しの場合よりも本実施の形態の制御の場合はビット「0」の書き込み回数を70[%]減少させることができ、ビット反転有りの場合よりも本実施の形態の制御の場合はビット「0」の書き込み回数を51[%]減少させることができたことを示す。   In the case of the control according to the present embodiment, the number of times of writing of the bit “0” can be reduced by 70 [%] compared to the case without the bit inversion. This indicates that the write count of bit “0” can be reduced by 51 [%].

図17Cに示すように、文字データを反転して記憶する場合、データと、データごとにビット反転の有無を示す情報とが記憶される。一方、本実施の形態では、各データが変換されたデータが記憶される。そのため、従来技術ではビット反転の有無をECC(Error Correcting Code)やパリティチェックのビット誤り訂正機能のビットを使って行うことから、ビット誤り訂正の機能を同時に使用することができないが、本実施の形態ではビット誤り訂正の機能を同時に使用することが可能となる。   As shown in FIG. 17C, when character data is inverted and stored, data and information indicating the presence or absence of bit inversion are stored for each data. On the other hand, in the present embodiment, data obtained by converting each data is stored. Therefore, in the prior art, the bit inversion presence / absence is performed using bits of the ECC (Error Correcting Code) and the bit error correction function of the parity check, and therefore the bit error correction function cannot be used at the same time. In the embodiment, the bit error correction function can be used simultaneously.

以上説明したように、制御装置は、切り替え前の対象セクタの記憶内容に含まれる数が多いデータほど、切り替え後の対象セクタへの書き込み時に0の数が少ない符号に対応付けたテーブルを生成する。そして、制御装置は、対象セクタへの書き込み対象のデータをテーブルに基づいて変換してから書き込む。これにより、「0」の書き込み回数を減少させることができる。したがって、セルの劣化を遅らせることができる。   As described above, the control device generates a table associated with codes having a smaller number of 0 when writing to the target sector after switching, as the number of data included in the storage contents of the target sector before switching is larger. . Then, the control device writes the data to be written to the target sector after converting it based on the table. Thereby, the number of times of writing “0” can be reduced. Therefore, cell deterioration can be delayed.

また、制御装置は、切り替え後の対象セクタに記憶された記憶データをテーブルに基づいて変換することにより、データを復元することができる。   Further, the control device can restore the data by converting the storage data stored in the target sector after switching based on the table.

記憶内容に含まれる数に基づく複数のデータの順序と、異なる変換文字データの「0」が含まれる数に基づく変換文字データの順序と、によって、テーブルを生成する。これにより、データと、予め決められた変換文字データと、を対応付けるだけであるため、制御装置による処理を単純化することができ、制御装置がテーブルの生成に要する時間を短縮することができる。   A table is generated based on the order of the plurality of data based on the number included in the stored content and the order of the converted character data based on the number including “0” of different converted character data. As a result, since the data is simply associated with the predetermined conversion character data, the processing by the control device can be simplified, and the time required for the control device to generate the table can be shortened.

また、制御装置は、テーブルを生成する処理を行う都度、文字変換テーブルの各々の相対的な位置が異なるテーブルを生成する。これにより、同一位置に同一の変換文字データが何度も書き込まれないため、「0」の書き込みを分散することができ、セルの劣化を遅らせることができる。   In addition, each time the process of generating a table is performed, the control device generates a table in which the relative positions of the character conversion tables are different. As a result, since the same converted character data is not written many times at the same position, writing of “0” can be dispersed, and cell deterioration can be delayed.

また、制御装置は、テーブルを生成する処理を行う都度、変換文字データの各々について変換文字データの一端のビットを他端に移動させたテーブルを生成する。これにより、同一位置に同一の変換文字データが何度も書き込まれないため、「0」の書き込みを分散することができ、セルの劣化を遅らせることができる。   Each time the control device performs the process of generating a table, the control device generates a table in which the bit at one end of the converted character data is moved to the other end for each of the converted character data. As a result, since the same converted character data is not written many times at the same position, writing of “0” can be dispersed, and cell deterioration can be delayed.

また、文字の出現回数の変動が少なく、有効データに変化が少ないと、フラッシュメモリ300内の同一の領域に同一の有効データが何度も記憶される可能性がある。そこで、制御装置は、切り替え前の対象セクタの記憶データを切り替え後の対象セクタに移行させる際に、先頭の記憶データをテーブルに基づいて変換した文字変換データが、切り替え後の対象セクタの移行データの中で最後尾に記憶されるように書き込む。これにより、特定のセルに同一のデータが何度も書き込まれないため、「0」の書き込みを分散することができ、セルの劣化を遅らせることができる。   Also, if the variation in the number of appearances of the characters is small and the change in the effective data is small, the same effective data may be stored in the same area in the flash memory 300 many times. Therefore, when the control device shifts the storage data of the target sector before switching to the target sector after switching, the character conversion data obtained by converting the head storage data based on the table is the transition data of the target sector after switching. Write to be memorized at the end. Thereby, since the same data is not written to a specific cell many times, writing of “0” can be distributed, and the deterioration of the cell can be delayed.

なお、本実施の形態で説明した制御方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本制御プログラムは、フラッシュメモリやディスク等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本制御プログラムは、インターネット等のネットワークを介して配布してもよい。   The control method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This control program is recorded on a computer-readable recording medium such as a flash memory or a disk, and is executed by being read from the recording medium by the computer. The control program may be distributed via a network such as the Internet.

上述した実施の形態に関し、さらに以下の付記を開示する。   The following additional notes are disclosed with respect to the embodiment described above.

(付記1)特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置が、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数である第1の個数を導出し、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、前記第1の個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、
生成した前記テーブルを前記第2セクタに記憶させ、
前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、
前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む、
処理を実行することを特徴とする制御方法。
(Additional remark 1) The control apparatus which controls the writing and reading with respect to the memory from which the sector for writing and reading switches by the wear leveling which is a memory control method which prevents concentration of writing to a specific sector,
For a plurality of data having different values, when the target sector is the first sector in the memory, a first number that is the number of each of the plurality of data included in the storage content of the first sector is derived.
When the target sector is switched from the first sector to the second sector, each of the plurality of data is a table in which different bit strings are associated with each other. Generate a table with fewer bit strings associated with
Storing the generated table in the second sector;
The storage content of the first sector is converted to the bit string based on the generated table and written to the second sector,
Each data to be written to the second sector is converted into the bit string based on the generated table and written to the second sector.
A control method characterized by executing processing.

(付記2)前記特定の値は、前記メモリ内のセルの浮遊ゲートが電子を保持することにより表される値であることを特徴とする付記1に記載の制御方法。 (Additional remark 2) The said specific value is a value represented by the floating gate of the cell in the said memory holding an electron, The control method of Additional remark 1 characterized by the above-mentioned.

(付記3)前記異なるビット列の個数は前記複数のデータの個数と同一であり、
前記テーブルを生成する処理では、
前記第1の個数に基づく前記複数のデータの順序と、前記異なるビット列が含む前記特定の値の個数である第2の個数に基づく前記異なるビット列の順序を示す情報と、に基づいて前記テーブルを生成することを特徴とする付記1または2に記載の制御方法。
(Supplementary Note 3) The number of different bit strings is the same as the number of the plurality of data,
In the process of generating the table,
The table based on the order of the plurality of data based on the first number and information indicating the order of the different bit strings based on a second number that is the number of the specific values included in the different bit strings. The control method according to appendix 1 or 2, wherein the control method is generated.

(付記4)前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々の相対的な位置が異なる前記テーブルを生成する処理を実行することを特徴とする付記3に記載の制御方法。
(Supplementary note 4)
4. The control method according to appendix 3, wherein the process of generating the table in which the relative positions of the bit strings are different each time the process of generating the table is performed.

(付記5)前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々について前記ビット列の一端のビットを他端に移動させた前記テーブルを生成する処理を実行することを特徴とする付記3または4に記載の制御方法。
(Appendix 5) The control device
5. The control according to appendix 3 or 4, wherein each time the process of generating the table is performed, the process of generating the table is performed by moving a bit at one end of the bit string to the other end for each of the bit strings. Method.

(付記6)前記第1セクタの記憶内容を前記ビット列に変換して前記第2セクタに書き込む処理では、
前記記憶内容に含まれる複数の記憶データの各々を前記テーブルに基づいて前記ビット列に変換し、前記複数の記憶データの先頭の記憶データを変換したビット列が、前記複数の記憶データの各々を変換した複数のビット列の中で最後尾に記憶されるように前記第2セクタに書き込むことを特徴とする付記1〜5のいずれか一つに記載の制御方法。
(Supplementary note 6) In the process of converting the storage content of the first sector into the bit string and writing it to the second sector,
Each of a plurality of stored data included in the stored contents is converted into the bit string based on the table, and a bit string obtained by converting the first stored data of the plurality of stored data is converted into each of the plurality of stored data. The control method according to any one of appendices 1 to 5, wherein the second sector is written so as to be stored at the end of a plurality of bit strings.

(付記7)前記制御装置は、
前記第2セクタから読み出し対象のビット列を読み出し、読み出したビット列を記憶した前記テーブルに基づいて前記複数のデータのいずれかに変換する処理を実行することを特徴とする付記1〜6のいずれか一つに記載の制御方法。
(Appendix 7) The control device
Any one of appendices 1 to 6, wherein a read-out bit string is read from the second sector and a process of converting the read bit string into any of the plurality of data is executed based on the table storing the read bit string. Control method described in one.

(付記8)特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置に、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数を導出し、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、導出した前記個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、
生成した前記テーブルを前記第2セクタに記憶させ、
前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、
前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む、
処理をコンピュータに実行させることを特徴とする制御プログラム。
(Supplementary note 8) A control device for controlling writing and reading to a memory in which a write and read target sector is switched by wear leveling, which is a memory control method for preventing concentration of writing to a specific sector,
For a plurality of data having different values, when the target sector is the first sector in the memory, the number of each of the plurality of data included in the storage content of the first sector is derived,
When the target sector is switched from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of pieces of data, the more the number of derived data, the more specific bits are Create a table with a small number of bit strings,
Storing the generated table in the second sector;
The storage content of the first sector is converted to the bit string based on the generated table and written to the second sector,
Each data to be written to the second sector is converted into the bit string based on the generated table and written to the second sector.
A control program for causing a computer to execute processing.

(付記9)特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置であって、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数を導出する導出部と、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、前記導出部が導出した前記個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成する生成部と、
前記生成部が生成した前記テーブルを前記第2セクタに記憶させる格納部と、
前記第1セクタの記憶内容を、前記生成部が生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む移行部と、
前記第2セクタに対する書き込み対象の各データを、前記生成部が生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む変換部と、
を有することを特徴とする制御装置。
(Supplementary note 9) A control device for controlling writing and reading with respect to a memory in which write and read target sectors are switched by wear leveling, which is a memory control method for preventing concentration of writing to a specific sector,
A deriving unit for deriving the number of each of the plurality of data included in the storage contents of the first sector when the target sector is the first sector in the memory for a plurality of data having different values;
When the target sector is switched from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of data, the more data the derivation unit derives, the more specific data A generation unit that generates a table in which a bit string having a small number of bits is associated;
A storage unit for storing the table generated by the generation unit in the second sector;
A transition unit that converts the storage content of the first sector into the bit string based on the table generated by the generation unit and writes the bit string to the second sector;
A conversion unit that converts each data to be written to the second sector to the bit string based on the table generated by the generation unit, and writes the data to the second sector;
A control device comprising:

(付記10)特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置に、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数を導出し、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、導出した前記個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、
生成した前記テーブルを前記第2セクタに記憶させ、
前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、
前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む、
処理をコンピュータに実行させる制御プログラムを記録したことを特徴とする記録媒体。
(Supplementary Note 10) A control device that controls writing and reading to a memory in which a sector to be written and read is switched by wear leveling, which is a memory control method that prevents concentration of writing to a specific sector,
For a plurality of data having different values, when the target sector is the first sector in the memory, the number of each of the plurality of data included in the storage content of the first sector is derived,
When the target sector is switched from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of pieces of data, the more the number of derived data, the more specific bits are Create a table with a small number of bit strings,
Storing the generated table in the second sector;
The storage content of the first sector is converted to the bit string based on the generated table and written to the second sector,
Each data to be written to the second sector is converted into the bit string based on the generated table and written to the second sector.
A recording medium on which a control program for causing a computer to execute processing is recorded.

100 制御装置
101−1 第1セクタ
101−2 第2セクタ
110 文字変換テーブル
300 フラッシュメモリ
310 文字コード表
601 導出部
602 生成部
603 格納部
604 移行部
605 変換部
DESCRIPTION OF SYMBOLS 100 Control apparatus 101-1 1st sector 101-2 2nd sector 110 Character conversion table 300 Flash memory 310 Character code table 601 Derivation part 602 Generation part 603 Storage part 604 Migration part 605 Conversion part

Claims (9)

特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置が、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数である第1の個数を導出し、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、前記第1の個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、
生成した前記テーブルを前記第2セクタに記憶させ、
前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、
前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む、
処理を実行することを特徴とする制御方法。
A control device that controls writing and reading with respect to a memory in which a target sector of writing and reading is switched by wear leveling, which is a memory control method that prevents concentration of writing to a specific sector,
For a plurality of data having different values, when the target sector is the first sector in the memory, a first number that is the number of each of the plurality of data included in the storage content of the first sector is derived.
When the target sector is switched from the first sector to the second sector, each of the plurality of data is a table in which different bit strings are associated with each other. Generate a table with fewer bit strings associated with
Storing the generated table in the second sector;
The storage content of the first sector is converted to the bit string based on the generated table and written to the second sector,
Each data to be written to the second sector is converted into the bit string based on the generated table and written to the second sector.
A control method characterized by executing processing.
前記特定の値は、前記メモリ内のセルの浮遊ゲートが電子を保持することにより表される値であることを特徴とする請求項1に記載の制御方法。   The control method according to claim 1, wherein the specific value is a value expressed by holding electrons in a floating gate of a cell in the memory. 前記異なるビット列の個数は前記複数のデータの個数と同一であり、
前記テーブルを生成する処理では、
前記第1の個数に基づく前記複数のデータの順序と、前記異なるビット列が含む前記特定の値の個数である第2の個数に基づく前記異なるビット列の順序を示す情報と、に基づいて前記テーブルを生成することを特徴とする請求項1または2に記載の制御方法。
The number of different bit strings is the same as the number of the plurality of data,
In the process of generating the table,
The table based on the order of the plurality of data based on the first number and information indicating the order of the different bit strings based on a second number that is the number of the specific values included in the different bit strings. The control method according to claim 1, wherein the control method is generated.
前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々の相対的な位置が異なる前記テーブルを生成する処理を実行することを特徴とする請求項3に記載の制御方法。
The controller is
4. The control method according to claim 3, wherein each time the process of generating the table is performed, the process of generating the table in which the relative positions of the bit strings are different is executed.
前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々について前記ビット列の一端のビットを他端に移動させた前記テーブルを生成する処理を実行することを特徴とする請求項3または4に記載の制御方法。
The controller is
5. The process for generating the table in which the bit at one end of the bit string is moved to the other end for each of the bit strings each time the process for generating the table is performed is performed. Control method.
前記第1セクタの記憶内容を前記ビット列に変換して前記第2セクタに書き込む処理では、
前記記憶内容に含まれる複数の記憶データの各々を前記テーブルに基づいて前記ビット列に変換し、前記複数の記憶データの先頭の記憶データを変換したビット列が、前記複数の記憶データの各々を変換した複数のビット列の中で最後尾に記憶されるように前記第2セクタに書き込むことを特徴とする請求項1〜5のいずれか一つに記載の制御方法。
In the process of converting the storage content of the first sector into the bit string and writing to the second sector,
Each of a plurality of stored data included in the stored contents is converted into the bit string based on the table, and a bit string obtained by converting the first stored data of the plurality of stored data is converted into each of the plurality of stored data. 6. The control method according to claim 1, wherein the second sector is written so as to be stored at the end of the plurality of bit strings.
前記制御装置は、
前記第2セクタから読み出し対象のビット列を読み出し、読み出したビット列を記憶した前記テーブルに基づいて前記複数のデータのいずれかに変換する処理を実行することを特徴とする請求項1〜6のいずれか一つに記載の制御方法。
The controller is
The read-out bit string is read from the second sector, and a process of converting the read bit string into any of the plurality of data based on the table storing the read bit string is executed. The control method according to one.
特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置に、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数を導出し、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、導出した前記個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成し、
生成した前記テーブルを前記第2セクタに記憶させ、
前記第1セクタの記憶内容を、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込み、
前記第2セクタに対する書き込み対象の各データを、生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む、
処理をコンピュータに実行させることを特徴とする制御プログラム。
To a control device that controls writing and reading to a memory in which a target sector of writing and reading is switched by wear leveling, which is a memory control method that prevents concentration of writing to a specific sector,
For a plurality of data having different values, when the target sector is the first sector in the memory, the number of each of the plurality of data included in the storage content of the first sector is derived,
When the target sector is switched from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of pieces of data, the more the number of derived data, the more specific bits are Create a table with a small number of bit strings,
Storing the generated table in the second sector;
The storage content of the first sector is converted to the bit string based on the generated table and written to the second sector,
Each data to be written to the second sector is converted into the bit string based on the generated table and written to the second sector.
A control program for causing a computer to execute processing.
特定のセクタへの書き込みの集中を防止するメモリ制御方法であるウェアレベリングによって書き込みおよび読み出しの対象セクタが切り替わるメモリに対する書き込みおよび読み出しを制御する制御装置であって、
値が異なる複数のデータについて、前記対象セクタが前記メモリ内の第1セクタである時に前記第1セクタの記憶内容に含まれる前記複数のデータの各々の個数を導出する導出部と、
前記対象セクタが前記第1セクタから第2セクタに切り替わると、前記複数のデータの各々に異なるビット列が対応付けられたテーブルであって、前記導出部が導出した前記個数が多いデータほど、特定の値のビットが少ないビット列が対応付けられたテーブルを生成する生成部と、
前記生成部が生成した前記テーブルを前記第2セクタに記憶させる格納部と、
前記第1セクタの記憶内容を、前記生成部が生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む移行部と、
前記第2セクタに対する書き込み対象の各データを、前記生成部が生成した前記テーブルに基づいて前記ビット列に変換して前記第2セクタに書き込む変換部と、
を有することを特徴とする制御装置。
A control device for controlling writing and reading to a memory in which a target sector of writing and reading is switched by wear leveling, which is a memory control method for preventing concentration of writing to a specific sector,
A deriving unit for deriving the number of each of the plurality of data included in the storage contents of the first sector when the target sector is the first sector in the memory for a plurality of data having different values;
When the target sector is switched from the first sector to the second sector, a table in which different bit strings are associated with each of the plurality of data, the more data the derivation unit derives, the more specific data A generation unit that generates a table in which a bit string having a small number of bits is associated;
A storage unit for storing the table generated by the generation unit in the second sector;
A transition unit that converts the storage content of the first sector into the bit string based on the table generated by the generation unit and writes the bit string to the second sector;
A conversion unit that converts each data to be written to the second sector to the bit string based on the table generated by the generation unit, and writes the data to the second sector;
A control device comprising:
JP2013095769A 2013-04-30 2013-04-30 Control method, control program, and control apparatus Active JP6129635B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013095769A JP6129635B2 (en) 2013-04-30 2013-04-30 Control method, control program, and control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013095769A JP6129635B2 (en) 2013-04-30 2013-04-30 Control method, control program, and control apparatus

Publications (2)

Publication Number Publication Date
JP2014215986A JP2014215986A (en) 2014-11-17
JP6129635B2 true JP6129635B2 (en) 2017-05-17

Family

ID=51941643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013095769A Active JP6129635B2 (en) 2013-04-30 2013-04-30 Control method, control program, and control apparatus

Country Status (1)

Country Link
JP (1) JP6129635B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009135854A (en) * 2007-12-03 2009-06-18 Fujitsu Ltd Memory access control device, control method, and program
US8341501B2 (en) * 2009-04-30 2012-12-25 International Business Machines Corporation Adaptive endurance coding of non-volatile memories
US8495285B2 (en) * 2011-08-31 2013-07-23 Micron Technology, Inc. Apparatuses and methods of operating for memory endurance

Also Published As

Publication number Publication date
JP2014215986A (en) 2014-11-17

Similar Documents

Publication Publication Date Title
Nash et al. Quantum circuit optimizations for NISQ architectures
US8629886B2 (en) Layer combination in a surface composition system
US20160034370A1 (en) Methods and systems for storing information that facilitates the reconstruction of at least some of the contents of a storage unit on a storage system
JP2016218897A (en) Controller, and control method
US20160350345A1 (en) Merging of sorted lists using array pair
US20210216225A1 (en) Method, device and computer program product for storage
CN105844683A (en) Pixel difference frame-by-frame animation realization method based on Canvas and WebWorker
KR20140002474A (en) Data converting method and data converting apparatus
US8990500B2 (en) Storing the most significant and the least significant bytes of characters at non-contiguous addresses
JP6129635B2 (en) Control method, control program, and control apparatus
US20130332433A1 (en) Computer product, generating apparatus, and generating method
US11055328B2 (en) Non-transitory computer readable medium, encode device, and encode method
CN115759006A (en) Document rendering method and device, electronic equipment and storage medium
JP6902861B2 (en) Coding device, coding method, decoding device, decoding method and generation method
EP3920022A1 (en) Information processing device, method, and program
WO2014030180A1 (en) Storage program, storage method, storage device, decompression program, decompression method, and decompression device
JPWO2008102474A1 (en) Pattern matching method and program
JP6437428B2 (en) Nonvolatile semiconductor memory controller
CN104021026A (en) Language adding method based on Android system
KR20220141044A (en) Apparatus and method for successive cancellation flip decoding of polar code
CN112070230B (en) Quantum surface code error correction controlled NOT gate based on novel quantum bit interaction topology
JPWO2015173966A1 (en) Information processing apparatus, write control circuit, write control method, and write control program
CN111722788B (en) Memory device and memory access method
US20240204796A1 (en) Code table generation device, memory system, and code table generation method
JP4034385B2 (en) Multi-color image encoding apparatus and method, and multi-color image decoding apparatus and method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20160118

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160408

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170308

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170321

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170412

R150 Certificate of patent or registration of utility model

Ref document number: 6129635

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250