JP2009288914A - Flash memory and electronic apparatus - Google Patents

Flash memory and electronic apparatus Download PDF

Info

Publication number
JP2009288914A
JP2009288914A JP2008138946A JP2008138946A JP2009288914A JP 2009288914 A JP2009288914 A JP 2009288914A JP 2008138946 A JP2008138946 A JP 2008138946A JP 2008138946 A JP2008138946 A JP 2008138946A JP 2009288914 A JP2009288914 A JP 2009288914A
Authority
JP
Japan
Prior art keywords
failure
storage block
data
block
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2008138946A
Other languages
Japanese (ja)
Inventor
Masashi Asada
真史 浅田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2008138946A priority Critical patent/JP2009288914A/en
Publication of JP2009288914A publication Critical patent/JP2009288914A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Read Only Memory (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a flash memory which allows data access, without having to secure substitution region. <P>SOLUTION: A flash memory 100 comprises a storage part 10 and a control part 20. Each of storage blocks 11 comprises a data region 12 and a management region 13. The control part 20 controls access of the storage part 10 to the storage block 11. For a block that has a failure, the failure information is attached to the management region, and a block to be accessed is substituted with a next block, based on this information. If failure is detected during writing or erasing, the block is substituted with the next block. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、フラッシュメモリおよび電子機器に関する。   The present invention relates to a flash memory and an electronic device.

フラッシュメモリは、従来、故障に備えて代替領域ないし代替ブロックを備えている。故障管理用のテーブルが故障ブロックと代替ブロックとを対応させて、故障ブロックにかえて代替ブロックを用いるようになっている。   Conventionally, a flash memory is provided with an alternative area or an alternative block in preparation for a failure. The failure management table associates the failure block with the replacement block, and uses the replacement block in place of the failure block.

図1は、従来の故障発生時の代替処理を模式的に示している。また、図2はこの代替処理の動作例を示している。この例では、RAMに記憶されているデータ(論理アドレスsrcAddr、サイズがsize)をフラッシュメモリ(論理アドレスdstAddr)に書き込む命令(flashwrite)を実行する例を示す。   FIG. 1 schematically shows a conventional alternative process when a failure occurs. FIG. 2 shows an example of the operation of this alternative process. In this example, an example of executing an instruction (flashwrite) that writes data (logical address srcAddr, size is size) stored in the RAM to the flash memory (logical address dstAddr) is shown.

この例では、フラッシュメモリの宛て先論理アドレス(dstAddr)に対応するブロックの物理アドレスを求め、そのブロックについて故障管理テーブルを参照して故障かどうかを判別して、故障の場合には対応する代替ブロックを表引きして代替ブロックに書き込み(消去後書き込み)を行う。例えば、書き込みの宛て先のブロックの番号が「29」で故障管理テーブルに含まれている場合には、対応する代替ブロック「510」を判別して、この代替ブロックにデータ書き込みを代替させる。書き込み中に故障が検出された場合には、新たに故障ブロックおよびその代替ブロックを故障管理テーブルに登録してデータ書き込みを行う。   In this example, the physical address of the block corresponding to the destination logical address (dstAddr) of the flash memory is obtained, the failure management table is determined for the block to determine whether or not there is a failure, and in the case of a failure, the corresponding alternative Look up the block and write to the alternative block (write after erasure). For example, if the number of the destination block of writing is “29” and is included in the failure management table, the corresponding alternative block “510” is discriminated and data writing is substituted for this alternative block. If a failure is detected during writing, a new failure block and its replacement block are registered in the failure management table and data is written.

具体的な図2の処理例は以下のとおりである。   A specific processing example of FIG. 2 is as follows.

[ステップS10]:制御部(メモリコントローラともいう)が、上位ソフトウェアからデータ書き込みの指示flashWrite(srcAddr,dstAddr,size)を受け取る。
[ステップS11]:宛て先アドレスdstAddrから、フラッシュメモリの書き込み開始ブロックblockAddrを算出する。
[ステップS12]:書き込みブロックblockAddrを故障管理テーブルにおいて検索する。
[ステップS13]:検索結果に基づいて故障かどうかを判別し(ヒットであれば故障)、故障であればステップS14へ進み、そうでなければステップS15へ進む。
[ステップS14]:書き込みブロックを代替ブロックに置き換えてステップS15へ進む。
[ステップS15]:当該ブロックを消去する。
[ステップS16]:消去中に故障が発生したらステップS17へ進み、消去が成功したらステップS21へ進む。
[ステップS17]:故障ブロックを故障管理テーブルに登録する。
[ステップS18]:未使用の代替ブロックを検索する。
[ステップS19]:代替ブロックが利用可能であればそれを故障管理テーブルに登録してステップS15へ戻り処理を繰り返し、利用可能でなければステップS20へ進む。
[ステップS20]:エラーを通知して処理を終了する。
[ステップS21]:当該ブロックに書き込みを行う。
[ステップS22]:書き込み中に故障が発生したらステップS17へ戻り処理を繰り返し、成功したらステップS23へ進む。
[ステップS23]:書き込みサイズ確認する。
[ステップS24]:書き込みが完了したら処理を終了し、完了しなかったらステップS12へ戻り処理を繰り返す。
[Step S10]: The control unit (also referred to as a memory controller) receives a data write instruction flashWrite (srcAddr, dstAddr, size) from the upper software.
[Step S11]: The write start block blockAddr of the flash memory is calculated from the destination address dstAddr.
[Step S12]: The write block blockAddr is searched in the failure management table.
[Step S13]: Based on the search result, it is determined whether or not there is a failure (if it is a hit), if it is a failure, the process proceeds to step S14, and if not, the process proceeds to step S15.
[Step S14]: The write block is replaced with an alternative block, and the process proceeds to Step S15.
[Step S15]: The block is erased.
[Step S16]: If a failure occurs during erasure, the process proceeds to step S17, and if erasure is successful, the process proceeds to step S21.
[Step S17]: The failure block is registered in the failure management table.
[Step S18]: Search for unused substitute blocks.
[Step S19]: If a substitute block is available, it is registered in the failure management table and the process returns to step S15 to repeat the process. If not available, the process proceeds to step S20.
[Step S20]: An error is notified and the process is terminated.
[Step S21]: Write to the block.
[Step S22]: If a failure occurs during writing, the process returns to step S17 to repeat the process, and if successful, the process proceeds to step S23.
[Step S23]: The write size is confirmed.
[Step S24]: When the writing is completed, the process ends. When the writing is not completed, the process returns to step S12 to repeat the process.

このように、フラッシュメモリの消去でエラーが発生したとき、代替用に予め確保された代替領域を使用するため、故障管理テーブルの更新が行われる。また、フラッシュメモリへのデータ書き込みでエラーが発生したとき、代替用に予め確保された代替領域にデータの格納が行われる。かつ、故障管理テーブルの更新が行われる。なお、フラッシュメモリからのデータ読み出しでエラーが発生したとき、代替用に予め確保された代替領域にデータの移動が行われる。かつ、故障管理テーブルの更新が行われる。   As described above, when an error occurs in erasing the flash memory, the failure management table is updated in order to use the replacement area reserved in advance for replacement. Further, when an error occurs in writing data to the flash memory, data is stored in an alternative area reserved in advance for replacement. In addition, the failure management table is updated. When an error occurs in reading data from the flash memory, data is moved to an alternative area reserved in advance for replacement. In addition, the failure management table is updated.

ところで、このような従来のフラッシュメモリでは、代替領域を予め確保する必要があり、フラッシュメモリの容量から代替領域分少ない領域が通常使用領域になる。このため実質的な使用容量が少なくなるという問題点があった。また、代替領域を予め確保するためフラッシュメモリ性能等の仕様から代替領域の容量を算出する必要があり、代替領域の容量を少なく算出すると代替できない状態(通常使用領域には空きがあるが、代替領域はすべて使用済み)に陥るといった問題点があった。また、故障ブロックの管理と代替処理を行うため、故障管理テーブルの領域と更新処理が必要であるといった問題点があった。かつ、故障管理テーブル領域分少ない領域が通常使用領域になるといった問題点があった。さらに、故障管理テーブルの領域が故障してしまうと代替処理が行えず、フラッシュメモリが使用不能になるといった問題点があった。   By the way, in such a conventional flash memory, it is necessary to secure an alternative area in advance, and an area smaller than the capacity of the flash memory by the alternative area becomes a normal use area. For this reason, there has been a problem that the substantial capacity used is reduced. In addition, it is necessary to calculate the capacity of the replacement area from specifications such as flash memory performance in order to secure the replacement area in advance. If the capacity of the replacement area is small, it cannot be replaced (the normal use area is free, but There was a problem that all areas were used). In addition, since failure block management and replacement processing are performed, a failure management table area and update processing are required. In addition, there is a problem that an area that is smaller by the failure management table area becomes a normal use area. Furthermore, if the area of the failure management table fails, there is a problem that the substitute process cannot be performed and the flash memory becomes unusable.

なお、この発明と関連する特許文献としては以下のものがある。   Patent documents related to the present invention include the following.

特許文献1の「記憶装置」および特許文献2の「メモリ管理システム」は、ユーザデータを格納するユーザブロックと、代替用に予め確保された代替ブロックと、論理アドレスに対応するユーザブロックの物理アドレスを格納する変換テーブルと、代替ブロックの物理アドレスを格納する代替テーブルとを含むフラッシュメモリにおいて、コントローラが、変換テーブルを参照してユーザブロック内のページにユーザデータを書込む際、当該ページが書込み済みの場合には、代替テーブルを参照して代替ブロック内のページにユーザデータを書込んで新たなユーザブロックとし、元のユーザブロックを代替ブロックとして、ユーザデータの書換えを高速に行なうことを提案している。   The “storage device” of Patent Document 1 and the “memory management system” of Patent Document 2 are a user block for storing user data, a replacement block reserved in advance for replacement, and a physical address of a user block corresponding to a logical address. When the controller writes user data to a page in the user block with reference to the conversion table in the flash memory including the conversion table storing the conversion table and the replacement table storing the physical address of the replacement block, the page is written. If it has already been done, refer to the substitution table and write the user data to the page in the substitution block to create a new user block, and use the original user block as the substitution block to propose rewriting the user data at high speed. is doing.

特許文献3の「フライトレコーダにおける記録方法」は、フラッシュメモリの消去ブロック単位で故障を管理し、故障しているブロックのみを飛ばして記録することで膨大な記録エリアの損失を防止し、メモリを有効に利用し、かつ、それによってデータ損失量を最少にするフライトレコーダにおける記録方法を提案している。   Patent Document 3 “Recording Method in Flight Recorder” manages the failure in units of erase blocks of the flash memory, skips only the failed block and records it, prevents the loss of a huge recording area, A recording method in a flight recorder has been proposed which is used effectively and thereby minimizes the amount of data loss.

特許文献4の「半導体メモリ装置」は、論理アドレスと物理アドレスとの変換に必要なメモリが小型なもので済み、また最長アクセス時間が短い半導体メモリ装置を提案している。この提案では、フラッシュメモリ内の冗長領域(管理領域)に物理ブロックに割り当てられる論理アドレスと位置情報(次アクセス先)を置き、各ブロックの連鎖を管理している。冗長領域に故障情報が書き込まれていた場合、予め確保してある予備領域を使用する。   The “semiconductor memory device” of Patent Document 4 proposes a semiconductor memory device in which a memory required for conversion between a logical address and a physical address is small and the longest access time is short. In this proposal, a logical address assigned to a physical block and position information (next access destination) are placed in a redundant area (management area) in the flash memory, and the chain of each block is managed. When failure information is written in the redundant area, the reserved area secured in advance is used.

なお、上述の従来技術やその問題点は、この発明の背景の一部を説明するためにのみ説明している。この発明は上述の従来技術や問題点に限定されるものではない点に留意されたい。
特開2004−133677号公報 特開2004−302938号公報 特開平9−282863号公報 特開平10−49447号公報
Note that the above-described prior art and its problems are described only to explain a part of the background of the present invention. It should be noted that the present invention is not limited to the above-described prior art and problems.
JP 2004-133777 A JP 2004-302938 A JP-A-9-282863 Japanese Patent Laid-Open No. 10-49447

この発明は、代替領域を確保することなく、データアクセスが可能なフラッシュメモリを提供することを目的としている。また、この発明はそのようなフラッシュメモリをブートデータの記憶装置として採用する電子機器を提供することを目的としている。   An object of the present invention is to provide a flash memory capable of accessing data without securing an alternative area. Another object of the present invention is to provide an electronic apparatus that employs such a flash memory as a boot data storage device.

この発明によれば、上述の目的を達成するために、特許請求の範囲に記載のとおりの構成を採用している。ここでは、発明を詳細に説明するのに先だって、特許請求の範囲の記載について補充的に説明を行なっておく。   According to this invention, in order to achieve the above-mentioned object, the configuration as described in the claims is adopted. Here, prior to describing the invention in detail, supplementary explanations of the claims will be given.

すなわち、請求項1の発明によれば、フラッシュメモリは、複数の記憶ブロックからなるデータ記憶部と、上記データ記憶部からのデータアクセスを制御する制御部とを有し、上記記憶ブロックの各々はデータ領域と、当該記憶ブロックが故障を含むかどうかを表す故障情報を含む管理領域とを具備し、上記制御部は上記データ記憶部中の上記複数の記憶ブロックを予め定められた順番に書き込みアクセスおよび読み出しアクセスを行ない、さらに、上記制御部は、書き込みアクセス対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、書き込みアクセス対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該書き込みアクセスに伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して書き込みアクセスを行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、書き込みアクセス対象をつぎの順番の記憶ブロックに設定するようにしている。   That is, according to the invention of claim 1, the flash memory includes a data storage unit including a plurality of storage blocks, and a control unit that controls data access from the data storage unit, and each of the storage blocks includes: A data area and a management area including failure information indicating whether or not the storage block includes a failure, and the control unit writes and accesses the plurality of storage blocks in the data storage unit in a predetermined order. Further, the control unit refers to the failure information in the management area of the storage block to be accessed for write access, and if the failure information indicates that the storage block includes a failure, the write access The target is set to the next storage block, and the failure information indicates that the storage block contains a failure. If there is a failure, the storage block is detected whether or not there is a new failure, and if a new failure is not detected, write access to the data area of the storage block is performed as it is, When a failure is detected, failure information indicating failure is included in the management area of the storage block, and the write access target is set in the next storage block.

請求項2の発明によれば、請求項1の発明において、上記書き込みアクセスはデータ書き込みの前にデータの消去操作を伴うようにし、上記制御部は、消去操作対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、消去操作対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該消去操作に伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して消去操作を行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、消去操作対象をつぎの順番の記憶ブロックに設定するようにしている。   According to a second aspect of the present invention, in the first aspect of the invention, the write access is accompanied by a data erasure operation before the data is written, and the control unit is provided in the management area of the storage block to be erased. When the failure information is referred to and the failure information indicates that the memory block contains a failure, the deletion operation target is set to the next storage block, and the failure information is stored in the memory block. When it is not indicated that it is included, it is detected whether or not there is a new failure in the storage block in accordance with the erasure operation, and when no new failure is detected, the data area of the storage block is directly used. If a failure is detected and a failure is detected, failure information indicating failure is included in the management area of the storage block, and the deletion operation target is It is to set the memory block.

請求項3の発明によれば、請求項1または2の発明において、上記制御部は、読み出しアクセス対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、読み出しアクセス対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該読み出しアクセスに伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して読み出しアクセスを行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、当該記憶ブロックから読み出したデータがエラー訂正可能な場合には、つぎの順番の記憶ブロックのデータを退避させて当該つぎの順番の記憶ブロックに訂正したデータを移動させて読み出しアクセスを継続するようにしている。   According to the invention of claim 3, in the invention of claim 1 or 2, the control unit refers to the failure information in the management area of the storage block to be read-accessed, and the failure information includes a failure in the storage block. If the failure information does not indicate that the storage block contains a failure, the read access target is set in the next sequential storage block. It is detected whether or not there is a new failure in the storage block. If no new failure is detected, read access is made to the data area of the storage block as it is, and if a failure is detected, the storage block If the failure information indicating failure is included in the management area and the data read from the storage block is error-correctable The, so that it retracts the data of the storage block in the following order to move the corrected data in the memory block of the next sequence to continue the read access.

また、請求項4の発明によれば、請求項1〜4のいずれかに記載のフラッシュメモリを具備し当該フラッシュメモリにブートデータを記憶する電子機器を実現している。   According to a fourth aspect of the present invention, there is provided an electronic device comprising the flash memory according to any one of the first to fourth aspects and storing boot data in the flash memory.

この発明の上述の側面および他の側面は特許請求の範囲に記載され以下実施例を用いて詳述される。   These and other aspects of the invention are set forth in the appended claims and will be described in detail below with reference to examples.

請求項1〜3の発明によれば、代替領域を確保することなくフラッシュメモリのアクセスを行なえる。   According to the first to third aspects of the present invention, the flash memory can be accessed without securing an alternative area.

請求項4の発明によれば、電子機器のブートデータを効率よく格納することが可能になる。   According to the invention of claim 4, it is possible to efficiently store the boot data of the electronic device.

以下、この発明の実施例について説明する。   Examples of the present invention will be described below.

図3は、この発明の実施例1のフラッシュメモリ100を全体として示しており、この図において、フラッシュメモリ100は記憶部10および制御部20から構成されている。記憶部10は典型的にはNAND型付揮発性メモリ素子から構成されており、複数の記憶ブロック11〜11からなっており、各記憶ブロック11〜11はそれぞれデータ領域12〜12および管理領域13〜13からなっている。制御部20は、記憶部10の記憶ブロック11へのアクセスを制御するものであり、データ領域と管理領域を個別に消去、書き込み、読み出しを行う機能を有する。または、制御部20は、両領域を同時に消去、書き込み、読み出しを行う機能を有する。また、制御部20は、消去、書き込み、読み出し動作において、エラー検出を行なう機能を有する。 FIG. 3 shows the flash memory 100 according to the first embodiment of the present invention as a whole. In FIG. 3, the flash memory 100 includes a storage unit 10 and a control unit 20. The storage unit 10 is typically composed of a NAND-type volatile memory element, and includes a plurality of storage blocks 11 1 to 11 N , and each of the storage blocks 11 1 to 11 N has a data area 12 1 to 12 N , respectively. 12 N and management areas 13 1 to 13 N. The control unit 20 controls access to the storage block 11 of the storage unit 10 and has a function of individually erasing, writing, and reading the data area and the management area. Alternatively, the control unit 20 has a function of simultaneously erasing, writing, and reading both areas. The control unit 20 has a function of performing error detection in erase, write, and read operations.

図4は、実施例のフラッシュメモリ100における代替処理例を示している。図4の例では、RAMのsrcAddrからフラッシュメモリ100へ書き込みを行なう。この例では、故障があるブロックに対しては管理領域に故障の情報が付加され、これに基づいて、アクセス対象ブロックが次ブロックに代替される。また、書き込み、消去時に故障を検出して当該ブロックが次ブロックに代替される。   FIG. 4 shows an example of alternative processing in the flash memory 100 of the embodiment. In the example of FIG. 4, writing is performed from the srcAddr of the RAM to the flash memory 100. In this example, failure information is added to the management area for a block having a failure, and based on this, the access target block is replaced with the next block. Further, a failure is detected during writing and erasing, and the corresponding block is replaced with the next block.

制御部20はつぎのように機能する。   The control unit 20 functions as follows.

(1)フラッシュメモリのデータ領域の消去を行う時、消去を行うブロックの管理領域の情報を参照し、故障しているか判定を行い、故障していなければ消去を行い、故障していれば、隣接するブロックを代替ブロックとする。隣接するブロックが故障しているかは、同様に判定を行う。
(2)フラッシュメモリのデータ領域の消去でエラーを検出したとき、エラーを検出したブロックの管理領域に故障を意味する情報を付加する。次に、隣接するブロックを代替ブロックとして使用するため、その代替ブロックのデータ領域の消去を行う。
(3)フラッシュメモリへのデータ書き込みを行う時、書き込みを行うブロックの管理領域の情報を参照し、故障しているか判定を行い、故障していなければ書き込みを行い、故障していれば隣接するブロックを代替ブロックとする。隣接するブロックが故障しているかは、同様に判定を行う。代替ブロックを使用する場合は、消去してから書き込みを行う。
(4)フラッシュメモリへのデータ書き込みでエラーを検出したとき、エラーを検出したブロックの管理領域に故障を意味する情報を付加する。次に、隣接するブロックを代替ブロックとして使用する。代替ブロックは、データ領域を消去してから書き込みを行う。
(5)フラッシュメモリからデータ読み出しを行う時、読み出しを行うブロックの管理領域の情報を参照し、故障しているか判定を行い、故障していなければ読み込みを行い、故障していれば隣接するブロックを代替ブロックとする。隣接するブロックが故障しているかは、同様に判定を行う。代替ブロックを使用する場合は、消去してからデータの移動を行い、移動が終了したら読み出しを行う。
(6)フラッシュメモリからのデータ読み出しでエラーを検出したとき、エラーを検出したブロックの管理領域に故障を意味する情報を付加する。次に、隣接するブロックを代替ブロックとして使用する。代替ブロックは、データ領域を消去してからデータの移動を行い、移動が終了したら読み出しを行う。
(7)フラッシュメモリからのデータ読み出しでエラーを検出したとき、データ訂正が可能なエラーであれば自動的に隣接するブロックを代替ブロックとして使用する。ただ、自動的に隣接するブロックを代替ブロックとして使用するかは、設定を切り替えることを可能とする。
(1) When erasing the data area of the flash memory, reference is made to the management area information of the block to be erased to determine whether or not there is a failure. If there is no failure, erasure is performed. Adjacent blocks are used as substitute blocks. It is similarly determined whether an adjacent block has failed.
(2) When an error is detected by erasing the data area of the flash memory, information indicating a failure is added to the management area of the block where the error is detected. Next, in order to use an adjacent block as a substitute block, the data area of the substitute block is erased.
(3) When writing data to the flash memory, refer to the information in the management area of the block to be written to determine if there is a failure. If there is no failure, write it. Let the block be an alternative block. It is similarly determined whether an adjacent block has failed. When using a substitute block, erase and then write.
(4) When an error is detected in writing data to the flash memory, information indicating a failure is added to the management area of the block in which the error is detected. Next, an adjacent block is used as a substitute block. The replacement block is written after erasing the data area.
(5) When reading data from the flash memory, refer to the management area information of the block to be read to determine whether there is a failure. If there is no failure, read it. Is a substitute block. It is similarly determined whether an adjacent block has failed. When using a substitute block, data is moved after erasing, and reading is performed when the movement is completed.
(6) When an error is detected in reading data from the flash memory, information indicating a failure is added to the management area of the block in which the error is detected. Next, an adjacent block is used as a substitute block. The substitution block performs data movement after erasing the data area, and performs reading when the movement is completed.
(7) When an error is detected in reading data from the flash memory, if the error can be corrected, an adjacent block is automatically used as a substitute block. However, it is possible to switch settings to automatically use an adjacent block as a substitute block.

図5はこのときの処理例を示し、その詳細は以下のとおりである。   FIG. 5 shows an example of processing at this time, and details thereof are as follows.

[ステップS30]:制御部20が、上位ソフトウェアからデータ書き込みの指示flashWrite(srcAddr,dstAddr,size)を受け取る。
[ステップS31]:宛て先アドレスdstAddrから、フラッシュメモリの書き込み開始ブロックblockAddrを算出する。
[ステップS32]:算出されたブロックの管理領域を参照して故障かどうかを確認する。
[ステップS33]:確認結果に基づいて故障であればステップS34へ進み、故障でなければステップS35へ進む。
[ステップS34]:対象ブロックを次ブロックに置き換え、ステップS32へ戻り処理を繰り返す。
[ステップS35]:対象ブロックを消去処理する。
[ステップS36]:消去処理において故障が発生したかどうか判別し、発生したらステップS37へ進み、そうでなければステップS39へ進む。
[ステップS37]:当該ブロックの管理領域に故障情報を付加してステップS38へ進む。
[ステップS38]:当該ブロックを次ブロックに置き換えステップS32へ戻り処理を繰り返す。
[ステップS39]:対象ブロックに書き込み処理を行なう。ステップS40へ進む。
[ステップS40]:書き込み処理において故障が発生したかどうか判別し、発生したらステップS37へ戻り処理を繰り返し、そうでなければステップS41へ進む。
[ステップS41]書き込みサイズ確認し、ステップS42へ進む。
[ステップS42]:書き込みが完了したら処理を終了し、完了しなかったらステップS32へ戻り処理を繰り返す。
[Step S30]: The control unit 20 receives a data write instruction flashWrite (srcAddr, dstAddr, size) from the upper software.
[Step S31]: A write start block blockAddr of the flash memory is calculated from the destination address dstAddr.
[Step S32]: It is confirmed whether or not there is a failure with reference to the calculated management area of the block.
[Step S33]: If there is a failure based on the confirmation result, the process proceeds to step S34, and if not, the process proceeds to step S35.
[Step S34]: Replace the target block with the next block, and return to Step S32 to repeat the process.
[Step S35]: The target block is erased.
[Step S36]: It is determined whether or not a failure has occurred in the erasure process. If it has occurred, the process proceeds to step S37, and if not, the process proceeds to step S39.
[Step S37]: The failure information is added to the management area of the block, and the process proceeds to Step S38.
[Step S38]: The block is replaced with the next block, and the process returns to Step S32 to repeat the process.
[Step S39]: Write processing to the target block. Proceed to step S40.
[Step S40]: It is determined whether or not a failure has occurred in the writing process. If a failure has occurred, the process returns to step S37 to repeat the process, and if not, the process proceeds to step S41.
[Step S41] The write size is confirmed, and the process proceeds to Step S42.
[Step S42]: If the writing is completed, the process is terminated. If not completed, the process returns to step S32 to repeat the process.

なお、読み出し時にも、管理領域の故障情報および読み出し時の故障検出に基づいて同様に次ブロックを読み出し領域としてよい。この場合、故障検出時のデータをエラー訂正して次ブロックに書き込み、その後、読み出しを行なう。この場合、故障のない次ブロックのデータを所定のメモリ領域に退避させておく必要がある。以降、故障のない次ブロックのデータを順次に退避させる必要がある。読み出し時に故障が検出された場合には、そのままエラーを出力しても良い。設定によりいずれかを選択できるようにしても良い。   Also at the time of reading, the next block may be similarly set as the reading area based on the failure information in the management area and the failure detection at the time of reading. In this case, data at the time of failure detection is error-corrected and written to the next block, and then read. In this case, it is necessary to save the data of the next block without a failure in a predetermined memory area. Thereafter, it is necessary to sequentially save the data of the next block without a failure. If a failure is detected during reading, an error may be output as it is. Either may be selected according to the setting.

この実施例によれば、代替領域を予め確保する必要がなくなった。このためフラッシュメモリの全領域を、通常使用領域になった。また、代替領域の容量を算出する必要がなくなった。また、故障管理テーブルの領域を確保する必要がなくなった。さらに、故障管理テーブルを更新する必要がなくなった。さらに、故障管理テーブルが必要ないため、フラッシュメモリが使用不能に陥ることがなくなった。しかも、複雑な代替処理が必要なくなった。   According to this embodiment, there is no need to secure an alternative area in advance. For this reason, the entire area of the flash memory has become a normal use area. It is no longer necessary to calculate the capacity of the alternative area. Also, it is no longer necessary to secure a failure management table area. Furthermore, it is no longer necessary to update the failure management table. In addition, since the failure management table is not required, the flash memory is no longer unusable. Moreover, complicated alternative processing is no longer necessary.

つぎにこの発明を電子機器に適用した実施例2について説明する。   Next, a second embodiment in which the present invention is applied to an electronic apparatus will be described.

図6は、実施例1のフラッシュメモリ100を採用した電子機器200を示し、この図において電子機器200はフラッシュメモリ100、CPU30、主メモリ40等をバス50に接続してなる。フラッシュメモリ100は実施例1と同様のものであり、記憶部10および制御部20を有している。この実施例では、フラッシュメモリ100にブートデータを記憶させている。電子機器200に電源を投入するとフラッシュメモリ100にシーケンシャルに記憶されているブートデータが順次読み出されて主メモリにロードされ、電子機器200が動作可能になる。ブートデータはシーケンシャルに読み出されるので実施例1のフラッシュメモリ100を用いて最適である。   FIG. 6 shows an electronic device 200 that employs the flash memory 100 of the first embodiment. In this figure, the electronic device 200 is formed by connecting the flash memory 100, the CPU 30, the main memory 40, and the like to the bus 50. The flash memory 100 is the same as that of the first embodiment, and includes a storage unit 10 and a control unit 20. In this embodiment, boot data is stored in the flash memory 100. When the electronic device 200 is turned on, the boot data sequentially stored in the flash memory 100 is sequentially read and loaded into the main memory, and the electronic device 200 becomes operable. Since the boot data is read sequentially, it is optimal to use the flash memory 100 of the first embodiment.

なお、この発明は特許請求の範囲の記載に基づいて決定されるものであり、実施例の具体的な構成、課題、および効果には限定されない。この発明は上述の実施例に限定されるものではなくその趣旨を逸脱しない範囲で種々変更が可能である。   In addition, this invention is determined based on description of a claim, and is not limited to the specific structure of the Example, a subject, and an effect. The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.

従来のフラッシュメモリを説明する模式図である。It is a schematic diagram explaining the conventional flash memory. 従来のフラッシュメモリの動作例を説明するフローチャートである。It is a flowchart explaining the operation example of the conventional flash memory. この発明の実施例1のフラッシュメモリの全体構成を示す図である。1 is a diagram showing an overall configuration of a flash memory according to Embodiment 1 of the present invention. 上述実施例1のフラッシュメモリの代替処理を説明する模式図である。It is a schematic diagram explaining the alternative processing of the flash memory of the first embodiment. 上述実施例1のフラッシュメモリの動作例を説明するフローチャートである。4 is a flowchart for explaining an operation example of the flash memory according to the first embodiment. この発明の実施例2の電子機器を説明する図である。It is a figure explaining the electronic device of Example 2 of this invention.

符号の説明Explanation of symbols

10 記憶部
11 記憶ブロック
12 データ領域
13 管理領域
20 制御部
30 CPU
40 主メモリ
50 バス
100 フラッシュメモリ
200 電子機器
DESCRIPTION OF SYMBOLS 10 Storage part 11 Storage block 12 Data area 13 Management area 20 Control part 30 CPU
40 Main memory 50 Bus 100 Flash memory 200 Electronic equipment

Claims (4)

複数の記憶ブロックからなるデータ記憶部と、
上記データ記憶部に対するデータアクセスを制御する制御部とを有し、
上記記憶ブロックの各々はデータ領域と、当該記憶ブロックが故障を含むかどうかを表す故障情報を含む管理領域とを具備し、
上記制御部は上記データ記憶部中の上記複数の記憶ブロックを予め定められた順番に書き込みアクセスおよび読み出しアクセスを行ない、
さらに、上記制御部は、書き込みアクセス対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、書き込みアクセス対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該書き込みアクセスに伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して書き込みアクセスを行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、書き込みアクセス対象をつぎの順番の記憶ブロックに設定するフラッシュメモリ。
A data storage unit comprising a plurality of storage blocks;
A control unit for controlling data access to the data storage unit,
Each of the storage blocks includes a data area, and a management area including failure information indicating whether the storage block includes a failure,
The control unit performs write access and read access to the plurality of storage blocks in the data storage unit in a predetermined order,
Further, the control unit refers to the failure information in the management area of the storage block to be written access, and when the failure information indicates that the storage block includes a failure, the control unit sets the write access target in the following order. If it is set in a storage block and the failure information does not indicate that the storage block contains a failure, it is detected whether or not there is a failure in the storage block with the write access. If no failure is detected, write access is made to the data area of the storage block as it is, and if a failure is detected, failure information indicating failure is included in the management area of the storage block, A flash memory that sets a write access target in the next storage block.
上記書き込みアクセスはデータ書き込みの前にデータの消去操作を伴い、
上記制御部は、消去操作対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、消去操作対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該消去操作に伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して消去操作を行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、消去操作対象をつぎの順番の記憶ブロックに設定する請求項1記載のフラッシュメモリ。
The above write access involves data erasure operation before data writing,
The control unit refers to failure information in the management area of the storage block to be erased, and when the failure information indicates that the storage block includes a failure, the control unit selects the erase operation target as the next storage block. In addition, when the failure information does not indicate that the storage block contains a failure, it is detected whether or not there is a new failure in the storage block in accordance with the erasure operation. If no failure is detected, the data area of the storage block is erased as it is, and if a failure is detected, the management area of the storage block includes failure information indicating failure, and 2. The flash memory according to claim 1, wherein the erasing operation target is set in a storage block in the next order.
上記制御部は、読み出しアクセス対象の記憶ブロックの管理領域中の故障情報を参照し、故障情報が当該記憶ブロックに故障が含まれることを示す場合には、読み出しアクセス対象をつぎの順番の記憶ブロックに設定し、さらに、上記故障情報が当該記憶ブロックに故障が含まれることを示さない場合には、当該読み出しアクセスに伴って当該記憶ブロックに新たに故障があるかどうかを検出し、新たな故障が検出されない場合にはそのまま当該記憶ブロックのデータ領域に対して読み出しアクセスを行ない、故障が検出される場合には当該記憶ブロックの管理領域に故障であることを表す故障情報を含ませ、かつ、当該記憶ブロックから読み出したデータがエラー訂正可能な場合には、つぎの順番の記憶ブロックのデータを退避させて当該つぎの順番の記憶ブロックに訂正したデータを移動させて読み出しアクセスを継続する請求項1または2記載のフラッシュメモリ。   The control unit refers to the failure information in the management area of the storage block to be read-accessed, and when the failure information indicates that the storage block includes a failure, the control unit sets the read-access target to the storage block in the next order. If the failure information does not indicate that the storage block contains a failure, it is detected whether there is a failure in the storage block with the read access, and a new failure is detected. If no failure is detected, read access is made to the data area of the storage block as it is, and if a failure is detected, failure information indicating failure is included in the management area of the storage block, and If the data read from the storage block can be corrected, save the data in the next storage block and save the data Flash memory according to claim 1 or 2, wherein by moving the corrected data into the storage block order skills to continue the read access. 請求項1〜3のいずれかに記載のフラッシュメモリを具備し当該フラッシュメモリにブートデータを記憶する電子機器。   An electronic device comprising the flash memory according to claim 1 and storing boot data in the flash memory.
JP2008138946A 2008-05-28 2008-05-28 Flash memory and electronic apparatus Withdrawn JP2009288914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008138946A JP2009288914A (en) 2008-05-28 2008-05-28 Flash memory and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008138946A JP2009288914A (en) 2008-05-28 2008-05-28 Flash memory and electronic apparatus

Publications (1)

Publication Number Publication Date
JP2009288914A true JP2009288914A (en) 2009-12-10

Family

ID=41458089

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008138946A Withdrawn JP2009288914A (en) 2008-05-28 2008-05-28 Flash memory and electronic apparatus

Country Status (1)

Country Link
JP (1) JP2009288914A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012174106A (en) * 2011-02-23 2012-09-10 Denso Corp Control device for reading and writing data from and to flash memory
DE112010004920T5 (en) 2009-12-21 2012-11-22 Ntn Corporation Sensor equipped bearing device for a wheel with integrated wheel hub motor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112010004920T5 (en) 2009-12-21 2012-11-22 Ntn Corporation Sensor equipped bearing device for a wheel with integrated wheel hub motor
JP2012174106A (en) * 2011-02-23 2012-09-10 Denso Corp Control device for reading and writing data from and to flash memory
US9058883B2 (en) 2011-02-23 2015-06-16 Denso Corporation Control apparatus for controlling data reading and writing to flash memory

Similar Documents

Publication Publication Date Title
US10255192B2 (en) Data storage device and data maintenance method thereof
US8386698B2 (en) Data accessing method for flash memory and storage system and controller using the same
JP5612514B2 (en) Nonvolatile memory controller and nonvolatile storage device
JP4245585B2 (en) Memory controller, flash memory system, and flash memory control method
JP4828816B2 (en) Memory card, semiconductor device, and memory card control method
US20100070729A1 (en) System and method of managing metadata
US8510502B2 (en) Data writing method, and memory controller and memory storage apparatus using the same
US9442841B2 (en) Semiconductor memory device and method for logging monitored events into a buffer
JPH05282889A (en) Nonvolatile semiconductor memory
JP2009064251A (en) Semiconductor storage device, and method of controlling semiconductor storage device
JP2005301591A (en) Device with nonvolatile memory, and memory controller
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
JP2004303238A (en) Flash memory access device and method
JP5874525B2 (en) Control device, storage device, and storage control method
JP2009037317A (en) Memory controller, non-volatile storage device using the same, and non-volatile memory system
JP5592478B2 (en) Nonvolatile storage device and memory controller
TWI381386B (en) Method for managing data and storage apparatus thereof and controller thereof
JP2003058417A (en) Storage device
JP2009259145A (en) Memory controller, flash memory system provided with memory controller, and method for controlling flash memory
JP2009288914A (en) Flash memory and electronic apparatus
JP3808842B2 (en) Storage device having rewritable nonvolatile memory and control method of nonvolatile memory for storage device
JP5949122B2 (en) Control device, storage device, and storage control method
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP2008009614A (en) Memory controller, memory system, and memory control method
JP3934659B1 (en) Memory controller and flash memory system

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110802