JP4854483B2 - Data input / output device - Google Patents

Data input / output device Download PDF

Info

Publication number
JP4854483B2
JP4854483B2 JP2006324820A JP2006324820A JP4854483B2 JP 4854483 B2 JP4854483 B2 JP 4854483B2 JP 2006324820 A JP2006324820 A JP 2006324820A JP 2006324820 A JP2006324820 A JP 2006324820A JP 4854483 B2 JP4854483 B2 JP 4854483B2
Authority
JP
Japan
Prior art keywords
data
buffer
output
data input
input
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.)
Expired - Fee Related
Application number
JP2006324820A
Other languages
Japanese (ja)
Other versions
JP2008140059A5 (en
JP2008140059A (en
Inventor
真哉 後藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2006324820A priority Critical patent/JP4854483B2/en
Publication of JP2008140059A publication Critical patent/JP2008140059A/en
Publication of JP2008140059A5 publication Critical patent/JP2008140059A5/ja
Application granted granted Critical
Publication of JP4854483B2 publication Critical patent/JP4854483B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Bus Control (AREA)

Description

本発明は、例えばDMA転送機能を有するコントローラを有し、接続されるデバイスとデータ転送を行うデータ入出力装置に関する。特に、USBホストコントローラを有し、その通信にファイルシステムを用いるマスストレージ通信を使用するデータ入出力装置に関するものである。   The present invention relates to a data input / output device that has a controller having, for example, a DMA transfer function and performs data transfer with a connected device. In particular, the present invention relates to a data input / output device having a USB host controller and using mass storage communication using a file system for communication.

一般にDMA転送機能を有するコントローラを制御するコントローラドライバにおいては、そのDMA転送機能に有効なバッファを設けDMA転送による入出力を行う。
例えば、USBホストコントローラのひとつであるOHCIを使用する場合にDMAによる効果的なバルク転送を行うためにはDMA転送用のバッファとして4KB単位を境界として8KB単位のサイズとすることが望ましい。
In general, in a controller driver that controls a controller having a DMA transfer function, a buffer effective for the DMA transfer function is provided to perform input / output by DMA transfer.
For example, in order to perform effective bulk transfer by DMA when using OHCI, which is one of the USB host controllers, it is desirable that the size of the buffer for DMA transfer is 8 KB unit with 4 KB unit as a boundary.

一方、前記コントローラにデータの入出力を指示する上位層は、例えばファイルシステムやアプリケーションと、複数に階層化されており、各階層で必要なバッファを作成し、その下位層にデータの入出力を指示している。
更に、一つのアプリケーションやファイルシステムから複数のDMA転送機能を有するコントローラを利用し接続されるデバイスにデータ転送を行う必要もある。
On the other hand, the upper layer that instructs the controller to input / output data is hierarchized into, for example, a file system and an application, and a necessary buffer is created in each layer, and data input / output is performed in the lower layer. I am instructing.
Furthermore, it is necessary to transfer data from a single application or file system to a connected device using a controller having a plurality of DMA transfer functions.

特許文献1では、データ処理装置に関わり、キャッシュへのプリフェッチアドレスとロード命令アドレスの比較を行う。ここで、一致した場合は、主記憶からキャッシュへの格納とロード命令との実行を同時に行い、キャッシュを通さないで、主記憶から直接ロードするという発明が提案されている。   Patent Document 1 relates to a data processing apparatus, and compares a prefetch address to a cache with a load instruction address. Here, an invention has been proposed in which, if they match, the storage from the main memory to the cache and the execution of the load instruction are performed simultaneously, and the data is directly loaded from the main memory without passing through the cache.

特許文献2では、フラッシュROMの管理で、FATなど頻繁に書込みが行われる情報に関してはキャッシュメモリにバッファリングを行うという、データの種別によりキャッシュを使用する発明が提案されている。
特許文献3では、アドレス単位でのアクセス可能なフラッシュROMからバッファを介さずにユーザメモリへデータ転送を行うという発明が提案されている。
Patent Document 2 proposes an invention that uses a cache according to the type of data, in which information that is frequently written, such as FAT, is managed in the flash ROM and is buffered in a cache memory.
Patent Document 3 proposes an invention in which data is transferred from a flash ROM accessible in address units to a user memory without using a buffer.

特開平5−143451号公報Japanese Patent Laid-Open No. 5-143451 特開平9−97199号公報JP-A-9-97199 特開2000−57039号公報JP 2000-57039 A

しかしながら、従来のDMA転送機能を有するコントローラを備えたデータ入出力装置においては、データバッファを有する上位層からデータの入出力が指示される場合には以下のようになる。即ち、DMA転送機能を有するコントローラを制御するコントローラドライバにおいて、上位層から指示された入出力のデータバッファを一度DMA転送に有効なバッファを作成し、そのバッファに転送してからDMA転送を行うことになる。   However, in a data input / output device including a controller having a conventional DMA transfer function, when data input / output is instructed from an upper layer having a data buffer, the following occurs. That is, in the controller driver that controls the controller having the DMA transfer function, the input / output data buffer instructed from the upper layer is created once for the DMA transfer and transferred to the buffer, and then the DMA transfer is performed. become.

更に、コントローラドライバの上位層に位置づけられるファイルデータのキャッシュ操作を行うファイルシステムにおいても、アプリケーションから入出力されるデータを一旦キャッシュバッファに格納してからコントローラドライバにデータ転送を行っている。   Further, in a file system that performs a cache operation of file data positioned in an upper layer of a controller driver, data input / output from an application is temporarily stored in a cache buffer and then transferred to the controller driver.

このために、階層化された各システムで各々固有のデータバッファを作成し、下位層にデータ転送を行い、下位層では上位層から入出力されたデータを一旦各層に固有のデータバッファに転送を行い、更に下位層へのデータ入出力及びDMA転送を行う。このことによりメモリ利用効率が低下するとともに不要な処理時間を要することになる。   For this purpose, each hierarchical system creates a unique data buffer, transfers data to the lower layer, and the lower layer temporarily transfers data input / output from the upper layer to the data buffer specific to each layer. In addition, data input / output and DMA transfer to a lower layer are performed. As a result, the memory utilization efficiency is reduced and unnecessary processing time is required.

また、DMA転送機能を有するコントローラが複数個あった場合には、各コントローラを制御するコントローラドライバでDMA転送に有効なバッファを準備する必要がある。
特許文献1では、キャッシュを使用しないで主記憶から直接データをロードするという発明で、DMAから直接ユーザメモリへ転送することはできない。
特許文献2では、データの種別によりデータのキャッシュを行うという発明であり、DMA転送を用いたキャッシュ制御には係わっていない。
また、特許文献3では、アドレス単位でのアクセス可能なフラッシュROMとユーザメモリのデータ転送に係わり、DMA転送を用いたキャッシュ制御とは異なる。
When there are a plurality of controllers having a DMA transfer function, it is necessary to prepare a buffer effective for DMA transfer by a controller driver that controls each controller.
In Patent Document 1, data is directly loaded from the main memory without using a cache, and cannot be directly transferred from the DMA to the user memory.
Patent Document 2 is an invention in which data is cached according to data type, and is not involved in cache control using DMA transfer.
Patent Document 3 relates to data transfer between an accessible flash ROM and user memory in address units, and is different from cache control using DMA transfer.

本発明は、上記の課題に鑑みてなされたものであり、DMA転送機能を有するコントローラを制御するコントローラドライバにデータの入出力を指示する上位層がDMA転送に有効なデータバッファを作成しデータの入出力を指示することにより、階層化された各システムで固有のデータバッファを作成することなく上位層から入出力されたデータバッファを下位層へ直接入出力することを可能とするデータ入出力装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an upper layer that instructs data input / output to a controller driver that controls a controller having a DMA transfer function creates a data buffer effective for DMA transfer, and A data input / output device that enables direct input / output of data buffers input / output from the upper layer to the lower layer without creating a unique data buffer in each hierarchical system by instructing input / output The purpose is to provide.

本発明のデータ入出力装置は、DMA転送を行うデータ入出力装置であって、当該データ入出力装置を制御するコントローラドライバと、前記コントローラドライバと、該コントローラドライバへのデータ入出力用の第1のバッファとを用いて、ファイルデータのキャッシュ操作を行うファイルシステムと、前記ファイルシステムと、該ファイルシステムへのデータ入出力用の第2のバッファとを用いるアプリケーションとを有し、前記コントローラドライバは、前記第1のバッファが、所定の単位の境界で開始され、かつ所定サイズ以上である条件を満たすかを判断し、前記条件を満たすと判断された場合に、前記第1のバッファを前記DMA転送に用いるデータバッファに設定し、前記条件を満たさないと判断された場合に、前記DMA転送に用いるデータバッファを作成するA data input / output device of the present invention is a data input / output device that performs DMA transfer , and includes a controller driver that controls the data input / output device, the controller driver, and a first for data input / output to the controller driver. And a controller that uses a file system that performs file data caching operations, an application that uses the file system, and a second buffer for data input / output to / from the file system. Determining whether the first buffer starts on a boundary of a predetermined unit and satisfies a condition that is equal to or larger than a predetermined size, and if it is determined that the condition is satisfied, the first buffer is transferred to the DMA When it is determined that the condition is not satisfied, the DMA is set in the data buffer used for transfer. To create a data buffer to be used for feed.

本発明によれば、DMA転送機能を有するコントローラを備え、接続されるデバイスとデータ転送を行うデータ入出力装置において、前記コントローラを制御するコントローラドライバにデータの入出力を指示する上位層がDMA転送に有効なデータバッファを作成しデータの入出力を指示することにより、階層化された各システムで固有のデータバッファを作成することなく上位層から入出力されたデータバッファを下位層へ直接入出力することが可能となる。
このことにより、データ転送の処理時間とメモリ利用効率とを大幅に向上させることが可能となる。
According to the present invention, in a data input / output device that includes a controller having a DMA transfer function and performs data transfer with a connected device, an upper layer that instructs the controller driver that controls the controller to input / output data is DMA transfer. By creating a valid data buffer and instructing data input / output, the data buffer input / output from the upper layer is directly input / output to the lower layer without creating a unique data buffer in each hierarchical system. It becomes possible to do.
As a result, the processing time for data transfer and the memory utilization efficiency can be greatly improved.

以下、本発明の実施の形態について図面を参照しながら説明する。
図1は、本発明のDMA転送機能を有するコントローラを有し、接続されるデバイスとの間でデータ転送を行うデータ入出力装置を説明するブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a data input / output apparatus that has a controller having a DMA transfer function according to the present invention and performs data transfer with a connected device.

図1において、1はUSBホスト機能を有するデータ入出力装置であり、DMA転送機能を有し、DMAに固有の転送に適したユーザバッファ作成サービスを有するものであり、例えばデジタルカメラダイレクトプリンタである。
データ入出力装置1は、アプリケーション4、ファイルシステム5、及びUSBホスト機能6を備えて構成されている。
In FIG. 1, reference numeral 1 denotes a data input / output device having a USB host function, which has a DMA transfer function and a user buffer creation service suitable for DMA-specific transfer, such as a digital camera direct printer. .
The data input / output device 1 includes an application 4, a file system 5, and a USB host function 6.

アプリケーション4は、不図示のCPU、RAM、ROM、及び、不図示ROMに格納され不図示RAMにそのデータバッファを作成する。ファイルシステム5は、不図示のROMに格納され不図示のRAMにそのデータバッファを作成する。USBホスト機能6は、DMA転送機能を有するUSBホストコントローラとこのコントローラを制御する不図示のROMに格納され、不図示のRAMにそのデータバッファを作成するUSBホストコントローラドライバで構成される。USBホストコントローラドライバは、当該データ入出力装置を制御するDMAデータ入出力用バッファを必要とする。   The application 4 creates a data buffer in a CPU (not shown), a RAM, a ROM, and a ROM (not shown) stored in the ROM (not shown). The file system 5 is stored in a ROM (not shown) and creates its data buffer in a RAM (not shown). The USB host function 6 includes a USB host controller having a DMA transfer function and a USB host controller driver that is stored in a ROM (not shown) that controls the controller and creates a data buffer in a RAM (not shown). The USB host controller driver requires a DMA data input / output buffer for controlling the data input / output device.

USBホスト機能6は、USB通信手段3によって後述のUSBデバイス機能を有するデータ入出力装置2と、例えばマスストレージクラスといった、通信可能な接続がなされる。   The USB host function 6 is connected to the data input / output device 2 having a USB device function, which will be described later, by the USB communication unit 3 so as to be communicable such as a mass storage class.

図1において、2はUSBデバイス機能を有するデータ入出力装置であり、例えばプリンタと接続しダイレクトプリントを実行可能なデジタルカメラである。
データ入出力装置2は、USBデバイス機能7及び記憶装置8を備えて構成されている。
In FIG. 1, reference numeral 2 denotes a data input / output device having a USB device function, for example, a digital camera that can be connected to a printer and execute direct printing.
The data input / output device 2 includes a USB device function 7 and a storage device 8.

USBデバイス機能7は、不図示のCPU、RAM、ROM、及びUSBデバイスコントローラとこのコントローラを制御する不図示のROMに格納されたUSBデバイスコントローラドライバで構成されている。記憶装置8は、前述のUSB通信手段3においてマスストレージクラス接続を実現するための、例えばコンパクトフラッシュ(登録商標)などのリムーバブルメディアへの入出力を行う。   The USB device function 7 includes a CPU (not shown), a RAM, a ROM, a USB device controller, and a USB device controller driver stored in a ROM (not shown) that controls the controller. The storage device 8 performs input / output to / from a removable medium such as a compact flash (registered trademark) for realizing mass storage class connection in the USB communication means 3 described above.

アプリケーション4は、ファイルシステムを使用し、ファイルシステムへのデータ入出力用バッファを必要とするものである。USBデバイス機能を有するデータ入出力装置2の記憶装置8に格納されているデータの入出力を行うデータバッファをUSBデバイス機能を有するデータ入出力装置1の不図示のRAMに作成する。そして、ファイルシステム5にデータ入出力の指示を行う。   The application 4 uses a file system and requires a data input / output buffer to the file system. A data buffer for inputting / outputting data stored in the storage device 8 of the data input / output device 2 having the USB device function is created in a RAM (not shown) of the data input / output device 1 having the USB device function. Then, it instructs the file system 5 to input / output data.

ファイルシステム5は、USBホストコントローラドライバを使用し、当該コントローラドライバへのデータ入出力用バッファを必要として、ファイルデータのキャッシュ操作を行うものである。アプリケーション4のデータ入出力の指示に従い、指定されたデータのセクタ情報を基にキャッシュバッファをUSBデバイス機能を有するデータ入出力装置1の不図示RAMに作成し、USBホスト機能6にデータ入出力の指示を行う。   The file system 5 uses a USB host controller driver, requires a data input / output buffer to the controller driver, and performs a file data cache operation. In accordance with the data input / output instruction of the application 4, a cache buffer is created in the RAM (not shown) of the data input / output device 1 having the USB device function based on the sector information of the designated data, and the data input / output to the USB host function 6 Give instructions.

USBホスト機能6を構成するUSBホストコントローラドライバは、ファイルシステム5のデータ入出力の指示に従う。そして、USBホストコントローラが有するDMA機能に有効なUSBデータ転送バッファをUSBデバイス機能を有するデータ入出力装置1の不図示のRAMに作成し、DMAによるデータ転送を指示する。   The USB host controller driver constituting the USB host function 6 follows the data input / output instruction of the file system 5. Then, a USB data transfer buffer effective for the DMA function of the USB host controller is created in the RAM (not shown) of the data input / output device 1 having the USB device function, and data transfer by DMA is instructed.

図2は、本発明を実現するDMA転送機能を有するコントローラを有し接続されるデバイス2とデータ転送を行うデータ入出力装置1におけるデータ転送プログラムのフローチャートである。   FIG. 2 is a flowchart of a data transfer program in the data input / output apparatus 1 that performs data transfer with a device 2 that has a controller having a DMA transfer function to implement the present invention.

以下で説明するように、コントローラドライバは、当該コントローラドライバに入出力されるデータバッファがDMAに固有の転送に適したバッファであると判断された場合に、は、以下のように処理する。即ち、コントローラドライバではDMAを有するデータ入出力装置に入出力されるデータバッファを作成せず、コントローラドライバに入力されたデータバッファ領域にキャッシュフラッシュを行ってDMA転送を指示する。そして、コントローラドライバから出力されるデータバッファ領域にキャッシュインバリデートを行ってDMA転送を指示する。   As described below, when it is determined that the data buffer input / output to / from the controller driver is a buffer suitable for transfer specific to DMA, the controller driver performs the following processing. That is, the controller driver does not create a data buffer input / output to / from a data input / output device having a DMA, and instructs the DMA transfer by performing a cache flush on the data buffer area input to the controller driver. Then, cache invalidation is performed on the data buffer area output from the controller driver to instruct DMA transfer.

ステップS100において、アプリケーション4からUSBデバイス機能を有するデータ入出力装置2の記憶装置8に格納されているデータの入出力を行うためのデータバッファ作成をUSBデバイス機能を有するデータ入出力装置1の不図示RAMに行う。その際に、USBホスト機能6を構成するUSBホストコントローラに搭載されているDMAを用いたDMA転送に適したユーザバッファ作成サービスを呼び出す。例えば、前述のUSBホストコントローラがOHCIである場合は、作成されるユーザバッファは4KBの境界を先頭に作成される。   In step S100, a data buffer for inputting / outputting data stored in the storage device 8 of the data input / output device 2 having the USB device function from the application 4 is created in the data input / output device 1 having the USB device function. This is performed on the illustrated RAM. At that time, a user buffer creation service suitable for DMA transfer using DMA mounted on the USB host controller constituting the USB host function 6 is called. For example, when the USB host controller described above is OHCI, the user buffer to be created is created with a 4 KB boundary at the top.

また、DMA転送機能を有するコントローラが複数個あった場合には、コントローラ毎にコントローラが有するDMAに適してユーザバッファ作成サービスが準備される。そして、アプリケーション4はデータ入出力の対象となる接続装置と通信を行うコントローラを特定し、前述のコントローラが有するDMAに適したユーザバッファ作成サービスを利用する。   If there are a plurality of controllers having a DMA transfer function, a user buffer creation service is prepared for each controller suitable for the DMA of the controller. Then, the application 4 specifies a controller that communicates with a connection device that is a target of data input / output, and uses a user buffer creation service suitable for DMA included in the controller.

ステップS110において、アプリケーション4からファイルシステム5へステップS100で作成されたユーザバッファへのUSBデバイス機能を有するデータ入出力装置2の記憶装置8からのデータの入出力を指示する。
ステップS120では、ファイルシステム5においてアプリケーション4から指示されたデータ入出力のデータバッファの判定を行う。
In step S110, the application 4 instructs the file system 5 to input / output data from the storage device 8 of the data input / output device 2 having the USB device function to the user buffer created in step S100.
In step S120, the data input / output data buffer instructed by the application 4 in the file system 5 is determined.

ファイルシステム5は、アプリケーション4によるランダムアクセスに対応するためにキャッシュバッファをセクタ単位の管理ブロックで作成する。
アプリケーション4から入出力を指示されたUSBデバイス機能を有するデータ入出力装置2の記憶装置8のデータが連続したセクタでありかつ前述の管理ブロックサイズより大きい場合には、以下のようになる。ファイルシステム5では、コントローラドライバに入出力されるファイルデータをキャッシュするためのデータバッファを作成しない。そして、アプリケーション4からファイルシステム5に入出力されるデータバッファをコントローラドライバに入出力されるデータバッファとして使用する。即ち、ステップS100でアプリケーションによって作成されたユーザバッファを指定し管理ブロック単位でステップS140にてUSBホスト機能6へUSBデバイス機能を有するデータ入出力装置2の記憶装置8からのデータの入出力を指示する。
The file system 5 creates a cache buffer with a management block in units of sectors in order to cope with random access by the application 4.
When the data in the storage device 8 of the data input / output device 2 having the USB device function instructed to be input / output from the application 4 is a continuous sector and is larger than the management block size, the following occurs. The file system 5 does not create a data buffer for caching file data input / output to / from the controller driver. A data buffer input / output from / to the file system 5 from the application 4 is used as a data buffer input / output from / to the controller driver. That is, the user buffer created by the application is specified in step S100, and instructed to input / output data from the storage device 8 of the data input / output device 2 having the USB device function to the USB host function 6 in step S140 in units of management blocks. To do.

ステップS120におけるアプリケーション4からのデータバッファ判定に基づき、以下のように場合分けされる。
アプリケーション4から入出力を指示されたUSBデバイス機能を有するデータ入出力装置2の記憶装置8のデータが前述の管理ブロックサイズより大きい連続したセクタが指定されていない場合には、以下のようになる。即ち、ステップS130でファイルシステム5が管理ブロック用のキャッシュバッファ作成を、USBホスト機能6を構成するUSBホストコントローラに搭載されているDMAを用いたDMA転送に適したユーザバッファ作成サービスを呼び出すことにより行う。そして、作成されたキャッシュバッファを指定してステップS140にてUSBホスト機能6へUSBデバイス機能を有するデータ入出力装置2の記憶装置8からのデータの入出力を指示する。
Based on the data buffer determination from the application 4 in step S120, cases are classified as follows.
When the data in the storage device 8 of the data input / output device 2 having the USB device function instructed to be input / output by the application 4 is not designated as a continuous sector larger than the management block size, the following is performed. . That is, in step S130, the file system 5 calls the user buffer creation service suitable for the DMA transfer using the DMA installed in the USB host controller constituting the USB host function 6 by the file system 5 to create the cache buffer for the management block. Do. In step S140, the created cache buffer is designated, and the USB host function 6 is instructed to input / output data from the storage device 8 of the data input / output device 2 having the USB device function.

ステップS110でアプリケーション4から指示されるUSBデバイス機能を有するデータ入出力装置2の記憶装置8のデータが複数個の不連続なセクタの集合である場合には、以下のほうになる。即ち、ステップS120におけるデータバッファの判定を、ファイルシステム5で管理するキャッシュバッファを構成するセクタ単位の管理ブロックで行ってもかまわない。
ステップS150では、USBホスト機能6を構成するUSBホストコントローラドライバにおいてファイルシステム5から指示されたデータ入出力のデータバッファの判定を行う。
When the data in the storage device 8 of the data input / output device 2 having the USB device function specified by the application 4 in step S110 is a set of a plurality of discontinuous sectors, the following is performed. In other words, the determination of the data buffer in step S120 may be performed in the management block in units of sectors constituting the cache buffer managed by the file system 5.
In step S150, the USB host controller driver constituting the USB host function 6 determines the data input / output data buffer instructed from the file system 5.

ファイルシステム5から入出力を指示されたデータバッファが、USBホスト機能6を構成するUSBホストコントローラが有するDMAを用いたDMA転送に適したバッファであるかの判定を行う。例えば、USBホストコントローラがOHCIである場合は、4KB単位の境界から8KBのサイズが一度のUSBのバルク転送で最適なデータバッファとなる。   It is determined whether the data buffer instructed to be input / output from the file system 5 is a buffer suitable for DMA transfer using the DMA of the USB host controller that constitutes the USB host function 6. For example, when the USB host controller is OHCI, the size of 8 KB from the boundary of 4 KB unit is an optimal data buffer for USB bulk transfer once.

ファイルシステム5から指示されたデータ入出力のデータバッファが4KB単位の境界を先頭としている場合には、ステップS140でファイルシステム5によって指定されたデータバッファを指定する。そして、ステップS170で8KB単位ごとにUSBデバイス機能を有するデータ入出力装置2の記憶装置8からのデータの入出力をDMAデータ転送によって行う。   When the data input / output data buffer instructed by the file system 5 starts at the 4 KB unit boundary, the data buffer designated by the file system 5 is designated in step S140. In step S170, input / output of data from the storage device 8 of the data input / output device 2 having the USB device function is performed by DMA data transfer every 8 KB unit.

ステップS150におけるファイルシステム5からのデータバッファ判定で、ファイルシステム5から入出力を指示されたデータバッファが4KB単位の境界で開始されていない、またはその転送指定サイズが8KBに満たない場合には、以下のようになる。即ち、ステップS160で前述のUSBホスト機能6を構成するUSBホストコントローラに搭載されているDMAを用いたDMA転送に適したユーザバッファ作成サービスを呼び出すことによりデータバッファを作成する。そして、作成されたデータバッファを指定してステップS170にてUSBデバイス機能を有するデータ入出力装置2の記憶装置8からのデータの入出力をDMAデータ転送によって行う。   In the data buffer determination from the file system 5 in step S150, if the data buffer instructed to be input / output from the file system 5 is not started at the boundary of 4 KB unit or the transfer designated size is less than 8 KB, It becomes as follows. That is, in step S160, a data buffer is created by calling a user buffer creation service suitable for DMA transfer using DMA mounted on the USB host controller constituting the USB host function 6 described above. Then, the created data buffer is designated, and in step S170, data is input / output from the storage device 8 of the data input / output device 2 having the USB device function by DMA data transfer.

ステップS170でのDMA転送では、データ入出力装置2の記憶装置8からのデータ入力である場合には、前述のデータバッファをキャッシュインバリデート操作し、その後、DMA転送を起動する。一方、データ入出力装置2の記憶装置8へのデータ出力である場合には、前述のデータバッファをキャッシュフラッシュ操作し、その後、DMA転送を起動する。   In the DMA transfer in step S170, if the data input is from the storage device 8 of the data input / output device 2, the above-described data buffer is cache invalidated, and then the DMA transfer is started. On the other hand, in the case of data output to the storage device 8 of the data input / output device 2, the above-described data buffer is cache flushed, and then DMA transfer is started.

以上が本発明の実施形態の説明であるが、本発明は、これら実施の形態の構成に限られるものではなく、特許請求の範囲で示した機能、または実施の形態の構成が持つ機能が達成できる構成であればどのようなものであっても適用可能である。   The above is the description of the embodiments of the present invention, but the present invention is not limited to the configurations of these embodiments, and the functions shown in the claims or the functions of the configurations of the embodiments are achieved. Any configuration that can be applied is applicable.

本発明のDMA転送機能を有するコントローラを有し接続されるデバイスとデータ転送を行うデータ入出力装置を説明するブロック図である。FIG. 3 is a block diagram illustrating a data input / output device that performs data transfer with a device having a controller having a DMA transfer function according to the present invention. 本発明を実現するDMA転送機能を有するコントローラを有し接続されるデバイスとデータ転送を行うデータ入出力装置におけるデータ転送プログラムのフローチャートである。It is a flowchart of the data transfer program in the data input / output device which performs a data transfer with the device which has a controller which has the DMA transfer function which implement | achieves this invention, and is connected.

符号の説明Explanation of symbols

1 USBホスト機能を有するデータ入出力装置
2 USBデバイス機能を有するデータ入出力装置
3 USB通信手段
4 アプリケーション
5 ファイルシステム
6 USBホスト機能
7 USBデバイス機能
8 記憶装置
1 Data input / output device having USB host function 2 Data input / output device having USB device function 3 USB communication means 4 Application 5 File system 6 USB host function 7 USB device function 8 Storage device

Claims (3)

DMA転送を行うデータ入出力装置であって、
当該データ入出力装置を制御するコントローラドライバと、
前記コントローラドライバと、該コントローラドライバへのデータ入出力用の第1のバッファとを用いて、ファイルデータのキャッシュ操作を行うファイルシステムと、
前記ファイルシステムと、該ファイルシステムへのデータ入出力用の第2のバッファとを用いるアプリケーションとを有し、
前記コントローラドライバは、
前記第1のバッファが、所定の単位の境界で開始され、かつ所定サイズ以上である条件を満たすかを判断し、
前記条件を満たすと判断された場合に、前記第1のバッファを前記DMA転送に用いるデータバッファに設定し、
前記条件を満たさないと判断された場合に、前記DMA転送に用いるデータバッファを作成することを特徴とするデータ入出力装置。
A data input / output device for performing DMA transfer,
A controller driver for controlling the data input / output device;
A file system for performing a cache operation of file data using the controller driver and a first buffer for data input / output to the controller driver;
An application using the file system and a second buffer for data input / output to / from the file system;
The controller driver is
Determining whether the first buffer satisfies a condition that starts at a predetermined unit boundary and is equal to or larger than a predetermined size;
When it is determined that the condition is satisfied, the first buffer is set as a data buffer used for the DMA transfer,
A data input / output apparatus that creates a data buffer used for the DMA transfer when it is determined that the condition is not satisfied .
前記コントローラドライバは、
前記第1のバッファが前記条件を満たすと判断された場合に
前記データバッファにキャッシュフラッシュを行ってDMA転送を指示し、
前記データバッファにキャッシュインバリデートを行ってDMA転送を指示することを特徴とする請求項に記載のデータ入出力装置。
The controller driver is
If it is determined that the first buffer satisfies the condition ,
Instruct the DMA transfer by performing a cache flush to the data buffer ,
2. The data input / output device according to claim 1 , wherein a cache transfer is instructed to the data buffer to instruct DMA transfer.
前記ファイルシステムにおいて、前記アプリケーションから入出力を指示されたデータが連続しており、且つ前記ファイルシステムにおいてキャッシュのための前記第1のバッファの管理ブロックサイズより大きい場合に、前記ファイルシステムでは前記コントローラドライバに入出力されるファイルデータをキャッシュするための前記第1のバッファを作成せず、前記アプリケーションから前記ファイルシステムに入出力されるデータを格納する第2のバッファを前記コントローラドライバに入出力されるデータを格納する第1のバッファとして使用することを特徴とする請求項に記載のデータ入出力装置。 In the file system, the is continuous data instructed to input and output from the application, and if the management block is larger than the size of the first buffer for caching in the file system, wherein in the said file system controller Without creating the first buffer for caching file data input / output to / from the driver, a second buffer for storing data input / output to / from the file system from the application is input / output to / from the controller driver. 2. The data input / output device according to claim 1 , wherein the data input / output device is used as a first buffer for storing data.
JP2006324820A 2006-11-30 2006-11-30 Data input / output device Expired - Fee Related JP4854483B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006324820A JP4854483B2 (en) 2006-11-30 2006-11-30 Data input / output device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006324820A JP4854483B2 (en) 2006-11-30 2006-11-30 Data input / output device

Publications (3)

Publication Number Publication Date
JP2008140059A JP2008140059A (en) 2008-06-19
JP2008140059A5 JP2008140059A5 (en) 2010-01-21
JP4854483B2 true JP4854483B2 (en) 2012-01-18

Family

ID=39601458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006324820A Expired - Fee Related JP4854483B2 (en) 2006-11-30 2006-11-30 Data input / output device

Country Status (1)

Country Link
JP (1) JP4854483B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5117608B1 (en) * 2011-09-30 2013-01-16 株式会社東芝 Information processing apparatus, hybrid storage apparatus, and cache method
KR102017828B1 (en) 2012-10-19 2019-09-03 삼성전자 주식회사 Security management unit, host controller interface including the same, method for operating the host controller interface, and devices including the host controller interface

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03196345A (en) * 1989-12-26 1991-08-27 Nec Corp Data input/output system
JPH10154116A (en) * 1996-11-25 1998-06-09 Hitachi Ltd Data transfer method
JP2000057039A (en) * 1998-08-03 2000-02-25 Canon Inc Method and device for controlling access, file system and information processor
JP2001075741A (en) * 1999-09-02 2001-03-23 Toshiba Corp Disk control system and data maintenance method

Also Published As

Publication number Publication date
JP2008140059A (en) 2008-06-19

Similar Documents

Publication Publication Date Title
JP4356765B2 (en) Information processing apparatus and method, and program
US20080046660A1 (en) Information recording apparatus and control method thereof
JP4854483B2 (en) Data input / output device
JP2007307745A (en) Image forming apparatus, method for controlling data thereof, and program
JP2006023854A (en) Information processor, storage device, storage controller and program
JP3944709B2 (en) Printing apparatus, control program loading method, medium recording load control program, and load control program
JP5091694B2 (en) Information processing system and information processing program
JP4099725B2 (en) Image forming apparatus
JP5056486B2 (en) Image forming controller and image forming apparatus
JP2020106931A (en) Image forming device
JP2005092737A (en) Image processing device, image forming device and program thereof
JP5679644B2 (en) Information processing apparatus, control method thereof, and program
US20150032885A1 (en) Image processing apparatus and control method
JP4175404B2 (en) DMA control method and DMA controller
JP7363255B2 (en) Information processing device, information processing method, and program
JP4391569B2 (en) Information processing system
JP2010176465A (en) Job control device
JP2003140946A (en) Storage device
US8914591B2 (en) Information processing apparatus, method for controlling same
JP2012191370A (en) Image forming device
JP2008059155A (en) Information processing apparatus and method
JP2011203843A (en) Information processing apparatus
JP2003165248A (en) Print controller and controlling method
JPH10226140A (en) Image-forming apparatus
JP2006150835A (en) Image forming apparatus, method of processing job, and job processing program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091130

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110719

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110920

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111018

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111025

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141104

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141104

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees