JP2009075942A - Dma controller - Google Patents
Dma controller Download PDFInfo
- Publication number
- JP2009075942A JP2009075942A JP2007245471A JP2007245471A JP2009075942A JP 2009075942 A JP2009075942 A JP 2009075942A JP 2007245471 A JP2007245471 A JP 2007245471A JP 2007245471 A JP2007245471 A JP 2007245471A JP 2009075942 A JP2009075942 A JP 2009075942A
- Authority
- JP
- Japan
- Prior art keywords
- transfer
- module
- dma controller
- data
- bus
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、データ転送制御装置に関し、さらに詳細には、DMA(Direct Memory Access)とバスを介してデータ転送を行うDMAコントローラに関するものである。 The present invention relates to a data transfer control device, and more particularly to a DMA controller that performs data transfer via a DMA (Direct Memory Access) and a bus.
複数のモジュールによるバスアクセスの制御方法として、緊急度の高いモジュールや一定量の帯域が必要なモジュールの優先度を高く、その他のモジュールの優先度を低くして各モジュールに優先順位をつける方法がある。しかし、この方式では、各モジュールの優先度を適切に設定しないと必要となる帯域を確保できない場合があるほか、単純に優先度を高くするだけで帯域が確保できるかどうかは保証されない。また、必要以上にバス帯域を占有し、他のモジュール動作に影響を与える可能性もある。例えばDMA等によるバスアクセスでは、優先度の高いモジュールが長い時間バスを占有し続け、優先度の低いモジュールが待たされてしまう。これらの問題を回避するため、バス使用権を確保していても、他の要求に応じて所定回数の転送毎にバス使用権が移るようにしたり、一定期間内にバス使用の優先順位を変更し、長時間占有することがないようにしている。
しかし、いずれの方式においても、どの程度の時間占有したらバスを解放するか、または優先順位を変更するかを容易に決定することができないため、優先順位の設定に試行錯誤を要し、最適な設定を行うことが難しい。 However, in either method, it is not possible to easily determine how long the bus will be released or to change the priority, so it takes trial and error to set the priority. Difficult to set up.
本発明はリアルタイム性のあるデータ転送に対しても破綻することなく転送を行うことができるデータ転送制御装置およびその転送制御方法を提供することを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to provide a data transfer control device and a transfer control method thereof capable of transferring data without failure even for real-time data transfer.
このような目的を達成するために本発明は、転送するデータをある短い単位に分割して転送する。さらに詳しく説明すると、本発明のDMAコントローラは、データを分割した複数のトランザクションとみなし、このデータを転送するモジュールが要求するバス帯域やそのモジュールの転送率などに応じてスケジューリングを行う。 In order to achieve such an object, the present invention divides the data to be transferred into certain short units and transfers them. More specifically, the DMA controller of the present invention regards data as a plurality of divided transactions, and performs scheduling according to the bus bandwidth required by the module that transfers the data, the transfer rate of the module, and the like.
また、本発明によれば、時間変化する帯域に応じてスケジューリングを行う。さらに詳しく説明すると、本発明のDMAコントローラは、DMA転送リクエストの度にリクエストを行ったモジュールの帯域や転送率を取得する。 Further, according to the present invention, scheduling is performed according to a time-varying band. More specifically, the DMA controller of the present invention acquires the bandwidth and transfer rate of the module that made the request for each DMA transfer request.
本発明によれば、転送データを最小単位に分割してスケジューリングを行うため、優先度の高い一つの転送が、長い間バスを占有し続けるのを防ぐことができる。また、帯域保証をすることにより、リアルタイム性のある転送に関しても破綻することのないシステムを提供することができる。 According to the present invention, since the transfer data is divided into the smallest units and scheduling is performed, it is possible to prevent one transfer having a high priority from occupying the bus for a long time. In addition, by guaranteeing the bandwidth, it is possible to provide a system that does not fail even for real-time transfer.
また、本発明によれば、1つのリクエスト単位で帯域をこまめに設定できるため、柔軟な設定が可能となり、同一モジュールによる転送であっても、時間により変化するバス帯域に対応してリアルタイム性を確保できる。 In addition, according to the present invention, since the bandwidth can be set frequently in one request unit, flexible setting is possible, and even if the transfer is performed by the same module, the real-time property is provided corresponding to the bus bandwidth that changes with time. It can be secured.
また、本発明によれば、必要となるバス帯域に応じてバスの動作周波数をリアルタイムに設定でき、バスの高速化しつつ、省電力を実現できる。 Furthermore, according to the present invention, the bus operating frequency can be set in real time according to the required bus bandwidth, and power saving can be realized while the bus speed is increased.
次に添付図面を参照して本発明によるDMAコントローラの実施例を詳細に説明する。図1は、本発明によるDMAコントローラを使用したバス制御機構の実施例の構成を示す図である。本実施例によるバス制御機構10は、バス12、CPU14、16、第1モジュール18、第2モジュール20ないし第nモジュール22(nは正の整数)およびDMAコントローラ24を含んでいる。なお、本発明の理解に直接の関係ない要素は省略し冗長な説明を避ける。
Embodiments of a DMA controller according to the present invention will now be described in detail with reference to the accompanying drawings. FIG. 1 is a diagram showing a configuration of an embodiment of a bus control mechanism using a DMA controller according to the present invention. The
このようなDMAコントローラは、バスが搭載された任意の機器に用いることができ、例えば、音声や動画のリアルタイム配信システム、リアルタイム画像処理が必要なシステム、テレビ電話、携帯電話、デジタルビデオカメラ、デジタルスチルカメラなどに用いることができる。 Such a DMA controller can be used for any device equipped with a bus. For example, a real-time distribution system for audio and video, a system that requires real-time image processing, a video phone, a mobile phone, a digital video camera, a digital It can be used for a still camera or the like.
バス12はCPU14、16やモジュール18、20、22、DMAコントローラ24共用の情報伝送路である。CPU14、16は、バス12を介してバス制御機構10全体の統括、制御を行うものである。第1モジュール18は、任意の機能部であり、例えば本実施例のバス制御機構がデジタルカメラに搭載される場合には、信号処理部、画像処理部、メモリ、記録再生部などである。第2モジュール20ないし第nモジュール22についても同様である。これらのモジュールはバス12を介してデータの送受信を行う。DMAコントローラ24は、各モジュールのデータの転送を制御するものである。例えば、第1モジュール18がデータの転送を行う場合には、第1モジュール18からバスの解放を要求するリクエスト信号26が送られてくる。これに対しDMAコントローラ24はアクノリッジ信号32を返し、この信号により第1モジュール18がバス12を使用することを許可されれば、第1モジュールはデータの転送を行うことができる。なお、本実施例におけるバス制御機構10では、CPUは2つ、またDMAコントローラは1つ存在するが、本発明はこれに限定されるわけではなく、任意の数のCPUおよびDMAコントローラを用いることが可能である。
The
本実施例のDMAコントローラ24は、DMA転送データを基本時間単位に分割された複数のトランザクションとみなし、個々のトランザクションの転送をスケジューリングするものであり、図1に示すように、期間設定レジスタ34、転送カウンタ36、帯域設定レジスタ38、優先度レジスタ40、バスアービタ42の各機能部を含んでいる。
The
期間設定レジスタ34は、一定期間の値を保持し、一定期間情報44を転送カウンタに渡すものである。一定期間は、任意の方法で任意の値に設定可能である。
The
転送カウンタ36は、一定期間にわたって第1モジュール18、第2モジュール20ないし第nモジュール22から転送されたトランザクションの数を計測して、それらの値をそれぞれ第1モジュールカウンタ46、第2モジュールカウンタ48ないし第nモジュールカウンタ50に保持するものである。過去転送回数情報52は必要に応じてバスアービタに渡される。転送カウンタは期間設定レジスタから受け取った情報44に基づいて、一定期間ごとにリセットされ、新たに転送回数を計測する。
The
帯域設定レジスタ38は、第1モジュール18、第2モジュール20ないし第nモジュール22が必要とするバス帯域の値を、それぞれ第1モジュール帯域記憶部54、第2モジュール帯域記憶部56ないし第nモジュール帯域記憶部58に保持するものである。なお、本実施例では帯域はバスの時間占有率で表される。帯域はすべてのモジュールに設定されていなくてもよいが、すべての帯域値をバスの時間占有率に換算して合計した値が、1より大きくならないようにする。帯域の設定や変更は任意の方法で任意の時間に行うことができ、本実施例ではCPU14が行う。ただし、この設定や変更がDMAコントローラによる制御に反映されるのは一定期間ごとである。帯域情報60は必要に応じてバスアービタ42に渡され、帯域が設定されたモジュールに対しては、一定時間内での転送が確実に行われるよう、最優先でスケジューリングが行われる。
The
優先度レジスタ40は、第1モジュール18、第2モジュール20ないし第nモジュール22の優先度を、それぞれ第1モジュール優先度記憶部62、第2モジュール優先度記憶部64ないし第nモジュール優先度記憶部66を保持し、必要に応じて優先度情報68をバスアービタに渡すものである。優先度の設定や変更は任意の方法で、任意の時間に行うことができ、本実施例ではCPU14が行う。この設定や変更がDMAコントローラによる制御に反映されるのは一定期間ごとである。
The
バスアービタ42は、各モジュールの帯域、過去転送回数、優先度を含む優先判定情報を基に各トランザクションの転送優先順位計算を実行し、その結果を基に各モジュールに対しアクノリッジ信号32を出力するものである。帯域設定されたモジュールのリクエストが同一時間に複数存在し、これらのモジュールのバス占有率の合計値が1を超えた場合、CPUにエラー信号70を出力し、割り込みを発生させる。
The
図2を参照して、本発明のDMAコントローラによるスケジューリング方法をより詳細に説明する。図2に示す例では、期間設定レジスタ34で設定されている一定期間72に、第1モジュールからデータ74を、第2モジュールからデータ76および78を、第3モジュールからデータ80、82および84を転送するためのリクエストが受け付けられている。まず初めに第1のモジュールおよび第3のモジュールから、それぞれデータ74および80を転送するためのリクエストが受け付けられ、これらのデータは、基本時間単位で分割された複数のトランザクションとみなされる。基本時間単位は任意に設定可能であり、例えば基本時間単位が16バイトに設定されている場合、データ量1KBのデータは64個のトランザクションとみなされる。このとき必要とされるデータ量の値は任意の方法で得られ、例えば、それぞれのモジュールからDMA転送リクエストとともにDMAコントローラから得る方法、CPUから得る方法、又は転送データの転送元やデータサイズなどを格納したレジスタ等から得る方法などがある。図2に示す例ではデータ74はトランザクション86、88等とみなされ、データ80はトランザクション90および92とみなされる。どのトランザクションを転送するかは、基本時間単位ごとに計算して決定される。例えば、基本時間単位が16バイトであり、バス幅が4バイトであれば、転送されるトランザクションは4バスサイクルごとに決定される。その結果、図2に示す例ではまず第3モジュールがバスの使用を許可されてトランザクション90を転送し、次に第1モジュールがバスの使用を許可されてトランザクション86を転送している。
With reference to FIG. 2, the scheduling method by the DMA controller of the present invention will be described in more detail. In the example shown in FIG. 2, the
図2に示す例では、データ74の転送が完了する前に、第3モジュールからデータ82を、続いて第2モジュールからデータ76を転送するためのリクエストが受け付けられている。この場合DMAコントローラ24は、データ74の転送が完了するまで待たず、帯域や過去転送回数、優先度などを基に、新たなリクエストも含めてどのモジュールからのリクエストを優先的に実行させるかを判定し、最も優先順位の高いモジュールにバスの使用を許可する。一定期間72が経過すると、転送カウンタ36は一度リセットされ、再び一定期間カウントを行う。
In the example shown in FIG. 2, before the transfer of
図3を参照して優先判定方法をより詳細に説明する。図3に示されているのは各モジュールの優先度や帯域、過去転送回数であり、優先判定に用いられる。図3に示す例では、優先度は数値の高いものほど優先度が高いものとし、最高を5、最低を1としている。図3に示す例では、第1モジュールと第5モジュールに設定されているが、その他のモジュールには設定されていない。過去転送回数は、直近の一定期間72の開始から現在にいたるまでに各モジュールから転送されたトランザクションの数である。図3に示される例では、過去転送回数はこの一定期間が開始してから10基本時間が経過した時の値とする。
The priority determination method will be described in more detail with reference to FIG. FIG. 3 shows the priority, bandwidth, and past transfer count of each module, and is used for priority determination. In the example shown in FIG. 3, the priority is higher as the numerical value is higher, with 5 being the highest and 1 being the lowest. In the example shown in FIG. 3, the first module and the fifth module are set, but the other modules are not set. The past transfer count is the number of transactions transferred from each module from the start of the most recent
優先判定は、帯域設定されているモジュールから優先的に行われ、まず帯域と過去転送率とが比較される。過去転送率は、本実施例では、(過去転送回数)/(直近の一定期間の開始から現在までに経過した基本時間)で表される。つまり、図3に示される例では、第1モジュールの転送率は0.2であり、第5モジュールの優先率は0.3である。 The priority determination is performed preferentially from the band-set module, and the band and the past transfer rate are first compared. In the present embodiment, the past transfer rate is represented by (the number of past transfers) / (basic time elapsed from the start of the latest fixed period to the present). That is, in the example shown in FIG. 3, the transfer rate of the first module is 0.2, and the priority rate of the fifth module is 0.3.
帯域と過去転送率とを比較し、帯域<過去転送率であれば緊急度は低く、帯域>過去の転送率であれば緊急度は高いと判断される。つまり、図3に示される例においては、第1モジュールでは、帯域値が0.1に対し過去の転送率が0.2であるため、緊急度は低いと判断される。また、第5モジュールでは、帯域が0.5であるのに対し過去の転送率は0.3であるため緊急度は高いと判断される。緊急度が高いと判断されたモジュールからのデータ転送は、最優先で実行される。図3の例では、第5モジュールからのデータ転送が実行される。帯域>過去の転送率であるモジュールが複数ある場合には、優先度が高いモジュールか転送率の低いモジュールからのデータ転送を実行する。この場合、どちらのモジュールを優先させるかは任意に設定可能である。したがって優先度が同じ場合には転送率の低いモジュールからの転送を優先させ、転送率が同じ場合には優先度の低いモジュールからのデータ転送を優先させればよい。まったく同条件の場合には、ラウンドロビン方式や、各モジュールについて優先度とは別に設定された固定優先度などを用いて優先判定を行う。 The bandwidth is compared with the past transfer rate, and if the bandwidth <the past transfer rate, the urgency is low, and if the bandwidth> the past transfer rate, the urgency is determined to be high. That is, in the example shown in FIG. 3, the first module determines that the urgency level is low because the bandwidth value is 0.1 and the past transfer rate is 0.2. In the fifth module, the urgency is determined to be high because the bandwidth is 0.5 and the past transfer rate is 0.3. Data transfer from a module determined to have a high degree of urgency is executed with the highest priority. In the example of FIG. 3, data transfer from the fifth module is executed. When there are a plurality of modules having a bandwidth> past transfer rate, data transfer is performed from a module with a high priority or a module with a low transfer rate. In this case, which module is prioritized can be arbitrarily set. Therefore, when the priority is the same, priority is given to transfer from a module with a low transfer rate, and when the transfer rate is the same, priority is given to data transfer from a module with a low priority. In the case of exactly the same conditions, priority determination is performed using a round robin method or a fixed priority set separately from the priority for each module.
帯域>過去の転送率であるモジュールがない場合の優先判定は、帯域設定されていないモジュールも含めて、帯域>過去の転送率であるモジュールが複数ある場合の判定方法と同様に行えばよい。帯域設定されているモジュールがない場合も同様である。 The priority determination when there is no module with a bandwidth> past transfer rate may be performed in the same manner as the determination method when there are a plurality of modules with a bandwidth> past transfer rate, including modules for which no bandwidth is set. The same applies when there is no module for which the bandwidth is set.
図4は図1に示すDMAコントローラ24における優先判定処理手順の一例を示した流れ図である。図4を参照して、本発明で用いられるDMAコントローラ24の処理手順について具体的に説明する。まず、DMAコントローラにリクエストが受け付けられると(S10)、このリクエストによって転送されるデータは基本時間単位に分割された複数のトランザクションとみなされる(S12)。
FIG. 4 is a flowchart showing an example of a priority determination processing procedure in the
このリクエストを行ったモジュールの過去転送回数情52が、転送カウンタ36からバスアービタ42に送られる(S14)。また、このモジュールの帯域情報60が帯域設定レジスタからバスアービタに送られ、帯域が設定されているか否かの判断が行われる(S16)。
The past transfer count information 52 of the module that made this request is sent from the
帯域が設定されている場合(YES)には、このモジュールの帯域値と過去の転送率とが比較される(S18)。転送率より帯域値が大きい場合(NO)には、このモジュールからのリクエストは、緊急性の高いリクエストとみなされる(S20)。ここで、他のモジュールからのリクエストがあるか否かの判断がされ(S22)、他のモジュールからのリクエストがない場合(NO)にはこのリクエストは実行され(S24)、リクエストがある場合(YES)には、優先判定情報を基にもっとも優先順位の高いリクエストが選択されて(S26)実行される(S28)。 When the bandwidth is set (YES), the bandwidth value of this module is compared with the past transfer rate (S18). If the bandwidth value is larger than the transfer rate (NO), the request from this module is regarded as a highly urgent request (S20). Here, it is determined whether or not there is a request from another module (S22). If there is no request from another module (NO), this request is executed (S24). If YES, the request with the highest priority is selected based on the priority determination information (S26) and executed (S28).
リクエストを行ったモジュールに帯域が設定されていない場合には、ステップS22における判断がされ、以下同様に処理される。 If no bandwidth is set for the module that made the request, a determination is made in step S22, and the same processing is performed thereafter.
図5には、本発明によるDMAコントローラを使用したバス制御機構の別の一例が概念的に示されている。本実施例によるバス制御機構100では、各モジュールからのデータを、時間により変化する帯域に対応して転送させる。図5において図1と同じ参照番号は同様の構成要素を示す。
FIG. 5 conceptually shows another example of the bus control mechanism using the DMA controller according to the present invention. In the
図5に示す例では、転送データごとに指定された帯域に応じたバス使用の優先順位の割付けが行われる。より具体的には、DMAコントローラ100は、データ情報取得部102、帯域設定データスケジューリング部104、非帯域設定データスケジューリング部106および全体スケジュール管理部108を含み、データごとに指定された帯域値に応じてスケジューリングが行う。なお、図5に示す実施例では帯域はバスの時間占有率で表されている。
In the example shown in FIG. 5, the priority order of bus use is assigned according to the band designated for each transfer data. More specifically, the
データ情報取得部102は、リクエストと共にDMAコントローラに送られてきた転送データに関する情報を取得し、この転送データに帯域が設定されているか否かの判断を行うものである。転送データ情報には、優先度、帯域およびデータ量などが含まれ、帯域が設定されているデータのデータ情報110は帯域設定データスケジューリング部104に、帯域が設定されていないデータのデータ情報112は非帯域設定データスケジューリング部106に渡される。
The data
図6を参照して転送データの構成をより詳細に説明する。図6に示される例では、転送データはヘッダパケット114とデータパケット116で構成され、ヘッダパケット114にはこのデータの優先度、帯域値およびデータ量が格納されている。DMA転送リクエストの際、このヘッダパケットはデータ情報取得部102に送られて解析される。もちろん、これらのデータ情報は他の公知の手段を用いて取得されてもよいし、データの構成はパケットの構成に限られない。
The configuration of the transfer data will be described in more detail with reference to FIG. In the example shown in FIG. 6, the transfer data is composed of a
帯域設定データスケジューリング部104は、帯域設定されているデータを複数のトランザクションとみなし、そのデータの帯域に応じた転送が行われるよう、データ情報110を基に各トランザクションの転送スケジュール118を決定するものである。スケジュール118は全体スケジュール管理部108に渡される。
Band setting
非帯域設データスケジューリング部106は、帯域設定されていないデータを複数のトランザクションとみなし、データ情報112を基に各トランザクションの転送スケジュール120を決定するものである。帯域設定されていないデータの転送順位の割付けは、基本的には受け付けられた順に行われる。ただし、より優先度の高いパケットが後から来た場合、優先度の低いデータのスケジュールを解消し、再スケジューリングを行ってもよい。もちろん、ラウンドロビン方式や優先度とは別に設けられた固定優先度を用いて決定してもよい。スケジュール120は全体スケジュール管理部108に渡される。
The non-bandwidth
全体スケジュール管理部108は、スケジュール118と120を受け取り、両スケジュールの調整を行うものである。全体スケジュール管理部108は、スケジュール118のとおりに転送が行えない場合には、スケジューリング部104に対し再スケジューリングリクエスト122を出して、非帯域設定データを含むすべてのデータの転送を考慮したスケジューリングを行わせる。また、スケジュール120のとおりに転送が行えない場合には、スケジューリング部106に対し再スケジューリングリクエスト124を出して、帯域設定データのスケジュールの空き時間にデータが転送されるようスケジューリングを行わせる。スケジュール118および120の調整が行われてデータ全体のスケジュール126が決定すると、全体スケジュール126はバスアービタ42に渡される。なお、リクエストを行ったすべてのモジュールの帯域値の合計が1を超えるなどして、帯域を確保できるスケジューリングが行われなかった場合には、全体スケジュール管理部108はCPUに対しエラー割込みをかける。
The overall
図7を参照して、データ分割およびスケジューリングの様子を詳細に説明する。図7に示す例では、まず初めに第1のデータ128、次に第2のデータ130、最後に第3のデータ132の転送を要求するリクエストが受け付けられている。第1のデータ128のデータ量は10であり、帯域値は0.5に設定されている。第2のデータ130のデータ量は6、優先度は2であり、帯域は設定されていない。第3のデータ132のデータ量は2、優先度は3であり、帯域は設定されていない。第1のデータは3つのトランザクション134、136、138とみなされ、第1データの帯域が0.5であることから各トランザクションのデータ量を4、4、2、各トランザクションの転送間隔を4データサイクルとしてスケジューリングされている。このスケジューリングはデータ128の転送前に決定され、転送途中で変更されない。トランザクションの数や各トランザクションのデータ量、転送間隔は任意の方法を用いて得ることができ、例えば、帯域や転送量に応じた値を、レジスタやデータ情報に格納し、必要に応じて取り出す方法などが考えられる。
The state of data division and scheduling will be described in detail with reference to FIG. In the example shown in FIG. 7, a request for requesting transfer of
帯域設定されていない第2のデータはトランザクション140および142、第3のデータはトランザクション144として、データ128の転送スケジュールの空き時間に転送される。トランザクションの数や各トランザクションのデータ量を決定する方法は、帯域設定されているデータに対して用いられた方法と同様の方法を用いればよい。図3に示す例では、データ132の転送リクエストはデータ130の転送リクエストより後に受け付けられているが、データ132はより高い優先度を有するため、先にデータ132が転送されるようスケジューリングされている。
The second data for which no bandwidth has been set is transferred as
図8は図5に示すDMAコントローラ24における処理手順の一例を示した流れ図である。図8を参照して、本発明のデータ転送の処理手順について具体的に説明する。図8において図4と同じ参照符号は、同様の処理を示す。まず、あるモジュールからのDMA転送リクエストおよびこのリクエストにより転送されるデータのデータ情報がDMAコントローラ24に受け付けられる(S30)。データ情報はデータ情報取得部102へ送られ、このデータに帯域が設定されているか否かの判断が行われる(S32)。
FIG. 8 is a flowchart showing an example of a processing procedure in the
帯域設定されているデータは、帯域設定データスケジューリング部104にて帯域に応じてスケジューリングされる(S34)。スケジューリングされたデータは、全体スケジュール管理部108において帯域設定データスケジューリング部104の要求どおりにスケジューリングできたか否か判断され(S36)、要求どおりにスケジューリングされれば(YES)そのスケジュールに従って転送され(S38)、要求どおりにスケジューリングできなければ(NO)、他のデータも含めて再スケジューリングされる(S40)。このとき、すでに決定された他のデータの転送スケジュールにより、帯域を満たすスケジューリングが行えない場合には、帯域設定されていないデータのスケジュールはすべて解消されて、再スケジューリングが行われる。その後、スケジューリング部104の要求どおりにスケジューリングできたか否か判断され(S42)、要求どおりにスケジューリングができた場合(YES)には、このスケジュールに従いデータ転送を行い(S38)、できなかった場合(NO)には全体スケジューリング部108からCPU16に対しエラー報告が行われる(S44)。
The band-set data is scheduled according to the band by the band setting data scheduling unit 104 (S34). The scheduled data is judged by the overall
一方、帯域設定されていないデータはスケジューリング部106にて他のデータの転送スケジュールの空き時間に転送されるようスケジューリングされる(S46)。
On the other hand, the data for which the band is not set is scheduled to be transferred by the
図9には、本発明によるDMAコントローラを使用したバス制御機構の別の一例が概念的に示されている。図9に示すバス制御機構200では、バス12の動作速度を必要となるバス帯域に応じて変更する。図9において図1と同じ参照番号は同様の構成要素を示す。
FIG. 9 conceptually shows another example of the bus control mechanism using the DMA controller according to the present invention. In the
図9に示す例では、すべてのモジュールに帯域が設定され、バス12の動作速度をすべてのモジュールの帯域値の合計に応じて変更する。より具体的には、バス制御機構200はバスクロック制御部202およびクロックコントローラ204を含み、バスクロック制御部202およびクロックコントローラ204によってバスクロックを能動的に制御する。なお、図9に示す実施例では、帯域は単位時間当たりの転送量で表される。
In the example shown in FIG. 9, bands are set for all modules, and the operating speed of the
バスクロック制御部202は、各モジュールのデータ転送量の合計を基にバスの周波数を計算するものである。算出された周波数値206はクロックコントローラ204に出力される。
The bus
クロックコントローラ204は、バス制御部からの設定値によるバスクロック制御も含め、回路全体のクロック制御を行うものである。クロックコントローラ204は周波数値206に応じたクロックを、各モジュールやCPUに渡す。
The
図10を参照して周波数の算出方法をより詳細に説明する。図10に示される優先判定情報の過去転送回数は過去10基本時間における各モジュールの転送回数である。すべてのモジュールの帯域値を合計すると80MB/秒になる。各モジュールが要求するバスの占有率は(各モジュールの帯域値)/(すべてのモジュールの帯域値の合計)で表され、例えば、第5モジュールのバス占有率は0.5である。また、バス周波数は(すべてのモジュールの帯域値の合計)/(バス幅)で表される。図9に示す例においてバス幅が4バイトであるとすると、バス周波数は20MHzと計算される。また、第5モジュールのバス占有率は0.5であり、過去の転送率は0.3であるため、最優先で転送が行われる。 The frequency calculation method will be described in more detail with reference to FIG. The past transfer count of the priority determination information shown in FIG. 10 is the transfer count of each module in the past 10 basic times. The total bandwidth value of all modules is 80MB / sec. The occupancy ratio of the bus requested by each module is expressed by (band value of each module) / (sum of the band values of all modules). For example, the bus occupancy ratio of the fifth module is 0.5. The bus frequency is represented by (total of band values of all modules) / (bus width). In the example shown in FIG. 9, if the bus width is 4 bytes, the bus frequency is calculated to be 20 MHz. Further, since the bus occupancy rate of the fifth module is 0.5 and the past transfer rate is 0.3, transfer is performed with the highest priority.
10 バス制御機構
36 転送カウンタ
38 帯域設定レジスタ
42 バスアービタ
102 データ情報取得部
10 Bus control mechanism
36 Transfer counter
38 Band setting register
42 Bus Arbiter
102 Data information acquisition unit
Claims (11)
前記要求により転送されるデータを転送するために用いられるバス帯域を取得する帯域取得手段と、
前記モジュールのデ−タ転送回数を計測する計測手段と、
前記バス帯域からバス時間占有率を求め、前記転送回数から転送率を求め、前記占有率と前記転送率とを比較し、比較結果に応じて前記モジュールに前記システムバスを解放する転送制御手段とを含むことを特徴とするDMAコントローラ。 In a DMA controller that receives a transfer request from a module connected to the system bus and controls DMA transfer between the modules, the DMA controller
Band acquisition means for acquiring a bus band used for transferring data transferred by the request;
Measuring means for measuring the number of times of data transfer of the module;
A transfer control means for obtaining a bus time occupation rate from the bus band, obtaining a transfer rate from the number of transfers, comparing the occupation rate with the transfer rate, and releasing the system bus to the module according to a comparison result; DMA controller characterized by including.
該DMAコントローラはさらに、前記モジュールの優先度を記憶する第2の記憶手段を含み、
前記転送制御手段は、前記転送率より前記占有率が高いモジュールが複数ある場合、または前記転送率より前記占有率が高いモジュールがない場合で、かつ最も転送率の低いモジュールが複数ある場合には、最も優先度の高いモジュールに前記システムバスを解放することを特徴とするDMAコントローラ。 The DMA controller according to claim 1,
The DMA controller further includes second storage means for storing the priority of the module;
The transfer control means, when there are a plurality of modules having the higher occupation rate than the transfer rate, or when there is no module having the higher occupation rate than the transfer rate and there are a plurality of modules having the lowest transfer rate. A DMA controller, characterized by releasing the system bus to the highest priority module.
該DMAコントローラはさらに、前記モジュールの優先度を記憶する第2の記憶手段を含み、
前記転送制御手段は、前記転送率より前記占有率が高いモジュールが複数ある場合、または前記転送率より前記占有率が高いモジュールがない場合には、最も優先度の高いモジュールに前記システムバスを解放することを特徴とするDMAコントローラ。 The DMA controller according to claim 1,
The DMA controller further includes second storage means for storing the priority of the module;
The transfer control unit releases the system bus to the module having the highest priority when there are a plurality of modules having the occupation ratio higher than the transfer ratio or when there is no module having the occupation ratio higher than the transfer ratio. A DMA controller characterized by
前記要求により転送されるデータを転送するために用いられるバス帯域と、該データのデータ量とを取得するデータ情報取得手段と、
前記バス帯域と前記データ量に応じて前記転送データを送信するモジュールに前記システムバスを解放する転送制御手段とを含むことを特徴とするDMAコントローラ。 In a DMA controller that receives a transfer request from a module connected to the system bus and controls DMA transfer between the modules, the DMA controller
Data information acquisition means for acquiring a bus bandwidth used for transferring data transferred by the request and a data amount of the data;
A DMA controller, comprising: transfer control means for releasing the system bus to a module that transmits the transfer data according to the bus bandwidth and the data amount.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007245471A JP2009075942A (en) | 2007-09-21 | 2007-09-21 | Dma controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007245471A JP2009075942A (en) | 2007-09-21 | 2007-09-21 | Dma controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009075942A true JP2009075942A (en) | 2009-04-09 |
JP2009075942A5 JP2009075942A5 (en) | 2010-04-08 |
Family
ID=40610832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007245471A Withdrawn JP2009075942A (en) | 2007-09-21 | 2007-09-21 | Dma controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009075942A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3355199A1 (en) | 2017-01-26 | 2018-08-01 | Canon Kabushiki Kaisha | Memory access system, method for controlling the same, computer-readable storage medium, and image forming appratus |
JP2022017393A (en) * | 2014-10-31 | 2022-01-25 | テキサス インスツルメンツ インコーポレイテッド | Multi-core bus architecture with non-blocking high performance transaction credit system |
-
2007
- 2007-09-21 JP JP2007245471A patent/JP2009075942A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2022017393A (en) * | 2014-10-31 | 2022-01-25 | テキサス インスツルメンツ インコーポレイテッド | Multi-core bus architecture with non-blocking high performance transaction credit system |
JP7227680B2 (en) | 2014-10-31 | 2023-02-22 | テキサス インスツルメンツ インコーポレイテッド | Multi-core bus architecture with non-blocking high performance transaction credit system |
EP3355199A1 (en) | 2017-01-26 | 2018-08-01 | Canon Kabushiki Kaisha | Memory access system, method for controlling the same, computer-readable storage medium, and image forming appratus |
US11163711B2 (en) | 2017-01-26 | 2021-11-02 | Canon Kabushiki Kaisha | Memory access system, method for controlling the same, computer-readable storage medium, and image forming apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8549199B2 (en) | Data processing apparatus and a method for setting priority levels for transactions | |
JP4723260B2 (en) | Apparatus and method for scheduling a request to a source device | |
EP2807567B1 (en) | Systems and methods for dynamic priority control | |
JP4238133B2 (en) | Method and apparatus for scheduling resources that meet service quality regulations | |
US7350004B2 (en) | Resource management device | |
US20120042105A1 (en) | Bus arbitration apparatus | |
US7769936B2 (en) | Data processing apparatus and method for arbitrating between messages routed over a communication channel | |
JP4436367B2 (en) | Arbitration apparatus, arbitration method, and moving picture processing apparatus including the arbitration apparatus that guarantee local concentrated access with a low bandwidth | |
US7647444B2 (en) | Method and apparatus for dynamic hardware arbitration | |
JP4457168B2 (en) | Resource request arbitration device, resource request arbitration method, and computer program | |
JP5829890B2 (en) | Semiconductor data processing apparatus, time trigger communication system, and communication system | |
US20070233923A1 (en) | Bus arbitration system and method thereof | |
JP2005242718A (en) | Data transfer apparatus and transfer control program | |
JP5144934B2 (en) | Method and apparatus for establishing a quality of service model | |
JP2009075942A (en) | Dma controller | |
JP2006350573A (en) | Data transfer controller, data transfer control method, data transfer device, image forming device, data transfer control program and computer-readable recording medium recording control program | |
CN113515473A (en) | QoS control method, bus system, computing device and storage medium | |
JP2006215621A (en) | Dma controller | |
JP7381603B2 (en) | Data transfer device and data transfer method | |
US7747806B2 (en) | Resource use management device, resource use management system, and control method for a resource use management device | |
JP7226084B2 (en) | Information processing equipment | |
JP2007316726A (en) | Data transfer controller | |
WO2013076522A1 (en) | Data processing system and method of controlling access to a shared memory unit | |
JP4862593B2 (en) | Data transfer apparatus and image forming apparatus | |
JP2002091903A (en) | Bus system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Effective date: 20100219 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A621 | Written request for application examination |
Effective date: 20100219 Free format text: JAPANESE INTERMEDIATE CODE: A621 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20110614 |