JP2006099648A - Memory control unit - Google Patents

Memory control unit Download PDF

Info

Publication number
JP2006099648A
JP2006099648A JP2004287649A JP2004287649A JP2006099648A JP 2006099648 A JP2006099648 A JP 2006099648A JP 2004287649 A JP2004287649 A JP 2004287649A JP 2004287649 A JP2004287649 A JP 2004287649A JP 2006099648 A JP2006099648 A JP 2006099648A
Authority
JP
Japan
Prior art keywords
logical format
request
storage medium
service
area
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
JP2004287649A
Other languages
Japanese (ja)
Other versions
JP2006099648A5 (en
Inventor
Katsumi Iijima
克己 飯島
Hiroyoshi Oshima
浩義 大島
Yojiro Tagawa
陽次郎 田川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004287649A priority Critical patent/JP2006099648A/en
Publication of JP2006099648A publication Critical patent/JP2006099648A/en
Publication of JP2006099648A5 publication Critical patent/JP2006099648A5/ja
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently perform write operation to a storage medium after a logical format. <P>SOLUTION: A plurality of access requests generated at the time of logical format request to the storage medium is decided, object area information in the storage medium to be an object of the logical format request is acquired, a simultaneous deletion object area is decided on the basis of the acquired object area information, and when the access request is decided, a block corresponding to the decided area is simultaneously deleted. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、複数のセクタで構成されるブロック単位で消去が可能な不揮発メモリを搭載したメモリメディアの論理フォーマット処理に関するものである。   The present invention relates to a logical format process of a memory medium equipped with a non-volatile memory that can be erased in units of blocks composed of a plurality of sectors.

従来、複数のセクタで構成されるブロック単位で消去が可能な不揮発メモリ、例えばフラッシュメモリ等が種々の情報処理装置に搭載されている。   Conventionally, non-volatile memories that can be erased in units of blocks composed of a plurality of sectors, such as flash memories, are mounted on various information processing apparatuses.

該フラッシュメモリは、ブロック単位、例えば64Kバイト等といった大きな単位での消去が可能な不揮発性メモリである。この消去単位をイレースブロックとする。   The flash memory is a non-volatile memory that can be erased in a block unit, for example, a large unit such as 64 Kbytes. This erase unit is an erase block.

該フラッシュメモリにおける書き込みは、イレースブロック単位、またはそれ以下の単位で行われる。書き込みデータがイレースブロックサイズで、かつ消去済みの未使用イレースブロックが存在する場合は、書き込みデータを該イレースブロックに書き込みを行う。次に、書き込みを行ったイレースブロックにアドレスを割り当て、さらに、元のデータが格納されたイレースブロックを未使用アドレスに割り当て、書き込み動作を終了する。   Writing in the flash memory is performed in units of erase blocks or in units smaller than that. When the write data has an erase block size and there is an erased unused erase block, the write data is written to the erase block. Next, an address is assigned to the erase block that has been written, and an erase block in which the original data is stored is assigned to an unused address, and the write operation is terminated.

書き込みデータがイレースブロックサイズよりも小さく、かつ消去済みの未使用イレースブロックが存在した場合は、先ず、書き込み対象部分を含むイレースブロックのデータをバッファにコピーする。次にバッファ内データの書き込み対象部分のデータと、書き込みデータを置き換えて新たなイレースブロックサイズのデータを作成し、該データを消去済みの未使用イレースブロックに書き込む。最後に、書き込みを行ったイレースブロックにアドレスを割り当て、さらに、元のデータが格納されたイレースブロックを未使用アドレスに割り当て、書き込み動作を終了する。   When the write data is smaller than the erase block size and there is an erased unused erase block, first, the erase block data including the write target portion is copied to the buffer. Next, the data in the buffer to be written is replaced with the data to be written to create new erase block size data, and the data is written into the erased unused erase block. Finally, an address is assigned to the erase block that has been written, and the erase block in which the original data is stored is assigned to an unused address, and the write operation is terminated.

消去済みの未使用イレースブロックが存在しなかった場合は、一旦書き込み対象のイレースブロックに対し消去を行い、データを消去した後書き込みを行うという手順で行う。イレースブロックサイズの書き込みが要求された場合は、そのままデータ書き込み、終了する。イレースブロックより小さい単位での書き込みが要求された場合は、消去済みの未使用イレースブロックが存在する場合と同じく、書き込み対象部分を含むイレースブロックのデータをバッファにコピーし、該データの書き込み対象部分のデータと、書き込みデータを置き換えて新たなイレースブロックサイズのデータを作成し、消去を行ったイレースブロックに作成したデータを書き込み、終了する。上記のようなフラッシュメモリ技術は、特許文献1等において記載されている。
特開2003−099098号公報
If there is no erased unused erase block, the erase block is temporarily erased, and the data is erased before writing. When the erase block size is requested to be written, the data is written as it is and the process is terminated. When writing in units smaller than the erase block is requested, the erase block data including the write target portion is copied to the buffer, and the data write target portion is written, as in the case where there is an erased unused erase block. This data is replaced with the write data to create new erase block size data, and the created data is written into the erased erase block, and the process ends. The flash memory technology as described above is described in Patent Document 1 and the like.
JP 2003-099098 A

しかしながら、消去済みの未使用イレースブロックが存在しない場合、上記フラッシュメモリの書き込みは、時間のかかる処理である。そのため、全てのイレースブロックを消費するまで書き込みを行った、フラッシュメモリ搭載のメモリメディア等に書き込みを行う場合、該メモリメディアへのデータ転送速度よりも書き込み処理速度の方が遅くなり、結果的に、データを転送するシステムのデータ転送性能を活かしきれないという問題点があった。   However, when there is no erased unused erase block, writing to the flash memory is a time consuming process. Therefore, when writing to a memory medium equipped with flash memory that has been written until all erase blocks are consumed, the writing processing speed is slower than the data transfer speed to the memory medium, and as a result However, there was a problem that the data transfer performance of the data transfer system could not be fully utilized.

本発明は、上述した問題点を解決するためのものであり、論理フォーマット後の記憶媒体への書き込み操作を効率良く行うことができるメモリ制御装置を提供することを目的とする。   An object of the present invention is to solve the above-described problems, and an object of the present invention is to provide a memory control device that can efficiently perform a write operation to a storage medium after logical formatting.

上記目的を達成するために、本発明のメモリ制御装置は、記憶媒体の記憶領域をブロック単位で一括消去できるメモリ制御装置であって、前記記憶媒体に対する論理フォーマット要求時に発生する複数のアクセス要求を判定する要求判定手段と、前記論理フォーマット要求の対象となる前記記憶媒体内の対象領域情報を取得する領域情報取得手段と、前記要求判定手段によりアクセス要求を判定した場合に、前記領域情報取得手段により取得した対象領域情報に基づき一括消去対象領域を決定し、決定した領域に対応するブロックを一括消去する一括消去手段とを有することを特徴とする。   In order to achieve the above object, a memory control device according to the present invention is a memory control device capable of collectively erasing a storage area of a storage medium in units of blocks, and a plurality of access requests generated when a logical format request is made to the storage medium. A request determination unit for determining, a region information acquisition unit for acquiring target region information in the storage medium that is a target of the logical format request, and a region information acquisition unit when an access request is determined by the request determination unit And a batch erasing unit that determines a batch erasure target region based on the target region information acquired by the step, and batch erases blocks corresponding to the determined region.

本発明によれば、論理フォーマット後の前記記憶媒体への書き込み操作を効率良く行うことができる。   According to the present invention, it is possible to efficiently perform a write operation to the storage medium after logical formatting.

以下、図面を使用して本発明に係わる実施形態を説明する。   Embodiments according to the present invention will be described below with reference to the drawings.

(第1の実施形態)
図1は第1の実施形態におけるカメラシステムの構成を表すブロック図である。本カメラシステムは、電子カメラと、これに着脱可能な外部記憶媒体17、PC通信インターフェース21、及びPC通信インターフェース21を介して電子カメラと通信可能に接続されたパーソナルコンピュータ22から構成される。
(First embodiment)
FIG. 1 is a block diagram showing the configuration of the camera system in the first embodiment. The camera system includes an electronic camera, an external storage medium 17 that can be attached to and detached from the electronic camera, a PC communication interface 21, and a personal computer 22 that is communicably connected to the electronic camera via the PC communication interface 21.

1はレンズであり、2はレンズ1を通った光を電気信号として出力するCCDユニットである。3はA/Dコンバータであり、CCDユニット2からのアナログ信号をデジタル信号へ変換する。4はSSGユニットであり、CCDユニット2とA/Dコンバータ3に同期信号を供給する。5はCPUであり、本カメラシステムにおける各種の制御を実現する。   Reference numeral 1 denotes a lens, and reference numeral 2 denotes a CCD unit that outputs light passing through the lens 1 as an electrical signal. An A / D converter 3 converts an analog signal from the CCD unit 2 into a digital signal. An SSG unit 4 supplies a synchronization signal to the CCD unit 2 and the A / D converter 3. Reference numeral 5 denotes a CPU, which implements various controls in the camera system.

6は信号処理アクセラレータであり、信号処理を高速に実現する。7は電池であり、8は、電池7よりの電力を電子カメラ全体へ供給するためのDC/DCコンバータである。9は電源コントローラユニットであり、DC/DCコンバータ8をコントロールする。10はパネル操作・表示装置・電源のコントロールを行うマイクロコンピュータである。11はユーザへ各種の情報を表示する表示装置であり、液晶パネル等が用いられる。12はコントロールパネルであり、ユーザが直接操作するレリーズスイッチ、及びメニューボタンを含む。   A signal processing accelerator 6 realizes signal processing at high speed. 7 is a battery, and 8 is a DC / DC converter for supplying electric power from the battery 7 to the entire electronic camera. A power controller unit 9 controls the DC / DC converter 8. A microcomputer 10 controls the panel operation, the display device, and the power source. Reference numeral 11 denotes a display device that displays various types of information to the user, and uses a liquid crystal panel or the like. A control panel 12 includes a release switch and a menu button that are directly operated by the user.

13はROMであり、OS等のシステムプログラムを格納する。14はDRAMであり、本電子カメラの主記憶である。15はフラッシュROMであり、内蔵記憶媒体として使用する。16はSD(Secure Digital)カードのインターフェース部、17はSDメモリーカードなどの外部記憶媒体である。また、18はDMAコントローラ、19はストロボである。   A ROM 13 stores a system program such as an OS. Reference numeral 14 denotes a DRAM which is a main memory of the electronic camera. A flash ROM 15 is used as a built-in storage medium. Reference numeral 16 denotes an SD (Secure Digital) card interface unit, and 17 denotes an external storage medium such as an SD memory card. Reference numeral 18 denotes a DMA controller, and 19 denotes a strobe.

この電子カメラの撮影時の動作に説明する。コントロールパネル12のレリーズスイッチをユーザが押すと、CPU5がそのことを検出して撮影シーケンスを開始する。以下の動作は全てCPU5によるコントロールで行われることを前提とする。   The operation at the time of photographing with this electronic camera will be described. When the user presses the release switch on the control panel 12, the CPU 5 detects this and starts the shooting sequence. It is assumed that the following operations are all controlled by the CPU 5.

さて、レリーズスイッチの押下により、SSG4がCCD2を駆動する。CCD2から出力されるアナログ信号は、A/Dコンバータ3でデジタル信号へ変換される。A/Dコンバータ3の出力は、DMAコントローラ18によってDRAM14へDMA転送される。1フレーム分のDMA転送が終了した時点でCPU5は、信号処理シーケンスを開始する。   Now, when the release switch is pressed, the SSG 4 drives the CCD 2. The analog signal output from the CCD 2 is converted into a digital signal by the A / D converter 3. The output of the A / D converter 3 is DMA-transferred to the DRAM 14 by the DMA controller 18. When the DMA transfer for one frame is completed, the CPU 5 starts a signal processing sequence.

信号処理シーケンスでは、フラッシュROM15から信号処理プログラムを主記憶(DRAM14)上に読み出し、主記憶上のデータを信号処理アクセラレータ6へ転送し信号処理を行う。ただし、信号処理アクセラレータ6は信号処理の全てを行うわけではなく、CPU5で行う処理の特に時間のかかる処理などを助ける演算回路であり、CPU5の処理ソフトウェアと連携して動作する。信号処理の一部または全部が終了すると画像ファイルとして、カードインターフェース16を介して、外部記憶媒体17へ記録する。このとき記録するファイルフォーマットが圧縮処理を必要とするのであれば圧縮も行う。   In the signal processing sequence, a signal processing program is read from the flash ROM 15 onto the main memory (DRAM 14), and data on the main memory is transferred to the signal processing accelerator 6 to perform signal processing. However, the signal processing accelerator 6 does not perform all signal processing, but is an arithmetic circuit that helps particularly time-consuming processing performed by the CPU 5, and operates in cooperation with processing software of the CPU 5. When part or all of the signal processing is completed, the image file is recorded on the external storage medium 17 via the card interface 16. If the file format to be recorded at this time requires compression processing, compression is also performed.

図2は、図1に示した外部記憶媒体17に記録される画像ファイルシステムの階層構造を示す概念図であり、例えば階層L1〜L4で構成される場合に対応する。   FIG. 2 is a conceptual diagram showing the hierarchical structure of the image file system recorded in the external storage medium 17 shown in FIG.

図において、最上位の階層L1はユーザアプリケーションで、電子カメラ内部で起動するソフトウェアであり、ファイルをファイル名でオープンして読み書きした後クローズする。階層L2は、ファイルシステムAPI層で、ユーザアプリケーションからファンクションコールによって呼び出される。該階層L2がドライブ名とファイルシステムを関連付けて管理している。各ドライブ毎にファイルシステムアーキテクチャ層(階層L3)をマウントするように構成しているため、複数のファイルシステムアーキテクチャ(例えばFAT、HP−FS、NFS、NTFS等)を混在させることが可能となっている。なお、ファイルシステムアーキテクチャ層が実際のファイル管理を行う部分である。最下位の階層L4がブロックデバイス層である。   In the figure, the highest hierarchy L1 is a user application, which is software that is activated inside the electronic camera. The file is opened with a file name, read / written, and then closed. The hierarchy L2 is a file system API layer and is called from a user application by a function call. The hierarchy L2 manages the drive name and the file system in association with each other. Since the configuration is such that the file system architecture layer (hierarchy L3) is mounted for each drive, a plurality of file system architectures (for example, FAT, HP-FS, NFS, NTFS, etc.) can be mixed. Yes. The file system architecture layer is a part that performs actual file management. The lowest layer L4 is a block device layer.

ファイルシステムアーキテクチャ層がブロックデバイス層の提供するサービスを利用してファイル入出力を実現している。なお、ブロックデバイス層では、データを512バイト等のセクタと言う単位で管理している。該ブロックデバイス層でデバイス毎の入出力制御の違いと、ヘッドやシリンダ等のパラメータの違いを吸収している。これにより、同時に複数の種類のデバイスを混在させたカメラシステムを構築することができる。   The file system architecture layer implements file input / output using services provided by the block device layer. In the block device layer, data is managed in units of sectors such as 512 bytes. The block device layer absorbs differences in input / output control for each device and differences in parameters such as the head and cylinder. This makes it possible to construct a camera system in which a plurality of types of devices are mixed at the same time.

本実施形態におけるシステムでは、外部記憶媒体17のブロックデバイスがファイルシステムへ提供するサービスは(1)〜(3)である。   In the system according to the present embodiment, the services provided by the block device of the external storage medium 17 to the file system are (1) to (3).

(1)は論理的なセクタ番号で指定したセクタからのデータの読み出し、(2)は論理的なセクタ番号で指定したセクタへのデータの書き込み、(3)は論理的なセクタ番号で指定したセクタのイレース(フラッシュ)である。   (1) reads data from the sector specified by the logical sector number, (2) writes data to the sector specified by the logical sector number, and (3) specifies the logical sector number This is a sector erase (flash).

(3)のサービスに関しては、該サービスを提供する外部記憶媒体としないものとがある。本発明は、この(3)のサービスを提供可能で、サービス(3)を利用することにより、その後の書き込み速度が向上するという特徴を持つ外部記憶媒体を前提としている。MMC(Multi Media Card)や、SD(Secure Digital)メモリーカード等がこの特徴を有する外部記憶媒体の一例である。本実施形態の説明では、外部記憶媒体としてSDメモリーカードを対象とする。また、ファイルシステムアーキテクチャはFATファイルシステムを用い、本実施形態を説明する。   Regarding the service (3), there are some which are not external storage media that provide the service. The present invention is premised on an external storage medium that can provide the service (3), and that the subsequent writing speed is improved by using the service (3). An MMC (Multi Media Card), an SD (Secure Digital) memory card, and the like are examples of an external storage medium having this feature. In the description of this embodiment, an SD memory card is targeted as an external storage medium. The present embodiment will be described using a FAT file system as the file system architecture.

図3は、本実施形態のブロックデバイス層のソフトウェア構造を示している。301はブロックデバイスAPIで、前記サービスの(1)、(2)、及び(3)を提供している。通常、上位層であるファイルシステムアーキテクチャ層がサービスを利用する場合、直接ブロックデバイスAPI301を利用する。しかし、ここではブロックデバイスサービス解析部302を通してサービスを利用する。   FIG. 3 shows the software structure of the block device layer of this embodiment. A block device API 301 provides the services (1), (2), and (3). Normally, when a file system architecture layer, which is an upper layer, uses a service, the block device API 301 is directly used. However, the service is used here through the block device service analysis unit 302.

ブロックデバイスサービス解析部302が提供するサービスは、(1)、(2)、及び(3)であり、ブロックデバイスAPI301と同じサービスをファイルシステムアーキテクチャ層に提供する。そのため、ファイルシステムアーキテクチャ層は、下位がブロックデバイスAPIであっても、ブロックデバイスサービス解析部であっても、特別な操作をすることなく、同じように下位層が提供するサービスを利用することができる。   The services provided by the block device service analysis unit 302 are (1), (2), and (3), and provide the same service as that of the block device API 301 to the file system architecture layer. Therefore, the file system architecture layer can use the service provided by the lower layer in the same manner without any special operation, regardless of whether the lower layer is the block device API or the block device service analysis unit. it can.

SDメモリーカードに対するファイルのリード/ライト要求がファイルシステムアーキテクチャ層に要求されると、ブロックデバイス層に対する複数のサービス要求に分割される。同じように、SDメモリーカードに対する論理フォーマットがファイルシステムアーキテクチャ層に要求されると、ブロックデバイス層に対する複数のサービス要求に分割される。これらのサービス要求は、ブロックデバイスサービス解析部302に対して要求される。ブロックデバイスサービス解析部302は、要求されたサービスが論理フォーマット時に要求されるサービスかを判定する論理フォーマット判定手段と、ブロックデバイス内の論理フォーマットの対象となる領域の情報を取得する領域情報取得手段を持ち、前記論理フォーマット判定手段により論理フォーマット時に要求されるサービスであると判定した場合には、前記領域情報取得手段により取得した情報を基にイレース対象領域を決定し、該イレース対象領域に対しブロックデバイスAPI301のサービス(3)によりイレースを行い、それ以外には、ブロックデバイスAPI301と同様の動作を行うソフトウェアである。   When a file read / write request for the SD memory card is requested to the file system architecture layer, it is divided into a plurality of service requests for the block device layer. Similarly, when a logical format for the SD memory card is required in the file system architecture layer, it is divided into a plurality of service requests for the block device layer. These service requests are requested to the block device service analysis unit 302. The block device service analysis unit 302 includes a logical format determination unit that determines whether the requested service is a service that is requested at the time of logical formatting, and an area information acquisition unit that acquires information on an area that is a target of the logical format in the block device. If the logical format determination means determines that the service is required at the time of logical formatting, the erase target area is determined based on the information acquired by the area information acquisition means, and the erase target area Software that performs the same operation as that of the block device API 301 is performed by erasing the service (3) of the block device API 301.

前記論理フォーマット判定手段と、前記領域情報取得手段について説明する前に、FATファイルシステムについて説明する。図5は、記憶媒体のデータ構造を示している。図において、501はMBR(Master Boot Record)であり、記憶媒体の先頭から512バイトのデータサイズを占め、図6に示す構造を持っている。該記憶媒体が起動可能な記憶媒体である場合は、601のブートストラップローダ、該記憶媒体の起動プログラムを所持している。起動可能ではない場合は、ブートストラップローダを持っていない場合もある。ブートストラップローダ601は、MBR501の先頭から446バイトまでを占める。602はパーティションテーブルであり、該記憶媒体のパーティション502〜50Nの情報が収めら、MBR501の447バイト目から64バイト、510バイト目までを占めている。   Before describing the logical format determination unit and the area information acquisition unit, the FAT file system will be described. FIG. 5 shows the data structure of the storage medium. In the figure, reference numeral 501 denotes an MBR (Master Boot Record), which occupies a data size of 512 bytes from the beginning of the storage medium and has the structure shown in FIG. When the storage medium is a bootable storage medium, the storage medium has a bootstrap loader 601 and a boot program for the storage medium. If it is not bootable, it may not have a bootstrap loader. The bootstrap loader 601 occupies 446 bytes from the top of the MBR 501. Reference numeral 602 denotes a partition table, which stores information on partitions 502 to 50N of the storage medium, and occupies from the 447th byte to the 64th byte and the 510th byte of the MBR501.

パーティションとは、該記憶媒体の区分けを意味し、一つのパーティションは、一つのファイルシステムにより管理される。一つの記憶媒体は、少なくとも一つ以上のパーティションによって構成される。パーティションテーブル602には、各パーティションの物理的な開始位置、終了位置、論理的な開始位置、総セクタ数が収められている。例外的にパーティションが一つの場合、MBRを持たないことがある。その場合は、記憶媒体全体を一つのパーティションとみなす。   A partition means the division of the storage medium, and one partition is managed by one file system. One storage medium includes at least one partition. The partition table 602 stores the physical start position, end position, logical start position, and total number of sectors of each partition. If there is an exceptionally single partition, it may not have an MBR. In that case, the entire storage medium is regarded as one partition.

図7は一つのパーティションをFATファイルシステムの一例である、FAT16によりフォーマットした場合のデータ構造を示している。701はPBR(Partition Boot Record)で、図8に示す構造を持っている。図8の801はジャンプ命令で、IPL803へのジャンプ命令が格納されている。802はBPB(BIOS Parameter Block)でファイルシステムの情報、特にこのパーティションに特化した情報が記録されている。図11は該BPBに含まれるパラメータを示している。803はIPL(Initial Program Loader)でこのパーティションの起動プログラムが収められている。   FIG. 7 shows a data structure when one partition is formatted by FAT16, which is an example of the FAT file system. Reference numeral 701 denotes a PBR (Partition Boot Record), which has the structure shown in FIG. In FIG. 8, reference numeral 801 denotes a jump instruction in which a jump instruction to the IPL 803 is stored. Reference numeral 802 denotes a BPB (BIOS Parameter Block) in which information on the file system, in particular, information specific to this partition is recorded. FIG. 11 shows parameters included in the BPB. Reference numeral 803 denotes an IPL (Initial Program Loader) in which a startup program for this partition is stored.

図7の702、及び703はFAT(File Allocation Table)で、ユーザデータ領域705に格納されているファイルの位置情報が収められている。FATファイルシステムは、FAT702及び703により、パーティションに格納されているファイルの位置情報を取得する。そのため、ユーザデータ領域にファイルが格納されていても、FAT702及び703に該ファイルの位置情報が格納されていなければ、ファイルとして認識できない。704はディレクトリエントリで、ルートディレクトリに格納されたファイルの管理情報が収められている。705はユーザデータ領域でファイルの本体が格納されている。   Reference numerals 702 and 703 in FIG. 7 denote FAT (File Allocation Table), which stores file position information stored in the user data area 705. The FAT file system acquires the position information of the file stored in the partition by using the FATs 702 and 703. Therefore, even if a file is stored in the user data area, it cannot be recognized as a file unless the location information of the file is stored in the FATs 702 and 703. A directory entry 704 stores management information of files stored in the root directory. Reference numeral 705 denotes a user data area in which the file body is stored.

ブロックデバイスサービス解析部301が有する前記領域情報取得手段について説明する。前記領域情報取得手段は、図13のフローチャートの示す手順で動作し、要求されたサービスがアクセスするパーティションのユーザ領域を認識する。先ず、1301で記憶媒体のパーティション情報を保持しているかを判定する。保持していないと判定した場合は、1302で該記憶媒体のMBR(先頭から512バイト)内の、パーティションテーブルを解析し、記憶媒体に含まれるパーティション情報を取得する。この情報から1303で、要求されたサービスがアクセスするパーティションを特定する。次に、1304で特定したパーティションのBPB内パラメータ情報を保持しているかを判定する。保持していなかった場合、1305で該パーティションのBPBを解析し、BPBに含まれるパラメータ情報を取得する。この情報から、1306でFAT、ディレクトリエントリ、ユーザデータ領域を特定する。ユーザデータ領域の開始アドレスと終了アドレスは、図12に示す計算式で取得することができる。このようにして、前記領域情報取得手段は、要求されたサービスがアクセスするパーティションのユーザデータ領域を特定する。   The area information acquisition unit included in the block device service analysis unit 301 will be described. The area information acquisition unit operates according to the procedure shown in the flowchart of FIG. 13, and recognizes the user area of the partition accessed by the requested service. First, in 1301, it is determined whether the storage medium partition information is held. If it is determined that the storage medium is not held, the partition table in the MBR (512 bytes from the top) of the storage medium is analyzed in 1302 to obtain partition information included in the storage medium. From this information, the partition accessed by the requested service is identified at 1303. Next, it is determined whether the BPB parameter information of the partition specified in 1304 is retained. If not, the BPB of the partition is analyzed at 1305 to obtain parameter information included in the BPB. From this information, the FAT, directory entry, and user data area are specified in 1306. The start address and end address of the user data area can be obtained by the calculation formula shown in FIG. In this way, the area information acquisition unit specifies the user data area of the partition accessed by the requested service.

ブロックデバイスサービス解析部302が有する前記論理フォーマット判定手段について説明する。前記論理フォーマット判定手段には、ユーザデータ領域の使用容量を示す、ユーザデータ領域使用容量情報が必要となる。該ユーザデータ領域使用容量情報は、FATが全削除状態であるかの判定に利用される。図14は、前記論理フォーマット判定手段で、要求されたサービスが論理フォーマット時に要求されるサービスであるかの判定を行うときの動作をフローチャートで示している。   The logical format determination unit included in the block device service analysis unit 302 will be described. The logical format determination means requires user data area used capacity information indicating the used capacity of the user data area. The user data area used capacity information is used to determine whether the FAT is in the all-deleted state. FIG. 14 is a flowchart showing an operation when the logical format determination unit determines whether the requested service is a service requested at the time of logical formatting.

先ず、S1401で前記領域情報取得手段により要求されたサービスの対象領域情報を取得する。S1402で前記ユーザデータ領域使用容量情報を保持しているかを判定し、保持していない場合は、S1406でFATを解析し、該ユーザデータ領域使用容量情報を取得、保持する。該ユーザデータ領域使用容量情報の取得は、論理フォーマット時、物理フォーマット時、電源投入時、記憶媒体変更時に行われる。次に、前記対象領域情報を基にS1402で要求されたサービスがBPBに対するアクセスかを判定し、BPBに対するアクセスであった場合はS1407でサービスの実行によってBPBの内容への書き込みが行われるかを調べる。この結果を基に、S1408で書き込みの内容がボリューム名であるかを判定し、ボリューム名以外であった場合、S1409でFATの位置、サイズ、数に変更があるかを判定する。変更がある場合は、S1415で前記ユーザデータ領域使用容量情報を破棄し、本判定動作は要求されたサービスがフォーマット時に要求されるサービスであると判定し、終了する。該ユーザデータ領域使用容量情報を破棄するのは、フォーマット時に要求されるサービスであると判定した場合、FATの位置、サイズ、数に変更があった場合、FAT情報の正当性が無くなり、同じく前記ユーザデータ領域使用容量も正当性がなくなるからである。   First, in step S1401, target area information of the service requested by the area information acquisition unit is acquired. In S1402, it is determined whether the user data area usage capacity information is held. If not, the FAT is analyzed in S1406, and the user data area usage capacity information is acquired and held. The user data area usage capacity information is acquired at the time of logical formatting, physical formatting, power-on, or storage medium change. Next, based on the target area information, it is determined whether the service requested in S1402 is an access to the BPB. If the service is an access to the BPB, whether the BPB contents are written by executing the service in S1407. Investigate. Based on this result, it is determined in S1408 whether the written content is a volume name. If it is other than the volume name, it is determined in S1409 whether the FAT position, size, and number are changed. If there is a change, the user data area usage capacity information is discarded in S1415, and this determination operation determines that the requested service is a service requested at the time of formatting and ends. If it is determined that the service for discarding the user data area used capacity information is a service required at the time of formatting, if the FAT position, size, or number is changed, the validity of the FAT information is lost. This is because the user data area use capacity is also invalid.

以上説明したステップで、本判定動作を終了しなかった場合は、S1404で要求されたサービスがFATに対するアクセスかを判定する。FATへのアクセスであると判定された場合、S1410で要求されたサービスの実行により、FATの変更があるかの判定を行い、変更があると判定した場合、S1411でFATの変更から、保持している前記ユーザデータ領域使用容量情報の変更を行う。そして、1412で該ユーザデータ領域使用容量情報から、ファイルの全削除状態(使用容量が0)であるかの判定を行う。S1412で全削除状態であると判定した場合、S1415で前記ユーザデータ領域使用容量情報を破棄し、本判定動作は要求されたサービスがフォーマット時に要求されるサービスであると判定し、終了する。   If the determination operation is not completed in the steps described above, it is determined whether the service requested in S1404 is an access to the FAT. If it is determined that the access is to the FAT, it is determined whether or not the FAT has been changed by executing the service requested in S1410. If it is determined that there is a change, the change is retained from the FAT change in S1411. The user data area used capacity information is changed. In step 1412, it is determined from the user data area used capacity information whether the file is completely deleted (used capacity is 0). If it is determined in S1412 that the data is completely deleted, the user data area usage capacity information is discarded in S1415, and this determination operation determines that the requested service is a service requested at the time of formatting and ends.

S1404以降のステップにおいて、本判定動作を終了しなかった場合は、S1405で要求されたサービスがMBRへのアクセスであるかを判定する。MBRへのアクセスであると判定された場合は、S1413でサービスの実行によってMBR内のパーティションテーブルの変更があるかを判定する。パーティションテーブルへの変更があると判定した場合、S1414でユーザデータ領域使用容量情報を破棄する。S1413でどちらの判定がなされても、本判定動作は要求されたサービスが通常のサービス要求であると判定し、終了する。以上説明した方法で、前記論理フォーマット判定手段は、要求されたサービスの判定を行う。   In the steps after S1404, if this determination operation is not terminated, it is determined whether the service requested in S1405 is an access to the MBR. If it is determined that the access is to the MBR, it is determined in S1413 whether there is a change in the partition table in the MBR by executing the service. If it is determined that there is a change to the partition table, the user data area usage capacity information is discarded in S1414. Regardless of which determination is made in S1413, this determination operation determines that the requested service is a normal service request and ends. With the method described above, the logical format determination means determines the requested service.

以下、ブロックデバイスサービス解析部302の上位層に対するサービス提供動作を説明する。図4は、ブロックデバイスサービス解析部302が、上位のファイルシステムアーキテクチャ層にサービスを提供する場合の動作をフローチャートで示したものである。本動作には、論理フォーマット実行中であるかを示す論理フォーマットフラグを用いる。該論理フォーマットフラグは、論理フォーマットによる一連のサービス要求が行われるときに、前記論理フォーマット判定手段により、論理フォーマット時に要求されるサービスを検知した時点でセットされ、一連のサービス要求が終了したと判断した場合、つまりユーザデータ領域に対するアクセス要求が行われた場合にリセットされる。前記論理フォーマット判定手段では、論理フォーマット時に要求される一連のサービス、例えば、BPBのボリューム名を除くパラメータの変更や、FATの全削除など、論理フォーマット時に要求されるサービスであると判定されるサービスの種類が複数存在する。そのため、一回の論理フォーマット要求で、複数回のイレース動作を実行してしまう可能性がある。そこで、前記論理フォーマット判定手段によって、一度論理フォーマット時に要求されるサービスを認識しイレース動作を行ったら、該論理フォーマットが終了するまで、イレース動作を行わせないために、前記論理フォーマットフラグを利用する。   The service providing operation for the upper layer of the block device service analysis unit 302 will be described below. FIG. 4 is a flowchart showing an operation when the block device service analysis unit 302 provides a service to an upper file system architecture layer. In this operation, a logical format flag indicating whether the logical format is being executed is used. The logical format flag is set when a service requested at the time of logical formatting is detected by the logical format determination means when a series of service requests in the logical format is performed, and it is determined that the series of service requests has ended. In other words, it is reset when an access request to the user data area is made. In the logical format determination means, a series of services required at the time of logical formatting, for example, a service determined to be a service required at the time of logical formatting, such as a parameter change excluding a BPB volume name or a total deletion of FAT. There are multiple types of. Therefore, there is a possibility that the erase operation is executed a plurality of times with a single logical format request. Therefore, once the logical format determination means recognizes a service required at the time of logical formatting and performs an erase operation, the logical format flag is used to prevent the erase operation from being performed until the logical format is completed. .

ブロックデバイスサービス解析部302が、サービスを要求されたとき、先ず、S401で前記論理フォーマットフラグを参照する。S402で該論理フォーマットフラグの状態を判定し、該論理フォーマットフラグがセットされていない場合は、前記論理フォーマット判定手段により、要求されたサービスの種別の判定を行う。S410の丸Aは、図14の丸Aに繋がる。前記論理フォーマット判定手段により、論理フォーマット時に要求されるサービスであると判定された場合は、S411の丸Bに進み、S405で前記領域情報取得手段によりユーザデータ領域を判定し、406で該ユーザデータ領域に対し、下位のブロックデバイスAPIのサービス(3)を利用しイレース動作を行う。続いて、S407で前記論理フォーマットフラグをセットする。   When the block device service analysis unit 302 is requested for service, first, the logical format flag is referred to in S401. In step S402, the state of the logical format flag is determined. If the logical format flag is not set, the logical format determination unit determines the type of service requested. The circle A in S410 is connected to the circle A in FIG. If it is determined by the logical format determination means that the service is required at the time of logical formatting, the process proceeds to circle B in S411, the user information area is determined by the area information acquisition means in S405, and the user data is determined in 406. An erase operation is performed on the area using the service (3) of the lower block device API. Subsequently, in S407, the logical format flag is set.

S402で論理フォーマットフラグがセットされていると判定した場合は、S403で要求されたサービスがアクセスする領域を判定し、S404でユーザデータ領域へのアクセスであるかの判定を行う。ユーザデータ領域へのアクセスであると判定された場合は、論理フォーマットによる一連のサービス要求が終了したと判断し、S408で前記論理フォーマットフラグをリセットする。   If it is determined in S402 that the logical format flag is set, an area to be accessed by the requested service is determined in S403, and it is determined in S404 whether the access is to the user data area. If it is determined that the access is to the user data area, it is determined that a series of service requests in the logical format has been completed, and the logical format flag is reset in S408.

S404でいずれの判定がなされた場合でも、前記論理フォーマット判定手段により、いずれの判定がなされた場合でも、最終的にS408で要求されたサービスに対応するブロックデバイスAPI301のサービスを実行し、要求を完了する。   Regardless of which determination is made in S404, regardless of which determination is made by the logical format determination means, the service of the block device API 301 corresponding to the service requested in S408 is finally executed, and the request is made. Complete.

以上のような方法で論理フォーマット時に、論理フォーマットの対象となるパーティション内のユーザデータ領域に対し、イレース動作を自動的に行うことで、論理フォーマット後の該ユーザデータ領域に対する書き込み動作性能が向上する。また、ブロックデバイス層で論理フォーマットの認識、イレース動作の実行を自動的に行うことで、既存のファイルシステムソフトウェアをそのまま用いることが可能となり、また、変更も容易となる。   By performing the erase operation automatically on the user data area in the partition subject to the logical format at the time of logical formatting by the above method, the writing operation performance to the user data area after the logical formatting is improved. . Further, by automatically recognizing the logical format and executing the erase operation in the block device layer, the existing file system software can be used as it is, and the change can be facilitated.

本実施形態の説明においては、ファイルシステムアーキテクチャとしてFATファイルシステムを例に挙げたが、いずれのファイルシステムアーキテクチャに対しても、ブロックデバイスサービス解析部302が、前記論理フォーマット判定手段、及び前記領域情報取得手段を有する場合は、本発明が適応できることは言うまでもない。   In the description of the present embodiment, the FAT file system is taken as an example of the file system architecture. However, for any file system architecture, the block device service analysis unit 302 performs the logical format determination unit and the area information. Needless to say, the present invention can be applied to the case where acquisition means is provided.

さらに、本実施形態の説明においては、外部記憶媒体としてSDメモリーカードを例にあげたが、いずれの記憶媒体であっても、イレースサービスを提供可能であるという特徴と、該イレースサービスを利用することで、その後の書き込み動作性能が向上するという特徴を持つ場合は、本発明が適応できることは言うまでもない。   Furthermore, in the description of the present embodiment, an SD memory card is taken as an example of an external storage medium. However, the feature that an erase service can be provided by any storage medium, and the erase service is used. Thus, it goes without saying that the present invention can be applied to the case where the subsequent write operation performance is improved.

(第2の実施形態)
図9は、本発明の第2実施形態を示すフォーマット時のイレース機構を搭載したメモリメディア、および該メモリメディアを着脱可能なシステム、例えばディジタルカメラ等、の一例を示すブロック図である。図1において、920がメモリメディアを示し、910がメモリメディア920を着脱可能なシステムを示す。
(Second Embodiment)
FIG. 9 is a block diagram showing an example of a memory medium equipped with an erasing mechanism at the time of formatting according to the second embodiment of the present invention, and a system in which the memory medium can be attached and detached, such as a digital camera. In FIG. 1, reference numeral 920 denotes a memory medium, and reference numeral 910 denotes a system to which the memory medium 920 can be attached and detached.

図において、911はCPUで、システム910の動作を制御する。912はROMで、CPU911が実行するプログラム、およびプログラム実行時に必要で動的には変化しないデータが格納されている。913はRAMで、ROM912に格納されているプログラムをCPU911が実行する際に一時的な記憶領域として利用される。914はメモリメディアコントローラで、CPU911によって制御され、メモリメディア920を制御する制御するための制御命令を発行する手段と、メモリメディア920に格納されたデータをRAM913へ転送する手段と、RAM913に格納されたデータをメモリメディア920へ転送する手段を有することを特徴とする。915はユーザインターフェースで、システム910を利用するユーザの要求を受け付け、CPU911へユーザ要求を通知する。   In the figure, reference numeral 911 denotes a CPU that controls the operation of the system 910. Reference numeral 912 denotes a ROM that stores a program executed by the CPU 911 and data that is necessary when the program is executed and does not change dynamically. A RAM 913 is used as a temporary storage area when the CPU 911 executes a program stored in the ROM 912. Reference numeral 914 denotes a memory media controller, which is controlled by the CPU 911 and which issues a control command for controlling the memory media 920, a means for transferring data stored in the memory media 920 to the RAM 913, and a RAM 913 And a means for transferring the received data to the memory medium 920. A user interface 915 receives a request from a user who uses the system 910 and notifies the CPU 911 of the user request.

921はコントローラで、システム910から送信される制御命令を受信する手段と、該制御命令を解読する制御命令解読手段と、解読した該制御命令を実行する手段と、該制御命令によりアクセスされるパーティションの領域情報を取得する領域情報取得手段を有することを特徴とし、これらの手段を基にメモリメディア920の制御を行う。ここで制御命令解読手段とは、第1実施形態におけるブロックデバイスサービス解析部が有する論理フォーマット判定手段と同様の能力であり、領域情報取得手段とは領域情報取得手段と同様の能力である。   921 is a controller, means for receiving a control instruction transmitted from the system 910, control instruction decoding means for decoding the control instruction, means for executing the decoded control instruction, and a partition accessed by the control instruction It is characterized by having area information acquisition means for acquiring the area information, and the memory medium 920 is controlled based on these means. Here, the control command decoding means has the same ability as the logical format determination means included in the block device service analysis unit in the first embodiment, and the area information acquisition means has the same ability as the area information acquisition means.

922はROMで、CPU921が前記解読した制御命令を実行するときに必要となるプログラムと、該プログラムを実行するときに必要となるデータが格納されている。923はRAMで、CPU921が実行するプログラム、およびデータの一時的な記憶領域として利用される。924はフラッシュメモリで、システム910から転送されたデータが格納されている。   Reference numeral 922 denotes a ROM which stores a program required when the CPU 921 executes the decoded control instruction and data required when the program is executed. A RAM 923 is used as a temporary storage area for programs and data executed by the CPU 921. A flash memory 924 stores data transferred from the system 910.

以下、システム910のユーザが、ユーザインターフェース915を操作することにより、システム910に対し、動作要求が行われたときのシステム910、およびメモリメディア920の動作について説明する。   Hereinafter, operations of the system 910 and the memory medium 920 when an operation request is made to the system 910 by the user of the system 910 operating the user interface 915 will be described.

システム910のユーザが、ユーザインターフェース915を操作すると、前記動作要求がCPU911に通知される。前記動作要求を受けたCPU911は、前記動作要求を実現するプログラムと、該プログラムを実行するときに必要となるデータをROM912からRAM913へ展開し、実行する。前記プログラムを実行した後、システム910において何らかの変化があった場合で、かつこの変化をユーザに通知する必要があるときは、CPU911がユーザインターフェース915を制御し、変化を通知する。   When the user of the system 910 operates the user interface 915, the operation request is notified to the CPU 911. Upon receiving the operation request, the CPU 911 expands a program that realizes the operation request and data necessary for executing the program from the ROM 912 to the RAM 913 and executes the program. If there is any change in the system 910 after the execution of the program and it is necessary to notify the user of this change, the CPU 911 controls the user interface 915 to notify the change.

以下、システム910からメモリメディア920へ、あるいはメモリメディア920からシステム910へデータを転送するデータ転送処理の動作について説明する。   The operation of data transfer processing for transferring data from the system 910 to the memory medium 920 or from the memory medium 920 to the system 910 will be described below.

システム910のユーザからユーザインターフェース915へ、データ転送処理の要求を与えられると、ユーザインターフェース915は、CPU911へ該データ転送処理の要求を通知する。CPU911は、該データ転送処理の要求を受けると、メモリメディアコントローラ914に該データ転送処理に対するメモリメディア920の制御命令の発行を要求する。要求を受けたメモリメディアコントローラ914は、制御命令を作成し、該制御命令をメモリメディア920に送信する。   When a request for data transfer processing is given from the user of the system 910 to the user interface 915, the user interface 915 notifies the CPU 911 of the request for data transfer processing. When the CPU 911 receives the request for the data transfer process, the CPU 911 requests the memory media controller 914 to issue a control command for the memory medium 920 for the data transfer process. Upon receiving the request, the memory media controller 914 creates a control command and transmits the control command to the memory media 920.

メモリメディア920に送信された該制御命令は、CPU921が受け付け、RAM923に展開し解読する。後述するCPU921による制御命令の解読の手順により、解読の結果がメモリメディア920からシステム910へのデータ転送であった場合、フラッシュメモリ924から制御命令内に指定されたアドレスのデータを送信する。逆に、解読の結果がシステム910からメモリメディア920へのデータ転送であった場合、制御命令後に受信するデータを、フラッシュメモリ924の制御命令内に指定されたアドレスへ書き込む。いずれの場合も、処理が完了すると、CPU921はメモリメディアコントローラ914に制御命令完了通知を行う。   The control command transmitted to the memory medium 920 is received by the CPU 921, expanded in the RAM 923, and decoded. If the result of decoding is a data transfer from the memory medium 920 to the system 910 according to the procedure of decoding the control command by the CPU 921 described later, the data at the address specified in the control command is transmitted from the flash memory 924. Conversely, if the result of decryption is data transfer from the system 910 to the memory media 920, the data received after the control instruction is written to the address specified in the control instruction of the flash memory 924. In any case, when the process is completed, the CPU 921 notifies the memory media controller 914 of the completion of the control command.

メモリメディアコントローラ914は、該制御命令完了通知を受けると、CPU911に要求完了通知を行う。CPU911は要求完了通知を受け、ユーザインターフェース915に対して、要求完了通知を行う。ユーザインターフェース915は、ユーザに対して要求処理完了を示す。   Upon receiving the control command completion notification, the memory media controller 914 sends a request completion notification to the CPU 911. Upon receiving the request completion notification, the CPU 911 sends a request completion notification to the user interface 915. The user interface 915 indicates completion of request processing to the user.

以下、システム910がメモリメディア920を論理フォーマットするときの動作について説明する。論理フォーマットを行うということは、少なくとも一つ以上のデータ転送処理を行うということである。ユーザインターフェース915がシステム910のユーザから論理フォーマット要求を受けた場合、ユーザインターフェース915は、該論理フォーマット要求をCPU911へ通知する。CPU911は該論理フォーマット要求の通知を受け、少なくとも一つ以上のデータ転送要求に分割する。CPU911は該データ転送要求を、順にメモリメディアコントローラ914へ通知する。該データ転送要求は、メモリメディアコントローラ914により、前述のシステム910からメモリメディア920へのデータ転送の要求と、CPU921がRAM923に制御命令を展開するまでは、同じ手順で処理される。その後の動作は、CPU921が解読した結果によって決定する。   Hereinafter, an operation when the system 910 logically formats the memory medium 920 will be described. Performing a logical format means performing at least one data transfer process. When the user interface 915 receives a logical format request from a user of the system 910, the user interface 915 notifies the CPU 911 of the logical format request. The CPU 911 receives the notification of the logical format request and divides it into at least one data transfer request. The CPU 911 notifies the data transfer request to the memory media controller 914 in order. The data transfer request is processed by the memory media controller 914 in the same procedure until the above-described data transfer request from the system 910 to the memory medium 920 and the CPU 921 expands the control command to the RAM 923. The subsequent operation is determined based on the result of decoding by the CPU 921.

図10はCPU921による制御命令の解読の手順の一例をフローチャートで示したものである。以下、CPU921による制御命令の解読の手順を説明する。   FIG. 10 is a flowchart showing an example of a procedure for decoding a control command by the CPU 921. Hereinafter, a procedure for decoding a control command by the CPU 921 will be described.

CPU921による制御命令の解読が開始されると、先ず、S1001で現在フラッシュメモリ924が消去中であるかを示す消去フラグを参照する。該消去フラグがセットされている場合、S1002で前記制御命令解読手段により、制御命令の種別の判定を行う。なお、該消去フラグがセットされていない場合は、S1008でRAM923に制御命令を格納し制御命令処理を完了する。   When the CPU 921 starts decoding the control command, first, in S1001, an erase flag indicating whether the flash memory 924 is being erased is referred to. If the erase flag is set, the control instruction type is determined by the control instruction decoding means in S1002. If the erase flag is not set, the control command is stored in the RAM 923 in S1008 and the control command processing is completed.

S1002の判定を受け、S1003で論理フォーマット時に発行される制御命令であると判定された場合、S1004で前記消去フラグをセットし、S1005でROM923に格納されているフラッシュメモリ924の消去命令をRAM922に展開し、フラッシュメモリ924の消去処理を、前記領域情報取得手段により取得したパーティション情報を基に決定したユーザデータ領域に対して行う。一方、S1003で論理フォーマット時に発行される制御命令と判定されなかった場合、S1009で制御命令を実行し、制御命令処理を完了する。   If it is determined in S1002 that it is a control command issued during logical formatting in S1003, the erase flag is set in S1004, and the erase command for the flash memory 924 stored in the ROM 923 is stored in the RAM 922 in S1005. The data is expanded and the flash memory 924 is erased for the user data area determined based on the partition information acquired by the area information acquisition means. On the other hand, if it is not determined in S1003 that the control command is issued at the time of logical formatting, the control command is executed in S1009 and the control command processing is completed.

S1005でフラッシュメモリ914に対しての消去が完了すると、S1006で前記消去フラグをリセットし、S1007でRAM923に前記消去の間に格納された制御命令が存在するかを判定する。該制御命令が存在した場合、S1010で該制御命令を実行する。S1007およびS1010を繰り返し、S1007で該制御命令が存在しないと判定すると制御命令処理を完了する。S1008、およびS1009の実行、またはS1007でRAM923に制御命令が存在しないと判定、いずれの場合においても、制御命令処理を完了すると、CPU921はシステム910に制御命令完了通知を行う。この完了通知を受けたメモリメディアコントローラ914は、CPU911に対して要求完了通知を行う。   When the erasure to the flash memory 914 is completed in S1005, the erasure flag is reset in S1006, and it is determined in S1007 whether there is a control command stored in the RAM 923 during the erasure. If the control command exists, the control command is executed in S1010. If S1007 and S1010 are repeated and it is determined in S1007 that the control command does not exist, the control command processing is completed. In either case of executing S1008 and S1009, or determining that there is no control command in the RAM 923 in S1007, the CPU 921 sends a control command completion notification to the system 910 when the control command processing is completed. Upon receiving this completion notification, the memory media controller 914 sends a request completion notification to the CPU 911.

CPU911は、前記論理フォーマット要求を分割した少なくとも一つ以上のデータ転送要求夫々に対しての要求処理完了通知を受けるまでは、ユーザインターフェース915に要求完了通知を行わない。分割したすべてのデータ転送要求に対する要求完了通知を受けると初めてユーザインターフェース915に要求完了通知を行い、この要求完了通知通知を受けたユーザインターフェース915は、ユーザへ要求完了を示す。   The CPU 911 does not send a request completion notification to the user interface 915 until receiving a request processing completion notification for each of at least one data transfer request obtained by dividing the logical format request. When the request completion notification for all the divided data transfer requests is received, the request completion notification is sent to the user interface 915 for the first time, and the user interface 915 that has received this request completion notification notifies the user of the request completion.

以上のような方法で論理フォーマット時に、メモリメディア内で論理フォーマット時に発行される制御命令を検知し、論理フォーマットの対象となるパーティション内のユーザデータ領域に対し、イレース動作を行うことで、論理フォーマット後の該ユーザデータ領域に対する書き込み動作性能が向上する。また、フォーマット時の制御命令の検知と、イレース動作を自動的に行う機能をメモリメディア内で実装することで、システムには特別な変更を行うことなく、本発明を実現することが可能となる。   When logical formatting is performed using the method described above, a control command issued during logical formatting is detected in the memory medium, and the erase operation is performed on the user data area in the partition subject to logical formatting. The write operation performance for the later user data area is improved. In addition, the present invention can be realized without making any special changes to the system by implementing a function for automatically detecting and erasing the control command during formatting in the memory medium. .

ここで、CPU911に与えられた前記論理フォーマット要求は、ユーザインターフェース915からのみならず、CPU911が自動的に行う場合や、ある要求の実行中に発生した場合も含まれることはいうまでもない。さらに、システム910がメモリメディア920へ制御命令を発行したとき、完了通知を受けるまでは次の制御命令を発行しないという仕様である場合には、メモリメディア内に前記消去フラグを持つ必要は無いことはいうまでもない。   Here, it is needless to say that the logical format request given to the CPU 911 includes not only the user interface 915 but also the case where the CPU 911 automatically performs it or the case where it occurs during execution of a certain request. Furthermore, when the system 910 issues a control command to the memory medium 920, if the specification is such that the next control command is not issued until a completion notification is received, the memory medium need not have the erasure flag. Needless to say.

本発明の第1実施形態を示すメモリ制御装置を適応可能な画像処理システムの一例を示すブロック図である。It is a block diagram which shows an example of the image processing system which can adapt the memory control apparatus which shows 1st Embodiment of this invention. 図1に示したフラッシュROM、及び外部記憶媒体に記録される画像ファイルシステムの階層構造を示す概念図である。It is a conceptual diagram which shows the hierarchical structure of the image file system recorded on flash ROM shown in FIG. 1, and an external storage medium. 本発明の第1実施形態の特徴である、図2に示したブロックデバイス層におけるソフトウェア構造を示すブロック図である。FIG. 3 is a block diagram showing a software structure in the block device layer shown in FIG. 2, which is a feature of the first embodiment of the present invention. 図3に示したブロックデバイスサービス解析部のサービス処理手順の一例を示すフローチャート図である。It is a flowchart figure which shows an example of the service processing procedure of the block device service analysis part shown in FIG. 記憶媒体における内部のデータ構造を示すブロック図である。It is a block diagram which shows the internal data structure in a storage medium. 図5におけるMBRの内部データ構造を示すブロック図である。It is a block diagram which shows the internal data structure of MBR in FIG. 図5におけるパーティションをFATファイルシステムでフォーマットしたときの内部データ構造を示すブロック図である。FIG. 6 is a block diagram showing an internal data structure when the partition in FIG. 5 is formatted with the FAT file system. 図7におけるPBRの内部データ構造を示すブロック図である。It is a block diagram which shows the internal data structure of PBR in FIG. 本発明の第2実施形態を示すメモリ制御機構搭載のメモリメディア及びシステムの一例を示すブロック図である。It is a block diagram which shows an example of the memory medium and system with the memory control mechanism which show 2nd Embodiment of this invention. 図9におけるメモリメディアの制御命令処理手順の一例を示すフローチャート図である。FIG. 10 is a flowchart showing an example of a control instruction processing procedure of the memory medium in FIG. 9. 図7におけるBPBに含まれるパーティションのパラメータを示す表である。It is a table | surface which shows the parameter of the partition contained in BPB in FIG. 図7におけるユーザデータ領域の開始アドレスと終了アドレスを、図11におけるパラメータから計算する計算式である。12 is a calculation formula for calculating the start address and the end address of the user data area in FIG. 7 from the parameters in FIG. 本発明の第1実施形態における領域情報取得手段の判定方法を示すフローチャート図である。It is a flowchart figure which shows the determination method of the area | region information acquisition means in 1st Embodiment of this invention. 本発明の第1実施形態における論理フォーマット判定手段の判定方法を示すフローチャート図である。It is a flowchart figure which shows the determination method of the logical format determination means in 1st Embodiment of this invention.

符号の説明Explanation of symbols

5 CPU
16 カードインターフェース
17 外部記憶媒体
5 CPU
16 Card interface 17 External storage medium

Claims (6)

記憶媒体の記憶領域をブロック単位で一括消去できるメモリ制御装置であって、
前記記憶媒体に対する論理フォーマット要求時に発生する複数のアクセス要求を判定する要求判定手段と、
前記論理フォーマット要求の対象となる前記記憶媒体内の対象領域情報を取得する領域情報取得手段と、
前記要求判定手段によりアクセス要求を判定した場合に、前記領域情報取得手段により取得した対象領域情報に基づき一括消去対象領域を決定し、決定した領域に対応するブロックを一括消去する一括消去手段と
を有することを特徴とするメモリ制御装置。
A memory control device capable of collectively erasing a storage area of a storage medium in units of blocks,
Request determination means for determining a plurality of access requests generated at the time of a logical format request to the storage medium;
Area information acquisition means for acquiring target area information in the storage medium that is the target of the logical format request;
A batch erase unit that determines a batch erase target area based on the target area information acquired by the area information acquisition unit and batch erases blocks corresponding to the determined area when the request determination unit determines an access request; A memory control device comprising:
論理フォーマットを実行した場合に論理フォーマットフラグをセットする設定手段をさらに有し、
前記論理フォーマットフラグがセットされていない場合、前記要求判定手段は、前記複数のアクセス要求を判定することを特徴とする請求項1に記載のメモリ制御装置。
A setting means for setting a logical format flag when the logical format is executed;
2. The memory control device according to claim 1, wherein when the logical format flag is not set, the request determination unit determines the plurality of access requests.
論理フォーマットを実行した場合に論理フォーマットフラグをセットする設定手段と、
前記論理フォーマットフラグがセットされている場合に、ユーザデータ領域に対するアクセス要求が行われているかを判定する領域判定手段と、
をさらに有することを特徴とする請求項1または2に記載のメモリ制御装置。
Setting means for setting a logical format flag when a logical format is executed;
An area determination means for determining whether an access request to the user data area is made when the logical format flag is set;
The memory control device according to claim 1, further comprising:
前記領域判定手段が、前記ユーザデータ領域に対するアクセス要求が行なわれていると判定した場合、前記設定手段は、前記論理フォーマットフラグをリセットすることを特徴とする請求項3に記載のメモリ制御装置。   4. The memory control device according to claim 3, wherein when the area determination unit determines that an access request to the user data area is made, the setting unit resets the logical format flag. 前記ブロックは少なくとも1つ以上のセクタで構成されることを特徴とする請求項1〜4のいずれかに記載のメモリ制御装置。   The memory control device according to claim 1, wherein the block includes at least one sector. 前記記憶媒体は、SDメモリーカードであることを特徴とする請求項1〜5のいずれかに記載のメモリ制御装置。   The memory control device according to claim 1, wherein the storage medium is an SD memory card.
JP2004287649A 2004-09-30 2004-09-30 Memory control unit Pending JP2006099648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004287649A JP2006099648A (en) 2004-09-30 2004-09-30 Memory control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004287649A JP2006099648A (en) 2004-09-30 2004-09-30 Memory control unit

Publications (2)

Publication Number Publication Date
JP2006099648A true JP2006099648A (en) 2006-04-13
JP2006099648A5 JP2006099648A5 (en) 2007-08-09

Family

ID=36239360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004287649A Pending JP2006099648A (en) 2004-09-30 2004-09-30 Memory control unit

Country Status (1)

Country Link
JP (1) JP2006099648A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116873A (en) * 2007-11-06 2009-05-28 Samsung Electronics Co Ltd Solid state memory (ssm), computer system having ssm, and ssm driving method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271645A (en) * 1994-03-30 1995-10-20 Oki Electric Ind Co Ltd Semiconductor memory
JPH0997139A (en) * 1995-09-28 1997-04-08 Canon Inc Flush rom management method and device, and computer controller
JPH10199136A (en) * 1996-11-15 1998-07-31 Sony Corp Recording or reproducing device
JP2003224809A (en) * 2002-01-29 2003-08-08 Fuji Photo Film Co Ltd Data recording apparatus
JP2004171739A (en) * 2002-10-30 2004-06-17 Matsushita Electric Ind Co Ltd Recording method and recorder

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271645A (en) * 1994-03-30 1995-10-20 Oki Electric Ind Co Ltd Semiconductor memory
JPH0997139A (en) * 1995-09-28 1997-04-08 Canon Inc Flush rom management method and device, and computer controller
JPH10199136A (en) * 1996-11-15 1998-07-31 Sony Corp Recording or reproducing device
JP2003224809A (en) * 2002-01-29 2003-08-08 Fuji Photo Film Co Ltd Data recording apparatus
JP2004171739A (en) * 2002-10-30 2004-06-17 Matsushita Electric Ind Co Ltd Recording method and recorder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116873A (en) * 2007-11-06 2009-05-28 Samsung Electronics Co Ltd Solid state memory (ssm), computer system having ssm, and ssm driving method
KR101404083B1 (en) * 2007-11-06 2014-06-09 삼성전자주식회사 Solid state disk and operating method thereof

Similar Documents

Publication Publication Date Title
US6604168B2 (en) Flash eeprom management using ratio of used to unused sectors
KR100877448B1 (en) Nonvolatile storage system
JP5400875B2 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, ACCESS DEVICE, NONVOLATILE STORAGE SYSTEM, DATA WRITE METHOD, AND PROGRAM
US8719559B2 (en) Memory tagging and preservation during a hot upgrade
US20220197818A1 (en) Method and apparatus for performing operations to namespaces of a flash memory device
JP4886866B2 (en) Method for speeding up access to main storage device and storage device system
US8977802B2 (en) Access device, information recording device, controller, real time information recording system, access method, and program
US20060107009A1 (en) Storage managing system, storage managing apparatus, and storage managing method
JPWO2008117520A1 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY SYSTEM, AND HOST DEVICE
JP2011192240A (en) Storage apparatus and storage system
US20060080562A1 (en) Data recording system and data access method
US20070150661A1 (en) Information processing apparatus, information processing apparatus, and access control method
US8601232B2 (en) Memory management device, memory management method, memory management program, computer-readable recording medium recording memory management program and integrated circuit
CN113590501A (en) Data storage method and related equipment
JP2006228138A (en) Semiconductor storage device, storage control method, and information equipment
JPH0997139A (en) Flush rom management method and device, and computer controller
JP2006099648A (en) Memory control unit
JPH0997218A (en) Method and device for managing flash rom and computer control equipment
KR102571501B1 (en) The Apparatus For Memory
CN114020308A (en) Camera equipment upgrading method, device, equipment and medium
JP6995520B2 (en) Recording device
JPH0997206A (en) Method, device for managing flash rom and computer control equipment
JPH0997207A (en) Method, device for managing flash rom and computer control equipment
JP2006260158A (en) Information processing apparatus, information processing method and program
JP2005348404A (en) Digital camera

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070622

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100122

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100202

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20100630

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100706