JP6129635B2 - Control method, control program, and control apparatus - Google Patents
Control method, control program, and control apparatus Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims description 78
- 238000006243 chemical reaction Methods 0.000 claims description 87
- 230000008569 process Effects 0.000 claims description 30
- 238000012545 processing Methods 0.000 claims description 25
- 230000007704 transition Effects 0.000 claims description 8
- 238000009795 derivation Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 26
- 230000005012 migration Effects 0.000 description 11
- 238000013508 migration Methods 0.000 description 11
- 230000006866 deterioration Effects 0.000 description 10
- 230000003111 delayed effect Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000000052 comparative effect Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 230000002542 deteriorative effect Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 2
- 239000012141 concentrate Substances 0.000 description 2
- 238000006731 degradation reaction Methods 0.000 description 2
- 239000012212 insulator Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N Silicium dioxide Chemical compound O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 1
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- 229910052814 silicon oxide Inorganic materials 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
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
また、書き込むデータに含まれる「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).
しかしながら、従来技術では、書き込むデータによっては「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.
以下に添付図面を参照して、本発明にかかる制御方法、制御プログラム、および制御装置の実施の形態を詳細に説明する。 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
制御装置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
制御装置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
制御装置100は、第2セクタ101−2に対する書き込み対象の各データを、生成した文字変換テーブル110に基づいてビット列に変換して第2セクタ101−2に書き込む。たとえば、書き込み対象のデータは「abc」である。制御装置100は、文字変換テーブル110に基づいて、データ「a」を変換文字データ「11」に変換し、データ「b」を変換文字データ「10」に変換し、データ「c」を変換文字データ「01」に変換する。そして、制御装置100は、変換後のデータ「111001」を第2セクタ101−2に書き込む。
The
これにより、書き込まれる回数が多いデータほど「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
図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
図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
また、システム500がPCなどの場合、制御装置100はCPUであり、システム500は、インターネットなどに接続可能なI/F、ディスプレイなどの出力装置、キーボードやマウスなどの入力装置などを有していてもよい。
When the
図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
また、各部は、論理積回路である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
また、本実施の形態では、書き込まれるデータを文字に限定し、複数のデータとして複数種類の文字を例に挙げて説明する。複数種類の文字とは、たとえば、「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
具体的には、(2)生成部602は、フラッシュメモリ300内に記憶された文字コード表310を取得する。つぎに、(3)生成部602は、出現回数が多い順に並べられた出現回数情報内の各文字データと、0のビットが少ない順に並べられた文字コード表310に含まれる変換文字データと、をそれぞれの並び順に対応付けることにより、文字変換テーブル110を生成する。これにより、生成部602は、出現回数が多い文字データほど、「0」のビットが少ない変換文字データを対応付けることができる。
Specifically, (2) the
そして、格納部603は、生成された文字変換テーブル110をフラッシュメモリ300内の対象セクタに記憶させる。
Then, the
たとえば、文字変換テーブル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
また、たとえば、第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
図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
図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
また、文字の出現回数の変動が少ない場合、フラッシュメモリ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
ただし、実施例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
図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
たとえば、生成部602は、第1文字変換テーブル110−1内の変換文字データ「0xFF」を含むレコードの相対的な位置を特定する。そして、生成部602は、特定した位置を基準にして、変換文字データの各々の位置を、第1文字変換テーブル110−1における位置と異なる位置に変更された第2文字変換テーブル110−2を生成する。たとえば、生成部602は、先頭のレコードを最後尾に移動させることにより、各変換文字データの相対的な位置を変更する。この変更をレコードローテーションと称する。そのため、変換文字データ「0x00」の位置が255番目であったが、254番目の位置になる。
For example, the
文字変換テーブル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
(実施例1にかかる制御装置100による制御処理手順例)
図11および図12は、実施例1にかかる制御装置による制御処理手順例を示すフローチャートである。制御装置100は、切り替え前の対象セクタから文字変換テーブル110を読み出す(ステップS1101)。制御装置100は、読み出した文字変換テーブル110内の変換文字データ「0xFF」の文字変換テーブル110における相対的な位置を特定し(ステップS1102)、読み出していない記憶データがあるか否かを判断する(ステップS1103)。
(Example of control processing procedure by the
11 and 12 are flowcharts illustrating an example of a control processing procedure performed by the control device according to the first embodiment. The
読み出していない記憶データがある場合(ステップ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
読み出していない記憶データがない場合(ステップ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
つぎに、制御装置100は、変換文字データ「0xFF」の相対的な位置を基準にして、文字変換テーブル110のレコードの位置を変更するレコードローテーションを行う(ステップS1201)。制御装置100は、文字変換テーブル110の各変換文字データの左端のビットを右端に移動させるビットローテーションを行う(ステップS1202)。そして、制御装置100は、レコードローテーションとビットローテーションを行って生成した文字変換テーブル110を、切り替え後の対象セクタの先頭に書き込む(ステップS1203)。
Next, the
制御装置100は、読み出していない記憶データがあるか否かを判断する(ステップS1204)。読み出していない記憶データがある場合(ステップS1204:Yes)、制御装置100は、切り替え前の対象セクタの中で読み出していない記憶データから1つの記憶データを読み出す(ステップS1205)。制御装置100は、読み出した記憶データが有効データであるか否かを判断する(ステップS1206)。有効データでない場合(ステップS1206:No)、ステップS1204へ戻る。有効データである場合(ステップS1206:Yes)、制御装置100は、切り替え前の対象セクタの文字変換テーブル110によって読み出した記憶データを1バイトごとに復元する(ステップS1207)。
The
制御装置100は、復元したデータを切り替え後の対象セクタに記憶した文字変換テーブル110によって変換し(ステップS1208)、変換した変換文字データを切り替え後の対象セクタに書き込み(ステップS1209)、ステップS1204へ戻る。読み出していない記憶データがない場合(ステップS1204:No)、一連の処理を終了する。
The
(実施例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
そこで、移行部604は、第1セクタ101−1の記憶内容に含まれる複数の記憶データの各々を文字変換テーブル110に基づいて変換文字データに変換する。そして、移行部604は、複数の記憶データの先頭の記憶データを変換した変換文字データが、複数の記憶データの各々を変換した複数の変換文字データの中で最後尾に記憶されるように第2セクタ101−2に書き込む。
Therefore, the
具体的には、移行部604は、第1セクタ101−1内の文字変換テーブル110以外の記憶内容に含まれる記憶データを順に読み出す。移行部604は、読み出した記憶データが有効データか否かを判断する。移行部604は、有効データである場合、読み出した記憶データを第1セクタ101−1に記憶された第1文字変換テーブル110−1に基づいて変換文字データに変換することにより、変換文字データに復元する。そして、移行部604は、読み出した記憶データが先頭の有効データであるか否かを判断する。先頭の有効データである場合、移行部604は、読み出した記憶データを変換した変換文字データを先頭の有効データとしてRAM501などに一時的に記憶しておく。
Specifically, the
つぎに、読み出した記憶データが先頭の有効データでない場合、移行部604は、変換した変換文字データを第2セクタ101−2内のデータを記憶可能な領域の先頭から順に書き込む。そして、読み出していない記憶データがない場合、移行部604は、RAM501などに先頭の有効データとして記憶しておいた変換文字データを第2セクタ101−2に書き込む。これにより、移行される記憶データによって特定のメモリ素子のみが劣化することを防ぐ。
Next, when the read storage data is not the first valid data, the
(実施例2にかかる制御装置100による制御処理手順例)
図14は、実施例2にかかる制御装置による制御処理手順例を示すフローチャートである。文字変換テーブル110の生成処理手順については、図11に示した例と同一であるため、詳細な説明を省略する。制御装置100は、文字変換テーブル110を切り替え後の対象セクタの先頭に書き込み(ステップS1401)、読み出していない記憶データがあるか否かを判断する(ステップS1402)。読み出していない記憶データがある場合(ステップS1402:Yes)、制御装置100は、切り替え前の対象セクタの中で読み出していない記憶データから1つの記憶データを読み出し(ステップS1403)、読み出した記憶データが有効データであるか否かを判断する(ステップS1404)。
(Example of control processing procedure by the
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
有効データでない場合(ステップ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
先頭の有効データである場合(ステップ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
(制御装置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
(制御装置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
図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
ビット反転無しの場合よりも本実施の形態の制御の場合はビット「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
なお、本実施の形態で説明した制御方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本制御プログラムは、フラッシュメモリやディスク等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本制御プログラムは、インターネット等のネットワークを介して配布してもよい。 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
(付記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
(付記4)前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々の相対的な位置が異なる前記テーブルを生成する処理を実行することを特徴とする付記3に記載の制御方法。
(Supplementary note 4)
4. The control method according to
(付記5)前記制御装置は、
前記テーブルを生成する処理を行う都度、前記ビット列の各々について前記ビット列の一端のビットを他端に移動させた前記テーブルを生成する処理を実行することを特徴とする付記3または4に記載の制御方法。
(Appendix 5) The control device
5. The control according to
(付記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
(付記7)前記制御装置は、
前記第2セクタから読み出し対象のビット列を読み出し、読み出したビット列を記憶した前記テーブルに基づいて前記複数のデータのいずれかに変換する処理を実行することを特徴とする付記1〜6のいずれか一つに記載の制御方法。
(Appendix 7) The control device
Any one of
(付記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
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の個数に基づく前記複数のデータの順序と、前記異なるビット列が含む前記特定の値の個数である第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.
前記記憶内容に含まれる複数の記憶データの各々を前記テーブルに基づいて前記ビット列に変換し、前記複数の記憶データの先頭の記憶データを変換したビット列が、前記複数の記憶データの各々を変換した複数のビット列の中で最後尾に記憶されるように前記第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:
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)
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 |
-
2013
- 2013-04-30 JP JP2013095769A patent/JP6129635B2/en active Active
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 |