[go: up one dir, main page]

JP2008165463A - Bus control device - Google Patents

Bus control device Download PDF

Info

Publication number
JP2008165463A
JP2008165463A JP2006353815A JP2006353815A JP2008165463A JP 2008165463 A JP2008165463 A JP 2008165463A JP 2006353815 A JP2006353815 A JP 2006353815A JP 2006353815 A JP2006353815 A JP 2006353815A JP 2008165463 A JP2008165463 A JP 2008165463A
Authority
JP
Japan
Prior art keywords
dmac
dma transfer
bus
data
transfer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006353815A
Other languages
Japanese (ja)
Inventor
Masayuki Kino
雅之 城野
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2006353815A priority Critical patent/JP2008165463A/en
Publication of JP2008165463A publication Critical patent/JP2008165463A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

【課題】DMA転送が競合した場合でも効率良くバスのデータ転送をする。
【解決手段】データのDMA転送を制御するDMAC113を含む複数のDMAC内蔵デバイスにこれらDMAC内蔵デバイス間を接続するデータバス130を使用させるための制御を行うバス制御装置100であって、DMAC内蔵デバイスは、DMACの動作を制御するDMAC制御部114を備え、第1のDMAC内蔵デバイス110をデータバスのバスマスタとして第1のDMA転送を実行中に、第1のDMAC113の使用による後続の第2のDMA転送が要求された場合に、所定の条件に応じて、第1のDMAC制御部114から第2のDMAC制御部124に、第1のDMA転送の未転送データの転送を完了させるための設定情報を送信してから、第2のDMA転送を第1のDMACで実行させる。
【選択図】図1
Even when DMA transfer competes, bus data is transferred efficiently.
A bus control device 100 performs control for causing a plurality of DMAC built-in devices including a DMAC 113 that controls DMA transfer of data to use a data bus 130 that connects these DMAC built-in devices. Includes a DMAC control unit 114 that controls the operation of the DMAC, and the second DMAC 113 is used by the first DMAC 113 during the first DMA transfer while the first DMAC built-in device 110 is used as the data bus bus master. Setting for completing transfer of untransferred data of the first DMA transfer from the first DMAC control unit 114 to the second DMAC control unit 124 according to a predetermined condition when DMA transfer is requested After the information is transmitted, the second DMA transfer is executed by the first DMAC.
[Selection] Figure 1

Description

本発明は、情報処理装置等に使用されるバスシステムにおけるバス制御装置に関し、特に、大規模集積回路( LSI:Large Scale Integration )などに搭載されるDMA( Direct Memory Access )転送を行うDMAC( Direct Memory Access Controller )が内蔵されたDMAC内蔵デバイスが接続されたバスシステムでバスを使用するためのバス制御装置に関する。   The present invention relates to a bus control device in a bus system used for an information processing device or the like, and in particular, a DMAC (Direct Memory Access) transfer that is mounted on a large scale integrated circuit (LSI) or the like. The present invention relates to a bus control device for using a bus in a bus system to which a DMAC built-in device having a built-in Memory Access Controller is connected.

従来から、パーソナルコンピュータやワークステーション、オフィスコンピュータ等の情報処理装置に使用されるバスシステムでは、CPUを介さずに、I/O機器とメモリ間でバスを通じて直接データをやりとりするDMA転送が実行されるものがある。また、バスシステムでは、CPUのオーバヘッドを伴わずに、高速・大容量のデータ転送が可能となるDMA転送を実現するコントローラであるDMACを搭載するものがあり、外部装置からの受信データを主記憶部となるメモリに書き込み、また、メモリから送信データを読み出して外部装置に出力する等のデータ転送が実行される。当該データ転送をする際に、低速なシステムでは、中央処理装置( CPU:Central Processing Unit )がバス権を有して、CPUとメモリとの間でデータ転送を実行するが、高速なシステムでは、CPUによる転送では時間がかかるために、DMACがバス権を有して外部装置のインターフェースである入出力(I/O)モジュールを制御し、CPUを介さずに直接的にメモリとのデータ転送を実行してDMA転送を実現している。   Conventionally, in a bus system used for an information processing apparatus such as a personal computer, a workstation, or an office computer, DMA transfer is performed in which data is directly exchanged between an I / O device and a memory through a bus without using a CPU. There is something. Some bus systems are equipped with a DMAC, which is a controller that realizes DMA transfer that enables high-speed and large-capacity data transfer without CPU overhead, and stores data received from external devices as main memory. Data transfer is performed such as writing to a memory serving as a copy unit, reading out transmission data from the memory, and outputting the data to an external device. When performing the data transfer, in a low-speed system, a central processing unit (CPU: Central Processing Unit) has a bus right and performs data transfer between the CPU and the memory. In a high-speed system, Since the transfer by the CPU takes time, the DMAC has the bus right and controls the input / output (I / O) module which is an interface of the external device, and directly transfers the data to the memory without using the CPU. Executed to realize DMA transfer.

複数のモジュールが共通のデータバスに接続されているシステムにおいて、DMA転送を行う場合は、DMACが各モジュールからのDMA転送要求の調停を行い、DMA転送が可能なモジュールに対して許可を与えてDMA転送を行っている。この場合、早くDMA転送要求を出したモジュールまたは優先順位の高いモジュールがデータバスを連続で占有し、他のモジュールのDMA転送が不可能となる場合があった。   When performing DMA transfer in a system in which multiple modules are connected to a common data bus, the DMAC arbitrates DMA transfer requests from each module and grants permission to the modules capable of DMA transfer. DMA transfer is being performed. In this case, the module that issued the DMA transfer request earlier or the module with a higher priority occupies the data bus continuously, and DMA transfer of other modules may not be possible.

このようなDMA転送を行うシステムで、バスの使用効率を向上させるために、特許文献1には、各モジュールから出されるDMA転送要求をDMACが調停し、DMA転送要求が競合した場合には、優先順位の高いモジュールのDMA転送要求に対してDMA転送の許可を与え、当該許可が与えられたモジュールがデータバスを使用してDMA転送を行う制御を基本とする一方で、DMA転送要求に対する許可が下りたモジュールが、次にDMA転送要求を実行可能とするまでの待ち時間を示すDMA転送要求間隔を設定するレジスタを各モジュールに備えるバス制御装置が開示されている。このバス制御装置によって、DMA転送要求の発生タイミングが分散され、優先順位の低いモジュールもある程度の割合でデータバスを使用でき、バスの効率的使用が可能になる。
特開2002−351815号公報
In order to improve the bus use efficiency in such a DMA transfer system, Patent Document 1 discloses that when DMAC arbitrates a DMA transfer request issued from each module and the DMA transfer request conflicts, The DMA transfer request is granted to the DMA transfer request of the module with the higher priority, and the module to which the permission is given performs the DMA transfer using the data bus, while the permission for the DMA transfer request is granted. A bus control device is disclosed in which each module is provided with a register for setting a DMA transfer request interval indicating a waiting time until the next module can execute a DMA transfer request. This bus control device distributes the timing for generating DMA transfer requests, allows modules with low priority to use the data bus at a certain rate, and enables efficient use of the bus.
JP 2002-351815 A

上述したようなバスの使用効率を向上させるバス制御装置では、例えば、図6に示すような2つのデバイスとなる第1のASIC610と第2のASIC620がデータバス630で接続されるバスシステム600において、図6の点線に示すように、第1のメモリ612から第2のメモリ622に第1のASIC610内のDMA転送を実現する第1のDMAC611を使用してデータ転送する場合、第1のASIC610がデータバス630のバスマスタとなり、第2のASIC620がデータバス630のバススレーブとなる。   In the bus control device that improves the bus use efficiency as described above, for example, in the bus system 600 in which the first ASIC 610 and the second ASIC 620 that are two devices as shown in FIG. 6, when data is transferred from the first memory 612 to the second memory 622 using the first DMAC 611 that realizes the DMA transfer in the first ASIC 610, the first ASIC 610 is used. Becomes the bus master of the data bus 630, and the second ASIC 620 becomes the bus slave of the data bus 630.

しかしながら、当該バスシステム600において別のタスクで第1のメモリ612から第1のI/O614にデータをDMA転送する必要が生じ、かつ第1のASIC610内にDMACが1チャネルしかない場合、第1のメモリ612から第2のメモリ622への転送が完了して第1のDMAC611が空くのを待つか、第2のASIC620内の第2のDMAC621を使用して、図6に示す一点鎖線のように、メモリバス631→第1のASIC610→データバス630→第2のASIC620→データバス630→第1のASIC610→第1のI/Oバス632→第1のI/O614のように転送を行うか、CPU640による転送を行うしかない。すなわち、DMA転送が競合した際には、何れの場合も、転送速度が遅くなったり、バスを無駄に占有するため、非常にデータの転送効率が悪いことが問題となっていた。   However, if another task in the bus system 600 needs to DMA transfer data from the first memory 612 to the first I / O 614 and there is only one channel of DMAC in the first ASIC 610, the first 6 waits for the transfer from the first memory 612 to the second memory 622 to be completed and the first DMAC 611 becomes free, or by using the second DMAC 621 in the second ASIC 620, as shown by a one-dot chain line shown in FIG. Then, transfer is performed in the following manner: memory bus 631 → first ASIC 610 → data bus 630 → second ASIC 620 → data bus 630 → first ASIC 610 → first I / O bus 632 → first I / O 614. Alternatively, the transfer must be performed by the CPU 640. That is, when DMA transfer competes, in any case, the transfer speed becomes slow or the bus is occupied unnecessarily, so that the data transfer efficiency is very poor.

そこで、本発明は、従来のバス制御装置およびバス制御方法が有する上記問題点に鑑みてなされたものであり、本発明の目的は、DMA転送が競合した場合でも効率良くバスのデータ転送をすることの可能な、新規かつ改良されたバス制御装置を提供することである。   Accordingly, the present invention has been made in view of the above-described problems of the conventional bus control device and bus control method, and an object of the present invention is to efficiently transfer bus data even when DMA transfers compete. It is an object of the present invention to provide a new and improved bus control device.

上記課題を解決するために、本発明のある実施の態様によれば、データのDMA転送を制御するDMACを含む複数のDMAC内蔵デバイスにこれらDMAC内蔵デバイス間を接続するデータバスを使用させるための制御を行うバス制御装置であって、一のDMAC内蔵デバイスをデータバスのバスマスタとして第1のDMA転送を実行中に、当該一のDMAC内蔵デバイスに含まれる一のDMACの使用による後続の第2のDMA転送が要求された場合に、所定の条件に応じて、第1のDMA転送の残りの未転送データのDMA転送を実行するDMACおよび前記第2のDMA転送を実行するDMACを決定することを特徴とするバス制御装置が提供される。   In order to solve the above-described problem, according to an embodiment of the present invention, a plurality of DMAC built-in devices including a DMAC that controls DMA transfer of data use a data bus that connects these DMAC built-in devices. A bus control device that performs control, wherein a second DMAC subsequent to the use of one DMAC included in the one DMAC built-in device during execution of the first DMA transfer using the one DMAC built-in device as the bus master of the data bus When a DMA transfer is requested, a DMAC that executes DMA transfer of the remaining untransferred data of the first DMA transfer and a DMAC that executes the second DMA transfer are determined according to predetermined conditions. A bus control device is provided.

このような構成とすることにより、例えば、一のDMACが動作中で、この一のDMACを第2のDMA転送のために使用したい場合に、動作中の一のDMACの動作完了まで待つ必要がなくなるので、DMA転送が競合した場合でのデータバスでのデータ転送が迅速に実行されるようになる。また、最初から第2のDMA転送を他のDMACで行うと、データバスの無駄な占有を引き起こす場合があるため、DMA転送が競合した場合のバスの帯域を最小限に抑えることができる。さらに、DMACを切り替えている間に動作中のDMA転送が完了してしまう場合等には、バスマスタを切り替えるよりも、現在動作中のDMA転送が完了するのを待った方が効率良くなるため、デーダバスの使用状況に応じたDMA転送が実行されるようになる。   With this configuration, for example, when one DMAC is operating and it is desired to use the one DMAC for the second DMA transfer, it is necessary to wait until the operation of the one DMAC in operation is completed. As a result, the data transfer on the data bus when the DMA transfer conflicts can be executed quickly. In addition, if the second DMA transfer is performed by another DMAC from the beginning, there is a possibility that a wasteful occupation of the data bus may occur, so that the bus bandwidth when the DMA transfer competes can be minimized. In addition, when the DMA transfer during operation is completed while switching the DMAC, it is more efficient to wait for the DMA transfer currently being performed to complete than to switch the bus master. DMA transfer is executed according to the usage status.

このとき、上記実施の態様において、DMAC内蔵デバイスは、DMACの動作を制御するDMAC制御部を備え、所定の条件とは、動作中の第1のDMA転送を停止して、この第1のDMA転送の残りの未転送データのDMA転送を他のDMACに処理させて、第2のDMA転送を一のDMACで処理させる第1条件と、第1のDMA転送の残りの未転送データのDMA転送を一のDMACでそのまま処理させながら、第2のDMA転送を他のDMACで処理させる第2条件と、の場合におけるデータバスの使用効率を一のDMACに備わる一のDMAC制御部で判別した比較結果を意味することとしてもよい。   At this time, in the above-described embodiment, the DMAC built-in device includes the DMAC control unit that controls the operation of the DMAC. The predetermined condition is that the first DMA transfer in operation is stopped and the first DMA transfer is stopped. The first condition for causing the DMA transfer of the remaining untransferred data of the transfer to be processed by another DMAC and the second DMA transfer to be processed by one DMAC, and the DMA transfer of the remaining untransferred data of the first DMA transfer The second condition in which the second DMA transfer is processed by another DMAC while the data is processed as it is by one DMAC, and a comparison in which the use efficiency of the data bus in the case is determined by one DMAC control unit provided in the one DMAC It may also mean the result.

このような構成とすることにより、CPUが介在することなく、各デバイスのDMAC制御部同士がデータバスを介して設定情報のやり取りを行うので、バス制御装置の動作制御をするCPUは、最初に1回だけDMA設定を行えば、途中でDMA転送を停止したり、再設定したりする必要がなくなるので、CPUでの動作制御の無駄を削減できる。また、バスマスタ変更後の各DMA転送のデータ経路が如何なる状況になるかを事前にシミュレーションし、バスシステム全体として、最もバス使用効率が高くなるように、DMAC制御部が使用するDMACを決定するので、DMA転送が競合した場合でも、より確実に効率良くバスのデータ転送をすることが出来るようになる。   With such a configuration, the DMAC control units of each device exchange setting information via the data bus without intervention of the CPU. Therefore, the CPU that controls the operation of the bus control device first If the DMA setting is performed only once, it is not necessary to stop or reset the DMA transfer in the middle, so that waste of operation control in the CPU can be reduced. Also, the DMAC used by the DMAC control unit is determined so as to simulate in advance what the data path of each DMA transfer after the bus master change will be, and the bus system as a whole has the highest bus use efficiency. Even when the DMA transfer competes, the bus data can be transferred more reliably and efficiently.

このとき、上記実施の態様において、第1条件の方がデータバスの使用効率が良いと一のDMAC制御部で検出された場合に、当該一のDMAC制御部から他のDMAC内蔵デバイスに備わる他のDMAC制御部に、第1のDMA転送の残りの未転送データのDMA転送を完了させるための設定情報を送信することとしてもよい。   At this time, in the above embodiment, when one DMAC control unit detects that the first condition is more efficient in use of the data bus, the other DMAC built-in device from the one DMAC control unit The setting information for completing the DMA transfer of the remaining untransferred data of the first DMA transfer may be transmitted to the DMAC control unit.

このような構成とすることにより、DMA転送が競合した際には、データバスのバス帯域を落とすことなく、効率良くバスのデータ転送をすることが出来るようになる。   With such a configuration, when DMA transfer competes, the bus data can be transferred efficiently without reducing the bus bandwidth of the data bus.

このとき、上記実施の態様において、複数のDMAC内蔵デバイス間には、データバスとは独立して、設定情報を交信する設定情報専用線が複数のDMAC内蔵デバイス間を接続するようにして設けられることとしてもよい。   At this time, in the above embodiment, a setting information dedicated line for communicating setting information is provided between the plurality of DMAC built-in devices so as to connect the plurality of DMAC built-in devices independently of the data bus. It is good as well.

このような構成とすることにより、第1のDMA転送の未転送データの転送を完了させるための設定情報をデータバスとは別個独立の専用線でやり取りするので、データバスを占有せず、バス帯域を落とさなくなる。   With such a configuration, setting information for completing the transfer of untransferred data in the first DMA transfer is exchanged via a dedicated line independent from the data bus. The band is not dropped.

このとき、上記実施の態様において、一のDMAC制御部で判別した比較結果において、データバスの使用効率が良くなる条件の方のDMACに第2のDMA転送を処理させることとしてもよい。   At this time, in the above-described embodiment, the second DMA transfer may be processed by the DMAC under the condition that the use efficiency of the data bus is improved in the comparison result determined by one DMAC control unit.

このような構成とすることにより、バスシステム全体として、最もバス使用効率が高くなるように、DMAC制御部が使用するDMACをバスの使用効率の状況に応じて決定するので、DMA転送が競合した場合でも、より好適な処理経路で確実に効率良くバスのデータ転送をすることが出来るようになる。   By adopting such a configuration, the DMAC used by the DMAC control unit is determined in accordance with the bus usage efficiency so that the bus usage efficiency becomes the highest in the entire bus system. Even in this case, the bus data can be reliably and efficiently transferred with a more suitable processing path.

このとき、上記実施の態様において、DMACは、動作中のDMA転送に対応する固有の管理番号が付される管理番号設定領域を備えていることとしてもよい。特に、バス制御装置の動作制御をするCPUで第1のDMA転送を設定する際に、この第1のDMA転送の転送データに前記管理番号が付され、当該管理番号の番号情報が管理番号設定領域に付され、一のDMACが競合して、第1のDMA転送が停止されて、第1のDMA転送が他のDMACに移行した場合には、管理番号の番号情報も同時に送信・設定されることが好ましい。   At this time, in the above embodiment, the DMAC may include a management number setting area to which a unique management number corresponding to the DMA transfer in operation is assigned. In particular, when the CPU that controls the operation of the bus control device sets the first DMA transfer, the management number is attached to the transfer data of the first DMA transfer, and the number information of the management number is the management number setting. When the first DMA transfer is stopped due to contention of one DMAC and the first DMA transfer is shifted to another DMAC, the management number number information is also transmitted and set at the same time. It is preferable.

このような構成とすることにより、各DMA転送に管理番号を付けることで、DMA転送を最終的に完了させるDMACがCPUで最初に設定したDMACと異なる場合に、どのDMA転送が完了したかをCPUが認識することができる。   With this configuration, by assigning a management number to each DMA transfer, it is possible to determine which DMA transfer has been completed when the DMAC that finally completes the DMA transfer is different from the DMAC initially set by the CPU. The CPU can recognize it.

このとき、上記実施の態様において、一のDMAC内蔵デバイスが第1のDMA転送を停止し、他のDMACに対して、第1のDMAの残りの未転送データを送信・設定した際に、動作中の他のDMACに対応する前記残りの未転送エータの送信元となる前記一のDMACに付された前記管理番号によって示される割り込み番号と、各DMA転送の対応順を示す通し番号となるDMA管理番号と、を管理する割り込み管理部を備えていることとしてもよい。   At this time, in the above embodiment, when one DMAC built-in device stops the first DMA transfer and transmits / sets the remaining untransferred data of the first DMA to another DMAC. DMA management serving as an interrupt number indicated by the management number assigned to the one DMAC that is a transmission source of the remaining untransferred etas corresponding to other DMACs in the middle and a serial number indicating the correspondence order of each DMA transfer It is good also as providing the interruption management part which manages a number.

このような構成とすることにより、割り込み管理部で管理された割り込み番号とDMA管理番号の対応付けによって、もし、CPUが最初に設定したDMACの割り込み番号がDMA転送を最終的に完了させるDMACの割り込み番号と異なる場合でも、CPUが各DMA転送完了割り込みに対する処理を正しく実行可能となる。   With this configuration, if the interrupt number managed by the interrupt management unit is associated with the DMA management number, the DMAC interrupt number initially set by the CPU finally completes the DMA transfer. Even when the interrupt number is different, the CPU can correctly execute processing for each DMA transfer completion interrupt.

以上説明したように本発明によれば、CPUの介在をせずに、バスシステムに接続された複数のDMAC内蔵デバイスのバスマスタを所定の条件に応じて切り替えることが出来るので、DMA転送が競合した場合でも、バスの帯域を最小限に抑えることによって、効率良くバスのDMA転送によるデータ転送が実現される。   As described above, according to the present invention, the bus masters of a plurality of DMAC built-in devices connected to the bus system can be switched according to a predetermined condition without intervention of the CPU. Even in this case, data transfer by DMA transfer of the bus can be efficiently realized by minimizing the bus bandwidth.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書および図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In the present specification and drawings, components having substantially the same functional configuration are denoted by the same reference numerals, and redundant description is omitted.

まず、本発明のバス制御装置の第1の実施の形態の構成について、図面を使用しながら説明する。図1は、本実施の形態のバス制御装置の概略構成を示すブロック図である。   First, the configuration of the first embodiment of the bus control device of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of the bus control device according to the present embodiment.

本実施の形態のバス制御装置100は、図1に示すように、第1のASIC110と第2のASIC120が共通のデータバス130に接続された構造であり、第1のASIC110とCPUバス136を介して接続されるCPU140で当該バス制御装置100の動作制御が実行される。   As shown in FIG. 1, the bus control device 100 according to the present embodiment has a structure in which a first ASIC 110 and a second ASIC 120 are connected to a common data bus 130, and the first ASIC 110 and the CPU bus 136 are connected to each other. The operation control of the bus control device 100 is executed by the CPU 140 connected through the bus 140.

第1のASIC110は、第1のメモリバス131を介して、不図示の外部装置からの受信データを格納する主記憶部となる第1のメモリ111が接続されており、第1のI/Oバス134を介して、バス制御装置100の不図示の周辺装置等とのインターフェース部分となる第1のI/O112が接続されている。   The first ASIC 110 is connected to a first memory 111 serving as a main storage unit that stores received data from an external device (not shown) via a first memory bus 131, and the first I / O 110 is connected to the first ASIC 110. A first I / O 112 serving as an interface portion with a peripheral device (not shown) of the bus control device 100 is connected via the bus 134.

また、第1のASIC110には、CPU140を介さずに、I/O機器とメモリ間でデータバス130を介して直接データのやりとりをするDMA転送を制御する第1のDMAC113が設けられている。すなわち、第1のASIC110は、DMA転送を制御する第1のDMAC113を含むDMAC内蔵デバイスとなり、外部装置からの受信データを第1のメモリ111に書き込み、また、第1のメモリ111から送信データを読み出して外部装置に出力する等のデータ転送が実行される。   In addition, the first ASIC 110 is provided with a first DMAC 113 that controls DMA transfer in which data is directly exchanged between the I / O device and the memory via the data bus 130 without using the CPU 140. That is, the first ASIC 110 becomes a DMAC built-in device including the first DMAC 113 that controls DMA transfer, writes received data from an external device to the first memory 111, and transmits transmission data from the first memory 111. Data transfer such as reading and outputting to an external device is executed.

第2のASIC120は、第2のメモリバス132を介して、不図示の外部装置からの受信データを格納する主記憶部となる第2のメモリ121が接続されており、第2のI/Oバス135を介して、バス制御装置100の不図示の周辺装置等とのインターフェース部分となる第2のI/O122が接続されている。   The second ASIC 120 is connected to a second memory 121 serving as a main storage unit for storing received data from an external device (not shown) via a second memory bus 132, and a second I / O. A second I / O 122 serving as an interface part with a peripheral device (not shown) of the bus control device 100 is connected via the bus 135.

また、外部I/Fバス133を介して、不図示の外部装置等とのインターフェース部分となる外部I/F150が接続されている。この外部I/F150を介して、外部装置からの受信データを第2のメモリ121に書き込み、また、第2のメモリ121から送信データを読み出して外部装置に出力する等のデータ転送が実行される。   Further, an external I / F 150 serving as an interface portion with an external device (not shown) is connected via the external I / F bus 133. Via this external I / F 150, data transfer is performed such as writing received data from an external device into the second memory 121, reading out transmission data from the second memory 121, and outputting the data to the external device. .

さらに、第2のASIC120には、第1のASIC110と同様に、DMA転送を制御する第2のDMAC123が設けられている。すなわち、第2のASIC120は、DMA転送を制御する第2のDMAC123を含むDMAC内蔵デバイスとなり、外部装置からの受信データを第2のメモリ121に書き込み、また、第2のメモリ121から送信データを読み出して外部装置に出力する等のデータ転送が実行される。   Further, the second ASIC 120 is provided with a second DMAC 123 that controls the DMA transfer, similarly to the first ASIC 110. That is, the second ASIC 120 becomes a DMAC built-in device including the second DMAC 123 that controls the DMA transfer, writes the reception data from the external device to the second memory 121, and transmits the transmission data from the second memory 121. Data transfer such as reading and outputting to an external device is executed.

また、本実施の形態では、第1および第2のDMAC113、123は、DMA転送を最終的に完了させるDMACがCPU140で最初に設定したDMACと異なる場合に、どのDMA転送が完了したかをCPU140が認識できるようにするために、動作中のDMA転送に対応する固有の管理番号が付される管理番号設定領域(図示せず)を備えている。その際に、特に、CPU140でDMA転送を設定する際に、このDMA転送で転送されるデータにDMA転送に対応する管理番号が付加され、当該管理番号の番号情報を上記の管理番号設定領域に設定され、DMAC113、123が競合した際に、DMA転送が停止されて、他のDMAC113、123にDMA転送が移行した場合には、管理番号の番号情報も同時に送信・設定されることが好ましい。   In the present embodiment, the first and second DMACs 113 and 123 indicate which DMA transfer has been completed when the DMAC that finally completes the DMA transfer is different from the DMAC initially set by the CPU 140. Is provided with a management number setting area (not shown) to which a unique management number corresponding to the DMA transfer in operation is assigned. At this time, particularly when the DMA transfer is set by the CPU 140, a management number corresponding to the DMA transfer is added to the data transferred by the DMA transfer, and the number information of the management number is stored in the management number setting area. When the DMA transfer is stopped when the DMACs 113 and 123 compete with each other and the DMA transfer is transferred to the other DMACs 113 and 123, the number information of the management number is preferably transmitted and set at the same time.

本実施の形態のバス制御装置100は、図1に示すように、メモリ111、121がローカルに接続されたデバイス110、120が複数個(図1では2個)、データバス130を介して接続されている。このような構成において、本実施の形態のバス制御装置100は、メモリ111とメモリ121との間、またはメモリ111、121とI/O112、122との間でデータをDMA転送する場合に、転送中にバスマスタとなるデバイスであるDMAC113、123を動的に切り替えることで効率的にDMA転送が行えるようにするものである。   As shown in FIG. 1, the bus control device 100 according to the present embodiment includes a plurality of devices 110 and 120 (two in FIG. 1) to which memories 111 and 121 are locally connected, connected via a data bus 130. Has been. In such a configuration, the bus control device 100 according to the present embodiment transfers data when performing DMA transfer between the memory 111 and the memory 121 or between the memory 111 and 121 and the I / O 112 and 122. The DMACs 113 and 123, which are devices serving as bus masters, are dynamically switched to enable efficient DMA transfer.

次に、本実施の形態のバス制御装置100がバスマスタの動的な切り替えによる効率的なDMA転送の実行をするための本実施の形態の特徴部に関して、図2を使用しながら説明する。図2は、図1に示す本実施の形態のバス制御装置のブロック図の詳細説明図である。   Next, the characteristic part of this embodiment for the bus controller 100 of this embodiment to perform efficient DMA transfer by dynamically switching the bus master will be described with reference to FIG. FIG. 2 is a detailed explanatory diagram of the block diagram of the bus control device of the present embodiment shown in FIG.

DMAC内蔵デバイスとなる第1のASIC110は、第1のDMAC113の動作を制御する第1のDMAC制御部114を備える。また、第1のASIC110は、図2に示すように、CPU140とのインターフェースとなるCPUインターフェース部117、第1のメモリ111に対する制御を実行する第1のメモリ制御部115と、第1のI/O112に対する制御を実行する第1のI/O制御部116を備える。   The first ASIC 110 serving as a DMAC built-in device includes a first DMAC control unit 114 that controls the operation of the first DMAC 113. Further, as shown in FIG. 2, the first ASIC 110 includes a CPU interface unit 117 serving as an interface with the CPU 140, a first memory control unit 115 that executes control on the first memory 111, and a first I / I A first I / O control unit 116 that executes control for O112 is provided.

一方、DMAC内蔵デバイスとなる第2のASIC120は、第2のDMAC123の動作を制御する第2のDMAC制御部124を備える。また、第2のASIC120は、図2に示すように、第2のメモリ121に対する制御を実行する第2のメモリ制御部125と、第2のI/O122に対する制御を実行する第2のI/O制御部126と、外部I/F150に対する制御を実行する外部I/F制御部127を備える。   On the other hand, the second ASIC 120 serving as a DMAC built-in device includes a second DMAC control unit 124 that controls the operation of the second DMAC 123. In addition, as shown in FIG. 2, the second ASIC 120 includes a second memory control unit 125 that executes control on the second memory 121 and a second I / O that executes control on the second I / O 122. An O control unit 126 and an external I / F control unit 127 that executes control on the external I / F 150 are provided.

また、本実施の形態では、第1のASIC110と第2のASIC120は、データバス130を占有してバス帯域を落とすことを防止するために、データバス130とは、別個独立して、第1のDMA転送の未転送データのDMA転送を完了させるための設定情報を交信する設定情報専用線となるDMA制御線160を介して接続されている。   In the present embodiment, the first ASIC 110 and the second ASIC 120 occupy the data bus 130 and prevent the bus bandwidth from being reduced. These are connected via a DMA control line 160 which is a dedicated setting information line for communicating setting information for completing DMA transfer of untransferred data of the DMA transfer.

本実施の形態のバス制御装置100をこのような構成とすることにより、第1のASIC110がデータバス130のバスマスタとなって動作している第1のASIC110のDMA転送を停止し、残りのDMA転送は、第2のASIC120内の第2のDMAC123で行うことで、第1のASIC110内の第1のDMAC113を後続のDMA転送と言った別のタスクに使用可能となる。   By configuring the bus control device 100 according to the present embodiment as described above, the first ASIC 110 stops the DMA transfer of the first ASIC 110 operating as the bus master of the data bus 130, and the remaining DMAs The transfer is performed by the second DMAC 123 in the second ASIC 120, so that the first DMAC 113 in the first ASIC 110 can be used for another task such as a subsequent DMA transfer.

このようなDMAC113、123を切り替える操作は、CPU140を介さずに、第1のASIC110と第2のASIC120との間で、後続の転送アドレス情報や残りの転送データサイズ等のDMA転送データのやり取りを実行して、そのDMA転送データを元に、第2のASIC120の第2のDMAC123へ自動で設定して、起動が行えるようにしておく。つまり、CPU140は、最初に第1のASIC110内の第1のDMAC113に対して、一度だけ第1のDMA転送を設定・起動を行えば、後のDMA転送の処理は、第1のASIC110の第1のDMAC113の競合が発生した時点で、自動的に第1のASIC110の第1のDMAC制御部114と第2のASIC120の第2のDMAC制御部124との間で自動切り替えを行う。   Such an operation of switching between the DMACs 113 and 123 allows the transfer of DMA transfer data such as subsequent transfer address information and the remaining transfer data size between the first ASIC 110 and the second ASIC 120 without using the CPU 140. It is executed and automatically set in the second DMAC 123 of the second ASIC 120 based on the DMA transfer data so that it can be activated. That is, if the CPU 140 first sets and activates the first DMA transfer only once for the first DMAC 113 in the first ASIC 110, the subsequent DMA transfer processing is performed by the first ASIC 110. When contention of one DMAC 113 occurs, automatic switching is automatically performed between the first DMAC control unit 114 of the first ASIC 110 and the second DMAC control unit 124 of the second ASIC 120.

これによって、空きとなった第1のASIC110内の第1のDMAC113を使用して、図1に示すように、第1のメモリ111から第1のI/O112へのDMA転送を第1メモリバス131から第1のASIC110、第1のI/Oバス134、第1のI/O112のように最短パスで転送可能となる。   As a result, the DMA transfer from the first memory 111 to the first I / O 112 is performed using the first DMAC 113 in the first ASIC 110 that has become empty, as shown in FIG. From 131 to the first ASIC 110, the first I / O bus 134, and the first I / O 112, transfer is possible with the shortest path.

さらに、本実施の形態では、例えば、CPU140が第1のASIC110の第1のDMA転送を停止して、第2のDMAC123に対して、第1のDMA転送の残りの未転送データをDMA転送可能とする割り込み処理を正確に実行させるために、動作中の第2のDMAC123に対応する割り込みソースを示す当該残りの未転送エータの送信元となる第1のDMAC113の管理番号によって示される割り込み番号と、各DMA転送の対応順を示す通し番号となるDMA管理番号と、を管理する割り込み管理部170を備えている。これらの割り込み番号とDMA管理番号は、割り込み管理部170に含まれる参照テーブルの一例となる図3に示すような割り込み番号管理テーブルに記載される。割り込み番号管理テーブルに記載されるこれらの割り込み番号とDMA管理番号は、CPU140と各DMAC制御部114、124によって、常に最新状態を保つようにして更新される。   Furthermore, in the present embodiment, for example, the CPU 140 can stop the first DMA transfer of the first ASIC 110 and perform DMA transfer of the remaining untransferred data of the first DMA transfer to the second DMAC 123. The interrupt number indicated by the management number of the first DMAC 113 that is the transmission source of the remaining untransferred actor indicating the interrupt source corresponding to the second DMAC 123 in operation And an interrupt management unit 170 that manages a DMA management number that is a serial number indicating the correspondence order of each DMA transfer. These interrupt numbers and DMA management numbers are described in an interrupt number management table as shown in FIG. 3 as an example of a reference table included in the interrupt management unit 170. These interrupt numbers and DMA management numbers described in the interrupt number management table are updated by the CPU 140 and the DMAC control units 114 and 124 so as to always keep the latest state.

その際に、CPU140が最初に第1のDMA転送を処理するために設定した第1のASIC110と、第1のDMA転送を最終的に完了させる例えば、第2のASIC120の割り込み番号が異なる場合に備えて、CPU140は、当該割り込み処理を受け付けると、まず、割り込み管理部170内に含まれる図3に示すような割り込み番号管理テーブルを参照して、どのDMA転送が完了したことによる割り込み処理であるかを認識する。   At that time, when the first ASIC 110 initially set for processing the first DMA transfer by the CPU 140 and the first DMA transfer are finally completed, for example, when the interrupt numbers of the second ASIC 120 are different. In preparation, when the CPU 140 accepts the interrupt processing, the CPU 140 first refers to the interrupt number management table as shown in FIG. Recognize.

例えば、CPU140が第1のDMAC113に対して、第1のDMA転送を設定する時に、図3に示すように、DMA転送の対応順の通し番号となるDMA管理番号1と、割り込み要求を出す主体となる第1のDMAC113の管理番号によって示される割り込み番号1を割り込み番号管理テーブルに追加する。次に、CPU140は、第2のDMA転送を第1のDMAC113で行わせるために、第1のDMAC制御部114にDMA要求を出すと共に、CPU140は、第2のDMA転送も第1のDMAC113で行うつもりであるので、第1のDMA転送と同じく割り込み番号を1として、当該割り込み番号1およびDMA管理番号2を割り込み番号管理テーブルに追加する。第2のDMA転送の要求を受けた第1のDMAC制御部114は、第1のDMA転送の残りの未転送データのDMA転送を第2のDMAC123に行わせるために、第2のDMAC制御部124に対して、DMA管理番号(この場合、1)と共に、第1のDMA転送の未転送データのDMA転送を完了させるための設定情報となるDMA設定情報を転送し、これらを受けた第2のDMAC制御部124は、自らが割り込み要求を出す主体となるので、割り込み管理部170の割り込み番号管理テーブルのDMA管理番号1にあたる第1のDMA転送の割り込み番号を2に更新する。   For example, when the CPU 140 sets the first DMA transfer for the first DMAC 113, as shown in FIG. 3, the DMA management number 1 that is the serial number in the order of correspondence of the DMA transfer, and the main body that issues the interrupt request The interrupt number 1 indicated by the management number of the first DMAC 113 is added to the interrupt number management table. Next, the CPU 140 issues a DMA request to the first DMAC control unit 114 so that the second DMA transfer is performed by the first DMAC 113, and the CPU 140 also performs the second DMA transfer by the first DMAC 113. Since it is intended to be performed, the interrupt number is set to 1 as in the first DMA transfer, and the interrupt number 1 and the DMA management number 2 are added to the interrupt number management table. The first DMAC control unit 114 that has received the request for the second DMA transfer causes the second DMAC 123 to perform DMA transfer of the remaining untransferred data of the first DMA transfer. The DMA setting information serving as setting information for completing the DMA transfer of the untransferred data of the first DMA transfer is transferred to 124 together with the DMA management number (in this case, 1). The DMAC control unit 124 updates the interrupt number of the first DMA transfer corresponding to the DMA management number 1 in the interrupt number management table of the interrupt management unit 170 because it is the main body that issues an interrupt request.

このように、本実施の形態では、割り込み番号およびDMA管理番号が割り込み管理部170内に備わる割り込み番号管理テーブルに記載され、当該割り込み番号管理テーブルをCPU140と各DMAC制御部114、124が常に最新状態に保つように更新される。このため、割り込み管理部170で管理された割り込み番号とDMA管理番号との対応付けによって、もし、CPU140が最初に設定したDMACの割り込み番号がDMA転送を最終的に完了させるDMACの割り込み番号と異なる場合でも、CPU140が各DMA転送完了割り込みに対する処理を正しく実行可能となる。   As described above, in the present embodiment, the interrupt number and the DMA management number are described in the interrupt number management table provided in the interrupt management unit 170, and the CPU 140 and each DMAC control unit 114, 124 always keep the latest interrupt number management table. Updated to keep state. For this reason, if the interrupt number managed by the interrupt management unit 170 is associated with the DMA management number, the interrupt number of the DMAC initially set by the CPU 140 is different from the interrupt number of the DMAC that finally completes the DMA transfer. Even in this case, the CPU 140 can correctly execute processing for each DMA transfer completion interrupt.

次に、本実施の形態のバス制御装置100によるDMA転送の動作について、図面を使用しながら説明する。図4は、本実施の形態のバス制御装置で第1のASICをデータバスのバスマスタとして第1のDMA転送を実行中に第1のDMACの使用による後続の第2のDMA転送が要求された場合の動作処理を示すフローチャートであり、図5は、図4に示す第1のDMA転送の未転送データのDMA転送処理を第1のDMACから第2のDMACに切り替える動作処理を示すフローチャートである。   Next, the DMA transfer operation by the bus control device 100 of this embodiment will be described with reference to the drawings. FIG. 4 shows that the second DMA transfer using the first DMAC is requested while the first ASIC is used as the bus master of the data bus and the first DMA transfer is being executed in the bus controller of this embodiment. FIG. 5 is a flowchart showing an operation process for switching the DMA transfer process of the untransferred data of the first DMA transfer shown in FIG. 4 from the first DMAC to the second DMAC. .

本実施の形態のバス制御装置100で第1のASIC110をデータバス130のバスマスタとして第1のDMA転送を実行中に、第1のDMAC113の使用による後続の第2のDMA転送が要求されて、第2のDMA転送が開始された場合には、まず、バスマスタ側である第1のDMAC113が動作中か否かの判別が行われる(工程S401)。   While the first ASIC 110 is used as the bus master of the data bus 130 in the bus control device 100 of the present embodiment and the first DMA transfer is being executed, a subsequent second DMA transfer using the first DMAC 113 is requested, When the second DMA transfer is started, first, it is determined whether or not the first DMAC 113 on the bus master side is operating (step S401).

工程S401で第1のDMAC113が動作中と検出された場合には、バススレーブ側である第2のDMAC123が動作中か否かの判別が行われる(工程S411)。   If it is detected in step S401 that the first DMAC 113 is operating, it is determined whether or not the second DMAC 123 on the bus slave side is operating (step S411).

一方、工程S401で第1のDMAC113が動作中と検出されない場合には、第1のDMAC113に対して、CPU140は、第2のDMA転送の設定をする(工程S402)。   On the other hand, if the first DMAC 113 is not detected as being in operation in step S401, the CPU 140 sets the second DMA transfer for the first DMAC 113 (step S402).

その後、第1のDMAC113に対して、第2のDMA転送を開始してから(工程S403)、第2のDMA転送完了の割り込みが有るか否かの判別が行われる(工程S404)。工程S404で第2のDMA転送完了の割り込みが有ると検出された場合は、第2のDMA転送が終了となる。一方、工程S404で第2のDMA転送完了の割り込みが無いと検出された場合は、再度、第2のDMA転送完了の割り込みが有るか否かの判別が行われる(工程S404)。   Then, after starting the second DMA transfer to the first DMAC 113 (step S403), it is determined whether or not there is a second DMA transfer completion interrupt (step S404). If it is detected in step S404 that the second DMA transfer completion interrupt is present, the second DMA transfer is terminated. On the other hand, if it is detected in step S404 that there is no second DMA transfer completion interrupt, it is determined again whether there is a second DMA transfer completion interrupt (step S404).

工程S411でバススレーブ側である第2のDMAC123が動作中でないと検出されると、バス使用効率の検証を行う(工程S412)。工程S412では、動作中の第1のDMA転送を停止して、未処理分の残りの第1のDMA転送を第2のDMAC123に処理させて、第2のDMA転送を第1のDMAC113で処理させる場合でのデータバス130の使用効率と、第1のDMA転送を第1のDMAC113でそのまま動作させながら、第2のDMA転送を第2のDMAC123で処理させる場合でのデータバス130の使用効率を検証する。データバス130の使用効率は、どれだけデータバス130が占有されているかの判断を元に算出され、具体的には、クロック(時間)を元に算出される。   If it is detected in step S411 that the second DMAC 123 on the bus slave side is not in operation, the bus use efficiency is verified (step S412). In step S412, the first DMA transfer in operation is stopped, the remaining first DMA transfer for the unprocessed portion is processed by the second DMAC 123, and the second DMA transfer is processed by the first DMAC 113. Efficiency of the data bus 130 and the efficiency of the data bus 130 when the second DMA transfer is processed by the second DMAC 123 while the first DMA transfer 113 is operated as it is. To verify. The usage efficiency of the data bus 130 is calculated based on the determination of how much the data bus 130 is occupied, specifically, based on the clock (time).

工程S412でのバス効率の検証をしてから、データバス130の使用効率が第1のDMAC113の使用効率の方が高いか否かの判別が行われる(工程S413)。工程S413でデータバス130の使用効率に関して、第1のDMAC113の使用効率の方が低いと検出されたら、その後、第2のDMAC123に対して、CPU140で第2のDMA転送を設定して(工程S414)、第2のDMAC123に対して、第2のDMA転送を開始する(工程S415)。   After verifying the bus efficiency in step S412, it is determined whether the usage efficiency of the data bus 130 is higher than that of the first DMAC 113 (step S413). If it is detected in step S413 that the usage efficiency of the first DMAC 113 is lower with respect to the usage efficiency of the data bus 130, then the second DMA transfer is set by the CPU 140 for the second DMAC 123 (step S413). S414), the second DMA transfer is started with respect to the second DMAC 123 (step S415).

第2のDMA転送を開始した後は、第2のDMA転送完了の割り込みの有無の判別が行われる(工程S416)。工程S416で第2のDMA転送完了の割り込みが有りと検出されたら、第2のDMA転送が終了する。一方、工程S416で第2のDMA転送完了の割り込みが無いと検出されたら、再度、第2のDMA転送を開始した後は、第2のDMA転送完了の割り込みの有無の判別が行われる(工程S416)。   After the second DMA transfer is started, it is determined whether or not there is an interrupt for the completion of the second DMA transfer (step S416). If it is detected in step S416 that the second DMA transfer completion interrupt is present, the second DMA transfer ends. On the other hand, if it is detected in step S416 that there is no second DMA transfer completion interrupt, after the second DMA transfer is started again, it is determined whether or not there is a second DMA transfer completion interrupt (process step). S416).

また、工程S413でデータバス130の使用効率に関して第1のDMAC113の使用効率の方が高いと検出されたら、動作中の第1のDMAC113の残り転送量が少ないか否かの判別が行われる(工程S417)。工程S417で動作中の第1のDMAC113の残り転送量が少ないと検出された場合は、その後、第2のDMAC123に対して、CPU140で第2のDMA転送を設定して(工程S414)、工程S414以降は、上述したように、工程S415、工程S416へと続く。   If it is detected in step S413 that the usage efficiency of the first DMAC 113 is higher than the usage efficiency of the data bus 130, it is determined whether or not the remaining transfer amount of the first DMAC 113 in operation is small ( Step S417). If it is detected in step S417 that the remaining transfer amount of the first DMAC 113 that is operating is small, then the second DMA transfer is set for the second DMAC 123 by the CPU 140 (step S414). After S414, as described above, the process continues to Step S415 and Step S416.

一方、工程S417で動作中の第1のDMAC113の残り転送量が少ないと検出されなかった場合は、その後、図5に示す第1のDMA転送の未転送データのDMA転送処理を第1のDMAC113から第2のDMAC123に切り替える動作処理に移行する。   On the other hand, if it is not detected in step S417 that the remaining transfer amount of the first DMAC 113 that is operating is small, the DMA transfer processing of the untransferred data of the first DMA transfer shown in FIG. Then, the process proceeds to the operation process for switching to the second DMAC 123.

図5に示すように、第1のDMA転送の未転送データの転送処理を第1のDMAC113から第2のDMAC123に切り替える動作処理を開始すると、まず、第1のDMAC制御部114が第1のDMAC113の動作を停止させる(工程S501)。その後、第1のDMA転送の未転送データである残りの転送情報を第2のDMAC制御部124に送信する(工程S502)。   As shown in FIG. 5, when an operation process for switching the transfer process of the untransferred data of the first DMA transfer from the first DMAC 113 to the second DMAC 123 is started, the first DMAC control unit 114 first performs the first process. The operation of the DMAC 113 is stopped (step S501). Thereafter, the remaining transfer information which is untransferred data of the first DMA transfer is transmitted to the second DMAC control unit 124 (step S502).

第1のDMA転送の残りの転送情報を第2のDMAC制御部124が受信すると、第2のDMAC制御部124は、第2のDMAC123に対して、第1のDMA転送の残りの転送情報となる未転送データのDMA転送を設定する(工程S503)。   When the second DMAC control unit 124 receives the remaining transfer information of the first DMA transfer, the second DMAC control unit 124 sends the remaining transfer information of the first DMA transfer to the second DMAC 123. The DMA transfer of the untransferred data is set (step S503).

その後、動作中の第2のDMAC123に対応する割り込みソースを管理する割り込み管理部170に備わる割り込み番号管理テーブルの割り込み管理情報の更新をする(工程S504)。   Thereafter, the interrupt management information in the interrupt number management table provided in the interrupt management unit 170 that manages the interrupt source corresponding to the second DMAC 123 in operation is updated (step S504).

割り込み管理情報を更新後、第2のDMAC123に対して、第1のDMA転送の残りの転送情報となる未転送データの転送を開始する(工程S505)。   After updating the interrupt management information, transfer of untransferred data, which is the remaining transfer information of the first DMA transfer, is started to the second DMAC 123 (step S505).

その後、第1のDMAC113に対して、CPU140で第2のDMA転送が設定されて(工程S506)、第1のDMAC113に対して、第2のDMA転送が開始される(工程S507)。   Thereafter, the second DMA transfer is set for the first DMAC 113 by the CPU 140 (step S506), and the second DMA transfer is started for the first DMAC 113 (step S507).

第2のDMA転送が開始以降に、第2のDMA転送完了割り込みの有無が判別される(工程S508)。工程S508で第2のDMA転送完了割り込みが有ると検出されると、第2のDMA転送は、終了する。一方、第2のDMA転送完了割り込みが無いと検出されると、また、第2のDMA転送完了割り込みの有無が判別される(工程S508)。   After the start of the second DMA transfer, it is determined whether or not there is a second DMA transfer completion interrupt (step S508). If it is detected in step S508 that there is a second DMA transfer completion interrupt, the second DMA transfer ends. On the other hand, when it is detected that there is no second DMA transfer completion interrupt, it is determined whether or not there is a second DMA transfer completion interrupt (step S508).

なお、第1のDMAC制御部114は、使用するDMACを切り替えることでデータの転送効率が上がっても、動作中のDMA転送の残り転送データが少ないために、DMACの切り替え処理を行っている間に、動作中のDMA転送が完了する場合には、バスマスタを切り替えるよりも、現在動作中のDMA転送が完了するのを待った方が効率良くなるため、DMACを切り替えずに、動作中のDMA転送の完了まで待機する。   Note that the first DMAC control unit 114 performs the DMAC switching process because the remaining transfer data of the active DMA transfer is small even though the data transfer efficiency is improved by switching the DMAC to be used. In addition, when the DMA transfer in operation is completed, it is more efficient to wait for the DMA transfer currently in operation to be completed than to switch the bus master. Therefore, the DMA transfer in operation without switching the DMAC. Wait for completion.

以上説明したように、本実施の形態のバス制御装置100は、第1のASIC110をデータバス130のバスマスタとして第1のDMA転送を実行中に、第1のDMAC113の使用による後続の第2のDMA転送が要求された場合に、所定の条件に応じて、第1のDMAC制御部114から第2のDMAC制御部124に、第1のDMA転送の残りの未転送データのDMA転送を完了させるための設定情報を送信してから、第2のDMA転送を第1のDMAC113で実行させる。   As described above, the bus control device 100 according to the present embodiment uses the first DMAC 113 while the first ASIC 110 is used as the bus master of the data bus 130 to execute the first DMA transfer. When the DMA transfer is requested, the first DMAC control unit 114 causes the second DMAC control unit 124 to complete the DMA transfer of the remaining untransferred data of the first DMA transfer according to a predetermined condition. After transmitting the setting information for the second DMA transfer, the first DMAC 113 executes the second DMA transfer.

このため、第1のDMAC113が動作中に当該第1のDMAC113を第2のDMA転送のために使用したい場合に、動作中の第1のDMAC113の動作完了まで待つ必要がなくなるので、DMA転送が競合した場合でのデータバス130でのデータ転送に余分な時間をかけずに迅速に実行されるようになる。また、最初から第2のDMA転送を第2のDMAC123で実行する場合は、データバス130の無駄な占有を引き起こす場合があるため、DMA転送が競合した場合のバスの帯域を最小限に抑えることができる。さらに、CPU140が介在することなく、各デバイスのDMAC制御部同士がデータバス130あるいはDMA制御線160を介して設定情報のやり取りを行うので、バス制御装置100の動作制御をするCPU140は、最初に1回だけDMA設定を行えば、途中でDMA転送を停止したり、再設定したりする必要がなくなるので、CPU140での動作制御の無駄を削減できる。   For this reason, when it is desired to use the first DMAC 113 for the second DMA transfer while the first DMAC 113 is in operation, there is no need to wait until the operation of the first DMAC 113 in operation is completed. In the case of contention, the data transfer on the data bus 130 is executed quickly without taking extra time. Further, when the second DMA transfer is executed by the second DMAC 123 from the beginning, it may cause unnecessary occupancy of the data bus 130, so that the bus bandwidth when the DMA transfer conflicts is minimized. Can do. Further, since the DMAC control units of the respective devices exchange setting information via the data bus 130 or the DMA control line 160 without the intervention of the CPU 140, the CPU 140 that controls the operation of the bus control device 100 first If the DMA setting is performed only once, it is not necessary to stop or reset the DMA transfer in the middle, so that waste of operation control in the CPU 140 can be reduced.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明は係る例に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to the example which concerns. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.

例えば、上述の第1の実施の形態では、データバスを共有するDMAC内蔵デバイスとなるASICの数が2つの場合について説明しているが、当該データバスを共有するDMAC内蔵デバイスとなるASICは、3つ以上のバスシステムにも本発明のバス制御装置を適用可能である。   For example, in the first embodiment described above, the case where the number of ASICs serving as DMAC built-in devices sharing a data bus is described as two, but the ASIC serving as a DMAC built-in device sharing the data bus is The bus control device of the present invention can also be applied to three or more bus systems.

本発明の第1の実施形態におけるバス制御装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the bus control apparatus in the 1st Embodiment of this invention. 同実施の形態におけるバス制御装置のブロック図の詳細説明図である。It is a detailed explanatory view of a block diagram of the bus control device in the same embodiment. 同実施の形態におけるバス制御装置の割り込み管理部内に含まれる割り込み番号管理テーブルの一例を示す図である。It is a figure which shows an example of the interrupt number management table contained in the interrupt management part of the bus control apparatus in the embodiment. 同実施の形態におけるバス制御装置で第1のASICをデータバスのバスマスタとして、第1のDMA転送を実行中に第1のDMACの使用による後続の第2のDMA転送が要求された場合の動作処理を示すフローチャートである。Operation when a second DMA transfer is requested by using the first DMAC during execution of the first DMA transfer with the first ASIC as the data bus bus master in the bus controller in the embodiment It is a flowchart which shows a process. 図4に示す第1のDMA転送の未転送データの転送処理を第1のDMACから第2のDMACに切り替える動作処理を示すフローチャートである。6 is a flowchart showing an operation process for switching the transfer process of untransferred data of the first DMA transfer shown in FIG. 4 from the first DMAC to the second DMAC. 従来のバス制御装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the conventional bus control apparatus.

符号の説明Explanation of symbols

100 バス制御装置
110 一のDMAC内蔵デバイス(第1のASIC)
113 一のDMAC(第1のDMAC)
114 一のDMAC制御部(第1のDMAC制御部)
120 他のDMAC内蔵デバイス(第2のASIC)
123 他のDMAC(第2のDMAC)
124 他のDMAC制御部(第2のDMAC制御部)
130 データバス
140 CPU
160 設定情報専用線(DMA制御線)
170 割り込み管理部
100 Bus control device 110 One DMAC built-in device (first ASIC)
113 One DMAC (first DMAC)
114 One DMAC control unit (first DMAC control unit)
120 Other DMAC built-in device (second ASIC)
123 Other DMAC (second DMAC)
124 Other DMAC control unit (second DMAC control unit)
130 Data bus 140 CPU
160 Setting information dedicated line (DMA control line)
170 Interrupt Manager

Claims (8)

データのDMA( Direct Memory Access )転送を制御するDMAC( Direct Memory Access Controller )を含む複数のDMAC内蔵デバイスに該DMAC内蔵デバイス間を接続するデータバスを使用させるための制御を行うバス制御装置であって、
一のDMAC内蔵デバイスを前記データバスのバスマスタとして第1のDMA転送を実行中に、前記一のDMAC内蔵デバイスに含まれる一のDMACの使用による後続の第2のDMA転送が要求された場合に、所定の条件に応じて、前記第1のDMA転送の残りの未転送データのDMA転送を実行するDMACおよび前記第2のDMA転送を実行するDMACを決定することを特徴とするバス制御装置。
A bus control device that performs control for causing a plurality of DMAC built-in devices including a DMAC (Direct Memory Access Controller) that controls DMA (Direct Memory Access) transfer of data to use a data bus connecting the DMAC built-in devices. And
While a first DMA transfer is being executed with one DMAC-embedded device as the bus master of the data bus, a subsequent second DMA transfer is requested by using one DMAC included in the one DMAC-embedded device. A bus control device that determines a DMAC that executes a DMA transfer of the remaining untransferred data of the first DMA transfer and a DMAC that executes the second DMA transfer according to a predetermined condition.
前記DMAC内蔵デバイスは、前記DMACの動作を制御するDMAC制御部を備え、
前記所定の条件とは、前記一のDMACに備わる一のDMAC制御部が
動作中の前記第1のDMA転送を停止して、前記第1のDMA転送の残りの未転送データのDMA転送を他のDMACに処理させて、前記第2のDMA転送を前記一のDMACで処理させる第1条件と、
前記第1のDMA転送の残りの未転送データのDMA転送を前記一のDMACでそのまま動作させながら、前記第2のDMA転送を前記他のDMACで処理させる第2条件と、
の場合における前記データバスの使用効率を判別した比較結果を意味することを特徴とする請求項1に記載のバス制御装置。
The DMAC built-in device includes a DMAC control unit that controls the operation of the DMAC,
The predetermined condition is that one DMAC control unit included in the one DMAC stops the first DMA transfer in operation, and other DMA transfers of the remaining untransferred data of the first DMA transfer are performed. A first condition in which the second DMA transfer is processed by the one DMAC;
A second condition for processing the second DMA transfer with the other DMAC while operating the DMA transfer of the remaining untransferred data of the first DMA transfer as it is with the one DMAC;
The bus control device according to claim 1, which means a comparison result obtained by determining use efficiency of the data bus in this case.
前記第1条件の方が前記データバスの使用効率が良いと前記一のDMAC制御部で検出された場合に、前記一のDMAC制御部から前記他のDMAC内蔵デバイスに備わる他のDMAC制御部に、前記第1のDMA転送の残りの未転送データのDMA転送を完了させるための設定情報を送信することを特徴とする請求項2に記載のバス制御装置。   When the one DMAC control unit detects that the first condition is more efficient in using the data bus, the one DMAC control unit transfers to another DMAC control unit provided in the other DMAC built-in device. 3. The bus control device according to claim 2, wherein setting information for completing the DMA transfer of the remaining untransferred data of the first DMA transfer is transmitted. 前記複数のDMAC内蔵デバイス間には、前記データバスとは独立して、前記設定情報を交信する設定情報専用線が前記複数のDMAC内蔵デバイス間を接続するようにして設けられることを特徴とする請求項3に記載のバス制御装置。   A setting information dedicated line for communicating the setting information is provided between the plurality of DMAC built-in devices so as to connect the plurality of DMAC built-in devices independently of the data bus. The bus control device according to claim 3. 前記一のDMAC制御部で判別した前記比較結果において、前記データバスの使用効率が良くなる条件の方のDMACに前記第2のDMA転送を処理させることを特徴とする請求項2〜4の何れか1項に記載のバス制御装置。   5. The second DMA transfer is processed by the DMAC under the condition that the use efficiency of the data bus is improved in the comparison result determined by the one DMAC control unit. 6. The bus control device according to claim 1. 前記DMACは、動作中のDMA転送に対応する固有の管理番号が付される管理番号設定領域を備えていることを特徴とする請求項1〜5の何れか1項に記載のバス制御装置。   The bus control device according to claim 1, wherein the DMAC includes a management number setting area to which a unique management number corresponding to an active DMA transfer is assigned. 前記バス制御装置の動作制御をするCPUで前記第1のDMA転送を設定する際に、該第1のDMA転送の転送データに前記管理番号が付され、該管理番号の番号情報が前記管理番号設定領域に付され、前記一のDMACが競合して、前記第1のDMA転送が停止されて、該第1のDMA転送が他のDMACに移行した場合には、前記管理番号の番号情報も同時に前記他のDMACに送信・設定されることを特徴とする請求項6に記載のバス制御装置。   When the CPU for controlling the operation of the bus control device sets the first DMA transfer, the management number is attached to the transfer data of the first DMA transfer, and the number information of the management number is the management number. When the first DMA transfer is stopped because the one DMAC competes with the setting area, and the first DMA transfer shifts to another DMAC, the number information of the management number is also 7. The bus control device according to claim 6, wherein the bus control device transmits and sets to the other DMAC at the same time. 前記一のDMAC内蔵デバイスが前記第1のDMA転送を停止し、前記他のDMACに対して、前記第1のDMA転送の残りの未転送データを送信・設定した際に、動作中の前記他のDMACに対応する前記残りの未転送エータの送信元となる前記一のDMACに付された前記管理番号によって示される割り込み番号と、前記DMA転送の対応順を示す通し番号となるDMA管理番号と、を管理する割り込み管理部を備えていることを特徴とする請求項1〜7の何れか1項に記載のバス制御装置。   When the one DMAC built-in device stops the first DMA transfer and transmits / sets the remaining untransferred data of the first DMA transfer to the other DMAC, the other DMAC that is operating An interrupt number indicated by the management number assigned to the one DMAC which is a transmission source of the remaining untransferred eta corresponding to the DMAC, and a DMA management number which is a serial number indicating the correspondence order of the DMA transfer, The bus control device according to claim 1, further comprising an interrupt management unit that manages
JP2006353815A 2006-12-28 2006-12-28 Bus control device Pending JP2008165463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006353815A JP2008165463A (en) 2006-12-28 2006-12-28 Bus control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006353815A JP2008165463A (en) 2006-12-28 2006-12-28 Bus control device

Publications (1)

Publication Number Publication Date
JP2008165463A true JP2008165463A (en) 2008-07-17

Family

ID=39694883

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006353815A Pending JP2008165463A (en) 2006-12-28 2006-12-28 Bus control device

Country Status (1)

Country Link
JP (1) JP2008165463A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014089758A (en) * 2010-09-21 2014-05-15 Mitsubishi Electric Corp Data reader
JP2015222487A (en) * 2014-05-22 2015-12-10 ヤマハ株式会社 DMA controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014089758A (en) * 2010-09-21 2014-05-15 Mitsubishi Electric Corp Data reader
JP2015222487A (en) * 2014-05-22 2015-12-10 ヤマハ株式会社 DMA controller

Similar Documents

Publication Publication Date Title
CN1327370C (en) Resource management device
KR100644596B1 (en) Bus system and its bus arbitration method
JP2012064021A (en) Communication system, master device and slave device, and communication method
JP2004171209A (en) Shared memory data transfer device
JP4184614B2 (en) Bus system and method for adjusting execution order thereof
US7246188B2 (en) Flow control method to improve bus utilization in a system-on-a-chip integrated circuit
CN100442258C (en) Method and Arbitration Circuit for Dynamically Using Direct Memory Access Channel
JP4233373B2 (en) Data transfer control device
JP2007200245A (en) System bus control device, integrated circuit and data processing system
JPH06231074A (en) Multiple access system for system bus
JPH11238033A (en) Information processing device bus, bus control method, and bus control device
US8180990B2 (en) Integrated circuit including a plurality of master circuits transmitting access requests to an external device and integrated circuit system including first and second interated circuits each including a plurality of master circuits transmitting access requests
US20080195782A1 (en) Bus system and control method thereof
JP2007219816A (en) Multiprocessor system
JP2008165463A (en) Bus control device
JP2007172112A (en) Memory controller
JP4190969B2 (en) Bus arbitration system in bus system and AMBA
JP2007122410A (en) Bus arbitration circuit and method
JP2005316546A (en) Memory controller
JP2000250850A (en) Bus control device, master device, slave device and bus control method
JPH0844661A (en) Information processor
JP2008140065A (en) Access arbitration apparatus, access arbitration method, and information processing apparatus
KR100583455B1 (en) Bus Arbitrator with Simple Programmable Hardware Architecture
JPH08278939A (en) Data transfer method and data transfer device
JP2004252726A (en) Bus arbitration method and system