JP2006133923A - Data recording/reproducing device, recording/reproducing method, program and data recording medium - Google Patents
Data recording/reproducing device, recording/reproducing method, program and data recording medium Download PDFInfo
- Publication number
- JP2006133923A JP2006133923A JP2004320044A JP2004320044A JP2006133923A JP 2006133923 A JP2006133923 A JP 2006133923A JP 2004320044 A JP2004320044 A JP 2004320044A JP 2004320044 A JP2004320044 A JP 2004320044A JP 2006133923 A JP2006133923 A JP 2006133923A
- Authority
- JP
- Japan
- Prior art keywords
- data
- recording
- recorded
- link information
- block
- 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.)
- Pending
Links
Images
Abstract
Description
この発明は、例えばNAND型フラッシュメモリに対して適用されるデータ記録再生装置、記録再生方法、プログラム並びにデータ記録媒体に関する。 The present invention relates to a data recording / reproducing apparatus, a recording / reproducing method, a program, and a data recording medium applied to, for example, a NAND flash memory.
ディジタルスチルカメラ等では、MS−DOS(Microsoft Disc Operating System)(
登録商標)互換のFAT(File Allocation Table)ファイルシステムが使用されている。
例えば下記特許文献1には、不揮発性メモリとしてのメモリカードに対してFATファイルシステムを適用するデータ記憶装置について記載されている。
For digital still cameras, etc., MS-DOS (Microsoft Disc Operating System) (
A registered trademark compatible FAT (File Allocation Table) file system is used.
For example,
ユーザが誤って画像消去、メディアのフォーマット等を行った場合、または誤操作などで、FAT等の管理エリアが壊れてしまった場合、メディア内に画像データが残っているが、そのデータに対するリンク情報が失われてしまうために、そのデータに対してアクセスすることができなくなる。 If the user accidentally deletes an image, formats the media, etc., or if the management area such as FAT is damaged due to an erroneous operation, etc., the image data remains in the media, but link information for the data remains. Since it is lost, the data cannot be accessed.
この状態で、パーソナルコンピュータのアプリケーションソフトウェアを使用して画像データを復活させることが可能な場合がある。画像データがメディア上に連続的に記録されている場合では、JPEG(Joint Photographic Experts Group)のマーカーをサーチ
することによって簡単に画像を復活することができる。しかしながら、記録削除等を繰り返した結果、データの並びが不連続になっている場合では、画像の復活が困難となる。
In this state, it may be possible to restore the image data using the application software of the personal computer. When image data is continuously recorded on the medium, the image can be easily restored by searching for a JPEG (Joint Photographic Experts Group) marker. However, when the data arrangement is discontinuous as a result of repeated recording and deletion, it is difficult to restore the image.
従って、この発明の目的は、データ本体が消去または上書きされるまでリンク情報が残っているようにし、リンク情報を利用して不連続なデータの並びであっても、簡単にデータの復活を可能とするデータ記録再生装置、記録再生方法、プログラム並びにデータ記録媒体を提供することにある。 Therefore, the object of the present invention is to make the link information remain until the data body is erased or overwritten, and it is possible to easily restore the data even if the data is discontinuous using the link information. A data recording / reproducing apparatus, a recording / reproducing method, a program, and a data recording medium are provided.
上述した課題を解決するために、この発明の第1の態様は、記録されているデータが所定のデータ量のブロック単位で一括消去されると共に、所定長のデータ部毎に所定長の冗長部を有するデータ単位でデータが記録される不揮発性メモリを備えるデータ記録再生装置において、
データ部にデータを記録する時に、該データ部の冗長部にデータの記録順を識別できるリンク情報を記録するようにしたデータ記録再生装置である。
In order to solve the above-described problem, according to a first aspect of the present invention, recorded data is collectively erased in units of blocks having a predetermined amount of data, and a redundant portion having a predetermined length is provided for each data portion having a predetermined length. In a data recording / reproducing apparatus including a nonvolatile memory in which data is recorded in data units having:
In this data recording / reproducing apparatus, when data is recorded in the data part, link information that can identify the recording order of the data is recorded in the redundant part of the data part.
この発明の第2の態様は、記録されているデータが所定のデータ量のブロック単位で一括消去されると共に、所定長のデータ部毎に所定長の冗長部を有するデータ単位でデータが記録される不揮発性メモリを使用するデータ記録再生方法において、
データ部にデータを記録する時に、該データ部の冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録再生方法である。
According to the second aspect of the present invention, the recorded data is erased in batches in units of a predetermined amount of data, and data is recorded in units of data having a predetermined length of redundant portion for each predetermined length of data portion. In a data recording / reproducing method using a non-volatile memory,
This is a data recording / reproducing method for recording link information capable of identifying the recording order of data in the redundant portion of the data portion when data is recorded in the data portion.
この発明の第3の態様は、記録されているデータが所定のデータ量のブロック単位で一括消去されると共に、所定長のデータ部毎に所定長の冗長部を有するデータ単位でデータが記録される不揮発性メモリを使用するデータ記録再生方法をコンピュータに対して実行させるプログラムにおいて、
データ部にデータを記録する時に、該データ部の冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録再生方法のプログラムである。
In the third aspect of the present invention, the recorded data is erased in batches of a predetermined amount of data, and data is recorded in units of data having a predetermined length of redundant portion for each predetermined length of data portion. In a program for causing a computer to execute a data recording / reproducing method using a non-volatile memory
This is a data recording / reproducing method program for recording link information capable of identifying the recording order of data in the redundant portion of the data portion when data is recorded in the data portion.
この発明の第4の態様は、記録されているデータが所定のデータ量のブロック単位で一括消去されると共に、所定長のデータ部毎に所定長の冗長部を有するデータ単位でデータが記録される不揮発性メモリと、バッファ用メモリと、制御部と、ホスト側との接続用インターフェースとを備え、
制御部が不揮発性メモリにデータを記録する時に、該データ部の冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録媒体である。
According to a fourth aspect of the present invention, the recorded data is erased in batches of a predetermined amount of data and data is recorded in units of data having a predetermined length of redundant portion for each predetermined length of data portion. A non-volatile memory, a buffer memory, a control unit, and an interface for connection to the host side,
When the control unit records data in the nonvolatile memory, the data recording medium records link information that can identify the recording order of the data in the redundant portion of the data unit.
この発明によれば、フラッシュメモリの冗長部にリンク情報を記録することによって、誤ってデータを削除した場合等で、不連続なデータであっても復活することができる。したがって、より多くのデータを高速に復活することができる。また、この発明では、データとリンク情報とが同じ記録再生単位に記録されるので、有効データが残っている限り、リンク情報も残り、リンク情報を別のファイル等で管理する方法と比較して、データを確実に復活することができる。 According to the present invention, by recording link information in the redundant part of the flash memory, even when data is deleted by mistake, even discontinuous data can be recovered. Therefore, more data can be recovered at high speed. In the present invention, since the data and the link information are recorded in the same recording / reproduction unit, as long as valid data remains, the link information also remains, compared with a method of managing the link information in another file or the like. , Data can be reliably revived.
この発明の一実施形態の説明に先立ち、従来の問題点について図1乃至図7を参照して説明する。この発明は、記憶メディアとしてNAND型フラッシュメモリに対して適用される。 Prior to description of one embodiment of the present invention, conventional problems will be described with reference to FIGS. The present invention is applied to a NAND flash memory as a storage medium.
MS−DOS互換フォーマットでは、メディアに対するデータの読み出し/書き込みの単位がシリンダ、ヘッド、セクタと呼ばれている。セクタのサイズの倍数のサイズのクラスタが記録されているデータを管理するための単位として定められている。 In the MS-DOS compatible format, data reading / writing units for media are called cylinders, heads, and sectors. A cluster having a size that is a multiple of the sector size is defined as a unit for managing data recorded therein.
NAND型フラッシュメモリに適用される論理フォーマットでは、記憶領域がデータ消去の単位となる複数のブロックに分割されている。ブロックは、データ消去の単位であると同時に、ファイル管理上の最小単位である。すなわち、ファイルは、1つまたは複数のブロックに格納され、1つのブロックに複数のファイルが混在しない。さらに、1ブロックは、複数個のページからなる。フラッシュメモリに対してデータの書き込み/読み出しは、ページ単位で行われる。例えば1ページのサイズが512バイトとされている。 In the logical format applied to the NAND flash memory, the storage area is divided into a plurality of blocks which are units of data erasure. A block is a unit for erasing data, and at the same time is a minimum unit for file management. That is, a file is stored in one or a plurality of blocks, and a plurality of files are not mixed in one block. Furthermore, one block consists of a plurality of pages. Data writing / reading to / from the flash memory is performed in units of pages. For example, the size of one page is 512 bytes.
MS−DOSでは、ファイル管理データとして、MBR(Master Boot Record)、PBR(Partition Boot Record)、FATおよびルートディレクトリエントリが規定されている
。一例として、フラッシュメモリに対して1個のパーティションが形成されるものとされている。
In MS-DOS, MBR (Master Boot Record), PBR (Partition Boot Record), FAT, and root directory entry are defined as file management data. As an example, one partition is formed for the flash memory.
MBRは、ユーザ領域の先頭に配置される。MBRには各パーティションの情報(例えば開始LBAセクタ番号・サイズ等)が記録される。 The MBR is arranged at the head of the user area. Information of each partition (for example, start LBA sector number and size) is recorded in the MBR.
PBRは、各パーティションの先頭セクタに配置される。PBRが記録されているセクタは、MBR内の開始LBAセクタ番号に記述されている。なお、LBAセクタ番号とは、有効ブロック内(或いは有効ブロックの代替ブロック)の各セクタに一意的に付された番号である。LBAセクタ番号は、論理ブロック番号が0のブロックの先頭から昇順に付されている。 The PBR is arranged in the head sector of each partition. The sector in which the PBR is recorded is described in the start LBA sector number in the MBR. The LBA sector number is a number uniquely assigned to each sector in the valid block (or a substitute block of the valid block). LBA sector numbers are assigned in ascending order from the top of a block having a logical block number of 0.
FATは、PBRに続くセクタから複数のセクタにわたって記録される。FATは、ユーザ領域で扱われるファイルの連結状態をクラスタ単位で表している。 The FAT is recorded over a plurality of sectors from the sector following the PBR. The FAT represents a connection state of files handled in the user area in cluster units.
メディア上に記録されているデータは、クラスタ単位で管理されている。一つのファイルが複数のクラスタで構成される場合には、一つのクラスタを読み出した後に次のクラスタを読み出す必要がある。しかしながら、次のクラスタは、フラッシュメモリ上で物理的に連続する位置に記録されているとは限らない。FATは、あるクラスタに続くクラスタがどのクラスタであるかを示す情報である。このようにFATによって示されるクラスタの続く関係をFATチェインと称する。 Data recorded on the medium is managed in cluster units. When one file is composed of a plurality of clusters, it is necessary to read the next cluster after reading one cluster. However, the next cluster is not always recorded at physically continuous positions on the flash memory. The FAT is information indicating which cluster is a cluster following a certain cluster. The subsequent relationship of the clusters indicated by the FAT is referred to as a FAT chain.
メディア上に存在する全てのクラスタには、クラスタ番号0002から始まるクラスタ番号が付されている。FAT内の各格納領域に対しては、クラスタ番号が一義的に割り当てられている。各格納領域には、割り当てられているクラスタ番号のクラスタに接続された次のクラスタ番号が格納される。したがって、そのクラスタが割り当てられている格納領域に格納されているクラスタ番号を参照することによって、次のクラスタのクラスタ番号を知ることができる。
All clusters existing on the medium are assigned cluster numbers starting from
バックアップのために2つのFATが記録される。また、一つのFATの物理的なデータサイズは、フラッシュメモリ内のクラスタ数が変化しないので、一定である。 Two FATs are recorded for backup. The physical data size of one FAT is constant because the number of clusters in the flash memory does not change.
ルートディレクトリエントリには、ルートディレクトリに配置される各ファイルおよびサブディレクトリのエントリが記述される。ルートディレクトリエントリは、FATが記録された最終セクタに続く次のセクタから記録される。ルートディレクトリエントリのデータサイズは、一定である。上述したファイル管理データに続く次のセクタからユーザエリアの最初のクラスタ(クラスタ番号「02」)が開始する。 In the root directory entry, entries of files and subdirectories arranged in the root directory are described. The root directory entry is recorded from the next sector following the last sector in which the FAT is recorded. The data size of the root directory entry is constant. The first cluster (cluster number “02”) in the user area starts from the next sector following the file management data described above.
図1は、FATファイルシステムにしたがってフラッシュメモリに対してデータを記録した時を説明するためのデータの一例である。以下の説明では、ブロックおよびセクタに代えてブロックおよびページの単位の処理を説明する。 FIG. 1 is an example of data for explaining when data is recorded in the flash memory according to the FAT file system. In the following description, processing in units of blocks and pages will be described instead of blocks and sectors.
図1において、参照符号1がファイル管理データを示し、参照符号2がユーザデータのエリアである。ユーザデータエリア2において、「論理」は、論理アドレスを意味する。例えば「論理02」は、論理ブロックアドレス番号が2であることを表している。図1に示すように、ディレクトリテーブル3にFATチェイン4のスタート位置が記述される。ディレクトリテーブル3中の項目として、「Test1.dat 0002」と「Test2.dat 0005」とが示されている。 Test1.datおよびTest2.datがそれぞれファイル名であり、0002および0005がそのファイルの先頭のブロック番号を示している。
In FIG. 1,
参照符号5で示すファイルのデータの実体で示されるように、「Test1.dat 」のファイルは、ブロック番号0002のブロック02からブロック番号0004のブロック04までは連続的に記録され、ブロック番号0005をスキップしてブロック番号0006および0007のブロック06および07に連続的に記録されている。「Test2.dat 」のファイルは、ブロック番号0005のブロック05にのみ記録されている。
As indicated by the data entity of the file indicated by reference numeral 5, the file “Test1.dat” is continuously recorded from
このようにデータが記録されている場合では、ブロック番号0002から0009までのそれぞ
れが割り当てられたFATの格納領域に記録されるFATチェイン4には、図で示すように、後に続くブロック番号が記録される。ここで、ffffは、続くブロックがない、すなわち、最後のブロックであることを意味している。「Test1.dat 」のファイルの場合では、ブロック番号0002から0007に対してそれぞれ割り当てられた格納領域に、0003,0004,0006,ffff(Test2.dat のファイルの最後),0007,ffffが記録される。
When data is recorded in this way, the subsequent block numbers are recorded in the
図1に示すように、データが記録されている場合に、「Test1.dat 」のファイルを削除した場合には、図2に示すように、ディレクトリテーブル3において「Test1.dat」のフ
ァイルに対して削除マーク(×で示されている)が付けられ、FAT内の「Test1.dat」
のファイルに関するチェイン情報がクリアされる。この場合、データの実体5は、消去されない。「Test2.dat」のファイルは、削除されていないので、ブロック番号0005に割り
当てられた格納領域の値は、ffffのままである。
As shown in FIG. 1, when data is recorded and the file “Test1.dat” is deleted, the file “Test1.dat” in the directory table 3 as shown in FIG. Delete mark (indicated by ×) and “Test1.dat” in FAT
The chain information for the file is cleared. In this case, the data entity 5 is not erased. Since the file “Test2.dat” has not been deleted, the value of the storage area assigned to the
図3は、フラッシュメモリがクイックフォーマットされた場合を示す。クイックフォーマットでは、ディレクトリテーブル3の情報とFATチェイン4とがクリアされるが、データの実体5は、消去されない。
FIG. 3 shows a case where the flash memory is quick formatted. In the quick format, the information in the directory table 3 and the
図4は、何らかの誤動作によってディレクトリ3および/またはFAT4が破壊された場合を示す。この場合は、データにアクセスすることができないが、データの実体5は、フラッシュメモリ上に残っている。
FIG. 4 shows a case where the
図5は、フラッシュメモリをフルフォーマット(クイックフォーマットではないという意味)を行った場合を示している。この場合は、メモリ全体が消去されるので、ディレクトリテーブル3の情報とFATチェイン4とがクリアされるのに加えて、データの実体も消去される。すなわち、データに対して全て0または全てffのデータが上書きされる。この場合では、データの復活は、物理的に不可能である。
FIG. 5 shows a case where the flash memory is fully formatted (means not quick format). In this case, since the entire memory is erased, the information in the directory table 3 and the
図2,図3および図4に示すように、通常の方法では、データにアクセスできないが、データの実体5がフラッシュメモリ内に残っている場合には、何らかの方法でデータを復活させることが従来、考えられている。 As shown in FIG. 2, FIG. 3 and FIG. 4, data cannot be accessed by a normal method, but if the data entity 5 remains in the flash memory, the data has been restored by some method. ,It is considered.
JPEGファイルフォーマットでは、ファイルの中が2バイトのマーカコードで区切られている。ファイルの先頭には、SOI(Start Of Image)のマーカコード(ffd8)(16進表示)が配置され、ファイルの終端には、EOI(End Of Image)のマーカコード(ffd9)(16進表示)が配置されている。したがって、復活させようとするデータがJPEGの場合、データエリアをサーチしてSOIからEOIまでのデータの実体を切り出して1個のファイルとすることにより画像データを復活させることができる。 In the JPEG file format, the file is delimited by a 2-byte marker code. An SOI (Start Of Image) marker code (ffd8) (hexadecimal display) is placed at the beginning of the file, and an EOI (End Of Image) marker code (ffd9) (hexadecimal display) is placed at the end of the file. Is arranged. Therefore, when the data to be revived is JPEG, the image data can be revived by searching the data area and cutting out the substance of data from SOI to EOI to form one file.
この方法は、図6に示すように、ブロック番号0002から0007まで「Test1.jpg 」のファイルのFATチェインが連続している場合には、データ6を正しく復活することができる。なお、ブロック番号0007のブロックの終端位置とEOIの終端とが一致しないので、斜線で示された一部のダミー領域が存在する。
In this method, as shown in FIG. 6, when the FAT chain of the file “Test1.jpg” is continuous from
しかしながら、図7に示すように、JPEGファイルのデータ6がブロック番号0002から0004までは、連続したブロックに記録され、ブロック番号0005のブロックをスキップしてブロック番号0006および0007に記録されている場合には、SOIからEOIまでを切り出して1個のファイルとする方法を使用しても、JPEGファイルに正しくアクセスできない。すなわち、図7に示す例では、ブロック番号0005のブロックに記録されている無関係なデータ(「Test2.dat 」)が切り出されたデータ中に含まれてしまうために、正しくJPEGファイルを取り出すことができない。この場合では、正しい画像データとなるようにブロック番号毎に試行錯誤しながら正しいFATチェインを推測する必要がある。
However, as shown in FIG. 7, when the
この発明は、正しいFATチェインを判断するためのヒントを記憶しておくことによって、試行錯誤の回数を大幅に減らし、より多くのデータを高速に復活するものである。FATチェインの復活のためのヒントのデータをファイルのデータと別の管理エリアに記録すると、ファイルのデータとヒントのデータとの整合性がとれなくなるおそれがある。この発明は、ファイルのデータと同じデータ単位にFATチェインを復活するヒントとなる情報(以下、リンク情報と適宜称する)を記録するものである。 In the present invention, by storing a hint for determining a correct FAT chain, the number of trial and error is greatly reduced, and more data is restored at high speed. If the hint data for reinstating the FAT chain is recorded in a separate management area from the file data, the file data and the hint data may not be consistent. The present invention records information (hereinafter referred to as link information as appropriate) that serves as a hint for restoring the FAT chain in the same data unit as the file data.
この発明の一実施形態では、リンク情報を各ページに付加されている冗長部に記録するものである。メモリカード等の外部記憶媒体、または内蔵フラッシュメモリとして使用される、NAND型フラッシュメモリでは、図8に示すように、1ページ分のデータ部11(512バイト)と共に、冗長部12(16バイト)のエリアが規定されている。 In one embodiment of the present invention, link information is recorded in a redundant portion added to each page. In a NAND flash memory used as an external storage medium such as a memory card or a built-in flash memory, as shown in FIG. 8, a redundant portion 12 (16 bytes) together with a data portion 11 (512 bytes) for one page. Areas are defined.
冗長部12は、当該冗長部が格納されたブロックを管理するための情報である。冗長部12は、ブロックの使用の可否を示すフラグ等が含まれている2バイトのフラグと、2バイトの論理アドレスと、7バイトの空きエリア13と、3バイトのデータ(512バイトのデータ)用のエラー訂正符号(ECC)パリティコードと、2バイトの冗長部用のエラー訂正符号(ECC)パリティコードとから構成されている。但し、フラグは、冗長部用のエラー訂正符号化の対象とされていない。
The
この発明の一実施形態では、図9に示すように、7バイトの空きエリア13の内の2バイトを使用してリンク情報14を記録する。したがって、空きエリアは、13'で示すよ
うに5バイトのサイズとなる。リンク情報14は、論理アドレスと共にエラー訂正符号化される。2バイト程度のリンク情報を記録するために、コストおよび処理時間の増加分を少なくできる。
In one embodiment of the present invention, as shown in FIG. 9, the
リンク情報14は、このブロックを書き込んだ直前に書き込まれたブロックの論理アドレス番号である。かかるリンク情報14を記録することによって、データを書き込んだ順番を後からたどることが可能となる。リンク情報14として実際に記録されるデータは、直前のブロックの論理アドレス番号に限らず、直前の物理アドレス番号、直後の論理アドレス番号および直後の物理アドレス番号の何れかでも良い。さらに、メディア内でデータを記録した順番で決定されるユニークなシーケンシャル番号をリンク情報14として使用しても良い。
The
図10を参照して、リンク情報の使用方法について説明する。ここでは、簡単のために、ブロック番号=論理アドレス=物理アドレスの関係が存在しているものと仮定する。ユーザデータエリア2に記録されるデータの各ページは、上述したように、データ部11と冗長部12とからなり、冗長部12にリンク情報14が記録されている。1ブロックは、所定数のページからなるが、同一ブロックのリンク情報は、同一の情報である。
A method for using link information will be described with reference to FIG. Here, for the sake of simplicity, it is assumed that a relationship of block number = logical address = physical address exists. As described above, each page of data recorded in the
図1に示すのと同様にデータが記録されている場合では、各ブロック番号のページのそれぞれに記録されるリンク情報14は、図10に示すものとなる。ここでは、リンク情報14がこのブロックを書き込んだ直前に書き込まれたブロックの論理アドレス番号である。ブロック番号08および09のブロックでは、データが書かれていないので、2バイトのリンク情報は、初期値である(0000)とされる。
When data is recorded in the same manner as shown in FIG. 1, the
ブロック番号07のリンク情報14は、直前に書き込まれたブロックのブロック番号(0006)であり、ブロック番号06のリンク情報14は、直前に書き込まれたブロックのブロック番号(0004)である。ブロック番号05のリンク情報14は、1ブロックに一つのファイルのデータが書かれているので、直前に書き込まれたブロックが存在せず、したがって、リンク情報14が(0000)である。ブロック番号04のリンク情報14は、直前に書き込まれたブロックのブロック番号(0003)であり、ブロック番号03のリンク情報14は、直前に書き込まれたブロックのブロック番号(0002)である。
The
このように、リンク情報14が記録されていると、ディレクトリテーブル3および/またはFATチェイン4を読み出すことができなくても、ファイルの実体データが残っていれば、リンク情報14を後ろから順にたどることによって、その実体データを復活できる。リンク情報14を直前に書き込まれたブロックの番号とせずに、次に書かれるブロックの番号としても良い。但し、直前に記録されたブロック番号を覚えておいて、次のデータと一緒に記録する方法は、既存の制御処理からの変更する量を少なくできる。
As described above, when the
図11は、この発明を適用できるディジタルカメラの構成の概略である。参照符号21は、CPU(Central Processing Unit)を示し、参照符号22は、CPUバスである。C
PUバス22に対して、ROM23、RAM24、撮影部25および画像処理部26が接続されている。
FIG. 11 is an outline of the configuration of a digital camera to which the present invention can be applied.
A
ROM23には、プログラム等のデータが格納されている。RAM24は、CPU21が処理に使用するワーク用メモリである。撮影部25は、CCD(Charge Coupled Device)等の撮像素子から構成され、撮影部25からディジタル化された撮影データが出力される。撮影データは、画像処理部26にてJPEGによる圧縮処理を受ける。
The
CPUバス22には、入出力インターフェース部31を介して入力部32、出力部33、通信部34、NANDフラッシュメモリ35、メモリカードインターフェース36が接続される。
An
入力部32は、シャッターボタン等の複数のキーである。出力部33は、LCD(Liquid Crystal Display)等の表示部である。通信部34は、パーソナルコンピュータと通信
を行う部分、例えばUSBである。NANDフラッシュメモリ35は、ディジタルカメラに内蔵されている。メモリカードインターフェース36を介してリムーバブルなメモリカード37が接続される。メモリカード37は、NANDフラッシュメモリおよび制御部とを有する。
The
撮影部25が撮影した画像は、出力部33に表示される。入力部32のシャッターボタンが押されると、撮影部25によって画像が捕捉され、画像処理部26でJPEGによる圧縮処理がなされ、JPEGデータがNANDフラッシュメモリ35およびメモリカード37の一方または両方に対して記録される。
An image photographed by the photographing
図12は、メモリカード37の構成の一例を示す。メモリカード37は、フラッシュメモリ41と、書き込みデータおよび読み出しデータのバッファ用のRAM42と、メモリカード37の各部を制御するコントローラ43と、インターフェース44とからなる。インターフェース44およびメモリカードインターフェース36を介してディジタルカメラのCPU21(ホストコンピュータとしての位置付けを有する)がメモリカード37を直接制御する。フラッシュメモリ41に対するアクセスは、物理ブロックアクセスである。CPU21は、内蔵されているNANDフラッシュメモリ35およびメモリカード37に対して上述したように、各ページの冗長部に対してリンク情報の書き込みおよび読み出しを行う。
FIG. 12 shows an example of the configuration of the
図13は、メモリカード37の構成の他の例を示す。図12の構成例と相違するのは、コントローラ43の代わりにCPU44が設けられている点である。CPU44が各ページの冗長部に対してリンク情報の書き込みおよび読み出しを行う。ホスト側コンピュータとしてのCPU21がメモリカード37に対して論理ブロックアクセスを行う。したがって、ホスト側のCPU21は、リンク情報の書き込みおよび読み出しの処理を行わないで良く、CPU21の既存の処理に対して追加する処理が不要である。
FIG. 13 shows another example of the configuration of the
次に、図14を参照してデータ記録時の処理について説明する。図14に示されるフローチャートは、データを記録する時の処理の流れを全体として示し、この処理は、内蔵のフラッシュメモリ35およびリムーバブルなメモリカード37の両方に対して共通に適用できる。フラッシュメモリ35または図12に示すメモリカード37のように、CPU21がアドレスを直接制御する場合には、図14に示されるデータ記録時の処理もCPU21によってなされる。
Next, processing at the time of data recording will be described with reference to FIG. The flowchart shown in FIG. 14 shows the overall flow of processing when data is recorded, and this processing can be commonly applied to both the built-in
図10に示すように、データおよびリンク情報を記録する例を参照して説明する。図10の場合と同様に、簡単のために、ブロック番号=論理アドレス=物理アドレスの関係が存在しているものと仮定する。最初のステップS1において、FATから空きクラスタAが計算される。例えば空きクラスタ0002が求められる。ステップS2において、クラスタ番号0002から論理アドレスB例えば0002が計算される。
As shown in FIG. 10, description will be given with reference to an example of recording data and link information. As in the case of FIG. 10, for the sake of simplicity, it is assumed that a relationship of block number = logical address = physical address exists. In the first step S1, an empty cluster A is calculated from the FAT. For example, an
ステップS3において、論理アドレスBに対してデータおよびリンク情報が記録される。ステップS3の処理について後で図15を参照してより詳細に説明する。 In step S3, data and link information are recorded for logical address B. The process of step S3 will be described in detail later with reference to FIG.
記録処理後にFATにクラスタA例えば0002のチェインを更新する。具体的には、0002にffffを書く。そして、ファイルサイズ分のデータの記録が終了したか否かがステップS5にて判定される。終了していないと判定されたならば、処理がステップS1に戻り、ステップS2からS4までの処理が繰り返される。ファイルサイズ分のデータの記録が終了したと判定されたならば、ステップS6において、ディレクトリおよびFATのデータが記録されて記録処理が終了する。 After the recording process, the chain of cluster A, for example, 0002 is updated in the FAT. Specifically, ffff is written in 0002. Then, it is determined in step S5 whether or not the recording of data for the file size has been completed. If it is determined that the process has not been completed, the process returns to step S1, and the processes from step S2 to step S4 are repeated. If it is determined that the recording of the data for the file size has been completed, the directory and FAT data are recorded in step S6, and the recording process ends.
図14におけるデータ記録処理S3は、より詳細には、図15に示すようになされる。一例として、論理アドレス0002に対してデータが記録され、2回目のデータ記録処理S3がなされる場合について説明する。最初にステップS31において、未使用の物理ブロックC例えば0003が計算される。ステップS32において、その物理ブロックCに対してデータが記録される。ステップS33において、物理ブロックCの各ページの冗長部に論理アドレスB例えば0003が記録される。
More specifically, the data recording process S3 in FIG. 14 is performed as shown in FIG. As an example, a case where data is recorded at the
ステップS34では、物理ブロックCの各ページの冗長部にリンク情報Xが記録される。直前に記録したブロックのアドレス例えば0002がリンク情報Xとして冗長部に記録される。ステップS35において、物理ブロックCのアドレス0003がXとされる。なお、上述したように、リンク情報Xは、物理アドレスおよび論理アドレスの何れでも良く、シリアル番号でも良い。また、図16のフローチャートに示すように、パワーオン時の初期化処理のステップS41において、リンク情報Xとして初期値0が設定される。
In step S34, link information X is recorded in the redundant portion of each page of physical block C. The address of the block recorded immediately before, for example, 0002 is recorded as link information X in the redundant part. In step S35, the
そして、ステップS36において、論理物理変換テーブル(論物テーブルと称する)が更新される。論物テーブルは、CPU21のワーク用のRAM24に記憶されている。
In step S36, the logical-physical conversion table (referred to as a logical / physical table) is updated. The logical / physical table is stored in the
図10に示すように、CPU21の制御によってRAM42内の画像をフラッシュメモリの例えばブロック番号02,03,04,06,07のブロックに対してデータを書き込む場合の処理の流れを以下に示す。
As shown in FIG. 10, the flow of processing when data in the image in the
ブロック番号02にデータを書き込む時には、直前に書き込んだブロックが無いために、リンク情報として0000をデータと同時に書き込む。
When writing data to block
引き続きブロック番号03にデータを書き込む時に、リンク情報として直前に書き込んだブロック番号である0002をデータと同時に書き込む。
Subsequently, when data is written to the
引き続きブロック番号04にデータを書き込む時に、リンク情報として直前に書き込んだブロック番号である0003をデータと同時に書き込む。
Subsequently, when data is written to the
引き続きブロック番号06にデータを書き込む時に、リンク情報として直前に書き込んだブロック番号である0004をデータと同時に書き込む。
Subsequently, when data is written to the
引き続きブロック番号07にデータを書き込む時に、リンク情報として直前に書き込んだブロック番号である0006をデータと同時に書き込む。
Subsequently, when data is written to the
図13に示すように、CPU44を有するメモリカードの場合では、CPU44が上述したように、データを記録する処理を制御し、メモリカードの内部で自動的にリンク情報を記録する。このリンク情報は、通常、ホスト側からは見えない。そこで、リンク情報が必要となるデータ修復時に特殊なコマンド(例えばReadLong)を使用して、データと冗長部のリンク情報とを同時に読み出すことによって、リンク情報を使用可能とする。
As shown in FIG. 13, in the case of a memory card having a
ディレクトリまたはFATチェインが使用不可になり、一方、データが残っている場合、データの復活は、パーソナルコンピュータを使用してなされる。例えばJPEGファイルの復活処理について図17を参照して説明する。 If the directory or FAT chain is disabled while data remains, the data is restored using a personal computer. For example, JPEG file restoration processing will be described with reference to FIG.
最初に、フラッシュメモリから論理アドレス順にデータと冗長部とを読み出す。パーソナルコンピュータのRAMに読み込まれたデータに対して、論理アドレスの先頭からJPEGファイル6のSOIのマーカコード(ffd8)(16進表示)が探される。
First, data and redundant parts are read from the flash memory in the order of logical addresses. For the data read into the RAM of the personal computer, the SOI marker code (ffd8) (hexadecimal display) of the
SOIのマーカコードを発見できると、物理アドレスまたは論理アドレスが0002であり、そこのリンク情報が0000であることが分かる。リンク情報として0002が記録されているブロックを探すと、ブロック番号03のブロックが探せる。ブロック番号03をリンク情報としているブロックは、ブロック番号04のブロックである。ブロック番号04をリンク情報としているブロックは、ブロック番号06のブロックである。ブロック番号06をリンク情報としているブロックは、ブロック番号07のブロックである。ブロック番号07に、EOIのマーカコード(ffd9)(16進表示)が記録されているので、ブロック番号07がファイルの終端である。
If the SOI marker code can be found, the physical address or the logical address is 0002, and the link information there is 0000. When a block in which 0002 is recorded as link information is searched, a block with
EOIのマーカコードを発見できた場合には、SOIからEOIまでのデータを切り出して画像データとして保存し、データの正当性を確認する。このようにして、JPEGファイル6を復活することができる。
When an EOI marker code is found, data from SOI to EOI is cut out and stored as image data, and the validity of the data is confirmed. In this way, the
以上、この発明の実施の形態について具体的に説明したが、この発明は、上述の実施の形態に限定されるものではなく、この発明の技術的思想に基づく各種の変形が可能である。例えばこの発明は、NAND型フラッシュメモリに限らず、データ記録時に冗長部が存在する不揮発性メモリ例えばAND型フラッシュメモリに対しても適用できる。また、この発明は、ディジタルカメラに限定されず、動画データ、音楽データ等のディジタルデータの記録再生に対しても適用可能である。 Although the embodiment of the present invention has been specifically described above, the present invention is not limited to the above-described embodiment, and various modifications based on the technical idea of the present invention are possible. For example, the present invention can be applied not only to a NAND flash memory but also to a nonvolatile memory such as an AND flash memory in which a redundant portion exists during data recording. The present invention is not limited to a digital camera, and can also be applied to recording and reproduction of digital data such as moving image data and music data.
1 ファイル管理データ
2 ユーザデータエリア
3 ディレクトリテーブル
4 FATチェイン
5 記録されているデータ
6 JPEGファイル
11 データ部
12 冗長部
14 リンク情報
21 CPU
25 撮影部
35 内蔵のNAND型フラッシュメモリ
37 リムーバブルなメモリカード
43 メモリカード内のコントローラ
44 メモリカード内のCPU44
DESCRIPTION OF
25
Claims (7)
データ部にデータを記録する時に、該データ部の上記冗長部にデータの記録順を識別できるリンク情報を記録するようにしたデータ記録再生装置。 Data recording / reproduction comprising a nonvolatile memory in which recorded data is erased in batches of a predetermined amount of data, and data is recorded in units of data each having a predetermined length of redundant portion for each predetermined length of data portion In the device
A data recording / reproducing apparatus configured to record link information capable of identifying a recording order of data in the redundant portion of the data portion when data is recorded in the data portion.
上記不揮発性メモリがホスト側コンピュータによってアクセスされる外部記録媒体に含まれ、
上記ホスト側コンピュータによって上記不揮発性メモリの冗長部にデータ記録順のリンク情報を記録するデータ記録再生装置。 The data recording / reproducing apparatus according to claim 1,
The non-volatile memory is included in an external recording medium accessed by a host computer,
A data recording / reproducing apparatus for recording link information in the data recording order in a redundant portion of the nonvolatile memory by the host computer.
上記不揮発性メモリがホスト側コンピュータによってアクセスされる外部記録媒体に含まれ、
上記外部記録媒体の内部で、上記不揮発性メモリの冗長部にデータ記録順のリンク情報を記録するデータ記録再生装置。 The data recording / reproducing apparatus according to claim 1,
The non-volatile memory is included in an external recording medium accessed by a host computer,
A data recording / reproducing apparatus for recording link information in a data recording order in a redundant portion of the nonvolatile memory inside the external recording medium.
上記リンク情報が直前に記録を行ったデータ単位の論理アドレス、直前に記録を行ったデータ単位の物理アドレス、直後に記録を行ったデータ単位の論理アドレス、直後に記録を行ったデータ単位の物理アドレスおよびデータを記録した順番で決定されるユニークなシーケンシャル番号の何れかであるデータ記録再生装置。 The data recording / reproducing apparatus according to claim 1,
The link information is the logical address of the data unit recorded immediately before, the physical address of the data unit recorded immediately before, the logical address of the data unit recorded immediately after, the physical address of the data unit recorded immediately after A data recording / reproducing apparatus which is one of unique sequential numbers determined in the order in which addresses and data are recorded.
データ部にデータを記録する時に、該データ部の上記冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録再生方法。 Data recording using a nonvolatile memory in which recorded data is erased in batches of a predetermined amount of data, and data is recorded in units of data having a redundant portion of a predetermined length for each data portion of a predetermined length In the playback method,
A data recording / reproducing method for recording link information capable of identifying the recording order of data in the redundant portion of the data portion when data is recorded in the data portion.
データ部にデータを記録する時に、該データ部の上記冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録再生方法のプログラム。 Data recording using a nonvolatile memory in which recorded data is erased in batches of a predetermined amount of data, and data is recorded in units of data having a redundant portion of a predetermined length for each data portion of a predetermined length In a program for causing a computer to execute a playback method,
A program for a data recording / reproducing method for recording link information capable of identifying the recording order of data in the redundant portion of the data portion when data is recorded in the data portion.
上記制御部が上記不揮発性メモリにデータを記録する時に、該データ部の上記冗長部にデータの記録順を識別できるリンク情報を記録するデータ記録媒体。
Non-volatile memory in which recorded data is collectively erased in units of blocks having a predetermined amount of data, and data is recorded in units of data having a redundant portion of a predetermined length for each data portion of a predetermined length, and a buffer memory And a control unit and an interface for connection to the host side,
A data recording medium for recording link information capable of identifying the recording order of data in the redundant portion of the data portion when the control portion records data in the nonvolatile memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004320044A JP2006133923A (en) | 2004-11-04 | 2004-11-04 | Data recording/reproducing device, recording/reproducing method, program and data recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004320044A JP2006133923A (en) | 2004-11-04 | 2004-11-04 | Data recording/reproducing device, recording/reproducing method, program and data recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006133923A true JP2006133923A (en) | 2006-05-25 |
Family
ID=36727446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004320044A Pending JP2006133923A (en) | 2004-11-04 | 2004-11-04 | Data recording/reproducing device, recording/reproducing method, program and data recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006133923A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009054260A (en) * | 2007-08-29 | 2009-03-12 | Toshiba Corp | Semiconductor storage and operation method thereof |
WO2009031689A1 (en) * | 2007-09-06 | 2009-03-12 | Kabushiki Kaisha Toshiba | Memory device and file system |
JP2015191567A (en) * | 2014-03-28 | 2015-11-02 | 株式会社メガチップス | semiconductor memory device |
US9715341B2 (en) | 2014-10-29 | 2017-07-25 | Samsung Electronics Co., Ltd. | Operating a memory device using a program order stamp to control a read voltage |
US9858014B2 (en) | 2014-10-29 | 2018-01-02 | Samsung Electronics Co., Ltd. | Memory system and method of operating same using program order information |
US9921749B2 (en) | 2014-10-29 | 2018-03-20 | Samsung Electronics Co., Ltd. | Memory system and method including determining a read voltage based on program order information and a plurality of mapping tables |
CN113196258A (en) * | 2018-12-19 | 2021-07-30 | 索尼集团公司 | Information processing apparatus, information processing method, and information processing program |
-
2004
- 2004-11-04 JP JP2004320044A patent/JP2006133923A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009054260A (en) * | 2007-08-29 | 2009-03-12 | Toshiba Corp | Semiconductor storage and operation method thereof |
JP4575410B2 (en) * | 2007-08-29 | 2010-11-04 | 株式会社東芝 | Semiconductor memory device and operation method thereof |
WO2009031689A1 (en) * | 2007-09-06 | 2009-03-12 | Kabushiki Kaisha Toshiba | Memory device and file system |
KR101139076B1 (en) * | 2007-09-06 | 2012-04-30 | 가부시끼가이샤 도시바 | Memory device and file system |
JP2015191567A (en) * | 2014-03-28 | 2015-11-02 | 株式会社メガチップス | semiconductor memory device |
US9715341B2 (en) | 2014-10-29 | 2017-07-25 | Samsung Electronics Co., Ltd. | Operating a memory device using a program order stamp to control a read voltage |
US9858014B2 (en) | 2014-10-29 | 2018-01-02 | Samsung Electronics Co., Ltd. | Memory system and method of operating same using program order information |
US9921749B2 (en) | 2014-10-29 | 2018-03-20 | Samsung Electronics Co., Ltd. | Memory system and method including determining a read voltage based on program order information and a plurality of mapping tables |
CN113196258A (en) * | 2018-12-19 | 2021-07-30 | 索尼集团公司 | Information processing apparatus, information processing method, and information processing program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6675276B2 (en) | Method for providing extensible dos-fat system structures on one-time programmable media | |
KR101139224B1 (en) | Method And Apparatus For Using A One-Time Or Few-Time Programmable Memory With A Host Device Designed For Erasable/Rewriteable Memory | |
JP4085478B2 (en) | Storage medium and electronic device system | |
EP2117007A2 (en) | Managing the amount of data according to batch writing size and to update count, which increases with erase-block size and depends on the type of flash memory | |
US20050036372A1 (en) | Data storing apparatus | |
US20050080985A1 (en) | Data storage device | |
JP2003196142A (en) | Write-once type memory device and file management method | |
US20110320692A1 (en) | Access device, information recording device, controller, real time information recording system, access method, and program | |
KR20070089603A (en) | Apparatus, method, and computer program for processing information | |
JP4487954B2 (en) | Data recording apparatus, data recording method, and program | |
JPH04307644A (en) | Memory card storage control system | |
JP5558093B2 (en) | Semiconductor device and memory system | |
JP2006133923A (en) | Data recording/reproducing device, recording/reproducing method, program and data recording medium | |
JP2005050192A (en) | Information recording system | |
JP5002944B2 (en) | Information processing apparatus, imaging apparatus, information processing method, and computer program | |
JP2006323462A (en) | File-copying device and file-copying method | |
JP2005353046A (en) | Recording medium, host device, and data processing method | |
JP6864228B2 (en) | Storage device and data management method for storage device | |
JP4218406B2 (en) | Information recording and playback method | |
JP2006260158A (en) | Information processing apparatus, information processing method and program | |
JP4612816B2 (en) | Recording / reproducing apparatus and control method | |
JP2006155461A (en) | Information processor and processing method, and program | |
JP3552247B2 (en) | Electronic still camera | |
JPH04307647A (en) | Memory card storage control system | |
TWI387874B (en) | Storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060209 |