JP2009059276A - Data processing apparatus and program - Google Patents

Data processing apparatus and program Download PDF

Info

Publication number
JP2009059276A
JP2009059276A JP2007227678A JP2007227678A JP2009059276A JP 2009059276 A JP2009059276 A JP 2009059276A JP 2007227678 A JP2007227678 A JP 2007227678A JP 2007227678 A JP2007227678 A JP 2007227678A JP 2009059276 A JP2009059276 A JP 2009059276A
Authority
JP
Japan
Prior art keywords
transfer
dma
transfer information
data
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007227678A
Other languages
Japanese (ja)
Inventor
Takumi Kawahara
巧 川原
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2007227678A priority Critical patent/JP2009059276A/en
Publication of JP2009059276A publication Critical patent/JP2009059276A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an information processing apparatus and a program for efficiently performing DMA transfer at higher speed compared with when the amount of transfer information constituting a transfer information group is always fixed when DMA transferring data on the basis of the transfer information group configured by connecting a plurality of transfer information. <P>SOLUTION: An information processing part 13 provided with a DMA controller 42 for DMA transferring data of each unit transfer amount on the basis of a transfer information group configured by connecting a plurality of transfer information of unit transfer amount including information necessary for direct memory access (DMA) transfer without interposing a CPU 24, determines the amount of transfer information constituting a transfer information group on the basis of a transfer speed when the DMA controller 42 transfers reference data with a predetermined data amount while changing the amount of transfer information constituting the transfer information group, and creates a transfer information group configured by connecting the determined amount of transfer information when DMA transferring the data. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、情報処理装置およびプログラムに関する。   The present invention relates to an information processing apparatus and a program.

近年、データの転送を高速に行なうため、中央演算処理装置(CPU)を介さずにデータの転送を行なうダイレクトメモリアクセス(DMA)転送の技術が様々な情報処理装置に広く採用されている。   In recent years, in order to transfer data at high speed, a direct memory access (DMA) transfer technique for transferring data without using a central processing unit (CPU) has been widely adopted in various information processing apparatuses.

DMA転送を効率的に行なうために、画像形成装置において、メモリ上のイメージデータをDMAにより高速に印刷エンジンに転送するために、各ページのイメージデータを複数バンドに分割し、各バンドデータを1回のDMAで転送すると共に、CPUがDMA転送毎に連続DMA転送を行なうか否かを示す転送フラグを設定して連続転送を制御し、連続転送する場合には、DMA動作中に次のバンドのDMAパラメータ(アドレス、サイズ等)を設定することで、複数バンドのDMAがインターバルなく連続的に実行されるような技術が提案されている(例えば、特許文献1参照)。   In order to efficiently perform the DMA transfer, in the image forming apparatus, in order to transfer the image data on the memory to the print engine at a high speed by DMA, the image data of each page is divided into a plurality of bands, and each band data is 1 In addition to transferring data at the same time, the CPU sets a transfer flag indicating whether or not to perform continuous DMA transfer for each DMA transfer and controls continuous transfer. By setting the DMA parameters (address, size, etc.), a technique has been proposed in which DMAs of a plurality of bands are continuously executed without intervals (see, for example, Patent Document 1).

また、画像データを複数に分割し、それぞれの分割部分ごとのディスクリプタを作成し、そのディスクリプタにDMAコントローラの行う動作を指示する指示ビットを含めることで、CPUの介在なしで、分割DMA転送を連続的に行なうことができる装置も提案されている(例えば、特許文献2参照)。
特開2000−148663公報 特開2002−140286公報
In addition, by dividing the image data into a plurality of pieces, creating a descriptor for each divided portion, and including an instruction bit for instructing the operation performed by the DMA controller in the descriptor, continuous divided DMA transfer can be performed without CPU intervention. An apparatus that can be used automatically has also been proposed (see, for example, Patent Document 2).
JP 2000-148663 A JP 2002-140286 A

本発明は、転送情報を複数連ねて構成された転送情報群に基づいて転送対象のデータのDMA転送を行なうための情報処理装置およびプログラムであって、転送情報群を構成する転送情報の数を常に一定とする場合に比べて、DMA転送を高速且つ効率よく行なうことができる情報処理装置およびプログラムを提供することを目的とする。   The present invention relates to an information processing apparatus and program for performing DMA transfer of data to be transferred based on a transfer information group configured by connecting a plurality of transfer information, wherein the number of transfer information constituting the transfer information group is determined. It is an object of the present invention to provide an information processing apparatus and program capable of performing DMA transfer at high speed and efficiency as compared with the case where the constant is always maintained.

請求項1の発明の情報処理装置は、中央演算処理装置(CPU)を介在させないダイレクトメモリアクセス(DMA)転送に必要な情報を含む単位転送量毎の転送情報を複数連ねて構成した転送情報群に基づいて転送対象のデータを前記単位転送量毎にDMA転送する転送手段と、データ量が予め定められた基準データを前記転送情報群を構成する転送情報の個数を変化させながら前記転送手段によってDMA転送したときの転送速度に基づいて前記転送情報群を構成する転送情報の数を決定する決定手段と、転送対象のデータをDMA転送するときに、前記決定手段で決定された数の転送情報を連ねて構成した転送情報群を作成する作成手段と、を含んで構成されている。   The information processing apparatus according to claim 1 is a transfer information group comprising a plurality of pieces of transfer information for each unit transfer amount including information necessary for direct memory access (DMA) transfer without interposing a central processing unit (CPU). Transfer means for transferring the data to be transferred for each unit transfer amount based on the above, and reference data having a predetermined data amount by the transfer means while changing the number of transfer information constituting the transfer information group. Determining means for determining the number of transfer information constituting the transfer information group based on a transfer rate when DMA transfer is performed, and the number of transfer information determined by the determining means when transferring the data to be transferred; And creating means for creating a transfer information group composed of the above.

請求項2の発明は、請求項1に記載の情報処理装置において、前記決定手段で決定された転送情報の数を基準データのデータ量に対応付けて記憶した記憶手段を更に備え、前記作成手段は、転送対象のデータをDMA転送するときに、該転送対象のデータ量に応じて前記記憶手段に記憶された数を読み出し、該読み出した数の転送情報を連ねて構成した転送情報群を作成する。   The invention according to claim 2 is the information processing apparatus according to claim 1, further comprising storage means for storing the number of pieces of transfer information determined by the determination means in association with the data amount of reference data, Reads the number stored in the storage unit according to the amount of data to be transferred when DMA transfer of the data to be transferred, and creates a transfer information group configured by linking the read number of transfer information To do.

請求項3の発明は、請求項1または2に記載の情報処理装置において、前記作成手段は、前記転送対象のデータをDMA転送するために複数の転送情報群を作成する場合に、先頭の転送情報群または先頭から所定数までの転送情報群については、前記決定手段で決定された数よりも少ない数の転送情報で構成された転送情報群を作成し、それ以降の転送情報群については、前記決定手段で決定された数の転送情報を構成した転送情報群を作成する。   According to a third aspect of the present invention, in the information processing apparatus according to the first or second aspect, when the creation unit creates a plurality of transfer information groups for DMA transfer of the transfer target data, For the information group or the transfer information group from the beginning to a predetermined number, create a transfer information group composed of a smaller number of transfer information than the number determined by the determining means, and for subsequent transfer information groups, A transfer information group comprising the number of transfer information determined by the determining means is created.

請求項4の発明は、請求項1〜3の何れか1項に記載の情報処理装置において、前記作成手段は、前記転送対象のデータをDMA転送するために複数の転送情報群を作成する場合に、前記転送手段で実行中のDMA転送が終了するまでに該実行中のDMA転送以降に行なわれるDMA転送のための転送情報群を作成して作成順に転送情報用記憶手段に記憶し、前記転送手段は、前記転送情報用記憶手段から前記作成順に転送情報群を読み出してDMA転送を行なう。   According to a fourth aspect of the present invention, in the information processing apparatus according to any one of the first to third aspects, the creation unit creates a plurality of transfer information groups in order to DMA transfer the data to be transferred. In addition, a transfer information group for DMA transfer performed after the DMA transfer being executed is completed before the DMA transfer being executed by the transfer means is completed, and stored in the transfer information storage means in the order of creation, The transfer means reads the transfer information group from the transfer information storage means in the order of creation and performs DMA transfer.

請求項5の発明は、請求項4に記載の情報処理装置において、前記作成手段は、前記転送情報群の作成をCPU使用率またはCPU占有時間が所定値を超えていない場合に行なう。   According to a fifth aspect of the present invention, in the information processing apparatus according to the fourth aspect, the creation unit creates the transfer information group when the CPU usage rate or the CPU occupation time does not exceed a predetermined value.

請求項6の発明は、請求項5に記載の情報処理装置において、前記作成手段は、前記転送情報用記憶手段に未読の転送情報群が1つも記憶されていない場合には、前記CPU使用率またはCPU占有時間が所定値を超えている場合であっても実行中のDMA転送以降に行なわれるDMA転送のための転送情報群を作成する。   According to a sixth aspect of the present invention, in the information processing apparatus according to the fifth aspect, when the creation means stores no unread transfer information group in the transfer information storage means, the CPU usage rate Alternatively, even if the CPU occupation time exceeds a predetermined value, a transfer information group for DMA transfer performed after the DMA transfer being executed is created.

請求項7の発明のプログラムは、中央演算処理装置(CPU)を介在させないダイレクトメモリアクセス(DMA)転送に必要な情報を含む単位転送量毎の転送情報を複数連ねて構成した転送情報群に基づいて転送対象のデータを前記単位転送量毎にDMA転送する転送手段が設けられたコンピュータを、データ量が予め定められた基準データを前記転送情報群を構成する転送情報の個数を変化させながら前記転送手段によってDMA転送したときの転送速度に基づいて前記転送情報群を構成する転送情報の数を決定する決定手段、および転送対象のデータをDMA転送するときに、前記決定手段で決定された数の転送情報を連ねて構成した転送情報群を作成する作成手段、として機能させるためのプログラムである。   A program according to a seventh aspect of the invention is based on a transfer information group configured by connecting a plurality of pieces of transfer information for each unit transfer amount including information necessary for direct memory access (DMA) transfer without interposing a central processing unit (CPU). A computer provided with transfer means for DMA-transferring the data to be transferred for each unit transfer amount, while changing the number of transfer information constituting the transfer information group from reference data having a predetermined data amount. A determining unit that determines the number of transfer information constituting the transfer information group based on a transfer rate when the DMA transfer is performed by the transfer unit; and a number determined by the determining unit when the data to be transferred is DMA transferred. It is a program for functioning as a creation means for creating a transfer information group configured by linking the transfer information.

請求項1記載の発明によれば、転送情報群を構成する転送情報の数を常に一定とする場合に比べて、DMA転送を高速且つ効率よく行なうことができる、という効果が得られる。   According to the first aspect of the present invention, it is possible to obtain an effect that the DMA transfer can be performed at high speed and efficiently compared with the case where the number of transfer information constituting the transfer information group is always constant.

請求項2記載の発明によれば、迅速に転送情報群を作成することができる、という効果が得られる。   According to the second aspect of the present invention, there is an effect that a transfer information group can be created quickly.

請求項3記載の発明によれば、転送手段のDMA転送開始を早めることができる、という効果が得られる。   According to the third aspect of the invention, the effect that the DMA transfer start of the transfer means can be accelerated can be obtained.

請求項4記載の発明によれば、DMAの転送開始前に全ての転送情報群を作成する場合に比べてDMA転送にかかる時間を短縮することができる、という効果が得られる。   According to the fourth aspect of the invention, it is possible to reduce the time required for DMA transfer compared to the case where all transfer information groups are created before the start of DMA transfer.

請求項5記載の発明によれば、CPUの負荷がシステム全体でみた場合に集中しないよう効率よくCPUを使用することができ、これにより他のモジュールの性能低下を招くことなくDMA転送できる、という効果が得られる。   According to the fifth aspect of the present invention, the CPU can be used efficiently so that the CPU load is not concentrated when the entire system is viewed, thereby enabling the DMA transfer without causing the performance degradation of other modules. An effect is obtained.

請求項6記載の発明によれば、DMA転送が途切れることを防止することができる、という効果が得られる。   According to the sixth aspect of the invention, it is possible to prevent the DMA transfer from being interrupted.

請求項7記載の発明によれば、転送情報群を構成する転送情報の数を常に一定とする場合に比べて、DMA転送を高速且つ効率よく行なうことができる、という効果が得られる。   According to the seventh aspect of the present invention, it is possible to obtain an effect that the DMA transfer can be performed at high speed and efficiently as compared with the case where the number of transfer information constituting the transfer information group is always constant.

以下、図面を参照して本発明の実施の形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の情報処理装置に係る実施の形態としての情報処理部を含む画像処理システム10の構成例を示す図である。   FIG. 1 is a diagram showing a configuration example of an image processing system 10 including an information processing unit as an embodiment according to the information processing apparatus of the present invention.

画像処理システム10は、マザーボード12及びコントローラボード14を備えた情報処理部13、画像入力部16、画像出力部18、コントローラ20、及びLCD(液晶ディスプレイ)22を備えている。   The image processing system 10 includes an information processing unit 13 including a motherboard 12 and a controller board 14, an image input unit 16, an image output unit 18, a controller 20, and an LCD (liquid crystal display) 22.

マザーボード12は、CPU(中央演算処理装置)24および主記憶としてのメモリ28を備えている。CPU24及びメモリ28はハブ26を介して専用のバスにより接続されている。このメモリ28には、画像出力部18で出力(印刷)する画像データや画像入力部16で読み取った画像データを格納するための領域があり、該画像データは後述するコントローラボード14に設けられたメモリ44との間でCPU24の介在無しにDMA(ダイレクトメモリアクセス)転送される。   The motherboard 12 includes a CPU (Central Processing Unit) 24 and a memory 28 as a main memory. The CPU 24 and the memory 28 are connected by a dedicated bus via the hub 26. The memory 28 has an area for storing image data output (printed) by the image output unit 18 and image data read by the image input unit 16, and the image data is provided on a controller board 14 to be described later. DMA (direct memory access) is transferred to and from the memory 44 without the intervention of the CPU 24.

また、ハブ26には、マザーボード12の外部に設けられたLCD22が接続されている。LCD22は、表示面にタッチパネルを有する液晶表示装置であり、ユーザインタフェースとして機能する。   The hub 26 is connected to an LCD 22 provided outside the mother board 12. The LCD 22 is a liquid crystal display device having a touch panel on the display surface, and functions as a user interface.

また、専用のバスを接続するためのハブ26は、汎用バスを接続するためのハブ30と接続されている。ハブ30にはHDD(ハードディスク装置)32とI/Oポート34とが汎用バスを介して接続されている。HDD32には、CPU24が実行するプログラムや各種データが記憶されている。I/Oポート34は、入出力インタフェースとして機能し、画像処理システム10の周辺機器などが接続される。   A hub 26 for connecting a dedicated bus is connected to a hub 30 for connecting a general-purpose bus. An HDD (hard disk device) 32 and an I / O port 34 are connected to the hub 30 via a general-purpose bus. The HDD 32 stores programs executed by the CPU 24 and various data. The I / O port 34 functions as an input / output interface and is connected to peripheral devices of the image processing system 10.

なお、CPU24が実行するプログラムや各種データを記録する記録媒体は、HDDに限定されず、不図示のCD−ROMやDVDディスク、光磁気ディスクやICカード、あるいはROM等であってもよいし、電気通信回線上の搬送波のような伝送媒体であってもよく、特に限定されない。   The recording medium for recording the program executed by the CPU 24 and various data is not limited to the HDD, and may be a CD-ROM, DVD disk, magneto-optical disk, IC card, ROM, or the like (not shown). It may be a transmission medium such as a carrier wave on a telecommunication line, and is not particularly limited.

マザーボード12には汎用バスのインタフェース36が設けられ、同じくコントローラボード14に設けられた汎用バスのインタフェース38と接続されている。   The motherboard 12 is provided with a general-purpose bus interface 36, which is also connected to a general-purpose bus interface 38 provided on the controller board 14.

コントローラボード14は、バスブリッジ40、メモリ44、論理回路46、CPU48、及び画像処理回路50を備えている。バスブリッジ40、メモリ44、CPU48、及び画像処理回路50は、論理回路46に接続され、論理回路46を介して互いにデータのやりとりを行なう。論理回路46は、データ転送回路としてプログラムされた回路であるが、単にデータを受け渡すのみでありデータ転送の制御を行なうわけではない。画像処理回路50は、入力された画像データに所定の画像処理を施す回路である。   The controller board 14 includes a bus bridge 40, a memory 44, a logic circuit 46, a CPU 48, and an image processing circuit 50. The bus bridge 40, the memory 44, the CPU 48, and the image processing circuit 50 are connected to the logic circuit 46 and exchange data with each other via the logic circuit 46. The logic circuit 46 is a circuit programmed as a data transfer circuit, but only transfers data and does not control data transfer. The image processing circuit 50 is a circuit that performs predetermined image processing on input image data.

バスブリッジ40は、汎用バスを介してインタフェース38に接続されると共に、論理回路46に接続されている。バスブリッジ40は、汎用バス同士のブリッジ機能やバスマスタ機能を備えている。このバスマスタ機能は、コントローラボード14上のCPU48を介さずにメモリ44と画像処理回路50との間でデータのやりとりを行なうための機能である。具体的には、コントローラボード14では、画像出力部18による画像出力時には、画像データがメモリ44から論理回路46を介して画像処理回路50へDMA転送され、画像入力部16によって画像が読み込まれた場合には、該読み込まれて得られた画像データが画像処理回路50から論理回路46を介してメモリ44へDMA転送される。   The bus bridge 40 is connected to the interface 38 via a general-purpose bus and to the logic circuit 46. The bus bridge 40 has a bridge function between general-purpose buses and a bus master function. The bus master function is a function for exchanging data between the memory 44 and the image processing circuit 50 without using the CPU 48 on the controller board 14. Specifically, in the controller board 14, when the image output unit 18 outputs an image, the image data is DMA-transferred from the memory 44 to the image processing circuit 50 via the logic circuit 46, and the image is read by the image input unit 16. In this case, the image data obtained by reading is DMA-transferred from the image processing circuit 50 to the memory 44 via the logic circuit 46.

一方、マザーボード12上のCPU24を介さずに、マザーボード12上のメモリ28とコントローラボード14上のメモリ44との間でデータの転送を行なうDMA機能は、上記バスブリッジ40のバスマスタ機能とは別に、バスブリッジ40に設けられたDMAC(DMAコントローラ)42により実現される。DMAC42は、飛び飛びのアドレスに対して、連続してデータを転送できるスキャッタギャザー機能が搭載された回路である。DMAC42の詳細な動作については後述する。   On the other hand, the DMA function for transferring data between the memory 28 on the motherboard 12 and the memory 44 on the controller board 14 without using the CPU 24 on the motherboard 12 is separate from the bus master function of the bus bridge 40. This is realized by a DMAC (DMA controller) 42 provided in the bus bridge 40. The DMAC 42 is a circuit equipped with a scatter gather function capable of transferring data continuously to jumping addresses. The detailed operation of the DMAC 42 will be described later.

コントローラボード14に設けられているコネクタ52は、画像入力部16及び画像出力部18を制御する制御機構を備えたコントローラ20に設けられているコネクタ56に接続されている。また、コントローラボード14のコネクタ52は、前述の画像処理回路50に接続されている。画像処理回路50で画像処理が施される画像データは、コネクタ52及びコネクタ56を介して送受信される。   The connector 52 provided on the controller board 14 is connected to a connector 56 provided on the controller 20 having a control mechanism for controlling the image input unit 16 and the image output unit 18. Further, the connector 52 of the controller board 14 is connected to the image processing circuit 50 described above. Image data subjected to image processing by the image processing circuit 50 is transmitted and received through the connector 52 and the connector 56.

また、コントローラボード14にはコネクタ52とは別のコネクタ54が設けられている。このコネクタ54は、論理回路46に直接接続されると共に、コントローラ20に設けられているコネクタ58と接続されている。コントローラ20とコントローラボード14との間で制御データやメッセージの送受信は、これらコネクタ54、コネクタ58を介して行なわれる。   The controller board 14 is provided with a connector 54 different from the connector 52. The connector 54 is directly connected to the logic circuit 46 and is also connected to a connector 58 provided in the controller 20. Control data and messages are transmitted and received between the controller 20 and the controller board 14 via these connectors 54 and 58.

ここで、DMAC42の機能について説明する。画像処理システム10では、データ量の多い画像データを取り扱う。従って、システム内で画像データを転送する場合には、CPU24を介在させないDMA転送が用いられる。DMAC42は、CPU24により作成されたディスクリプタに基づいてDMA転送を行なう。   Here, the function of the DMAC 42 will be described. The image processing system 10 handles image data with a large amount of data. Therefore, when image data is transferred in the system, DMA transfer without using the CPU 24 is used. The DMAC 42 performs DMA transfer based on the descriptor created by the CPU 24.

なお、ディスクリプタとは、DMA転送のために必要な情報を含む転送情報をいう。CPU24は、ディスクリプタを予め定められた単位転送量毎に作成し、該作成したディスクリプタを複数連ねてディスクリプタリストを作成する。本実施の形態では、ディスクリプタリストはメモリ28に設けられたディスクリプタ格納領域に格納されると共にその格納アドレスはFIFO方式のディスクリプタリスト管理キューに登録される。なお、ディスクリプタリストの格納領域は、メモリ28に限定されず、コントローラボード14のメモリ44であってもよいし特に限定されない。   A descriptor refers to transfer information including information necessary for DMA transfer. The CPU 24 creates descriptors for each predetermined unit transfer amount, and creates a descriptor list by connecting a plurality of the created descriptors. In this embodiment, the descriptor list is stored in a descriptor storage area provided in the memory 28, and its storage address is registered in a FIFO descriptor list management queue. Note that the descriptor list storage area is not limited to the memory 28, but may be the memory 44 of the controller board 14, and is not particularly limited.

CPU24は、ディスクリプタリスト管理キューに登録されたアドレスをDMAC42にセットしDMAC42を起動する、これによりDMAC42は、該セットされたアドレスに格納されているディスクリプタリストから1つ1つ順次ディスクリプタを読み込み、読み込んだディスクリプタに従って連続的にDMA転送を実行する。   The CPU 24 sets the addresses registered in the descriptor list management queue in the DMAC 42 and activates the DMAC 42. Thus, the DMAC 42 sequentially reads and reads the descriptors one by one from the descriptor list stored in the set address. The DMA transfer is continuously executed according to the descriptor.

1つのディスクリプタリストに連ねられたディスクリプタの全てについてDMA転送が完了すると、CPU24の割り込みが発生する。このとき、CPU24はディスクリプタリスト管理キューから次のディスクリプタリストのアドレスを読み出してDMAC42にセットする。そして、該セットされたアドレスのディスクリプタリストに連ねられたディスクリプタが順次読み込まれて連続的にDMA転送が行なわれる。この繰り返しにより、最終的に転送対象の画像データの全てがDMA転送される。   When the DMA transfer is completed for all the descriptors linked to one descriptor list, an interrupt of the CPU 24 is generated. At this time, the CPU 24 reads the address of the next descriptor list from the descriptor list management queue and sets it in the DMAC 42. Then, descriptors linked to the descriptor list of the set address are sequentially read and DMA transfer is continuously performed. By repeating this, all the image data to be transferred is finally DMA transferred.

図2は、仮想記憶方式を採用したシステムにおいてDMAC42により読み込まれるディスクリプタリストの一例を示す図である。   FIG. 2 is a diagram showing an example of a descriptor list read by the DMAC 42 in a system adopting the virtual storage system.

マザーボード12のメモリ28は仮想記憶方式によりメモリ管理されている。図2(A)に示すように、物理的には不連続な物理アドレス領域が、連続する仮想アドレス領域にマッピングされて管理される。実際に記憶されているデータにアクセスする場合には、仮想アドレス領域の連続したアドレス範囲が、アドレス変換テーブル等に従って対応する物理アドレス範囲に変換されてアクセスされる。仮想アドレスにマッピングできる物理メモリの最小単位をページというが、CPU24は、このページ単位で物理的に分散しているデータのアドレスを調べ、各々についてディスクリプタを作成する。   The memory 28 of the motherboard 12 is managed by a virtual storage method. As shown in FIG. 2A, physically discontinuous physical address areas are mapped and managed in continuous virtual address areas. When accessing the actually stored data, the continuous address range of the virtual address area is converted into the corresponding physical address range according to the address conversion table or the like and accessed. Although the minimum unit of physical memory that can be mapped to a virtual address is called a page, the CPU 24 checks the address of data physically distributed in units of page, and creates a descriptor for each.

図2(B)に示すように、本実施の形態のディスクリプタは、次ディスクリプタアドレス、転送データ量、転送元アドレス、及び転送先アドレスの情報を含んで構成されている。   As shown in FIG. 2B, the descriptor according to the present embodiment includes information on the next descriptor address, transfer data amount, transfer source address, and transfer destination address.

「次ディスクリプタアドレス」は、ディスクリプタリストに連ねられた複数のディスクリプタの中で、そのディスクリプタの次にDMAC42により読み込まれるべきディスクリプタのアドレスを示すデータである。なお、そのディスクリプタがディスクリプタリストの一番最後に読み込まれるディスクリプタである場合には、次ディスクリプタアドレスの領域には、ディスクリプタリストの最後のディスクリプタであることを示すデータが格納される。この次ディスクリプタアドレスにより、物理的に不連続な領域に格納されたディスクリプタが連続的に読み出されてDMA転送される。   “Next descriptor address” is data indicating an address of a descriptor to be read by the DMAC 42 next to the descriptor among the plurality of descriptors linked to the descriptor list. If the descriptor is the descriptor read at the end of the descriptor list, data indicating the last descriptor in the descriptor list is stored in the area of the next descriptor address. With this next descriptor address, descriptors stored in physically discontinuous areas are continuously read out and DMA-transferred.

また、「転送データ量」は、そのディスクリプタによってDMA転送するデータのサイズを示すデータである。「転送元アドレス」は、転送対象のデータが格納されているメモリのアドレスを示すデータである。「転送先アドレス」は、転送元アドレスから転送データ量だけ読み出したデータを書き込むアドレスを示すデータである。   The “transfer data amount” is data indicating the size of data to be DMA transferred by the descriptor. The “transfer source address” is data indicating an address of a memory in which data to be transferred is stored. The “transfer destination address” is data indicating an address at which data read from the transfer source address by the transfer data amount is written.

なお、本実施の形態において、個々のディスクリプタで転送可能なデータ量は、ページサイズを最大とし、各ディスクリプタの「転送データ量」はページサイズ以下の固定値(単位転送量)とする。これにより、ディスクリプタリストを構成するディスクリプタの数と転送時間とが比例関係になる。以下、各ディスクリプタリストを構成するディスクリプタの数を「ブロック数」と呼称する。   In the present embodiment, the data amount that can be transferred by each descriptor has a maximum page size, and the “transfer data amount” of each descriptor is a fixed value (unit transfer amount) equal to or smaller than the page size. As a result, the number of descriptors constituting the descriptor list and the transfer time are in a proportional relationship. Hereinafter, the number of descriptors constituting each descriptor list is referred to as “number of blocks”.

図3は、ディスクリプタリストを管理するディスクリプタリスト管理キューの構造を説明する説明図である。ディスクリプタリスト管理キューは、ディスクリプタリストが格納されたアドレス(より詳述すると、ディスクリプタリストを構成する複数のディスクリプタのうち先頭のディスクリプタが格納されたアドレス。)を示すディスクリプタリストポインタをリスト構造にして連ねて構成したバッファである。また、CPU24の所定のレジスタ(あるいはメモリの所定領域等)には、ディスクリプタリスト管理キューにおける先頭のディスクリプタリストポインタを指すディスクリプタリスト管理キューポインタが格納される。ディスクリプタリスト管理キューはFIFO方式であるため、CPU24が先頭のディスクリプタリストポインタを読み出したときには、ディスクリプタリスト管理キューポインタが次のディスクリプタリストポインタを指すように書き変えられる。   FIG. 3 is an explanatory diagram for explaining the structure of the descriptor list management queue for managing the descriptor list. In the descriptor list management queue, descriptor list pointers indicating addresses where descriptor lists are stored (more specifically, addresses where the first descriptor among the plurality of descriptors constituting the descriptor list are stored) are linked in a list structure. This is a buffer configured. Further, a predetermined register (or a predetermined area of the memory) of the CPU 24 stores a descriptor list management queue pointer that indicates the first descriptor list pointer in the descriptor list management queue. Since the descriptor list management queue uses the FIFO method, when the CPU 24 reads the first descriptor list pointer, the descriptor list management queue pointer is rewritten so that it points to the next descriptor list pointer.

また、CPU24は、新たにディスクリプタリストを作成して所定の格納領域に格納すると、ディスクリプタリスト管理キューの最後尾に該作成したディスクリプタリストのアドレスを示すディスクリプタリストポインタを追加する。これにより、各ディスクリプタリストのアドレスが作成順に登録される。   In addition, when a new descriptor list is created and stored in a predetermined storage area, the CPU 24 adds a descriptor list pointer indicating the address of the created descriptor list to the end of the descriptor list management queue. As a result, the addresses of the descriptor lists are registered in the order of creation.

なお、ディスクリプタリスト管理キューにディスクリプタリストが1つも登録されていない場合には、ディスクリプタリスト管理キューポインタはNULLとなる。   When no descriptor list is registered in the descriptor list management queue, the descriptor list management queue pointer is NULL.

DMA転送を実行する場合には、CPU24は、ディスクリプタリスト管理キューポインタが指す先頭のディスクリプタリストポインタをDMAC42にセットしてDMAC42にDMA転送を開始させ、該ディスクリプタリストポインタが示すディスクリプタリストに基づいてDMA転送を行なわせる。DMA転送は、1つのディスクリプタリストのDMA転送が終了するまでCPU24の割り込み無しで連続的に行なわれる。一方、CPU24は、DMAC42によるDMA転送中、所定の作成条件を満たす範囲内で、次のディスクリプタリストやそれ以降のディスクリプタリストを先行して作成してディスクリプタリスト管理キューに登録する。   When executing the DMA transfer, the CPU 24 sets the first descriptor list pointer pointed to by the descriptor list management queue pointer in the DMAC 42 to cause the DMAC 42 to start the DMA transfer, and performs DMA transfer based on the descriptor list indicated by the descriptor list pointer. Let the transfer occur. The DMA transfer is continuously performed without interruption of the CPU 24 until the DMA transfer of one descriptor list is completed. On the other hand, during the DMA transfer by the DMAC 42, the CPU 24 creates the next descriptor list and subsequent descriptor lists within a range satisfying a predetermined creation condition and registers them in the descriptor list management queue.

1つのディスクリプタリストによるDMA転送が終了すると、その時点でCPU24の割り込みが発生する。CPU24は、ディスクリプタリスト管理キューポインタが指す次のディスクリプタリストポインタをDMAC42にセットしてDMA転送させる。これにより、ディスクリプタリスト管理キューに登録された順にディスクリプタリストが読み出されてDMA転送が行なわれる。   When DMA transfer by one descriptor list is completed, an interrupt of the CPU 24 is generated at that time. The CPU 24 sets the next descriptor list pointer pointed to by the descriptor list management queue pointer in the DMAC 42 and performs DMA transfer. As a result, the descriptor list is read out in the order registered in the descriptor list management queue, and DMA transfer is performed.

本実施の形態では、データ量が予め定められたテスト用の基準データをDMA転送してDMA転送レートを測定し、該測定結果からディスクリプタリストの最適なブロック数を決定する。   In this embodiment, test reference data having a predetermined amount of data is DMA transferred, the DMA transfer rate is measured, and the optimum number of blocks in the descriptor list is determined from the measurement result.

図4は、ブロック数を決定するためのプログラムのフローを示すフローチャートである。このプログラムは、CPU24により所定のタイミングで実行される。   FIG. 4 is a flowchart showing the flow of a program for determining the number of blocks. This program is executed by the CPU 24 at a predetermined timing.

ステップ100では、j及びkに0をセットする。ここで、jは、基本データのデータ量を複数種類定義する配列size_tableの添字を示す。すなわち、配列size_tableの各要素には、異なるデータ量を示すデータが格納されている。また、kは、ブロック数を複数種類定義する配列block_tableの添字を示す。すなわち、配列block_tableの各要素には、異なるブロック数を示すデータが格納されている。   In step 100, 0 is set to j and k. Here, j indicates a subscript of an array size_table that defines a plurality of types of data amounts of basic data. That is, data indicating different data amounts is stored in each element of the array size_table. K indicates a subscript of the array block_table that defines a plurality of types of blocks. That is, data indicating different numbers of blocks is stored in each element of the array block_table.

ステップ102では、配列size_tableの添字jをカウントアップし、該カウントアップした添字の要素に格納されている基準データのデータ量を変数data_sizeにセットする。   In step 102, the subscript j of the array size_table is counted up, and the data amount of the reference data stored in the counted up subscript element is set in the variable data_size.

ステップ104では、配列block_tableの添字kをカウントアップし、該カウントアップした添字の要素に格納されているブロック数を変数block_countにセットする。なお、本実施の形態では、添字kが大きくなるほど配列block_tableに格納されているブロック数も大きくなる。   In step 104, the subscript k of the array block_table is counted up, and the number of blocks stored in the counted subscript element is set in the variable block_count. In the present embodiment, the number of blocks stored in the array block_table increases as the subscript k increases.

ステップ106では、変数block_countの値が各ディスクリプタリストのブロック数となるように設定する。   In step 106, the value of variable block_count is set to be the number of blocks in each descriptor list.

ステップ108では、DMA転送レートの測定を開始する。   In step 108, measurement of the DMA transfer rate is started.

ステップ110では、CPU24が変数block_countの数だけディスクリプタが連ねられたディスクリプタリストを作成し、DMAC42に変数data_sizeが示すデータ量の基準データをDMA転送させ、DMA転送レートの測定処理を行う。ここでは、DMA Write(書き込み)及びDMA read(読み出し)のいずれか一方を行なうようにしてもよいし、双方を行なうようにしてもよい。   In step 110, the CPU 24 creates a descriptor list in which descriptors are linked by the number of variables block_count, causes the DMAC 42 to perform DMA transfer of reference data having a data amount indicated by the variable data_size, and performs a DMA transfer rate measurement process. Here, either one of DMA Write (write) or DMA read (read) may be performed, or both may be performed.

ステップ112では、測定終了後に、DMA転送にかかった時間と変数data_sizeが示すデータ量とに基づいてDMA転送レートを求め、該求めたDMA転送レートを変数block_countの値(ブロック数)及び変数data_sizeの値(データ量)を対応付けて測定データとして保存する。   In step 112, after the measurement is completed, a DMA transfer rate is obtained based on the time taken for the DMA transfer and the data amount indicated by the variable data_size, and the obtained DMA transfer rate is calculated using the value of the variable block_count (number of blocks) and the variable data_size A value (data amount) is associated and stored as measurement data.

ステップ114では、所定ブロック数全ての測定を終了したか、すなわち、設定可能なブロック数は変数data_sizeに応じて当然上限があるため、変数data_sizeに応じて設定可能なブロック数の全てについて測定を終了したかを判定する。ここで、否定判定された場合には、ステップ104に戻ってkをカウントアップし、配列block_tableの次の要素に格納されているブロック数を変数block_countにセットして、上記と同様に再度測定を行なう。   In step 114, the measurement for all the predetermined number of blocks has been completed, that is, the number of blocks that can be set has an upper limit naturally according to the variable data_size, so the measurement for all the number of blocks that can be set according to the variable data_size Determine if you did. Here, if a negative determination is made, the process returns to step 104, counts up k, sets the number of blocks stored in the next element of the array block_table to the variable block_count, and measures again in the same manner as described above. Do.

一方、ステップ114で肯定判定された場合には、ステップ116に移行し、測定結果より、データ量が変数data_sizeの場合の最適なブロック数を決定し、変数data_sizeに対応付けて所定のテーブルに登録する。ここで、ブロック数の決定方法の具体例を説明する。   On the other hand, if an affirmative determination is made in step 114, the process proceeds to step 116, where the optimum number of blocks when the data amount is the variable data_size is determined from the measurement result, and is registered in a predetermined table in association with the variable data_size. To do. Here, a specific example of a method for determining the number of blocks will be described.

図5は、4Mバイトの基準データをDMA転送した場合のDMA転送レートの測定結果を示すグラフの一例であり、図6は、32Mバイトの基準データをDMA転送した場合のDMA転送レートの測定結果を示すグラフの一例であり、図7は、63Mバイトの基準データをDMA転送した場合のDMA転送レートの測定結果を示すグラフの一例である。   FIG. 5 is an example of a graph showing the measurement result of the DMA transfer rate when the 4 Mbyte reference data is DMA-transferred, and FIG. 6 is the DMA transfer rate measurement result when the 32 Mbyte reference data is DMA-transferred. FIG. 7 is an example of a graph showing a measurement result of the DMA transfer rate when 63 Mbytes of reference data is DMA-transferred.

ここで、グラフ中のダブルディスクリプタ方式とは、CPUの割り込み時とDMA転送中の双方でディスクリプタリストを作成する方式であり、シングルディスクリプタ方式とは、CPUの割り込み時のみでディスクリプタリストを作成する方式をいう。また、グラフ中、「目安」として示しているのは、通常、ページ単位でディスクリプタが作成されDMA転送されるが、データの先頭部分や最後尾の部分がメモリ28上、物理的にページ単位の境界に無い場合には、CPU24の割り込み回数や1回のDMA転送サイズに若干の変動が生じる場合がある。従って、ここでは目安と記載している。しかしながら、この変動は大きなものではなく、無視できる程度であるため、ここでは測定結果をそのまま用いて最適なブロック数を決定する。   Here, the double descriptor method in the graph is a method for creating a descriptor list both at the time of CPU interrupt and during DMA transfer, and the single descriptor method is a method for creating a descriptor list only at the time of CPU interrupt. Say. In the graph, “guideline” generally indicates that a descriptor is created and DMA-transferred in units of pages, but the beginning and end of data are physically stored in units of pages on the memory 28. If it is not at the boundary, there may be some fluctuations in the number of interrupts of the CPU 24 and the size of one DMA transfer. Therefore, it is described as a guide here. However, since this variation is not large and can be ignored, the optimum number of blocks is determined using the measurement result as it is.

各グラフから明らかなように、どの方式の場合でもブロック数が少なすぎると転送レートが低く、ブロック数を多くするにつれて転送レートがだんだんと上がっていくが、ある程度転送レートが上がるとそこで安定し、ブロック数をいくら多くしてもあまり転送レートが上がらなくなる。従って、ステップ116では、CPU24は、転送レートが安定したときのブロック数を、そのデータ量における最適なブロック数として決定する。なお、安定したときのブロック数を、例えば、ブロック数の変化に対する転送レートの変化率が所定範囲内に収まったときのブロック数としてもよい。図5〜図7に示す例では、○で囲ったブロック数を最適なブロック数として決定している。   As is clear from each graph, the transfer rate is low if the number of blocks is too small in any method, and the transfer rate gradually increases as the number of blocks increases, but if the transfer rate increases to some extent, it stabilizes there. Even if the number of blocks is increased, the transfer rate does not increase much. Therefore, in step 116, the CPU 24 determines the number of blocks when the transfer rate is stable as the optimum number of blocks in the data amount. Note that the number of blocks when stabilized may be, for example, the number of blocks when the rate of change in the transfer rate with respect to the change in the number of blocks falls within a predetermined range. In the example shown in FIGS. 5 to 7, the number of blocks surrounded by ○ is determined as the optimum number of blocks.

ところで、各グラフから明らかなように、転送レートが高いブロック数は、○で囲ったブロック数以外にもあるが、本実施の形態でこれらのブロック数を最適なブロック数としないのは、以下の理由による。   As is clear from each graph, the number of blocks with a high transfer rate is other than the number of blocks surrounded by circles. However, in the present embodiment, the number of blocks is not the optimum number of blocks as follows. Because of the reason.

ブロック数が多すぎると、1つのディスクリプタリストを作成する時間が長くなる。これにより、最初のDMA転送開始時間が遅れるだけでなく、DMA転送期間中だけでは次のディスクリプタリストの作成が間に合わずに、待ち時間が発生して次のディスクリプタリストによるDMA転送の実行が遅れることもある。そこで、本実施の形態では、上記のように1つのディスクリプタリストを構成する最適なブロック数を求めるようにしている。   If the number of blocks is too large, it takes a long time to create one descriptor list. As a result, not only the first DMA transfer start time is delayed, but the creation of the next descriptor list is not in time only during the DMA transfer period, and a waiting time is generated and the execution of the DMA transfer by the next descriptor list is delayed. There is also. Therefore, in this embodiment, the optimum number of blocks constituting one descriptor list is obtained as described above.

こうしてブロック数を決定した後、前述したように、そのブロック数を変数data_sizeに対応付けて所定のテーブルに登録する。図8は、基準データのデータ量(転送サイズ)に対応付けて最適なブロック数を登録したテーブルの一例である。このようなテーブルを、後述するDMA転送時にCPU24が参照できるよう、メモリ28やHDD32に格納しておく。以下、このように最適なブロック数を登録したテーブルをブロック数テーブルと呼称する。   After determining the number of blocks in this manner, as described above, the number of blocks is registered in a predetermined table in association with the variable data_size. FIG. 8 is an example of a table in which the optimum number of blocks is registered in association with the data amount (transfer size) of the reference data. Such a table is stored in the memory 28 or the HDD 32 so that the CPU 24 can refer to it at the time of DMA transfer described later. Hereinafter, the table in which the optimum number of blocks is registered is referred to as a block number table.

ステップ118では、配列size_tableの全ての要素に格納されたデータ量についてDMA転送測定が終了したか否かを判定する。ここで否定判定した場合には、kをリセットしてステップ102に戻り、jをカウントアップして、配列size_tableの次の要素に格納されているデータ量を変数data_sizeにセットして、上記と同様に測定を行なう。   In step 118, it is determined whether or not the DMA transfer measurement is completed for the data amount stored in all the elements of the array size_table. If a negative determination is made here, k is reset and the process returns to step 102, j is counted up, the data amount stored in the next element of the array size_table is set in the variable data_size, and the same as above Make a measurement.

このように、基準データ毎にブロック数を変動させながらDMA転送して転送レートを測定し、該転送レートに基づいて転送データ量毎に最適なブロック数を決定する。   As described above, DMA transfer is performed while varying the number of blocks for each reference data, the transfer rate is measured, and the optimum number of blocks is determined for each transfer data amount based on the transfer rate.

なお、最適なブロック数を測定して決定するタイミングであるが、転送レートは、DMA転送を行なうシステム(ここでは情報処理部13)の転送性能によって変化するため、システム開発段階でこうした測定を行なって、最適なブロック数を決定するようにしてもよい。   Although it is the timing for measuring and determining the optimum number of blocks, the transfer rate varies depending on the transfer performance of the DMA transfer system (in this case, the information processing unit 13), so such measurement is performed at the system development stage. Thus, the optimum number of blocks may be determined.

また、同じシステムであっても、例えば、システム上で動作するモジュールの種類や数等が異なればCPU24の負荷も変動して転送レートが変動することもあるため、システムの開発段階だけでなく、システム起動時や所定時間毎にこうした測定を行なって、最適なブロック数を決定しておき、ブロック数テーブルを更新するようにしてもよい。   Also, even in the same system, for example, if the type and number of modules operating on the system are different, the load of the CPU 24 may also fluctuate and the transfer rate may fluctuate. Such a measurement may be performed at the time of starting the system or every predetermined time to determine the optimum number of blocks, and the block number table may be updated.

また、LCD22を介してユーザが任意のタイミングで上記ブロック数の決定のためのプログラムを起動して、ブロック数テーブルを更新するようにしてもよい。   Further, the user may activate the program for determining the number of blocks at an arbitrary timing via the LCD 22 to update the block number table.

CPU24は、このように決定されテーブルに格納されたブロック数に従ってディスクリプタリストを作成してDMAC42にDMA転送を行なわせる。   The CPU 24 creates a descriptor list according to the number of blocks determined in this way and stored in the table, and causes the DMAC 42 to perform DMA transfer.

図9は、DMA転送時に実行されるプログラムのフローを示すフローチャートである。このプログラムは、CPU24により実行される。   FIG. 9 is a flowchart showing a flow of a program executed at the time of DMA transfer. This program is executed by the CPU 24.

ステップ200では、変数remain_sizeに転送対象のデータの量を示すdata_sizeをセットする。変数remain_sizeは未転送のデータ量を示す変数であり、後述するように、1つのディスクリプタリストによるデータ転送が終了する毎に変数remain_sizeから転送済データ量(TransferSize)が減算される。また、ステップ200では、転送対象のデータを転送するためのディスクリプタリストが全て作成されたか否かを示すフラグDL_end_flagに0をセットする。   In step 200, data_size indicating the amount of data to be transferred is set in a variable remain_size. The variable “remain_size” is a variable indicating the amount of untransferred data, and as will be described later, the transferred data amount (TransferSize) is subtracted from the variable “remain_size” every time data transfer by one descriptor list is completed. In step 200, 0 is set to a flag DL_end_flag indicating whether or not all descriptor lists for transferring data to be transferred have been created.

ステップ202では、転送対象のデータ全てが転送終了したか否かを判定する。ここでは、変数remain_sizeが0になり且つフラグDL_end_flagが1になった場合に全データの転送が終了したと判定し、それ以外の場合には、転送は終了していないと判定する。   In step 202, it is determined whether or not all data to be transferred has been transferred. Here, when the variable remain_size becomes 0 and the flag DL_end_flag becomes 1, it is determined that the transfer of all data has been completed, and in other cases, it is determined that the transfer has not been completed.

ステップ202で否定判定された場合には、ステップ204で、最初のディスクリプタリストを作成するか否かを判定する。   If the determination in step 202 is negative, it is determined in step 204 whether or not to create the first descriptor list.

ステップ204で肯定判定した場合には、ステップ206に移行する。   If an affirmative determination is made in step 204, the process proceeds to step 206.

ステップ206では、ブロック数テーブルからdata_sizeに応じたブロック数を読み出し、該ブロック数を2で除算した数を最初のディスクリプタリストのブロック数として設定する。   In step 206, the number of blocks corresponding to data_size is read from the block number table, and the number obtained by dividing the number of blocks by 2 is set as the number of blocks in the first descriptor list.

なお、ここで、ブロック数テーブルから読み出したブロック数を2で除算して最初のディスクリプタリストのブロック数としたのは、最初のディスクリプタリストの作成時間を短縮し、DMAC42を起動するまでの時間を早くして、最初のDMA転送の開始タイミングを早めるためである。なお、逆に最初のディスクリプタリストのブロック数が少なすぎると、最初のディスクリプタリストによるDMA転送期間中に次のディスクリプタリストの作成が間に合わなくなる可能性があるため、ここでは2で除算して最初のディスクリプタリストのブロック数を求めている。なお、転送対象のデータの量(data_size)が極端に小さい場合には、ディスクリプタリストを構成する最適なブロック数も小さくなるため、読み出したブロック数をそのまま用いてもDMA転送の開始にあまり影響しないことが多い。従って、そのような場合には、読み出したブロック数を2で除算せずにそのまま用いるようにしてもよい。   Here, the number of blocks read from the block number table is divided by 2 to obtain the number of blocks in the first descriptor list. This shortens the creation time of the first descriptor list and increases the time until the DMAC 42 is activated. This is because the start timing of the first DMA transfer is advanced earlier. On the other hand, if the number of blocks in the first descriptor list is too small, it may not be possible to create the next descriptor list during the DMA transfer period by the first descriptor list. The number of blocks in the descriptor list is obtained. Note that when the amount of data to be transferred (data_size) is extremely small, the optimum number of blocks constituting the descriptor list is also small. Even if the number of read blocks is used as it is, the start of DMA transfer is not significantly affected. There are many cases. Therefore, in such a case, the number of read blocks may be used as it is without being divided by two.

また、ここでは2で除算して最初のディスクリプタリストのブロック数を求めたが、これに限定されず、データ量によっては3で除算してもよいし、所定数を減算する等、他の求め方で求めてもよい。   Here, the number of blocks in the first descriptor list is obtained by dividing by 2. However, the present invention is not limited to this. Depending on the amount of data, it may be divided by 3, or by subtracting a predetermined number. You may ask for it.

ステップ208では、ステップ206で設定したブロック数で最初のディスクリプタリストを作成してディスクリプタリスト管理キューに登録し、ディスクリプタ管理キューポインタが該作成したディスクリプタリストのアドレスを示す先頭のディスクリプタリストポインタを指すように設定する。そして、該ディスクリプタリスト管理キューポインタが指す先頭のディスクリプタリストポインタをDMAC42にセットした後、DMAC42を起動する。これにより、DMAC42がDMA転送を開始する。   In step 208, the first descriptor list is created with the number of blocks set in step 206 and registered in the descriptor list management queue so that the descriptor management queue pointer points to the first descriptor list pointer indicating the address of the created descriptor list. Set to. Then, after setting the first descriptor list pointer pointed to by the descriptor list management queue pointer in the DMAC 42, the DMAC 42 is activated. As a result, the DMAC 42 starts DMA transfer.

一方、ステップ204で否定判定した場合には、ステップ210に移行し、ブロック数テーブルからdata_sizeに応じた最適なブロック数を読み出し、該ブロック数をこれから作成するディスクリプタリストのブロック数として設定する。   On the other hand, if a negative determination is made in step 204, the process proceeds to step 210, where the optimum number of blocks corresponding to data_size is read from the block number table, and the number of blocks is set as the number of blocks in the descriptor list to be created.

ステップ208またはステップ210の処理後は、ステップ212で、現在のCPU24の使用率またはCPU24の占有時間を取得する。本システムでは、このプログラムの実行中は、常にバックグラウンドでCPU24の使用率またはCPU24の占有時間をモニタしている。なお、CPU24の占有時間は、個々のディスクリプタリストによるDMA転送開始から累積的に計時され、DMA転送終了時(CPU24割り込み時)にリセットされる。   After the processing of step 208 or step 210, in step 212, the current usage rate of the CPU 24 or the occupation time of the CPU 24 is acquired. In this system, during the execution of this program, the usage rate of the CPU 24 or the occupation time of the CPU 24 is always monitored in the background. The occupation time of the CPU 24 is cumulatively counted from the start of DMA transfer by each descriptor list, and is reset when the DMA transfer ends (when the CPU 24 interrupts).

ステップ214では、ディスクリプタリスト作成条件を満たしているか否かを判定する。ディスクリプタリスト作成条件は、予め本プログラム実行中に参照可能なHDD32などの記憶装置に記憶され設定されている。本実施の形態では、
1,CPU24の使用率または占有時間が所定値を超えておらず、且つ直前のCPU24の割り込みから現時点までに作成したディスクリプタリストの数が、次の割り込みまで(実行中のDMA転送が終了するまで)に作成可能なディスクリプタリストの数を超えていないこと、
2,ディスクリプタリスト管理キューにディスクリプタリストが1つも登録されていないこと(すなわち、ディスクリプタリスト管理キューポインタがNULLであること)、
の2つの条件がディスクリプタリスト作成条件として設定されている。
In step 214, it is determined whether or not the descriptor list creation condition is satisfied. The descriptor list creation conditions are stored and set in advance in a storage device such as the HDD 32 that can be referred to during execution of the program. In this embodiment,
1. The usage rate or occupation time of the CPU 24 does not exceed a predetermined value, and the number of descriptor lists created from the previous CPU 24 interrupt until the present time is the next interrupt (until the DMA transfer being executed is completed). ) Not exceed the number of descriptor lists that can be created,
2. No descriptor list is registered in the descriptor list management queue (that is, the descriptor list management queue pointer is NULL),
These two conditions are set as descriptor list creation conditions.

本実施の形態では、この2つの作成条件うち、少なくとも一方が満たされれば、CPU24はステップ214で肯定判定する。   In the present embodiment, if at least one of the two creation conditions is satisfied, the CPU 24 makes a positive determination in step 214.

なお、実行中のDMA転送に係るディスクリプタリストのブロック数によって、CPU24の割り込みが発生するまでの時間が変動するため、その時間内で作成可能なディスクリプタリストの数も変動する。そこで、本実施の形態では、ディスクリプタリストのブロック数に応じて、DMA転送中に作成可能なディスクリプタリストの数を予めHDD32などの記憶装置に記憶して設定しておき、CPU24はこれを参照することにより(或いは、予め記憶しておくことはせずその都度演算することにより、)、次の割り込みまでに作成可能なディスクリプタリストの数を取得し、該作成可能なディスクリプタの数を上限としてディスクリプタリストを作成するようにしている(上記作成条件の1を参照)。   Note that since the time until the interrupt of the CPU 24 varies depending on the number of blocks in the descriptor list related to the DMA transfer being executed, the number of descriptor lists that can be created within that time also varies. Therefore, in the present embodiment, the number of descriptor lists that can be created during DMA transfer is set in advance in a storage device such as the HDD 32 according to the number of blocks in the descriptor list, and the CPU 24 refers to this. (Or by calculating each time instead of storing in advance), the number of descriptor lists that can be created before the next interrupt is obtained, and the maximum number of descriptors that can be created A list is created (refer to creation condition 1 above).

ステップ214で肯定判定した場合には、ステップ216で、CPU24は、上記ステップ210で読み出したブロック数のディスクリプタリストを1つ作成し、ディスクリプタリスト管理キューに登録する。   If an affirmative determination is made in step 214, in step 216, the CPU 24 creates one descriptor list for the number of blocks read in step 210 and registers it in the descriptor list management queue.

ステップ218では、転送対象のデータを転送するためのディスクリプタリストを全て作成したか否かを判定する。ここで否定判定した場合には、ステップ202に戻って、上記処理を繰り返す。一方、ステップ218で肯定判定した場合には、ステップ220でフラグDL_end_flagに1をセットしてステップ202に戻る。   In step 218, it is determined whether or not all descriptor lists for transferring the transfer target data have been created. If a negative determination is made here, the process returns to step 202 and the above process is repeated. On the other hand, if an affirmative determination is made in step 218, the flag DL_end_flag is set to 1 in step 220, and the process returns to step 202.

また、ステップ214で、ディスクリプタリスト作成条件を満たしていないと判定した場合には、CPU24はディスクリプタリストの作成をこれ以上行なわずにステップ222に移行し、現在実行中のDMA転送が終了するのを待つ。DMAC42においてDMA転送が終了して割り込みハンドラからシグナルが来ると、ステップ224に移行し、変数remain_sizeから今回のDMA転送により転送されたデータ量(TransferSize)を減算する。   If it is determined in step 214 that the descriptor list creation condition is not satisfied, the CPU 24 proceeds to step 222 without further creating the descriptor list and terminates the currently executing DMA transfer. wait. When the DMA transfer is completed in the DMAC 42 and a signal is received from the interrupt handler, the process proceeds to step 224, and the data amount (TransferSize) transferred by the current DMA transfer is subtracted from the variable remain_size.

ステップ226では、CPU24は、ディスクリプタリスト管理キューポインタに基づいてディスクリプタリスト管理キューから次のディスクリプタリストポインタを取り出す。   In step 226, the CPU 24 retrieves the next descriptor list pointer from the descriptor list management queue based on the descriptor list management queue pointer.

ステップ228では、上記取り出したディスクリプタリストポインタをDMAC42にセットした後、DMAC42を起動する。これにより、DMAC42が次のディスクリプタリストによるDMA転送を開始する。ステップ228の後は、ステップ202に戻り、上記と同様に処理を行なう。   In step 228, the extracted descriptor list pointer is set in the DMAC 42, and then the DMAC 42 is activated. As a result, the DMAC 42 starts DMA transfer using the next descriptor list. After step 228, the process returns to step 202 and the same processing as described above is performed.

ステップ224で変数remain_sizeから転送済データ量が徐徐に減算されて0になり、且つステップ220でフラグDL_end_flagが1になると、ステップ202で転送対象のデータが全て転送終了したと判定し、本プログラムを終了する。   When the transferred data amount is gradually subtracted from the variable maintain_size in step 224 to become 0 and the flag DL_end_flag becomes 1 in step 220, it is determined in step 202 that all the transfer target data has been transferred, finish.

次に、ディスクリプタリストの作成方法をタイミングチャートを参照しながら更に具体的に説明する。   Next, a method for creating a descriptor list will be described more specifically with reference to a timing chart.

図10は、ディスクリプタリストのブロック数を最初のディスクリプタリストとそれ以外のディスクリプタリストとで異ならせる場合のタイミングチャートの一例を示す図である。   FIG. 10 is a diagram illustrating an example of a timing chart when the number of blocks in the descriptor list is different between the first descriptor list and the other descriptor lists.

図10において、「全画像データ転送区間」で示される期間は、転送対象のデータの全てをDMA転送するための期間であって、具体的には、DMA転送機能(上記説明したDMA転送のプログラム)をコールしてから該プログラムが終了するまでの期間を示す。   In FIG. 10, the period indicated by “all image data transfer section” is a period for DMA transfer of all the data to be transferred, and more specifically, the DMA transfer function (the DMA transfer program described above). ) Is called and the program is terminated.

また、図10において、DMA転送区間T1〜Tnで示される複数の期間の各々は、1つのディスクリプタリストに基づくDMA転送の開始から終了までの期間(すなわち、CPU24の割り込みが終了してから次の割り込みが発生するまでの期間)をいう。   In FIG. 10, each of a plurality of periods indicated by DMA transfer sections T1 to Tn is a period from the start to the end of DMA transfer based on one descriptor list (that is, the next period after the interruption of the CPU 24 ends). Period until an interrupt occurs).

また、ディスクリプタリスト構築区間D1〜Dnで示される複数の期間の各々は、1つのディスクリプタリストを作成する期間を示す(1つの構築区間で1つのディスクリプタリストが作成される)。なお、この例では、DMA転送区間T1に対応するディスクリプタリストは、該DMA転送区間T1の開始前の構築区間D1で作成され、DMA転送区間T2に対応するディスクリプタリストは、その1つ前のDMA転送区間T1内の構築区間D2で作成され、DMA転送区間T3に対応するディスクリプタリストは、その1つ前のDMA転送区間T2内の構築区間D3で作成され、、、、というように、1番目のディスクリプタリストを除く各ディスクリプタリストは、1つ前のDMA転送区間で作成される。   Each of the plurality of periods indicated by the descriptor list construction sections D1 to Dn represents a period for creating one descriptor list (one descriptor list is created in one construction section). In this example, the descriptor list corresponding to the DMA transfer interval T1 is created in the construction interval D1 before the start of the DMA transfer interval T1, and the descriptor list corresponding to the DMA transfer interval T2 is the previous DMA. The descriptor list corresponding to the DMA transfer period T3 created in the construction period D2 in the transfer period T1 is created in the construction period D3 in the previous DMA transfer period T2, and so on. Each descriptor list except the descriptor list is created in the previous DMA transfer section.

また、前述したように、本実施の形態では、1番目のディスクリプタリストのブロック数は、2番目以降のディスクリプタリストのブロック数よりも少なく設定される。従って、図10に示すように構築区間D1は、構築区間D2〜Dnに比べて短くなる。従って、1番目のディスクリプタリストに基づいて行なわれるDMA転送の開始タイミングが早まる。なお、2番目以降のディスクリプタリストは、前述したように、ブロック数決定プログラムで決定された最適なブロック数(ここでは、ブロック数テーブルに登録されているブロック数)で作成される。   As described above, in the present embodiment, the number of blocks in the first descriptor list is set to be smaller than the number of blocks in the second and subsequent descriptor lists. Therefore, as shown in FIG. 10, the construction section D1 is shorter than the construction sections D2 to Dn. Therefore, the start timing of the DMA transfer performed based on the first descriptor list is advanced. As described above, the second and subsequent descriptor lists are created with the optimum number of blocks determined by the block number determination program (here, the number of blocks registered in the block number table).

次に、上述の実施の形態のDMA転送プログラムと同様に、DMA転送実行中に(DMA転送区間内で)ディスクリプタリスト作成条件を満たした場合に、該実行中のDMA転送以降に行なわれるDMA転送のためのディスクリプタリストを作成可能な範囲内で作成する場合についての具体例を、図9,図10を参照して説明する。   Next, as in the DMA transfer program of the above-described embodiment, when the descriptor list creation condition is satisfied during the DMA transfer (in the DMA transfer interval), the DMA transfer performed after the DMA transfer being executed A specific example of the case where the descriptor list is created within a range in which the descriptor list can be created will be described with reference to FIGS.

図11は、CPU24の使用率をモニタしながらディスクリプタリストを作成する場合のタイミングチャートの一例を示す図である。   FIG. 11 is a diagram illustrating an example of a timing chart when a descriptor list is created while monitoring the usage rate of the CPU 24.

図11では、図10に示す「全画像データ転送区間」、「DMA転送区間」、及び「ディスクリプタリスト構築区間」に加えて、「システムのCPU使用率」が示されている。CPU使用率は、モジュール等がCPU24を占有する時間の割合を%で示したものである。   FIG. 11 shows “system CPU usage rate” in addition to “all image data transfer period”, “DMA transfer period”, and “descriptor list construction period” shown in FIG. The CPU usage rate is the percentage of the time that a module or the like occupies the CPU 24 in%.

この例では、ディスクリプタリスト管理キューにディスクリプタリストが1つも登録されていなければ、CPU使用率に拘わらずディスクリプタリストを作成するが、そうでなければ、CPU使用率を参照し、CPU使用率が予め定められた上限値を超えていなければ、そのDMA転送区間で作成可能な数以内で先行してディスクリプタリストを作成する。一方、CPU使用率の上限値を超えた、或いはそのDMA転送区間で作成したディスクリプタリストの数がそのDMA転送区間で作成可能な数に到達した場合には、ディスクリプタリストの作成は行なわずに、次のDMA転送区間に作成処理を繰り越す。   In this example, if no descriptor list is registered in the descriptor list management queue, a descriptor list is created regardless of the CPU usage rate. Otherwise, the CPU usage rate is referred to and the CPU usage rate is set in advance. If the predetermined upper limit value is not exceeded, the descriptor list is created in advance within the number that can be created in the DMA transfer section. On the other hand, when the upper limit of the CPU usage rate is exceeded or the number of descriptor lists created in the DMA transfer section reaches the number that can be created in the DMA transfer section, the descriptor list is not created. The creation process is carried forward to the next DMA transfer section.

図11に示すように、DMA転送区間T1の前の構築区間D1でブロック数の少ないディスクリプタリストを1つ作成した後、DMA転送区間T1において、最適なブロック数のディスクリプタリストを2つ作成している(構築区間D2、D3で合計2つ)。また、次のDMA転送区間T2では、3つの構築区間D4、D5、D6で3つのディスクリプタリストを作成している。DMA転送区間T1,T2では、CPU使用率が上限値よりも低いため、DMA転送区間の長さに応じて作成可能な数だけディスクリプタリストが作成されている。   As shown in FIG. 11, after one descriptor list with a small number of blocks is created in the construction section D1 before the DMA transfer section T1, two descriptor lists with the optimum number of blocks are created in the DMA transfer section T1. (Two in total in construction sections D2 and D3). In the next DMA transfer section T2, three descriptor lists are created in the three construction sections D4, D5, and D6. In the DMA transfer sections T1 and T2, since the CPU usage rate is lower than the upper limit value, as many descriptor lists as possible can be created according to the length of the DMA transfer section.

ところが、DMA転送区間T3ではCPU使用率は上限値を超えている。また、既にDMA転送区間T1,T2で、DMA転送区間T6に対応するディスクリプタリストまで先行して作成済みである。従って、DMA転送区間T3ではディスクリプタリスト作成条件を満たさないため、ディスクリプタリストが1つも作成されない。また、DMA転送区間T4では、途中からCPU使用率が上限値以下となるため、その時点でディスクリプタリストが作成されている(構築区間D7)。   However, the CPU usage rate exceeds the upper limit in the DMA transfer period T3. In addition, the descriptor list corresponding to the DMA transfer section T6 has already been created in the DMA transfer sections T1 and T2. Accordingly, since no descriptor list creation condition is satisfied in the DMA transfer period T3, no descriptor list is created. Further, in the DMA transfer section T4, since the CPU usage rate becomes equal to or less than the upper limit value from the middle, the descriptor list is created at that time (construction section D7).

このようにCPU使用率をモニタしながらディスクリプタリストを作成する方法は、例えば、実行モジュールの切替えが強制的に行なわれるプリエンプティブなモジュールでディスクリプタリストを作成するシステム等、様々なシステムに好適である。   The method of creating the descriptor list while monitoring the CPU usage rate in this way is suitable for various systems such as a system that creates a descriptor list with a preemptive module in which execution modules are forcibly switched.

図12は、CPU24の占有時間をモニタしながらディスクリプタリストを作成する場合のタイミングチャートの一例を示す図である。   FIG. 12 is a diagram illustrating an example of a timing chart when a descriptor list is created while monitoring the occupation time of the CPU 24.

図12では、図8に示す「全画像データ転送区間」、「DMA転送区間」、及び「ディスクリプタリスト構築区間」に加えて、「CPU占有時間」が示されている。CPU占有時間は、ディスクリプタリストを作成するモジュールがCPU24を占有する時間の累計を示したものであり、予め画像処理システム10に組み込まれたCPU24の占有時間を計時するモジュールによって得られる。なお、このCPU占有時間は、CPU24の割り込みが発生する度に、0にリセットされる。   In FIG. 12, “CPU occupation time” is shown in addition to “all image data transfer section”, “DMA transfer section”, and “descriptor list construction section” shown in FIG. The CPU occupation time indicates the total amount of time that the module that creates the descriptor list occupies the CPU 24, and is obtained by the module that measures the occupation time of the CPU 24 incorporated in the image processing system 10 in advance. The CPU occupation time is reset to 0 each time an interrupt from the CPU 24 occurs.

この例では、ディスクリプタリスト管理キューにディスクリプタリストが1つも登録されていなければ、CPU占有時間に拘わらずディスクリプタリストを作成するが、そうでなければ、CPU占有時間を参照し、CPU占有時間が予め定められた上限値を超えていなければ、そのDMA転送区間で作成可能な数以内で先行してディスクリプタリストを作成する。一方、CPU占有時間の上限値を超えた、或いはそのDMA転送区間で作成したディスクリプタリストの数がそのDMA転送区間で作成可能な数に到達した場合には、ディスクリプタリストの作成は行なわずに、次のDMA転送区間に作成処理を繰り越す。   In this example, if no descriptor list is registered in the descriptor list management queue, a descriptor list is created regardless of the CPU occupation time. Otherwise, the CPU occupation time is referred to and the CPU occupation time is determined in advance. If the predetermined upper limit value is not exceeded, the descriptor list is created in advance within the number that can be created in the DMA transfer section. On the other hand, when the upper limit of the CPU occupation time is exceeded or the number of descriptor lists created in the DMA transfer section reaches the number that can be created in the DMA transfer section, the descriptor list is not created. The creation process is carried forward to the next DMA transfer section.

図12に示すように、DMA転送区間T1の前の構築区間D1でブロック数の少ないディスクリプタリストを1つ作成した後、DMA転送区間T1において、最適なブロック数のディスクリプタリストを2つ作成している(構築区間D2、D3)。構築区間D3でディスクリプタリスト作成が終了した時点でCPU占有時間が上限値に到達しているため、このDMA転送区間T1ではこれ以上のディスクリプタリストの作成は行なわれていない。   As shown in FIG. 12, after one descriptor list with a small number of blocks is created in the construction section D1 before the DMA transfer section T1, two descriptor lists with the optimum number of blocks are created in the DMA transfer section T1. (Construction sections D2, D3). Since the CPU occupation time has reached the upper limit when the descriptor list creation is completed in the construction section D3, no further descriptor list is created in this DMA transfer section T1.

次のDMA転送区間T2でも、ディスクリプタリストを2つ作成した時点でCPU占有時間が上限値に到達しているため、それ以上のディスクリプタリストの作成は行なわれていない。続くDMA転送区間T3、T4でも同様である。   Even in the next DMA transfer section T2, the CPU occupation time has reached the upper limit when two descriptor lists are created, so no further descriptor list is created. The same applies to the subsequent DMA transfer sections T3 and T4.

このようにCPU占有時間をモニタしながらディスクリプタリストを作成する方法は、例えば、実行モジュールの切替えが強制的に行なわれないノンプリエンプティブな組込型モジュールでディスクリプタリストを作成するシステム等、様々なシステムに好適である。   In this way, the method for creating the descriptor list while monitoring the CPU occupation time is, for example, various systems such as a system for creating a descriptor list with a non-preemptive embedded module in which execution module switching is not forcibly performed. It is suitable for.

以上、様々な例について説明したが、本発明は、上述した実施の形態に限定されるものではなく、特許請求の範囲に記載された発明の範囲内で様々な設計上の変更を行うようにしてもよい。   Although various examples have been described above, the present invention is not limited to the above-described embodiments, and various design changes are made within the scope of the invention described in the claims. May be.

例えば、上記実施の形態では、DMA転送の開始時に最初のディスクリプタリストのブロック数を演算で求めたが、これに限定されず、予め最初のディスクリプタリストのブロック数を求めておき、図13に示すように、ブロック数テーブルに予め登録しておくようにしてもよい。   For example, in the above embodiment, the number of blocks in the first descriptor list is obtained by calculation at the start of DMA transfer. However, the present invention is not limited to this, and the number of blocks in the first descriptor list is obtained in advance, as shown in FIG. In this way, it may be registered in advance in the block number table.

また、本実施の形態では最初のディスクリプタリストのブロック数のみを少なくする例について説明したが、これに限定されず、例えば、最初のディスクリプタリストを最も少ないブロック数にして、2番目、3番目と段階的にブロック数を増やすようにしてもよい。このように段階的にブロック数を増やす場合であっても、なるべく早い段階で最適なブロック数のディスクリプタリストが作成されるようにして、転送効率が下がらないようにするとよい。   In the present embodiment, an example in which only the number of blocks in the first descriptor list is reduced has been described. However, the present invention is not limited to this example. The number of blocks may be increased step by step. Even when the number of blocks is increased step by step, a descriptor list having the optimum number of blocks is created at the earliest possible stage so that transfer efficiency does not decrease.

本発明の情報処理装置に係る実施の形態としての情報処理部を含む画像処理システムの構成例を示す図である。It is a figure which shows the structural example of the image processing system containing the information processing part as embodiment which concerns on the information processing apparatus of this invention. 仮想記憶方式を採用したシステムにおいてDMACにより読み込まれるディスクリプタリストの一例を示す図である。It is a figure which shows an example of the descriptor list read by DMAC in the system which employ | adopted the virtual memory system. ディスクリプタリストを管理するディスクリプタリスト管理キューの構造を説明する説明図である。It is explanatory drawing explaining the structure of the descriptor list management queue which manages a descriptor list. ブロック数を決定するためのプログラムのフローを示すフローチャートである。It is a flowchart which shows the flow of the program for determining the number of blocks. あるシステムでのDMA転送レートを、4Mバイトの基準データをブロック数を変えて測定した場合の測定結果の具体例を示すグラフである。It is a graph which shows the specific example of the measurement result at the time of measuring the DMA transfer rate in a certain system by changing the number of blocks of 4 Mbytes of reference data. あるシステムでのDMA転送レートを、32Mバイトの基準データをブロック数を変えて測定した場合の測定結果の具体例を示すグラフである。It is a graph which shows the specific example of the measurement result at the time of measuring DMA transfer rate in a certain system by changing the number of blocks of the reference data of 32 Mbytes. あるシステムでのDMA転送レートを、63Mバイトの基準データをブロック数を変えて測定した場合の測定結果の具体例を示すグラフである。It is a graph which shows the specific example of the measurement result at the time of measuring the DMA transfer rate in a certain system by changing the number of blocks of the reference data of 63 Mbytes. 転送データ量(転送サイズ)に対応付けて最適なブロック数を登録したブロック数テーブルの一例である。It is an example of a block number table in which an optimum number of blocks is registered in association with a transfer data amount (transfer size). DMA転送時に実行されるプログラムのフローを示すフローチャートである。It is a flowchart which shows the flow of the program performed at the time of DMA transfer. ディスクリプタリストのブロック数を最初のディスクリプタリストとそれ以外のディスクリプタリストとで異ならせる場合のタイミングチャートの一例を示す図である。It is a figure which shows an example of the timing chart in the case of making the number of blocks of a descriptor list differ by the first descriptor list and other descriptor lists. CPUの使用率をモニタしながらディスクリプタリストを作成する場合のタイミングチャートの一例を示す図である。It is a figure which shows an example of the timing chart in the case of producing a descriptor list | wrist while monitoring the usage rate of CPU. CPUの占有時間をモニタしながらディスクリプタリストを作成する場合のタイミングチャートの一例を示す図である。It is a figure which shows an example of the timing chart in the case of creating a descriptor list, monitoring the occupation time of CPU. ブロック数テーブルの変形例である。It is a modification of a block number table.

符号の説明Explanation of symbols

10 画像処理システム
12 マザーボード
13 情報処理部
14 コントローラボード
24 CPU
26 ハブ
28 メモリ
30 ハブ
32 HDD
40 バスブリッジ
42 DMAコントローラ
44 メモリ
DESCRIPTION OF SYMBOLS 10 Image processing system 12 Mother board 13 Information processing part 14 Controller board 24 CPU
26 Hub 28 Memory 30 Hub 32 HDD
40 bus bridge 42 DMA controller 44 memory

Claims (7)

中央演算処理装置(CPU)を介在させないダイレクトメモリアクセス(DMA)転送に必要な情報を含む単位転送量毎の転送情報を複数連ねて構成した転送情報群に基づいて転送対象のデータを前記単位転送量毎にDMA転送する転送手段と、
データ量が予め定められた基準データを前記転送情報群を構成する転送情報の個数を変化させながら前記転送手段によってDMA転送したときの転送速度に基づいて前記転送情報群を構成する転送情報の数を決定する決定手段と、
転送対象のデータをDMA転送するときに、前記決定手段で決定された数の転送情報を連ねて構成した転送情報群を作成する作成手段と、
を含む情報処理装置。
The unit transfer of the data to be transferred based on a transfer information group composed of a plurality of transfer information for each unit transfer amount including information necessary for direct memory access (DMA) transfer without intervention of a central processing unit (CPU) Transfer means for DMA transfer for each quantity;
The number of transfer information constituting the transfer information group based on the transfer speed when the transfer means performs DMA transfer by changing the number of transfer information constituting the transfer information group with reference data having a predetermined data amount A determination means for determining
Creating means for creating a transfer information group composed of a plurality of pieces of transfer information determined by the determining means when transferring data to be transferred by DMA;
An information processing apparatus including:
前記決定手段で決定された転送情報の数を基準データのデータ量に対応付けて記憶した記憶手段を更に備え、
前記作成手段は、転送対象のデータをDMA転送するときに、該転送対象のデータ量に応じて前記記憶手段に記憶された数を読み出し、該読み出した数の転送情報を連ねて構成した転送情報群を作成する請求項1に記載の情報処理装置。
A storage unit that stores the number of pieces of transfer information determined by the determination unit in association with the data amount of the reference data;
The creation unit reads the number stored in the storage unit according to the amount of data to be transferred when the transfer target data is DMA-transferred, and transfer information configured by connecting the read number of transfer information. The information processing apparatus according to claim 1, which creates a group.
前記作成手段は、前記転送対象のデータをDMA転送するために複数の転送情報群を作成する場合に、先頭の転送情報群または先頭から所定数までの転送情報群については、前記決定手段で決定された数よりも少ない数の転送情報で構成された転送情報群を作成し、それ以降の転送情報群については、前記決定手段で決定された数の転送情報を構成した転送情報群を作成する請求項1または2に記載の情報処理装置。   In the case where the creation means creates a plurality of transfer information groups for DMA transfer of the data to be transferred, the decision means decides the first transfer information group or a transfer information group from the beginning to a predetermined number. A transfer information group composed of a smaller number of pieces of transfer information than the determined number is created, and a transfer information group comprising the number of pieces of transfer information determined by the determining means is created for the subsequent transfer information groups The information processing apparatus according to claim 1 or 2. 前記作成手段は、前記転送対象のデータをDMA転送するために複数の転送情報群を作成する場合に、前記転送手段で実行中のDMA転送が終了するまでに該実行中のDMA転送以降に行なわれるDMA転送のための転送情報群を作成して作成順に転送情報用記憶手段に記憶し、
前記転送手段は、前記転送情報用記憶手段から前記作成順に転送情報群を読み出してDMA転送を行なう請求項1〜3の何れか1項に記載の情報処理装置。
The creating means performs the DMA transfer after the DMA transfer being executed until the DMA transfer being executed by the transfer means is completed when creating a plurality of transfer information groups for DMA transfer of the data to be transferred. A transfer information group for DMA transfer to be stored in the transfer information storage means in the order of creation,
The information processing apparatus according to claim 1, wherein the transfer unit performs DMA transfer by reading transfer information groups from the transfer information storage unit in the order of creation.
前記作成手段は、前記転送情報群の作成をCPU使用率またはCPU占有時間が所定値を超えていない場合に行なう請求項4に記載の情報処理装置。   The information processing apparatus according to claim 4, wherein the creation unit creates the transfer information group when the CPU usage rate or the CPU occupation time does not exceed a predetermined value. 前記作成手段は、前記転送情報用記憶手段に未読の転送情報群が1つも記憶されていない場合には、前記CPU使用率またはCPU占有時間が所定値を超えている場合であっても実行中のDMA転送以降に行なわれるDMA転送のための転送情報群を作成する請求項5に記載の情報処理装置。   The creation means is executing even when the CPU usage rate or the CPU occupation time exceeds a predetermined value when no unread transfer information group is stored in the transfer information storage means. 6. The information processing apparatus according to claim 5, wherein a transfer information group for DMA transfer performed after the DMA transfer is created. 中央演算処理装置(CPU)を介在させないダイレクトメモリアクセス(DMA)転送に必要な情報を含む単位転送量毎の転送情報を複数連ねて構成した転送情報群に基づいて転送対象のデータを前記単位転送量毎にDMA転送する転送手段が設けられたコンピュータを、
データ量が予め定められた基準データを前記転送情報群を構成する転送情報の個数を変化させながら前記転送手段によってDMA転送したときの転送速度に基づいて前記転送情報群を構成する転送情報の数を決定する決定手段、および
転送対象のデータをDMA転送するときに、前記決定手段で決定された数の転送情報を連ねて構成した転送情報群を作成する作成手段、
として機能させるためのプログラム。
The unit transfer of the data to be transferred based on a transfer information group composed of a plurality of transfer information for each unit transfer amount including information necessary for direct memory access (DMA) transfer without intervention of a central processing unit (CPU) A computer provided with a transfer means for performing DMA transfer for each quantity,
The number of transfer information constituting the transfer information group based on the transfer speed when the transfer means performs DMA transfer by changing the number of transfer information constituting the transfer information group with reference data having a predetermined data amount Determining means for determining the transfer information, and creating means for creating a transfer information group configured by linking the number of transfer information determined by the determining means when the transfer target data is DMA-transferred,
Program to function as.
JP2007227678A 2007-09-03 2007-09-03 Data processing apparatus and program Pending JP2009059276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007227678A JP2009059276A (en) 2007-09-03 2007-09-03 Data processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007227678A JP2009059276A (en) 2007-09-03 2007-09-03 Data processing apparatus and program

Publications (1)

Publication Number Publication Date
JP2009059276A true JP2009059276A (en) 2009-03-19

Family

ID=40554926

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007227678A Pending JP2009059276A (en) 2007-09-03 2007-09-03 Data processing apparatus and program

Country Status (1)

Country Link
JP (1) JP2009059276A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011189509A (en) * 2010-03-11 2011-09-29 Ricoh Co Ltd Image forming apparatus and method for transmission processing of image data therefor
JP2013246778A (en) * 2012-05-29 2013-12-09 Nec Corp Dma transfer device, dma transfer method and dma transfer program
JP5638124B2 (en) * 2011-03-29 2014-12-10 三菱電機株式会社 Navigation device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011189509A (en) * 2010-03-11 2011-09-29 Ricoh Co Ltd Image forming apparatus and method for transmission processing of image data therefor
JP5638124B2 (en) * 2011-03-29 2014-12-10 三菱電機株式会社 Navigation device
JP2013246778A (en) * 2012-05-29 2013-12-09 Nec Corp Dma transfer device, dma transfer method and dma transfer program

Similar Documents

Publication Publication Date Title
JP7313381B2 (en) Embedded scheduling of hardware resources for hardware acceleration
US8683093B2 (en) Memory system having high data transfer efficiency and host controller
CN102414671B (en) Hierarchical memory arbitration technique for disparate sources
JP5270077B2 (en) Arbitration circuit, crossbar, request selection method, and information processing apparatus
CN103034454B (en) Flexible flash command
US20070076246A1 (en) Image processing apparatus
JP2010027032A (en) Fifo device and method of storing data in fifo buffer
CN102646446A (en) Hardware dynamic cache power management
JP2009277096A (en) Dma control system, printer, and transfer instruction program
US11010094B2 (en) Task management method and host for electronic storage device
KR20080105390A (en) Apparatus and method for controlling commands used in flash memory
CN101504567B (en) CPU, CPU instruction system and method for reducing CPU power consumption
JP2009059276A (en) Data processing apparatus and program
US20030172229A1 (en) Systems and methods for detecting and compensating for runt block data transfers
US20060179172A1 (en) Method and system for reducing power consumption of a direct memory access controller
JP2008040650A (en) Bus arbitration device
CN112214095A (en) Method and equipment for controlling power consumption of hard disk
KR101135313B1 (en) Nand flash memory apparatus and method for scheduling requested operations
CN112767978B (en) DDR command scheduling method, device, equipment and medium
US8769167B2 (en) Channel device, information processing system and data transfer method
CN101276315B (en) Direct memory access controller for dynamically regulating transmission data width and method thereof
KR102334473B1 (en) Adaptive Deep Learning Accelerator and Method thereof
CN102385555A (en) Caching system and method of data caching
US20090276553A1 (en) Controller, hard disk drive and control method
WO2024114728A1 (en) Heterogeneous processor and related scheduling method