JP2009205591A - Access module, information recording module, and information recording system - Google Patents

Access module, information recording module, and information recording system Download PDF

Info

Publication number
JP2009205591A
JP2009205591A JP2008049359A JP2008049359A JP2009205591A JP 2009205591 A JP2009205591 A JP 2009205591A JP 2008049359 A JP2008049359 A JP 2008049359A JP 2008049359 A JP2008049359 A JP 2008049359A JP 2009205591 A JP2009205591 A JP 2009205591A
Authority
JP
Japan
Prior art keywords
information
area
fat
entry
entry information
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
Application number
JP2008049359A
Other languages
Japanese (ja)
Inventor
Takuji Maeda
卓治 前田
Shinji Inoue
信治 井上
Hiroki Eto
博樹 衛藤
Masahiro Nakamura
雅裕 中村
Makoto Ochi
誠 越智
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2008049359A priority Critical patent/JP2009205591A/en
Publication of JP2009205591A publication Critical patent/JP2009205591A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for increasing seek processing speed when the nonvolatile memory of an information recording module is managed in terms of area by a FAT file system, and easily maintaining consistency in area management information. <P>SOLUTION: An access module 1 stores an extension FAT in a file system which manages the nonvolatile memory of the information recording module 2. The access module includes an extension FAT processing part 104 for performing area management by either normal FAT entries or extension FAT entries which are stored in the extension FAT with reference to the extension FAT. When file data is stored in continuous areas, the extension FAT entries are used so as to collectively manage the continuous areas with a small amount of information through area management by the extension FAT processing part. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、データを不揮発性メモリに格納し、ファイルとして管理するアクセスモジュール、情報記録モジュール、及び情報記録システムに関する。   The present invention relates to an access module, an information recording module, and an information recording system that store data in a nonvolatile memory and manage the data as a file.

音楽コンテンツや、映像データ等のデジタルデータを記録する記録媒体には、磁気ディスク、光ディスク、光磁気ディスク等、様々な種類が存在する。これら記録媒体の内、記録素子にフラッシュROM等の半導体メモリを使用したメモリカードは、記録媒体の小型化が図れることから、デジタルスチルカメラや携帯電話端末等、小型の携帯機器を中心に急速に普及している。更に最近では、フラッシュROM等の半導体メモリを機器に内蔵してハードディスクの代わりに使用するなど、従来のメモリカードのような着脱可能なリムーバブルメディアとしての用途のみならず、機器内蔵ストレージとしての用途でも半導体メモリが使用されるようになってきた。   There are various types of recording media for recording digital data such as music content and video data, such as magnetic disks, optical disks, and magneto-optical disks. Among these recording media, memory cards that use a semiconductor memory such as a flash ROM as a recording element can rapidly reduce the size of the recording medium. Therefore, the memory card is rapidly used mainly for small portable devices such as digital still cameras and mobile phone terminals. It is popular. More recently, semiconductor memories such as flash ROMs are built into devices and used in place of hard disks. For example, they can be used not only as removable media such as conventional memory cards, but also as devices built-in storage. Semiconductor memory has come into use.

このようなメモリカードや機器内蔵ストレージには、主にNAND型フラッシュメモリと呼ばれる半導体素子が使用されている。NAND型フラッシュメモリは、既に記録されたデータを一旦消去した後、再度別のデータを記録することが可能な記録素子であり、従来のハードディスクと同様に、複数回書き換え可能な情報記録装置を構成することが可能である。   For such a memory card or a device built-in storage, a semiconductor element called a NAND flash memory is mainly used. The NAND flash memory is a recording element that can once erase already recorded data and then record another data again, and forms an information recording device that can be rewritten a plurality of times, similar to a conventional hard disk. Is possible.

従来、メモリカードや機器内蔵ストレージに格納されたデータはファイルシステムにより管理されている。データをファイルシステムにより管理することで、同一のファイルシステムを解釈する機器間でデータをファイルとして共有することが可能となり、ユーザは自分の格納したデータを複数の機器間で容易に参照したり、コピーしたりすることが可能となる。   Conventionally, data stored in a memory card or device built-in storage is managed by a file system. By managing data with a file system, it becomes possible to share data as a file between devices that interpret the same file system, and users can easily reference their stored data among multiple devices, It is possible to copy.

従来最も広く使用されているファイルシステムはFATファイルシステムと呼ばれるものである。FATファイルシステムは、領域管理をファイルアロケーションテーブル(FAT)と呼ばれるテーブルで一元管理するという特徴を持っており、比較的構造がシンプルで実装が容易なことから、フレキシブルディスクやPCのハードディスク、メモリカードなどのファイルシステムとして広く使用されている。   Conventionally, the most widely used file system is called a FAT file system. The FAT file system has a feature that the area management is centrally managed by a table called a file allocation table (FAT). Since the structure is relatively simple and easy to implement, a flexible disk, a PC hard disk, or a memory card is used. It is widely used as a file system.

図2にFATファイルシステムの構成を示す。FATファイルシステムではファイルアロケーションテーブル内の管理単位のビット幅の違いにより、FAT12、FAT16、FAT32などの種類が存在するが、ファイルアロケーションテーブルによる領域管理方法はほぼ同じであり、以下ではFAT16を例に説明する。同図に示すように論理アドレス空間の先頭には、領域割り当て単位やファイルシステムが管理する領域の大きさ等、ファイルシステムの管理情報が格納される領域であるファイルシステム管理情報領域201が存在する。このファイルシステム管理情報領域201には、マスターブートレコード・パーティションテーブル203、パーティションブートセクタ204、FAT(205、206)、ルートディレクトリエントリ207と呼ばれるファイルシステムの管理情報が含まれ、ユーザデータ領域202を管理するために必要な情報が各々格納されている。マスターブートレコード・パーティションテーブル203は、ファイルシステムが管理する論理アドレス空間上の領域を複数のパーティションと呼ばれる領域に分割して管理するための情報が格納される領域である。パーティションブートセクタ204は、パーティション内の領域管理単位の大きさなど、1つのパーティション内の管理情報が格納される領域である。FAT(205、206)は、ファイルに含まれるデータの格納位置に関する情報が格納される領域であり、通常、同じ情報を持つ2つのFAT(205、206)が存在し、一方のFAT(205、206)が破損したとしても他方のFAT(205、206)によりファイルにアクセスできるよう二重化されている。ルートディレクトリエントリ207は、ルートディレクトリ直下に存在するファイル、ディレクトリの情報(ディレクトリエントリ)が格納される領域である。   FIG. 2 shows the configuration of the FAT file system. In the FAT file system, there are types such as FAT12, FAT16, and FAT32 depending on the bit width of the management unit in the file allocation table. However, the area management method using the file allocation table is almost the same. In the following, FAT16 is taken as an example. explain. As shown in the figure, at the head of the logical address space, there is a file system management information area 201 that is an area for storing file system management information such as an area allocation unit and the size of the area managed by the file system. . This file system management information area 201 includes file system management information called a master boot record / partition table 203, partition boot sector 204, FAT (205, 206), and root directory entry 207. Information necessary for management is stored. The master boot record / partition table 203 is an area in which information for managing an area on the logical address space managed by the file system by dividing it into areas called partitions is stored. The partition boot sector 204 is an area in which management information in one partition such as the size of the area management unit in the partition is stored. The FAT (205, 206) is an area in which information regarding the storage position of data included in a file is stored. Usually, there are two FAT (205, 206) having the same information, and one FAT (205, 206). Even if 206) is damaged, it is duplexed so that the file can be accessed by the other FAT (205, 206). The root directory entry 207 is an area in which information (directory entry) of files and directories existing directly under the root directory is stored.

またFATファイルシステムでは、このファイルシステム管理情報領域201に引き続く領域にファイル本体のデータなどを格納するユーザデータ領域202が存在する。ユーザデータ領域202は、512バイトから32KB程度の大きさを持つクラスタと呼ばれる管理単位毎に分割管理されており、各クラスタにはファイルに含まれるデータが格納されている。多くのデータを格納するファイルは、複数のクラスタに跨ってデータを格納しており、各クラスタ間の繋がりは、FAT(205、206)に格納されたリンク情報により管理されている。また、ルートディレクトリ直下のディレクトリ内に存在するファイル、サブディレクトリの情報(ディレクトリエントリ)は、このユーザデータ領域202の一部を利用して格納される。   In the FAT file system, a user data area 202 for storing file body data and the like exists in an area subsequent to the file system management information area 201. The user data area 202 is divided and managed for each management unit called a cluster having a size of about 512 bytes to 32 KB, and data contained in a file is stored in each cluster. A file storing a lot of data stores data across a plurality of clusters, and the connection between the clusters is managed by link information stored in the FAT (205, 206). In addition, information (directory entry) on files and subdirectories existing in the directory immediately under the root directory is stored using a part of the user data area 202.

図3はFAT16のディレクトリエントリの構成を示した図である。ディレクトリエントリ208は1つのファイル、ディレクトリ毎に32バイトのディレクトリエントリ208が割り当てられ、ファイル、ディレクトリに関する情報を格納している。すなわち、1つのファイルやディレクトリが追加される度に32バイトのディレクトリエントリ208の情報が新規に作成され、ルートディレクトリエントリ207の領域、あるいはユーザデータ領域202に記録される。ディレクトリエントリ208の先頭8バイトにはファイルやディレクトリの名称が格納される。続く3バイトには拡張子が格納される。続く1バイトにはファイル・ディレクトリの種別を識別するフラグや、ファイル・ディレクトリがリードオンリーか否かを識別するフラグ等の属性情報が格納される。また、ファイル・ディレクトリの最終更新日時の情報や、ファイル・ディレクトリデータの実体が格納されているクラスタの開始位置を示す開始クラスタ番号、ファイルサイズのバイト数等が格納される。このようにディレクトリエントリ208には、データ実体が格納されている領域の最初の1クラスタの位置を示す情報しか含まれておらず、データ実体の大きさが1クラスタよりも大きい場合において2クラスタ目以降のデータがどの領域に格納されているかについては、FAT(205、206)で管理されている。   FIG. 3 is a diagram showing the structure of the directory entry of FAT16. The directory entry 208 is assigned a 32-byte directory entry 208 for each file and directory, and stores information on the file and directory. That is, every time one file or directory is added, information of a 32-byte directory entry 208 is newly created and recorded in the area of the root directory entry 207 or the user data area 202. In the first 8 bytes of the directory entry 208, the name of the file or directory is stored. The extension is stored in the following 3 bytes. The subsequent 1 byte stores attribute information such as a flag for identifying the type of the file / directory and a flag for identifying whether the file / directory is read-only. Further, information on the last update date / time of the file / directory, the start cluster number indicating the start position of the cluster in which the substance of the file / directory data is stored, the number of bytes of the file size and the like are stored. As described above, the directory entry 208 includes only information indicating the position of the first cluster in the area in which the data entity is stored, and the second cluster when the size of the data entity is larger than one cluster. The area in which subsequent data is stored is managed by FAT (205, 206).

図4はFAT16のFAT(205、206)の構成を示した図である。FAT16では、FAT(205、206)は2バイト(16ビット)の情報を1つのFATエントリとして管理しており、1つのFATエントリが1つのクラスタの状態を示している。すなわち、ユーザデータ領域202にM個のクラスタが存在する場合、FATエントリもM個存在することから、FAT(205、206)の1つ分の大きさは約2×Mバイトとなる。但し、先頭2FATエントリ分はFATの先頭を示す固定の値(0xF8FF、0xFFFF)がシグネチャとして記録されるため、ユーザデータ領域202の先頭クラスタに対応するFATエントリはFAT(205、206)の4バイト目、5バイト目の2バイトに存在している。FAT先頭に存在する4バイトのシグネチャをFATエントリの0番、1番とすると、4バイト目、5バイト目の2バイトの位置は2番目になることから、ユーザデータ領域202の先頭クラスタは、便宜上クラスタ番号=“2”と割り当てられており、クラスタ番号=“0”、“1”に対応するクラスタは存在しないことになっている。   FIG. 4 is a diagram showing the configuration of FAT (205, 206) of FAT16. In FAT16, FAT (205, 206) manages information of 2 bytes (16 bits) as one FAT entry, and one FAT entry indicates the state of one cluster. That is, when there are M clusters in the user data area 202, there are M FAT entries, so the size of one FAT (205, 206) is about 2 × M bytes. However, since the fixed value (0xF8FF, 0xFFFF) indicating the beginning of the FAT is recorded as the signature for the first 2 FAT entries, the FAT entry corresponding to the first cluster in the user data area 202 is 4 bytes of FAT (205, 206). The second and fifth bytes are present. Assuming that the 4-byte signature existing at the beginning of the FAT is 0 and 1 of the FAT entry, the position of the 2nd byte of the 4th and 5th bytes is second, so the top cluster of the user data area 202 is For convenience, cluster number = “2” is assigned, and there is no cluster corresponding to cluster number = “0”, “1”.

更に、各FATエントリは各々対応するクラスタの状態(使用中、空き、欠陥)、及びリンク先のクラスタ番号を示す。例えば図4において対応クラスタ番号2のFATエントリは0x0003(十進数では“3”)に設定されており、クラスタ番号2のクラスタ内に格納されたデータの続きのデータは、クラスタ番号3のクラスタ内に格納されていることを意味する。同様に対応クラスタ番号3のFATエントリは0x0004(十進数では“4”)に設定されており、クラスタ番号3のクラスタ内に格納されたデータの続きのデータは、クラスタ番号4のクラスタ内に格納されていることを意味する。また、対応クラスタ番号6のFATエントリは0xFFFFに設定されている。これは次のリンク先が存在せず、リンクが終端していることを意味する。よって、図4の例では、クラスタ番号2、3、4、5、6の順に一連のファイルデータが格納されていることになる。また、対応クラスタ番号7のFATエントリは0x0000に設定されている。これは対応するクラスタが使用されておらず、“空き”の状態であることを意味する。また、対応クラスタ番号(M+1)のFATエントリは0xFFF7に設定されている。これは対応するクラスタが物理的に壊れていて記録が出来ない状態である等の欠陥状態であることを意味する。まとめると、0x0000、0xFFFF、0xFFF7の3つのFATエントリ値は各々特殊な意味を持ち、0x0002から0xFFF6までのFATエントリ値がリンク先クラスタ番号として使用されることになる。また、それ以外の0x0001、0xFFF8から0xFFFEまでの値は予約されており、通常は使用されない値になっている。   Furthermore, each FAT entry indicates the status of the corresponding cluster (in use, available, defective) and the cluster number of the link destination. For example, in FIG. 4, the FAT entry for the corresponding cluster number 2 is set to 0x0003 (decimal number “3”), and the data subsequent to the data stored in the cluster with the cluster number 2 is within the cluster with the cluster number 3 It means that it is stored in. Similarly, the FAT entry of the corresponding cluster number 3 is set to 0x0004 ("4" in decimal), and the data subsequent to the data stored in the cluster of cluster number 3 is stored in the cluster of cluster number 4 Means that The FAT entry for the corresponding cluster number 6 is set to 0xFFFF. This means that the next link destination does not exist and the link is terminated. Therefore, in the example of FIG. 4, a series of file data is stored in the order of cluster numbers 2, 3, 4, 5, and 6. The FAT entry for the corresponding cluster number 7 is set to 0x0000. This means that the corresponding cluster is not used and is in an “empty” state. The FAT entry for the corresponding cluster number (M + 1) is set to 0xFFF7. This means that the corresponding cluster is in a defect state, such as a state in which recording is not possible because the cluster is physically broken. In summary, the three FAT entry values 0x0000, 0xFFFF, and 0xFFF7 have special meanings, and the FAT entry values from 0x0002 to 0xFFF6 are used as the link destination cluster numbers. The other values from 0x0001, 0xFFF8 to 0xFFFE are reserved and are not normally used.

このようにFATファイルシステムでは、ファイルデータが複数のクラスタに跨って格納されている場合、各クラスタ間のリンク関係をFATエントリの値に格納し管理している。よって、ファイルデータを先頭から順に終端まで読み出す場合、クラスタ境界に来る度にFAT(205、206)を参照し、次のリンク先のクラスタ番号を特定する必要がある。同様にファイル内の任意の位置を読み出すためにシーク処理を行う場合、FAT(205、206)を参照してシークサイズ分のクラスタ数だけリンクを辿り所望のデータが格納されているクラスタ番号を特定する必要がある。そのため、シーク処理はファイルサイズに比例して処理時間が長くなることになる。ここで1GBのファイルを16KBクラスタ単位で管理している場合を想定すると、リンクを辿る回数は約65000回となり、比較的低速なCPUを使用した場合等では、シーク処理に数秒かかる場合もある。更にFAT(205、206)ではファイルの順方向のリンク情報しか保持していないため、ファイルの前方に向かってシークする場合には再度ファイルの先頭からシーク処理をやり直す必要があり、高速にシークできないという問題が生じる。   As described above, in the FAT file system, when file data is stored across a plurality of clusters, the link relationship between the clusters is stored and managed in the value of the FAT entry. Therefore, when reading the file data from the beginning to the end, it is necessary to specify the cluster number of the next link destination by referring to the FAT (205, 206) every time the cluster boundary is reached. Similarly, when performing seek processing to read an arbitrary position in the file, refer to FAT (205, 206) and follow the link for the number of clusters corresponding to the seek size to identify the cluster number where the desired data is stored. There is a need to. For this reason, the seek process takes a longer processing time in proportion to the file size. Here, assuming a case where a 1 GB file is managed in units of 16 KB clusters, the number of times the link is traced is about 65000 times, and when a relatively low-speed CPU is used, the seek process may take several seconds. Furthermore, since the FAT (205, 206) holds only the forward link information of the file, when seeking to the front of the file, it is necessary to redo the seek process from the beginning of the file, and the seek cannot be performed at high speed. The problem arises.

従来、このような問題を解決する方法として、ジャンプテーブルを用いる方法が提案されている(例えば、特許文献1参照)。この方法では、ファイル先頭から所定単位サイズ毎にデータが格納されているクラスタ番号のリストをジャンプテーブルとして生成して保持し、シーク時にはジャンプテーブルに保持された情報を参照してシーク先の位置に最も近い位置のクラスタ番号を探し出し、そこからFAT(205、206)を参照してシーク処理を継続するという技術が開示されている。
特開2001−236251号公報
Conventionally, as a method for solving such a problem, a method using a jump table has been proposed (see, for example, Patent Document 1). In this method, a list of cluster numbers in which data is stored for each predetermined unit size from the beginning of the file is generated and held as a jump table, and at the seek destination position by referring to the information held in the jump table during seek A technique is disclosed in which the cluster number at the nearest position is found and the seek process is continued with reference to the FAT (205, 206).
JP 2001-236251 A

しかしながら、上記の従来技術には次のような問題点がある。従来の方法では、電源起動時等に予めジャンプテーブルを生成する時間が必要であり、アクセス装置の起動時間が長くなるという問題が生じる。更に、ファイルデータが格納されている領域に関する情報をFAT(205、206)とジャンプテーブルで二重管理するため、ファイルを追記したり部分削除したりした場合、両方の情報を整合性の取れた状態に維持するために複雑な処理が必要となる。   However, the above prior art has the following problems. In the conventional method, it takes time to generate a jump table in advance at the time of power activation or the like, which causes a problem that the activation time of the access device becomes long. In addition, information related to the area where the file data is stored is double-managed using FAT (205, 206) and jump table, so when adding or deleting a file, both information can be consistent. Complex processing is required to maintain the state.

本発明では上記問題点に鑑み、FATファイルシステムにおけるFATエントリを拡張することにより、シーク処理を高速化し、且つファイルシステム管理情報の不整合が生じにくいアクセスモジュール、情報記録モジュール、及び情報記録システムを提供することを目的とする。   In the present invention, in view of the above problems, an access module, an information recording module, and an information recording system are provided that increase the FAT entry in the FAT file system, thereby speeding up the seek process and preventing inconsistencies in file system management information. The purpose is to provide.

本発明のアクセスモジュールは、ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールにアクセスするアクセスモジュールであって、前記不揮発性メモリ内の記録領域を固定長ブロック単位で管理すると共に、1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、前記不揮発性メモリ内の複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報とを用いて、前記不揮発性メモリ内の記録領域の領域管理を行うファイルシステム制御部を具備することを特徴とする。   An access module according to the present invention is an access module for accessing an information recording module including a nonvolatile memory for storing file data, and manages a recording area in the nonvolatile memory in units of fixed-length blocks. Using first entry information including area management information related to the fixed-length block and second entry information including management information of a continuous area composed of a plurality of the fixed-length blocks in the nonvolatile memory, A file system control unit that performs area management of a recording area in the nonvolatile memory is provided.

また、前記第1のエントリ情報と、前記第2のエントリ情報とは、前記不揮発性メモリの記録領域内に存在する共通の領域管理情報テーブル内で管理され、1つの前記固定長ブロックの領域管理は、前記第1のエントリ情報か、前記第2のエントリ情報のいずれか一方でのみ行われるようにしても良い。   The first entry information and the second entry information are managed in a common area management information table existing in the recording area of the nonvolatile memory, and the area management of one fixed-length block is performed. May be performed only in either the first entry information or the second entry information.

更に、前記ファイルシステム制御部は、前記第1のエントリ情報のみを用いて領域管理を行う通常FAT処理部と、前記第1のエントリ情報と、前記第2のエントリ情報の両方を用いて領域管理を行う拡張FAT処理部とを具備する構成にしても良い。   Further, the file system control unit uses the normal FAT processing unit that performs region management using only the first entry information, region management using both the first entry information and the second entry information. It may be configured to include an extended FAT processing unit for performing the above.

この構成の場合、前記ファイルシステム制御部は、前記不揮発性メモリ内の記録領域に存在するファイルシステム管理情報に格納された判定フラグを参照し、前記通常FAT処理部と、前記拡張FAT処理部のいずれを使用するかを決定するように構成することができる。   In this configuration, the file system control unit refers to the determination flag stored in the file system management information existing in the recording area in the non-volatile memory, and the normal FAT processing unit and the extended FAT processing unit It can be configured to determine which one to use.

また、前記第1のエントリ情報は、対応する前記固定長ブロックに格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含んでも良い。   The first entry information may include information indicating a position of the fixed-length block in which data subsequent to the data stored in the corresponding fixed-length block is stored.

また、前記第2のエントリ情報は、前記第1のエントリ情報と前記第2のエントリ情報とを識別するための情報と、前記第2のエントリ情報が管理する連続領域の大きさを示す情報と、前記第2のエントリ情報が管理する連続領域に格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含んでも良い。   The second entry information includes information for identifying the first entry information and the second entry information, information indicating a size of a continuous area managed by the second entry information, and , Information indicating a position of the fixed-length block in which data subsequent to data stored in a continuous area managed by the second entry information is stored may be included.

更に、前記ファイルシステム制御部は、ファイルデータを格納する領域が所定の個数以上の前記固定長ブロックから構成される領域である場合に、前記第2のエントリ情報を用いて領域を管理し、ファイルデータを格納する領域が前記所定の個数未満の前記固定長ブロックから構成される領域である場合に、前記第1のエントリ情報を用いて領域を管理するようにしても良い。   Further, the file system control unit manages the area using the second entry information when the area for storing file data is an area composed of a predetermined number or more of the fixed-length blocks, When the area for storing data is an area composed of the fixed-length blocks less than the predetermined number, the area may be managed using the first entry information.

また、前記ファイルシステム制御部は、ファイル内の現在参照している前記固定長ブロックの位置である現在参照位置情報を保持しており、前記現在参照位置情報をファイル内の任意の位置に変更するシーク処理を行う際において、現在参照位置が前記第1のエントリ情報により管理されている場合、1つの前記固定長ブロック分の大きさだけ現在参照位置を進め、現在参照位置が前記第2のエントリ情報により管理されている場合、該第2のエントリ情報により管理されている連続領域分の大きさだけ現在参照位置を進めるようにしても良い。   The file system control unit holds current reference position information which is the position of the fixed-length block currently referenced in the file, and changes the current reference position information to an arbitrary position in the file. When performing a seek process, if the current reference position is managed by the first entry information, the current reference position is advanced by the size of one fixed-length block, and the current reference position is the second entry. When managed by information, the current reference position may be advanced by the size of the continuous area managed by the second entry information.

本発明の情報記録モジュールは、ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールであって、前記不揮発性メモリは固定長ブロック単位で管理されており、1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報により構成された前記不揮発性メモリの領域管理情報が前記不揮発性メモリ内に格納されることを特徴とする。   The information recording module of the present invention is an information recording module including a nonvolatile memory for storing file data, the nonvolatile memory being managed in units of fixed-length blocks, and area management relating to one fixed-length block The area management information of the nonvolatile memory configured by first entry information including information and second entry information including management information of a continuous area composed of a plurality of the fixed-length blocks is stored in the nonvolatile memory. It is characterized by being stored in.

本発明の情報記録システムは、ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールと、前記情報記録モジュールにアクセスするアクセス装置から構成され、前記不揮発性メモリは固定長ブロック単位で管理されており、1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報により構成された前記不揮発性メモリの領域管理情報が前記不揮発性メモリ内に格納され、前記アクセスモジュールは、前記領域管理情報を用いて前記不揮発性メモリ内の記録領域の領域管理を行うファイルシステム制御部を具備することを特徴とする。   The information recording system of the present invention comprises an information recording module having a nonvolatile memory for storing file data and an access device for accessing the information recording module, and the nonvolatile memory is managed in units of fixed-length blocks. The non-volatile configuration configured by first entry information including area management information related to one fixed-length block and second entry information including management information of a continuous area composed of a plurality of fixed-length blocks. Memory area management information is stored in the nonvolatile memory, and the access module includes a file system control unit that performs area management of a recording area in the nonvolatile memory using the area management information. And

本発明によれば、FATファイルシステムによりデータを管理する場合において、シーク処理を高速に実施することが可能となり、且つファイルシステム管理情報の不整合が生じる可能性を低減することが可能となる。   According to the present invention, when data is managed by the FAT file system, seek processing can be performed at high speed, and the possibility of inconsistencies in file system management information can be reduced.

以下、本発明のアクセスモジュール、情報記録モジュール、及び情報記録システムについて、図面を参照しつつ説明する。   Hereinafter, an access module, an information recording module, and an information recording system of the present invention will be described with reference to the drawings.

(実施の形態)
図1は本発明の実施の形態におけるアクセスモジュール、情報記録モジュールの構成図である。図1においてアクセスモジュール1は、CPU11、RAM12、情報記録モジュールインタフェース13、ROM14を含む。ROM14にはアクセスモジュール1を制御するプログラムが格納されており、このプログラムはRAM12を一時記憶領域として使用し、CPU11上で動作する。情報記録モジュールインタフェース13は、情報記録モジュール2とアクセスモジュール1との接続部であり、制御信号及びデータの送受信を行う。ROM14は更に、アプリケーション制御部101、ファイルシステム制御部102、情報記録モジュールアクセス部105を含む。アプリケーション制御部101は、データの生成や電源の制御などアクセスモジュール1全体の制御を行う。ファイルシステム制御部102は、FATファイルシステムによりデータをファイルとして管理するための制御を行う。情報記録モジュールアクセス部105は、ファイルシステム制御部102からデータと共にサイズとアドレスを渡され、指定されたサイズのデータを情報記録モジュール2の記録領域内における指定された位置に記録するなど、情報記録モジュール2に対するコマンドやデータの送受信を制御する。ファイルシステム制御部102は更に、通常FAT処理部103、拡張FAT処理部104を含む。通常FAT処理部103は、従来のFAT(205、206)を制御する処理部であり、従来のアクセスモジュール内に存在するFAT処理部と同様のものである。拡張FAT処理部104は本願の特徴である拡張FATを制御する処理部であり、従来のアクセスモジュールには存在しないものである。
(Embodiment)
FIG. 1 is a configuration diagram of an access module and an information recording module in the embodiment of the present invention. In FIG. 1, the access module 1 includes a CPU 11, a RAM 12, an information recording module interface 13, and a ROM 14. The ROM 14 stores a program for controlling the access module 1, and this program uses the RAM 12 as a temporary storage area and operates on the CPU 11. The information recording module interface 13 is a connection part between the information recording module 2 and the access module 1 and transmits and receives control signals and data. The ROM 14 further includes an application control unit 101, a file system control unit 102, and an information recording module access unit 105. The application control unit 101 controls the entire access module 1 such as data generation and power control. The file system control unit 102 performs control for managing data as files by the FAT file system. The information recording module access unit 105 receives the size and address together with the data from the file system control unit 102 and records the data of the specified size at a specified position in the recording area of the information recording module 2. Controls transmission / reception of commands and data to / from module 2. The file system control unit 102 further includes a normal FAT processing unit 103 and an extended FAT processing unit 104. The normal FAT processing unit 103 is a processing unit that controls the conventional FAT (205, 206), and is the same as the FAT processing unit existing in the conventional access module. The extended FAT processing unit 104 is a processing unit that controls the extended FAT, which is a feature of the present application, and does not exist in the conventional access module.

一方、図1において情報記録モジュール2は、アクセスモジュールインタフェース21、CPU22、RAM23、ROM24、不揮発性メモリ25を含む。アクセスモジュールインタフェース21は、情報記録モジュール2とアクセスモジュール1との接続部であり、情報記録モジュールインタフェース13同様、制御信号及びデータを送受信するインタフェースである。ROM24には情報記録モジュール2を制御するプログラムが格納されており、このプログラムはRAM23を一時記憶領域として使用し、CPU22上で動作する。不揮発性メモリ25は、アクセスモジュール1から送信されたデータを記録する領域であり、その中はFATファイルシステムで管理されている。不揮発性メモリ25内の論理アドレス空間には、マスターブートレコード・パーティションテーブル203や、パーティションブートセクタ204、ルートディレクトリエントリ207等の、従来のFATファイルシステムに存在する管理情報が格納されており、ユーザデータ領域202内に格納されたファイル、ディレクトリを管理している。また、従来FAT(ファイルアロケーションテーブル)が格納されていた領域には、本願の特徴である拡張FATが格納されている。拡張FATには従来のFATに格納されている通常FATエントリの他、連続領域をまとめて少量の情報で管理する拡張FATエントリが格納される。   On the other hand, in FIG. 1, the information recording module 2 includes an access module interface 21, a CPU 22, a RAM 23, a ROM 24, and a nonvolatile memory 25. The access module interface 21 is a connection part between the information recording module 2 and the access module 1, and is an interface that transmits and receives control signals and data, like the information recording module interface 13. The ROM 24 stores a program for controlling the information recording module 2, and this program operates on the CPU 22 using the RAM 23 as a temporary storage area. The nonvolatile memory 25 is an area for recording data transmitted from the access module 1, and is managed by the FAT file system. The logical address space in the non-volatile memory 25 stores management information existing in the conventional FAT file system such as the master boot record / partition table 203, the partition boot sector 204, and the root directory entry 207. Files and directories stored in the data area 202 are managed. Further, an extended FAT which is a feature of the present application is stored in an area where a conventional FAT (file allocation table) is stored. In the extended FAT, in addition to the normal FAT entries stored in the conventional FAT, extended FAT entries for managing continuous areas together with a small amount of information are stored.

本実施の形態のアクセスモジュール1は、情報記録モジュール2内の不揮発性メモリ25に構築されたFATファイルシステムにおいて、連続領域を少量の情報で管理する拡張FATエントリを記録する機能を持つ。更に拡張FATエントリを読み出して解釈する機能を持つ。これら拡張FATにアクセスする機能により、ファイルのシーク処理を高速化し、且つファイルシステム管理情報の不整合が生じる可能性を低減することが可能となる。   The access module 1 of the present embodiment has a function of recording an extended FAT entry that manages a continuous area with a small amount of information in the FAT file system constructed in the nonvolatile memory 25 in the information recording module 2. Further, it has a function of reading and interpreting the extended FAT entry. With the function of accessing these extended FATs, it is possible to speed up the file seek process and reduce the possibility of inconsistencies in file system management information.

次に図5、図6を用いて、本発明における拡張FATファイルシステムの構成について説明する。図5は本発明における拡張FATファイルシステムの構成を示した図である。図5が、従来のFATファイルシステムの構成を示した図2と異なる点は、FAT(205、206)の領域が拡張FAT(301、302)の領域に変化している点である。従来のFAT(205、206)では1クラスタに対応する管理情報を1つのFATエントリ(通常FATエントリ)を用いて管理していたが、本発明の拡張FAT(301、302)では、通常FATエントリの他、複数のFATエントリを結合して一連の連続領域の情報を格納する拡張FATエントリも格納する。   Next, the configuration of the extended FAT file system according to the present invention will be described with reference to FIGS. FIG. 5 is a diagram showing the configuration of the extended FAT file system in the present invention. FIG. 5 differs from FIG. 2 showing the configuration of the conventional FAT file system in that the FAT (205, 206) area is changed to an extended FAT (301, 302) area. In the conventional FAT (205, 206), management information corresponding to one cluster is managed using one FAT entry (normal FAT entry), but in the extended FAT (301, 302) of the present invention, the normal FAT entry In addition, an extended FAT entry for storing a series of continuous area information by combining a plurality of FAT entries is also stored.

図6は本発明における拡張FATエントリの構成を示した図である。拡張FATエントリは、通常FATエントリの3つ分の領域を使用する。FAT16の場合には1つの通常FATエントリが2バイトで管理されるため、拡張FATエントリは6バイトの大きさとなる。拡張FATエントリの先頭2バイトには、本エントリが拡張FATエントリであることを示す固定の値が拡張エントリシグネチャ(ext_sig)として格納される。拡張エントリシグネチャとしては例えば0xFFFE等が用いられる。   FIG. 6 is a diagram showing the configuration of the extended FAT entry in the present invention. The extended FAT entry normally uses three areas of the FAT entry. In the case of FAT16, since one normal FAT entry is managed by 2 bytes, the extended FAT entry has a size of 6 bytes. In the first 2 bytes of the extended FAT entry, a fixed value indicating that this entry is an extended FAT entry is stored as an extended entry signature (ext_sig). For example, 0xFFFE is used as the extended entry signature.

また、続く2バイトには、本エントリが管理する領域の連続クラスタ数(count)が格納される。例えば拡張FATエントリが100クラスタからなる連続領域を管理する場合、countには“0x0064(100)”が格納される。   The subsequent 2 bytes store the number of consecutive clusters (count) of the area managed by this entry. For example, when an extended FAT entry manages a continuous area consisting of 100 clusters, “0x0064 (100)” is stored in the count.

また、最後の2バイトには、本エントリが管理する領域の次に存在する領域の開始クラスタ番号を示す次リンク先クラスタ番号(next)が格納される。例えば拡張FATエントリで管理される連続領域の次に存在する領域の開始クラスタ番号が1000であった場合、nextには“0x03E8(1000)”が格納される。   The last two bytes store the next link destination cluster number (next) indicating the start cluster number of the area existing next to the area managed by this entry. For example, if the start cluster number of the area existing next to the continuous area managed by the extended FAT entry is 1000, “0x03E8 (1000)” is stored in next.

このように、従来1FATエントリあたり1クラスタの情報を管理していたのに対して、拡張FATエントリでは1つあたり1連続領域の情報を管理することが可能となる。そのため、連続領域の大きさが大きければ大きい程少量の情報量で大きな連続領域を管理することが可能となり、シーク処理時に参照するFATエントリの数を削減して処理を高速化することが可能となる。   As described above, information of one cluster is conventionally managed per one FAT entry, whereas information of one continuous area can be managed per one in the extended FAT entry. Therefore, the larger the size of the continuous area, the larger the continuous area can be managed with a small amount of information, and the number of FAT entries referred to at the time of seek processing can be reduced to speed up the processing. Become.

続いて本発明の特徴を明確にするために、従来のFATファイルシステムにおける処理手順と、本発明の拡張FAT処理部における処理手順とを比較して説明する。   Next, in order to clarify the features of the present invention, the processing procedure in the conventional FAT file system and the processing procedure in the extended FAT processing unit of the present invention will be compared and described.

まず始めに、図7を用いて従来のFATファイルシステムにおけるファイルデータ書き込み処理手順について説明する。
(S701)対象ファイルのディレクトリエントリ208を読み出す。
(S702)読み出したディレクトリエントリ208に格納された開始クラスタ番号を取得し、ファイルデータの先頭位置を確認する。
(S703)FAT(205、206)をアクセスモジュールのRAM上に読み出し、S702で取得したファイルデータの先頭位置から順にRAM上のFAT(205、206)内でリンクを辿り、書き込み位置のクラスタ番号を取得する。ここでリンクを辿る処理は、ファイル内の任意の位置にシークする場合の処理とほぼ同じであり、詳細については後述する。
(S704)ファイルデータ書き込みに際し、ファイルに新たに空き領域を割り当てる必要があるか判定する。空き領域の割り当てが必要な場合S705の処理に進む。空き領域の割り当てが不要な場合S708の処理に進む。
(S705)RAM上のFAT(205、206)内で空き領域を検索し、1クラスタの空き領域を取得する。具体的にはRAM上のFAT(205、206)内のFATエントリを順次参照し、値が0x0000に設定されているFATエントリを見つけ、該FATエントリの対応クラスタ番号の値を求める。FATエントリの検索処理は例えばFAT(205、206)の先頭から終端まで順に処理を実施しても良いし、前回空き領域を割り当てたFATエントリの次のFATエントリから処理を開始してFAT(205、206)の終端まで到達したらFAT(205、206)の先頭に折り返し、前回空き領域を割り当てたFATエントリまで処理を実施しても良い。このようにFATエントリの検索処理手順はFAT(205、206)領域の全面に対して空き領域を検索する処理を実現できるものであれば良く、特に限定はされない。
(S706)S705で取得した空きクラスタの番号に対応するFATエントリの値を、使用済みを意味する0xFFFFにRAM上で設定する。
(S707)現在のリンク終端のクラスタ番号に対応するFATエントリの値を0xFFFFからS705で取得した空きクラスタの番号にRAM上で設定する。空き領域を取得する必要がある場合は、ファイル終端への追記を意味し、その場合S703でのリンクを辿る処理においてファイル終端までリンクが辿られている。そのため、現在のリンク終端のクラスタ番号に対応するFATエントリの値はリンク終端を意味する0xFFFFが設定されている。そのため、S707の処理により、S705で新たに取得した空きクラスタへリンクを接続することによりファイルのリンクが1クラスタ分長くなり、ファイルデータを追記することが可能となる。
(S708)現在参照している書き込み位置のクラスタ内にファイルデータを書き込む。S704で空き領域取得が必要と判断した場合は、現在参照している書き込み位置はS705で取得した空きクラスタとなる。またS704で空き領域取得が不要と判断した場合は、現在参照している書き込み位置はS703でリンクを辿った結果到達したクラスタとなる。
(S709)全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合S704の処理に戻る。全ファイルデータの書き込みが完了した場合S710の処理に進む。
(S710)ディレクトリエントリ208内に格納されたファイルサイズや最終更新日時等の情報を更新し、情報記録モジュールの不揮発性メモリ内に格納されたディレクトリエントリ208を上書きする。
(S711)情報記録モジュールの不揮発性メモリ内に格納されたFAT(205、206)に、アクセスモジュールのRAM上のFAT(205、206)のデータを上書きし、処理を完了する。
First, the file data write processing procedure in the conventional FAT file system will be described with reference to FIG.
(S701) The directory entry 208 of the target file is read.
(S702) The starting cluster number stored in the read directory entry 208 is acquired, and the head position of the file data is confirmed.
(S703) The FAT (205, 206) is read onto the RAM of the access module, the link is traced in the FAT (205, 206) on the RAM in order from the head position of the file data acquired at S702, and the cluster number of the write position is determined. get. The process of following the link here is almost the same as the process of seeking to an arbitrary position in the file, and details will be described later.
(S704) At the time of writing file data, it is determined whether it is necessary to newly allocate a free area to the file. If a free area needs to be allocated, the process proceeds to S705. If it is not necessary to allocate a free area, the process proceeds to S708.
(S705) A free area is searched in the FAT (205, 206) on the RAM, and a free area of one cluster is acquired. Specifically, the FAT entries in the FAT (205, 206) on the RAM are sequentially referred to, a FAT entry whose value is set to 0x0000 is found, and the value of the corresponding cluster number of the FAT entry is obtained. For example, the FAT entry search process may be performed sequentially from the beginning to the end of the FAT (205, 206), or the process is started from the FAT entry next to the FAT entry to which the previous free space is allocated. , 206) may be returned to the beginning of the FAT (205, 206), and the process may be executed up to the FAT entry to which the previous free area is allocated. As described above, the FAT entry search processing procedure is not particularly limited as long as it can realize a process of searching for a free area in the entire FAT (205, 206) area.
(S706) The value of the FAT entry corresponding to the empty cluster number acquired in S705 is set on the RAM to 0xFFFF meaning used.
(S707) The value of the FAT entry corresponding to the cluster number at the current link end is set on the RAM from 0xFFFF to the free cluster number acquired in S705. When it is necessary to acquire a free area, this means appending to the end of the file. In this case, the link is traced to the end of the file in the process of tracing the link in S703. Therefore, the value of the FAT entry corresponding to the current cluster number of the link end is set to 0xFFFF meaning the link end. Therefore, by connecting the link to the free cluster newly acquired in S705 by the processing in S707, the file link becomes longer by one cluster, and it becomes possible to add file data.
(S708) The file data is written into the cluster at the currently referenced write position. If it is determined in S704 that the free area needs to be acquired, the currently referred writing position is the free cluster acquired in S705. If it is determined in S704 that it is not necessary to acquire a free area, the currently referenced write position is a cluster that has arrived as a result of following the link in S703.
(S709) It is determined whether writing of all file data is completed. If file data still remains, the process returns to S704. When writing of all file data is completed, the process proceeds to S710.
(S710) Information such as the file size and the last update date and time stored in the directory entry 208 is updated, and the directory entry 208 stored in the nonvolatile memory of the information recording module is overwritten.
(S711) The FAT (205, 206) stored in the nonvolatile memory of the information recording module is overwritten with the data of the FAT (205, 206) on the RAM of the access module, and the processing is completed.

このファイルデータ書き込み処理により、図8に示された60000バイトのデータを持つFILE1.TXTに10000バイトのデータを追記した場合、図9に示されるような70000バイトのデータを持つファイルに変化する。すなわち、空きクラスタとしてクラスタ番号6のクラスタが取得されてファイルデータが追記され、従来のFAT(205、206)上のリンクにクラスタ番号6が接続される。その結果、FILE1.TXTのリンクは、クラスタ番号2〜5の4クラスタからなる状態から、クラスタ番号2〜6の5クラスタからなる状態に更新される。   By this file data writing process, FILE1. When 10,000 bytes of data are added to TXT, the file changes to a file having 70000 bytes of data as shown in FIG. That is, a cluster with cluster number 6 is acquired as an empty cluster, file data is added, and cluster number 6 is connected to a link on the conventional FAT (205, 206). As a result, FILE1. The TXT link is updated from a state of 4 clusters with cluster numbers 2 to 5 to a state of 5 clusters with cluster numbers 2 to 6.

次に、本発明の拡張FAT処理部104におけるファイルデータ書き込み処理手順について説明する。本発明のアクセスモジュール1は、ファイルシステム制御部102内に通常FAT処理部103と、拡張FAT処理部104を含んでいる。通常FAT処理部103は従来のFAT(205、206)にアクセスする処理部であり、ファイルデータ書き込み時には図7で説明した従来の処理手順と同様の手順を実施する。また、拡張FAT処理部104は、本発明の特徴である拡張FAT(301、302)を解釈しアクセスする処理部である。また、通常FAT処理部103、拡張FAT処理部104のいずれの処理部を用いるかに関する判定は、例えばパーティションブートセクタ内に拡張FATの有無を示すフラグを設けてそれを参照することにより判定する等の方法により実現する。以下、図10を用いて本発明の拡張FAT処理部104におけるファイルデータ書き込み処理手順について説明する。   Next, a file data write processing procedure in the extended FAT processing unit 104 of the present invention will be described. The access module 1 of the present invention includes a normal FAT processing unit 103 and an extended FAT processing unit 104 in the file system control unit 102. The normal FAT processing unit 103 is a processing unit that accesses the conventional FAT (205, 206), and executes the same procedure as the conventional processing procedure described with reference to FIG. 7 when writing file data. The extended FAT processing unit 104 is a processing unit that interprets and accesses the extended FAT (301, 302) that is a feature of the present invention. In addition, the determination as to which of the normal FAT processing unit 103 and the extended FAT processing unit 104 is used is made by, for example, providing a flag indicating the presence or absence of the extended FAT in the partition boot sector and referring to it. This method is realized. The file data write processing procedure in the extended FAT processing unit 104 of the present invention will be described below using FIG.

(S1001)対象ファイルのディレクトリエントリ208を読み出す。
(S1002)読み出したディレクトリエントリ208に格納された開始クラスタ番号を取得し、ファイルデータの先頭位置を確認する。
(S1003)拡張FAT(301、302)をアクセスモジュール1のRAM12上に読み出し、S1002で取得したファイルデータの先頭位置から順にRAM12上の拡張FAT(301、302)内でリンクを辿り、書き込み位置のクラスタ番号を取得する。ここでリンクを辿る処理は、ファイル内の任意の位置にシークする場合の処理とほぼ同じであり、詳細については後述する。
(S1004)ファイルデータ書き込みに際し、ファイルに新たに空き領域を割り当てる必要があるか判定する。空き領域の割り当てが必要な場合S1005の処理に進む。空き領域の割り当てが不要な場合S1011の処理に進む。
(S1005)RAM12上の拡張FAT(301、302)内で空き領域を検索し、1クラスタの空き領域を取得する。具体的にはRAM12上の拡張FAT(301、302)内の通常FATエントリ、拡張FATエントリを順次参照し、値が0x0000に設定されている通常FATエントリを見つけ、該通常FATエントリの対応クラスタ番号の値を求める。このFATエントリの検索処理手順については図7で説明した通り、特に限定されるものではない。また、拡張FATエントリを見つけた場合は、既に領域が割り当てられていることが判明しているため、拡張FATエントリのcountに設定されているクラスタ数分の通常FATエントリをスキップして検索処理を継続する。
(S1006)S1005で取得した空きクラスタが拡張FATエントリで管理可能か判定する。管理できると判定した場合はS1009の処理に進む。管理できないと判定した場合はS1007の処理に進む。拡張FATエントリで管理可能な場合とは、次の2つの条件を共に満たした場合である。
<条件1>S1005で取得した空きクラスタは、現在のリンク終端のクラスタの直後のクラスタである。
<条件2>現在のリンク終端のクラスタが既に拡張FATエントリで管理されている、あるいは通常FATエントリで管理されている場合にS1005で取得した空きクラスタを含む連続領域が3クラスタ以上存在する。
上記条件を満たした場合、S1005で取得した空きクラスタは一連の連続領域の終端に位置し、且つ3クラスタ以上の大きさを持つ連続領域であることから、通常FATエントリの3クラスタ分のエントリ情報から構成される拡張FATエントリで管理できることになる。
(S1007)S1006において拡張FATエントリで管理できないと判定した場合、S1005で取得した空きクラスタの番号に対応する通常FATエントリの値を、使用済みを意味する0xFFFFにRAM12上で設定する。
(S1008)現在のリンク終端のクラスタ番号に対応するFATエントリの値を0xFFFFからS1005で取得した空きクラスタの番号にRAM12上で設定する。現在のリンク終端が通常FATエントリで管理されている場合には、通常FATエントリに直接空きクラスタ番号の値を設定する。また拡張FATエントリで管理されている場合には、拡張FATエントリのnextに空きクラスタ番号の値を設定する。
(S1009)S1006において拡張FATエントリで管理できると判定した場合、拡張FATエントリの情報をRAM12上で更新する。具体的には現在のリンク終端が既に拡張FATエントリで管理されている場合は、拡張FATエントリ内のcountの値を1加算する。また、現在のリンク終端が通常FATエントリで管理されている場合は、S1005で取得した空きクラスタを含む連続領域の先頭を見つけ、その先頭クラスタに対応する通常FATエントリの位置に拡張FATエントリのext_sigとして0xFFFEを設定し、更に拡張FATエントリのcountに連続クラスタ数を、nextにリンク終端を意味する0xFFFFを設定する。
(S1010)S1005で取得した空きクラスタの番号に対応する通常FATエントリの値を、使用済みを意味する0xFFFFにRAM12上で設定する。但し、S1009の処理において通常FATエントリの管理から拡張FATエントリの管理へ切り替えた場合、既に正しいnextの値が該当領域に設定されているため、S1010の処理は不要となる。
(S1011)現在参照している書き込み位置のクラスタ内にファイルデータを書き込む。S1004で空き領域取得が必要と判断した場合は、現在参照している書き込み位置はS1005で取得した空きクラスタとなる。またS1004で空き領域取得が不要と判断した場合は、現在参照している書き込み位置はS1003でリンクを辿った結果到達したクラスタとなる。
(S1012)全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合S1004の処理に戻る。全ファイルデータの書き込みが完了した場合S1013の処理に進む。
(S1013)ディレクトリエントリ208内に格納されたファイルサイズや最終更新日時等の情報を更新し、情報記録モジュール2の不揮発性メモリ25内に格納されたディレクトリエントリ208を上書きする。
(S1014)情報記録モジュール2の不揮発性メモリ25内に格納された拡張FAT(301、302)に、アクセスモジュール1のRAM12上の拡張FAT(301、302)のデータを上書きし、処理を完了する。
(S1001) The directory entry 208 of the target file is read.
(S1002) The start cluster number stored in the read directory entry 208 is acquired, and the head position of the file data is confirmed.
(S1003) The extended FAT (301, 302) is read onto the RAM 12 of the access module 1, and the link is traced in the extended FAT (301, 302) on the RAM 12 in order from the start position of the file data acquired in S1002, and the write position Get the cluster number. The process of following the link here is almost the same as the process of seeking to an arbitrary position in the file, and details will be described later.
(S1004) When writing file data, it is determined whether it is necessary to newly allocate a free area to the file. If it is necessary to allocate a free area, the process proceeds to S1005. If it is not necessary to allocate a free area, the process proceeds to S1011.
(S1005) A free area is searched in the extended FAT (301, 302) on the RAM 12, and a free area of one cluster is acquired. Specifically, the normal FAT entry and the extended FAT entry in the extended FAT (301, 302) on the RAM 12 are sequentially referenced to find the normal FAT entry whose value is set to 0x0000, and the corresponding cluster number of the normal FAT entry Find the value of. The FAT entry search processing procedure is not particularly limited as described with reference to FIG. If an extended FAT entry is found, it is known that an area has already been allocated. Therefore, the normal FAT entries for the number of clusters set in the count of the extended FAT entry are skipped and the search process is performed. continue.
(S1006) It is determined whether the free cluster acquired in S1005 can be managed by the extended FAT entry. If it is determined that management is possible, the process proceeds to S1009. If it is determined that management is not possible, the process proceeds to S1007. The case where management is possible with the extended FAT entry is a case where both of the following two conditions are satisfied.
<Condition 1> The empty cluster acquired in S1005 is a cluster immediately after the cluster at the current link end.
<Condition 2> When the cluster at the current link end is already managed by the extended FAT entry or is managed by the normal FAT entry, there are three or more continuous areas including the free cluster acquired in S1005.
If the above condition is satisfied, the free cluster acquired in S1005 is located at the end of a series of continuous areas and is a continuous area having a size of 3 clusters or more, so entry information for 3 clusters of normal FAT entries. It can be managed by an extended FAT entry composed of
(S1007) When it is determined in S1006 that the extended FAT entry cannot be managed, the value of the normal FAT entry corresponding to the free cluster number acquired in S1005 is set on the RAM 12 to 0xFFFF meaning used.
(S1008) The value of the FAT entry corresponding to the cluster number of the current link end is set on the RAM 12 from 0xFFFF to the free cluster number acquired in S1005. When the current link termination is managed by a normal FAT entry, the value of the free cluster number is set directly in the normal FAT entry. If the extended FAT entry is used for management, the value of the free cluster number is set in the next of the extended FAT entry.
(S1009) When it is determined in S1006 that the extended FAT entry can be managed, the information of the extended FAT entry is updated on the RAM 12. Specifically, when the current link termination is already managed by the extended FAT entry, 1 is added to the value of count in the extended FAT entry. If the current link termination is managed by a normal FAT entry, the head of the continuous area including the free cluster acquired in S1005 is found, and the ext_sig of the extended FAT entry is located at the position of the normal FAT entry corresponding to the head cluster. 0xFFFE is set, and the number of continuous clusters is set in the count of the extended FAT entry, and 0xFFFF which means the link end is set in next.
(S1010) The value of the normal FAT entry corresponding to the free cluster number acquired in S1005 is set on the RAM 12 to 0xFFFF meaning used. However, when the normal FAT entry management is switched to the extended FAT entry management in the processing of S1009, the correct next value is already set in the corresponding area, and thus the processing of S1010 is unnecessary.
(S1011) The file data is written into the cluster at the writing position currently referred to. If it is determined in S1004 that a free area needs to be acquired, the currently referred writing position is the free cluster acquired in S1005. If it is determined in S1004 that it is not necessary to acquire a free area, the currently referenced write position is a cluster that has arrived as a result of following the link in S1003.
(S1012) It is determined whether writing of all file data has been completed. If file data still remains, the process returns to S1004. When writing of all file data is completed, the process proceeds to S1013.
(S1013) Information such as the file size and the last update date and time stored in the directory entry 208 is updated, and the directory entry 208 stored in the nonvolatile memory 25 of the information recording module 2 is overwritten.
(S1014) The extended FAT (301, 302) stored in the nonvolatile memory 25 of the information recording module 2 is overwritten with the data of the extended FAT (301, 302) on the RAM 12 of the access module 1, and the processing is completed. .

このように本発明のファイルデータ書き込み処理手順が従来のファイルデータ書き込み処理手順と異なる主な点は、S1006、S1009、S1010で説明した処理が追加されている点である。本発明の拡張FAT制御部104は、通常FATエントリと拡張FATエントリの両方を扱い、連続領域として管理できるか否かで両FATエントリを使い分けている。この拡張FATエントリを扱う点が従来のファイルデータ書き込み処理手順とは大きく異なる点であり、この拡張FATエントリによりシーク処理を高速化することが可能となる。   As described above, the main difference between the file data write processing procedure of the present invention and the conventional file data write processing procedure is that the processes described in S1006, S1009, and S1010 are added. The extended FAT control unit 104 of the present invention handles both normal FAT entries and extended FAT entries, and uses both FAT entries depending on whether they can be managed as a continuous area. The handling of this extended FAT entry is very different from the conventional file data write processing procedure, and the seek processing can be speeded up by this extended FAT entry.

次に、シーク処理手順を比較するため、まずは図11を用いて従来のFATファイルシステムにおけるシーク処理手順について説明する。
(S1101)シークで実際に移動するサイズを元にシーククラスタ数(SEEK_NUM)を算出する。シーククラスタ数はシーク処理でリンクを追いかける必要があるクラスタ数を意味し、例えばファイル先頭から10クラスタ分のシークを実施する場合はSEEK_NUMには“10”が設定される。またファイル内の現在参照位置よりも前方にシークする場合は、シーク実施後におけるファイル先頭からのオフセットを算出し、クラスタ数に換算することでSEEK_NUMを算出する。例えば、ファイル先頭から10クラスタ目の位置に現在参照位置が存在する場合においてファイル前方に2クラスタシークする場合、ファイル先頭から8クラスタ目の位置がシーク実施後のオフセットとなるため、SEEK_NUMには“8”が設定される。
(S1102)現在参照クラスタ番号を確認する。ファイル先頭からのシークであれば現在参照クラスタ番号はファイル先頭のクラスタ番号となる。また既にシーク処理やリード・ライト処理などでファイルの任意の位置に現在参照位置が移動している場合は、その位置のクラスタ番号が現在参照クラスタ番号となる。
(S1103)アクセスモジュールのRAM上に読み出されたFAT(205、206)を参照し、現在参照クラスタ番号に対応するFATエントリの値を取得する。
(S1104)S1103で取得したFATエントリ値(次リンク先クラスタ番号)を新しい現在参照クラスタ番号として管理する。
(S1105)1クラスタ分のシーク処理が完了したため、SEEK_NUMを1減算する。
(S1106)SEEK_NUMの値が0以外の場合、S1102に戻り、処理を継続する。また、SEEK_NUMの値が0の場合、全てのシーク処理が完了したため、処理を終了する。
Next, in order to compare the seek processing procedure, first, the seek processing procedure in the conventional FAT file system will be described with reference to FIG.
(S1101) The number of seek clusters (SEEK_NUM) is calculated based on the size that is actually moved by seek. The number of seek clusters means the number of clusters that need to follow the link in the seek process. For example, when seeking for 10 clusters from the beginning of the file is performed, “10” is set in SEEK_NUM. When seeking ahead of the current reference position in the file, SEEK_NUM is calculated by calculating the offset from the beginning of the file after the seek operation and converting it to the number of clusters. For example, when the current reference position is present at the 10th cluster position from the beginning of the file and the 2nd cluster seek is performed in front of the file, the position of the 8th cluster from the beginning of the file is the offset after the seek operation, so SEEK_NUM contains “ 8 "is set.
(S1102) The current reference cluster number is confirmed. If seeking from the beginning of the file, the current reference cluster number is the cluster number at the beginning of the file. If the current reference position has already been moved to an arbitrary position in the file by seek processing or read / write processing, the cluster number at that position becomes the current reference cluster number.
(S1103) The FAT (205, 206) read out on the RAM of the access module is referred to, and the value of the FAT entry corresponding to the current reference cluster number is acquired.
(S1104) The FAT entry value (next link destination cluster number) acquired in S1103 is managed as a new current reference cluster number.
(S1105) Since seek processing for one cluster is completed, 1 is subtracted from SEEK_NUM.
(S1106) If the value of SEEK_NUM is other than 0, the process returns to S1102, and the process is continued. When the value of SEEK_NUM is 0, all seek processes are completed, and the process ends.

すなわち、従来のFATファイルシステムにおけるシーク処理では1FATエントリ毎にFAT(205、206)を参照し、次のリンク先のクラスタ番号を取得するという処理をシーククラスタ数分だけループして処理を繰り返すことになる。そのため、シーククラスタ数が大きい場合、ループ回数が膨大になりシーク処理に長時間かかることになる。   That is, in the seek process in the conventional FAT file system, the process of referring to the FAT (205, 206) for each FAT entry and obtaining the cluster number of the next link destination is repeated by repeating the process for the number of seek clusters. become. Therefore, when the number of seek clusters is large, the number of loops becomes enormous and the seek process takes a long time.

次に、図12を用いて本発明の拡張FAT処理部104におけるシーク処理手順について説明する。
(S1201)シークで実際に移動するサイズを元にシーククラスタ数(SEEK_NUM)を算出する。シーククラスタ数の算出方法は図11で説明したものと同じである。
(S1202)現在参照クラスタ番号を確認する。ファイル先頭からのシークであれば現在参照クラスタ番号はファイル先頭のクラスタ番号となる。また既にシーク処理やリード・ライト処理などでファイルの任意の位置に現在参照位置が移動している場合は、その位置のクラスタ番号が現在参照クラスタ番号となる。
(S1203)アクセスモジュール1のRAM12上に読み出された拡張FAT(301、302)を参照し、現在参照クラスタ番号に対応するFATエントリの値を取得する。但し、既にシーク処理等が実施された後で、現在参照クラスタ番号が拡張FATエントリの管理する連続領域内のいずれかの領域に存在することが判明している場合、改めて拡張FAT(301、302)を参照することなく、次の処理に進む。この場合、前回の
シーク処理等が実施された時点で、現在参照クラスタ番号が含まれる連続領域を示す拡張FATエントリに関する情報がアクセスモジュール1のRAM12上に保持されているものとする。
(S1204)S1203で取得したFATエントリが拡張FATエントリであるか確認する。拡張FATエントリである場合はS1205の処理に進み、拡張FATエントリでない場合はS1209の処理に進む。
(S1205)S1204の判定処理において拡張FATエントリであると判定した場合、シーク先がS1203で取得した拡張FATエントリが示す連続領域内に存在するか判定する。連続領域内に存在する場合はS1206の処理に進み、連続領域内に存在しない場合はS1207の処理に進む。
(S1206)S1205の判定処理においてシーク先が連続領域内に存在すると判定した場合、現在参照クラスタ番号をシーク位置まで更新し、処理を終了する。例えば、拡張FATエントリがクラスタ番号10から20までの10クラスタの連続領域を示しており、現在参照クラスタ番号が10、SEEK_NUMが5であった場合を想定する。この場合、拡張FATエントリが示す連続領域内にシーク先が存在するため、現在参照クラスタ番号の10にSEEK_NUMの5を加算し、現在参照クラスタ番号を15に更新して処理を終了する。
(S1207)S1205の判定処理においてシーク先が連続領域内に存在しないと判定した場合、現在参照クラスタ番号を拡張FATエントリの次リンク先クラスタ番号(next)の値に更新する。例えば、拡張FATエントリがクラスタ番号10から20までの10クラスタの連続領域を示し、nextには30が設定されており、現在参照クラスタ番号が10、SEEK_NUMが15であった場合を想定する。この場合、拡張FATエントリが示す連続領域内にはシーク先が存在しないため、現在参照クラスタ番号の10を拡張FATエントリのnextに設定されている値である30に更新する。
(S1208)SEEK_NUMから拡張FATエントリの連続クラスタ数分減算し、S1211の処理に進む。例えば、拡張FATエントリがクラスタ番号10から20までの10クラスタの連続領域を示しており、現在参照クラスタ番号が10、SEEK_NUMが15であった場合を想定する。この場合、SEEK_NUMから連続領域のクラスタ数10を差し引き、SEEK_NUMを5に設定する。但し、現在参照クラスタ番号が連続領域の先頭を示していない場合は、現在参照位置から連続領域終端までのクラスタ数分をSEEK_NUMから減算する。
(S1209)S1204の判定処理において拡張FATエントリではないと判定した場合、S1203で取得したFATエントリ値(次リンク先クラスタ番号)を新しい現在参照クラスタ番号として管理する。
(S1210)1クラスタ分のシーク処理が完了したため、SEEK_NUMを1減算する。
(S1211)SEEK_NUMの値が0以外の場合、S1202に戻り、処理を継続する。また、SEEK_NUMの値が0の場合、全てのシーク処理が完了したため、処理を終了する。
Next, a seek process procedure in the extended FAT processing unit 104 of the present invention will be described with reference to FIG.
(S1201) The number of seek clusters (SEEK_NUM) is calculated based on the size that is actually moved by seek. The method for calculating the number of seek clusters is the same as that described with reference to FIG.
(S1202) The current reference cluster number is confirmed. If seeking from the beginning of the file, the current reference cluster number is the cluster number at the beginning of the file. If the current reference position has already been moved to an arbitrary position in the file by seek processing or read / write processing, the cluster number at that position becomes the current reference cluster number.
(S1203) With reference to the extended FAT (301, 302) read out on the RAM 12 of the access module 1, the value of the FAT entry corresponding to the current reference cluster number is acquired. However, if it is already known that the reference cluster number is present in any one of the continuous areas managed by the extended FAT entry after the seek process or the like has already been performed, the extended FAT (301, 302) is newly determined. ) Without proceeding to the next process. In this case, it is assumed that information on the extended FAT entry indicating the continuous area including the current reference cluster number is held in the RAM 12 of the access module 1 when the previous seek process or the like is performed.
(S1204) It is confirmed whether the FAT entry acquired in S1203 is an extended FAT entry. If it is an extended FAT entry, the process proceeds to S1205. If it is not an extended FAT entry, the process proceeds to S1209.
(S1205) When it is determined in the determination process of S1204 that the entry is an extended FAT entry, it is determined whether the seek destination exists within the continuous area indicated by the extended FAT entry acquired in S1203. If it exists in the continuous area, the process proceeds to S1206. If it does not exist in the continuous area, the process proceeds to S1207.
(S1206) If it is determined in S1205 that the seek destination exists in the continuous area, the current reference cluster number is updated to the seek position, and the process ends. For example, it is assumed that the extended FAT entry indicates a continuous area of 10 clusters with cluster numbers 10 to 20, the current reference cluster number is 10, and SEEK_NUM is 5. In this case, since the seek destination exists in the continuous area indicated by the extended FAT entry, 5 of SEEK_NUM is added to 10 of the current reference cluster number, the current reference cluster number is updated to 15, and the process is terminated.
(S1207) When it is determined in S1205 that the seek destination does not exist in the continuous area, the current reference cluster number is updated to the value of the next link destination cluster number (next) of the extended FAT entry. For example, it is assumed that the extended FAT entry indicates a continuous area of 10 clusters with cluster numbers 10 to 20, the next is set to 30, the current reference cluster number is 10, and SEEK_NUM is 15. In this case, since there is no seek destination in the continuous area indicated by the extended FAT entry, the current reference cluster number 10 is updated to 30 which is the value set in the next of the extended FAT entry.
(S1208) Subtract the number of continuous clusters of the extended FAT entry from SEEK_NUM, and proceed to the processing of S1211. For example, it is assumed that the extended FAT entry indicates a continuous area of 10 clusters with cluster numbers 10 to 20, the current reference cluster number is 10, and SEEK_NUM is 15. In this case, the number of continuous area clusters of 10 is subtracted from SEEK_NUM, and SEEK_NUM is set to 5. However, if the current reference cluster number does not indicate the beginning of the continuous area, the number of clusters from the current reference position to the end of the continuous area is subtracted from SEEK_NUM.
(S1209) When it is determined in the determination processing in S1204 that the entry is not an extended FAT entry, the FAT entry value (next link destination cluster number) acquired in S1203 is managed as a new current reference cluster number.
(S1210) Since seek processing for one cluster is completed, 1 is subtracted from SEEK_NUM.
(S1211) When the value of SEEK_NUM is other than 0, the process returns to S1202 and the process is continued. When the value of SEEK_NUM is 0, all seek processes are completed, and the process ends.

このように従来のFATファイルシステムにおけるシーク処理と本発明の拡張FAT処理部におけるシーク処理の主な違いは、S1204からS1208で説明した処理が追加されている点である。この処理により、連続領域が拡張FATエントリでまとめて管理されている場合、連続領域分をまとめてシークすることが可能となる。具体的には、従来はS1105でSEEK_NUMを1しか減算することが出来なかったのに対し、本発明の方式ではS1208でSEEK_NUMを連続領域分まとめて減算することができるため、ループ処理の回数を削減することができ、シーク処理を高速化することが可能となる。   Thus, the main difference between the seek process in the conventional FAT file system and the seek process in the extended FAT processing unit of the present invention is that the processes described in S1204 to S1208 are added. With this processing, when continuous areas are managed together with the extended FAT entry, it is possible to seek the continuous areas together. Specifically, in the prior art, only 1 SEEK_NUM could be subtracted in S1105, but in the method of the present invention, SEEK_NUM can be subtracted collectively for consecutive areas in S1208. This can be reduced, and the seek process can be speeded up.

更に、この効果を図13、図14の例を用いて説明する。図13は従来のFAT(205、206)においてFILE2.TXTのファイルを管理した場合の一例を示す図である。同様に図14は本発明の拡張FAT(301、302)において同じファイルを管理した場合の一例を示す図である。これら2つの図で管理しているファイルのサイズや、ファイルデータ格納領域の配置等は同じにしており、ファイルデータがクラスタ番号2〜15までと、クラスタ番号24から30までの2つの連続領域に格納されている例を示している。   Further, this effect will be described with reference to the examples of FIGS. FIG. 13 shows the FILE2. It is a figure which shows an example at the time of managing the file of TXT. Similarly, FIG. 14 is a diagram showing an example when the same file is managed in the extended FAT (301, 302) of the present invention. The file size managed in these two figures, the arrangement of the file data storage area, etc. are the same, and the file data is divided into two continuous areas with cluster numbers 2 to 15 and cluster numbers 24 to 30. A stored example is shown.

従来のシーク処理手順ではファイルデータが連続領域に格納されているかどうかに依らず常にシーククラスタ数のFAT(205、206)参照を伴うループ処理が発生する。図13の例でファイル先頭から終端までシークする場合、SEEK_NUMは20となり、ループ回数も20となる。   In the conventional seek processing procedure, loop processing always involves referring to FAT (205, 206) of the number of seek clusters regardless of whether the file data is stored in the continuous area. In the example of FIG. 13, when seeking from the beginning to the end of the file, SEEK_NUM is 20, and the number of loops is 20.

一方、本発明の拡張FAT処理部104のシーク処理手順では、ファイルデータが連続領域に格納されている場合にはまとめてシーク処理を実施するため、拡張FAT(301、302)の参照を伴うループ処理回数を削減することが可能となる。図14の例でファイル先頭から終端までシークする場合、SEEK_NUMは20となるが、FILE2.TXTは2つの連続領域から構成されているため、ループ回数は2となる。   On the other hand, in the seek processing procedure of the extended FAT processing unit 104 of the present invention, when file data is stored in a continuous area, a seek process is collectively performed, and therefore a loop involving reference to the extended FAT (301, 302). It is possible to reduce the number of processing times. In the example of FIG. 14, when seeking from the beginning to the end of the file, SEEK_NUM is 20, but FILE2. Since TXT is composed of two continuous regions, the number of loops is two.

このループ回数の差がシーク処理時間に大きく影響するため、本発明の拡張FAT処理部104の処理によりシーク処理が高速化されることになる。また、本実施の形態の例ではアクセスモジュール1のRAM12にFAT(205、206)あるいは拡張FAT(301、302)が全て読み出されている場合の例について説明したが、アクセスモジュール1のRAM12容量が小さい場合はFAT(205、206)あるいは拡張FAT(301、302)の一部しかRAM12上に読み出すことができず、キャッシュのように逐次読み替えながら動作する必要がある。この場合、最悪ではループ1回分の処理毎にFATの読み替え処理が発生し、ループ回数の差による処理時間の違いが顕著になるため、本発明の高速化の効果がより顕著に現れることになる。   Since the difference in the number of loops greatly affects the seek processing time, the seek processing is speeded up by the processing of the extended FAT processing unit 104 of the present invention. In the example of the present embodiment, an example in which the FAT (205, 206) or the extended FAT (301, 302) is all read into the RAM 12 of the access module 1 has been described. Is small, only a part of the FAT (205, 206) or the extended FAT (301, 302) can be read onto the RAM 12, and it is necessary to operate while sequentially reading like a cache. In this case, in the worst case, a FAT replacement process occurs every time one loop is processed, and the difference in processing time due to the difference in the number of loops becomes significant, so that the speed-up effect of the present invention becomes more prominent. .

以上のように、本発明の情報記録モジュール2の不揮発性メモリ25はファイルシステムで管理されており、領域管理情報として拡張FAT(301、302)を持つ。また本発明のアクセスモジュール1は、拡張FAT(301、302)を参照し、その中に格納された通常FATエントリと拡張FATエントリの両方のエントリを使い分けて領域管理を行う拡張FAT処理部104を含む。この拡張FAT処理部104における領域管理では、ファイルデータが連続領域に格納されている場合は拡張FATエントリを使用し、少量の情報で連続領域をまとめて管理する。これにより、シーク時の処理時間を短縮し、シーク処理を高速化することが可能となる。   As described above, the nonvolatile memory 25 of the information recording module 2 of the present invention is managed by the file system, and has extended FAT (301, 302) as area management information. Further, the access module 1 of the present invention refers to the extended FAT (301, 302), and includes an extended FAT processing unit 104 that performs area management by using both the normal FAT entry and the extended FAT entry stored in the extended FAT (301, 302). Including. In the area management in the extended FAT processing unit 104, when file data is stored in a continuous area, an extended FAT entry is used, and the continuous area is managed together with a small amount of information. As a result, the processing time during seeking can be shortened, and the seek process can be speeded up.

更に本発明の拡張FAT(301、302)では領域管理情報を拡張FAT(301、302)で一元管理している。そのため、従来のジャンプテーブルによる高速化手法で必要となる起動時等におけるジャンプテーブルの算出時間が本発明では不要となり、起動時間を短縮することが可能となる。また、領域管理情報を一元管理することにより、ファイルの追記や部分削除等が発生した場合でも拡張FAT(301、302)の情報のみ更新すれば良いため、領域管理情報の整合性維持が容易に行える。   Furthermore, in the extended FAT (301, 302) of the present invention, the area management information is centrally managed by the extended FAT (301, 302). For this reason, the calculation time of the jump table at the time of startup or the like required by the conventional jump table speed-up method is not necessary in the present invention, and the startup time can be shortened. Further, by centrally managing the area management information, it is only necessary to update the information of the extended FAT (301, 302) even when file addition or partial deletion occurs, so it is easy to maintain consistency of the area management information Yes.

尚、本発明を上記の実施形態に基づいて説明してきたが、本発明は上記の実施形態に限定されないのは勿論である。本発明の趣旨を逸脱しない範囲で実施変更することができる。本発明の実施の形態で記載された数値は一例であり、他の値を使用しても良い。例えば、拡張FATエントリのext_sigに0xFFFEを設定する場合について説明したが、拡張FATエントリであることを判別することが出来れば良く、その他の方法を用いても良い。また、拡張FATエントリが管理する連続領域において、先頭のエントリ部分以外のFATエントリを使用済みであることを示す0xFFFFに設定する場合について説明した。この値についても特に限定するものではなく、その他の値を用いても良い。   Although the present invention has been described based on the above embodiment, it is needless to say that the present invention is not limited to the above embodiment. Various modifications can be made without departing from the spirit of the present invention. The numerical values described in the embodiments of the present invention are merely examples, and other values may be used. For example, although the case where 0xFFFE is set to ext_sig of the extended FAT entry has been described, it is only necessary to be able to determine that it is an extended FAT entry, and other methods may be used. Further, the case has been described in which the FAT entry other than the head entry portion is set to 0xFFFF indicating that it has been used in the continuous area managed by the extended FAT entry. This value is not particularly limited, and other values may be used.

また、拡張FATエントリがext_sig、count、nextの3つのフィールドから構成される場合について説明したが、従来のFATエントリ管理よりも少ない情報で連続領域を管理できるものであれば良く、その他の構成としても構わない。   In addition, the case where the extended FAT entry is composed of three fields of ext_sig, count, and next has been described. However, it is sufficient that the continuous area can be managed with less information than conventional FAT entry management. It doesn't matter.

また、FATエントリが2バイトで構成されるFAT16をベースにした例について説明したが、その他のFATファイルシステムに本発明を適用しても良い。すなわち、FAT12、FAT32などのFAT型ファイルシステムに適用しても良いし、FATファイルシステムとは互換性のないファイルシステムであっても、FATのように1つの処理単位の情報を1つのエントリに対応づけて領域管理する方式であれば本発明を適用することが可能である。   Further, although an example based on FAT16 in which a FAT entry is composed of 2 bytes has been described, the present invention may be applied to other FAT file systems. In other words, it may be applied to a FAT type file system such as FAT12 or FAT32, and even if the file system is not compatible with the FAT file system, information of one processing unit is stored in one entry as in the FAT. The present invention can be applied to any method that manages areas in association with each other.

本発明に関わる情報記録モジュール2の不揮発性メモリ25はファイルシステムで管理されており、領域管理情報として拡張FAT(301、302)を持つ。また本発明のアクセスモジュール1は、拡張FAT(301、302)を参照し、領域管理を行う拡張FAT処理部104を含む。これによりFATファイルシステムにおいて連続領域をまとめて管理することが可能となり、シーク処理を高速化することが可能となる。このようなアクセスモジュール1は、音楽や静止画、動画などのデジタルコンテンツを取り扱う機器、とりわけ1ファイルのサイズが大きなコンテンツを取り扱う機器に最適であり、PCアプリケーション、オーディオレコーダ、DVDレコーダ、HDDレコーダ、ムービー、デジタルスチルカメラ、携帯電話端末等として利用することができる。また、本発明の情報記録モジュール2は、上記デジタルコンテンツなどを格納するメモリカードなどのリムーバブルメディア、あるいは内蔵記録装置等として利用することができる。   The nonvolatile memory 25 of the information recording module 2 according to the present invention is managed by a file system, and has an extended FAT (301, 302) as area management information. The access module 1 of the present invention includes an extended FAT processing unit 104 that refers to the extended FAT (301, 302) and performs area management. As a result, continuous areas can be managed together in the FAT file system, and seek processing can be speeded up. Such an access module 1 is optimal for devices that handle digital content such as music, still images, and moving images, especially devices that handle content with a large file size, such as PC applications, audio recorders, DVD recorders, HDD recorders, It can be used as a movie, a digital still camera, a mobile phone terminal or the like. Further, the information recording module 2 of the present invention can be used as a removable medium such as a memory card for storing the digital content or the like, or a built-in recording device.

本発明の実施の形態におけるアクセスモジュール、及び情報記録モジュールの構成を示した説明図Explanatory drawing which showed the structure of the access module in embodiment of this invention, and an information recording module FATファイルシステムの構成を示した説明図Explanatory diagram showing the configuration of the FAT file system ディレクトリエントリの構成を示した説明図Explanatory diagram showing the structure of the directory entry FATの一例を示した説明図Explanatory drawing showing an example of FAT 本発明の実施の形態における拡張FATファイルシステムの構成を示した説明図Explanatory drawing which showed the structure of the extended FAT file system in embodiment of this invention 本発明の実施の形態における拡張FATエントリの構成を示した説明図Explanatory drawing which showed the structure of the extended FAT entry in embodiment of this invention 従来のFATファイルシステムにおけるファイルデータ書き込み処理を示したフローチャートA flowchart showing file data writing processing in a conventional FAT file system 従来のFATファイルシステムにおけるファイルデータ書き込み前の状態の一例を示した説明図Explanatory drawing which showed an example of the state before file data writing in the conventional FAT file system 従来のFATファイルシステムにおけるファイルデータ書き込み後の状態の一例を示した説明図Explanatory drawing which showed an example of the state after file data writing in the conventional FAT file system 本発明の実施の形態におけるファイルデータ書き込み処理を示したフローチャートThe flowchart which showed the file data writing process in embodiment of this invention 従来のFATファイルシステムにおけるシーク処理を示したフローチャートA flowchart showing a seek process in a conventional FAT file system 本発明の実施の形態におけるシーク処理を示したフローチャートThe flowchart which showed the seek process in embodiment of this invention 従来のFATファイルシステムにおけるファイルデータの配置状態の一例を示した説明図Explanatory drawing which showed an example of the arrangement state of the file data in the conventional FAT file system 本発明の実施の形態におけるファイルデータの配置状態の一例を示した説明図Explanatory drawing which showed an example of the arrangement | positioning state of the file data in embodiment of this invention

符号の説明Explanation of symbols

1 アクセスモジュール
2 情報記録モジュール
11,22 CPU
12,23 RAM
13 情報記録モジュールインタフェース
14,24 ROM
21 アクセスモジュールインタフェース
25 不揮発性メモリ
101 アプリケーション制御部
102 ファイルシステム制御部
103 通常FAT処理部
104 拡張FAT処理部
105 情報記録モジュールアクセス部
201 ファイルシステム管理情報領域
202 ユーザデータ領域
203 マスターブートレコード・パーティションテーブル
204 パーティションブートセクタ
205,206 FAT
207 ルートディレクトリエントリ
208 ディレクトリエントリ
301,302 拡張FAT
1 Access Module 2 Information Recording Module 11, 22 CPU
12,23 RAM
13 Information recording module interface 14, 24 ROM
21 Access module interface 25 Non-volatile memory 101 Application control unit 102 File system control unit 103 Normal FAT processing unit 104 Extended FAT processing unit 105 Information recording module access unit 201 File system management information area 202 User data area 203 Master boot record / partition table 204 Partition boot sector 205,206 FAT
207 Root directory entry 208 Directory entry 301,302 Extended FAT

Claims (14)

ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールにアクセスするアクセスモジュールであって、
前記不揮発性メモリ内の記録領域を固定長ブロック単位で管理すると共に、1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、
前記不揮発性メモリ内の複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報と、
を用いて、前記不揮発性メモリ内の記録領域の領域管理を行うファイルシステム制御部を具備することを特徴とするアクセスモジュール。
An access module for accessing an information recording module comprising a nonvolatile memory for storing file data,
Managing the recording area in the nonvolatile memory in units of fixed-length blocks, and first entry information including area management information relating to one fixed-length block;
Second entry information including management information of a continuous area composed of a plurality of the fixed-length blocks in the nonvolatile memory;
An access module comprising a file system control unit for managing a recording area in the nonvolatile memory using
前記第1のエントリ情報と、前記第2のエントリ情報とは、前記不揮発性メモリの記録領域内に存在する共通の領域管理情報テーブル内で管理され、
1つの前記固定長ブロックの領域管理は、前記第1のエントリ情報か、前記第2のエントリ情報のいずれか一方でのみ行われることを特徴とする請求項1記載のアクセスモジュール。
The first entry information and the second entry information are managed in a common area management information table existing in a recording area of the nonvolatile memory,
2. The access module according to claim 1, wherein the area management of one fixed-length block is performed only in one of the first entry information and the second entry information.
前記ファイルシステム制御部は、
前記第1のエントリ情報のみを用いて領域管理を行う通常FAT処理部と、
前記第1のエントリ情報と、前記第2のエントリ情報の両方を用いて領域管理を行う拡張FAT処理部と、
を具備することを特徴とする請求項2記載のアクセスモジュール。
The file system control unit
A normal FAT processing unit that performs area management using only the first entry information;
An extended FAT processing unit that performs area management using both the first entry information and the second entry information;
The access module according to claim 2, further comprising:
前記ファイルシステム制御部は、
前記不揮発性メモリ内の記録領域に存在するファイルシステム管理情報に格納された判定フラグを参照し、前記通常FAT処理部と、前記拡張FAT処理部のいずれを使用するかを決定することを特徴とする請求項3記載のアクセスモジュール。
The file system control unit
A determination flag stored in file system management information existing in a recording area in the non-volatile memory is referred to determine which of the normal FAT processing unit and the extended FAT processing unit to use. The access module according to claim 3.
前記第1のエントリ情報は、
対応する前記固定長ブロックに格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含むことを特徴とする請求項2記載のアクセスモジュール。
The first entry information is:
3. The access module according to claim 2, further comprising information indicating a position of the fixed-length block in which data subsequent to the data stored in the corresponding fixed-length block is stored.
前記第2のエントリ情報は、
前記第1のエントリ情報と前記第2のエントリ情報とを識別するための情報と、
前記第2のエントリ情報が管理する連続領域の大きさを示す情報と、
前記第2のエントリ情報が管理する連続領域に格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含むことを特徴とする請求項2記載のアクセスモジュール。
The second entry information is:
Information for identifying the first entry information and the second entry information;
Information indicating the size of the continuous area managed by the second entry information;
3. The access module according to claim 2, further comprising information indicating a position of the fixed-length block in which data subsequent to data stored in a continuous area managed by the second entry information is stored.
前記ファイルシステム制御部は、
ファイルデータを格納する領域が所定の個数以上の前記固定長ブロックから構成される領域である場合に、前記第2のエントリ情報を用いて領域を管理し、
ファイルデータを格納する領域が前記所定の個数未満の前記固定長ブロックから構成される領域である場合に、前記第1のエントリ情報を用いて領域を管理することを特徴とする請求項2記載のアクセスモジュール。
The file system control unit
When the area for storing file data is an area composed of a predetermined number or more of the fixed-length blocks, the area is managed using the second entry information,
3. The area is managed using the first entry information when an area for storing file data is an area composed of the fixed-length blocks less than the predetermined number. Access module.
前記ファイルシステム制御部は、
ファイル内の現在参照している前記固定長ブロックの位置である現在参照位置情報を保持しており、
前記現在参照位置情報をファイル内の任意の位置に変更するシーク処理を行う際において、現在参照位置が前記第1のエントリ情報により管理されている場合、1つの前記固定長ブロック分の大きさだけ現在参照位置を進め、現在参照位置が前記第2のエントリ情報により管理されている場合、該第2のエントリ情報により管理されている連続領域分の大きさだけ現在参照位置を進めることを特徴とする請求項2記載のアクセスモジュール。
The file system control unit
Holding the current reference position information, which is the position of the fixed-length block currently referenced in the file,
When performing a seek process for changing the current reference position information to an arbitrary position in the file, if the current reference position is managed by the first entry information, only the size of one fixed-length block is stored. The current reference position is advanced, and when the current reference position is managed by the second entry information, the current reference position is advanced by the size of the continuous area managed by the second entry information. The access module according to claim 2.
ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールであって、
前記不揮発性メモリは固定長ブロック単位で管理されており、
1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、
複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報と、
により構成された前記不揮発性メモリの領域管理情報が前記不揮発性メモリ内に格納されることを特徴とする情報記録モジュール。
An information recording module comprising a non-volatile memory for storing file data,
The nonvolatile memory is managed in units of fixed-length blocks,
First entry information including area management information relating to one fixed-length block;
Second entry information including management information of a continuous area composed of a plurality of the fixed-length blocks;
An information recording module, wherein area management information of the non-volatile memory configured as described above is stored in the non-volatile memory.
前記第1のエントリ情報と、前記第2のエントリ情報とは、前記不揮発性メモリの記録領域内に存在する共通の領域管理情報テーブル内で管理され、
1つの前記固定長ブロックの領域管理は、前記第1のエントリ情報か、前記第2のエントリ情報のいずれか一方でのみ行われることを特徴とする請求項9記載の情報記録モジュール。
The first entry information and the second entry information are managed in a common area management information table existing in a recording area of the nonvolatile memory,
10. The information recording module according to claim 9, wherein the area management of one fixed-length block is performed only in one of the first entry information and the second entry information.
前記第1のエントリ情報は、
対応する前記固定長ブロックに格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含むことを特徴とする請求項10記載の情報記録モジュール。
The first entry information is:
11. The information recording module according to claim 10, further comprising information indicating a position of the fixed-length block in which data subsequent to the data stored in the corresponding fixed-length block is stored.
前記第2のエントリ情報は、
前記第1のエントリ情報と前記第2のエントリ情報とを識別するための情報と、
前記第2のエントリ情報が管理する連続領域の大きさを示す情報と、
前記第2のエントリ情報が管理する連続領域に格納されているデータに引き続くデータが格納されている前記固定長ブロックの位置を示す情報を含むことを特徴とする請求項10記載の情報記録モジュール。
The second entry information is:
Information for identifying the first entry information and the second entry information;
Information indicating the size of the continuous area managed by the second entry information;
11. The information recording module according to claim 10, further comprising information indicating a position of the fixed-length block in which data subsequent to data stored in a continuous area managed by the second entry information is stored.
ファイルデータを格納する不揮発性メモリを具備する情報記録モジュールと、前記情報記録モジュールにアクセスするアクセス装置からなる情報記録システムであって、
前記不揮発性メモリは固定長ブロック単位で管理されており、
1つの前記固定長ブロックに関する領域管理情報を含む第1のエントリ情報と、
複数の前記固定長ブロックから構成される連続領域の管理情報を含む第2のエントリ情報と、
により構成された前記不揮発性メモリの領域管理情報が前記不揮発性メモリ内に格納され、
前記アクセスモジュールは、前記領域管理情報を用いて前記不揮発性メモリ内の記録領域の領域管理を行うファイルシステム制御部を具備することを特徴とする情報記録システム。
An information recording system comprising an information recording module having a nonvolatile memory for storing file data, and an access device for accessing the information recording module,
The nonvolatile memory is managed in units of fixed-length blocks,
First entry information including area management information relating to one fixed-length block;
Second entry information including management information of a continuous area composed of a plurality of the fixed-length blocks;
The non-volatile memory area management information configured by is stored in the non-volatile memory,
The information recording system, wherein the access module includes a file system control unit that performs area management of a recording area in the nonvolatile memory using the area management information.
前記第1のエントリ情報と、前記第2のエントリ情報とは、前記不揮発性メモリの記録領域内に存在する共通の領域管理情報テーブル内で管理され、
1つの前記固定長ブロックの領域管理は、前記第1のエントリ情報か、前記第2のエントリ情報のいずれか一方でのみ行われることを特徴とする請求項13記載の情報記録システム。
The first entry information and the second entry information are managed in a common area management information table existing in a recording area of the nonvolatile memory,
14. The information recording system according to claim 13, wherein the area management of one fixed-length block is performed only in one of the first entry information and the second entry information.
JP2008049359A 2008-02-29 2008-02-29 Access module, information recording module, and information recording system Pending JP2009205591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008049359A JP2009205591A (en) 2008-02-29 2008-02-29 Access module, information recording module, and information recording system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008049359A JP2009205591A (en) 2008-02-29 2008-02-29 Access module, information recording module, and information recording system

Publications (1)

Publication Number Publication Date
JP2009205591A true JP2009205591A (en) 2009-09-10

Family

ID=41147748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008049359A Pending JP2009205591A (en) 2008-02-29 2008-02-29 Access module, information recording module, and information recording system

Country Status (1)

Country Link
JP (1) JP2009205591A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011058700A1 (en) * 2009-11-11 2011-05-19 パナソニック株式会社 Access device, information recording device, controller, real time information recording system, access method, and program
JP2014071905A (en) * 2012-09-28 2014-04-21 Samsung Electronics Co Ltd Computer system, and data management method for computer system
JP2016162168A (en) * 2015-03-02 2016-09-05 株式会社メガチップス Cache file system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011058700A1 (en) * 2009-11-11 2011-05-19 パナソニック株式会社 Access device, information recording device, controller, real time information recording system, access method, and program
JP5481493B2 (en) * 2009-11-11 2014-04-23 パナソニック株式会社 ACCESS DEVICE, INFORMATION RECORDING DEVICE, CONTROLLER, REAL TIME INFORMATION RECORDING SYSTEM, ACCESS METHOD, AND PROGRAM
US8977802B2 (en) 2009-11-11 2015-03-10 Panasonic Intellectual Property Management Co., Ltd. Access device, information recording device, controller, real time information recording system, access method, and program
JP2014071905A (en) * 2012-09-28 2014-04-21 Samsung Electronics Co Ltd Computer system, and data management method for computer system
JP2016162168A (en) * 2015-03-02 2016-09-05 株式会社メガチップス Cache file system

Similar Documents

Publication Publication Date Title
JP5485163B2 (en) Access module, information recording module, controller, and information recording system
JP5129156B2 (en) Access device and write-once recording system
JP5481493B2 (en) ACCESS DEVICE, INFORMATION RECORDING DEVICE, CONTROLLER, REAL TIME INFORMATION RECORDING SYSTEM, ACCESS METHOD, AND PROGRAM
JP4859837B2 (en) Information recording medium access device and data recording method
JP5577238B2 (en) Access device, information recording device, controller, and information recording system
JP4691209B2 (en) Access device, information recording device, information recording system, file management method, and program
JP5362594B2 (en) Access device and remaining capacity calculation method
JP4551328B2 (en) Data area management method in information recording medium, and information processing apparatus using data area management method
JP4608434B2 (en) Data processing apparatus and data recording method for information recording medium
JP4755487B2 (en) DATA READING SYSTEM, DATA READING DEVICE, AND DATA READING METHOD
JP4130808B2 (en) Formatting method
JP2009205591A (en) Access module, information recording module, and information recording system
WO2010001606A1 (en) Controller, information recording device, access device, information recording system, and information recording method
KR100678888B1 (en) Apparatus and method for wiriting and reading data
KR101102754B1 (en) Nand flash memory file system and method for accessing file thereof
JP2009205590A (en) Access module, information recording module, controller, and information recording system
JP7262977B2 (en) RECORDING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
US9513826B2 (en) Storage apparatus and storage apparatus control method
JPWO2018186455A1 (en) Method of managing free space in nonvolatile memory, access device for recording data in information recording device including nonvolatile memory, information recording device, and information recording system
JP2008152414A (en) Write-once type information recording device, controller, access device and write-once type information recording system
JP2008299664A (en) Format device and format method