JP2005242412A - Interface control device, method, and program - Google Patents

Interface control device, method, and program Download PDF

Info

Publication number
JP2005242412A
JP2005242412A JP2004047328A JP2004047328A JP2005242412A JP 2005242412 A JP2005242412 A JP 2005242412A JP 2004047328 A JP2004047328 A JP 2004047328A JP 2004047328 A JP2004047328 A JP 2004047328A JP 2005242412 A JP2005242412 A JP 2005242412A
Authority
JP
Japan
Prior art keywords
prd
processing
pio
idma
data transfer
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.)
Granted
Application number
JP2004047328A
Other languages
Japanese (ja)
Other versions
JP4432534B2 (en
Inventor
Kenji Yamazaki
健治 山崎
Kimitaka Hasegawa
公位 長谷川
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2004047328A priority Critical patent/JP4432534B2/en
Publication of JP2005242412A publication Critical patent/JP2005242412A/en
Application granted granted Critical
Publication of JP4432534B2 publication Critical patent/JP4432534B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To further easily transfer data on ATA standards even in a drive having a plurality of pickups. <P>SOLUTION: When it is determined that crowd control processing for OP1 is executed without executing crowd control processing for OP0 in step S346, a crowd processing part advances processing to step S348 to execute the crowd control processing for OP1. When the crowd control processing for OP1 is executed, and the processing is terminated, the crowd processing part returns the processing to step S342, and repeats the processing that follows to control the next crowd processing (including the crowd processing of unprocessed OP0 corresponding to the crowd processing of OP1 controlled this time). <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、インタフェース制御装置および方法、並びにプログラムに関し、特に、ATAデバイスのインタフェースに用いて好適なインタフェース制御装置および方法、並びにプログラムに関する。   The present invention relates to an interface control apparatus and method, and a program, and more particularly, to an interface control apparatus and method suitable for use in an interface of an ATA device, and a program.

従来、ハードディスクとホストとのインタフェースとして、IDE(Integrated Drive Electronics)があった。IDEは、PC/AT(Personal Computer/Advanced Technology)互換機用ハードディスクのインタフェースの仕様である。IDEの信号線は、PC/AT互換機の仕様として標準化されたISA(Industry Standard Architecture)バスのそれをほぼそのまま利用しており、ハードディスクとホストとの接続には簡単なアドレスデコーダとバッファ程度があればよく、一般にそれまでの標準的なハードディスクインタフェースであるSCSI(Small Computer System Interface)のコントローラと比較して低価格にIDEコントローラを開発することができるので、各社によりIDEコントローラの開発が進み、PC/AT互換機用ハードディスクのインタフェースの仕様として、事実上、標準化された。なお、このIDEは、転送速度の向上や限界容量の増大、接続デバイス数の増加等を目的として、後にEnhanced IDEに拡張された。   Conventionally, IDE (Integrated Drive Electronics) has been used as an interface between a hard disk and a host. The IDE is a specification of a hard disk interface for PC / AT (Personal Computer / Advanced Technology) compatible machines. The IDE signal line uses the ISA (Industry Standard Architecture) bus standardized as a specification for PC / AT compatible machines as it is, and there is a simple address decoder and buffer for connecting the hard disk to the host. The IDE controller can be developed at a lower price compared to the standard hard disk interface SCSI (Small Computer System Interface) controller in general. It was effectively standardized as a hard disk interface specification for PC / AT compatible machines. This IDE was later expanded to the Enhanced IDE for the purpose of improving transfer speed, increasing the capacity limit, and increasing the number of connected devices.

しかしながら、初期のIDEには、明確な標準規格がなかったため、各ドライブメーカはそれぞれ独自の機能拡張等を行ったため、異なるメーカ製品同士での互換性問題が発生した。   However, since there was no clear standard in the early IDEs, each drive manufacturer expanded its own functions, causing compatibility problems between different manufacturers.

そのため、ANSI(American National Standards Institute)により、標準規格として、このIDEを利用したATA(AT Attachment interface)が制定された。現在この規格は、ANSIの、SCSI(Small Computer System Interface)の標準化を行っている、X3T92というグループによって管理されている。このATAもまた、改良や拡張が行われ、初期のATA−1から、ATA−2,ATA−3,ATA-4,ATA−5,ATA−6,ATA−7,Serial ATAのように新たな規格が制定されてきた。例えば、最大データ転送速度は、ATA−1は8.33MB/s、ATA−2およびATA−3は16.7MB/s、ATA-4は33.3MB/s、ATA−5は66.7MB/s、ATA−6は100MB/s、ATA−7は133MB/s、Serial ATAは150MB/sである。   Therefore, ANSI (AT Attachment Interface) using this IDE was established as a standard by the American National Standards Institute (ANSI). This standard is currently managed by a group called ANSI X3T92, which standardizes SCSI (Small Computer System Interface). This ATA has also been improved and expanded, from the initial ATA-1 to new ones like ATA-2, ATA-3, ATA-4, ATA-5, ATA-6, ATA-7, Serial ATA. Standards have been established. For example, the maximum data transfer rate is 8.33MB / s for ATA-1, 16.7MB / s for ATA-2 and ATA-3, 33.3MB / s for ATA-4, 66.7MB / s for ATA-5, ATA- 6 is 100 MB / s, ATA-7 is 133 MB / s, and Serial ATA is 150 MB / s.

また、このような規格に利用されるIDEコントローラに、例えばCD-ROM(Compact Disc - Read Only Memory)等のハードディスク以外のデバイスを接続するためのパケットインターフェイスの標準規格として、ANSIによりATAPI(ATA Pachet Interface)が制定された。ATAPIでは、SCSIコマンドをATAコマンドに変換することができるため、高価なSCSIインタフェースを必要としないCD-ROMドライブを比較的容易に開発できるようになる。このATAPIは、制定当初、ATAと独立した規格であったが、ATA−4の規格以降、それらは統一されている。従って、ATA-4は、ATA/ATAPI−4とも呼ばれている。従って、以下においては、CD-ROM等のハードディスク以外のデバイスもATAデバイスと称する。   As a standard for packet interfaces for connecting devices other than hard disks, such as CD-ROM (Compact Disc-Read Only Memory), to the IDE controller used for such a standard, ATAPI (ATA Pachet Interface) was established. ATAPI can convert SCSI commands to ATA commands, making it relatively easy to develop CD-ROM drives that do not require expensive SCSI interfaces. This ATAPI was originally a standard independent of ATA, but since the ATA-4 standard, they have been unified. Therefore, ATA-4 is also called ATA / ATAPI-4. Therefore, in the following, devices other than hard disks such as CD-ROM are also referred to as ATA devices.

このような規格においては、データ転送速度を高速化するために、例えば、CPUがデータ転送を制御するPIO転送(Program I/O transfer)、DMA(Direct Memory Access transfer)コントローラがデータ転送を制御し、1つの処理により1つのデータが転送されるシングルワードDMA転送、DMAコントローラがデータ転送を制御し、1つの処理により複数のデータが連続して転送されるマルチワードDMA転送、より高速なデータ転送を行うUltraDMA転送等、様々な転送方式が用いられている(例えば、非特許文献1参照)。   In such a standard, in order to increase the data transfer speed, for example, the PIO transfer (Program I / O transfer) in which the CPU controls the data transfer and the DMA (Direct Memory Access transfer) controller control the data transfer. Single word DMA transfer in which one data is transferred by one process, Multiword DMA transfer in which a DMA controller controls data transfer and multiple data are transferred in one process, and higher speed data transfer Various transfer methods such as UltraDMA transfer are used (for example, see Non-Patent Document 1).

図1は、PIO転送方式におけるデータ転送の様子の例を説明する図である。   FIG. 1 is a diagram for explaining an example of data transfer in the PIO transfer method.

図1において、CPU(Central Processing Unit)1は、SDRAM(Synchronous Dynamic Random Access Memory)2とバス3を介して接続されている。また、バス3には、IDEコントローラを含むATAホストハードウェア4が接続されており、そのATAホストハードウェア4には、さらにATAデバイスであるドライブ5が接続されている。このような装置において、例えば、SDRAM2に保持されているデータをドライブ5に転送し、ドライブ5装着された図示せぬ記録媒体(例えばCD(Compact Disc)やDVD(Digital Versatile Disc)等)に書き込む場合や、逆に、その記録媒体に記録されているデータを読み出し、SDRAM2に転送する場合、PIO転送方式では、CPUが直接データの転送処理を制御する。   In FIG. 1, a CPU (Central Processing Unit) 1 is connected to an SDRAM (Synchronous Dynamic Random Access Memory) 2 via a bus 3. In addition, ATA host hardware 4 including an IDE controller is connected to the bus 3, and a drive 5 that is an ATA device is further connected to the ATA host hardware 4. In such an apparatus, for example, data held in the SDRAM 2 is transferred to the drive 5 and written to a recording medium (not shown) (for example, a CD (Compact Disc) or a DVD (Digital Versatile Disc)) mounted on the drive 5. In some cases, or conversely, when data recorded on the recording medium is read and transferred to the SDRAM 2, in the PIO transfer method, the CPU directly controls the data transfer process.

すなわち、CPU1は、例えば、IN/OUT命令を実行し、ATAホストハードウェア4のATAレジスタにアクセスし、MOV命令を実行してATAホストハードウェア4のバッファメモリ空間を読み書きする。そして、CPU1は、LOOP命令を実行することによってこのような動作を繰り返す。   That is, the CPU 1 executes, for example, an IN / OUT instruction, accesses the ATA register of the ATA host hardware 4, executes the MOV instruction, and reads / writes the buffer memory space of the ATA host hardware 4. The CPU 1 repeats such an operation by executing the LOOP instruction.

つまり、CPU1は、両矢印6および両矢印7に示されるように、データの転送が発生すると、SDRAM2やATAホストハードウェア4にアクセスし、データ転送に関する処理を行う。なお、ドライブ5へのアクセスは、両矢印8に示されるように、ATAホストハードウェア4がCPU1からの命令に基づいて行う。従って、CPU1は、図2に示されるように、その転送処理単位毎(レジスタ毎)に、ATAホストハードウェア4(およびSDRAM2)にアクセスし、処理を指示する。ATAホストハードウェア4は、そのCPU1からの指示に基づいて、レジスタ(PIO)9にアクセスし、CPU1からの指示1つに対して1つのレジスタを処理する。図2において、図中左の5つのレジスタに関する処理は、記録媒体への書き込み処理の例を示したものであり、図中右の5つのレジスタに関する処理は、記録媒体からの読み出し処理の例を示したものである。図2に示されるように、記録媒体からの読み出しの場合、読み出したデータに関する処理が必要となるので、CPU1とATAホストハードウェア4の通信回数は、記録媒体への読み出しの回数と比較して倍増する。   That is, as shown by the double arrows 6 and 7, when the data transfer occurs, the CPU 1 accesses the SDRAM 2 and the ATA host hardware 4 and performs processing related to the data transfer. The drive 5 is accessed by the ATA host hardware 4 based on a command from the CPU 1 as indicated by a double arrow 8. Therefore, as shown in FIG. 2, the CPU 1 accesses the ATA host hardware 4 (and SDRAM 2) for each transfer processing unit (for each register) and instructs processing. The ATA host hardware 4 accesses the register (PIO) 9 based on an instruction from the CPU 1 and processes one register for one instruction from the CPU 1. In FIG. 2, the processing related to the five registers on the left in the drawing shows an example of writing processing to the recording medium, and the processing related to the five registers on the right in the drawing is an example of reading processing from the recording medium. It is shown. As shown in FIG. 2, in the case of reading from the recording medium, processing related to the read data is required. Therefore, the number of communication between the CPU 1 and the ATA host hardware 4 is compared with the number of reading to the recording medium. Double.

このように、PIO転送方式の場合、CPU1が直接データ転送を制御するので、CPU1による各デバイスへのアクセスや命令フェッチ等の、実際のデータ転送以外にもバス3が頻繁に使用されることになる。また、この場合、CPU1がデータ転送のために、頻繁に処理を実行しなければならない。従って、データ転送に関する処理の負荷が大きくなり、データ転送速度を向上させることが困難であった。   As described above, in the case of the PIO transfer method, since the CPU 1 directly controls data transfer, the bus 3 is frequently used in addition to actual data transfer such as access to each device or instruction fetch by the CPU 1. Become. In this case, the CPU 1 must frequently execute processing for data transfer. Therefore, the processing load related to data transfer is increased, and it is difficult to improve the data transfer speed.

そこで、ATA−2やATA−3においては、シングルワードDMA転送方式やマルチワードDMA転送方式が採用された。シングルワードDMA転送方式やマルチワードDMA転送方式の場合のデータ転送の様子の例を図3に示す。なお、以下において、シングルワードDMA転送方式とマルチワードDMA転送方式を区別する必要が無い場合、シングルワード/マルチワードDMA転送方式と称する。   Therefore, in ATA-2 and ATA-3, a single word DMA transfer system and a multiword DMA transfer system are adopted. FIG. 3 shows an example of data transfer in the case of the single word DMA transfer system and the multiword DMA transfer system. In the following, when there is no need to distinguish between the single word DMA transfer method and the multiword DMA transfer method, the single word DMA transfer method is referred to as a single word / multiword DMA transfer method.

図3に示されるように、シングルワード/マルチワードDMA転送方式の場合、データ転送の制御は、CPU1ではなく、DMAコントローラであるDMA11が行う。DMA11は、CPU1等と同様にバス3に接続されており、両矢印12および両矢印13に示されるように、CPU1の代わりに、SDRAM2やATAホストハードウェア4にアクセスし、転送処理を制御する。このようにすることにより、シングルワード/マルチワードDMA転送方式の場合、CPU1にデータ転送による負荷がかからないにし、CPU1の負荷を軽減させることができる。   As shown in FIG. 3, in the case of the single word / multiword DMA transfer method, the data transfer is controlled not by the CPU 1 but by the DMA 11 which is the DMA controller. The DMA 11 is connected to the bus 3 in the same manner as the CPU 1 and the like, and accesses the SDRAM 2 and the ATA host hardware 4 instead of the CPU 1 and controls the transfer process as indicated by the double arrow 12 and double arrow 13. . By doing so, in the case of the single word / multiword DMA transfer system, the CPU 1 is not burdened by data transfer, and the load on the CPU 1 can be reduced.

さらに高速化を目指し、ATA−4以降においては、UltraDMA転送方式が採用されている。UltraDMA転送方式の場合、図4に示されるように、バス3上でバスマスタとなったATAホストハードウェア14に内蔵されるDMAコントローラであるDMA15がデータ転送を制御する。すなわち、バス3を介したデータ転送は、通常のバスマスタによりデータ転送そのものとなり、両矢印16に示されるように、ATAホストハードウェア14によるSDRAM2へのアクセスのみとなる。このとき、CPU1は、もちろん、転送処理を制御しない。このようにすることにより、データ転送時のCPU1およびバス3の負荷が低減する。   In order to further increase the speed, the UltraDMA transfer method is adopted after ATA-4. In the case of the UltraDMA transfer method, as shown in FIG. 4, the DMA 15 that is a DMA controller built in the ATA host hardware 14 that becomes the bus master on the bus 3 controls the data transfer. That is, the data transfer via the bus 3 becomes the data transfer itself by a normal bus master, and only the access to the SDRAM 2 by the ATA host hardware 14 as indicated by the double arrow 16. At this time, of course, the CPU 1 does not control the transfer process. By doing so, the load on the CPU 1 and the bus 3 during data transfer is reduced.

図5は、PIO転送方式とUltraDMA転送方式を組み合わせた場合のCPU1によるアクセスの例を模式的に示した図である。   FIG. 5 is a diagram schematically showing an example of access by the CPU 1 when the PIO transfer method and the UltraDMA transfer method are combined.

図5に示されるように、ホストハードウェア4は、PIO転送方式の場合、レジスタ(PIO)17にアクセスし、レジスタ(PIO)17に保持された処理を実行し、UltraDMA転送方式の場合、レジスタ(DMA)18にアクセスし、レジスタ(DMA)18に保持された処理を実行する。上述したように、PIO転送方式の場合、ATAホストハードウェア4がCPU1の1度の指示に基づいて、レジスタ(PIO)17の1つの処理を実行するため、データ転送処理単位毎にCPU1がアクセスする必要があったが、UltraDMA転送方式の場合、ATAホストハードウェア4は、レジスタ(DMA)18に保持された複数の処理を1回のCPU1からの指示により実行することができるので、データ転送処理単位のデータを複数連続して転送することができる。従って、CPU1によるATAホストハードウェア4へのアクセス数が低下する。   As shown in FIG. 5, the host hardware 4 accesses the register (PIO) 17 in the case of the PIO transfer method, executes the processing held in the register (PIO) 17, and in the case of the UltraDMA transfer method, the register (DMA) 18 is accessed, and the processing held in register (DMA) 18 is executed. As described above, in the case of the PIO transfer method, the ATA host hardware 4 executes one process of the register (PIO) 17 based on one instruction of the CPU 1, so the CPU 1 accesses for each data transfer processing unit. However, in the case of the UltraDMA transfer method, the ATA host hardware 4 can execute a plurality of processes held in the register (DMA) 18 by a single instruction from the CPU 1, so that data transfer is possible. A plurality of processing unit data can be transferred continuously. Accordingly, the number of accesses to the ATA host hardware 4 by the CPU 1 decreases.

"ATA(IDE)/ATAPIの徹底研究"、CQ出版社、P30−P33"Thorough research on ATA (IDE) / ATAPI", CQ Publisher, P30-P33

近年、ATAの規格上において、このように複雑な処理を伴う様々なインタフェースの制御方法が規格として提案されている。しかしながら、ATAの規格上においては、ATAデバイスのピックアップの数は1つであり、ATAにより、ピックアップを複数有するデバイスを制御することができないという課題があった。   In recent years, on the ATA standard, various interface control methods involving such complicated processing have been proposed as standards. However, in the ATA standard, the number of pickups of the ATA device is one, and there is a problem that a device having a plurality of pickups cannot be controlled by the ATA.

これに対して、独自のプロトコルを用いることにより、ピックアップを複数有するドライブを制御することが考えられるが、この場合、ドライブのインタフェースの汎用性が低下し、他の装置に接続できない恐れがあった。   On the other hand, it is conceivable to control a drive having a plurality of pickups by using a unique protocol, but in this case, the versatility of the interface of the drive is reduced, and there is a possibility that it cannot be connected to another device. .

本発明は、このような状況に鑑みてなされたものであり、複数のピックアップを有するドライブであっても、ATAの規格上において、より容易にデータを転送させることができるようにするものである。   The present invention has been made in view of such a situation, and enables even a drive having a plurality of pickups to more easily transfer data on the ATA standard. .

本発明のインタフェース制御装置は、ATAデバイスと、ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐手段と、並列分岐手段により並列分岐された各PRD処理の進行を制御する制御手段とを備えることを特徴とする。   The interface control apparatus according to the present invention corresponds to each PRD table based on each of a plurality of PRD tables in which related information of data transfer performed between the ATA device and an external storage unit of the ATA device is described. Parallel branching means for branching the PRD process, which is a process related to data transfer, for each pickup corresponding to each PRD table, and a control means for controlling the progress of each PRD process branched in parallel by the parallel branching means Features.

前記PRD処理は、データ転送に関する複数の処理からなる複数のフェーズにより構成され、制御手段は、PRD処理に含まれる複数のフェーズの内、所定のフェーズの終了時または開始時に、PRD処理を進行させるピックアップを切り替えることにより、各ピックアップに対応するPRD処理を並列に進行させるようにすることができる。   The PRD process is composed of a plurality of phases including a plurality of processes related to data transfer, and the control means advances the PRD process at the end or start of a predetermined phase among the plurality of phases included in the PRD process. By switching the pickups, the PRD process corresponding to each pickup can be advanced in parallel.

前記制御手段は、ピックアップ毎に、書き込み処理を行うPRD処理の最後のフェーズが終了してから、次の読み出し処理を行うPRD処理の最初のフェーズを開始させるとともに、ピックアップ毎に、読み出し処理を行うPRD処理の最後のフェーズが終了してから、次の書き込み処理を行うPRD処理の最初のフェーズを開始させるようにすることができる。   The control means starts the first phase of the PRD process for performing the next read process after the last phase of the PRD process for performing the write process for each pickup and performs the read process for each pickup. After the last phase of the PRD process is completed, the first phase of the PRD process for performing the next writing process can be started.

前記制御手段は、書き込み処理を行うPRD処理の、データ転送を行うフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行うピックアップを切り替えるようにすることができる。   The control means can switch the pickup for processing at either the end of the phase for performing data transfer or the end of the phase for performing status reporting in the PRD processing for performing the writing processing. .

前記制御手段は、読み出し処理を行うPRD処理の、データ転送を指示するコマンドを発行するフェーズの開始時において、処理を行うピックアップを切り替えるようにすることができる。   The control means can switch a pickup to be processed at the start of a phase of issuing a command instructing data transfer in a PRD process for performing a read process.

前記制御手段は、全てのピックアップの書き込み処理を行うPRD処理の最後のフェーズが終了してから、次の読み出し処理を行うPRD処理の最初のフェーズを開始させるとともに、全てのピックアップの読み出し処理を行うPRD処理の最後のフェーズが終了してから、次の書き込み処理を行うPRD処理の最初のフェーズを開始させるようにすることができる。   The control means starts the first phase of the PRD process for performing the next reading process after the last phase of the PRD process for performing the writing process for all the pickups and performs the reading process for all the pickups. After the last phase of the PRD process is completed, the first phase of the PRD process for performing the next writing process can be started.

前記制御手段は、書き込み処理を行うPRD処理の、データ転送を行うフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行うピックアップを切り替えるようにすることができる。   The control means can switch the pickup for processing at either the end of the phase for performing data transfer or the end of the phase for performing status reporting in the PRD processing for performing the writing processing. .

前記制御手段は、読み出し処理を行うPRD処理の、読み出し処理を指示するコマンドを発行するフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行うピックアップを切り替えるようにすることができる。   The control means switches the pickup to perform processing at either the end of the phase of issuing the command instructing the reading process of the PRD processing that performs the reading process or the phase of performing the status report. Can be.

前記PRD処理によるデータ転送の許可または禁止を制御し、全てのピックアップの内、いずれか1つのピックアップに対応するPRD処理に対してデータ転送の許可を与えるとともに、それ以外のピックアップに対応するPRD処理に対してデータ転送の禁止を与え、データ転送の許可を与えたピックアップのPRD処理においてデータ転送が行われた場合、処理を行うピックアップの切り替え時に、データ転送の許可を行うピックアップを切り替え、データ転送の禁止を与えたピックアップのPRD処理が終了した場合、そのPRD処理にデータ転送の許可を与えないように制御するデータ転送制御手段をさらに備え、制御手段は、データ転送制御手段により、処理を行うピックアップの切り替え先のPRD処理に対してデータ転送の許可が与えられていない場合、PRD処理を進行させずに、再度、処理を行うピックアップを切り替えるようにすることができる。   Controls permission or prohibition of data transfer by the PRD process, and gives permission for data transfer to the PRD process corresponding to any one of all pickups, and PRD process corresponding to other pickups If the data transfer is prohibited in the PRD process of the pickup that gave the data transfer permission, the pickup that permits the data transfer is switched and the data transfer is switched when the pickup to be processed is switched. When the PRD process of the pickup that has been prohibited is completed, the data transfer control means is further provided for controlling the PRD process so that the data transfer permission is not given. The control means performs the process by the data transfer control means. If data transfer permission is not granted for the PRD process to which the pickup is switched, PRD Without progress management, it is possible to switch the pickup again performs processing.

本発明のインタフェース制御方法は、ATAデバイスと、ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理が、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐ステップと、並列分岐ステップの処理により並列分岐された各PRD処理の進行を制御する制御ステップとを含むことを特徴とする。   The interface control method of the present invention corresponds to each PRD table based on each of a plurality of PRD tables in which related information of data transfer performed between the ATA device and an external storage unit of the ATA device is described. The PRD process, which is a process related to data transfer, includes a parallel branch step that branches in parallel for each pickup corresponding to each PRD table, and a control step that controls the progress of each PRD process branched in parallel by the parallel branch step process. It is characterized by that.

本発明のプログラムは、ATAデバイスと、ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理が、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐ステップと、並列分岐ステップの処理により並列分岐された各PRD処理の進行を制御する制御ステップとをコンピュータに実行させる。   The program of the present invention performs data transfer corresponding to each PRD table based on each of a plurality of PRD tables in which related information of data transfer performed between the ATA device and an external storage unit of the ATA device is described. PRD processing, which is processing related to each PRD table, executes in a computer a parallel branch step for branching in parallel for each pickup corresponding to each PRD table, and a control step for controlling the progress of each PRD process branched in parallel by the processing of the parallel branch step Let

本発明のインタフェース制御装置および方法、並びにプログラムにおいては、ATAデバイスと、ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理が、各PRDテーブルが対応するピックアップ毎に並列分岐され、並列分岐された各PRD処理の進行が制御される。   In the interface control apparatus and method of the present invention, and the program, based on each of a plurality of PRD tables in which related information of data transfer performed between the ATA device and an external storage unit of the ATA device is described. The PRD process, which is a process related to data transfer corresponding to each PRD table, is branched in parallel for each pickup corresponding to each PRD table, and the progress of each PRD process branched in parallel is controlled.

本発明によれば、データ転送を制御することができる。特に、複数のピックアップを有するドライブであっても、ATAの規格上において、より容易にデータを転送させることができる。   According to the present invention, data transfer can be controlled. In particular, even a drive having a plurality of pickups can more easily transfer data according to the ATA standard.

以下に本発明の実施の形態を説明するが、請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between constituent elements described in the claims and specific examples in the embodiments of the present invention are exemplified as follows. This description is to confirm that specific examples supporting the invention described in the claims are described in the embodiments of the invention. Therefore, even if there are specific examples that are described in the embodiment of the invention but are not described here as corresponding to the configuration requirements, the specific examples are not included in the configuration. It does not mean that it does not correspond to a requirement. On the contrary, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.

さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定したりするものではない。   Further, this description does not mean that all the inventions corresponding to the specific examples described in the embodiments of the invention are described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of an invention not described in the claims of this application, that is, in the future, a divisional application will be made. Nor does it deny the existence of an invention added by amendment.

本発明においては、複数のピックアップを有するATAデバイス(例えば、図6のドライブ22)のインタフェースを制御するインタフェース制御装置(例えば、図6において内部の構成例が示されるインタフェース制御装置)が提供される。このインタフェース制御装置では、ATAデバイスと、ATAデバイスの外部の記憶部(例えば、図6のSDRAM24)との間で行われるデータ転送の関連情報が記述された複数のPRDテーブル(例えば、図13のPRDテーブル)のそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理(例えば、図56のPRD処理451乃至457)を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐手段(例えば、図62のステップS346)と、並列分岐手段により並列分岐された各PRD処理の進行を制御する制御手段(例えば、図62のステップS347およびステップS348)とを備えることを特徴とする。   In the present invention, an interface control apparatus (for example, an interface control apparatus whose internal configuration example is shown in FIG. 6) for controlling an interface of an ATA device (for example, the drive 22 in FIG. 6) having a plurality of pickups is provided. . In this interface control apparatus, a plurality of PRD tables (for example, FIG. 13) describing information related to data transfer performed between the ATA device and a storage unit (for example, the SDRAM 24 in FIG. 6) outside the ATA device. Based on each of the PRD tables), PRD processing (for example, PRD processing 451 to 457 in FIG. 56) that is processing related to data transfer corresponding to each PRD table is branched in parallel for each pickup corresponding to each PRD table. 62. A branching unit (for example, step S346 in FIG. 62) and a control unit (for example, step S347 and step S348 in FIG. 62) for controlling the progress of each PRD process branched in parallel by the parallel branching unit. To do.

前記PRD処理は、データ転送に関する複数の処理からなる複数のフェーズ(例えば、第1のフェーズ乃至第6のフェーズ)により構成され、制御手段は、PRD処理に含まれる複数のフェーズの内、所定のフェーズの終了時または開始時に、PRD処理を進行させるピックアップを切り替えることにより、各ピックアップに対応するPRD処理を並列に進行させるようにすることができる。   The PRD process is composed of a plurality of phases (for example, a first phase to a sixth phase) consisting of a plurality of processes related to data transfer, and the control means is a predetermined one of a plurality of phases included in the PRD process. By switching the pickup that advances the PRD process at the end or start of the phase, the PRD process corresponding to each pickup can be advanced in parallel.

前記制御手段は、ピックアップ毎に、書き込み処理を行うPRD処理の最後のフェーズが終了してから、次の読み出し処理を行うPRD処理の最初のフェーズを開始させるとともに、ピックアップ毎に、読み出し処理を行うPRD処理の最後のフェーズが終了してから、次の書き込み処理を行うPRD処理の最初のフェーズを開始させる(例えば、図56のクラウド処理471)ようにすることができる。   The control means starts the first phase of the PRD process for performing the next read process after the last phase of the PRD process for performing the write process for each pickup and performs the read process for each pickup. After the end of the last phase of the PRD process, the first phase of the PRD process for performing the next write process can be started (for example, the cloud process 471 in FIG. 56).

前記制御手段は、書き込み処理を行うPRD処理の、データ転送を行うフェーズ(R)の終了時、または、ステータス報告を行うフェーズ(S)の終了時のいずれか一方において、処理を行うピックアップを切り替える(例えば、図57の「Write」)ようにすることができる。   The control means switches a pickup to be processed at either the end of the phase (R) for performing data transfer or the end of the phase (S) for performing status reporting in the PRD process for performing the writing process. (For example, “Write” in FIG. 57).

前記制御手段は、読み出し処理を行うPRD処理の、データ転送を指示するコマンド(D)を発行するフェーズの開始時において、処理を行うピックアップを切り替える(例えば、図59)ようにすることができる。   The control means can switch the pickup to be processed (for example, FIG. 59) at the start of the phase of issuing the command (D) for instructing data transfer in the PRD process for performing the reading process.

前記制御手段は、全てのピックアップの書き込み処理を行うPRD処理(例えば、図69)の最後のフェーズが終了してから、次の読み出し処理を行うPRD処理の最初のフェーズを開始させるとともに、全てのピックアップの読み出し処理を行うPRD処理の最後のフェーズが終了してから、次の書き込み処理を行うPRD処理の最初のフェーズを開始させるようにすることができる。   The control means starts the first phase of the PRD process for performing the next reading process after the last phase of the PRD process (for example, FIG. 69) for performing the writing process of all the pickups is completed. It is possible to start the first phase of the PRD process for performing the next writing process after the last phase of the PRD process for performing the reading process of the pickup is completed.

前記制御手段は、書き込み処理を行うPRD処理の、データ転送を行うフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行うピックアップを切り替える(例えば、図70)ようにすることができる。   The control means switches the pickup to perform processing at either the end of the phase of performing data transfer or the end of the phase of performing status reporting of the PRD processing that performs writing processing (for example, FIG. 70). Can be.

前記制御手段は、読み出し処理を行うPRD処理の、読み出し処理を指示するコマンドを発行するフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行うピックアップを切り替える(例えば、図70)ようにすることができる。   The control means switches the pickup to be processed at either the end of the phase of issuing the command for instructing the read process or the end of the phase of performing the status report in the PRD process for performing the read process ( For example, as shown in FIG.

前記PRD処理によるデータ転送の許可または禁止を制御し(図71のData転送許可/禁止)、全てのピックアップの内、いずれか1つのピックアップに対応するPRD処理に対してデータ転送の許可を与えるとともに、それ以外のピックアップに対応するPRD処理に対してデータ転送の禁止を与え、データ転送の許可を与えたピックアップのPRD処理においてデータ転送が行われた場合、処理を行うピックアップの切り替え時に、データ転送の許可を行うピックアップを切り替え、データ転送の禁止を与えたピックアップのPRD処理が終了した場合、そのPRD処理にデータ転送の許可を与えないように制御するデータ転送制御手段(例えば、図61のクラウド処理部441)をさらに備え、制御手段は、データ転送制御手段により、処理を行うピックアップの切り替え先のPRD処理に対してデータ転送の許可が与えられていない場合、PRD処理を進行させずに、再度、処理を行うピックアップを切り替える(例えば、図73のステップS447)ようにすることができる。   Controls permission or prohibition of data transfer by the PRD process (Data transfer permission / prohibition in FIG. 71), and grants data transfer permission to the PRD process corresponding to any one of the pickups. Data transfer is prohibited for PRD processing corresponding to other pickups, and when data transfer is performed in the PRD processing of a pickup that is permitted to transfer data, data transfer is performed when the pickup to be processed is switched. When the pickup that permits the data transfer is switched and the PRD process of the pickup for which the data transfer is prohibited is completed, the data transfer control means (for example, the cloud in FIG. A processing unit 441), and the control means includes a pickup for performing processing by the data transfer control means. If the data transfer permission is not given to the replacement PRD process, the pickup to be processed is switched again (for example, step S447 in FIG. 73) without proceeding with the PRD process. it can.

本発明においては、複数のピックアップを有するATAデバイス(例えば、図6のドライブ22)のインタフェースを制御するインタフェース制御装置(例えば、図6において内部の構成例が示されるインタフェース制御装置)のインタフェース制御方法が提供される。このインタフェース制御方法は、ATAデバイスと、ATAデバイスの外部の記憶部(例えば、図6のSDRAM24)との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐ステップ(図62のステップS346)と、並列分岐ステップの処理により並列分岐された各PRD処理の進行を制御する制御ステップ(図62のステップS347およびステップ348)とを含む。   In the present invention, an interface control method for an interface control apparatus (for example, an interface control apparatus whose internal configuration example is shown in FIG. 6) for controlling the interface of an ATA device having a plurality of pickups (for example, the drive 22 in FIG. 6). Is provided. This interface control method is based on each of a plurality of PRD tables in which information related to data transfer performed between an ATA device and a storage unit external to the ATA device (for example, SDRAM 24 in FIG. 6) is described. The PRD process, which is a process related to data transfer corresponding to each PRD table, was branched in parallel by the parallel branch step (step S346 in FIG. 62) for branching in parallel for each pickup corresponding to each PRD table and the parallel branch step process. Control steps (step S347 and step 348 in FIG. 62) for controlling the progress of each PRD process.

本発明においては、ATAデバイス(例えば、図6のドライブ22)のインタフェースを制御するインタフェース制御処理を、コンピュータ(例えば、図6において内部の構成例が示されるインタフェース制御装置)に行わせるプログラムが提供される。このプログラムは、ATAデバイスと、ATAデバイスの外部の記憶部(例えば、図6のSDRAM24)との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応するデータ転送に関する処理であるPRD処理を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐ステップ(図62のステップS346)と、並列分岐ステップの処理により並列分岐された各PRD処理の進行を制御する制御ステップ(図62のステップS347およびステップ348)とを含む。   In the present invention, there is provided a program for causing a computer (for example, an interface control device whose internal configuration example is shown in FIG. 6) to perform interface control processing for controlling the interface of the ATA device (for example, the drive 22 of FIG. 6). Is done. This program is based on each PRD table based on each of a plurality of PRD tables in which information related to data transfer performed between the ATA device and an external storage unit of the ATA device (for example, the SDRAM 24 in FIG. 6) is described. A parallel branch step (step S346 in FIG. 62) for branching the PRD process, which is a process related to data transfer corresponding to the table, in parallel for each pickup corresponding to each PRD table, and each PRD branched in parallel by the process of the parallel branch step Control steps (step S347 and step 348 in FIG. 62) for controlling the progress of the process.

以下に、本発明の実施の形態について図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図6は、本発明を適用したATA(AT Attachment interface)インタフェース制御装置のATAホストハードウェアの構成例を表している。   FIG. 6 shows a configuration example of ATA host hardware of an ATA (AT Attachment interface) interface control device to which the present invention is applied.

図6に示されるATAインタフェース制御装置は、例えば、映像データの記録再生装置等の映像機器であり、ATAホストハードウェア21は、ATAデバイスであるドライブ22のIDE(Integrated Drive Electronics)コントローラとして構成されるデバイスであり、例えば、PCI(Peripheral Components Interconnect bus)バス等のバス42介してCPU(Central Processing Unit)23と接続されるとともに、バス42と同様のバス41を介してSDRAM(Synchronous Dynamic Random Access Memory)24と接続されている。ATAホストハードウェア21は、CPU23に制御され、ATAの規格に準拠する方法を利用して、SDRAM24とドライブ22とのデータ転送を制御し、例えば、SDRAM24が保持するデータを取得し、ドライブ22に装着されたCD(Compact Disc)やDVD(Digital Versatile Disc)等の記録媒体に書き込んだり、ドライブ22に装着された記録媒体に記録されているデータを読み出し、それをSDRAM24に供給して保持させたりする。   The ATA interface control device shown in FIG. 6 is, for example, a video device such as a video data recording / playback device, and the ATA host hardware 21 is configured as an IDE (Integrated Drive Electronics) controller of a drive 22 that is an ATA device. For example, the device is connected to a CPU (Central Processing Unit) 23 via a bus 42 such as a PCI (Peripheral Components Interconnect bus) bus and is also connected to an SDRAM (Synchronous Dynamic Random Access) via a bus 41 similar to the bus 42. Memory) 24. The ATA host hardware 21 is controlled by the CPU 23 and controls data transfer between the SDRAM 24 and the drive 22 by using a method compliant with the ATA standard. For example, the data held by the SDRAM 24 is acquired and stored in the drive 22. Write to a recording medium such as a mounted CD (Compact Disc) or DVD (Digital Versatile Disc), read data recorded on a recording medium mounted on the drive 22, supply it to the SDRAM 24, and hold it To do.

ATAホストハードウェア21は、CPU23に制御され、ATAホストハードウェア21全体の動作を制御するATAホスト31、ATAホスト31とスルーPIO(Program I/O transfer)制御部33とIDMA(Intelligence Direct Memory Access transfer)制御部37とを接続するバス32、後述するスルーPIO転送モードにおける転送処理を制御するスルーPIO制御部33、SRAM(Static Random Access Memory)52に保持されているPIOスクリプト1つ分の処理を実行する単一PIOスクリプト処理部34、PIO転送モードに関する処理を実行するPIO実行部35、ドライブ22に接続され、ドライブ22のインタフェース処理を行うATAインタフェース処理部36、後述するIDMA転送モードにおける転送処理を制御するIDMA制御部37、IDMA転送モードにおけるPIO転送に関する処理を制御するIDMA PIO制御部38、および、IDMA転送モードにおけるDMA転送に関する処理を実行するDMA実行部39により構成される。   The ATA host hardware 21 is controlled by the CPU 23, and controls the operation of the entire ATA host hardware 21, an ATA host 31, an ATA host 31, a through PIO (Program I / O transfer) control unit 33, and an IDMA (Intelligence Direct Memory Access). transfer) A bus 32 for connecting to the control unit 37, a through PIO control unit 33 for controlling transfer processing in a through PIO transfer mode, which will be described later, and a process for one PIO script held in an SRAM (Static Random Access Memory) 52 A single PIO script processing unit 34 for executing PIO, a PIO execution unit 35 for executing processing relating to the PIO transfer mode, an ATA interface processing unit 36 connected to the drive 22 for performing interface processing of the drive 22, and transfer in an IDMA transfer mode to be described later IDMA control unit 37 that controls processing, IDMA PIO control unit 38 that controls processing related to PIO transfer in the IDMA transfer mode, And composed of a DMA execution unit 39 for executing the processing related DMA transfer IDMA transfer mode.

ATAホスト31は、内部に、バス42を介してCPU23に接続される入出力制御部51、SRAM52、およびレジスタ53を有している。入出力制御部51は、バス42を介して行われるCPU23との通信を制御し、例えば、CPU23より供給される情報をSRAM52やレジスタ53に供給し保持させたり、処理結果等の情報をCPU23に供給したりする。SRAM52は、後述するように、入出力制御部51を介してCPU23より供給されるデータ転送処理に関する情報を保持したり、その情報を、必要に応じてバス32を介してスルーPIO制御部33やIDMA制御部37に供給したりする。レジスタ53は、後述するように、入出力制御部51を介してCPU23より供給されるATAホストハードウェアやデータ転送処理に関する設定情報を保持したり、その情報を、必要に応じてバス32を介してスルーPIO制御部33やIDMA制御部37に供給したりする。   The ATA host 31 includes an input / output control unit 51, an SRAM 52, and a register 53 that are connected to the CPU 23 via the bus 42. The input / output control unit 51 controls communication with the CPU 23 performed via the bus 42, for example, supplies and holds information supplied from the CPU 23 to the SRAM 52 and the register 53, and stores information such as processing results in the CPU 23. Or supply. As will be described later, the SRAM 52 holds information related to data transfer processing supplied from the CPU 23 via the input / output control unit 51, and stores the information via the bus 32 as necessary via the through PIO control unit 33 or To the IDMA control unit 37. As will be described later, the register 53 holds setting information related to ATA host hardware and data transfer processing supplied from the CPU 23 via the input / output control unit 51, and stores the information via the bus 32 as necessary. To the through PIO control unit 33 and the IDMA control unit 37.

スルーPIO制御部33は、CPU23によって、PIO転送モードの転送処理を連続して実行するスルーPIO転送モードのデータ転送が指示された場合、SRAM52やレジスタ53より必要な情報を取得し、単一PIOスクリプト処理部34を制御して、スルーPIO転送モードによるデータ転送処理を実行させる。   The through PIO control unit 33 obtains necessary information from the SRAM 52 and the register 53 when the CPU 23 instructs the data transfer in the through PIO transfer mode in which the transfer processing in the PIO transfer mode is continuously executed. The script processing unit 34 is controlled to execute data transfer processing in the through PIO transfer mode.

単一PIOスクリプト処理部34は、スルーPIO制御部33やIDMA PIO制御部38に制御され、供給されるPIOスクリプトを1つずつ処理し、そのPIOスクリプトに含まれるPIO転送モードに関する処理をPIO実行部35に実行させる。   The single PIO script processing unit 34 is controlled by the through PIO control unit 33 and the IDMA PIO control unit 38, processes the supplied PIO scripts one by one, and executes PIO processing related to the PIO transfer mode included in the PIO script. This is executed by the unit 35.

PIO実行部35は、PIOスクリプト処理部34に制御され、ATAインタフェース処理部36を介してドライブ22にアクセスし、要求されたPIO転送モードに関する処理を実行する。   The PIO execution unit 35 is controlled by the PIO script processing unit 34, accesses the drive 22 via the ATA interface processing unit 36, and executes processing related to the requested PIO transfer mode.

ATAインタフェース処理部36は、PIO実行部35やDMA実行部39からのドライブ22へのアクセスを受け付けてドライブ22に供給したり、ドライブ22に装着された記録媒体より読み出されたデータを、要求元であるPIO実行部35やDMA実行部39に供給したりする。   The ATA interface processing unit 36 receives access to the drive 22 from the PIO execution unit 35 and the DMA execution unit 39 and supplies it to the drive 22 or requests data read from the recording medium mounted on the drive 22. To the original PIO execution unit 35 and DMA execution unit 39.

IDMA制御部37は、CPU23によって、PIO転送モードによるデータ転送処理とDMA転送モードによるデータ転送処理を連続して実行するIDMA転送モードのデータ転送が指示された場合、SRAM52やレジスタ53より必要な情報を取得し、IDMA PIO処理部38やDMA実行部39を制御して、IDMA転送モードによるデータ転送処理を実行させる。   When the CPU 23 instructs the data transfer processing in the IDMA transfer mode in which the data transfer processing in the PIO transfer mode and the data transfer processing in the DMA transfer mode are successively executed by the CPU 23, the necessary information is transmitted from the SRAM 52 and the register 53. And the IDMA PIO processing unit 38 and the DMA execution unit 39 are controlled to execute the data transfer processing in the IDMA transfer mode.

IDMA PIO処理部38は、IDMA制御部37に制御され、単一PIOスクリプト処理部34を制御することにより、IDMA転送モードにおけるPIO転送モードに関する処理を制御する。   The IDMA PIO processing unit 38 is controlled by the IDMA control unit 37 and controls the processing related to the PIO transfer mode in the IDMA transfer mode by controlling the single PIO script processing unit 34.

DMA実行部39は、IDMA制御部37に制御され、IDMA転送モードにおけるDMA転送モードに関する処理を実行する。すなわち、DMA実行部39には、バス41を介してSDRAM24が接続されており、SDRAM24とATAインタフェース処理部36(ドライブ22)とのデータのやり取りを、CPU23を介さずに制御する。   The DMA execution unit 39 is controlled by the IDMA control unit 37 and executes processing related to the DMA transfer mode in the IDMA transfer mode. That is, the SDRAM 24 is connected to the DMA execution unit 39 via the bus 41, and data exchange between the SDRAM 24 and the ATA interface processing unit 36 (drive 22) is controlled without using the CPU 23.

すなわち、ATAホストハードウェア21は、スルーPIO転送モードとIDMA転送モードの2つのモードによりデータ転送を行う。各モードの詳細については後述するが、ATAホストハードウェア21の各部の関係は、スルーPIO転送モードとIDMA転送モードの階層化された処理に対応するように階層化されている。   That is, the ATA host hardware 21 performs data transfer in two modes, a through PIO transfer mode and an IDMA transfer mode. Although the details of each mode will be described later, the relationship between each part of the ATA host hardware 21 is hierarchized so as to correspond to the hierarchized processing of the through PIO transfer mode and the IDMA transfer mode.

このような構成は、映像機器以外にも適用することができ、例えばPC/AT(Personal Computer/Advanced Technology)互換機と呼ばれるような汎用のパーソナルコンピュータ等のように、インタフェース規格としてATAを利用している装置であれば何でも適用することができる。   Such a configuration can be applied to devices other than video equipment. For example, a general-purpose personal computer called a PC / AT (Personal Computer / Advanced Technology) compatible machine uses ATA as an interface standard. Any device can be applied.

また、以上においては、ATAホストハードウェア21、ドライブ22、CPU23、およびSDRAM24を1つの装置を構成する処理部として説明したが、これに限らず、上述した各部がそれぞれ互いに異なる装置であるようにしてもよいし、上述した各部の一部が別体として構成されるようにしてもよい。例えば、ATAホストハードウェア21、CPU23、およびSDRAM24がATAインタフェース制御装置として構成され、ドライブ22がATAインタフェース制御装置に接続された外部の装置であるとしてもよいし、ATAホストハードウェア21をATAインタフェース制御装置とし、ドライブ22を記録再生装置とし、CPU23を制御装置とし、SDRAM24をデータストレージ装置として構成させ、各装置がATAの規格に基づいて接続されているものとしてもよい。   In the above description, the ATA host hardware 21, the drive 22, the CPU 23, and the SDRAM 24 are described as processing units constituting one device. However, the present invention is not limited to this, and the above-described units are different devices. Alternatively, some of the above-described units may be configured as separate bodies. For example, the ATA host hardware 21, the CPU 23, and the SDRAM 24 may be configured as an ATA interface control device, and the drive 22 may be an external device connected to the ATA interface control device, or the ATA host hardware 21 may be an ATA interface. The controller 22 may be a recording / playback device, the CPU 23 may be a control device, the SDRAM 24 may be configured as a data storage device, and the devices may be connected based on ATA standards.

図7は、図6のATAホストハードウェア21の、データ転送処理における状態遷移の様子を説明する模式図である。   FIG. 7 is a schematic diagram for explaining the state transition in the data transfer process of the ATA host hardware 21 of FIG.

電源が投入されると、ATAホストハードウェア21は、ATAデバイスリセット(Reset)モード61に移行し、ATAデバイスであるドライブ22のリセット(初期化)する。具体的には、ATAホスト31がATAインタフェース処理部36を介してドライブ22にアクセスし、ドライブ22の状態を初期化する。デバイスのリセットが終了すると(デバイスReset終了)、ATAホストハードウェア21は、待機モード(IDLE)62に移行し、CPU23からの転送処理開始の指示が来るまで待機する。   When the power is turned on, the ATA host hardware 21 shifts to an ATA device reset (Reset) mode 61 and resets (initializes) the drive 22 that is an ATA device. Specifically, the ATA host 31 accesses the drive 22 via the ATA interface processing unit 36 and initializes the state of the drive 22. When the device reset is completed (device reset is completed), the ATA host hardware 21 shifts to the standby mode (IDLE) 62 and waits until an instruction to start the transfer process from the CPU 23 is received.

ATAホストハードウェア21が実行する転送処理のモードとしては、PIO転送モードによるデータ転送を連続して実行するスルーPIO転送モード(スルーPIO)63と、PIO転送モードによるデータ転送とDMA転送モードによるデータ転送の少なくとも一方を連続して実行するIDMA転送モード(IDMA)64とがある。   The transfer processing mode executed by the ATA host hardware 21 includes a through PIO transfer mode (through PIO) 63 that continuously executes data transfer in the PIO transfer mode, data transfer in the PIO transfer mode, and data in the DMA transfer mode. There is an IDMA transfer mode (IDMA) 64 that continuously executes at least one of the transfers.

CPU23よりスルーPIO転送モードによるデータ転送が指示されると(スルーPIO Start)、ATAホストハードウェア21は、スルーPIO転送モード63の通常モード(Normal)71に移行し、後述するPIOスクリプトに基づいてPIO処理を実行する。そのPIO処理において、PIOスクリプトの追加が指示されると、ATAホストハードウェア21は、並行して動作するプロセスの同期を取るためのフラグであるセマフォの獲得処理を行い、そのセマフォを取得すると(セマフォ獲得)、PIOスクリプト追加モード(PIOスクリプト追加)72に移行し、CPU23より供給されるPIOスクリプトをSRAM52に保持させる追加処理を行う。PIOスクリプト追加処理が終了すると、ATAホストハードウェア21は、獲得していたセマフォを返却し(セマフォ返却)、通常モード71に移行し、PIO処理を実行する。   When the data transfer in the through PIO transfer mode is instructed by the CPU 23 (through PIO Start), the ATA host hardware 21 shifts to the normal mode (Normal) 71 of the through PIO transfer mode 63 and based on a PIO script described later. Execute PIO processing. In the PIO processing, when an instruction to add a PIO script is given, the ATA host hardware 21 performs acquisition processing of a semaphore that is a flag for synchronizing processes operating in parallel, and acquires the semaphore ( Semaphore acquisition), PIO script addition mode (PIO script addition) 72 is entered, and an additional process for holding the PIO script supplied from the CPU 23 in the SRAM 52 is performed. When the PIO script addition process ends, the ATA host hardware 21 returns the acquired semaphore (semaphore return), shifts to the normal mode 71, and executes the PIO process.

なお、ATAホストハードウェア21がPIOスクリプト追加モード72に移行し、CPU23より供給されるPIOスクリプトの追加処理を行っている間も、通常モード71において実行中であるPIO処理は続行される。このような場合、PIO処理は途中で中断せずに1つの処理が終了した時点で一時停止される。   Note that while the ATA host hardware 21 shifts to the PIO script addition mode 72 and performs the addition process of the PIO script supplied from the CPU 23, the PIO process being executed in the normal mode 71 is continued. In such a case, the PIO process is paused when one process is completed without being interrupted.

さらに、ATAホストハードウェア21は、通常モード71においてPIO処理を実行中に、例えば読み出し(Read)処理や他のプログラムからの指示により一時停止要求が発生すると(Read Reg値、他プログラムPause)、一時停止モード(Pause)73に移行し、PIO処理を一時停止する。そして、一時停止解除要求が発生すると、ATAホストハードウェア21は、一時停止を解除し(Pause解除)、通常モード71に移行する。   Further, when the ATA host hardware 21 performs a PIO process in the normal mode 71 and a pause request is generated by, for example, a read process or an instruction from another program (Read Reg value, other program Pause), The system shifts to a pause mode (Pause) 73 and pauses PIO processing. When a temporary stop release request is generated, the ATA host hardware 21 releases the temporary stop (pause release), and shifts to the normal mode 71.

通常モード71において、全てのPIO処理が終了すると、ATAホストハードウェア21は、スルーPIOモード63を正常終了し(正常終了)、待機モード62に移行する。   When all the PIO processes are completed in the normal mode 71, the ATA host hardware 21 normally ends the through PIO mode 63 (normal end), and shifts to the standby mode 62.

また、通常モード71または一時停止モード73において、強制終了要求が発生すると(Abort命令)、ATAホストハードウェア21は、強制終了モード(Abort)74に移行し、その要求に基づいて強制終了処理を行ってスルーPIOモード63を異常終了し(異常終了)、待機モード62に移行する。   Further, when a forced termination request is generated in the normal mode 71 or the pause mode 73 (Abort instruction), the ATA host hardware 21 shifts to the forced termination mode (Abort) 74 and performs a forced termination process based on the request. Then, the through PIO mode 63 is abnormally terminated (abnormal termination), and the standby mode 62 is entered.

待機モード62において、CPU23よりIDMA転送モードによるデータ転送が指示されると(IDMA Start)、ATAホストハードウェア21は、IDMA転送モード64の通常モード(Normal)81に移行し、後述するPRDテーブルに基づいたIDMA転送モードによるデータ転送に関する処理であるPRD処理を実行する。そのPRD処理において、PRDテーブルの追加が指示されると、ATAホストハードウェア21は、セマフォの獲得処理を行い、そのセマフォを取得すると(セマフォ獲得)、PRDテーブル追加モード(PRDテーブル追加)82に移行し、CPU23より供給されるPRDテーブルをSRAM52に保持させる追加処理を行う。PRDテーブル追加処理が終了すると、ATAホストハードウェア21は、獲得していたセマフォを返却し(セマフォ返却)、通常モード81に移行し、PRD処理を実行する。   In the standby mode 62, when data transfer in the IDMA transfer mode is instructed by the CPU 23 (IDMA Start), the ATA host hardware 21 shifts to the normal mode (Normal) 81 of the IDMA transfer mode 64, and the PRD table to be described later. A PRD process, which is a process related to data transfer in the IDMA transfer mode based on, is executed. In the PRD process, when an instruction to add a PRD table is given, the ATA host hardware 21 performs a semaphore acquisition process. When the semaphore is acquired (semaphore acquisition), the PRD table addition mode (PRD table addition) 82 is entered. Then, an additional process for holding the PRD table supplied from the CPU 23 in the SRAM 52 is performed. When the PRD table addition process ends, the ATA host hardware 21 returns the acquired semaphore (semaphore return), shifts to the normal mode 81, and executes the PRD process.

なお、ATAホストハードウェア21がPRDテーブル追加モード82に移行し、CPU23より供給されるPRDテーブルの追加処理を行っている間も、通常モード81において実行中であるPRD処理は続行される。このような場合、PRD処理は途中で中断せずに1つの処理が終了した時点で一時停止される。   Note that while the ATA host hardware 21 shifts to the PRD table addition mode 82 and performs the process of adding the PRD table supplied from the CPU 23, the PRD process being executed in the normal mode 81 is continued. In such a case, the PRD process is paused when one process is completed without being interrupted.

さらに、ATAホストハードウェア21は、通常モード81においてPRD処理を実行中に、例えば読み出し(Read)処理や他のプログラムからの指示により一時停止要求が発生すると(Read Reg値、他プログラムPause)、一時停止モード(Pause)83に移行し、PRD処理を一時停止する。そして、一時停止解除要求が発生すると、ATAホストハードウェア21は、一時停止を解除し(Pause解除)、通常モード81に移行する。   Further, during execution of the PRD process in the normal mode 81, the ATA host hardware 21 generates a pause request (Read Reg value, other program Pause), for example, by a read process or an instruction from another program. The process shifts to a pause mode (Pause) 83 to pause the PRD process. When a temporary stop release request is generated, the ATA host hardware 21 releases the temporary stop (pause release) and shifts to the normal mode 81.

通常モード81において、全てのPRD処理が終了すると、ATAホストハードウェア21は、IDMAモード64を正常終了し(正常終了)、待機モード62に移行する。   In the normal mode 81, when all the PRD processes are completed, the ATA host hardware 21 ends the IDMA mode 64 normally (normal end) and shifts to the standby mode 62.

また、通常モード81または一時停止モード83において、強制終了要求が発生すると(Abort命令)、ATAホストハードウェア21は、強制終了モード(Abort)84に移行し、その要求に基づいて強制終了処理を行ってIDMAモード64を異常終了し(異常終了)、待機モード62に移行する。   Further, when a forced termination request is generated in the normal mode 81 or the pause mode 83 (Abort instruction), the ATA host hardware 21 shifts to the forced termination mode (Abort) 84 and performs a forced termination process based on the request. The IDMA mode 64 is abnormally terminated (abnormal termination), and the standby mode 62 is entered.

以上のように、ATAホストハードウェア21は、その処理毎に各モードに移行し、その移行したモードの処理を実行する。また、このようなモードの移行は、ATAホスト31の制御により実行されるが、ATAホスト31は、CPU23より供給される指示に基づいてモードを移行させる。CPU23からのデータ転送に関する指示コマンド、ステータス、データ等は、SRAM52およびレジスタ53に保持される。ATAホストハードウェア21の各部は、このSRAM52およびレジスタ53に保持されている情報に基づいて各種の処理を実行する。   As described above, the ATA host hardware 21 shifts to each mode for each process, and executes the process of the shifted mode. Such mode transition is executed under the control of the ATA host 31. The ATA host 31 shifts the mode based on an instruction supplied from the CPU 23. An instruction command, status, data, and the like related to data transfer from the CPU 23 are held in the SRAM 52 and the register 53. Each unit of the ATA host hardware 21 executes various processes based on the information held in the SRAM 52 and the register 53.

図8は、SRAM52およびレジスタ53に保持されるデータの構成例を示す図である。SRAM52およびレジスタ53は、実際には、1つのRAM(Random Access Memory)として構成され、そのRAMの記憶領域の一部として構成されるので、以下においては、SRAM52およびレジスタを図示せぬRAMの互いに異なる領域として説明する。   FIG. 8 is a diagram illustrating a configuration example of data held in the SRAM 52 and the register 53. Since the SRAM 52 and the register 53 are actually configured as one RAM (Random Access Memory) and configured as a part of the storage area of the RAM, in the following, the SRAM 52 and the register are not connected to each other in the RAM (not shown). This will be described as a different area.

図8に示されるように、SRAM52は、アドレス0x0000乃至0x007Fの128バイトの領域101、アドレス0x0080乃至0x009Fの32バイトの領域102、アドレス0x00A0乃至0x00BFの32バイトの領域103、アドレス0x00C0乃至0x00DFの32バイトの領域104、アドレス0x00EO乃至0x00FFの32バイトの領域105、アドレス0x0100乃至0x01FFの256バイトの領域106、および、アドレス0x0200乃至0x03FFの512バイトの領域107により構成される。   As shown in FIG. 8, the SRAM 52 includes a 128-byte area 101 at addresses 0x0000 to 0x007F, a 32-byte area 102 at addresses 0x0080 to 0x009F, a 32-byte area 103 at addresses 0x00A0 to 0x00BF, and 32 at addresses 0x00C0 to 0x00DF. A byte area 104, a 32-byte area 105 having addresses 0x00EO to 0x00FF, a 256-byte area 106 having addresses 0x0100 to 0x01FF, and a 512-byte area 107 having addresses 0x0200 to 0x03FF are included.

領域101には、4バイトのスルーPIO用のPIOスクリプトであるスルーPIOスクリプトが32個記述される。また、領域102には、4バイトのPIO CPU割り込み要因発生条件が8個、または、4バイトの読み出し繰り返し/IfGoto条件のテーブルが8個記述される。さらに、領域103には、4バイトの読み出し繰り返し/IfGoto条件のテーブルが2個記述される。   In the area 101, 32 through PIO scripts, which are PIO scripts for 4-byte through PIO, are described. In the area 102, eight 4-byte PIO CPU interrupt factor generation conditions or eight 4-byte read repetition / IfGoto condition tables are described. Further, in the area 103, two 4 byte read repetition / IfGoto condition tables are described.

領域104は、User足し算レジスタとして構成され、4バイトの演算結果が2個保持される。領域105は、IDMA用のPRDテーブルまたはSDRAMアドレス追加設定テーブルが記述される領域106の拡張領域である。領域107には、IDMA用のPIOスクリプトが記述される。   The area 104 is configured as a User addition register and holds two 4-byte calculation results. The area 105 is an extension area of the area 106 in which the IDMA PRD table or the SDRAM address additional setting table is described. In the area 107, a PIO script for IDMA is described.

また、レジスタ53は、アドレス0x0400乃至0x043Fの128バイトの領域111、アドレス0x0440乃至0x047Fの16バイトの領域112、アドレス0x0480乃至0x04BFの16バイトの領域113、および、アドレス0x04C0乃至0x04FFの16バイトの領域114により構成される。   The register 53 includes a 128-byte area 111 at addresses 0x0400 to 0x043F, a 16-byte area 112 at addresses 0x0440 to 0x047F, a 16-byte area 113 at addresses 0x0480 to 0x04BF, and a 16-byte area at addresses 0x04C0 to 0x04FF. 114.

領域111には、ATA全体に関わる設定情報が記述され、領域112には、スルーPIO転送モードに関わる設定情報が記述され、領域113には、IDMA転送モードに関わる設定情報が記述される。領域114は、予備(Reserved)の領域である。   Setting information related to the entire ATA is described in the area 111, setting information related to the through PIO transfer mode is described in the area 112, and setting information related to the IDMA transfer mode is described in the area 113. An area 114 is a reserved area.

図9は、領域101に記述されるスルーPIOスクリプトの構成例を示す図である。   FIG. 9 is a diagram illustrating a configuration example of the through PIO script described in the area 101.

図9において、ビット番号31の完了フラグ(CPT)121は、処理の完了を示すフラグであり、テーブル書き込み時に「0」がセットされ、処理完了時に「1」がセットされる。ATAホスト31は、Readコマンド発行後にこのフラグを読み込み、値が「1」の場合、後述するATAレジスタ値128に記述されるReadコマンド結果が有効とする。ビット番号30乃至28のCPU割込条件122には、別テーブルに書いているPIO CPU割り込み要因発生条件のうちどの条件を使うかを決定する情報が記述される。   In FIG. 9, a completion flag (CPT) 121 of bit number 31 is a flag indicating the completion of processing. “0” is set when writing to the table, and “1” is set when processing is completed. The ATA host 31 reads this flag after issuing the Read command. When the value is “1”, the Read command result described in the ATA register value 128 described later is valid. In the CPU interrupt condition 122 of bit numbers 30 to 28, information for determining which condition to use among the PIO CPU interrupt factor generation conditions written in another table is described.

ビット番号27乃至24の読み出し繰り返し条件(Rd繰返し条件)123には、別テーブルに書いている読み出し繰り返し条件のうちどの条件を使うかを決定する情報が記述される。なお、この設定は、読み出しの場合のみ有効であり、書き込み時は無効である。ビット番号23のタイムウェイト(TW)124は、処理を一時停止するか否かを示すフラグであり、一時停止せずに処理が開始されるようにする場合、値が「0」に設定され、処理が一時停止され、設定されたウェイト時間待機した後、処理が開始されるようにする場合、値が「1」に設定される。   In the read repetition condition (Rd repetition condition) 123 of bit numbers 27 to 24, information for determining which of the read repetition conditions written in another table is used is described. This setting is valid only for reading and invalid for writing. The time weight (TW) 124 of bit number 23 is a flag indicating whether or not the process is temporarily stopped. When the process is started without being temporarily stopped, the value is set to “0”. When the process is paused and the process is started after waiting for the set wait time, the value is set to “1”.

ビット番号22のINTRQウェイト(IW)125は、ドライブ22より供給されるCPUの割り込み要求を示すINTRQ信号が供給されるまで処理を一時停止するか否かを示すフラグであり、INTRQ信号を待たずに処理が開始されるようにする場合、値が「0」に設定され、処理が一時停止され、INTRQ信号を待ってから処理が開始されるようにする場合、値が「1」に設定される。ビット番号21のライト/リード設定(RXW)126は、書き込み処理を実行するか読み出し処理を実行するかを設定するフラグであり、ドライブ22の記録媒体の記録領域(以下、ATAレジスタと称する)の情報を読み出す読み出し処理を実行するように設定する場合、この値が「0」に設定され、ATAレジスタに情報を書き込む書き込み処理を実行するように設定する場合、この値が「1」に設定される。   An INTRQ wait (IW) 125 of bit number 22 is a flag indicating whether or not processing is temporarily stopped until an INTRQ signal indicating a CPU interrupt request supplied from the drive 22 is supplied, and does not wait for the INTRQ signal. When processing is started, the value is set to “0”. When processing is paused and processing is started after waiting for the INTRQ signal, the value is set to “1”. The A write / read setting (RXW) 126 of bit number 21 is a flag for setting whether to execute a writing process or a reading process, and is a recording area (hereinafter referred to as an ATA register) of a recording medium of the drive 22. This value is set to “0” when it is set to execute a read process for reading information, and this value is set to “1” when it is set to execute a write process for writing information to the ATA register. The

ビット番号20乃至16のATAアドレス(ATA Address)127には、読み書きするATAレジスタのアドレスが記述される。ビット番号20にはチップセレクト信号CS1の値が記述され、ビット番号19にはチップセレクト信号CS0の値が記述され、ビット番号18にはデバイスアドレス信号DA2の値が記述され、ビット番号17にはデバイスアドレス信号DA1の値が記述され、ビット番号16にはデバイスアドレス信号DA0の値が記述される。なお、特別なモードの時に、このATAアドレス127の値が「0」である場合、ATAレジスタの読み書きは行われない。また、このATAアドレス127の値が「0」であり、読み書きさせるデータの値として「0x0001」が指定された場合、ATAホストハードウェア21は、PIO一時停止モードに移行し、このATAアドレス127の値が「0」であり、読み書きさせるデータの値として「0x0FFF」が指定された場合、スルーPIO転送モードの終了を示す(EOF)。   The ATA address 127 of bit numbers 20 to 16 describes the address of the ATA register to be read / written. Bit number 20 describes the value of chip select signal CS1, bit number 19 describes the value of chip select signal CS0, bit number 18 describes the value of device address signal DA2, and bit number 17 A value of the device address signal DA1 is described, and a bit number 16 describes the value of the device address signal DA0. In the special mode, if the value of the ATA address 127 is “0”, the ATA register is not read or written. When the value of the ATA address 127 is “0” and “0x0001” is designated as the value of data to be read / written, the ATA host hardware 21 shifts to the PIO pause mode, and the ATA address 127 When the value is “0” and “0x0FFF” is designated as the value of the data to be read / written, this indicates the end of the through PIO transfer mode (EOF).

ビット番号15乃至0のATAレジスタ値128は、ATAレジスタに書き込む内容やATAレジスタより読み出した内容が記述される。なお、データレジスタの内容についてのみ16ビットが使用され、その他のレジスタに関する情報の場合、8ビットのみが有効になる。   The ATA register value 128 of bit numbers 15 to 0 describes the contents written to the ATA register and the contents read from the ATA register. Note that 16 bits are used only for the contents of the data register, and for information relating to other registers, only 8 bits are valid.

以上のようなスクリプトを、CPU23がSRAM52の領域101に保持させ、スルーPIOスタートを指示すると、ATAホストハードウェア21は、そのSRAM52のスクリプト手順どおりにPIO転送モードによるデータ転送処理を実行し、ドライブ22のATAレジスタにデータを読み書きする。   When the CPU 23 holds the script as described above in the area 52 of the SRAM 52 and instructs the through PIO start, the ATA host hardware 21 executes the data transfer process in the PIO transfer mode according to the script procedure of the SRAM 52, and the drive Read / write data to / from 22 ATA registers.

図10は、領域102に記述されるPIO CPU割り込み要因発生条件の構成例を示す図である。   FIG. 10 is a diagram illustrating a configuration example of the PIO CPU interrupt factor generation condition described in the area 102.

PIO CPU割り込み要因発生条件102のビット番号31乃至21のリザーブ(RSV)131は予備領域であり、通常使用されない。以下において、リザーブ(予備領域)についてはその説明を省略する。   The reserve (RSV) 131 of bit numbers 31 to 21 of the PIO CPU interrupt factor generation condition 102 is a reserved area and is not normally used. In the following, description of the reserve (preliminary area) is omitted.

ビット番号20のINTRQ設定132は、CPU23からのINTRQ信号を割り込み要因にするか否かを指示する設定情報であり、この値が「1」の場合、PIO CPU割り込み要因がセットされ、この値が「0」の場合、INTRQ信号は無視される。ビット番号16のアンド/オア設定134は、PIO CPU割り込み条件有効ビット設定135において複数のビットが有効である場合、それらの割り込み要因発生条件の論理積(アンド)を割り込み要因発生条件とするか、論理和(オア)を割り込み要因発生条件とするかを指定する設定情報である。   The INTRQ setting 132 of bit number 20 is setting information for instructing whether or not to use the INTRQ signal from the CPU 23 as an interrupt factor. When this value is “1”, the PIO CPU interrupt factor is set, and this value is When “0”, the INTRQ signal is ignored. In the AND / OR setting 134 of bit number 16, when a plurality of bits are valid in the PIO CPU interrupt condition valid bit setting 135, the AND (OR) of these interrupt factor generation conditions is used as an interrupt factor generation condition. This is setting information that specifies whether a logical sum (OR) is used as an interrupt factor generation condition.

ビット番号15乃至8のPIO CPU割り込み条件有効ビット設定135は、PIO Readコマンドに対する応答として保持されたレジスタ値の内、下位8ビットのどのビットをPIO CPU割り込み要因発生条件に使用するかを指定する設定情報である。ビット番号7乃至0のPIO CPU割り込み条件値136は、PIO Readコマンドに対する応答として保持されたレジスタ値の内、PIO CPU割り込み条件有効ビット設定135で有効なビットがどの値の時にPIO CPU割り込み要因を発生させるかを指定する設定情報である。   The PIO CPU interrupt condition valid bit setting 135 of bit numbers 15 to 8 designates which of the lower 8 bits of the register value held as a response to the PIO Read command is used as a PIO CPU interrupt factor generation condition. Setting information. The PIO CPU interrupt condition value 136 of bit numbers 7 to 0 indicates the PIO CPU interrupt factor when the valid bit in the PIO CPU interrupt condition valid bit setting 135 is among the register values held in response to the PIO Read command. This is setting information that specifies whether or not to generate.

すなわち、領域102には、領域101に記述されるスルーPIOスクリプトのビット番号30乃至28のCPU割込条件122で指定されるCPU割込み条件の設定内容が記述される。この設定は、複数記述され、CPU割込条件122により、どの設定をCPU割り込み要因発生条件として使用するかの指定が行われる。例えば、INTRQ信号を割り込み要因にせずに、ステータスレジスタのBUSYビットとDRQビットの値がともに「0」であり、かつ、ERRビットの値が「1」のとき、割り込み要因として設定する場合、ATAホスト31は、ステータスレジスタにおいてBUSYビットのビット番号が7であり、DRQビットのビット番号が3であり、ERRビットのビット番号が0であるので、このPIO CPU割込み要因発生条件の値を「+0x00018901」と設定する。   In other words, the setting contents of the CPU interrupt condition specified by the CPU interrupt condition 122 of bit numbers 30 to 28 of the through PIO script described in the area 101 are described in the area 102. A plurality of these settings are described, and the CPU interrupt condition 122 specifies which setting is used as the CPU interrupt factor generation condition. For example, if the INTRQ signal is not used as an interrupt factor and the BUSY and DRQ bits in the status register are both “0” and the ERR bit is “1”, the ATA In the status register, since the bit number of the BUSY bit is 7, the bit number of the DRQ bit is 3, and the bit number of the ERR bit is 0, the host 31 sets the value of this PIO CPU interrupt factor generation condition to “+ Set to "0x00018901".

図11は、領域102に記述される読み出し繰り返し/IfGoto条件のテーブルの構成例を示す図である。   FIG. 11 is a diagram illustrating a configuration example of a read repetition / IfGoto condition table described in the area 102.

ビット番号16のアンド/オア設定142は、読み出し繰り返し/IfGoto条件有効ビット設定143において複数のビットが有効である場合、それらの条件の論理積(アンド)を読み出し繰り返し/IfGoto条件とするか、論理和(オア)を読み出し繰り返し/IfGoto条件とするかを指定する設定情報である。   In the AND / OR setting 142 of the bit number 16, when a plurality of bits are valid in the read repetition / IfGoto condition valid bit setting 143, the logical product (AND) of these conditions is set as the read repetition / IfGoto condition, This is setting information for designating whether the sum (or) is read and repeated / ifGoto condition.

ビット番号15乃至8の読み出し繰り返し/IfGoto条件有効ビット設定143は、PIO Readコマンドに対する応答として保持されたレジスタ値の内、下位8ビットのどのビットを読み出し繰り返し/IfGoto条件に使用するかを指定する設定情報である。ビット番号7乃至0の読み出し繰り返し/IfGoto条件値144は、PIO Readコマンドに対する応答として保持されたレジスタ値の内、読み出し繰り返し/IfGoto条件有効ビット設定143で有効なビットがどの値の時にPIO Readコマンドの繰り返しを実行させるか、またはIfGotoコマンドを実行させるかを指定する設定情報である。   The read repetition / IfGoto condition valid bit setting 143 of bit numbers 15 to 8 designates which of the lower 8 bits of the register value held as a response to the PIO Read command is used for the read repetition / IfGoto condition. Setting information. The read repetition / IfGoto condition value 144 of bit numbers 7 to 0 is the PIO Read command when the valid bits in the read repetition / IfGoto condition valid bit setting 143 are among the register values held in response to the PIO Read command. Is setting information for specifying whether to repeat the process or to execute the IfGoto command.

すなわち、領域102には、領域101に記述されるスルーPIOスクリプトのビット番号27乃至24の読み出し繰り返し条件123で指定されるReedコマンドの繰り返し条件の設定内容、または、後述するIDMA PIOスクリプトの2行目(+4バイト)のビット番号23乃至20のIfGoto条件200で指定されるIfGotoコマンドの実行条件の設定内容が記述される。この設定は、複数記述され、読み出し繰り返し条件123またはIfGoto条件200により、どの設定を条件として使用するかの指定が行われる。例えば、このPIO 読み出し繰り返し/IfGoto条件のテーブルの値が「+0x00000000」である場合、Readコマンドが繰り返しされない。また、例えば、この読み出し繰り返し/IfGoto条件のテーブルの値が「+0x00008888」である場合、繰り返しステータスレジスタにおいてBUSYビットのビット番号が7であり、DRQビットのビット番号が3であるので、繰り返しステータスレジスタのBUSYビットの値が「0」となり、かつ、DRQビットの値が「0」となるまで空読みを繰り返す。   That is, in the area 102, the setting contents of the repetition condition of the Reed command specified by the read repetition condition 123 of the bit numbers 27 to 24 of the through PIO script described in the area 101, or two lines of the IDMA PIO script described later The setting contents of the execution condition of the IfGoto command designated by the IfGoto condition 200 of the bit numbers 23 to 20 of the eye (+4 bytes) are described. A plurality of these settings are described, and which setting is used as a condition is specified by the read repetition condition 123 or the IfGoto condition 200. For example, when the value of the PIO read repetition / IfGoto condition table is “+ 0x00000000”, the Read command is not repeated. Also, for example, when the value of this read repetition / IfGoto condition table is “+ 0x00008888”, since the bit number of the BUSY bit is 7 and the bit number of the DRQ bit is 3 in the repetition status register, the repetition status The idle reading is repeated until the BUSY bit value of the register becomes “0” and the DRQ bit value becomes “0”.

なお、領域102は、PIO CPU割り込み要因発生条件と読み出し繰り返し/IfGoto条件のテーブルにより共有され、これらの内、いずれか一方が記述される。また、読み出し繰り返し/IfGoto条件のテーブルは、領域103にも記述される。   The area 102 is shared by the PIO CPU interrupt factor generation condition and the read repetition / IfGoto condition table, and any one of these is described. A table of read repetition / IfGoto conditions is also described in the area 103.

図12は、領域104に構成されるユーザ足し算レジスタの構成例を示す図である。   FIG. 12 is a diagram illustrating a configuration example of the user addition register configured in the area 104.

ビット番号31乃至0のユーザ足し算値(User足し算値)151は、IDMA転送モード時においてエラーレートの計算等に用いられるレジスタであり、後述するIDMA PIOスクリプトの設定でこのUser足し算値151が指定されていると、PIO読み出し値がこのUser足し算値151に格納されている値に足しこまれ、その演算結果がUser足し算値151に格納される。このUser足し算値151の値は、Writeコマンド時に初期値がセットされる。   A user addition value (User addition value) 151 of bit numbers 31 to 0 is a register used for calculating an error rate in the IDMA transfer mode, and this User addition value 151 is specified by setting an IDMA PIO script described later. The PIO read value is added to the value stored in the User addition value 151, and the calculation result is stored in the User addition value 151. An initial value is set as the value of the User addition value 151 at the time of the Write command.

図13は、領域105および領域106に構成されるIDMA用のPRDテーブルの構成例を示す図である。   FIG. 13 is a diagram illustrating a configuration example of a PRD table for IDMA configured in the area 105 and the area 106.

図13において、1行目(+0バイト)のビット番号31の完了フラグ(CPT)161は、処理の完了を示すフラグであり、テーブル書き込み時に「0」がセットされ、処理完了時に「1」がセットされる。ATAホスト31は、Readコマンド発行後にこのフラグを読み込み、値が「1」の場合、そのPRDテーブルに対応するIDMA処理が終了したと判定する。1行目(+0バイト)のビット番号28のNo Data Transfer(NDT)162は、DMA転送を制御するフラグであり、このフラグの値が「1」である場合、DMA処理は実行されない。なお、その場合も、PIO処理は実行される。   In FIG. 13, a completion flag (CPT) 161 of bit number 31 in the first row (+0 byte) is a flag indicating the completion of processing. “0” is set when writing to the table, and “1” is set when processing is completed. Set. The ATA host 31 reads this flag after issuing the Read command. If the value is “1”, the ATA host 31 determines that the IDMA processing corresponding to the PRD table is completed. No Data Transfer (NDT) 162 of bit number 28 in the first row (+0 byte) is a flag for controlling DMA transfer. When the value of this flag is “1”, DMA processing is not executed. In this case also, the PIO process is executed.

1行目(+0バイト)のビット番号27乃至0のSDRAM0開始アドレス(SDRAM 0 Start Address)163、および3行目(+8バイト)のビット番号27乃至0のSDRAM1開始アドレス(SDRAM 1 Start Address)167には、IDMA転送モードにおける処理においてATAホストハードウェア21がアクセスするSDRAMの開始アドレスが格納される。SDRAM0の設定に基づいてアクセスが行われた後、SDRAM1の設定に基づいたアクセスが行われる。2行目(+4バイト)のビット番号27乃至0のSDRAM0レングス(SDRAM 0 Length)166には、IDMAがアクセスするSDRAM0の長さの設定が格納される。   SDRAM 0 start address (SDRAM 0 Start Address) 163 with bit numbers 27 to 0 in the first row (+0 byte), and SDRAM 1 start address (SDRAM 1 Start Address) 167 with bit numbers 27 to 0 in the third row (+8 bytes) Stores the start address of the SDRAM accessed by the ATA host hardware 21 in the process in the IDMA transfer mode. After an access is made based on the setting of SDRAM0, an access is made based on the setting of SDRAM1. The SDRAM 0 length (SDRAM 0 Length) 166 with bit numbers 27 to 0 in the second row (+4 bytes) stores the setting of the length of SDRAM 0 accessed by the IDMA.

2行目(+4バイト)のビット番号31の処理フラグ(Exe)164は、その値により、現在処理中であるか否かを示す。この処理フラグ164は、異常終了した際に、何の処理を行っていたかを判別するためのフラグである。2行目(+4バイト)のビット番号28のコンティニュー(CTN)165は、SDRAMアドレスの設定が3アドレス以上続くか(追加のSDRAMのアドレスが存在するか)否かの設定に関する情報が格納される。例えば、このコンティニュー165の値が「0」である場合、追加のSDRAMのアドレスが存在せず、値が「1」である場合、追加のSDRAMのアドレスが存在する。   The processing flag (Exe) 164 of bit number 31 in the second row (+4 bytes) indicates whether or not processing is currently being performed. The processing flag 164 is a flag for determining what processing is being performed when the processing ends abnormally. The continuation (CTN) 165 of bit number 28 in the second row (+4 bytes) stores information relating to whether or not the SDRAM address setting continues for three or more addresses (there is an additional SDRAM address). . For example, when the value of the continue 165 is “0”, there is no additional SDRAM address, and when the value is “1”, there is an additional SDRAM address.

5行目(+16バイト)のビット番号31乃至0のデバイススタートLBA168(デバイスStartLBA)は、ドライブ22にアクセスする際の開始LBAの情報が格納される。6行目(+20バイト)のビット番号31乃至0のデバイスセクタレングス169(デバイスセクタLength)は、ドライブ22にアクセスする長さをセクタ数で指定する情報が格納される。拡張PRDテーブルの設定が無効の場合、デバイスセクタレングス169の値が「0」のときはこのPRDテーブルがEORであることを示す。拡張PRDテーブルの設定が有効の場合、EOFの設定に従う。   Device start LBA 168 (device Start LBA) of bit numbers 31 to 0 in the fifth line (+16 bytes) stores information of the start LBA when accessing the drive 22. Device sector length 169 (device sector Length) of bit numbers 31 to 0 in the sixth line (+20 bytes) stores information specifying the length of access to drive 22 by the number of sectors. When the setting of the extended PRD table is invalid, when the value of the device sector length 169 is “0”, this indicates that this PRD table is EOR. If the extended PRD table setting is enabled, follow the EOF setting.

7行目(+24バイト)ビット番号26のテーブルタイプ(TBL Type)171は、領域106に格納されている情報の種類を示すフラグである。例えば、値が「0」のときは、通常のPRDテーブルが格納されていることを示し、値が「1」のときは、SDRAMアドレス追加設定用テーブルが格納されていることを示す。7行目(+24バイト)ビット番号25のピックアップ選択フラグ(OP)172は、後述するように、ドライブ22のピックアップが複数ある場合にそのピックアップを指定する情報が格納される。   The table type (TBL Type) 171 of the seventh line (+24 bytes) bit number 26 is a flag indicating the type of information stored in the area 106. For example, a value of “0” indicates that a normal PRD table is stored, and a value of “1” indicates that an SDRAM address additional setting table is stored. The pickup selection flag (OP) 172 of the seventh line (+24 bytes) bit number 25 stores information specifying the pickup when there are a plurality of pickups of the drive 22, as will be described later.

7行目(+24バイト)ビット番号24のライト/リード設定(RXW)173は、DMA処理において、書き込み処理を実行するか読み出し処理を実行するかを設定するフラグであり、ATAレジスタの情報を読み出す読み出し処理を実行するように設定する場合、この値が「0」に設定され、ATAレジスタに情報を書き込む書き込み処理を実行するように設定する場合、この値が「1」に設定される。   The 7th line (+24 bytes) bit number 24 write / read setting (RXW) 173 is a flag for setting whether to execute write processing or read processing in DMA processing, and reads information in the ATA register. When setting to execute read processing, this value is set to “0”, and when setting to execute write processing for writing information to the ATA register, this value is set to “1”.

7行目(+24バイト)ビット番号5乃至0のDMA実行コマンド用PIOスクリプト番号(DMA ExeコマンドPIOスクリプトNo.)174、8行目(+28バイト)ビット番号29乃至24の単一DMA終了ステータスリード用PIOスクリプト番号(Mono DMA 終了Status Read PIOスクリプトNo.)175、8行目(+28バイト)ビット番号21乃至16の単一DMAコマンド発行用PIOスクリプト番号(Mono DMA コマンド発行 PIOスクリプトNo.)176、8行目(+28バイト)ビット番号13乃至8のPRD終了処理用PIOスクリプト番号(PRD終了処理 PIOスクリプトNo.)177、8行目(+28バイト)ビット番号5乃至0のPRD開始処理用PIOスクリプト番号(PRD開始処理 PIOスクリプトNo.)178には、IDMA転送モードにおいて、それぞれのフェーズで実行されるPIOスクリプトの開始番号が格納されている。   7th line (+24 bytes) DMA execution command PIO script number (DMA Exe command PIO script No.) 174 for bit numbers 5 to 0, 8th line (+28 bytes) single DMA end status read for bit numbers 29 to 24 PIO script number (Mono DMA end status Read PIO script number) 175, 8th line (+28 bytes) PIO script number for issuing a single DMA command with bit numbers 21 to 16 (Mono DMA command issuing PIO script number) 176 , 8th line (+28 bytes) PIO script number for PRD end process of bit numbers 13 to 8 (PRD end process PIO script No.) 177, 8th line (+28 bytes) PIO start process PIO of bit numbers 5 to 0 The script number (PRD start processing PIO script No.) 178 shows the start number of the PIO script executed in each phase in the IDMA transfer mode. There has been stored.

図14は、領域106に構成されるIDMA用のSDRAMアドレス追加設定テーブルの構成例を示す図である。   FIG. 14 is a diagram illustrating a configuration example of an SDRAM address addition setting table for IDMA configured in the area 106.

図14において、1行目(+0バイト)のビット番号27乃至0のSDRAM1開始アドレス(SDRAM 1 Start Address)181、3行目(+8バイト)のビット番号27乃至0のSDRAM2開始アドレス(SDRAM 2 Start Address)183、および、5行目(+16バイト)のビット番号27乃至0のSDRAM3開始アドレス(SDRAM 3 Start Address)185には、IDMA転送モードにおける処理においてATAホストハードウェア21がアクセスするSDRAMの開始アドレスが格納される。SDRAM0の設定に基づいてアクセスが行われた後、SDRAM1の設定に基づいたアクセスが行われる。2行目(+4バイト)のビット番号27乃至0のSDRAM1レングス(SDRAM 1 Length)182、および、4行目(+12バイト)のビット番号27乃至0のSDRAM2レングス(SDRAM 2 Length)184には、IDMAがアクセスするSDRAMの長さの設定が格納される。   In FIG. 14, SDRAM 1 start address (SDRAM 1 Start Address) 181 with bit number 27 to 0 in the first row (+0 byte), SDRAM 2 start address (SDRAM 2 Start with bit number 27 to 0 in the third row (+8 byte)) Address) 183, and SDRAM 3 start address (SDRAM 3 Start Address) 185 of bit numbers 27 to 0 in the fifth line (+16 bytes) are the start of SDRAM accessed by ATA host hardware 21 in the process in the IDMA transfer mode. Stores the address. After an access is made based on the setting of SDRAM0, an access is made based on the setting of SDRAM1. The SDRAM 1 length (SDRAM 1 Length) 182 with bit numbers 27 to 0 in the second row (+4 bytes) and the SDRAM 2 length (SDRAM 2 Length) 184 with bit numbers 27 to 0 in the fourth row (+12 bytes) are: Stores the setting of the length of SDRAM accessed by IDMA.

2行目(+4バイト)のビット番号31の処理フラグ(Exe)164は、その値により、現在処理中であるか否かを示す。この処理フラグ164は、異常終了した際に、何の処理を行っていたかを判別するためのフラグである。2行目(+4バイト)のビット番号28のコンティニュー(CTN)165は、SDRAMアドレスの設定が3アドレス以上続くか(追加のSDRAMのアドレスが存在するか)否かの設定に関する情報が格納される。例えば、このコンティニュー165の値が「0」である場合、追加のSDRAMのアドレスが存在せず、値が「1」である場合、追加のSDRAMのアドレスが存在する。   The processing flag (Exe) 164 of bit number 31 in the second row (+4 bytes) indicates whether or not processing is currently being performed. The processing flag 164 is a flag for determining what processing is being performed when the processing ends abnormally. The continuation (CTN) 165 of bit number 28 in the second row (+4 bytes) stores information relating to whether or not the SDRAM address setting continues for three or more addresses (there is an additional SDRAM address). . For example, when the value of the continue 165 is “0”, there is no additional SDRAM address, and when the value is “1”, there is an additional SDRAM address.

6行目(+20バイト)のビット番号31のノットEOF(NEOF)186は、ハードウェアがEOFと認識しないようにする情報が格納される。すなわち、ノットEOF186には、固定値「1」が格納される。7行目(+24バイト)ビット番号26のテーブルタイプ(TBL Type)187は、図13のテーブルタイプ171と同様であるのでその説明を省略する。図14の場合、SDRAMアドレス追加設定用テーブルであるので、値「1」が格納される。   The knot EOF (NEOF) 186 of bit number 31 in the sixth line (+20 bytes) stores information that prevents the hardware from recognizing EOF. That is, the knot EOF 186 stores a fixed value “1”. The table type (TBL Type) 187 of the seventh line (+24 bytes) bit number 26 is the same as the table type 171 of FIG. In the case of FIG. 14, since the table is an SDRAM address additional setting table, the value “1” is stored.

なお、図13において説明したコンティニュー165の値が「1」である場合、その次のテーブルは、必ず、図14のSDRAMアドレス追加設定用テーブルが格納される。   When the value of the continue 165 described with reference to FIG. 13 is “1”, the next table always stores the SDRAM address additional setting table shown in FIG.

なお、領域106は、IDMA用のPRDテーブル(テーブル番号8のPRDテーブル)とSDRAMアドレス追加設定用テーブルにより共有される。   The area 106 is shared by the IDMA PRD table (table number 8 PRD table) and the SDRAM address additional setting table.

図15は、領域107に構成されるIDMA用のPIOスクリプトの構成例を示す図である。   FIG. 15 is a diagram illustrating a configuration example of a PIO script for IDMA configured in the area 107.

図15において、1行目(+0バイト)のビット番号30乃至0の構成は、図9を参照して説明したスルーPIOスクリプトの場合と同様であるのでその説明を省略する。すなわち、1行目において、ビット番号30乃至28のCPU割込条件192はCPU割込条件122に対応し、ビット番号27乃至24の読み出し繰り返し条件(Rd繰返し条件)193は読み出し繰り返し条件123に対応し、ビット番号23のタイムウェイト(TW)194はタイムウェイト124に対応し、ビット番号22のINTRQウェイト(IW)195はINTRQウェイト125に対応し、ビット番号21のライト/リード設定(RW)196はライト/リード設定126に対応し、ビット番号20乃至16のATAアドレス(Address)197はATAアドレス127に対応し、ビット番号15乃至0のATAレジスタ値198はATAレジスタ値128に対応する。   In FIG. 15, the configuration of bit numbers 30 to 0 in the first line (+0 byte) is the same as that of the through PIO script described with reference to FIG. That is, in the first line, the CPU interrupt condition 192 of bit numbers 30 to 28 corresponds to the CPU interrupt condition 122, and the read repetition condition (Rd repetition condition) 193 of bit numbers 27 to 24 corresponds to the read repetition condition 123. The time wait (TW) 194 of bit number 23 corresponds to the time weight 124, the INTRQ wait (IW) 195 of bit number 22 corresponds to the INTRQ wait 125, and the write / read setting (RW) 196 of bit number 21 Corresponds to the write / read setting 126, the ATA address (197) of bit numbers 20 to 16 corresponds to the ATA address 127, and the ATA register value 198 of bit numbers 15 to 0 corresponds to the ATA register value 128.

なお、図15の場合、1行目(+0バイト)のビット番号31には、EOF191が格納され、このビットの値が「1」であるとき、このスクリプトの実行終了後に1ブロックのPIOスクリプト制御処理が終了される。ただし、IfGoto条件により他のスクリプトに処理が移る場合は、このEOF191の値は無視される。   In the case of FIG. 15, EOF 191 is stored in the bit number 31 of the first row (+0 byte), and when the value of this bit is “1”, one block of PIO script control is executed after the execution of this script is completed. Processing is terminated. However, when the process moves to another script due to the IfGoto condition, the value of this EOF 191 is ignored.

2行目(+4バイト)のビット番号29乃至24のIfGotoジャンプ先スクリプト番号(IfGoto Jump先 Scr No.)199には、各種の状態がIfGoto条件に合致する場合のジャンプ先のスクリプト番号が格納される。2行目(+4バイト)のビット番号23乃至20のIfGoto条件番号(IfGoto条件No.)200には、そのIfGoto条件として使用される条件テーブルの番号が格納される。   IfGoto jump destination script number (IfGoto Jump destination Scr No.) 199 of bit numbers 29 to 24 in the second row (+4 bytes) stores the script number of the jump destination when various states match the IfGoto condition. The The IfGoto condition number (IfGoto condition No.) 200 of bit numbers 23 to 20 in the second row (+4 bytes) stores the number of the condition table used as the IfGoto condition.

2行目(+4バイト)のビット番号19乃至16のリードデータ足し算レジスタ(Rd Data足し算Reg)201は、エラーレート等を内部レジスタに足し算していく場合に。どのレジスタに値を足すかの設定が格納される。例えば、このレジスタの値が「0」乃至「7」である場合、ATAホスト31は、その番号の、領域104に格納されるユーザ足し算レジスタにリードした値を足す。また、例えば、このレジスタの値が「8」である場合、ATAホスト31は、足し算を行わず、レジスタの値が「9」乃至「15」である場合は、リザーブする。   The read data addition register (Rd Data addition Reg) 201 of bit numbers 19 to 16 in the second row (+4 bytes) is used when an error rate or the like is added to an internal register. The setting of which register is added to the value is stored. For example, when the value of this register is “0” to “7”, the ATA host 31 adds the read value to the user addition register stored in the area 104 of that number. For example, when the value of this register is “8”, the ATA host 31 does not perform addition, and when the value of the register is “9” to “15”, it reserves.

2行目(+4バイト)のビット番号11乃至8のLBA,Tag代入モード202は、ATAホストハードウェア21のATAインタフェース処理部36がドライブ22のATAレジスタに書き込みを行う際に、ATAレジスタ値を、IDMA制御部37が自動的に発生させたLBA値またはTag値に置き換えてATAレジスタに書き込むように指定する情報である。例えば、ATAインタフェース処理部36は、この値が「0」である場合代入を行わず、値が「1」である場合ATAレジスタ値のビット番号7乃至3にTag値を代入する。また、ATAインタフェース処理部36は、値が「2」である場合、ATAレジスタ値のビット番号7乃至0にLBA値のビット番号「7」乃至「0」の値を代入し、値が「3」である場合、ATAレジスタ値のビット番号7乃至0にLBA値のビット番号「15」乃至「8」の値を代入し、値が「4」である場合、ATAレジスタ値のビット番号7乃至0にLBA値のビット番号「23」乃至「16」の値を代入し、値が「5」である場合、ATAレジスタ値のビット番号3乃至0にLBA値のビット番号「27」乃至「24」の値を代入し、値が「6」である場合、ATAレジスタ値のビット番号7乃至0にLBA値のビット番号「31」乃至「24」の値を代入し、値が「7」である場合、ATAレジスタ値のビット番号15乃至0にLBA値のビット番号「15」乃至「0」の値を代入し、値が「8」である場合、ATAレジスタ値のビット番号15乃至0にLBA値のビット番号「31」乃至「16」の値を代入し、値が「9」乃至「15」である場合リザーブする。   The LBA and Tag substitution mode 202 of the bit numbers 11 to 8 in the second line (+4 bytes) is used to change the ATA register value when the ATA interface processing unit 36 of the ATA host hardware 21 writes to the ATA register of the drive 22. , Information specifying that the IDMA control unit 37 writes to the ATA register in place of the LBA value or Tag value automatically generated. For example, the ATA interface processing unit 36 does not substitute if this value is “0”, and substitutes the Tag value into bit numbers 7 to 3 of the ATA register value if the value is “1”. Further, when the value is “2”, the ATA interface processing unit 36 substitutes the value of the bit number “7” to “0” of the LBA value into the bit number 7 to 0 of the ATA register value, and the value is “3”. When the value is “4”, the bit numbers 7 to 0 of the ATA register value are substituted for the bit numbers “15” to “8” of the LBA value. When the value of bit numbers “23” to “16” of the LBA value is substituted for 0 and the value is “5”, bit numbers “27” to “24” of the LBA value are assigned to bit numbers 3 to 0 of the ATA register value. When the value is “6”, the LBA bit numbers “31” to “24” are substituted into the ATA register bit numbers 7 to 0, and the value is “7”. If there is, substitute the value of bit number “15” to “0” of LBA value into bit number 15 to 0 of ATA register value, Is “8”, the bit numbers “31” to “16” of the LBA value are substituted into the bit numbers 15 to 0 of the ATA register value, and the reservation is made when the value is “9” to “15”. .

2行目(+4バイト)のビット番号1のINTRQ一時停止指定情報(IRQPS)203は、IDMA転送モードにおけるPIO処理のアクセスにおいて、INTRQ信号によってPIO CPU割込み要因が発生した場合にPIO処理を一時停止するかどうかを指定する情報である。この値が「0」である場合、一時停止は行われずに処理が続行され、この値が「1」である場合、PIO処理は一時停止される。2行目(+4バイト)のビット番号0のリードデータ一時停止指定情報(RDPS)204は、IDMA転送モードにおけるPIO処理のリードデータでPIO CPU割込み要因が発生した場合にPIO処理を一時停止するかどうかを指定する情報である。この値が「0」である場合、一時停止は行われずに処理が続行され、この値が「1」である場合、PIO処理は一時停止される。   The INTRQ temporary stop specification information (IRQPS) 203 of bit number 1 in the second line (+4 bytes) is used to temporarily stop PIO processing when a PIO CPU interrupt factor is generated by the INTRQ signal during PIO processing access in IDMA transfer mode. It is information that specifies whether to do. When this value is “0”, the process is continued without being paused, and when this value is “1”, the PIO process is paused. The read data temporary stop specification information (RDPS) 204 of bit number 0 in the second row (+4 bytes) is used to pause PIO processing when a PIO CPU interrupt factor occurs in the read data of PIO processing in IDMA transfer mode. It is information that specifies whether or not. When this value is “0”, the process is continued without being paused, and when this value is “1”, the PIO process is paused.

このスクリプトの複数の組み合わせにより、IDMA転送モードの処理であるIDMA処理の単体DMAコマンド発行用PIOスクリプト、単体DMA終了ステータスリード用PIOスクリプト、またはPRD終了用PIOスクリプトに利用される。   A plurality of combinations of these scripts are used for a single DMA command issuance PIO script, a single DMA end status read PIO script, or a PRD end PIO script for IDMA processing which is IDMA transfer mode processing.

図16は、レジスタ53の領域111に構成されるATA全体に関わる設定情報の内、モード/ステータス情報の構成例を示す図である。   FIG. 16 is a diagram illustrating a configuration example of the mode / status information in the setting information related to the entire ATA configured in the area 111 of the register 53.

領域111の一部である領域111A(アドレス0x0400乃至0x0403)のモード/ステータス情報においては、ビット番号28のIDMA処理開始フラグ(IDMSt)211は、IDMA処理開始を設定するフラグであり、このフラグの値が「1」のとき、テーブル番号0のPRDテーブルよりIDMA処理が開始される。IDMA処理開始フラグ211の値が「0」の場合、IDMA処理は開始されない。例えば、スルーPIO転送モード時にこのフラグの値が「1」に設定されると、IDMA処理が予約され、待機状態になり次第、直ちにIDMA転送モードに移行し、IDMA処理が開始される。ビット番号24のスルーPIO処理開始フラグ(ThrPIOSt)212は、スルーPIO制御処理開始を設定するフラグであり、このフラグの値が「1」のとき、スクリプト番号0のスルーPIOスクリプトよりスルーPIO制御処理が開始される。スルーPIO開始フラグ212の値が「0」の場合、スルーPIO制御処理は開始されない。例えば、IDMA転送モード時にこのフラグの値が「1」に設定されると、スルーPIO制御処理が予約され、待機状態になり次第、直ちにスルーPIO転送モードに移行し、スルーPIO制御処理が開始される。ビット番号2乃至0のトップステータス(TOP Status)213には、ATAホストハードウェア21のステータスを示す情報が格納される。このトップステータス213の値が「0」の場合、ATAホストハードウェア21は、待機状態(IDLE)であり、値が「1」の場合、ATAホストハードウェア21は、スルーPIO制御処理中であり、値が「2」の場合、ATAホストハードウェア21は、IDMA処理中であり、値が「4」の場合、ATAホストハードウェア21は、ATAデバイスであるドライブ22のリセット処理中である。   In the mode / status information of the area 111A (address 0x0400 to 0x0403) that is a part of the area 111, the IDMA process start flag (IDMSt) 211 of bit number 28 is a flag for setting the IDMA process start. When the value is “1”, the IDMA process is started from the PRD table of table number 0. When the value of the IDMA process start flag 211 is “0”, the IDMA process is not started. For example, when the value of this flag is set to “1” in the through PIO transfer mode, the IDMA process is reserved, and immediately after entering the standby state, the IDMA transfer mode is started and the IDMA process is started. A through PIO processing start flag (ThrPIOSt) 212 of bit number 24 is a flag for setting the start of through PIO control processing. When the value of this flag is “1”, through PIO control processing from the through PIO script of script number 0 Is started. When the value of the through PIO start flag 212 is “0”, the through PIO control process is not started. For example, if the value of this flag is set to “1” in the IDMA transfer mode, the through PIO control process is reserved, and immediately after entering the standby state, the mode shifts to the through PIO transfer mode and the through PIO control process is started. The In the top status (TOP Status) 213 of bit numbers 2 to 0, information indicating the status of the ATA host hardware 21 is stored. When the value of the top status 213 is “0”, the ATA host hardware 21 is in a standby state (IDLE), and when the value is “1”, the ATA host hardware 21 is performing through PIO control processing. When the value is “2”, the ATA host hardware 21 is in IDMA processing. When the value is “4”, the ATA host hardware 21 is resetting the drive 22 that is an ATA device.

すなわち、このモード/ステータス情報には、ATAホストハードウェア21のトップレベルのステータスと自分が設定しているスタート予約処理に関する情報が格納される。例えば、IDMA処理を実行する場合、このモード/ステータス情報の値は、「0x10000000」に設定される。   That is, in this mode / status information, information on the top level status of the ATA host hardware 21 and the start reservation process set by itself is stored. For example, when executing IDMA processing, the value of this mode / status information is set to “0x10000000”.

図17は、レジスタ53の領域111に構成されるATA全体に関わる設定情報の内、一時停止情報の構成例を示す図である。   FIG. 17 is a diagram illustrating a configuration example of the suspension information among the setting information related to the entire ATA configured in the area 111 of the register 53.

領域111の一部である領域111B(アドレス0x0404乃至0x0407)の一時停止情報において、ビット番号15乃至8の読み出し繰り返しウェイト量(Read繰返しWAIT量)214は、システムクロック換算で何クロックリード繰返しウェイトを発生させるかを指定する情報である。現在の状況が図9のPIOスクリプトレジスタのビット番号27乃至24に格納される読み出し繰返し条件に合致する場合、どれくらいの期間ウェイトを発生させて再度読み出しを行うかを設定する情報が記述される。   In the temporary stop information of the area 111B (addresses 0x0404 to 0x0407) that is a part of the area 111, the read repetition wait amount (Read repetition WAIT amount) 214 of the bit numbers 15 to 8 indicates how many clock read repetition waits in terms of the system clock. It is information that specifies whether to generate. When the current situation matches the read repetition condition stored in the bit numbers 27 to 24 of the PIO script register in FIG. 9, information for setting how long a wait is generated and the read is performed again is described.

この一時停止情報において、ビット番号7乃至0のタイムウェイト量(TIME WAIT量)215は、例えば図9のタイムウェイト124において、一時停止するように設定されていた場合に、PIOコマンド発生前にどれぐらいの期間一時停止させるかを設定するためのレジスタである。   In this suspension information, the time wait amount (TIME WAIT amount) 215 of bit numbers 7 to 0 is set to be suspended before the PIO command is generated, for example, in the time wait 124 of FIG. This is a register for setting whether to pause for about a period of time.

図18は、領域112に構成されるスルーPIO転送モードに関わる設定情報の内、スルーPIO処理設定の構成例を示す図である。   FIG. 18 is a diagram illustrating a configuration example of the through PIO processing setting in the setting information related to the through PIO transfer mode configured in the area 112.

領域112の一部である領域112A(アドレス0x0440乃至0x0443)のスルーPIO処理設定において、ビット番号9のアボート設定(ABT)221は、スルーPIOの強制終了(アボート)を指定するフラグである。このフラグの値が「1」である場合、安全なタイミングでスルーPIO転送モードから待機状態に移行される。ただし、セマフォが取得されている場合、セマフォが優先されるようにし、セマフォを返却してから強制終了するようにする。   In the through PIO processing setting of the area 112A (address 0x0440 to 0x0443) which is a part of the area 112, the abort setting (ABT) 221 of bit number 9 is a flag for designating forcible termination (abort) of the through PIO. When the value of this flag is “1”, the through PIO transfer mode is shifted to the standby state at a safe timing. However, if the semaphore has been acquired, the semaphore is given priority, and the semaphore is returned and then forcibly terminated.

ビット番号8の一時停止設定(PS Off)222は、一時停止に関する動作を指定するフラグであり、このフラグの値が「1」である場合、ATAホストハードウェア21は、一時停止状態が解除され、通常モードに移行し、このフラグの値が「0」である場合はそのまま一時停止状態が保たれる。   A pause setting (PS Off) 222 of bit number 8 is a flag for designating an operation related to pause. When the value of this flag is “1”, the ATA host hardware 21 is released from the pause state. When the normal mode is entered and the value of this flag is “0”, the pause state is maintained as it is.

ビット番号1のINTRQ一時停止設定(IRQ PS)223は、スルーPIO転送モードにおけるアクセス処理においてINTRQ信号によりPIO CPU割り込み要因が発生した場合にPIO処理を一時停止するか否かを指定するフラグであり、このフラグの値が「0」である場合、ATAホストハードウェア21は、一時停止せずにPIO処理を続行し、このフラグの値が「1」である場合、INTRQ信号に基づいてPIO処理を一時停止する。   Bit number 1 INTRQ pause setting (IRQ PS) 223 is a flag that specifies whether or not to pause PIO processing when a PIO CPU interrupt factor is generated by the INTRQ signal during access processing in the through PIO transfer mode. When the value of this flag is “0”, the ATA host hardware 21 continues the PIO processing without pausing. When the value of this flag is “1”, the PIO processing is performed based on the INTRQ signal. Pause.

ビット番号0のリードデータ一時停止設定(RD PS)224は、スルーPIO転送モードにおけるReadデータによりPIO CPU割り込み要因が発生した場合にPIO処理を一時停止するか否かを指定するフラグであり、このフラグの値が「0」である場合、ATAホストハードウェア21は、一時停止せずにPIO処理を続行し、このフラグの値が「1」である場合、Readデータに基づいてPIO処理を一時停止する。   The read data pause setting (RD PS) 224 of bit number 0 is a flag that specifies whether or not to pause the PIO processing when a PIO CPU interrupt factor is generated by the read data in the through PIO transfer mode. When the value of the flag is “0”, the ATA host hardware 21 continues the PIO process without pausing. When the value of the flag is “1”, the PIO process is temporarily performed based on the read data. Stop.

図19は、領域112に構成されるスルーPIO転送モードに関わる設定情報の内、セマフォ設定の構成例を示す図である。   FIG. 19 is a diagram illustrating a configuration example of semaphore settings in the setting information related to the through PIO transfer mode configured in the area 112.

領域112の一部である領域112B(アドレス0x0448乃至0x044B)のセマフォ設定のビット番号0のスルーPIOセマフォ225は、スルーPIO制御処理を実行中にスルーPIOスクリプトを追加したり、変更したりする権利を示すフラグである。ATAホスト31が、このセマフォ設定を読み出し、その値が「0」である場合、セマフォ確保に失敗したことになる。逆に、このセマフォ設定を読み出し、その値が「1」である場合、ATAホスト31は、セマフォ獲得に成功したと判断し、PIOスクリプトに関する処理を行う。セマフォを獲得した場合、ATAホスト31は、このセマフォ設定を更新し、セマフォを返却する。   The through PIO semaphore 225 with the bit number 0 in the semaphore setting of the area 112B (address 0x0448 to 0x044B) that is a part of the area 112 has the right to add or change a through PIO script while executing the through PIO control processing. It is a flag which shows. If the ATA host 31 reads this semaphore setting and the value is “0”, it means that semaphore allocation has failed. On the other hand, when this semaphore setting is read and the value is “1”, the ATA host 31 determines that the semaphore acquisition is successful, and performs processing related to the PIO script. When acquiring the semaphore, the ATA host 31 updates this semaphore setting and returns the semaphore.

すなわち、ATAホスト31は、スルーPIO コマンドを追加する場合にセマフォ設定を読み込み、セマフォを確保した後、スルーPIOテーブルの追加を行い、セマフォを返却する。ATAホスト31がセマフォを確保している間はPIOスクリプトに関する処理は次の単体PIO処理の手前で一時停止することになるので、なるべく早くセマフォを返却する必要がある。なお、ATAホスト31は、セマフォを確保していればどのPIOスクリプトを更新するようにしてもよいが、現在PIO実行中のテーブルや未実行のテーブルを更新すると処理に矛盾が発生する場合があるので、処理済みのテーブルのみを更新するのが望ましい。   That is, the ATA host 31 reads the semaphore setting when adding a through PIO command, secures the semaphore, adds a through PIO table, and returns the semaphore. While the ATA host 31 secures the semaphore, the process related to the PIO script is paused before the next single PIO process, so it is necessary to return the semaphore as soon as possible. Note that the ATA host 31 may update any PIO script as long as a semaphore is secured. However, if a table currently being executed or an unexecuted table is updated, inconsistency may occur in processing. Therefore, it is desirable to update only the processed table.

図20は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第1のIDMA処理設定の構成例を示す図である。   FIG. 20 is a diagram illustrating a configuration example of a first IDMA process setting which is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113A(アドレス0x0480乃至0x0483)の第1のIDMA処理設定のビット番号31乃至16の単一DMAセクタレングス(Mono DMA Sector Length)231は、単一のDMA処理1回当たりに何セクタ分のデータを処理するかを設定する情報である。IDMA PIOコマンドLBA代入の計算で1つのDMA処理が終了するとLBAにこの設定の値が加算される。ビット番号9のアボート設定(ABT)232は、IDMAの強制終了(アボート)を指定するフラグである。このフラグの値が「1」である場合、安全なタイミングでIDMA転送モードから待機状態に移行される。このとき、ATAホストハードウェア21は、ステータス報告フェーズ終了時一時停止フラグ236の値を参照し、動作モードが、ステータス報告フェーズ終了時一時停止状態にあることを確認してからIDMA処理を強制終了する。なお、IDMA処理において強制終了処理を実行するとDMAコマンド数とDMAデータ転送数に不整合が生じるので必ずデバイスリセットまたはそれに準ずる処理が行われる。   The single DMA sector length (Mono DMA Sector Length) 231 of the bit numbers 31 to 16 of the first IDMA processing setting of the region 113A (address 0x0480 to 0x0483) which is a part of the region 113 is a single DMA processing. This is information for setting how many sectors of data are to be processed. When one DMA process is completed in the calculation of IDMA PIO command LBA substitution, the value of this setting is added to the LBA. The abort setting (ABT) 232 of bit number 9 is a flag for designating forcible termination (abort) of IDMA. When the value of this flag is “1”, the IDMA transfer mode is shifted to the standby state at a safe timing. At this time, the ATA host hardware 21 refers to the value of the temporary stop flag 236 at the end of the status report phase, confirms that the operation mode is in the paused state at the end of the status report phase, and forcibly ends IDMA processing. To do. Note that if the forced termination process is executed in the IDMA process, a mismatch occurs between the number of DMA commands and the number of DMA data transfers. Therefore, a device reset or a process equivalent thereto is always performed.

ビット番号8のIDMA処理一時停止解除設定(PRD PS Off)233は、IDMA処理の一時停止を解除し、通常モードに移行するためのフラグであり、このフラグに値「1」を書き込んだ瞬間のみ有効になり、この値により、IDMA処理の一時停止が解除される。   The IDMA processing pause release setting (PRD PS Off) 233 of bit number 8 is a flag for releasing the pause of IDMA processing and shifting to the normal mode, and only when the value “1” is written to this flag. This value is enabled, and the pause of IDMA processing is canceled by this value.

ビット番号5のピックアップ切り替えタイミング設定(Wr OP Chg Tmg)234は、後述するように、ドライブ22のピックアップが複数存在する場合、書き込み処理において、処理を行うピックアップの切り替えタイミングをどこにするかを指定する情報である。例えば、この設定の値が「0」である場合、切り替え処理は、レポートスクリプト処理前に行われ、この設定の値が「1」である場合、レポートまたはENDスクリプト処理後に行われる。ビット番号4のデバイス番号(Dev Num)235は、ATAデバイスであるドライブがどのようなデバイスであるかを示す情報である。例えば、値が「0」である場合、ドライブ22は、そのドライブ22が有する2つのピックアップがATAインタフェースにおいて1つのデバイスとして処理される1Dev−2OPであり、が「1」である場合、ドライブ22が有する2つのピックアップがATAインタフェースにおいて2つのデバイスとして処理される2Dev−2OPである。後述するように、このようなドライブ22の違いにより、ATAホストハードウェア21の処理のタイミングが異なる。なお、ドライブ22のピックアップの数が1つである場合(すなわち、1Dev−1OPである場合)、この値はどちらでもよい。   The pickup switching timing setting (Wr OP Chg Tmg) 234 of bit number 5 designates where the switching timing of the pickup to be processed is set in the writing process when there are a plurality of pickups of the drive 22 as described later. Information. For example, when the value of this setting is “0”, the switching process is performed before the report script process, and when the value of this setting is “1”, it is performed after the report or END script process. Device number (Dev Num) 235 of bit number 4 is information indicating what kind of device is the drive that is the ATA device. For example, when the value is “0”, the drive 22 is 1 Dev-2OP in which two pickups of the drive 22 are processed as one device in the ATA interface, and when the value is “1”, the drive 22 The two pickups of the 2 are 2 Dev-2OP processed as two devices in the ATA interface. As will be described later, the processing timing of the ATA host hardware 21 varies depending on the difference in the drive 22. If the number of pickups in the drive 22 is one (that is, 1 Dev-1OP), this value may be either.

ビット番号3のステータス報告フェーズ終了時一時停止フラグ(St End PS)236は、PIOスクリプトのステータス報告フェーズ終了時において一時停止された状態を示すフラグであり、この値が「1」である場合、一時停止状態にある。この一時停止は、単一PRDテーブル終了時一時停止割り込みにより行われる。なお、上述したように、このフラグの値は、強制終了(アボート)処理時に参照される。このフラグを参照せずに、単純にアボート処理を行うと、ATAバスを占有したまま強制終了してしまう等の不具合が生じる恐れがある。ビット番号2の単一PRDテーブル終了時一時停止設定フラグ(Mn PRD END PS)237は、PRDテーブル1つの処理が終了する毎にIDMA処理を一時停止させるかどうかを指定するフラグであり、その値が「0」である場合は一時停止せず、値が「1」であるばあいは一時停止する。   The status report phase end pause flag (St End PS) 236 of bit number 3 is a flag indicating a paused state at the end of the status report phase of the PIO script. When this value is “1”, It is in a suspended state. This pause is performed by a pause interrupt at the end of the single PRD table. As described above, the value of this flag is referred to at the time of forced termination (abort) processing. If the abort process is simply performed without referring to this flag, there is a possibility that a problem such as forcible termination while the ATA bus is occupied may occur. The bit number 2 single PRD table end pause setting flag (Mn PRD END PS) 237 is a flag that specifies whether or not the IDMA process is paused every time one process of the PRD table ends. When “0” is “0”, it is not paused. When the value is “1”, it is paused.

図21は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第2のIDMA処理設定の構成例を示す図である。   FIG. 21 is a diagram illustrating a configuration example of a second IDMA process setting which is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113B(アドレス0x0484乃至0x0487)の第2のIDMA処理設定のビット番号28の拡張PRD設定(Ex PRD)238は、PRDテーブルの数を拡張するか否かを指定するフラグであり、その値が「0」である場合、拡張せず(8個のPRDテーブル)、その値が「1」の場合、拡張PRDテーブル(9番目のPRDテーブル)が存在する。   The extended PRD setting (Ex PRD) 238 of the bit number 28 of the second IDMA processing setting in the area 113B (addresses 0x0484 to 0x0487) that is a part of the area 113 specifies whether or not to expand the number of PRD tables. If the value is “0”, the flag is not expanded (eight PRD tables), and if the value is “1”, an expanded PRD table (the ninth PRD table) exists.

ビット番号27乃至24のEOF番号239は、EOFとなる最後のPRDテーブルの番号を指定する情報が格納される。このフラグは、拡張PRD設定238の値が「1」である場合(拡張PRDテーブルが存在する場合)のみ有効とされる。PRDテーブル(拡張PRDテーブル)は、IDMA用のSDRAMアドレス追加設定テーブルと、その格納される領域を共有する(領域106)。この領域106において、PRDテーブルに続いてIDMA用のSDRAMアドレス追加設定テーブルが格納されている場合、EOF番号は、PRDテーブルの番号を指定する。   The EOF number 239 of bit numbers 27 to 24 stores information specifying the number of the last PRD table that becomes EOF. This flag is valid only when the value of the extended PRD setting 238 is “1” (when an extended PRD table exists). The PRD table (extended PRD table) shares the storage area with the SDRAM address addition setting table for IDMA (area 106). In this area 106, when an SDRAM address additional setting table for IDMA is stored following the PRD table, the EOF number specifies the number of the PRD table.

ビット番号15乃至0のリードDMAキュー制限数(Read DMA Cue Limit Number[RUB])240は、1つのピックアップあたりの限界キューイング数が格納される。ドライブ22が1Dev-2OPである場合、この設定の2倍のキューイング数が1デバイスに与えられることになる。従って、この場合、この設定をデバイス限界キューイング数の半分以下に設定する。また、1Dev-2OP時には Tag 番号のMSBにOP番号を入れてOP間の Tag番号が混同しないようになされている。Tag番号は5bitであるので、1OPあたり16個のTagしか与えられない。よって、同一OP内でのTag番号の混同を避けるために、1Dev-2OP時には当設定を16以下にすることが望ましい。2Dev-2OP時にはこれと同様の理由で当設定を32以下にすることが望ましい。   The read DMA queue limit number (Read DMA Cue Limit Number [RUB]) 240 of bit numbers 15 to 0 stores the limit queuing number per pickup. When the drive 22 is 1 Dev-2OP, a queuing number twice as large as this setting is given to one device. Therefore, in this case, this setting is set to half or less of the device limit queuing number. Also, in 1Dev-2OP, the OP number is put in the MSB of the tag number so that the tag number between the OPs is not confused. Since the tag number is 5 bits, only 16 tags can be given per OP. Therefore, in order to avoid confusion between Tag numbers in the same OP, it is desirable to set this setting to 16 or less for 1 Dev-2OP. For 2Dev-2OP, it is desirable to set this setting to 32 or less for the same reason.

図22は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第3のIDMA処理設定の構成例を示す図である。   FIG. 22 is a diagram illustrating a configuration example of a third IDMA process setting which is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113C(アドレス0x0494乃至0x0497)の第3のIDMA処理設定のビット番号27乃至0の1RUBプロセスバイト数設定(DMA 1RUB Prcess Byte Number)238は、DMA処理を行う際に、1RUBで何バイト処理されるかをバイト数で指定する情報が格納される。この情報は、デバイス書き込み時において余分なデータをデバイスに送らないようにするために利用され、デバイス読み出し時において分割DMAをされた場合にどのDMAターミネートで1RUBが終了したかを把握するのに利用される。   A 1RUB process byte number setting (DMA 1RUB Prcess Byte Number) 238 of bit numbers 27 to 0 of the third IDMA processing setting in the area 113C (addresses 0x0494 to 0x0497), which is a part of the area 113, is used when performing DMA processing. Information specifying the number of bytes to be processed in 1 RUB is stored. This information is used to prevent sending extra data to the device when writing to the device, and to determine which DMA termination is completed at the end of one RUB when split DMA is used when reading the device. Is done.

図23は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つであるセマフォ設定の構成例を示す図である。   FIG. 23 is a diagram illustrating a configuration example of a semaphore setting that is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113D(アドレス0x048C乃至0x048F)のセマフォ設定のビット番号0のIDMA PIOセマフォ(IDM PIO SMF)242は、IDMA処理実行中のIDMA PRDテーブル追加または変更の権利を示すセマフォの確保を示すフラグである。このフラグの値が「0」である場合、セマフォ確保に失敗したことを示し、値が「1」である場合、セマフォの確保に成功したことを示す。IDMA処理を実行中である場合、ATAホスト31は、セマフォを獲得していなければPRDテーブルの追加または変更を行うことができない。ATAホストハードウェア21の状態が待機モードまはたスルーPIO転送モードである場合、セマフォを獲得しなくてもPRDテーブルの追加または変更を行うことができる。   The IDMA PIO semaphore (IDM PIO SMF) 242 with bit number 0 in the semaphore setting of the area 113D (addresses 0x048C to 0x048F) that is a part of the area 113 indicates a semaphore indicating the right to add or change the IDMA PRD table during IDMA processing. Is a flag indicating the reservation. When the value of this flag is “0”, it indicates that semaphore acquisition has failed, and when the value is “1”, it indicates that semaphore acquisition has been successful. When the IDMA process is being executed, the ATA host 31 cannot add or change the PRD table unless it acquires a semaphore. When the state of the ATA host hardware 21 is the standby mode or the through PIO transfer mode, the PRD table can be added or changed without acquiring a semaphore.

ATAホスト31は、PRDテーブルを追加または変更する場合にセマフォ設定を読み込み、セマフォを確保した後、PRDテーブルの追加を行い、セマフォを返却する。ATAホスト31がセマフォを確保している間はPRDテーブルに関する処理は次のPRDテーブルに関する処理の手前で一時停止することになるので、なるべく早くセマフォを返却する必要がある。なお、ATAホスト31は、セマフォを確保していればどのPRDテーブルを更新するようにしてもよいが、現在処理中のテーブルや未実行のテーブルを更新すると処理に矛盾が発生する場合があるので、処理済みのテーブルのみを更新するのが望ましい。   When adding or changing the PRD table, the ATA host 31 reads the semaphore settings, secures the semaphore, adds the PRD table, and returns the semaphore. While the ATA host 31 secures the semaphore, the process related to the PRD table is temporarily stopped before the process related to the next PRD table, so it is necessary to return the semaphore as soon as possible. Note that the ATA host 31 may update any PRD table as long as a semaphore is secured. However, if a table currently being processed or an unexecuted table is updated, inconsistency may occur in the processing. It is desirable to update only the processed table.

図24は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つであるLBA設定の構成例を示す図である。   FIG. 24 is a diagram illustrating a configuration example of LBA setting, which is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113E(アドレス0x0490乃至0x0493またはアドレス0x049C乃至0x049F)のLBA設定のビット番号31乃至0の実行LBA情報(Execute DMA LBA)243は、現在実行中若しくは直近にDMA転送モードによるデータ転送を実行したLBAに関する情報が格納される。   The execution LBA information (Execute DMA LBA) 243 of the bit numbers 31 to 0 of the LBA setting of the area 113E (address 0x0490 to 0x0493 or address 0x049C to 0x049F), which is a part of the area 113, is currently being executed or most recently DMA transfer mode Stores information about the LBA that executed the data transfer.

図25は、領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである割り込み要因設定の構成例を示す図である。   FIG. 25 is a diagram illustrating a configuration example of interrupt factor setting, which is one of setting information related to setting information related to the IDMA transfer mode configured in the area 113.

領域113の一部である領域113Fの割り込み要因設定のビット番号15のIDMA PIO INTRQ割り込み要因(IDM PIO IRQ IRQ)244は、その値が「1」である場合、IDMA PIO転送モードのドライブ22へのアクセスにおいて、ドライブ22のINTRQ信号によりCPU割り込み要因が発生したことを示すフラグである。ビット番号14のIDMA PIOリードデータ割り込み要因(IDM PIO RD IRQ)245は、その値が「1」である場合、IDMA PIO転送モード時にドライブ22より読み出したデータによりCPU割り込み要因が発生したことを示すフラグである。   When the IDMA PIO INTRQ interrupt factor (IDM PIO IRQ IRQ) 244 of the bit number 15 of the interrupt factor setting of the region 113F which is a part of the region 113 is “1”, the IDMA PIO transfer mode drive 22 is transferred to the drive 22 This flag indicates that a CPU interrupt factor has occurred due to the INTRQ signal of the drive 22 during the access. When the IDMA PIO read data interrupt factor (IDM PIO RD IRQ) 245 of bit number 14 is “1”, it indicates that the CPU interrupt factor is generated by the data read from the drive 22 in the IDMA PIO transfer mode. Flag.

ビット番号13の一時停止フラグ(IDM PIO PS)246は、その値が「1」である場合、IDMA PIO転送モードの処理中に一時停止が発生したことを示すフラグである。ビット番号12の単一PRD終了時一時停止フラグ(IDM PIO PS)247は、その値が「1」である場合、1PRDテーブルの処理が終了し、一時停止が発生していることを示すフラグである。   When the value of the temporary stop flag (IDM PIO PS) 246 of bit number 13 is “1”, it is a flag indicating that a temporary stop has occurred during processing in the IDMA PIO transfer mode. When the value of the single PRD end stop flag (IDM PIO PS) 247 of bit number 12 is “1”, the processing of the 1PRD table is ended and a pause is generated. is there.

ビット番号9の全PRDテーブル終了フラグ(IDM ALL PRD END)248は、その値が「1」である場合、全てのPRDテーブルの処理が終了したことを示すフラグである。ビット番号8の1PRDテーブル終了フラグ(IDM Mn PRD END)249は、その値が「1」である場合、1つのPRDテーブルの処理が終了したことを示すフラグである。   An all PRD table end flag (IDM ALL PRD END) 248 of bit number 9 is a flag indicating that the processing of all the PRD tables is ended when the value is “1”. The 1PRD table end flag (IDM Mn PRD END) 249 of bit number 8 is a flag indicating that the processing of one PRD table is ended when the value is “1”.

ビット番号3の全スルーPIO処理終了フラグ(THR PIO ALL END)250は、その値が「1」である場合、スルーPIO転送モードの転送処理であるスルーPIO制御処理が全てのスクリプトについて終了したことを示すフラグである。ビット番号2のスルーPIO一時停止フラグ(THR PIO PS)251は、その値が「1」である場合、スルーPIO制御処理中に一時停止が発生したことを示すフラグである。ビット番号1のスルーPIO INTRQ割り込み要因(THR PIO IRQ IRQ)252は、その値が「1」である場合、スルーPIOモード時にINTRQ信号によりCPU割り込み要因が発生したことを示すフラグである。ビット番号0のスルーPIOリードデータ割り込み要因(THR PIO RD IRQ)253は、その値が「1」である場合、スルーPIOモード時にドライブ22より読み出したデータによりCPU割り込み要因が発生したことを示すフラグである。   If the value of all through PIO processing end flag (THR PIO ALL END) 250 of bit number 3 is “1”, through PIO control processing, which is transfer processing in the through PIO transfer mode, has been completed for all scripts. It is a flag which shows. A through PIO pause flag (THR PIO PS) 251 of bit number 2 is a flag indicating that a pause has occurred during the through PIO control process when the value is “1”. The bit number 1 through PIO INTRQ interrupt factor (THR PIO IRQ IRQ) 252 is a flag indicating that a CPU interrupt factor is generated by the INTRQ signal in the through PIO mode when the value is “1”. A bit number 0 through PIO read data interrupt factor (THR PIO RD IRQ) 253 is a flag indicating that a CPU interrupt factor is generated by data read from the drive 22 in the through PIO mode when the value is “1”. It is.

ATAホスト31は、CPU23に制御されて、以上のようなレジスタ情報を内蔵するSRAM52およびレジスタ53に格納し、ATAホストハードウェア21の各部は、これらのレジスタ情報に基づいて、図7に示されるようなモード遷移を行いながら、スルーPIO転送モードまたはIDMA転送モードによりデータ転送処理を行う。   The ATA host 31 is controlled by the CPU 23 to store the register information as described above in the built-in SRAM 52 and register 53, and each part of the ATA host hardware 21 is shown in FIG. 7 based on the register information. While performing such mode transition, data transfer processing is performed in the through PIO transfer mode or IDMA transfer mode.

次に、スルーPIO転送モードにおけるデータ転送処理(スルーPIO制御処理)について説明する。   Next, data transfer processing (through PIO control processing) in the through PIO transfer mode will be described.

図26は、スルーPIO転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。   FIG. 26 is a diagram illustrating functional blocks of the ATA host hardware 21 in the through PIO transfer mode.

スルーPIO転送モード時の転送処理は、ATAホストハードウェア21の各部の内、スルーPIO制御部33単一PIOスクリプト処理部34、PIO実行部35、およびATAインタフェース36よりなるスルーPIO処理ハードウェア255により実行される。   The transfer process in the through PIO transfer mode is performed by the through PIO processing hardware 255 including the through PIO control unit 33, the single PIO script processing unit 34, the PIO execution unit 35, and the ATA interface 36 among the units of the ATA host hardware 21. It is executed by.

スルーPIO転送モードにおいては、まず、矢印261のように、CPU23がSRAM52の領域101に、複数のPIO転送処理を実行させるスルーPIOスクリプトを格納する。そして、矢印262のように、CPU23によりそのスルーPIOスクリプトの処理の実行開始がスルーPIO処理ハードウェア255に指示されると、スルーPIO処理ハードウェア255は、矢印263に示されるように、SRAM52の領域101より実行するスルーPIOスクリプトより必要な情報を取得する。そして、その取得した情報に基づいてスルーPIO制御処理を実行し、矢印265に示されるようにドライブ22にアクセスしてデータ転送処理を行い、矢印264に示されるように、必要に応じて情報(例えば、ステータス情報やドライブ22より読み出したデータ等)をSRAM52に供給し格納させる。スルーPIO処理ハードウェア255矢印263乃至265のような処理を繰返し、スルーPIOスクリプトに基づくPIO処理を全て完了させる。スルーPIO制御処理が完了すると、矢印266に示されるように、処理結果がCPU23に供給される。   In the through PIO transfer mode, first, as indicated by an arrow 261, the CPU 23 stores a through PIO script for executing a plurality of PIO transfer processes in the area 101 of the SRAM 52. When the CPU 23 instructs the through PIO processing hardware 255 to start the processing of the through PIO script as indicated by an arrow 262, the through PIO processing hardware 255 indicates that the SRAM 52 Necessary information is acquired from the through PIO script executed from the area 101. Then, through PIO control processing is executed based on the acquired information, the drive 22 is accessed and data transfer processing is performed as indicated by an arrow 265, and information (if necessary) (as indicated by an arrow 264) For example, status information and data read from the drive 22 are supplied to the SRAM 52 and stored therein. Through PIO processing hardware 255 Processes such as arrows 263 to 265 are repeated to complete all PIO processing based on the through PIO script. When the through PIO control processing is completed, the processing result is supplied to the CPU 23 as indicated by an arrow 266.

以上のようなスルーPIO制御処理の具体的な処理の流れの例を、図27のフローチャートを参照して説明する。   An example of a specific process flow of the through PIO control process as described above will be described with reference to the flowchart of FIG.

CPU23によりスルーPIO制御処理の開始が指示されると、スルーPIO制御部33は、最初にステップS1において、セマフォのロックを解除し、ステップS2において、実行するPIOスクリプトの番号を示すPIOスクリプトポインタを初期化し、例えば「0」にリセットする。そして、ステップS3においてセマフォを確保したか否かを判定し、確保するまで待機する。セマフォを確保するとスルーPIO制御部33は、ステップS4において、PIOスクリプトポインタに指定されたPIOスクリプトをフェッチ(取得)する。   When the CPU 23 instructs the start of the through PIO control process, the through PIO control unit 33 first unlocks the semaphore in step S1, and in step S2, a PIO script pointer indicating the number of the PIO script to be executed is displayed. Initialization is performed, for example, reset to “0”. In step S3, it is determined whether or not the semaphore has been secured, and the process waits until it is secured. When the semaphore is secured, the through PIO control unit 33 fetches (acquires) the PIO script designated by the PIO script pointer in step S4.

そしてステップS5において、スルーPIO制御部33は、フェッチしたPIOスクリプトがスルーPIO制御処理の終了を示すEOFであるか否かを判定し、EOFでないと判定した場合、ステップS6に処理を進める。ステップS6において、単一PIOスクリプト処理部34は、スルーPIO制御部33に制御され、単一PIOスクリプト処理を実行する。単一PIOスクリプト処理の詳細については、図28のフローチャートを参照して説明する。   In step S5, the through PIO control unit 33 determines whether or not the fetched PIO script is an EOF indicating the end of the through PIO control process. If it is determined that it is not an EOF, the process proceeds to step S6. In step S6, the single PIO script processing unit 34 is controlled by the through PIO control unit 33 and executes single PIO script processing. Details of the single PIO script processing will be described with reference to the flowchart of FIG.

単一PIOスクリプト処理が終了すると、スルーPIO制御部33は、ステップS7において、必要に応じてスクリプトレジスタ(この場合スルーPIOスクリプト)のATAレジスタ値128をセットする。例えば、スルーPIO制御部33は、PIO処理の完了を示す「Complete=1」をATAレジスタ値128にセットする。また、例えば、ドライブ22のATAレジスタよりデータを読み出した場合、スルーPIO制御部33は、その読み出したデータをATAレジスタ値128にセットする。   When the single PIO script processing ends, the through PIO control unit 33 sets the ATA register value 128 of the script register (in this case, the through PIO script) as necessary in step S7. For example, the through PIO control unit 33 sets “Complete = 1” indicating the completion of the PIO processing to the ATA register value 128. For example, when data is read from the ATA register of the drive 22, the through PIO control unit 33 sets the read data to the ATA register value 128.

ATAレジスタ値128をセットしたスルーPIO制御部33は、ステップS8において、スルーPIO INTRQ割り込み要因252、スルーPIOリードデータ割り込み要因253、およびスルーPIO一時停止フラグ251の値に応じて外部用割り込み要因をセットする。この時点で割り込みがCPU23に供給される。   In step S8, the through PIO control unit 33 that has set the ATA register value 128 generates an external interrupt factor according to the values of the through PIO INTRQ interrupt factor 252, the through PIO read data interrupt factor 253, and the through PIO pause flag 251. set. At this time, an interrupt is supplied to the CPU 23.

外部用割り込み要因をセットするとスルーPIO制御部33は、処理をステップS9に進め、スルーPIO INTRQ割り込み要因252、スルーPIOリードデータ割り込み要因253、INTRQ一時停止設定223、および、リードデータ一時停止設定224の設定に応じて、スルーPIO一時停止フラグ251の値をセットする。   When the external interrupt factor is set, the through PIO control unit 33 advances the process to step S9, and the through PIO INTRQ interrupt factor 252, the through PIO read data interrupt factor 253, the INTRQ pause setting 223, and the read data pause setting 224. The value of the through PIO temporary stop flag 251 is set according to the setting.

ステップS10において、スルーPIO制御部33は、スルーPIO一時停止フラグ251の値が「1」であるか否かを判定し、「1」であると判定した場合、ステップS11に処理を進め、PIO一時停止解除を取得するまで待機する。PIO一時停止解除を取得すると、スルーPIO制御部33は、処理をステップS12に進める。また、ステップS10において、スルーPIO一時停止フラグ251の値が「0」であると判定した場合、スルーPIO制御部33は、ステップS11の処理を省略し、ステップS12に処理を進める。   In step S10, the through PIO control unit 33 determines whether or not the value of the through PIO temporary stop flag 251 is “1”. If it is determined that the value is “1”, the process proceeds to step S11, and the PIO Wait until you get a pause release. When the PIO temporary stop cancellation is acquired, the through PIO control unit 33 advances the process to step S12. If it is determined in step S10 that the value of the through PIO temporary stop flag 251 is “0”, the through PIO control unit 33 omits the process of step S11 and proceeds to step S12.

ステップS12において、スルーPIO制御部33は、PIOスクリプトポインタをインクリメントし、次のPIOスクリプトに対する処理を実行するために、処理をステップS3に戻し、それ以降の処理を繰り返す。   In step S12, the through PIO control unit 33 increments the PIO script pointer, returns the process to step S3 to execute the process for the next PIO script, and repeats the subsequent processes.

以上のようにして、スルーPIO制御部33は、SRAM52の領域101に格納された複数のPIOスクリプトを順に処理していく。そして、最後のPIOスクリプトをフェッチし、ステップS5において、そのスクリプトがEOFであると判定すると、スルーPIO制御部33は、処理をステップS13に進める。   As described above, the through PIO control unit 33 sequentially processes a plurality of PIO scripts stored in the area 101 of the SRAM 52. When the last PIO script is fetched and it is determined in step S5 that the script is EOF, the through PIO control unit 33 advances the process to step S13.

スルーPIO制御部33は、ステップS13において、セマフォをロックし、ステップS14において、全スルーPIO処理終了フラグ250、およびスルーPIO INTRQ割り込み要因252をセットすると、スルーPIO制御処理を終了する。   The through PIO control unit 33 locks the semaphore in step S13. When the all through PIO processing end flag 250 and the through PIO INTRQ interrupt factor 252 are set in step S14, the through PIO control processing ends.

スルーPIO制御処理が終了されると、ATAホスト31は、ATAホストハードウェア21の状態をスルーPIO転送モードから待機モードに移行する。   When the through PIO control process is completed, the ATA host 31 shifts the state of the ATA host hardware 21 from the through PIO transfer mode to the standby mode.

次に、図27のステップS6において実行される単一PIOスクリプト処理について、図28のフローチャートを参照して説明する。   Next, the single PIO script process executed in step S6 of FIG. 27 will be described with reference to the flowchart of FIG.

単一PIOスクリプト処理を開始した単一PIOスクリプト処理部34は、ステップS31において、一時停止情報のタイムウェイト量215の設定に基づいて、その待機時間だけ待機する。待機時間が経過すると、単一PIOスクリプト処理部34は、ステップS32に処理を進め、INTRQウェイト125の値が「1」であるか否かを判定し、「1」であると判定した場合、処理をステップS33に進め、ATAデバイス(ドライブ22)からINTRQ信号を取得するまで待機し、INTRQ信号を取得すると、ステップS34において、領域102に格納されるPIO CPU割り込み要因発生条件にINTRQ信号が含まれる場合は、割り込み要因設定のスルーPIO INTRQ割り込み要因252の値を「1」にセットし、処理をステップS35に進める。また、ステップS32において、INTRQウェイト125の値が「1」でないと判定した場合、単一PIOスクリプト処理部34は、ステップS33およびステップS34の処理を終了し、ステップS35に処理を進める。   The single PIO script processing unit 34 that has started the single PIO script processing waits for the waiting time in step S31 based on the setting of the time wait amount 215 of the suspension information. When the standby time has elapsed, the single PIO script processing unit 34 proceeds to step S32, determines whether or not the value of the INTRQ weight 125 is “1”, and determines that it is “1”. The process proceeds to step S33 and waits until the INTRQ signal is acquired from the ATA device (drive 22). When the INTRQ signal is acquired, the INTRQ signal is included in the PIO CPU interrupt factor generation condition stored in the area 102 in step S34. If it is, the value of the interrupt factor setting through PIO INTRQ interrupt factor 252 is set to “1”, and the process proceeds to step S35. If it is determined in step S32 that the value of the INTRQ weight 125 is not “1”, the single PIO script processing unit 34 ends the processes of step S33 and step S34, and proceeds to step S35.

ステップS35において、単一PIOスクリプト処理部34は、スルーPIOスクリプトのATAアドレス127の値が「00000」であるか否かを判定し、「00000」でないと判定した場合、ステップS36に処理を進める。   In step S35, the single PIO script processing unit 34 determines whether or not the value of the ATA address 127 of the through PIO script is “00000”. If it is determined that the value is not “00000”, the process proceeds to step S36. .

ステップS36において、単一PIOスクリプト処理部34は、ライト/リード設定126の値を確認し、実行する処理が書き込み処理であるか否かを判定し、書き込み処理であると判定した場合、ステップS37に処理を進める。ステップS37において、PIO実行部35は、単一PIOスクリプト処理部34に制御されて、ATAインタフェース処理部36を介してATAレジスタに対する書き込み処理(ドライバ22に装着された記録媒体に対する書き込み処理)を実行する。そして、PIO実行部35による書き込み処理が終了すると、単一PIOスクリプト処理部34は、単一PIOスクリプト処理を終了し、図27のステップS6に処理を戻す。ステップS6に処理が戻されると、スルーPIO制御部33は、上述したようにステップS6の処理を終了し、ステップS7に処理を進める。   In step S36, the single PIO script processing unit 34 checks the value of the write / read setting 126, determines whether the process to be executed is a write process, and determines that the process is a write process, step S37. Proceed with the process. In step S <b> 37, the PIO execution unit 35 is controlled by the single PIO script processing unit 34, and performs a writing process on the ATA register (writing process on the recording medium attached to the driver 22) via the ATA interface processing unit 36. To do. When the writing process by the PIO execution unit 35 is completed, the single PIO script processing unit 34 ends the single PIO script process and returns the process to step S6 in FIG. When the process returns to step S6, the through PIO control unit 33 ends the process of step S6 as described above, and proceeds to step S7.

また、図28のステップS36において、書き込み処理ではないと判定した場合、単一PIOスクリプト処理部34は、ステップS38に処理を進める。ステップS38において、PIO実行部35は、単一PIOスクリプト処理部34に制御されて、ATAインタフェース処理部36を介してATAレジスタに対する読み出し処理(ドライバ22に装着された記録媒体に対する読み出し処理)を実行する。PIO実行部35による読み出し処理が終了すると、単一PIOスクリプト処理部34は、処理をステップS39に進め、ATAデバイスから読み出したレジスタ値が、スルーPIOスクリプトの読み出し繰り返し条件123により選択された読み出し繰り返し/IfGoto条件に合致するか否かを判定し、合致すると判定した場合、ステップS40に処理を進める。   If it is determined in step S36 of FIG. 28 that the write process is not performed, the single PIO script processing unit 34 advances the process to step S38. In step S <b> 38, the PIO execution unit 35 is controlled by the single PIO script processing unit 34 and executes a read process for the ATA register (read process for the recording medium attached to the driver 22) via the ATA interface processing unit 36. To do. When the reading process by the PIO execution unit 35 is completed, the single PIO script processing unit 34 advances the process to step S39, and the register value read from the ATA device is the read repetition selected by the read repetition condition 123 of the through PIO script. It is determined whether or not the / IfGoto condition is met. If it is determined that the / IfGoto condition is met, the process proceeds to step S40.

ステップS40に処理を進めた単一PIOスクリプト処理部34は、読み出し繰り返しウェイト量214で指定された時間だけ待機し、処理をステップS38に戻し、それ以降の処理を繰り返す。   The single PIO script processing unit 34 that has proceeded to step S40 waits for the time specified by the read repetition wait amount 214, returns the processing to step S38, and repeats the subsequent processing.

ステップS39において、ATAデバイスから読み出したレジスタ値が、読み出し繰り返し/IfGoto条件に合致しないと判定した場合、単一PIOスクリプト処理部34は、ステップS41に処理を進め、ATAデバイスから読み出したレジスタ値(リードデータ)が領域102に格納されるPIO CPU割り込み要因発生条件に合致していれば、割り込み要因設定のスルーPIO リードデータ割り込み要因253の値を「1」にセットし、単一PIOスクリプト処理を終了し、図27のステップS6に処理を戻す。ステップS6に処理が戻されると、スルーPIO制御部33は、上述したようにステップS6の処理を終了し、ステップS7に処理を進める。   If it is determined in step S39 that the register value read from the ATA device does not meet the read repetition / IfGoto condition, the single PIO script processing unit 34 proceeds to step S41, and reads the register value ( If the read data) matches the PIO CPU interrupt factor generation condition stored in area 102, the value of the through PIO read data interrupt factor 253 in the interrupt factor setting is set to “1” and single PIO script processing is performed. The process ends, and the process returns to step S6 of FIG. When the process returns to step S6, the through PIO control unit 33 ends the process of step S6 as described above, and proceeds to step S7.

また、図28のステップS35において、ATAアドレス127の値が「00000」であると判定した場合、単一PIOスクリプト処理部34は、ステップS42に処理を進め、ATAレジスタ値が「0x0001」である場合、ATAレジスタへのアクセスを省略するとともに、割り込み要因設定のスルーPIO一時停止フラグ251の値を「1」にセットし、それ以外の場合は、単にATAレジスタへのアクセスを省略する。ステップS42の処理を終了すると、単一PIOスクリプト処理部34は、単一PIOスクリプト処理を終了し、図27のステップS6に処理を戻す。ステップS6に処理が戻されると、スルーPIO制御部33は、上述したようにステップS6の処理を終了し、ステップS7に処理を進める。   If it is determined in step S35 of FIG. 28 that the value of the ATA address 127 is “00000”, the single PIO script processing unit 34 proceeds to step S42, and the ATA register value is “0x0001”. In this case, the access to the ATA register is omitted and the value of the through PIO temporary stop flag 251 of the interrupt factor setting is set to “1”. In other cases, the access to the ATA register is simply omitted. When the process of step S42 is completed, the single PIO script processing unit 34 ends the single PIO script process and returns the process to step S6 of FIG. When the process returns to step S6, the through PIO control unit 33 ends the process of step S6 as described above, and proceeds to step S7.

以上のようにして、単一PIOスクリプト処理部34は、単一PIOスクリプト処理を実行する。   As described above, the single PIO script processing unit 34 executes single PIO script processing.

すなわち、スルーPIO転送モードにおいて、ATAホストハードウェア21のスルーPIO処理ハードウェア255は、図29に示されるように、スルーPIO制御処理を開始すると、最初にステップS51において、SRAM52の領域101に格納されているスルーPIOスクリプトの内、スクリプト番号0のスルーPIOスクリプト101−1を実行する。スルーPIOスクリプト101−1には、図9を参照して説明したように、完了フラグ121、CPU割込条件122、読み出し繰り返し条件123、タイムウェイト124、INTRQウェイト125、ライト/リード設定126、ATAアドレス127、およびATAレジスタ値128等の様々な情報が含まれており、スルーPIO処理ハードウェア255は、それらの情報等に基づいて、単一PIOスクリプト処理を実行する。   That is, in the through PIO transfer mode, when the through PIO processing hardware 255 of the ATA host hardware 21 starts the through PIO control processing, as shown in FIG. 29, first, in the step S51, the data is stored in the area 101 of the SRAM 52. The through PIO script 101-1 with the script number 0 is executed among the through PIO scripts being processed. As described with reference to FIG. 9, the through PIO script 101-1 includes a completion flag 121, a CPU interrupt condition 122, a read repetition condition 123, a time wait 124, an INTRQ wait 125, a write / read setting 126, an ATA Various information such as the address 127 and the ATA register value 128 is included, and the through PIO processing hardware 255 executes single PIO script processing based on the information and the like.

そして、スルーPIO処理ハードウェア255は、スクリプト番号0のスルーPIOスクリプト101−1に対する単一PIOスクリプト処理を終了すると、ステップS52に処理を進め、次に、ステップS51の場合と同様の、スクリプト番号1のスルーPIOスクリプト101−2に対する処理を開始する。このように、スルーPIO処理ハードウェア255は、SRAMの領域101に格納されている各スルーPIOスクリプトに対して、単一PIOスクリプト処理を行い、ステップS53において、スクリプト番号NのスルーPIOスクリプト101−(N+1)に対する処理を実行するまで繰り返す。そして、ステップS54に処理を進め、スクリプト番号N+1のスルーPIOスクリプト101−(N+2)よりEOF267を検出すると、スルーPIO処理ハードウェア255は、スルーPIO制御処理を終了する。   When the through PIO processing hardware 255 finishes the single PIO script processing for the through PIO script 101-1 with the script number 0, the processing proceeds to step S52, and then the script number similar to that in step S51. The process for one through PIO script 101-2 is started. In this way, the through PIO processing hardware 255 performs single PIO script processing for each through PIO script stored in the SRAM area 101, and in step S53, the through PIO script 101- with the script number N is processed. Repeat until the process for (N + 1) is executed. Then, the process proceeds to step S54, and when the EOF 267 is detected from the through PIO script 101- (N + 2) with the script number N + 1, the through PIO processing hardware 255 ends the through PIO control process.

以上のように、ATAホストハードウェア21のスルーPIO処理ハードウェア255が複数のスルーPIOスクリプトに基づいて、連続して単一PIOスクリプト処理を実行するため、図30に示されるように、CPU23は、最初にATAホストハードウェア21にアクセスして、スルーPIOスクリプトを供給し、実行を指示するだけで、複数のPIO処理が実行される。   As described above, since the through PIO processing hardware 255 of the ATA host hardware 21 executes single PIO script processing continuously based on a plurality of through PIO scripts, as shown in FIG. A plurality of PIO processes are executed simply by accessing the ATA host hardware 21 first, supplying a through PIO script, and instructing execution.

従って、CPU23とATAホストハードウェア21とのアクセスは、最初と最後の2回のみでよく、PIO処理によるバス42の占有率を低減させることができるだけでなく、CPU23のデータ転送処理による負荷を軽減させることができ、CPU23がより容易にデータを転送することができる。   Therefore, the CPU 23 and the ATA host hardware 21 need only be accessed at the first and last two times. Not only can the bus 42 occupy the PIO process, but also the data transfer process of the CPU 23 can be reduced. The CPU 23 can transfer data more easily.

なお、図7を参照して説明したように、以上のスルーPIO転送モードにおいて、強制終了命令(アボート命令)により、図28のフローチャートを参照して説明した単一PIOスクリプト処理が強制終了される場合がある。しかしながら、単一PIOスクリプト処理部34は、PIO実行部35を制御し、ステップS37およびステップS38の処理をPIO実行部35に実行させる。このときに、アボート処理(強制終了処理)が行われ、単一PIOスクリプト処理部34が処理を終了すると、PIO実行部35は、処理結果を単一PIOスクリプト処理部34に返却できず、不都合が生じる恐れがある。   As described with reference to FIG. 7, in the above through PIO transfer mode, the single PIO script processing described with reference to the flowchart of FIG. 28 is forcibly terminated by the forced termination instruction (abort instruction). There is a case. However, the single PIO script processing unit 34 controls the PIO execution unit 35 and causes the PIO execution unit 35 to execute the processes of step S37 and step S38. At this time, if an abort process (forced termination process) is performed and the single PIO script processing unit 34 terminates the process, the PIO execution unit 35 cannot return the processing result to the single PIO script processing unit 34, which is inconvenient. May occur.

そこで、単一PIOスクリプト処理部34は、アボート処理を行う際に、PIO実行部35の処理が完了するのを待機する。   Therefore, the single PIO script processing unit 34 waits for the processing of the PIO execution unit 35 to be completed when the abort processing is performed.

図31のフローチャートを参照して、単一PIOスクリプト処理部34によるアボート処理を説明する。   The abort process by the single PIO script processing unit 34 will be described with reference to the flowchart of FIG.

アボート命令が発生し、アボート処理を開始した単一PIOスクリプト処理部34は、ステップS61において、PIO実行部35に処理を依頼し、その処理が実行中であるか否かを判定する。単一PIOスクリプト処理部34は、実行中の単一PIOスクリプト処理において、図28のフローチャートのステップS37およびステップS38の処理を実行中であり、PIO実行部35に処理を依頼し、その処理が実行中であると判定した場合、処理をステップS62に進め、PIO実行部35の処理が終了するまで待機する。PIO実行部35の処理が終了し、処理結果が返却されると、単一PIOスクリプト処理部34は、ステップS63に処理を進め、実行中の単一PIOスクリプト処理を終了させ、アボート処理を終了する。   In step S61, the single PIO script processing unit 34 that has generated an abort command and started the abort process requests the PIO execution unit 35 to determine whether the process is being executed. The single PIO script processing unit 34 is executing the processing of steps S37 and S38 in the flowchart of FIG. 28 in the single PIO script processing being executed, and requests the PIO execution unit 35 to perform the processing. If it is determined that the process is being executed, the process proceeds to step S62 and waits until the process of the PIO execution unit 35 is completed. When the processing of the PIO execution unit 35 is completed and the processing result is returned, the single PIO script processing unit 34 proceeds to step S63, ends the single PIO script processing being executed, and ends the abort processing. To do.

また、ステップS61において、PIO実行部35に処理を依頼しておらず、その処理が実行中でないと判定した場合、単一PIOスクリプト処理部34は、ステップS62の処理を省略してステップS63に処理を進め、待機せずに実行中の単一PIOスクリプト処理を終了させた後、アボート処理を終了する。   In step S61, if the PIO execution unit 35 has not been requested to perform processing and it is determined that the processing is not being executed, the single PIO script processing unit 34 skips step S62 and proceeds to step S63. Proceed with the process, terminate the single PIO script process being executed without waiting, and then terminate the abort process.

以上のように、PIO実行部35の処理を待機してからアボートすることにより、単一PIOスクリプト処理部34は、安全に単一PIOスクリプト処理をアボート(強制終了)させることができる。   As described above, the single PIO script processing unit 34 can safely abort (forcibly terminate) the single PIO script processing by waiting for the processing of the PIO execution unit 35 and then aborting.

次に、IDMA転送モードによるデータ転送処理(スルーPIO制御処理)について説明する。   Next, data transfer processing (through PIO control processing) in the IDMA transfer mode will be described.

図32は、IDMA転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。   FIG. 32 is a diagram showing functional blocks of the ATA host hardware 21 in the IDMA transfer mode.

IDMA転送モード時の転送処理は、ATAホストハードウェア21の各部の内、IDMA PIO制御部38、単一PIOスクリプト処理部34、およびPIO実行部35よりなるPIO処理ハードウェア271、IDMA制御部37よりなるIDMA PRD制御ハードウェア272、DMA実行部39よりなるDMA処理ハードウェア273、並びに、ATAインタフェース処理部36により実行される。   The transfer processing in the IDMA transfer mode includes PIO processing hardware 271 including an IDMA PIO control unit 38, a single PIO script processing unit 34, and a PIO execution unit 35, and an IDMA control unit 37 among the units of the ATA host hardware 21. It is executed by the IDMA PRD control hardware 272, the DMA processing hardware 273 including the DMA execution unit 39, and the ATA interface processing unit 36.

IDMA転送モードにおいては、PIO処理によるデータ転送と、DMA処理によるデータ転送が行われる。従って、SRAM52には、IDMA転送モード用のPIOスクリプトであるIDMA PIOスクリプトの他に、PRDテーブルが格納され、PRDテーブルによりPIO処理が選択された場合、IDMA PIOスクリプトに基づいたPIO処理が実行され、PRDテーブルによりDMA処理が選択された場合、DMA実行部39によるDMA転送が行われる。   In the IDMA transfer mode, data transfer by PIO processing and data transfer by DMA processing are performed. Therefore, in addition to the IDMA PIO script that is a PIO script for the IDMA transfer mode, the SRAM 52 stores a PRD table, and when the PIO process is selected by the PRD table, the PIO process based on the IDMA PIO script is executed. When DMA processing is selected according to the PRD table, DMA transfer by the DMA execution unit 39 is performed.

すなわち、まず、矢印281のように、CPU23がSRAM52の領域107に、複数のIDMA PIOスクリプトを格納する。また、CPU23は、矢印282のように、SRAM52の領域105に(必要に応じて領域106Aにも)、複数のIDMA PIOスクリプトを格納する。そして、矢印283のように、CPU23によりIDMA処理の実行開始がIDMA PRD制御ハードウェア272に指示されると、IDMA PRD制御ハードウェア272は、矢印285に示されるように、SRAM52の領域105(または領域106A)より実行するPRDテーブルより必要な情報を取得し、その情報に基づいて、IDMA PIO処理を行う場合、矢印286に示されるように、PIO処理ハードウェア271を制御して、IDMA PIO制御処理を実行させる。PIO処理ハードウェア271は、IDMA PRD制御ハードウェア272に制御されてIDMA PIO制御処理を開始すると、矢印284に示されるように、SRAM52の領域107より実行するIDMA PIOスクリプトより必要な情報を取得し、その取得した情報に基づいてIDMA PIO制御処理を実行し、矢印288に示されるようにATAインタフェース処理部36を介してドライブ22にアクセスする。ATAインタフェース処理部36は、矢印290に示されるようにドライブ22のATAレジスタにデータを読み書きする。   That is, first, as indicated by an arrow 281, the CPU 23 stores a plurality of IDMA PIO scripts in the area 107 of the SRAM 52. Further, the CPU 23 stores a plurality of IDMA PIO scripts in the area 105 of the SRAM 52 (also in the area 106A as necessary) as indicated by an arrow 282. When the CPU 23 instructs the IDMA PRD control hardware 272 to start executing the IDMA process as indicated by an arrow 283, the IDMA PRD control hardware 272 indicates the area 105 (or the SRAM 52) (or as indicated by the arrow 285). When necessary information is acquired from the PRD table to be executed from the area 106A) and IDMA PIO processing is performed based on the information, the PIO processing hardware 271 is controlled as indicated by an arrow 286 to control IDMA PIO. Execute the process. When the IDMA PRD control hardware 272 starts the IDMA PIO control process, the PIO processing hardware 271 acquires necessary information from the IDMA PIO script executed from the area 107 of the SRAM 52 as indicated by an arrow 284. Then, IDMA PIO control processing is executed based on the acquired information, and the drive 22 is accessed via the ATA interface processing unit 36 as indicated by an arrow 288. The ATA interface processing unit 36 reads / writes data from / to the ATA register of the drive 22 as indicated by an arrow 290.

また、IDMA PRD制御ハードウェア272は、PRDテーブルより取得した情報に基づいて、DMA処理を行う場合、矢印287に示されるように、DMA処理ハードウェア273を制御し、DMA処理を実行させる。DMA処理ハードウェア273は、矢印289に示されるように、ATAインタフェース処理部36を介してドライブ22にアクセスする。ATAインタフェース処理部36は、矢印290に示されるようにドライブ22のATAレジスタにデータを読み書きする。DMA処理ハードウェア273は、以上のようにDMA処理を実行し、矢印291に示されるようにSDRAM24とデータのやり取りを行う。   Further, when performing the DMA processing based on the information acquired from the PRD table, the IDMA PRD control hardware 272 controls the DMA processing hardware 273 to execute the DMA processing as indicated by an arrow 287. The DMA processing hardware 273 accesses the drive 22 via the ATA interface processing unit 36 as indicated by an arrow 289. The ATA interface processing unit 36 reads / writes data from / to the ATA register of the drive 22 as indicated by an arrow 290. The DMA processing hardware 273 executes the DMA processing as described above, and exchanges data with the SDRAM 24 as indicated by an arrow 291.

IDMA PRD制御ハードウェア272は、以上のような制御処理を各PRDテーブルについて実行する。なお、CPU23は、必要に応じて、以上のような一連の処理の途中で新たなPRDテーブルをSRAM52の領域105に追加する。   The IDMA PRD control hardware 272 executes the control process described above for each PRD table. Note that the CPU 23 adds a new PRD table to the area 105 of the SRAM 52 during the series of processes as described above as necessary.

以上のようにIDMA転送モードにおけるPIOスクリプト制御処理(IDMA PIO制御処理)については、上述したスルーPIOスクリプト処理と基本的に同様であり、各PIOスクリプトに対する処理が連続して実行される。ただし、IDMA PIOスクリプト処理の場合、図33に示されるように、IfGotoコマンドが存在し、スクリプト番号順以外の順番でPIOスクリプトに対する処理を実行することができるようになされている。   As described above, the PIO script control processing (IDMA PIO control processing) in the IDMA transfer mode is basically the same as the above-described through PIO script processing, and the processing for each PIO script is executed continuously. However, in the case of IDMA PIO script processing, as shown in FIG. 33, an IfGoto command exists, and processing for PIO scripts can be executed in an order other than the order of script numbers.

すなわち、IDMA PIO転送モードにおいて、ATAホストハードウェア21のPIO処理ハードウェア271は、図33に示されるように、例えば、ステップS71において、SRAM52の領域101に格納されているIDMA PIOスクリプトの内、スクリプト番号XのIDMA PIOスクリプト107−1を実行する。IDMA PIOスクリプト107−1には、図15を参照して説明したように、EOF(完了フラグ(Complete Flag))191、CPU割込条件192、読み出し繰り返し条件193、タイムウェイト194、INTRQウェイト195、ライト/リード設定196、ATAアドレス197、およびATAレジスタ値198等の他に、IfGotoジャンプ先スクリプト番号199、IfGoto条件番号200、リードデータ足し算レジスタ201、INTRQ一時停止指定情報203、およびリードデータ一時停止指定情報204等のように様々な情報が含まれており、PIO処理ハードウェア271は、それらの情報等に基づいて、IDMA PIO処理を実行する。   That is, in the IDMA PIO transfer mode, the PIO processing hardware 271 of the ATA host hardware 21 includes, for example, the IDMA PIO script stored in the area 101 of the SRAM 52 in step S71 as shown in FIG. The IDMA PIO script 107-1 with the script number X is executed. As described with reference to FIG. 15, the IDMA PIO script 107-1 includes an EOF (Complete Flag) 191, a CPU interrupt condition 192, a read repetition condition 193, a time wait 194, an INTRQ wait 195, In addition to write / read setting 196, ATA address 197, ATA register value 198, etc., IfGoto jump destination script number 199, IfGoto condition number 200, read data addition register 201, INTRQ pause designation information 203, and read data pause Various information such as the designation information 204 is included, and the PIO processing hardware 271 executes IDMA PIO processing based on the information and the like.

そして、PIO処理ハードウェア271は、スクリプト番号XのIDMA PIOスクリプト107−Xに対する処理を終了すると、ステップS72に処理を進め、IDMA PIOスクリプト107−Xに基づいて、IfGotoジャンプ処理を行い、ステップS73において、ジャンプ先であるスクリプト番号MのIDMA PIOスクリプト107−Mに対する処理を開始する。このように、PIO処理ハードウェア271は、SRAM52の領域107に格納されている各IDMA PIOスクリプトに対して、IfGoto処理を行いながら、指定された順番に処理を行い、ステップS74において、スクリプト番号NのIDMA PIOスクリプト107−Nに対する処理を実行する。そして、ステップS55に処理を進め、スクリプト番号N+1のIDMA PIOスクリプト107−(N+1)よりEOF300を検出すると、PIO処理ハードウェア271は、IDMA PIOスクリプト処理を終了する。   When the PIO processing hardware 271 completes the process for the IDMA PIO script 107-X with the script number X, the process proceeds to step S72, performs IfGoto jump processing based on the IDMA PIO script 107-X, and step S73. The processing for the IDMA PIO script 107-M with the script number M, which is the jump destination, is started. As described above, the PIO processing hardware 271 performs the process in the specified order while performing the IfGoto process on each IDMA PIO script stored in the area 107 of the SRAM 52. In step S74, the script number N The process for the IDMA PIO script 107-N is executed. Then, the process proceeds to step S55, and when the EOF 300 is detected from the IDMA PIO script 107- (N + 1) with the script number N + 1, the PIO processing hardware 271 ends the IDMA PIO script process.

以上のように、ATAホストハードウェア21のPIO処理ハードウェア271は、スルーPIOスクリプト処理の場合と同様に、複数のIDMA PIOスクリプトに基づいて、連続して単一PIOスクリプト処理を実行することができる。   As described above, the PIO processing hardware 271 of the ATA host hardware 21 can continuously execute a single PIO script process based on a plurality of IDMA PIO scripts as in the case of the through PIO script process. it can.

次に、図34のフローチャートを参照して、IDMA PIO制御処理を説明する。   Next, IDMA PIO control processing will be described with reference to the flowchart of FIG.

図34において、PIO処理ハードウェア271のIDMA PIO制御部38は、IDMA PRD制御ハードウェア272に制御され、IDMA PIO制御処理を開始すると、ステップS81において、処理を行うIDMA PIOスクリプトを指定するPIOスクリプトポインタの値を初期化し、開始スクリプト番号の値をセットする。そして、ステップS82においてIDMA PIO制御部38は、ステップS82において、PIOスクリプトポインタに指定されたIDMA PIOスクリプトをフェッチ(取得)する。   In FIG. 34, the IDMA PIO control unit 38 of the PIO processing hardware 271 is controlled by the IDMA PRD control hardware 272, and when the IDMA PIO control processing is started, in step S81, a PIO script that designates an IDMA PIO script to be processed. The pointer value is initialized and the start script number value is set. In step S82, the IDMA PIO control unit 38 fetches (acquires) the IDMA PIO script designated by the PIO script pointer in step S82.

ステップS83において、IDMA PIO制御部38は、EOFを取得したか否かを示すEOFレジスタの値が真であるか否かを判定し、真でないと判定した場合、ステップS84に処理を進める。ステップS84において、IDMA PIO制御部38は、フェッチしたIDMA PIOスクリプトがEOFである場合、そのフェッチしたEOFをEOFレジスタにセットする。すなわち、IDMA PIO制御部38は、EOFであるIDMA PIOスクリプトを処理した後、EOFであると判定する。なお、フェッチしたIDMA PIOスクリプトがEOFでない場合、IDMA PIO制御部38は、EOFレジスタを更新しない。   In step S83, the IDMA PIO control unit 38 determines whether or not the value of the EOF register indicating whether or not EOF has been acquired is true. If it is determined that the value is not true, the process proceeds to step S84. In step S84, if the fetched IDMA PIO script is EOF, the IDMA PIO control unit 38 sets the fetched EOF in the EOF register. That is, the IDMA PIO control unit 38 processes the IDMA PIO script that is EOF, and then determines that it is EOF. If the fetched IDMA PIO script is not EOF, the IDMA PIO control unit 38 does not update the EOF register.

ステップS84の処理が終了すると、IDMA PIO制御部38は、ステップS85に処理を進める。ステップS85において、単一PIOスクリプト処理部34は、IDMA PIO制御部38に制御され、フェッチしたIDMA PIOスクリプトに対して、図28のフローチャートを参照して説明したスルーPIO転送モードにおける単一PIOスクリプト処理と同様の単一PIOスクリプト処理を実行する。ただし、この場合、単一PIOスクリプト処理を終了した単一PIOスクリプト処理部34は、ステップS85に処理を戻す。単一PIOスクリプト処理部34より処理が戻され、ステップS85の処理が終了したと判定するとIDMA PIO制御部38は、ステップS86に処理を進める。   When the process of step S84 ends, the IDMA PIO control unit 38 advances the process to step S85. In step S85, the single PIO script processing unit 34 is controlled by the IDMA PIO control unit 38, and for the fetched IDMA PIO script, the single PIO script in the through PIO transfer mode described with reference to the flowchart of FIG. A single PIO script process similar to the process is executed. However, in this case, the single PIO script processing unit 34 that has finished the single PIO script processing returns the processing to step S85. If the process is returned from the single PIO script processing unit 34 and it is determined that the process in step S85 is completed, the IDMA PIO control unit 38 advances the process to step S86.

IDMA PIO制御部38は、ステップS86において、実行するIDMA PIOスクリプトが、PIO Readコマンドであり、かつ、リードデータ足し算するスクリプトである場合、そのリードデータをリードデータ足し算レジスタ201の値に足し算し、その値をリードデータ足し算レジスタ201に格納し、処理をステップS87に進める。リードデータ足し算するスクリプトでない場合、IDMA PIO制御部38は、リードデータ足し算レジスタ201を更新せずに、処理をステップS87に進める。   In step S86, if the IDMA PIO script to be executed is a PIO Read command and a script for adding read data, the IDMA PIO control unit 38 adds the read data to the value of the read data addition register 201, The value is stored in the read data addition register 201, and the process proceeds to step S87. If it is not a script for adding read data, the IDMA PIO control unit 38 advances the process to step S87 without updating the read data addition register 201.

IDMA PIO制御部38は、ステップS87において、実行するIDMA PIOスクリプトがPIO Readコマンドである場合、リードデータをスクリプトのATAレジスタ値198に上書きし、格納する。実行するIDMA PIOスクリプトがPIO Readコマンドでない場合、IDMA PIO制御部38は、ATAレジスタ値198を更新しない。IDMA PIO制御部38は、ステップS88において、IDMA PIO INTRQ割り込み要因244、IDMA PIOリードデータ割り込み要因245、および一時停止フラグ246の値に応じて外部用割り込み要因をセットし、ステップS89において、IDMA PIO INTRQ割り込み要因244、およびIDMA PIOリードデータ割り込み要因245の設定に応じて一時停止フラグ246の値をセットする。   In step S87, if the IDMA PIO script to be executed is a PIO Read command, the IDMA PIO control unit 38 overwrites the ATA register value 198 of the script and stores the read data. If the IDMA PIO script to be executed is not a PIO Read command, the IDMA PIO control unit 38 does not update the ATA register value 198. In step S88, the IDMA PIO control unit 38 sets external interrupt factors according to the values of the IDMA PIO INTRQ interrupt factor 244, the IDMA PIO read data interrupt factor 245, and the pause flag 246. In step S89, the IDMA PIO control unit 38 sets IDMA PIO. The value of the pause flag 246 is set according to the setting of the INTRQ interrupt factor 244 and the IDMA PIO read data interrupt factor 245.

そして、ステップS90において、IDMA PIO制御部38は、一時停止フラグ246の値が「1」であるか否かを判定し、「1」であると判定した場合、ステップS91に処理を進め、PIO一時停止解除を取得するまで待機する。PIO一時停止解除を取得すると、IDMA PIO制御部38は、処理をステップS92に進める。また、ステップS90において、一時停止フラグ246の値が「0」であると判定した場合、IDMA PIO制御部38は、ステップS91の処理を省略し、ステップS92に処理を進める。   In step S90, the IDMA PIO control unit 38 determines whether or not the value of the temporary stop flag 246 is “1”. If it is determined that the value is “1”, the process proceeds to step S91. Wait until you get a pause release. When acquiring the PIO temporary stop cancellation, the IDMA PIO control unit 38 advances the process to step S92. If it is determined in step S90 that the value of the pause flag 246 is “0”, the IDMA PIO control unit 38 omits the process of step S91 and proceeds to step S92.

IDMA PIO制御部38は、ステップS92において、取得した情報がIfGoto条件と一致するか否かを判定し、一致すると判定した場合、処理をステップS93に進め、EOFレジスタをリセットし、PIOスクリプトポインタをIfGotoスクリプト番号にセットする。すなわち、この場合、IDMA PIO制御部38は、IfGoto処理を行い、次に処理するように指定されたIDMA PIOスクリプトにジャンプし、そのIDMA PIOスクリプトに対して処理を開始する。ステップS93の処理が終了すると、IDMA PIO制御部38は、処理をステップS82に戻し、それ以降の処理を繰り返す。   In step S92, the IDMA PIO control unit 38 determines whether or not the acquired information matches the IfGoto condition. If the IDMA PIO control unit 38 determines that the information matches, the IDMA PIO control unit 38 proceeds to step S93, resets the EOF register, and sets the PIO script pointer. Set to the IfGoto script number. That is, in this case, the IDMA PIO control unit 38 performs IfGoto processing, jumps to the IDMA PIO script designated to be processed next, and starts processing for the IDMA PIO script. When the process of step S93 ends, the IDMA PIO control unit 38 returns the process to step S82 and repeats the subsequent processes.

また、ステップS92において、取得した情報がIfGoto条件と一致しないと判定した場合、IDMA PIO制御部38は、ステップS94に処理を進め、PIOスクリプトポインタをインクリメントし、処理をステップS82に戻す。すなわち、この場合、IDMA PIO制御部38は、IfGoto処理を行わず、スルーPIO転送モードの場合と同様に、スクリプト番号順に処理を行う。   If it is determined in step S92 that the acquired information does not match the IfGoto condition, the IDMA PIO control unit 38 proceeds to step S94, increments the PIO script pointer, and returns the process to step S82. That is, in this case, the IDMA PIO control unit 38 does not perform the IfGoto process, but performs the processes in the order of the script numbers as in the case of the through PIO transfer mode.

以上のように、ステップS82乃至ステップS94の処理を繰り返すことにより、IDMA PIO制御部38は、指定された順番で、IDMA PIOスクリプトに対する処理を行う。   As described above, by repeating the processing from step S82 to step S94, the IDMA PIO control unit 38 performs processing for the IDMA PIO script in the designated order.

そして、ステップS83において、EOFレジスタの値が真であると判定した場合、IDMA PIO制御部38は、IDMA PIO制御処理を終了する。   If it is determined in step S83 that the value of the EOF register is true, the IDMA PIO control unit 38 ends the IDMA PIO control process.

以上のように処理することにより、PIO処理ハードウェア271は、スルーPIO転送モードの場合と同様に、IDMA転送モードにおいても、単一PIOスクリプト処理を連続して実行することができる。なお、この場合、IfGoto条件等により、IDMA PIOスクリプトの実行順が定められているので、PIO処理ハードウェア271は、その指定された順番で、各IDMA PIOスクリプトに対する処理を行う。   By performing the processing as described above, the PIO processing hardware 271 can continuously execute single PIO script processing in the IDMA transfer mode as in the case of the through PIO transfer mode. In this case, since the execution order of the IDMA PIO scripts is determined by the IfGoto condition or the like, the PIO processing hardware 271 performs processing for each IDMA PIO script in the specified order.

なお、このIDMA PIO制御処理においてもアボート処理が行われるが、スルーPIO転送モードの場合と同様に、単一PIOスクリプト処理部34は、図31のフローチャートを参照して説明したようなアボート処理を実行し、PIO実行部35に処理を依頼し、PIO実行部35がその処理を実行中である場合は、終了処理を行わずに待機し、その処理が終了してから終了処理を実行するようにする。   The abort process is also performed in this IDMA PIO control process. However, as in the case of the through PIO transfer mode, the single PIO script processing unit 34 performs the abort process as described with reference to the flowchart of FIG. If the PIO execution unit 35 is executing the process, it waits without performing the end process, and executes the end process after the process ends. To.

同様に、IDMA PIO制御部38も、アボート処理を実行し、図34のフローチャートを参照して説明したIDMA PIO制御処理のステップS85の処理を実行しているとき、すなわち、単一PIOスクリプト処理部34に処理を依頼し、単一PIOスクリプト処理部34がその処理を実行中である場合は、終了処理を行わずに待機し、その処理が終了してから終了処理を実行するようにする。   Similarly, the IDMA PIO control unit 38 also executes the abort process and executes the process of step S85 of the IDMA PIO control process described with reference to the flowchart of FIG. 34, that is, a single PIO script processing unit. When the single PIO script processing unit 34 is executing the process, the process waits without performing the end process, and the end process is executed after the process ends.

図35のフローチャートを参照して、IDMA PIO制御部38によるアボート処理を説明する。   The abort process by the IDMA PIO control unit 38 will be described with reference to the flowchart of FIG.

アボート命令が発生し、アボート処理を開始したIDMA PIO制御部38は、ステップS111において、単一PIOスクリプト処理部34に処理を依頼し、その処理が実行中であるか否かを判定する。IDMA PIO制御部38は、実行中のIDMA PIO制御処理において、図34のフローチャートのステップS85の処理を実行中であり、単一PIOスクリプト処理部34に処理を依頼し、その処理が実行中であると判定した場合、処理をステップS112に進め、単一PIOスクリプト処理部34の処理が終了するまで待機する。単一PIOスクリプト処理部34の処理が終了し、処理結果が返却されると、IDMA PIO制御部38は、ステップS113に処理を進め、実行中のIDMA PIO制御処理を終了させ、アボート処理を終了する。   In step S111, the IDMA PIO control unit 38 that has generated an abort command and started the abort process requests the single PIO script processing unit 34 to determine whether the process is being executed. The IDMA PIO control unit 38 is executing the process of step S85 in the flowchart of FIG. 34 in the IDMA PIO control process being executed, and requests the single PIO script processing unit 34 to execute the process. If it is determined that there is, the process proceeds to step S112 and waits until the process of the single PIO script processing unit 34 is completed. When the processing of the single PIO script processing unit 34 is completed and the processing result is returned, the IDMA PIO control unit 38 proceeds to step S113, ends the IDMA PIO control processing being executed, and ends the abort processing. To do.

また、ステップS111において、単一PIOスクリプト処理部34に処理を依頼しておらず、その処理が実行中でないと判定した場合、IDMA PIO制御部38は、ステップS112の処理を省略してステップS113に処理を進め、待機せずに実行中のIDMA PIO制御処理を終了させた後、アボート処理を終了する。   In step S111, if the single PIO script processing unit 34 has not been requested to perform processing and it is determined that the processing is not being executed, the IDMA PIO control unit 38 omits step S112 and performs step S113. The process proceeds to (1), the IDMA PIO control process being executed is terminated without waiting, and the abort process is terminated.

以上のように、単一PIOスクリプト処理部34の処理を待機してからアボートすることにより、IDMA PIO制御部38は、安全にIDMA PIO制御処理をアボート(強制終了)させることができる。   As described above, the IDMA PIO control unit 38 can safely abort (forcibly terminate) the IDMA PIO control process by waiting for the process of the single PIO script processing unit 34 and then aborting.

上述したように、IDMA転送モードにおいては、以上のようなIDMA PIO制御処理によるPIO処理の他に、DMA処理も行われる。その制御はSRAM52に格納されたPRDテーブルに基づいて行われる。   As described above, in the IDMA transfer mode, DMA processing is performed in addition to the PIO processing by the IDMA PIO control processing as described above. The control is performed based on the PRD table stored in the SRAM 52.

すなわち、図36に示されるように、IDMA PRD制御ハードウェア272は、PRDテーブルの実行を繰り返すことにより、複数のPIO処理を含むフェーズの集合であるGOP(Group Of Phase)単位で処理する。このGOP単位の処理(GOP処理)の場合も、図36に示されるように、上述したPIO処理を行う場合と同様に、ステップS121乃至ステップS123のようにPRDテーブルに関する処理(PRD処理)が1つずつ実行される(複数実行される)が、このとき、各PRD処理において、PRDテーブルの情報に基づいて、それぞれ、上述したIDMA PIO制御処理およびDMA処理が行われる。   That is, as shown in FIG. 36, the IDMA PRD control hardware 272 performs processing in units of GOP (Group Of Phase), which is a set of phases including a plurality of PIO processes, by repeatedly executing the PRD table. In the case of this GOP unit processing (GOP processing), as shown in FIG. 36, similarly to the above-described PIO processing, processing (PRD processing) related to the PRD table is performed as in steps S121 to S123. The IDMA PIO control process and the DMA process described above are performed in each PRD process based on the information in the PRD table.

図37に示されるように、PRDテーブルに対する処理は、いくつかのPIOスクリプトフェーズとDMA実転送フェーズにより構成される。すなわち、ATAホストハードウェア21は、DMA転送に関するPIOコマンド群をいくつかのフェーズに分けて制御する。すなわち、ATAホストハードウェア21は、PRD処理の開始するPIOコマンドを発行する第1のフェーズ(PRD Start時PIOコマンド)、書き込み処理または読み出し処理を実行するDMA用PIOコマンドを発行する第2のフェーズ(DMA PIOコマンド)、DMA転送を実行するPIOコマンドを発行する第3のフェーズ(DMA Exeコマンド)、およびDMA転送を行う第4のフェーズ(DMA実行)を実行し、その後、ステータスの報告を行うPIOコマンドを発行する第5のフェーズ(Status Report)を実行し、1PRD処理が完了したことを示すPIOコマンドを発行する第6のフェーズ(1PRD終了PIO)を実行して1つのPRD処理を完了させる。   As shown in FIG. 37, the process for the PRD table is composed of several PIO script phases and a DMA actual transfer phase. That is, the ATA host hardware 21 controls the PIO command group related to DMA transfer in several phases. In other words, the ATA host hardware 21 issues the first phase for issuing a PIO command for starting PRD processing (PRD start PIO command), and the second phase for issuing a DMA PIO command for executing write processing or read processing. (DMA PIO command), the third phase (DMA Exe command) that issues a PIO command that executes DMA transfer, and the fourth phase (DMA execution) that performs DMA transfer, and then reports the status The fifth phase (Status Report) for issuing the PIO command is executed, and the sixth phase (1 PRD end PIO) for issuing the PIO command indicating that the 1PRD processing is completed is executed to complete one PRD processing. .

PRDテーブルはこのようなPRD処理を複数回連続して実行させるような指示を含んでいる。   The PRD table includes an instruction for executing such a PRD process continuously a plurality of times.

例えば、PRDテーブルとして、SDRAMからLBAへ処理単位3回分のデータ(3RUB)を書き込む指示をするPRDテーブル311について処理を行う場合、ATAホストハードウェア21は、第1のフェーズとして開始コマンド(Start)321を発行し、第2のフェーズとして書き込みコマンド(W)322を発行し、第3のフェーズとしてDMA実行コマンド(D)323を発行し、そのコマンドによりDMA転送324を行う第4のフェーズを実行し、第5のフェーズとしてステータス報告コマンド325を発行する。PRDテーブル311においては、3RUB、すなわち、3回分の書き込み処理が指示されているので、ATAホストハードウェア21は、第2のフェーズ乃至第5のフェーズを3回繰り返した後、第6のフェーズとして終了コマンド(END)326を発行し、PRDテーブル311に対するPRD処理を終了する。   For example, when the PRD table 311 is instructed to write data (3 RUB) for three processing units from the SDRAM to the LBA as the PRD table, the ATA host hardware 21 performs the start command (Start) as the first phase. 321 is issued, the write command (W) 322 is issued as the second phase, the DMA execution command (D) 323 is issued as the third phase, and the fourth phase in which the DMA transfer 324 is performed by the command is executed. Then, a status report command 325 is issued as the fifth phase. In the PRD table 311, 3 RUB, that is, write processing for three times is instructed, so the ATA host hardware 21 repeats the second to fifth phases three times and then the sixth phase. An end command (END) 326 is issued, and the PRD process for the PRD table 311 is ended.

図37においては、PRDテーブル311の次のテーブルとしてPRDテーブル312が存在するので、ATAホストハードウェア21は、PRDテーブル311に対するPRD処理を終了した後、PRDテーブル312に対するPRD処理を開始する。このPRDテーブル312に対するPRD処理はPRDテーブル311に対するPRD処理と基本的に同様であるが、図37に示されるように、PRDテーブル312がSDRAMからLBAへ2RUB分のデータの書き込みを指示するものであるので、ATAホストハードウェア21は、第1のフェーズを実行した後、第2のフェーズ乃至第5のフェーズを2回繰り返した後、第6のフェーズを実行しPRD処理を終了する。   In FIG. 37, since the PRD table 312 exists as the next table of the PRD table 311, the ATA host hardware 21 starts the PRD process for the PRD table 312 after completing the PRD process for the PRD table 311. The PRD process for the PRD table 312 is basically the same as the PRD process for the PRD table 311, but as shown in FIG. 37, the PRD table 312 instructs to write 2RUB of data from the SDRAM to the LBA. Therefore, after executing the first phase, the ATA host hardware 21 repeats the second to fifth phases twice, then executes the sixth phase and ends the PRD process.

なお、図37においては、各フェーズの処理をそれぞれ1つの四角で示しているが、実際には、それらの各PIOスクリプトフェーズは、複数のPIOアクセススクリプトにより構成されており、複数のPIOコマンドが実行される。   In FIG. 37, each phase process is indicated by a single square. Actually, each PIO script phase is composed of a plurality of PIO access scripts. Executed.

図37においては、PRDテーブル311およびPRDテーブル312がともに書き込み処理を実行させるテーブルである場合、すなわち、書き込み処理を行うPRD処理が連続する場合について説明した。この場合、上述したように、PRDテーブル312に対するPRD処理は、PRDテーブル311に対する処理が終了してから実行される。   In FIG. 37, the case has been described where both the PRD table 311 and the PRD table 312 are tables for executing the writing process, that is, the case where the PRD process for performing the writing process is continued. In this case, as described above, the PRD process for the PRD table 312 is executed after the process for the PRD table 311 is completed.

これに対して、読み出し処理を実行させるPRDテーブルが連続する場合、それらのPRDテーブルに対する各PRD処理は、図38に示されるように、一部並行して実行される。読み出し処理の場合、ATAホストハードウェア21は、第2のフェーズにおいて、前のコマンドに対する完了をコマンド毎に待たずに、次のコマンドを発行し、待ち行列に格納させる(キューイング)ことができる。このキューイングできる最大コマンド数(限界キューイング数)は予め定められている。   On the other hand, when PRD tables for executing read processing are continuous, each PRD processing for these PRD tables is partially executed in parallel as shown in FIG. In the case of read processing, the ATA host hardware 21 can issue the next command and store it in the queue (queuing) without waiting for completion of the previous command for each command in the second phase. . The maximum number of commands that can be queued (the limit queuing number) is predetermined.

従って、ATAホストハードウェア21は、まず、各PRDテーブルに対するPRD処理の内、第1のフェーズと第2のフェーズを順に実行し、この限界キューイング数に達するまでコマンドを発行する。そして限界キューイング数分のコマンドを発行すると、ATAホストハードウェア21は、各コマンドに対するDMA転送を1つずつ実行する。このときATAホストハードウェア21は、DMA転送処理を1回行う毎に(キューイングしたコマンドが1回実行される毎に)新たなコマンドをキューイングさせる。すなわち、ATAホストハードウェア21は、未発行のコマンドが存在する間、限界キューイング数分のコマンドがキューイングされているようにする。   Therefore, the ATA host hardware 21 first executes the first phase and the second phase in the PRD process for each PRD table in order, and issues commands until the limit queuing number is reached. When the commands for the limit queuing number are issued, the ATA host hardware 21 executes DMA transfer for each command one by one. At this time, the ATA host hardware 21 queues a new command every time the DMA transfer process is performed once (every time the queued command is executed once). That is, the ATA host hardware 21 is configured to queue the commands for the limit queuing number while there are unissued commands.

例えば、図38に示されるように、3RUBのデータを読み出すPRDテーブル331に対するPRD処理を行う場合、ATAホストハードウェア21は、そのPRD処理の一連の処理を枠341で囲んだような手順で実行する。すなわち、ATAホストハードウェア21は、第2のフェーズにおいて、先に読み出しコマンド(R)を3RUB分発行し、その後で、第3のフェーズ、第4のフェーズ、および第5のフェーズの実行を1組として、その1組の処理を3回繰り返す。そしてATAホストハードウェア21は、最後に第6のフェーズを実行し、PRDテーブル331に対するPRD処理を終了する。   For example, as shown in FIG. 38, when performing PRD processing on the PRD table 331 for reading 3RUB data, the ATA host hardware 21 executes a series of processing of the PRD processing in a procedure surrounded by a frame 341. To do. In other words, in the second phase, the ATA host hardware 21 first issues a read command (R) for 3 RUBs, and thereafter executes the third phase, the fourth phase, and the fifth phase as 1 As a set, the process of that set is repeated three times. The ATA host hardware 21 finally executes the sixth phase, and ends the PRD process for the PRD table 331.

このとき、図38に示されるように、PRDテーブル331の次に処理されるテーブルとして、50RUB分のデータを読み出すPRDテーブル332が存在する。このとき、限界キューイング数が6であるとすると、PRDテーブル331のPRD処理において、ATAホストハードウェア21が3RUB分読み出しコマンドを発行しても、まだ3RUB分キューイングすることができる。そこで、ATAホストハードウェア21は、PRDテーブル331に対するPRD処理の第3のフェーズ以降の処理を実行する前に、PRDテーブル332に対するPRD処理の開始コマンドを発行した後、読み出しコマンドを3RUB分キューイングさせる。   At this time, as shown in FIG. 38, there is a PRD table 332 that reads data for 50 RUBs as a table to be processed next to the PRD table 331. At this time, if the limit queuing number is 6, even if the ATA host hardware 21 issues a 3RUB read command in the PRD process of the PRD table 331, the queue can still be queued for 3RUB. Therefore, the ATA host hardware 21 issues a PRD processing start command for the PRD table 332 and then queues the read command for 3 RUBs before executing the processing after the third phase of the PRD processing for the PRD table 331. Let

これにより発行したコマンドの数が限界キューイング数に達したので、ATAホストハードウェア21は、次に、PRDテーブル331に対するPRD処理の第3のフェーズ、第4のフェーズ、および第5のフェーズを実行する。これによりキューイングされている読み出しコマンドが1つ減るので、ATAホストハードウェア21は、次に、PRDテーブル332に対するPRD処理の読み出しコマンドを1つ発行する。以上の処理を繰返し、PRDテーブル331に対するPRD処理が終了すると、ATAホストハードウェア21は、次に、PRDテーブル332に対するPRD処理の第3のフェーズ、第4のフェーズ、および第5のフェーズを、上述したPRDテーブル331の場合と同様に、読み出しコマンドの発行と交互に実行し、PRDテーブル332に対するPRD処理を進行させる。   Since the number of issued commands has reached the limit queuing number, the ATA host hardware 21 next performs the third phase, the fourth phase, and the fifth phase of the PRD process for the PRD table 331. Execute. As a result, the queued read command is reduced by one, so the ATA host hardware 21 next issues one PRD processing read command for the PRD table 332. When the above processing is repeated and the PRD processing for the PRD table 331 is completed, the ATA host hardware 21 next executes the third phase, the fourth phase, and the fifth phase of the PRD processing for the PRD table 332, As in the case of the PRD table 331 described above, the PRD process for the PRD table 332 is advanced by alternately executing issuance of a read command.

以上のように、読み出し処理を実行させるPRDテーブルが連続する場合、それらのテーブルに対する各PRD処理は、その一部の処理が並行して実行される。   As described above, when PRD tables for executing read processing are continuous, a part of the PRD processing for these tables is executed in parallel.

また、読み出し処理を実行させるPRDテーブルより書き込み処理を実行させるPRDテーブルに遷移する場合、図39に示されるように、先に実行される読み出し処理を実行させるPRDテーブルのPRD処理が終了してから、書き込み処理を実行させるPRDテーブルのPRD処理が開始される。   In addition, when the PRD table for executing the reading process is changed from the PRD table for executing the reading process, as shown in FIG. 39, after the PRD process of the PRD table for executing the reading process executed first is completed. Then, the PRD process of the PRD table for executing the writing process is started.

逆に、書き込み処理を実行させるPRDテーブルより読み出し処理を実行させるPRDテーブルに遷移する場合、図39に示されるように、先に実行される書き込み処理を実行させるPRDテーブルのPRD処理が終了してから、読み出し処理を実行させるPRDテーブルのPRD処理が開始される。   On the other hand, when the PRD table for executing the read process is changed from the PRD table for executing the write process to the PRD table for executing the read process, as shown in FIG. Then, the PRD process of the PRD table for executing the read process is started.

すなわち、このような場合、各PRD処理は並行して実行されない。なお、各PRD処理は、それぞれ、図37および図38を参照して説明したように実行される。また、図37の場合と同様に、図38および図39においても、各フェーズの処理をそれぞれ1つの四角で示しているが、実際には、それらの各PIOスクリプトフェーズは、複数のPIOアクセススクリプトにより構成されており、複数のPIOコマンドが実行される。   That is, in such a case, the respective PRD processes are not executed in parallel. Each PRD process is executed as described with reference to FIGS. 37 and 38. Similarly to the case of FIG. 37, also in FIG. 38 and FIG. 39, the processing of each phase is shown by one square, but actually, each of these PIO script phases includes a plurality of PIO access scripts. A plurality of PIO commands are executed.

次に、ATAホストハードウェア21による以上のようなIDMA処理の具体的な処理の流れについて説明する。   Next, a specific processing flow of the IDMA processing as described above by the ATA host hardware 21 will be described.

最初に、以上のようにGOP単位でIDMA処理を制御するGOP処理を図40のフローチャートを参照して説明する。   First, the GOP process for controlling the IDMA process in GOP units as described above will be described with reference to the flowchart of FIG.

IDMA転送処理モードに移行したATAホストハードウェア21のIDMA PRD制御部のIDMA制御部37は、GOP処理を開始すると、最初に、ステップS131において、初期化処理を行い、各変数の値を初期化する。   When the IDMA control unit 37 of the IDMA PRD control unit of the ATA host hardware 21 that has shifted to the IDMA transfer processing mode starts GOP processing, first, in step S131, initialization processing is performed to initialize the values of the variables. To do.

すなわち、IDMA制御部37は、処理したセクタ数を累積するコマンド処理用の変数であるコマンド累積セクタレングス、予約した(キューイングさせた)RUB数をカウントするコマンド処理用の変数であるコマンド予約RUB数、Tag値を保持するコマンド処理用の変数であるコマンドTag、処理したセクタ数を累積するデータ転送処理用の変数であるデータ転送累積セクタレングス、後述する各ポインタFIFOのリード/ライトポインタ、並びに、Tag値を保持するデータ転送処理用の変数であるデータ転送Tagの値をそれぞれ「0」にセットする。   That is, the IDMA control unit 37 has a command processing variable that accumulates the number of processed sectors, a command accumulation sector length that is a command processing variable, and a command reservation RUB that is a command processing variable that counts the number of reserved (queued) RUBs. Command tag that is a variable for command processing that holds the Tag value, data transfer cumulative sector length that is a variable for data transfer processing that accumulates the number of processed sectors, a read / write pointer for each pointer FIFO described later, and The value of the data transfer tag, which is a variable for data transfer processing that holds the Tag value, is set to “0”.

初期化処理を実行したIDMA制御部37は、次に、ステップS132に処理を進め、コマンド開始準備処理を実行する。コマンド開始準備処理の詳細については、図41のフローチャートを参照して説明する。コマンド開始準備処理を終了するとIDMA制御部37は、処理をステップS133に進め、コマンド開始処理を実行する。コマンド開始処理の少佐については、図43のフローチャートを参照して説明する。コマンド開始処理を終了したIDMA制御部37は、ステップS134に処理を進め、コマンド実行処理を実行する。コマンド実行処理の詳細については図44のフローチャートを参照して説明する。コマンド実行処理を終了するとIDMA制御部37は、処理をステップS135に進める。   The IDMA control unit 37 that has executed the initialization process proceeds to step S132, and executes a command start preparation process. Details of the command start preparation process will be described with reference to the flowchart of FIG. When the command start preparation process is completed, the IDMA control unit 37 advances the process to step S133 and executes the command start process. The major command start process will be described with reference to the flowchart of FIG. After completing the command start process, the IDMA control unit 37 advances the process to step S134 to execute the command execution process. Details of the command execution processing will be described with reference to the flowchart of FIG. When the command execution process ends, the IDMA control unit 37 advances the process to step S135.

ステップS135において、IDMA制御部37は、コマンド実行処理の処理結果に基づいてデータ転送処理に移行するか否かを判定し、移行しないと判定した場合は、ステップS132に処理を戻し、それ以降の処理を繰り返す。   In step S135, the IDMA control unit 37 determines whether or not to shift to the data transfer process based on the processing result of the command execution process. If it is determined not to shift, the process returns to step S132, and the subsequent steps Repeat the process.

また、ステップS135においてデータ転送処理に移行すると判定した場合、IDMA制御部37は、処理をステップS136に進め、データ転送開始準備処理を実行する。データ転送開始準備処理の詳細については、図45のフローチャートを参照して説明する。データ転送開始準備処理を終了するとIDMA制御部37は、処理をステップS137に進め、データ転送サービス処理を実行する。データ転送サービス処理の詳細については図46のフローチャートを参照して説明する。データ転送サービス処理を終了するとIDMA制御部37は、処理をステップS138に進め、データ転送実行処理を実行する。データ転送実行処理の詳細については図47のフローチャートを参照して説明する。データ転送サービス処理を終了するとIDMA制御部37は、処理をステップS139に進め、データ転送状態報告処理を実行する。データ転送状態報告処理の詳細については図49のフローチャートを参照して説明する。データ転送状態報告処理を終了するとIDMA制御部37は、処理をステップS140に進める。   If it is determined in step S135 to shift to the data transfer process, the IDMA control unit 37 advances the process to step S136, and executes a data transfer start preparation process. Details of the data transfer start preparation process will be described with reference to the flowchart of FIG. When the data transfer start preparation process is completed, the IDMA control unit 37 advances the process to step S137 and executes the data transfer service process. Details of the data transfer service process will be described with reference to the flowchart of FIG. When the data transfer service process ends, the IDMA control unit 37 advances the process to step S138, and executes the data transfer execution process. Details of the data transfer execution process will be described with reference to the flowchart of FIG. When the data transfer service process ends, the IDMA control unit 37 advances the process to step S139, and executes a data transfer status report process. Details of the data transfer status report processing will be described with reference to the flowchart of FIG. When the data transfer status reporting process ends, the IDMA control unit 37 advances the process to step S140.

ステップS140において、IMDA制御部37は、データ転送状態報告処理の処理結果に基づいて、データ転送終了処理を実行するか否かを判定し、実行すると判定した場合、処理をステップS141に進め、データ転送終了処理を実行する。データ転送終了処理の詳細については図50のフローチャートを参照して説明する。データ転送終了処理を終了するとIDMA制御部37は、処理をステップS142に進める。   In step S140, the IMDA control unit 37 determines whether or not to execute the data transfer end process based on the processing result of the data transfer status report process. If it is determined to execute the data transfer, the process proceeds to step S141. Execute transfer end processing. Details of the data transfer end process will be described with reference to the flowchart of FIG. When the data transfer end process ends, the IDMA control unit 37 advances the process to step S142.

また、ステップS140においてデータ転送処理を実行しないと判定した場合、IDMA制御部37は、ステップS141の処理を省略し、ステップS142に処理を進める。   If it is determined in step S140 that the data transfer process is not to be executed, the IDMA control unit 37 omits the process in step S141 and advances the process to step S142.

ステップS142においてIDMA制御部37は、切り替え処理を実行する。すなわち、IDMA制御部37は、ステップS142において、ドライブ22のピックアップが2つあり(1Dev-2OPであり)、リードまたはライト時にOPの切り替えがステータスレポート後の場合、ピックアップを切り替えるターン処理を行い、ターンオフ状態に移行し、ターンオンされるまで待機する。なお、ドライブ22のピックアップが1つの場合や2Dev-2OPの場合、この処理は省略される。ステップS142の処理が終了すると、IDMA制御部37は、ステップS143に処理を進め、GOP処理を終了するか否かを判定し、終了しないと判定した場合、処理をステップS132に戻し、それ以降の処理を繰り返す。また、ステップS143において、GOP処理を終了すると判定した場合、IMDA制御部37は、GOP処理を終了する。   In step S142, the IDMA control unit 37 executes a switching process. That is, in step S142, the IDMA control unit 37 performs a turn process for switching the pickup when there are two pickups of the drive 22 (1 Dev-2OP), and the switching of the OP after the status report at the time of reading or writing, Enter the turn-off state and wait until it is turned on. Note that this process is omitted when the drive 22 has one pickup or 2 Dev-2OP. When the process of step S142 ends, the IDMA control unit 37 advances the process to step S143, determines whether or not to end the GOP process, and determines that it does not end, returns the process to step S132, and thereafter Repeat the process. If it is determined in step S143 that the GOP process is to be ended, the IMDA control unit 37 ends the GOP process.

次に、図40のステップS132において実行されるコマンド開始準備処理の詳細を図41のフローチャートを参照して説明する。   Next, details of the command start preparation process executed in step S132 of FIG. 40 will be described with reference to the flowchart of FIG.

コマンド開始準備処理を開始すると、IDMA制御部37は、ステップS161において、コマンド累積セクタレングスの値がコマンド最終セクタレングスの値と等しく、かつ、変数CMD ENDの値が偽(FALSE)であるか否かを判定する。コマンド累積セクタレングスの値がコマンド最終セクタレングスの値と等しく、かつ、変数CMD ENDの値が偽(FALSE)であると判定した場合、すなわちコマンド発行に続きがないと判定した場合、IDMA制御部37は、次のPRDテーブルに対する処理を開始し、ステップS162に処理を進め、次のPRDテーブルを要求し、ステップS163において、その処理結果に基づいて、次のPRDテーブルが存在するか否かを判定する。   When the command start preparation process is started, in step S161, the IDMA control unit 37 determines whether the command accumulated sector length value is equal to the command final sector length value and the value of the variable CMD END is false (FALSE). Determine whether. If it is determined that the command cumulative sector length value is equal to the command last sector length value and the variable CMD END value is false (FALSE), that is, if it is determined that the command is not issued, the IDMA control unit 37 starts processing for the next PRD table, proceeds to step S162, requests the next PRD table, and in step S163, based on the processing result, determines whether or not the next PRD table exists. judge.

要求に基づいてPRDテーブルを正常に取得し、次のPRDテーブルが存在すると判定した場合、IDMA制御部37は、ステップS164に処理を進め、新しいPRDテーブルの各情報を保持(ラッチ)し、ステップS165において、コマンドスタートLBAをラッチし、ステップS166において、コマンド累積セクタレングスの値を「0」にセットする。   If the PRD table is normally acquired based on the request and it is determined that the next PRD table exists, the IDMA control unit 37 proceeds to step S164, holds (latches) each information of the new PRD table, In step S165, the command start LBA is latched, and in step S166, the value of the command accumulated sector length is set to “0”.

次に、IDMA制御部37は、ステップS167において、データ転送PRDポインタFIFOにPRD番号をセットする。図42は、データ転送PRDポインタFIFOの構成例を示す図である。データ転送PRDポインタFIFO401には、IDMA制御部37が新たなPRDテーブルを取得する度にそのPRDテーブルの番号(PRD番号)が格納され、PRDデータ転送PRDポインタFIFOポインタ402が付加されている。   Next, in step S167, the IDMA control unit 37 sets a PRD number in the data transfer PRD pointer FIFO. FIG. 42 is a diagram illustrating a configuration example of the data transfer PRD pointer FIFO. Each time the IDMA control unit 37 acquires a new PRD table, the data transfer PRD pointer FIFO 401 stores the number of the PRD table (PRD number), and a PRD data transfer PRD pointer FIFO pointer 402 is added.

データ転送PRDポインタFIFOにPRD番号をセットするとIDMA制御部37は、ステップS168において、そのPRDテーブルの処理フラグ164に値「1」をセットし、コマンド開始準備処理を終了し、図40のステップS132に処理を戻す。ステップS132に処理が戻されると、IDMA制御部37は、上述したようにステップS132の処理を終了し、ステップS133に処理を進める。   When the PRD number is set in the data transfer PRD pointer FIFO, in step S168, the IDMA control unit 37 sets the value “1” in the processing flag 164 of the PRD table, ends the command start preparation process, and performs step S132 in FIG. Return processing to. When the process returns to step S132, the IDMA control unit 37 ends the process of step S132 as described above, and proceeds to step S133.

また、ステップS163において、ステップS162の要求に基づいてPRDテーブルを取得できず、次のPRDテーブルが存在しないと判定した場合、IDMA制御部37は、ステップS169に処理を進め、変数CMD ENDの値を真(TRUE)にセットし、コマンド開始準備処理を終了し、図40のステップS132に処理を戻す。ステップS132に処理が戻されると、IDMA制御部37は、上述したようにステップS132の処理を終了し、ステップS133に処理を進める。   In step S163, if the PRD table cannot be acquired based on the request in step S162 and it is determined that the next PRD table does not exist, the IDMA control unit 37 proceeds to step S169 and sets the value of the variable CMD END. Is set to true (TRUE), the command start preparation process is terminated, and the process returns to step S132 in FIG. When the process returns to step S132, the IDMA control unit 37 ends the process of step S132 as described above, and proceeds to step S133.

さらに、ステップS161において、コマンド累積セクタレングスの値がコマンド最終セクタレングスの値と等しくない、または、変数CMD ENDの値が真(TRUE)であると判定した場合、すなわちこのPRDテーブルに対するPRD処理において、コマンド発行に続きがあると判定した場合、IDMA制御部37は、ステップS162乃至ステップS169の処理を省略し、コマンド開始準備処理を終了し、図40のステップS132に処理を戻す。ステップS132に処理が戻されると、IDMA制御部37は、上述したようにステップS132の処理を終了し、ステップS133に処理を進める。   Further, when it is determined in step S161 that the command accumulated sector length value is not equal to the command final sector length value, or the value of the variable CMD END is true (TRUE), that is, in the PRD process for this PRD table. If it is determined that there is a continuation of command issuance, the IDMA control unit 37 omits steps S162 to S169, ends the command start preparation process, and returns the process to step S132 in FIG. When the process returns to step S132, the IDMA control unit 37 ends the process of step S132 as described above, and proceeds to step S133.

IDMA処理部37は、以上のようにしてコマンド開始準備処理を実行し、PRDテーブルを取得し、そのPRDテーブルに含まれる必要な情報を取得する。   The IDMA processing unit 37 executes the command start preparation process as described above, acquires the PRD table, and acquires necessary information included in the PRD table.

次に、図40のステップS133において実行されるコマンド開始処理の詳細を図43のフローチャートを参照して説明する。   Next, details of the command start process executed in step S133 of FIG. 40 will be described with reference to the flowchart of FIG.

最初に、ステップS181において、IDMA制御部37は、コマンド累積セクタレングスの値が「0」であり、かつ、変数CMD ENDの値が偽(FALSE)であるか否かを判定する。   First, in step S181, the IDMA control unit 37 determines whether or not the value of the command accumulated sector length is “0” and the value of the variable CMD END is false.

コマンド累積セクタレングスの値が「0」であり、かつ、変数CMD ENDの値が偽(FALSE)であり、PRDの最初のPIOコマンドに関する処理であると判定した場合、IDMA制御部37は、処理をステップS182に進める。ステップS182において、PIO処理ハードウェア271のIDMA PIO制御部38は、IDMA制御部37に制御され、図34のフローチャートを参照して説明したようなIDMA PIO制御処理を実行する。ただし、この場合、ステップS83においてEOFレジスタの値が真であると判定し、IDMA PIO制御処理を終了したとき、IDMA PIO制御部38は、図43のステップS182に処理を戻す。ステップS182に処理が戻されると、IDMA処理部37は、コマンド開始処理を終了し、図40のステップS133に処理を戻す。ステップS133に処理が戻されると、IDMA制御部37は、上述したようにステップS133の処理を終了し、ステップS134に処理を進める。   When it is determined that the command accumulated sector length value is “0” and the value of the variable CMD END is false (FALSE) and the process is related to the first PIO command of the PRD, the IDMA control unit 37 Advances to step S182. In step S182, the IDMA PIO control unit 38 of the PIO processing hardware 271 is controlled by the IDMA control unit 37, and executes the IDMA PIO control process as described with reference to the flowchart of FIG. However, in this case, when it is determined in step S83 that the value of the EOF register is true and the IDMA PIO control process is completed, the IDMA PIO control unit 38 returns the process to step S182 in FIG. When the process returns to step S182, the IDMA processing unit 37 ends the command start process and returns the process to step S133 of FIG. When the process returns to step S133, the IDMA control unit 37 ends the process of step S133 as described above, and proceeds to step S134.

また、図43のステップS181において、コマンド累積セクタレングスの値が「0」でないか、または、変数CMD ENDの値が真(TRUE)であると判定した場合、IDMA制御部37は、ステップS182の処理を省略し、コマンド開始処理を終了し、図40のステップS133に処理を戻す。ステップS133に処理が戻されると、IDMA制御部37は、上述したようにステップS133の処理を終了し、ステップS134に処理を進める。   If it is determined in step S181 in FIG. 43 that the value of the command accumulated sector length is not “0” or the value of the variable CMD END is true (TRUE), the IDMA control unit 37 performs the process in step S182. The process is omitted, the command start process is terminated, and the process returns to step S133 in FIG. When the process returns to step S133, the IDMA control unit 37 ends the process of step S133 as described above, and proceeds to step S134.

IDMA制御部37は、以上のようにしてコマンド開始処理を実行し、PIOコマンドを発行する。   The IDMA control unit 37 executes the command start process as described above and issues a PIO command.

次に、図44のフローチャートを参照して、図40のステップS134において実行されるコマンド実行処理の詳細を説明する。   Next, details of the command execution process executed in step S134 of FIG. 40 will be described with reference to the flowchart of FIG.

コマンド実行処理を開始したIDMA制御部37は、最初に変数CMD ENDの値が真(TRUE)であるか否かを判定する。変数CMD ENDの値が偽(FALSE)であり、PIOコマンドに続きがあると判定した場合、IDMA制御部37は、ステップS202に処理を進める。ステップS202において、PIO処理ハードウェア271のIDMA PIO制御部38は、IDMA制御部37に制御され、図34のフローチャートを参照して説明したようなIDMA PIO制御処理を実行する。ただし、この場合、ステップS83においてEOFレジスタの値が真であると判定し、IDMA PIO制御処理を終了したとき、IDMA PIO制御部38は、図44のステップS202に処理を戻す。ステップS202に処理が戻されると、IDMA制御部37は、ステップS203に処理を進める。   The IDMA control unit 37 that has started the command execution process first determines whether or not the value of the variable CMD END is true. If the value of the variable CMD END is false (FALSE) and it is determined that there is a continuation of the PIO command, the IDMA control unit 37 advances the process to step S202. In step S202, the IDMA PIO control unit 38 of the PIO processing hardware 271 is controlled by the IDMA control unit 37, and executes the IDMA PIO control process as described with reference to the flowchart of FIG. However, in this case, when it is determined in step S83 that the value of the EOF register is true and the IDMA PIO control process is terminated, the IDMA PIO control unit 38 returns the process to step S202 in FIG. When the process returns to step S202, the IDMA control unit 37 advances the process to step S203.

ステップS203において、IDMA制御部37は、コマンド累積セクタレングスに、1RUBのセクタ数を加算し、コマンド予約RUB数に値「1」を加算し、コマンドTagに値「1」を加算する。そして、IDMA制御部37は、ステップS204において、ターンオフ状態に移行し、ターンオン状態になるまで待機する。なお、ドライブ22のピックアップが1つである場合、この処理は省略される。   In step S203, the IDMA control unit 37 adds the sector number of 1RUB to the command accumulated sector length, adds the value “1” to the command reserved RUB number, and adds the value “1” to the command Tag. In step S204, the IDMA control unit 37 shifts to the turn-off state and waits until the turn-on state is reached. If the drive 22 has one pickup, this process is omitted.

その後、IDMA制御部37は、ステップS205において、予約RUB数が限界キュー数より少なく、ライト/リード設定(RXW)173の値がリードであり、かつ変数CMD ENDの値が真(TRUE)でないか否かを判定する。予約RUB数が限界キュー数より少なく、ライト/リード設定(RXW)173の値がリードであり、かつ変数CMD ENDの値が真(TRUE)でないと判定した場合、IDMA制御部37は、ステップS206に処理を進め、再度コマンド開始準備処理を実行するように制御する。ステップS206の処理を終了するとIDMA制御部37は、コマンド実行処理を終了し、図40のステップS134に処理を戻す。ステップS134に処理が戻されると、IDMA制御部37は、上述したようにステップS134の処理を終了し、ステップS135に処理を進める。   Thereafter, in step S205, the IDMA control unit 37 determines whether the number of reserved RUBs is less than the limit queue number, the value of the write / read setting (RXW) 173 is read, and the value of the variable CMD END is not true (TRUE). Determine whether or not. If it is determined that the number of reserved RUBs is less than the limit queue number, the value of the write / read setting (RXW) 173 is read, and the value of the variable CMD END is not true (TRUE), the IDMA control unit 37 performs step S206. Control is performed so that the command start preparation process is executed again. When the process of step S206 is completed, the IDMA control unit 37 ends the command execution process and returns the process to step S134 of FIG. When the process returns to step S134, the IDMA control unit 37 ends the process of step S134 as described above, and proceeds to step S135.

また、ステップS205において、予約RUB数が限界キュー数より多い、ライト/リード設定(RXW)173の値が書き込み(Write)である、または、変数CMD ENDの値が真(TRUE)であると判定した場合、IDMA制御部37は、データ転送処理に移行するために、ステップS206の処理を省略し、コマンド実行処理を終了し、図40のステップS134に処理を戻す。ステップS134に処理が戻されると、IDMA制御部37は、上述したようにステップS134の処理を終了し、ステップS135に処理を進める。   In step S205, it is determined that the number of reserved RUBs is larger than the limit queue number, the value of the write / read setting (RXW) 173 is “Write”, or the value of the variable CMD END is true (TRUE). In this case, the IDMA control unit 37 omits the process of step S206 to end the command transfer process in order to shift to the data transfer process, and returns the process to step S134 of FIG. When the process returns to step S134, the IDMA control unit 37 ends the process of step S134 as described above, and proceeds to step S135.

さらに、ステップS201において、変数CMD ENDの値が真(TRUE)であると判定した場合、IDMA制御部37は、ステップS202乃至ステップS206の処理を終了し、コマンド実行処理を終了し、図40のステップS134に処理を戻す。ステップS134に処理が戻されると、IDMA制御部37は、上述したようにステップS134の処理を終了し、ステップS135に処理を進める。   Furthermore, when it is determined in step S201 that the value of the variable CMD END is true (TRUE), the IDMA control unit 37 ends the processes of steps S202 to S206, ends the command execution process, and the process illustrated in FIG. The process returns to step S134. When the process returns to step S134, the IDMA control unit 37 ends the process of step S134 as described above, and proceeds to step S135.

IDMA制御部37は、以上のようにしてコマンド実行処理を実行し、PIOコマンドを発行する。   The IDMA control unit 37 executes the command execution process as described above and issues a PIO command.

次に、図45のフローチャートを参照して、図40のステップS136において実行されるデータ転送開始準備処理の詳細を説明する。   Next, details of the data transfer start preparation process executed in step S136 of FIG. 40 will be described with reference to the flowchart of FIG.

データ転送開始準備処理を開始したIDMA制御部37は、最初に、ステップS221において、データ転送累積セクタレングスの値がデータ転送最終セクタレングスと同じであるか否かを判定し、データ転送累積セクタレングスの値がデータ転送最終セクタレングスと同じであると判定した場合、次のPRDテーブルに対する処理を開始するために、ステップS222に処理を進める。   The IDMA control unit 37 that has started the data transfer start preparation process first determines whether or not the value of the data transfer accumulated sector length is the same as the data transfer last sector length in step S221, and the data transfer accumulated sector length is determined. If it is determined that the value of is the same as the last sector length of the data transfer, the process proceeds to step S222 to start the process for the next PRD table.

ステップS222において、IDMA制御部37は、次のデータ転送PRDテーブルが存在するか否かを判定し、存在すると判定した場合、処理をステップS223に進める。ステップS223において、図46に示されるデータ転送SDRAMポインタFIFO421のPRD No.1st/2ndをセットし、ステップS224において、データ転送累積セクタレングスに値「0」をセットし、ステップS225においてデータ転送最終セクタレングスをセットし、ステップS226においてデータ転送スタートLBAをセットする。またステップS227において、この処理に読み出し転送用許可が存在していない場合、ターンオフ(Turn Off)に遷移した後、読み出し転送用許可付きターンオン(Turn On)を取得するまで待機する。取得したターンオンが許可を有していなければ再度ターンオフし、新たな読み出し転送用許可を取得するまで待機する。なお、ドライブ22のピックアップが1つである場合、この処理は省略される。   In step S222, the IDMA control unit 37 determines whether or not the next data transfer PRD table exists. If it is determined that the next data transfer PRD table exists, the process proceeds to step S223. In step S223, the PRD No. 1st / 2nd of the data transfer SDRAM pointer FIFO 421 shown in FIG. 46 is set. In step S224, the value “0” is set in the data transfer accumulated sector length. In step S225, the data transfer last sector is set. The length is set, and the data transfer start LBA is set in step S226. In step S 227, if there is no read transfer permission in this process, after transitioning to turn-off (Turn Off), the process waits until obtaining a turn-on with read transfer permission (Turn On). If the acquired turn-on does not have permission, it is turned off again and waits until a new permission for read transfer is obtained. If the drive 22 has one pickup, this process is omitted.

ステップS227の処理を終了すると、IDMA制御部37は、データ転送開始準備処理を終了し、処理を図40のステップS136に戻す。ステップS136に処理が戻されると、IDMA制御部37は、上述したようにステップS136の処理を終了し、ステップS137に処理を進める。   When the process of step S227 ends, the IDMA control unit 37 ends the data transfer start preparation process and returns the process to step S136 of FIG. When the process returns to step S136, the IDMA control unit 37 ends the process of step S136 as described above, and proceeds to step S137.

なお、図46において、1つのPRDテーブルで読み出しまたは書き込みのDMA処理を行うが、SDRAMアドレスはいくつかに分割されている可能性がある。そこで、1つのPRDテーブルの読み出し処理または書き込み処理で分割処理すべきSDRAM情報が1番目から最後までこのFIFOに格納されるようにし、この情報からSDRAMアドレスおよび長さ(セクタ数)がDMA実行部39に渡されるようにする。SDRAMアドレスが書かれているPRD番号1番目と2番目の情報がこのFIFOに格納されることになる。   In FIG. 46, read or write DMA processing is performed with one PRD table, but the SDRAM address may be divided into several parts. Therefore, SDRAM information to be divided in one PRD table read process or write process is stored in this FIFO from the first to the last, and from this information, the SDRAM address and length (number of sectors) are DMA execution units. 39. The first and second information of the PRD number in which the SDRAM address is written is stored in this FIFO.

図45のステップS221において、データ転送累積セクタレングスがデータ転送最終セクタレングスと等しくないと判定した場合、コマンド発行の続きがあるので、IDMA制御部37は、ステップS222乃至ステップS226の処理を省略し、ステップS227に処理を進める。   In step S221 of FIG. 45, if it is determined that the data transfer accumulated sector length is not equal to the data transfer final sector length, there is a continuation of command issuance, so the IDMA control unit 37 omits the processing of steps S222 to S226. Then, the process proceeds to step S227.

また、ステップS222において、次のデータ転送PRDが存在しないと判定した場合、1GOPの処理が終了したので、IDMA制御部37は、ステップS228に処理を進め、ターンオフ状態に移行し、データ転送開始準備処理を終了するとともに、図40のGOP処理を終了する。なお、ドライブ22のピックアップが1つである場合、ステップS228の処理は省略される。   If it is determined in step S222 that the next data transfer PRD does not exist, 1GOP processing is completed, so the IDMA control unit 37 proceeds to step S228, shifts to a turn-off state, and prepares for data transfer start. The process is terminated and the GOP process of FIG. 40 is terminated. If the drive 22 has one pickup, the process of step S228 is omitted.

次に、図47のフローチャートを参照して、図40のステップS137において実行されるデータ転送開始準備処理の詳細を説明する。   Next, details of the data transfer start preparation process executed in step S137 of FIG. 40 will be described with reference to the flowchart of FIG.

データ転送開始準備処理を開始したIDMA制御部37は、最初にステップS241において、コマンドが読み出しで読み出し転送用許可が無い場合、ターンオフ状態に移行し、読み出し転送用許可付きターンオン状態に移行するまで待機する。また、ターンオン状態に移行しても、読み出し転送用許可付きでないターンオン状態に移行した場合、IDMA制御部37は、もう一度ターンオフ状態に移行し、再度読み出し転送用許可付きターンオン状態に移行するまで待機する。   The IDMA control unit 37 that has started the data transfer start preparation process first shifts to a turn-off state when the command is read and does not have permission for read transfer in step S241, and waits until it shifts to a turn-on state with read transfer permission. To do. Further, even when the turn-on state is entered, when the turn-on state is entered without permission for read transfer, the IDMA control unit 37 waits until the turn-on state is entered again and the read transfer permission is entered again. .

読み出し転送用許可付きターンオン状態に移行すると、IDMA制御部37は、ステップS242に処理を進める。なお、ドライブ22のピックアップが1つである場合、この処理は省略される。IDMA PIO制御部38は、IMDA制御部37に制御され、図34のフローチャートを参照して説明したようなIDMA PIO制御処理を実行する。ただし、この場合、ステップS83においてEOFレジスタの値が真であると判定し、IDMA PIO制御処理を終了したとき、IDMA PIO制御部38は、図47のステップS242に処理を戻す。ステップS242に処理が戻されると、IDMA制御部37は、データ転送サービス処理を終了し、図40のステップS137に処理を戻す。ステップS137に処理が戻されると、IDMA制御部37は、上述したようにステップS137の処理を終了し、ステップS138に処理を進める。   When transitioning to the turn-on state with permission for read transfer, the IDMA control unit 37 advances the process to step S242. If the drive 22 has one pickup, this process is omitted. The IDMA PIO control unit 38 is controlled by the IMDA control unit 37 and executes the IDMA PIO control process as described with reference to the flowchart of FIG. However, in this case, when it is determined in step S83 that the value of the EOF register is true and the IDMA PIO control process is terminated, the IDMA PIO control unit 38 returns the process to step S242 in FIG. When the process returns to step S242, the IDMA control unit 37 ends the data transfer service process and returns the process to step S137 of FIG. When the process returns to step S137, the IDMA control unit 37 ends the process of step S137 as described above, and proceeds to step S138.

次に、図48のフローチャートを参照して、図40のステップS138において実行されるデータ転送実行処理の詳細を説明する。   Next, details of the data transfer execution process executed in step S138 of FIG. 40 will be described with reference to the flowchart of FIG.

データ転送実行処理を開始したIDMA制御部37は、最初にステップS261において、PRDテーブルのNo Data Transfer162の値が「1」であるか否かを判定する。No Data Transfer162の値が「1」ではないと判定した場合、IDMA制御部37は、ステップS262に処理を進め、DMA処理ハードウェア273のDMA実行部39にSTARTコマンドを供給し、DMAデータ転送を開始させる。   The IDMA control unit 37 that has started the data transfer execution process first determines whether or not the value of No Data Transfer 162 in the PRD table is “1” in step S261. If it is determined that the value of No Data Transfer 162 is not “1”, the IDMA control unit 37 advances the process to step S262, supplies a START command to the DMA execution unit 39 of the DMA processing hardware 273, and performs DMA data transfer. Let it begin.

ステップS262の処理が終了すると、IDMA制御部37は、ステップS263に処理を進め、PRDテーブル(またはSDRAMアドレス追加設定テーブル)を参照し、次のSDRAMアドレスが存在するか否かを判定する。次のSDRAMアドレスが存在すると判定した場合、IDMA制御部37は、ステップS264に処理を進め、図46に示されるデータ転送SDRAM Adrs,LengthポインタFIFOポインタ422の値を「1」インクリメントさせ、ステップS265において、そのデータ転送SDRAM Adrs,LengthポインタFIFOポインタ422の値に対応するSDRAMのアドレスおよびレングスの情報をDMA実行部39に供給する。ステップS265の処理を終了すると、IDMA制御部37は、ステップS263に処理を戻し、それ以降の処理を繰り返す。   When the process of step S262 ends, the IDMA control unit 37 advances the process to step S263, refers to the PRD table (or SDRAM address additional setting table), and determines whether the next SDRAM address exists. If it is determined that the next SDRAM address exists, the IDMA control unit 37 proceeds to step S264 to increment the value of the data transfer SDRAM Adrs, Length pointer FIFO pointer 422 shown in FIG. 46 by “1”, and then proceeds to step S265. At this time, the address and length information of the SDRAM corresponding to the value of the data transfer SDRAM Adrs, Length pointer FIFO pointer 422 are supplied to the DMA execution unit 39. When the process of step S265 ends, the IDMA control unit 37 returns the process to step S263 and repeats the subsequent processes.

ステップS263乃至ステップS265の処理を繰り返し、全てのSDRAMアドレスについて処理を行ったIDMA制御部37は、ステップS263において、次のSDRAMアドレスが存在せず、データ転送終了待ちであると判定した場合、データ転送実行処理を終了し、図40のステップS138に処理を戻す。ステップS138に処理が戻されると、IDMA制御部37は、上述したようにステップS138の処理を終了し、ステップS139に処理を進める。   The IDMA control unit 37 that has performed the processing of all the SDRAM addresses by repeating the processing of Step S263 to Step S265 determines that the next SDRAM address does not exist and is waiting for the end of data transfer in Step S263. The transfer execution process ends, and the process returns to step S138 in FIG. When the process returns to step S138, the IDMA control unit 37 ends the process of step S138 as described above, and proceeds to step S139.

また、ステップS261において、PRDテーブルのNo Data Transfer162の値が「1」であると判定した場合、IDMA制御部37は、データ転送実行処理を終了し、図40のステップS138に処理を戻す。ステップS138に処理が戻されると、IDMA制御部37は、上述したようにステップS138の処理を終了し、ステップS139に処理を進める。   If it is determined in step S261 that the value of No Data Transfer 162 in the PRD table is “1”, the IDMA control unit 37 ends the data transfer execution process and returns the process to step S138 of FIG. When the process returns to step S138, the IDMA control unit 37 ends the process of step S138 as described above, and proceeds to step S139.

次に、その図40のステップS139において実行されるデータ転送状態報告処理の詳細を、図49のフローチャートを参照して説明する。   Next, details of the data transfer status report processing executed in step S139 of FIG. 40 will be described with reference to the flowchart of FIG.

データ転送状態報告処理を開始したIDMA制御部37は、最初にステップS281において、コマンドが「Write」であり(実行された処理が書き込み処理であり)、ドライブ22のOP(ピックアップ)の切り替えタイミングが状態報告前の場合、ターンオフ状態に移行した後、ターンオン状態に移行するまで待機する。なお、ドライブ22のピックアップが1つである場合、この処理は省略される。   In step S281, the IDMA control unit 37 that has started the data transfer status reporting process first has a command “Write” (the executed process is a write process), and the OP (pickup) switching timing of the drive 22 is determined. In the case of before the status report, after transitioning to the turn-off state, wait until the transition to the turn-on state. If the drive 22 has one pickup, this process is omitted.

ターンオン状態に移行した、または、ドライブ22のピックアップが1つである場合、IDMA制御部73は、ステップS282に処理を進める。ステップS282において、IDMA PIO制御部38は、IMDA制御部37に制御され、図34のフローチャートを参照して説明したようなIDMA PIO制御処理を実行する。ただし、この場合、ステップS83においてEOFレジスタの値が真であると判定し、IDMA PIO制御処理を終了したとき、IDMA PIO制御部38は、図47のステップS282に処理を戻す。ステップS282に処理が戻されると、IDMA制御部37は、処理をステップS283に進める。   When the turn-on state is entered or the drive 22 has only one pickup, the IDMA control unit 73 advances the process to step S282. In step S282, the IDMA PIO control unit 38 is controlled by the IMDA control unit 37, and executes the IDMA PIO control process as described with reference to the flowchart of FIG. However, in this case, when it is determined in step S83 that the value of the EOF register is true and the IDMA PIO control process is terminated, the IDMA PIO control unit 38 returns the process to step S282 in FIG. When the process returns to step S282, the IDMA control unit 37 advances the process to step S283.

IDMA制御部37は、ステップS283において、データ転送累積セクタレングスの値を1RUBのセクタ数分インクリメントし、ステップS284において、コマンド予約RUB数を「1」デクリメントし、ステップS285において、データ転送Tag数を「1」インクリメントし、ステップS286において、データ転送累積セクタレングスがデータ転送PRDセクタに一致するか否かを判定し、一致すると判定した場合、IDMA制御部37は、図40のステップS141において、データ転送終了処理を実行するように制御し、データ転送状態報告処理を終了し、図40のステップS139に処理を戻す。ステップS139に処理が戻されると、IDMA制御部37は、上述したようにステップS139の処理を終了し、ステップS140に処理を進める。   In step S283, the IDMA control unit 37 increments the data transfer accumulated sector length value by the number of sectors of 1 RUB. In step S284, the IDMA control unit 37 decrements the command reserved RUB number by “1”. In step S285, the IDMA control unit 37 decrements the number of data transfer tags. Incremented by "1", and in step S286, it is determined whether or not the data transfer accumulated sector length matches the data transfer PRD sector. If it is determined that the data transfer PRD sector matches, the IDMA control unit 37 determines in step S141 in FIG. Control is performed to execute the transfer end process, the data transfer state report process is ended, and the process returns to step S139 in FIG. When the process returns to step S139, the IDMA control unit 37 ends the process of step S139 as described above, and proceeds to step S140.

また、図49のステップS286において、データ転送累積セクタレングスがデータ転送PRDセクタに一致しないと判定した場合、IDMA制御部37は、図40のステップS141において、データ転送終了処理を実行しないように制御し、データ転送状態報告処理を終了し、図40のステップS139に処理を戻す。ステップS139に処理が戻されると、IDMA制御部37は、上述したようにステップS139の処理を終了し、ステップS140に処理を進める。   49, if it is determined in step S286 that the data transfer accumulated sector length does not match the data transfer PRD sector, the IDMA control unit 37 performs control so as not to execute the data transfer end process in step S141 of FIG. Then, the data transfer status reporting process is terminated, and the process returns to step S139 in FIG. When the process returns to step S139, the IDMA control unit 37 ends the process of step S139 as described above, and proceeds to step S140.

次に、図50のフローチャートを参照してデータ転送終了処理の例を説明する。   Next, an example of the data transfer end process will be described with reference to the flowchart of FIG.

ステップS301において、IDMA PIO制御部38は、IMDA制御部37に制御され、図34のフローチャートを参照して説明したようなIDMA PIO制御処理を実行する。ただし、この場合、ステップS83においてEOFレジスタの値が真であると判定し、IDMA PIO制御処理を終了したとき、IDMA PIO制御部38は、図50のステップS301に処理を戻す。ステップS301に処理が戻されると、IDMA制御部37は、処理をステップS302に進める。   In step S301, the IDMA PIO control unit 38 is controlled by the IMDA control unit 37, and executes the IDMA PIO control process as described with reference to the flowchart of FIG. However, in this case, when it is determined in step S83 that the value of the EOF register is true and the IDMA PIO control process is terminated, the IDMA PIO control unit 38 returns the process to step S301 in FIG. When the process returns to step S301, the IDMA control unit 37 advances the process to step S302.

IDMA制御部37は、ステップS302において、PRDテーブルの完了フラグの値を「1」にセットし、処理フラグの値を「0」にセットし、ステップS303において、1PRD処理終了によるCPU割り込みをセットする。   In step S302, the IDMA control unit 37 sets the value of the completion flag of the PRD table to “1”, sets the value of the processing flag to “0”, and sets a CPU interrupt due to the end of 1PRD processing in step S303. .

ステップS304において、IDMA制御部37は、領域113Fの割り込み要因設定を参照して単一PRD終了時一時停止フラグ247の値が「1」であるか否かを判定し、値が「1」であると判定した場合、一時停止中であるので、ステップS305に処理を進め、一時停止が解除されるまで待機する。   In step S304, the IDMA control unit 37 determines whether or not the value of the temporary stop flag 247 at the end of the single PRD is “1” with reference to the interrupt factor setting in the area 113F, and the value is “1”. If it is determined that there is, it is paused, so the process proceeds to step S305 and waits until the pause is released.

一時停止が解除されると、IDMA制御部37は、処理をステップS306に進める。また、ステップS304において、単一PRD終了時一時停止フラグ247の値が「1」ではなく、一時停止中でないと判定した場合、IDMA制御部37は、処理をステップS306に進める。   When the temporary stop is released, the IDMA control unit 37 advances the process to step S306. In step S304, if the value of the temporary stop flag 247 at the end of the single PRD is not “1” and it is determined that the pause is not in progress, the IDMA control unit 37 advances the process to step S306.

ステップS306において、IDMA制御部37は、データ転送PRDポインタFIFOポインタの値を「1」インクリメントし、データ転送終了処理を終了し、図40のステップS141に処理を戻す。ステップS141に処理が戻されると、IDMA制御部37は、上述したようにステップS141の処理を終了し、ステップS142に処理を進める。   In step S306, the IDMA control unit 37 increments the value of the data transfer PRD pointer FIFO pointer by “1”, ends the data transfer end process, and returns the process to step S141 in FIG. When the process returns to step S141, the IDMA control unit 37 ends the process of step S141 as described above, and proceeds to step S142.

以上のように、ATAホストハードウェア21のIDMA PRD制御ハードウェア272が、PIO処理ハードウェア271およびDMA処理ハードウェア273を制御しながら、複数のPRDテーブルに基づいて、連続してPIO処理やDMA処理を実行するため、図51に示されるように、CPU23は、最初にATAホストハードウェア21にアクセスして、PRDテーブルやDMA PIOスクリプト等を供給し、実行を指示するだけで、複数のPIO処理およびDMA処理が実行される。   As described above, the IDMA PRD control hardware 272 of the ATA host hardware 21 controls the PIO processing hardware 271 and the DMA processing hardware 273 while continuously performing PIO processing and DMA based on a plurality of PRD tables. In order to execute the processing, as shown in FIG. 51, the CPU 23 first accesses the ATA host hardware 21, supplies a PRD table, a DMA PIO script, etc. Processing and DMA processing are executed.

従って、CPU23とATAホストハードウェア21とのアクセスは、最初と最後の2回のみでよく、ATAデバイスのPIO用レジスタ(レジスタ(PIO))53AやDMA用レジスタ(レジスタ(DMA))53BへのアクセスはATAホストハードウェア21がCPU23のアクセス無しに連続して実行するので、PIO処理やDMA処理によるバス42の占有率を低減させることができるだけでなく、CPU23のデータ転送処理による負荷を軽減させることができ、CPU23がより容易にデータを転送することができる。   Therefore, the CPU 23 and the ATA host hardware 21 need only access the first and last two times, and access to the PIO register (register (PIO)) 53A and the DMA register (register (DMA)) 53B of the ATA device. Since access is continuously executed by the ATA host hardware 21 without the CPU 23 access, not only can the bus 42 occupy the PIO processing and DMA processing but also the data transfer processing of the CPU 23 can be reduced. CPU 23 can transfer data more easily.

なお、図7を参照して説明したように、以上のIDMA転送モードにおいて、強制終了命令(アボート命令)により、図40のフローチャートを参照して説明したGOP処理も、IDMA PIO制御処理の場合と同様に、強制終了される場合がある。しかしながら、IDMA PRD制御ハードウェア272のIDMA制御部37は、PIO処理ハードウェア271を制御し、GOP処理の途中でIDMA PIO制御処理を実行させたり、DMA処理ハードウェア273のDMA実行部39を制御してDMA処理を実行させたりする。このときに、アボート処理(強制終了処理)が行われ、IDMA制御部37が処理を終了すると、処理を実行中の各部は、処理結果をIDMA制御部37に返却できず、不都合が生じる恐れがある。   As described with reference to FIG. 7, in the IDMA transfer mode described above, the GOP process described with reference to the flowchart of FIG. 40 by the forced termination instruction (abort instruction) is also the case of the IDMA PIO control process. Similarly, it may be forcibly terminated. However, the IDMA control unit 37 of the IDMA PRD control hardware 272 controls the PIO processing hardware 271 to execute the IDMA PIO control processing in the middle of the GOP processing, or controls the DMA execution unit 39 of the DMA processing hardware 273. To execute DMA processing. At this time, when the abort process (forced termination process) is performed and the IDMA control unit 37 terminates the process, each unit that is executing the process cannot return the processing result to the IDMA control unit 37, which may cause inconvenience. is there.

そこで、IDMA制御部37は、アボート処理を行う際に、処理を実行させた各部が、その処理を完了させるまで待機する。   Therefore, when performing the abort process, the IDMA control unit 37 waits until each unit that has executed the process completes the process.

図52のフローチャートを参照して、IDMA制御部37によるアボート処理を説明する。   The abort process performed by the IDMA control unit 37 will be described with reference to the flowchart of FIG.

アボート命令が発生し、アボート処理を開始したIDMA制御部37は、ステップS321において、PIO処理ハードウェア271のIDMA PIO制御部38に処理を依頼し、その処理が実行中であるか否かを判定する。IDMA制御部37は、実行中のGOP処理において、IDMA PIO制御部38に処理を依頼し、その処理が実行中であると判定した場合、処理をステップS322に進め、IDMA PIO制御部38の処理が終了するまで待機する。IDMA PIO制御部38の処理が終了し、処理結果が返却されると、IDMA制御部37は、次に、ステップS323に処理を進め、DMA処理ハードウェア273のDMA実行部39に処理を依頼し、その処理が実行中であるか否かを判定する。IDMA制御部37は、実行中のGOP処理において、DMA実行部39に処理を依頼し、その処理が実行中であると判定した場合、処理をステップS324に進め、DMA実行部39の処理が終了するまで待機する。DMA実行部39の処理が終了し、処理結果が返却されると、IDMA制御部37は、ステップS325に処理を進め、実行中のGOP処理を終了させ、アボート処理を終了する。   In step S321, the IDMA control unit 37 that has generated an abort command and started the abort process requests the IDMA PIO control unit 38 of the PIO processing hardware 271, and determines whether the process is being executed. To do. When the IDMA control unit 37 requests the IDMA PIO control unit 38 to perform the process in the GOP process being executed and determines that the process is being executed, the process proceeds to step S322, and the process of the IDMA PIO control unit 38 Wait until is finished. When the processing of the IDMA PIO control unit 38 is completed and the processing result is returned, the IDMA control unit 37 then proceeds to step S323 and requests the DMA execution unit 39 of the DMA processing hardware 273 to perform the processing. It is determined whether the process is being executed. When the IDMA control unit 37 requests the DMA execution unit 39 to perform processing in the GOP processing being executed and determines that the processing is being executed, the process proceeds to step S324, and the processing of the DMA execution unit 39 ends. Wait until When the processing of the DMA execution unit 39 ends and the processing result is returned, the IDMA control unit 37 advances the processing to step S325, ends the GOP processing being executed, and ends the abort processing.

また、ステップS321において、IDMA PIO制御部38に処理を依頼しておらず、その処理が実行中でないと判定した場合、IDMA制御部37は、ステップS322の処理を省略してステップS323に処理を進める。同様に、ステップS323において、DMA実行部39に処理を依頼しておらず、その処理が実行中でないと判定した場合、IDMA制御部37は、ステップS324の処理を省略してステップS325に処理を進め、待機せずに実行中のGOP処理を終了させた後、アボート処理を終了する。   In step S321, if the IDMA PIO control unit 38 is not requested to perform the process and it is determined that the process is not being executed, the IDMA control unit 37 omits the process in step S322 and performs the process in step S323. Proceed. Similarly, in step S323, if the DMA execution unit 39 has not been requested to perform processing and it is determined that the processing is not being executed, the IDMA control unit 37 skips step S324 and proceeds to step S325. Proceed, finish the GOP process being executed without waiting, and then end the abort process.

以上のように、IDMA PIO制御部38およびDMA実行部39の処理を待機してからアボートすることにより、IDMA制御部37は、安全にGOP処理をアボート(強制終了)させることができる。   As described above, by waiting after the processes of the IDMA PIO control unit 38 and the DMA execution unit 39 are aborted, the IDMA control unit 37 can safely abort (forcibly terminate) the GOP process.

以上においては、ドライブ22のピックアップが1つの場合について説明した。しかしながら、これ以外にも、ドライブ22が、例えば、ピックアップが複数存在する場合であっても上述した処理を行うことができる。ただし、その場合、後述するように、各ピックアップについて上述した処理を行うようにする必要がある。以下においては、ドライブ22にピックアップが2つ存在する場合について説明する。   In the above, the case where the drive 22 has one pickup has been described. However, besides this, the drive 22 can perform the above-described processing even when there are a plurality of pickups, for example. However, in that case, as described later, it is necessary to perform the processing described above for each pickup. In the following, a case where there are two pickups in the drive 22 will be described.

記録媒体にデータを読み書きするためのピックアップを2つ有するドライブは、例えば、両方のピックアップで書き込み処理や読み出し処理を同時に行うようにすることにより、ピックアップを1つ有するドライブと比較して2倍のレートで書き込み処理や読み出し処理を行うことができる。また、2つのピックアップが同じデータを書き込んだり、読み出したりすることにより、このようなドライブは、読み出し処理や書き込み処理の信頼性を向上させることもできる。   A drive having two pickups for reading and writing data to and from a recording medium, for example, can perform writing and reading processes simultaneously on both pickups, so that it is twice that of a drive having one pickup. Write processing and read processing can be performed at a rate. In addition, when two pickups write or read the same data, such a drive can also improve the reliability of the reading process and the writing process.

また、一方のピックアップで書き込み処理を行いながら、他方のピックアップでその書き込んだデータの読み出し処理を行うことにより、ドライブは、そのデータが記録媒体に正常に記録されているか否かを確認しながら書き込み処理を行うこともできる。さらに、一方のピックアップが読み出し処理を行っている間に、他方のピックアップがバックグラウンド処理により読み出されているデータと異なるデータの書き込み処理を行うこともできる。   In addition, while performing the writing process with one pickup and reading the written data with the other pickup, the drive writes while confirming whether the data is normally recorded on the recording medium. Processing can also be performed. Further, while one pickup is performing the reading process, the other pickup can perform a data writing process different from the data read by the background process.

このようなドライブにおいては、以上のように、各ピックアップは、あるときは連携して動作し、あるときは独立して動作するようにするために、互いに独立して制御される必要がある。すなわち、このようにドライブが複数のピックアップを有する場合、ATAホストハードウェア21が、上述したスルーPIO転送モードやIDMA転送モードに関する処理を、各ピックアップに対して実行できるようにする必要がある。   In such a drive, as described above, the pickups need to be controlled independently of each other in order to operate in cooperation in some cases and to operate independently in other cases. That is, when the drive has a plurality of pickups as described above, it is necessary for the ATA host hardware 21 to be able to execute the above-described processing related to the through PIO transfer mode and the IDMA transfer mode for each pickup.

しかしながら、ATAの規格において、ATAデバイスが複数のピックアップを有する場合についてのプロトコルは存在しない。すなわち、2つのピックアップを有するドライブを上述したように動作させることはATAの規格において規定されていない。   However, in the ATA standard, there is no protocol for a case where an ATA device has a plurality of pickups. That is, operating the drive having two pickups as described above is not defined in the ATA standard.

そこで、上述したようにATAの規格に準拠した方法でこのようなドライブを上述したように動作させるためには、2つのピックアップを有するドライブが、ATAの規格上において、図53Aに示されるように、1つのピックアップを有する2台のデバイスとして見せかけるように動作させてデータ転送を行うか、図53Bに示されるように、1つのピックアップを有する1台のデバイスとしてみせかけるように動作させてデータ転送を行うかする必要がある。   Therefore, in order to operate such a drive as described above in a manner compliant with the ATA standard as described above, a drive having two pickups is shown in FIG. 53A on the ATA standard. Data transfer is performed by operating as two devices having one pickup, or data transfer is performed by operating as one device having one pickup, as shown in FIG. 53B. Need to do.

図53Aにおいて、ATAホストハードウェア21は、ATAの規格上において、ドライブの2つのピックアップOP0とOP1がデバイス431とデバイス432の2つのデバイスであるかのようにデータ転送を行うようになされている。これに対して、図53Bの場合、ATAホストハードウェア21は、ATAの規格上において、ドライブの2つのピックアップOP0とOP1を隠し、1台のデバイス433としてデータ転送を行うようになされている。   In FIG. 53A, the ATA host hardware 21 performs data transfer as if the two pickups OP0 and OP1 of the drive are two devices of the device 431 and the device 432 on the ATA standard. . On the other hand, in the case of FIG. 53B, the ATA host hardware 21 conceals the two pickups OP0 and OP1 of the drive and performs data transfer as one device 433 on the ATA standard.

実際には、ATAホストハードウェア21は、いずれの場合においても、図54に示されるように、ドライブの2つのピックアップ(OP0とOP1)のそれぞれに対して、コマンドを発行し、データ転送を行う。例えば、図54においては、ピックアップOP0に対してNo.0のGOP処理とNo.3のGOP処理を行い、ピックアップOP1に対してNo.1のGOP処理と、No.2のGOP処理と、No.4のGOP処理を行っているが、このとき、各ピックアップのDMA転送は、見かけ上並行して進行するように、1RUBずつ交互に行われるようになされている。すなわち、ATAホストハードウェア21は、OP0に対する処理とOP1に対する処理を並行して進行させ、ドライブとやりとりを行う際には、所定の単位で交互に行うことにより、これらの複数のピックアップに対して見かけ上同時に処理を行っているように動作する。   Actually, in any case, the ATA host hardware 21 issues a command and transfers data to each of the two pickups (OP0 and OP1) of the drive as shown in FIG. . For example, in FIG. 54, the No. 0 GOP process and the No. 3 GOP process are performed on the pickup OP0, the No. 1 GOP process, the No. 2 GOP process, .4 GOP processing is performed. At this time, DMA transfer of each pickup is performed alternately by 1 RUB so as to proceed in parallel. In other words, the ATA host hardware 21 advances the processing for OP0 and the processing for OP1 in parallel, and when exchanging with the drive, the ATA host hardware 21 alternately performs them in a predetermined unit so that these multiple pickups are handled. It works as if it were processing at the same time.

なお、上述したように、ATAホストハードウェア21によるデータ転送には、スルーPIO転送モードとIDMAデータ転送モードがある。しかしながら、スルーPIOモードにおいては、各コマンドの発行やデータ転送が独立しており、ATAホストハードウェア21は、それらの処理を各ピックアップに対して交互に行えばよいので、各PIO処理が対応するピックアップを識別することができるようにすれば、各ピックアップに対する制御を、上述したピックアップが1つの場合と基本的に同様の動作で実現することができる。   As described above, the data transfer by the ATA host hardware 21 includes the through PIO transfer mode and the IDMA data transfer mode. However, in the through PIO mode, each command issuance and data transfer are independent, and the ATA host hardware 21 only needs to perform these processes alternately for each pickup, so each PIO process corresponds. If the pickups can be identified, the control for each pickup can be realized by basically the same operation as in the case of one pickup described above.

しかしながら、IDMA転送モードにおいては、各DMA処理が複数のフェーズよりなり、さらに読み出し処理においては、各DMA処理の一部を並行して行うので、ATAホストハードウェア21は、それらの処理の進行を制御(管理)する必要がある。以下においては、ATAホストハードウェア21による、このようなIDMA転送モードにおける制御について説明する。   However, in the IDMA transfer mode, each DMA process is composed of a plurality of phases, and in the read process, part of each DMA process is performed in parallel, so the ATA host hardware 21 proceeds with the process. It is necessary to control (manage). In the following, the control in the IDMA transfer mode by the ATA host hardware 21 will be described.

図55は、ドライブ22が2つのピックアップOP0およびOP1を有する場合の、IDMA転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。   FIG. 55 is a diagram showing functional blocks of the ATA host hardware 21 in the IDMA transfer mode when the drive 22 has two pickups OP0 and OP1.

上述したように、ATAホストハードウェア21は、各ピックアップに対してそれぞれGOP処理を行い、さらに、それらの処理の手順を制御する必要がある。すなわち、OP0とOP1に割り振られた複数のPRD処理をそれぞれのOPに対して行うように並列分岐(フォーク(fork))し、各処理が終了した後に並列分岐した処理を1つにまとめる処理(ジョイン(join))を行う必要がある。   As described above, the ATA host hardware 21 needs to perform GOP processing for each pickup and control the processing procedure. That is, a process of performing parallel branching (fork) so that a plurality of PRD processes allocated to OP0 and OP1 are performed for each OP, and processing that branches in parallel after each process is completed (fork) It is necessary to perform a join.

IDMA制御部37は、このような制御処理を行うために、各PRD処理をフォークさせて、処理終了後にジョインさせるように制御するクラウド処理を行うクラウド処理部441、フォークされたOP0に対するGOP処理を行うOP0用GOP処理部442、フォークされたOP1に対するGOP処理を行うOP1用GOP処理部443、OP0用GOP処理部442およびOP1用GOP処理部443がそれぞれPIO処理ハードウェア271の各部およびDMA実行部39(DMA処理ハードウェア273)を制御できるように切り替え処理を行うセレクタ444Aおよび444Bにより構成される。なお、以下において、セレクタ444Aとセレクタ444Bとを区別する必要の無い場合、セレクタ444と称する。   In order to perform such a control process, the IDMA control unit 37 forks each PRD process and performs a cloud process for performing control so that the PRD process is joined after the process is completed, and performs a GOP process for the forked OP0. The OP0 GOP processing unit 442, the OP1 GOP processing unit 443 that performs GOP processing on the forked OP1, the OP0 GOP processing unit 442, and the OP1 GOP processing unit 443 are each a part of the PIO processing hardware 271 and a DMA execution unit. 39 (DMA processing hardware 273) is configured by selectors 444A and 444B that perform switching processing. Hereinafter, when it is not necessary to distinguish between the selector 444A and the selector 444B, they are referred to as a selector 444.

なお、ここで、GOP処理とは、1つのピックアップに対する読み出し処理または書き込み処理のいずれか一方のみにより構成されるPRD処理を複数まとめた処理を示すものとする。すなわち、OP0用GOP処理部442において実行されるGOP処理は、ピックアップOP0に対する読み出し処理のPRD処理、またはピックアップOP0に対する書き込み処理のPRD処理の少なくとも一方により構成される複数のPRD処理であり、OP1用GOP処理部443において実行されるGOP処理は、ピックアップOP1に対する読み出し処理のPRD処理、またはピックアップOP1に対する書き込み処理のPRD処理の少なくとも一方により構成される複数のPRD処理である。   Here, the GOP process indicates a process in which a plurality of PRD processes configured by only one of the read process and the write process for one pickup are combined. That is, the GOP process executed in the OP0 GOP processing unit 442 is a plurality of PRD processes configured by at least one of a read process PRD process for the pickup OP0 and a write process PRD process for the pickup OP0. The GOP process executed in the GOP processing unit 443 is a plurality of PRD processes configured by at least one of a read process PRD process for the pickup OP1 and a write process PRD process for the pickup OP1.

IDMA制御部37のクラウド処理部441は、SRAM52に格納されたPRDテーブルを取得すると、OP0用GOP処理部442またはOP1用GOP処理部443の、そのPRDテーブルによるPRD処理が対応する方を制御してそのPRDテーブルによるPRD処理を実行させる。   When the cloud processing unit 441 of the IDMA control unit 37 acquires the PRD table stored in the SRAM 52, the cloud processing unit 441 controls which of the PRD processes by the PRD table of the OP0 GOP processing unit 442 or OP1 GOP processing unit 443 corresponds. The PRD process is executed by the PRD table.

OP0用GOP処理部442は、クラウド処理部441より制御されて、OP0用の各PRD処理を実行し、PIO処理ハードウェア271の各部やDMA実行部39を制御して、OP0に対するGOP処理を行う。   The OP0 GOP processing unit 442 is controlled by the cloud processing unit 441 to execute each PRD process for OP0, and controls each unit of the PIO processing hardware 271 and the DMA execution unit 39 to perform GOP processing for OP0. .

OP1用GOP処理部442は、クラウド処理部441より制御されて、OP1用の各PRD処理を実行し、PIO処理ハードウェア271の各部やDMA実行部39を制御して、OP1に対するGOP処理を行う。   The OP1 GOP processing unit 442 is controlled by the cloud processing unit 441 to execute each PRD process for OP1, and controls each unit of the PIO processing hardware 271 and the DMA execution unit 39 to perform GOP processing for OP1. .

セレクタ444Aは、必要に応じて、OP0用GOP処理部442やOP1用GOP処理部442を、PIO処理ハードウェア271の各部に接続し、セレクタ444Aは、必要に応じて、OP0用GOP処理部442やOP1用GOP処理部442を、DMA実行部39に接続する。   The selector 444A connects the OP0 GOP processing unit 442 and the OP1 GOP processing unit 442 to each unit of the PIO processing hardware 271, and the selector 444A selects the OP0 GOP processing unit 442 as necessary. And the OP1 GOP processing unit 442 is connected to the DMA execution unit 39.

以下において、上述した1つのピックアップを有する2台のデバイスとして見せかけるように動作させてデータ転送を行う場合と、1つのピックアップを有する1台のデバイスとしてみせかけるように動作させてデータ転送を行う場合との2つの場合について説明するが、最初に、1つのピックアップを有する2台のデバイスとして見せかけるように動作させてデータ転送を行う場合について説明する。   In the following, the case of performing data transfer by operating as two devices having one pickup as described above, and the case of performing data transfer by operating as if appearing as one device having one pickup However, first, a case will be described in which data transfer is performed by operating as if it were two devices having one pickup.

図56は、PRDテーブルに基づいて実行されるクラウド処理とGOP処理のスケジュールの例を説明する図である。   FIG. 56 is a diagram illustrating an example of a cloud process and a GOP process schedule executed based on the PRD table.

ATAホストハードウェア21が図56に示されるPRDテーブル451乃至PRDテーブル457に対するPRD処理を実行する場合、IDMA制御部37は、最初に番号0のPRDテーブル(PRD0)を参照する。このPRDテーブルは、OP0用の読み出し処理のテーブルであるので、IDMA制御部37のクラウド処理部441は、このPRDテーブルに対してPRD処理451をOP0用GOP処理部442に実行させる。   When the ATA host hardware 21 executes the PRD process for the PRD table 451 to the PRD table 457 shown in FIG. 56, the IDMA control unit 37 first refers to the PRD table (PRD0) number 0. Since this PRD table is a table for the read processing for OP0, the cloud processing unit 441 of the IDMA control unit 37 causes the OP0 GOP processing unit 442 to execute the PRD processing 451 for this PRD table.

同様に、クラウド処理部441は、番号1のPRDテーブル(PRD1)を参照し、そのPRD処理452をOP1用GOP処理部443に実行させ、番号2のPRDテーブル(PRD2)を参照し、そのPRD処理453をOP0用GOP処理部442に実行させ、番号3のPRDテーブル(PRD3)を参照し、そのPRD処理454をOP1用GOP処理部443に実行させ、番号4のPRDテーブル(PRD4)を参照し、そのPRD処理455をOP1用GOP処理部443に実行させ、番号5のPRDテーブル(PRD5)を参照し、そのPRD処理456をOP0用GOP処理部442に実行させ、番号6のPRDテーブル(PRD6)を参照し、そのPRD処理457をOP0用GOP処理部442に実行させる。   Similarly, the cloud processing unit 441 refers to the PRD table (PRD1) of number 1, causes the PRD processing 452 to be executed by the GOP processing unit 443 for OP1, refers to the PRD table (PRD2) of number 2, and the PRD. The processing 453 is executed by the OP0 GOP processing unit 442 and the number 3 PRD table (PRD3) is referred to, the PRD processing 454 is executed by the OP1 GOP processing unit 443 and the number 4 PRD table (PRD4) is referenced. Then, the PRD process 455 is executed by the OP1 GOP processing unit 443, the PRD table (PRD5) of number 5 is referred to, the PRD process 456 is executed by the OP0 GOP processing unit 442, and the PRD table of number 6 ( Referring to PRD 6), the PRD process 457 is executed by the OP0 GOP processing unit 442.

図56において、PRDテーブルの左側に示される図は、クラウド処理部441によるクラウド処理を示したものであり、上の段の「OP0」に対応する処理がOP0用GOP処理部442による処理であり、下の段の「OP1」に対応する処理がOP1用GOP処理部443による処理である。   In FIG. 56, the diagram shown on the left side of the PRD table shows the cloud processing by the cloud processing unit 441, and the processing corresponding to “OP0” in the upper stage is the processing by the OP0 GOP processing unit 442. The processing corresponding to “OP1” in the lower row is processing by the OP1 GOP processing unit 443.

このとき、PRD処理451およびPRD処理453がともに読み出し処理(Read)であり、処理の順番が連続しているので、OP0用GOP処理部442は、これらの処理を1つのGOP処理461として実行する。PRD処理456およびPRD処理457は、それぞれ、書き込み処理(Write)と読み出し処理(Read)であり、同じ処理が連続していない。従って、OP0用GOP処理部442は、PRD処理456をGOP処理464として実行し、PRD処理457をGOP処理465として実行する。   At this time, since both the PRD process 451 and the PRD process 453 are read processes (Read) and the order of the processes is continuous, the OP0 GOP processing unit 442 executes these processes as one GOP process 461. . The PRD process 456 and the PRD process 457 are a write process (Write) and a read process (Read), respectively, and the same process is not continuous. Therefore, the OP0 GOP processing unit 442 executes the PRD process 456 as the GOP process 464 and executes the PRD process 457 as the GOP process 465.

同様にして、OP1用GOP処理部443は、読み出し処理(Read)を行うPRD処理452を1つのGOP処理462として実行し、処理の順番が連続するPRD処理454およびPRD処理455(いずれも書き込み処理(Write))を1つのGOP処理463として実行する。   Similarly, the OP1 GOP processing unit 443 executes the PRD processing 452 that performs the reading processing (Read) as one GOP processing 462, and the PRD processing 454 and the PRD processing 455 in which the processing order is continuous (both are the writing processing). (Write)) is executed as one GOP process 463.

クラウド処理部441は、このようにGOP処理(PRD処理)を並列分岐させて実行する。すなわち、図56の例の場合、クラウド処理部441は、1つのクラウド処理(Crowd)471により、GOP処理461乃至GOP処理465をフォークさせ、処理後に、分岐されたそれらの処理をジョインさせる。   In this way, the cloud processing unit 441 executes the GOP processing (PRD processing) by branching in parallel. That is, in the example of FIG. 56, the cloud processing unit 441 forks the GOP processing 461 to GOP processing 465 by one cloud processing (Crowd) 471, and joins the branched processing after the processing.

このとき、2つのピックアップOP0およびOP1は、ATAの規格上において2つのデバイスとして処理されている。従って、各ピックアップに対する処理間(上の段と下の段)で、GOP処理の開始タイミングは互いに独立している。すなわち、OP0用GOP処理部442は、OP1用GOP処理部443によるGOP処理の進行に関わらず、GOP処理461の終了直後から次のGOP処理464を実行することができる。GOP処理465の開始タイミングについても同様であり、OP0用GOP処理部442は、GOP処理464の終了直後から次のGOP処理465を開始することができる。OP1用GOP処理部443についても同様であり、OP1用GOP処理部443は、GOP処理462の終了直後から次のGOP処理463を開始することができる。換言すると、クラウド処理部441は、1回のクラウド処理により、OP0用GOP処理部442およびOP1用GOP処理部443に複数のGOP処理を実行させることができる。   At this time, the two pickups OP0 and OP1 are processed as two devices in the ATA standard. Therefore, the start timing of the GOP process is independent between the processes for each pickup (upper stage and lower stage). That is, the OP0 GOP processing unit 442 can execute the next GOP processing 464 immediately after the end of the GOP processing 461 regardless of the progress of the GOP processing by the OP1 GOP processing unit 443. The same applies to the start timing of the GOP process 465, and the OP0 GOP processing unit 442 can start the next GOP process 465 immediately after the end of the GOP process 464. The same applies to the OP1 GOP processing unit 443, and the OP1 GOP processing unit 443 can start the next GOP processing 463 immediately after the end of the GOP processing 462. In other words, the cloud processing unit 441 can cause the OP0 GOP processing unit 442 and the OP1 GOP processing unit 443 to execute a plurality of GOP processes by one cloud processing.

なお、図56に示されるように並行して実行される各ピックアップに対するGOP処理の各DMA転送(コマンドの発行も含む)は、ATA上においては同時に行う(同時に転送する)ことができないので、処理単位レベルにおいては、どちらか1つずつ行う必要がある。   As shown in FIG. 56, each DMA transfer (including command issuance) of GOP processing for each pickup executed in parallel cannot be performed simultaneously (transferred simultaneously) on the ATA. At the unit level, it is necessary to do either one by one.

そこで、具体的には、図54を参照して説明したように、ピックアップOP0に対応するDMA転送(OP0用GOP処理部442によるDMA転送)と、ピックアップOP1に対応するDMA転送(OP1用GOP処理部443によるDMA転送)が1RUB毎に交互に行われる。   Therefore, specifically, as described with reference to FIG. 54, DMA transfer corresponding to the pickup OP0 (DMA transfer by the OP0 GOP processing unit 442) and DMA transfer corresponding to the pickup OP1 (OP1 GOP processing). DMA transfer by the unit 443) is alternately performed every 1 RUB.

このDMA転送に関する処理(DMA処理)は、例えば、図37等に示されるように、複数のフェーズにより構成される。例えば、図57に示されるように、DMA処理は、読み出し処理若しくは書き込み処理を指示するDMAコマンド(リードコマンド(R)またはライトコマンド(W))を発行するフェーズ、DMAの実行を指示するDMA Exeコマンド(D)を発行するフェーズ、DMAデータ転送(DMA)を行うフェーズ、並びにステータス(S)を報告するフェーズにより構成される。   This DMA transfer processing (DMA processing) is configured by a plurality of phases as shown in FIG. 37, for example. For example, as shown in FIG. 57, the DMA processing includes a phase for issuing a DMA command (read command (R) or write command (W)) instructing read processing or write processing, and DMA Exe instructing execution of DMA. It consists of a phase for issuing a command (D), a phase for performing DMA data transfer (DMA), and a phase for reporting status (S).

このようなDMA処理において、DMA転送のフェーズの処理の負荷が、他のフェーズの処理の負荷と比較して一番大きい。ところで、OP0用GOP処理部442とOP1用GOP処理部443による処理はなるべく偏りなく平均化されるようにすることが望ましい。例えば、いずれか一方に処理が集中した場合、そのGOP処理部の負荷が増大してしまい、その瞬間正常に動作しない恐れもあるので、DMA転送のフェーズの処理が、上述したように1RUB毎に切り替えられるようにする。   In such DMA processing, the processing load of the DMA transfer phase is the largest compared to the processing load of other phases. By the way, it is desirable that the processing by the OP0 GOP processing unit 442 and the OP1 GOP processing unit 443 should be averaged as much as possible. For example, if processing is concentrated on either side, the load on the GOP processing unit will increase, and there is a possibility that it will not operate normally at that moment. Therefore, the DMA transfer phase processing is performed every 1 RUB as described above. Make it switchable.

その切り替えタイミングは、例えば、読み出し処理の場合、図57の図中左側に示されるように、DMA実行コマンドを発行する直前になるようにし、書き込み処理の場合、図57の図中右側に示されるように、DMA転送終了時、または、ステータス報告終了時のいずれか一方より選択された方となるようにする。   For example, in the case of read processing, the switching timing is set immediately before issuing a DMA execution command as shown on the left side of FIG. 57, and in the case of write processing, the switching timing is shown on the right side of FIG. As described above, either one is selected from the end of the DMA transfer or the end of the status report.

OP切り替え処理の具体的な例について説明する。   A specific example of the OP switching process will be described.

図58に示されるように、1クラウド処理内のPRD処理が全て書き込み処理(Write)である場合OP0用GOP処理部442によるGOP処理と、OP1用GOP処理部443によるGOP処理とは、それぞれのDMA転送フェーズが終了する度に切り替えられて交互に実行される。   As shown in FIG. 58, when all the PRD processes in one cloud process are write processes (Write), the GOP process by the OP0 GOP processor 442 and the GOP process by the OP1 GOP processor 443 are respectively Each time the DMA transfer phase is completed, it is switched and executed alternately.

なお、図58においては、DMA転送終了時に切り替える場合についてのみ説明している。ステータス報告終了時において切り替える場合についても、そのタイミングが異なるだけで、基本的に図58の場合と同様である。   In FIG. 58, only the case of switching at the end of DMA transfer is described. The case of switching at the end of status reporting is basically the same as the case of FIG. 58 except that the timing is different.

図59に示されるように、1クラウド処理内のPRD処理が全て読み出し処理(Read)である場合、OP0用GOP処理部442によるGOP処理と、OP1用GOP処理部443によるGOP処理とのそれぞれの最初において、DMAコマンドの発行(キューイング)が行われるが、それ以降は、各GOP処理が、それぞれのDMA実行コマンドの発行直前に切り替えられて交互に実行される。   As shown in FIG. 59, when all the PRD processes in one cloud process are read processes (Read), the GOP process by the OP0 GOP processing unit 442 and the GOP process by the OP1 GOP processing unit 443 are respectively performed. Initially, a DMA command is issued (queuing), but thereafter, each GOP process is switched and executed alternately just before each DMA execution command is issued.

なお、処理が進み、例えば、OP0用GOP処理部442によるGOP処理が完了し、OP1用GOP処理部443においてのみGOP処理が行われている場合に、OP1用GOP処理部443が、OP0用GOP処理部442の処理からOP切り替えが行われると、OP0用GOP処理部442はGOP処理を終了しているので、何もせずにそのまま処理をOP1側に戻し、OP1用GOP処理部443にGOP処理を続けさせる。   Note that the process proceeds and, for example, when the GOP processing by the OP0 GOP processing unit 442 is completed and the GOP processing is performed only in the OP1 GOP processing unit 443, the OP1 GOP processing unit 443 performs the OP0 GOP processing. When OP switching is performed from the processing of the processing unit 442, the GOP processing unit 442 for OP0 has finished the GOP processing, so the processing is returned to the OP1 side without doing anything, and the GOP processing is performed by the GOP processing unit 443 for OP1. To continue.

図60に示されるように、読み出し処理(Read)のPRD処理と書き込み処理(Write)のPRD処理とが混在する場合も、基本的にその動作は上述した場合と変化せず、各切り替えタイミングにおいて切り替えられ、DMA転送が、1つずつ実行される。なお、図中OP1の段に示されるように、上述した切り替えタイミング以外にも、1つのGOP処理が終了すると必ず切り替え処理が発生する。   As shown in FIG. 60, even when the PRD process of the read process (Read) and the PRD process of the write process (Write) coexist, the operation is basically the same as described above, and at each switching timing. The DMA transfer is performed one by one. Note that, as shown in the OP1 stage in the figure, in addition to the switching timing described above, a switching process always occurs when one GOP process ends.

以上のように、2Dev−2OPの場合、2つのピックアップOP0とOP1は、ATAの規格上、異なるデバイスとして扱われる。すなわち、OP0用GOP処理部442によるGOP処理、および、OP1用GOP処理部443によるGOP処理は、各処理の内部においてDMAコマンド順やDMAデータ転送順が合っていればよく、互いに独立して実行される。従って、図56に示されるように、1つのクラウド処理内に、読み出し処理と書き込み処理の両方が含まれるようにすることもできる。   As described above, in the case of 2Dev-2OP, the two pickups OP0 and OP1 are treated as different devices according to the ATA standard. That is, the GOP processing by the OP0 GOP processing unit 442 and the GOP processing by the OP1 GOP processing unit 443 may be performed independently of each other as long as the DMA command order and the DMA data transfer order are matched within each processing. Is done. Therefore, as shown in FIG. 56, both a read process and a write process can be included in one cloud process.

図61に、クラウド処理部441と、OP0用GOP処理部442、OP1用GOP処理部443、およびセレクタ444との制御関係を示す図である。   FIG. 61 is a diagram illustrating a control relationship among the cloud processing unit 441, the OP0 GOP processing unit 442, the OP1 GOP processing unit 443, and the selector 444.

クラウド処理部441は、PRD処理をOP0用GOP処理部442にフォークする際に、OP0用GOP処理部442に対して、GopSTARTコマンド601を発行する。OP0用GOP処理部442は、GopSTARTコマンド601に基づいて、割り当てられたPRD処理を実行し、処理が終了すると、クラウド処理部441に対してGopNext Reqコマンド602を発行し、次のPRD処理を要求する。クラウド処理部441は、この要求に基づいて、GopNext PRDコマンド603をOP0用GOP処理部442に対して発行し、次のPRD処理を割り当てる。   When the cloud processing unit 441 forks the PRD process to the OP0 GOP processing unit 442, the cloud processing unit 441 issues a GopSTART command 601 to the OP0 GOP processing unit 442. The OP0 GOP processing unit 442 executes the assigned PRD processing based on the GopSTART command 601, and when the processing is completed, issues a GopNext Req command 602 to the cloud processing unit 441 to request the next PRD processing. To do. Based on this request, the cloud processing unit 441 issues a GopNext PRD command 603 to the OP0 GOP processing unit 442 and assigns the next PRD process.

また、GOP処理中にTurnOFF状態で待機しているOP0用GOP処理部442に対して、クラウド処理部441は、所定のタイミングで、TurnONコマンドおよびRdTRNSF許可コマンド604を発行し、OP0用GOP処理部442をTurnON状態に移行させるとともに、読み出し転送用許可を発行する。OP0用GOP処理部442は、TurnONコマンドに基づいてPRD処理を再開し、DMA転送時にこのRdTRNSF許可コマンドに基づいて、RdTRNSF Exeコマンド605をリードデータとともにクラウド処理部441に供給する。また、その際、OP0用GOP処理部442は、TurnOFFコマンドもクラウド処理部441に供給し、TurnOFF状態に移行する。   In addition, the cloud processing unit 441 issues a TurnON command and an RdTRNSF permission command 604 at a predetermined timing to the OP0 GOP processing unit 442 that is waiting in the TurnOFF state during the GOP processing, and the OP0 GOP processing unit. 442 shifts to the TurnON state and issues a read transfer permission. The OP0 GOP processing unit 442 resumes the PRD processing based on the TurnON command, and supplies the RdTRNSF Exe command 605 to the cloud processing unit 441 along with the read data based on the RdTRNSF permission command during DMA transfer. At that time, the OP0 GOP processing unit 442 also supplies a TurnOFF command to the cloud processing unit 441 and shifts to the TurnOFF state.

OP0用GOP処理部442に割り当てるPRD処理がなくなると、クラウド処理部441は、GopENDコマンド606をOP0用GOP処理部442に対して発行する。OP0用GOP処理部442は、GOP処理を完了すると、クラウド処理部441に対してGopFINISHコマンド607を発行する。   When there is no PRD process assigned to the OP0 GOP processing unit 442, the cloud processing unit 441 issues a GopEND command 606 to the OP0 GOP processing unit 442. When completing the GOP processing, the OP0 GOP processing unit 442 issues a GopFINISH command 607 to the cloud processing unit 441.

なお、クラウド処理部441は、OP1用GOP処理部443に対しても同様に処理を行い、GopSTARTコマンド601に対応するGopSTARTコマンド611、GopNext PRDコマンド603に対応するGopNext PRDコマンド613、TurnONコマンドおよびRdTRNSF許可コマンド604に対応するTurnONコマンドおよびRdTRNSF許可コマンド614、並びに、GopENDコマンド606に対応するGopENDコマンド616を、それぞれ、OP0用GOP処理部442の場合と同様のタイミングで発行する。   Note that the cloud processing unit 441 performs the same processing on the OP1 GOP processing unit 443, and the GopSTART command 611 corresponding to the GopSTART command 601, the GopNext PRD command 613 corresponding to the GopNext PRD command 603, the TurnON command, and the RdTRNSF The TurnON command and the RdTRNSF permission command 614 corresponding to the permission command 604 and the GopEND command 616 corresponding to the GopEND command 606 are issued at the same timing as in the case of the OP0 GOP processing unit 442, respectively.

また、OP1用GOP処理部443も、クラウド処理部441に対して同様に処理を行い、GopNext Reqコマンド602に対応するGopNext Reqコマンド612、TurnOFFコマンドおよびRdTRNSF Exeコマンド605に対応するTurnOFFコマンドおよびRdTRNSF Exeコマンド615、並びに、GopFINISHコマンド607に対応するGopFINISHコマンド617を、それぞれ、OP0用GOP処理部442の場合と同様のタイミングで発行する。   The OP1 GOP processing unit 443 also performs the same processing on the cloud processing unit 441, and the GopNext Req command 612 corresponding to the GopNext Req command 602, the TurnOFF command and the TurnOFF command corresponding to the RdTRNSF Exe command 605, and the RdTRNSF Exe A command 615 and a GopFINISH command 617 corresponding to the GopFINISH command 607 are issued at the same timing as in the case of the OP0 GOP processing unit 442, respectively.

さらにクラウド処理部441は、セレクタ444に対して、OPの切り替え処理が行われたことを示すTurnOPコマンド618を所定のタイミングで供給する。   Further, the cloud processing unit 441 supplies a TurnOP command 618 indicating that the OP switching process has been performed to the selector 444 at a predetermined timing.

以上のように、IDMA制御部37内において、クラウド処理部441は、クラウド処理を行い、OP0用GOP処理部442、OP1用GOP処理部443、およびセレクタ444を制御して、GOP処理(PRD処理)を実行させる。   As described above, in the IDMA control unit 37, the cloud processing unit 441 performs cloud processing and controls the OP0 GOP processing unit 442, the OP1 GOP processing unit 443, and the selector 444 to perform GOP processing (PRD processing). ) Is executed.

次に、以上のようなクラウド処理を制御するクラウド全体制御処理について、図62のフローチャートを参照して説明する。   Next, the entire cloud control process for controlling the cloud process as described above will be described with reference to the flowchart of FIG.

最初に、ステップS341において、クラウド処理部441は、初期化処理を行い、各変数や設定を初期化する。例えば、クラウド処理部441は、ピックアップOP0にPRDテーブル(PRD処理)を割り当てるためのポインタであるOP0#PRDポインタを「0」にセット(設定)し、同様に、ピックアップOP1にPRDテーブル(PRD処理)を割り当てるためのポインタであるOP1#PRDポインタを「0」にセット(設定)する。また、クラウド処理部441は、クラウド処理が終了されるPRDテーブルを特定するためのCROWD END PRDポインタの値を「0」にセット(設定)する。さらにクラウド処理部441は、PRDテーブルをフェッチし、OP0用GOP処理部442が現在行っている処理が書き込み処理(ライト)であるか読み込み処理(リード)であるかを示すフラグであるOP0#CrntRXWの値をセット(設定)し、同様に、OP1用GOP処理部443が現在行っている処理が書き込み処理(ライト)であるか読み込み処理(リード)であるかを示すフラグであるOP1#CrntRXWの値をセット(設定)する。   First, in step S341, the cloud processing unit 441 performs an initialization process to initialize each variable and setting. For example, the cloud processing unit 441 sets (sets) the OP0 # PRD pointer, which is a pointer for assigning the PRD table (PRD processing) to the pickup OP0, and similarly sets the PRD table (PRD processing) to the pickup OP1. ) Is set (set) to “0”. Further, the cloud processing unit 441 sets (sets) the value of the CROWD END PRD pointer for specifying the PRD table for which the cloud processing is to be ended to “0”. Further, the cloud processing unit 441 fetches the PRD table, and OP0 # CrntRXW, which is a flag indicating whether the processing currently performed by the OP0 GOP processing unit 442 is write processing (write) or read processing (read). Similarly, a value of OP1 # CrntRXW that is a flag indicating whether the process currently performed by the OP1 GOP processing unit 443 is a write process (write) or a read process (read) is set. Set (set) a value.

初期化処理が終了すると、クラウド処理部441は、ステップS342に処理を進め、セマフォを取得するまで待機し、セマフォを取得した場合、そのセマフォをロックする。セマフォを取得してロックしたクラウド処理部441は、ステップS343に処理を進め、Crowd END PRDポインタを参照し、クラウド全体制御処理の終了を示すEOF、または、クラウド全体制御処理の強制終了を示すAbortを検出したか否かを判定する。EOFまたはAbortのいずれも検出していないと判定した場合、クラウド処理部441は、新たなクラウド処理について制御を行うために処理をステップS344に進め、SRAM52に格納されている各PRDテーブルを参照し、制御対象となるクラウド処理に対応する各PRDテーブルの処理順を確認し、1つのクラウド処理において最後のテーブルとなるPRDテーブルを特定し、そのテーブル番号をCrowd END PRDポインタにセットする。上述したように2Dev-2OPの場合(2つのピックアップを2つのデバイスに見せかける場合)EOFに設定されたPRDテーブルのテーブル番号がCrowd END PRDポインタにセットされる。   When the initialization process ends, the cloud processing unit 441 proceeds to step S342, waits until the semaphore is acquired, and locks the semaphore when the semaphore is acquired. The cloud processing unit 441 that acquired and locked the semaphore advances the processing to step S343, refers to the Crowd END PRD pointer, and indicates EOF indicating the end of the entire cloud control processing or Abort indicating the forced termination of the entire cloud control processing. Whether or not is detected is determined. If it is determined that neither EOF nor Abort is detected, the cloud processing unit 441 proceeds to step S344 in order to control the new cloud process, and refers to each PRD table stored in the SRAM 52. The processing order of each PRD table corresponding to the cloud process to be controlled is confirmed, the PRD table that is the last table in one cloud process is specified, and the table number is set in the Crowd END PRD pointer. As described above, in the case of 2Dev-2OP (when two pickups appear to be two devices), the table number of the PRD table set in EOF is set in the Crowd END PRD pointer.

Crowd END PRDポインタのセットが完了すると、クラウド処理部441は、ステップS345に処理を進め、セマフォのロックを解除する。そして、ステップS346において、OP0にフォークしたGOP処理を制御するOP0用のクラウド制御処理を行うか否かを判定し、行うと判定した場合、ステップS347に処理を進め、OP0用のクラウド制御処理を実行する。OP0用のクラウド制御処理の詳細は、図63乃至65のフローチャートを参照して後述する。OP0用のクラウド制御処理を実行し、その処理が終了すると、クラウド処理部441は、ステップS342に処理を戻し、次のクラウド処理(今回制御したOP0のクラウド処理に対応する未処理のOP1のクラウド処理も含む)を制御するために、それ以降の処理を繰り返す。   When the setting of the Crowd END PRD pointer is completed, the cloud processing unit 441 proceeds to step S345 to release the semaphore lock. In step S346, it is determined whether or not to perform the cloud control process for OP0 that controls the GOP process forked to OP0. If it is determined to perform, the process proceeds to step S347, and the cloud control process for OP0 is performed. Execute. The details of the cloud control processing for OP0 will be described later with reference to the flowcharts of FIGS. When the cloud control process for OP0 is executed and the process ends, the cloud processing unit 441 returns the process to step S342, and the next cloud process (the cloud of the unprocessed OP1 corresponding to the cloud process of OP0 controlled this time) In order to control (including processing), the subsequent processing is repeated.

また、ステップS346において、OP0用のクラウド制御処理を実行せず、OP1用のクラウド制御処理を実行すると判定した場合、クラウド処理部441は、処理をステップS348に進め、OP1用クラウド制御処理を実行する。OP1用のクラウド制御処理の詳細は、図66乃至図68を参照して後述する。OP1用のクラウド制御処理を実行し、その処理が終了すると、クラウド処理部441は、ステップS342に処理を戻し、次のクラウド処理(今回制御したOP1のクラウド処理に対応する未処理のOP0のクラウド処理も含む)を制御するために、それ以降の処理を繰り返す。   If it is determined in step S346 that the cloud control process for OP1 is not executed and the cloud control process for OP1 is executed, the cloud processing unit 441 proceeds to step S348 and executes the cloud control process for OP1. To do. Details of the cloud control processing for OP1 will be described later with reference to FIGS. 66 to 68. When the cloud control process for OP1 is executed and the process ends, the cloud processing unit 441 returns the process to step S342, and the next cloud process (the cloud of the unprocessed OP0 corresponding to the cloud process of OP1 controlled this time) In order to control (including processing), the subsequent processing is repeated.

以上のように、ステップS342乃至ステップS348の処理を適宜実行しながら繰り返すことにより、クラウド処理部441は、全てのクラウド処理を制御する。そして、ステップS343において、Crowd END PRDポインタよりEOFまたはAbortのいずれかを検出したと判定した場合、クラウド処理部441は、処理をステップS349に進め、全てのクラウド処理に対する制御処理が終了したことを外部に通知するためのALL END IRQ外部用割り込み要因をセットし、クラウド全体制御処理を終了する。   As described above, the cloud processing unit 441 controls all cloud processes by repeating the processes in steps S342 to S348 while appropriately executing the processes. If it is determined in step S343 that either EOF or Abort has been detected from the Crowd END PRD pointer, the cloud processing unit 441 proceeds to step S349 and indicates that control processing for all cloud processes has been completed. ALL END IRQ external interrupt factor to notify outside is set, and the entire cloud control process is terminated.

クラウド処理部441は、以上のようにして、各クラウド処理の進行を制御するクラウド全体制御処理を実行する。   The cloud processing unit 441 executes the entire cloud control process for controlling the progress of each cloud process as described above.

次に、図62のステップS347において実行されるOP0用クラウド制御処理の詳細を図63乃至図65のフローチャートを参照して説明する。   Next, details of the cloud control processing for OP0 executed in step S347 of FIG. 62 will be described with reference to the flowcharts of FIGS.

最初に、クラウド処理部441は、ステップS361において、ピックアップOP0(ピックアップOP0用GOP処理部442)が、GOP処理を実行するモードであるTurnON状態に移行可能になるまで待機する。OP0用GOP処理部442とOP1用GOP処理部443は、交互にGOP処理を行うため、それぞれ、処理を実行するTurnON状態と待機するTurnOFF状態とを繰り返しながらGOP処理を実行する。   First, in step S361, the cloud processing unit 441 waits until the pickup OP0 (GOP processing unit 442 for pickup OP0) can shift to the TurnON state in which the GOP process is executed. Since the OP0 GOP processing unit 442 and the OP1 GOP processing unit 443 alternately perform the GOP processing, the GOP processing is executed while repeating the TurnON state for executing the processing and the TurnOFF state for waiting.

OP0がTurnON状態に移行可能になると、クラウド処理部441は、ステップS362に処理を進め、OP0用GOP処理部442にGopSTARTコマンド601を発行し、GOP処理を開始させる。そして、クラウド処理部441は、ステップS363に処理を進め、OP0#CrntRXWの値を「NULL」に設定し、ステップS364において、OP0用GOP処理部442がTurnOFF状態に移行するか(OP0用GOP処理部442よりTurnOFFコマンド605を取得するか)、OP0用GOP処理部442より次のPRDテーブル(PRD処理)を要求するGopNext Reqコマンド602を取得するか、GOP処理の終了を通知するGopFINISHコマンド607を取得するまで待機する。   When OP0 can shift to the TurnON state, the cloud processing unit 441 proceeds to Step S362, issues a GopSTART command 601 to the OP0 GOP processing unit 442, and starts GOP processing. Then, the cloud processing unit 441 proceeds to step S363, sets the value of OP0 # CrntRXW to “NULL”, and determines whether the OP0 GOP processing unit 442 shifts to the TurnOFF state in step S364 (OP0 GOP processing). A Turn OFF command 605 from the unit 442), a GopNext Req command 602 requesting the next PRD table (PRD processing) from the OP0 GOP processing unit 442, or a GopFINISH command 607 for notifying the end of the GOP processing. Wait until you get it.

そして、それらのいずれかのコマンドをOP0用GOP処理部442より取得すると、クラウド処理部441は、ステップS365に処理を進め、OP0用GOP処理部442がTurnOFF状態に移行したか否かを判定する。取得したコマンドがTurnOFFコマンド605であり、OP0用GOP処理部442がTurnOFF状態に移行したと判定した場合、クラウド処理部441は、ステップS366に処理を進め、OP1用GOP処理部443にTurnONコマンド614を発行する等して、Turnを切り替える。   When any of these commands is acquired from the OP0 GOP processing unit 442, the cloud processing unit 441 proceeds to step S365, and determines whether or not the OP0 GOP processing unit 442 has shifted to the TurnOFF state. . When it is determined that the acquired command is the TurnOFF command 605 and the OP0 GOP processing unit 442 has shifted to the TurnOFF state, the cloud processing unit 441 proceeds to Step S366, and the OP1 GOP processing unit 443 transmits the TurnON command 614. Switch the Turn, for example.

そして、クラウド処理部441は、ステップS367において、Turnが再度切り替わるまで(OP1用GOP処理部443よりTurnOFFコマンド615を取得するまで)待機し、OP1用GOP処理部443よりTurnOFFコマンド615を取得すると、ステップS368に処理を進め、OP0用GOP処理部442にTurnONコマンド604を発行する等して、Turnを切り替える。Turnを切り替えたクラウド処理部441は、ステップS364に処理を戻し、それ以降の処理を繰り返す。   Then, in step S367, the cloud processing unit 441 waits until the Turn is switched again (until the TurnOFF command 615 is acquired from the OP1 GOP processing unit 443), and when acquiring the TurnOFF command 615 from the OP1 GOP processing unit 443, The process proceeds to step S368, and the Turn is switched by, for example, issuing a TurnON command 604 to the OP0 GOP processing unit 442. The cloud processing unit 441 that switched Turn returns the processing to Step S364 and repeats the subsequent processing.

ステップS365において、取得したコマンドがTurnOFFコマンド605ではなく、OP0用GOP処理部442がTurnOFF状態に移行していないと判定した場合、クラウド処理部441は、処理を図64のステップS371に進める。   If it is determined in step S365 that the acquired command is not the TurnOFF command 605 and the OP0 GOP processing unit 442 has not shifted to the TurnOFF state, the cloud processing unit 441 advances the processing to step S371 in FIG.

図64のステップS371において、クラウド処理部441は、取得したコマンドがGopNext Reqコマンド602であるか否かを判定し、GopNext Reqコマンド602であると判定した場合、ステップS372に処理を進め、次のPRDテーブルをフェッチし、OP0#PRDポインタを更新する。   In step S371 in FIG. 64, the cloud processing unit 441 determines whether the acquired command is the GopNext Req command 602. If the cloud processing unit 441 determines that the acquired command is the GopNext Req command 602, the cloud processing unit 441 proceeds to step S372, Fetch the PRD table and update the OP0 # PRD pointer.

ステップS372の処理を終了すると、クラウド処理部441は、ステップS373に処理を進め、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致するか否かを判定する。OP0#PRDポインタの値とCrowd END PRDポインタの値が一致せず、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致しないと判定した場合、クラウド処理部441は、ステップS374に処理を進め、SDRAM24のアクセス先のアドレスであるSDRAMアドレスを追加するか、または、フェッチしたPRDテーブルがピックアップOP0用のPRDテーブルでないかを判定する。   When the process of step S372 ends, the cloud processing unit 441 proceeds to step S373 and determines whether or not the PRD table specified by the OP0 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. . When it is determined that the value of the OP0 # PRD pointer does not match the value of the Crowd END PRD pointer and the PRD table specified by the OP0 # PRD pointer does not match the PRD table specified by the Crowd END PRD pointer, the cloud processing unit 441 Advances the process to step S374 to add an SDRAM address, which is an access destination address of the SDRAM 24, or determine whether the fetched PRD table is not a PRD table for the pickup OP0.

フェッチしたPRDテーブルがピックアップOP0用のPRDテーブルでなく、SDRAMアドレスを追加しないと判定したクラウド処理部441は、ステップS375に処理を進め、OP0#PRDポインタをインクリメントし、次のPRDテーブルをフェッチするために、ステップS372に処理を戻し、それ以降の処理を繰り返す。   The cloud processing unit 441 that determines that the fetched PRD table is not the PRD table for the pickup OP0 and does not add the SDRAM address, proceeds to step S375, increments the OP0 # PRD pointer, and fetches the next PRD table. Therefore, the process returns to step S372, and the subsequent processes are repeated.

また、ステップS374において、フェッチしたPRDテーブルがピックアップOP0用のPRDテーブルであり、そのPRD処理に対応するSDRAMアドレスを追加すると判定したクラウド処理部441は、ステップS376に処理を進め、OP0#CrntRXWの値が「NULL」、または、フェッチしたPRDテーブルのRXWであるか否かを判定する。   Also, in step S374, the fetched PRD table is the PRD table for the pickup OP0, and the cloud processing unit 441 that has determined that the SDRAM address corresponding to the PRD process is to be added proceeds to step S376, where OP0 # CrntRXW It is determined whether the value is “NULL” or the RXW of the fetched PRD table.

OP0#CrntRXWの値が「NULL」、または、フェッチしたPRDテーブルのRXWであると判定した場合、クラウド処理部441は、今回処理するPRDテーブルが前回処理したPRDテーブルと同種である、または、GOP処理の最初のPRDテーブルであると認識し、処理をステップS377に進め、OP0用GOP処理部442に対してGopNEXT PRDコマンド603を発行し、OP0用GOP処理部442にそのPRDテーブルのPRD処理を実行させる。GopNEXT PRDコマンド603を発行すると、クラウド処理部441は、ステップS378において、OP0#PRDポインタをインクリメントし、図63のステップS364に処理を戻し、それ以降の処理を繰り返す。   When it is determined that the value of OP0 # CrntRXW is “NULL” or the RXW of the fetched PRD table, the cloud processing unit 441 has the same type of PRD table processed last time as the PRD table processed last time, or GOP Recognizing that this is the first PRD table of the process, the process proceeds to step S377, and the GopNEXT PRD command 603 is issued to the OP0 GOP processing unit 442, and the OP0 GOP processing unit 442 performs the PRD processing of the PRD table. Let it run. When the GopNEXT PRD command 603 is issued, the cloud processing unit 441 increments the OP0 # PRD pointer in step S378, returns the process to step S364 in FIG. 63, and repeats the subsequent processes.

また、図64のステップS373において、OP0#PRDポインタの値がCrowd END PRDポインタの値に一致し、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致すると判定した場合、クラウド処理部441は、1つのクラウド処理が終了したものと認識し、ステップS379に処理を進め、OP0用GOP処理部442に対して、GopENDコマンド606を発行し、GOP処理の終了を指示する。GopENDコマンド606を発行したクラウド処理部441は、図63のステップS364に処理を戻し、それ以降の処理を繰り返す。   In step S373 in FIG. 64, the value of the OP0 # PRD pointer matches the value of the Crowd END PRD pointer, and it is determined that the PRD table specified by the OP0 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. In this case, the cloud processing unit 441 recognizes that one cloud process has been completed, proceeds to step S379, issues a GopEND command 606 to the OP0 GOP processing unit 442, and terminates the GOP process. Instruct. The cloud processing unit 441 that issued the GopEND command 606 returns the process to step S364 in FIG. 63 and repeats the subsequent processes.

さらに、図64のステップS376において、OP0#CrntRXWの値が「NULL」でもなく、フェッチしたPRDテーブルのRXWでもないと判定した場合、クラウド処理部441は、今回処理するPRDテーブルの処理の種類が前回と異なるので、1つのGOP処理が終了したと認識し、処理をステップS379に処理を進め、OP0用GOP処理部442に対して、GopENDコマンド606を発行し、GOP処理の終了を指示する。GopENDコマンド606を発行したクラウド処理部441は、図63のステップS364に処理を戻し、それ以降の処理を繰り返す。   Furthermore, if it is determined in step S376 in FIG. 64 that the value of OP0 # CrntRXW is neither “NULL” nor the RXW of the fetched PRD table, the cloud processing unit 441 determines the type of processing of the PRD table to be processed this time. Since it is different from the previous time, it is recognized that one GOP process has been completed, the process proceeds to step S379, the GopEND command 606 is issued to the OP0 GOP processing unit 442, and the end of the GOP process is instructed. The cloud processing unit 441 that issued the GopEND command 606 returns the process to step S364 in FIG. 63 and repeats the subsequent processes.

また、ステップS371において、取得したコマンドがGopNext Reqコマンド602でないと判定した場合、クラウド処理部441は、図65のステップS381に処理を進める。   If it is determined in step S371 that the acquired command is not the GopNext Req command 602, the cloud processing unit 441 proceeds to step S381 in FIG.

図65のステップS381において、クラウド処理部441は、GopFINISHコマンド607を取得したか否かを判定し、GopFINISHコマンド607を取得したと判定した場合、処理をステップS382に進め、OP0 FINISHフラグに「1」をセットする。   In step S381 in FIG. 65, the cloud processing unit 441 determines whether or not the GopFINISH command 607 has been acquired. If the cloud processing unit 441 determines that the GopFINISH command 607 has been acquired, the cloud processing unit 441 proceeds to step S382 and sets “1” in the OP0 FINISH flag. "Is set.

OP0 FINISHフラグに「1」をセットするとクラウド処理部441は、処理をステップS383に進め、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致するか否かを判定する。OP0#PRDポインタの値とCrowd END PRDポインタの値が一致し、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致すると判定した場合、クラウド処理部441は、ステップS384に処理を進め、クラウド処理を終了し、OP1用クラウド処理が終了するまで待機する。OP1用クラウド処理が終了すると、クラウド処理部441は、OP0用クラウド制御処理を終了し、図62のステップS347に処理を戻す。ステップS347に処理が戻されると、クラウド全体制御処理を行っていたクラウド処理部441は、上述したように、ステップS342に処理を戻し、それ以降の処理を繰り返す。   When the OP0 FINISH flag is set to “1”, the cloud processing unit 441 advances the processing to step S383, and checks whether the PRD table specified by the OP0 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. judge. When it is determined that the value of the OP0 # PRD pointer matches the value of the Crowd END PRD pointer and the PRD table specified by the OP0 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer, the cloud processing unit 441 The process advances to step S384 to end the cloud process and wait until the OP1 cloud process ends. When the cloud processing for OP1 ends, the cloud processing unit 441 ends the cloud control processing for OP0 and returns the processing to step S347 in FIG. When the process returns to step S347, the cloud processing unit 441 that has performed the entire cloud control process returns the process to step S342 as described above, and repeats the subsequent processes.

なお、図65のステップS381において、GopFINISHコマンド607を取得していないと判定した場合、クラウド処理部441は、図63のステップS364に処理を戻し、それ以降の処理を繰り返す。また、図65のステップS383において、OP0#PRDポインタの値とCrowd END PRDポインタの値が一致せず、OP0#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致しないと判定した場合、クラウド処理部441は、図63のステップS361に処理を進め、次のGOP処理について、それ以降の処理を繰り返す。   If it is determined in step S381 in FIG. 65 that the GopFINISH command 607 has not been acquired, the cloud processing unit 441 returns the process to step S364 in FIG. 63 and repeats the subsequent processes. 65, the value of the OP0 # PRD pointer does not match the value of the Crowd END PRD pointer, and the PRD table specified by the OP0 # PRD pointer does not match the PRD table specified by the Crowd END PRD pointer. If determined to be, the cloud processing unit 441 proceeds with the process to step S361 of FIG. 63, and repeats the subsequent processes for the next GOP process.

次に、図62のステップS348において実行されるOP1用クラウド制御処理の詳細を図66乃至図68のフローチャートを参照して説明する。なお、OP1用クラウド制御処理は、基本的に、上述したOP0用クラウド制御処理と同様に行われる。   Next, details of the cloud control processing for OP1 executed in step S348 of FIG. 62 will be described with reference to the flowcharts of FIGS. Note that the OP1 cloud control process is basically performed in the same manner as the OP0 cloud control process described above.

すなわち、最初に、クラウド処理部441は、図66のステップS401において、ピックアップOP1(ピックアップOP1用GOP処理部443)が、GOP処理を実行するモードであるTurnON状態に移行可能になるまで待機する。   That is, first, the cloud processing unit 441 waits until the pickup OP1 (GOP processing unit for pickup OP1 443) can shift to the TurnON state, which is a mode for executing the GOP processing, in step S401 of FIG.

OP1がTurnON状態に移行可能になると、クラウド処理部441は、ステップS402に処理を進め、OP1用GOP処理部443にGopSTARTコマンド611を発行し、GOP処理を開始させる。そして、クラウド処理部441は、ステップS403に処理を進め、OP1#CrntRXWの値を「NULL」に設定し、ステップS404において、OP1用GOP処理部443よりTurnOFFコマンド615を取得するか、GopNext Reqコマンド612を取得するか、GopFINISHコマンド617を取得するまで待機する。   When OP1 can shift to the TurnON state, the cloud processing unit 441 proceeds to step S402, issues a GopSTART command 611 to the OP1 GOP processing unit 443, and starts GOP processing. Then, the cloud processing unit 441 proceeds to step S403, sets the value of OP1 # CrntRXW to “NULL”, and acquires a TurnOFF command 615 from the OP1 GOP processing unit 443 in step S404, or acquires a GopNext Req command. Wait until 612 is acquired or the GopFINISH command 617 is acquired.

そして、それらのいずれかのコマンドをOP1用GOP処理部443より取得すると、クラウド処理部441は、ステップS405に処理を進め、OP1用GOP処理部443がTurnOFF状態に移行したか否かを判定する。TurnOFFコマンド615を取得し、OP1用GOP処理部443がTurnOFF状態に移行したと判定した場合、クラウド処理部441は、ステップS406に処理を進め、OP0用GOP処理部442にTurnONコマンド604を発行する等して、Turnを切り替える。   When any of these commands is acquired from the OP1 GOP processing unit 443, the cloud processing unit 441 proceeds to Step S405, and determines whether the OP1 GOP processing unit 443 has shifted to the TurnOFF state. . When acquiring the TurnOFF command 615 and determining that the OP1 GOP processing unit 443 has shifted to the TurnOFF state, the cloud processing unit 441 proceeds to Step S406 and issues the TurnON command 604 to the OP0 GOP processing unit 442. Equivalent to switch the Turn.

そして、クラウド処理部441は、ステップS407において、Turnが再度切り替わるまで(OP0用GOP処理部442よりTurnOFFコマンド605を取得するまで)待機し、OP0用GOP処理部442よりTurnOFFコマンド605を取得すると、ステップS408に処理を進め、OP1用GOP処理部443にTurnONコマンド614を発行する等して、Turnを切り替える。Turnを切り替えたクラウド処理部441は、ステップS404に処理を戻し、それ以降の処理を繰り返す。   Then, in step S407, the cloud processing unit 441 waits until the Turn is switched again (until the TurnOFF command 605 is acquired from the OP0 GOP processing unit 442), and acquires the TurnOFF command 605 from the OP0 GOP processing unit 442. The process proceeds to step S408, and the Turn is switched by, for example, issuing a TurnON command 614 to the OP1 GOP processing unit 443. The cloud processing unit 441 that switched Turn returns the processing to Step S404 and repeats the subsequent processing.

ステップS405において、取得したコマンドがTurnOFFコマンド615ではなく、OP1用GOP処理部443がTurnOFF状態に移行していないと判定した場合、クラウド処理部441は、処理を図67のステップS411に進める。   If it is determined in step S405 that the acquired command is not the TurnOFF command 615 and the OP1 GOP processing unit 443 has not shifted to the TurnOFF state, the cloud processing unit 441 advances the processing to step S411 in FIG.

図67のステップS411において、クラウド処理部441は、取得したコマンドがGopNext Reqコマンド612であるか否かを判定し、GopNext Reqコマンド612であると判定した場合、ステップS412に処理を進め、次のPRDテーブルをフェッチし、OP1#PRDポインタを更新する。   In step S411 in FIG. 67, the cloud processing unit 441 determines whether or not the acquired command is the GopNext Req command 612. If the cloud processing unit 441 determines that the acquired command is the GopNext Req command 612, the process proceeds to step S412. Fetch the PRD table and update the OP1 # PRD pointer.

ステップS412の処理を終了すると、クラウド処理部441は、ステップS413に処理を進め、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致するか否かを判定する。OP1#PRDポインタの値とCrowd END PRDポインタの値が一致せず、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致しないと判定した場合、クラウド処理部441は、ステップS414に処理を進め、SDRAM24のアクセス先のアドレスであるSDRAMアドレスを追加するか、または、フェッチしたPRDテーブルがピックアップOP1用のPRDテーブルでないかを判定する。   When the process of step S412 ends, the cloud processing unit 441 proceeds to step S413, and determines whether or not the PRD table specified by the OP1 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. . When it is determined that the value of the OP1 # PRD pointer does not match the value of the Crowd END PRD pointer and the PRD table specified by the OP1 # PRD pointer does not match the PRD table specified by the Crowd END PRD pointer, the cloud processing unit 441 Advances the process to step S414 to add an SDRAM address, which is an access destination address of the SDRAM 24, or determine whether the fetched PRD table is a PRD table for the pickup OP1.

フェッチしたPRDテーブルがピックアップOP1用のPRDテーブルでなく、SDRAMアドレスを追加しないと判定したクラウド処理部441は、ステップS415に処理を進め、OP1#PRDポインタをインクリメントし、次のPRDテーブルをフェッチするために、ステップS412に処理を戻し、それ以降の処理を繰り返す。   The cloud processing unit 441 that determines that the fetched PRD table is not the PRD table for the pickup OP1 and does not add the SDRAM address, proceeds to step S415, increments the OP1 # PRD pointer, and fetches the next PRD table. Therefore, the process is returned to step S412 and the subsequent processes are repeated.

また、ステップS414において、フェッチしたPRDテーブルがピックアップOP1用のPRDテーブルであり、そのPRD処理に対応するSDRAMアドレスを追加すると判定したクラウド処理部441は、ステップS416に処理を進め、OP1#CrntRXWの値が「NULL」、または、フェッチしたPRDテーブルのRXWであるか否かを判定する。   Also, in step S414, the fetched PRD table is the PRD table for the pickup OP1, and the cloud processing unit 441 that has determined to add the SDRAM address corresponding to the PRD process proceeds to step S416, and the OP1 # CrntRXW It is determined whether the value is “NULL” or the RXW of the fetched PRD table.

OP1#CrntRXWの値が「NULL」、または、フェッチしたPRDテーブルのRXWであると判定した場合、クラウド処理部441は、今回処理するPRDテーブルが前回処理したPRDテーブルと同種である、または、GOP処理の最初のPRDテーブルであると認識し、処理をステップS417に進め、OP1用GOP処理部443に対してGopNEXT PRDコマンド613を発行し、OP1用GOP処理部443にそのPRDテーブルのPRD処理を実行させる。GopNEXT PRDコマンド613を発行すると、クラウド処理部441は、ステップS418において、OP1#PRDポインタをインクリメントし、図66のステップS404に処理を戻し、それ以降の処理を繰り返す。   When it is determined that the value of OP1 # CrntRXW is “NULL” or the RXW of the fetched PRD table, the cloud processing unit 441 has the same type of PRD table processed last time as the PRD table processed this time, or GOP Recognizing that it is the first PRD table of the process, the process proceeds to step S417, and the GopNEXT PRD command 613 is issued to the OP1 GOP processing unit 443, and the OPD GOP processing unit 443 performs the PRD process of the PRD table. Let it run. When the GopNEXT PRD command 613 is issued, the cloud processing unit 441 increments the OP1 # PRD pointer in step S418, returns the processing to step S404 in FIG. 66, and repeats the subsequent processing.

また、図64のステップS413において、OP1#PRDポインタの値がCrowd END PRDポインタの値に一致し、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致すると判定した場合、クラウド処理部441は、1つのクラウド処理が終了したものと認識し、ステップS419に処理を進め、OP1用GOP処理部443に対して、GopENDコマンド616を発行し、GOP処理の終了を指示する。GopENDコマンド616を発行したクラウド処理部441は、図66のステップS404に処理を戻し、それ以降の処理を繰り返す。   Also, in step S413 in FIG. 64, the value of the OP1 # PRD pointer matches the value of the Crowd END PRD pointer, and it is determined that the PRD table specified by the OP1 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. In such a case, the cloud processing unit 441 recognizes that one cloud process has ended, proceeds to step S419, issues a GopEND command 616 to the OP1 GOP processing unit 443, and terminates the GOP process. Instruct. The cloud processing unit 441 that issued the GopEND command 616 returns the process to step S404 in FIG. 66 and repeats the subsequent processes.

さらに、図67のステップS416において、OP1#CrntRXWの値が「NULL」でもなく、フェッチしたPRDテーブルのRXWでもないと判定した場合、クラウド処理部441は、今回処理するPRDテーブルの処理の種類が前回と異なるので、1つのGOP処理が終了したと認識し、処理をステップS419に処理を進め、OP1用GOP処理部443に対して、GopENDコマンド616を発行し、GOP処理の終了を指示する。GopENDコマンド616を発行したクラウド処理部441は、図66のステップS404に処理を戻し、それ以降の処理を繰り返す。   Furthermore, in step S416 in FIG. 67, when it is determined that the value of OP1 # CrntRXW is not “NULL” and is not the RXW of the fetched PRD table, the cloud processing unit 441 determines the type of processing of the PRD table to be processed this time. Since this is different from the previous time, it is recognized that one GOP process has been completed, the process proceeds to step S419, the GopEND command 616 is issued to the OP1 GOP processing unit 443, and the end of the GOP process is instructed. The cloud processing unit 441 that issued the GopEND command 616 returns the process to step S404 in FIG. 66 and repeats the subsequent processes.

また、ステップS411において、取得したコマンドがGopNext Reqコマンド612でないと判定した場合、クラウド処理部441は、図68のステップS421に処理を進める。   If it is determined in step S411 that the acquired command is not the GopNext Req command 612, the cloud processing unit 441 advances the processing to step S421 in FIG.

図68のステップS421において、クラウド処理部441は、GopFINISHコマンド617を取得したか否かを判定し、GopFINISHコマンド617を取得したと判定した場合、処理をステップS422に進め、OP1 FINISHフラグに「1」をセットする。   68, the cloud processing unit 441 determines whether or not the GopFINISH command 617 has been acquired. If the cloud processing unit 441 determines that the GopFINISH command 617 has been acquired, the cloud processing unit 441 proceeds to step S422 and sets “1” in the OP1 FINISH flag. "Is set.

OP1 FINISHフラグに「1」をセットするとクラウド処理部441は、処理をステップS423に進め、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致するか否かを判定する。OP1#PRDポインタの値とCrowd END PRDポインタの値が一致し、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致すると判定した場合、クラウド処理部441は、ステップS424に処理を進め、クラウド処理を終了し、OP0用クラウド処理が終了するまで待機する。OP0用クラウド処理が終了すると、クラウド処理部441は、OP1用クラウド制御処理を終了し、図62のステップS348に処理を戻す。ステップS348に処理が戻されると、クラウド全体制御処理を行っていたクラウド処理部441は、上述したように、ステップS342に処理を戻し、それ以降の処理を繰り返す。   When “1” is set in the OP1 FINISH flag, the cloud processing unit 441 advances the processing to step S423, and determines whether or not the PRD table specified by the OP1 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer. judge. When it is determined that the value of the OP1 # PRD pointer matches the value of the Crowd END PRD pointer and the PRD table specified by the OP1 # PRD pointer matches the PRD table specified by the Crowd END PRD pointer, the cloud processing unit 441 The process advances to step S424 to end the cloud process and wait until the OP0 cloud process ends. When the cloud processing for OP0 ends, the cloud processing unit 441 ends the cloud control processing for OP1 and returns the processing to step S348 in FIG. When the process is returned to step S348, the cloud processing unit 441 that has performed the entire cloud control process returns the process to step S342 and repeats the subsequent processes as described above.

なお、図68のステップS421において、GopFINISHコマンド617を取得していないと判定した場合、クラウド処理部441は、図66のステップS404に処理を戻し、それ以降の処理を繰り返す。また、図68のステップS423において、OP1#PRDポインタの値とCrowd END PRDポインタの値が一致せず、OP1#PRDポインタが指定するPRDテーブルがCrowd END PRDポインタで指定されるPRDテーブルと一致しないと判定した場合、クラウド処理部441は、図66のステップS401に処理を進め、次のGOP処理について、それ以降の処理を繰り返す。   If it is determined in step S421 in FIG. 68 that the GopFINISH command 617 has not been acquired, the cloud processing unit 441 returns the process to step S404 in FIG. 66 and repeats the subsequent processes. In step S423 in FIG. 68, the value of the OP1 # PRD pointer does not match the value of the Crowd END PRD pointer, and the PRD table specified by the OP1 # PRD pointer does not match the PRD table specified by the Crowd END PRD pointer. If determined to be, the cloud processing unit 441 proceeds to step S401 in FIG. 66, and repeats the subsequent processes for the next GOP process.

以上のようにクラウド処理部441は、クラウド処理を制御するクラウド全体制御処理(OP0用クラウド制御処理およびOP1用クラウド制御処理を含む)を実行し、各クラウド処理を制御する。これにより、各GOP処理がOP0用GOP処理部442またはOP1用GOP処理部443の内、GOP処理が対応する方においてそれぞれ実行されるので、ATAハードウェア21は、2つのピックアップを有するドライブ22に対して、ATAの規格上において、各ピックアップに対するGOP処理をあたかも2つのデバイスに対するGOP処理のように実行し、転送処理を行うことができる。従って、CPU23は、ドライブ22がピックアップを複数有する場合においても、容易にデータを転送させることができる。   As described above, the cloud processing unit 441 executes the entire cloud control process (including the cloud control process for OP0 and the cloud control process for OP1) that controls the cloud process, and controls each cloud process. As a result, each GOP process is executed on the GOP processing unit 442 for OP0 or the GOP processing unit 443 for OP1 corresponding to the GOP processing, so the ATA hardware 21 is connected to the drive 22 having two pickups. On the other hand, according to the ATA standard, a GOP process for each pickup can be executed as if it were a GOP process for two devices to perform a transfer process. Therefore, the CPU 23 can easily transfer data even when the drive 22 has a plurality of pickups.

以上においては、2つのピックアップを有するドライブ22を、1つのピックアップを有する2台のデバイスとしてみせかけるように動作させてデータ転送を行う場合(2Dev-2OP)について説明した。次に、2つのピックアップを有するドライブ22を、1つのピックアップを有する1台のデバイスとしてみせかけるように動作させてデータ転送を行う場合(1Dev-2OP)について説明する。   In the above description, a case has been described in which data transfer is performed by operating the drive 22 having two pickups so as to appear as two devices having one pickup (2 Dev-2OP). Next, a case where data transfer is performed by operating the drive 22 having two pickups so as to appear as one device having one pickup (1 Dev-2OP) will be described.

図69は、PRDテーブルに基づいて実行されるクラウド処理とGOP処理のスケジュールの例を説明する図である。この図69の構成は、図56の構成に対応する。   FIG. 69 is a diagram for explaining an example of a schedule of cloud processing and GOP processing executed based on the PRD table. The configuration of FIG. 69 corresponds to the configuration of FIG.

2つのピックアップを有するドライブ22を、1つのピックアップを有する1台のデバイスとしてみせかけるように動作させてデータ転送を行う場合も、図56の場合と同様に、クラウド処理部441がクラウド処理を行うことにより、各GOP処理をフォークしてOP0用GOP処理部442またはOP1用GOP処理部443に実行させる。ただし、この場合、ATAの規格上においては、ピックアップOP0もピックアップOP1も同じ1つのピックアップとして扱われるので、クラウド処理部441は、OP0用のGOP処理とOP1用のGOP処理とを独立して制御することができず、図56の場合と異なり、各クラウド処理において、書き込み処理(ライト)と読み出し処理(リード)が混在しないようにする。   Similarly to the case of FIG. 56, the cloud processing unit 441 performs cloud processing even when the data transfer is performed by operating the drive 22 having two pickups so as to appear as one device having one pickup. Thus, each GOP process is forked and executed by the OP0 GOP processing unit 442 or the OP1 GOP processing unit 443. However, in this case, the pickup OP0 and the pickup OP1 are handled as the same pickup in the ATA standard, so the cloud processing unit 441 controls the GOP processing for OP0 and the GOP processing for OP1 independently. Unlike in the case of FIG. 56, the writing process (write) and the reading process (read) are not mixed in each cloud process.

すなわち、図69において、図56の場合と同じテーブルである、図中右側に示されるPRDテーブル群に基づいてPRD処理を実行する場合、クラウド処理部441は、OP0用GOP処理部442において実行される読み出し処理の、PRD処理651およびPRD処理653よりなるGOP処理661と、OP1用GOP処理部443において実行される読み出し処理の、PRD処理652よりなるGOP処理662との両方が終了するまで、OP0用GOP処理部442およびOP1用GOP処理部443に対して、次のGOP処理を実行させない。従って、このGOP処理661とGOP処理662とが1つのクラウド処理671として構成される。   That is, in FIG. 69, when executing the PRD process based on the PRD table group shown on the right side in the figure, which is the same table as in FIG. 56, the cloud processing unit 441 is executed in the OP0 GOP processing unit 442. Until both the GOP process 661 composed of the PRD process 651 and the PRD process 653 and the GOP process 662 composed of the PRD process 652 of the read process executed in the OP1 GOP processing unit 443 are completed. The GOP processing unit 442 and the OP1 GOP processing unit 443 are not allowed to execute the next GOP processing. Therefore, the GOP process 661 and the GOP process 662 are configured as one cloud process 671.

そして、クラウド処理部441は、クラウド処理671が完了すると(フォークしたGOP処理を一度ジョインしてから)、次のクラウド処理672として、GOP処理663およびGOP処理664をフォークして各部に実行させる。このクラウド処理672は、書き込み処理を行うGOP処理のみにより構成される。次のGOP処理665は読み出し処理であるので、クラウド処理部441は、これをさらに次のクラウド処理673とし、クラウド処理672が終了してから(GOP処理663およびGOP処理664が完了し、一度ジョインさせてから)、フォークして実行させる。   When the cloud processing 441 is completed (after joining the forked GOP processing once), the cloud processing unit 441 forks the GOP processing 663 and the GOP processing 664 as the next cloud processing 672 and causes each unit to execute them. This cloud process 672 is configured only by a GOP process that performs a write process. Since the next GOP process 665 is a read process, the cloud processing unit 441 further sets this as the next cloud process 673, and after the cloud process 672 ends (the GOP process 663 and the GOP process 664 are completed, Then fork and run.

このように制御するためにクラウド処理部441は、図70に示されるように、OP切り替えタイミングを、例えば、読み出し処理の場合、DMAコマンドを発行した直後およびステータス報告終了時の2箇所とし、書き込み処理の場合、DMA転送終了時、または、ステータス報告終了時のいずれか一方より選択された方となるようにする。   In order to control in this way, the cloud processing unit 441 uses, as shown in FIG. 70, the OP switching timing, for example, in the case of read processing, immediately after issuing the DMA command and at two places at the end of the status report. In the case of processing, it is selected from either the end of DMA transfer or the end of status reporting.

従って、1クラウド処理を構成するGOP処理が全て書き込み処理(ライト)を行うPRD処理により構成される場合のOP切り替えに関する処理は、図58を参照して説明した、1つのピックアップを有する2台のデバイスとして見せかけるように動作させてデータ転送を行う場合(2Dev-2OP)と同様であるのでその説明を省略する。また、図58を参照して説明したように、DMA転送終了時に切り替える場合であっても、ステータス報告終了時において切り替える場合であっても、基本的に同様に切り替えられることについても、同様である。   Therefore, the process related to OP switching in the case where all the GOP processes constituting one cloud process are configured by PRD processes that perform a write process (write) is described with reference to FIG. Since it is the same as the case of performing data transfer by operating as if it appears as a device (2 Dev-2OP), its description is omitted. In addition, as described with reference to FIG. 58, the same applies to the case where switching is performed at the end of DMA transfer or the case where switching is performed at the end of status reporting. .

これに対して、1クラウド処理内のPRD処理が全て読み出し処理(Read)である場合の切り替え処理は、図71に示されるように、DMAコマンドを発行した直後およびステータス報告終了時の2箇所において行われる。これは、この方法においては、ドライブ22を1つのピックアップを有する1台のデバイスとしてみせかけるために、リードコマンドをキューイングするために用意されるキューは1つのみであるので、その1つのキューをピックアップOP0に対する処理とピックアップOP1に対する処理とで共有する必要があるからである。従って、この場合、ピックアップOP0に対する処理とピックアップOP1に対する処理のそれぞれの処理における限界キューイング数は、用意されるキューの限界キューイング数の半分の値に設定される。   On the other hand, as shown in FIG. 71, the switching process when all the PRD processes in one cloud process are read processes (Read) is performed at two places immediately after issuing the DMA command and at the end of the status report. Done. This is because, in this method, only one queue is prepared for queuing the read command in order to make the drive 22 appear as one device having one pickup. This is because it is necessary to share the processing for the pickup OP0 and the processing for the pickup OP1. Accordingly, in this case, the limit queuing number in each of the processing for the pickup OP0 and the processing for the pickup OP1 is set to a value that is half the limit queuing number of the prepared queue.

また、読み出し処理においては、最初にDMAコマンドのキューイングが限界キューイング数に達するまで行われるが、その際に、後のDMA転送が交互に行われるように、クラウド処理部441は、ピックアップOP0に対するDMAコマンド(R)と、ピックアップOP0に対するDMAコマンド(R)とを交互にキューに格納させる。そのため、読み出し処理の切り替えタイミングとして、DMAコマンドを発行した直後が設定される。   In the read process, the DMA command queuing is first performed until the limit queuing number is reached. At this time, the cloud processing unit 441 performs the pickup OP0 so that the subsequent DMA transfer is performed alternately. And the DMA command (R) for the pickup OP0 are alternately stored in the queue. Therefore, immediately after the DMA command is issued is set as the read processing switching timing.

また、ピックアップOP0とピックアップOP1とでDMA転送を交互に行うために、ステータス報告終了時もさらに、切り替えタイミングとして設定される。従って、この場合のクラウド処理(読み出し処理のみで構成されるクラウド処理)においては、図71に示されるように、最初に、DMAコマンドを発行した直後の切り替えにより、OP0のDMAコマンドとOP1のDMAコマンドが交互にキューイングされ、ステータス報告終了時の切り替えにより、両方の合計数が限界キューイング数に達すると、OP0に対応するDMA転送とOP1に対応するDMA転送が1回ずつ行われる。その後、DMAコマンドの発行が、それぞれのピックアップに対して1回ずつ行われ、DMA転送により2つ減少したキューイング数を限界キューイング数まで増加させる。   Further, since DMA transfer is alternately performed between the pickup OP0 and the pickup OP1, the end of status reporting is further set as a switching timing. Therefore, in the cloud processing in this case (cloud processing composed only of read processing), as shown in FIG. 71, the DMA command of OP0 and the DMA of OP1 are switched by switching immediately after issuing the DMA command first. When the commands are alternately queued and the total number of both reaches the limit queuing number by switching at the end of status reporting, the DMA transfer corresponding to OP0 and the DMA transfer corresponding to OP1 are performed once. Thereafter, the DMA command is issued once for each pickup, and the queuing number decreased by two by DMA transfer is increased to the limit queuing number.

以上の処理を繰り返すことにより、ATAホストハードウェア21は、読み出し処理のGOP処理のみで構成されるクラウド処理を実行する。   By repeating the above process, the ATA host hardware 21 executes a cloud process including only the GOP process of the read process.

なお、読み出し処理のクラウド処理においては、図72に示されるように、クラウド処理部441がRdTRNSF許可コマンド等を用いてData転送の許可や禁止を制御することにより、コマンド順とデータ転送順を正しく対応付けるようにDMA転送が制御される。   In the cloud processing of read processing, as shown in FIG. 72, the cloud processing unit 441 controls permission / prohibition of data transfer using an RdTRNSF permission command or the like, so that the command order and data transfer order are correctly set. DMA transfer is controlled so as to be associated.

仮に、クラウド処理部441がこの制御を行わないとすると、例えば、各ピックアップに対するDMAコマンドのキューイング数が互いに異なる場合、一方のピックアップに対するGOP処理においては、キューイングが続けられているのに、他方のピックアップに対するGOP処理においては、DMA転送が開始されてしまう場合がある。このような事態が発生すると、キューイングされたコマンド順と、データ転送順が異なってしまい、不都合が生じる恐れがある。   If the cloud processing unit 441 does not perform this control, for example, if the number of DMA command queuing for each pickup is different from each other, the queuing is continued in the GOP processing for one pickup, In the GOP process for the other pickup, DMA transfer may be started. When such a situation occurs, the queued command order and the data transfer order are different, which may cause inconvenience.

そこで、クラウド処理部441が、一方のピックアップのGOP処理においてDMA転送が行われたときに、他方のピックアップのGOP処理に対して、データ転送を許可するRdTRNSF許可コマンドを発行し、各GOP処理は、その許可がないとDMA転送を行うことができないようにすることにより、確実に、OP0に対応するDMA転送とOP1に対応するDMA転送を交互に行うようにする。これによりクラウド処理部441は、コマンド順とデータ転送順を正しく対応付けることができる。   Therefore, when a DMA transfer is performed in the GOP process of one pickup, the cloud processing unit 441 issues an RdTRNSF permission command for permitting data transfer to the GOP process of the other pickup, and each GOP process By not allowing the DMA transfer without the permission, the DMA transfer corresponding to OP0 and the DMA transfer corresponding to OP1 are surely performed alternately. Accordingly, the cloud processing unit 441 can correctly associate the command order with the data transfer order.

なお、一方のピックアップに対するGOP処理が終了し、他方のピックアップに対するGOP処理のみが残った場合、DMA転送は、そのGOP処理のみしか残されていないので、その場合は、クラウド処理部441は、DMA転送が行われても、RdTRNSF許可コマンドを発行しない。   When the GOP process for one pickup is completed and only the GOP process for the other pickup remains, only the GOP process remains for the DMA transfer. In this case, the cloud processing unit 441 performs the DMA transfer. RdTRNSF authorization command is not issued even if transfer is performed.

図73のフローチャートを参照して、このようなクラウド処理部441によるTurn権の遷移を制御するTurn制御処理を説明する。   With reference to the flowchart of FIG. 73, the Turn control process for controlling the transition of the Turn right by the cloud processing unit 441 will be described.

最初にクラウド処理部441は、ステップS441において、ピックアップOP0にTurn権を設定し、OP0用GOP処理部442をTurnON状態に設定する。次に、クラウド処理部441は、ステップS442において、RdTRNSF許可コマンドをOP0用GOP処理部442に発行することによりOP0用GOP処理部442にデータ転送許可を与え、データ転送許可先を管理するための変数Read TRNSF許可にOP0をセット(設定)する。   First, in step S441, the cloud processing unit 441 sets a Turn right to the pickup OP0, and sets the OP0 GOP processing unit 442 to the TurnON state. Next, in step S442, the cloud processing unit 441 issues a RdTRNSF permission command to the OP0 GOP processing unit 442, thereby granting data transfer permission to the OP0 GOP processing unit 442, and managing the data transfer permission destination. Set OP0 to variable Read TRNSF permission.

ステップS442の処理を終了したクラウド処理部441は、ステップS443に処理を進め、TurnON状態のGOP処理部がTurnOFF状態に移行するまで待機する。TurnON状態のGOP処理部よりTurnOFFコマンドが発行され、そのGOP処理部がTurnOFF状態に移行すると、クラウド処理部441は、ステップS444に処理を進め、変数ReadTRNSF許可にセットされたGOP処理部によりRdTRNSF Exeコマンドが発行された場合は、変数ReadTRNSF許可を更新し、データ転送許可先を切り替える。   The cloud processing unit 441 that has finished the process of step S442 proceeds to the process of step S443, and waits until the GOP processing unit in the TurnON state shifts to the TurnOFF state. When a TurnOFF command is issued from the GOP processing unit in the TurnON state and the GOP processing unit shifts to the TurnOFF state, the cloud processing unit 441 proceeds to step S444, and the ROPTRNSF Exe is set by the GOP processing unit set to the variable ReadTRNSF permission. When the command is issued, the variable ReadTRNSF permission is updated and the data transfer permission destination is switched.

そして、ステップS445において、クラウド処理部441は、Turn権のない側のGOP処理部がクラウド処理を終了(Crowd END)しているか否かを判定し、終了していないと判定した場合、ステップS446に処理を進め、そのTurn権のない側のGOP処理部に対してTurnONコマンドを発行し、Turn権を切り替える。Turn権を切り替えたクラウド処理部441は、ステップS448に処理を進める。   In step S445, the cloud processing unit 441 determines whether or not the GOP processing unit on the side without the Turn right has ended the cloud processing (Crowd END). Then, the Turn right command is issued to the GOP processing unit without the Turn right to switch the Turn right. The cloud processing unit 441 that has switched the Turn right advances the processing to Step S448.

また、ステップS445において、Turn権のない側のGOP処理部がクラウド処理を終了(Crowd END)していないと判定した場合、クラウド処理部441は、ステップS447に処理を進め、ステップS443においてTurnOFF状態に移行したGOP処理部に対してTurnONコマンドを発行してTurn権を切り替えずに、変数ReadTRNSF許可にそのGOP処理部をセットし、ステップS448に処理を進める。   If it is determined in step S445 that the GOP processing unit without the Turn right has not finished the cloud processing (Crowd END), the cloud processing unit 441 proceeds to step S447, and in step S443, the TurnOFF state Without switching the Turn right by issuing a TurnON command to the GOP processing unit that has shifted to (2), the GOP processing unit is set to the variable ReadTRNSF permission, and the process proceeds to step S448.

ステップS448において、クラウド処理部441は、Turn制御処理を終了するか否かを判定し、終了しないと判定した場合、処理をステップS443に戻し、それ以降の処理を繰り返す。また、ステップS448において、Turn制御処理を終了すると判定した場合、クラウド処理部441は、Turn制御処理を終了する。   In step S448, the cloud processing unit 441 determines whether to end the Turn control process. If it is determined not to end, the cloud processing unit 441 returns the process to Step S443 and repeats the subsequent processes. If it is determined in step S448 that the Turn control process is to be terminated, the cloud processing unit 441 terminates the Turn control process.

以上のようにして、クラウド処理部441は、Turn権およびデータ転送許可先の設定を制御する。なお、この場合のクラウド全体制御処理、OP0用クラウド制御処理、およびOP1用クラウド制御処理は、図62乃至図68のフローチャートを参照して説明した、1つのピックアップを有する2台のデバイスとして見せかけるように動作させてデータ転送を行う場合(2Dev-2OP)と同様であるので、その説明を省略する。ただし、この場合、DMA転送を行うときに各GOP処理部は、自分自身にデータ転送許可が発行されているか否かを判定し、許可されている場合のみDMA転送を行う。   As described above, the cloud processing unit 441 controls the setting of the Turn right and the data transfer permission destination. In this case, the entire cloud control process, the OP0 cloud control process, and the OP1 cloud control process seem to appear as two devices having one pickup described with reference to the flowcharts of FIGS. Since this is the same as the case where data transfer is performed by operating (2 Dev-2OP), the description thereof is omitted. However, in this case, when performing DMA transfer, each GOP processing unit determines whether or not data transfer permission has been issued to itself, and performs DMA transfer only when permitted.

このように、クラウド処理部441がデータ転送の許可や禁止を制御しながら、クラウド処理を制御することにより、ATAホストハードウェア21は、2つのピックアップを有するドライブ22に対して、ATAの規格上において、各ピックアップに対するGOP処理をあたかも1つのピックアップに対するGOP処理のように実行し、転送処理を行うことができる。従って、CPU23は、ドライブ22がピックアップを複数有する場合においても、容易にデータを転送させることができる。   As described above, the cloud processing unit 441 controls the cloud processing while controlling the permission or prohibition of the data transfer, so that the ATA host hardware 21 is in accordance with the ATA standard for the drive 22 having two pickups. The transfer process can be performed by executing the GOP process for each pickup as if it were a GOP process for one pickup. Therefore, the CPU 23 can easily transfer data even when the drive 22 has a plurality of pickups.

以上のように、本発明のATAホストハードウェア21は、CPU23により、ATAホストハードウェア21が内蔵するSRAM52やレジスタ53に格納された、PIOスクリプトやPRDテーブル等の情報に基づいて、PIO処理やDMA処理をCPU23のアクセス無しに連続して実行することができ、また、その転送するデータサイズは、PIOスクリプトやPRDテーブル等の情報により指定することができる限り、上限がなく、例えば、1度のDMA転送により転送しきれないほど大きな映像データを連続して読み出したり書き込んだりすることを容易に行うことができる。また、このときのCPU23とATAホストハードウェア21との間の通信回数(通信データ量)も、PIOスクリプトやPRDテーブル等の情報をSRAM52やレジスタ53に格納させる場合と、処理終了を通知する場合に限られるので、CPU23は、データ転送による負荷を大幅に削減することができる。また、これにより、ATAホストハードウェアは、バスの占有率も低下させることができる。   As described above, the ATA host hardware 21 of the present invention allows the CPU 23 to perform PIO processing or the like based on the information such as the PIO script and the PRD table stored in the SRAM 52 and the register 53 built in the ATA host hardware 21. There is no upper limit as long as the DMA processing can be continuously executed without access by the CPU 23 and the data size to be transferred can be specified by information such as a PIO script or a PRD table. It is easy to continuously read and write video data that cannot be transferred by DMA transfer. Further, the number of communications (communication data amount) between the CPU 23 and the ATA host hardware 21 at this time is also a case where information such as a PIO script or a PRD table is stored in the SRAM 52 or the register 53, and a case where a processing end is notified Therefore, the CPU 23 can greatly reduce the load due to data transfer. This also allows the ATA host hardware to reduce the bus occupancy.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウエアにより実行させることもできる。この場合、例えば、図6のATAホストハードウェア21は、図74に示されるようなパーソナルコンピュータの一部として構成されるようにしてもよい。   The series of processes described above can be executed by hardware or can be executed by software. In this case, for example, the ATA host hardware 21 in FIG. 6 may be configured as a part of a personal computer as shown in FIG.

図74において、パーソナルコンピュータ701のCPU711は、ROM(Read Only Memory)712に記憶されているプログラム、または記憶部723からRAM713にロードされたプログラムに従って各種の処理を実行する。RAM713にはまた、CPU711が各種の処理を実行する上において必要なデータなども適宜記憶される。   In FIG. 74, the CPU 711 of the personal computer 701 executes various processes according to a program stored in a ROM (Read Only Memory) 712 or a program loaded from the storage unit 723 to the RAM 713. The RAM 713 also stores data necessary for the CPU 711 to execute various processes as appropriate.

CPU711、ROM712、およびRAM713は、バス714を介して相互に接続されている。このバス714にはまた、入出力インタフェース720も接続されている。   The CPU 711, the ROM 712, and the RAM 713 are connected to each other via a bus 714. An input / output interface 720 is also connected to the bus 714.

入出力インタフェース720には、キーボード、マウスなどよりなる入力部721、CRT、LCDなどよりなるディスプレイ、並びにスピーカなどよりなる出力部722、ハードディスクなどより構成される記憶部723、モデムなどより構成される通信部724が接続されている。通信部724は、インターネットを含むネットワーク12を介しての通信処理を行う。   The input / output interface 720 includes an input unit 721 including a keyboard and a mouse, a display including a CRT and an LCD, an output unit 722 including a speaker, a storage unit 723 including a hard disk, a modem, and the like. A communication unit 724 is connected. The communication unit 724 performs communication processing via the network 12 including the Internet.

入出力インタフェース720にはまた、必要に応じてドライブ725が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア726が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部723にインストールされる。   A drive 725 is also connected to the input / output interface 720 as necessary, and a removable medium 726 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is loaded. It is installed in the storage unit 723 as necessary.

上述した一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、ネットワークや記録媒体からインストールされる。   When the above-described series of processing is executed by software, a program constituting the software is installed from a network or a recording medium.

この記録媒体は、例えば、図74に示されるように、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク(MD(Mini-Disk)(登録商標)を含む)、もしくは半導体メモリなどよりなるリムーバブルメディア726により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM712や、記憶部723に含まれるハードディスクなどで構成される。   For example, as shown in FIG. 74, the recording medium is distributed to distribute the program to the user separately from the apparatus main body, and includes a magnetic disk (including a flexible disk) on which the program is recorded, an optical disk ( Removable media 726 composed of CD-ROM (compact disk-read only memory), DVD (digital versatile disk), magneto-optical disk (including MD (mini-disk) (registered trademark)), or semiconductor memory In addition to being configured, it is configured by a ROM 712 in which a program is recorded, a hard disk included in the storage unit 723, and the like distributed to the user in a state of being incorporated in the apparatus main body in advance.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. It also includes processes that are executed individually.

また、本明細書において、システムとは、複数の装置により構成される装置全体を表すものである。   Further, in this specification, the system represents the entire apparatus constituted by a plurality of apparatuses.

従来のPIO転送モードについて説明するブロック図である。It is a block diagram explaining the conventional PIO transfer mode. 従来のPIO転送モードにおけるCPUアクセスについて説明する模式図である。It is a schematic diagram explaining CPU access in the conventional PIO transfer mode. 従来のシングルワード/マルチワードDMA転送モードについて説明するブロック図である。It is a block diagram explaining the conventional single word / multiword DMA transfer mode. 従来のUltraDMA転送モードについて説明するブロック図である。It is a block diagram explaining the conventional UltraDMA transfer mode. 従来のUltraDMA転送モードにおけるCPUアクセスについて説明する模式図である。It is a schematic diagram explaining CPU access in the conventional UltraDMA transfer mode. 本発明を適用したATAホストハードウェアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the ATA host hardware to which this invention is applied. 図6のATAホストハードウェアのデータ転送処理における状態遷移の様子を説明する図である。It is a figure explaining the mode of a state transition in the data transfer process of the ATA host hardware of FIG. 図6のSRAMおよびレジスタに保持されるデータの構成例を示す図である。It is a figure which shows the structural example of the data hold | maintained at SRAM and the register | resistor of FIG. 図8の領域101に記述されるスルーPIOスクリプトの構成例を示す図である。It is a figure which shows the structural example of the through PIO script described in the area | region 101 of FIG. 図8の領域102に記述されるPIO CPU割り込み要因発生条件の構成例を示す図である。It is a figure which shows the structural example of the PIO CPU interrupt factor generation condition described in the area | region 102 of FIG. 図8の領域102に記述される読み出し繰り返し/IfGoto条件のテーブルの構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of a table of read repetition / IfGoto conditions described in an area 102 in FIG. 8. 図8の領域104に構成されるユーザ足し算レジスタの構成例を示す図である。It is a figure which shows the structural example of the user addition register comprised in the area | region 104 of FIG. 図8の領域105および領域106に構成されるIDMA用のPRDテーブルの構成例を示す図である。It is a figure which shows the structural example of the PRD table for IDMA comprised in the area | region 105 and the area | region 106 of FIG. 図8の領域106に構成されるIDMA用のSDRAMアドレス追加設定テーブルの構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of an SDRAM address addition setting table for IDMA configured in an area 106 in FIG. 8. 図8の領域107に構成されるIDMA用のPIOスクリプトの構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of a PIO script for IDMA configured in an area 107 in FIG. 8. 図8のレジスタ53の領域111に構成されるATA全体に関わる設定情報の内、モード/ステータス情報の構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of mode / status information in setting information related to the entire ATA configured in the area 111 of the register 53 in FIG. 8. 図8のレジスタ53の領域111に構成されるATA全体に関わる設定情報の内、一時停止情報の構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of temporary stop information among setting information related to the entire ATA configured in an area 111 of the register 53 of FIG. 8. 図8の領域112に構成されるスルーPIO転送モードに関わる設定情報の内、スルーPIO処理設定の構成例を示す図である。FIG. 9 is a diagram illustrating a configuration example of through PIO processing setting in setting information related to a through PIO transfer mode configured in an area 112 in FIG. 8. 図8の領域112に構成されるスルーPIO転送モードに関わる設定情報の内、セマフォ設定の構成例を示す図である。FIG. 9 is a diagram showing a configuration example of semaphore setting among setting information related to the through PIO transfer mode configured in the area 112 of FIG. 8. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第1のIDMA処理設定の構成例を示す図である。It is a figure which shows the structural example of the 1st IDMA process setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第2のIDMA処理設定の構成例を示す図である。It is a figure which shows the structural example of the 2nd IDMA process setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである第3のIDMA処理設定の構成例を示す図である。It is a figure which shows the structural example of the 3rd IDMA process setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つであるセマフォ設定の構成例を示す図である。It is a figure which shows the structural example of the semaphore setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つであるLBA設定の構成例を示す図である。It is a figure which shows the structural example of the LBA setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 図8の領域113に構成されるIDMA転送モードに関わる設定情報に関わる設定情報の1つである割り込み要因設定の構成例を示す図である。It is a figure which shows the structural example of the interruption factor setting which is one of the setting information regarding the setting information regarding the IDMA transfer mode comprised in the area | region 113 of FIG. 本発明を適用した、スルーPIO転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。It is a figure which shows the functional block of the ATA host hardware 21 in the through PIO transfer mode to which this invention is applied. スルーPIO制御処理を説明するフローチャートである。It is a flowchart explaining through PIO control processing. 単一PIOスクリプト処理を説明するフローチャートである。It is a flowchart explaining a single PIO script process. スルーPIO転送モードのPIOスクリプトに関する処理を説明するフローチャートである。It is a flowchart explaining the process regarding the PIO script of through PIO transfer mode. スルーPIO転送モードにおけるCPUアクセスの例を説明する図である。It is a figure explaining the example of CPU access in through PIO transfer mode. アボート処理を説明するフローチャートである。It is a flowchart explaining an abort process. 本発明を適用したIDMA転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。It is a figure which shows the functional block of the ATA host hardware 21 in IDMA transfer mode to which this invention is applied. IDMA転送モードのIDMA PIOスクリプトに関する処理を説明するフローチャートである。It is a flowchart explaining the process regarding the IDMA PIO script of IDMA transfer mode. IDMA PIO制御処理を説明するフローチャートである。It is a flowchart explaining IDMA PIO control processing. アボート処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of an abort process. IDMA転送モードのPRDテーブルに関する処理を説明するフローチャートである。It is a flowchart explaining the process regarding the PRD table of IDMA transfer mode. PRDテーブルに対する処理の詳細な構成例を説明する図である。It is a figure explaining the detailed structural example of the process with respect to a PRD table. READが連続する場合のPRDテーブルに対する処理の例を説明する図である。It is a figure explaining the example of the process with respect to the PRD table in case READ continues. READとWRITEが混在する場合のPRDテーブルに対する処理の例を説明する図である。It is a figure explaining the example of the process with respect to the PRD table in case READ and WRITE coexist. GOP単位でIDMA処理を制御するGOP処理を説明するフローチャートである。It is a flowchart explaining the GOP process which controls an IDMA process in GOP unit. コマンド開始準備処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a command start preparation process. データ転送PRDポインタFIFOの構成例を示す図である。It is a figure which shows the structural example of a data transfer PRD pointer FIFO. コマンド開始処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a command start process. コマンド実行処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a command execution process. データ転送開始準備処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a data transfer start preparation process. データ転送SDRAMポインタFIFOの構成例を示す図である。It is a figure which shows the structural example of a data transfer SDRAM pointer FIFO. データ転送開始準備処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a data transfer start preparation process. データ転送実行処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a data transfer execution process. データ転送状態報告処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of a data transfer state report process. データ転送終了処理の例を説明するフローチャートである。It is a flowchart explaining the example of a data transfer end process. IDMA転送モードにおけるCPUアクセスの例を説明する図である。It is a figure explaining the example of CPU access in IDMA transfer mode. アボート処理を説明するフローチャートである。It is a flowchart explaining an abort process. 2つのピックアップを有するドライブに対するATAホストハードウェア21による対応について説明する図である。It is a figure explaining the response | compatibility by the ATA host hardware 21 with respect to the drive which has two pick-ups. GOP処理を2つのピックアップに対して並列分岐した場合のDMA転送の様子を説明する図である。It is a figure explaining the mode of DMA transfer when a GOP process is branched in parallel with respect to two pickups. ドライブ22が2つのピックアップOP0およびOP1を有する場合の、IDMA転送モードにおけるATAホストハードウェア21の機能ブロックを示す図である。It is a figure which shows the functional block of the ATA host hardware 21 in IDMA transfer mode when the drive 22 has two pickups OP0 and OP1. PRDテーブルに基づいて実行されるクラウド処理とGOP処理のスケジュールの例を説明する図である。It is a figure explaining the example of the schedule of the cloud process performed based on a PRD table, and a GOP process. ピックアップの切り替えタイミングについて説明する図である。It is a figure explaining the switching timing of a pickup. 書き込み処理のみにより構成されるクラウド処理について説明する図である。It is a figure explaining the cloud process comprised only by a write process. 読み出し処理のみにより構成されるクラウド処理について説明する図である。It is a figure explaining the cloud process comprised only by a read process. 読み出し処理と書き込み処理が混在するクラウド処理について説明する図である。It is a figure explaining the cloud process in which the read process and the write process are mixed. クラウド処理部とGOP処理部のコマンドのやり取りについて説明する図である。It is a figure explaining the exchange of the command of a cloud process part and a GOP process part. クラウド全体制御処理を説明するフローチャートである。It is a flowchart explaining a cloud whole control process. OP0用クラウド制御処理を説明するフローチャートである。It is a flowchart explaining the cloud control process for OP0. OP0用クラウド制御処理を説明する、図63に続くフローチャートである。It is a flowchart following FIG. 63 explaining the cloud control processing for OP0. OP0用クラウド制御処理を説明する、図64に続くフローチャートである。FIG. 65 is a flowchart for explaining OP0 cloud control processing, following FIG. 64. OP1用クラウド制御処理を説明するフローチャートである。It is a flowchart explaining the cloud control processing for OP1. OP1用クラウド制御処理を説明する、図66に続くフローチャートである。FIG. 67 is a flowchart following FIG. 66 for explaining the cloud control processing for OP1. OP1用クラウド制御処理を説明する、図67に続くフローチャートである。It is a flowchart following FIG. 67 explaining the cloud control processing for OP1. PRDテーブルに基づいて実行されるクラウド処理とGOP処理のスケジュールの例を説明する図である。It is a figure explaining the example of the schedule of the cloud process performed based on a PRD table, and a GOP process. ピックアップの切り替えタイミングについて説明する図である。It is a figure explaining the switching timing of a pickup. 読み出し処理のみにより構成されるクラウド処理について説明する図である。It is a figure explaining the cloud process comprised only by a read process. 読み出し処理のみにより構成されるクラウド処理について説明する図である。It is a figure explaining the cloud process comprised only by a read process. Turn制御処理について説明するフローチャートである。It is a flowchart explaining a Turn control process. パーソナルコンピュータの構成例を示すブロック図である。And FIG. 16 is a block diagram illustrating a configuration example of a personal computer.

符号の説明Explanation of symbols

21 ATAホストハードウェア, 22 ドライブ 23 CPU, 24 SDRAM, 31 ATAホスト, 33 スルーPIO制御部, 34 単一PIOスクリプト処理部, 35 PIO実行部, 36 ATAインタフェース処理部, 37 IDMA制御部, 38 IDMA PIO制御部, 39 DMA実行部, 51 入出力制御部, 52 SRAM, 53 レジスタ, 255 スルーPIO処理ハードウェア, 268 ATAレジスタ(PIO), 271 PIO処理ハードウェア, 272 IDMA PRD制御ハードウェア, 273 DMA処理ハードウェア, 401 データ転送PRDポインタFIFO, 402 データ転送PRDポインタFIFOポインタ, 421 データ転送SDRAMポインタFIFO, 422 データ転送SDRAM Adrs,LengthポインタFIFOポインタ, 425 レジスタ(PIO), 426 レジスタ(DMA), 441 クラウド処理部, 442 OP0用GOP処理部, 443 OP1用GOP処理部, 444Aおよび444B セレクタ, 711 CPU, 712 ROM, 713 RAM, 714 バス, 720 入出力インタフェース, 721 入力部, 722 出力部, 723 記憶部, 724 通信部, 725 ドライブ, 726 リムーバブルメディア   21 ATA host hardware, 22 drives, 23 CPU, 24 SDRAM, 31 ATA host, 33 through PIO control unit, 34 single PIO script processing unit, 35 PIO execution unit, 36 ATA interface processing unit, 37 IDMA control unit, 38 IDMA PIO control unit, 39 DMA execution unit, 51 I / O control unit, 52 SRAM, 53 registers, 255 through PIO processing hardware, 268 ATA register (PIO), 271 PIO processing hardware, 272 IDMA PRD control hardware, 273 DMA Processing hardware, 401 data transfer PRD pointer FIFO, 402 data transfer PRD pointer FIFO pointer, 421 data transfer SDRAM pointer FIFO, 422 data transfer SDRAM Adrs, Length pointer FIFO pointer, 425 register (PIO), 426 register (DMA), 441 Cloud processing , 442 OP0 GOP processing unit, 443 OP1 GOP processing unit, 444A and 444B selector, 711 CPU, 712 ROM, 713 RAM, 714 bus, 720 I / O interface, 721 input unit, 722 output unit, 723 storage unit, 724 Communication unit, 725 drive, 726 removable media

Claims (11)

複数のピックアップを有するATAデバイスのインタフェースを制御するインタフェース制御装置であって、
前記ATAデバイスと、前記ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応する前記データ転送に関する処理であるPRD処理を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐手段と、
前記並列分岐手段により並列分岐された各PRD処理の進行を制御する制御手段と
を備えることを特徴とするインタフェース制御装置。
An interface control device for controlling an interface of an ATA device having a plurality of pickups,
Based on each of a plurality of PRD tables in which information related to data transfer performed between the ATA device and an external storage unit of the ATA device is described, processing related to the data transfer corresponding to each PRD table Parallel branching means for branching a certain PRD process in parallel for each pickup corresponding to each PRD table;
An interface control apparatus comprising: control means for controlling the progress of each PRD process branched in parallel by the parallel branching means.
前記PRD処理は、前記データ転送に関する複数の処理からなる複数のフェーズにより構成され、
前記制御手段は、前記PRD処理に含まれる複数の前記フェーズの内、所定のフェーズの終了時または開始時に、前記PRD処理を進行させるピックアップを切り替えることにより、各ピックアップに対応する前記PRD処理を並列に進行させる
ことを特徴とする請求項1に記載のインタフェース制御装置。
The PRD process is composed of a plurality of phases including a plurality of processes related to the data transfer,
The control means switches the PRD process corresponding to each pickup in parallel by switching a pickup that advances the PRD process at the end or start of a predetermined phase among the plurality of phases included in the PRD process. The interface control device according to claim 1, wherein
前記制御手段は、ピックアップ毎に、書き込み処理を行う前記PRD処理の最後のフェーズが終了してから、次の読み出し処理を行う前記PRD処理の最初のフェーズを開始させるとともに、ピックアップ毎に、読み出し処理を行う前記PRD処理の最後のフェーズが終了してから、次の書き込み処理を行う前記PRD処理の最初のフェーズを開始させる
ことを特徴とする請求項2に記載のインタフェース制御装置。
The control means starts the first phase of the PRD process for performing the next read process after the last phase of the PRD process for performing the write process for each pickup, and performs the read process for each pickup. The interface control apparatus according to claim 2, wherein after the last phase of the PRD process for performing the first write process is completed, the first phase of the PRD process for performing the next write process is started.
前記制御手段は、書き込み処理を行う前記PRD処理の、データ転送を行うフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行う前記ピックアップを切り替える
ことを特徴とする請求項3に記載のインタフェース制御装置。
The control means switches the pickup that performs processing at either the end of the phase of performing data transfer or the end of the phase of performing status reporting of the PRD processing that performs write processing. The interface control device according to claim 3.
前記制御手段は、読み出し処理を行う前記PRD処理の、データ転送を指示するコマンドを発行するフェーズの開始時において、処理を行う前記ピックアップを切り替える
ことを特徴とする請求項3に記載のインタフェース制御装置。
4. The interface control device according to claim 3, wherein the control unit switches the pickup that performs processing at the start of a phase of issuing a command instructing data transfer in the PRD processing that performs read processing. 5. .
前記制御手段は、全てのピックアップの書き込み処理を行う前記PRD処理の最後のフェーズが終了してから、次の読み出し処理を行う前記PRD処理の最初のフェーズを開始させるとともに、全てのピックアップの読み出し処理を行う前記PRD処理の最後のフェーズが終了してから、次の書き込み処理を行う前記PRD処理の最初のフェーズを開始させる
ことを特徴とする請求項2に記載のインタフェース制御装置。
The control means starts the first phase of the PRD process for performing the next read process after the last phase of the PRD process for performing the write process for all the pickups, and reads all the pickups. The interface control apparatus according to claim 2, wherein after the last phase of the PRD process for performing the first write process is completed, the first phase of the PRD process for performing the next write process is started.
前記制御手段は、書き込み処理を行う前記PRD処理の、データ転送を行うフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行う前記ピックアップを切り替える
ことを特徴とする請求項6に記載のインタフェース制御装置。
The control means switches the pickup that performs processing at either the end of the phase of performing data transfer or the end of the phase of performing status reporting of the PRD processing that performs write processing. The interface control device according to claim 6.
前記制御手段は、読み出し処理を行う前記PRD処理の、読み出し処理を指示するコマンドを発行するフェーズの終了時、または、ステータス報告を行うフェーズの終了時のいずれか一方において、処理を行う前記ピックアップを切り替える
ことを特徴とする請求項3に記載のインタフェース制御装置。
The control means includes the pickup that performs the process at either the end of the phase of issuing the command instructing the read process of the PRD process that performs the read process or the phase of performing the status report. The interface control device according to claim 3, wherein switching is performed.
前記PRD処理による前記データ転送の許可または禁止を制御し、全ての前記ピックアップの内、いずれか1つのピックアップに対応するPRD処理に対して前記データ転送の許可を与えるとともに、それ以外のピックアップに対応するPRD処理に対して前記データ転送の禁止を与え、前記データ転送の許可を与えたピックアップのPRD処理において前記データ転送が行われた場合、処理を行うピックアップの切り替え時に、データ転送の許可を行うピックアップを切り替え、前記データ転送の禁止を与えたピックアップのPRD処理が終了した場合、そのPRD処理に前記データ転送の許可を与えないように制御するデータ転送制御手段をさらに備え、
前記制御手段は、前記データ転送制御手段により、処理を行うピックアップの切り替え先のPRD処理に対して前記データ転送の許可が与えられていない場合、前記PRD処理を進行させずに、再度、処理を行うピックアップを切り替える
ことを特徴とする請求項8に記載のインタフェース制御装置。
Controls permission or prohibition of the data transfer by the PRD process, and grants the data transfer permission to the PRD process corresponding to any one of all the pickups, and supports other pickups The data transfer is prohibited for the PRD process to be performed, and if the data transfer is performed in the PRD process of the pickup that has given the data transfer permission, the data transfer is permitted when the pickup to perform the process is switched. When the PRD process of the pickup that switches the pickup and gives the prohibition of data transfer is completed, further comprises a data transfer control means for controlling the PRD process so as not to allow the data transfer,
When the data transfer control means does not allow the data transfer to the PRD process of the switching destination of the pickup to be processed, the control means performs the process again without proceeding with the PRD process. The interface control apparatus according to claim 8, wherein the pickup to be performed is switched.
複数のピックアップを有するATAデバイスのインタフェースを制御するインタフェース制御装置のインタフェース制御方法であって、
前記ATAデバイスと、前記ATAデバイスの外部の記憶部との間で行われるデータ転送の関連情報が記述された複数のPRDテーブルのそれぞれに基づいて、各PRDテーブルに対応する前記データ転送に関する処理であるPRD処理を、各PRDテーブルが対応するピックアップ毎に並列分岐させる並列分岐ステップと、
前記並列分岐ステップの処理により並列分岐された各PRD処理の進行を制御する制御ステップと
を含むことを特徴とするインタフェース制御方法。
An interface control method for an interface control device for controlling an interface of an ATA device having a plurality of pickups,
Based on each of a plurality of PRD tables in which information related to data transfer performed between the ATA device and an external storage unit of the ATA device is described, processing related to the data transfer corresponding to each PRD table A parallel branch step for branching a PRD process in parallel for each pickup corresponding to each PRD table;
And a control step for controlling the progress of each PRD process branched in parallel by the process of the parallel branch step.
複数のピックアップを有するATAデバイスのインタフェースを制御するを、コンピュータに行わせるプログラムにおいて、
前記ATAデバイスと、前記ATAデバイスの外部の記憶部との間で行われるデータ転送に関する第1の処理に対して発行された前記第1の処理の強制終了指示に基づいて、前記第1の処理より派生した処理であり、その処理結果を前記第1の処理において利用する、前記データ転送に関する第2の処理が実行中であるか否かを判定する判定ステップと、
前記判定ステップの処理により前記第2の処理が実行中であると判定した場合、前記強制終了指示に基づく終了処理を、前記第2の処理が終了するまで待機させる待機ステップと、
前記判定ステップの処理により前記第2の処理が実行中でないと判定した場合、前記強制終了指示に基づいて前記終了処理を行い前記第1の処理を終了させる終了ステップと
を含むことを特徴とするプログラム。
In a program that causes a computer to control the interface of an ATA device having multiple pickups,
The first process based on a forced termination instruction of the first process issued to a first process related to data transfer performed between the ATA device and a storage unit external to the ATA device. A determination step of determining whether or not the second process relating to the data transfer is being executed, and is a process derived from the process and using the process result in the first process;
When it is determined that the second process is being executed by the process of the determination step, a standby step of waiting for the end process based on the forced end instruction until the second process ends;
And a termination step of terminating the first processing by performing the termination processing based on the forced termination instruction when it is determined by the processing of the determination step that the second processing is not being executed. program.
JP2004047328A 2004-02-24 2004-02-24 Interface control apparatus and method, and program Expired - Fee Related JP4432534B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004047328A JP4432534B2 (en) 2004-02-24 2004-02-24 Interface control apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004047328A JP4432534B2 (en) 2004-02-24 2004-02-24 Interface control apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2005242412A true JP2005242412A (en) 2005-09-08
JP4432534B2 JP4432534B2 (en) 2010-03-17

Family

ID=35024127

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004047328A Expired - Fee Related JP4432534B2 (en) 2004-02-24 2004-02-24 Interface control apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP4432534B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101472320B1 (en) * 2013-05-30 2014-12-12 고려대학교 산학협력단 Method for data security using secret sharing system in cloud environments

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101472320B1 (en) * 2013-05-30 2014-12-12 고려대학교 산학협력단 Method for data security using secret sharing system in cloud environments

Also Published As

Publication number Publication date
JP4432534B2 (en) 2010-03-17

Similar Documents

Publication Publication Date Title
US8762682B1 (en) Data storage apparatus providing host full duplex operations using half duplex storage devices
US8103771B2 (en) Distributing processing apparatus, method, and system
US7546396B2 (en) Interface system
JP2002117002A (en) Common type peripheral architecture
JP2003521778A (en) Virtual ROM for device enumeration
JP2010519606A (en) Computer peripheral device executed as optical storage device and / or removable disk by emulation using software and execution method thereof
US20100180080A1 (en) External storage device having a self-contained security function
JP2007034537A (en) Composite storage device, data writing method, and program
JP4432533B2 (en) Interface control apparatus and method, and program
JPH1097385A (en) Disk recording and reproducing device and interface controller applied to the recording and reproducing device
JP4432534B2 (en) Interface control apparatus and method, and program
US20050251600A1 (en) Multitask data transfer system on ATA bus
JP4432535B2 (en) Interface control apparatus and method, and program
EP1324334A1 (en) Disc drive device and its controller
US6892267B2 (en) Method for message transmission exploiting unused device addresses
JP3450071B2 (en) PC card
JP2000227897A (en) Device and system for dma transfer
JP2006126938A (en) Data transfer system and its data transfer method
KR102280241B1 (en) System for controlling memory-access, apparatus for controlling memory-access and method for controlling memory-access using the same
JP2003256359A (en) Data transfer control apparatus and method therefor
JP2007048073A (en) Internal state setting method for usb storage device, usb storage device and controller therefor
JPH023826A (en) System for controlling loading of micro program
JPH0519181B2 (en)
JP2006227915A (en) Information processor, information search method, program, and storage medium
JP3224068B2 (en) Programmable controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090714

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090904

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: 20091201

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: 20091214

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

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees