JP2008250419A - Competition arbitration apparatus, master-slave system, and method for competition arbitration - Google Patents

Competition arbitration apparatus, master-slave system, and method for competition arbitration Download PDF

Info

Publication number
JP2008250419A
JP2008250419A JP2007087871A JP2007087871A JP2008250419A JP 2008250419 A JP2008250419 A JP 2008250419A JP 2007087871 A JP2007087871 A JP 2007087871A JP 2007087871 A JP2007087871 A JP 2007087871A JP 2008250419 A JP2008250419 A JP 2008250419A
Authority
JP
Japan
Prior art keywords
priority
master device
master
access request
task
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
JP2007087871A
Other languages
Japanese (ja)
Inventor
Masaki Kamikubo
雅規 上久保
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2007087871A priority Critical patent/JP2008250419A/en
Publication of JP2008250419A publication Critical patent/JP2008250419A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a competition arbitration apparatus for arbitrating between requests from a plurality of master devices to a slave device and which, even if there is a dependency relationship in the order of executing tasks on the plurality of master devices, can provide corresponding arbitration. <P>SOLUTION: Basic priorities are derived based on a table in which the content of a competition process matching a combination of the operating conditions of a plurality of master devices 101 to 103 is preset. Corrections for taking into consideration of a dependency relationship involving tasks in a standby state on the master devices 101 to 103 are made to the basic priorities so as to determine final priorities. The final priorities determined are assigned to access requests from the master devices 101 to 103. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、競合調停装置、マスタスレーブシステム、競合調停方法及びそのプログラムに関する。   The present invention relates to a contention arbitration device, a master / slave system, a contention mediation method, and a program thereof.

近年、半導体微細加工技術の進歩のほか、コストダウンや性能向上といった市場からの要求により、システム全体をオンチップに搭載することが当たり前のようになってきた。つまり、互いに異なる処理を実行する複数のデバイスが同一チップ上に搭載されるようになってきた。さらに、性能向上や低電力化の対策として、マルチコアプロセッサを同一チップ上に形成し、互いに異なる動作をするソフトウェアアプリケーションを同一チップ上で同時に並行して実行することも可能となってきた。   In recent years, in addition to advances in semiconductor microfabrication technology, due to market demands such as cost reduction and performance improvement, it has become natural to mount the entire system on-chip. That is, a plurality of devices that execute different processes have been mounted on the same chip. Furthermore, as measures for improving performance and reducing power consumption, it has become possible to form multi-core processors on the same chip and simultaneously execute software applications that perform different operations on the same chip in parallel.

オンチップ上で複数のプロセッサコアが動作する場合、プロセッサコアは、必要な数だけ複数独立して存在するが、メモリなどのスレーブデバイスは、積極的にコア間通信に使われる目的のほか、コストダウンの目的からも共有されることが多い。つまり、複数のマスタデバイスが接続手段としてのバスを介してスレーブデバイスを共有する構成が、システム・オン・チップでは一般的となっている。   When multiple processor cores operate on-chip, the required number of processor cores exist independently. However, slave devices such as memory are not only used for active communication between cores, but also cost-effective. It is often shared for the purpose of down. In other words, a configuration in which a plurality of master devices share a slave device via a bus as a connection means is common in a system-on-chip.

ところで、マルチコアをベースとしたシステムによって提供されるサービスの質を決める要因の一つとして、システム内の個々のコアから特定のスレーブデバイスへのアクセス要求が同時刻に発生する場合の調停をどのように行うかというものがある。つまり、異なるコアから同時に発生したアクセス要求の間では、その要求を発したタスクに応じて相対的な優先度を判断する必要がある。   By the way, as one of the factors that determine the quality of service provided by a multi-core based system, how is arbitration performed when access requests from individual cores in a system to a specific slave device occur at the same time? There is something to do. In other words, it is necessary to determine the relative priority between access requests generated simultaneously from different cores according to the task that issued the request.

また、このような判断には、待ち状態になっていてその時点ではプロセッサコアを占有していないタスクのことまで考慮する必要があるケースも考えられる。具体的には、一のプロセッサコア内では処理優先度の高いタスクが、他のプロセッサコアにおける別のタスクが完了していないがために待ち状態に入らざるを得ないような場合である。   In addition, in such a determination, there may be a case where it is necessary to consider a task that is in a waiting state and does not occupy a processor core at that time. Specifically, a task having a high processing priority in one processor core is forced to enter a wait state because another task in another processor core has not been completed.

調停の方法としては様々なものが提案されている。たとえば、特許文献1の図1に記載されている従来の調停方式では、各マスタデバイスによるアクセスの頻度をカウントし、その頻度に上限を設ける方法が用いられており、これによって全体の処理が平均化される効果が得られる。特許文献1の技術では、スレーブデバイスへのアクセス要求を発生する各マスタデバイスはお互いに対等であり、また、処理の順序を特段考慮する必要がないことを前提としている。このような調停方法は多数のシンメトリカルなトランザクションの処理スループットを向上させる上で効果がある。   Various mediation methods have been proposed. For example, in the conventional arbitration method described in FIG. 1 of Patent Document 1, a method is used in which the frequency of access by each master device is counted and an upper limit is set for the frequency. The effect is realized. The technique of Patent Document 1 is based on the premise that the master devices that generate access requests to the slave devices are equal to each other, and there is no need to consider the processing order. Such an arbitration method is effective in improving the processing throughput of many symmetrical transactions.

他方、個別最適を目指す調停方法も提案されている。例えば、特許文献2の図2に記載されている従来の調停方式では、各マスタデバイスが自己申告する形でそれぞれのアクセス要求の優先必要度合いがリアルタイムに定義される。特許文献2の技術は、アシンメトリカルな多種の処理が混在している環境において、前記の平均化による手法では対応できない個々の特殊要求に対応することを可能とする。
特開平08−083211号広報(第11頁、図1) 特開2004−199374号広報(第9頁、図2)
On the other hand, mediation methods aiming at individual optimization have also been proposed. For example, in the conventional arbitration method described in FIG. 2 of Patent Document 2, the priority level of each access request is defined in real time in the form of self-reporting by each master device. The technique of Patent Document 2 makes it possible to cope with individual special requests that cannot be handled by the above-described averaging method in an environment in which various processes of asymmetry are mixed.
Japanese Laid-Open Patent Application No. 08-083211 (Page 11, Fig. 1) Japanese Laid-Open Patent Publication No. 2004-199374 (page 9, FIG. 2)

しかしながら、特許文献2に開示された競合調停装置には以下の問題点がある。   However, the competitive arbitration device disclosed in Patent Document 2 has the following problems.

第1の問題点は、複数のマスタデバイス間の状態の相対関係を考慮した競合調停ができないことである。この問題が発生する原因は、各マスタデバイスにおいて優先度を生成する際に、他のマスタデバイスの状態との相対関係を考慮に入れた設定ができないことに起因する。優先度が絶対値として与えられる場合には、特定の処理の優先度が一義的に決まってしまい、状況つまり他のマスタデバイスの動作状態に応じて変化するという動作は実現できない。   A first problem is that contention cannot be performed in consideration of the relative relationship between states of a plurality of master devices. The cause of this problem is that when the priority is generated in each master device, it is not possible to make a setting that takes into account the relative relationship with the state of other master devices. When the priority is given as an absolute value, the priority of specific processing is uniquely determined, and an operation that changes according to the situation, that is, the operating state of another master device, cannot be realized.

例えば、一のマスタデバイスが発行する要求について、他のマスタデバイスが所定の処理を実行中には当該要求は直ちに実行されなければならないが、当該他のマスタデバイスが所定の処理を実行中でないときには当該要求は遅延が許容されるものとする。この場合、前記一のマスタデバイスが発行する要求について、当該一のマスタデバイスに割り当てられる優先度は、当該一のマスタデバイスの動作状態のみに基づいた判断により一義的に定めることはできないはずである。   For example, for a request issued by one master device, the request must be immediately executed while another master device is executing a predetermined process, but when the other master device is not executing a predetermined process. The request shall be allowed to be delayed. In this case, with respect to a request issued by the one master device, the priority assigned to the one master device should not be uniquely determined by a determination based only on the operating state of the one master device. .

第2の問題点は、各マスタデバイス上で複数のタスクがオペレーティングシステムによって切り替えられながら動作しているシステムにおいて、優先度が高い処理であるにも関わらずその処理が遅延されてしまうというプライオリティ・インバージョンと呼ばれる状態を解消できないことである。この問題が発生する原因は、多くのオペレーティングシステムで行われる特定処理の待ち状態への移行についての考慮がなされていないためである。   A second problem is that in a system in which a plurality of tasks are operating on each master device while being switched by the operating system, the priority is that the processing is delayed even though the processing is high in priority. It is that the state called inversion cannot be resolved. The reason why this problem occurs is that consideration is not given to the transition to a waiting state for specific processing performed in many operating systems.

例えば、第2のマスタデバイスのタスクの優先度が高いにもかかわらず、第2のマスタデバイスのタスクは第1マスタデバイスのタスクによる処理の完了を待ってからでないと実行できない、という条件があったとする。この場合、第1のマスタデバイスによるタスクの処理中は、第2のマスタデバイスのタスクは待ち状態となり、第2のマスタデバイスからのアクセス要求はバスアクセスには現れない。しかし、優先度の高いタスクである第2のマスタデバイスのタスクを早く処理するためには、本来的には優先度が高いわけでもない第1のマスタデバイスのタスクを優先させる必要がある。つまり、単純に、バスアクセスに現れているアクセス要求だけの間での優先度比較では適切な調停処理を行うことができない。   For example, there is a condition that even if the priority of the task of the second master device is high, the task of the second master device can only be executed after waiting for the completion of processing by the task of the first master device. Suppose. In this case, while the task is being processed by the first master device, the task of the second master device is in a waiting state, and an access request from the second master device does not appear in bus access. However, in order to quickly process the task of the second master device, which is a task with a high priority, it is necessary to prioritize the task of the first master device that is not inherently high in priority. That is, it is not possible to simply perform appropriate arbitration processing by simply comparing priorities among access requests appearing in bus access.

本発明の目的は、複数のマスタデバイスから、これら複数のマスタデバイスにより共有されるスレーブデバイスへ同時刻にアクセス要求が発生するような競合状態において、システム全体の調停に誤った判断を生じてしまうことを回避可能な競合調停装置、マスタスレーブシステム、競合調停方法及びそのプログラムを提供することにある。   An object of the present invention is to make an erroneous determination in the arbitration of the entire system in a race condition in which an access request is generated from a plurality of master devices to slave devices shared by the plurality of master devices at the same time. It is an object of the present invention to provide a contention arbitration device, a master / slave system, a contention arbitration method, and a program therefor that can avoid this.

上記課題を解決するため、本発明の競合調停装置は、アクセス要求を発行する複数のマスタデバイスと、前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、を備えるシステムに備えられる競合調停装置において、前記複数のマスタデバイスによるアクセス要求に基本優先度を割り当てる基本優先度割当手段と、前記複数のマスタデバイスのうちの一のマスタデバイスによるアクセス要求の優先度変更量を、他のマスタデバイスの動作状態に応じて導出する優先度変更量導出手段と、前記優先度変更量により前記基本優先度を補正することにより、前記一のマスタデバイスによるアクセス要求に与える最終優先度を決定する最終優先度決定手段と、を備えることを特徴としている。   In order to solve the above-described problem, the contention arbitration device of the present invention includes a plurality of master devices that issue access requests, and a slave device that executes processing according to the access requests issued from the plurality of master devices. In the contention arbitration apparatus provided in the system, basic priority assignment means for assigning basic priority to access requests by the plurality of master devices, and priority change amount of access request by one master device of the plurality of master devices Priority change amount deriving means for deriving according to the operating state of the other master device, and correcting the basic priority by the priority change amount, thereby giving the final priority given to the access request by the one master device And a final priority determining means for determining the degree.

本発明の競合調停装置においては、前記優先度変更量導出手段は、前記一のマスタデバイスによるアクセス要求の最終優先度が前記基本優先度から変わらないような優先度変更量を導出するか、又は、前記一のマスタデバイスによるアクセス要求の最終優先度が前記他のマスタデバイスによるアクセス要求に与えられる優先度よりも低い値となるような優先度変更量を導出することが好ましい。   In the contention arbitration device of the present invention, the priority change amount deriving means derives a priority change amount such that the final priority of the access request by the one master device does not change from the basic priority, or It is preferable to derive a priority change amount such that the final priority of the access request by the one master device is lower than the priority given to the access request by the other master device.

本発明の競合調停装置においては、前記優先度変更量導出手段は、前記他のマスタデバイスのタスク識別子又は割り込み番号に応じて前記一のマスタデバイスによるアクセス要求の優先度変更量を導出することが好ましい。   In the contention arbitration device of the present invention, the priority change amount deriving means may derive a priority change amount of an access request by the one master device according to a task identifier or an interrupt number of the other master device. preferable.

本発明の競合調停装置においては、前記優先度変更量導出手段は、前記他のマスタデバイスのタスク識別子に応じて前記一のマスタデバイスによるアクセス要求の優先度変更量を導出するものであり、前記優先度変更量導出手段は、前記一のマスタデバイスにより当該一のマスタデバイスのタスクよりも優先させるべきタスクとして予め設定された前記他のマスタデバイスのタスクのタスク識別子を保持し、該保持したタスク識別子が、前記他のマスタデバイスの現在のタスク識別子と一致した場合に、前記一のマスタデバイスによるアクセス要求の最終優先度が前記他のマスタデバイスによるアクセス要求に与えられる優先度よりも低い値となるような優先度変更量を導出することが好ましい。   In the contention arbitration device of the present invention, the priority change amount derivation means derives a priority change amount of an access request by the one master device according to a task identifier of the other master device, The priority change amount deriving unit holds a task identifier of the task of the other master device that is preset as a task to be prioritized by the one master device over the task of the one master device, and the held task When the identifier matches the current task identifier of the other master device, the final priority of the access request by the one master device is lower than the priority given to the access request by the other master device; It is preferable to derive such a priority change amount.

本発明の競合調停装置においては、前記基本優先度割当手段は、前記複数のマスタデバイスの動作状態の組合せに基づいて、各マスタデバイスによるアクセス要求に対してそれぞれ基本優先度を割り当てることが好ましい。   In the contention arbitration device according to the present invention, it is preferable that the basic priority assigning means assigns a basic priority to an access request from each master device based on a combination of operating states of the plurality of master devices.

本発明の競合調停装置においては、前記基本優先度割当手段は、各マスタデバイスの動作状態を各マスタデバイスのタスク識別子又は割り込み番号により認識することが好ましい。   In the contention arbitration device according to the present invention, it is preferable that the basic priority assigning means recognizes the operation state of each master device by a task identifier or an interrupt number of each master device.

本発明のマスタスレーブシステムは、アクセス要求を発行する複数のマスタデバイスと、前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、本発明の競合調停装置と、を備えることを特徴としている。   A master-slave system of the present invention includes a plurality of master devices that issue access requests, a slave device that executes processing according to access requests issued from the plurality of master devices, and a contention arbitration device of the present invention. It is characterized by providing.

本発明の競合調停方法は、アクセス要求を発行する複数のマスタデバイスと、前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、を備えるシステムにおけるアクセス要求の競合を調停する方法において、前記複数のマスタデバイスによるアクセス要求に基本優先度を割り当てる第1の過程と、前記複数のマスタデバイスのうちの一のマスタデバイスによるアクセス要求の優先度変更量を、他のマスタデバイスの動作状態に応じて導出する第2の過程と、前記優先度変更量により前記基本優先度を補正することにより、前記一のマスタデバイスによるアクセス要求に与える最終優先度を決定する第3の過程と、を備えることを特徴としている。   A contention arbitration method according to the present invention provides for contention of access requests in a system comprising a plurality of master devices that issue access requests and a slave device that executes processing according to the access requests issued from the plurality of master devices. In the arbitration method, a first step of assigning a basic priority to access requests by the plurality of master devices, and a priority change amount of an access request by one master device of the plurality of master devices are set to another master device. A second step of deriving according to the operation state of the device; and a third priority for determining a final priority given to an access request by the one master device by correcting the basic priority by the priority change amount And a process.

本発明のプログラムは、コンピュータが実行可能なプログラムにおいて、本発明の競合調停方法をコンピュータに実行させることを特徴としている。   The program of the present invention is a computer-executable program that causes the computer to execute the contention arbitration method of the present invention.

本発明によれば、一のマスタデバイスによるアクセス要求に与える最終優先度を、他のマスタデバイスの動作状態に応じて変化させることができるので、複数のマスタデバイス間の状態の相対関係を考慮した競合調停が可能となる。   According to the present invention, the final priority given to an access request by one master device can be changed according to the operating state of the other master device. Competitive mediation is possible.

以下、図面を参照して、本発明に係る実施形態について説明する。   Embodiments according to the present invention will be described below with reference to the drawings.

図1は本実施形態に係るマスタスレーブシステム100の全体構成を示すブロック図である。   FIG. 1 is a block diagram showing the overall configuration of a master / slave system 100 according to the present embodiment.

先ず、構成を説明する。   First, the configuration will be described.

図1に示すように、本実施形態に係るマスタスレーブシステム100は、複数(図1の例では3つ)のマスタデバイス101,102,103と、これら複数のマスタデバイス101〜103により共有され、これらマスタデバイス101〜103から発行されたアクセス要求に応じた処理を実行するスレーブデバイス104と、マスタデバイス101〜103とスレーブデバイス104との間の接続などを行うバス制御部105と、を備えている。   As shown in FIG. 1, a master / slave system 100 according to the present embodiment is shared by a plurality (three in the example of FIG. 1) of master devices 101, 102, and 103 and the plurality of master devices 101 to 103. A slave device 104 that executes processing according to an access request issued from the master devices 101 to 103, and a bus control unit 105 that performs connection between the master devices 101 to 103 and the slave device 104. Yes.

各マスタデバイス101〜103は、バス制御部105に対し、データや制御信号の伝達経路を介して相互に接続されている。   The master devices 101 to 103 are connected to the bus control unit 105 via data and control signal transmission paths.

スレーブデバイス104は、バス制御部105に対し、データや制御信号の伝達経路を介して相互に接続されている。   The slave device 104 is connected to the bus control unit 105 via a data and control signal transmission path.

従って、各マスタデバイス101〜103は、バス制御部105を介してスレーブデバイス104に対してアクセス可能となっている。   Therefore, each of the master devices 101 to 103 can access the slave device 104 via the bus control unit 105.

なお、各マスタデバイス101〜103は、例えば、それぞれプロセッサコアからなり、スレーブデバイス104は、例えば、メモリからなる。   Each of the master devices 101 to 103 is composed of, for example, a processor core, and the slave device 104 is composed of, for example, a memory.

バス制御部105は、マスタデバイス101〜103からスレーブデバイス104へのアクセス要求が競合した場合に調停処理を行う競合調停部(競合調停装置)106と、マスタデバイス101〜103とスレーブデバイス104との間での制御信号やデータの転送を行うマスタ−スレーブ間データ転送部107と、を備えている。   The bus control unit 105 includes a contention arbitration unit (a contention arbitration device) 106 that performs mediation processing when access requests from the master devices 101 to 103 to the slave device 104 compete, and the master devices 101 to 103 and the slave device 104. And a master-slave data transfer unit 107 for transferring control signals and data between them.

図2は本実施形態に係る競合調停装置としての競合調停部106の全体構成を示すブロック図である。   FIG. 2 is a block diagram showing the overall configuration of the contention arbitration unit 106 as the contention arbitration device according to the present embodiment.

図2に示すように、競合調停部106は、マスタデバイス101〜103によるアクセス要求に基本優先度を割り当てる優先度処理テーブルレジスタ部201と、マスタデバイス101〜103のうちの任意の一のマスタデバイスによるアクセス要求の優先度変更量を他のマスタデバイスの動作状態に応じて導出する相対優先度補正判定部202と、優先度変更量により基本優先度を補正することにより一のマスタデバイスによるアクセス要求に与える最終優先度を決定する優先要求判定部203と、決定された最終優先度に従ってアクセス要求を許可する要求選択部204と、を備えている。   As shown in FIG. 2, the contention arbitration unit 106 includes a priority processing table register unit 201 that assigns a basic priority to access requests from the master devices 101 to 103, and any one of the master devices 101 to 103. The relative priority correction determination unit 202 for deriving the priority change amount of the access request according to the operation state of the other master device, and the access request by one master device by correcting the basic priority by the priority change amount A priority request determination unit 203 that determines the final priority given to the request, and a request selection unit 204 that permits an access request according to the determined final priority.

このうち優先度処理テーブルレジスタ部201及び相対優先度補正判定部202には、例えば、各マスタデバイス101〜103から、各マスタデバイス101〜103と1対1で対応するタスク識別子信号線を介して、現在の動作状態を示すタスク識別子が入力される。   Among these, the priority processing table register unit 201 and the relative priority correction determination unit 202 are connected to each of the master devices 101 to 103 via task identifier signal lines corresponding to the master devices 101 to 103, for example. The task identifier indicating the current operation state is input.

或いは、タスク識別子は、オペレーティングシステムによってタスクの切り替えがなされる際に、オペレーティングシステムによって優先度テーブルレジスタ部201及び相対優先度補正判定部202へ出力され、該優先度テーブルレジスタ部201及び相対優先度補正判定部202にて保持されるのであっても良い。   Alternatively, the task identifier is output to the priority table register unit 201 and the relative priority correction determination unit 202 by the operating system when the task is switched by the operating system, and the priority table register unit 201 and the relative priority level are output. It may be held by the correction determination unit 202.

ここで、タスクとは、マスタデバイス上で動作するプログラムの基本単位であり、オペレーティングシステムによって処理の単位として扱われるものである。オペレーティングシステムは、タスク単位に分けられた複数の処理を種々のイベントをきっかけに時間軸上で入れ替えながら実行する。タスク識別子はタスクを識別するためにタスクごとに異なる値が割り振られたものであり、オペレーティングシステム上で管理される。なお、1つのマスタデバイスが一度に実行可能なタスクは1つである。   Here, a task is a basic unit of a program operating on the master device, and is handled as a unit of processing by the operating system. The operating system executes a plurality of processes divided into task units while exchanging them on the time axis triggered by various events. The task identifier is assigned with a different value for each task in order to identify the task, and is managed on the operating system. One master device can execute one task at a time.

優先度処理テーブルレジスタ部201は、各マスタデバイス101〜103の動作状態の組合せに応じて、各マスタデバイス101〜103からのアクセス要求に与えるべき基本優先度を導出するための優先度処理テーブルを保持している。   The priority processing table register unit 201 has a priority processing table for deriving a basic priority to be given to an access request from each master device 101 to 103 in accordance with a combination of operation states of each master device 101 to 103. keeping.

ここで、優先度(基本優先度を含む)とは、アクセス要求が競合したタスク間で、何れのタスクの処理を優先させるか(先に行うか)を決定するために用いられる値である。   Here, the priority (including the basic priority) is a value used to determine which task processing is to be prioritized (first to be performed) between tasks having conflicting access requests.

優先度は、例えば、1〜32まで、或いは、1〜256まで、といったように、整数で表され、数が大きくなるほど優先度が高く(優先順位が早く)、逆に、数が小さくなるほど優先度が低く(優先順位が遅く)なるものとする。   The priority is expressed by an integer such as 1 to 32 or 1 to 256, for example. The higher the number, the higher the priority (the higher the priority), and vice versa. The degree is low (priority is slow).

優先度処理テーブルレジスタ部201は、優先度処理テーブルを用いて、各マスタデバイス101〜103からのタスク識別子の入力に応じて、各マスタデバイス101〜103からのアクセス要求の基本優先度を導出し、該基本優先度を優先要求判定部203及び相対優先度補正判定部202に出力する。   The priority processing table register unit 201 uses the priority processing table to derive the basic priority of the access request from each master device 101 to 103 in response to the input of the task identifier from each master device 101 to 103. The basic priority is output to the priority request determination unit 203 and the relative priority correction determination unit 202.

タスク識別子は、各マスタデバイス101〜103からバス制御部105へのアクセス要求の入力タイミングにおいて、各マスタデバイス101〜103から優先度処理テーブルレジスタ部201及び相対優先度補正判定部202に入力されるようになっていても良いし、或いは、アクセス要求とは非同期に各マスタデバイス101〜103の動作状態が変更になった時点で変更後のタスク識別子が各マスタデバイス101〜103から優先度処理テーブルレジスタ部201及び相対優先度補正判定部202に入力されるようになっていても良い。なお、後者の場合には、優先度処理テーブルレジスタ部201及び相対優先度補正判定部202は、入力されたタスク識別子を記憶保持する(該当するマスタデバイスから新たなタスク識別子が入力されるまで記憶保持する)機能を持つ必要がある。   The task identifier is input from each master device 101 to 103 to the priority processing table register unit 201 and the relative priority correction determination unit 202 at the input timing of the access request from each master device 101 to 103 to the bus control unit 105. Alternatively, the task identifiers after the change are changed from the master devices 101 to 103 to the priority processing table when the operation state of each of the master devices 101 to 103 is changed asynchronously with the access request. The information may be input to the register unit 201 and the relative priority correction determination unit 202. In the latter case, the priority processing table register unit 201 and the relative priority correction determination unit 202 store and hold the input task identifier (stored until a new task identifier is input from the corresponding master device. Hold) function.

相対優先度補正判定部202には、例えば、各マスタデバイス101〜103から、各マスタデバイス101〜103と1対1で対応するタスク間連係情報信号線を介して、以下に説明するタスク間連係情報が、必要に応じて入力される。   The relative priority correction determination unit 202 includes, for example, an inter-task linkage described below from each of the master devices 101 to 103 via an inter-task linkage information signal line corresponding to each of the master devices 101 to 103. Information is entered as needed.

タスク間連係情報とは、各マスタデバイス101〜103間でタスクの処理順序が存在する場合に、例えば自身の優先度を下げる必要のあるマスタデバイスから相対優先度補正判定部202に入力される情報である。   Inter-task linkage information is information that is input to the relative priority correction determination unit 202 from, for example, a master device that needs to lower its priority when there is a task processing order among the master devices 101 to 103. It is.

すなわち、「一のマスタデバイスがあるタスクを実行するときに、他のマスタデバイスが所定のタスクを実行しているならば、当該一のマスタデバイスは当該所定のタスクの終了を待つ必要がある」といったタスクの処理順序が存在したとする。この場合、一のマスタデバイスは、(当該他のマスタデバイスの)当該所定のタスクからのアクセス要求よりも、当該一のマスタデバイスからのアクセス要求の優先度を低くするために、当該所定のタスクよりも自身のアクセス要求の優先度を低くすることを指定するタスク間連係情報を、相対優先度補正判定部202に入力する。   That is, “when one master device executes a task, if another master device is executing a predetermined task, the one master device needs to wait for the end of the predetermined task.” Suppose that there is a task processing order. In this case, the one master device has the predetermined task in order to lower the priority of the access request from the one master device than the access request from the predetermined task (of the other master device). Inter-task linkage information specifying that the priority of its own access request is lower than that is input to the relative priority correction determination unit 202.

このようなタスク間連係情報を受けた相対優先度補正判定部202は、他のマスタデバイスから所定のタスク識別子が相対優先度補正判定部202に入力されているかどうか、或いは、他のマスタデバイスから入力された所定のタスク識別子を相対優先度補正判定部202が保持しているかどうかの判定を行い、所定のタスク識別子が入力されている、或いは、所定のタスク識別子を保持していると判定した場合には、一のマスタデバイスからのアクセス要求の優先度を、当該所定のタスクからのアクセス要求(つまり他のマスタデバイスからのアクセス要求)よりも低くするような優先度変更量を導出し、該導出した優先度変更量を優先要求判定部203に対して出力する。   The relative priority correction determination unit 202 that has received such inter-task linkage information determines whether a predetermined task identifier is input to the relative priority correction determination unit 202 from another master device, or from another master device. It is determined whether the relative priority correction determination unit 202 holds the input predetermined task identifier, and it is determined that the predetermined task identifier is input or the predetermined task identifier is held. In this case, the priority change amount is derived so that the priority of the access request from one master device is lower than the access request from the predetermined task (that is, the access request from another master device). The derived priority change amount is output to the priority request determination unit 203.

すなわち、相対優先度補正判定部202は、優先度処理テーブルレジスタ部201から入力される他のマスタデバイスからのアクセス要求の基本優先度よりも、一のマスタデバイスからのアクセス要求の優先度が低くなるような優先度変更量を導出し、優先要求判定部203に出力する。   That is, the relative priority correction determination unit 202 has a lower priority of an access request from one master device than a basic priority of an access request from another master device input from the priority processing table register unit 201. Such a priority change amount is derived and output to the priority request determination unit 203.

優先要求判定部203は、優先度処理テーブルレジスタ部201から入力される基本優先度を、相対優先度補正判定部202から入力される優先度補正量により補正することによって、各アクセス要求に割り付ける最終優先度を決定し、該決定した最終優先度を要求選択部204へ出力する。   The priority request determination unit 203 corrects the basic priority input from the priority processing table register unit 201 with the priority correction amount input from the relative priority correction determination unit 202, thereby assigning the final priority to each access request. The priority is determined, and the determined final priority is output to the request selection unit 204.

すなわち、例えば、基本優先度から優先度補正量を差し引くことにより、基本優先度よりも低い最終優先度を算出し、該算出した最終優先度を要求選択部204へ出力する。   That is, for example, by subtracting the priority correction amount from the basic priority, a final priority lower than the basic priority is calculated, and the calculated final priority is output to the request selection unit 204.

要求選択部204には、各マスタデバイス101〜103から、各マスタデバイス101〜103と1対1で対応する要求信号線を介して、アクセス要求が入力される。これにより、要求選択部204は、現在どのようなアクセス要求が発行されているかを認識する。   An access request is input from the master devices 101 to 103 to the request selection unit 204 via request signal lines corresponding to the master devices 101 to 103 on a one-to-one basis. Thereby, the request selection unit 204 recognizes what access request is currently issued.

また、要求選択部204は、優先要求判定部203から出力された最終優先度に従い、各アクセス要求に対するアクセス許可信号をマスタ−スレーブ間データ転送部107に対して出力する。   Further, the request selection unit 204 outputs an access permission signal for each access request to the master-slave data transfer unit 107 according to the final priority output from the priority request determination unit 203.

また、マスタ−スレーブ間データ転送部107には、各マスタデバイス101〜103からのアクセス要求に関するパラメータ(例えば、アドレス情報)が入力される。マスタ−スレーブ間データ転送部107は、各マスタデバイス101〜103から競合調停部10に入力されるアクセス要求のうち、要求選択部204から入力されるアクセス許可信号により許可されたアクセス要求に関するパラメータをスレーブデバイス104へ出力する。   The master-slave data transfer unit 107 receives parameters (for example, address information) related to access requests from the master devices 101 to 103. The master-slave data transfer unit 107 sets parameters regarding the access request permitted by the access permission signal input from the request selection unit 204 among the access requests input from the master devices 101 to 103 to the contention arbitration unit 10. Output to the slave device 104.

以上のように構成されたマスタスレーブシステム100は、オンチップに搭載されている。   The master-slave system 100 configured as described above is mounted on-chip.

次に、動作を説明する。   Next, the operation will be described.

図1を用いて、システム全体の動作の概要について説明する。   The outline of the operation of the entire system will be described with reference to FIG.

マスタデバイス101〜103はスレーブデバイス104に対してアクセス要求を発行する。マスタデバイス101〜103のうちの何れか複数のマスタデバイスからのアクセス要求の発行タイミングが重なる場合には、アクセス要求の調停が競合調停部106により行われる。スレーブデバイス104は、各アクセス要求に応じた処理を順次に行う。すなわち、競合調停部106による調停が行われた場合には、調停により決定された順序で各アクセス要求に応じた処理を行う。そして、スレーブデバイス104は、各アクセス要求に応じた処理の結果、各アクセス要求に対する応答情報やデータなどをバス制御部105に出力する。スレーブデバイス104から出力された応答情報やデータは、バス制御部105のデータ転送部107を介して、アクセス要求を発行したマスタデバイス101〜103へ返される。   The master devices 101 to 103 issue an access request to the slave device 104. When the issuance timings of access requests from any of the plurality of master devices 101 to 103 overlap, the contention arbitration unit 106 performs access request arbitration. The slave device 104 sequentially performs processing corresponding to each access request. That is, when the arbitration by the contention arbitration unit 106 is performed, processing corresponding to each access request is performed in the order determined by the arbitration. Then, the slave device 104 outputs response information, data, and the like for each access request to the bus control unit 105 as a result of processing according to each access request. The response information and data output from the slave device 104 are returned to the master devices 101 to 103 that issued the access request via the data transfer unit 107 of the bus control unit 105.

図2を用いて、競合調停部106の動作の詳細について説明する。   Details of the operation of the contention arbitration unit 106 will be described with reference to FIG.

優先度テーブルレジスタ部201は、各マスタデバイス101〜103の動作状態を表すタスク識別子を元に、各マスタデバイス101〜103から発行されるアクセス要求に対して割り付ける基本優先度を導出する。優先度テーブルレジスタ部201は、基本優先度の導出には、予め設定された優先度処理テーブルを用いる。   The priority table register unit 201 derives a basic priority to be assigned to an access request issued from each master device 101 to 103, based on a task identifier representing the operation state of each master device 101 to 103. The priority table register unit 201 uses a preset priority processing table for deriving the basic priority.

優先度処理テーブルには、各マスタデバイス101〜103において取り得るタスク状態の組合せ分だけ、各マスタデバイス101〜103からのアクセス要求に与えられる基本優先度の組が指定されている。   In the priority processing table, combinations of basic priorities given to access requests from the master devices 101 to 103 are specified for the combinations of task states that can be taken by the master devices 101 to 103.

例えば、マスタデバイスの数がkであるとし、各マスタデバイスをマスタデバイスM1、M2、...、Mkと表すとする。また、各マスタデバイスM1、M2、...、Mkについて、それぞれが実行可能なタスクの個数をn1、n2、...、nkとすると、この優先度処理テーブルのロウ数は(n1×n2×...×nk)通りとなる。   For example, if the number of master devices is k, each master device is designated as a master device M1, M2,. . . , Mk. Each master device M1, M2,. . . , Mk, let n1, n2,. . . , Nk, the number of rows in the priority processing table is (n1 × n2 ×... Nk).

ただし、実際には優先度の高低の指定が不要であるタスクの組合せが多数ありうるので、その分を省略した形の優先度処理テーブルを用いることができる。   However, in practice, there may be many task combinations that do not require specification of the priority level, so that a priority processing table in a form that omits that amount can be used.

なお、優先度処理テーブルは、マスタスレーブシステム100の起動時にオペレーティングシステムにより設定されることが挙げられるが、或いは、マスタデバイスによって必要に応じて書き換えられるのであっても良い。   The priority processing table may be set by the operating system when the master / slave system 100 is started, or may be rewritten as necessary by the master device.

マスタデバイス101〜103のうち、一のマスタデバイスにおけるタスクが、他のマスタデバイスにおける所定のタスクの実行と時間順序的な関係を持つ場合を仮定する。他のマスタデバイスにおける前記所定のタスクの終了を待つために、前記一のマスタデバイスにおいて待ち状態に入るタスクがあった場合に、当該一のマスタデバイスもしくはオペレーティングシステムによって、この優先させるべき他のマスタデバイスで実行されるタスクの識別子が、タスク間連係情報として相対優先度補正判定部202に入力される。この入力されたタスク識別子(タスク間連係情報)は、前記一のマスタデバイスのタスクが待ち状態から復帰したときに、当該タスクもしくはオペレーティングシステムによって解除される。   Assume that among the master devices 101 to 103, a task in one master device has a time-order relationship with execution of a predetermined task in another master device. When there is a task that enters a waiting state in the one master device in order to wait for the completion of the predetermined task in another master device, the other master device to be prioritized by the one master device or the operating system. The identifier of the task executed on the device is input to the relative priority correction determination unit 202 as task linkage information. The input task identifier (inter-task linkage information) is canceled by the task or operating system when the task of the one master device returns from the waiting state.

相対優先度補正判定部202では、一のマスタデバイスからタスク間連係情報が入力されている場合、そのタスク間連係情報に基づき、一のマスタデバイスからのアクセス要求の優先度を下げるか否かの判定と、その下げ量(優先度補正量)の導出を行う。この下げ量は、前記他のマスタデバイスにより実行される前記所定のタスクからのアクセス要求の優先度よりも、当該一のマスタデバイスからのアクセス要求の優先度のようが低くなるような値であり、優先度処理テーブルレジスタ部201から入力される一のマスタデバイスからのアクセス要求の基本優先度と、他のマスタデバイスからのアクセス要求の基本優先度と、を比較することにより導出される。すなわち、例えば、一のマスタデバイスからのアクセス要求の基本優先度が15であり、他のマスタデバイスからのアクセス要求の基本優先度が10であれば、例えば、優先度補正量を6とし、該優先度補正量による補正後の一のマスタデバイスからのアクセス要求の基本優先度が9となるようにすればよい。   In the relative priority correction determination unit 202, when inter-task linkage information is input from one master device, whether or not to lower the priority of an access request from one master device based on the inter-task linkage information Judgment and derivation of the reduction amount (priority correction amount) are performed. The amount of decrease is a value such that the priority of the access request from the one master device is lower than the priority of the access request from the predetermined task executed by the other master device. The basic priority of the access request from one master device input from the priority processing table register unit 201 is derived by comparing the basic priority of the access request from another master device. That is, for example, if the basic priority of an access request from one master device is 15 and the basic priority of an access request from another master device is 10, for example, the priority correction amount is set to 6, The basic priority of the access request from one master device after correction by the priority correction amount may be set to 9.

図3を用いて、相対優先度補正判定部202における判定フローを説明する。   A determination flow in the relative priority correction determination unit 202 will be described with reference to FIG.

まず、相対優先度補正判定部202は、一のマスタデバイスよりも優先させなければならない他のマスタデバイスのタスクが存在することを示すタスク間連係情報が登録されているかどうかを判定する。つまり、上記所定のタスクのタスク識別子が、タスク間連係情報として相対優先度補正判定部202に入力されているか否か、或いは、入力された上記所定のタスクのタスク識別子を相対優先度補正判定部202が保持しているか否かを判定する(ステップS1)。   First, the relative priority correction determination unit 202 determines whether or not task linkage information indicating that there is a task of another master device that should be prioritized over the one master device is registered. That is, whether or not the task identifier of the predetermined task is input to the relative priority correction determination unit 202 as inter-task linkage information, or the input task identifier of the predetermined task is the relative priority correction determination unit. It is determined whether or not 202 holds (step S1).

タスク間連係情報が登録されていなければ(ステップS1のNo)、優先度補正量を0として優先要求判定部203に出力する(ステップS4)。このため、一のマスタデバイスからのアクセス要求に対して優先度処理テーブル部201から導出される基本優先度がそのまま最終優先度となる。   If the inter-task linkage information is not registered (No in step S1), the priority correction amount is set to 0 and output to the priority request determination unit 203 (step S4). Therefore, the basic priority derived from the priority processing table unit 201 with respect to an access request from one master device becomes the final priority as it is.

他方、他のマスタデバイスにおける所定のタスクを一のマスタデバイスよりも優先されなければならないことが登録されていれば(ステップS1のYes)、当該他のマスタデバイスが所定のタスクを実行中かどうかを判定する(ステップS2)。ここで、実行中のタスクの識別子の入手の仕方としては、タスクを実行する各マスタデバイス101〜103から、随時、タスク識別子を相対優先度補正判定部202に入力する方法や、タスクの切り替わりのタイミングのみにおいて切り替わり後のタスク識別子を各マスタデバイス101〜103から相対優先度補正判定部202に入力し、その後は相対優先度補正判定部202にてタスク識別子を記憶保持する方法が挙げられる。   On the other hand, if it is registered that a predetermined task in another master device should be prioritized over one master device (Yes in step S1), whether or not the other master device is executing the predetermined task Is determined (step S2). Here, as a method of obtaining the identifier of the task being executed, a method of inputting the task identifier to the relative priority correction determination unit 202 from each of the master devices 101 to 103 executing the task, or task switching There is a method in which the task identifier after switching only at the timing is input from each of the master devices 101 to 103 to the relative priority correction determination unit 202, and thereafter the task identifier is stored and held in the relative priority correction determination unit 202.

他のマスタデバイスで所定のタスクが実行中でないならば(ステップS2のNo)、優先度補正量を0として優先要求判定部203に出力し(ステップS4)、一のマスタデバイスからのアクセス要求に対して優先度処理テーブル部201から導出される基本優先度がそのまま最終優先度となる。   If a predetermined task is not being executed in another master device (No in step S2), the priority correction amount is set to 0 and is output to the priority request determination unit 203 (step S4), and an access request from one master device is received. On the other hand, the basic priority derived from the priority processing table unit 201 becomes the final priority as it is.

他のマスタデバイスで所定のタスクが実行中であれば(ステップS2のYes)、タスク間連係情報に従って優先度補正量を導出し、該導出した優先度補正量を優先要求判定部203に出力する(ステップS3)。ここで、この優先度補正量は、一のマスタデバイスによるアクセス要求に割り付けられる最終優先度が他のマスタデバイスの優先度よりも低い値になるような補正量である。   If a predetermined task is being executed on another master device (Yes in step S2), a priority correction amount is derived according to the inter-task linkage information, and the derived priority correction amount is output to the priority request determination unit 203. (Step S3). Here, this priority correction amount is a correction amount such that the final priority assigned to an access request by one master device is lower than the priority of another master device.

このため、一のマスタデバイスからのアクセス要求に対して優先度処理テーブル部201から導出される基本優先度が、優先要求判定部203によって優先度補正量を用いて補正されることにより、最終優先度は他のマスタデバイスの優先度よりも低い値となる。   Therefore, the basic priority derived from the priority processing table unit 201 for the access request from one master device is corrected by the priority request determination unit 203 using the priority correction amount, so that the final priority is obtained. The degree is lower than the priority of other master devices.

ここで、タスク間連係情報は、特定タスク間の相対的な優先関係を指示するものである。この具体的な実現方法としては、例えば、優先されるべきタスクによるアクセス要求に対する優先度値から最小単位値の1を減じた値が優先要求判定部203から出力されることになるような指示を相対優先度補正判定部202が与える形態が考えられる。このとき、優先要求判定部203には、優先度処理テーブルレジスタ部201から与えられた基本優先度の差分を算出する機能が実装される形態も考えられる。   Here, the inter-task linkage information indicates a relative priority relationship between specific tasks. As a specific implementation method, for example, an instruction is issued so that the priority request determination unit 203 outputs a value obtained by subtracting 1 of the minimum unit value from the priority value for the access request by the task to be prioritized. A form given by the relative priority correction determination unit 202 is conceivable. At this time, a mode in which a function for calculating a difference between basic priorities given from the priority processing table register unit 201 is mounted in the priority request determination unit 203 is also conceivable.

ただし、相対優先度補正判定部202から出力される優先度補正量は優先度を基本優先度から下げるような値とは限らない。すなわち、一のマスタデバイスのタスクが自らの優先度を上げるようなタスク間連係情報を相対優先度補正判定部202に入力する結果として、優先要求判定部203が一のマスタデバイスのタスクの優先度を他のマスタデバイスのタスクの優先度よりも上げるような動作も可能である。なお、優先度は相対値のみが有効な値であるために、特定の優先度値を上げることと、その他の優先度を下げることは、互いに等価となる。   However, the priority correction amount output from the relative priority correction determination unit 202 is not necessarily a value that lowers the priority from the basic priority. That is, as a result of inputting inter-task linkage information such that a task of one master device increases its own priority to the relative priority correction determination unit 202, the priority request determination unit 203 determines the priority of the task of one master device. It is also possible to perform an operation that raises the priority of the task higher than the task priority of another master device. Note that since only relative values are valid values for priority, increasing a specific priority value and decreasing other priorities are equivalent to each other.

また、基本優先度を優先度補正量によって補正した後の最終優先度が、別のマスタデバイスのアクセス要求の優先度と同じ値となってしまった場合、つまり、デッドロック状態となった場合には、その状態を解消するために特定のアクセス要求の優先度をさらに変更する必要がある。具体的には、例えば、デッドロックに含まれる各タスクのうち、優先度処理テーブルレジスタ部201に保持されている基本優先度が最も高いタスクを、強制的に、デッドロックに含まれる各タスクのうちの先頭処理タスク(一番最初に処理を実行するタスク)とする形態が考えられる。   In addition, when the final priority after the basic priority is corrected by the priority correction amount becomes the same value as the priority of the access request of another master device, that is, when a deadlock state occurs. Needs to further change the priority of a particular access request in order to resolve that condition. Specifically, for example, among the tasks included in the deadlock, the task having the highest basic priority held in the priority processing table register unit 201 is forcibly changed to each task included in the deadlock. Of these, the top processing task (the task that executes processing first) can be considered.

また、割り込み処理中には、タスクが実行されずタスク識別子による判断を行うことができないため、マスタデバイスの動作状態を表す指標として割り込み番号を用いた判断を行うようにしても良い。つまり、上記においては、タスク識別子をマスタデバイスの動作状態を表す指標として用いた動作を説明したが、割り込み処理中には、上記の動作におけるタスク識別子を割り込み番号に置き換えた動作を行うことができる。   Further, during the interrupt processing, since the task is not executed and the determination based on the task identifier cannot be performed, the determination using the interrupt number as an index indicating the operation state of the master device may be performed. That is, in the above description, the operation using the task identifier as an index indicating the operation state of the master device has been described. However, during the interrupt processing, the operation in which the task identifier in the above operation is replaced with the interrupt number can be performed. .

また、要求選択部204は、優先要求判定部203の出力に応じてアクセス要求を一つだけ受理する形態が考えられるが、複数のアクセス要求を各マスタデバイスから受理して優先度順にスタックに保持する形態も考えられる。後者の場合、スタック内にアクセス要求自体とその優先度とがペアでスタックに保持されるが、上記の説明と同様に、各タスクに対して与えられたアクセス要求の最終優先度の順に、各アクセス要求を許可すればよい。   The request selection unit 204 may accept only one access request according to the output of the priority request determination unit 203. However, the request selection unit 204 receives a plurality of access requests from each master device and holds them in the stack in order of priority. The form to do is also considered. In the latter case, the access request itself and its priority are held in the stack as a pair in the stack, but in the same way as described above, in order of the final priority of the access request given to each task, The access request may be permitted.

以上のような第1の実施形態によれば、以下のような効果が得られる。   According to the first embodiment as described above, the following effects can be obtained.

第1の効果は、一のマスタデバイスによるアクセス要求に与える最終優先度を、他のマスタデバイスの動作状態に応じて変化させることができるので、複数のマスタデバイス間の状態の相対関係を考慮した競合調停が可能となることである。   The first effect is that the final priority given to an access request by one master device can be changed according to the operating state of the other master device, so that the relative relationship of the states among a plurality of master devices is considered. Competitive mediation is possible.

第2の効果は、アクセス要求を発行した複数のマスタデバイス101〜103におけるタスクの組合せごとに各タスクによるアクセス要求に与える優先度を割り当てることにより、マスタスレーブシステム100全体の動作に要求される仕様に対してさらにきめ細かい調停を行うことができることである。   The second effect is the specification required for the operation of the entire master / slave system 100 by assigning priority given to the access request by each task for each combination of tasks in the plurality of master devices 101 to 103 that issued the access request. This makes it possible to perform more detailed mediation.

その理由は、あるタスクによるアクセス要求に対して、そのアクセス要求を行うマスタデバイス単体の動作状態から一義的に優先度を決定するのではなく、複数のマスタデバイスで併走しているタスクどうしの組合せまでを考慮することにより、マスタデバイス間の動作状態の相対関係を調停判定に取り込むことができるためである。   The reason for this is that an access request by a certain task is not determined uniquely from the operating state of the master device that issues the access request, but is a combination of tasks running concurrently on multiple master devices. This is because the relative relationship of the operation states between the master devices can be taken into the arbitration determination by considering the above.

更に、本来ならば複数のマスタデバイスという物理的に離れたデバイス間で情報を伝達して調停すべきものが、ひとまとまりのハードウェア構成(つまり、競合調停部106)により一箇所で処理を行うことにより、高速な処理が可能となるためである。加えて、必要な優先度補正も同様にひとまとまりのハードウェア構成(競合調停部106)において行うことにより、最終的な調停情報(つまり、最終優先度)がバス伝達時間と比較して同等もしくはそれ以下という高速で得られることになる。   Furthermore, what should be arbitrated by transmitting information between physically separate devices such as a plurality of master devices is processed at a single location by a single hardware configuration (that is, the competitive arbitration unit 106). This is because high-speed processing becomes possible. In addition, necessary priority correction is performed in the same hardware configuration (competition arbitration unit 106), so that final arbitration information (that is, final priority) is equivalent to the bus transmission time or It will be obtained at a high speed of less than that.

第3の効果は、競合対象となっているアクセス要求のみならず、そのあとに発生することになるアクセス要求が適切な段階で処理されるように考慮された調停を行うことができることである。   The third effect is that arbitration can be performed so that not only access requests that are subject to contention but also access requests that will occur thereafter are processed at an appropriate stage.

その理由は、一のマスタデバイスが実行するタスクの優先度が高いけれども、該優先度の高いタスクは、他のマスタデバイスが実行するタスクの処理完了を待つ必要があるような場合において、一のマスタデバイスのタスクが待ち状態となってそのアクセス要求がバスアクセスに現れない状態のときであっても、各マスタデバイスから与えられるタスク間連係情報により競合調停装置がそのような状態を認識し、待ち状態にあるタスクが待ちから適切に復旧して実行可能となるような競合調停が可能となるためである。   The reason is that in the case where the priority of a task executed by one master device is high, the high priority task needs to wait for the completion of processing of the task executed by another master device. Even when the master device task is in a waiting state and the access request does not appear in bus access, the contention arbitration device recognizes such a state from the inter-task linkage information given from each master device, and This is because contention arbitration is possible so that a task in a waiting state can be appropriately recovered from waiting and executed.

なお、上記の実施形態では、マスタスレーブシステム100が備えるスレーブデバイス104が1つである例を説明したが、マスタスレーブシステム100が複数のスレーブデバイスを備える形態も考えられる。   In the above embodiment, an example in which the master slave system 100 includes one slave device 104 has been described. However, a form in which the master slave system 100 includes a plurality of slave devices is also conceivable.

また、競合調停部106が、バス制御部105の内部ではなく、スレーブデバイス104とバス制御部105の間に配置されて、特定のスレーブデバイスに対するアクセス要求の競合処理をする形態も考えられる。   Further, a mode in which the contention arbitration unit 106 is arranged not between the bus control unit 105 but between the slave device 104 and the bus control unit 105 and performs contention processing for access requests to a specific slave device is also conceivable.

また、競合調停部106は、例えば、CPU或いはその他のプロセッサと、このプロセッサの動作用プログラムを記憶したROMなどのプログラムメモリと、このプロセッサの作業領域として機能するRAMなどの作業用メモリと、を備え、上記において説明したような優先度処理テーブルレジスタ部201、相対優先度補正判定部202、優先要求判定部203、要求選択部204、をプログラム処理により実行するような構成であっても良い。なお、この場合、優先度処理テーブルは、プログラムメモリ又は作業用メモリに記憶すればよい。   In addition, the contention arbitration unit 106 includes, for example, a CPU or other processor, a program memory such as a ROM that stores a program for operating the processor, and a work memory such as a RAM that functions as a work area of the processor. The priority processing table register unit 201, the relative priority correction determination unit 202, the priority request determination unit 203, and the request selection unit 204 as described above may be executed by program processing. In this case, the priority processing table may be stored in the program memory or the working memory.

また、相対優先度補正判定部202にも要求信号線を介して各マスタデバイス101〜103からのアクセス要求を入力するようにし、相対優先度補正判定部202は、図3の動作において、ステップS1の前に、何れかのマスタデバイスからのアクセス要求が発行されているか否かを判定し、発行されている場合に限り、図3のステップS1以降の処理を行うようにしても良い。   In addition, the access request from each of the master devices 101 to 103 is input to the relative priority correction determination unit 202 via the request signal line, and the relative priority correction determination unit 202 performs step S1 in the operation of FIG. Before the process, it is determined whether or not an access request from any of the master devices has been issued. Only when the access request has been issued, the processes after step S1 in FIG. 3 may be performed.

第1の実施形態に係るシステム全体の構成を示すブロック図である。It is a block diagram which shows the structure of the whole system which concerns on 1st Embodiment. 第1の実施形態における競合調停処理装置において、競合調停部106の内部構成を示すブロック図である。3 is a block diagram showing an internal configuration of a contention arbitration unit 106 in the contention arbitration processing apparatus according to the first embodiment. FIG. 本発明の第1の実施形態におけるデータ処理装置の処理フローを示すフローチャートである。It is a flowchart which shows the processing flow of the data processor in the 1st Embodiment of this invention.

符号の説明Explanation of symbols

100 マスタスレーブシステム
101 マスタデバイス
102 マスタデバイス
103 マスタデバイス
104 スレーブデバイス
105 バス制御部
106 競合調停部(競合調停装置)
107 マスタ−スレーブ間データ転送部
201 優先度処理テーブルレジスタ部(基本優先度割当手段)
202 相対優先度補正判定部(優先度変更量導出手段)
203 優先要求判定部(最終優先度決定手段)
204 要求選択部
100 Master / Slave System 101 Master Device 102 Master Device 103 Master Device 104 Slave Device 105 Bus Control Unit 106 Contention Arbitration Unit (Contention Arbitration Device)
107 Master-Slave Data Transfer Unit 201 Priority Processing Table Register Unit (Basic Priority Allocation Unit)
202 Relative priority correction determination unit (priority change amount deriving means)
203 Priority request determination unit (final priority determination means)
204 Request selection part

Claims (9)

アクセス要求を発行する複数のマスタデバイスと、前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、を備えるシステムに備えられる競合調停装置において、
前記複数のマスタデバイスによるアクセス要求に基本優先度を割り当てる基本優先度割当手段と、
前記複数のマスタデバイスのうちの一のマスタデバイスによるアクセス要求の優先度変更量を、他のマスタデバイスの動作状態に応じて導出する優先度変更量導出手段と、
前記優先度変更量により前記基本優先度を補正することにより、前記一のマスタデバイスによるアクセス要求に与える最終優先度を決定する最終優先度決定手段と、
を備えることを特徴とする競合調停装置。
In a contention arbitration device provided in a system including a plurality of master devices that issue access requests and a slave device that executes processing according to access requests issued from the plurality of master devices,
Basic priority assignment means for assigning a basic priority to access requests by the plurality of master devices;
Priority change amount deriving means for deriving a priority change amount of an access request by one master device of the plurality of master devices according to an operation state of another master device;
Final priority determination means for determining a final priority to be given to an access request by the one master device by correcting the basic priority by the priority change amount;
Competitive arbitration device comprising:
前記優先度変更量導出手段は、
前記一のマスタデバイスによるアクセス要求の最終優先度が前記基本優先度から変わらないような優先度変更量を導出するか、
又は、
前記一のマスタデバイスによるアクセス要求の最終優先度が前記他のマスタデバイスによるアクセス要求に与えられる優先度よりも低い値となるような優先度変更量を導出することを特徴とする請求項1に記載の競合調停装置。
The priority change amount derivation means includes:
Deriving a priority change amount such that the final priority of the access request by the one master device does not change from the basic priority,
Or
The priority change amount is derived such that a final priority of an access request by the one master device is lower than a priority given to an access request by the other master device. The contention arbitration device described.
前記優先度変更量導出手段は、
前記他のマスタデバイスのタスク識別子又は割り込み番号に応じて前記一のマスタデバイスによるアクセス要求の優先度変更量を導出することを特徴とする請求項1又は2に記載の競合調停装置。
The priority change amount derivation means includes:
3. The contention arbitration apparatus according to claim 1, wherein a priority change amount of an access request by the one master device is derived according to a task identifier or an interrupt number of the other master device.
前記優先度変更量導出手段は、前記他のマスタデバイスのタスク識別子に応じて前記一のマスタデバイスによるアクセス要求の優先度変更量を導出するものであり、
前記優先度変更量導出手段は、
前記一のマスタデバイスにより当該一のマスタデバイスのタスクよりも優先させるべきタスクとして予め設定された前記他のマスタデバイスのタスクのタスク識別子を保持し、該保持したタスク識別子が、前記他のマスタデバイスの現在のタスク識別子と一致した場合に、前記一のマスタデバイスによるアクセス要求の最終優先度が前記他のマスタデバイスによるアクセス要求に与えられる優先度よりも低い値となるような優先度変更量を導出することを特徴とする請求項2に記載の競合調停装置。
The priority change amount derivation means derives a priority change amount of an access request by the one master device according to a task identifier of the other master device,
The priority change amount derivation means includes:
The one master device holds a task identifier of the task of the other master device preset as a task to be prioritized over the task of the one master device, and the held task identifier is the other master device. And a priority change amount such that the final priority of the access request by the one master device is lower than the priority given to the access request by the other master device. The contention arbitration device according to claim 2, wherein the contention arbitration device is derived.
前記基本優先度割当手段は、
前記複数のマスタデバイスの動作状態の組合せに基づいて、各マスタデバイスによるアクセス要求に対してそれぞれ基本優先度を割り当てることを特徴とする請求項1又は2に記載の競合調停装置。
The basic priority assigning means includes:
The contention arbitration apparatus according to claim 1, wherein a basic priority is assigned to each access request by each master device based on a combination of operation states of the plurality of master devices.
前記基本優先度割当手段は、各マスタデバイスの動作状態を各マスタデバイスのタスク識別子又は割り込み番号により認識することを特徴とする請求項5記載の競合調停装置。   6. The contention arbitration apparatus according to claim 5, wherein the basic priority assignment unit recognizes an operation state of each master device by a task identifier or an interrupt number of each master device. アクセス要求を発行する複数のマスタデバイスと、
前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、
請求項1乃至6の何れか一項に記載の競合調停装置と、
を備えることを特徴とするマスタスレーブシステム。
Multiple master devices issuing access requests;
A slave device that executes processing according to an access request issued from the plurality of master devices;
The contention arbitration device according to any one of claims 1 to 6,
A master-slave system comprising:
アクセス要求を発行する複数のマスタデバイスと、前記複数のマスタデバイスから発行されたアクセス要求に応じた処理を実行するスレーブデバイスと、を備えるシステムにおけるアクセス要求の競合を調停する方法において、
前記複数のマスタデバイスによるアクセス要求に基本優先度を割り当てる第1の過程と、
前記複数のマスタデバイスのうちの一のマスタデバイスによるアクセス要求の優先度変更量を、他のマスタデバイスの動作状態に応じて導出する第2の過程と、
前記優先度変更量により前記基本優先度を補正することにより、前記一のマスタデバイスによるアクセス要求に与える最終優先度を決定する第3の過程と、
を備えることを特徴とする競合調停方法。
In a method of arbitrating contention of access requests in a system comprising a plurality of master devices that issue access requests and a slave device that executes processing according to access requests issued from the plurality of master devices,
A first step of assigning a basic priority to access requests by the plurality of master devices;
A second step of deriving a priority change amount of an access request by one master device of the plurality of master devices according to an operating state of another master device;
A third step of determining a final priority given to an access request by the one master device by correcting the basic priority by the priority change amount;
Competitive arbitration method comprising:
コンピュータが実行可能なプログラムにおいて、請求項8に記載の競合調停方法をコンピュータに実行させることを特徴とするプログラム。   A computer-executable program for causing a computer to execute the contention arbitration method according to claim 8.
JP2007087871A 2007-03-29 2007-03-29 Competition arbitration apparatus, master-slave system, and method for competition arbitration Pending JP2008250419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007087871A JP2008250419A (en) 2007-03-29 2007-03-29 Competition arbitration apparatus, master-slave system, and method for competition arbitration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007087871A JP2008250419A (en) 2007-03-29 2007-03-29 Competition arbitration apparatus, master-slave system, and method for competition arbitration

Publications (1)

Publication Number Publication Date
JP2008250419A true JP2008250419A (en) 2008-10-16

Family

ID=39975334

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007087871A Pending JP2008250419A (en) 2007-03-29 2007-03-29 Competition arbitration apparatus, master-slave system, and method for competition arbitration

Country Status (1)

Country Link
JP (1) JP2008250419A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017167849A (en) * 2016-03-16 2017-09-21 株式会社デンソー Control device
CN110661599A (en) * 2018-06-28 2020-01-07 中兴通讯股份有限公司 HA implementation method, device and storage medium between main node and standby node

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017167849A (en) * 2016-03-16 2017-09-21 株式会社デンソー Control device
CN110661599A (en) * 2018-06-28 2020-01-07 中兴通讯股份有限公司 HA implementation method, device and storage medium between main node and standby node

Similar Documents

Publication Publication Date Title
JP5829890B2 (en) Semiconductor data processing apparatus, time trigger communication system, and communication system
JP5169731B2 (en) Multiprocessor system LSI
JP5578713B2 (en) Information processing device
US20110016247A1 (en) Multiprocessor system and multiprocessor system interrupt control method
US20110022759A1 (en) Multiprocessor system
US7398378B2 (en) Allocating lower priority interrupt for processing to slave processor via master processor currently processing higher priority interrupt through special interrupt among processors
US8213461B2 (en) Method of designating slots in a transmission frame for controlling transmission of data over an interconnect coupling a plurality of master units with a plurality of slave units
JP5565204B2 (en) Data transfer apparatus, data transfer method and program, and image forming apparatus
US9170963B2 (en) Apparatus and method for generating interrupt signal that supports multi-processor
GB2396445A (en) Interrupt controllers for prioritizing interrupt requests generated by a plurality of interrupt sources
JP2014191655A (en) Multiprocessor, electronic control device, and program
US20050066093A1 (en) Real-time processor system and control method
JP2008250419A (en) Competition arbitration apparatus, master-slave system, and method for competition arbitration
JP2010044645A (en) Data transfer device, and data transfer method
JP5704176B2 (en) Processor processing method and processor system
JP2006215621A (en) Dma controller
JP7233932B2 (en) Service request interrupt router for virtual interrupt service providers
JP6074932B2 (en) Arithmetic processing device and arithmetic processing method
JP5884788B2 (en) Microcomputer
US10540305B2 (en) Semiconductor device
JPH064314A (en) Inter-task synchronizing communication equipment
JP5644197B2 (en) Computer system and interrupt request processing method
US20100153610A1 (en) Bus arbiter and bus system
WO2021037124A1 (en) Task processing method and task processing device
JP2012168773A (en) Bus system and access control method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Effective date: 20080825

Free format text: JAPANESE INTERMEDIATE CODE: A7421

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20090701