JP2006099648A - Memory control unit - Google Patents
Memory control unit Download PDFInfo
- 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
Links
Images
Abstract
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等において記載されている。
しかしながら、消去済みの未使用イレースブロックが存在しない場合、上記フラッシュメモリの書き込みは、時間のかかる処理である。そのため、全てのイレースブロックを消費するまで書き込みを行った、フラッシュメモリ搭載のメモリメディア等に書き込みを行う場合、該メモリメディアへのデータ転送速度よりも書き込み処理速度の方が遅くなり、結果的に、データを転送するシステムのデータ転送性能を活かしきれないという問題点があった。 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
1はレンズであり、2はレンズ1を通った光を電気信号として出力するCCDユニットである。3はA/Dコンバータであり、CCDユニット2からのアナログ信号をデジタル信号へ変換する。4はSSGユニットであり、CCDユニット2とA/Dコンバータ3に同期信号を供給する。5はCPUであり、本カメラシステムにおける各種の制御を実現する。
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
13はROMであり、OS等のシステムプログラムを格納する。14はDRAMであり、本電子カメラの主記憶である。15はフラッシュROMであり、内蔵記憶媒体として使用する。16はSD(Secure Digital)カードのインターフェース部、17はSDメモリーカードなどの外部記憶媒体である。また、18はDMAコントローラ、19はストロボである。
A
この電子カメラの撮影時の動作に説明する。コントロールパネル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
さて、レリーズスイッチの押下により、SSG4がCCD2を駆動する。CCD2から出力されるアナログ信号は、A/Dコンバータ3でデジタル信号へ変換される。A/Dコンバータ3の出力は、DMAコントローラ18によってDRAM14へDMA転送される。1フレーム分のDMA転送が終了した時点でCPU5は、信号処理シーケンスを開始する。
Now, when the release switch is pressed, the
信号処理シーケンスでは、フラッシュROM15から信号処理プログラムを主記憶(DRAM14)上に読み出し、主記憶上のデータを信号処理アクセラレータ6へ転送し信号処理を行う。ただし、信号処理アクセラレータ6は信号処理の全てを行うわけではなく、CPU5で行う処理の特に時間のかかる処理などを助ける演算回路であり、CPU5の処理ソフトウェアと連携して動作する。信号処理の一部または全部が終了すると画像ファイルとして、カードインターフェース16を介して、外部記憶媒体17へ記録する。このとき記録するファイルフォーマットが圧縮処理を必要とするのであれば圧縮も行う。
In the signal processing sequence, a signal processing program is read from the
図2は、図1に示した外部記憶媒体17に記録される画像ファイルシステムの階層構造を示す概念図であり、例えば階層L1〜L4で構成される場合に対応する。
FIG. 2 is a conceptual diagram showing the hierarchical structure of the image file system recorded in the
図において、最上位の階層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
(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
ブロックデバイスサービス解析部302が提供するサービスは、(1)、(2)、及び(3)であり、ブロックデバイスAPI301と同じサービスをファイルシステムアーキテクチャ層に提供する。そのため、ファイルシステムアーキテクチャ層は、下位がブロックデバイスAPIであっても、ブロックデバイスサービス解析部であっても、特別な操作をすることなく、同じように下位層が提供するサービスを利用することができる。
The services provided by the block device
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
前記論理フォーマット判定手段と、前記領域情報取得手段について説明する前に、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,
パーティションとは、該記憶媒体の区分けを意味し、一つのパーティションは、一つのファイルシステムにより管理される。一つの記憶媒体は、少なくとも一つ以上のパーティションによって構成される。パーティションテーブル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.
図7の702、及び703はFAT(File Allocation Table)で、ユーザデータ領域705に格納されているファイルの位置情報が収められている。FATファイルシステムは、FAT702及び703により、パーティションに格納されているファイルの位置情報を取得する。そのため、ユーザデータ領域にファイルが格納されていても、FAT702及び703に該ファイルの位置情報が格納されていなければ、ファイルとして認識できない。704はディレクトリエントリで、ルートディレクトリに格納されたファイルの管理情報が収められている。705はユーザデータ領域でファイルの本体が格納されている。
ブロックデバイスサービス解析部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
ブロックデバイスサービス解析部302が有する前記論理フォーマット判定手段について説明する。前記論理フォーマット判定手段には、ユーザデータ領域の使用容量を示す、ユーザデータ領域使用容量情報が必要となる。該ユーザデータ領域使用容量情報は、FATが全削除状態であるかの判定に利用される。図14は、前記論理フォーマット判定手段で、要求されたサービスが論理フォーマット時に要求されるサービスであるかの判定を行うときの動作をフローチャートで示している。
The logical format determination unit included in the block device
先ず、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
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
ブロックデバイスサービス解析部302が、サービスを要求されたとき、先ず、S401で前記論理フォーマットフラグを参照する。S402で該論理フォーマットフラグの状態を判定し、該論理フォーマットフラグがセットされていない場合は、前記論理フォーマット判定手段により、要求されたサービスの種別の判定を行う。S410の丸Aは、図14の丸Aに繋がる。前記論理フォーマット判定手段により、論理フォーマット時に要求されるサービスであると判定された場合は、S411の丸Bに進み、S405で前記領域情報取得手段によりユーザデータ領域を判定し、406で該ユーザデータ領域に対し、下位のブロックデバイスAPIのサービス(3)を利用しイレース動作を行う。続いて、S407で前記論理フォーマットフラグをセットする。
When the block device
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
以上のような方法で論理フォーマット時に、論理フォーマットの対象となるパーティション内のユーザデータ領域に対し、イレース動作を自動的に行うことで、論理フォーマット後の該ユーザデータ領域に対する書き込み動作性能が向上する。また、ブロックデバイス層で論理フォーマットの認識、イレース動作の実行を自動的に行うことで、既存のファイルシステムソフトウェアをそのまま用いることが可能となり、また、変更も容易となる。 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
さらに、本実施形態の説明においては、外部記憶媒体として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,
図において、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
921はコントローラで、システム910から送信される制御命令を受信する手段と、該制御命令を解読する制御命令解読手段と、解読した該制御命令を実行する手段と、該制御命令によりアクセスされるパーティションの領域情報を取得する領域情報取得手段を有することを特徴とし、これらの手段を基にメモリメディア920の制御を行う。ここで制御命令解読手段とは、第1実施形態におけるブロックデバイスサービス解析部が有する論理フォーマット判定手段と同様の能力であり、領域情報取得手段とは領域情報取得手段と同様の能力である。
921 is a controller, means for receiving a control instruction transmitted from the
922はROMで、CPU921が前記解読した制御命令を実行するときに必要となるプログラムと、該プログラムを実行するときに必要となるデータが格納されている。923はRAMで、CPU921が実行するプログラム、およびデータの一時的な記憶領域として利用される。924はフラッシュメモリで、システム910から転送されたデータが格納されている。
Reference numeral 922 denotes a ROM which stores a program required when the
以下、システム910のユーザが、ユーザインターフェース915を操作することにより、システム910に対し、動作要求が行われたときのシステム910、およびメモリメディア920の動作について説明する。
Hereinafter, operations of the
システム910のユーザが、ユーザインターフェース915を操作すると、前記動作要求がCPU911に通知される。前記動作要求を受けたCPU911は、前記動作要求を実現するプログラムと、該プログラムを実行するときに必要となるデータをROM912からRAM913へ展開し、実行する。前記プログラムを実行した後、システム910において何らかの変化があった場合で、かつこの変化をユーザに通知する必要があるときは、CPU911がユーザインターフェース915を制御し、変化を通知する。
When the user of the
以下、システム910からメモリメディア920へ、あるいはメモリメディア920からシステム910へデータを転送するデータ転送処理の動作について説明する。
The operation of data transfer processing for transferring data from the
システム910のユーザからユーザインターフェース915へ、データ転送処理の要求を与えられると、ユーザインターフェース915は、CPU911へ該データ転送処理の要求を通知する。CPU911は、該データ転送処理の要求を受けると、メモリメディアコントローラ914に該データ転送処理に対するメモリメディア920の制御命令の発行を要求する。要求を受けたメモリメディアコントローラ914は、制御命令を作成し、該制御命令をメモリメディア920に送信する。
When a request for data transfer processing is given from the user of the
メモリメディア920に送信された該制御命令は、CPU921が受け付け、RAM923に展開し解読する。後述するCPU921による制御命令の解読の手順により、解読の結果がメモリメディア920からシステム910へのデータ転送であった場合、フラッシュメモリ924から制御命令内に指定されたアドレスのデータを送信する。逆に、解読の結果がシステム910からメモリメディア920へのデータ転送であった場合、制御命令後に受信するデータを、フラッシュメモリ924の制御命令内に指定されたアドレスへ書き込む。いずれの場合も、処理が完了すると、CPU921はメモリメディアコントローラ914に制御命令完了通知を行う。
The control command transmitted to the
メモリメディアコントローラ914は、該制御命令完了通知を受けると、CPU911に要求完了通知を行う。CPU911は要求完了通知を受け、ユーザインターフェース915に対して、要求完了通知を行う。ユーザインターフェース915は、ユーザに対して要求処理完了を示す。
Upon receiving the control command completion notification, the
以下、システム910がメモリメディア920を論理フォーマットするときの動作について説明する。論理フォーマットを行うということは、少なくとも一つ以上のデータ転送処理を行うということである。ユーザインターフェース915がシステム910のユーザから論理フォーマット要求を受けた場合、ユーザインターフェース915は、該論理フォーマット要求をCPU911へ通知する。CPU911は該論理フォーマット要求の通知を受け、少なくとも一つ以上のデータ転送要求に分割する。CPU911は該データ転送要求を、順にメモリメディアコントローラ914へ通知する。該データ転送要求は、メモリメディアコントローラ914により、前述のシステム910からメモリメディア920へのデータ転送の要求と、CPU921がRAM923に制御命令を展開するまでは、同じ手順で処理される。その後の動作は、CPU921が解読した結果によって決定する。
Hereinafter, an operation when the
図10はCPU921による制御命令の解読の手順の一例をフローチャートで示したものである。以下、CPU921による制御命令の解読の手順を説明する。
FIG. 10 is a flowchart showing an example of a procedure for decoding a control command by the
CPU921による制御命令の解読が開始されると、先ず、S1001で現在フラッシュメモリ924が消去中であるかを示す消去フラグを参照する。該消去フラグがセットされている場合、S1002で前記制御命令解読手段により、制御命令の種別の判定を行う。なお、該消去フラグがセットされていない場合は、S1008でRAM923に制御命令を格納し制御命令処理を完了する。
When the
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
S1005でフラッシュメモリ914に対しての消去が完了すると、S1006で前記消去フラグをリセットし、S1007でRAM923に前記消去の間に格納された制御命令が存在するかを判定する。該制御命令が存在した場合、S1010で該制御命令を実行する。S1007およびS1010を繰り返し、S1007で該制御命令が存在しないと判定すると制御命令処理を完了する。S1008、およびS1009の実行、またはS1007でRAM923に制御命令が存在しないと判定、いずれの場合においても、制御命令処理を完了すると、CPU921はシステム910に制御命令完了通知を行う。この完了通知を受けたメモリメディアコントローラ914は、CPU911に対して要求完了通知を行う。
When the erasure to the
CPU911は、前記論理フォーマット要求を分割した少なくとも一つ以上のデータ転送要求夫々に対しての要求処理完了通知を受けるまでは、ユーザインターフェース915に要求完了通知を行わない。分割したすべてのデータ転送要求に対する要求完了通知を受けると初めてユーザインターフェース915に要求完了通知を行い、この要求完了通知通知を受けたユーザインターフェース915は、ユーザへ要求完了を示す。
The CPU 911 does not send a request completion notification to the
以上のような方法で論理フォーマット時に、メモリメディア内で論理フォーマット時に発行される制御命令を検知し、論理フォーマットの対象となるパーティション内のユーザデータ領域に対し、イレース動作を行うことで、論理フォーマット後の該ユーザデータ領域に対する書き込み動作性能が向上する。また、フォーマット時の制御命令の検知と、イレース動作を自動的に行う機能をメモリメディア内で実装することで、システムには特別な変更を行うことなく、本発明を実現することが可能となる。 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
5 CPU
16 カードインターフェース
17 外部記憶媒体
5 CPU
16
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:
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)
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)
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 |
-
2004
- 2004-09-30 JP JP2004287649A patent/JP2006099648A/en active Pending
Patent Citations (5)
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)
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 |