JP2006059201A - Data transfer system and interface - Google Patents

Data transfer system and interface Download PDF

Info

Publication number
JP2006059201A
JP2006059201A JP2004241647A JP2004241647A JP2006059201A JP 2006059201 A JP2006059201 A JP 2006059201A JP 2004241647 A JP2004241647 A JP 2004241647A JP 2004241647 A JP2004241647 A JP 2004241647A JP 2006059201 A JP2006059201 A JP 2006059201A
Authority
JP
Japan
Prior art keywords
data
write
host
usb
read
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.)
Withdrawn
Application number
JP2004241647A
Other languages
Japanese (ja)
Inventor
Shinichi Suzuki
慎一 鈴木
Satoshi Takase
聡 高瀬
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2004241647A priority Critical patent/JP2006059201A/en
Publication of JP2006059201A publication Critical patent/JP2006059201A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To increase efficiency of data transfer relating to an interface technology for connecting a computer and a device. <P>SOLUTION: In a data transfer system including an interface section (200) which can interface a host (100) and media (300) which can be accessed by this host, the interface section is provided with; a storage section (202) that can hold the data written in the media from the host, or the data read from the media; and controllers (201, 203, 204, 205 and 206) which can discriminate whether the data concerning access to the media from the host exists in the storage section or not, and can omit writing duplicated data to the media. Also in reading data, read operation from the media can be omitted by using the data in the storage section. Thereby, efficiency improvement in data transfer is attained. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、コンピュータとデバイスとを結合するためのインタフェース技術に関し、例えばユニバーサルシリアルバス(USB:Universal Serial Bus)を用いたシステムに適用して有効な技術に関する。   The present invention relates to an interface technology for connecting a computer and a device, and for example, relates to a technology effective when applied to a system using a universal serial bus (USB).

例えば特許文献1に記載されているように、ホストコンピュータ上のUSBポートを介して例えば同機種のUSBファンクションデバイス(USB周辺機器)が複数台接続される場合、USBファンクションデバイスそれぞれに固有のUSB識別番号(USBデバイスID)を持たせ、ホストコンピュータと接続された際このUSB識別番号(USBデバイスID)をホストコンピュータに送信して、ホストコンピュータ上で動作するUSBファンクションデバイス制御ソフトウェアドライバーが、この識別番号を用いて同機種のUSBファンクションデバイスの判別を行っている。   For example, as described in Patent Document 1, when multiple USB function devices (USB peripheral devices) of the same model are connected via a USB port on a host computer, for example, a USB identification unique to each USB function device A USB function device control software driver that operates on the host computer sends the USB identification number (USB device ID) to the host computer when it is connected to the host computer. The USB function device of the same model is discriminated using the number.

また、近年、プラグアンドプレイ機能などによる使用の容易さやUSB転送速度の向上により、メモリカード、フレキシブルディスクなどの外部メディアをリムーバブルディスクとして扱う、USBファンクション(デバイス)が数多く発売されている。   In recent years, a number of USB functions (devices) that handle external media such as memory cards and flexible disks as removable disks have been put on the market due to the ease of use with plug-and-play functions and the improvement of USB transfer speed.

特開2003−316720号公報(第2段落)JP 2003-316720 A (second paragraph)

一般に、メモリカード、フレキシブルディスクなどの外部メディアをリムーバブルディスクとして扱うシステムではUSBマスストレージ規格を適用して外部メディアにアクセスしている。USBホストからのデータの書き込みとデータ読み出し動作について説明する。   In general, in a system that handles external media such as a memory card and a flexible disk as a removable disk, the external media is accessed by applying the USB mass storage standard. Data write and data read operations from the USB host will be described.

図3には、USBホストからの書き込み動作が示される。   FIG. 3 shows a write operation from the USB host.

書き込み動作においては、USBホスト100はUSBマスストレージクラスで定義された書き込みの要求を知らせる為のコマンドであるライト要求CBW(Command Block Wrapper)をUSBファンクション200に発行する(1)。USBファンクション200はライト要求CBWを受信すると、ライトアドレス(論理アドレス)やデータ数を解析し、そしてライト要求CBWを外部メディア固有の形式に変換する(2)。変換完了後、USBファンクション200は外部メディア300にライトコマンドを発行する(3)。外部メディア300はライトコマンドを受信すると、ライトアドレス(物理アドレス)やデータ数を解析する(4)。USBホスト100はUSBマスストレージクラスで定義された形式でライトデータを、USBファンクション200に送信する(5)。USBファンクション200はライトデータを受信すると、ライトデータを外部メディア固有のデータ形式に変換する(6)。この変換完了後に、USBファンクション200は外部メディアにライトデータを送信する(7)。外部メディア300はライトデータを受信すると、それをメモリに書き込む(8)。外部メディア300はデータの書き込みが全て完了すると、完了したことをUSBファンクション200に通知する(9)。USBファンクション200は、完了通知を受信すると、それをUSBマスストレージクラスで定義された書き込みの完了を知らせる為のコマンドであるライト完了CSW(Command Status Wrapper)に変換する(10)。変換完了後、USBファンクション200はUSBホストにライト完了CSWを送信する(11)。USBホスト100はライト完了CSWを受信すると、ライト動作が終了したことを認識し、それによってライト動作が完了する(12)。   In the write operation, the USB host 100 issues a write request CBW (Command Block Wrapper), which is a command for notifying a write request defined in the USB mass storage class, to the USB function 200 (1). Upon receiving the write request CBW, the USB function 200 analyzes the write address (logical address) and the number of data, and converts the write request CBW into a format unique to the external medium (2). After the conversion is completed, the USB function 200 issues a write command to the external medium 300 (3). When the external medium 300 receives the write command, it analyzes the write address (physical address) and the number of data (4). The USB host 100 transmits write data in the format defined by the USB mass storage class to the USB function 200 (5). When the USB function 200 receives the write data, the USB function 200 converts the write data into a data format specific to the external medium (6). After this conversion is completed, the USB function 200 transmits write data to the external medium (7). When the external medium 300 receives the write data, it writes it in the memory (8). When the external media 300 completes the data writing, it notifies the USB function 200 of the completion (9). Upon receiving the completion notification, the USB function 200 converts it into a write completion CSW (Command Status Wrapper) which is a command for notifying completion of writing defined in the USB mass storage class (10). After the conversion is completed, the USB function 200 transmits a write completion CSW to the USB host (11). When the USB host 100 receives the write completion CSW, the USB host 100 recognizes that the write operation has ended, and thereby completes the write operation (12).

図4には、USBホストからの読み出し動作が示される。   FIG. 4 shows a read operation from the USB host.

USBホスト100は、USBマスストレージクラスで定義されたリード要求CBWをUSBファンクション200に発行する(21)。USBファンクション200は、読み出しの要求を知らせる為のコマンドであるリード要求CBWを受信すると、リードアドレスやデータ数を解析する。また、リード要求CBWを外部メディア固有の形式に変換する(22)。変換完了後、USBファンクションは外部メディアにリードコマンドを発行する(23)。外部メディア300はリードコマンドを受信すると、リードアドレスやデータ数を解析する(24)。解析完了後、外部メディア300はメモリからデータを読み出し、それをUSBファンクションに送信する(25)。USBファンクション200はリードデータを受信し、それをUSBマスストレージクラスで定義されたデータ形式に変換する(26)。この変換完了後、USBファンクション200はUSBホスト100にリードデータを送信する(27)。USBホスト100はリードデータを受信する(28)。外部メディア300はデータの送信が全て完了すると、完了したことをUSBファンクション200に通知する(29)。USBファンクション200は完了通知を受信すると、それをUSBマスストレージクラスで定義された読み出しの完了を知らせる為のコマンドであるリード完了CSWに変換する(30A)。変換完了後、USBファンクション200はUSBホスト100にリード完了CSWを送信する(30B)。USBホスト100は、リード完了CSWを受信すると、リード動作が終了したことを認識し、それによりリード動作が完了する(30C)。   The USB host 100 issues a read request CBW defined in the USB mass storage class to the USB function 200 (21). When the USB function 200 receives a read request CBW, which is a command for notifying a read request, the USB function 200 analyzes the read address and the number of data. Further, the read request CBW is converted into a format unique to the external medium (22). After the conversion is completed, the USB function issues a read command to the external medium (23). When the external medium 300 receives the read command, it analyzes the read address and the number of data (24). After the analysis is completed, the external medium 300 reads the data from the memory and transmits it to the USB function (25). The USB function 200 receives the read data and converts it into a data format defined by the USB mass storage class (26). After this conversion is completed, the USB function 200 transmits read data to the USB host 100 (27). The USB host 100 receives the read data (28). When all the data transmission is completed, the external medium 300 notifies the USB function 200 of the completion (29). Upon receiving the completion notification, the USB function 200 converts it into a read completion CSW that is a command for notifying completion of reading defined in the USB mass storage class (30A). After the conversion is completed, the USB function 200 transmits a read completion CSW to the USB host 100 (30B). When the USB host 100 receives the read completion CSW, the USB host 100 recognizes that the read operation has ended, and thereby completes the read operation (30C).

上記USBホストからのデータの書き込みとデータ読み出し動作について本願発明者が検討したところ、USBファンクションと外部メディア間のデータ転送速度は、USBホストとUSBファンクション間のデータ転送速度に比較して極めて遅く、改善の必要性のあることが見いだされた。例えば、外部メディアの最大転送速度が100MbpsでUSB2.0の480Mbpsの約1/5であり、USBファンクションと外部メディア間のデータ転送速度によってシステム全体の速度が律束されている。一般に、外部メディアはFAT準拠のファイルシステムを持つ。FAT準拠のファイルシステムは、図5に示されるように、メディアを管理するシステムエリア(System Area)と実データを蓄えるユーザエリア(User Area)を持つ。システムエリア(System Area)はメディアの容量やアクセス単位などの情報を格納するパーティションブートセクタ(PBS:Partition Boot Sector)、ファイルの実データのアドレス情報を格納するファイルアロケーションテーブル(FAT:File Allocation Table)、ディレクトリ構成情報を格納するルートディレクトリ(Root Directory)で構成される。このシステムエリアは、ユーザエリア(User Area)に比べリードやライト時に頻繁にアクセスされる。ところが、USBファンクション上のUSBアプリケーションは、そのような特性を考慮した設計になっていない。その結果、無駄なデータ転送を生じている。また近年、組み込みシステムの普及に伴い、UNIX(登録商標)、TRON、独自OSなどにUSBマスストレージクラスが適用されている。ところが、それらのシステムの中にはシステムエリア、及びユーザエリアの最終セクタなどに繰り返しアクセスする仕様となっているものが存在する。その結果、無駄なデータ転送を発生させている。   The inventor of the present application examined the data writing and data reading operations from the USB host, and the data transfer speed between the USB function and the external medium is extremely slow compared to the data transfer speed between the USB host and the USB function. It was found that there was a need for improvement. For example, the maximum transfer speed of the external medium is 100 Mbps and about 1/5 of 480 Mbps of USB 2.0, and the speed of the entire system is regulated by the data transfer speed between the USB function and the external medium. In general, the external media has a FAT-compliant file system. As shown in FIG. 5, the FAT-compliant file system has a system area for managing media and a user area for storing actual data. The system area is a partition boot sector (PBS) that stores information such as media capacity and access unit, and a file allocation table (FAT) that stores address information of actual file data. , And a root directory for storing directory configuration information. This system area is accessed more frequently at the time of reading and writing than the user area. However, the USB application on the USB function is not designed in consideration of such characteristics. As a result, useless data transfer occurs. In recent years, with the spread of embedded systems, the USB mass storage class is applied to UNIX (registered trademark), TRON, unique OS, and the like. However, some of these systems are designed to repeatedly access the system area, the last sector of the user area, and the like. As a result, useless data transfer occurs.

本発明の目的は、データ転送の効率化を図ることにある。   An object of the present invention is to improve the efficiency of data transfer.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、ホストとシリアル通信によってインターフェース可能であり、このホストとこのホストによってアクセス可能なメディアとをインタフェース可能なインタフェースにおいて、上記インタフェースは、上記ホストから上記メディアに書き込まれるデータ、又は上記メディアから読み出されたデータを保持可能な記憶部と、上記ホストから上記メディアへのアクセスにかかるデータが上記記憶部に存在するか否かを判別し、その判別結果に基づいて、上記メディアへのデータ書き込み又は上記メディアからのデータ読み出しを省略可能な制御部とを設ける。   That is, the interface can be interfaced with a host by serial communication, and the interface can interface with the host and a medium accessible by the host. The interface reads data from the host to the medium or reads from the medium. A storage unit capable of holding the recorded data and whether or not the data related to access to the medium from the host exists in the storage unit, and based on the determination result, data writing to the medium or And a control unit capable of omitting reading of data from the medium.

上記の手段によれば、制御部は、上記ホストから上記メディアへのアクセスにかかるデータが上記記憶部に存在するか否かを判別し、その判別結果に基づいて、上記メディアへのデータ書き込み又は上記メディアからのデータ読み出しを省略する。つまり、上記ホストから上記メディアへのアクセスにかかるデータが上記記憶部に存在する場合には、対応するデータがメディアに格納されていることを意味する。その場合において上記メディアへの重複データ書込みを省略することができ、また、データ読み出しの場合は上記記憶部のデータを使用することにより上記メディアからの読み出し動作を省略することができる。このことが、データ転送の効率化を達成する。   According to the above means, the control unit determines whether data relating to access to the medium from the host exists in the storage unit, and based on the determination result, writes data to the medium or Reading data from the media is omitted. That is, when data related to access to the medium from the host exists in the storage unit, it means that the corresponding data is stored in the medium. In this case, it is possible to omit the redundant data writing to the medium, and in the case of data reading, the reading operation from the medium can be omitted by using the data in the storage unit. This achieves efficient data transfer.

このとき、上記インタフェースはUSBファンクションとされ、上記メディアは不揮発性メモリとされ、上記記憶部に記憶されたデータは、パーティションブートセクタ、ファイルアロケーションテーブル、及びルートディレクトリの何れかに関するものとすることができる。   At this time, the interface is a USB function, the medium is a nonvolatile memory, and the data stored in the storage unit is related to any one of a partition boot sector, a file allocation table, and a root directory. it can.

上記USBファンクションはプラグアンドプレイ方式で上記ホストに結合することができる。   The USB function can be coupled to the host in a plug and play manner.

上記インタフェース部に対応するソフトウェアと、上記記憶部保持されたデータとが一致するか否かの判定機能を含めることができる。   A function for determining whether or not the software corresponding to the interface unit matches the data stored in the storage unit can be included.

また、上記USBファンクションは、以下のように構成することができる。   The USB function can be configured as follows.

すなわち、上記USBファンクションは、ライト要求がシステムエリアに対するものか否かを判別する第1処理機能と、上記ライト要求が上記システムエリアである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第2処理機能と、上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合にそのデータと上記ライト要求によって書き込まれるべきライトデータとが等しいか否かを判別する第3処理機能とを設け、上記記憶部に存在する上記システムエリアに対応するアドレスのデータと上記ライトデータとが等しい場合には、上記不揮発性メモリへのデータライトを行うことなく、ライト完了CSW送信を行うように構成することができる。   That is, the USB function includes a first processing function for determining whether or not a write request is for a system area, and when the write request is for the system area, data at an address corresponding to the system area is stored in the memory. The second processing function for determining whether or not the data exists in the storage unit, and whether or not the data at the address corresponding to the system area is equal to the write data to be written by the write request when the data in the storage unit exists in the storage unit A third processing function for determining whether or not, and when the data of the address corresponding to the system area existing in the storage unit is equal to the write data, the data write to the nonvolatile memory is performed Instead, it can be configured to perform write completion CSW transmission.

上記USBファンクションは、ライト要求がシステムエリアに対するものか否かを判別する第1処理機能と、上記ライト要求が上記システムエリアである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第2処理機能と、上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合にそのデータと上記ライト要求によって書き込まれるべきライトデータとが等しいか否かを判別する第3処理機能とを設け、上記記憶部に存在する上記システムエリアに対応するアドレスのデータと上記ライトデータとが一部においてのみ等しい場合には、その等しい部分については上記不揮発性メモリへのデータライトを行うことなく、ライト完了CSW送信を行うように構成することができる。このとき、上記リード要求が上記システムエリアに対するものか否かを判別する第5処理機能と、リード要求が上記システムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第6処理機能と、上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合に、そのデータを上記ホストに送信する第7処理機能とを設け、上記第7処理機能によるデータ送信の後に、リード完了CSW送信を行うように構成することができる。   The USB function includes a first processing function for determining whether or not a write request is for a system area, and when the write request is for the system area, data at an address corresponding to the system area is stored in the storage unit. Whether or not the second processing function for determining whether or not the data exists and the write data to be written by the write request when the data at the address corresponding to the system area exists in the storage unit A third processing function for determining whether the address data corresponding to the system area existing in the storage unit is equal to the write data only in part, the nonvolatile memory for the same part Can be configured to send write completion CSW without writing data to That. At this time, when the read request is for the system area and the fifth processing function for determining whether the read request is for the system area, the data of the address corresponding to the system area is stored in the storage unit. And a seventh processing function for transmitting data to the host when data at an address corresponding to the system area exists in the storage unit, and After the data transmission by the seventh processing function, the read completion CSW transmission can be performed.

上記USBファンクションは、リード要求がシステムエリアに対するものか否かを判別する第5処理機能と、上記リード要求がシステムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第6処理機能と、上記システムエリアに対応するアドレスのデータの一部が上記記憶部に存在する場合に、そのデータを上記ホストに送信する第7処理機能とを設け、上記第7処理機能によるデータ送信の後に、リード完了CSW送信を行うように構成することができる。   The USB function includes a fifth processing function for determining whether or not the read request is for the system area, and when the read request is for the system area, data at an address corresponding to the system area is stored in the storage unit. A seventh processing function for determining whether or not the data exists in the storage unit, and a seventh processing function for transmitting the data to the host when a part of the data of the address corresponding to the system area exists in the storage unit; And the read completion CSW transmission can be performed after the data transmission by the seventh processing function.

さらに、ホストと、このホストとシリアル通信によってインターフェース可能でありこのホストによってアクセス可能なメディアとをインタフェース可能なインタフェース部とを含むデータ転送システムにおいて、上記ホストから上記メディアに書き込まれるデータ、又は上記メディアから読み出されたデータを保持可能なバッファと、上記ホストから上記メディアへのアクセスにかかるデータが上記バッファに存在するか否かを上記上記ホストで判別し、その判別結果に基づいて、上記メディアへのデータ書き込み又は上記メディアからのデータ読み出しを省略可能な制御部とを上記ホストに設けることができる。このとき、上記メディアは不揮発性メモリとされ、上記記憶部に記憶されたデータは、パーティションブートセクタ、ファイルアロケーションテーブル、及びルートディレクトリの何れかに関するものとされる。   Further, in a data transfer system including a host and an interface unit capable of interfacing with the host through serial communication and accessible by the host, data written from the host to the medium, or the medium A buffer capable of holding data read from the host, and whether or not data related to access to the medium from the host exists in the buffer. The host determines based on the determination result. The host can be provided with a control unit capable of omitting data writing to or reading data from the medium. At this time, the medium is a non-volatile memory, and the data stored in the storage unit is related to any of a partition boot sector, a file allocation table, and a root directory.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、ホストと、このホストによってアクセス可能なメディアとをインタフェース可能なインタフェース部を含むデータ転送システムにおいて、データ転送の効率化を図ることができる。   That is, in a data transfer system including an interface unit capable of interfacing a host and a medium accessible by the host, data transfer efficiency can be improved.

図1には、本発明にかかるインタフェースを含むデータ転送システムの構成例が示される。図1に示されるデータ転送システムは、特に制限されないが、USBホスト100、USBファンクション200、及び外部メディア300を含む。   FIG. 1 shows a configuration example of a data transfer system including an interface according to the present invention. The data transfer system shown in FIG. 1 includes, but is not limited to, a USB host 100, a USB function 200, and an external medium 300.

USBホスト100は、アプリケーション101、USBマスストレージクラスドライバ102、USBバスドライバ103、及びUSBホストコントローラ104を含む。アプリケーション100にはエクスプローラやオーディオプレーヤーなどが含まれる。USBマスストレージクラスドライバ102はUSBマスストレージクラスで定義されたコマンドトランスポート、データトランスポート、ステータストランスポートの管理などを行う。USBバスドライバ103はトランザクションの管理などUSBの各クラスに共通な処理を行う。USBホストコントローラ104は、パケット送受信、USBファンクションの接続検出などUSBホストの基本的な処理をする。   The USB host 100 includes an application 101, a USB mass storage class driver 102, a USB bus driver 103, and a USB host controller 104. The application 100 includes an explorer and an audio player. The USB mass storage class driver 102 performs management of command transport, data transport, status transport, and the like defined in the USB mass storage class. The USB bus driver 103 performs processing common to each USB class, such as transaction management. The USB host controller 104 performs basic processing of the USB host such as packet transmission / reception and USB function connection detection.

USBファンクション200は、アプリケーション201、メモリ202、USBマスストレージクラスファームウェア203、外部メディアファームウェア204、USBファンクションコントローラ205、外部メディアホストコントローラ206、及び中央処理装置(CPU)207を含む。特に制限されないが、USBファンクション200は一つの半導体基板上に形成されてもよい。ここで、アプリケーション201、USBマスストレージクラスファームウェア203、外部メディアファームウェア204は、USBファンクション200に含まれる中央処理装置(CPU)207が所定のソフトウェアを実行することにより実現される機能であり、USBファンクションコントローラ205、及び外部メディアホストコントローラはハードウェアによって実現される機能である。   The USB function 200 includes an application 201, a memory 202, a USB mass storage class firmware 203, an external media firmware 204, a USB function controller 205, an external media host controller 206, and a central processing unit (CPU) 207. Although not particularly limited, the USB function 200 may be formed on one semiconductor substrate. Here, the application 201, the USB mass storage class firmware 203, and the external media firmware 204 are functions realized when the central processing unit (CPU) 207 included in the USB function 200 executes predetermined software. The controller 205 and the external media host controller are functions realized by hardware.

アプリケーション201は、USBと外部メディア固有のデータ形式のインタフェースをとる。また、ライト要求CBW又はリード要求CBWを受信すると、それを解析し、システムエリアに対応したデータであれば、メモリ202にそれを格納する機能を持つ。メモリ202は、不揮発性であるROMの領域とRAMの領域とを持っており、上記所定のソフトウエアを格納するための領域をROM形態にて有しており、RAMの形態にて上記USBホスト100から上記外部メディア300に書き込まれるデータ又は上記外部メディア300から読み出されたデータを保持するための領域を有している。このメモリ202のRAMの領域の記憶データは、上記USBホスト100によって外部メディア300がアクセスされる際に利用される。このメモリ202のRAMの領域の記憶容量は、外部メディア300に応じて設定される。USBバスストレージクラスファームウェア203は、USBマスストレージクラスに固有の処理やUSBファンクションコントローラ205の制御などを行う。外部メディアファームウェア204は、外部メディアのトランザクション管理や外部メディアコントローラの制御などを行う。USBファンクションコントローラ205は、パケット送受信などUSBファンクションの基本的な処理をする。外部メディアホストコントローラ206は、外部メディア300へのコマンド送信、及び外部メディア300からのレスポンス受信、並びに外部メディア300との間でデータ送受信を行う。   The application 201 has an interface in a data format specific to USB and external media. Also, when a write request CBW or a read request CBW is received, it is analyzed, and if it is data corresponding to the system area, it has a function of storing it in the memory 202. The memory 202 has a non-volatile ROM area and a RAM area. The memory 202 has an area for storing the predetermined software in the ROM form, and the USB host in the RAM form. An area for holding data written from 100 to the external medium 300 or data read from the external medium 300 is provided. The stored data in the RAM area of the memory 202 is used when the external medium 300 is accessed by the USB host 100. The storage capacity of the RAM area of the memory 202 is set according to the external medium 300. The USB bus storage class firmware 203 performs processing unique to the USB mass storage class, control of the USB function controller 205, and the like. The external media firmware 204 performs external media transaction management, control of an external media controller, and the like. The USB function controller 205 performs basic processing of the USB function such as packet transmission / reception. The external media host controller 206 performs command transmission to the external media 300, reception of responses from the external media 300, and data transmission / reception with the external media 300.

上記USBファンクションコントローラ205は、図2に示されるように、送受信データを格納するFIFO部205A、USBのパケット化や基本コマンドのデコードなどをするコア部205B、及びアナログ/ディジタル(A/D)変換などを行うトランシーバ部205Cを含んで成る。FIFO部205A及びコア部205Bは、図示されない中央処理装置(CPU)に結合され、トランシーバ205CはUSBコネクタ(D+,D−)及びUSBケーブルを介してUSBホストコントローラ104に結合される。ここで、本発明における制御部は、アプリケーション201、USBバスストレージクラスファームウェア203、外部メディアファームウェア204、USBファンクションコントローラ205、及び外部メディアホストコントローラ206によって形成される。   As shown in FIG. 2, the USB function controller 205 includes a FIFO unit 205A that stores transmission / reception data, a core unit 205B that performs USB packetization and basic command decoding, and analog / digital (A / D) conversion. It includes a transceiver unit 205C that performs the above. The FIFO unit 205A and the core unit 205B are coupled to a central processing unit (CPU) (not shown), and the transceiver 205C is coupled to the USB host controller 104 via a USB connector (D +, D−) and a USB cable. Here, the control unit in the present invention is formed by the application 201, the USB bus storage class firmware 203, the external media firmware 204, the USB function controller 205, and the external media host controller 206.

上記構成の作用について説明する。   The operation of the above configuration will be described.

図6には書き込み処理の流れが示される。   FIG. 6 shows the flow of the writing process.

USBファンクション200上のアプリケーションは、USBマスストレージクラスファームウエア203からライト要求CBWを受信すると(S100)、そのアドレスとデータ数の解析が行われる。そして、ライト要求がシステムエリアに対応するものか否かの判別が行われ(S102)。この判別においてライト要求がシステムエリアに対応するものではない(NO)と判断された場合には、外部メディアファームウェアにライト要求され(S106)、ライト完了CSWの送信が行われる(S107)。また、上記ステップS102の判別においてライト要求がシステムエリアに対応するものである(YES)と判断された場合には、システムエリアに対応するアドレスのデータがメモリ202内に存在するか否かの判別が行われる(S103)。この判別において、システムエリアに対応するアドレスのデータがメモリ202に存在しない(NO)、と判断された場合には、上記対応するアドレスのデータがメモリ202に保存されてから(S105)、外部メディアファームウェアにライト要求され(S106)、ライト完了CSWの送信が行われる(S107)。また、上記ステップS103の判別において、システムエリアに対応するアドレスのデータがメモリ202に存在する(YES)、と判断された場合には、ライトデータとメモリ202のデータとが同じか否かの判別が行われる(S104)。この判別において、ライトデータとメモリ202のデータとが同じではない(NO)、と判断された場合には、ライトデータがメモリ202に保存されてから(S105)、外部メディアファームウェアにライト要求される(S106)。上記ステップS104の判別において、ライトデータとメモリ202のデータとが同じである(YES)と判断された場合には、上記ステップS105のメモリ保存や、ステップS106のライト要求を発することなく、ライト完了CSWを送信して終了する(S107)。   When the application on the USB function 200 receives the write request CBW from the USB mass storage class firmware 203 (S100), the address and the number of data are analyzed. Then, it is determined whether or not the write request corresponds to the system area (S102). If it is determined in this determination that the write request does not correspond to the system area (NO), a write request is made to the external media firmware (S106), and a write completion CSW is transmitted (S107). If it is determined in step S102 that the write request corresponds to the system area (YES), it is determined whether or not data at an address corresponding to the system area exists in the memory 202. Is performed (S103). In this determination, if it is determined that the data at the address corresponding to the system area does not exist in the memory 202 (NO), the data at the corresponding address is stored in the memory 202 (S105), and then the external media. A write request is made to the firmware (S106), and a write completion CSW is transmitted (S107). If it is determined in step S103 that the address data corresponding to the system area exists in the memory 202 (YES), it is determined whether the write data and the data in the memory 202 are the same. Is performed (S104). In this determination, if it is determined that the write data and the data in the memory 202 are not the same (NO), the write data is stored in the memory 202 (S105), and then a write request is made to the external media firmware. (S106). If it is determined in the determination in step S104 that the write data and the data in the memory 202 are the same (YES), the write is completed without storing the memory in step S105 or issuing the write request in step S106. The CSW is transmitted and the process ends (S107).

このようにライトデータの受信が行われた場合に、ライト要求がシステムエリアで、対応するアドレスのデータがメモリ202に存在し、しかもそれがライトデータと同じである場合には、外部メディアファームウェアへのライト要求が行われることなく、ライト完了CSWの送信が行われるため、外部メディア300へのライト動作は行われない。そのことにより、転送速度の遅い外部メディアとのアクセスを抑えることができ、データ転送の効率化を図ることができる。   When the write data is received in this way, if the write request is in the system area and the data at the corresponding address exists in the memory 202 and is the same as the write data, it is sent to the external media firmware. Since the write completion CSW is transmitted without the write request being made, the write operation to the external medium 300 is not performed. As a result, access to an external medium with a low transfer rate can be suppressed, and the efficiency of data transfer can be improved.

また、上記ステップS103、S104の判別は、ライト要求されたデータの一部に対しても行われる。すなわち、上記ステップS103の判別において、システムエリアに対応するアドレスのデータの一部がメモリ202に存在すると判断された場合には、メモリ202に存在する部分についてはライトデータとメモリ202のデータとが同じか否かの判別が行われる。また、この場合において、メモリ202に存在しない部分についてはメモリ202に保存され(S105)、外部メディアファームウェアにライト要求が発せられる。   The determinations in steps S103 and S104 are also performed for a part of the data requested to be written. That is, in the determination in step S103, if it is determined that a part of the data of the address corresponding to the system area exists in the memory 202, the write data and the data in the memory 202 are stored in the part existing in the memory 202. A determination is made as to whether they are the same. In this case, the portion not existing in the memory 202 is stored in the memory 202 (S105), and a write request is issued to the external media firmware.

図7には読み出し処理の流れが示される。   FIG. 7 shows the flow of read processing.

USBファンクション200上のアプリケーションは、USBマスストレージクラスファームウエアからリード要求CBWを受信すると(S200)、そのリード要求アドレスとデータ数が解析される。そして、リード要求がシステムエリアに対応するものであるか否かの判別が行われる(S201)。この判別において、リード要求がシステムエリアに対応するものでは無い(NO)、と判断された場合には、外部メディアファームウェアにリード要求がなされ(S204)、外部メディアから読み出されたデータがUSBホスト100に送信される(S205)。そして、リード完了CSW送信が行われる(S209)。また、上記ステップS201の判別において、リード要求がシステムエリアに対応するものである(YES)と判断された場合には、システムエリアに対応するアドレスのデータがメモリ202に存在するか否かの判別が行われる(S202)。この判別において、システムエリアに対応するアドレスのデータがメモリ202に存在しない(NO)、と判断された場合には、外部メディアファームウェアにリード要求され(S206)、外部メディア300から読み出されたデータがメモリ202に保存される(S207)。そして、外部メディア300から読み出されたデータがUSBホスト100に送信されてから(S208)、リード完了CSW送信が行われる(S209)。さらに、上記ステップS202の判別において、システムエリアに対応するアドレスのデータがメモリ202に存在する(YES)、と判断された場合には、メモリ202に保存されていたそのデータがUSBホスト100に送信される(S203)。そしてリード完了CSW送信が行われる(S209)。   When the application on the USB function 200 receives a read request CBW from the USB mass storage class firmware (S200), the read request address and the number of data are analyzed. Then, it is determined whether or not the read request corresponds to the system area (S201). In this determination, if it is determined that the read request does not correspond to the system area (NO), a read request is made to the external media firmware (S204), and the data read from the external media is transferred to the USB host. 100 (S205). Then, read completion CSW transmission is performed (S209). If it is determined in step S201 that the read request corresponds to the system area (YES), it is determined whether or not the data at the address corresponding to the system area exists in the memory 202. Is performed (S202). In this determination, if it is determined that the data at the address corresponding to the system area does not exist in the memory 202 (NO), a read request is issued to the external media firmware (S206), and the data read from the external media 300 is read. Is stored in the memory 202 (S207). Then, after the data read from the external medium 300 is transmitted to the USB host 100 (S208), read completion CSW transmission is performed (S209). Furthermore, if it is determined in step S202 that the address data corresponding to the system area exists in the memory 202 (YES), the data stored in the memory 202 is transmitted to the USB host 100. (S203). Then, read completion CSW transmission is performed (S209).

このように上記ステップS202の判別において、システムエリアに対応するアドレスのデータがメモリ202に存在する(YES)、と判断された場合には、外部メディアファームウェアへのリード要求が行われずに、メモリ202に存在するデータがUSBホスト100に送信されるため、USBホストシステム100は、リード要求にかかるデータを速やかに得ることができる。   As described above, when it is determined in the determination of step S202 that the data of the address corresponding to the system area exists in the memory 202 (YES), the read request to the external media firmware is not performed, and the memory 202 Therefore, the USB host system 100 can promptly obtain the data related to the read request.

尚、上記ステップS202の判別は、リード要求されたデータの一部に対しても行うことができる。すなわち、リード要求されたデータの一部がメモリ202に存在する場合には、その部分についてはメモリ202内のデータがUSBホスト100に送信され(S203)、それ以外の部分については外部メディアファームウェアリード要求がなされ(S206)、外部メディア300から読み出されたデータがメモリ202に保存されるとともに(S207)、USBホスト100に送信される(S208)。   Note that the determination in step S202 can also be performed for part of the data requested to be read. That is, when a part of the data requested to be read exists in the memory 202, the data in the memory 202 is transmitted to the USB host 100 for the part (S203), and the external media firmware read for the other part. A request is made (S206), and the data read from the external medium 300 is stored in the memory 202 (S207) and transmitted to the USB host 100 (S208).

図8には、上記書き込み処理におけるUSBホスト100、USBファンクション200、及び外部メディア300での処理の具体的な内容が示される。   FIG. 8 shows specific contents of processing in the USB host 100, USB function 200, and external medium 300 in the writing process.

USBホスト100は、USBマスストレージクラスで定義されたライト要求CBWをUSBファンクションに発行する(31)。USBファンクション200は、ライト要求CBWを受信すると、ライトアドレスやデータ数を解析する。また、ライト要求CBWを外部メディア固有の形式に変換する(32)。解析した結果、ライト要求がシステムエリアに対応するものであれば、セーブフラグを設定する(32’)。USBファンクション200は、外部メディアにライトコマンドを発行する(33)。外部メディア300は、ライトコマンドを受信すると、ライトアドレスやデータ数を解析する(34)。USBホストは、USBマスストレージクラスで定義された形式でライトデータを、USBファンクションに送信する(35)。USBファンクション200は、ライトデータを受信すると(36)、ライトデータを外部メディア固有のデータ形式に変換する。セーブフラグが設定されており、ライト対象のアドレスに対応するデータがすでにメモリ上に存在すれば、ライトデータとメモリの内容を比較し、同じであれば(40B)に遷移する。また、セーブフラグが設定されていても、ライト対象のアドレスに対応するデータがメモリ上に存在しない、または存在してもライトデータとメモリの内容が異なればライトデータをメモリに保存する(36’)。USBファンクション200は、外部メディアにライトデータを送信する(37)。外部メディアはライトデータを受信すると、それをメモリに書き込む(38)。外部メディア300はデータの書き込みが全て完了すると、完了したことをUSBファンクションに通知する(39)。
USBファンクション200は、完了通知を受信すると、それをUSBマスストレージクラスで定義されたライト完了CSWに変換する(40A)。USBファンクション200は、USBホスト100にライト完了CSWを送信する(40B)。
USBホスト100は、ライト完了CSWを受信すると、ライト動作が終了したことを認識し、ライト動作が完了する(40C)。
The USB host 100 issues a write request CBW defined in the USB mass storage class to the USB function (31). When receiving the write request CBW, the USB function 200 analyzes the write address and the number of data. Also, the write request CBW is converted into a format specific to the external medium (32). As a result of the analysis, if the write request corresponds to the system area, a save flag is set (32 '). The USB function 200 issues a write command to the external medium (33). When receiving the write command, the external medium 300 analyzes the write address and the number of data (34). The USB host transmits write data to the USB function in the format defined by the USB mass storage class (35). When the USB function 200 receives the write data (36), the USB function 200 converts the write data into a data format specific to the external medium. If the save flag is set and the data corresponding to the write target address already exists in the memory, the write data is compared with the contents of the memory, and if they are the same, the process proceeds to (40B). Even if the save flag is set, the data corresponding to the write target address does not exist in the memory, or even if it exists, the write data is saved in the memory if the contents of the memory differ from the write data (36 ′ ). The USB function 200 transmits write data to the external medium (37). When the external medium receives the write data, it writes it into the memory (38). When the external media 300 completes the data writing, it notifies the USB function of the completion (39).
Upon receiving the completion notification, the USB function 200 converts it into a write completion CSW defined by the USB mass storage class (40A). The USB function 200 transmits a write completion CSW to the USB host 100 (40B).
Upon receiving the write completion CSW, the USB host 100 recognizes that the write operation has ended, and the write operation is completed (40C).

このようにライト対象アドレスに対応するデータがすでにメモリ上に存在すれば、ライトデータとメモリの内容を比較し、同じであれば、(37)〜(40A)までのステップを省略することができるので、その分、データ転送の効率向上を図ることができる。   Thus, if data corresponding to the write target address already exists in the memory, the write data is compared with the contents of the memory, and if they are the same, the steps (37) to (40A) can be omitted. Therefore, the efficiency of data transfer can be improved accordingly.

図9には、上記読み出し処理におけるUSBホスト100、USBファンクション200、及び外部メディア300での処理の具体的な内容が示される。   FIG. 9 shows specific contents of processing in the USB host 100, USB function 200, and external medium 300 in the reading process.

USBホストはUSBマスストレージクラスで定義されたリード要求CBWをUSBファンクションに発行する(41)。USBファンクションはリード要求CBWを受信すると、リードアドレスやデータ数を解析する(42)。解析した結果、リード対象のアドレスに対応するデータがすでにメモリ上に存在すれば、外部メディアからデータを読み出す必要はないので、メモリ上のデータをUSBマスストレージクラスで定義されたデータ形式に変換、リターンフラグを設定し、ステップ(47)に遷移する。また、メモリ202上に存在しなければ、ステップ(43)に遷移する。USBファンクションは外部メディア固有の形式で、リードコマンドを発行する(43)。外部メディア300は、リードコマンドを受信すると、リードアドレスやデータ数を解析する(44)。解析完了後、外部メディア300はデータをUSBファンクション200に送信する(45)。USBファンクション200はリードデータを受信し(46)、それをUSBマスストレージクラスで定義されたデータ形式に変換する。受信したリードデータがシステムエリアのデータであれば、リードデータをメモリ202に保存する(46’)。USBファンクション200は、USBホスト100にリードデータを送信する(47)。ここで、リターンフラグが設定されている場合(リードデータがすでにメモリ上に存在した場合)、外部メディア300からの読み出し完了通知を待つ必要がないので、リードデータを送信完了後、すぐにUSBホスト100にリード完了CSWを送信することができる(50B)。USBホスト100は、リードデータを受信する(48)。外部メディア300はデータの送信が全て完了すると、完了したことをUSBファンクション200に通知する(49)。USBファンクション200は、完了通知を受信すると、それをUSBマスストレージクラスで定義されたリード完了CSWに変換する(50A)。USBファンクション200は、USBホスト100にリード完了CSWを送信する(50B)。USBホスト100は、リード完了CSWを受信すると、リード動作が終了したことを認識し、リード動作が終了する(50C)。   The USB host issues a read request CBW defined in the USB mass storage class to the USB function (41). Upon receiving the read request CBW, the USB function analyzes the read address and the number of data (42). As a result of analysis, if the data corresponding to the read target address already exists in the memory, it is not necessary to read the data from the external medium, so the data on the memory is converted into a data format defined by the USB mass storage class. A return flag is set, and the process proceeds to step (47). If it does not exist on the memory 202, the process proceeds to step (43). The USB function issues a read command in a format unique to the external medium (43). When the external medium 300 receives the read command, it analyzes the read address and the number of data (44). After the analysis is completed, the external medium 300 transmits data to the USB function 200 (45). The USB function 200 receives the read data (46) and converts it into a data format defined by the USB mass storage class. If the received read data is data in the system area, the read data is stored in the memory 202 (46 '). The USB function 200 transmits read data to the USB host 100 (47). Here, when the return flag is set (when the read data already exists in the memory), there is no need to wait for a read completion notification from the external medium 300. The read completion CSW can be transmitted to 100 (50B). The USB host 100 receives the read data (48). When all the data transmission is completed, the external medium 300 notifies the USB function 200 of the completion (49). Upon receiving the completion notification, the USB function 200 converts it into a read completion CSW defined by the USB mass storage class (50A). The USB function 200 transmits a read completion CSW to the USB host 100 (50B). Upon receiving the read completion CSW, the USB host 100 recognizes that the read operation has ended, and the read operation ends (50C).

このようにリードデータがメモリ202に存在する場合には、ステップ(43)〜(46)を省略することができ、リターンフラグが設定されている場合には、ステップ(49),(50A)の処理を省略することができるので、その分、データ読み出しの効率向上を図ることができる。   As described above, when the read data exists in the memory 202, the steps (43) to (46) can be omitted. When the return flag is set, the steps (49) and (50A) are omitted. Since the processing can be omitted, the efficiency of data reading can be improved accordingly.

本発明の別の構成例について説明する。   Another configuration example of the present invention will be described.

上記の例ではUSBファンクション200を改良することによってデータ転送の効率化を図ったが、USBマスストレージクラスドライバの機能を拡張することによってデータ転送の効率化を図っても良い。   In the above example, the data transfer efficiency is improved by improving the USB function 200. However, the data transfer efficiency may be improved by extending the function of the USB mass storage class driver.

例えば図15に示されるように、外部メディア300のシステムエリアに対するデータをUSBホスト100上のメモリ(バッファ)105に保存する機能を追加することによって書き込み動作と読み出し動作の効率化が可能となる。上記USBホスト100から上記外部メディア300へのアクセスにかかるデータが上記メモリに存在するか否かを判別し、その判別結果に基づいて、上記外部メディア300へのデータ書き込み又は上記外部メディア300からのデータ読み出しを省略可能な制御部はUSBホスト100において機能的に実現される。以下、それについて、上記メモリ105へのデータ保存時とメモリ105からのデータ読み出し時とに分けて説明する。尚、データ保存時には、USBホスト100上のアプリケーションがライト要求を出した場合と、リード要求を出した場合とがある。環境は、Windows(登録商標)上でUSBマスストレージクラスのバック・オンリー・トランスポート(Bulk-Only Transport)を適用しているものとする。   For example, as shown in FIG. 15, by adding a function of storing data for the system area of the external medium 300 in the memory (buffer) 105 on the USB host 100, the efficiency of the write operation and the read operation can be improved. It is determined whether or not data related to access to the external medium 300 from the USB host 100 exists in the memory, and based on the determination result, data writing to the external medium 300 or data from the external medium 300 is performed. A control unit capable of omitting data reading is functionally realized in the USB host 100. Hereinafter, this will be described separately when data is stored in the memory 105 and when data is read from the memory 105. When saving data, there are a case where an application on the USB host 100 issues a write request and a case where a read request is issued. It is assumed that the environment applies USB mass storage class back-only transport (Bulk-Only Transport) on Windows (registered trademark).

図10には、アプリケーションがライト要求を出した場合のUSBホスト上のメモリへデータ保存時の処理が示される。   FIG. 10 shows processing when data is stored in the memory on the USB host when the application issues a write request.

<コマンドトランスポート>
アプリケーションは、Win32API関数ライトファイル(WriteFile)を使用する。先ずライト要求CBWを機能拡張したUSBマスストレージクラスドライバ(以下、「クラスドライバ」という)に渡す(51)。尚、記録媒体とのデータのやり取りを行う為のUSBのデータ転送方式であるバルク転送では通常ライトファイル(WriteFile(バルクアウト))とリードファイル(ReadFile(バルクイン))が使用される。クラスドライバは、IOマネージャ経由で、ライト要求CBWに関する要求パケットであるライト命令の一種のIRP_MJ_WRITEを受け取ると、ライト要求CBWの内容を解析し、ライト要求がシステムエリアであればセーブフラグを設定する(52)。その後、ライト要求CBWに関するライト命令の一種のUSBリクエストをバスドライバに発行する。USBバスドライバは、ライト要求CBWに関するライト命令の一種のURBリクエストを受け取ると、ライト要求CBWをUSBファンクションに送信する(53)。ここで、上記IOマネージャでは、アプリケーション(ユーザモード)とドライバ(カーネルモード)の入出力を管理するオペレーティングシステムの機能を意味する。また、アプリケーションが実行したWin32API関数は、IOマネージャーにより命令の一種である1個以上のIRPに変換され、ドライバに渡される。ライトファイル(WriteFile)はIRP_MJ_WRITEに対応され、リードファイル(Read File)はIRP_MJ_READに対応する。さらに、URBリクエストとは、USBバスドライバにトランザクションの開始を依頼するリクエストを意味する。
<Command transport>
The application uses a Win32 API function write file (WriteFile). First, the write request CBW is passed to a USB mass storage class driver (hereinafter referred to as “class driver”) whose function has been expanded (51). Note that in bulk transfer, which is a USB data transfer method for exchanging data with a recording medium, a normal write file (WriteFile (bulk out)) and a read file (ReadFile (bulk in)) are used. When the class driver receives a kind of IRP_MJ_WRITE, which is a request packet related to the write request CBW, via the IO manager, it analyzes the contents of the write request CBW and sets a save flag if the write request is a system area ( 52). Thereafter, a kind of USB request of a write command related to the write request CBW is issued to the bus driver. When the USB bus driver receives a kind of URB request as a write command for the write request CBW, the USB bus driver transmits the write request CBW to the USB function (53). Here, the IO manager means an operating system function for managing input / output of an application (user mode) and a driver (kernel mode). Further, the Win32 API function executed by the application is converted into one or more IRPs which are a kind of instruction by the IO manager, and passed to the driver. The write file (WriteFile) corresponds to IRP_MJ_WRITE, and the read file (Read File) corresponds to IRP_MJ_READ. Further, the URB request means a request for requesting the USB bus driver to start a transaction.

<データトランスポート>
アプリケーションは、ライトファイル(WriteFile)を使用し、データをクラスドライバに渡す(54)。クラスドライバは、データに関する要求パケットIRP_MJ_WRITEを受け取ると、セーブフラグが設定されていれば、ライト対象アドレスに対応するデータがすでにメモリ105に存在するかを判定する。存在した場合、データとメモリの内容を比較し、同じであれば処理を完了し、書き込み動作に関する効率化ができる。また、ライト対象アドレスに対応するデータがメモリ105に存在しない、または存在してもライトデータとメモリ105の内容が異なれば、メモリ領域を確保し、そのデータをメモリ105に保存する(55)。その後、データに関するURBリクエストをUSBバスドライバに発行する。USBバスドライバは、データに関するURBリクエストを受け取ると、データをUSBファンクション200に送信する(56)。
<Data transport>
The application uses a write file (WriteFile) and passes data to the class driver (54). When the class driver receives the request packet IRP_MJ_WRITE relating to data, if the save flag is set, the class driver determines whether data corresponding to the write target address already exists in the memory 105. If the data exists, the data and the contents of the memory are compared. If the data corresponding to the write target address does not exist in the memory 105 or if the write data differs from the contents of the memory 105 even if it exists, a memory area is secured and the data is stored in the memory 105 (55). Thereafter, a URB request regarding data is issued to the USB bus driver. When the USB bus driver receives the URB request relating to the data, the USB bus driver transmits the data to the USB function 200 (56).

<ステータストランスポート>
USBホスト100におけるアプリケーションは、リードファイル(ReadFile)を使用し、USBマスストレージクラスで定義されたライト完了CSWのリード要求をクラスドライバに発行する(57)。クラスドライバは、ライト完了CSWに関する要求パケットであるライト命令の一種のIRP_MJ_READを受け取ると、セーブフラグが設定されていれば、それをクリアし、ライト完了CSWに関するURBリクエストをバスドライバに発行する(58)。その後、ライト完了CSWをバスドライバから受け取り、それをIOマネージャー経由でアプリケーションに渡す。USBバスドライバは、ライト完了CSWに関するURBリクエストを受け取ると、USBホストからUSBファンクションに対して読み出し動作を通知する為の命令であるINトークンをUSBファンクションに発行する。INトークンに対するライト完了CSWを受信後、それをクラスドライバに渡す(59)。ここで、INトークンとはUSB規格で定義されたパケットで、USBホストがファンクションにデータを要求するときに使用される。
<Status transport>
The application in the USB host 100 uses the read file (ReadFile) and issues a read request for the write completion CSW defined by the USB mass storage class to the class driver (57). When the class driver receives a kind of IRP_MJ_READ, which is a request packet related to the write completion CSW, clears the save flag if it is set, and issues an URB request related to the write completion CSW to the bus driver (58). ). Thereafter, the write completion CSW is received from the bus driver, and is passed to the application via the IO manager. When the USB bus driver receives a URB request related to the write completion CSW, the USB bus driver issues an IN token, which is a command for notifying the USB function of a read operation from the USB host, to the USB function. After receiving the write completion CSW for the IN token, it is passed to the class driver (59). Here, the IN token is a packet defined by the USB standard, and is used when the USB host requests data from the function.

図11には、アプリケーションがリード要求を出した場合のUSBホスト上のメモリへデータ保存時の処理が示される。   FIG. 11 shows processing at the time of saving data in the memory on the USB host when the application issues a read request.

<コマンドトランスポート>
USBホスト100におけるアプリケーションは、ライトファイル(WriteFile)を使用し、リード要求CBWをクラスドライバに渡す(61)。クラスドライバは、リード要求CBWに関する要求パケットIRP_MJ_WRITEを受け取ると、リード要求CBWの内容を解析し、次のデータトランスポートでのリード要求がシステムエリアであり、リード対象のアドレスに対応するデータがメモリに保存されていなければセーブフラグを設定する(62)。その後、リード要求CBWに関するURBリクエストをバスドライバに発行する。また、次のデータトランスポートでのリード要求がシステムエリアに対応するものであり、リード対象のアドレスに対応するデータがメモリに保存されていれば、後の読み出し時で示すように、メモリのデータをアプリケーションに返すことになる。USBバスドライバは、リード要求CBWに関するURBリクエストを受け取ると、リード要求CBWをUSBファンクションに送信する(63)。
<Command transport>
The application in the USB host 100 uses a write file (WriteFile) and passes a read request CBW to the class driver (61). When the class driver receives the request packet IRP_MJ_WRITE relating to the read request CBW, the class driver analyzes the content of the read request CBW, the read request in the next data transport is the system area, and the data corresponding to the read target address is stored in the memory. If not saved, a save flag is set (62). Thereafter, a URB request related to the read request CBW is issued to the bus driver. If the next data transport read request corresponds to the system area and the data corresponding to the read target address is stored in the memory, as shown in the subsequent read, the data in the memory Will be returned to the application. When receiving the URB request related to the read request CBW, the USB bus driver transmits the read request CBW to the USB function (63).

<データトランスポート>
USBホスト100におけるアプリケーションは、リードファイル(ReadFile)を使用し、リード要求をクラスドライバに発行する(64)。クラスドライバは、データに関する要求パケットIRP_MJ_READを受け取ると、データに関するURBリクエストをバスドライバに発行する。その後、バスドライバからデータを受け取り、セーブフラグが設定されていれば、メモリ領域を確保しデータを保存する(65)。その後、データをIOマネージャー経由でアプリケーションに渡す。USBバスドライバは、データに関するURBリクエストを受け取ると、INトークンをUSBファンクションに発行する(66)。INトークンに対するデータ受信後、それをクラスドライバに渡す。
<Data transport>
The application in the USB host 100 uses a read file (ReadFile) and issues a read request to the class driver (64). When the class driver receives the request packet IRP_MJ_READ related to data, it issues a URB request related to data to the bus driver. Thereafter, data is received from the bus driver, and if the save flag is set, a memory area is secured and the data is saved (65). Thereafter, the data is passed to the application via the IO manager. When receiving the URB request for data, the USB bus driver issues an IN token to the USB function (66). After receiving the data for the IN token, it is passed to the class driver.

<ステータストランスポート>
USBホスト100におけるアプリケーションは、リードファイル(ReadFile)を使用し、リード完了CSWのリード要求をクラスドライバに発行する(67)。クラスドライバは、リード完了CSWに関する要求パケットIRP_MJ_READを受け取ると、セーブフラグが設定されていれば、それをクリアし、リード完了CSWに関するURBリクエストをバスドライバに発行する(68)。その後、リード完了CSWをバスドライバから受け取り、それをIOマネージャー経由でアプリケーションに渡す。USBバスドライバは、リード完了CSWに関するURBリクエストを受け取ると、INトークンをUSBファンクションに発行する(69)。INトークンに対するリード完了CSWを受信後、それをクラスドライバに渡す。
<Status transport>
The application in the USB host 100 uses the read file (ReadFile) and issues a read request for the read completion CSW to the class driver (67). Upon receiving the request packet IRP_MJ_READ related to the read completion CSW, the class driver clears the save flag if it is set, and issues a URB request related to the read completion CSW to the bus driver (68). Thereafter, the read completion CSW is received from the bus driver, and is passed to the application via the IO manager. When receiving the URB request regarding the read completion CSW, the USB bus driver issues an IN token to the USB function (69). After receiving the read completion CSW for the IN token, it passes it to the class driver.

図12には読み出し時の処理が示される。   FIG. 12 shows processing at the time of reading.

<コマンドトランスポート>
USBホスト100におけるアプリケーションは、ライトファイル(WriteFile)を使用し、リード要求CBWをクラスドライバに渡す(71)。クラスドライバは、リード要求CBWに関する要求パケットIRP_MJ_WRITEを受け取ると、リード要求CBWの内容を解析する。解析の結果、リード対象のアドレスに対応するデータがメモリに保存されていれば、次のデータトランスポートで返せるようにデータを準備し、リターンフラグを設定する。そして、IOマネージャーにステータス・サクセス(STATUS_SUCCESS)を返し、リード要求CBWに関する要求パケットIRP_MJ_WRITEを完了させる。また、メモリに保存されていなければ、バスドライバにリード要求CBWに関するURBを発行することになる。
<Command transport>
The application in the USB host 100 uses a write file (WriteFile) and passes a read request CBW to the class driver (71). Upon receiving the request packet IRP_MJ_WRITE related to the read request CBW, the class driver analyzes the content of the read request CBW. If the data corresponding to the read target address is stored in the memory as a result of the analysis, the data is prepared so that it can be returned by the next data transport, and the return flag is set. Then, the status success (STATUS_SUCCESS) is returned to the IO manager, and the request packet IRP_MJ_WRITE relating to the read request CBW is completed. If not stored in the memory, the URB related to the read request CBW is issued to the bus driver.

USBバスドライバは、データがメモリに保存されていればURBリクエストを受信しないので、何もしなくてよい。   Since the USB bus driver does not receive the URB request if the data is stored in the memory, it does not need to do anything.

<データトランスポート>
USBホスト100におけるアプリケーションは、リードファイル(ReadFile)を使用し、リード要求をクラスドライバに発行する(73)。クラスドライバは、データに関する要求パケットIRP_MJ_READを受け取る。リターンフラグが設定されていれば、準備しておいたデータをIOマネージャー経由でアプリケーションに渡す。そして、IOマネージャーにステータス・サクセス(STATUS_SUCCESS)を返しデータに関する要求パケットIRP_MJ_READを完了させる(74)。また、リターンフラグが設定されていなければ、バスドライバへデータに関するURBを発行することになる。
<Data transport>
The application in the USB host 100 uses a read file (ReadFile) and issues a read request to the class driver (73). The class driver receives a request packet IRP_MJ_READ related to data. If the return flag is set, the prepared data is passed to the application via the IO manager. Then, a status success (STATUS_SUCCESS) is returned to the IO manager to complete the request packet IRP_MJ_READ related to the data (74). If the return flag is not set, a URB related to data is issued to the bus driver.

USBバスドライバは、リターンフラグが設定されていればURBリクエストを受信しないので、何もしなくてよい。   The USB bus driver does not receive a URB request if the return flag is set, and therefore does not need to do anything.

<ステータストランスポート>
USBホスト100におけるアプリケーションは、リードファイル(ReadFile)を使用し、リード完了CSWのリード要求をクラスドライバに発行する(75)。クラスドライバは、リード完了CSWに関する要求パケットIRP_MJ_READを受け取ると、リターンフラグが設定されていれば、それをクリアする。そして、IOマネージャーにステータス・サクセス(STATUS_SUCCESS)を返し、リード完了CSWに関するIRP_MJ_READを完了させる(76)。また、リターンフラグが設定されていなければ、バスドライバにCSWに関するURBを発行することになる。USBバスドライバは、リターンフラグが設定されていればURBリクエストを受信しないので、何もしなくてよい。
<Status transport>
The application in the USB host 100 uses the read file (ReadFile) and issues a read request for the read completion CSW to the class driver (75). When the class driver receives the request packet IRP_MJ_READ related to the read completion CSW, if the return flag is set, the class driver clears it. Then, the status success (STATUS_SUCCESS) is returned to the IO manager, and the IRP_MJ_READ related to the read completion CSW is completed (76). If the return flag is not set, the URB related to CSW is issued to the bus driver. The USB bus driver does not receive a URB request if the return flag is set, and therefore does not need to do anything.

以上により、読み出し時において、リード要求CBW、データ、リード完了CSWに関するUSBホストとUSBファンクション間のUSB転送、及びUSBファンクションと外部メディア間のコマンド、レスポンス、データ転送の省略が可能となる。   As described above, at the time of reading, it is possible to omit the USB transfer between the USB host and the USB function related to the read request CBW, data, and read completion CSW, and the command, response, and data transfer between the USB function and the external medium.

メモリ105に保存する領域を拡張することによって上記の場合と同様の効果を得ることができる。   By expanding the area stored in the memory 105, the same effect as in the above case can be obtained.

USBファンクション上のメモリに保存する領域をユーザエリアの頻繁にアクセスされる領域に拡張することができる。本応用例を外部メディア300としてメモリカードを含むシステムに適用した場合について説明する。本応用例を適用するため、図1のシステム構成においてUSBファンクション200上に、図13に示されるような参照レジストリ400を作成する。また、アプリケーションを変更する。   The area stored in the memory on the USB function can be expanded to a frequently accessed area in the user area. A case where the present application example is applied to a system including a memory card as the external medium 300 will be described. In order to apply this application example, a reference registry 400 as shown in FIG. 13 is created on the USB function 200 in the system configuration of FIG. Also change the application.

参照レジストリ400は、メモリカードID情報と参照テーブルから構成される。メモリカードID情報は、個々のメモリカード識別を目的とし、メモリカード毎に固有の値を持つCID(Card Identification)レジスタの値を使用する。また、登録するカードの順序を決定するための優先度を0(最も高い)〜399(最も低い)で定義する。メモリカードID情報のサイズは、IDに16バイト(=CIDレジスタのサイズ)、優先度に4バイトを必要とするので、登録カード数を400個とした場合、計約8Kバイトとなる。参照テーブルは、USBファンクション上のメモリに保存する領域(以下、メモリ領域)を、メモリカードのメモリアドレス(以下、セクタアドレス)に1セクタ(512バイト)単位で対応づけ、その値はカードとのアクセス毎に更新される。また、更新する順序を決定するための優先度を0(最も高い)〜63(最も低い)で定義する。参照テーブルのサイズは、メモリ領域を32Kバイト(=64セクタ)、セクタアドレスの識別と優先度に4バイトを必要とするので、登録カード数を400個とした場合、計100Kバイトとなる。なお、参照レジストリは値の更新と電源を切断しても値の保持が可能なフラッシュメモリ等に作成すると良い。   The reference registry 400 includes memory card ID information and a reference table. The memory card ID information is used for identification of each memory card, and uses a value of a CID (Card Identification) register having a unique value for each memory card. Also, the priority for determining the order of cards to be registered is defined as 0 (highest) to 399 (lowest). The size of the memory card ID information requires 16 bytes for the ID (= size of the CID register) and 4 bytes for the priority, so when the number of registered cards is 400, the total is about 8 Kbytes. The reference table associates an area to be stored in the memory on the USB function (hereinafter referred to as a memory area) with a memory address (hereinafter referred to as a sector address) of the memory card in units of 1 sector (512 bytes), Updated on every access. Also, the priority for determining the update order is defined as 0 (highest) to 63 (lowest). The size of the reference table is 32 Kbytes (= 64 sectors) in the memory area and 4 bytes are required for identification and priority of sector addresses. Therefore, when the number of registered cards is 400, the total size is 100 Kbytes. The reference registry is preferably created in a flash memory or the like that can maintain values even when values are updated and the power is turned off.

アプリケーションは、ライト要求CBW又はリード要求CBWを受信すると、それを解析し、参照テーブルに登録されたアドレスに対応したデータであれば、USBファンクション上のメモリにそれを格納する機能を持たせる。   When the application receives the write request CBW or the read request CBW, the application analyzes it, and if it is data corresponding to the address registered in the reference table, the application has a function of storing it in the memory on the USB function.

図14には、本例におけるアプリケーションによる処理の流れが示される。   FIG. 14 shows the flow of processing by the application in this example.

先ずメモリカードが検出される(S300)。検出されたカードからID(便宜上「X」とする)を取得する。メモリカードの種類によってはCIDを使用する。場合によっては、メモリカードの初期化時に毎回IDを取得する(S301)。参照レジストリからメモリカードID情報をロードする(S302)。メモリカードから取得したID(=X)がメモリカードID情報に存在するか否かの判別が行われる(S303)。この判別において、メモリカードID情報にある(YES)と判断された場合、参照レジストリから参照テーブル(ID=X)をロードした後、参照テーブル(ID=X)のコピーである参照テーブルイメージをRAM(ランダム・アクセス・メモリ)等に作成する(S305)。また、上記ステップS303の判別において、メモリカードID情報にない(NO)と判断された場合、メモリカードの先頭からメモリ容量分(=32Kバイト)を保存領域とし、新規に参照テーブルイメージを上記RAMなどに作成する(S304)。ライトCBWが受信されると、図6に示される書き込み処理と同様の処理へ移行される(S307)。ただし、メモリ領域をシステムエリアの代わりに参照テーブルイメージに設定されたアドレスに変更する。   First, a memory card is detected (S300). An ID (referred to as “X” for convenience) is acquired from the detected card. CID is used depending on the type of memory card. In some cases, the ID is acquired every time the memory card is initialized (S301). Memory card ID information is loaded from the reference registry (S302). It is determined whether or not the ID (= X) acquired from the memory card exists in the memory card ID information (S303). In this determination, if it is determined that the memory card ID information is (YES), after loading the reference table (ID = X) from the reference registry, the reference table image that is a copy of the reference table (ID = X) is stored in the RAM. (Random access memory) or the like (S305). If it is determined in step S303 that the memory card ID information does not exist (NO), the memory area (= 32 Kbytes) from the beginning of the memory card is used as a storage area, and a new reference table image is stored in the RAM. (S304). When the write CBW is received, the process proceeds to a process similar to the write process shown in FIG. 6 (S307). However, the memory area is changed to the address set in the reference table image instead of the system area.

リードCBWが受信されると、図7に示される読み出し処理と同様の処理に移行される(S309)。ただし、メモリ領域をシステムエリアの代わりに参照テーブルイメージに設定されたアドレスに変更する。そして、リード要求CBWで要求されたアドレスを参照テーブルイメージに登録する(S310)。参照テーブルイメージに登録されたメモリ領域の中で優先度の最も低いものから削除し、リード要求CBWで要求されたアドレスの優先度を最も高い値にして登録する。他のメモリ領域の優先度は、今回登録された数だけ下げる。尚、リード要求CBWが複数のセクタから構成される場合、アドレスの小さい方から最も高い優先度を割り当てることにする。   When the read CBW is received, the process proceeds to a process similar to the read process shown in FIG. 7 (S309). However, the memory area is changed to the address set in the reference table image instead of the system area. Then, the address requested by the read request CBW is registered in the reference table image (S310). The memory area registered in the reference table image is deleted from the memory area having the lowest priority, and the address requested by the read request CBW is registered with the highest priority. The priority of other memory areas is lowered by the number registered this time. When the read request CBW is composed of a plurality of sectors, the highest priority is assigned from the smallest address.

メモリカードが取り外されたら、カードから取得したID(=X)がメモリカードID情報にある場合、参照テーブルイメージを参照レジストリの参照テーブル(ID=X)にコピーした後、セーブする。   When the memory card is removed, if the ID (= X) acquired from the card is in the memory card ID information, the reference table image is copied to the reference table (ID = X) of the reference registry and then saved.

ID=Xに対応したメモリカードID情報の優先度を最も高い値に、他のメモリカードID情報の優先度を「1」だけ低くする。カードから取得したID(=X)がメモリカードID情報にない場合、新規に参照レジストリの参照テーブルID(=X)を作成し、それに参照テーブルイメージをコピーした後、セーブする。ID=Xに対応したメモリカードID情報の優先度を最も高い値にして登録し、他のメモリカード情報の優先度を「1」だけ低くする。メモリカードID情報に空きがない場合は、最も優先度の低い(=399)IDを持つメモリカードの登録を解除する。   The priority of the memory card ID information corresponding to ID = X is lowered to the highest value, and the priorities of the other memory card ID information are lowered by “1”. If the ID (= X) acquired from the card is not in the memory card ID information, a reference table ID (= X) of a reference registry is newly created, and the reference table image is copied to it and then saved. The memory card ID information corresponding to ID = X is registered with the highest priority, and the priority of other memory card information is lowered by “1”. If there is no free space in the memory card ID information, the registration of the memory card having the lowest priority (= 399) ID is canceled.

以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.

以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるUSBファンクション200をインタフェースとして備えるものについて説明したが、それに限定されるものではなく、他のインタフェースを用いることができる。   In the above description, the invention that is mainly provided by the present inventor has been described as being provided with the USB function 200, which is a field of use as a background. However, the present invention is not limited thereto, and other interfaces can be used. it can.

本発明は、少なくともホストとそれによってアクセス可能なメディアとをインタフェース可能なインタフェース部を含むことを条件に適用することができる。   The present invention can be applied on the condition that it includes an interface unit capable of interfacing at least a host and media accessible thereby.

本発明にかかるインタフェースを含むデータ転送システムの構成例ブロック図である。1 is a block diagram illustrating a configuration example of a data transfer system including an interface according to the present invention. 図1における主要部の詳細な構成例ブロック図である。FIG. 2 is a block diagram illustrating a detailed configuration example of a main part in FIG. 1. 図1におけるUSBホストからの書き込み動作の説明図である。It is explanatory drawing of the write-in operation from the USB host in FIG. 図1におけるUSBホストからの読み出し動作の説明図である。It is explanatory drawing of the read-out operation from the USB host in FIG. 上記データ転送システムに含まれる外部メディアの構成例説明図である。It is explanatory drawing of the structural example of the external media contained in the said data transfer system. 上記データ転送システムにおける書き込み処理のフローチャートである。It is a flowchart of the write-in process in the said data transfer system. 上記データ転送システムにおける読み出し処理のフローチャートである。It is a flowchart of the read-out process in the said data transfer system. 上記書き込み処理における主要部の具体的な処理の説明図である。It is explanatory drawing of the specific process of the principal part in the said write-in process. 上記読み出し処理における主要部の具体的な処理の説明図である。It is explanatory drawing of the specific process of the principal part in the said read-out process. 本発明の別の構成例における保存時の処理の説明図である。It is explanatory drawing of the process at the time of the preservation | save in another structural example of this invention. 本発明の別の構成例における保存時の処理の説明図である。It is explanatory drawing of the process at the time of the preservation | save in another structural example of this invention. 本発明の別の構成例における読み出し時の処理の説明図である。It is explanatory drawing of the process at the time of the reading in another structural example of this invention. 本発明の別の構成例における参照レジストリの説明図である。It is explanatory drawing of the reference registry in another structural example of this invention. 本発明の別の構成例における主要部の処理のフローチャートである。It is a flowchart of the process of the principal part in another structural example of this invention. 本発明の別の構成例における主要部の構成例ブロック図である。It is a block diagram of a configuration example of the main part in another configuration example of the present invention.

符号の説明Explanation of symbols

100 USBホスト
101 アプリケーション
102 USBマスストレージクラスドライバ
103 USBバスドライバ
104 USBホストコントローラ
200 USBファンクション
201 アプリケーション
105,202 メモリ
203 USBバスストレージクラスファームウェア
204 外部メディアファームウェア
205 USBファンクションコントローラ
206 外部メディアホストコントローラ
100 USB Host 101 Application 102 USB Mass Storage Class Driver 103 USB Bus Driver 104 USB Host Controller 200 USB Function 201 Application 105, 202 Memory 203 USB Bus Storage Class Firmware 204 External Media Firmware 205 USB Function Controller 206 External Media Host Controller

Claims (10)

ホストとシリアル通信によってインターフェース可能であり、上記ホストと上記ホストによってアクセス可能なメディアとをインタフェース可能なインタフェースであって、
上記インタフェースは、上記ホストから上記メディアに書き込まれるデータ、又は上記メディアから読み出されたデータを保持可能な記憶部と、
上記ホストから上記メディアへのアクセスにかかるデータが上記記憶部に存在するか否かを判別し、その判別結果に基づいて、上記メディアへのデータ書き込み又は上記メディアからのデータ読み出しを省略可能な制御部と、を含んで成るインタフェース。
An interface capable of interfacing with a host through serial communication, and capable of interfacing between the host and media accessible by the host,
The interface includes a storage unit capable of holding data written from the host to the medium or data read from the medium;
Control that determines whether data relating to access to the medium from the host exists in the storage unit, and based on the determination result, data writing to the medium or data reading from the medium can be omitted An interface comprising:
上記インタフェースはUSBファンクションとされ、上記メディアは不揮発性メモリとされ、上記記憶部に記憶されたデータは、パーティションブートセクタ、ファイルアロケーションテーブル、及びルートディレクトリの何れかに関するものである請求項1記載のインタフェース。 2. The interface according to claim 1, wherein the interface is a USB function, the medium is a non-volatile memory, and the data stored in the storage unit relates to any one of a partition boot sector, a file allocation table, and a root directory. interface. 上記USBファンクションはプラグアンドプレイ方式で上記ホストに結合されることが可能に構成される請求項2記載のインタフェース。 The interface according to claim 2, wherein the USB function is configured to be coupled to the host in a plug-and-play manner. 上記インタフェースに対応するソフトウェアと、上記記憶部に保持されたデータとが一致するか否かの判定機能を含む請求項3記載のインタフェース。 The interface according to claim 3, further comprising a determination function as to whether or not the software corresponding to the interface matches the data held in the storage unit. 上記USBファンクションは、ライト要求がシステムエリアに対するものか否かを判別する第1処理機能と、
上記ライト要求が上記システムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第2処理機能と、
上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合にそのデータと上記ライト要求によって書き込まれるべきライトデータとが等しいか否かを判別する第3処理機能と、を含み、
上記記憶部に存在する上記システムエリアに対応するアドレスのデータと上記ライトデータとが等しい場合には、上記不揮発性メモリへのデータライトを行うことなく、ライト完了CSW送信を行う請求項4記載のインタフェース。
The USB function includes a first processing function for determining whether a write request is for a system area;
A second processing function for determining whether data at an address corresponding to the system area is present in the storage unit when the write request is for the system area;
A third processing function for determining whether data at an address corresponding to the system area is equal to the write data to be written by the write request when the data at the address corresponding to the system area exists in the storage unit;
5. The write completion CSW transmission is performed without performing data write to the non-volatile memory when data at an address corresponding to the system area existing in the storage unit is equal to the write data. interface.
上記USBファンクションは、ライト要求がシステムエリアに対するものか否かを判別する第1処理機能と、
上記ライト要求が上記システムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第2処理機能と、
上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合にそのデータと上記ライト要求によって書き込まれるべきライトデータとが等しいか否かを判別する第3処理機能と、を含み、
上記記憶部に存在する上記システムエリアに対応するアドレスのデータと上記ライトデータとが一部においてのみ等しい場合には、その等しい部分については上記不揮発性メモリへのデータライトを行うことなく、ライト完了CSW送信を行う請求項4記載のインタフェース。
The USB function includes a first processing function for determining whether a write request is for a system area;
A second processing function for determining whether data at an address corresponding to the system area is present in the storage unit when the write request is for the system area;
A third processing function for determining whether data at an address corresponding to the system area is equal to the write data to be written by the write request when the data at the address corresponding to the system area exists in the storage unit;
When the data at the address corresponding to the system area existing in the storage unit and the write data are only partially equal, the write is completed without performing data write to the nonvolatile memory for the equal part The interface according to claim 4, wherein CSW transmission is performed.
上記USBファンクションは、リード要求がシステムエリアに対するものか否かを判別する第5処理機能と、
上記リード要求が上記システムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第6処理機能と、
上記システムエリアに対応するアドレスのデータが上記記憶部に存在する場合に、そのデータを上記ホストに送信する第7処理機能と、を含み、
上記第7処理機能によるデータ送信の後に、リード完了CSW送信を行う請求項5又は6記載のインタフェース。
The USB function includes a fifth processing function for determining whether the read request is for a system area;
A sixth processing function for determining whether or not data at an address corresponding to the system area exists in the storage unit when the read request is for the system area;
A seventh processing function for transmitting data to the host when data at an address corresponding to the system area is present in the storage unit,
The interface according to claim 5 or 6, wherein a read completion CSW transmission is performed after the data transmission by the seventh processing function.
上記USBファンクションは、リード要求がシステムエリアに対するものか否かを判別する第5処理機能と、
上記リード要求が上記システムエリアに対するものである場合に、上記システムエリアに対応するアドレスのデータが上記記憶部に存在するか否かを判別する第6処理機能と、
上記システムエリアに対応するアドレスのデータの一部が上記記憶部に存在する場合に、そのデータを上記ホストに送信する第7処理機能と、を含み、
上記第7処理機能によるデータ送信の後に、リード完了CSW送信を行う請求項5又は6記載のインタフェース。
The USB function includes a fifth processing function for determining whether the read request is for a system area;
A sixth processing function for determining whether or not data at an address corresponding to the system area exists in the storage unit when the read request is for the system area;
A seventh processing function for transmitting the data to the host when a part of the data of the address corresponding to the system area exists in the storage unit,
The interface according to claim 5 or 6, wherein a read completion CSW transmission is performed after the data transmission by the seventh processing function.
ホストと、上記ホストとシリアル通信によってインターフェース可能であり上記ホストによってアクセス可能なメディアとをインタフェース可能なインタフェース部とを含むデータ転送システムであって、
上記ホストは、上記ホストから上記メディアに書き込まれるデータ、又は上記メディアから読み出されたデータを保持可能なバッファと、
上記ホストから上記メディアへのアクセスにかかるデータが上記バッファに存在するか否かを判別し、その判別結果に基づいて、上記メディアへのデータ書き込み又は上記メディアからのデータ読み出しを省略可能な制御部と、を含んで成るデータ転送システム。
A data transfer system comprising a host and an interface unit capable of interfacing with the host through serial communication and capable of interfacing with a medium accessible by the host,
The host has a buffer capable of holding data written to the medium from the host or data read from the medium;
A control unit that determines whether or not data related to access to the medium from the host exists in the buffer, and based on the determination result, can write data to the medium or read data from the medium And a data transfer system comprising:
上記メディアは不揮発性メモリとされ、上記記憶部に記憶されたデータは、パーティションブートセクタ、ファイルアロケーションテーブル、及びルートディレクトリの何れかに関する請求項9記載のデータ転送システム。 10. The data transfer system according to claim 9, wherein the medium is a non-volatile memory, and the data stored in the storage unit relates to any one of a partition boot sector, a file allocation table, and a root directory.
JP2004241647A 2004-08-20 2004-08-20 Data transfer system and interface Withdrawn JP2006059201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004241647A JP2006059201A (en) 2004-08-20 2004-08-20 Data transfer system and interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004241647A JP2006059201A (en) 2004-08-20 2004-08-20 Data transfer system and interface

Publications (1)

Publication Number Publication Date
JP2006059201A true JP2006059201A (en) 2006-03-02

Family

ID=36106612

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004241647A Withdrawn JP2006059201A (en) 2004-08-20 2004-08-20 Data transfer system and interface

Country Status (1)

Country Link
JP (1) JP2006059201A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013156877A (en) * 2012-01-31 2013-08-15 Unitex:Kk Information processing device, information processing system, information processing method, program, and recording medium
JP2013254479A (en) * 2012-05-08 2013-12-19 Unitex:Kk Interface conversion device and interface conversion method
JP2016186800A (en) * 2006-06-01 2016-10-27 ロヴィ・ソリューションズ・コーポレーション Methods and apparatus for transferring media across network using network interface device
US9686195B2 (en) 2014-02-27 2017-06-20 Fujitsu Limited Relaying apparatus and storage apparatus
US9690665B2 (en) 2013-10-24 2017-06-27 Fujitsu Limited Relay device, relay method, computer-readable recoding medium having stored therein relay program, and relay system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016186800A (en) * 2006-06-01 2016-10-27 ロヴィ・ソリューションズ・コーポレーション Methods and apparatus for transferring media across network using network interface device
US10375146B2 (en) 2006-06-01 2019-08-06 Rovi Solutions Corporation Methods and apparatus for providing media from content providers using a network interface device
JP2013156877A (en) * 2012-01-31 2013-08-15 Unitex:Kk Information processing device, information processing system, information processing method, program, and recording medium
JP2013254479A (en) * 2012-05-08 2013-12-19 Unitex:Kk Interface conversion device and interface conversion method
US9690665B2 (en) 2013-10-24 2017-06-27 Fujitsu Limited Relay device, relay method, computer-readable recoding medium having stored therein relay program, and relay system
US9686195B2 (en) 2014-02-27 2017-06-20 Fujitsu Limited Relaying apparatus and storage apparatus

Similar Documents

Publication Publication Date Title
KR101035225B1 (en) Controller apparatus and method for improved data transfer
JP4676378B2 (en) Data storage device and data storage method
US20170192718A1 (en) Storage apparatus and data processing method thereof, and storage system
US8060669B2 (en) Memory controller with automatic command processing unit and memory system including the same
US11630791B2 (en) Data storage system and method for multiple communication protocols and memory access
US7797398B2 (en) Communication system, and peripheral device having trigger generating device and computer program product that monitors whether a trigger has been generated
JPH1131102A (en) Data storage system and access control method applied to the system
US20100005482A1 (en) Method for handling small computer system interface (SCSI) commands via a redundant array of inexpensive disks (RAID) device driver
US5996045A (en) IDE disk drive arrangement that combines the capacity of a master drive and slave drive while hiding the presence of slave drive to a host computer
US20040221130A1 (en) Method and device for a accessing non-volatile memory by PC and X-BOX
US6598097B1 (en) Method and system for performing DMA transfers using operating system allocated I/O buffers
US11500800B2 (en) Semiconductor devices including command priority policy management and related systems
JP2006059201A (en) Data transfer system and interface
US20050198425A1 (en) Combined optical storage and flash card reader using single ide or sata port and method thereof
TW434491B (en) Increasing I/O performance through storage of packetized operational information in local memory
JP4663577B2 (en) Data storage device and initialization method thereof
JP4965456B2 (en) Method, system, and computer program for transferring data between system and storage in shared buffer (data transfer between system and shared buffer storage)
JP4714291B2 (en) Information recording apparatus, information recording method, and information recording program
CN111045961B (en) Data processing method and memory controller using the same
TWI312240B (en) Data compressed/decompressed device and associated application system
US20100274828A1 (en) Electronic Device, Storage Area Allocation Method for File System, and Computer Product
JP4618559B2 (en) Communication system and peripheral device used therefor
TWI353519B (en) Flash memory device and pipeline access method the
JP2007226373A (en) Information processor and information processing method
US20110125972A1 (en) Information recording device and information recording method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071106