JP5343817B2 - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
JP5343817B2
JP5343817B2 JP2009258105A JP2009258105A JP5343817B2 JP 5343817 B2 JP5343817 B2 JP 5343817B2 JP 2009258105 A JP2009258105 A JP 2009258105A JP 2009258105 A JP2009258105 A JP 2009258105A JP 5343817 B2 JP5343817 B2 JP 5343817B2
Authority
JP
Japan
Prior art keywords
data
storage device
block
service
block group
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.)
Expired - Fee Related
Application number
JP2009258105A
Other languages
Japanese (ja)
Other versions
JP2011103077A (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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2009258105A priority Critical patent/JP5343817B2/en
Publication of JP2011103077A publication Critical patent/JP2011103077A/en
Application granted granted Critical
Publication of JP5343817B2 publication Critical patent/JP5343817B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory device securing a data retention period on a data-by-data basis. <P>SOLUTION: A memory device 10 has: a plurality of blocks each having a function to store data, wherein stored data retention period is shortened according to the number of data rewrite times; and a wear leveling means 12 for performing wear leveling to level the number of data rewrite times for each of the plurality of blocks. The memory device 10 further has a block group dividing means 12 for dividing the memory means 10 into a plurality of block groups. The wear leveling means 12 performs wear leveling in a range of each divided block group. Preferably, the block group dividing means 12 allocates each block group for use on an application-by-application basis. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、記憶装置に関する。   The present invention relates to a storage device.

フラッシュメモリやSDメモリカードなどの記憶装置は、データの書き換えが可能であり、電源がオフした後でも記憶されているデータが消えないで保持される。しかし、このような記憶装置では、各ブロックに対して一定回数以上の書き込み/消去を実行すると書き込みエラーが発生し、それ以降はバッドブロックとなって使用不可となる。例えば、NAND型フラッシュメモリの場合、各ブロックへの書き込み/消去回数がSCLで10万回、MCLで1万回程度で書き込みエラーが発生する。書き込みエラーが多発すると、使用できる書き込み可能な領域が減少し、必要な書き込みサイズを維持できなくなる。そのため、書き込み/消去回数を制限する必要がある。また、このような記憶装置では、データの書き換え回数が増加するとデータを保持できる期間が短くなる(データリテンションが低下する)。例えば、NAND型フラッシュメモリの場合、図5に示すように、書き込み/消去回数が所定回数を超えると、データリテンションが書き込み/消去回数の増加に応じて直線的に低下する。   A storage device such as a flash memory or an SD memory card can rewrite data, and the stored data is retained without being erased even after the power is turned off. However, in such a storage device, if writing / erasing is performed a certain number of times or more with respect to each block, a write error occurs, and thereafter, it becomes a bad block and cannot be used. For example, in the case of a NAND flash memory, a write error occurs when the number of times of writing / erasing to each block is 100,000 times for SCL and 10,000 times for MCL. If write errors occur frequently, the writable area that can be used decreases, and the required write size cannot be maintained. Therefore, it is necessary to limit the number of times of writing / erasing. Further, in such a storage device, when the number of data rewrites increases, the period during which data can be held is shortened (data retention is reduced). For example, in the case of a NAND flash memory, as shown in FIG. 5, when the number of write / erase times exceeds a predetermined number, the data retention decreases linearly as the number of write / erase times increases.

そこで、各ブロックに対して一定の書き込みスレッシュ回数を設け、あるブロックの書き込み回数がスレッシュ回数を超えると別のブロックに書き込む処理を行い、各ブロックへの書き込み/消去回数を平準化するウェアレベリングを行っている。特許文献1には、NAND型フラッシュメモリ上の特定領域に書き換えが集中するのを防止するために、全ブロックの書き換え頻度を分散させるウェアレベリングが開示されている。   Therefore, a certain number of write thresholds is set for each block, and when the number of writes of a block exceeds the number of thresholds, a process is performed to write to another block, and wear leveling is performed to equalize the number of write / erase times to each block. Is going. Patent Document 1 discloses wear leveling that distributes the rewriting frequency of all blocks in order to prevent rewriting from concentrating on a specific area on a NAND flash memory.

特開2002−32256号公報JP 2002-32256 A 特開2008−112285号公報JP 2008-112285 A 特開2003−208352号公報JP 2003-208352 A

記憶装置に保存されるデータには、書き換え頻度が多いデータ(書き込みが主であるデータ)と書き換え頻度が少ないデータ(読み込みが主であるデータ)とが混在する場合がある。例えば、車両の場合、車両ダイアグデータのように少量のデータを周期的に書き換えるものと地図データのように読み込みが主であるデータが存在する。車両ダイアグデータの場合、例えば、500m秒毎に1レコードで356byteを書き込み、最大5日分のデータを保持しておく必要があり、1日の車両の使用時間を10時間と仮定すると、1日だけで72000回の書き込みが発生する。一方、地図データの場合、データを保持しなければならない期間が長く(年単位)、そのデータ保持期間以上保証する必要がある。このような書き換え頻度が多いデータと書き換え頻度が少ないデータとが混在する場合にウェアレベリングを行うと、書き換え頻度の少ないデータが保存されているブロックが書き換え頻度の多いデータの書き換えを行う対象のブロックとなる場合がある。その場合、書き換え頻度の少ないデータがデータリテンションが劣化したブロックに保存され、そのデータに必要な保持期間分データを保持できない虞がある。   Data stored in the storage device may include data having a high rewrite frequency (data mainly written) and data having a low rewrite frequency (data mainly read). For example, in the case of a vehicle, there are data that is mainly read in such as map data and data that periodically rewrites a small amount of data such as vehicle diagnosis data. In the case of vehicle diagnosis data, for example, it is necessary to write 356 bytes in one record every 500 milliseconds, and to store data for a maximum of 5 days. Only 72,000 times of writing occurs. On the other hand, in the case of map data, the period during which data must be retained is long (yearly), and it is necessary to guarantee the data retention period or longer. When wear leveling is performed when data with a high rewrite frequency and data with a low rewrite frequency are mixed, the block in which the data with the low rewrite frequency is stored is the target block for rewriting the data with the high rewrite frequency. It may become. In this case, data with a low rewrite frequency is stored in a block in which data retention has deteriorated, and there is a possibility that the data cannot be held for a holding period necessary for the data.

そこで、本発明は、データごとに必要なデータ保持期間を確保できる記憶装置を提供することを課題とする。   Therefore, an object of the present invention is to provide a storage device that can secure a necessary data holding period for each data.

本発明に係る記憶装置は、データを記憶する機能を有し、データの書き換え回数に応じて記憶されたデータを保持できる期間が短くなる複数のブロックと、複数のブロック毎のデータ書き換え回数を平準化させるウェアレベリングを行うウェアレベリング手段を有する記憶装置であって、記憶装置にデータを記憶させるアプリケーション毎にアプリケーションのデータを保持しなければならない期間に必要な使用領域サイズを演算する使用領域サイズ演算手段と、記憶装置を複数のブロック群に分割するブロック群分割手段を有し、ブロック群分割手段は、アプリケーション毎に使用領域サイズ演算手段で演算した使用領域サイズ分のブロック群を割り当て、ウェアレベリング手段は、ブロック群分割手段で分割したブロック群の範囲内でウェアレベリングを行うことを特徴とする。 A storage device according to the present invention has a function of storing data, and a plurality of blocks in which a period in which stored data can be held according to the number of data rewrites is shortened and the number of data rewrites for each of the plurality of blocks are leveled. Used storage area for calculating wear area leveling means for calculating a used area size for a period in which application data must be held for each application that stores data in the storage apparatus And a block group dividing unit that divides the storage device into a plurality of block groups. The block group dividing unit allocates a block group corresponding to the used area size calculated by the used area size calculating unit for each application, and wear leveling is performed. Means within the block group divided by the block group dividing means. And performing A leveling.

この記憶装置は、複数のブロックを有している。各ブロックは、データの書き換え回数に応じてデータを保持できる期間が短くなる。記憶装置では、ブロック群分割手段により複数のブロック群に分割する。これによって、書き換え頻度の多いデータを保存するためのブロック群や書き換え頻度の少ないデータを保存するためのブロック群などの複数のブロック群に分けることができる。ちなみに、各ブロック群は1つ以上のブロックからなるので、ブロック群の数<ブロックの数である。そして、記憶装置では、ウェアレベリング手段によりブロック群単位でブロック群に含まれるブロックのデータ書き換え回数を平準化させる。これによって、書き換え頻度の多いデータを保存するためのブロック群や書き換え頻度の少ないデータを保存するためのブロック群などの各ブロック群で別々にウェアレベリングが行われることになる。その結果、書き換え頻度の少ないデータが書き換え頻度の多いデータが保存されていたブロックに保存されるようなことがなくなる。このように、記憶装置では、複数のブロック群に分け、ブロック群単位でウェアレベリングを行うことにより、データごとに必要なデータ保持期間を確保することができる。   This storage device has a plurality of blocks. Each block has a shorter period during which data can be held in accordance with the number of data rewrites. In the storage device, the data is divided into a plurality of block groups by the block group dividing means. Thereby, it can be divided into a plurality of block groups such as a block group for storing data with a high rewrite frequency and a block group for storing data with a low rewrite frequency. Incidentally, since each block group is composed of one or more blocks, the number of block groups <the number of blocks. In the storage device, the wear leveling means equalizes the number of data rewrites of the blocks included in the block group on a block group basis. As a result, wear leveling is performed separately for each block group such as a block group for storing data with a high rewrite frequency and a block group for storing data with a low rewrite frequency. As a result, data with a low rewrite frequency is not stored in a block in which data with a high rewrite frequency is stored. As described above, in the storage device, it is possible to secure a necessary data holding period for each data by dividing into a plurality of block groups and performing wear leveling in units of block groups.

アプリケーション毎に、書き換え頻度やデータ保持期間などが異なる。そこで、この記憶装置では、ブロック群分割手段によりアプリケーション毎に使用するブロック群を割り当て、ウェアレベリング手段により各アプリケーションのブロック群単位でブロック群に含まれるブロックのデータ書き換え回数を平準化させる。このように、記憶装置では、アプリケーション単位で複数のブロック群に分け、各アプリケーションのブロック群単位でウェアレベリングを行うことにより、アプリケーションごとにデータ保持期間を確保することができる。   Rewrite frequency, data retention period, etc. differ for each application. Therefore, in this storage device, a block group to be used for each application is assigned by the block group dividing unit, and the data rewrite frequency of the blocks included in the block group is leveled by the wear leveling unit for each block group of each application. As described above, in the storage device, a data holding period can be secured for each application by dividing the application into a plurality of block groups and performing wear leveling for each application block group.

本発明の上記記憶装置では、記憶装置は、フラッシュメモリであると好適である。また、本発明の上記記憶装置では、ウェアレベリング手段は、ブロック群毎に、各ブロックのデータ書き換え回数を管理し、データ書き換え回数に応じてデータ書き換えを行うブロックを選択する構成とする。   In the storage device of the present invention, the storage device is preferably a flash memory. In the storage device of the present invention, the wear leveling means manages the data rewrite frequency of each block for each block group, and selects a block to be rewritten according to the data rewrite frequency.

本発明は、複数のブロック群に分け、ブロック群単位でウェアレベリングを行うことにより、データごとに必要なデータ保持期間を確保することができる。   According to the present invention, a necessary data holding period can be ensured for each data by dividing into a plurality of block groups and performing wear leveling in units of block groups.

本実施の形態に係るストレージデバイス制御装置の構成図である。It is a block diagram of the storage device control apparatus which concerns on this Embodiment. 各サービスの使用領域サイズを演算方法の説明図である。It is explanatory drawing of the calculation method of the use area size of each service. 図1の記憶装置における各サービスに対する領域の割り当ての一例である。It is an example of area | region allocation with respect to each service in the memory | storage device of FIG. NABD型フラッシュメモリの内部構成の一例である。It is an example of an internal structure of a NABD type flash memory. NAND型フラッシュメモリの書き込み/消去回数とデータリテンションの関係の一例を示すグラフである。It is a graph which shows an example of the relationship between the write / erase frequency of NAND type flash memory, and data retention.

以下、図面を参照して、本発明に係る記憶装置の実施の形態を説明する。なお、各図において同一又は相当する要素については同一の符号を付し、重複する説明を省略する。   Hereinafter, embodiments of a storage device according to the present invention will be described with reference to the drawings. In addition, the same code | symbol is attached | subjected about the element which is the same or it corresponds in each figure, and the overlapping description is abbreviate | omitted.

本実施の形態では、本発明に係る記憶装置を、車両に搭載されるストレージデバイス制御装置に適用する。本実施の形態に係るストレージデバイス制御装置は、ストレージデバイス(記憶装置)を備えており、車両の各ECU[Electronic Control Unit]におけるサービス(アプリケーション)のデータをストレージデバイスに書き込み/読み込み制御を行う。ストレージデバイスにデータを保存するサービスとしては、例えば、車両ダイアグサービス、リモートダイアグサービス、地図データ(道路情報)がある。   In the present embodiment, the storage device according to the present invention is applied to a storage device control device mounted on a vehicle. The storage device control device according to the present embodiment includes a storage device (storage device), and controls writing / reading of service (application) data in each ECU [Electronic Control Unit] of the vehicle. Examples of services that store data in the storage device include a vehicle diagnosis service, a remote diagnosis service, and map data (road information).

図1〜図4を参照して、ストレージデバイス制御装置1について説明する。図1は、本実施の形態に係るストレージデバイス制御装置の構成図である。図2は、各サービスの使用領域サイズを演算方法の説明図である。図3は、図1の記憶装置における各サービスに対する領域の割り当ての一例である。図4は、NAND型フラッシュメモリの内部構成の一例である。   The storage device control apparatus 1 will be described with reference to FIGS. FIG. 1 is a configuration diagram of a storage device control apparatus according to the present embodiment. FIG. 2 is an explanatory diagram of a method for calculating the used area size of each service. FIG. 3 is an example of area allocation for each service in the storage device of FIG. FIG. 4 shows an example of the internal configuration of the NAND flash memory.

ストレージデバイス制御装置1は、サービス毎に、各サービスの書き込み方式を考慮して耐久年数(データを保持しなければならない期間)に必要な使用領域サイズを演算し、その使用領域サイズ分のブロック群(領域)を割り当て、その割り当てた領域単位でウェアレベリングを行う。ストレージデバイス制御装置1は、記憶装置10、IF[InterFace]部11、アクセス制御部12を備えている。なお、本実施の形態では、アクセス制御部12の各処理が特許請求の範囲に記載するブロック群分割手段及びウェアレベリング手段に相当する。但し、ブロック群分割手段については、設計段階で用いられるコンピュータでの処理で行う場合もある。   For each service, the storage device control apparatus 1 calculates the use area size necessary for the durable years (period in which data must be retained) in consideration of the writing method of each service, and a block group corresponding to the use area size. (Area) is allocated, and wear leveling is performed in units of the allocated area. The storage device control device 1 includes a storage device 10, an IF [InterFace] unit 11, and an access control unit 12. In the present embodiment, each process of the access control unit 12 corresponds to a block group dividing unit and a wear leveling unit described in the claims. However, the block group dividing means may be performed by computer processing used in the design stage.

記憶装置10は、車両に設けられるストレージデバイスであり、例えば、フラッシュメモリ(NAND型、NOR型)、SDメモリカードである。記憶装置10は、書き換え可能であり、電源が切られてもデータが消えない不揮発性のメモリである。記憶装置10は、多数のブロックを有している。各ブロックは、書き換え回数が一定数を超えると、書き換え回数の増加に応じてデータを保持できる期間が短くなる。なお、記憶装置10のメモリ容量としては、データを保存する全てのサービスについての使用領域サイズの合計サイズに対して十分に余裕を持たせたメモリ容量とする。   The storage device 10 is a storage device provided in the vehicle, and is, for example, a flash memory (NAND type, NOR type) or an SD memory card. The storage device 10 is a non-volatile memory that can be rewritten and does not lose data even when the power is turned off. The storage device 10 has a large number of blocks. In each block, when the number of rewrites exceeds a certain number, the period during which data can be held becomes shorter as the number of rewrites increases. Note that the memory capacity of the storage device 10 is a memory capacity having a sufficient margin with respect to the total size of the used area sizes for all services for storing data.

IF部11は、記憶装置10のIF回路であり、例えば、NAND型フラッシュメモリに対応したIF回路、SMメモリカードに対応したIF回路である。   The IF unit 11 is an IF circuit of the storage device 10, and is, for example, an IF circuit corresponding to a NAND flash memory or an IF circuit corresponding to an SM memory card.

アクセス制御部12は、ファイルシステムの制御装置(CPU、RAM、ファイルシステムの各処理を行うソフトウェアなどからなる装置)であり、記憶装置10への各サービスのデータの書き込み/読み込み制御を行う。特に、アクセス制御部12では、使用領域サイズ演算処理、領域割当処理、データ書込処理を行う。   The access control unit 12 is a file system control device (a device composed of CPU, RAM, software for performing each process of the file system, etc.), and controls writing / reading of data of each service to / from the storage device 10. In particular, the access control unit 12 performs used area size calculation processing, area allocation processing, and data writing processing.

使用領域サイズ演算処理について説明する。アクセス制御部12では、記憶装置10にデータ保存するサービス毎に、サービスの書き込み方式を考慮し、耐久年数の間保存するために必要な使用領域サイズを演算する。この演算は、サービスを開始する前に、予め行う。なお、車両ダイアグサービスや地図データ(道路情報)などのサービスのように設計段階において搭載することが決まっているサービスについては、設計段階においてコンピュータで使用領域サイズ演算処理を行い、各サービスの使用領域サイズを演算しておいてもよい。この場合、アクセス制御部12では、配信サービスなどによって後から追加されるサービスについてのみ使用領域サイズ演算処理を行う。   The use area size calculation process will be described. For each service that stores data in the storage device 10, the access control unit 12 considers the service writing method and calculates the use area size necessary for storing for the durable years. This calculation is performed in advance before starting the service. For services that are determined to be installed at the design stage, such as services such as vehicle diagnostic services and map data (road information), the use area size calculation processing is performed by a computer at the design stage, and the use area of each service is determined. The size may be calculated. In this case, the access control unit 12 performs the used area size calculation process only for a service added later by a distribution service or the like.

具体的な演算方法としては、図2に示すように、書き込み上限回数、耐久年数、デバイス(記憶装置10)の物理構成、サービスの書き込み方式に基づいて、使用領域サイズを演算する。この使用領域サイズは、データを耐久年数の間保持できかつサービスの書き込み方式に応じて書き込みを行った場合に全てのブロックの書き込み回数が上限回数を超えないサイズである。   As a specific calculation method, as shown in FIG. 2, the used area size is calculated based on the upper limit number of times of writing, the durable years, the physical configuration of the device (storage device 10), and the service writing method. The use area size is a size that allows data to be retained for the durable years and does not exceed the upper limit number of times when all blocks are written according to the service writing method.

書き込み上限回数は、図5に示すような、各デバイスの書き込み/消去回数とデータリテンションとの関係に基づいて、データリテンションが低下しない上限回数などが設定される。耐久年数は、基本的には、サービスとして保証しなければならない期間(車両の場合、一般には7年〜10年程度)を考慮して設定される。地図データのように年単位で更新することが決まっているサービスの場合、その更新年数から余裕を持たせて耐久年数が設定される。ちなみに、耐久年数となっているが、サービスとして保証しなければならない期間が日単位、月単位で設定されている場合にはそれに応じた期間とする。デバイスの物理構成は、各デバイスの仕様に基づいて設定され、例えば、1ブロックあたりのページ数である。サービスの書き込み方式は、各サービスの仕様に基づいて設定され、例えば、書き込み周期、1回の書き込みのデータbyte数がある。   As the upper limit number of times of writing, an upper limit number of times at which data retention does not decrease is set based on the relationship between the number of times of writing / erasing of each device and data retention as shown in FIG. The durable years are basically set in consideration of a period that must be guaranteed as a service (in the case of a vehicle, generally about 7 to 10 years). In the case of a service that is determined to be updated in units of years, such as map data, the durable years are set with a margin from the updated years. By the way, although it is a durable life, if the period that must be guaranteed as a service is set on a daily or monthly basis, the period is set accordingly. The physical configuration of the device is set based on the specification of each device, and is, for example, the number of pages per block. The service writing method is set based on the specifications of each service. For example, there are a writing cycle and the number of data bytes written once.

領域割当処理について説明する。アクセス制御部12では、図3に示すように、各サービスに対して演算された使用領域サイズに基づいて、デバイス(記憶装置10)において各サービスのデータを保存する領域(ブロック群)をそれぞれ割り当てる。この際、デバイスの領域をRead/Write領域とRead領域に分け、車両ダイアグサービスなどのように書き込みが主であるサービスについてRead/Write領域内に領域を割り当て、道路情報などのように読み出しが主でサービスについてはRead領域内に領域を割り当てる。このように領域を分ける理由としては、従来のウェアレベリング技術で行われる書き込み回数の平準化などで、読み込みを主とするデータ領域に不要な書き込み/消去が発生しないようにするためである。   The area allocation process will be described. As shown in FIG. 3, the access control unit 12 allocates areas (block groups) for storing data of each service in the device (storage device 10) based on the used area size calculated for each service. . At this time, the device area is divided into a read / write area and a read area, and an area in the read / write area is assigned to a service that is mainly written, such as a vehicle diagnostic service, and reading is mainly performed like road information. In the service, an area is allocated in the Read area. The reason for dividing the area in this way is to prevent unnecessary writing / erasing from occurring in the data area mainly for reading due to leveling of the number of writing performed by the conventional wear leveling technique.

この領域の割り当ては、サービスを開始する前に、予め行う。なお、使用領域サイズ演算処理と同様に、設計段階において搭載することが決まっているサービスについては、設計段階においてコンピュータで領域割当処理を行い、各サービスのデータを保存する領域を割り当てておいてもよい。この場合、アクセス制御部12では、配信サービスなどで後から追加されるサービスについてのみ領域割当処理を行う。   This area allocation is performed in advance before starting the service. As with the used area size calculation process, for services that are determined to be installed at the design stage, area allocation processing is performed by a computer at the design stage, and areas for storing data for each service may be allocated. Good. In this case, the access control unit 12 performs the area allocation process only for a service that is added later in the distribution service or the like.

データ書込処理について説明する。アクセス制御部12では、サービス毎に、そのサービスの書き込み方式に応じて、そのサービスの割り当てられている領域内にデバイスの最も効率的に書き込める単位ごとにシーケンシャルにデータの書き込み/消去を実施する(つまり、リングバッファ方式でのデータの書き換え)。デバイスの最も効率的に書き込める単位としては、例えば、NAND型フラッシュメモリの場合にはページ単位である。   The data writing process will be described. In each service, the access control unit 12 sequentially performs data writing / erasing for each unit in which the device can be most efficiently written in the area to which the service is allocated in accordance with the service writing method. In other words, rewriting data using the ring buffer method). For example, in the case of a NAND flash memory, the unit in which a device can be written most efficiently is a page unit.

このように、割り当てられている領域内で、前回書き込んだブロックの次のブロックから書き込み/消去を行い、割り当てられている領域の最後のブロックに到達した場合には領域の先頭のブロックに戻って書き込み/消去を行うことにより、領域内の各ブロックのデータ書き換え回数が均等になる。したがって、割り当てられている領域単位でシーケンシャルにデータの書き込み/消去は、各ブロックのデータ書き換え回数を管理して、各ブロックへの書き込み/消去回数を平準化するウェアレベリングを行っていることになる。また、各サービス単位で割り当てられている領域内でデータの書き換えを行うので、他のサービスに割り当てられている領域のブロックにデータの書き換えを行うようなことは確実になくなる。   In this way, write / erase from the block next to the previously written block in the allocated area, and if the last block of the allocated area is reached, return to the first block in the area. By performing writing / erasing, the number of times of data rewriting of each block in the area becomes equal. Therefore, in order to write / erase data sequentially in units of allocated areas, wear leveling is performed in which the number of data rewrites in each block is managed and the number of write / erase times in each block is leveled. . In addition, since data is rewritten in the area allocated for each service unit, data rewriting to a block in an area allocated to another service is surely eliminated.

なお、道路情報などのように読み込みが主であるサービスについては、基本的には、データ更新時以外には書き込み/消去は実施されない。そのため、Read領域については、データリテンションが低下しない。   Note that services that are mainly read, such as road information, are basically not written / erased except when data is updated. Therefore, data retention does not decrease for the Read area.

図4を参照して、記憶装置10(デバイス)としてNAND型フラッシュメモリを適用した一例を説明する。サービスとしては、車両ダイアグサービスの場合である。前提条件として、書き込み上限回数は、例えば、1ページあたり100回とする。耐久年数は、10年間とする。これは、車両で一般に必要とされる耐久年数(7〜10年)考慮したものである。デバイスの物理構成は、1ブロックが64ページ(1ページはデータ部:2048byte、冗長部:64byte)で構成されるものとする(図4参照)。NAND型フラッシュメモリの仕様により、デバイスへの書き込みは1ページ単位とする。車両ダイアグサービスのデータの書き込み方式は、車両ダイアグサービスの仕様に則り、1レコードあたり356byteを500m秒毎に保存するものとする。   An example in which a NAND flash memory is applied as the storage device 10 (device) will be described with reference to FIG. The service is a case of a vehicle diagnosis service. As a precondition, the upper limit number of writing is, for example, 100 times per page. The durability is 10 years. This takes into account the durable life (7 to 10 years) generally required for vehicles. As for the physical configuration of the device, one block is composed of 64 pages (one page is a data portion: 2048 bytes, a redundant portion: 64 bytes) (see FIG. 4). According to the specifications of the NAND flash memory, writing to the device is performed in units of one page. In the vehicle diagnosis service data writing method, 356 bytes per record is stored every 500 milliseconds in accordance with the specifications of the vehicle diagnosis service.

NAND型フラッシュメモリの1ページは2048byteなので、1ページには車両ダイアグサービスのデータの5レコード分(1レコードが356byteなので、356×5=1780byte)を保存することができる。そのため、500m秒×5レコード=2.5秒毎に1ページ単位で書き込むこととする。この際、重要なのは、1ページ2048byteアライメントでデバイスへ書き込むことである。もし、1ページアライメントを無視して2ページにまたがるようにデバイスに書き込んだ場合、1ページ目と2ページ目を読み込んで、データを整合して、更に1ページ目と2ページ目に書き込むという不要な書き込みが発生する(書き込み回数の増加)。   Since one page of the NAND flash memory is 2048 bytes, one page can store five records of vehicle diagnosis service data (356 × 5 = 1780 bytes because one record is 356 bytes). Therefore, it is assumed that writing is performed in units of one page every 500 milliseconds × 5 records = 2.5 seconds. At this time, what is important is to write to the device by one page 2048 byte alignment. If you write to the device so that it spans two pages, ignoring the one page alignment, you need to read the first and second pages, align the data, and then write to the first and second pages. Writes occur (increase in the number of writes).

1ページあたり100回の書き込み上限回数で10年間に必要なページ数は、10年×365日×24時間×60分×60秒÷2.5秒÷100回=1261440ページとなる。ここでは、1年間に365日、1日に24時間、車両を使用し続けるものとして計算している。必要なブロック数は、1261440ページ÷64ページ=19710ブロックとなる。必要な使用領域サイズは、19710ブロック×(2048byte×64ページ)=2583429120byte(約2.58Gbyte)である。さらに、使用するNAND型フラッシュメモリの信頼性(PPM)として数%程度の余裕度を持たせておくとよい。例えば、5%の余裕度とすると、2.58Gbyte×1.05=2.709Gbyteである。   The number of pages required for 10 years with the maximum number of write times of 100 per page is 10 years × 365 days × 24 hours × 60 minutes × 60 seconds ÷ 2.5 seconds ÷ 100 times = 1261440 pages. Here, the calculation is based on the assumption that the vehicle will be used for 365 days a day, 24 hours a day. The number of necessary blocks is 1261440 pages / 64 pages = 19710 blocks. The required use area size is 19710 blocks × (2048 bytes × 64 pages) = 2583429120 bytes (about 2.58 Gbytes). Furthermore, it is preferable to provide a margin of about several percent as the reliability (PPM) of the NAND flash memory to be used. For example, assuming a margin of 5%, 2.58 Gbyte × 1.05 = 2.709 Gbyte.

上記のように車両ダイアグサービスの使用領域サイズが予め演算されると、その使用領域サイズに応じてデバイスにそのサイズ分の領域が予め割り当てられる。ここでは、上記で演算された必要なブロック数に応じてそのブロック数分の領域を割り当ててもよい。そして、車両が走行する毎に、その割り当てられている領域内に、1ページ分の車両ダイアグデータ(1780byte分のデータ)を2.5秒毎にシーケンシャルに書き込んでゆく。ちなみに、他のサービスについても、同様に、使用領域サイズの演算及び領域の割り当てを予め行い、車両が走行する毎にシーケンシャルにデータを書き込んでゆく。   When the use area size of the vehicle diagnosis service is calculated in advance as described above, an area corresponding to the size is assigned to the device in advance according to the use area size. Here, according to the required number of blocks calculated above, an area corresponding to the number of blocks may be allocated. Each time the vehicle travels, one page of vehicle diagnosis data (1780 bytes of data) is sequentially written into the allocated area every 2.5 seconds. Incidentally, for other services, similarly, the calculation of the used area size and the allocation of the area are performed in advance, and the data is sequentially written every time the vehicle travels.

このストレージデバイス制御装置1によれば、サービス毎に耐久年数に必要な使用領域サイズを求め、その使用領域サイズ分の割り当てられた領域内でウェアレベリングをそれぞれ実施するので、サービス毎に必要な耐久年数を確保することができる。特に、ストレージデバイス制御装置1では、デバイスをRead/Write領域とRead領域に分け、書き込みが主であるサービス(書き換え頻度が多いサービス)にRead/Write領域を割り当て、読み込みが主であるサービス(書き換え頻度が少ないサービス)にRead領域を割り当てているので、読み込みが主であるサービスに割り当てられた領域に書き込みが主であるサービスのデータが書き込み/消去されるようなことを確実に防止できる。   According to the storage device control apparatus 1, the use area size required for the durable years is obtained for each service, and wear leveling is performed in the allocated area for each use area size. The number of years can be secured. In particular, in the storage device control apparatus 1, a device is divided into a read / write area and a read area, a read / write area is allocated to a service in which writing is mainly performed (service with a high rewrite frequency), and a service in which reading is mainly performed (rewriting) Since the Read area is allocated to the service having a low frequency), it is possible to reliably prevent the data of the service that mainly writes data from being written / erased in the area allocated to the service that mainly reads data.

さらに、ストレージデバイス制御装置1によれば、サービス毎に書き込み上限回数を考慮して使用領域サイズを求め、その使用領域サイズ分の割り当てられた領域内でウェアレベリングをそれぞれ実施するので、各ブロックに書き込み上限回数を超えてデータが書き込まれることを防止できる。その結果、データリテンションの低下を抑制でき、書き込みエラーの発生も抑制できる。特に、ストレージデバイス制御装置1では、デバイスへ最も効率的に書き込める単位ごと(例えば、NAND型フラッシュメモリの場合にはブロックの最小書き込み単位であるページごと)にシーケンシャルにデータを書き込んでいるので、デバイスへの書き込み/消去回数を最小限に抑えることができる。   Furthermore, according to the storage device control apparatus 1, the used area size is calculated for each service in consideration of the upper limit number of writes, and wear leveling is performed in the allocated area for each used area size. It is possible to prevent data from being written exceeding the upper limit number of times of writing. As a result, a decrease in data retention can be suppressed, and a write error can be suppressed. In particular, in the storage device control apparatus 1, data is sequentially written for each unit that can be most efficiently written to the device (for example, for each page that is the minimum block writing unit in the case of a NAND flash memory). The number of write / erase operations can be minimized.

また、ストレージデバイス制御装置1によれば、各サービスに割り当てられた領域内でシーケンシャルにデータを書き込むことにより、簡単な手法でウェアレベリングを実現できる。この際、使用領域サイズを求める際に書き込み上限回数を超えて書き込まれないようなサイズを求めているので、ブロック毎の書き込み/消去回数をカウントし、そのカウント数をスレッシュ回数で判定するような処理は必要ない。   In addition, according to the storage device control apparatus 1, wear leveling can be realized by a simple method by sequentially writing data within the area allocated to each service. At this time, since the size that does not exceed the upper limit number of times of writing is obtained when the used area size is obtained, the number of times of writing / erasing for each block is counted, and the number of counts is determined by the number of times of threshold. No processing is necessary.

以上、本発明に係る実施の形態について説明したが、本発明は上記実施の形態に限定されることなく様々な形態で実施される。   As mentioned above, although embodiment which concerns on this invention was described, this invention is implemented in various forms, without being limited to the said embodiment.

例えば、本実施の形態では車両に搭載されるストレージデバイス制御装置に適用したが、フラッシュメモリやSDメモリカードのような記憶装置を用いる他の様々なシステムに適用可能である。   For example, in the present embodiment, the present invention is applied to a storage device control apparatus mounted on a vehicle, but it can be applied to various other systems using a storage device such as a flash memory or an SD memory card.

また、本実施の形態ではフラッシュメモリやSDメモリに適用したが、SSDなどの他の記憶装置に適用してもよい。   In this embodiment, the present invention is applied to a flash memory and an SD memory, but may be applied to other storage devices such as an SSD.

また、本実施の形態では書き込み上限回数、耐久年数、デバイスの物理構成、サービスの書き込み方式に基づいて使用領域サイズを演算したが、他のパラメータも考慮する必要がある場合にはそのパラメータも考慮して演算を行う。   In this embodiment, the used area size is calculated based on the upper limit number of times of writing, the durable years, the physical configuration of the device, and the writing method of the service. To calculate.

また、本実施の形態では各サービスに割り当てられた領域毎にシーケンシャルでデータを書き換えることによってウェアレベリングを行う構成としたが、他の手法でウェアレベリングを行ってもよい。   In this embodiment, wear leveling is performed by rewriting data sequentially for each area allocated to each service. However, wear leveling may be performed by other methods.

1…ストレージデバイス制御装置、10…記憶装置、11…IF部、12…アクセス制御部   DESCRIPTION OF SYMBOLS 1 ... Storage device control apparatus, 10 ... Memory | storage device, 11 ... IF part, 12 ... Access control part

Claims (3)

データを記憶する機能を有し、データの書き換え回数に応じて記憶されたデータを保持できる期間が短くなる複数のブロックと、前記複数のブロック毎のデータ書き換え回数を平準化させるウェアレベリングを行うウェアレベリング手段を有する記憶装置であって、
前記記憶装置にデータを記憶させるアプリケーション毎に前記アプリケーションのデータを保持しなければならない期間に必要な使用領域サイズを演算する使用領域サイズ演算手段と、前記記憶装置を複数のブロック群に分割するブロック群分割手段を有し、
前記ブロック群分割手段は、前記アプリケーション毎に前記使用領域サイズ演算手段で演算した使用領域サイズ分のブロック群を割り当て、
前記ウェアレベリング手段は、前記ブロック群分割手段で分割したブロック群の範囲内でウェアレベリングを行うことを特徴とする記憶装置。
A hardware having a function of storing data, and performing wear leveling that equalizes the number of times of data rewriting for each of the plurality of blocks, and a plurality of blocks in which the period in which the stored data can be retained is shortened according to the number of times of data rewriting A storage device having leveling means,
Use area size calculation means for calculating a use area size necessary for a period in which data of the application must be held for each application that stores data in the storage device, and a block that divides the storage device into a plurality of block groups Having group dividing means;
The block group dividing means allocates a block group for the use area size calculated by the use area size calculation means for each application,
The wear leveling means performs wear leveling within a block group divided by the block group dividing means.
前記記憶装置は、フラッシュメモリであることを特徴とする請求項1に記載する記憶装置。 The storage device according to claim 1 , wherein the storage device is a flash memory. 前記ウェアレベリング手段は、ブロック群毎に、各ブロックのデータ書き換え回数を管理し、データ書き換え回数に応じてデータ書き換えを行うブロックを選択することを特徴とする請求項1又は請求項2に記載する記憶装置。 The wear leveling means, for each block group, manages the data rewrite count of each block, according to claim 1 or claim 2, wherein selecting a block for performing data rewriting in accordance with the data rewrite count Storage device.
JP2009258105A 2009-11-11 2009-11-11 Storage device Expired - Fee Related JP5343817B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009258105A JP5343817B2 (en) 2009-11-11 2009-11-11 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009258105A JP5343817B2 (en) 2009-11-11 2009-11-11 Storage device

Publications (2)

Publication Number Publication Date
JP2011103077A JP2011103077A (en) 2011-05-26
JP5343817B2 true JP5343817B2 (en) 2013-11-13

Family

ID=44193382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009258105A Expired - Fee Related JP5343817B2 (en) 2009-11-11 2009-11-11 Storage device

Country Status (1)

Country Link
JP (1) JP5343817B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9201786B2 (en) 2012-12-21 2015-12-01 Kabushiki Kaisha Toshiba Memory controller and memory system
JP6245041B2 (en) * 2014-04-02 2017-12-13 コニカミノルタ株式会社 Information processing apparatus and flash memory control method
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder
US9292210B1 (en) 2014-08-29 2016-03-22 International Business Machines Corporation Thermally sensitive wear leveling for a flash memory device that includes a plurality of flash memory modules
JP2015222590A (en) * 2015-07-24 2015-12-10 株式会社東芝 Memory system
JP6645225B2 (en) 2016-02-04 2020-02-14 株式会社デンソー Data security device
JP6493318B2 (en) 2016-06-24 2019-04-03 株式会社デンソー Data processing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4686358B2 (en) * 2005-12-26 2011-05-25 ジヤトコ株式会社 Control device with flash memory

Also Published As

Publication number Publication date
JP2011103077A (en) 2011-05-26

Similar Documents

Publication Publication Date Title
US8411519B2 (en) Selective retirement of blocks
US10754769B2 (en) Memory system having persistent garbage collection
US10732857B2 (en) Techniques for reducing memory write operations using coalescing memory buffers and difference information
US9645894B2 (en) Data storage device and flash memory control method
CN109783004B (en) Data storage device and data processing method of memory device
JP5343817B2 (en) Storage device
US7089349B2 (en) Internal maintenance schedule request for non-volatile memory system
US9548108B2 (en) Virtual memory device (VMD) application/driver for enhanced flash endurance
US8959280B2 (en) Super-endurance solid-state drive with endurance translation layer (ETL) and diversion of temp files for reduced flash wear
US7809900B2 (en) System, method, and computer program product for delaying an operation that reduces a lifetime of memory
US7747813B2 (en) Multi-memory device system and method for managing a lifetime thereof
US20090138671A1 (en) System, method, and computer program product for increasing spare space in memory to extend a lifetime of the memory
US20080126891A1 (en) Memory lifetime gauging system, method and computer program product
US20080126685A1 (en) System, method, and computer program product for reducing memory write operations using an instruction set
US20100306447A1 (en) Data updating and recovering methods for a non-volatile memory array
US8819387B2 (en) Memory storage device, memory controller, and method for identifying valid data
US8607123B2 (en) Control circuit capable of identifying error data in flash memory and storage system and method thereof
US8706990B2 (en) Adaptive internal table backup for non-volatile memory system
US9223688B2 (en) Data storing method and memory controller and memory storage device using the same
US20100306456A1 (en) Method for even utilization of a plurality of flash memory chips
US9990152B1 (en) Data writing method and storage controller
KR20150094292A (en) Method and apparatus for recovering metadata in electronic device based on non-volatile memeory
WO2014080646A1 (en) Cache management device and cache management method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130501

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130514

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130621

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130729

LAPS Cancellation because of no payment of annual fees