JP5772040B2 - Data transfer system, data transfer scheduling program - Google Patents

Data transfer system, data transfer scheduling program Download PDF

Info

Publication number
JP5772040B2
JP5772040B2 JP2011030157A JP2011030157A JP5772040B2 JP 5772040 B2 JP5772040 B2 JP 5772040B2 JP 2011030157 A JP2011030157 A JP 2011030157A JP 2011030157 A JP2011030157 A JP 2011030157A JP 5772040 B2 JP5772040 B2 JP 5772040B2
Authority
JP
Japan
Prior art keywords
bus
data transfer
transfer request
request
bus master
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.)
Active
Application number
JP2011030157A
Other languages
Japanese (ja)
Other versions
JP2012168808A (en
Inventor
上方 輝彦
輝彦 上方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2011030157A priority Critical patent/JP5772040B2/en
Publication of JP2012168808A publication Critical patent/JP2012168808A/en
Application granted granted Critical
Publication of JP5772040B2 publication Critical patent/JP5772040B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は,データ転送システム,このシステムで実行されるデータ転送スケジューリングプログラムに関する。   The present invention relates to a data transfer system and a data transfer scheduling program executed in this system.

バスアービタを有するバスと,バスに接続する複数のバスマスタとCPU(Central Processing Unit)とを有するデータ転送システムにおいて,所定の機能を実現するタスクは,CPUにより実行される。タスクは,プログラムの処理の実行単位であり,プロセス,スレッドとも呼ばれる。タスクは,タスク内のデータ転送要求をこのデータ転送要求に対応するバスマスタに実行させる。タスクが,データ転送要求をバスマスタに行う場合,データ転送用のAPI(Application Program Interface)を呼び出し,実行する。このとき,タスクは,データ転送要求APIに引数として,データの転送元アドレス,転送先アドレスなどを設定する。   In a data transfer system having a bus having a bus arbiter, a plurality of bus masters connected to the bus, and a CPU (Central Processing Unit), a task for realizing a predetermined function is executed by the CPU. A task is an execution unit of program processing, and is also called a process or a thread. The task causes the bus master corresponding to the data transfer request to execute the data transfer request in the task. When a task makes a data transfer request to the bus master, it calls and executes an API (Application Program Interface) for data transfer. At this time, the task sets a data transfer source address, a transfer destination address, and the like as arguments to the data transfer request API.

このタスクは,各バスマスタに対して順次または同時にデータ転送要求を実行することができる。このデータ転送要求を受けた各バスマスタは,それが接続されるバスのアービタに対してバスの使用要求を行う。このバスのバスアービタは,複数のバスマスタから同時にバスの使用要求を受け付けると,このバスの使用要求を仲裁する。   This task can execute a data transfer request to each bus master sequentially or simultaneously. Each bus master that has received this data transfer request issues a bus use request to the arbiter of the bus to which it is connected. When the bus arbiter of this bus receives bus use requests simultaneously from a plurality of bus masters, the bus arbiter arbitrates the bus use requests.

仲裁方法としては,例えば,所定のサイクル時間が経過する度に,バスマスタ毎に定められた優先度(優先順位とも言う)に従って,バスの使用権を各バスマスタに渡す方法がある。バスアービタからバスの使用権を受け取った第1のバスマスタは,所定のサイクル時間の間,バスを使用してデータ転送を実行する。そして,このサイクル時間が経過すると,バスアービタは,この使用権を優先度が低い第2のバスマスタに渡す。この使用権を失った第1のバスマスタは,データ転送を一時停止する。そして,第1のバスマスタが,バスアービタから再度バスの使用権を受け取ると,データ転送を再開する。第1,第2のバスマスタは,データ転送が完了するまで,この処理を繰り返す。   As an arbitration method, for example, every time a predetermined cycle time elapses, a right to use the bus is given to each bus master according to a priority (also referred to as priority) determined for each bus master. The first bus master that has received the bus use right from the bus arbiter executes data transfer using the bus for a predetermined cycle time. When this cycle time elapses, the bus arbiter passes this usage right to the second bus master having a low priority. The first bus master that has lost this right to use suspends data transfer. When the first bus master receives the right to use the bus again from the bus arbiter, the data transfer is resumed. The first and second bus masters repeat this process until the data transfer is completed.

例えば,5つのバスマスタBM1〜BM5がバスに接続され,バスマスタBM1〜BM5に優先度として,それぞれ優先度1〜5(優先度の数字が大きいほど優先度が高い)がバスアービタにより設定されているとする。   For example, five bus masters BM1 to BM5 are connected to the bus, and priority 1 to 5 (the higher the priority number, the higher the priority) is set by the bus arbiter as the priority for the bus masters BM1 to BM5. To do.

バスマスタBM1〜BM5が,バスに対して同時にバスの使用を要求すると,バスアービタは,例えば数十サイクルから数千サイクル程度のサイクル時間が経過する度に,バスの使用権を優先度に従ってバスマスタBM5…BM1,BM5…BM1,…のように,バスマスタBM5〜BM1に順次渡す処理を繰り返す。すなわち,バスアービタは,時分割でバス使用権の割り当てを行う。バスアービタからバスの使用権を受け取ったバスマスタは,前記サイクル時間の間,データ転送を実行する。   When the bus masters BM1 to BM5 request the bus to use the bus at the same time, the bus arbiter gives the bus master BM5 ... BM1, BM5 ... Repeat the process of sequentially passing to the bus masters BM5 to BM1 like BM1, ... That is, the bus arbiter assigns the bus use right in a time division manner. The bus master that has received the right to use the bus from the bus arbiter executes data transfer during the cycle time.

特開平10−40211号公報Japanese Patent Laid-Open No. 10-40211 特開2007−109086号公報JP 2007-109086 A

このように,バスアービタがバス使用要求の仲裁を行うと,複数のバスマスタの中のあるバスマスタは前記した所定サイクル時間しかバスを継続使用(占有使用)することができない。そのため,所定時間内に終了しなければならないデータ転送,すなわち時間的要求が厳しいデータ転送を所定時間内に完了することが困難になることがある。   As described above, when the bus arbiter arbitrates bus use requests, a bus master among a plurality of bus masters can continue to use (occupy) the bus only for the predetermined cycle time. Therefore, it may be difficult to complete within a predetermined time a data transfer that must be completed within a predetermined time, that is, a data transfer with strict time requirements.

また,例えばバスB1,バスB2にバスB3が接続し,バスB3にバスB4が接続している多段構成のバスを有するデータ転送システムにおいて,バスB1に複数チャネルの第1のDMAC(Direct Memory Access Controller)が接続され,同じくバスB2に第2のDMACが接続され,第1のDMACの複数チャネルと第2のDMACの複数チャネルとが同時に,バスB4に接続されているメモリにアクセスしてデータ転送を行う場合を想定する。なお,この場合,バスB3に対してバスB1またはバスB2がバスマスタとして機能することになる。   For example, in a data transfer system having a multi-stage bus in which a bus B3 is connected to the bus B1 and the bus B2, and a bus B4 is connected to the bus B3, a first DMAC (Direct Memory Access) having a plurality of channels is connected to the bus B1. Controller), the second DMAC is also connected to the bus B2, and the multiple channels of the first DMAC and the multiple channels of the second DMAC access the memory connected to the bus B4 and access the data simultaneously. Assume that transfer is performed. In this case, the bus B1 or the bus B2 functions as a bus master for the bus B3.

このとき,バスB1のアービタは,第1のDMACからのバス使用要求を仲裁し,バスB2のアービタは,第2のDMACからのバス使用要求を仲裁し,さらに,バスB3のアービタは,バスB1,B2からのバス使用要求を仲裁する。このようバスアービタは,ばらばらにバスの使用要求を仲裁する。   At this time, the arbiter of bus B1 arbitrates the bus use request from the first DMAC, the arbiter of bus B2 arbitrates the bus use request from the second DMAC, and the arbiter of bus B3 Arbitrates bus use requests from B1 and B2. In this way, the bus arbiter arbitrates requests to use the bus.

そのため,例えば第1のDMACが,データ転送を実行する場合,バスB1,B3,B4のバス使用権を同時に獲得しなければならず,一揆通貫でバス使用権を獲得できる確率が,1段のバス構成に比べて低くなる。   For this reason, for example, when the first DMAC performs data transfer, the bus usage right for buses B1, B3, and B4 must be acquired at the same time. It becomes lower than the bus configuration.

従って,第1のDMACが,時間的要求が厳しいデータ転送を実行しなければならない場合,効率的にデータ転送を実行して,時間的要求を満たすデータ転送要求を確実に実行することがより困難になる。   Therefore, when the first DMAC has to perform data transfer with strict time requirements, it is more difficult to execute data transfer efficiently and reliably execute data transfer requests that satisfy the time requirements. become.

そこで,本発明の目的は,効率的にデータ転送を実行するデータ転送システム,データ転送スケジューリングプログラムを提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a data transfer system and a data transfer scheduling program that efficiently execute data transfer.

データ転送システムの第1の側面は、バスと,前記バスに接続されたCPUと,前記バスに接続され,前記バスを介したデータ転送を実行する複数のバスマスタと,前記バスマスタからのバス使用要求を仲裁して何れかのバスマスタにバス使用権を与えるバスアービタと,前記複数のバスマスタを制御するバスマスタドライバ手段と,前記CPUによって実行されるタスクが生成したデータ転送要求を受け付け,前記受け付けた前記データ転送要求の中で,最も優先度が高いデータ転送要求を選択し,当該選択したデータ転送要求の実行を前記バスマスタドライバ手段に命令するスケジューリング手段とを有し,前記バスマスタドライバ手段は,前記命令に応答して,前記選択したデータ転送要求に対応するバスマスタに前記選択したデータ転送要求を実行させ,前記複数のバスマスタの何れかは,前記タスクが生成したデータ転送要求を,前記スケジューリング手段を介さずに実行し,前記スケジューリング手段は,受け付け中のデータ転送要求を実行するバスマスタのバス使用可能時間を当該データ転送要求のデータ転送量に基づき,当該データ転送要求を実行しないバスマスタのバス使用可能時間よりも長く算出し,前記バスアービタは,前記バス使用可能時間がより長いバスマスタに優先的にバス使用権を与えるA first aspect of the data transfer system includes a bus, a CPU connected to the bus, a plurality of bus masters connected to the bus and executing data transfer via the bus, and a bus use request from the bus master. A bus arbiter that grants a bus use right to any one of the bus masters, a bus master driver means that controls the plurality of bus masters, a data transfer request generated by a task executed by the CPU, and the received data Selecting a data transfer request having the highest priority from among the transfer requests, and scheduling means for instructing the bus master driver means to execute the selected data transfer request, wherein the bus master driver means In response, the selected data transfer request is sent to the bus master corresponding to the selected data transfer request. Is executed, said one of the plurality of bus masters, a data transfer request to the task is generated, executed without passing through the scheduling means, the scheduling means, bus bus master performs data transfer request accepting Based on the data transfer amount of the data transfer request, the available time is calculated to be longer than the bus usable time of the bus master that does not execute the data transfer request, and the bus arbiter gives priority to the bus master with the longer bus usable time. Gives bus use rights .

第1の側面によれば,バスと複数のバスマスタとを有するデータ転送システムにおいて,効率的にデータ転送を実行し,時間的要求が厳しいデータ転送を確実に実行することができる。   According to the first aspect, in a data transfer system having a bus and a plurality of bus masters, it is possible to efficiently execute data transfer and reliably execute data transfer with strict time requirements.

第1の実施の形態を説明する機能ブロック図である。FIG. 3 is a functional block diagram illustrating a first embodiment. 第1の実施の形態のハードウェアの機能ブロック図である。FIG. 2 is a functional block diagram of hardware according to the first embodiment. 第1の実施の形態のソフトウェアの機能ブロック図である。FIG. 3 is a functional block diagram of software according to the first embodiment. データ転送要求の内容を示す図である。It is a figure which shows the content of the data transfer request. データ転送要求の実行開始を説明する第1のフロー図である。FIG. 6 is a first flowchart for explaining the start of execution of a data transfer request. データ転送要求の実行開始を説明する第2のフロー図である。FIG. 10 is a second flowchart for explaining the start of execution of a data transfer request. データ転送要求の実行開始を説明する第3のフロー図である。FIG. 10 is a third flowchart for explaining the start of execution of a data transfer request. データ転送完了時に実行する処理を説明する第1のフロー図である。FIG. 6 is a first flowchart illustrating a process executed when data transfer is completed. データ転送完了時に実行する処理を説明する第2のフロー図である。FIG. 10 is a second flowchart for explaining processing executed when data transfer is completed. データ転送要求の一時停止を説明する第1のフロー図である。FIG. 6 is a first flowchart illustrating suspension of a data transfer request. データ転送要求の一時停止を説明する第2のフロー図である。FIG. 10 is a second flowchart for explaining a suspension of a data transfer request. データ転送要求の一時停止を説明する第3のフロー図である。FIG. 10 is a third flowchart for explaining a temporary suspension of a data transfer request. 一時停止したデータ転送要求の再開を説明する第1のフロー図である。FIG. 5 is a first flowchart for explaining resumption of a temporarily stopped data transfer request. 一時停止したデータ転送要求の再開を説明する第2のフロー図である。FIG. 10 is a second flowchart for explaining the resumption of a temporarily stopped data transfer request. 一時停止したデータ転送要求の再開を説明する第3のフロー図である。FIG. 10 is a third flowchart for explaining resumption of a temporarily stopped data transfer request. データ転送要求の強制終了を説明する第1のフロー図である。FIG. 6 is a first flowchart for explaining forced termination of a data transfer request. データ転送要求の強制終了を説明する第2のフロー図である。FIG. 10 is a second flowchart illustrating forced termination of a data transfer request. データ転送要求の強制終了を説明する第3のフロー図である。FIG. 10 is a third flowchart illustrating forced termination of a data transfer request. 第2の実施の形態のハードウェアの機能ブロック図である。FIG. 6 is a functional block diagram of hardware according to a second embodiment. 第2の実施の形態のソフトウェアの機能ブロック図である。FIG. 6 is a functional block diagram of software according to a second embodiment. 第3の実施の形態のハードウェアの機能ブロック図である。FIG. 10 is a functional block diagram of hardware according to a third embodiment. 第3の実施の形態のソフトウェアの機能ブロック図である。FIG. 10 is a functional block diagram of software of a third embodiment. バスアービタ制御部,バスアービタドライバ群の機能ブロック図である。It is a functional block diagram of a bus arbiter control unit and a bus arbiter driver group. バスアービタの機能ブロック図である。It is a functional block diagram of a bus arbiter. 第4の実施形態のソフトウェアの機能ブロック図である。FIG. 10 is a functional block diagram of software according to a fourth embodiment. PIOデータ転送要求の実行開始を説明する第1のフロー図である。FIG. 6 is a first flowchart for explaining the start of execution of a PIO data transfer request. PIOデータ転送要求の実行開始を説明する第2のフロー図である。FIG. 10 is a second flowchart for explaining the start of execution of a PIO data transfer request. PIOデータ転送要求の実行開始を説明する第3のフロー図である。FIG. 10 is a third flowchart for explaining the start of execution of a PIO data transfer request. PIOデータ転送完了時に実行する処理を説明する第1のフロー図である。FIG. 6 is a first flowchart for explaining processing executed when PIO data transfer is completed. PIOデータ転送完了時に実行する処理を説明する第2のフロー図である。FIG. 10 is a second flowchart illustrating a process executed when PIO data transfer is completed.

(第1の実施の形態)
図1は,第1の実施の形態を説明する機能ブロック図である。データ転送システム1は,ハードウェア構成要素を有するハードウェア10と,ハードウェア10のCPU12において実行されるソフトウェア20とを有する。
(First embodiment)
FIG. 1 is a functional block diagram for explaining the first embodiment. The data transfer system 1 includes hardware 10 having hardware components and software 20 executed by the CPU 12 of the hardware 10.

ハードウェア10は,内部バスマスタであるDMA転送処理を実行する内部バスマスタ(複数チャネルのDMAC)11と,CPU12と,割り込みコントローラ(IRC:Interrupt Request Controller)として機能するIRC13と,例えばRAM,ROMから構成されるメモリ14と,外部バスマスタ15と,これら各ハードウェアを相互に接続するバス16を有する。バス16は,DMAC11や外部バスマスタ15に設定された優先度に従ってバスマスタ毎のバス使用要求を仲裁するバスアービタ16aを有する。DMAC11は,複数チャネルのDMACを有し,複数のバスマスタとして機能する。バスアービタ16aは,この複数のバスマスタからのバス使用要求に対して,例えば,この複数のバスマスタに設定された優先度に従って,時分割でバス使用権の割り当てを行う。   The hardware 10 comprises an internal bus master (multi-channel DMAC) 11 that executes DMA transfer processing, which is an internal bus master, a CPU 12, an IRC 13 that functions as an interrupt controller (IRC: Interrupt Request Controller), and RAM and ROM, for example. And a bus 16 for connecting these hardware components to each other. The bus 16 includes a bus arbiter 16a that arbitrates a bus use request for each bus master according to the priority set in the DMAC 11 or the external bus master 15. The DMAC 11 has a multi-channel DMAC and functions as a plurality of bus masters. In response to the bus use requests from the plurality of bus masters, the bus arbiter 16a assigns bus use rights in a time division manner, for example, according to the priority set for the plurality of bus masters.

ソフトウェア20は,CPU12によって実行されるタスク21と,タスク21が生成したデータ転送要求を受け付け,受け付けたデータ転送要求の中で,最も優先度が高いデータ転送要求を選択し,選択したデータ転送要求の実行をバスマスタドライバ手段に命令するスケジューリング手段22と,いわゆるオペレーティングシステムOS(Operating System)23と,バスマスタ(例えばDMAC11)を制御するバスマスタドライバ手段24とを有する。バスマスタドライバ手段24は,スケジューリング手段22からの命令に応答して,スケジューリング手段22が選択したデータ転送要求に対応するバスマスタにこのデータ転送要求を実行させる。バスマスタドライバ手段24は,命令に応答して,前記の選択したデータ転送要求に対応するバスマスタに前記の選択したデータ転送要求を実行させる。   The software 20 accepts the task 21 executed by the CPU 12 and the data transfer request generated by the task 21, selects the data transfer request with the highest priority among the accepted data transfer requests, and selects the selected data transfer request. Scheduling means 22 for instructing the bus master driver means to execute, so-called operating system OS (Operating System) 23, and bus master driver means 24 for controlling the bus master (for example, DMAC 11). In response to an instruction from the scheduling means 22, the bus master driver means 24 causes the bus master corresponding to the data transfer request selected by the scheduling means 22 to execute this data transfer request. In response to the instruction, the bus master driver means 24 causes the bus master corresponding to the selected data transfer request to execute the selected data transfer request.

また,スケジューリング手段22は,選択したデータ転送要求がバスマスタにより実行されている間に,タスク21により新たに生成されたデータ転送要求を受け付けると,受け付けたデータ転送要求の優先度が,実行されているデータ転送要求の優先度よりも高い場合に,実行されているデータ転送要求の一時停止をバスマスタドライバ手段24に命令すると共に,新たに生成されたデータ転送要求の実行をバスマスタドライバ手段24に命令する。そして,バスマスタドライバ手段24は,命令に応答して,実行されているデータ転送要求の一時停止をバスマスタに実行させ,新たに生成されたデータ転送要求に対応するバスマスタにデータ転送要求を実行させる。   Further, when the scheduling unit 22 receives a data transfer request newly generated by the task 21 while the selected data transfer request is being executed by the bus master, the priority of the received data transfer request is executed. If the priority is higher than the priority of the data transfer request, the bus master driver means 24 is instructed to temporarily stop the data transfer request being executed, and the bus master driver means 24 is instructed to execute the newly generated data transfer request. To do. In response to the instruction, the bus master driver means 24 causes the bus master to temporarily stop the data transfer request being executed, and causes the bus master corresponding to the newly generated data transfer request to execute the data transfer request.

そして,スケジューリング手段22は,新たに生成されたデータ転送要求の実行が完了したこと示す完了通知をOS23から受け付けると,完了通知に応答して,一時停止していたデータ転送要求の再開をバスマスタドライバ手段24に命令する。   When the scheduling unit 22 receives a completion notification indicating that execution of the newly generated data transfer request is completed from the OS 23, the scheduling unit 22 responds to the completion notification to resume the suspended data transfer request. Command means 24.

以下に,このようなデータ転送要求のスケジューリングを実行するデータ転送システム1の詳細について説明する。   Details of the data transfer system 1 that executes scheduling of such data transfer requests will be described below.

図2は,ハードウェア10の機能ブロック図である。DMAC11は,DMA転送を実行する複数チャネルのDMACch0_110〜DMACch7_117と,DMACch0_110〜DMACch7_117とが接続するDMACバス113と,DMACch0_110〜DMACch7_117からのバス使用要求を仲裁するDMACバスアービタ114とを有する。なお,チャネル数は例示である。   FIG. 2 is a functional block diagram of the hardware 10. The DMAC 11 includes a plurality of channels DMACch0_110 to DMACch7_117 that execute DMA transfer, a DMAC bus 113 to which the DMACch0_110 to DMACch7_117 are connected, and a DMAC bus arbiter 114 that arbitrates bus use requests from the DMACch0_110 to DMACch7_117. The number of channels is an example.

CPU12は,ソフトウェア20を実行するCPUである。    The CPU 12 is a CPU that executes the software 20.

バス1A_161Aは,DMAC11とバス2A_162Aとバス2B_162Bに接続するバスであり,バス1Aアービタ161aを有する。バス2A_162Aは,バス1A_161Aとバス1B_161Bと外部バスI/O163に接続するバスであり,バス2Aアービタ162aを有する。外部バスI/O163は,バス2A_162Aと外部バス166に接続するバスであり,外部バスアービタ163aを有する。   The bus 1A_161A is a bus connected to the DMAC 11, the bus 2A_162A, and the bus 2B_162B, and includes a bus 1A arbiter 161a. The bus 2A_162A is a bus connected to the bus 1A_161A, the bus 1B_161B, and the external bus I / O 163, and includes a bus 2A arbiter 162a. The external bus I / O 163 is a bus connected to the bus 2A_162A and the external bus 166, and includes an external bus arbiter 163a.

バス1B_161Bは,CPU12とバス2A_162Aとバス2B_162Bとバス2C_162Cに接続するバスであり,バス1Bアービタ161bを有する。バス2B_162Bは,バス1A_161Aとバス1B_161BとメモリIF164に接続するバスであり,バス2Bアービタ162bを有する。メモリIF164は,バス2B_162Bとメモリバス165に接続するメモリIF(InterFace)である。メモリバス165は,メモリIF164とメモリ14とに接続する。バス2C_162Cは,バス1B_161BとIRC13とに接続するバスである。   The bus 1B_161B is a bus connected to the CPU 12, the bus 2A_162A, the bus 2B_162B, and the bus 2C_162C, and includes a bus 1B arbiter 161b. The bus 2B_162B is a bus connected to the bus 1A_161A, the bus 1B_161B, and the memory IF 164, and includes a bus 2B arbiter 162b. The memory IF 164 is a memory IF (InterFace) connected to the bus 2B_162B and the memory bus 165. The memory bus 165 is connected to the memory IF 164 and the memory 14. The bus 2C_162C is a bus connected to the bus 1B_161B and the IRC13.

外部バス166は,外部バスI/O163と外部バスマスタ151と外部スレーブデバイス152とに接続する。外部バスマスタ151と外部スレーブデバイス152は,後述するようにユーザによって新たに追加されたデバイスである。以上説明したように,ハードウェア10は,複数のバスが多段に接続されたバス構造を有する。これらのバス,バスアービタが,図1のバス16,バスアービタ16aに対応する。   The external bus 166 is connected to the external bus I / O 163, the external bus master 151, and the external slave device 152. The external bus master 151 and the external slave device 152 are devices newly added by the user as will be described later. As described above, the hardware 10 has a bus structure in which a plurality of buses are connected in multiple stages. These buses and bus arbiters correspond to the bus 16 and bus arbiter 16a in FIG.

IRC13は,DMAC11からデータ転送完了通知を受け取ると,CPU12に対して転送完了割り込みを行い,データ転送が完了したことを通知する。   When the IRC 13 receives the data transfer completion notification from the DMAC 11, the IRC 13 issues a transfer completion interrupt to the CPU 12 to notify the completion of the data transfer.

図3は,ソフトウェア20の詳細機能ブロック図である。スケジューリング手段22の要求発生受け付け手段221は,タスク21が生成したデータ転送要求,データ転送一時停止要求,データ転送再開要求,データ転送強制終了要求を受け付ける。要求完了通知受け付け手段222は,バスマスタドライバ手段24からの転送完了通知を受け付ける。要求管理手段223は,要求発生受け付け手段221が受け付けたデータ転送要求を管理する。優先度付きスケジューラ224は,データ転送要求の優先度を有するデータ転送要求を,この優先度に基づきスケジューリングする。   FIG. 3 is a detailed functional block diagram of the software 20. The request generation accepting means 221 of the scheduling means 22 accepts the data transfer request, data transfer pause request, data transfer resume request, and data transfer forced termination request generated by the task 21. The request completion notification receiving unit 222 receives a transfer completion notification from the bus master driver unit 24. The request management unit 223 manages the data transfer request received by the request generation receiving unit 221. The scheduler with priority 224 schedules a data transfer request having the priority of the data transfer request based on this priority.

バス/転送制御手段225は,データ転送要求の実行開始,一時停止,再開,強制終了を実行するように,バスマスタドライバ制御手段226に命令する。バスマスタドライバ制御手段226は,バス/転送制御手段225の命令に応答し,バスマスタドライバ手段24を制御する。バスマスタドライバ手段24は,バスマスタ,すなわち図2の例では,DMAC11を制御するドライバである。バスマスタドライバ手段24は,さらにOS23からの完了割り込み通知を受け付ける完了割り込み受け付け手段241を有する。   The bus / transfer control means 225 instructs the bus master driver control means 226 to execute execution, temporary suspension, resumption, and forced termination of the data transfer request. The bus master driver control means 226 controls the bus master driver means 24 in response to a command from the bus / transfer control means 225. The bus master driver means 24 is a bus master, that is, a driver that controls the DMAC 11 in the example of FIG. The bus master driver unit 24 further includes a completion interrupt reception unit 241 that receives a completion interrupt notification from the OS 23.

OS23は,タスク21,スケジューリング手段22の制御を実行する。メモリ14は,要求発生受け付け手段221が受け付けたデータ転送要求を,後述するデータ転送要求の識別子とステータスフラグと共に格納する要求格納部141と,FIFO機能を有し,データ転送要求を優先度に従ってキュー内で管理する優先度別要求キュー142とを有する。   The OS 23 controls the task 21 and the scheduling means 22. The memory 14 has a request storage unit 141 for storing a data transfer request received by the request generation receiving means 221 together with a data transfer request identifier and a status flag, which will be described later, and a FIFO function. The data transfer request is queued according to priority. And a priority-specific request queue 142 that is managed in the network.

ソフトウェア20は,プログラム格納用メモリ(図示しない)に格納されたプログラムから構成される。このプログラムの中で,スケジューリング手段22に対応するプログラムをデータ転送スケジューリングプログラムとする。CPU12は,必要に応じてこのプログラムをこのメモリから読み出し実行する。なお,このプログラムを,メモリ14に格納してもよい。   The software 20 is composed of a program stored in a program storage memory (not shown). Among these programs, a program corresponding to the scheduling means 22 is a data transfer scheduling program. The CPU 12 reads this program from this memory and executes it as necessary. Note that this program may be stored in the memory 14.

図4は,データ転送要求の内容を示す図である。データ転送要求は,図4に示すデータ転送情報を含む。データ転送要求の種類は,データ転送要求を実行させるバスマスタを特定するために参照されるものであり,DMAC11にデータ転送を実行させることを示す内部DMAC転送,外部バスマスタ151にデータ転送を実行させることを示す外部DMAC転送,CPU12にデータ転送を実行させることを示すCPUのPIO(Programmed I/O)転送などデータ転送要求の種類を示す。このデータ転送要求の種類を参照して,スケジューリング手段22は,優先度が最も高いデータ転送要求に対応するバスマスタにこのデータ転送要求を実行させる。第1の実施の形態では内部DMAC転送について説明する。外部DMAC転送については第2の実施の形態で説明し,CPUのPIO転送については第4の実施の形態で説明する。   FIG. 4 shows the contents of the data transfer request. The data transfer request includes the data transfer information shown in FIG. The type of data transfer request is referred to in order to identify the bus master that executes the data transfer request. The internal DMAC transfer indicates that the DMAC 11 executes the data transfer, and the external bus master 151 executes the data transfer. Indicates the type of data transfer request, such as external DMAC transfer indicating CPU and PIO (Programmed I / O) transfer of the CPU indicating that the CPU 12 is to execute data transfer. With reference to the type of data transfer request, the scheduling means 22 causes the bus master corresponding to the data transfer request with the highest priority to execute this data transfer request. In the first embodiment, internal DMAC transfer will be described. External DMAC transfer will be described in the second embodiment, and CPU PIO transfer will be described in the fourth embodiment.

データ転送要求の優先度は,複数のデータ転送要求がある場合に,どのデータ転送要求を優先的に実行させるかを示す実行優先度を示し,例えば優先度1〜5が記録され,数値が大きいほど優先度が高い。データ転送元は,データ転送元アドレスを示し,データ転送先はデータ転送先アドレスを示し,データ転送サイズ(データ転送量)は転送する全データのサイズを示す。転送単位のデータサイズは,1回のアクセスでデータ転送されるデータサイズを示す。転送方法は,データの転送先,転送元のアドレスをインクリメントする,デクリメントする,固定するなどの転送方法を示す。   The priority of the data transfer request indicates the execution priority indicating which data transfer request is to be executed preferentially when there are multiple data transfer requests. For example, priority 1 to 5 is recorded and the numerical value is large. The higher the priority. The data transfer source indicates a data transfer source address, the data transfer destination indicates a data transfer destination address, and the data transfer size (data transfer amount) indicates the size of all data to be transferred. The data size of the transfer unit indicates the data size that is transferred by one access. The transfer method indicates a transfer method of incrementing, decrementing, or fixing the data transfer destination and transfer source address.

次に,図5〜図9を参照しながら,本実施の形態におけるデータ転送を詳細に説明する。   Next, data transfer in the present embodiment will be described in detail with reference to FIGS.

図5A〜図5Cは,データ転送要求の実行開始を説明するフロー図である。   5A to 5C are flowcharts for explaining the start of execution of a data transfer request.

ステップS1:タスク21は,スケジューリング手段22にデータ転送要求の実行命令を行うデータ転送要求APIを呼び出す。このとき,図4で説明したデータ転送要求がタスク21により生成され,データ転送要求APIに引数として設定される。その結果,データ転送要求がスケジューリング手段22に入力される。引数として設定するデータ転送要求のデータ転送要求の種類には「内部DMAC転送」が記録される。   Step S1: The task 21 calls the data transfer request API for instructing the scheduling means 22 to execute a data transfer request. At this time, the data transfer request described in FIG. 4 is generated by the task 21 and set as an argument in the data transfer request API. As a result, a data transfer request is input to the scheduling means 22. “Internal DMAC transfer” is recorded as the data transfer request type of the data transfer request set as an argument.

ステップS2:スケジューリング手段22の要求発生受け付け手段221は,このデータ転送要求を受け付け,データ転送要求を識別する識別子をこのデータ転送要求に割り当てる。この識別子は,スケジューリング手段22がデータ転送要求を管理するために利用される。また,この識別子は,タスク21により呼び出されたデータ転送要求APIの戻り値として,タスク21に入力される。   Step S2: The request generation accepting means 221 of the scheduling means 22 accepts this data transfer request and assigns an identifier for identifying the data transfer request to this data transfer request. This identifier is used by the scheduling means 22 to manage the data transfer request. This identifier is input to the task 21 as a return value of the data transfer request API called by the task 21.

ステップS3:要求発生受け付け手段221は,受け付けたデータ転送要求を要求格納部141に格納するように要求管理手段223に命令する。   Step S3: The request generation acceptance unit 221 instructs the request management unit 223 to store the accepted data transfer request in the request storage unit 141.

ステップS4:要求管理手段223は,この命令に応答し,要求発生受け付け手段221から入力されたデータ転送要求とその識別子を要求格納部141に格納する。ここでは,要求管理手段223は,データ転送要求に要求発生受け付け手段221により割り当てられた識別子とステータスフラグとを含め格納する。ステータスフラグには,データ転送要求の状態が記録され,この状態として例えば実行待機中,転送実行中,割り込みによる一時停止中,タスクによる一時停止中がある。ここでは,要求管理手段223は,ステータスフラグに実行待機中を記録する。   Step S4: In response to this command, the request management means 223 stores the data transfer request and its identifier input from the request generation acceptance means 221 in the request storage unit 141. Here, the request management means 223 stores the data transfer request including the identifier assigned by the request generation accepting means 221 and the status flag. In the status flag, the status of the data transfer request is recorded. Examples of the status include waiting for execution, executing transfer, pausing due to an interrupt, and pausing due to a task. Here, the request management means 223 records the waiting for execution in the status flag.

ステップS5:要求管理手段223は,優先度を指定して,データ転送要求の識別子を優先度別要求キュー142の最後部に登録するように優先度付きスケジューラ224に命令する。同時に,要求管理手段223は,データ転送要求の識別子とこの優先度を優先度付きスケジューラ224に出力する。   Step S5: The request management means 223 instructs the scheduler 224 with priority to specify the priority and register the identifier of the data transfer request in the last part of the request queue 142 by priority. At the same time, the request management unit 223 outputs the identifier of the data transfer request and this priority to the scheduler 224 with priority.

ステップS6:優先度付きスケジューラ224は,入力されたデータ転送要求の識別子を優先度別要求キュー142のリストの最後部に登録する。同時に,優先度付きスケジューラ224は,登録したデータ転送要求の識別子に対応してこの優先度も登録する。なお,この登録前において,優先度別要求キュー142に識別子が登録されている場合,最も優先度の高いデータ転送要求の識別子に対応するデータ転送要求が,実行中のデータ転送要求となる。なお,優先度が最も高いデータ転送要求の識別子が複数ある場合,優先度別要求キュー142に最初に登録された(優先度別要求キュー142の先頭部分に最も近い)データ転送要求の識別子に対応するデータ転送要求が,実行中のデータ転送要求であるとする。   Step S6: The scheduler with priority 224 registers the input data transfer request identifier in the last part of the list of the request queue by priority 142. At the same time, the scheduler with priority 224 also registers this priority corresponding to the identifier of the registered data transfer request. If an identifier is registered in the priority-specific request queue 142 before this registration, the data transfer request corresponding to the identifier of the data transfer request with the highest priority is the data transfer request being executed. If there are multiple identifiers of the data transfer request with the highest priority, it corresponds to the identifier of the data transfer request registered first in the request queue by priority 142 (closest to the head of the request queue by priority 142). Assume that the data transfer request to be executed is a data transfer request being executed.

ステップS7:優先度付きスケジューラ224は,優先度別要求キュー142に登録されたデータ転送要求の中で,最も優先度の高いデータ転送要求の識別子を選択(検索)する。優先度が最も高いデータ転送要求の識別子が複数ある場合,優先度別要求キュー142に最初に登録されたデータ転送要求の識別子を選択する。以下,同様である。   Step S7: The scheduler with priority 224 selects (searches) the identifier of the data transfer request with the highest priority among the data transfer requests registered in the priority-specific request queue 142. When there are a plurality of identifiers of data transfer requests with the highest priority, the identifier of the data transfer request registered first in the request queue by priority 142 is selected. The same applies hereinafter.

ステップS8:優先度付きスケジューラ224は,新たに,データ転送要求の識別子が優先度別要求キュー142に登録されたことにより,最も優先度が高いデータ転送要求の識別子が,実行中のデータ転送要求の識別子と変わっていないかを確認する。ここでは,優先度付きスケジューラ224は,ステップS7で選択した最も高い優先度のデータ転送要求の識別子が,新たに登録された識別子か否かを確認する。   Step S8: The priority-attached scheduler 224 newly registers the data transfer request identifier in the priority-specific request queue 142, so that the identifier of the data transfer request with the highest priority is the data transfer request being executed. Check if the identifier has changed. Here, the scheduler with priority 224 confirms whether or not the identifier of the data transfer request with the highest priority selected in step S7 is a newly registered identifier.

例えば,優先度3のデータ転送要求が実行されている間に,優先度5のデータ転送要求(識別子)がステップS6で登録された場合,最も優先度が高いデータ転送要求が,実行中のデータ転送要求の識別子と変わっていると判断する。一方,優先度5のデータ転送要求が実行されている間に,優先度3のデータ転送要求がステップS6で登録された場合,最も優先度が高いデータ転送要求が,実行中のデータ転送要求の識別子と変わっていないと判断する。   For example, if a data transfer request (identifier) with priority 5 is registered in step S6 while a data transfer request with priority 3 is being executed, the data transfer request with the highest priority is the data being executed. Judge that it is different from the identifier of the transfer request. On the other hand, if a data transfer request with priority 3 is registered in step S6 while a data transfer request with priority 5 is being executed, the data transfer request with the highest priority is the data transfer request being executed. Judge that it is not different from the identifier.

ステップS9:最も優先度が高いデータ転送要求が,実行中のデータ転送要求の識別子と変わっている場合(ステップS9/YES),ステップS10に移る。なお,優先度別要求キュー142が空の状態のときに,ステップS6で新たにデータ転送要求が優先度別要求キュー142に登録された場合も,ステップS10に移る。変わっていない場合(ステップS9/NO),処理を終了する。このとき,ステップS6で登録されたデータ転送要求は,後述する図6BのステップS27以下で実行されることになる。   Step S9: If the data transfer request with the highest priority is different from the identifier of the data transfer request being executed (step S9 / YES), the process proceeds to step S10. Even when a data transfer request is newly registered in the priority request queue 142 in step S6 when the priority request queue 142 is empty, the process proceeds to step S10. If not changed (step S9 / NO), the process is terminated. At this time, the data transfer request registered in step S6 is executed after step S27 in FIG. 6B described later.

ステップS10:優先度付きスケジューラ224は,最も優先度が高いデータ転送要求の識別子をバス/転送制御手段225に出力する。   Step S10: The scheduler with priority 224 outputs the identifier of the data transfer request with the highest priority to the bus / transfer control means 225.

ステップS11:バス/転送制御手段225は,最も優先度が高いデータ転送要求に基づいて,データ転送要求を実行するようにバスマスタドライバ制御手段226に命令する。このとき,バス/転送制御手段225は,最も優先度が高いデータ転送要求の識別子をバスマスタドライバ制御手段226に出力する。   Step S11: The bus / transfer control means 225 instructs the bus master driver control means 226 to execute the data transfer request based on the data transfer request with the highest priority. At this time, the bus / transfer control means 225 outputs the identifier of the data transfer request with the highest priority to the bus master driver control means 226.

ステップS12:バスマスタドライバ制御手段226は,実行中のデータ転送要求を一時停止して,最も優先度が高いデータ転送要求を実行するようにバスマスタドライバ手段24に命令する。なお,前述したように,優先度別要求キュー142が空の状態のときに,ステップS6で新たにデータ転送要求が優先度別要求キュー142に登録された場合は,この一時停止命令は実行しない。   Step S12: The bus master driver control means 226 instructs the bus master driver means 24 to temporarily stop the data transfer request being executed and execute the data transfer request with the highest priority. As described above, when the priority request queue 142 is empty, if a new data transfer request is registered in the priority request queue 142 in step S6, the pause instruction is not executed. .

ここでは,バスマスタドライバ制御手段226は,入力されたデータ転送要求の識別子を要求管理手段223に出力する。要求管理手段223は,入力された識別子に対応するデータ転送要求を要求格納部141から読み出し,バスマスタドライバ制御手段226に出力する。また,要求管理手段223は,データ転送要求をバスマスタドライバ制御手段226に出力すると,実行中のデータ転送要求のステータスフラグ(転送実行中が記録されている)を割り込みによる一時停止中に変更し,入力された識別子に対応するデータ転送要求のステータスフラグに転送実行中を記録する。   Here, the bus master driver control means 226 outputs the identifier of the input data transfer request to the request management means 223. The request management unit 223 reads a data transfer request corresponding to the input identifier from the request storage unit 141 and outputs it to the bus master driver control unit 226. Further, when the request management means 223 outputs the data transfer request to the bus master driver control means 226, the request management means 223 changes the status flag of the data transfer request being executed (recording that the transfer is being executed) to be suspended during the interruption, The transfer execution status is recorded in the status flag of the data transfer request corresponding to the input identifier.

すなわち,バスマスタドライバ制御手段226は,入力された識別子に対応するデータ転送要求を要求管理手段223を経由して要求格納部141から読み出す。バスマスタドライバ制御手段226は,読み出したデータ転送要求をバスマスタドライバ手段24に出力する。   That is, the bus master driver control unit 226 reads out a data transfer request corresponding to the input identifier from the request storage unit 141 via the request management unit 223. The bus master driver control means 226 outputs the read data transfer request to the bus master driver means 24.

バスマスタドライバ手段24は,バスマスタドライバ制御手段226からの一時停止命令に応答して,DMAC11が実行中のデータ転送要求を一時停止するようにOS23を介してDMAC11に命令する。DMAC11は,バスマスタドライバ手段24からの一時停止命令に応答して,実行中のデータ転送を一時停止する。   In response to the temporary stop command from the bus master driver control unit 226, the bus master driver unit 24 instructs the DMAC 11 via the OS 23 to temporarily stop the data transfer request being executed by the DMAC 11. In response to the pause command from the bus master driver means 24, the DMAC 11 temporarily stops the data transfer being executed.

そして,バスマスタドライバ手段24は,バスマスタドライバ制御手段226からのデータ転送実行命令に応答して,入力されたデータ転送要求をOS23を介してDMAC11に出力する。DMAC11は,入力されたデータ転送要求に基づいて,データ転送を実行する。   In response to the data transfer execution command from the bus master driver control unit 226, the bus master driver unit 24 outputs the input data transfer request to the DMAC 11 via the OS 23. The DMAC 11 performs data transfer based on the input data transfer request.

なお,ステップS2で説明した処理は,CPU12によって実行されるタスク21が生成したデータ転送要求を受け付ける工程の一例である。   The process described in step S2 is an example of a process of receiving a data transfer request generated by the task 21 executed by the CPU 12.

ステップS7で説明した処理は,スケジューリング手段22が,受け付けたデータ転送要求の中で,最も優先度が高いデータ転送要求を選択する工程の一例である。   The process described in step S7 is an example of a process in which the scheduling unit 22 selects a data transfer request with the highest priority among the received data transfer requests.

また,ステップS10以下で説明した処理は,スケジューリング手段22が,前記の選択したデータ転送要求の実行をバスマスタドライバ手段24に命令して,バスマスタドライバ手段24により,前記の選択したデータ転送要求に対応するバスマスタ(DMAC11)に選択したデータ転送要求を実行させる工程の一例である。   In the processing described in step S10 and subsequent steps, the scheduling unit 22 instructs the bus master driver unit 24 to execute the selected data transfer request, and the bus master driver unit 24 responds to the selected data transfer request. This is an example of a process for causing the bus master (DMAC 11) to execute the selected data transfer request.

ステップS7〜S10以下で説明した処理は,スケジューリング手段22が,前記の選択したデータ転送要求がバスマスタにより実行されている間に,タスク21により新たに生成されたデータ転送要求を受け付けると(ステップS2参照),受け付けたデータ転送要求の優先度が,実行されているデータ転送要求の優先度よりも高い場合に(ステップS9/YES),実行されているデータ転送要求を一時停止すると共に,新たに生成されたデータ転送要求の実行を,バスマスタドライバ手段24に命令する工程(ステップS12参照)と,スケジューリング手段22が,バスマスタドライバ手段24により,実行されているデータ転送要求の一時停止をバスマスタに実行させ,新たに生成されたデータ転送要求に対応するバスマスタにデータ転送要求を実行させる工程の一例である。   In the processing described in steps S7 to S10, when the scheduling unit 22 receives a data transfer request newly generated by the task 21 while the selected data transfer request is being executed by the bus master (step S2 If the priority of the accepted data transfer request is higher than the priority of the data transfer request being executed (step S9 / YES), the data transfer request being executed is suspended and A step of instructing the bus master driver means 24 to execute the generated data transfer request (see step S12), and the scheduling means 22 causes the bus master driver means 24 to temporarily stop the data transfer request being executed to the bus master. Example of the process of causing the bus master corresponding to the newly generated data transfer request to execute the data transfer request A.

このように,タスクが生成したデータ転送要求をスケジューリング手段22が一括して受け付けてスケジューリングする。そのため,バスアービタは,一つのバスマスタからのバス使用要求に応答し,このバスマスタにバス使用権を与えればよい。その結果,バスマスタは,データ転送経路となるバスの使用権を一揆通貫で獲得して,このバスを独占的に使用することができる。従って,時間的要求が厳しいデータ転送でも,所定時間内に完了することができる。   In this way, the data transfer request generated by the task is collectively received by the scheduling means 22 and scheduled. Therefore, the bus arbiter has only to give a bus use right to this bus master in response to a bus use request from one bus master. As a result, the bus master can use the bus exclusively by acquiring the right to use the data transfer path. Therefore, even data transfer with strict time requirements can be completed within a predetermined time.

例えば,実行対象となるデータ転送要求のデータ転送情報に,データ転送要求の種類として内部DMAC転送,データ転送元としてメモリ14のアドレス,データ転送先として外部スレーブデバイス152のアドレスが記録されていた場合,図5A〜図5Cの処理が実行され,DMAC11は入力されたデータ転送要求に基づきデータ転送を実行する。このとき,例えばDMACch0_110が,DMACバス113,バス1A_161A,バス2B_162B,メモリIF164,メモリバス165を経由してメモリ14にアクセスし,データを読み出し,メモリバス165,メモリIF164,バス2B_162B,バス1A_161A,バス2A_162A,外部バスI/O163,外部バス166を経由して,外部スレーブデバイス152に読み出したデータを書き込む処理を実行する。この読み出し,書き込み処理は,データ転送情報に記録されたデータ転送サイズ分のデータが外部スレーブデバイス152に書き込まれるまで実行される。   For example, when the data transfer information of the data transfer request to be executed records the internal DMAC transfer as the type of data transfer request, the address of the memory 14 as the data transfer source, and the address of the external slave device 152 as the data transfer destination 5A to 5C are executed, and the DMAC 11 performs data transfer based on the input data transfer request. At this time, for example, DMACch0_110 accesses the memory 14 via the DMAC bus 113, the bus 1A_161A, the bus 2B_162B, the memory IF164, and the memory bus 165, reads the data, the memory bus 165, the memory IF164, the bus 2B_162B, the bus 1A_161A, A process of writing the read data to the external slave device 152 via the bus 2A_162A, the external bus I / O 163, and the external bus 166 is executed. This read / write processing is executed until data of the data transfer size recorded in the data transfer information is written to the external slave device 152.

この実行時において, 本実施の形態によれば,DMACch0_110は,データ転送経路となるバスの使用権を一揆通貫で獲得して,このバスを独占的に使用することができる。   At this time, according to the present embodiment, the DMACch0_110 can acquire the right to use the bus serving as the data transfer path all at once and can use this bus exclusively.

図6A,図6Bは,データ転送完了時に実行する処理を説明するフロー図である。   6A and 6B are flowcharts for explaining processing executed when data transfer is completed.

ステップS21:バスマスタドライバ手段24は,OS23からのデータ転送完了通知を受け付け,要求完了通知受け付け手段222を起動する。具体的には,DMAC11が実行中のデータ転送を完了すると,DMAC11はIRC13にデータ転送が完了したこと通知する。IRC13は,DMAC11から転送完了通知を受け取ると,CPU12に対して転送完了割り込みを行い,データ転送が完了したことを通知する。CPU12は,転送完了割り込み通知を受け取ると,OS23の割り込みハンドラ231を介して転送完了通知をバスマスタドライバ手段24の完了割り込み受け付け手段241に出力する。完了割り込み受け付け手段241は,受信した転送完了通知を要求完了通知受け付け手段222に出力する。   Step S21: The bus master driver means 24 accepts the data transfer completion notification from the OS 23 and activates the request completion notice acceptance means 222. Specifically, when the DMAC 11 completes the data transfer being executed, the DMAC 11 notifies the IRC 13 that the data transfer has been completed. When receiving a transfer completion notification from the DMAC 11, the IRC 13 issues a transfer completion interrupt to the CPU 12 to notify the completion of the data transfer. Upon receiving the transfer completion interrupt notification, the CPU 12 outputs a transfer completion notification to the completion interrupt reception unit 241 of the bus master driver unit 24 via the interrupt handler 231 of the OS 23. The completion interrupt reception unit 241 outputs the received transfer completion notification to the request completion notification reception unit 222.

ステップS22:要求完了通知受け付け手段222は,転送完了通知を受け付ける。   Step S22: The request completion notification receiving means 222 receives a transfer completion notification.

ステップS23:要求完了通知受け付け手段222は,転送完了通知に対応するデータ転送要求を要求格納部141から削除するように要求管理手段223に命令する。   Step S23: The request completion notification accepting unit 222 instructs the request management unit 223 to delete the data transfer request corresponding to the transfer completion notification from the request storage unit 141.

ステップS24:要求管理手段223は,この命令に応答し,転送完了通知に対応するデータ転送要求を要求格納部141から削除する。すなわち,ステータスフラグに転送実行中が設定されているデータ転送要求を削除する。   Step S24: In response to this command, the request management means 223 deletes the data transfer request corresponding to the transfer completion notification from the request storage unit 141. That is, the data transfer request whose status flag is set to transfer in progress is deleted.

ステップS25:要求完了通知受け付け手段222は,転送完了通知に対応するデータ転送要求の識別子を優先度別要求キュー142から削除するように優先度付きスケジューラ224に命令する。   Step S25: The request completion notification accepting means 222 instructs the scheduler 224 with priority to delete the identifier of the data transfer request corresponding to the transfer completion notification from the priority-specific request queue 142.

ステップS26:優先度付きスケジューラ224は,転送完了通知に対応するデータ転送要求の識別子を優先度別要求キュー142から削除する。ここでは,例えば優先度が最も高いデータ転送要求の識別子を優先度別要求キュー142から削除すればよい。なお,優先度が最も高いデータ転送要求の識別子が複数ある場合,優先度別要求キュー142に最初に登録されたデータ転送要求の識別子を削除すればよい。   Step S26: The scheduler with priority 224 deletes the identifier of the data transfer request corresponding to the transfer completion notification from the request queue by priority 142. Here, for example, the identifier of the data transfer request with the highest priority may be deleted from the priority-specific request queue 142. If there are a plurality of identifiers of the data transfer request with the highest priority, the identifier of the data transfer request registered first in the priority-specific request queue 142 may be deleted.

ステップS27:優先度付きスケジューラ224は,この削除後,優先度別要求キュー142に登録されたデータ転送要求の識別子の中で,最も優先度の高いデータ転送要求の識別子を選択する。優先度が最も高いデータ転送要求の識別子が複数ある場合,優先度別要求キュー142に最初に登録されたデータ転送要求の識別子を選択する。なお,優先度別要求キュー142にデータ転送要求がない場合には,処理を終了する。   Step S27: After this deletion, the scheduler with priority 224 selects the identifier of the data transfer request with the highest priority among the identifiers of the data transfer request registered in the request queue by priority 142. When there are a plurality of identifiers of data transfer requests with the highest priority, the identifier of the data transfer request registered first in the request queue by priority 142 is selected. If there is no data transfer request in the priority request queue 142, the process is terminated.

ステップS28:優先度付きスケジューラ224は,最も優先度が高いデータ転送要求の識別子をバス/転送制御手段225に出力する。   Step S28: The scheduler with priority 224 outputs the identifier of the data transfer request with the highest priority to the bus / transfer control means 225.

ステップS29:バス/転送制御手段225は,最も優先度が高いデータ転送要求に基づいて,データ転送要求を実行するようにバスマスタドライバ制御手段226に命令する。このとき,最も優先度が高いデータ転送要求の識別子をバスマスタドライバ制御手段226に出力する。   Step S29: The bus / transfer control means 225 instructs the bus master driver control means 226 to execute the data transfer request based on the data transfer request with the highest priority. At this time, the identifier of the data transfer request with the highest priority is output to the bus master driver control means 226.

ステップS30:バスマスタドライバ制御手段226は,最も優先度が高いデータ転送要求を実行するようにバスマスタドライバ手段24に命令する。具体的には,ステップS12で説明したように,バスマスタドライバ制御手段226は,入力された識別子に対応するデータ転送要求を要求管理手段223を経由して要求格納部141から読み出す。バスマスタドライバ制御手段226は,読み出したデータ転送要求をバスマスタドライバ手段24に出力する。なお,要求管理手段223は,この識別子に対応するデータ転送要求のステータスフラグに転送実行中を記録する。   Step S30: The bus master driver control means 226 instructs the bus master driver means 24 to execute the data transfer request with the highest priority. Specifically, as described in step S12, the bus master driver control unit 226 reads a data transfer request corresponding to the input identifier from the request storage unit 141 via the request management unit 223. The bus master driver control means 226 outputs the read data transfer request to the bus master driver means 24. The request management unit 223 records the transfer in progress in the status flag of the data transfer request corresponding to this identifier.

バスマスタドライバ手段24は,バスマスタドライバ制御手段226からのデータ転送実行命令に応答して,入力されたデータ転送要求をOS23を介してDMAC11に出力する。DMAC11は,入力されたデータ転送要求に基づいて,データ転送を実行する。なお,バスマスタドライバ手段24は,入力されたデータ転送要求のステータスフラグに割り込みによる一時停止中または後述するタスクによる一時停止中が記録されている場合には,一時停止していたデータ転送を再開するように,DMAC11に命令する。   In response to the data transfer execution command from the bus master driver control unit 226, the bus master driver unit 24 outputs the input data transfer request to the DMAC 11 via the OS 23. The DMAC 11 performs data transfer based on the input data transfer request. The bus master driver means 24 resumes the suspended data transfer when the status flag of the input data transfer request indicates that the pause due to the interrupt or the pause due to the task described later is recorded. Instruct DMAC11 as follows:

本実施の形態では,タスク21は,データ転送要求の実行だけでなく,データ転送要求の一時停止,再開,データ転送要求の強制終了も実行することができる。   In the present embodiment, the task 21 can execute not only the data transfer request but also the temporary suspension and restart of the data transfer request and the forced termination of the data transfer request.

図7A〜図7Cは,データ転送要求の一時停止を説明するフロー図である。   FIG. 7A to FIG. 7C are flowcharts for explaining suspension of a data transfer request.

ステップS41:タスク21は,スケジューリング手段22にデータ転送要求の一時停止命令を行う一時停止要求APIを呼び出す。このとき,一時停止要求APIに引数として,図5AのステップS2で説明した一時停止するデータ転送要求の識別子を設定する。その結果,識別子を含む一時停止要求がスケジューリング手段22に入力される。   Step S41: The task 21 calls a pause request API for issuing a data transfer request pause instruction to the scheduling means 22. At this time, the identifier of the data transfer request to be paused described in step S2 of FIG. 5A is set as an argument to the pause request API. As a result, a temporary stop request including the identifier is input to the scheduling unit 22.

ステップS42:要求発生受け付け手段221は,この一時停止要求を受け付ける。すなわち,要求発生受け付け手段221は,タスク21からデータ転送要求の一時停止命令を受け付ける。   Step S42: The request generation accepting means 221 accepts this temporary stop request. That is, the request generation accepting means 221 accepts a data transfer request temporary stop command from the task 21.

ステップS43:要求発生受け付け手段221は,受け付けた一時停止要求に対応するデータ転送要求を要求格納部141から検索するように要求管理手段223に命令する。   Step S43: The request generation acceptance means 221 instructs the request management means 223 to search the request storage unit 141 for a data transfer request corresponding to the accepted suspension request.

ステップS44:要求管理手段223は,この命令に応答し,この一時停止要求に対応するデータ転送要求を要求格納部141から検索し,検索したデータ転送要求のステータスフラグにタスクによる一時停止中を記録する。この検索は,一時停止要求に対応するデータ転送要求の識別子をキーにして実行される。   Step S44: In response to this command, the request management means 223 searches the request storage unit 141 for a data transfer request corresponding to the temporary stop request, and records that the task is temporarily stopped in the status flag of the searched data transfer request. To do. This search is executed using the identifier of the data transfer request corresponding to the suspension request as a key.

ステップS45:要求発生受け付け手段221は,受け付けた一時停止要求に対応するデータ転送要求の識別子を優先度別要求キュー142から削除するように優先度付きスケジューラ224に命令する。   Step S45: The request generation accepting unit 221 instructs the scheduler 224 with priority to delete the identifier of the data transfer request corresponding to the accepted suspension request from the request queue 142 by priority.

ステップS46:優先度付きスケジューラ224は,一時停止要求に対応するデータ転送要求の識別子を優先度別要求キュー142から検索し,検索したデータ転送要求の識別子を削除する。すなわち,優先度付きスケジューラ224は,一時停止命令に応答し,データ転送要求のスケジューリングを一時停止する。   Step S46: The scheduler with priority 224 searches the priority-specific request queue 142 for the identifier of the data transfer request corresponding to the suspension request, and deletes the identifier of the searched data transfer request. That is, the priority-attached scheduler 224 suspends scheduling of the data transfer request in response to the pause command.

ステップS47:優先度付きスケジューラ224は,この削除後,優先度別要求キュー142に登録されたデータ転送要求の識別子の中で,最も優先度の高いデータ転送要求の識別子を選択する。   Step S47: After deletion, the scheduler 224 with priority selects the identifier of the data transfer request with the highest priority among the identifiers of the data transfer request registered in the request queue by priority 142.

ステップS48:優先度付きスケジューラ224は,この削除により,最も優先度が高いデータ転送要求の識別子が,実行中のデータ転送要求の識別子と変わっていないか,すなわち実行中のデータ転送要求の識別子を削除したのか(実行中のデータ転送要求を一時停止するのか)を確認する。   Step S48: The priority-attached scheduler 224 determines whether the identifier of the data transfer request with the highest priority has been changed from the identifier of the data transfer request being executed by this deletion, that is, the identifier of the data transfer request being executed. Check if it has been deleted (whether the data transfer request being executed is suspended).

ステップS49:実行中のデータ転送要求の識別子と変わっている場合(ステップS49/YES),ステップS50,S51の処理を実行する。変わっていない場合(ステップS49/NO),つまり,実行待機中のデータ転送要求を一時停止する場合,処理を終了する。   Step S49: If the identifier is different from the identifier of the data transfer request being executed (step S49 / YES), the processing of steps S50 and S51 is executed. If it has not changed (step S49 / NO), that is, if the data transfer request waiting for execution is suspended, the processing is terminated.

ステップS50〜S52の処理は,ステップS10〜S12の処理と同様なので,その説明を省略する。   Since the processing of steps S50 to S52 is the same as the processing of steps S10 to S12, the description thereof is omitted.

図8A〜図8Cは,一時停止していたデータ転送要求の再開を説明するフロー図である。この処理は,図7A〜図7Cで説明した,タスクにより一時停止されたデータ転送要求を再開する処理を説明するものである。   8A to 8C are flowcharts for explaining resumption of a data transfer request that has been temporarily stopped. This process describes the process for resuming the data transfer request suspended by the task, as described with reference to FIGS. 7A to 7C.

ステップS61:タスク21は,スケジューリング手段22に一時停止していたデータ転送要求の再開命令を行う再開要求APIを呼び出す。このとき,再開要求APIに引数として,図5AのステップS2で説明した再開するデータ転送要求の識別子を設定する。その結果,識別子を含む再開要求がスケジューリング手段22に入力される。   Step S61: The task 21 calls the resume request API for instructing the scheduling means 22 to resume the data transfer request that has been suspended. At this time, the identifier of the data transfer request to be restarted described in step S2 of FIG. 5A is set as an argument in the restart request API. As a result, a restart request including the identifier is input to the scheduling means 22.

ステップS62:要求発生受け付け手段221は,この再開要求を受け付ける。すなわち,要求発生受け付け手段221は,タスク21から一時停止していたデータ転送要求の再開命令を受け付ける。   Step S62: The request generation accepting means 221 accepts this restart request. That is, the request generation accepting unit 221 accepts a data transfer request resumption command that has been temporarily stopped from the task 21.

ステップS63:要求発生受け付け手段221は,受け付けた再開要求に対応するデータ転送要求を要求格納部141から検索するように要求管理手段223に命令する。   Step S63: The request generation acceptance unit 221 instructs the request management unit 223 to search the request storage unit 141 for a data transfer request corresponding to the accepted resumption request.

ステップS64:要求管理手段223は,この命令に応答し,この再開要求に対応するデータ転送要求を要求格納部141から検索する。この検索は,再開要求に対応するデータ転送要求の識別子をキーにして実行される。   Step S64: In response to this command, the request management means 223 searches the request storage unit 141 for a data transfer request corresponding to this restart request. This search is executed using the identifier of the data transfer request corresponding to the restart request as a key.

ステップS65:要求発生受け付け手段221は,受け付けた再開要求に対応するデータ転送要求の識別子を優先度別要求キュー142の先頭に登録するように優先度付きスケジューラ224に命令する。   Step S65: The request generation accepting means 221 instructs the scheduler 224 with priority to register the identifier of the data transfer request corresponding to the accepted restart request at the head of the request queue 142 by priority.

ステップS66:優先度付きスケジューラ224はこの命令に応答し,再開要求に対応するデータ転送要求の識別子を優先度別要求キュー142の先頭に登録する。すなわち,優先度付きスケジューラ224は,再開命令に応答し,一時停止していたデータ転送要求のスケジューリングを再開する。ここでは,優先度付きスケジューラ224は,ステップS64で要求管理手段223が検索した再開要求に対応するデータ転送要求の識別子,優先度を要求管理手段223から得て,この登録を実行する。   Step S66: In response to this command, the scheduler 224 with priority registers the identifier of the data transfer request corresponding to the restart request at the head of the request queue 142 by priority. In other words, the scheduler with priority 224 responds to the resume command and resumes the scheduling of the data transfer request that has been suspended. Here, the scheduler 224 with priority obtains the identifier and priority of the data transfer request corresponding to the restart request searched by the request management unit 223 in step S64 from the request management unit 223, and executes this registration.

ステップS67,S68の処理の説明は,ステップS7,S8の処理と同様なので,その説明を省略する。   The description of the processing in steps S67 and S68 is the same as the processing in steps S7 and S8, and thus the description thereof is omitted.

ステップS69:最も優先度が高いデータ転送要求の識別子が,実行中のデータ転送要求の識別子と変わっている場合(ステップS69/YES),すなわち再開対象となるデータ転送要求の優先度が最も高い場合,ステップS70に移る。変わっていない場合(ステップS69/NO),処理を終了する。   Step S69: When the identifier of the data transfer request with the highest priority is different from the identifier of the data transfer request being executed (step S69 / YES), that is, when the priority of the data transfer request to be resumed is the highest , Step S70 follows. If not changed (step S69 / NO), the process is terminated.

ステップS70,S71の処理は,ステップS10,S11の処理と同様なので,その説明を省略する。   Since the processes in steps S70 and S71 are the same as those in steps S10 and S11, the description thereof is omitted.

ステップS72:バスマスタドライバ制御手段226は,実行中のデータ転送要求を一時停止して,最も優先度が高いデータ転送要求(再開するデータ転送要求)を実行するようにバスマスタドライバ手段24に命令する。具体的には,バスマスタドライバ制御手段226は,ステップS71(ステップS11参照)においてバス/転送制御手段225から入力された識別子に対応するデータ転送要求を要求管理手段223を経由して要求格納部141から読み出す。なお,詳細については,ステップS12で説明したので省略する。バスマスタドライバ制御手段226は,読み出したデータ転送要求をバスマスタドライバ手段24に出力する。この読み出したデータ転送要求のステータスフラグには,タスクによる一時停止中が記録されているので,バスマスタドライバ手段24は,タスクからの要求により一時停止していたデータ転送要求を実行するようにDMAC11に命令することができる。   Step S72: The bus master driver control means 226 instructs the bus master driver means 24 to temporarily stop the data transfer request being executed and execute the data transfer request with the highest priority (data transfer request to be resumed). Specifically, the bus master driver control unit 226 sends a data transfer request corresponding to the identifier input from the bus / transfer control unit 225 in step S71 (see step S11) via the request management unit 223 to the request storage unit 141. Read from. Note that details are omitted because they have been described in step S12. The bus master driver control means 226 outputs the read data transfer request to the bus master driver means 24. Since the status flag of the read data transfer request indicates that the task is temporarily stopped, the bus master driver means 24 instructs the DMAC 11 to execute the data transfer request that has been temporarily stopped by the request from the task. Can be ordered.

また,要求管理手段223は,識別子が入力されると(ステップS12参照),実行中のデータ転送要求のステータスフラグ(転送実行中が設定されている)を割り込みによる一時停止中に設定し,入力された識別子に対応するデータ転送要求のステータスフラグを転送実行中に設定する。   When the identifier is input (see step S12), the request management means 223 sets the status flag of the data transfer request being executed (set to transfer in progress) to be suspended during interruption. The status flag of the data transfer request corresponding to the identified identifier is set during transfer execution.

バスマスタドライバ手段24は,バスマスタドライバ制御手段226からの一時停止命令に応答して,DMAC11が実行中のデータ転送要求を一時停止する。バスマスタドライバ手段24は,バスマスタドライバ制御手段226からのデータ転送実行命令に応答して,入力されたデータ転送要求をDMAC11に出力する。DMAC11は,入力されたデータ転送要求に基づいて,データ転送を実行する。   In response to the pause command from the bus master driver control means 226, the bus master driver means 24 pauses the data transfer request being executed by the DMAC 11. In response to the data transfer execution command from the bus master driver control means 226, the bus master driver means 24 outputs the input data transfer request to the DMAC 11. The DMAC 11 performs data transfer based on the input data transfer request.

図9A〜図9Cは,データ転送要求の強制終了を説明するフロー図である。
ステップS81:タスク21は,スケジューリング手段22にデータ転送要求の強制終了命令を行う強制終了要求APIを呼び出す。このとき,強制終了APIに引数として,図5AのステップS2で説明した強制終了するデータ転送要求の識別子を設定する。その結果,識別子を含む強制終了要求がスケジューリング手段22に入力される。
9A to 9C are flowcharts for explaining the forced termination of the data transfer request.
Step S81: The task 21 calls the forced termination request API for instructing the scheduling means 22 to forcibly terminate the data transfer request. At this time, the identifier of the data transfer request to be forcibly terminated described in step S2 of FIG. 5A is set as an argument to the forcible termination API. As a result, a forced termination request including the identifier is input to the scheduling means 22.

ステップS82:要求発生受け付け手段221は,この強制終了要求を受け付ける。すなわち,要求発生受け付け手段221は,タスク21からデータ転送要求の強制終了命令を受け付ける。   Step S82: The request generation acceptance means 221 accepts this forced termination request. That is, the request generation accepting means 221 accepts a data transfer request forced termination command from the task 21.

ステップS83:要求発生受け付け手段221は,受け付けた強制終了要求に対応するデータ転送要求を要求格納部141から検索し,削除するように要求管理手段223に命令する。   Step S83: The request generation accepting unit 221 searches the request storage unit 141 for a data transfer request corresponding to the accepted forced termination request and instructs the request managing unit 223 to delete it.

ステップS84:要求管理手段223は,この命令に応答し,この強制終了要求に対応するデータ転送要求を要求格納部141から検索し,検索したデータ転送要求を削除する。この検索は,強制終了要求に対応するデータ転送要求の識別子をキーにして実行される。   Step S84: In response to this command, the request management unit 223 searches the request storage unit 141 for a data transfer request corresponding to the forced termination request, and deletes the searched data transfer request. This search is executed using the identifier of the data transfer request corresponding to the forced termination request as a key.

ステップS85:要求発生受け付け手段221は,受け付けた強制終了要求に対応するデータ転送要求の識別子を優先度別要求キュー142から削除するように優先度付きスケジューラ224に命令する。   Step S85: The request generation accepting unit 221 instructs the scheduler 224 with priority to delete the identifier of the data transfer request corresponding to the accepted forced termination request from the request queue 142 by priority.

ステップS86:優先度付きスケジューラ224は,強制終了要求に対応するデータ転送要求の識別子を優先度別要求キュー142から検索し,検索したデータ転送要求の識別子を削除する。すなわち,優先度付きスケジューラ224は,強制終了命令に応答し,データ転送要求のスケジューリングを終了する。   Step S86: The priority-added scheduler 224 searches the priority-specific request queue 142 for the identifier of the data transfer request corresponding to the forced termination request, and deletes the searched data transfer request identifier. In other words, the scheduler with priority 224 responds to the forcible termination command and ends the scheduling of the data transfer request.

ステップS87:優先度付きスケジューラ224は,この削除後,優先度別要求キュー142に登録されたデータ転送要求の識別子の中で,最も優先度の高いデータ転送要求の識別子を選択する。   Step S87: After this deletion, the scheduler with priority 224 selects the identifier of the data transfer request with the highest priority among the identifiers of the data transfer request registered in the request queue by priority 142.

ステップS88:優先度付きスケジューラ224は,この削除により,最も優先度が高いデータ転送要求の識別子が,実行中のデータ転送要求の識別子と変わっていないか,すなわち実行中のデータ転送要求の識別子を削除したのか(実行中のデータ転送要求を強制終了するのか)を確認する。   Step S88: The prioritized scheduler 224 determines whether the identifier of the data transfer request with the highest priority has been changed from the identifier of the data transfer request being executed by this deletion, that is, the identifier of the data transfer request being executed. Check whether it has been deleted (whether the data transfer request being executed is forcibly terminated).

ステップS89:実行中のデータ転送要求の識別子と変わっている場合(ステップS89/YES),ステップS90,S91の処理を実行する。変わっていない場合(ステップS89/NO),つまり,実行待機中のデータ転送要求を強制終了した場合,処理を終了する。   Step S89: If the identifier is different from the identifier of the data transfer request being executed (step S89 / YES), the processing of steps S90 and S91 is executed. If it has not changed (step S89 / NO), that is, if the data transfer request waiting for execution is forcibly terminated, the processing is terminated.

ステップS90:優先度付きスケジューラ224は,最も優先度が高いデータ転送要求の識別子をバス/転送制御手段225に出力する。   Step S90: The scheduler with priority 224 outputs the identifier of the data transfer request with the highest priority to the bus / transfer control means 225.

ステップS91:バス/転送制御手段225は,最も優先度が高いデータ転送要求に基づいて,データ転送要求を実行するようにバスマスタドライバ制御手段226に命令する。このとき,最も優先度が高いデータ転送要求の識別子をバスマスタドライバ制御手段226に出力する。   Step S91: The bus / transfer control means 225 instructs the bus master driver control means 226 to execute the data transfer request based on the data transfer request with the highest priority. At this time, the identifier of the data transfer request with the highest priority is output to the bus master driver control means 226.

ステップS92:バスマスタドライバ制御手段226は,実行中のデータ転送要求を強制終了して,最も優先度が高いデータ転送要求を実行するようにバスマスタドライバ手段24に命令する。   Step S92: The bus master driver control means 226 instructs the bus master driver means 24 to forcibly terminate the data transfer request being executed and to execute the data transfer request with the highest priority.

ここでは,バスマスタドライバ制御手段226は,入力された識別子に対応するデータ転送要求を要求管理手段223を経由して要求格納部141から読み出す。バスマスタドライバ制御手段226は,読み出したデータ転送要求をバスマスタドライバ手段24に出力する。なお,ステップS12で説明したように,要求管理手段223は,データ転送要求をバスマスタドライバ制御手段226に出力すると,入力された識別子に対応するデータ転送要求のステータスフラグに転送実行中を記録する。   Here, the bus master driver control unit 226 reads a data transfer request corresponding to the input identifier from the request storage unit 141 via the request management unit 223. The bus master driver control means 226 outputs the read data transfer request to the bus master driver means 24. As described in step S12, when the request management unit 223 outputs the data transfer request to the bus master driver control unit 226, the request management unit 223 records that transfer is being performed in the status flag of the data transfer request corresponding to the input identifier.

バスマスタドライバ手段24は,バスマスタドライバ制御手段226からの強制終了命令に応答して,DMAC11が実行中のデータ転送要求を強制終了するようにOS23を介してDMAC11に命令する。DMAC11は,バスマスタドライバ手段24からの強制終了命令に応答して,実行中のデータ転送を強制終了する。   In response to the forced termination command from the bus master driver control unit 226, the bus master driver unit 24 commands the DMAC 11 via the OS 23 to forcibly terminate the data transfer request being executed by the DMAC 11. In response to the forced termination command from the bus master driver means 24, the DMAC 11 forcibly terminates the data transfer being executed.

そして,バスマスタドライバ手段24は,バスマスタドライバ制御手段226からのデータ転送実行命令に応答して,入力されたデータ転送要求をOS23を介してDMAC11に出力する。DMAC11は,入力されたデータ転送要求に基づいて,データ転送を実行する。   In response to the data transfer execution command from the bus master driver control unit 226, the bus master driver unit 24 outputs the input data transfer request to the DMAC 11 via the OS 23. The DMAC 11 performs data transfer based on the input data transfer request.

第1の実施形態によれば,データ転送を実行するバスマスタは,多段構成のバス構造であっても,データ転送経路となるバスの使用権を一揆通貫で獲得して,このバスを独占的に使用することができるので,効率的にデータ転送を実行できる。その結果,時間的要求が厳しいデータ転送でも,所定時間内に完了することができる。   According to the first embodiment, even if the bus master that executes data transfer has a multi-stage bus structure, the bus master that acquires the right to use the data transfer path is obtained all at once, and this bus is monopolized. Therefore, data transfer can be performed efficiently. As a result, even data transfer with strict time requirements can be completed within a predetermined time.

バスのアービタは,データ転送要求そのものの優先度に基づいて,バス使用要求の仲裁を実行することができない。しかし,第1の実施の形態によれば,スケジューリング手段が,優先度に基づいてデータ転送要求のスケジューリングを行うので,効率的なデータ転送を実行できる。   The bus arbiter cannot arbitrate the bus use request based on the priority of the data transfer request itself. However, according to the first embodiment, since the scheduling means schedules the data transfer request based on the priority, efficient data transfer can be executed.

また,バスアービタに対して1つのバスマスタがバス使用権を要求するので,このバスマスタは,即座にバス使用権を得ることができる。その結果,バスマスタがバス使用権を獲得するまでの待ち時間がなくなり,バスマスタの動作が停止することがない。   In addition, since one bus master requests the bus use right from the bus arbiter, this bus master can immediately obtain the bus use right. As a result, there is no waiting time until the bus master acquires the right to use the bus, and the operation of the bus master does not stop.

(第2の実施の形態)
ところで,ユーザがハードウェア10に新たにバスマスタを追加することがある。このバスマスタは,ユーザ定義バスマスタとも呼ばれる。このような場合,スケジューリング手段22の制御下に入ることなく,新たに追加したバスマスタがデータ転送を実行すると,このバスマスタと,スケジューリング手段22によりスケジューリングされたデータ転送を実行するバスマスタがバスに同時にバス使用要求を出すことがある。その結果,スケジューリング手段22によりスケジューリングされたデータ転送の効率が低下する。従って,新たに追加したバスマスタが実行するデータ転送をスケジューリング手段22によりスケジューリングする必要がある。
(Second embodiment)
Incidentally, the user may add a new bus master to the hardware 10. This bus master is also called a user-defined bus master. In such a case, when the newly added bus master executes data transfer without entering the control of the scheduling means 22, this bus master and the bus master that executes the data transfer scheduled by the scheduling means 22 are simultaneously connected to the bus. May request use. As a result, the efficiency of data transfer scheduled by the scheduling means 22 is reduced. Therefore, the data transfer executed by the newly added bus master needs to be scheduled by the scheduling means 22.

図10は,第2の実施の形態を説明するためのハードウェアの機能ブロック図であり,外部バスマスタ151が,ユーザによって新たに追加されたバスマスタ(ユーザ定義バスマスタ)である。外部バスマスタ151は,このバスマスタに対するインターフェイスバスとして機能する外部バスI/O163を介したデータ転送を実行し,外部バスI/O163に外部バス166を介して接続するバスマスタである。外部バスマスタ151は,外部バスI/O163に直接接続してもよい。すなわち,外部バスマスタ151は,バスを介したデータ転送を実行し,このバスに直接接続,または,他のバスなどを介して間接接続する。   FIG. 10 is a functional block diagram of hardware for explaining the second embodiment. The external bus master 151 is a bus master (user-defined bus master) newly added by the user. The external bus master 151 is a bus master that performs data transfer via the external bus I / O 163 that functions as an interface bus for the bus master and connects to the external bus I / O 163 via the external bus 166. The external bus master 151 may be directly connected to the external bus I / O 163. In other words, the external bus master 151 executes data transfer via the bus and is directly connected to this bus or indirectly connected via another bus or the like.

図11は,第2の実施の形態を説明するためのソフトウェアの機能ブロック図であり,スケジューリング手段22は,外部バスマスタ151に対してスケジューリングされたデータ転送要求を実行させる。外部バスマスタドライバ制御手段31は,バス/転送制御手段225の命令に基づき,外部バスマスタドライバ手段32を制御する。外部バスマスタドライバ手段32は,外部バスマスタ151を制御するドライバである。完了割り込み受け付け手段33は,OS23からの完了割り込み通知を受け付け,要求完了通知受け付け手段222に出力する。   FIG. 11 is a functional block diagram of software for explaining the second embodiment. The scheduling unit 22 causes the external bus master 151 to execute a scheduled data transfer request. The external bus master driver control means 31 controls the external bus master driver means 32 based on a command from the bus / transfer control means 225. The external bus master driver means 32 is a driver that controls the external bus master 151. The completion interrupt acceptance means 33 accepts a completion interrupt notification from the OS 23 and outputs it to the request completion notification acceptance means 222.

スケジューリング手段22は,受け付けたデータ転送要求の中で,最も優先度が高いデータ転送要求を選択する(図5BのステップS7〜S9参照)。そして,選択したデータ転送要求が,外部バスマスタ151にデータ転送要求を実行させる場合,このデータ転送要求の実行を外部バスマスタドライバ手段32に命令する。外部バスマスタドライバ手段32は,この命令に応答して,外部バスマスタ151に前記の選択したデータ転送要求を実行させる。   The scheduling means 22 selects the data transfer request with the highest priority among the received data transfer requests (see steps S7 to S9 in FIG. 5B). When the selected data transfer request causes the external bus master 151 to execute the data transfer request, the external bus master driver unit 32 is instructed to execute the data transfer request. In response to this command, the external bus master driver means 32 causes the external bus master 151 to execute the selected data transfer request.

タスク21が,図5AのステップS1で説明したように,データ転送要求APIを呼び出す。このとき,図4で説明したデータ転送要求がタスク21により生成され,データ転送要求APIに引数として設定される。その結果,データ転送要求がスケジューリング手段22に入力される。このデータ転送要求のデータ転送要求の種類には,「外部DMAC転送」が記録される。以下,このデータ転送要求を外部バスマスタデータ転送要求と記す。   The task 21 calls the data transfer request API as described in step S1 of FIG. 5A. At this time, the data transfer request described in FIG. 4 is generated by the task 21 and set as an argument in the data transfer request API. As a result, a data transfer request is input to the scheduling means 22. “External DMAC transfer” is recorded as the data transfer request type of this data transfer request. Hereinafter, this data transfer request is referred to as an external bus master data transfer request.

このデータ転送要求APIの呼び出しにより,図5A,図5Bで説明した処理がスケジューリング手段22によって実行される。このとき,要求発生受け付け手段221は,データ転送要求の種類に「外部DMAC転送」(図4参照)が記録されていることを確認し,この外部バスマスタデータ転送要求に外部バスマスタデータ転送要求用の識別子を割り当てる。   The processing described with reference to FIGS. 5A and 5B is executed by the scheduling unit 22 by calling the data transfer request API. At this time, the request generation accepting means 221 confirms that “external DMAC transfer” (see FIG. 4) is recorded in the type of data transfer request, and the request for external bus master data transfer request is sent to the external bus master data transfer request. Assign an identifier.

そして,図5BのステップS10で説明したように,優先度付きスケジューラ224から最も優先度が高いデータ転送要求の識別子,ここでは,外部バスマスタデータ転送要求の識別子がバス/転送制御手段225に入力される。バス/転送制御手段225は,入力された識別子が外部バスマスタデータ転送要求の識別子であるので,この識別子を外部バスマスタドライバ制御手段31に出力する。   Then, as described in step S10 of FIG. 5B, the identifier of the data transfer request with the highest priority, here the identifier of the external bus master data transfer request is input to the bus / transfer control means 225 from the scheduler with priority 224. The The bus / transfer control means 225 outputs the identifier to the external bus master driver control means 31 because the input identifier is the identifier of the external bus master data transfer request.

外部バスマスタドライバ制御手段31は,ステップS12で説明したように,要求管理手段223を経由して,この識別子に対応する外部バスマスタデータ転送要求を要求管理手段223を経由して要求格納部141から読み出す。外部バスマスタドライバ制御手段31は,読み出したデータ転送要求を外部バスマスタドライバ手段32に出力する。外部バスマスタドライバ手段32は,読み出したデータ転送要求に基づき,外部バスマスタ151にデータ転送要求を実行するようにOS23を介して命令する。外部バスマスタ151は,この命令に応答して,データ転送要求を実行する。   As described in step S12, the external bus master driver control means 31 reads the external bus master data transfer request corresponding to this identifier from the request storage section 141 via the request management means 223 via the request management means 223. . The external bus master driver control means 31 outputs the read data transfer request to the external bus master driver means 32. The external bus master driver means 32 instructs the external bus master 151 to execute the data transfer request via the OS 23 based on the read data transfer request. The external bus master 151 executes a data transfer request in response to this command.

なお,バス/転送制御手段225は,DMAC11または外部バスマスタ151がデータ転送要求を実行している場合には,外部バスマスタデータ転送要求の識別子が入力されると,実行しているデータ転送要求を一時停止するように,バスマスタドライバ制御手段226または外部バスマスタドライバ制御手段31を介してDMAC11または外部バスマスタ151に命令する。   When the DMAC 11 or the external bus master 151 is executing a data transfer request, the bus / transfer control means 225 temporarily executes the data transfer request being executed when the identifier of the external bus master data transfer request is input. It instructs the DMAC 11 or the external bus master 151 via the bus master driver control means 226 or the external bus master driver control means 31 to stop.

そして,外部バスマスタ151が,データ転送要求を完了すると,図6AのステップS21で説明したように,要求完了通知受け付け手段222は,このデータ転送完了通知を外部バスマスタドライバ手段32の完了割り込み受け付け手段33から受け付ける。具体的には,外部バスマスタ151がデータ転送を完了すると,外部バスマスタ151はIRC13にデータ転送が完了したこと通知する。IRC13は,外部バスマスタ151から転送完了通知を受け取ると,CPU12に対して転送完了割り込みを行い,データ転送が完了したことを通知する。CPU12は,転送完了割り込み通知を受け取ると,OS23の割り込みハンドラ231を介して転送完了通知を外部バスマスタドライバ手段32の完了割り込み受け付け手段33に出力する。完了割り込み受け付け手段33は,受信した転送完了通知を要求完了通知受け付け手段222に出力する。   When the external bus master 151 completes the data transfer request, the request completion notification accepting means 222 sends the data transfer completion notice to the completion interrupt accepting means 33 of the external bus master driver means 32 as described in step S21 of FIG. 6A. Accept from. Specifically, when the external bus master 151 completes the data transfer, the external bus master 151 notifies the IRC 13 that the data transfer is complete. When the IRC 13 receives a transfer completion notification from the external bus master 151, the IRC 13 issues a transfer completion interrupt to the CPU 12 to notify the completion of the data transfer. Upon receiving the transfer completion interrupt notification, the CPU 12 outputs a transfer completion notification to the completion interrupt acceptance means 33 of the external bus master driver means 32 via the interrupt handler 231 of the OS 23. The completion interrupt reception unit 33 outputs the received transfer completion notification to the request completion notification reception unit 222.

以後,図6A,6Bで説明したデータ転送完了処理が実行される。   Thereafter, the data transfer completion process described with reference to FIGS. 6A and 6B is executed.

このようにすることで,ユーザがハードウェア10に新たにバスマスタを追加しても,このバスマスタが実行するデータ転送をスケジューリング手段22によりスケジューリングすることができる。   Thus, even if the user newly adds a bus master to the hardware 10, the scheduling means 22 can schedule the data transfer executed by the bus master.

(第3の実施の形態)
タスク21は,スケジューリング手段22ではなく直接バスマスタにデータ転送要求を行うことがある。このデータ転送要求をスケジューリング手段22を介さずに直接受け付けたバスマスタ(以下,スケジューリングされないバスマスタと記す)は,このデータ転送要求を実行する。
(Third embodiment)
The task 21 may make a data transfer request directly to the bus master instead of the scheduling means 22. A bus master that directly receives the data transfer request without passing through the scheduling means 22 (hereinafter referred to as an unscheduled bus master) executes the data transfer request.

スケジューリング手段22によりスケジューリングされたバスマスタ(以下,スケジューリングされたバスマスタと記す)が,データ転送要求を実行している間に,このようなスケジューリングされないバスマスタがデータ転送要求を実行すると,バスアービタは,同時に複数のバスマスタからの使用要求を仲裁しなければならなくなる。その結果,スケジューリングされたバスマスタは,データ転送要求を効率的に実行できなくなる。   When such a non-scheduled bus master executes a data transfer request while a bus master scheduled by the scheduling means 22 (hereinafter referred to as a scheduled bus master) is executing a data transfer request, a plurality of bus arbiters are simultaneously provided. The use request from the bus master must be arbitrated. As a result, the scheduled bus master cannot efficiently execute the data transfer request.

このような場合,バスアービタは,スケジューリングされたバスマスタからのバス使用要求の優先順位を動的に変更,すなわちスケジューリングされたバスマスタに優先的にバス使用権を与えることが好ましい。   In such a case, it is preferable that the bus arbiter dynamically changes the priority of the bus use request from the scheduled bus master, that is, gives the bus use right preferentially to the scheduled bus master.

以下に,図12〜図15を参照して,このようなバス使用要求の仲裁を実行するバスアービタについて説明する。   A bus arbiter that performs arbitration of such bus use requests will be described below with reference to FIGS.

図12は,スケジューリングされたバスマスタに優先的にバス使用権を与えるバスアービタを有するバスを説明する機能ブロック図である。   FIG. 12 is a functional block diagram illustrating a bus having a bus arbiter that preferentially gives a bus use right to a scheduled bus master.

図13は,図12に示したバスアービタを制御するバスアービタ制御手段41,バスアービタのドライバを有するアービタドライバ群42を説明する機能ブロック図である。   FIG. 13 is a functional block diagram for explaining the bus arbiter control means 41 for controlling the bus arbiter shown in FIG. 12 and the arbiter driver group 42 having a bus arbiter driver.

図14は,バスアービタ制御手段41,アービタドライバ群42の機能ブロック図である。   FIG. 14 is a functional block diagram of the bus arbiter control means 41 and the arbiter driver group 42.

図15は,図12に示した何れかのバスアービタ,および,このバスアービタのバスアービタドライバ手段の機能ブロック図である。バスアービタ160は,図12に示した何れかのバスアービタ(DMACバスアービタ114’,バス1Aアービタ161a’ バス2Aアービタ162a’,バス1Bアービタ161b’,バス2Bアービタ162b’,外部バスアービタ163a’)に対応する。また,バスアービタドライバ手段420は,バスアービタ160の制御を行うドライバ手段であり,図14のアービタドライバ群42の各アービタドライバ手段(DMACアービタドライバ手段421,バス1Aアービタドライバ手段422,バス2Aアービタドライバ手段423,バス1Bアービタドライバ手段424,バス2Bアービタドライバ手段425,外部バスアービタドライバ手段426)に対応する。   FIG. 15 is a functional block diagram of any of the bus arbiters shown in FIG. 12 and the bus arbiter driver means of this bus arbiter. The bus arbiter 160 corresponds to one of the bus arbiters (DMAC bus arbiter 114 ′, bus 1A arbiter 161a ′, bus 2A arbiter 162a ′, bus 1B arbiter 161b ′, bus 2B arbiter 162b ′, external bus arbiter 163a ′) shown in FIG. . The bus arbiter driver means 420 is a driver means for controlling the bus arbiter 160, and each arbiter driver means (DMAC arbiter driver means 421, bus 1A arbiter driver means 422, bus 2A arbiter driver in FIG. 14). Means 423, bus 1B arbiter driver means 424, bus 2B arbiter driver means 425, external bus arbiter driver means 426).

まず,バスアービタがスケジューリングされたバスマスタに優先的にバス使用権を与える際に参照する情報である,バスマスタが所定期間においてバスを使用できるサイクル数を示す使用可能サイクル数を算出する処理について説明する。   First, a process for calculating the number of usable cycles indicating the number of cycles in which the bus master can use the bus in a predetermined period, which is information referred to when the bus arbiter preferentially gives the bus use right to the scheduled bus master, will be described.

図14の統計情報読み出し手段411は,アービタドライバ群42のアービタドライバ手段(DMACアービタドライバ手段421,バス1Aアービタドライバ手段422,バス2Aアービタドライバ手段423,バス1Bアービタドライバ手段424,バス2Bアービタドライバ手段425,外部バスアービタドライバ手段426)を介して,対応するバスアービタ(DMACバスアービタ114’,バス1Aアービタ161a’ バス2Aアービタ162a’,バス1Bアービタ161b’,バス2Bアービタ162b’,外部バスアービタ163a’)が記録する,バスマスタの統計情報を読み出す。この統計情報は,あるバスのバスマスタが,所定期間において,このバスを使用したバス使用済み時間を示す。例えば,図12の外部バスI/O163の場合,外部バスI/O163のバスマスタであるバス2A_162A,外部バスマスタ151が,所定期間において,外部バスI/O163を使用した使用サイクル数である。なお,外部バス166に接続するバスマスタは外部バスマスタ151だけなので,外部バスマスタ151が外部バスI/O163のバスマスタとなる。ここで,バス2A_162A,外部バスマスタ151のバス使用済み時間を,それぞれT1,T2とする。   14 includes arbiter driver means (DMAC arbiter driver means 421, bus 1A arbiter driver means 422, bus 2A arbiter driver means 423, bus 1B arbiter driver means 424, bus 2B arbiter driver. The corresponding bus arbiter (DMAC bus arbiter 114 ', bus 1A arbiter 161a', bus 2A arbiter 162a ', bus 1B arbiter 161b', bus 2B arbiter 162b ', external bus arbiter 163a' via means 425, external bus arbiter driver means 426) ) Read the bus master statistical information. This statistical information indicates a bus used time in which a bus master of a certain bus has used this bus during a predetermined period. For example, in the case of the external bus I / O 163 in FIG. 12, the bus 2A_162A and the external bus master 151, which are the bus masters of the external bus I / O 163, are the number of use cycles using the external bus I / O 163 in a predetermined period. Since only the external bus master 151 is connected to the external bus 166, the external bus master 151 becomes the bus master of the external bus I / O 163. Here, the bus used times of the bus 2A_162A and the external bus master 151 are T1 and T2, respectively.

使用割合算出手段412は,バスの各バスマスタのバス使用割合(以下,使用割合と略記する)を(式1)により算出する。   The usage rate calculation means 412 calculates the bus usage rate (hereinafter abbreviated as usage rate) of each bus master of the bus by (Equation 1).

あるバスのバスマスタの使用割合=このバスマスタが過去に使用した使用割合×(α)+このバスマスタが将来に使用する使用割合×(1−α)……(式1)
以下,バスマスタが過去に使用した使用割合を過去の使用割合,バスマスタが将来に使用する使用割合をバスマスタのバス使用見込み割合と記す。なお,αは重み付け係数であり,0,0.25,0.5,0.75,1.00などの0以上1以下の数値である。この値が0.5よりも小さい場合,バスマスタの使用割合の算出において,バスマスタのバス使用見込み割合がより反映される。なお,αは任意に変更できる。
Usage ratio of bus master of a certain bus = Usage ratio used in the past by this bus master x (α) + Usage ratio used in the future by this bus master x (1-α) (Equation 1)
Hereinafter, the usage ratio used in the past by the bus master is referred to as the past usage ratio, and the usage ratio used in the future by the bus master is referred to as the expected bus usage ratio of the bus master. Α is a weighting coefficient and is a numerical value of 0 or more and 1 or less such as 0, 0.25, 0.5, 0.75, 1.00. When this value is smaller than 0.5, the bus master's expected bus usage rate is more reflected in the calculation of the bus master usage rate. Α can be arbitrarily changed.

過去の使用割合は,あるバスの各バスマスタのバス使用済み時間をこのバスの全バスマスタの総バス使用済み時間で割ることにより得られる。前述の例では,バス2A_162A,外部バスマスタ151の使用割合は,それぞれT1/(T1+T2),T2/(T1+T2)である。   The past use ratio is obtained by dividing the bus used time of each bus master of a bus by the total bus used time of all bus masters of this bus. In the above example, the usage ratios of the bus 2A_162A and the external bus master 151 are T1 / (T1 + T2) and T2 / (T1 + T2), respectively.

バス使用見込み割合は,あるバスの各バスマスタが将来的に実行するデータ転送量(図4のデータ転送サイズに相当)をこのバスの全バスマスタが将来的に実行する総データ転送量で割ることにより得られる。将来的に実行するデータ転送量は,以下のようにして得る。   The expected bus usage ratio is calculated by dividing the data transfer amount that each bus master of a certain bus will execute in the future (corresponding to the data transfer size in Fig. 4) by the total data transfer amount that all bus masters of this bus will execute in the future. can get. The amount of data transfer to be executed in the future is obtained as follows.

まず,バスアービタ制御手段41は,所定のタイミングで,バス/転送制御手段225,要求管理手段223を介して要求格納部141にアクセスし,要求格納部141に格納されている実行待機中のデータ転送要求を検索する。そして,検索したデータ転送要求を実行する際に構成されるデータ転送経路の全バスとこのバスのバスマスタを特定する。このデータ転送要求を実行する際に構成されるバス経路をデータ転送経路と記す。   First, the bus arbiter control unit 41 accesses the request storage unit 141 via the bus / transfer control unit 225 and the request management unit 223 at a predetermined timing, and transfers the data waiting for execution stored in the request storage unit 141. Search for requests. Then, all the buses of the data transfer path configured when executing the searched data transfer request and the bus master of this bus are specified. A bus path configured when executing this data transfer request is referred to as a data transfer path.

データ転送経路を構成するバスを特定するためには,バス間の接続情報,バスに接続するバスマスタの接続情報が必要であるが,これらの接続情報は,例えば,バス/転送制御手段225が管理,記録しているものとする。   In order to specify the bus that constitutes the data transfer path, connection information between the buses and connection information of the bus master connected to the bus are necessary. These connection information is managed by the bus / transfer control means 225, for example. , Shall be recorded.

例えば,実行待機中である第1のデータ転送要求が要求格納部141に格納されているとする。第1のデータ転送要求は,バスマスタとして機能するDMAC11の例えばDMACCh0_110が,例えばバス1A_162Aに接続するデバイス(図示しない)から外部スレーブデバイス152にデータ転送量D1のデータ転送を実行するとする。データ転送量D1は,図4に示したように,第1のデータ転送要求のデータ転送サイズに記録されている。   For example, it is assumed that the first data transfer request waiting for execution is stored in the request storage unit 141. In the first data transfer request, it is assumed that, for example, DMACCh0_110 of the DMAC 11 functioning as a bus master executes data transfer of the data transfer amount D1 from a device (not shown) connected to the bus 1A_162A to the external slave device 152, for example. As shown in FIG. 4, the data transfer amount D1 is recorded in the data transfer size of the first data transfer request.

バスアービタ制御手段41は,第1のデータ転送要求の第1のデータ転送経路を構成する全バスとこのバスのバスマスタを特定する。第1のデータ転送経路を構成するバスは,DMACバス113,バス1A_161A,バス2A_162A,外部バスI/O163,外部バス166である。そして,各バスのバスマスタを特定する。前述の例では,DMACバス113のバスマスタはDMACch0_110,バス1A_161AのバスマスタはDMACバス113,バス2A_162Aのバスマスタはバス1A_161A,外部バスI/O163のバスマスタはバス2A_162Aと特定する。次いで,特定したバスマスタのデータ転送量をD1とする。   The bus arbiter control means 41 specifies all the buses constituting the first data transfer path of the first data transfer request and the bus master of this bus. The buses constituting the first data transfer path are a DMAC bus 113, a bus 1A_161A, a bus 2A_162A, an external bus I / O163, and an external bus 166. Then, the bus master of each bus is specified. In the above example, the bus master of the DMAC bus 113 is identified as DMACch0_110, the bus master of the bus 1A_161A is identified as the DMAC bus 113, the bus master of the bus 2A_162A is identified as the bus 1A_161A, and the bus master of the external bus I / O163 is identified as the bus 2A_162A. Next, let D1 be the data transfer amount of the specified bus master.

そして,特定したバスマスタ以外のバスマスタのデータ転送量を,データ転送量D1よりも小さいデータ転送量D2とする。データ転送量D2としては例えば0である。   Then, the data transfer amount of a bus master other than the specified bus master is set to a data transfer amount D2 smaller than the data transfer amount D1. The data transfer amount D2 is 0, for example.

そして,特定したバス毎に,このバス毎の各バスマスタのデータ転送量の総和を算出する。外部バスI/O163の場合,バスマスタはバス2A_162Aと外部バスマスタ151なので,この外部バスI/O163のデータ転送量の総和は(D1+D2)である。そして,バスマスタであるバス2A_162Aのデータ転送量D1を算出したデータ転送量の総和(D1+D2)で除算する。この除算値が,バス2A_162Aのバス使用見込み割合である。   Then, for each identified bus, the sum of the data transfer amounts of each bus master for each bus is calculated. In the case of the external bus I / O 163, since the bus masters are the bus 2A_162A and the external bus master 151, the total data transfer amount of the external bus I / O 163 is (D1 + D2). Then, the data transfer amount D1 of the bus 2A_162A, which is the bus master, is divided by the total sum (D1 + D2) of the calculated data transfer amount. This division value is the expected bus usage rate for bus 2A_162A.

同じく,バスマスタである外部バスマスタ151のデータ転送量D2を算出したデータ転送量の総和(D1+D2)で除算する。この除算値が外部バスマスタ151のバス使用見込み割合である。このバス使用見込みの算出処理を全バスの各バスマスタに対して実行する。   Similarly, the data transfer amount D2 of the external bus master 151, which is a bus master, is divided by the calculated sum of data transfer amounts (D1 + D2). This division value is the expected bus use ratio of the external bus master 151. This bus use expectation calculation process is executed for each bus master of all buses.

以上のようにして算出した過去の使用割合,バス使用見込み割合を(式1)に代入すれば,外部バスI/O163のバスマスタであるバス2A_162A,外部バスマスタ151の使用割合を算出することができる。   By substituting the past usage rate and the expected bus usage rate calculated as described above into (Equation 1), the usage rates of the bus master 2A_162A and the external bus master 151 of the external bus I / O 163 can be calculated. .

バス2A_162Aの使用割合は,((T1/(T1+T2))×α)+((D1/(D1+D2))×(1−α))である。以下,算出したバス2A_162Aの使用割合をR1とする。   The usage ratio of the bus 2A_162A is ((T1 / (T1 + T2)) × α) + ((D1 / (D1 + D2)) × (1-α)). Hereinafter, the calculated usage ratio of the bus 2A_162A is R1.

外部バスマスタ151の使用割合は,((T2/(T1+T2))×α)+((D2/(D1+D2))×(1−α))である。以下,算出した外部バスマスタ151の使用割合をR2とする。   The usage ratio of the external bus master 151 is ((T2 / (T1 + T2)) × α) + ((D2 / (D1 + D2)) × (1−α)). Hereinafter, the calculated usage ratio of the external bus master 151 is R2.

使用割合算出手段412は,以上説明した,バスマスタの使用割合の算出処理を全バスの各バスマスタについて実行し,算出結果を使用可能サイクル数算出手段413に出力する。なお,1つのデータ転送要求が要求格納部141に格納されている場合を例示したが,2つ以上でも同様である。   The usage rate calculation unit 412 executes the bus master usage rate calculation process described above for each bus master of all the buses, and outputs the calculation result to the usable cycle number calculation unit 413. In addition, although the case where one data transfer request is stored in the request storage unit 141 is illustrated, the same applies to two or more data transfer requests.

次に,使用可能サイクル数算出手段413は,使用割合算出手段412から入力された算出結果に基づき,全バスの各バスマスタの使用可能サイクル数を算出する。使用可能サイクル数の算出は,(式2)に基づき行われる。   Next, the usable cycle number calculating unit 413 calculates the usable cycle number of each bus master of all the buses based on the calculation result input from the use ratio calculating unit 412. The number of usable cycles is calculated based on (Equation 2).

あるバスマスタの使用可能サイクル数=スケジューリング期間サイクル数×このバスマスタの使用割合……(式2)
スケジューリング期間サイクル数は,前記した所定期間に対応するサイクル数であり,任意に変更可能である。バスマスタの使用割合は,(式1)により算出した値である。
Number of usable cycles for a certain bus master = number of cycles for the scheduling period x usage ratio of this bus master ... (Formula 2)
The number of cycles in the scheduling period is the number of cycles corresponding to the predetermined period, and can be arbitrarily changed. The bus master usage rate is the value calculated by (Equation 1).

外部バスI/O163のバスマスタであるバス2A_162Aの使用可能サイクル数は,スケジューリング期間サイクル数×バス2A_162Aの使用割合R1である。   The number of usable cycles of the bus 2A_162A that is the bus master of the external bus I / O 163 is the number of scheduling period cycles × the usage ratio R1 of the bus 2A_162A.

外部バスI/O163のバスマスタである外部バスマスタ151の使用可能サイクル数は,スケジューリング期間サイクル数×外部バスマスタ151の使用割合R2である。   The number of usable cycles of the external bus master 151 which is the bus master of the external bus I / O 163 is the number of scheduling period cycles × the usage ratio R2 of the external bus master 151.

すなわち,使用可能サイクル数算出手段413は,実行待機中のデータ転送要求(受け付け中のデータ転送要求)を実行するバスマスタ,すなわちスケジューリングされたバスマスタの使用可能サイクル数(バス使用可能時間)をこのデータ転送要求のデータ転送量に基づき,実行待機中のデータ転送要求を実行しないバスマスタ,すなわちスケジューリングされないバスマスタの使用可能サイクル数よりも長く算出する。これは,スケジューリングされたバスマスタのバス使用見込み割合は,スケジューリングされないバスマスタのバス使用見込み割合よりも大きいからである。この場合,(式1)の重み付け係数αを0とすることが好ましい。   In other words, the usable cycle number calculation means 413 calculates the number of usable cycles (bus usable time) of a bus master that executes a data transfer request waiting for execution (data transfer request being accepted), that is, a scheduled bus master. Based on the data transfer amount of the transfer request, it is calculated to be longer than the number of usable cycles of the bus master that does not execute the data transfer request waiting for execution, that is, the bus master that is not scheduled. This is because the expected bus usage rate of the scheduled bus master is larger than the expected bus usage rate of the non-scheduled bus master. In this case, it is preferable to set the weighting coefficient α in (Equation 1) to 0.

また,使用可能サイクル数算出手段413は,スケジューリングされたバスマスタの使用可能サイクル数をこのバスマスタのデータ転送量,および,バス使用済み時間に基づき算出することもできる。この場合,(式1)の重み付け係数αを0<α<1とする。この使用済み時間により,バスマスタの過去のバス使用状態を考慮して,使用可能サイクル数を算出できる。この場合,スケジューリングされないバスマスタの使用可能サイクル数は,バス使用済み時間に基づき算出される。そのため,スケジューリングされないバスマスタでも,データ転送要求を実行できる。   The usable cycle number calculating means 413 can also calculate the number of usable cycles of the scheduled bus master based on the data transfer amount of the bus master and the bus used time. In this case, the weighting coefficient α in (Equation 1) is 0 <α <1. Based on this used time, the number of usable cycles can be calculated in consideration of the past bus use status of the bus master. In this case, the number of usable cycles of the unscheduled bus master is calculated based on the bus used time. Therefore, even a bus master that is not scheduled can execute a data transfer request.

使用可能サイクル数算出手段413は,以上説明した,バスマスタの使用可能サイクル数の算出処理を,全バスの各バスマスタについて実行し,算出結果を割り当て情報設定手段415に出力する。なお,割り当て情報設定手段415が実行する処理については,後述する。   The usable cycle number calculation means 413 executes the bus master usable cycle number calculation process described above for each bus master of all the buses, and outputs the calculation result to the allocation information setting means 415. The processing executed by the allocation information setting unit 415 will be described later.

次に,バスマスタの優先度を算出する処理について説明する。バスマスタの優先度は,前述したように数値が高いほど優先度が高く例えば優先度1〜5で示されるものとする。まず,前述したように,まず,バスアービタ制御手段41は,バス/転送制御手段225,要求管理手段223を介して要求格納部141にアクセスし,要求格納部141に格納されている実行待機中のデータ転送要求の検索し,検索したデータ転送要求の優先度を特定する。   Next, processing for calculating the priority of the bus master will be described. As described above, the priority of the bus master is higher as the numerical value is higher. First, as described above, the bus arbiter control unit 41 first accesses the request storage unit 141 via the bus / transfer control unit 225 and the request management unit 223, and waits for execution stored in the request storage unit 141. Search for the data transfer request and specify the priority of the searched data transfer request.

そして,優先度が最も高いデータ転送要求のデータ転送経路を構成するバスのバスマスタの優先度を最高優先度,例えば優先度5と算出し,それ以外のバスマスタは最高優先度よりも低い優先度,例えば優先度4と算出する。   Then, the priority of the bus master of the bus constituting the data transfer path of the data transfer request with the highest priority is calculated as the highest priority, for example, priority 5, and other bus masters have a priority lower than the highest priority. For example, priority 4 is calculated.

例えば,前記した第1のデータ転送要求の優先度が最も高い場合,第1のデータ転送要求のデータ転送経路を構成するバスのバスマスタである,DMACch0_110,DMACバス113,バス1A_161A,バス2A_162Aの優先度を優先度5と算出する。外部バスI/O163の場合,バス2A_162Aは優先度5,外部バスマスタ151は優先度4と算出される。   For example, when the priority of the first data transfer request is the highest, the priority of the DMACch0_110, the DMAC bus 113, the bus 1A_161A, and the bus 2A_162A that are the bus masters of the data transfer path of the first data transfer request The degree is calculated as priority 5. In the case of the external bus I / O 163, the priority level 5 is calculated for the bus 2A_162A, and the priority level 4 is calculated for the external bus master 151.

他にも,データ転送要求の優先度だけでなく,データ転送要求のデータ転送量に基づきバスマスタの優先度を算出してもよい。例えば,優先度が最も高いデータ転送要求が複数ある場合,優先度が最も高いデータ転送要求の中で,データ転送量が最も多いデータ転送要求のデータ転送経路を構成するバスのバスマスタの優先度を最高優先度にする。そして,次にデータ転送量が多いデータ転送要求のデータ転送経路を構成するバスのバスマスタの優先度を最高優先度よりも低い優先度にする。そして,それ以外のバスマスタの優先度をこの低い優先度よりも低くする。   In addition, the priority of the bus master may be calculated based not only on the priority of the data transfer request but also on the data transfer amount of the data transfer request. For example, if there are multiple data transfer requests with the highest priority, the priority of the bus master of the bus that constitutes the data transfer path of the data transfer request with the largest data transfer amount among the data transfer requests with the highest priority. Make it the highest priority. Then, the priority of the bus master of the bus constituting the data transfer path of the data transfer request having the next largest data transfer amount is set to a priority lower than the highest priority. Then, the priority of other bus masters is set lower than this low priority.

他にも,優先度が最も高いデータ転送要求のデータ転送経路を構成するバスのバスマスタの優先度を最高優先度とする。そして,直前に終了したデータ転送要求のデータ転送経路を構成するバスのバスマスタの優先度を最高優先度よりも低い優先度にする。そして,それ以外のバスマスタの優先度をこの低い優先度よりも低くする。   In addition, the priority of the bus master of the bus constituting the data transfer path of the data transfer request with the highest priority is set as the highest priority. Then, the priority of the bus master of the bus constituting the data transfer path of the data transfer request that has just ended is set to a priority lower than the highest priority. Then, the priority of other bus masters is set lower than this low priority.

なお,前述の例では,優先度算出手段414は,バスマスタの優先度を5段階のレベルで算出したが,バスアービタにおいては,仕様上,3段階の優先度しかバスマスタに設定できないことがある。このような場合には,優先度算出手段414は,算出した優先度の値域を圧縮してバスアービタの仕様に対応させる。例えば,優先度算出手段414が,優先度5を算出した場合,バスアービタの仕様に対応させるため,優先度3に値域を圧縮する。バスアービタの仕様が10段階の場合には,算出した優先度の値域を拡張してバスアービタの仕様に対応させる。   In the above example, the priority calculation means 414 calculates the priority of the bus master at five levels. However, in the bus arbiter, only three levels of priority may be set as the bus master due to specifications. In such a case, the priority calculation means 414 compresses the calculated priority value range so as to correspond to the specifications of the bus arbiter. For example, when the priority calculation unit 414 calculates the priority 5, the value range is compressed to the priority 3 in order to correspond to the specification of the bus arbiter. If the bus arbiter specification is in 10 stages, the calculated priority range is expanded to correspond to the bus arbiter specification.

また,優先度算出手段414が,例えば同じ優先度のデータ転送要求を複数検索した場合,あるバスの異なるバスマスタに対して同じ優先度が算出されることがある。そして,このバスのバスアービタが,同じ優先度をバスマスタに設定できない仕様の場合がある。このような場合,優先度算出手段414は,各バスマスタの優先度を順次変更して,同じ優先度にならないように優先度を変更する。   For example, when the priority calculation unit 414 searches for a plurality of data transfer requests having the same priority, the same priority may be calculated for different bus masters of a certain bus. In some cases, the bus arbiter of this bus has a specification that cannot set the same priority as the bus master. In such a case, the priority calculation means 414 sequentially changes the priority of each bus master and changes the priority so as not to have the same priority.

優先度算出手段414は,以上説明した,バスマスタの優先度の算出処理を,全バスの各バスマスタについて実行し,算出結果を割り当て情報設定手段415に出力する。   The priority calculation unit 414 executes the bus master priority calculation process described above for each bus master of all the buses, and outputs the calculation result to the allocation information setting unit 415.

割り当て情報設定手段415は,使用可能サイクル数算出手段413から入力された各バスに対応する各バスマスタの使用可能サイクル数と,優先度算出手段414から入力された各バスに対応する各バスマスタの優先度を,各バスに対応するバスアービタドライバを介して,バスアービタ160の割り当てレジスタ1604(図15参照)に設定する。   The allocation information setting unit 415 includes the number of usable cycles of each bus master corresponding to each bus input from the usable cycle number calculating unit 413 and the priority of each bus master corresponding to each bus input from the priority calculating unit 414. The degree is set in the allocation register 1604 (see FIG. 15) of the bus arbiter 160 via the bus arbiter driver corresponding to each bus.

前述の例では,図14の割り当て情報設定手段415に使用可能サイクル数算出手段413から外部バスI/O163のバスマスタであるバス2A_162Aの使用可能サイクル数と同外部バスマスタ151の使用可能サイクル数とが入力される。また,割り当て情報設定手段415に優先度算出手段414から外部バスI/O163のバスマスタであるバス2A_162Aの優先度と同外部バスマスタ151の優先度が入力される。   In the above example, the allocation information setting unit 415 in FIG. 14 includes the number of usable cycles from the usable cycle number calculating unit 413 and the number of usable cycles of the bus 2A_162A that is the bus master of the external bus I / O 163 and the number of usable cycles of the external bus master 151. Entered. Further, the priority of the external bus master 151 and the priority of the external bus master 151 are input to the allocation information setting unit 415 from the priority calculation unit 414.

すると,割り当て情報設定手段415は,外部バスI/O163の外部バスアービタ163a’を制御する外部バスアービタドライバ手段426のレジスタ設定部(図14参照)を介して,外部バスアービタ163a’の割り当てレジスタ1604(図15参照)に設定する。割り当てレジスタ1604は,設定されたバス2A_162Aの使用可能サイクル数と優先度とをバス2A_162Aに対応して割り当てられているバスマスタメモリ1601のバスマスタ情報16011の使用可能サイクル数1601b,優先度1601aに格納する。同じく,割り当てレジスタ1604は,設定された外部バスマスタ151の使用可能サイクル数と優先度とを外部バスマスタ151に対応して割り当てられているバスマスタメモリ1601のバスマスタ情報16012の使用可能サイクル数1601b,優先度1601aに格納する。 Then, the allocation information setting unit 415 uses the register setting unit (see FIG. 14) of the external bus arbiter driver unit 426 that controls the external bus arbiter 163a ′ of the external bus I / O 163, so that the allocation register 1604 ( (See Fig. 15). Assignment register 1604 stores the priority and the number of usable cycles of the bus 2A_162A which is set the bus master information 1601 1 available cycle number 1601b bus master memory 1601 is allocated corresponding to the bus 2A_162A, the priority 1601a To do. Similarly, assignment register 1604, set the external bus master 151 of available cycle number and priority and the external bus master 151 to the bus master information 1601 2 available cycle number 1601b bus master memory 1601 is allocated corresponding priority Store in degrees 1601a.

割り当て情報設定手段415は,この設定処理を全バスアービタに対して実行する。なお,バスマスタメモリ1601などの詳細については,図15で説明する。   The allocation information setting means 415 executes this setting process for all bus arbiters. Details of the bus master memory 1601 and the like will be described with reference to FIG.

次に,設定された使用可能サイクル数,優先度を参照し,バスマスタの優先順位を動的に変更する処理について図14,図15を参照して説明する。   Next, processing for dynamically changing the priority order of bus masters with reference to the set number of usable cycles and priority will be described with reference to FIGS.

図15のバスアービタ160は,バスマスタからのバス使用要求をバスマスタ毎に設定されている優先度に従って仲裁する。このとき,後述するように,バスアービタ160の使用サイクル数カウンタ1602は,バスマスタのバス使用済み時間(使用済みサイクル数)をカウントする。   The bus arbiter 160 in FIG. 15 arbitrates the bus use request from the bus master according to the priority set for each bus master. At this time, as described later, the used cycle number counter 1602 of the bus arbiter 160 counts the bus used time (number of used cycles) of the bus master.

ここで,所定期間(スケジューリング期間サイクル数)において,第1のバスマスタの使用済みサイクル数が,第1のバスマスタに対応して格納されている使用可能サイクル数を超過し,さらに,第1のバスマスタと第2のバスマスタとからバス使用要求があり,これらのバス使用要求が競合した場合,使用可能サイクル数を超過した第1のバスマスタにはバス使用権を渡さずに,使用可能サイクル数を超過していない第2のバスマスタに優先的にバス使用権を与える処理を実行する。   Here, in a predetermined period (scheduling period cycle number), the number of used cycles of the first bus master exceeds the number of usable cycles stored corresponding to the first bus master, and further, the first bus master If there is a bus use request from the second bus master and these bus use requests conflict, the number of usable cycles will be exceeded without passing the right to use the bus to the first bus master that has exceeded the available number of cycles. A process of giving the bus use right preferentially to the second bus master that has not been executed is executed.

ここで,第1のバスマスタをスケジューリングされないバスマスタ,第2のバスマスタをスケジューリングされたバスマスタとする。通常,第1のバスマスタの使用可能サイクル数は,第2のバスマスタの使用可能サイクル数に比べて小さくなる。これは,前述したように,第1のバスマスタのバス使用見込み割合は0であり,そのため,(式1)から明らかなように,(式1)の重み付け係数αを小さくした場合(例えば0),第1のバスマスタの使用割合が小さくなる。その結果,(式2)から明らかなように,第1のバスマスタの使用可能サイクル数が小さくなるからである。   Here, it is assumed that the first bus master is a non-scheduled bus master and the second bus master is a scheduled bus master. Normally, the number of usable cycles of the first bus master is smaller than the number of usable cycles of the second bus master. As described above, the estimated bus use ratio of the first bus master is 0. Therefore, as apparent from (Equation 1), the weighting coefficient α in (Equation 1) is reduced (for example, 0). , The usage ratio of the first bus master is reduced. As a result, as apparent from (Equation 2), the number of usable cycles of the first bus master is reduced.

すなわち,所定期間において,第2のバスマスタは,第1のバスマスタに比べてバス使用可能時間がより長いので,優先的にバス使用権が与えられ,バスを優先的に使用できるようになる。その結果,第2のバスマスタは,データ転送要求を効率的に実行できる。   That is, in the predetermined period, the second bus master has a longer bus usable time than the first bus master, so that the bus use right is given preferentially and the bus can be used preferentially. As a result, the second bus master can efficiently execute the data transfer request.

バスアービタ160のバスマスタメモリ1601は,バスマスタのバスマスタ情報を格納するメモリである。バスマスタメモリ1601は,バスマスタ毎のバスマスタ情報を格納する領域であるバスマスタ情報16011…1601nを有し,これらにバスマスタ情報である優先度1601a,使用可能サイクル数1601b,使用可能サイクル数超過フラグ1601c,使用済みサイクル数1601dが格納される。バスアービタ160が外部バスアービタ163a’の場合,バスマスタ情報16011が,バスマスタであるバス2A_162Aに対応して設けられているバスマスタ情報格納領域であり,バスマスタ情報16012が,バスマスタである外部バスマスタ151に対応して設けられているバスマスタ情報格納領域となる。 The bus master memory 1601 of the bus arbiter 160 is a memory that stores bus master information of the bus master. The bus master memory 1601 has bus master information 1601 1 ... 1601 n which is an area for storing bus master information for each bus master, and includes priority 1601a, usable cycle number 1601b, usable cycle number excess flag 1601c which are bus master information. , The number of used cycles 1601d is stored. If the bus arbiter 160 is an external bus arbiter 163a ', the bus master information 1601 1, a master information storage area provided in correspondence to the bus 2A_162A a bus master, the bus master information 1601 2, corresponding to the external bus master 151 is a bus master The bus master information storage area is provided.

使用サイクル数カウンタ1602は,バスアービタ160からバス使用権を獲得したバスマスタが,バスを使用してデータ転送を実行するサイクル数をカウントするカウンタであり,カウント結果をこのバスマスタに対応して設けられているバスマスタメモリ1601の使用済みサイクル数1601dに格納する。   The use cycle counter 1602 is a counter that counts the number of cycles in which the bus master that has acquired the bus use right from the bus arbiter 160 executes data transfer using the bus, and the count result is provided corresponding to this bus master. Stored in the used cycle number 1601d of the bus master memory 1601.

統計情報レジスタ1603は,バスマスタ毎の使用済みサイクル数を,バスマスタ毎に対応して設けられているバスマスタメモリ1601のバスマスタ情報16011〜1601nの使用済みサイクル数1601dから読み出し,格納するレジスタである。統計情報レジスタ1603に格納されたバスマスタ毎の使用済みサイクル数が,バスアービタドライバ手段420の統計情報レジスタ読み出し手段4202を介してバスアービタ制御手段41の統計情報読み出し手段411により読み出される。 The statistical information register 1603 is a register that reads and stores the number of used cycles for each bus master from the number of used cycles 1601d of the bus master information 1601 1 to 1601 n in the bus master memory 1601 provided for each bus master. . The number of used cycles for each bus master stored in the statistical information register 1603 is read by the statistical information reading means 411 of the bus arbiter control means 41 via the statistical information register reading means 4202 of the bus arbiter driver means 420.

割り当てレジスタ1604は,バスアービタドライバ手段420のレジスタ設定手段4201を介してバスアービタ制御手段41の割り当て情報設定手段415から設定されたバスマスタ毎の優先度,使用可能サイクル数を,バスマスタ毎に対応して設けられているバスマスタメモリ1601のバスマスタ情報16011〜1601nの優先度1601a,使用可能サイクル数1601bに格納する。なお,具体例については前述したので省略する。 The allocation register 1604 corresponds to the priority and the number of usable cycles for each bus master set from the allocation information setting means 415 of the bus arbiter control means 41 via the register setting means 4201 of the bus arbiter driver means 420 for each bus master. Stored in the priority 1601a and usable cycle number 1601b of the bus master information 16011 1 to 1601 n of the provided bus master memory 1601. A specific example has been described above and will not be described.

スケジューリングサイクル数カウンタ1605は,前記したスケジューリング期間サイクル数に対応する所定期間が経過したか否かを検知するため設けられたカウンタであり,スケジューリング用メモリ1606のスケジューリング期間サイクル数1606aに記録されたスケジューリング期間サイクル数が経過するとカウンタを0にリセットし,サイクル数のカウントを開始する。そして,カウント結果をスケジューリング用メモリ1606のスケジューリングサイクル数1606bに格納する。   The scheduling cycle number counter 1605 is a counter provided for detecting whether or not a predetermined period corresponding to the above-described scheduling period cycle number has elapsed, and the scheduling cycle number recorded in the scheduling period cycle number 1606a of the scheduling memory 1606. When the number of cycle cycles elapses, the counter is reset to 0 and the cycle count starts. The count result is stored in the scheduling cycle number 1606b of the scheduling memory 1606.

ここで,バスアービタ160は,前記した所定期間が経過すると,バスマスタ毎に対応して格納されている使用可能サイクル数超過フラグ1601cを全てオフにする(リセット)。このとき,既に,割り当てレジスタ1604に設定された値が各バスマスタに対応してバスマスタメモリ1601に格納されている。   Here, when the predetermined period elapses, the bus arbiter 160 turns off all the usable cycle number excess flags 1601c stored corresponding to each bus master (reset). At this time, the value set in the allocation register 1604 is already stored in the bus master memory 1601 corresponding to each bus master.

そして,第1のバスマスタが,バスの使用権をバスアービタ160に要求すると,バスアービタ160はこの要求を受け付け,第1のバスマスタに使用権を渡し,データ転送を実行させる。このデータ転送要求の実行中,使用サイクル数カウンタ1602は,第1のバスマスタの使用済みサイクル数をカウントし第1のバスマスタ用の使用済みサイクル数1601dに格納する。そして,このデータ転送を実行中に,第2のバスマスタが,バスの使用権をバスアービタ160に要求すると,バスアービタ160はこの要求を受け付け,第1,第2のバスマスタに対応して格納されている優先度1601aに従ってバス使用要求を仲裁する。同じく,使用サイクル数カウンタ1602は,第2のバスマスタの使用済みサイクル数をカウントし第2のバスマスタ用の使用済みサイクル数1601dに格納する。   When the first bus master requests the bus usage right to the bus arbiter 160, the bus arbiter 160 accepts this request, passes the usage right to the first bus master, and executes data transfer. During execution of this data transfer request, the used cycle number counter 1602 counts the number of used cycles of the first bus master and stores it in the number of used cycles 1601d for the first bus master. When the second bus master requests the right to use the bus to the bus arbiter 160 during execution of this data transfer, the bus arbiter 160 accepts this request and stores it corresponding to the first and second bus masters. Arbitrate bus use request according to priority 1601a. Similarly, the used cycle number counter 1602 counts the number of used cycles of the second bus master and stores it in the number of used cycles 1601d for the second bus master.

バスアービタ160は,第1のバスマスタの使用済みサイクル数が第1のバスマスタの使用可能サイクル数1601bを超過すると,同使用可能サイクル数超過フラグ1601cをオンに設定する。   When the used cycle number of the first bus master exceeds the usable cycle number 1601b of the first bus master, the bus arbiter 160 sets the usable cycle number excess flag 1601c to ON.

そして,所定期間内において,使用可能サイクル数超過フラグがオンに設定されている第1のバスマスタ,同フラグがオフに設定されている第2のバスマスタからバスの使用要求が再度あると,バスアービタ160は,第1のバスマスタにはバス使用権を渡さずに,第2のバスマスタにバス使用権を渡す制御を実行する。その結果,バス使用権を獲得した第2のバスマスタは,優先的にバスを使用することができる。   Then, if there is a bus use request again from the first bus master in which the usable cycle count excess flag is set on and the second bus master in which the flag is set off in a predetermined period, the bus arbiter 160 Executes control to pass the bus usage right to the second bus master without passing the bus usage right to the first bus master. As a result, the second bus master that has acquired the bus use right can use the bus preferentially.

以後,バスアービタ160は,前記した所定期間が経過すると,バスマスタ毎に対応して記録されている使用可能サイクル数超過フラグ1601cを全てオフにする。   Thereafter, when the predetermined period elapses, the bus arbiter 160 turns off all the usable cycle number excess flags 1601c recorded for each bus master.

ここで,前述のように,第1のバスマスタをスケジューリングされないバスマスタ,第2のバスマスタをスケジューリングされたバスマスタとする。第1のバスマスタと第2のバスマスタからバス使用要求がある場合,第1のバスマスタの使用可能サイクル数超過フラグは,第2のバスマスタの使用可能サイクル数超過フラグがオンに設定されるよりも先にオンに設定される。これは,前述したように,第1のバスマスタの使用可能サイクル数(使用可能時間)は,第2のバスマスタの使用可能サイクル数に比べて少ないからである。第1のバスマスタの使用可能サイクル数超過フラグが先にオンに設定されると,以後,第2のバスマスタは,バスを優先的に使用できるようになり,効率的にデータ転送を実行できる。   Here, as described above, it is assumed that the first bus master is a non-scheduled bus master and the second bus master is a scheduled bus master. When there is a bus use request from the first bus master and the second bus master, the usable cycle count excess flag of the first bus master is earlier than the usable cycle count excess flag of the second bus master is set to ON. Set to on. This is because, as described above, the number of usable cycles (usable time) of the first bus master is smaller than the number of usable cycles of the second bus master. If the usable cycle count excess flag of the first bus master is set to ON first, the second bus master can use the bus preferentially and perform data transfer efficiently.

以上説明したように,第3の実施の形態によれば,スケジューリングされた第2のバスマスタによるデータ転送が,スケジューリングされていない第1のバスマスタが実行するデータ転送によって妨害されることがなくなり,第2のバスマスタは,効率的にデータ転送を実行できる。   As described above, according to the third embodiment, the data transfer by the scheduled second bus master is not hindered by the data transfer executed by the first non-scheduled bus master. The second bus master can execute data transfer efficiently.

(第4の実施の形態)
CPU12は,PIO転送を実行する機能を有する。PIO転送機能により,CPU12は,独自にデータ転送を実行することができる。CPU12において実行されるタスクは,PIO転送機能を利用してデータ転送を実行することがある。
(Fourth embodiment)
The CPU 12 has a function of executing PIO transfer. The PIO transfer function allows the CPU 12 to execute data transfer independently. A task executed in the CPU 12 may execute data transfer using the PIO transfer function.

このような場合,スケジューリング手段22によりスケジューリングされずに,CPU12がPIO転送を実行すると,スケジューリングされたバスマスタが実行するデータ転送要求の効率が低下する。従って,CPU12が実行するPIO転送をスケジューリング手段22によりスケジューリングする必要がある。   In such a case, if the CPU 12 executes PIO transfer without being scheduled by the scheduling means 22, the efficiency of the data transfer request executed by the scheduled bus master decreases. Therefore, it is necessary to schedule the PIO transfer executed by the CPU 12 by the scheduling means 22.

図16は,第4の実施の形態のソフトウェアの機能ブロック図である。   FIG. 16 is a functional block diagram of software according to the fourth embodiment.

タスク51は,PIO転送をCPU12に実行させる処理単位(プログラム)を含むタスクであり,前述したようにCPU12により実行されている。   The task 51 is a task including a processing unit (program) that causes the CPU 12 to execute the PIO transfer, and is executed by the CPU 12 as described above.

PIO転送開始要求API呼び出し手段511は,スケジューリング手段22にPIO転送の開始要求を実行するAPIを呼び出す。このAPIの呼び出しにより,PIO転送用のデータ転送要求がタスク51により生成され,スケジューリング手段22に入力される。このデータ転送要求のデータ転送要求の種類には,CPUのPIO転送が記録される(図4参照)。以下,このデータ転送要求をPIOデータ転送要求と記す。   The PIO transfer start request API calling means 511 calls an API for executing a PIO transfer start request to the scheduling means 22. By this API call, a data transfer request for PIO transfer is generated by the task 51 and input to the scheduling means 22. The data transfer request type of this data transfer request records the PIO transfer of the CPU (see FIG. 4). Hereinafter, this data transfer request is referred to as a PIO data transfer request.

PIO転送命令手段512は,CPU12にPIOデータ転送要求の実行命令を行い,CPU12にこのPIOデータ転送要求に対応するPIO転送を実行させる。PIO転送完了通知API呼び出し手段513は,PIOデータ転送が完了すると,その旨をスケジューリング手段22に通知するPIO転送完了通知APIを呼び出す。タスク51は,PIO転送開始要求API呼び出し手段511,PIO転送命令手段512,PIO転送完了通知API呼び出し手段513をこの順で実行する。そのため,PIO転送開始要求API呼び出し手段511の実行により,PIOデータ転送要求に対応するPIO転送がCPU12により実行されることになる。   The PIO transfer instruction means 512 instructs the CPU 12 to execute a PIO data transfer request and causes the CPU 12 to execute a PIO transfer corresponding to the PIO data transfer request. When the PIO data transfer is completed, the PIO transfer completion notification API calling unit 513 calls the PIO transfer completion notification API that notifies the scheduling unit 22 of the completion. The task 51 executes the PIO transfer start request API calling means 511, the PIO transfer instruction means 512, and the PIO transfer completion notification API calling means 513 in this order. Therefore, the PIO transfer corresponding to the PIO data transfer request is executed by the CPU 12 by the execution of the PIO transfer start request API calling means 511.

そこで,スケジューリング手段22は,要求発生受け付け手段221がPIOデータ転送要求を受け付けると,CPU12にこのPIOデータ転送要求に対応するPIO転送の実行を開始させない。そして,受け付けたデータ転送要求の中で,PIOデータ転送要求の優先度が最も高くなると,CPU12にこのPIO転送の実行を開始させる。このようにすることで,スケジューリング手段22は,CPU12によるPIO転送をスケジューリングすることができる。   Therefore, when the request generation accepting means 221 accepts the PIO data transfer request, the scheduling means 22 does not cause the CPU 12 to start executing the PIO transfer corresponding to this PIO data transfer request. When the priority of the PIO data transfer request becomes the highest among the received data transfer requests, the CPU 12 is caused to start executing this PIO transfer. In this way, the scheduling means 22 can schedule PIO transfer by the CPU 12.

なお,PIO転送開始要求API呼び出し手段511を実行する前には,タスク51は何らかの処理を実行し,PIO転送完了通知API呼び出し手段513を実行した後には,タスク51は次の処理を実行する場合がある。   Note that task 51 executes some processing before executing PIO transfer start request API calling means 511, and task 51 executes the following processing after executing PIO transfer completion notification API calling means 513. There is.

CPUコア制御手段52は,要求発生受け付け手段221またはバス/転送制御手段225からの命令に応じて,CPU12のコアをOS23を介して制御する。タスク一時停止命令手段521は,OS23を介してCPU12にタスク51の実行を一時停止する命令を実行する。この一時停止命令により,CPU12はタスク51の実行を一時停止する。その結果,PIO転送命令手段512によるPIO転送の実行命令がCPU12に対して行わなくなり,CPU12は,PIO転送の実行を開始しない。タスク再開命令手段522は,OS23を介してCPU12に一時停止していたタスクの実行を再開する命令を実行する。この再開命令により,CPU12は一時停止していたタスクの実行を再開する。その結果,PIO転送命令手段512によるPIO転送の実行命令が行われ,CPU12は,PIO転送の実行を開始する。   The CPU core control means 52 controls the core of the CPU 12 via the OS 23 in response to an instruction from the request generation accepting means 221 or the bus / transfer control means 225. The task suspension instruction means 521 executes an instruction to suspend execution of the task 51 to the CPU 12 via the OS 23. With this temporary stop instruction, the CPU 12 temporarily stops the execution of the task 51. As a result, the PIO transfer execution instruction by the PIO transfer instruction means 512 is not issued to the CPU 12, and the CPU 12 does not start executing the PIO transfer. The task resuming instruction means 522 executes a command for resuming the execution of the task temporarily suspended in the CPU 12 via the OS 23. With this resume instruction, the CPU 12 resumes the execution of the task that has been paused. As a result, a PIO transfer execution instruction is performed by the PIO transfer instruction means 512, and the CPU 12 starts executing the PIO transfer.

図17A〜図17Cは,PIOデータ転送要求の実行開始を説明するフロー図である。   17A to 17C are flowcharts for explaining the start of execution of a PIO data transfer request.

ステップS101: PIO転送開始要求API呼び出し手段511は,PIO転送開始要求APIを呼び出す。このとき,PIO転送開始要求APIに引数として,タスク51が生成したPIOデータ転送要求を設定する。このPIOデータ転送要求のデータ転送要求の種類には「CPUによるPIO転送」(図4参照)が記録される。   Step S101: The PIO transfer start request API calling means 511 calls the PIO transfer start request API. At this time, the PIO data transfer request generated by the task 51 is set as an argument in the PIO transfer start request API. In the type of data transfer request of this PIO data transfer request, “PIO transfer by CPU” (see FIG. 4) is recorded.

ステップS102:スケジューリング手段22の要求発生受け付け手段221は,PIOデータ転送要求を受け付け,データ転送要求の種類に「CPUによるPIO転送」が記録されていることを確認し,PIOデータ転送要求用の識別子を,このPIOデータ転送要求に割り当てる。この識別子は,スケジューリング手段22がPIOデータ転送要求を管理するために利用される。また,この識別子は,タスク51により呼び出されたデータ転送要求APIの戻り値として,タスク51に入力される。   Step S102: The request generation accepting means 221 of the scheduling means 22 accepts the PIO data transfer request, confirms that “PIO transfer by CPU” is recorded in the type of data transfer request, and identifies the identifier for the PIO data transfer request. Is assigned to this PIO data transfer request. This identifier is used by the scheduling means 22 to manage the PIO data transfer request. This identifier is input to the task 51 as a return value of the data transfer request API called by the task 51.

ステップS103:要求発生受け付け手段221は,ステップS102の確認により,CPUコア制御手段52にCPU12が実行中のタスク51を一時停止するように命令する。   Step S103: The request generation accepting means 221 instructs the CPU core control means 52 to suspend the task 51 being executed by the CPU 12 based on the confirmation in step S102.

ステップS104:CPUコア制御手段52のタスク一時停止命令手段521は,OS23を介して実行中のタスクの一時停止を命令するようにCPU12に命令する。CPU12は,実行中のタスクを一時停止する。その結果,PIO転送は実行されない。   Step S104: The task suspension instruction means 521 of the CPU core control means 52 instructs the CPU 12 to instruct suspension of the task being executed via the OS 23. The CPU 12 temporarily stops the task being executed. As a result, no PIO transfer is performed.

ステップS105:要求発生受け付け手段221は,受け付けたPIOデータ転送要求を要求格納部141に格納するように要求管理手段223に命令する。同時に,要求発生受け付け手段221は,このデータ転送要求,識別子を優先度付きスケジューラ224に出力する。   Step S105: The request generation acceptance unit 221 instructs the request management unit 223 to store the accepted PIO data transfer request in the request storage unit 141. At the same time, the request generation accepting means 221 outputs this data transfer request and identifier to the scheduler 224 with priority.

ステップS106〜S112の処理は,ステップS4〜S10の処理と同様なので,その説明を省略する。   Since the processing of steps S106 to S112 is the same as the processing of steps S4 to S10, description thereof is omitted.

ステップS113:バス/転送制御手段225は,最も優先度が高いデータ転送要求,すなわちPIOデータ転送要求に基づいて,PIOデータ転送要求を実行するようにCPUコア制御手段52に命令する。ステップS11で説明したように,ステップS112において,優先度付きスケジューラ224から最も優先度が高いデータ転送要求の識別子,すなわちPIOデータ転送要求用の識別子がバス/転送制御手段225に入力される。バス/転送制御手段225は,このPIOデータ転送要求用の識別子により,実行対象となるデータ転送要求がPIOデータ転送であることを判別し,CPUコア制御手段52に前記した命令を実行する。このとき,DMAC11により実行中のデータ転送要求が実行されている場合には,このデータ転送要求を一時停止するように,バスマスタドライバ制御手段226に命令する。このデータ転送の一時停止命令については,図5CのステップS12で説明したので省略する。   Step S113: The bus / transfer control means 225 instructs the CPU core control means 52 to execute the PIO data transfer request based on the highest priority data transfer request, that is, the PIO data transfer request. As described in step S11, in step S112, the identifier of the data transfer request with the highest priority, that is, the identifier for the PIO data transfer request is input to the bus / transfer control means 225 from the scheduler 224 with priority. Based on this PIO data transfer request identifier, the bus / transfer control means 225 determines that the data transfer request to be executed is PIO data transfer, and executes the above-mentioned instruction to the CPU core control means 52. At this time, if a data transfer request being executed by the DMAC 11 is being executed, the bus master driver control means 226 is instructed to temporarily stop the data transfer request. This data transfer temporary stop instruction has been described in step S12 in FIG.

ステップS114:CPUコア制御手段52のタスク再開命令手段522は,バス/転送制御手段225からのPIOデータ転送要求の実行命令に応答し,OS23を介して一時停止していたタスクの再開をCPU12に命令する。   Step S114: The task resumption instruction means 522 of the CPU core control means 52 responds to the execution instruction of the PIO data transfer request from the bus / transfer control means 225, and resumes the task temporarily suspended via the OS 23 to the CPU 12. Command.

ステップS115:CPU12は,タスク再開の命令に応答し,タスク51を再開し,再開されたタスク51は,PIO転送命令手段512を実行する。すなわち,CPU12は,ステップS101で生成したPIOデータ転送要求に基づき,PIO転送を実行する。   Step S115: In response to the task restart command, the CPU 12 restarts the task 51, and the restarted task 51 executes the PIO transfer command means 512. That is, the CPU 12 executes PIO transfer based on the PIO data transfer request generated in step S101.

図18A,図18Bは,PIOデータ転送要求が完了した場合の処理を説明するフロー図である。   18A and 18B are flowcharts for explaining processing when a PIO data transfer request is completed.

ステップS121:CPU12が,図17CのステップS115で説明したPIOデータ転送要求を完了すると,タスク51は,PIO転送完了通知API呼び出し手段513を実行し,PIOデータ転送要求が完了したことを,ステップS102において入力されたPIOデータ転送要求用の識別子と共にスケジューリング手段22の要求完了通知受け付け手段222に通知する。   Step S121: When the CPU 12 completes the PIO data transfer request described in step S115 of FIG. 17C, the task 51 executes the PIO transfer completion notification API calling means 513 to indicate that the PIO data transfer request has been completed. Is notified to the request completion notification accepting means 222 of the scheduling means 22 together with the identifier for the PIO data transfer request inputted in.

ステップS122〜S127の処理は,図6A,図6Bで説明したステップS22〜S27の処理と同様なので,その説明を省略する。   The processing of steps S122 to S127 is the same as the processing of steps S22 to S27 described with reference to FIGS. 6A and 6B, and thus description thereof is omitted.

ステップS128:優先度付きスケジューラ224は,最も優先度が高いデータ転送要求の識別子をバス/転送制御手段225に出力する。   Step S128: The scheduler with priority 224 outputs the identifier of the data transfer request with the highest priority to the bus / transfer control means 225.

ステップS129:バス/転送制御手段225は,最も優先度が高いデータ転送要求に基づいて,データ転送要求を実行するようにCPUコア制御手段52またはバスマスタドライバ制御手段226に命令する。ここでは,優先度付きスケジューラ224から入力された識別子が,PIOデータ転送要求用の識別子の場合,前記の命令をCPUコア制御手段52に行う。また,入力された識別子が,それ以外の場合,前記の命令をバスマスタドライバ制御手段226に行う。CPUコア制御手段52が前記命令を受けた場合,ステップS130に進む。バスマスタドライバ制御手段226が前記命令を受けた場合,ステップS131に進む。   Step S129: The bus / transfer control means 225 instructs the CPU core control means 52 or the bus master driver control means 226 to execute the data transfer request based on the data transfer request with the highest priority. Here, if the identifier input from the priority-added scheduler 224 is an identifier for a PIO data transfer request, the above command is sent to the CPU core control means 52. If the input identifier is other than that, the command is sent to the bus master driver control means 226. When the CPU core control means 52 receives the command, the process proceeds to step S130. When the bus master driver control means 226 receives the command, the process proceeds to step S131.

ステップS130の処理については,図17CのステップS114の処理と同様なので説明を省略する。なお,ステップS130の処理は,例えばタスク51以外のタスクからPIOデータ転送要求をスケジューリング手段22が受け付けていた場合に実行される。また,ステップS131の処理については,ステップS6BのステップS30 の処理と同様なので説明を省略する。   The processing in step S130 is the same as the processing in step S114 in FIG. Note that the processing in step S130 is executed when the scheduling means 22 has received a PIO data transfer request from a task other than the task 51, for example. Further, the processing in step S131 is the same as the processing in step S30 in step S6B, and thus description thereof is omitted.

第4の実施の形態によれば,CPUが実行するPIOデータ転送をスケジューリング手段22によりスケジューリングすることができる。その結果,スケジューリングされたバスマスタが実行するデータ転送要求の効率が低下することがない。   According to the fourth embodiment, the scheduling means 22 can schedule the PIO data transfer executed by the CPU. As a result, the efficiency of the data transfer request executed by the scheduled bus master does not decrease.

説明した各実施の形態において,CPU12は,複数のタスクを実行してもよい。また,複数のDMACなどのバスマスタデバイスを設けてもよい。この場合,このバスマスタデバイスを制御するバスマスタドライバ手段も設ける。   In each of the described embodiments, the CPU 12 may execute a plurality of tasks. A plurality of bus master devices such as DMAC may be provided. In this case, bus master driver means for controlling the bus master device is also provided.

また,説明した各実施の形態を組み合わせてもよい。例えば,第2の実施の形態と,第3の実施の形態を組み合わせてもよい。また,第2の実施の形態と,第4の実施の形態を組み合わせてもよい。   Moreover, you may combine each embodiment demonstrated. For example, the second embodiment and the third embodiment may be combined. Further, the second embodiment and the fourth embodiment may be combined.

以上の実施の形態をまとめると,次の付記のとおりである。   The above embodiment is summarized as follows.

(付記1)
バスと,
前記バスに接続されたCPUと,
前記バスに接続され,前記バスを介したデータ転送を実行する複数のバスマスタと,
前記バスマスタからのバス使用要求を仲裁して何れかのバスマスタにバス使用権を与えるバスアービタと,
前記複数のバスマスタを制御するバスマスタドライバ手段と,
前記CPUによって実行されるタスクが生成したデータ転送要求を受け付け,前記受け付けた前記データ転送要求の中で,最も優先度が高いデータ転送要求を選択し,当該選択したデータ転送要求の実行を前記バスマスタドライバ手段に命令するスケジューリング手段とを有し,
前記バスマスタドライバ手段は,前記命令に応答して,前記選択したデータ転送要求に対応するバスマスタに前記選択したデータ転送要求を実行させるデータ転送システム。
(Appendix 1)
With bus,
A CPU connected to the bus;
A plurality of bus masters connected to the bus and executing data transfer via the bus;
A bus arbiter that arbitrates a bus use request from the bus master and gives a bus use right to any of the bus masters;
Bus master driver means for controlling the plurality of bus masters;
A data transfer request generated by a task executed by the CPU is received, a data transfer request with the highest priority is selected from the received data transfer requests, and execution of the selected data transfer request is performed by the bus master. Scheduling means for instructing the driver means;
The bus master driver means, in response to the command, causes the bus master corresponding to the selected data transfer request to execute the selected data transfer request.

(付記2)
付記1において,
前記スケジューリング手段は,前記選択したデータ転送要求が前記バスマスタにより実行されている間に,前記タスクにより新たに生成されたデータ転送要求を受け付けると,前記受け付けたデータ転送要求の優先度が,前記実行されているデータ転送要求の優先度よりも高い場合に,当該実行されているデータ転送要求の一時停止を前記バスマスタドライバ手段に命令すると共に,前記新たに生成されたデータ転送要求の実行を前記バスマスタドライバ手段に命令し,
前記バスマスタドライバ手段は,前記実行されているデータ転送要求を一時停止すると共に,前記新たに生成されたデータ転送要求の実行命令に応答して,前記実行されているデータ転送要求の一時停止を前記バスマスタに実行させ,前記新たに生成されたデータ転送要求に対応するバスマスタに当該データ転送要求を実行させるデータ転送システム。
(Appendix 2)
In Appendix 1,
When the scheduling unit receives a data transfer request newly generated by the task while the selected data transfer request is being executed by the bus master, the priority of the received data transfer request is If the priority is higher than the priority of the data transfer request being made, the bus master driver means is instructed to temporarily stop the data transfer request being executed, and the bus master driver is requested to execute the newly generated data transfer request. Command the driver means,
The bus master driver means suspends the data transfer request being executed and suspends the data transfer request being executed in response to the execution command of the newly generated data transfer request. A data transfer system that causes a bus master to execute and causes the bus master corresponding to the newly generated data transfer request to execute the data transfer request.

(付記3)
付記2において,
前記スケジューリング手段は,前記新たに生成されたデータ転送要求の実行が完了したこと示す完了通知を受け付けると,前記完了通知に応答して,前記一時停止していたデータ転送要求の再開を前記バスマスタドライバ手段に命令し,
前記バスマスタドライバ手段は,前記バスマスタに前記一時停止しているデータ転送要求を再開させるデータ転送システム。
(Appendix 3)
In Appendix 2,
When the scheduling means receives a completion notification indicating that the execution of the newly generated data transfer request is completed, the bus master driver resumes the suspended data transfer request in response to the completion notification. Command the means,
The bus master driver means causes the bus master to resume the temporarily stopped data transfer request.

(付記4)
付記1から3の何れかにおいて,
前記スケジューリング手段は,前記タスクから前記データ転送要求の一時停止命令を受け付けると,前記一時停止命令に応答し,前記データ転送要求のスケジューリングを一時停止し,前記タスクから前記一時停止していたデータ転送要求の再開命令を受け付けると,前記再開命令に応答し,前記一時停止していたデータ転送要求のスケジューリングを再開するデータ転送システム。
(Appendix 4)
In any one of supplementary notes 1 to 3,
When the scheduling unit receives the data transfer request suspension command from the task, the scheduling unit suspends scheduling of the data transfer request in response to the suspension command, and the suspended data transfer from the task. A data transfer system that, upon receiving a request resumption instruction, responds to the resumption instruction and resumes scheduling of the suspended data transfer request.

(付記5)
付記1から4の何れかにおいて,
前記スケジューリング手段は,前記タスクから前記データ転送要求の強制終了命令を受け付けると,前記強制終了命令に応答し,前記データ転送要求のスケジューリングを終了するデータ転送システム。
(Appendix 5)
In any one of appendices 1 to 4,
When the scheduling means receives a forced termination command for the data transfer request from the task, the scheduling means ends the scheduling of the data transfer request in response to the forced termination command.

(付記6)
付記1から5の何れかにおいて,
前記バスアービタは,前記複数のバスマスタからのバス使用要求に対して,前記複数のバスマスタに設定された優先度に従って,時分割で前記バスのバス使用権の割り当てを行うデータ転送システム。
(Appendix 6)
In any one of appendices 1 to 5,
The bus arbiter is a data transfer system that assigns bus usage rights to the buses in a time-sharing manner according to the priority set for the plurality of bus masters in response to bus use requests from the plurality of bus masters.

(付記7)
付記1から6の何れかにおいて,
前記バスは,複数のバスが多段に接続されたバス構造を有するデータ転送システム。
(Appendix 7)
In any one of supplementary notes 1 to 6,
The bus is a data transfer system having a bus structure in which a plurality of buses are connected in multiple stages.

(付記8)
付記1から7の何れかにおいて,
さらに,前記バスを介したデータ転送を実行し,前記バスに直接接続,または,他のバスなどを介して接続される外部バスマスタと,
前記外部バスマスタを制御する外部バスマスタドライバ手段とを有し,
前記スケジューリング手段は,前記選択したデータ転送要求が,前記外部バスマスタにデータ転送要求を実行させる場合,当該データ転送要求の実行を前記外部バスマスタドライバ手段に命令し,
前記外部バスマスタドライバ手段は,前記命令に応答して,前記外部バスマスタに前記選択したデータ転送要求を実行させるデータ転送システム。
(Appendix 8)
In any one of appendices 1 to 7,
Furthermore, an external bus master that performs data transfer via the bus and is directly connected to the bus or connected via another bus,
External bus master driver means for controlling the external bus master;
The scheduling means instructs the external bus master driver means to execute the data transfer request when the selected data transfer request causes the external bus master to execute the data transfer request;
The external bus master driver means causes the external bus master to execute the selected data transfer request in response to the command.

(付記9)
付記1から7の何れかにおいて,
前記複数のバスマスタの何れかは,前記タスクが生成したデータ転送要求を,前記スケジューリング手段を介さずに実行し,
前記スケジューリング手段は,受け付け中のデータ転送要求を実行するバスマスタのバス使用可能時間を当該データ転送要求のデータ転送量に基づき,当該データ転送要求を実行しないバスマスタのバス使用可能時間よりも長く算出し,
前記バスアービタは,前記バス使用可能時間がより長いバスマスタに優先的にバス使用権を与えるデータ転送システム。
(Appendix 9)
In any one of appendices 1 to 7,
Any of the plurality of bus masters executes the data transfer request generated by the task without passing through the scheduling means,
The scheduling means calculates the bus usable time of the bus master executing the accepted data transfer request based on the data transfer amount of the data transfer request longer than the bus usable time of the bus master not executing the data transfer request. ,
The bus arbiter is a data transfer system that preferentially gives a bus use right to a bus master having a longer bus usable time.

(付記10)
付記9において,
前記バスアービタは,前記複数のバスマスタのバス使用済み時間をカウントし,
前記スケジューリング手段は,前記バスマスタのバス使用可能時間を,さらに,当該バスマスタのバス使用済み時間に基づき算出するデータ転送システム。
(Appendix 10)
In Appendix 9,
The bus arbiter counts the bus used time of the plurality of bus masters,
The data transfer system, wherein the scheduling means calculates a bus usable time of the bus master based on a bus used time of the bus master.

(付記11)
付記1から7の何れかにおいて,
前記CPUは,PIO(Programmed I/O)転送を実行し,
前記タスクは,前記CPUにPIO転送を実行させるPIOデータ転送要求を生成し,前記PIOデータ転送要求に対応するPIO転送を前記CPUに実行させ,
前記スケジューリング手段は,前記PIOデータ転送要求を受け付けると,前記CPUに前記PIO転送の実行を開始させず,前記受け付けた前記データ転送要求の中で,前記PIOデータ転送要求の優先度が最も高くなると,前記CPUに前記PIO転送の実行を開始させるデータ転送システム。
(Appendix 11)
In any one of appendices 1 to 7,
The CPU executes PIO (Programmed I / O) transfer,
The task generates a PIO data transfer request that causes the CPU to execute a PIO transfer, causes the CPU to execute a PIO transfer corresponding to the PIO data transfer request,
When the scheduling means accepts the PIO data transfer request, the scheduling means does not cause the CPU to start executing the PIO transfer, and the priority of the PIO data transfer request becomes the highest among the accepted data transfer requests. A data transfer system for causing the CPU to start executing the PIO transfer.

(付記12)
バスと,前記バスに接続されたCPUと,前記バスに接続され,前記バスを介したデータ転送を実行する複数のバスマスタと,前記複数のバスマスタを制御するバスマスタドライバ手段とを有するデータ転送システムにおいて前記CPUが実行するデータ転送スケジューリングプログラムであって,
前記CPUによって実行されるタスクが生成したデータ転送要求を受け付ける工程と,
前記受け付けた前記データ転送要求の中で,最も優先度が高いデータ転送要求を選択し,当該選択したデータ転送要求の実行を前記バスマスタドライバ手段に命令して,前記バスマスタドライバ手段により,前記選択したデータ転送要求に対応するバスマスタに前記選択したデータ転送要求を実行させる工程とを,前記CPUに実行させるデータ転送スケジューリングプログラム。
(Appendix 12)
In a data transfer system comprising a bus, a CPU connected to the bus, a plurality of bus masters connected to the bus and executing data transfer via the bus, and bus master driver means for controlling the plurality of bus masters A data transfer scheduling program executed by the CPU,
Receiving a data transfer request generated by a task executed by the CPU;
The data transfer request having the highest priority is selected from the received data transfer requests, the bus master driver means is instructed to execute the selected data transfer request, and the bus master driver means selects the selected data transfer request. A data transfer scheduling program for causing the CPU to execute a step of causing the bus master corresponding to the data transfer request to execute the selected data transfer request.

(付記13)
付記12において,
さらに,前記選択したデータ転送要求が前記バスマスタにより実行されている間に,前記タスクにより新たに生成されたデータ転送要求を受け付けると,前記受け付けたデータ転送要求の優先度が,前記実行されているデータ転送要求の優先度よりも高い場合に,当該実行されているデータ転送要求を一時停止すると共に,前記新たに生成されたデータ転送要求の実行を前記バスマスタドライバ手段に命令して,前記バスマスタドライバ手段により,前記実行されているデータ転送要求の一時停止を前記バスマスタに実行させ,前記新たに生成されたデータ転送要求に対応するバスマスタに当該データ転送要求を実行させる工程を前記CPUに実行させるデータ転送スケジューリングプログラム。
(Appendix 13)
In Appendix 12,
Further, when a data transfer request newly generated by the task is received while the selected data transfer request is being executed by the bus master, the priority of the received data transfer request is being executed. When the priority of the data transfer request is higher, the data transfer request being executed is temporarily stopped, and the bus master driver means is instructed to execute the newly generated data transfer request. Means for causing the bus master to temporarily stop the data transfer request being executed, and causing the CPU to execute a step of causing the bus master corresponding to the newly generated data transfer request to execute the data transfer request. Transfer scheduling program.

1…データ転送システム,10…ハードウェア,11…DMAC,12…CPU,13…IRC,14…メモリ,15…外部バスマスタ,16…バス,16a…バスアービタ,20…ソフトウェア,21…タスク,22…スケジューリング手段,221…要求発生受け付け手段,222…要求完了通知受け付け手段,223…要求管理手段,224…スケジューラ,225…転送制御手段,226…バスマスタドライバ制御手段,23…OS,24…バスマスタドライバ手段,141…要求格納部,142…優先度別要求キュー,31…外部バスマスタドライバ制御手段,32…外部バスマスタドライバ手段,41…バスアービタ制御手段,411…統計情報読み出し手段,412…使用割合算出手段,413…使用可能サイクル数算出手段,414…優先度算出手段,415…割り当て情報設定手段,42…アービタドライバ群,420…バスアービタドライバ手段,4201…レジスタ設定手段,4202…統計情報レジスタ読み出し手段,51…タスク,511…PIO転送開始要求API呼び出し手段,512…PIO転送命令手段,513…PIO転送完了通知API呼び出し手段,52…CPUコア制御手段,521…タスク一時停止命令手段,522…タスク再開命令手段。 1 ... Data transfer system, 10 ... Hardware, 11 ... DMAC, 12 ... CPU, 13 ... IRC, 14 ... Memory, 15 ... External bus master, 16 ... Bus, 16a ... Bus arbiter, 20 ... Software, 21 ... Task, 22 ... Scheduling means, 221 ... request generation acceptance means, 222 ... request completion notice acceptance means, 223 ... request management means, 224 ... scheduler, 225 ... transfer control means, 226 ... bus master driver control means, 23 ... OS, 24 ... bus master driver means , 141 ... request storage unit, 142 ... request queue according to priority, 31 ... external bus master driver control means, 32 ... external bus master driver means, 41 ... bus arbiter control means, 411 ... statistical information reading means, 412 ... usage rate calculation means, 413 ... Usable cycle number calculating means, 414 ... Priority calculating means, 415 ... Assignment information setting means, 42 ... Arbiter driver group, 420 ... Bus arbiter driver means, 4201 ... Register setting means, 4202 ... Statistical information register reading means, 51 ... Task, 511 ... PIO transfer start request API calling means, 512 ... PIO transfer instruction means, 513 ... PIO transfer completion notification API calling means, 52 ... CPU core control means, 521 ... Task temporary stop command means, 522 ... Task restart command means.

Claims (7)

バスと,
前記バスに接続されたCPUと,
前記バスに接続され,前記バスを介したデータ転送を実行する複数のバスマスタと,
前記バスマスタからのバス使用要求を仲裁して何れかのバスマスタにバス使用権を与えるバスアービタと,
前記複数のバスマスタを制御するバスマスタドライバ手段と,
前記CPUによって実行されるタスクが生成したデータ転送要求を受け付け,前記受け付けた前記データ転送要求の中で,最も優先度が高いデータ転送要求を選択し,当該選択したデータ転送要求の実行を前記バスマスタドライバ手段に命令するスケジューリング手段とを有し,
前記バスマスタドライバ手段は,前記命令に応答して,前記選択したデータ転送要求に対応するバスマスタに前記選択したデータ転送要求を実行させ,
前記複数のバスマスタの何れかは,前記タスクが生成したデータ転送要求を,前記スケジューリング手段を介さずに実行し,
前記スケジューリング手段は,受け付け中のデータ転送要求を実行するバスマスタのバス使用可能時間を当該データ転送要求のデータ転送量に基づき,当該データ転送要求を実行しないバスマスタのバス使用可能時間よりも長く算出し,
前記バスアービタは,前記バス使用可能時間がより長いバスマスタに優先的にバス使用権を与えるデータ転送システム。
With bus,
A CPU connected to the bus;
A plurality of bus masters connected to the bus and executing data transfer via the bus;
A bus arbiter that arbitrates a bus use request from the bus master and gives a bus use right to any of the bus masters;
Bus master driver means for controlling the plurality of bus masters;
A data transfer request generated by a task executed by the CPU is received, a data transfer request with the highest priority is selected from the received data transfer requests, and execution of the selected data transfer request is performed by the bus master. Scheduling means for instructing the driver means;
The bus master driver means, in response to the command, causes the bus master corresponding to the selected data transfer request to execute the selected data transfer request,
Any of the plurality of bus masters executes the data transfer request generated by the task without passing through the scheduling means,
The scheduling means calculates the bus usable time of the bus master executing the accepted data transfer request based on the data transfer amount of the data transfer request longer than the bus usable time of the bus master not executing the data transfer request. ,
The bus arbiter is a data transfer system that preferentially gives a bus use right to a bus master having a longer bus usable time.
請求項において,
前記スケジューリング手段は,前記選択したデータ転送要求が前記バスマスタにより実行されている間に,前記タスクにより新たに生成されたデータ転送要求を受け付けると,前記受け付けたデータ転送要求の優先度が,前記実行されているデータ転送要求の優先度よりも高い場合に,当該実行されているデータ転送要求の一時停止を前記バスマスタドライバ手段に命令すると共に,前記新たに生成されたデータ転送要求の実行を前記バスマスタドライバ手段に命令し,
前記バスマスタドライバ手段は,前記実行されているデータ転送要求を一時停止すると共に,前記新たに生成されたデータ転送要求の実行命令に応答して,前記実行されているデータ転送要求の一時停止を前記バスマスタに実行させ,前記新たに生成されたデータ転送要求に対応するバスマスタに当該データ転送要求を実行させるデータ転送システム。
In claim 1 ,
When the scheduling unit receives a data transfer request newly generated by the task while the selected data transfer request is being executed by the bus master, the priority of the received data transfer request is If the priority is higher than the priority of the data transfer request being made, the bus master driver means is instructed to temporarily stop the data transfer request being executed, and the bus master driver is requested to execute the newly generated data transfer request. Command the driver means,
The bus master driver means suspends the data transfer request being executed and suspends the data transfer request being executed in response to the execution command of the newly generated data transfer request. A data transfer system that causes a bus master to execute and causes the bus master corresponding to the newly generated data transfer request to execute the data transfer request.
請求項において,
前記スケジューリング手段は,前記新たに生成されたデータ転送要求の実行が完了したことを示す完了通知を受け付けると,前記完了通知に応答して,前記一時停止していたデータ転送要求の再開を前記バスマスタドライバ手段に命令し,
前記バスマスタドライバ手段は,前記バスマスタに前記一時停止しているデータ転送要求を再開させるデータ転送システム。
In claim 1 ,
When the scheduling means receives a completion notification indicating that execution of the newly generated data transfer request is completed, the scheduling means resumes the suspended data transfer request in response to the completion notification. Command the driver means,
The bus master driver means causes the bus master to resume the temporarily stopped data transfer request.
請求項において,
前記バスアービタは,前記複数のバスマスタからのバス使用要求に対して,前記複数のバスマスタに設定された優先度に従って,時分割で前記バスのバス使用権の割り当てを行うデータ転送システム。
In claim 1 ,
The bus arbiter is a data transfer system that assigns bus usage rights to the buses in a time-sharing manner according to the priority set for the plurality of bus masters in response to bus use requests from the plurality of bus masters.
請求項において,
前記バスは,複数のバスが多段に接続されたバス構造を有するデータ転送システム。
In claim 1 ,
The bus is a data transfer system having a bus structure in which a plurality of buses are connected in multiple stages.
請求項において,
前記バスアービタは,前記複数のバスマスタのバス使用済み時間をカウントし,
前記スケジューリング手段は,前記バスマスタのバス使用可能時間を,さらに,当該バスマスタのバス使用済み時間に基づき算出するデータ転送システム。
In claim 1 ,
The bus arbiter counts the bus used time of the plurality of bus masters,
The data transfer system, wherein the scheduling means calculates a bus usable time of the bus master based on a bus used time of the bus master.
バスと,前記バスに接続されたCPUと,前記バスに接続され,前記バスを介したデータ転送を実行する複数のバスマスタと,前記バスマスタからのバス使用要求を仲裁して何れかのバスマスタにバス使用権を与えるバスアービタと,前記複数のバスマスタを制御するバスマスタドライバ手段とを有し,前記複数のバスマスタの何れかは,前記タスクが生成したデータ転送要求を,前記スケジューリング手段を介さずに実行するデータ転送システムにおいて前記CPUが実行するデータ転送スケジューリングプログラムであって,
前記CPUによって実行されるタスクが生成したデータ転送要求を受け付ける工程と,
前記受け付けた前記データ転送要求の中で,最も優先度が高いデータ転送要求を選択し,当該選択したデータ転送要求の実行を前記バスマスタドライバ手段に命令して,前記バスマスタドライバ手段により,前記選択したデータ転送要求に対応するバスマスタに前記選択したデータ転送要求を実行させる工程と,
前記スケジューリング手段により,受け付け中のデータ転送要求を実行するバスマスタのバス使用可能時間を当該データ転送要求のデータ転送量に基づき,当該データ転送要求を実行しないバスマスタのバス使用可能時間よりも長く算出させる工程と,
前記バスアービタにより,前記バス使用可能時間がより長いバスマスタに優先的にバス使用権を与えさせる工程とを,
前記CPUに実行させるデータ転送スケジューリングプログラム。
A bus, a CPU connected to the bus, a plurality of bus masters that are connected to the bus and execute data transfer via the bus, and a bus use request from the bus master is arbitrated to any bus master. A bus arbiter that gives a right to use and bus master driver means for controlling the plurality of bus masters, and any of the plurality of bus masters executes a data transfer request generated by the task without passing through the scheduling means; A data transfer scheduling program executed by the CPU in a data transfer system,
Receiving a data transfer request generated by a task executed by the CPU;
The data transfer request having the highest priority is selected from the received data transfer requests, the bus master driver means is instructed to execute the selected data transfer request, and the bus master driver means selects the selected data transfer request. Causing the bus master corresponding to the data transfer request to execute the selected data transfer request;
Based on the data transfer amount of the data transfer request, the scheduling means calculates the bus usable time of the bus master that executes the accepted data transfer request longer than the bus usable time of the bus master that does not execute the data transfer request. Process,
Causing the bus master to preferentially give a bus use right to the bus master having a longer bus usable time by the bus arbiter;
A data transfer scheduling program to be executed by the CPU.
JP2011030157A 2011-02-15 2011-02-15 Data transfer system, data transfer scheduling program Active JP5772040B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011030157A JP5772040B2 (en) 2011-02-15 2011-02-15 Data transfer system, data transfer scheduling program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011030157A JP5772040B2 (en) 2011-02-15 2011-02-15 Data transfer system, data transfer scheduling program

Publications (2)

Publication Number Publication Date
JP2012168808A JP2012168808A (en) 2012-09-06
JP5772040B2 true JP5772040B2 (en) 2015-09-02

Family

ID=46972890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011030157A Active JP5772040B2 (en) 2011-02-15 2011-02-15 Data transfer system, data transfer scheduling program

Country Status (1)

Country Link
JP (1) JP5772040B2 (en)

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3466214B2 (en) * 1992-11-13 2003-11-10 株式会社日立製作所 Information processing device
US5506969A (en) * 1993-11-29 1996-04-09 Sun Microsystems, Inc. Method and apparatus for bus bandwidth management
JPH1196108A (en) * 1997-09-18 1999-04-09 Toshiba Corp Computer system and bus control device
JPH11143823A (en) * 1997-11-07 1999-05-28 Toshiba Corp Computer device and bus controlling method applied to its device
JP2001117860A (en) * 1999-10-18 2001-04-27 Fujitsu Ltd Memory access priority switching controller
JP2001117862A (en) * 1999-10-21 2001-04-27 Nec Corp Microcomputer
JP2004013356A (en) * 2002-06-04 2004-01-15 Matsushita Electric Ind Co Ltd Bus arbitration system
JP2004078508A (en) * 2002-08-16 2004-03-11 Nec Micro Systems Ltd Bus arbitration circuit, bus arbitration method, and its program
JP2004118252A (en) * 2002-09-24 2004-04-15 Renesas Technology Corp Semiconductor data processor
JP2007052501A (en) * 2005-08-15 2007-03-01 Canon Inc Communication controller, communication control method, exposure apparatus, and device manufacturing method
JP2010165175A (en) * 2009-01-15 2010-07-29 Internatl Business Mach Corp <Ibm> Apparatus and method for controlling use right of bus
JP2010282405A (en) * 2009-06-04 2010-12-16 Renesas Electronics Corp Data processing system

Also Published As

Publication number Publication date
JP2012168808A (en) 2012-09-06

Similar Documents

Publication Publication Date Title
Elliott et al. GPUSync: A framework for real-time GPU management
WO2018006864A1 (en) Method, apparatus and system for creating virtual machine, control device and storage medium
JP4606142B2 (en) Scheduling method, scheduling apparatus, and multiprocessor system
US7853743B2 (en) Processor and interrupt controlling method
TWI502511B (en) Resource management in a multicore architecture
JP5770721B2 (en) Information processing system
TWI537831B (en) Multi-core processor,method to perform process switching,method to secure a memory block, apparatus to enable transactional processing using a multi core device and method to perform memory transactional processing
US8943252B2 (en) Latency sensitive software interrupt and thread scheduling
JP5653431B2 (en) Multiprocessor system
CN108279927B (en) Multi-channel instruction control method and system capable of adjusting instruction priority and controller
US20090100200A1 (en) Channel-less multithreaded DMA controller
JPH0954699A (en) Process scheduler of computer
JP2005517228A (en) Method and apparatus for scheduling requests using criteria of an ordered stage of scheduling
JP5578713B2 (en) Information processing device
JP2010044784A (en) Scheduling request in system
CN113316767A (en) Sag aware, dynamic priority change at a processor
Zini et al. Analyzing arm's mpam from the perspective of time predictability
JP5772040B2 (en) Data transfer system, data transfer scheduling program
JP2005092780A (en) Real time processor system and control method
Parikh et al. Performance parameters of RTOSs; comparison of open source RTOSs and benchmarking techniques
US11662948B2 (en) Norflash sharing
JP2015148909A (en) Parallel computer system, control method of parallel computer system, and control program of management node
JP4017005B2 (en) Arithmetic unit
WO2007039933A1 (en) Operation processing device
JP2004013356A (en) Bus arbitration system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131101

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140715

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140908

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150508

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20150518

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150615

R150 Certificate of patent (=grant) or registration of utility model

Ref document number: 5772040

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350