JP2005210567A - Bus control method and bus control apparatus - Google Patents

Bus control method and bus control apparatus Download PDF

Info

Publication number
JP2005210567A
JP2005210567A JP2004016693A JP2004016693A JP2005210567A JP 2005210567 A JP2005210567 A JP 2005210567A JP 2004016693 A JP2004016693 A JP 2004016693A JP 2004016693 A JP2004016693 A JP 2004016693A JP 2005210567 A JP2005210567 A JP 2005210567A
Authority
JP
Japan
Prior art keywords
bus
bus master
priority
master
time
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.)
Abandoned
Application number
JP2004016693A
Other languages
Japanese (ja)
Inventor
Naoyuki Hirayama
直之 平山
Kaoru Saeki
薫 佐伯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2004016693A priority Critical patent/JP2005210567A/en
Publication of JP2005210567A publication Critical patent/JP2005210567A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a bus control method and bus control apparatus, with which data transfer efficiency can be further improved, with regard to the bus control method, and to provide bus control apparatus for controlling a plurality of bus masters to use a bus, based on a timetable composed of a plurality of time slots. <P>SOLUTION: Priorities are given to a plurality of bus masters, and a plurality of time slots are assigned to the bus masters according to the priorities. Furthermore, if a bus master to which a time slot is assigned, does not request the use of a bus, a bus master, other than the bus master and having the highest priority, is made to use the bus, and the priority of the bus master which did not request the use of the bus, is improved. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、複数のバスマスタを接続したバスを時分割して共用するバス制御方法及びバス制御装置に関するものである。   The present invention relates to a bus control method and a bus control device for sharing a bus connected to a plurality of bus masters in a time-sharing manner.

従来、複数のバスマスタを接続したバスにおいて、各バスマスタがバスを時分割しながらデータ転送を行う場合には、バス調停回路に設けたタイマモジュールのタイムスロットに基づいて所定時間ごとに各バスマスタへの使用の許可を切り替え、許可されたバスマスタのデータ転送を実行させるようにしたバス制御方法が知られている(例えば、特許文献1参照。)。
特表2001−516100号公報
Conventionally, in a bus in which a plurality of bus masters are connected, when each bus master performs data transfer while time-sharing the bus, the bus master is connected to each bus master at predetermined intervals based on the time slot of the timer module provided in the bus arbitration circuit A bus control method is known in which use permission is switched and data transfer of a permitted bus master is executed (see, for example, Patent Document 1).
Special table 2001-516100 gazette

しかしながら、タイムスロットに基づいてバスの使用が許可されるバスマスタを所定時間ごとに順次切り替えた場合には、重要度及び優先度の異なるデータ転送がそれぞれ画一的に実行されることによって、重要なデータが分割されて転送されたり、優先度の高いデータ転送の途中において優先度の低いデータ転送が実行されたりすることになり、データ転送の効率が低下するおそれがあった。   However, when the bus masters that are permitted to use the bus based on time slots are sequentially switched every predetermined time, data transfer with different importance and priority is executed uniformly, which is important. Data may be divided and transferred, or low-priority data transfer may be executed in the middle of high-priority data transfer, which may reduce the efficiency of data transfer.

そこで、本発明のバス制御方法では、優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス制御方法において、複数のタイムスロットを、優先順位に応じた個数でバスマスタに割り当てることとした。   Therefore, in the bus control method of the present invention, in the bus control method for controlling the use of buses by a plurality of bus masters with priorities based on a time table composed of a plurality of time slots, a plurality of time slots are assigned priority levels. The number of bus masters is assigned according to the number.

さらに、以下の点にも特徴を有するものである。すなわち、
(1)タイムスロットが割り当てられたバスマスタがバスの使用を要求しない場合には、そのバスマスタ以外のバスマスタであって、優先順位の最も高いバスマスタにバスを使用させるとともに、バスの使用を要求しなかったバスマスタの優先順位を上げること。
(2)優先順位を上げたバスマスタが、その後、バスを使用した場合に、そのバスマスタの優先順位を下げること。
(3)バスマスタによるバスの使用履歴に基づいてタイムテーブルを更新すること。
Furthermore, the following points are also characteristic. That is,
(1) When the bus master to which the time slot is assigned does not request the use of the bus, the bus master other than the bus master and having the highest priority uses the bus and does not request the use of the bus. Raise the priority of the bus master.
(2) When a bus master whose priority has been raised subsequently uses the bus, the priority of the bus master is lowered.
(3) Update the time table based on the bus usage history by the bus master.

また、本発明のバス制御装置では、優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス調停回路を有するバス制御装置において、複数のタイムスロットを、優先順位に応じた個数でバスマスタに割り当てるようにバス調停回路を構成した。   Further, in the bus control device of the present invention, in the bus control device having a bus arbitration circuit that controls the use of the bus by the plurality of bus masters with priorities based on a time table composed of a plurality of time slots, The bus arbitration circuit is configured to allocate the slots to the bus masters in the number corresponding to the priority order.

請求項1記載の発明によれば、優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス制御方法において、複数のタイムスロットを、優先順位に応じた個数でバスマスタに割り当てることによって、優先順位の高いバスマスタによるバスの使用時間を向上させてデータ転送の効率を向上させることができ、場合によっては一つのバスマスタに連続してタイムスロットを割り当てることにより、可変長のタイムスロットとすることができるので、データ転送のさらなる効率向上を図ることができる。   According to the first aspect of the present invention, in the bus control method for controlling the use of a bus by a plurality of bus masters with priorities based on a time table composed of a plurality of time slots, the plurality of time slots are assigned priority levels. By assigning the number of bus masters according to the number of bus masters, it is possible to improve the data transfer efficiency by improving the bus usage time by the bus master with higher priority. In some cases, time slots are continuously assigned to one bus master. As a result, a variable-length time slot can be obtained, so that the efficiency of data transfer can be further improved.

請求項2記載の発明によれば、タイムスロットが割り当てられたバスマスタがバスの使用を要求しない場合には、そのバスマスタ以外のバスマスタであって、優先順位の最も高いバスマスタにバスを使用させることによって、バスの使用効率を向上させてデータ転送の効率を向上させることができる。しかも、バスの使用を要求しなかったバスマスタに対してはその優先順位を上げることによって、次にバスの使用が可能となる機会を得られやすくすることができる。   According to the second aspect of the present invention, when the bus master to which the time slot is allocated does not request the use of the bus, the bus master other than the bus master and using the bus master having the highest priority uses the bus. The efficiency of data transfer can be improved by improving the bus use efficiency. In addition, by raising the priority of the bus master that has not requested the use of the bus, it is possible to easily obtain the next opportunity to use the bus.

特に、タイムスロットでバスの使用が割り当てられているにもかかわらず、バスの使用を要求しないことがあるバスマスタは、優先順位が比較的低いためにバスの使用が割り当てられる頻度が少なくなっているので、このように優先順位が低いバスマスタにおいてはバスが長時間使用できなくなるおそれがあるが、バスの使用を要求しなかったバスマスタに対してはその優先順位を上げることによって比較的速やかにそのバスマスタによるバスの使用の機会を与えることができるので、データ転送が長時間実施されないことが生じるおそれを解消できる。   In particular, bus masters that may not require bus use even though bus use is assigned in time slots are less frequently assigned bus use due to their relatively low priority. Therefore, in such a low-priority bus master, there is a possibility that the bus cannot be used for a long time. However, for a bus master that does not require the use of the bus, the bus master can be relatively quickly increased by increasing its priority. Since the opportunity of using the bus can be given, the possibility that data transfer will not be performed for a long time can be solved.

請求項3記載の発明によれば、優先順位を上げたバスマスタが、その後、バスを使用した場合に、そのバスマスタの優先順位を下げることによって、もともと優先順位が低いバスマスタに高い優先順位を与えておくことによる不具合、すなわち、優先順位の変更にともなって優先順位が下げられたバスマスタによるバスの使用機会が低減するという不具合が生じることを抑制して、データ転送の効率化を図ることができる。   According to the third aspect of the present invention, when a bus master whose priority is raised subsequently uses the bus, the bus master having a lower priority is given a higher priority by lowering the priority of the bus master. It is possible to improve the efficiency of data transfer by suppressing the occurrence of a problem caused by leaving, that is, the problem of reducing the bus use opportunity by the bus master whose priority is lowered as the priority is changed.

請求項4記載の発明によれば、バスマスタによるバスの使用履歴に基づいてタイムテーブルを更新することによって、データ転送をより効率的に実施できるタイムテーブルを自動的に生成することができる。特に、各バスマスタの実質的な処理の発生に対応したタイムテーブルを生成することができるので、データ転送の効率をさらに向上させることができる。   According to the invention described in claim 4, by updating the time table based on the bus use history by the bus master, it is possible to automatically generate a time table capable of performing data transfer more efficiently. In particular, since a time table corresponding to the occurrence of substantial processing of each bus master can be generated, the efficiency of data transfer can be further improved.

請求項5記載の発明によれば、優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス調停回路を有するバス制御装置において、複数のタイムスロットを、優先順位に応じた個数でバスマスタに割り当てるようにバス調停回路を構成したことによって、請求項1記載の発明と同様に、優先順位の高いバスマスタによるバスの使用時間を向上させてデータ転送の効率を向上させることができ、場合によっては一つのバスマスタに連続してタイムスロットを割り当てることにより、可変長のタイムスロットとすることができるので、データ転送のさらなる効率向上を図ることができる。   According to the fifth aspect of the present invention, in the bus control device having the bus arbitration circuit that controls the use of the buses by the plurality of prioritized bus masters based on the time table including a plurality of time slots, Since the bus arbitration circuit is configured to allocate the slots to the bus masters in the number corresponding to the priority order, the bus use time by the bus master having the high priority order is improved to transfer the data as in the first aspect of the invention. In some cases, by assigning time slots consecutively to one bus master, variable time slots can be obtained, so that further improvement in data transfer efficiency can be achieved.

本発明のバス制御方法及びバス制御装置は、複数のバスマスタによる1つのバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス制御方法及びバス制御装置であって、複数のバスマスタにはそれぞれ優先順位付けを行っておき、この優先順位に応じた個数で複数のタイムスロットにバスマスタに割り当てているものである。   A bus control method and a bus control device according to the present invention are a bus control method and a bus control device for controlling the use of one bus by a plurality of bus masters based on a time table composed of a plurality of time slots. Each is prioritized and is assigned to a plurality of time slots by a number corresponding to this priority.

すなわち、優先順位の高いバスマスタでは、そのバスマスタに割り当てたタイムスロットのタイムテーブルにおける出現回数を多くする一方で、優先順位の低いバスマスタでは、そのバスマスタに割り当てたタイムスロットのタイムテーブルにおける出現回数を少なくして、優先順位の高いバスマスタによるバスの使用機会を多くすることによって、データ転送の効率を向上させているものである。   That is, a bus master with a higher priority increases the number of appearances of the time slot assigned to the bus master, while a bus master with a lower priority reduces the number of appearances of the time slot assigned to the bus master in the time table. Thus, the efficiency of data transfer is improved by increasing the bus use opportunities by the bus master having a high priority.

特に、タイムテーブルにおいて優先順位の高いバスマスタを割り当てたタイムスロットの数を多くした場合には、連続するタイムスロットに同じバスマスタを割り当てることによって可変長のタイムスロットとすることができるので、分割して実行することが望ましくないデータ転送を実行する際に、分割することなくデータ転送を実行することができ、データ転送のさらなる効率向上を図ることができる。   In particular, if the number of time slots to which high priority bus masters are assigned in the time table is increased, variable time slots can be created by assigning the same bus master to consecutive time slots. When performing data transfer that is not desired to be performed, the data transfer can be performed without being divided, and the efficiency of data transfer can be further improved.

また、タイムスロットが割り当てられたバスマスタがバスの使用を要求しなかった場合には、そのバスマスタ以外のバスマスタであって、優先順位の最も高いバスマスタにバスを使用させるようにしている。   When the bus master to which the time slot is assigned does not request the use of the bus, the bus master other than the bus master and having the highest priority is made to use the bus.

したがって、バスが使用されない状況が発生することを抑制することができ、バスの使用効率を向上させてデータ転送の効率を向上させることができる。   Therefore, it is possible to suppress the occurrence of a situation where the bus is not used, and it is possible to improve the bus usage efficiency and improve the data transfer efficiency.

しかも、タイムスロットが割り当てられたバスマスタがバスの使用を要求しなかった場合には、そのバスマスタの優先順位を上げるようにしている。   In addition, when the bus master to which the time slot is assigned does not request the use of the bus, the priority order of the bus master is increased.

したがって、バスが使用できる時にたまたまデータ転送の要求がないことによって他のバスマスタにバスを使用させたバスマスタに対して、バスの使用機会を得られやすくすることができる。   Therefore, it is possible to easily obtain a bus use opportunity for a bus master that has caused another bus master to use the bus when there is no request for data transfer when the bus can be used.

特に、このようにタイムテーブルに基づいてバスが使用できる時にデータ転送の要求がないことがあるバスマスタは優先順位が比較的低いために、そのバスマスタに次にタイムスロットが割り当てられるまでの時間が比較的長くなっているので、このようにバスの使用を要求しなかったバスマスタの優先順位を上げることによって比較的速やかにそのバスマスタによるバスの使用の機会を与えることができるので、データ転送が長時間実施されないことが生じるおそれを解消できる。   In particular, when the bus can be used based on the time table in this way, there is no request for data transfer, so the priority is relatively low, so the time until the next time slot is assigned to that bus master is compared. Therefore, by increasing the priority of the bus master that did not require the use of the bus in this way, it is possible to give the bus master an opportunity to use the bus relatively quickly. The possibility of not being implemented can be eliminated.

また、このように優先順位を上げたバスマスタが、その後、バスを使用した場合には、そのバスマスタの優先順位を下げるようにしている。すなわち、バスマスタの優先順位を上げたことによって相対的に優先順位が下がったバスマスタは、優先順位が上げられたバスマスタよりも基本的には優先順位が上位であるので、優先順位を上げたバスマスタによるデータ転送が実行された後は、優先順位を下げたバスマスタの優先順位を上げることによって多い頻度でバスを使用可能となり、データ転送の効率向上を図ることができる。   Further, when the bus master whose priority is thus increased uses the bus thereafter, the priority of the bus master is decreased. That is, a bus master whose priority is relatively lowered by raising the priority of the bus master is basically higher in priority than a bus master whose priority is raised. After the data transfer is executed, the bus can be used frequently by increasing the priority of the bus master whose priority is lowered, and the efficiency of data transfer can be improved.

このように、バスの使用はタイムテーブルに基づいて画一的に行われるのではなく、各バスマスタからの使用要求に対して優先順位に基づいて使用許可を行うことにより、バスのデッドロックを防止できるとともに、所要のデータ転送を所要の時間内に完了させることができる。   In this way, bus use is not performed uniformly based on the timetable, but bus deadlocks are prevented by permitting use based on priority for requests from each bus master. And the required data transfer can be completed within the required time.

さらに、各タイムスロットにおいて実際にバスの使用が許可されたバスマスタの履歴を適宜の記憶手段において記憶し、この記憶した使用履歴情報に基づいてタイムテーブル更新手段でタイムテーブルを逐次更新した場合には、データ転送をより効率的に実施できるタイムテーブルを自動的に生成することができる。   Further, when the history of the bus master that is actually permitted to use the bus in each time slot is stored in an appropriate storage means, and the time table is updated sequentially by the time table update means based on the stored use history information In addition, a timetable capable of more efficiently performing data transfer can be automatically generated.

以下において、図面に基づいてバス制御装置の実施形態を説明する。図1は、本実施形態のバス制御装置のブロック図であって、本実施形態では、第1バスマスタM-Aと、第2バスマスタM-Bと、第3バスマスタM-Cと、第4バスマスタM-Dの4つのバスマスタが存在して、それぞれバスBと接続して、バスBを使用しているものとする。バスマスタの数は、4つに限定するものではなく、それ以上であってもよいし、それ以下であってもよい。   Hereinafter, an embodiment of a bus control device will be described with reference to the drawings. FIG. 1 is a block diagram of the bus control device of this embodiment. In this embodiment, there are four bus masters: a first bus master MA, a second bus master MB, a third bus master MC, and a fourth bus master MD. Assume that the bus B is used by being connected to the bus B. The number of bus masters is not limited to four, and may be more or less.

本実施形態ではバスBに複数のスレーブS1,S2,S3,S4,S5を接続して、各バスマスタからの命令に基づいて、異なるスレーブ間でデータ転送を行っているものとする。   In this embodiment, it is assumed that a plurality of slaves S1, S2, S3, S4, and S5 are connected to the bus B, and data transfer is performed between different slaves based on instructions from each bus master.

各バスマスタはそれぞれバス調停回路Aと接続し、各バスマスタからバス調停回路Aに対してバスBの使用要求信号Rを出力するとともに、バス調停回路Aからいずれ一つのバスマスタに対して選択的に使用許可信号Gを出力するようにしている。   Each bus master is connected to the bus arbitration circuit A, and each bus master outputs a use request signal R for the bus B to the bus arbitration circuit A, and the bus arbitration circuit A selectively uses any one bus master. The permission signal G is output.

バス調停回路Aには、主制御部A-10と、タイマモジュール部A-20と、制御用モジュール部A-30とを設けており、主制御部A-10では、各バスマスタから送信されてきた使用要求信号Rを受信して、タイマモジュール部A-20に設けたタイムテーブルを参照するとともに、制御用モジュール部A-30に設けた優先順位テーブルを参照してバスBの使用を許可するバスマスタを選択し、そのバスマスタに対して使用許可信号Gを出力している。   The bus arbitration circuit A is provided with a main control unit A-10, a timer module unit A-20, and a control module unit A-30, and the main control unit A-10 has transmitted from each bus master. The use request signal R is received, the time table provided in the timer module unit A-20 is referred to, and the use of the bus B is permitted with reference to the priority table provided in the control module unit A-30. A bus master is selected, and a use permission signal G is output to the bus master.

タイマモジュール部A-20には、本実施形態では、フリーランカウンタA-21と、プログラム可能なコンペアマッチレジスタ群A-22を設けてタイムテーブルを構成している。   In the present embodiment, the timer module unit A-20 is provided with a free-run counter A-21 and a programmable compare match register group A-22 to form a time table.

制御用モジュール部A-30には、優先順位テーブルを記憶した優先順位情報用メモリA-31、及びバス権取得履歴記憶用メモリA-32等の記憶手段を設けている。   The control module unit A-30 is provided with storage means such as a priority information memory A-31 storing a priority table and a bus right acquisition history storage memory A-32.

バス調停回路Aには、図示しないROM(Read Only Memory)等に格納されたプログラムからなるソフトウェア、あるいはそれ以外のソフトウェア等からの命令が入力されることにより各バスマスタの優先順位が決定され、この優先順位情報からなる優先順位テーブルを生成して優先順位情報用メモリA-31で記憶している。   The bus arbitration circuit A determines the priority order of each bus master by inputting a command from a program stored in a ROM (Read Only Memory) (not shown) or the like, or an instruction from other software. A priority table composed of priority information is generated and stored in the priority information memory A-31.

以下において、図2のフローチャートに基づいて、バス調停回路Aによる制御について説明する。なお、本実施形態では、説明の便宜上、第1バスマスタM-A、第2バスマスタM-B、第3バスマスタM-C、第4バスマスタM-Dの順で優先順位が高いものとする。   Hereinafter, the control by the bus arbitration circuit A will be described based on the flowchart of FIG. In the present embodiment, for convenience of explanation, it is assumed that the first bus master M-A, the second bus master M-B, the third bus master M-C, and the fourth bus master M-D have higher priorities.

バス調停回路Aは、処理の開始にともなって、上記したソフトウェア等に基づいて各バスマスタの優先順位を指定する優先順位テーブルを生成して優先順位情報用メモリA-31で記憶している(ステップT1)。   At the start of processing, the bus arbitration circuit A generates a priority table that specifies the priority of each bus master based on the above-described software and the like, and stores it in the priority information memory A-31 (step S1). T1).

次いで、バス調停回路Aは、設定された優先順位テーブルに基づいて、所要の数のタイムスロットからなるタイムテーブルに対して、優先順位に応じた個数で複数のタイムスロットをバスマスタに割り当てて、タイムテーブルを生成する(ステップT2)。   Next, the bus arbitration circuit A assigns a plurality of time slots to the bus master in the number corresponding to the priority order with respect to the time table including the required number of time slots based on the set priority order table, A table is generated (step T2).

すなわち、このタイムテーブルは、最優先でバスの使用が許可されるバスマスタを割り当てているものであり、特に、図3のタイムテーブルに示すように、優先順位が高いバスマスタにはより多くのタイムスロットが割り当てられるようにしており、優先順位が低いバスマスタにはタイムスロットが少なく割り当てられるようにしている。   That is, this time table assigns bus masters that are permitted to use the bus with the highest priority. In particular, as shown in the time table of FIG. 3, a bus master having a higher priority has more time slots. The bus master with a low priority is assigned with a small number of time slots.

したがって、優先順位の高いバスマスタによるバスBの使用機会を多くすることができ、データ転送の効率を向上させることができる。   Accordingly, it is possible to increase the use opportunity of the bus B by the bus master having a high priority, and it is possible to improve the efficiency of data transfer.

ここで、タイムテーブル中のタイムスロットの数はN個としている。また、図3中、「<A>」はそのタイムスロットにおいて第1バスマスタM-Aを最優先バスマスタとしていることを示しており、「<B>」はそのタイムスロットにおいて第2バスマスタM-Bを最優先バスマスタとしていることを示しており、「<C>」はそのタイムスロットにおいて第3バスマスタM-Cを最優先バスマスタとしていることを示しており、「<D>」はそのタイムスロットにおいて第4バスマスタM-Dを最優先バスマスタとしていることを示している。   Here, the number of time slots in the time table is N. In FIG. 3, “<A>” indicates that the first bus master MA is the highest priority bus master in the time slot, and “<B>” indicates that the second bus master MB is the highest priority bus master in the time slot. “<C>” indicates that the third bus master MC is the highest priority bus master in the time slot, and “<D>” indicates that the fourth bus master MD is the highest in the time slot. Indicates that the bus is a priority bus master.

また、図3において、タイムテーブルの下方には、各タイムスロットにおいて優先順位の高い順にバスマスタを並べて示しており、「M-A」は第1バスマスタM-A、「M-B」は第2バスマスタM-B、「M-C」は第3バスマスタM-C、「M-D」は第4バスマスタM-Dを示している。特に、「(M-A)」「(M-B)」「(M-C)」「(M-D)」は、第1バスマスタM-A、第2バスマスタM-B、第3バスマスタM-C、第4バスマスタM-Dがそれぞれ使用要求信号Rを出力していることを示しており、「M-C」「M-D」は、第3バスマスタM-C、第4バスマスタM-Dがそれぞれ使用要求信号Rを出力していないことを示している。本実施形態では、説明の便宜上、第1バスマスタM-A及び第2バスマスタM-Bは常に使用要求信号Rを出力し、第3バスマスタM-C及び第4バスマスタM-DはバスBの使用が必要となったときに使用要求信号Rを出力するようにしている。   In FIG. 3, below the time table, bus masters are arranged in descending order of priority in each time slot. “MA” is the first bus master MA, “MB” is the second bus master MB, and “MC”. Indicates the third bus master MC, and “MD” indicates the fourth bus master MD. In particular, “(MA)”, “(MB)”, “(MC)”, and “(MD)” are used by the first bus master MA, the second bus master MB, the third bus master MC, and the fourth bus master MD, respectively. “MC” and “MD” indicate that the third bus master MC and the fourth bus master MD do not output the use request signal R, respectively. In the present embodiment, for convenience of explanation, the first bus master MA and the second bus master MB always output the use request signal R, and the third bus master MC and the fourth bus master MD are used when the bus B needs to be used. The request signal R is output.

バス調停回路Aは、まず、タイムスロットをカウントするカウンタの値を「1」として(ステップT3)、1番目のタイムスロットに割り当てられた最優先バスマスタを確認し(ステップT4)、その最優先バスマスタからバスBの使用要求信号Rが出力されているかを確認する(ステップT5)。   First, the bus arbitration circuit A sets the value of the counter that counts the time slot to “1” (step T3), confirms the highest priority bus master assigned to the first time slot (step T4), and the highest priority bus master. To check whether the use request signal R for the bus B is output from the terminal (step T5).

図3では、1番目のタイムスロットにおいて第1バスマスタM-Aを最優先バスマスタとしており、第1バスマスタM-AからバスBの使用要求信号Rが出力されている場合には、バス調停回路Aは第1バスマスタM-Aに対して使用許可信号Gを出力し(ステップT6)、最優先バスマスタである第1バスマスタM-Aにデータ転送を実行させている。また、このようにしてバスBを使用したバスマスタの使用履歴をバス権取得履歴記憶用メモリA-32に逐次記憶する(ステップT7)。   In FIG. 3, when the first bus master MA is the highest priority bus master in the first time slot and the bus B use request signal R is output from the first bus master MA, the bus arbitration circuit A is the first bus master. The use permission signal G is output to the MA (step T6), and the first bus master MA which is the highest priority bus master is caused to execute data transfer. In addition, the bus master usage history using the bus B is sequentially stored in the bus right acquisition history storage memory A-32 (step T7).

次いで、バス調停回路Aは、タイムスロットがタイムテーブルの最終端に達したかどうかを判別し(ステップT8)、タイムスロットがタイムテーブルの最終端に達していない場合にはタイムスロットをカウントするカウンタの値をインクリメントして(ステップT9)、次のタイムスロットに割り当てられた最優先バスマスタを確認して(ステップT4)、その最優先バスマスタに使用要求信号Rを出力するかどうかを逐次判別していく。   Next, the bus arbitration circuit A determines whether or not the time slot has reached the final end of the time table (step T8), and if the time slot has not reached the final end of the time table, a counter that counts the time slot Is incremented (step T9), the highest priority bus master assigned to the next time slot is confirmed (step T4), and it is sequentially determined whether or not the use request signal R is output to the highest priority bus master. Go.

一方、ステップT5において、最優先バスマスタがバスBの使用要求信号Rを出力していない場合には、バス調停回路Aは、最優先バスマスタ以外のバスマスタであって、次に優先順位の高いバスマスタを確認し、そのバスマスタからバスBの使用要求信号Rが出力されているかを確認する(ステップT10)。   On the other hand, if the highest priority bus master does not output the use request signal R for the bus B in step T5, the bus arbitration circuit A selects a bus master that is a bus master other than the highest priority bus master and has the next highest priority. Confirmation is made and whether or not the bus B use request signal R is output from the bus master (step T10).

そして、そのバスマスタがバスBの使用要求信号Rを出力している場合には、バス調停回路Aはそのバスマスタに対して使用許可信号Gを出力し(ステップT11)、そのバスマスタにバスBを使用させ、バスBを使用したバスマスタの使用履歴をバス権取得履歴記憶用メモリA-32に逐次記憶する(ステップT12)。   If the bus master outputs the use request signal R for the bus B, the bus arbitration circuit A outputs the use permission signal G to the bus master (step T11), and uses the bus B for the bus master. The bus master use history using the bus B is sequentially stored in the bus right acquisition history storage memory A-32 (step T12).

このように、最優先バスマスタがバスBを使用しない場合に、他のバスマスタにバスBを使用させることによって、バスBが使用されない状況が発生することを抑制することができ、バスBの使用効率を向上させてデータ転送の効率を向上させることができる。   As described above, when the highest priority bus master does not use the bus B, by causing the other bus master to use the bus B, it is possible to suppress the occurrence of the situation in which the bus B is not used. Can improve the efficiency of data transfer.

さらに、バス調停回路Aは、最優先バスマスタとされていたバスマスタの優先順位を上げる処理を行って、優先順位テーブルを変更するようにしている(ステップT13)。   Further, the bus arbitration circuit A changes the priority table by performing a process of raising the priority of the bus master that has been regarded as the highest priority bus master (step T13).

図3を用いて具体的に説明すると、8番目のタイムスロットにおいては第4バスマスタM-Dを最優先バスマスタとしているにも関わらず、この第4バスマスタM-Dがバス調停回路Aに対して使用要求信号Rを出力していないので、バス調停回路Aは8番目のタイムスロットにおいて次に優先順位が高く、使用要求信号Rを出力している第1バスマスタM-Aに使用許可信号Gを出力してバスBを使用させるようにしている。   More specifically, referring to FIG. 3, in the eighth time slot, the fourth bus master MD sends a use request signal R to the bus arbitration circuit A even though the fourth bus master MD is the highest priority bus master. Therefore, the bus arbitration circuit A outputs the use permission signal G to the first bus master MA that is outputting the use request signal R in the eighth time slot, and uses the bus B. I am trying to use it.

したがって、8番目のタイムスロットにおいて実質的にバスBを使用しているのは、第1バスマスタM-Aとなっている。そして、バス権取得履歴記憶用メモリA-32には、8番目のタイムスロットでは第1バスマスタM-AがバスBを使用したと記憶する。   Therefore, it is the first bus master M-A that substantially uses the bus B in the eighth time slot. The bus right acquisition history storage memory A-32 stores that the first bus master MA used the bus B in the eighth time slot.

さらに、バス調停回路Aは、このように第4バスマスタM-DがバスBを優先的に使用できるにもかかわらずバスBを使用しなかった場合に、この第4バスマスタM-Dの優先順位を上げている。本実施形態では、第4バスマスタM-Dの優先順位を1つだけ繰り上げ、そのかわり第3バスマスタM-Cの優先順位を1つ繰り下げており、その情報は優先順位情報用メモリA-31に記憶するようにしている。図3においては、優先順位が上げられた第4バスマスタM-Dを「m-d」と表示している。本実施形態では、優先順位を1つだけ繰り上げるようにしているが、最優先とするようにしてもよいし、優先順位を2つ繰り上げるようにしてもよい。   Further, the bus arbitration circuit A raises the priority of the fourth bus master MD when the fourth bus master MD can preferentially use the bus B but does not use the bus B. . In this embodiment, the priority of the fourth bus master MD is increased by one, and instead the priority of the third bus master MC is decreased by one, and the information is stored in the priority information memory A-31. ing. In FIG. 3, the fourth bus master M-D whose priority has been raised is displayed as “m-d”. In the present embodiment, the priority is incremented by one, but the highest priority may be set, or the priority may be incremented by two.

このように、バスBを使用する機会が与えられていたにもかかわらず、使用要求信号Rの出力を行っていないことによりバスBの使用権が他のバスマスタに譲られたバスマスタの優先順位を上げておくことによって、そのバスマスタの優先順位を比較的上位として、バスBの使用の機会が与えられる可能性を向上させることができる。   In this way, the priority of the bus master whose right to use the bus B has been transferred to another bus master because the use request signal R is not output even though the opportunity to use the bus B is given. By raising the priority, the priority of the bus master can be made relatively high, and the possibility of being given the opportunity to use the bus B can be improved.

図3の場合であれば、第4バスマスタM-Dの優先順位を繰り上げた後に、第1バスマスタM-Aと第2バスマスタM-BとがバスBを使用しない場合には、第4バスマスタM-Dが優先的にバスBを使用することができる。   In the case of FIG. 3, after the priority order of the fourth bus master MD is increased, if the first bus master MA and the second bus master MB do not use the bus B, the fourth bus master MD preferentially uses the bus B. Can be used.

したがって、通常、バスBを使用する機会が与えられていたにもかかわらず、使用要求信号Rの出力を行っていないことによりバスBの使用権を他のバスマスタに譲るバスマスタは、基本的に優先順位が低いことによって、そのバスマスタに割り当てられるタイムスロットの数も少なく、バスBの使用に必要性が生じた場合に長時間待機状態となる可能性があるが、上記したようにバスBの使用権を他のバスマスタに譲った場合にはそのバスマスタの優先順位を上げることによって、バスBの使用待機状態の時間を短くすることができる。   Therefore, the bus master that gives the right to use the bus B to another bus master by not outputting the use request signal R even though the opportunity to use the bus B is usually given priority. Due to the low order, the number of time slots allocated to the bus master is also small, and there is a possibility that the bus B may be in a standby state for a long time when the use of the bus B becomes necessary. When the right is handed over to another bus master, the priority of the bus master is raised, so that the time for waiting to use the bus B can be shortened.

このように、優先順位を上げたバスマスタは、そのバスマスタがバスBを使用した場合に優先順位を下げるようにしている。   In this way, a bus master whose priority has been raised is such that when the bus master uses the bus B, the priority is lowered.

図3を用いて具体的に説明すると、まず、10番目のタイムスロットにおいて第4バスマスタM-Dは使用要求信号Rの出力を開始して、13番目のタイムスロットにおいて第4バスマスタM-Dが最優先バスマスタとなることによって、第4バスマスタM-DがバスBを使用することができる。   More specifically, referring to FIG. 3, first, the fourth bus master MD starts outputting the use request signal R in the tenth time slot, and the fourth bus master MD becomes the highest priority bus master in the thirteenth time slot. As a result, the fourth bus master MD can use the bus B.

このように第4バスマスタM-DがバスBを使用すると、バス調停回路Aは第4バスマスタM-Dの優先順位を1つだけ繰り下げ、そのかわり第3バスマスタM-Cの優先順位を1つ繰り上げて、元の優先順位に戻している。   When the fourth bus master MD uses the bus B in this way, the bus arbitration circuit A lowers the priority of the fourth bus master MD by one, and instead increases the priority of the third bus master MC by one to restore the original priority. Return to the ranking.

なお、一度繰り上げたバスマスタの優先順位を繰り下げる場合には、例えば、優先順位の繰り上げは2段階の繰り上げとして、繰り下げは1段階ずつ2回に分けて繰り下げるようにすることもでき、適宜の繰り上げ方及び繰り下げ方を用いてもよい。   In the case of lowering the priority of the bus master that has been raised once, for example, raising the priority may be raised in two steps, and the lowering may be carried out in two steps one by one. Also, a method of lowering may be used.

このように、優先順位の繰り上げを行ったバスマスタに対しては、そのバスマスタによるバスBの使用後に優先順位を繰り下げることによって、優先順位の繰り上げにともなって繰り下げられたバスマスタの優先順位を上げることにより、基本的に優先順位の高いバスマスタによるバスBの使用機会を増加させることができ、データ転送の効率向上を図ることができる。   In this way, for a bus master whose priority has been raised, by lowering the priority after using bus B by that bus master, by raising the priority of the bus master that has been lowered as the priority is raised. Basically, it is possible to increase the use opportunity of the bus B by a bus master having a high priority, and to improve the efficiency of data transfer.

上記したように、各タイムスロットに基づいて所定のバスマスタにバスBを順次使用させて、タイムテーブルの最終端のタイムスロットによる処理が終了すると(ステップT8)、バス調停回路Aは、優先順位情報用メモリA-31及びバス権取得履歴記憶用メモリA-32に基づいてタイムテーブルを更新する(ステップT14)。   As described above, when the bus B is sequentially used by a predetermined bus master based on each time slot and the processing by the time slot at the end of the time table is completed (step T8), the bus arbitration circuit A receives priority information The time table is updated based on the memory A-31 and the bus right acquisition history storage memory A-32 (step T14).

そして、タイムテーブルの更新後も処理が継続される場合には、ステップT3に戻って、更新されたタイムテーブルに基づいて処理を続行するようにしている(ステップT15)。   If the process is continued after the time table is updated, the process returns to step T3 to continue the process based on the updated time table (step T15).

このように、タイムテーブルを優先順位情報用メモリA-31及びバス権取得履歴記憶用メモリA-32に基づいて更新することによって、データ転送をより効率的に実施できるタイムテーブルを自動的に生成することができる。   In this way, by updating the time table based on the priority order information memory A-31 and the bus right acquisition history storage memory A-32, a time table that can perform data transfer more efficiently is automatically generated. can do.

図3では、タイムテーブルの更新の簡単な例として、バス権取得履歴記憶用メモリA-32に基づいて更新した例を示しており、8番目のタイムスロットにおいては第1バスマスタM-Aを最優先バスマスタとして更新し、13番目のタイムスロットにおいては第4バスマスタM-Dを最優先バスマスタとして更新し、17番目のタイムスロットにおいては第1バスマスタM-Aを最優先バスマスタとして更新したものである。   FIG. 3 shows an example of updating based on the bus right acquisition history storage memory A-32 as a simple example of updating the time table. In the eighth time slot, the first bus master MA is designated as the highest priority bus master. In the 13th time slot, the fourth bus master MD is updated as the highest priority bus master, and in the 17th time slot, the first bus master MA is updated as the highest priority bus master.

本発明にかかるバス制御装置の概略説明図である。It is a schematic explanatory drawing of the bus control apparatus concerning this invention. 本発明にかかるバス制御方法を説明するフローチャートである。It is a flowchart explaining the bus control method concerning this invention. 優先順位変更の説明図である。It is explanatory drawing of a priority change.

符号の説明Explanation of symbols

A バス調停回路
A-10 主制御部
A-20 タイマモジュール部
A-30 制御用モジュール部
A-21 フリーランカウンタ
A-22 コンペアマッチレジスタ群
A-31 優先順位情報用メモリ
A-32 バス権取得履歴記憶用メモリ
B バス
M-A 第1バスマスタ
M-B 第2バスマスタ
M-C 第3バスマスタ
M-D 第4バスマスタ
S1 スレーブ
S2 スレーブ
S3 スレーブ
S4 スレーブ
S5 スレーブ
R 使用要求信号
G 使用許可信号
A bus arbitration circuit
A-10 Main control unit
A-20 Timer module
A-30 Control module
A-21 Free run counter
A-22 Compare match registers
A-31 Priority information memory
A-32 Bus acquisition history storage memory B bus
MA 1st bus master
MB 2nd bus master
MC 3rd bus master
MD 4th bus master
S1 slave
S2 slave
S3 slave
S4 slave
S5 Slave R Use request signal G Use enable signal

Claims (5)

優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス制御方法において、
前記複数のタイムスロットを、前記優先順位に応じた個数で前記バスマスタに割り当てることを特徴とするバス制御方法。
In a bus control method for controlling the use of a bus by a plurality of prioritized bus masters based on a time table composed of a plurality of time slots,
A bus control method characterized by allocating the plurality of time slots to the bus master in a number corresponding to the priority.
前記タイムスロットが割り当てられた前記バスマスタがバスの使用を要求しない場合には、そのバスマスタ以外のバスマスタであって、前記優先順位の最も高いバスマスタにバスを使用させるとともに、バスの使用を要求しなかったバスマスタの優先順位を上げることを特徴とする請求項1記載のバス制御方法。   If the bus master to which the time slot is assigned does not request the use of the bus, the bus master other than the bus master, which has the highest priority, uses the bus and does not request the use of the bus. 2. The bus control method according to claim 1, wherein the priority order of the bus masters is increased. 前記優先順位を上げた前記バスマスタが、その後、バスを使用した場合に、そのバスマスタの優先順位を下げることを特徴とする請求項2記載のバス制御方法。   3. The bus control method according to claim 2, wherein, when the bus master having raised the priority order uses the bus thereafter, the priority order of the bus master is lowered. 前記バスマスタによる前記バスの使用履歴に基づいて前記タイムテーブルを更新することを特徴とする請求項2または請求項3に記載のバス制御方法。   4. The bus control method according to claim 2, wherein the time table is updated based on a use history of the bus by the bus master. 優先順位を付けた複数のバスマスタによるバスの使用を、複数のタイムスロットからなるタイムテーブルに基づいて制御するバス調停回路を有するバス制御装置において、
前記バス調停回路は、前記複数のタイムスロットを、前記優先順位に応じた個数で前記バスマスタに割り当てるように構成したことを特徴とするバス制御装置。
In a bus control device having a bus arbitration circuit that controls the use of a bus by a plurality of bus masters with priorities based on a time table composed of a plurality of time slots.
The bus control device, wherein the bus arbitration circuit is configured to allocate the plurality of time slots to the bus master in a number corresponding to the priority.
JP2004016693A 2004-01-26 2004-01-26 Bus control method and bus control apparatus Abandoned JP2005210567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004016693A JP2005210567A (en) 2004-01-26 2004-01-26 Bus control method and bus control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004016693A JP2005210567A (en) 2004-01-26 2004-01-26 Bus control method and bus control apparatus

Publications (1)

Publication Number Publication Date
JP2005210567A true JP2005210567A (en) 2005-08-04

Family

ID=34901766

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004016693A Abandoned JP2005210567A (en) 2004-01-26 2004-01-26 Bus control method and bus control apparatus

Country Status (1)

Country Link
JP (1) JP2005210567A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010539615A (en) * 2007-09-20 2010-12-16 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツング Circuit device for receiving and forming signals and method of operating the circuit device
CN113868157A (en) * 2021-08-20 2021-12-31 山东云海国创云计算装备产业创新中心有限公司 Arbitration method and device for AHB system bus, AHB system bus and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010539615A (en) * 2007-09-20 2010-12-16 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツング Circuit device for receiving and forming signals and method of operating the circuit device
CN113868157A (en) * 2021-08-20 2021-12-31 山东云海国创云计算装备产业创新中心有限公司 Arbitration method and device for AHB system bus, AHB system bus and medium

Similar Documents

Publication Publication Date Title
JP4480427B2 (en) Resource management device
US7533206B2 (en) Resource management device
US10169256B2 (en) Arbitrating direct memory access channel requests
TW200415476A (en) Resource management device
JP2007200245A (en) System bus controller, integrated circuit, and data processing system
JP2009301588A (en) Access controller, access control integrated circuit, and access control method
JP2006195714A (en) Resource management device
US20190044883A1 (en) NETWORK COMMUNICATION PRIORITIZATION BASED on AWARENESS of CRITICAL PATH of a JOB
US20170147252A1 (en) Semiconductor apparatus, processor system, and control method thereof
JP2016173798A (en) Semiconductor device
US7127540B2 (en) Apparatus and method for controlling frequency of bus use
JP2004246862A (en) Resource management device
JP2005210567A (en) Bus control method and bus control apparatus
JP5715670B2 (en) Communication device
JP2006251875A (en) Bus arbitration device and bus arbitration method
US20110153892A1 (en) Access arbitration apparatus, integrated circuit device, electronic apparatus, access arbitration method, and program
JP2005303718A (en) Matrix bus connection system
US9747231B2 (en) Bus access arbiter and method of bus arbitration
JP5265596B2 (en) Bus arbitration apparatus and bus arbitration method
JP4753184B2 (en) Arbitration device and arbitration method
US10025730B2 (en) Register device and method for software programming
TW201525700A (en) Method and apparatus for on-the-fly learning traffic control scheme
JP2007164713A (en) Device and method for managing resource
JP2007219925A (en) Bus controller, bus control program and recording medium
JP6536441B2 (en) Control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060721

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20080228