JP2010049303A - Memory controller, non-volatile storage device, access device, and non-volatile storage system - Google Patents
Memory controller, non-volatile storage device, access device, and non-volatile storage system Download PDFInfo
- Publication number
- JP2010049303A JP2010049303A JP2008210415A JP2008210415A JP2010049303A JP 2010049303 A JP2010049303 A JP 2010049303A JP 2008210415 A JP2008210415 A JP 2008210415A JP 2008210415 A JP2008210415 A JP 2008210415A JP 2010049303 A JP2010049303 A JP 2010049303A
- Authority
- JP
- Japan
- Prior art keywords
- data
- command
- packet
- unit
- storage device
- 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
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本発明は、不揮発性メモリを制御するメモリコントローラ、不揮発性メモリとメモリコントローラを備えた不揮発性記憶装置、前記不揮発性記憶装置へアクセスするアクセス装置、及び前記不揮発性記憶装置とアクセス装置を構成に備える不揮発性記憶システムに関する。 The present invention includes a memory controller that controls a nonvolatile memory, a nonvolatile memory device including the nonvolatile memory and the memory controller, an access device that accesses the nonvolatile memory device, and the nonvolatile memory device and the access device. The present invention relates to a nonvolatile storage system provided.
書き換え可能な不揮発性メモリを備える不揮発性記憶装置は、半導体メモリカードを中心にその需要が広まっている。不揮発性記憶装置は、光ディスクやテープメディアなどと比較して高価格なものではあるが、小型・軽量・耐震性・取り扱いの簡便さ等のメリットにより、デジタルスチルカメラや携帯電話などのポータブル機器の記録媒体としてその需要が広まっている。この不揮発性記憶装置は、不揮発性の主記憶メモリとしてフラッシュメモリを備え、それを制御するメモリコントローラを有している。メモリコントローラは、デジタルスチルカメラやパソコン(パーソナルコンピュータ)本体等のアクセス装置からの読み書き指示に応じて、フラッシュメモリに対する読み書き制御を行うものとなっている。 The demand for nonvolatile memory devices including a rewritable nonvolatile memory is increasing, especially for semiconductor memory cards. Non-volatile storage devices are more expensive than optical discs and tape media, but due to merits such as small size, light weight, earthquake resistance, and ease of handling, portable devices such as digital still cameras and mobile phones The demand for recording media is widening. This nonvolatile storage device includes a flash memory as a nonvolatile main storage memory, and has a memory controller that controls the flash memory. The memory controller performs read / write control on the flash memory in response to a read / write instruction from an access device such as a digital still camera or a personal computer (personal computer) main body.
半導体メモリカードやポータブルオーディオなどの製品に内蔵されたフラッシュメモリは、記憶単位であるメモリセルアレイへの書き込みや消去に比較的長い時間を必要とするため、複数のメモリセルを一括して消去したり書き込んだりできる構造となっている。具体的には、複数の物理ブロック(消去単位)から構成され、各物理ブロックは複数のページ(書き込み単位)を含み、消去は物理ブロック単位で、書き込みはページ単位で行われる。 Flash memory built into products such as semiconductor memory cards and portable audio devices requires a relatively long time to write to and erase from the memory cell array, which is a storage unit. It has a structure that can be written. Specifically, it is composed of a plurality of physical blocks (erase units), each physical block includes a plurality of pages (write units), erase is performed in units of physical blocks, and writing is performed in units of pages.
このような不揮発性記憶装置をデジタルスチルカメラ等のアクセス装置に取り付けて、アクセス装置側からリムーバブルディスクと見なして例えばFATファイルシステム等のファイルシステムで管理する。FATファイルシステムは、ファイル・アローケション・テーブル(以降、FATと明記する)を用いて「クラスタ」ごとにファイルデータを管理し、半導体メモリカードなどの不揮発性記憶装置へファイルデータを書き込む際には、空きクラスタにファイルデータをアロケートし、さらに該ファイルデータと該ファイルデータがアロケートされたクラスタ番号(論理アドレス)とを不揮発性記憶装置に指定する。 Such a nonvolatile storage device is attached to an access device such as a digital still camera, and is regarded as a removable disk from the access device side and managed by a file system such as a FAT file system. The FAT file system manages file data for each “cluster” using a file allocation table (hereinafter referred to as FAT), and writes file data to a nonvolatile storage device such as a semiconductor memory card. The file data is allocated to the free cluster, and the file data and the cluster number (logical address) to which the file data is allocated are designated in the nonvolatile storage device.
ファイルデータは、データの実体であるユーザーデータと、ユーザーデータを管理するための管理情報データである、FAT1、FAT2、ディレクトリエントリ(以後DIRと略記する)に大別される。FAT1は、上述したクラスタ単位でのファイルアロケート情報である。FAT2はFAT1のバックアップであり、FAT1と同じ内容を不揮発性記憶装置の別の領域に保持する。DIRはファイル名、ファイル書き込み時刻などファイルの属性が保持されたデータである。FAT1とFAT2の内容が完全に一致したときに限り、FAT情報は正常であるとする。 File data is roughly divided into user data, which is the actual data, and FAT1, FAT2, and directory entries (hereinafter abbreviated as DIR), which are management information data for managing user data. FAT1 is file allocation information in units of clusters described above. FAT2 is a backup of FAT1, and holds the same contents as FAT1 in another area of the nonvolatile storage device. DIR is data in which file attributes such as file name and file write time are held. It is assumed that the FAT information is normal only when the contents of FAT1 and FAT2 completely match.
ところで、SDカードをはじめとする半導体メモリカードは、複数のホスト間でのデータ共有が容易にできるブリッジメディアとしての役割が大きく、ホストに対して装着、抜去が容易であることが特徴である。従ってホストから半導体メモリカードに対してデータの書き込みの最中に、ユーザーの故意または不注意により半導体メモリカードが抜去される可能性がある。このとき、ユーザーデータと、FATデータとの関係に不整合が生じると、すでに記録したファイルデータを正しく読み出すことができなくなる。 By the way, a semiconductor memory card such as an SD card has a significant role as a bridge medium that can easily share data among a plurality of hosts, and is characterized by being easily mounted and removed from a host. Therefore, there is a possibility that the semiconductor memory card is removed by the user's intention or carelessness while writing data from the host to the semiconductor memory card. At this time, if a mismatch occurs between the user data and the FAT data, the already recorded file data cannot be read correctly.
上記を解決するための手段として、特許文献1に、旧データが書き換えられた物理領域に対応するアドレス管理情報を、無効予定状態とし、一連の書き込み処理終了までは書き込みを禁止とすることにより、データ書き込み中に抜去等により電源遮断等の障害が生じても、書き込み前の状態、即ち旧データが残っている状態に戻す方法が開示されている。
As means for solving the above, in
図7は、不揮発性記憶装置の一つであるSDカードと、ビデオカメラ等のアクセス装置からなる従来の不揮発性記憶システムについて説明したブロック図である。また図8は、図7に示すSDカードの不揮発性メモリ770の論理アドレス空間の一例を示した図である。図8は、FAT1、FAT2データは、システム領域772内の所定の位置に、ユーザーデータとDIRはユーザーデータ領域771に格納されることを示している。
FIG. 7 is a block diagram illustrating a conventional nonvolatile storage system including an SD card which is one of nonvolatile storage devices and an access device such as a video camera. FIG. 8 is a diagram showing an example of the logical address space of the
アクセス装置700とSDカード710は、インターフェースバス720で接続されている。アクセス装置700は、アプリケーション730、ファイルシステム740、およびSDカードI/F部750を含む。一方SDカード710は、アクセス装置I/F部760と不揮発性メモリ770から構成される。アクセス装置I/F部760はコマンド解析部761と書き込み制御部762を含み、また不揮発性メモリ770はユーザーデータ領域771とシステム領域772を含む。
アプリケーション730はAPI呼出部731とユーザーデータ入力部732からなる。ユーザーデータ入力部732は、ファイルに書き込むユーザーデータの供給元であり、アクセス装置700内部の記憶装置(図示せず)から供給される場合もあれば、アクセス装置700の外部からI/F(図示せず)を介して供給される場合もある。
The
ファイルシステム740は、コマンド生成部741と書き込みアドレス生成部742と、管理情報データ生成部743からなる。
The
ユーザーデータのSDカード710への書き込みは、アプリケーション730が、API呼出部731よりAPIを呼び出すと、コマンド生成部741がインターフェースバス720上でのWriteコマンドを、書き込みアドレス生成部742が書き込み先論理アドレスをSDカードI/F部750に供給し、インターフェースバス720上にWriteコマンドおよびユーザーデータ入力部732より供給される書き込むユーザーデータを転送することで実施する。
For writing user data to the
アクセス装置I/F部760はコマンド解析部761にてコマンドを解釈する。コマンドがWriteコマンドのようにデータを伴う場合、アプリケーション730は、ユーザーデータ入力部732より供給されるユーザーデータをSDカードI/F部750を介してインターフェースバス720経由で転送する。
The access device I /
アクセス装置I/F部760がユーザーデータを受信したとき、書き込み制御部762は、ユーザーデータ領域771内の指定された論理アドレスに当該ユーザーデータを書き込む。
When the access device I /
一方FATデータの書き込みは以下のように実施される。アプリケーション730がAPI呼出部731より同期APIを呼び出すと、コマンド生成部741はFAT1データのWriteコマンドが発行され、続いて管理情報データ生成部743のFAT1データをSDカードI/F部750を介してインターフェースバス720経由で転送する。
On the other hand, FAT data is written as follows. When the
アクセス装置I/F部760がFAT1データを受信したとき、書き込み制御部762は、システム領域772内の指定された論理アドレスに当該FAT1データを書き込む。
When the access device I /
以下同様にFAT2データ、DIRデータのWriteコマンドが発行され、前者はシステム領域772内に、後者はユーザーデータ領域771内にデータが書き込まれることで、ファイル同期APIが完了する。
Thereafter, a write command for FAT2 data and DIR data is issued in the same manner, and the former is written in the
図9は、図7の不揮発性記憶システムにおいて、動画等のユーザーデータを連続的に記録する場合の、インターフェースバス720上のコマンドおよびファイルデータを時系列に説明した図である。現行のSDカードでは、カード内部で処理を実行中(busy状態)に別のコマンドを発行することができない。またAPI呼出部731がAPIを呼び出したとき、所定の処理が完了するまでblockingされる。
FIG. 9 is a diagram illustrating, in time series, commands and file data on the
また論理アドレス空間上で、アドレスが不連続の領域に1回のコマンドでファイルデータの読み書きはできない。さらに通常、ファイルデータの書き込みは、上述したように最初にユーザーデータを書き込み、上記が正常に終了した後、FATなど、対応する管理情報データの書き込みを実施しなればならない。仮に管理情報データ、ユーザーデータの順に書き込む場合、ユーザーデータ書き込み中に抜去等による電源遮断が発生したとき、FATは正しく更新されているが、対応するユーザーデータが更新されていない場合が生じる。そのため、当該ファイルデータをReadするとき、書き込みに失敗したユーザーデータのクラスタが読み出されることになり、正しくデータをReadすることができなくなるからである。ユーザーデータ、管理情報データの順であれば、例えば特許文献1に記載の方法により、ファイルデータRead時の不整合を防止することができる。
In addition, in the logical address space, file data cannot be read / written with a single command in a discontinuous area. Further, normally, in writing file data, user data must first be written as described above, and after the above has been completed normally, corresponding management information data such as FAT must be written. If the management information data and the user data are written in this order, the FAT is correctly updated when the power is shut off due to removal or the like during the writing of the user data, but the corresponding user data may not be updated. For this reason, when reading the file data, a cluster of user data that has failed to be written is read, and the data cannot be read correctly. In the order of user data and management information data, for example, the method described in
アプリケーション730のAPI呼出部731がユーザーデータaの書き込みAPIを発行すると、ファイルシステム740のコマンド生成部741は「Write(ユーザーデータa)」を発行し、続けてユーザーデータ入力部732より供給されたユーザーデータaがアクセス装置700からSDカード710に転送される。通常インターフェースバス720上の転送速度より、不揮発性メモリへ770への書き込み速度が低く、かつ書き込み制御部762でのアドレス変換、プログラミング等のオーバーヘッドがあるため、所定のユーザーデータ転送が完了してもSDカード710内部での処理が未完了のため、しばらくbusy状態が継続する。busy状態では、インターフェースバス720上のコマンドは発行できない。
When the
ユーザーデータaの書き込みが完了し、busy状態が解除になった後、アプリケーション730のAPI呼出部731は同期APIを呼び出すことができる。このとき、ファイルシステム740は、SDカードI/F部750を介してユーザーデータaに対応するFAT1aデータのWriteコマンドを発行することができる。
After the writing of the user data a is completed and the busy state is released, the
時刻T1でFAT1aのWriteコマンドが発行されたとき、続けてFAT1aデータが転送される。以後同様にFAT2a、DIRaのWriteコマンドが発行される。なお、FAT1、FAT2、DIRの管理情報データは通常サイズが小さいため、ここではデータ転送完了とbusy状態解除がほぼ同時であるとみなす。 When the FAT1a Write command is issued at time T1, the FAT1a data is subsequently transferred. Thereafter, the FAT2a and DIRa Write commands are issued in the same manner. Note that the management information data of FAT1, FAT2, and DIR are usually small in size, and therefore, here, it is considered that data transfer completion and busy state cancellation are almost simultaneous.
DIRaの書き込みが完了した後、アプリケーション730のAPI呼出部731はユーザーデータbの書き込みAPIを発行できる。
このように、従来の不揮発性記憶システムにおいては、インターフェースバス720上でコマンドもしくはファイルデータの転送が実施されていなくても、SDカードがbusy状態であればコマンドの発行を実施することができないため、バスを効率的に利用できない、という課題があった。
As described above, in the conventional nonvolatile storage system, even if the command or file data is not transferred on the
そこで本発明の目的は、ファイルデータ書き込みなどコマンド処理実行中であっても別のコマンドを発行してインターフェースバスを効率よく利用することである。 Therefore, an object of the present invention is to efficiently use the interface bus by issuing another command even during command processing such as writing file data.
前記目的を達成するため本発明は、不揮発性メモリへのデータ記録を制御するメモリコントローラにおいて、不揮発性メモリへのデータ書き込み、又は不揮発性メモリからのデータ読み出しを行う読み書き制御部と、外部から、処理要求が示されるコマンドパケット及び不揮発性メモリへ書き込むデータ有するデータパケットを受信し、これら受信パケットを解析するパケット解析部と、コマンドパケットが有する処理要求を蓄積し、要求される処理の実行時期を管理するコマンドスケジューラとを備え、パケット解析部は、読み書き制御部が不揮発性メモリへのデータ書き込み又はデータ読み出しを行っている際に、コマンドパケットを受信し、該コマンドパケットの処理要求をコマンドスケジューラへ蓄積することを特徴とするものである。 In order to achieve the above object, the present invention provides a memory controller for controlling data recording to a nonvolatile memory, a read / write control unit for writing data to the nonvolatile memory or reading data from the nonvolatile memory, and externally. A command packet indicating a processing request and a data packet having data to be written to the non-volatile memory are received, a packet analysis unit for analyzing the received packet, a processing request included in the command packet is accumulated, and an execution timing of the required processing is determined. A packet scheduler that receives a command packet when the read / write controller is writing data to or reading data from the nonvolatile memory, and sends a processing request for the command packet to the command scheduler. It is characterized by accumulating .
これにより、メモリコントローラが不揮発性メモリへデータ書き込み又はデータ読み出しを行っている場合でも、パケット解析部は外部からコマンドパケットを受信することが可能となる。 As a result, even when the memory controller is writing data to or reading data from the nonvolatile memory, the packet analyzer can receive a command packet from the outside.
さらに本発明は、上記に記載のメモリコントローラにおいて、受信パケットは、関連付けられるコマンドパケットとデータパケットで共通の識別子を有し、コマンドパケットが有する処理要求の実施状況を識別子で管理する管理部を備え、コマンドスケジューラは、実施状況に基づいて、次に実施する処理及び実行時期を管理することを特徴とするものである。 Further, according to the present invention, in the memory controller described above, the received packet has a common identifier for the associated command packet and data packet, and includes a management unit that manages an execution status of a processing request included in the command packet by the identifier. The command scheduler is characterized by managing the next process to be executed and the execution time based on the execution status.
これにより、コマンドスケジューラは、個々のコマンドパケットとデータパケットの関連性を識別(認識)することが可能となる。 As a result, the command scheduler can identify (recognize) the relationship between individual command packets and data packets.
なお、上記の発明は上記に記載のメモリコントローラと不揮発性メモリを備えた不揮発性記憶装置としても実現することが可能である。この場合には、本発明を各種の情報(データ)を記録する情報記憶媒体として実現することが可能となる。 The above-described invention can also be realized as a nonvolatile storage device including the memory controller and the nonvolatile memory described above. In this case, the present invention can be realized as an information storage medium for recording various information (data).
また本発明は、不揮発性メモリを有する不揮発性記憶装置へデータ書き込みを指示するアクセス装置において、不揮発性記憶装置への処理要求を生成するコマンド生成部と、不揮発性記憶装置へ転送するデータと関連付けられる処理要求に対して共通の識別子を割り当てる識別子生成部と、転送するデータ及び処理要求から、共通の識別子を有したデータパケット及びコマンドパケットを生成するとともに、不揮発性記憶装置の処理状態を検出し、不揮発性記憶装置が処理中の際には、不揮発性記憶装置へコマンドパケットのみを出力するデータバッファ部とを備えることを特徴とするものであってもよい。 Further, the present invention relates to a command generation unit that generates a processing request to a nonvolatile storage device and an associated data to be transferred to the nonvolatile storage device in an access device that instructs data writing to the nonvolatile storage device having a nonvolatile memory An identifier generation unit that assigns a common identifier to a processing request to be generated, and generates a data packet and a command packet having a common identifier from data to be transferred and the processing request, and detects a processing state of the nonvolatile storage device A data buffer unit that outputs only a command packet to the nonvolatile storage device when the nonvolatile storage device is processing may be provided.
これにより、アクセス装置は不揮発性記憶装置の処理状態を検出することで、不揮発性記憶装置へ出力するパケットを選択することが可能となる。そのため、不揮発性記憶装置内部でデータの書き込み又は読み出しが行われている際にも、アクセス装置はコマンドパケットを不揮発性記憶装置へ出力することが可能となる。 Thus, the access device can select a packet to be output to the nonvolatile storage device by detecting the processing state of the nonvolatile storage device. Therefore, the access device can output a command packet to the nonvolatile memory device even when data is written or read in the nonvolatile memory device.
さらに本発明は、上記のアクセス装置において、識別子生成部は、不揮発性記憶装置へ転送するデータと関連付けられる該データの管理情報に係わる処理要求についてのみ共通の識別子を割り当てることを特徴とするものであってもよい。 Furthermore, the present invention is characterized in that, in the above access device, the identifier generation unit assigns a common identifier only for a processing request related to management information of the data associated with the data to be transferred to the nonvolatile storage device. There may be.
これにより、不揮発性記憶装置は、個々のコマンドパケットとデータパケットの関連性を識別(認識)することが可能となる。 As a result, the nonvolatile storage device can identify (recognize) the relationship between individual command packets and data packets.
また本発明は、上記の不揮発性記憶装置とアクセス装置を備える不揮発性記憶システムとしても実現することが可能である。この場合には、情報(データ)を記録する情報記憶媒体及びそれに接続されるアクセス装置(ホスト装置)とを備えたシステム全体として効率的にアクセス装置から不揮発性記憶システムへ効率的にデータ及びコマンドの転送が可能となる。 The present invention can also be realized as a nonvolatile storage system including the above-described nonvolatile storage device and access device. In this case, data and commands can be efficiently transferred from the access device to the nonvolatile storage system efficiently as a whole system including an information storage medium for recording information (data) and an access device (host device) connected thereto. Can be transferred.
本発明によれば、アクセス装置からあるコマンドの実行前、もしくは実行中に、別のコマンドを発行することでコマンド処理のスループットが向上し、インターフェースバスを効率的に利用することが可能となる。 According to the present invention, by issuing another command before or during execution of a certain command from the access device, the throughput of command processing is improved, and the interface bus can be used efficiently.
(第1の実施の形態)
図1は、本発明の実施の形態に於ける不揮発性記憶システムの実施方法を示したブロック図である。図1において、不揮発性記憶システムは、アクセス装置100と不揮発性記憶装置110とから構成され、両者はインターフェースバス120を介して接続される。
(First embodiment)
FIG. 1 is a block diagram showing a method for implementing a nonvolatile memory system according to an embodiment of the present invention. In FIG. 1, the nonvolatile storage system includes an
アクセス装置100は、アプリケーション130、ファイルシステム140、不揮発性記憶装置I/F部150から構成される。
The
アプリケーション130は、API呼出部131、ユーザーデータ入力部132を含む。またファイルシステム140は、コマンド生成部141、書き込みアドレス生成部142、Seq#生成部143、管理情報データ生成部144を含む。また、不揮発性記憶装置I/F部150は、ヘッダ生成部151、SubSeq#生成部152、データバッファ153を含む。
The
一方不揮発性記憶装置110は、アクセス装置I/F部160および不揮発性メモリ170から構成される。アクセス装置I/F部160は、パケット解析部161、コマンドスケジューラ162、コマンド実行部163、書き込み制御部164、Seq#管理部165を含む。また不揮発性メモリ170は、少なくともユーザーデータ領域171、システム領域172を含む。なお、不揮発性メモリ170内の、ユーザーデータ領域171およびシステム領域172における論理アドレス空間は、図8と同様とする。
On the other hand, the
図2は、本実施の形態において、インターフェースバス120上のパケット構成を説明した図である。
FIG. 2 is a diagram illustrating a packet configuration on the
図2(a)は、インターフェースバス120上のパケットの基本形である。パケットは、パケット送信順を示すパケット番号(以下パケット#と略記する)、パケットがコマンドであるかデータを示すパケットID、パケットの長さを示すパケット長を含むヘッダと、パケットの内容を示すペイロードから構成される。ヘッダは、パケットがコマンド、データに関わらず共通のフォーマットである。一方ペイロードは、パケットIDによりそのフォーマットが変化する。
FIG. 2A shows a basic form of a packet on the
図2(b)は、コマンドの一例として、Writeコマンドのパケット構成を示したものである。Writeコマンドパケットは、パケット#、パケットID(ここでは「コマンド」が設定される)、パケット長からなるヘッダに続き、コマンド種別(ここでは「Write」が設定される)、どのようなデータをWriteするかを識別するデータ種別(「ユーザーデータ」、「FAT1」などが設定される)、Seq番号、SubSeq番号(以下それぞれSeq#、SubSeq#と略記する)から構成される。Seq#、SubSeq#については、後述する。 FIG. 2B shows a packet structure of the Write command as an example of the command. The Write command packet has a header consisting of packet #, packet ID (here “command” is set), packet length, command type (here “Write” is set), and what data is written. Data type (“user data”, “FAT1”, etc. are set), Seq number, and SubSeq number (hereinafter abbreviated as Seq # and SubSeq #, respectively). Seq # and SubSeq # will be described later.
図2(c)は、ユーザーデータのWriteコマンドにより、アクセス装置100から不揮発性記憶装置110に転送されるユーザーデータのパケット構成を示したものである。ユーザーデータパケットは、パケット#、パケットID(ここでは「データ」が設定される)、パケット長からなるヘッダに続き、データ種別(ここでは「ユーザーデータ」が設定される)、Seq#、SubSeq#、書き込み先アドレス(論理アドレス)、ユーザーデータ実体(誤り訂正符号等も含む)から構成される。
FIG. 2C shows a packet structure of user data transferred from the
図2(d)は、管理情報データの一例として、FAT1データのWriteコマンドにより、アクセス装置100から不揮発性記憶装置110に転送されるFAT1データのパケット構成を示したものである。FAT1データパケットは、パケット#、パケットID(ここでは「データ」が設定される)、パケット長からなるヘッダに続き、データ種別(ここでは「FAT1」が設定される)、Seq#、SubSeq#、書き込み先アドレス(論理アドレス)、FAT1データ実体(誤り訂正符号等も含む)から構成される。
FIG. 2D shows a packet configuration of FAT1 data transferred from the
以下、図1、図2を用いて、アクセス装置100から不揮発性記憶装置110にデータを書き込むときの動作について説明する。このときインターフェースバス120上には、1個のWriteコマンドパケットに続き、1又は複数個のデータパケットが送信される。
Hereinafter, an operation when data is written from the
はじめにWriteコマンドパケットについて説明する。アプリケーション130内のAPI呼出部131により、データ書き込みのAPIが呼び出される。このときファイルシステム140には、上記指示に合わせて少なくともデータ長、データ参照先が指示される。データ参照先は、ユーザーデータであればユーザーデータ入力部132上の、管理情報データであれば管理情報データ生成部144の所定の領域である。
First, the Write command packet will be described. An API for data writing is called by the
ファイルシステム140は、コマンド生成部141でインターフェースバス120上でのWriteコマンドを生成する。さらにSeq#生成部143で、当該WriteコマンドのSeq#を生成する。Seq#は、ユーザーデータと対応する管理情報データとこれらのデータを記録するためのコマンドを関連付けるための数値であり、Seq#生成部143で一定の規則にしたがって生成する。本実施の形態では、説明の簡略化のために単調増加となるように生成するものとする。ファイルシステム140は、上述したWriteコマンドおよびSeq#を不揮発性記憶装置I/F部150内のデータバッファ153に供給する。
In the
不揮発性記憶装置I/F部150では、上記に対して、ヘッダ生成部151により生成されるヘッダ、SubSeq#生成部152により生成されるSubSeq#を付加して、Writeコマンドパケットを生成する。このとき、ヘッダのパケットIDは「コマンド」となる。またコマンドパケットの場合、SubSeq#は常に終端情報が設定される。以下SubSeq#は8ビット長であると仮定し、終端情報は0xFFであると定義する。
In addition to the above, the nonvolatile storage device I /
Writeコマンドパケットは、インターフェースバス120を介して、不揮発性記憶装置110のパケット解析部161に供給される。
The Write command packet is supplied to the
パケット解析部161では、パケットのヘッダに含まれるパケットIDを解析する。解析した結果、コマンドであると判明したとき、コマンドスケジューラ162に当該コマンドの内容(この場合は「Write」)とSeq#が供給される。その後コマンドスケジューラ162が、蓄積されたコマンドを適切なタイミングでコマンド実行部163に供給することで、当該コマンドが実行される。
The
次にデータパケットの場合について説明する。データパケットは、不揮発性記憶装置110からアクセス装置100へ転送要求があった場合に、転送される。不揮発性記憶装置110から、データパケットの要求があると、書き込み先アドレス生成部142は、前述したWriteコマンド発行に伴って不揮発性メモリ170上にて書き込み可能な領域を検出して、その論理アドレスを書き込みアドレスとして生成し、データバッファ153に供給する。またSeq#生成部143は当該ファイルデータのSeq#をそれぞれ生成し、データバッファ153に供給する。さらに、書き込まれるデータの実体は、上述したユーザーデータ入力部132、または管理情報データ生成部144上のデータ参照先からデータバッファ153に蓄積される。
Next, the case of a data packet will be described. The data packet is transferred when there is a transfer request from the
不揮発性記憶装置I/F部150では、上記に加え、ヘッダ生成部151により生成されるヘッダ、SubSeq#生成部152により生成されるSubSeq#を付加して、データパケットを生成する。このとき、ヘッダのパケットIDは「データ」となる。
In addition to the above, the nonvolatile storage device I /
SubSeq#には、同一のSeq#を有するファイルデータを、インターフェースバス120上でパケット分割して送信するときの数値であり、同一Seq#内では単調増加となるように設定する。同一Seq#の最終パケットのSubSeq#は0xFF(終端情報)を設定する。パケット分割する単位は、アクセス装置100および不揮発性記憶装置110内のバッファサイズや、インターフェースバス120の転送速度等に基づいて、不揮発性記憶装置I/F部150が定めるが、不揮発性メモリ170固有の1ページあたりのサイズ、もしくはその倍数であることが望ましい。なお管理情報データはサイズが小さいため、同一Seq#を持つ管理情報データは1個のパケットで送信することが望ましい。この場合、SubSeq#=0xFFとなる。
SubSeq # is a numerical value when file data having the same Seq # is packet-divided and transmitted on the
データパケットは、インターフェースバス120を介して、不揮発性記憶装置110のパケット解析部161に供給される。
The data packet is supplied to the
パケット解析部161では、パケットのヘッダに含まれるパケットIDを解析する。解析した結果、データであると判明したとき、当該パケットの内容が書き込み制御部164に蓄積される。書き込み制御部164では、データ種別の解析、および各データパケットに多重されている書き込みアドレスが、不揮発性メモリ170上の物理アドレスに変換された上で、不揮発性メモリ170のユーザーデータ領域171、またはシステム領域172の所定のアドレスに書き込まれる。なお、管理情報データは、書き込み途中での電源遮断対策のため、すでに書き込み済みの同一データに上書きせず、別の領域に書き込む。そしてすべての管理情報データが正しく書き込まれたときに、以前の管理情報データを消去、もしくは無効化する。これにより、仮に電源遮断により管理情報データが書き込みに失敗した場合でも、以前の管理情報データを用いてユーザーデータと管理情報データとの整合性を保つことができる。
The
データが不揮発性メモリ170の所定の領域に正常に書き込まれたとき、書き込み制御部164は、正常に書き込めたパケットのデータ種別、Seq#およびSubSeq#をSeq#管理部155に通知する。
When data is normally written in a predetermined area of the
Seq#管理部では、データ種別ごとに、正常に書き込めたデータのSeq#およびSubSeq#を管理する。 The Seq # management unit manages Seq # and SubSeq # of normally written data for each data type.
コマンドスケジューラ162は、蓄積されているコマンド、およびSeq#管理部165の情報を参照しながら、次に実行すべきコマンドをコマンド実行部163に供給する。
The
コマンド実行部163は、コマンドスケジューラ162から供給されたコマンドを解析し実行する。具体的には、Seq#=2のデータのWriteコマンドを実行する場合は、Seq#1の際と同様に、インターフェースバス120を介してアクセス装置100に対し当該ファイルデータの転送を要求する。上記転送要求を受けたアクセス装置100は、データバッファ153に蓄積されている当該ファイルデータのデータパケットをインターフェースバス120経由で介して不揮発性記憶装置110に送信し、不揮発性メモリ170の所定の領域への書き込みを実行させる。
The
図3は、本実施の形態において、ユーザーデータおよび管理情報データのWriteコマンド発行タイミング、コマンド実行部163において実際にコマンドが実行されるタイミング、およびユーザーデータおよび管理情報データのパケットが送信されるタイミングについて、説明した図である。また図4は、図3に記載のシーケンス実行に伴うSeq#管理部165の管理情報の遷移を記載した図である。なお、以後説明の簡便のため、ユーザーデータ、FAT1データ、FAT2データ、DIRデータを、それぞれ記号U、A、B、Cと記載する。また同一のSeq#を持つコマンド、および管理情報データは、1個のパケットで送信するものとする。すなわち、これらのパケットのSubSeq#は常に終端情報(0xFF)である。
FIG. 3 shows a write command issuance timing of user data and management information data, a timing at which a command is actually executed by the
アクセス装置100が不揮発性記憶装置110の装着を検知したとき、不揮発性記憶装置I/F部150は、「Initialize」コマンドパケットを、インターフェースバス120を介して不揮発性記憶装置110に送信する。上記を受信したアクセス装置I/F部160は、パケット解析部161での解析を経てコマンドスケジューラ162に供給される。Initializeコマンドは、不揮発性メモリ170へのデータ書き込みに無関係であるため、直ちにコマンド実行部163に供給され、実行可能状態となる。Initializeコマンドにより、Seq#管理部165の管理情報初期化を含む不揮発性記憶装置110の初期化が行われる。本コマンド処理完了後の、時刻T0におけるSeq#管理部165の管理情報を図4(a)に示す。
When the
アクセス装置100が、所定のユーザーデータの書き込みを実行しようとするとき、アプリケーション130のAPI呼出部131は書き込みAPIを呼び出す。このとき、書き込みデータ長(size1)も合わせてファイルシステム140へ通知する。
When the
ファイルシステム140は、コマンド生成部141においてWriteコマンドを、Seq#生成部143でSeq#=1を生成し、不揮発性記憶装置I/F部150に供給する。不揮発性記憶装置I/F部150は、Seq#=1のユーザーデータのWriteコマンドである「Write(U[1])」コマンドパケット生成し、インターフェースバス120を介して不揮発性記憶装置110に送信する。上記を受信したアクセス装置I/F部160は、パケット解析部161での解析を経てコマンドスケジューラ162に供給される。
The
コマンドスケジューラ162は、ユーザーデータの書き込みであるため、直ちにコマンド実行部163に供給され、実行可能状態となる。
Since the
Write(U[1])コマンドの実行に伴い、アクセス装置I/F部160はインターフェースバス120を介して不揮発性記憶装置I/F部150に「U[1]」のユーザーデータパケットを要求する。
With the execution of the Write (U [1]) command, the access device I /
不揮発性記憶装置I/F部150は、SubSeq#生成部152で生成したSubSeq#=1をもつユーザーデータパケットU[1]−1を生成し、アクセス装置I/F部160に送信する。ここにU[1]−1は、Seq#=1のユーザーデータU[1]のうち、SubSeq#=1のデータパケットであることを意味する。なお、各ユーザーデータパケットをどのような大きさに分割するかは、インターフェースバス120の仕様、データバッファ153の大きさ等により不揮発性記憶装置I/F部150が決定する。
The nonvolatile storage device I /
上記を受信したアクセス装置I/F部160はパケット解析部161で解析され、書き込み制御部164でアドレス変換等の処理を経て、不揮発性メモリ170のユーザーデータ領域171の所定のアドレスに書き込まれる。
The access device I /
本実施の形態においては、アクセス装置I/F部160内のコマンドスケジューラ162がコマンドの蓄積、および所定のタイミングでの実行指示が可能であるため、アプリケーション130は、不揮発性記憶装置110がbusy状態であってもコマンドパケットを送信することが可能である。このため、U[1]−1のユーザーデータパケット転送中、API呼出部131が同期APIを呼び出したとき、ファイルシステム140(不揮発性記憶装置I/F部150)は、不揮発性記憶装置110がbusy状態であってもU[1]−1のパケットの転送が完了すれば、不揮発性記憶装置I/F部150は、Seq#=1のFAT1データのWriteコマンドである「Write(A[1])」コマンドパケットを、インターフェースバス120を介して不揮発性記憶装置110に送信することが可能である。
In this embodiment, the
上記を受信したアクセス装置I/F部160は、パケット解析部161での解析を経てコマンドスケジューラ162に供給される。
The access device I /
コマンドスケジューラ162は、ユーザーデータの書き込みであるため、直ちにコマンド実行部163に供給され、実行可能状態となる。
Since the
コマンドスケジューラ162は、Seq#管理部165の管理情報(図4(a))を参照し、Seq#=1であるユーザーデータの書き込みが完了していないことを検出する。よって、Write(A[1])コマンドは、コマンドスケジューラ162で蓄積されたままとなる。コマンドスケジューラ162は、コマンドが蓄積されている間は、定期的にSeq#管理部165の管理情報を参照する。
The
ユーザーデータU[1]−1の書き込みが正常に完了した時刻T1で、書き込み制御部164は、Seq#管理部165に、Seq#=1、SubSeq#=1の正常書き込みを通知する。この結果、Seq#管理部165の管理情報は図4(b)のように更新される。同時にbusy状態が解除される。
At time T1 when the writing of the user data U [1] -1 has been completed normally, the
busyが解除されると、次のユーザーデータパケットであるU[1]−2の転送が行われる。この場合も再びbusy状態となるが、上述したように同期API発行に関連したコマンドを発行することが可能である。すなわち不揮発性記憶装置I/F部150はSeq#=1のFAT2、DIRのWriteコマンドである「Write(B[1])」、「Write(C[1])」コマンドパケットを、U[1]−2パケットの転送完了後送信することが可能となる。そして上記コマンドパケットを送信これらのWriteコマンドを受信したコマンドスケジューラ162は、Seq#管理部165の管理情報(図4(b))を参照して、Seq#=1であるユーザーデータの書き込みが完了していないことを検出する。よって、Write(B[1])、Write(C[1])コマンドは、同様にコマンドスケジューラ162で蓄積されたままとなる。
When busy is released, U [1] -2, which is the next user data packet, is transferred. In this case, the busy state is again entered, but it is possible to issue a command related to the synchronous API issue as described above. That is, the non-volatile storage device I /
データバッファ153上で、U[1]の書き込み時に指定されたデータ長size1のデータをすべてパケット化できたとき、最終パケットを意味するU[1]−Eを生成し、アクセス装置I/F部160に送信する。U[1]−Eの書き込みが正常に完了した時刻T2で、書き込み制御部164は、Seq#管理部165に、Seq#=1、SubSeq#=0xFFの正常書き込みを通知する。この結果、Seq#管理部165の管理情報は図4(c)のように更新され、同時にbusy状態が解除される。
When all the data having the data length size1 designated at the time of writing U [1] can be packetized on the
時刻T2の直後、コマンドスケジューラ162がSeq#管理部165の管理情報(図4(c))を参照し、Seq#=1であるユーザーデータの書き込みが完了したことを検出する。これにより、コマンドスケジューラ162は、蓄積していたコマンドのうち、Write(A[1])コマンドをコマンド実行部163に供給する。この結果、Write(A[1])コマンドが実行され、アクセス装置I/F部160は、アクセス装置100へデータパケットの転送を要求し、インターフェースバス120を介してA[1]のデータパケットを受信する。上記を受信したアクセス装置I/F部160はパケット解析部161で解析され、書き込み制御部164でアドレス変換等の処理を経て、不揮発性メモリ170のシステム領域172の所定のアドレスに書き込まれる。従来の不揮発性記憶システムで説明したように、管理情報データの場合は、データ転送完了とbusy状態解除がほぼ同時であるとみなす。
Immediately after time T2, the
A[1]データの書き込みが正常に完了した時刻T3においては、Seq#管理部165の管理情報は、図4(d)のようになる
FAT1データA[1]パケット転送後、アプリケーション130からSeq#2の書き込みを指示されたとき、不揮発性記憶装置I/F部150は、Seq#=2のユーザーデータのWriteコマンドである「Write(U[2])」コマンドパケットを、インターフェースバス120を介して不揮発性記憶装置110に送信する。このとき、コマンドスケジューラ162には他のコマンド(Write(B[1])およびWrite(C[1]))が蓄積された状態であるので、Write(U[2])コマンドは、コマンドスケジューラ162に蓄積される。
At time T3 when the writing of A [1] data is completed normally, the management information of the Seq
その後、Write(B[1])コマンド、Write(C[1])コマンドが順次実行されると、コマンドスケジューラ162に蓄積されたコマンドは、Write(U[2])コマンドのみとなる。このとき、Write(U[2])コマンドがコマンド実行部163に供給される。この結果、Write(U[2])コマンドが実行され、アクセス装置I/F部160は、アクセス装置100へデータパケットの転送を要求し、インターフェースバス120を介してユーザーデータパケットU[2]−1が、アクセス装置I/F部160に対して送信される。
Thereafter, when the Write (B [1]) command and the Write (C [1]) command are sequentially executed, the command stored in the
さて、C[1]データの書き込みが正常に完了した時刻T4においては、Seq#管理部165の管理情報は、図4(e)のようになる。このとき、Seq#=1のユーザーデータ、管理情報データがすべて正しく書き込まれているため、Seq#=1のデータは、ファイルデータとして整合性が取れることを意味している。すなわち、時刻T4の直後に電源遮断が生じても、Seq#=1の管理情報データを用いてSeq#=1のユーザーデータを正しく読み出すことができる。
At time T4 when the writing of C [1] data is normally completed, the management information of the Seq
以上説明したように、本実施の形態においては、従来の不揮発性記憶システムと比較した場合、不揮発性記憶装置内でコマンドを蓄積できるようにすることで、不揮発性記憶装置110がbusy状態であっても、その間に以降のコマンドパケットの送信が可能となり、バスを効率よく使用することができる。その結果、書き込み時のシステムのスループットを向上させることができる。
As described above, in this embodiment, when compared with a conventional nonvolatile storage system, the
また、不揮発性記憶装置内で蓄積されたコマンドを適切なタイミングで実行指示を行うことで、管理情報データは、常に対応するユーザーデータの書き込み完了後に書き込まれるため、書き込み途中の電源遮断が発生しても、正しくファイルを読み出すことができる。具体的には、時刻T3の後、B[1]データの書き込み中に電源遮断が生じたとき、Seq#=1のFAT1データとFAT2データの内容が異なり、かつDIRに含まれるファイル名などの情報が正しく更新されていない事態になる。従ってこの場合、再起動時に、A[1]データ書き込み以前の管理情報データを復元し、U[1]は無効とする。これにより、ユーザーデータU[1]書き込み以前のファイルデータの再生は成功する。 In addition, by instructing execution of commands stored in the non-volatile storage device at an appropriate timing, the management information data is always written after completion of writing of the corresponding user data, which causes a power shutdown during writing. However, the file can be read correctly. Specifically, after the time T3, when a power interruption occurs while B [1] data is being written, the contents of the FAT1 data and the FAT2 data of Seq # = 1 are different, and the file name included in the DIR, etc. Information will not be updated correctly. Therefore, in this case, at the time of restart, management information data before A [1] data writing is restored, and U [1] is invalidated. Thereby, the reproduction of the file data before writing the user data U [1] is successful.
なお、不揮発性記憶装置110がbusy状態であるかどうかをアクセス装置100が検出する方法として、インターフェースバス120の専用ピンの状態による検出、もしくはアクセス装置100からの問い合わせコマンドの実行結果などにより実現可能である。
(第2の実施の形態)
図5は本発明の第2の実施の形態について説明した図である。図5において、500はアクセス装置、540はファイルシステム、550は不揮発性記憶装置I/F部、554はSeqサイズ設定部、555はSeq#生成部である。
The
(Second Embodiment)
FIG. 5 is a diagram for explaining a second embodiment of the present invention. In FIG. 5, 500 is an access device, 540 is a file system, 550 is a nonvolatile storage device I / F unit, 554 is a Seq size setting unit, and 555 is a Seq # generation unit.
アクセス装置500はアプリケーション130、ファイルシステム540および不揮発性記憶装置I/F部550を含む。
The
ファイルシステム540はコマンド生成部141、書き込みアドレス生成部142および管理情報データ生成部144からなる。
The
不揮発性記憶装置I/F部550は、ヘッダ生成部151、SubSeq#生成部152、データバッファ153、Seqサイズ設定部554、Seq#生成部555からなる。
The nonvolatile storage device I /
以下、第2の実施の形態におけるアクセス装置100から不揮発性記憶装置110にデータを書き込むときの動作を、第1の実施の形態との相違点を中心に述べる。
Hereinafter, an operation when data is written from the
第1の実施の形態では、API呼出部131が書き込みAPIを呼び出し、ファイルシステム140がWriteコマンドを発行する度にSeq#を設定していた。
In the first embodiment, the Seq # is set every time the
一方本実施の形態では、アプリケーション130が同一のSeq#を持つユーザーデータのサイズ(以後Seqサイズと呼ぶ)を、不揮発性記憶装置I/F部550のSeqサイズ設定部554にあらかじめ設定しておき、不揮発性記憶装置I/F部550の内部のSeq#生成部555がSeqサイズ毎に同一のSeq#を設定する。このとき、Seqサイズのデータが書き込まれる度に、アクセス装置500が同期APIを発行しなくとも自動的に管理情報データを更新する(同期を取る)。このとき、ファイルシステム540がWriteコマンドを発行するときにSeq#は設定されない。従ってファイルシステム540が不揮発性記憶装置I/F部540へコマンドを発効する段階では、図2(b)におけるWriteコマンドパケットのSeq#はDon’t Careとなる。
On the other hand, in the present embodiment, the size of user data having the same Seq # by the application 130 (hereinafter referred to as Seq size) is set in advance in the Seq
上記ユーザーデータのWriteコマンドが、コマンド実行部163で実行状態になると、不揮発性記憶装置I/F部550に対してユーザーデータパケットの転送を要求する。
When the user data write command is executed by the
不揮発性記憶装置I/F部550は、アクセス装置500の所定の領域に格納されたユーザーデータを保持する。Seqサイズ設定部554は、データバッファ153でパケット化されたデータサイズを監視し、あらかじめ設定されたSeqサイズのデータに同一のSeq#が付与されるよう、Seq#生成部555に指示する。
The nonvolatile storage device I /
よって、データパケットについては、不揮発性記憶装置I/F部550内において、Seq#生成部555で付与されたSeq#が、SubSeq#とともに設定される。
Therefore, for the data packet, Seq # given by the Seq
図6は、本実施の形態において、ユーザーデータおよび管理情報データのWriteコマンド発行タイミング、コマンド実行部163において実際にコマンドが実行されるタイミング、およびユーザーデータおよび管理情報データのパケットが送信されるタイミングについて、説明した図である。なお図6に記載のシーケンス実行に伴うSeq#管理部165の管理情報の遷移は、図4と同じになる。
FIG. 6 shows a write command issuance timing of user data and management information data, a timing at which a command is actually executed by the
第1の実施の形態と同様に、アクセス装置500が不揮発性記憶装置110の装着を検知したとき、Initializeコマンドが発行され、不揮発性記憶装置110の初期化が実行される。
Similar to the first embodiment, when the
続いてアプリケーション130のAPI呼出部131は、Seqサイズ設定APIを呼び出す。これに伴い、不揮発性記憶装置I/F部550のSeqサイズ設定部554には、Seqサイズ設定APIにより設定されたSeqサイズが設定される。
Subsequently, the
アクセス装置500が、所定のユーザーデータの書き込みを実行しようとするとき、アプリケーション130のAPI呼出部131は書き込みAPIを呼び出す。このとき、書き込みデータ長は指定されない。これに伴い、不揮発性記憶装置I/F部550は、ユーザーデータのWriteコマンドである「Write(U)」コマンドパケットを、不揮発性記憶装置110に送信し、コマンドスケジューラ162にコマンドが蓄積されていないことから、直ちに実行される。
When the
Write(U)コマンドの実行に伴い、不揮発性記憶装置I/F部550は、ユーザーデータ入力部132が供給するユーザーデータと、書き込みアドレス生成部142で生成された書き込み先のアドレスをデータバッファ153に供給する。
Along with execution of the Write (U) command, the non-volatile storage device I /
不揮発性記憶装置I/F部550において、Seq#生成部555はSeq#として1を、SubSeq#生成部152はSubSeq#として1を設定し、ヘッダ生成部151で生成されるヘッダと合わせてデータバッファ153上のユーザーデータに付加する。このようにして「U[1]−1」のユーザーデータパケットをインターフェースバス120上に送信する。
In the nonvolatile storage device I /
第1の実施の形態と同様に、U[1]−1のユーザーデータパケット転送が完了しても、不揮発性メモリ170に当該ユーザーデータが書き込み完了するまで、不揮発性記憶装置110はbusy状態になり、コマンドスケジューラ162がコマンドの蓄積、および所定のタイミングでの実行指示が可能であるため、アクセス装置500は任意のタイミングでSeq#=1に相当するFAT1データの書き込み指示をすることが可能である。
Similar to the first embodiment, even when the user data packet transfer of U [1] -1 is completed, the
データバッファ153上で、Seqサイズ設定部554で設定されたSeqサイズのデータをすべてパケット化できたとき、最終パケットを意味するU[1]−Eを生成し、アクセス装置I/F部160に送信する。
When all the data of the Seq size set by the Seq
そして次にユーザーデータを送信するとき、Seq#生成部555で生成されるSeq#は2となる。
The next time user data is transmitted, the Seq # generated by the
本実施の形態では、U[1]−Eのデータパケット送信が完了しても、Writeコマンドを発行することなく、次のユーザーデータでパケットであるU[2]−1を送信することができる。データ書き込みを終了するときは、アプリケーション130がAPI呼出部131から中断APIを発行する。これに伴い、データの転送および書き込みが直ちに中止され、現時点での管理情報データをファイルに記録するためのWriteコマンドである「Write(A[2])」、「Write(B[2])」、「Write(C[2])を発行し、それぞれデータA[2]、B[2],C[2]を書き込んで終了する。
In the present embodiment, even if the data packet transmission of U [1] -E is completed, U [2] -1, which is a packet, can be transmitted with the next user data without issuing a Write command. . When the data writing is finished, the
以上より、本実施の形態においても、従来の不揮発性記憶システムと比較した場合、不揮発性記憶装置内でコマンドを蓄積できるようにすることで、不揮発性記憶装置110がbusy状態であっても、その間に以降のコマンドパケットの送信が可能となり、バスを効率よく使用することができる。その結果、書き込み時のシステムのスループットを向上させることができる。
As described above, even in the present embodiment, when compared with a conventional nonvolatile storage system, by allowing commands to be accumulated in the nonvolatile storage device, even if the
また、本実施の形態では、ユーザーデータを連続して書き込む場合、あらかじめSeqサイズを設定しておくことで、管理情報データ書き込み完了後、都度ユーザーデータWriteコマンドを発行しなくてすむために、送信すべきWriteコマンドパケットの数を削減することができる。そのため、データ転送の効率を従来以上に向上させることができ、バスの効率を上げることが可能となる。これは、連続的な動画データの記録などの場合等に特に有効な手段となる。 Also, in the present embodiment, when user data is written continuously, a Seq size is set in advance, so that it is not necessary to issue a user data write command every time after the management information data writing is completed. The number of write command packets to be reduced can be reduced. Therefore, the data transfer efficiency can be improved more than before, and the bus efficiency can be increased. This is a particularly effective means for recording continuous moving image data.
また、第1の実施の形態と同様に、不揮発性記憶装置内で蓄積されたコマンドを適切なタイミングで実行指示を行うことで、管理情報データは、常に対応するユーザーデータの書き込み完了後に書き込まれるため、書き込み途中の電源遮断が発生しても、正しくファイルを読み出すことができる。 As in the first embodiment, the management information data is always written after the writing of the corresponding user data is completed by instructing execution of commands stored in the nonvolatile storage device at an appropriate timing. Therefore, the file can be read correctly even if the power is cut off during writing.
なお第1の実施の形態、第2の実施の形態において、Writeコマンドが実行可能になった後に、不揮発性記憶装置からアクセス装置へデータ転送を要求していたが、書き込み制御部164の容量が十分な大きさを持っていれば、予め不揮発性記憶装置の書き込み制御部164にWriteコマンドに対応するファイルデータを蓄積しておき、ライトコマンドが実行状態になれば、書き込み制御部164に蓄積されたファイルデータを不揮発性メモリ170に書き込むという形態も実施可能である。また、この場合には、書き込み制御部164に蓄積できるデータ量に応じて、予めデータを蓄積する方法と書き込みの際にアクセス装置へデータ転送を要求する方法を組み合わせる方法を用いても良い。
In the first embodiment and the second embodiment, after the Write command becomes executable, data transfer is requested from the nonvolatile storage device to the access device. However, the capacity of the
また本発明の実施の形態において、SubSeq#は単調増加の数値であると説明したが、終端情報であるか否かを識別できるだけでもよい。 In the embodiment of the present invention, SubSeq # has been described as a monotonically increasing numerical value, but it may be possible only to identify whether it is termination information.
またデータ種別IDとしては、コンテンツ保護のための鍵情報など、所定の認証処理を経ないとアクセスできないデータであるセキュアデータを追加したシステムを考えることもできる。 As the data type ID, a system in which secure data, which is data that cannot be accessed without a predetermined authentication process, such as key information for content protection, can be considered.
なお、第1の実施の形態、第2の実施の形態では、コマンドとデータの関連付け等をおこなうためにSeq#(Seq番号)やSubSeq#(SubSeq番号)等を付与していたが、本発明は必ずしもこれらの番号に限定するものではない。これらはコマンドとデータの関連付けが他の関連付けとの識別を行えればよく、番号以外でもアルファベット等、他の識別用の記号等(識別子)であってもよい。 In the first embodiment and the second embodiment, Seq # (Seq number), SubSeq # (SubSeq number), and the like are assigned in order to associate a command with data. Is not necessarily limited to these numbers. As long as the association between the command and the data can be distinguished from other associations, these may be other identification symbols (identifiers) such as alphabets or the like.
また、第1の実施の形態、第2の実施の形態では、アクセス装置、不揮発性記憶装置、及びこれらからなる不揮発性記憶システムとして実施の形態を説明したが、本発明はこれに限定されるものではない。不揮発性記憶システム110のアクセス装置I/F部等は、演算部等を備えたメモリコントローラ等の集積回路によって実現することも可能である。その際には、不揮発性記憶装置110は、メモリコントローラと不揮発性メモリを主とした構成要素として備え、アクセス装置I/F部160等で実現した各機能を、メモリコントローラの演算部で実行されるソフトウェア、または同等の機能を回路構成で実現する集積回路としても実現可能である。
In the first embodiment and the second embodiment, the embodiments have been described as the access device, the nonvolatile storage device, and the nonvolatile storage system including these, but the present invention is limited to this. It is not a thing. The access device I / F unit and the like of the
また、第1の実施の形態、第2の実施の形態で説明した不揮発性記憶装置は、同等の機能を備えるデバイス(機能部品等)としても実現可能である。例えば、不揮発性記憶装置110を、電気回路基板上に実装される、一部のモジュール、又はこれらを集約した集積回路としても実施することができる。この際には、本発明で説明した不揮発性記憶装置は、不揮発性記憶デバイス(モジュール)としても実現可能である。
In addition, the nonvolatile memory device described in the first embodiment and the second embodiment can be realized as a device (functional component or the like) having an equivalent function. For example, the
本発明は、データ書き込み途中に電源遮断が生じる可能性の高い、リムーバブルな不揮発性記憶装置において、アクセス装置からコマンドの実行に先んじてコマンドを発行することで、インターフェースバスを効率的に使用し、コマンド処理のスループットを向上させる方法を提案したものであり、高品質の動画撮影など、大容量のデータを高速に不揮発性メモリに書き込むことが要求されるアプリケーションを有する装置、例えばデジタルビデオカメラをはじめとする動画記録再生装置やデジタルスチルカメラをはじめとする静止画記録再生装置、あるいは携帯電話において有益である。 The present invention efficiently uses an interface bus by issuing a command prior to execution of a command from an access device in a removable non-volatile storage device that is likely to cause a power interruption during data writing. It proposes a method to improve the throughput of command processing, such as high-quality moving image shooting, devices that have applications that require high-capacity data to be written to nonvolatile memory at high speed, such as digital video cameras This is useful in a moving image recording / reproducing apparatus, a still image recording / reproducing apparatus such as a digital still camera, or a mobile phone.
100、500、700 アクセス装置
110 不揮発性記憶装置
120 インターフェースバス
130、730 アプリケーション
131、731 API呼出部
132、732 ユーザーデータ入力部
140、540、740 ファイルシステム
141、741 コマンド生成部
142、742 書き込みアドレス生成部
143、555 Seq#生成部
144、743 管理情報データ生成部
150、550 不揮発性記憶装置I/F部
151 ヘッダ生成部
152 SubSeq#生成部
153 データバッファ
160、760 アクセス装置I/F部
161、761 パケット解析部
162 コマンドスケジューラ
163 コマンド実行部
164、762 書き込み制御部
165 Seq#管理部
170、770 不揮発性メモリ
171、771 ユーザーデータ領域
172、772 システム領域
554 Seqサイズ設定部
710 SDカード
750 SDカードI/F部
100, 500, 700
Claims (6)
前記不揮発性メモリへのデータ書き込み、又は前記不揮発性メモリからのデータ読み出しを行う読み書き制御部と、
外部から、処理要求が示されるコマンドパケット及び前記不揮発性メモリへ書き込むデータ有するデータパケットを受信し、これら受信パケットを解析するパケット解析部と、
前記コマンドパケットが有する処理要求を蓄積し、要求される処理の実行時期を管理するコマンドスケジューラとを備え、
前記パケット解析部は、前記読み書き制御部が前記不揮発性メモリへのデータ書き込み又はデータ読み出しを行っている際に、コマンドパケットを受信し、該コマンドパケットの処理要求をコマンドスケジューラへ蓄積することを特徴とするメモリコントローラ。 In a memory controller that controls data recording to a nonvolatile memory,
A read / write control unit for writing data to the nonvolatile memory or reading data from the nonvolatile memory;
A packet analysis unit for receiving a command packet indicating a processing request and a data packet having data to be written to the nonvolatile memory from outside, and analyzing the received packet;
A command scheduler for accumulating processing requests included in the command packet and managing execution timing of the requested processing;
The packet analysis unit receives a command packet when the read / write control unit is writing data to or reading data from the non-volatile memory, and stores a processing request for the command packet in a command scheduler. And memory controller.
前記受信パケットは、関連付けられるコマンドパケットとデータパケットで共通の識別子を有し、
前記コマンドパケットが有する処理要求の実施状況を前記識別子で管理する管理部を備え、
前記コマンドスケジューラは、前記実施状況に基づいて、次に実施する処理及び実行時期を管理することを特徴とするメモリコントローラ。 The memory controller of claim 1, wherein
The received packet has a common identifier in the associated command packet and data packet,
A management unit that manages the execution status of the processing request included in the command packet with the identifier;
The command scheduler manages processing to be executed next and execution time based on the implementation status.
前記不揮発性記憶装置への処理要求を生成するコマンド生成部と、
前記不揮発性記憶装置へ転送するデータと関連付けられる前記処理要求に対して共通の識別子を割り当てる識別子生成部と、
前記転送するデータ及び前記処理要求から、共通の識別子を有したデータパケット及びコマンドパケットを生成するとともに、前記不揮発性記憶装置の処理状態を検出し、前記不揮発性記憶装置が処理中の際には、前記不揮発性記憶装置へコマンドパケットのみを出力するデータバッファ部とを備えることを特徴とするアクセス装置。 In an access device for instructing data writing to a nonvolatile storage device having a nonvolatile memory,
A command generation unit for generating a processing request to the nonvolatile storage device;
An identifier generating unit that assigns a common identifier to the processing request associated with data to be transferred to the nonvolatile storage device;
A data packet and a command packet having a common identifier are generated from the data to be transferred and the processing request, and the processing state of the nonvolatile storage device is detected. When the nonvolatile storage device is processing And a data buffer unit that outputs only command packets to the non-volatile storage device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008210415A JP2010049303A (en) | 2008-08-19 | 2008-08-19 | Memory controller, non-volatile storage device, access device, and non-volatile storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008210415A JP2010049303A (en) | 2008-08-19 | 2008-08-19 | Memory controller, non-volatile storage device, access device, and non-volatile storage system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010049303A true JP2010049303A (en) | 2010-03-04 |
Family
ID=42066358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008210415A Pending JP2010049303A (en) | 2008-08-19 | 2008-08-19 | Memory controller, non-volatile storage device, access device, and non-volatile storage system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010049303A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034597A (en) * | 2011-07-18 | 2013-04-10 | 凹凸电子(武汉)有限公司 | Device and method for operating memory cards |
JP2014135059A (en) * | 2014-01-21 | 2014-07-24 | Sony Corp | Communication device, communication method and radio tag |
US9196369B2 (en) | 2010-06-10 | 2015-11-24 | Sony Corporation | Communication device and communication method |
-
2008
- 2008-08-19 JP JP2008210415A patent/JP2010049303A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9196369B2 (en) | 2010-06-10 | 2015-11-24 | Sony Corporation | Communication device and communication method |
CN103034597A (en) * | 2011-07-18 | 2013-04-10 | 凹凸电子(武汉)有限公司 | Device and method for operating memory cards |
JP2014135059A (en) * | 2014-01-21 | 2014-07-24 | Sony Corp | Communication device, communication method and radio tag |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8429374B2 (en) | System and method for read-while-write with NAND memory device | |
US8639898B2 (en) | Storage apparatus and data copy method | |
US20080147994A1 (en) | Command scheduling method and apparatus of virtual file system embodied in nonvolatile data storage device | |
JP6024296B2 (en) | Information processing apparatus, copy control program, and copy control method | |
US8977802B2 (en) | Access device, information recording device, controller, real time information recording system, access method, and program | |
WO2010134300A1 (en) | Memory controller, nonvolatile storage device, accessing device, nonvolatile storage system, and method and program for writing data | |
KR20120098850A (en) | Memory device and host device | |
TW200929258A (en) | A storage device coordinator and a host device that includes the same | |
US20040103247A1 (en) | Storage control apparatus and control method thereof | |
CN101796495A (en) | Memory device and file system | |
KR101581311B1 (en) | Flash memory apparatus and method of controlling the same | |
JP2006195565A (en) | Control method for semiconductor storage device, memory card, and host apparatus | |
JP5398761B2 (en) | Memory system | |
KR101427535B1 (en) | Information processing apparatus, recording medium, and area release control method | |
JP2010049303A (en) | Memory controller, non-volatile storage device, access device, and non-volatile storage system | |
US8560789B2 (en) | Disk apparatus, data replicating method onto disk apparatus and program recording medium | |
KR20150116627A (en) | Controller and data storage device including the same | |
CN112148203B (en) | Memory management method, device, electronic equipment and storage medium | |
JP2009020776A (en) | Swap-out control apparatus | |
JP2007293564A (en) | Memory device and information storage system | |
US20160062925A1 (en) | Method and system for managing storage device operations by a host device | |
US8509597B2 (en) | Recording apparatus, imaging and recording apparatus, recording method, and program | |
JPWO2008102610A1 (en) | MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM | |
JP5231496B2 (en) | Information processing apparatus and suspend / resume method thereof | |
JP6940283B2 (en) | DMA transfer control device, DMA transfer control method, and DMA transfer control program |