Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3596402B2 - Access right arbitration device - Google Patents
[go: Go Back, main page]

JP3596402B2 - Access right arbitration device - Google Patents

Access right arbitration device Download PDF

Info

Publication number
JP3596402B2
JP3596402B2 JP2000025349A JP2000025349A JP3596402B2 JP 3596402 B2 JP3596402 B2 JP 3596402B2 JP 2000025349 A JP2000025349 A JP 2000025349A JP 2000025349 A JP2000025349 A JP 2000025349A JP 3596402 B2 JP3596402 B2 JP 3596402B2
Authority
JP
Japan
Prior art keywords
data processing
access right
processing request
processing device
access
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.)
Expired - Fee Related
Application number
JP2000025349A
Other languages
Japanese (ja)
Other versions
JP2001216256A (en
Inventor
陽介 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2000025349A priority Critical patent/JP3596402B2/en
Publication of JP2001216256A publication Critical patent/JP2001216256A/en
Application granted granted Critical
Publication of JP3596402B2 publication Critical patent/JP3596402B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)
  • Bus Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数のデータ処理装置にて補助データ処理装置を共有する際に、データ処理装置間で補助データ処理装置へのアクセス権を調停するアクセス権調停装置に関する。
【0002】
【従来の技術】
従来より、複数のプロセッサ(データ処理装置)を並列動作させるマルチプロセッサシステムでは、各プロセッサが共通に使用するデータを格納するためのメモリや浮動小数点演算装置等の高価なコプロセッサ(補助データ処理装置)といった周辺装置を共有する場合がある。以下、このような周辺装置を共有周辺装置という。
【0003】
この場合、複数のプロセッサが、同じ共有周辺装置への書込を同時に行う等してデータが破壊されてしまうことのないように、共有周辺装置へのアクセス権をいずれかのプロセッサに排他的に付与するための調停が必要となる。
このようなアクセス権の調停は、各プロセッサから共有周辺装置へのアクセス要求を受け付けて、アクセス要求が競合した場合に、アクセス権を与えるプロセッサを選択すると共に、競合する他のプロセッサに対して動作停止を指示するためのホールド信号を送出する調停回路を設けてハードウェア的に調停を行う方法と、共有周辺装置の使用状態を示すフラグを設け、アクセスの競合が発生しないように各プロセッサがフラグの照会,操作を行うことでソフトウェア的に調停を行う方法とが知られている。
【0004】
ところで、共有周辺装置としてコプロセッサ(例えば浮動小数点演算装置等)を用いる場合、プロセッサによる被演算データの書込、コプロセッサによる演算処理の実行、プロセッサによる演算結果データの読出という一連の処理が必要となる。この一連の処理の途中に、他のプロセッサからコプロセッサに対して新たなデータの書込が行われると、処理シーケンスが狂ってしまい、正しい処理結果が得られない場合がある。
【0005】
しかし、ハードウェア的な調停方法では、各プロセッサは共有周辺装置へのアクセスを1回終了する毎に、一旦アクセス権を解放し、改めてアクセス要求を行うのが一般的である。つまり、共有周辺装置としてコプロセッサを用いる場合には、一連の動作が終了するまでの間、単一のプロセッサにアクセス権を占有させるための仕組みが必要となる。
【0006】
これを実現するものとして、例えば特開平5−289987号公報には、アクセス終了後、一定の優先期間内に、同じプロセッサから連続してアクセス要求が出された場合に、そのプロセッサに対して引き続きアクセス権を与えるよう制御する装置が開示されている。
【0007】
【発明が解決しようとする課題】
しかし、このような装置では、コプロセッサでの演算時間、即ち被演算データの書込後、演算結果データの読出が可能となるまでの時間間隔が長くなると、上述の優先期間をオーバーしてしまい、演算結果データの読出を行う前にコプロセッサのアクセス権が、他のプロセッサにアクセス権が移ってしまう場合があるという問題があった。
【0008】
なお、このような事態は優先期間を十分に長くすれば防止できる。しかし、この装置では、他のプロセッサにアクセス権を移すには、必ず優先期間の間待機しなければならないため、優先期間を長くするほど無駄な待機時間が増大してしまう。また、優先期間を長くすると、連続アクセスを必要としない場合にも、単一のプロセッサがアクセス権を占有する可能性が高くなり、競合する他のプロセッサがホールド状態に保持される時間が増大してしまうため、システム全体としての処理効率が低下してしまうという問題があった。
【0009】
更に、このようなアクセス権の占有が発生した場合には、一定時間内に応答を返す必要のある処理等、リアルタイム性が要求される処理を実行する際の障害となり、処理の応答性が低下するという問題もあった。
一方、ソフトウェア的に調停する場合、フラグの操作のみで、特定のプロセッサに任意期間だけアクセス権を占有させることが可能であるが、アクセス権を獲得,解放する際には、必ずフラグの照会,操作のための処理が必要となるため、その分、処理効率が低下してしまうという問題があった。
【0010】
本発明は、上記問題点を解決するために、複数のデータ処理装置により共有される補助データ処理装置を効率良く使用でき、しかも補助データ処理装置へのアクセス権が一つのデータ処理装置によって必要以上に長く占有されてしまうことのないアクセス権調停装置を提供することを目的とする。
【0011】
【課題を解決するための手段】
上記目的を達成するための発明である請求項1記載のアクセス権調停装置では、データ処理装置が補助データ処理装置に対して入力データを書き込むための書込信号の送出開始、または出力データを読み出すための読出信号の読出開始により設定され、補助データ処理装置に対して出力データを読み出すための読出信号の送出完了により解除される処理要求を、処理要求設定手段がデータ処理装置毎に設定する。そして、この処理要求設定手段による処理要求の設定時に、既に他のデータ処理装置の処理要求が設定されている場合、ホールド設定手段が、この新たに設定された処理要求に対応するデータ処理装置をホールド状態にする。
【0012】
更に、ホールド解放手段が、処理要求が設定されているデータ処理装置のうち非ホールド状態にあるものを、補助データ処理装置へのアクセス権を有する第1のデータ処理装置として、この第1のデータ処理装置の処理要求の解除時に、他の処理要求が存在すればそのいずれか一つを選択し、選択した処理要求に対応する第2のデータ処理装置をホールド状態から解放する。これにより、補助データ処理装置へのアクセス権は、第1のデータ処理装置から第2のデータ処理装置に移る。
【0013】
つまり、本発明のアクセス権調停装置では、補助データ処理装置への書込信号により処理要求を設定し、この処理要求に基づいてアクセス権を付与したデータ処理装置に、以後、そのデータ処理装置からの読出信号の送出が完了するまでの間、補助データ処理装置へのアクセス権を無条件で占有させている。
【0014】
従って、本発明によれば、補助データ処理装置から正常な処理結果を得るために必要な一連の動作(入力データの書込で開始され出力データの読出で終了)の途中で、他のデータ処理装置により新たな入力データが補助データ処理装置に書き込まれてしまうことがなく、補助データ処理装置を使用する各データ処理装置は、補助データ処理装置から信頼性の高い処理結果(出力データ)を得ることができる。
【0015】
また、本発明によれば、連続アクセスを行うか否かの判断のために、従来装置のような優先期間を設ける必要がなく、必要最小限の時間でアクセス権の調停が行われるため、複数のデータ処理装置に、補助データ処理装置を効率良く利用することができる。しかも、補助データ処理装置に対する一連の動作が終了する毎にアクセス権が解放されるため、特定のデータ処理装置が必要以上にアクセス権を占有し続けてしまうことを確実に防止できる。
【0016】
更に、本発明では、アクセス権の調停を、各データ処理装置からの書込信号及び読出信号に基づいて行っており、他に調停専用の信号を用いる必要がないため、装置構成を簡易化できる
【0018】
なお、本発明では、処理要求設定手段は、書込信号の送出開始だけでなく、読出信号の送出開始によっても処理要求の設定を行うため、書込信号を伴わない単独の読出信号に対してもアクセス権の調停を行うことができる。
【0019】
また、本発明のアクセス権調停装置では、第1のデータ処理装置の処理要求の解除後、予め設定された一定期間内に、この第1のデータ処理装置の処理要求が設定された場合、ホールド解放禁止手段が、ホールド解放手段の動作を禁止することにより、第1のデータ処理装置に連続してアクセス権を与えている。
【0020】
従って、本発明のアクセス権調停装置によれば、補助データ処理装置に読出信号を送出後、一定期間内に、補助データ処理装置に書込信号を送出することにより、同一データ処理装置により補助データ処理装置を連続的に使用することが可能となる。なお、本発明における上記一定期間は、従来装置の優先期間とは異なり、補助データ処理装置の動作とは無関係に設定できるため、必要最小限の長さ(例えば1クロック期間)があればよく、処理効率を大きく劣化させてしまうことがない。
【0021】
また、本発明のアクセス権調停装置では、第1の連続アクセス制限手段が、アクセス権を有するデータ処理装置(第1のデータ処理装置)と、装置指定手段にて指定されたデータ処理装置とが不一致である場合、ホールド解放禁止手段の動作を禁止する。
つまり、本発明のアクセス権調停装置によれば、装置指定手段にて指定されたデータ処理装置に対してのみ、補助データ処理装置へのアクセス権の連続付与が可能となるため、重要な処理(例えばリアルタイム処理)等を実行しているデータ処理装置を装置指定手段にて指定することにより、システム全体から見た各データ処理装置の実行状態を最適化することができる。
【0022】
次に、請求項2記載のアクセス権調停装置では、第1のデータ処理装置にアクセス権が連続して与えられた場合、第2の連続アクセス制限手段が、その連続回数をカウントし、このカウント値が上限回数に達すると、ホールド解放禁止手段の動作を禁止する。
【0023】
つまり、本発明のアクセス権調停装置によれば、同一データ処理装置に対してアクセス権が連続して付与される回数が、上述の上限回数に制限されるため、アクセス権が必要以上に占有されてしまうことを確実に防止できる。
【0024】
なお、装置指定手段の指定内容は、請求項記載のように、指定変更手段によって変更できるように構成してもよい。具体的には、例えば、請求項記載のように、予め設定された切換順序に従って定期的に変更するようにしてもよいし、外部からの設定や、所定のデータ処理装置からの指示により任意に変更できるようにしてもよい。
【0025】
特に、予め設定された切換順序に従って定期的に変更する場合、請求項記載のように、順序変更手段によって切換順序を変更できるように構成していもよい。この場合、補助データ処理装置へのアクセス権を、各データ処理装置に対して様々な割合で割り当てることができ、その時々に応じて個々のデータ処理装置の処理状態を柔軟に変更することができる。
【0026】
次に、請求項記載のアクセス権調停装置では、処理要求の優先度を設定する要求優先度設定手段を備え、ホールド解除手段は、対象となる処理要求が複数存在する場合、要求優先度指定手段にて指定された優先度が最も高い処理要求に対応するデータ処理装置を、ホールド状態から解放する。
【0027】
従って、本発明のアクセス権調停装置では、次にアクセス権を付与すべきデータ処理装置を、処理要求の優先度に従って決めることができる。なお、要求優先度指定手段は、例えば、請求項記載のように、処理要求の発生順に従って優先度を設定するように構成すればよい。また、処理要求の生成元であるデータ処理装置に対応させて固定的な優先度を設定してもよい。
【0030】
【発明の実施の形態】
以下に本発明の実施形態を図面と共に説明する。
[第1実施形態]
図1は、本発明が適用されたマルチプロセッサシステムの概略構成を表すブロック図である。
【0031】
図1に示すように、マルチプロセッサシステムは、それぞれ独立に動作するデータ処理装置としての一対のプロセッサP0,P1と、両プロセッサP0,P1が共有する補助データ処理装置としてのコプロセッサCPと、プロセッサP0,P1のいずれかにコプロセッサCPへのアクセス権を与えるための調停を行う調停装置10とを備えている。そして、調停装置10は、個別バスBSi(i=0,1)を介して各プロセッサPiに接続されていると共に、共通バスBSCを介してコプロセッサCPに接続されている。
【0032】
このうち、個別バスBSiは、各プロセッサPiとの間でデータDTiを入出力するためのデータバス、及び各プロセッサPiが供給するアドレス信号ADi,リード信号RDi,ライト信号WRiを取り込むための各種制御信号線からなり、一方、共通バスBSCは、コプロセッサCPとの間でデータDBCを入出力するためのデータバス、及びコプロセッサCPに対してアドレス信号ADC,リード信号RDC,ライト信号WRCを供給するための各種制御信号線からなる。
【0033】
更に、調停装置10は、各プロセッサPiに対して動作停止を指示するためのホールド信号HOLDiを出力し、また外部より当該調停装置10の動作モードを指定するための動作モード設定信号MODを入力するよう構成されている。
なお、本実施形態では、動作モード設定信号MODにより、コプロセッサCPへのアクセス要求の競合時に、同一プロセッサPiへのアクセス権の連続付与を許すか否かを表す優先指定がプロセッサ毎に設定される他、優先指定が設定された場合にアクセス権の連続付与回数を制限するか否かを表す連続制限指定、更に制限する場合その上限回数Cmax 等が設定される。
【0034】
ここで図2は、調停装置10の内部構成を表すブロック図である。
図2に示すように、調停装置10は、リード信号RD0,RD1,ライト信号WR0,WR1から処理要求信号RQ0,RQ1を生成する処理要求生成回路12と、処理要求信号RQ0,RQ1及び動作モード設定信号MODに基づいて、アクセス権を与えるべきプロセッサを選択し、これに対応した選択信号SL0.SL1を生成する選択回路14と、処理要求信号RQ0,RQ1及び選択信号SL0,SL1に基づいてホールド信号HOLD0,HOLD1の設定,解除を行うホールド制御回路16と、選択信号SL0,SL1に従って、個別バスBS0,BS1と共通バスBSCとの接続状態の切換、即ちを行うバス切換回路18とを備えている。但し、本実施形態において各信号WRi,RDi,RQi,SLi,HOLDiは、いずれもハイレベルがアクティブ、ローレベルが非アクティブであるものとする。
【0035】
そして、処理要求生成回路12は、ライト信号WRi及びリード信号RDiの論理和を生成する論理和回路ORiと、リード信号RDiを反転させる反転回路INViと、論理和回路ORiの出力の立上りエッジにてセットされ、反転回路INViの出力の立上りエッジにてリセットされるSRフリップフロップ回路SFiとからなる。
【0036】
つまり、処理要求生成回路12では、各プロセッサPiに対応して、それぞれ、ライト信号WRi又はリード信号RDiの送出開始タイミング(立上りエッジ)でハイレベルとなり、リード信号RDiの送出終了タイミング(立下りエッジ)でロウレベルとなる処理要求信号RQiが生成される。
【0037】
次に、ホールド制御回路16は、処理要求信号RQ0の立上りエッジにて、処理要求信号RQ1の信号レベルをラッチし、選択信号SL0がアクティブの時にリセットされるよう接続されたフリップフロップ回路FF0と、処理要求信号RQ1の立上りエッジにて処理要求信号RQ0の信号レベルをラッチし、選択信号SL1がアクティブの時にリセットされるよう接続されたフリップフロップ回路FF1とからなる。そして、これら各フリップフロップ回路FFiの出力が、ホールド信号HOLDiとして出力される。
【0038】
つまり、ホールド信号HOLDiは、処理要求信号RQiが設定された(アクティブとなった)時に、他方の処理要求信号RQj(j≠i)が設定されていなければ、非アクティブのまま保持され、一方、他方の処理要求信号RQjが既に設定されている場合には、アクティブに変化する。これにより、プロセッサPiはホールド状態に遷移する。また、アクティブに設定されたホールド信号HOLDiは、選択信号SLiがアクティブになることにより非アクティブに戻る。これにより、プロセッサPiはホールド状態から解放される。
【0039】
また、バス切換回路18は、選択信号SLiがアクティブである場合に、個別バスBSiと共通バスBSCとを接続するように動作するものであり、その構成は周知のものであるため、詳細な説明は省略する。
次に、選択回路14について説明する。但し、選択回路14は、論理回路の組合せにより様々な方法にて簡単に実現できるため、ここでは、その動作のみを、図3,図4に示すフローチャート、及び図5,図6に示すタイミング図に沿って説明する。
【0040】
まず、プロセッサPiがライト信号WRi又はリード信号RDiを送出することにより、処理要求信号RQiがアクティブに変化した時に起動される処理について説明する。
本処理が起動されると、図3に示すように、まずS110では、他方の処理要求信号RQj(つまり、i=0ならばj=1、i=1ならばj=0)が設定されているか否かを判断し、他方の処理要求信号RQjが設定されていなければ、即ち他方のプロセッサPjと競合していなければ、S120に移行し、選択信号SLiをアクティブとする(図5中の▲1▼参照)。
【0041】
この選択信号SLiにより、バス切換回路18では、個別バスBSiと共通バスBSCとが接続され、更に、ホールド制御回路16のフリップフロップ回路FFiがリセット状態(即ちホールド信号HOLDiが非アクティブ状態)に保持されることにより、コプロセッサCPへのアクセス権がプロセッサPiに与えられることになる。
【0042】
続くS130では、同一プロセッサに対するアクセス権の連続付与回数を示すカウント値Cを1に設定して本処理を終了する。
一方、先のS110にて、他方の処理要求信号RQjが設定されていると判定された場合、即ち、既にプロセッサPjがコプロセッサCPに対するライト信号WRj又はリード信号RDjを送出している場合には、そのまま本処理を終了する(図5中の▲2▼参照)。但し、この時、ホールド制御回路16の動作により、ホールド信号HOLDiがアクティブとなり、プロセッサPiはホールド状態に遷移する。
【0043】
次に、アクセス権を有するプロセッサPiから送出されたリード信号RDiが非アクティブに変化することにより、処理要求信号RQiが解除された(非アクティブに変化した)時に起動される処理について説明する。
本処理が起動されると、図4に示すように、まずS210では、解除された処理要求信号RQiに対応するプロセッサPiが、モード設定信号MODにより優先指定されているか否かを判断し、優先指定されていなければ、S260に移行して、選択信号SLiを非アクティブに設定する(図5中の▲3▼▲4▼参照)。
【0044】
これにより、バス切換回路18における個別バスBSiと共通バスBSCとの接続が解除され、プロセッサPiに与えられていたコプロセッサCPへのアクセス権が解放されることになる。
続くS270では、他の処理要求信号RQjが設定されているか否か、即ちプロセッサPiと競合してホールド状態とされていたプロセッサPjが存在するか否かを判断し、他の処理要求信号RQjが設定されていなければ(図5中の▲4▼参照)、そのまま本処理を終了する。
【0045】
一方、他の処理要求信号RQjが設定されている場合には、S280に移行し、選択信号SLjをアクティブとする(図5中の▲3▼参照)。
これにより、バス切換回路18では、個別バスBSjと共通バスBSCとが接続され、更に、ホールド制御回路16の動作によりホールド信号HOLDjが非アクティブに変化して、プロセッサPjがホールド状態から解放されることにより、コプロセッサCPへのアクセス権がプロセッサPjに与えられる。
【0046】
続くS290では、先のS130と同様に、連続アクセス回数を表すカウント値Cを1にセットして本処理を終了する。
先のS210にて、解除された処理要求信号RQiに対応するプロセッサPiが優先指定されていると判定された場合には、S220に移行する。
【0047】
S220では、モード設定信号MODによりアクセス権連続付与回数が制限されているか否かを判断し、制限されていなければS240に移行する。
S240では、予め設定された一定期間(本実施形態では1クロック期間)TCの間、先に解除された処理要求信号RQiを監視し、この一定期間TC内に、処理要求信号RQiが再設定されたか否かを判断する。
【0048】
そして、再設定されなかった場合には、S260に移行して、先に説明した通り、選択信号SLi,SLjの設定,解除、カウント値Cのクリアを行う(他の処理要求信号RQjが設定されていない場合(S270−NO)は図5中の▲5▼〜▲5▼’、他の処理要求信号RQjが設定されている場合(S270−YES)は図5中の▲6▼〜▲6▼’参照)。
【0049】
これにより、他の処理要求信号RQjが設定されていれば、コプロセッサCPへのアクセス権は、処理要求信号RQiの解除後、一定期間TCが経過してから、プロセッサPjに移ることになる。
またS240にて処理要求信号RQiが再設定されたと判定された場合には、S250に移行して、カウント値Cをインクリメントした後、本処理を終了する(図6中の▲7▼〜▲7▼’参照)。これにより、コプロセッサCPへのアクセス権は、処理要求信号RQjの有無に関わらず、引き続きプロセッサPiが保有することになる。
【0050】
先のS220にて、アクセス権連続付与回数が制限されていると判定された場合には、S230に移行して、カウント値Cが、アクセス権連続付与回数の制限値Cmax より小さいか否かを判断する。
そして、カウント値Cが制限値Cmax より小さければ(C<Cmax)、S240に移行して、先に説明した通り、処理要求信号RQiの再設定の有無に応じた処理を行う(再設定が有る場合(S240−YES)は図6中の▲7▼〜▲7▼’、再設定が無い場合(S240−NO)は図6中の▲8▼〜▲8▼’参照)。
【0051】
一方、カウント値Cが制限値Cmax に達している(S230−NO)場合、処理要求信号RQiの監視を行うことなく、S260に移行して、先に説明した通り、選択信号SLi,SLjの設定,解除、カウント値Cのクリアを行う(図6中の▲9▼参照)。
【0052】
これににより、他の処理要求信号RQjが設定されていれば、コプロセッサCPへのアクセス権は、処理要求信号RQiの解除後、一定期間TCの間待機することなく、直ちにプロセッサPjに移ることになる。
なお、本実施形態において処理要求生成回路12が処理要求設定手段、ホールド制御回路16がホールド設定手段、S270,S280がホールド解放手段、S240がホールド解放禁止手段、S220,S230が第の連続アクセス制限手段、S210が第の連続アクセス制限手段に相当する。
【0053】
以上説明したように、本実施形態の調停装置10では、コプロセッサCPへのライト信号WRi又はリード信号RDiの送出開始で設定され、リード信号RDiの送出終了で解除される処理要求信号RQiを、各プロセッサPi毎に生成し、この処理要求信号RQiに基づいて、コプロセッサCPへのアクセス権を付与すべきプロセッサPiを選択し、一旦アクセス権を付与すると、処理要求信号RQiが解除されるまでの間、アクセス権を占有させるようにされている。
【0054】
従って、本実施形態の調停装置10によれば、コプロセッサCPから正常な処理結果を得るために必要な一連の動作(入力データの書込で開始され出力データの読出で終了)の途中で、コプロセッサCPのアクセス権が他のプロセッサに移ってしまうことがなく、アクセス権を有するプロセッサPiは、コプロセッサCPから信頼性の高い処理結果を得ることができる。
【0055】
また、本実施形態の調停装置10によれば、処理要求信号RQiがアクティブである間、即ちコプロセッサCPに対する一連の動作が行われている間は、無条件で同一プロセッサにアクセス権を付与しているため、1回のアクセス毎に連続アクセスの可否を判定する従来装置と比較して、コプロセッサCPを効率良く使用することができる。
【0056】
しかも、動作モード設定信号により優先指定の設定を行わない場合には、この一連の動作が終了する毎にアクセス権の解放が行われるため、特定のプロセッサPiが必要以上にアクセス権を占有し続けてしまうことを確実に防止できる。
また本実施形態では、優先指定の設定を行う場合にも、連続アクセスを許可するか否かを判定する一定期間TCを、コプロセッサCPの動作とは無関係に短く設定できるため、この判定のために無駄になる待機時間を最小限に抑えることができ、更に、本実施形態では、アクセス権の連続付与回数の上限を制限することもできるため、特定のプロセッサPiによる不要なアクセス権の占有を確実に防止できる。
【0057】
なお、本実施形態では、プロセッサにアクセス権の連続付与を許可するか否かを指定するための優先指定を、動作モード設定信号MODによりプロセッサ毎に個別に設定できるようにされているが、いずれか一方のプロセッサPiのみを優先指定し、しかも、一定時間が経過する毎に、優先指定されるプロセッサPiを交互に切り換えるように構成してもよい。
【0058】
この場合、図6(b)に示すように、アクセス権を有するプロセッサが優先指定されている時には(図中▲7▼)、アクセス権の連続付与が行われ、一定時間が経過して、優先指定が切り替わった後に処理要求信号RQiが解除されると、他の処理要求信号RQjが設定されていれば、一定期間TCを待つことなく、直ちに、この処理要求信号RQjに対応するプロセッサPjに対してアクセス権が付与される(図中▲9▼)ことになる。
【0059】
但し、優先指定の切換は、同等な時間を割り当ててもよいし、不均等にしてもよく、更に、優先指定の割当時間の比率を、動作モード設定信号MODにより設定できるように構成してもよい。そして、この場合、優先指定したプロセッサを記憶する記憶装置が装置指定手段、この記憶装置の内容を書き換える処理が指定変更手段に相当する。
[第2実施形態]
次に第2実施形態について説明する。
【0060】
第1実施形態では、一つのコプロセッサCPを二つのプロセッサP0,P1にて共有する場合の調停装置10について説明したが、本実施形態では、一つのコプロセッサCPをn+1個のプロセッサP0〜Pnにて共有する場合の調停装置20について説明する。
【0061】
図7に示すように、本実施形態の調停装置20は、第1実施形態の調停装置10と同様に、処理要求生成回路22,選択回路24,ホールド制御回路26,バス切換回路28とからなる。
処理要求生成回路22は、リード信号RDi及びライト信号WRiから処理要求信号RQiを生成する個別の回路は、第1実施形態の処理要求生成回路22と全く同様であり、これがプロセッサの数に合わせてn+1個設けられている。
【0062】
ホールド制御回路26は、ホールド信号HOLDi毎に、フリップフロップ回路FFiを備え、処理要求信号RQiの立上りエッジにてデータ入力端子に印加された信号レベルをラッチし、選択信号SLiにてリセットされることは、第1実施形態のホールド制御回路16と全く同じであるが、フリップフロップ回路FFiのデータ入力端子には、論理和回路OR1iを介して、処理要求信号RQi以外の全ての処理要求信号RQj(j≠i)の論理和が印加されるように構成されている。つまり、処理要求信号RQiの設定時に、他のプロセッサPjの処理要求信号RQjが、いずれか一つでも設定されていれば、プロセッサPiへのホールド信号HOLDiがアクティブとなる。
【0063】
バス切換回路28は、個別バスBS0〜BSnの数が多いだけで、第1実施形態のバス切換回路18と同様に、選択信号SLiがアクティブである場合に、個別バスBSiと共通バスBSCとを接続するように動作する。
そして、選択回路は、S110,S270のRQjを、RQi以外の全ての処理要求とし、S280では、RQjのうち、最も優先度の高い処理要求信号RQkに対応した選択信号SLkを、アクティブにするものとして考える以外は、全く同様である。
【0064】
但し、ここでは、処理要求信号RQの優先度は、早くに設定されたものほど、高く設定されるものとする。この処理要求信号RQの優先度を設定する処理が本発明の要求優先度設定手段に相当する。
このように構成された本実施形態の調停装置20では、n+1個のプロセッサP0〜Pnに対してコプロセッサCPのアクセス権を調停することができること以外は、第1実施形態の調停装置10と全く同様の効果を得ることができる。
【0065】
ところで、本実施形態の調停装置20のように、調停すべきプロセッサP0〜Pnが多数存在する場合、いずれか一つのプロセッサPiのみを優先指定とし、その優先指定を順次切り替えるように構成することができる。
この優先指定切換処理(本発明の指定変更手段に相当する)の一例を、図8に示すフローチャートに沿って説明する。
【0066】
即ち、S310では、予め設定された所定時間が経過したか否かを判断し、経過していなければ、同ステップを繰り返し実行することで待機する。そして、所定時間が経過すると、S320に移行して、優先指定すべきプロセッサを表す指定値pをインクリメントし、続くS330では、この指定値がプロセッサの数を表すnより大きいか否かを判断し、大きければS340に移行して指定値pを0にリセット後にS310に戻り、一方、小さければそのままS310に戻る。
【0067】
これにより、所定時間の間、新たに設定されたpにて表されるプロセッサPpが優先指定されることになる。
この場合、優先指定の切換は、常に一定順序に行われることになるが、例えば、予め複数の切換順を書き込んだテーブルを用意しておき、テーブルに従って切り替えを行うと共に、動作モード設定信号MODにより、どの切換順を使用するか指定するように構成したり、状況の変化に応じて切換順を適宜変更できるように構成してもよい。この切換順を変更する処理が本発明の順序変更手段に相当する。
【0068】
また、本実施形態では、処理要求信号RQ0〜RQnが競合している場合に、その発生順に優先度を付与しているが、この優先度を上述の優先指定とリンクさせてもよい。
[第3実施形態]
次に第3実施形態について説明する。
【0069】
本実施形態の調停装置30は、第1実施形態の調停装置10と一部構成が異なっているだけであるため、構成の相違する部分を中心に説明する。
但し、第1実施形態において、コプロセッサCPは、データの入出力を同じデータバスを用いて行っているが、本実施形態にて使用するコプロセッサCPaは、入力データを保持するための入力レジスタRGIと、出力データを保持するための出力レジスタRGOとが独立して設けられており、両レジスタRGI,RGOへの同時アクセス、即ち、先の処理での処理結果である出力データの読出と、次に処理すべき入力データの書込とを同時に行うことが可能なように構成されている。
【0070】
また、コプロセッサCPへのアクセスを行う場合、各プロセッサP0,P1は、必ず被演算データの書込と演算結果データの読出とを対にして行うものとし、コプロセッサに対してリード信号が単独で供給されることがないものとする。
図9に示すように、本実施形態の調停装置30では、バス切換回路18aが、コプロセッサCPaにアドレス信号ADC,リード信号RDC,ライト信号WRCを供給すると共に、コプロセッサCPaへの入力データWDTと、コプロセッサCPaからの出力データRDTとを、別々のデータバスを介して入出力するように構成されている。また、選択信号SL0,SL1が同時にアクティブにされている場合、リード信号RD及びライト信号WRに従って、個別バスBS0,BS1の一方を入力データWDT用のデータバスに、他方を出力データRDT用のデータバスに同時に接続するよう構成されている。
【0071】
また、処理要求生成回路12aは、ライト信号WRiの立上りエッジにてセットされリード信号RDiの立上りエッジにてリセットされるSRフリップフロップ回路SFiのみからなる。
そして、選択回路14aは、図10に示すように、処理要求信号RQiが解除された場合、これと同時に選択信号SLiが非アクティブになるのではなく、リード信号RD0の送出終了タイミング(立下りエッジ)までアクティブを保持するようにされている(図中の期間X参照)。
【0072】
これにより、処理要求信号RQiの解除時に、他の処理要求信号RQjが設定されていれば、二つの選択信号SLi,SLjが同時にアクティブとなり、プロセッサPiによるコプロセッサCPからのデータの読出と、プロセッサPjによるコプロセッサCPへのデータの書込とが同時に行われることになる。
【0073】
以上説明したように、本実施形態の調停装置30によれば、コプロセッサCPに対して、結果データの読出と、次に処理すべきデータの書込とを同時に行うことができるため、コプロセッサCPの利用効率を向上させることができる。
また、処理要求生成回路12aの構成が簡易なものとなるため、装置の小型化を図ることができる。
【図面の簡単な説明】
【図1】マルチプロセッサシステムの構成を表すブロック図である。
【図2】第1実施形態の調停装置の内部構成を表すブロック図である。
【図3】処理要求信号の設定時における選択回路の動作を表すフローチャートである。
【図4】処理要求信号の解除時における選択回路の動作を表すフローチャートである。
【図5】調停装置各部の動作を表すタイミング図である。
【図6】調停装置各部の動作を表すタイミング図である。
【図7】第2実施形態の調停装置の構成を表すブロック図である。
【図8】優先指定切換処理の内容を表すフローチャートである。
【図9】第3実施形態の調停装置の構成を表すブロック図である。
【図10】調停装置各部の動作を表すタイミング図である。
【符号の説明】
10,20,30…調停装置、12,12a,22…処理要求生成回路、14,14a,24…選択回路、16,26…ホールド制御回路、18,18a,28…バス切換回路、BS0,BS1…個別バス、BSC…共通バス、CP,CPa…コプロセッサ、FF0〜FFn…フリップフロップ回路、INV0〜INVn…反転回路、OR0〜ORn,OR10〜OR1n…論理和回路、P0〜Pn…プロセッサ、RGI…入力レジスタ、RGO…出力レジスタ、SF0〜SFn…SRフリップフロップ回路
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an access right arbitration for arbitrating an access right to an auxiliary data processing device among data processing devices when a plurality of data processing devices share the auxiliary data processing device.StopAbout the installation.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a multiprocessor system in which a plurality of processors (data processing devices) are operated in parallel, an expensive coprocessor (auxiliary data processing device) such as a memory for storing data commonly used by the processors or a floating point arithmetic unit is used. ) May be shared. Hereinafter, such a peripheral device is referred to as a shared peripheral device.
[0003]
In this case, the right to access the shared peripheral device is exclusively given to any one of the processors so that the data is not destroyed by a plurality of processors simultaneously writing to the same shared peripheral device. Arbitration for granting is required.
In such arbitration of access rights, an access request to a shared peripheral device is received from each processor, and when an access request conflicts, a processor to which the access right is given is selected, and an operation is performed on another conflicting processor. An arbitration circuit that sends a hold signal for instructing a halt is provided to perform arbitration by hardware, and a flag that indicates the use state of the shared peripheral device is provided, and each processor has a flag so that access conflict does not occur. A method is known in which arbitration is performed by software by performing an inquiry and an operation of the information.
[0004]
By the way, when a coprocessor (for example, a floating-point arithmetic unit or the like) is used as a shared peripheral device, a series of processes such as writing of data to be operated by the processor, execution of arithmetic processing by the coprocessor, and reading of operation result data by the processor are necessary. It becomes. If new data is written from another processor to the coprocessor during this series of processing, the processing sequence may be disrupted and a correct processing result may not be obtained.
[0005]
However, in the hardware arbitration method, it is general that each time the processor terminates the access to the shared peripheral device once, the access right is once released and the access request is made again. That is, when a coprocessor is used as a shared peripheral device, a mechanism for occupying a single processor with an access right until a series of operations is completed is required.
[0006]
To realize this, for example, JP-A-5-289987 discloses that, when an access request is continuously issued from the same processor within a certain priority period after an access is completed, the processor is continuously given to that processor. An apparatus for controlling access right is disclosed.
[0007]
[Problems to be solved by the invention]
However, in such a device, if the operation time in the coprocessor, that is, the time interval after writing of the data to be operated and before reading of the operation result data becomes long, the above-mentioned priority period is exceeded. There is a problem that the access right of the coprocessor may be transferred to another processor before the operation result data is read.
[0008]
Such a situation can be prevented by making the priority period sufficiently long. However, in this device, in order to transfer the access right to another processor, it is necessary to always wait for the priority period, so that the longer the priority period, the more wasteful waiting time increases. Also, increasing the priority period increases the possibility that a single processor will occupy the access right even when continuous access is not required, and increases the time that another competing processor is held in the hold state. Therefore, there is a problem that the processing efficiency of the entire system is reduced.
[0009]
Further, when such an access right is occupied, it becomes an obstacle when executing a process that requires a real-time property, such as a process that needs to return a response within a certain period of time, and the responsiveness of the process is reduced. There was also the problem of doing.
On the other hand, in the case of arbitration by software, it is possible to cause a specific processor to occupy the access right only for an arbitrary period by operating only the flag. Since processing for the operation is required, there is a problem that the processing efficiency is reduced accordingly.
[0010]
In order to solve the above problems, the present invention can efficiently use an auxiliary data processing device shared by a plurality of data processing devices, and the access right to the auxiliary data processing device is more than necessary by one data processing device. Access rights that will not be occupied for a long timeStopThe purpose is to provide a device.
[0011]
[Means for Solving the Problems]
The access right arbitration according to claim 1, which is an invention for achieving the above object.apparatusThenData processing equipmentFor auxiliary data processorTo write input dataStart sending write signalOr start of reading read signal to read output dataSet for the auxiliary data processor.To read the output dataThe processing request released by the completion of the transmission of the read signal isProcessing request setting means set for each data processing deviceI do. AndBy this processing request setting meansWhen setting a processing request, if a processing request of another data processing device has already been set,Hold setting means,The data processing device corresponding to the newly set processing request is set to the hold state.
[0012]
Furthermore,Hold release means,A non-hold state among the data processing devices to which the processing request is set is regarded as a first data processing device having an access right to the auxiliary data processing device, and the processing request of the first data processing device is released. At this time, if there is another processing request, one of them is selected, and the second data processing device corresponding to the selected processing request is released from the hold state. As a result, the right to access the auxiliary data processing device is transferred from the first data processing device to the second data processing device.
[0013]
In other words, the access right arbitration of the present inventionapparatusThen, a processing request is set by a write signal to the auxiliary data processing device, and the data processing device to which the access right has been granted based on the processing request is transmitted to the data processing device until the transmission of the read signal from the data processing device is completed. During this period, the access right to the auxiliary data processing device is unconditionally occupied.
[0014]
Therefore, according to the present invention, during a series of operations necessary to obtain a normal processing result from the auxiliary data processing device (started by writing input data and finished by reading output data), other data processing is performed. New input data is not written into the auxiliary data processing device by the device, and each data processing device using the auxiliary data processing device obtains a highly reliable processing result (output data) from the auxiliary data processing device. be able to.
[0015]
Further, according to the present invention, it is not necessary to provide a priority period as in the conventional device for determining whether or not to perform continuous access, and the access right is arbitrated in a minimum necessary time. The auxiliary data processing device can be efficiently used for the data processing device. Moreover, since the access right is released each time a series of operations on the auxiliary data processing device is completed, it is possible to reliably prevent a specific data processing device from occupying the access right more than necessary.
[0016]
Further, in the present invention, the arbitration of the access right is performed based on the write signal and the read signal from each data processing device, and it is not necessary to use any other arbitration-dedicated signal., DressThe configuration can be simplified.
[0018]
In the present invention,Processing requestConfigurationMeans areNot only does it start sending write signals,The processing request is set even when the transmission of the read signal starts.ToAccess right arbitration is also performed for a single read signal without a write signal.I can.
[0019]
In addition, the present inventionIn the access right arbitration device, when the processing request of the first data processing device is set within a predetermined period after the cancellation of the processing request of the first data processing device, the hold release prohibiting means is The access right is continuously given to the first data processing device by prohibiting the operation of the hold release means.
[0020]
Therefore, according to the access right arbitration device of the present invention, by sending the write signal to the auxiliary data processing device within a certain period after sending the read signal to the auxiliary data processing device, the auxiliary data The processing device can be used continuously. Note that, unlike the priority period of the conventional device, the fixed period according to the present invention can be set independently of the operation of the auxiliary data processing device. The processing efficiency does not significantly deteriorate.
[0021]
Further, in the access right arbitrating device of the present invention, the first continuous access restricting means includes a data processing device (first data processing device) having an access right and a data processing device designated by the device designating device. If not, the operation of the hold release prohibiting means is prohibited.
In other words, according to the access right arbitration device of the present invention, it is possible to continuously grant access rights to the auxiliary data processing device only to the data processing device designated by the device designation means. By designating a data processing device that is executing (eg, real-time processing) or the like by the device designating unit, the execution state of each data processing device as viewed from the entire system can be optimized.
[0022]
Next, in the access right arbitrating device according to the second aspect, when the access right is continuously given to the first data processing device, the second continuous access restricting means counts the number of times of continuous access. When the value reaches the upper limit, the operation of the hold release prohibition means is prohibited.
[0023]
In other words, according to the access right arbitrating device of the present invention, the number of times the access right is continuously granted to the same data processing device is limited to the above-mentioned upper limit number, so that the access right is occupied more than necessary. Can be reliably prevented.
[0024]
The specified contents of the device specifying means are defined in the claims.3As described, the configuration may be such that it can be changed by the designation changing means. Specifically, for example,4As described, it may be changed periodically according to a preset switching order, or may be arbitrarily changed according to an external setting or an instruction from a predetermined data processing device.
[0025]
In particular, when periodically changing according to a preset switching order, a claim may be made.5As described, the switching order may be changed by the order changing means. In this case, the access right to the auxiliary data processing device can be allocated to each data processing device at various ratios, and the processing state of each data processing device can be flexibly changed according to the time. .
[0026]
Next, claim6The access right arbitrating device described above includes a request priority setting unit that sets the priority of the processing request, and the hold release unit is specified by the request priority specifying unit when there are a plurality of target processing requests. The data processing device corresponding to the processing request having the highest priority is released from the hold state.
[0027]
Therefore, in the access right arbitration device of the present invention, the data processing device to which the access right should be given next can be determined according to the priority of the processing request. Note that the request priority designation means is, for example, a7As described, the priority may be set in accordance with the order in which the processing requests are generated. In addition, a fixed priority may be set corresponding to the data processing device that is the source of the processing request.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a block diagram showing a schematic configuration of a multiprocessor system to which the present invention is applied.
[0031]
As shown in FIG. 1, the multiprocessor system includes a pair of processors P0 and P1 as data processing devices that operate independently, a coprocessor CP as an auxiliary data processing device shared by the processors P0 and P1, and a processor. An arbitration device 10 that performs arbitration for giving one of P0 and P1 an access right to the coprocessor CP is provided. The arbitrating device 10 is connected to each processor Pi via an individual bus BSi (i = 0, 1) and is connected to a coprocessor CP via a common bus BSC.
[0032]
The individual bus BSi includes a data bus for inputting / outputting data DTi to / from each processor Pi, and various controls for receiving an address signal ADi, a read signal RDi, and a write signal WRi supplied by each processor Pi. The common bus BSC supplies an address signal ADC, a read signal RDC, and a write signal WRC to the data bus for inputting and outputting data DBC to and from the coprocessor CP. And various control signal lines.
[0033]
Further, the arbitration device 10 outputs a hold signal HOLDi for instructing each processor Pi to stop the operation, and inputs an operation mode setting signal MOD for designating the operation mode of the arbitration device 10 from outside. It is configured as follows.
In the present embodiment, when the contention of an access request to the coprocessor CP occurs, the priority designation indicating whether or not the continuous grant of the access right to the same processor Pi is permitted is set for each processor by the operation mode setting signal MOD. In addition, when the priority designation is set, a continuous limit designation indicating whether to limit the number of consecutive grants of the access right is set, and when the access right is further limited, an upper limit count Cmax is set.
[0034]
Here, FIG. 2 is a block diagram illustrating an internal configuration of the arbitration device 10.
As shown in FIG. 2, the arbitrating device 10 includes a processing request generation circuit 12 that generates processing request signals RQ0 and RQ1 from read signals RD0 and RD1 and write signals WR0 and WR1, a processing request signal RQ0 and RQ1, and an operation mode setting. Based on the signal MOD, a processor to which an access right is to be given is selected, and a selection signal SL0. A selection circuit 14 for generating SL1, a hold control circuit 16 for setting and releasing the hold signals HOLD0 and HOLD1 based on the processing request signals RQ0 and RQ1 and the selection signals SL0 and SL1, and an individual bus according to the selection signals SL0 and SL1. A bus switching circuit 18 is provided for switching the connection state between BS0 and BS1 and the common bus BSC, that is, for performing switching. However, in the present embodiment, each of the signals WRi, RDi, RQi, SLi, and HOLDi is assumed to be active at a high level and inactive at a low level.
[0035]
Then, the processing request generation circuit 12 generates an OR circuit ORi for generating a logical sum of the write signal WRi and the read signal RDi, an inverting circuit INVi for inverting the read signal RDi, and a rising edge of the output of the OR circuit ORi. An SR flip-flop circuit SFi that is set and reset at the rising edge of the output of the inverting circuit INVi.
[0036]
That is, the processing request generation circuit 12 becomes high level at the transmission start timing (rising edge) of the write signal WRi or the read signal RDi and ends transmission timing of the read signal RDi (falling edge), corresponding to each processor Pi. ), A processing request signal RQi which becomes low level is generated.
[0037]
Next, the hold control circuit 16 latches the signal level of the processing request signal RQ1 at the rising edge of the processing request signal RQ0, and connects the flip-flop circuit FF0 connected so as to be reset when the selection signal SL0 is active; A flip-flop circuit FF1 is connected to latch the signal level of the processing request signal RQ0 at the rising edge of the processing request signal RQ1 and to be reset when the selection signal SL1 is active. Then, the output of each of these flip-flop circuits FFi is output as a hold signal HOLDi.
[0038]
That is, when the processing request signal RQi is set (becomes active) and the other processing request signal RQj (j ≠ i) is not set when the processing request signal RQi is set (becomes active), the hold signal HOLDi is held as inactive. If the other processing request signal RQj has already been set, it changes to active. This causes the processor Pi to transition to the hold state. The hold signal HOLDi set to active returns to inactive when the selection signal SLi becomes active. As a result, the processor Pi is released from the hold state.
[0039]
Further, the bus switching circuit 18 operates to connect the individual bus BSi and the common bus BSC when the selection signal SLi is active, and its configuration is well-known. Is omitted.
Next, the selection circuit 14 will be described. However, since the selection circuit 14 can be easily realized by various methods by a combination of logic circuits, only the operation thereof will be described here in the flowcharts shown in FIGS. 3 and 4 and the timing diagrams shown in FIGS. It is explained along.
[0040]
First, a process that is started when the processor Pi sends out the write signal WRi or the read signal RDi to change the processing request signal RQi to active will be described.
When this processing is started, as shown in FIG. 3, first, in S110, the other processing request signal RQj (that is, j = 1 if i = 0, j = 0 if i = 1) is set. If the other processing request signal RQj is not set, that is, if the other processing request signal RQj is not competing with the other processor Pj, the process proceeds to S120 and the selection signal SLi is activated (▲ in FIG. 5). 1 ▼).
[0041]
By the selection signal SLi, the individual bus BSi and the common bus BSC are connected in the bus switching circuit 18, and the flip-flop circuit FFi of the hold control circuit 16 is held in the reset state (that is, the hold signal HOLDi is inactive). As a result, the access right to the coprocessor CP is given to the processor Pi.
[0042]
In the following S130, the count value C indicating the number of consecutive grants of the access right to the same processor is set to 1, and this processing ends.
On the other hand, if it is determined in S110 that the other processing request signal RQj has been set, that is, if the processor Pj has already sent the write signal WRj or the read signal RDj to the coprocessor CP, Then, the present process is terminated (see (2) in FIG. 5). However, at this time, the hold signal HOLDi becomes active by the operation of the hold control circuit 16, and the processor Pi transits to the hold state.
[0043]
Next, a description will be given of a process which is started when the processing request signal RQi is released (changed to inactive) due to the inactive state of the read signal RDi sent from the processor Pi having the access right.
When this process is started, as shown in FIG. 4, first, in S210, it is determined whether or not the processor Pi corresponding to the canceled process request signal RQi is designated by the mode setting signal MOD as having priority. If not, the process proceeds to S260, where the selection signal SLi is set to inactive (see (3) and (4) in FIG. 5).
[0044]
Thereby, the connection between the individual bus BSi and the common bus BSC in the bus switching circuit 18 is released, and the access right to the coprocessor CP given to the processor Pi is released.
In subsequent S270, it is determined whether or not another processing request signal RQj is set, that is, whether or not there is a processor Pj that has been in a hold state in competition with the processor Pi. If it has not been set (see (4) in FIG. 5), this processing is terminated as it is.
[0045]
On the other hand, if another processing request signal RQj is set, the flow shifts to S280, where the selection signal SLj is activated (see (3) in FIG. 5).
As a result, in the bus switching circuit 18, the individual bus BSj and the common bus BSC are connected, and the operation of the hold control circuit 16 changes the hold signal HOLDj to inactive, thereby releasing the processor Pj from the hold state. Thereby, the access right to the coprocessor CP is given to the processor Pj.
[0046]
In S290, similarly to S130, the count value C indicating the number of continuous accesses is set to 1, and the process ends.
If it is determined in S210 that the processor Pi corresponding to the canceled processing request signal RQi has been designated with priority, the process proceeds to S220.
[0047]
In S220, it is determined whether or not the number of consecutive access right grants is limited by the mode setting signal MOD, and if not, the process proceeds to S240.
In S240, the processing request signal RQi released earlier is monitored for a preset fixed period (one clock period in the present embodiment) TC, and the processing request signal RQi is reset within this fixed period TC. Is determined.
[0048]
If not reset, the process goes to S260 to set and release the selection signals SLi and SLj and clear the count value C as described above (another processing request signal RQj is set). If not (S270-NO), (5) to (5) 'in FIG. 5; if another processing request signal RQj is set (S270-YES), (6) to (6) in FIG. ▼ ').
[0049]
As a result, if another processing request signal RQj is set, the right to access the coprocessor CP is transferred to the processor Pj after a certain period TC elapses after the cancellation of the processing request signal RQi.
If it is determined in step S240 that the processing request signal RQi has been reset, the process proceeds to step S250, where the count value C is incremented, and then the present process is terminated ((7) to (7) in FIG. 6). ▼ '). As a result, the access right to the coprocessor CP is continuously held by the processor Pi regardless of the presence or absence of the processing request signal RQj.
[0050]
If it is determined in step S220 that the number of consecutive access right grants is limited, the flow shifts to step S230 to determine whether the count value C is smaller than a limit value Cmax of the number of consecutive access right grants. to decide.
If the count value C is smaller than the limit value Cmax (C <Cmax), the process proceeds to S240, and performs processing according to the presence or absence of the resetting of the processing request signal RQi as described above (there is resetting). In this case (S240-YES), see (7)-(7) 'in FIG. 6, and when there is no resetting (S240-NO), see (8)-(8)' in FIG. 6).
[0051]
On the other hand, if the count value C has reached the limit value Cmax (S230-NO), the process proceeds to S260 without monitoring the processing request signal RQi, and sets the selection signals SLi and SLj as described above. , Cancellation, and clearing of the count value C (see (9) in FIG. 6).
[0052]
As a result, if another processing request signal RQj is set, the access right to the coprocessor CP is immediately transferred to the processor Pj without waiting for a certain period TC after releasing the processing request signal RQi. become.
In the present embodiment, the processing request generation circuit 12ConfigurationMeans, the hold control circuit 16 is the hold setting means, S270 and S280 are the hold release means, S240 is the hold release prohibiting means, and S220 and S230 are the hold release means.2S210 is the second consecutive access restricting means.1Corresponds to the continuous access restricting means.
[0053]
As described above, in the arbitrating device 10 of the present embodiment, the processing request signal RQi set at the start of the transmission of the write signal WRi or the read signal RDi to the coprocessor CP and released at the end of the transmission of the read signal RDi is A processor Pi is generated for each processor Pi, and based on the processing request signal RQi, a processor Pi to which the access right to the coprocessor CP is to be given is selected, and once the access right is given, the processing request signal RQi is released. During this time, the access right is occupied.
[0054]
Therefore, according to the arbitrating device 10 of the present embodiment, during a series of operations (started by writing input data and finished by reading output data) necessary to obtain a normal processing result from the coprocessor CP, The access right of the coprocessor CP is not transferred to another processor, and the processor Pi having the access right can obtain a highly reliable processing result from the coprocessor CP.
[0055]
According to the arbitrating device 10 of the present embodiment, the access right is unconditionally granted to the same processor while the processing request signal RQi is active, that is, while a series of operations on the coprocessor CP are performed. Therefore, the coprocessor CP can be used more efficiently as compared with a conventional device that determines whether or not continuous access can be performed for each access.
[0056]
In addition, when priority setting is not performed by the operation mode setting signal, the access right is released each time this series of operations is completed, so that the specific processor Pi continues to occupy the access right more than necessary. Can be reliably prevented.
Further, in the present embodiment, even when setting the priority designation, the fixed period TC for determining whether to permit continuous access can be set short regardless of the operation of the coprocessor CP. In this embodiment, it is also possible to limit the upper limit of the number of consecutive grants of the access right, so that the unnecessary occupation of the unnecessary access right by the specific processor Pi can be restricted. It can be reliably prevented.
[0057]
In the present embodiment, priority designation for designating whether or not to allow the processor to continuously grant the access right can be individually set for each processor by the operation mode setting signal MOD. A configuration may be adopted in which only one of the processors Pi is designated with priority, and the processor Pi to be designated with priority is alternately switched every time a predetermined time elapses.
[0058]
In this case, as shown in FIG. 6B, when the processor having the access right is designated with priority ({circle over (7)} in the figure), the access right is continuously granted, and after a certain period of time, the priority is given. When the processing request signal RQi is released after the designation is switched, if another processing request signal RQj is set, the processing request signal RQi is immediately sent to the processor Pj corresponding to the processing request signal RQj without waiting for a certain period TC. Access right is granted ([9] in the figure).
[0059]
However, the switching of the priority designation may be performed by allocating the same time or unequal time, and furthermore, it may be configured such that the ratio of the assigned time of the priority designation can be set by the operation mode setting signal MOD. Good. In this case, the storage device that stores the processor specified with priority corresponds to the device specifying device, and the process of rewriting the contents of the storage device corresponds to the specification changing device.
[Second embodiment]
Next, a second embodiment will be described.
[0060]
In the first embodiment, the arbitration device 10 in the case where one coprocessor CP is shared by two processors P0 and P1 has been described. However, in the present embodiment, one coprocessor CP is composed of n + 1 processors P0 to Pn. The arbitration device 20 when sharing is described below.
[0061]
As shown in FIG. 7, the arbitration device 20 of the present embodiment includes a processing request generation circuit 22, a selection circuit 24, a hold control circuit 26, and a bus switching circuit 28, like the arbitration device 10 of the first embodiment. .
The processing request generation circuit 22 generates the processing request signal RQi from the read signal RDi and the write signal WRi, and the individual circuits are exactly the same as the processing request generation circuit 22 of the first embodiment. n + 1 are provided.
[0062]
The hold control circuit 26 includes a flip-flop circuit FFi for each hold signal HOLDi, latches the signal level applied to the data input terminal at the rising edge of the processing request signal RQi, and is reset by the selection signal SLi. Is exactly the same as the hold control circuit 16 of the first embodiment, but the data input terminal of the flip-flop circuit FFi is connected via the OR circuit OR1i to all the processing request signals RQj ( j ≠ i) is applied. That is, when any one of the processing request signals RQj of the other processors Pj is set when the processing request signal RQi is set, the hold signal HOLDi to the processor Pi becomes active.
[0063]
The bus switching circuit 28 connects the individual buses BSi and the common bus BSC when the selection signal SLi is active, similarly to the bus switching circuit 18 of the first embodiment, except that the number of the individual buses BS0 to BSn is large. Works to connect.
Then, the selection circuit sets RQj in S110 and S270 to all processing requests other than RQi, and in S280, activates the selection signal SLk corresponding to the processing request signal RQk having the highest priority among RQj. It is exactly the same except for thinking as.
[0064]
However, here, the priority of the processing request signal RQ is set higher as the priority is set earlier. The processing for setting the priority of the processing request signal RQ corresponds to the request priority setting means of the present invention.
The arbitration device 20 of the present embodiment configured as described above is completely different from the arbitration device 10 of the first embodiment except that the access right of the coprocessor CP can be arbitrated for n + 1 processors P0 to Pn. Similar effects can be obtained.
[0065]
By the way, as in the arbitration device 20 of the present embodiment, when there are a large number of processors P0 to Pn to be arbitrated, only one of the processors Pi is designated as priority and the priority designation is sequentially switched. it can.
An example of this priority designation switching process (corresponding to the designation change means of the present invention) will be described with reference to the flowchart shown in FIG.
[0066]
That is, in S310, it is determined whether or not a predetermined time that has been set in advance has elapsed, and if it has not elapsed, the process waits by repeatedly executing the same step. After a lapse of the predetermined time, the flow shifts to S320 to increment a designated value p indicating a processor to be preferentially designated. In S330, it is determined whether or not the designated value is larger than n representing the number of processors. If it is larger, the process proceeds to S340 and resets the designated value p to 0, and returns to S310. If it is smaller, the process returns to S310 as it is.
[0067]
Thereby, the processor Pp represented by the newly set p is designated by priority for a predetermined time.
In this case, the priority designation switching is always performed in a fixed order. For example, a table in which a plurality of switching orders are written is prepared in advance, switching is performed according to the table, and the operation mode setting signal MOD is used. The switching order may be configured to be specified, or the switching order may be appropriately changed according to a change in the situation. The process of changing the switching order corresponds to the order changing means of the present invention.
[0068]
Further, in the present embodiment, when the processing request signals RQ0 to RQn compete, priority is given in the order of occurrence, but this priority may be linked to the above-mentioned priority designation.
[Third embodiment]
Next, a third embodiment will be described.
[0069]
The arbitration device 30 of the present embodiment differs from the arbitration device 10 of the first embodiment only in part of the configuration.
However, in the first embodiment, the coprocessor CP performs input / output of data using the same data bus. However, the coprocessor CPa used in the present embodiment has an input register for holding input data. An RGI and an output register RGO for holding output data are provided independently. Simultaneous access to both registers RGI and RGO, that is, reading of output data as a processing result in the previous processing, The configuration is such that writing of input data to be processed next can be performed simultaneously.
[0070]
When accessing the coprocessor CP, each of the processors P0 and P1 always performs writing of the operation target data and reading of the operation result data in a pair, and the read signal is transmitted to the coprocessor independently. Shall not be supplied by
As shown in FIG. 9, in the arbitrating device 30 of the present embodiment, the bus switching circuit 18a supplies the address signal ADC, the read signal RDC, and the write signal WRC to the coprocessor CPa, and inputs the data WDT to the coprocessor CPa. And output data RDT from the coprocessor CPa are input / output via separate data buses. When the selection signals SL0 and SL1 are simultaneously activated, one of the individual buses BS0 and BS1 is used as the data bus for the input data WDT and the other is used as the data bus for the output data RDT in accordance with the read signal RD and the write signal WR. It is configured to connect to the bus simultaneously.
[0071]
Further, the processing request generation circuit 12a includes only an SR flip-flop circuit SFi that is set at the rising edge of the write signal WRi and reset at the rising edge of the read signal RDi.
Then, as shown in FIG. 10, when the processing request signal RQi is released, the selection circuit SLi does not inactivate the selection signal SLi at the same time as this, but the transmission end timing of the read signal RD0 (falling edge). ) (See period X in the figure).
[0072]
Thereby, when another processing request signal RQj is set when the processing request signal RQi is released, the two selection signals SLi and SLj are simultaneously activated, so that the processor Pi reads data from the coprocessor CP, and Writing of data to the coprocessor CP by Pj is performed simultaneously.
[0073]
As described above, according to the arbitration device 30 of the present embodiment, the reading of the result data and the writing of the data to be processed next can be simultaneously performed on the coprocessor CP. CP utilization efficiency can be improved.
Further, since the configuration of the processing request generation circuit 12a is simplified, the size of the apparatus can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a multiprocessor system.
FIG. 2 is a block diagram illustrating an internal configuration of an arbitration device according to the first embodiment.
FIG. 3 is a flowchart illustrating an operation of a selection circuit when a processing request signal is set.
FIG. 4 is a flowchart illustrating an operation of a selection circuit when a processing request signal is released.
FIG. 5 is a timing chart showing the operation of each part of the arbitration device.
FIG. 6 is a timing chart illustrating the operation of each part of the arbitration device.
FIG. 7 is a block diagram illustrating a configuration of an arbitration device according to a second embodiment.
FIG. 8 is a flowchart illustrating the contents of a priority designation switching process.
FIG. 9 is a block diagram illustrating a configuration of an arbitration device according to a third embodiment.
FIG. 10 is a timing chart illustrating the operation of each part of the arbitration device.
[Explanation of symbols]
10, 20, 30 ... arbitration device, 12, 12a, 22 ... processing request generation circuit, 14, 14a, 24 ... selection circuit, 16, 26 ... hold control circuit, 18, 18a, 28 ... bus switching circuit, BS0, BS1 ... Individual bus, BSC... Common bus, CP, CPa... Coprocessor, FF0 to FFn... Flip-flop circuit, INV0 to INVn... ... Input register, RGO ... Output register, SF0 to SFn ... SR flip-flop circuit

Claims (7)

入力データが書き込まれると該入力データに従った処理結果を出力データとして生成する補助データ処理装置を、複数のデータ処理装置にて共有する際に、該データ処理装置間で前記補助データ処理装置へのアクセス権を調停するアクセス権調停装置であって、
前記データ処理装置が前記補助データ処理装置に対して前記入力データを書き込むための書込信号の送出開始、または前記出力データを読み出すための読出信号の送出開始により設定され、前記出力データを読み出すための読出信号の送出完了により解除される処理要求を前記データ処理装置毎に設定する処理要求設定手段と、
該処理要求設定手段による処理要求の設定時に、既に他のデータ処理装置の処理要求が設定されている場合、新たに設定された処理要求に対応するデータ処理装置をホールド状態にするホールド設定手段と、
前記処理要求設定手段により処理要求が設定されたデータ処理装置のうち非ホールド状態にあるものを、前記補助データ処理装置へのアクセス権を有する第1のデータ処理装置として、該第1のデータ処理装置の処理要求の解除時に、他の処理要求が存在すればそのいずれか一つを選択し、該選択した処理要求に対応する第2のデータ処理装置をホールド状態から解放することにより、該第2のデータ処理装置に前記補助データ処理装置へのアクセス権を与えるホールド解放手段と、
前記第1のデータ処理装置の処理要求が解除された後、予め設定された一定期間内に、該第1のデータ処理装置の処理要求が再度設定された場合に、前記ホールド解放手段の動作を禁止するホールド解放禁止手段と、
前記データ処理装置のいずれかを指定する装置指定手段と、
該装置指定手段の指定と前記第1のデータ処理装置とが不一致である場合、前記ホールド解放禁止手段の動作を禁止する第1の連続アクセス制限手段と、
を備えることを特徴とするアクセス権調停装置。
When the auxiliary data processing device that generates a processing result according to the input data as output data when the input data is written is shared by a plurality of data processing devices, the data processing device sends the auxiliary data processing device to the auxiliary data processing device. An access right arbitration device for arbitrating access rights of
The data processing device is set by starting transmission of a write signal for writing the input data to the auxiliary data processing device , or by starting transmission of a read signal for reading the output data, and reading the output data. Processing request setting means for setting a processing request released by the completion of transmission of the read signal for each data processing device ;
When a processing request is set by the processing request setting unit, if a processing request of another data processing device has already been set, a hold setting unit that sets a data processing device corresponding to the newly set processing request to a hold state; ,
A data processing device for which a processing request has been set by the processing request setting means, which is in a non-hold state, is defined as a first data processing device having access right to the auxiliary data processing device, and At the time of canceling the processing request of the apparatus, if there is another processing request, one of the processing requests is selected, and the second data processing apparatus corresponding to the selected processing request is released from the hold state, so that the second processing request is released. Hold release means for giving the data processing device of claim 2 access to the auxiliary data processing device;
After the processing request of the first data processing device is released, if the processing request of the first data processing device is set again within a predetermined period of time, the operation of the hold release unit is performed. Hold release prohibition means to prohibit,
Device specifying means for specifying any of the data processing devices;
First continuous access restricting means for prohibiting the operation of the hold release prohibiting means when the specification of the apparatus specifying means does not match the first data processing apparatus;
An access right arbitration device comprising:
請求項記載のアクセス権調停装置において、
前記第1のデータ処理装置にアクセス権が連続して与えられた場合、その連続回数をカウントし、該カウント値が予め設定された上限回数に達すると、前記ホールド解放禁止手段の動作を禁止する第の連続アクセス制限手段を備えることを特徴とするアクセス権調停装置。
The access right arbitration device according to claim 1 ,
When the access right is continuously given to the first data processing device, the number of times of continuous access is counted, and when the count value reaches a preset upper limit number, the operation of the hold release prohibiting means is prohibited. An access right arbitration device comprising second continuous access restriction means.
前記装置指定手段の指定内容を変更する指定変更手段を備えることを特徴とする請求項1又は請求項2に記載のアクセス権調停装置。 3. The access right arbitration device according to claim 1, further comprising a designation change unit that changes the designation content of the device designation unit. 前記指定変更手段は、予め設定された切換順序に従って前記指定内容を定期的に変更することを特徴とする請求項記載のアクセス権調停装置。4. The access right arbitrating device according to claim 3 , wherein the designation changing means periodically changes the designated contents in accordance with a preset switching order. 前記指定変更手段が前記指定内容の変更に用いる前記切換順序を変更する順序変更手段を備えることを特徴とする請求項記載のアクセス権調停装置。 Access arbitration equipment according to claim 4, characterized in that it comprises a sequence changing means for the override means for changing the switching sequence used in the change of the specified contents. 請求項ないし請求項いずれか記載のアクセス権調停装置において、
前記処理要求の優先度を設定する要求優先度設定手段を備え、
前記ホールド解除手段は、前記処理要求が複数存在する場合、前記要求優先度設定手段にて設定された優先度が最も高い処理要求に対応するデータ処理装置を、ホールド状態から解放することを特徴とするアクセス権調停装置。
In the access arbitration device according to any claims 1 to 5,
Comprising request priority setting means for setting the priority of the processing request,
The hold release unit releases the data processing device corresponding to the processing request with the highest priority set by the request priority setting unit from the hold state when a plurality of the processing requests exist. Access right arbiter.
請求項記載のアクセス権調停装置において、
前記要求優先度設定手段は、前記処理要求の発生順に従って優先度を設定することを特徴とするアクセス権調停装置。
The access right arbitration device according to claim 6 ,
The access right arbitrating device, wherein the request priority setting means sets a priority in accordance with an order in which the processing requests are generated.
JP2000025349A 2000-02-02 2000-02-02 Access right arbitration device Expired - Fee Related JP3596402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000025349A JP3596402B2 (en) 2000-02-02 2000-02-02 Access right arbitration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000025349A JP3596402B2 (en) 2000-02-02 2000-02-02 Access right arbitration device

Publications (2)

Publication Number Publication Date
JP2001216256A JP2001216256A (en) 2001-08-10
JP3596402B2 true JP3596402B2 (en) 2004-12-02

Family

ID=18551216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000025349A Expired - Fee Related JP3596402B2 (en) 2000-02-02 2000-02-02 Access right arbitration device

Country Status (1)

Country Link
JP (1) JP3596402B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4666143B2 (en) * 2005-03-15 2011-04-06 富士ゼロックス株式会社 Data transfer processing device
JP2007264881A (en) * 2006-03-28 2007-10-11 Matsushita Electric Ind Co Ltd Storage device sharing system
JP6036806B2 (en) * 2012-03-30 2016-11-30 日本電気株式会社 Bus access arbitration circuit and bus access arbitration method
JP5884788B2 (en) * 2013-08-08 2016-03-15 株式会社デンソー Microcomputer

Also Published As

Publication number Publication date
JP2001216256A (en) 2001-08-10

Similar Documents

Publication Publication Date Title
US6732242B2 (en) External bus transaction scheduling system
WO2022100372A1 (en) Processor architecture with micro-threading control by hardware-accelerated kernel thread
EP0382469B1 (en) Arbitration of bus access in digital computers
JP3381854B2 (en) Method and apparatus for arbitrating access to shared resources, communication method and apparatus, and microcomputer
EP0166272A2 (en) Processor bus access
JP5498505B2 (en) Resolving contention between data bursts
US7581054B2 (en) Data processing system
US6792497B1 (en) System and method for hardware assisted spinlock
KR101624153B1 (en) Data space arbiter
US10740269B2 (en) Arbitration circuitry
US5649209A (en) Bus coupling information processing system for multiple access to system bus
JP2006185348A (en) Multiprocessor system and lock flag operation method
KR100708096B1 (en) How to adjust the bus system and its execution order
CN114780248B (en) Resource access methods, devices, computer equipment and storage media
JP2008293487A (en) Processor system, bus control method, and semiconductor device
JP3596402B2 (en) Access right arbitration device
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
JP2002163228A (en) External bus deciding technology for multi-core dsp device
JP2007219816A (en) Multiprocessor system
JP3260456B2 (en) Computer system, integrated circuit suitable for it, and requirement selection circuit
CN112306698B (en) A critical section execution method and device in a NUMA system
JP2010092101A (en) Information processor
JP2004326633A (en) Hierarchical memory system
JPH0844662A (en) Information processor
JP2009187327A (en) Processing request arbitration method of information communication method, its system and control program therefor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040525

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040716

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040817

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040830

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100917

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100917

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110917

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110917

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120917

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120917

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130917

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees