JP2009187337A - Device control method, program, control circuit, and electronic equipment - Google Patents

Device control method, program, control circuit, and electronic equipment Download PDF

Info

Publication number
JP2009187337A
JP2009187337A JP2008027226A JP2008027226A JP2009187337A JP 2009187337 A JP2009187337 A JP 2009187337A JP 2008027226 A JP2008027226 A JP 2008027226A JP 2008027226 A JP2008027226 A JP 2008027226A JP 2009187337 A JP2009187337 A JP 2009187337A
Authority
JP
Japan
Prior art keywords
transfer
command
data
transfer mode
dma
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008027226A
Other languages
Japanese (ja)
Inventor
Hiroshi Yakushiji
浩 薬師寺
Shinichiro Fujita
信一郎 藤田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008027226A priority Critical patent/JP2009187337A/en
Publication of JP2009187337A publication Critical patent/JP2009187337A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent transfer data to be generated in the case of performing DMA transfer with an IDE device from being missed. <P>SOLUTION: In electronic equipment 20, when issuing a command corresponding to a request command from a host device 10 to an IDE device 40, a device controller 30 performs data transfer with the IDE device 40 in a transfer mode (DMA/PIO transfer mode) corresponding to the issued command by referring to a command table 332. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、記録媒体からのデータ読み出しを実行するデバイスに対するデバイス制御方法等に関する。   The present invention relates to a device control method for a device that reads data from a recording medium.

HD(HardDisk)等の記録媒体からデータの読み出し/書き込みを行うドライブ等のデバイスのデータ転送を制御するデバイスコントローラには、データ転送方式として、DMA転送方式及びPIO転送方式を併用したものがある(例えば、特許文献1参照)。
特開2005−242411号公報
A device controller that controls data transfer of a device such as a drive that reads / writes data from / on a recording medium such as an HD (HardDisk) includes a combination of a DMA transfer method and a PIO transfer method as a data transfer method ( For example, see Patent Document 1).
JP 2005-242411 A

DMA転送では、CPUとは別個の専用LSIであるDMAコントローラによってデータ転送が行われるため、CPUが転送制御を行うPIO転送と比較して、CPUの処理負担が軽減されるとともに、高速なデータ転送が可能となる。   In DMA transfer, data transfer is performed by a DMA controller, which is a dedicated LSI separate from the CPU, so that the CPU processing load is reduced and high-speed data transfer compared to PIO transfer in which the CPU performs transfer control. Is possible.

ところで、DMA転送では、データ転送用メモリとデバイスとの間のデータ転送は、所定のデータ長(例えば、2バイト)を単位として行われる。このため、デバイスから転送されてくるデータ長がこの単位データ長の倍数とならない場合、例えば最後の1バイトといった半端なデータがメモリに格納されず、転送データの一部が欠落することがある。   By the way, in DMA transfer, data transfer between a data transfer memory and a device is performed in units of a predetermined data length (for example, 2 bytes). For this reason, when the data length transferred from the device is not a multiple of the unit data length, for example, half-length data such as the last one byte is not stored in the memory, and a part of the transfer data may be lost.

また、DMAコントローラは、CPUから指定された転送データ長でデータ転送を行うため、転送データ長を予めDMAコントローラに指定する必要がある。つまり、ホスト装置から要求されるコマンドに応じたデータ転送を行う場合、コマンドとともに要求されたデータ長を転送データ長としてDMAコントローラに指定してデータ転送を行うこととなる、しかし、ホスト装置から要求されるコマンドには、当該コマンドに応答してデバイスから転送されてくるデータのデータ長(実データ長)が、ホスト装置から要求されたデータ長(要求データ長)と一致しないものがある。この場合、次のような不都合が生じる。すなわち、実データ長が要求データ長より小さい場合には、転送されてくるデータ長が指定された転送データ長に達しないためにデータ転送が完了せず、また逆に、実データ長が要求データ長より大きい場合には、転送されてきたデータ長が指定された転送データ長に達した時点でデータ転送が終了されるために、転送データの一部が欠落する。   Further, since the DMA controller performs data transfer with the transfer data length designated by the CPU, it is necessary to designate the transfer data length to the DMA controller in advance. In other words, when performing data transfer according to the command requested from the host device, the data length requested together with the command is designated as the transfer data length to the DMA controller, but the data transfer is performed. In some commands, the data length (actual data length) of data transferred from the device in response to the command does not match the data length (requested data length) requested from the host device. In this case, the following inconvenience occurs. In other words, if the actual data length is smaller than the requested data length, the transferred data length does not reach the designated transfer data length, so the data transfer is not completed, and conversely, the actual data length is the requested data length. If the length is greater than the length, the data transfer is completed when the transferred data length reaches the designated transfer data length, so that a part of the transfer data is lost.

本発明は、上記事情に鑑みてなされたものであり、DMA転送の際に生じる転送データの欠落を防止することを目的としている。   The present invention has been made in view of the above circumstances, and an object thereof is to prevent transfer data from being lost during DMA transfer.

上記課題を解決するための第1の発明は、少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路によるデバイス制御方法であって、前記ホスト装置から要求命令を受け付けることと、前記デバイスに、前記要求命令に応じたデータ転送のコマンドを発行することと、コマンド毎に、当該コマンドに対応する転送モードとして、当該コマンドに応じた前記デバイスからの転送データのデータ長が固定且つ偶数バイトであるコマンドにはDMA転送モードが、それ以外の場合にはPIO転送モードが予め対応づけられており、当該対応づけに基づいて、前記発行コマンドに対応する転送モードを設定することと、前記設定された転送モードで前記発行コマンドに従ったデータ転送を行うこととを含むデバイス制御方法である。   A first invention for solving the above-described problems includes at least a device that reads data from a recording medium, and data is transferred from the device in any one of a DMA transfer mode and a PIO transfer mode. A device control method by a control circuit of an electronic device that outputs data to a host device connected to an external bus standardized by a predetermined standard, and receiving a request command from the host device, Issuing a data transfer command according to the request command to the device, and as a transfer mode corresponding to the command for each command, the data length of the transfer data from the device according to the command is fixed and even For commands that are bytes, the DMA transfer mode is set in advance, and in other cases, the PIO transfer mode is set in advance. A device control method comprising: setting a transfer mode corresponding to the issue command based on the association; and performing data transfer according to the issue command in the set transfer mode It is.

また、第2の発明は、少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路であるコンピュータに、第1の発明のデバイス制御方法を実行させるためのプログラムである。   In addition, the second invention includes at least a device for reading data from a recording medium, and the data transferred from the device in any one of the DMA transfer mode and the PIO transfer mode is A program for causing a computer, which is a control circuit of an electronic device to output to a host device connected to an external bus standardized by a predetermined standard, to execute the device control method of the first invention.

また、第3の発明は、少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路であって、前記ホスト装置から要求命令を受け付ける要求命令受付部と、前記デバイスに、前記要求命令受付部により受け付けられた要求命令に応じたデータ転送のコマンドを発行するコマンド発行部と、コマンド毎に、当該コマンドに対応する転送モードとして、当該コマンドに応じた前記デバイスからの転送データのデータ長が固定且つ偶数バイトであるコマンドにはDMA転送モードが、それ以外の場合にはPIO転送モードが予め対応づけられており、当該対応づけに基づいて、前記発行コマンドに対応する転送モードを設定する転送モード設定部と、前記転送モード設定部により設定された転送モードで前記発行コマンドに従ったデータ転送を行う転送制御部とを備えた制御回路である。   Further, the third invention incorporates at least a device for reading data from the recording medium, and the data transferred from the device in any one of the DMA transfer mode and the PIO transfer mode, A control circuit for an electronic device that outputs to a host device connected to an external bus standardized by a predetermined standard, a request command receiving unit that receives a request command from the host device, and the request command to the device A command issuing unit that issues a data transfer command according to the request command received by the receiving unit, and a data length of transfer data from the device according to the command as a transfer mode corresponding to the command for each command DMA transfer mode for commands with fixed and even bytes, PIO transfer otherwise A transfer mode setting unit for setting a transfer mode corresponding to the issue command, and a transfer mode set by the transfer mode setting unit based on the association. And a transfer control unit that performs data transfer according to the control circuit.

また、第4の発明は、少なくとも記録媒体からのデータ読み出しを実行するデバイスと、前記デバイスを制御する第3の発明の制御回路とを備え、所定の標準化規格で規格化された外部バスでホスト装置と接続される電子機器である。   The fourth invention includes at least a device for reading data from a recording medium and the control circuit of the third invention for controlling the device, and is hosted by an external bus standardized by a predetermined standard. An electronic device connected to the device.

この第1〜第4の発明によれば、記録媒体からのデータ読み出しを実行するデバイスを内蔵し、デバイスからデータ転送されてきたデータをホスト装置に出力する電子機器の制御回路において、ホスト装置からの要求命令に応じたデータ転送のコマンドが発行され、この発行コマンドに応じたデバイスからの転送データのデータ長が必ず偶数バイトになる場合には転送モードとしてDMA転送モードが設定され、それ以外の場合には転送モードとしてPIO転送モードが設定され、設定された転送モードで発行コマンドに従ったデータ転送が行われる。DMA転送モードでは、所定単位(具体的には、2バイト)でデータ転送が行われるため、デバイスからの転送データのデータ長がこの所定単位の倍数とならない場合、ホスト装置に出力される転送データに欠落が生じるが、本発明のように、転送データのデータ長が偶数バイトになる場合にはDMA転送モードでデータ転送を行い、それ以外の場合にはPIO転送モードでデータ転送を行うことで、このような転送データの欠落が防止される。   According to the first to fourth aspects of the present invention, there is provided a control circuit for an electronic device that includes a device for reading data from a recording medium and outputs data transferred from the device to the host device. When a data transfer command corresponding to the request command is issued and the data length of the transfer data from the device corresponding to the issued command is always an even number of bytes, the DMA transfer mode is set as the transfer mode. In this case, the PIO transfer mode is set as the transfer mode, and data transfer is performed according to the issued command in the set transfer mode. In the DMA transfer mode, since data transfer is performed in a predetermined unit (specifically, 2 bytes), if the data length of the transfer data from the device is not a multiple of the predetermined unit, the transfer data output to the host device However, as in the present invention, when the data length of transfer data is an even number of bytes, data transfer is performed in the DMA transfer mode, and in other cases, data transfer is performed in the PIO transfer mode. Such a loss of transfer data is prevented.

以下、図面を参照して本発明の好適な実施形態を説明する。なお、以下では、デバイスとしてHDDを有する電子機器を説明するが、本発明の適用可能な実施形態がこれに限定されるものではない。   Preferred embodiments of the present invention will be described below with reference to the drawings. In the following, an electronic apparatus having an HDD as a device will be described, but an embodiment to which the present invention can be applied is not limited to this.

[構成]
図1は、本実施形態における電子機器20の構成図である。同図によれば、電子機器20は、IEEE1394規格に準拠したバス1によって、PCであるホスト装置10と接続されている。なお、ホスト装置10は、PCに限らず、携帯情報端末や携帯電話機等の他の電子機器であっても良い。また、バス1は、IEEE1394規格に準拠したバスに限らず、USB規格に準拠したバスであっても良い。
[Constitution]
FIG. 1 is a configuration diagram of an electronic device 20 in the present embodiment. According to the figure, the electronic device 20 is connected to a host device 10 that is a PC by a bus 1 conforming to the IEEE 1394 standard. The host device 10 is not limited to a PC, and may be another electronic device such as a portable information terminal or a mobile phone. Further, the bus 1 is not limited to a bus conforming to the IEEE 1394 standard, and may be a bus conforming to the USB standard.

電子機器20は、制御回路であるデバイスコントローラ30と、HDDであるIDEデバイス40とを有し、デバイスコントローラ30とIDEデバイス40とは、ATA/ATAPI規格に準拠したバス2によって接続されている。なお、電子機器20が複数台のIDEデバイス40を有することとしても良い。この場合、デバイスコントローラ30とIDEデバイス40それぞれとがバス2によって接続され、ホスト装置10からは全体として1台のHDDとして認識される。また、IDEデバイス40は、ATA/ATAPIインターフェースに接続可能なデバイスであれば良く、光ディスクドライブ等のハードディスク以外のストレージデバイスであっても良い。   The electronic device 20 includes a device controller 30 that is a control circuit and an IDE device 40 that is an HDD. The device controller 30 and the IDE device 40 are connected by a bus 2 that conforms to the ATA / ATAPI standard. Note that the electronic device 20 may include a plurality of IDE devices 40. In this case, the device controller 30 and the IDE device 40 are connected by the bus 2 and are recognized as one HDD as a whole by the host device 10. The IDE device 40 may be any device that can be connected to the ATA / ATAPI interface, and may be a storage device other than a hard disk such as an optical disk drive.

デバイスコントローラ30は、マイクロコンピュータで実現され、ホスト装置10とIDEデバイス40との間のデータ転送を制御する。また、このデバイスコントローラ30は、CPU31と、DMAコントローラ32と、ROM33と、RAM34とを有する。   The device controller 30 is realized by a microcomputer and controls data transfer between the host apparatus 10 and the IDE device 40. The device controller 30 includes a CPU 31, a DMA controller 32, a ROM 33, and a RAM 34.

CPU31は、デバイスコントローラ30の全体制御を含む各種制御処理を行う。また、CPU31は、ホスト装置10からコマンド要求が入力されると、転送制御プログラム331に従った転送制御処理を行う。この転送制御処理では、ホスト装置10から要求されたコマンドを解析し、コマンドパケットを生成してIDEデバイス40に出力するパケットコマンドの発行を行う。次いで、コマンドテーブル332を参照し、このコマンドの転送モードを判断する。   The CPU 31 performs various control processes including overall control of the device controller 30. Further, when a command request is input from the host device 10, the CPU 31 performs a transfer control process according to the transfer control program 331. In this transfer control process, a command requested from the host device 10 is analyzed, a command packet is generated, and a packet command to be output to the IDE device 40 is issued. Next, the command table 332 is referenced to determine the transfer mode of this command.

図2は、コマンドテーブル332のデータ構成の一例を示す図である。同図によれば、コマンドテーブル332は、コマンド332aそれぞれについて、転送モード332bと、データの転送方向332cとを対応付けて格納している。転送方向332cは、ホスト装置10から入力されたデータをIDEデバイス40に書き込む方向(H→D)、或いはIDEデバイス40からデータを読み出してホスト装置10に出力する方向(H←D)である。ここで、各コマンドの転送モードは、コマンドに応じてIDEデバイス40に転送されるデータ或いはIDEデバイス40から転送されてくるデータ(以下、双方を含めて「転送データ」という)のデータ長に応じて定められる。すなわち、転送データ長がIDEデバイス40によらずに固定であり、且つ転送データ長が偶数バイトであるコマンドについては、DMA転送モードが設定され、それ以外のコマンドについては、PIO転送モードが設定されている。これは、DMA転送方式によるデータ転送の際には、DMAコントローラ32に転送データ長を指定する必要があるとともに、DMAコントローラ32によるデータバッファ341に対するデータの読み出し/書き込みは2バイトを単位として行われるためである。   FIG. 2 is a diagram illustrating an example of a data configuration of the command table 332. According to the figure, the command table 332 stores a transfer mode 332b and a data transfer direction 332c in association with each command 332a. The transfer direction 332c is a direction in which data input from the host device 10 is written to the IDE device 40 (H → D), or a direction in which data is read from the IDE device 40 and output to the host device 10 (H ← D). Here, the transfer mode of each command depends on the data length of the data transferred to the IDE device 40 in accordance with the command or the data transferred from the IDE device 40 (hereinafter referred to as “transfer data”). Determined. That is, the DMA transfer mode is set for a command whose transfer data length is fixed regardless of the IDE device 40 and the transfer data length is an even number of bytes, and the PIO transfer mode is set for other commands. ing. In the data transfer by the DMA transfer method, it is necessary to designate the transfer data length to the DMA controller 32, and data reading / writing to the data buffer 341 by the DMA controller 32 is performed in units of 2 bytes. Because.

CPU31は、判断した転送モードが「DMA転送モード」ならば、転送モードをDMA転送モードに設定する。そして、ホスト装置10からコマンドとともに要求されたデータ長(要求データ長)を転送データ長として、DMAコントローラ32にデータ転送を行わせる。また、判断した転送モードが「PIO転送モード」ならば、転送モードをPIO転送モードに設定する。次いで、IDEデバイス40のByteCountレジスタの設定値を読み出し、転送データ長として設定する。この「ByteCountレジスタ」には、発行したコマンドに対する応答データのデータ長が設定されている。その後、設定した転送データ長のデータ転送を、PIO転送方式で行う。   If the determined transfer mode is “DMA transfer mode”, the CPU 31 sets the transfer mode to the DMA transfer mode. Then, the DMA controller 32 is caused to perform data transfer using the data length (requested data length) requested together with the command from the host device 10 as the transfer data length. If the determined transfer mode is “PIO transfer mode”, the transfer mode is set to the PIO transfer mode. Next, the set value of the ByteCount register of the IDE device 40 is read and set as the transfer data length. In this “ByteCount register”, the data length of the response data for the issued command is set. Thereafter, data transfer of the set transfer data length is performed by the PIO transfer method.

DMAコントローラ32は、LSIで実現され、データバッファ341とIDEデバイス40との間のデータ転送を制御する。具体的には、IDEデバイス40から転送されてきたデータをデータバッファ341に格納する読み出し処理、或いは、データバッファ341に格納されているデータをIDEデバイス40に転送する書き込み処理を行う。またこのとき、IDEデバイス40とのデータ転送をCPU31から指定された転送データ長で行うとともに、データバッファ341からのデータ読み出し/書き込みは、所定の単位(具体的には、2バイト単位)で行う。   The DMA controller 32 is realized by an LSI, and controls data transfer between the data buffer 341 and the IDE device 40. Specifically, a read process for storing the data transferred from the IDE device 40 in the data buffer 341 or a write process for transferring the data stored in the data buffer 341 to the IDE device 40 is performed. At this time, data transfer with the IDE device 40 is performed with the transfer data length designated by the CPU 31, and data reading / writing from the data buffer 341 is performed in a predetermined unit (specifically, in units of 2 bytes). .

ROM33は、CPU31がデバイスコントローラ30を統括制御するためのシステムプログラムや、転送制御処理を含む各種処理を実現するためのプログラムやデータを記憶する。本実施形態では、ROM33には、転送制御プログラム331と、コマンドテーブル332とが記憶される。RAM34は、CPUの作業領域として用いられるとともに、転送データを一時的に格納するデータバッファ341を有する。   The ROM 33 stores a system program for the CPU 31 to control the device controller 30 as a whole, and a program and data for realizing various processes including a transfer control process. In the present embodiment, the ROM 33 stores a transfer control program 331 and a command table 332. The RAM 34 is used as a work area for the CPU and has a data buffer 341 for temporarily storing transfer data.

[処理の流れ]
図3は、CPU31が行う転送制御処理の流れを説明するためのフローチャートである。同図によれば、CPU31は、先ず、ホスト装置10からのコマンド要求に応じたパケットコマンドを生成し、IDEデバイス40に出力するパケットコマンドの発行を行う(ステップS1)。次いで、コマンドテーブル332を参照して、当該コマンドに定められている転送モードを判断する(ステップS3)。
[Process flow]
FIG. 3 is a flowchart for explaining the flow of the transfer control process performed by the CPU 31. According to the figure, the CPU 31 first generates a packet command in response to a command request from the host device 10 and issues a packet command to be output to the IDE device 40 (step S1). Next, with reference to the command table 332, the transfer mode defined in the command is determined (step S3).

転送モードを「PIO転送モード」と判断したならば(ステップS5:「PIO」)、データ転送モードを「PIO転送モード」に設定する(ステップS7)。そして、IDEデバイス40のByteCountレジスタの設定値を読み出し、転送データ長として設定する(ステップS9)。そして、設定した転送データ長のデータ転送を、IDEデバイス40との間で行う(ステップS11)。   If it is determined that the transfer mode is “PIO transfer mode” (step S5: “PIO”), the data transfer mode is set to “PIO transfer mode” (step S7). Then, the setting value of the ByteCount register of the IDE device 40 is read and set as the transfer data length (step S9). Then, data transfer with the set transfer data length is performed with the IDE device 40 (step S11).

一方、転送モードを「DMA転送モード」と判断したならば(ステップS5:「DMA」)、データ転送モードを「DMA転送モード」に設定し(ステップS13)、ホスト装置10からの要求データ長を転送データ長として設定する(ステップS15)。そして、DMAコントローラ32に、IDEデバイス40とのデータ転送を、設定した転送データ長で行わせる(ステップS17)。以上の処理を行うと、転送制御処理を終了する。   On the other hand, if it is determined that the transfer mode is “DMA transfer mode” (step S5: “DMA”), the data transfer mode is set to “DMA transfer mode” (step S13), and the requested data length from the host device 10 is set. The transfer data length is set (step S15). Then, the DMA controller 32 is caused to perform data transfer with the IDE device 40 with the set transfer data length (step S17). When the above processing is performed, the transfer control processing ends.

[作用・効果]
このように、本発明によれば、電子機器20において、デバイスコントローラ30は、ホスト装置10からコマンド要求を受けると、この要求に応じたパケットコマンドをIDEデバイス40に対して発行するとともに、コマンドそれぞれに転送モードが対応付けられたコマンドテーブル332を参照し、発行したコマンドに対応する転送モード(DMA/PIO転送モード)でIDEデバイス40との間のデータ転送を行う。コマンドテーブル332では、転送データ長が固定であり且つ転送データ長が偶数バイトであるコマンドについては、DMA転送モードが設定され、それ以外のコマンドについては、PIO転送モードが設定されている。これは、DMA転送方式によるデータ転送の際には、DMAコントローラ32に転送データ長を指定する必要があるとともに、DMAコントローラ32によるデータバッファ341に対するデータの読み出し/書き込みは2バイトを単位として行われるためである。これにより、ホスト装置10とIDEデバイス40との間での転送データの欠落が防止される。
[Action / Effect]
Thus, according to the present invention, in the electronic device 20, when the device controller 30 receives a command request from the host device 10, the device controller 30 issues a packet command corresponding to the request to the IDE device 40, and each command The command table 332 associated with the transfer mode is referred to, and data transfer with the IDE device 40 is performed in the transfer mode (DMA / PIO transfer mode) corresponding to the issued command. In the command table 332, the DMA transfer mode is set for a command whose transfer data length is fixed and the transfer data length is an even number of bytes, and the PIO transfer mode is set for other commands. In the data transfer by the DMA transfer method, it is necessary to designate the transfer data length to the DMA controller 32, and data reading / writing to the data buffer 341 by the DMA controller 32 is performed in units of 2 bytes. Because. Thereby, the loss of transfer data between the host apparatus 10 and the IDE device 40 is prevented.

電子機器の構成図。The block diagram of an electronic device. コマンドテーブルのデータ構成例。Example of data structure of command table. 転送制御処理のフローチャート。The flowchart of a transfer control process.

符号の説明Explanation of symbols

10 ホスト装置、20 電子機器、30 デバイスコントローラ、31 CPU、33 ROM、331 転送制御プログラム、332 コマンドテーブル、34 RAM、341 データバッファ、32 DMAコントローラ、40 IDEデバイス 10 host device, 20 electronic device, 30 device controller, 31 CPU, 33 ROM, 331 transfer control program, 332 command table, 34 RAM, 341 data buffer, 32 DMA controller, 40 IDE device

Claims (4)

少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路によるデバイス制御方法であって、
前記ホスト装置から要求命令を受け付けることと、
前記デバイスに、前記要求命令に応じたデータ転送のコマンドを発行することと、
コマンド毎に、当該コマンドに対応する転送モードとして、当該コマンドに応じた前記デバイスからの転送データのデータ長が固定且つ偶数バイトであるコマンドにはDMA転送モードが、それ以外の場合にはPIO転送モードが予め対応づけられており、当該対応づけに基づいて、前記発行コマンドに対応する転送モードを設定することと、
前記設定された転送モードで前記発行コマンドに従ったデータ転送を行うことと、
を含むデバイス制御方法。
At least a device that reads data from the recording medium is built in, and the data transferred from the device in any one of the DMA transfer mode and the PIO transfer mode is standardized by a predetermined standard. A device control method by a control circuit of an electronic device that outputs to a host device connected to an external bus,
Receiving a request command from the host device;
Issuing a data transfer command in response to the request command to the device;
For each command, as a transfer mode corresponding to the command, the DMA transfer mode is used for a command in which the data length of the transfer data from the device corresponding to the command is fixed and an even number of bytes, and PIO transfer is otherwise performed. A mode is associated in advance and, based on the association, setting a transfer mode corresponding to the issued command;
Performing data transfer according to the issued command in the set transfer mode;
A device control method including:
少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路であるコンピュータに、請求項1に記載のデバイス制御方法を実行させるためのプログラム。   At least a device that reads data from the recording medium is built in, and the data transferred from the device in any one of the DMA transfer mode and the PIO transfer mode is standardized by a predetermined standard. A program for causing a computer, which is a control circuit of an electronic device to output to a host device connected to an external bus, to execute the device control method according to claim 1. 少なくとも記録媒体からのデータ読み出しを実行するデバイスを内蔵し、DMA転送モード及びPIO転送モードのうちの何れかの転送モードで前記デバイスからデータ転送されてきたデータを、所定の標準化規格で規格化された外部バスに接続されたホスト装置に出力する電子機器の制御回路であって、
前記ホスト装置から要求命令を受け付ける要求命令受付部と、
前記デバイスに、前記要求命令受付部により受け付けられた要求命令に応じたデータ転送のコマンドを発行するコマンド発行部と、
コマンド毎に、当該コマンドに対応する転送モードとして、当該コマンドに応じた前記デバイスからの転送データのデータ長が固定且つ偶数バイトであるコマンドにはDMA転送モードが、それ以外の場合にはPIO転送モードが予め対応づけられており、当該対応づけに基づいて、前記発行コマンドに対応する転送モードを設定する転送モード設定部と、
前記転送モード設定部により設定された転送モードで前記発行コマンドに従ったデータ転送を行う転送制御部と、
を備えた制御回路。
At least a device that reads data from the recording medium is built in, and the data transferred from the device in any one of the DMA transfer mode and the PIO transfer mode is standardized by a predetermined standard. A control circuit for an electronic device that outputs to a host device connected to an external bus,
A request command receiving unit that receives a request command from the host device;
A command issuing unit that issues a data transfer command according to the request command received by the request command receiving unit to the device;
For each command, as a transfer mode corresponding to the command, the DMA transfer mode is used for a command in which the data length of the transfer data from the device corresponding to the command is fixed and an even number of bytes, and PIO transfer is otherwise performed. Modes are associated in advance, and based on the association, a transfer mode setting unit that sets a transfer mode corresponding to the issued command;
A transfer control unit that performs data transfer according to the issue command in the transfer mode set by the transfer mode setting unit;
Control circuit with.
少なくとも記録媒体からのデータ読み出しを実行するデバイスと、前記デバイスを制御する請求項3に記載の制御回路とを備え、所定の標準化規格で規格化された外部バスでホスト装置と接続される電子機器。   An electronic apparatus comprising at least a device that reads data from a recording medium and the control circuit according to claim 3 that controls the device, and is connected to a host device via an external bus standardized by a predetermined standard .
JP2008027226A 2008-02-07 2008-02-07 Device control method, program, control circuit, and electronic equipment Pending JP2009187337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008027226A JP2009187337A (en) 2008-02-07 2008-02-07 Device control method, program, control circuit, and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008027226A JP2009187337A (en) 2008-02-07 2008-02-07 Device control method, program, control circuit, and electronic equipment

Publications (1)

Publication Number Publication Date
JP2009187337A true JP2009187337A (en) 2009-08-20

Family

ID=41070503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008027226A Pending JP2009187337A (en) 2008-02-07 2008-02-07 Device control method, program, control circuit, and electronic equipment

Country Status (1)

Country Link
JP (1) JP2009187337A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013200646A (en) * 2012-03-23 2013-10-03 Nec Corp I/o control device, control method for i/o device, and computer program
CN108197039A (en) * 2017-12-28 2018-06-22 湖南国科微电子股份有限公司 A kind of transmission method and system of SSD controller mixing flow data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013200646A (en) * 2012-03-23 2013-10-03 Nec Corp I/o control device, control method for i/o device, and computer program
CN108197039A (en) * 2017-12-28 2018-06-22 湖南国科微电子股份有限公司 A kind of transmission method and system of SSD controller mixing flow data
CN108197039B (en) * 2017-12-28 2022-01-11 湖南国科微电子股份有限公司 Method and system for transmitting mixed stream data of SSD (solid State disk) controller

Similar Documents

Publication Publication Date Title
US9563368B2 (en) Embedded multimedia card and method of operating the same
KR101366960B1 (en) Multi way nand flash controller and method using input/output pins
JP6622446B2 (en) Embedded multimedia card (eMMC), host for controlling the same, and operation method of eMMC system
KR101035225B1 (en) Controller apparatus and method for improved data transfer
KR101932920B1 (en) Host for controlling non-volatile memory crad, system including the same and operating method there-of
US8429374B2 (en) System and method for read-while-write with NAND memory device
KR20160049200A (en) Method for operating data storage device, mobile computing device having the same, and method of the mobile computing device
JP2007299216A (en) Storage device using nonvolatile flash memory and control method thereof
EP2214103A1 (en) I/O controller and descriptor transfer method
US20060179202A1 (en) Data transfer control device and electronic instrument
JP4373255B2 (en) Direct memory access control apparatus and method
JP4829370B1 (en) MEMORY CONTROL DEVICE, MEMORY DEVICE, AND STOP CONTROL METHOD
US9424206B2 (en) Command executing method, connector and memory storage device
TW202011203A (en) Command processing method and storage controller using the same
JP2009032305A (en) Information recording device and control method therefor
US20100153622A1 (en) Data Access Controller and Data Accessing Method
TWI474254B (en) Method and apparatus for executing commands in a memory system and data storage system
JP2009187337A (en) Device control method, program, control circuit, and electronic equipment
TWI688864B (en) Storage apparatus and storing method
JP2007079715A (en) Data transfer method, program and device
JP2009093225A (en) Storage control device, method, program, and storage device
JP4793798B2 (en) Microcomputer
JP2007048090A (en) Nand type flash memory device compatible with sequential rom interface, and controller therefor
JP5541544B2 (en) Computer apparatus, data transfer method, and program
JP2012068808A (en) Portable storage device