JPH0844662A - Information processor - Google Patents
Information processorInfo
- Publication number
- JPH0844662A JPH0844662A JP19357994A JP19357994A JPH0844662A JP H0844662 A JPH0844662 A JP H0844662A JP 19357994 A JP19357994 A JP 19357994A JP 19357994 A JP19357994 A JP 19357994A JP H0844662 A JPH0844662 A JP H0844662A
- Authority
- JP
- Japan
- Prior art keywords
- bus
- command
- request
- queue
- processing
- 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
Links
- 238000012545 processing Methods 0.000 claims abstract description 60
- 230000010365 information processing Effects 0.000 claims description 9
- 238000000034 method Methods 0.000 claims description 6
- 230000015654 memory Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 5
- 230000007423 decrease Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Bus Control (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、共有バスを有効利用す
るようにした情報処理装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing device which effectively uses a shared bus.
【0002】[0002]
【従来の技術】従来、共有バスに複数のバス・マスタ及
びバス・スレーブが接続された情報処理装置において、
各バス・マスタにバス使用の優先順位を設定して、各バ
ス・マスタが共有バスを介してデータ転送する際には、
バス調停手段により、上記優先順位に基づいてバス使用
の調停を行うようにしたものが普及している。2. Description of the Related Art Conventionally, in an information processing apparatus in which a plurality of bus masters and bus slaves are connected to a shared bus,
When setting the priority of bus usage for each bus master and each bus master transferring data via the shared bus,
A bus arbitration unit that arbitrates the use of the bus based on the above-mentioned priority is widely used.
【0003】図6は、バス・マスタ及びバス・スレーブ
が共有バスに接続された状態を示す図である。図6にお
いて、1は共有バス、2はバス調停手段、M1 〜M
3 は、プロセッサ,DMA(Direct Memory Access)コン
トローラ等のバス・マスタ、S1〜S3 は、メモリ,I
/O(入出力)装置等のバス・スレーブである。バス・
マスタM1 〜M3 は、バス・スレーブS1 〜S3 との間
でデータ転送を行うに当たり、プログラムからの要求に
よりバス使用要求を出し、バス使用許可が出たら、共有
バス1を使用する。バス調停手段2は、各バス・マスタ
M1 〜M3 に設定されたバス使用優先順位に基づいて、
各バス・マスタM1 〜M3 間のバス使用要求の調停を行
う。FIG. 6 is a diagram showing a state in which a bus master and a bus slave are connected to a shared bus. In FIG. 6, 1 is a shared bus, 2 is a bus arbitration means, and M 1 to M
3 is a bus master such as a processor and a DMA (Direct Memory Access) controller, and S 1 to S 3 are memories and I
A bus slave such as an / O (input / output) device. bus·
When the masters M 1 to M 3 transfer data to and from the bus slaves S 1 to S 3 , the masters M 1 to M 3 issue a bus use request in response to a program request, and use the shared bus 1 when a bus use permission is issued. . The bus arbitration means 2 is based on the bus use priority set in each of the bus masters M 1 to M 3 .
To arbitrate bus use request among the respective bus masters M 1 ~M 3.
【0004】例えば、各バス・マスタM1 〜M3 のバス
使用優先順位が、バス・マスタM3,M2 ,M1 の順に
高いとすると、バス・マスタM1 とバス・マスタM3 が
バス調停手段2に対して同時にバス使用要求を出したと
き、バス調停手段2は、バス・マスタM3 にバス使用許
可を与える。しかし、既にバス・マスタM1 がバス使用
中であれば、バス・マスタM3 がバス調停手段2に対し
てバス使用要求を出しても、バス・マスタM1 が共有バ
ス1を解放するまでは、バス・マスタM3 にバス使用許
可は与えられない。しかも、バス・マスタM1 が共有バ
ス1を解放するのは、バス・スレーブから返信があった
後で、例えば、データをバス・スレーブから読み出す場
合、バス・スレーブに対して読出コマンドを送った後、
バス・スレーブからデータの返送があった時である。For example, if the bus use priorities of the bus masters M 1 to M 3 are high in the order of the bus masters M 3 , M 2 , and M 1 , the bus masters M 1 and M 3 will When the bus use requests are issued to the bus arbitration means 2 at the same time, the bus arbitration means 2 gives a bus use permission to the bus master M 3 . However, if the bus master M 1 is already using the bus, even if the bus master M 3 issues a bus use request to the bus arbitration means 2, until the bus master M 1 releases the shared bus 1. Does not give the bus master M 3 permission to use the bus. Moreover, the bus master M 1 releases the shared bus 1 after the reply from the bus slave, for example, when data is read from the bus slave, a read command is sent to the bus slave. rear,
This is when the data was returned from the bus slave.
【0005】そのため、バス・マスタM1 によるデータ
読み出しの要求があってから、データを読み出すのに比
較的長い時間を要するバス・スレーブの場合には、その
間、他のバス・マスタM2 ,M3 は共有バス1を使うこ
とができず、共有バス1の使用効率を落としてしまうこ
とになる。特に、高速のマイクロプロセッサの登場によ
り、マイクロプロセッサとメモリとの間でさえその速度
差が問題となる最近の状況では、メモリにおいてもその
ような問題が発生する。Therefore, in the case of a bus slave that requires a relatively long time to read data after a data read request is made by the bus master M 1 , other bus masters M 2 and M are in the meantime. In the case of 3, the shared bus 1 cannot be used, and the use efficiency of the shared bus 1 is reduced. Especially in the recent situation where the speed difference between the microprocessor and the memory becomes a problem due to the advent of the high-speed microprocessor, such a problem also occurs in the memory.
【0006】そこで、特開平3−51943号公報に示
されるように、処理に比較的長い時間を要するバス・ス
レーブには、コマンドの送信とそれに対する返信とを分
割して共有バス1を使用する、分割アクセスを行うよう
にする技術が提案されている。すなわち、バス・マスタ
が分割アクセス対応のバス・スレーブにアクセスする時
は、該バス・スレーブからの返信を待たずに共有バス1
を解放し、該バス・スレーブは、応答できる状態になっ
てからバスの使用権を獲得し、送信元のバス・マスタに
対して返信する。そのようにすれば、応答の遅いバス・
スレーブからの返信を待っている間に、他のバス・マス
タが他のバス・スレーブと通信を行うことができる。Therefore, as disclosed in Japanese Patent Laid-Open No. 3-51943, the shared bus 1 is used for a bus slave which requires a relatively long time for processing by dividing the command transmission and the reply to the command. , A technique for performing divided access has been proposed. That is, when the bus master accesses a bus slave that supports split access, the shared bus 1 does not wait for a reply from the bus slave.
Is released, the bus slave acquires the right to use the bus after it becomes ready to respond, and sends a reply to the bus master of the transmission source. If you do this, a bus with a slow response
Other bus masters can communicate with other bus slaves while waiting for a reply from the slave.
【0007】[0007]
【発明が解決しようとする課題】しかしながら、前記し
た従来の技術では、1つのバス・マスタが分割アクセス
を実行している時、他のバス・マスタは、他のバス・ス
レーブにはアクセスできても、分割アクセスされている
バス・スレーブにはアクセスできない。そのため、シス
テム内に遅いI/O装置等が複数ある場合には、待たさ
れるバス・マスタの数が多くなって、バスの使用効率が
低下するという問題点があった。特に、マイクロプロセ
ッサを複数用いた所謂マルチプロセッサ環境では、その
問題がより一層大きくなる。本発明は、以上のような問
題点を解決することを課題とするものである。However, in the above-described conventional technique, when one bus master is executing a divided access, another bus master cannot access another bus slave. However, the bus / slave that is being dividedly accessed cannot be accessed. Therefore, when there are a plurality of slow I / O devices in the system, there is a problem that the number of bus masters to be kept waiting increases and the bus usage efficiency decreases. In particular, in a so-called multiprocessor environment using a plurality of microprocessors, the problem becomes more serious. An object of the present invention is to solve the above problems.
【0008】[0008]
【課題を解決するための手段】前記課題を解決するた
め、本発明では、処理を要求する複数個のバス・マスタ
と、バス・マスタに要求された処理を実行するバス・ス
レーブと、それらバス・マスタ,バス・スレーブを共通
に接続する共有バスと、該共有バスの使用権を調停する
バス調停手段とを有する情報処理装置において、前記バ
ス・マスタは、バス・スレーブに処理を要求する際に、
共有バスの使用要求を前記バス調停手段に対して発行す
るバス使用要求手段と、共有バスの使用権を獲得後、処
理を要求するコマンドをバス・スレーブに対して発行
し、共有バスを解放するコマンド発行手段とを具え、前
記バス・スレーブは、受信したコマンドを溜めておくキ
ューと、共有バスから受信した自己宛のコマンドを前記
キューに入れ、また、該キューに溜められたコマンドの
中から1つを選択して処理実行部に送るキュー管理手段
と、処理実行部の処理終了後に、処理要求元のバス・マ
スタへの返信コマンドを作成するコマンド発行手段と、
処理要求元のバス・マスタに返信コマンドを送るため、
前記バス調停手段に対して共有バス使用要求を発行する
バス使用要求手段とを具えることとした。また、前記バ
ス・マスタは、バス・スレーブに処理を要求する際に、
リクエスト・レベルを指定してコマンドを発行し、前記
キュー管理手段は、前記キュー内のコマンドの内、複数
連続したリード要求コマンドの順番を、前記リクエスト
・レベルが高い順になるように並べ替えることとした。
そしてまた、前記バス・スレーブは、前記キュー管理手
段が前記キューにコマンドを入れる際にキューが満杯に
なっている場合は、そのことを示すビジー・コマンドを
全てのバス・マスタに対して送信することとした。さら
にまた、前記バス・スレーブは、前記キューに溜まった
コマンド数が多くなるのに従って、共有バス使用要求の
リクエスト・レベルを高くすることとした。In order to solve the above-mentioned problems, according to the present invention, a plurality of bus masters requesting processing, a bus slave executing the processing requested by the bus master, and those buses. In an information processing device having a shared bus that commonly connects a master and a bus / slave, and a bus arbitration unit that arbitrates the right to use the shared bus, when the bus master requests the bus slave for processing. To
A bus use request means for issuing a shared bus use request to the bus arbitration means and a command for requesting processing to the bus slave after acquiring the shared bus use right and releasing the shared bus. The bus / slave comprises a queue for storing received commands and a command for self addressed received from a shared bus in the queue, and a command is issued from the commands stored in the queue. Queue management means for selecting one and sending it to the processing execution portion, and command issuing means for creating a reply command to the processing request source bus master after the processing execution portion has completed processing,
To send a reply command to the processing request source bus master,
A bus use request unit for issuing a shared bus use request to the bus arbitration unit is provided. Further, the bus master, when requesting processing from the bus slave,
The command is issued by designating a request level, and the queue management unit rearranges the order of a plurality of consecutive read request commands among the commands in the queue so that the request level becomes higher. did.
Further, when the queue management unit puts a command in the queue, if the queue is full, the bus slave sends a busy command indicating that to all the bus masters. I decided. Furthermore, the bus slave increases the request level of the shared bus use request as the number of commands accumulated in the queue increases.
【0009】[0009]
【作 用】バス・スレーブでは、共有バスから自己宛
のコマンドを受信したら、キュー管理手段により、それ
をキューに格納する。また、キュー管理手段は、該キュ
ーに溜められたコマンドの中から1つを選択して処理実
行部に送る。処理実行部の処理が終了したら、コマンド
発行手段は、処理要求元のバス・マスタへの返信コマン
ドを作成する。また、バス使用要求手段は、処理要求元
のバス・マスタに返信コマンドを送るため、バス調停手
段に対して共有バスの使用要求を発行する。[Operation] When a bus slave receives a command addressed to itself from the shared bus, the queue management means stores it in the queue. Also, the queue management means selects one from the commands stored in the queue and sends it to the processing execution unit. When the processing of the processing execution unit is completed, the command issuing means creates a reply command to the bus master that issued the processing request. Further, the bus use request means issues a request to use the shared bus to the bus arbitration means in order to send a reply command to the bus master which is the processing request source.
【0010】そのように、バス・スレーブにコマンドを
溜めておくキューを設けたため、あるバス・マスタから
の要求により処理を行っているバス・スレーブでも、他
のバス・マスタから処理要求を受け付けることができ
る。その結果、バス・マスタは、バス・スレーブの処理
が終わるまで待たされるということがなくなり、バスの
使用効率が低下するということはなくなる。As described above, since the queue for storing the commands is provided in the bus slave, even a bus slave which is processing according to a request from a certain bus master can receive a processing request from another bus master. You can As a result, the bus master does not have to wait until the processing of the bus slave is completed, and the efficiency of use of the bus does not decrease.
【0011】また、前記バス・マスタは、リクエスト・
レベルを含んだ処理要求コマンドを発行し、前記キュー
管理手段は、前記キュー内のコマンドの内、複数連続し
たリード要求コマンドの順番を、前記リクエスト・レベ
ルが高い順になるように並べ替える。そのため、緊急に
処理したいような状況になったとき、高いリクエスト・
レベルを付けてコマンドを発行することにより、該処理
を早く実行させることができるというように、コマンド
処理に柔軟性を持たせることができる。Further, the bus master requests
A processing request command including a level is issued, and the queue management unit rearranges the order of a plurality of consecutive read request commands among the commands in the queue so that the request level becomes higher. Therefore, when you have a situation where you want to handle it urgently, high request
By issuing a command with a level, it is possible to give flexibility to the command processing such that the processing can be executed earlier.
【0012】そしてまた、前記キュー管理手段が、前記
キューにコマンドを入れる際に、キューが満杯になって
いる場合は、ビジー・コマンドを全てのバス・マスタに
対して送信するようにすれば、バス・マスタが、ビジー
なバス・スレーブに対して、むやみにコマンドを発行し
てバス・トラフィックを増やすのを防止することができ
る。Further, if the queue management means sends a busy command to all bus masters when the queue is full when a command is put into the queue, It is possible to prevent the bus master from issuing commands to busy bus slaves unnecessarily to increase bus traffic.
【0013】さらにまた、前記キューに溜まったコマン
ド数が多くなるのに従って、バス使用のリクエスト・レ
ベルを高くするようにすれば、多数のコマンドが溜まっ
たバス・スレーブでは、優先的にバスの使用ができて処
理が早く進み、その分キューに溜まるコマンド数が減少
し、キューの段数を少なくすることができる。Furthermore, as the number of commands accumulated in the queue increases, the request level of bus usage is increased so that the bus slave with many commands preferentially uses the bus. As a result, the processing proceeds faster, the number of commands accumulated in the queue is reduced accordingly, and the number of stages in the queue can be reduced.
【0014】[0014]
【実施例】以下、本発明の実施例を図面に基づいて詳細
に説明する。図1は、バス・マスタとバス・スレーブの
概略の構成を示す図であり、その内、図1(イ)が、バ
ス・マスタの概略の構成を示し、図1(ロ)が、バス・
スレーブの概略の構成を示している。符号1,M1 ,S
1 は、図6のものに対応し、3は命令実行手段、4,1
0はバス使用要求手段、5,11はコマンド発行手段、
6,7はバス監視手段、8はキュー、9はキュー管理手
段、12はメモリである。Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a diagram showing a schematic configuration of a bus master and a bus slave. Among them, FIG. 1 (a) shows a schematic configuration of a bus master, and FIG.
The schematic structure of a slave is shown. Reference numerals 1, M 1 , S
1 corresponds to that of FIG. 6, 3 is instruction executing means, 4, 1
0 is bus use requesting means, 5 and 11 are command issuing means,
Reference numerals 6 and 7 are bus monitoring means, 8 is a queue, 9 is a queue management means, and 12 is a memory.
【0015】バス・マスタM1 においては、命令実行手
段3は、プログラムを解釈・実行し、バス・スレーブS
1 〜S3 にアクセスする必要がある時には、処理の緊急
度に応じてリクエスト・レベルを指定して、バス使用要
求手段4に共有バス1の使用権獲得を依頼し、コマンド
発行手段5にコマンドの生成を依頼する。バス使用要求
手段4は、命令実行手段3から共有バス1の使用権獲得
を依頼されたとき、指定されたリクエスト・レベルでバ
ス使用要求信号を発行し、バス調停手段2(図6参照)
からバス使用許可が得られた時には、それをコマンド発
行手段5に通知する。コマンド発行手段5は、命令実行
手段3からのコマンド生成依頼を受けてコマンドを生成
する。また、バス使用要求手段4からコマンド発行依頼
を受けた時に、生成したコマンドを共有バス1上に発行
する。バス監視手段6は、常に共有バス1を監視してい
て、共有バス1を流れるコマンドが自己宛であると判断
した時には、それを取得して、それを命令実行手段3に
送る。In the bus master M 1 , the instruction executing means 3 interprets and executes the program, and the bus slave S
When it is necessary to access 1 to S 3 , the request level is specified according to the urgency of the processing, the bus use requesting means 4 is requested to acquire the right to use the shared bus 1, and the command issuing means 5 is commanded. Request the generation of. When the instruction execution means 3 requests the bus use request means 4 to acquire the use right of the shared bus 1, the bus use request means 4 issues a bus use request signal at a designated request level, and the bus arbitration means 2 (see FIG. 6).
When the bus use permission is obtained from, the command issuing means 5 is notified of it. The command issuing means 5 receives a command generation request from the instruction executing means 3 and generates a command. When a command issuance request is received from the bus use request means 4, the generated command is issued on the shared bus 1. The bus monitoring unit 6 constantly monitors the shared bus 1, and when it determines that the command flowing through the shared bus 1 is addressed to itself, acquires it and sends it to the instruction execution unit 3.
【0016】また、バス・スレーブS1 においては、バ
ス監視手段7は、常に共有バス1を監視していて、共有
バス1を流れるコマンドが自己宛であると判断した時に
は、それを取得して、それをキュー管理手段9に伝え
る。キュー管理手段9は、バス監視手段7が取得したコ
マンドをキュー8に入れたり、リード/ライトの処理要
求コマンドをキュー8から取り出して、処理実行部とし
てのメモリ12に発行したりする。また、メモリ12か
らの処理終了を受けて、処理要求元のバス・マスタへ返
信コマンドを返すため、バス使用要求手段10にバス使
用要求の発行を依頼したり、コマンド発行手段11にメ
ッセージを伝えて返信コマンドの生成を依頼したりす
る。そしてまた、キュー管理手段9は、キュー8内のコ
マンドの内、複数連続したリード要求コマンドの順番
を、前記リクエスト・レベルが高い順になるように並べ
替えることも行う。さらにまた、キュー管理手段9は、
キュー8にコマンドを入れる際に、キュー8が既に満杯
になっている場合は、ビジー・コマンドをブロードキャ
ストするように、コマンド発行手段11に依頼する。Further, in the bus slave S 1 , the bus monitoring means 7 constantly monitors the shared bus 1, and when it judges that the command flowing through the shared bus 1 is addressed to itself, acquires it. , And informs it to the queue management means 9. The queue management unit 9 puts the command acquired by the bus monitoring unit 7 into the queue 8 or takes out the read / write processing request command from the queue 8 and issues it to the memory 12 as a processing execution unit. Further, in response to the completion of the processing from the memory 12, a reply command is returned to the bus master which is the processing request source. Request to generate a reply command. Further, the queue management means 9 also rearranges the order of a plurality of consecutive read request commands among the commands in the queue 8 so that the request level becomes higher. Furthermore, the queue management means 9
When the command is put in the queue 8, if the queue 8 is already full, the command issuing means 11 is requested to broadcast the busy command.
【0017】バス使用要求手段10は、キュー管理手段
9から共有バス1の使用権獲得依頼を受けた時には、バ
ス使用要求信号を発行し、バス調停手段2(図6参照)
から使用許可が得られた時には、それをコマンド発行手
段11に伝える。その際、バス使用要求信号は、キュー
8に溜まったコマンド数が多くなるに従って高いリクエ
スト・レベルを付けて発行する。コマンド発行手段11
は、キュー管理手段9からのコマンド生成依頼を受けて
コマンドを生成する。また、バス使用要求手段10から
コマンド発行依頼を受けた時に、生成したコマンドを共
有バス1上に発行する。メモリ12は、キュー管理手段
9からリード/ライトの要求を受けた時にはそれを実行
し、要求された処理が完了した時には、データと共にそ
のことをキュー管理手段9に伝える。The bus use request means 10 issues a bus use request signal when receiving a request for acquiring the right to use the shared bus 1 from the queue management means 9, and the bus arbitration means 2 (see FIG. 6).
When the use permission is obtained from the command issuing unit 11, the command issuing unit 11 is notified of the use permission. At this time, the bus use request signal is issued with a higher request level as the number of commands accumulated in the queue 8 increases. Command issuing means 11
Receives a command generation request from the queue management means 9 and generates a command. Further, when a command issuance request is received from the bus use request means 10, the generated command is issued on the shared bus 1. When the memory 12 receives a read / write request from the queue management means 9, it executes the request, and when the requested processing is completed, it notifies the queue management means 9 together with the data.
【0018】なお、バス調停手段2は、バス・マスタM
1 〜M3 及びバス・スレーブS1 〜S3 からのバス使用
要求の調停を、上記リクエスト・レベルに基づいて行
う。すなわち、リクエスト・レベルが高いものほど、優
先的に共有バス1の使用を許可する。The bus arbitration means 2 is a bus master M.
Arbitration of bus use requests from 1 to M 3 and bus slaves S 1 to S 3 is performed based on the above request level. That is, the higher the request level, the more preferentially the use of the shared bus 1 is permitted.
【0019】図2は、コマンド・フォーマットを示す図
である。図2に示すように、コマンドは、自己のID
(識別子)を書き込むフィールド,相手のIDを書き込
むフィールド,リード/ライトの別を書き込むフィール
ド,リクエスト・レベルを書き込むフィールド,相手の
アドレスを書き込むフィールド及びメッセージを書き込
むフィールドを有している。バス・マスタから発行され
るコマンドのメッセージ・フィールドには、ライトの時
は、ライトすべきデータが書き込まれ、リードの時に
は、何も書き込まれない。また、バス・スレーブから発
行される返信コマンドのメッセージ・フィールドには、
リードの時には、メモリ12から読み出したデータまた
はエラー・メッセージを書き込む。また、ライトの時
は、エラーの時以外はコマンドを発行しない。FIG. 2 is a diagram showing a command format. As shown in FIG. 2, the command is its own ID.
It has a field for writing (identifier), a field for writing the ID of the other party, a field for writing read / write, a field for writing the request level, a field for writing the address of the other party, and a field for writing the message. In the message field of the command issued from the bus master, the data to be written is written when writing, and nothing is written when reading. Also, in the message field of the reply command issued from the bus slave,
At the time of reading, the data or error message read from the memory 12 is written. When writing, no command is issued except when an error occurs.
【0020】図3は、キューの内容の一例を示す図であ
る。キュー8には、受信したコマンドがそのままの形で
入っており、図3に示すもののように、例えば、8段の
深さを持っているキューであれば、キューの第1段
は、次にメモリ12に送られるコマンドが入っていると
ころであり、キューの第8段には、最も後にサービス
されるコマンドが入るところである。さらに、このキュ
ー8には、2つのポインタが付いていて、その内の1つ
は、現在、キューのどこまでコマンドが入っているかを
示すカレント・ポインタで、もう1つは、最も後に入っ
たライト・コマンドの位置を示すライト・ポインタであ
る。FIG. 3 is a diagram showing an example of the contents of the queue. The received command is stored in the queue 8 as it is. For example, if the queue has a depth of 8 stages as shown in FIG. 3, the first stage of the queue is It is where the commands to be sent to memory 12 are stored, and the eighth stage of the queue is where the commands to be serviced most recently are stored. In addition, this queue 8 has two pointers, one of which is the current pointer that indicates how many commands are currently in the queue, and the other is the most recently entered write. A write pointer indicating the position of the command.
【0021】次に、本発明の動作を説明する。命令実行
手段3は、応用プログラムからメモリ12へのアクセス
が要求された時には、リクエスト・レベルを指定して、
バス使用要求手段4に共有バス1の使用権獲得を依頼
し、コマンド発行手段5にコマンドの生成を依頼する。
コマンド発行手段5は、命令実行手段3からのコマンド
生成依頼を受けて、前記リクエスト・レベルを含めてコ
マンドを生成する。そして、バス使用要求手段4からコ
マンド発行依頼を受けて、生成したコマンドを共有バス
1上に発行する。コマンド発行後は、バス・マスタから
の返信を待つことなく、バスを解放する。Next, the operation of the present invention will be described. The instruction executing means 3 specifies a request level when the application program requests access to the memory 12,
The bus usage request means 4 is requested to acquire the usage right of the shared bus 1, and the command issuing means 5 is requested to generate a command.
The command issuing means 5 receives a command generation request from the instruction executing means 3 and generates a command including the request level. Then, upon receiving a command issuance request from the bus use request means 4, the generated command is issued on the shared bus 1. After issuing the command, the bus is released without waiting for a reply from the bus master.
【0022】一方、バス・スレーブ側では、バス監視手
段7が自己宛のコマンドを受信したら、それをキュー管
理手段9に通知する。該通知を受けたキュー管理手段9
では、次のような処理を行う。図4は、キュー管理手段
のコマンド格納処理を示すフローチャートである。 ステップ1…バス監視手段7が、バス・マスタM1 〜M
3 からコマンドを受信したか否かを判別する。 ステップ2…受信したら、キュー8の第1段から第8
段までコマンドが入っていて、キュー8が満杯になっ
ているか否かを調べる。その判別は、カレント・ポイン
タの値が“8”になっているか否かで行うことができ
る。 ステップ3…満杯であれば、ビジー・コマンドの発行を
コマンド発行手段11に依頼する。その際、図2に示す
コマンドの相手のIDのフィールドに、共有バス1上の
全てのバス・マスタへの送信を意味する“0”を入れ、
メッセージ・フィールドにビジーである旨のメッセージ
を入れて送出する。On the other hand, on the bus / slave side, when the bus monitoring means 7 receives a command addressed to itself, it notifies the queue management means 9 of it. Queue management means 9 that has received the notification
Then, the following processing is performed. FIG. 4 is a flowchart showing the command storing process of the queue managing means. Step 1 ... bus monitor means 7, the bus master M 1 ~M
Determine whether or not the command is received from 3 . Step 2 ... When received, queues 1 to 8
It is checked whether or not the queue 8 is full because the command is entered up to the step. The determination can be made based on whether or not the value of the current pointer is "8". Step 3: If the command is full, the command issuing means 11 is requested to issue a busy command. At that time, "0" which means transmission to all the bus masters on the shared bus 1 is put in the field of the ID of the partner of the command shown in FIG.
Send a message indicating that it is busy in the message field.
【0023】ステップ4…ステップ2で満杯でなけれ
ば、カレント・ポインタをインクリメントする。 ステップ5…カレント・ポインタが指す位置に受信した
コマンドをそのままの形で入れる。 ステップ6…受信したコマンドがバス・スレーブへのデ
ータ書き込みを要求するライト・コマンドであるか否か
を調べる。 ステップ7…ライト・コマンドであったら、ライト・ポ
インタにカレント・ポインタの値を代入する。 ステップ8…ステップ6でライト・コマンドではなく、
バス・スレーブからのデータ読み出しを要求するリード
・コマンドであったら、キュー8のカレント・ポインタ
からライト・ポインタ+1迄にあるリード・コマンド
を、リクエスト・レベルが高いものほど低位段になるよ
うに並べ替える。Step 4 ... If it is not full in Step 2, the current pointer is incremented. Step 5: The received command is inserted as it is at the position pointed to by the current pointer. Step 6 ... Checks whether the received command is a write command requesting data write to the bus slave. Step 7 ... If the command is a write command, the value of the current pointer is assigned to the write pointer. Step 8 ... Not the write command in Step 6,
If it is a read command requesting data read from the bus slave, the read commands from the current pointer to the write pointer + 1 of the queue 8 are arranged so that the higher the request level, the lower the rank. Change.
【0024】このようにして、キュー8内のリード・コ
マンドを、リクエスト・レベルが高いものほど低位段に
なるように並べ替えるため、緊急性を要するリード・コ
マンドはリクエスト・レベルを高くすることにより、早
く実行させることができる。ただ、そのような並べ替え
を行うのは、キュー8のカレント・ポインタからライト
・ポインタ+1迄にあるリード・コマンドだけとする。
その理由は、ライト・コマンドを含めて順番を並べ替え
てしまうと、例えば、あるメモリへのデータ書き込みと
読み出しの順序が入れ代わってしまって、誤ったデータ
を読み出す可能性があるからである。In this way, the read commands in the queue 8 are rearranged so that the higher the request level is, the lower the rank is. Therefore, the read commands that are urgent need to be increased by increasing the request level. , Can be run faster. However, such rearrangement is performed only for the read commands from the current pointer of the queue 8 to the write pointer + 1.
The reason is that if the order is rearranged including the write command, for example, the order of writing data to and reading from a certain memory may be interchanged, and erroneous data may be read.
【0025】図5は、キュー管理手段のコマンド実行処
理を示すフローチャートである。 ステップ1…キュー8にコマンドが何も入っておらず空
になっているか否かを調べる。その判別は、カレント・
ポインタの値が“0”になっているか否かで行うことが
できる。 ステップ2…空でなければ、キューの第1段に入って
いるコマンドをメモリ12に実行させる。 ステップ3…メモリ12の処理が終了したか否かを判別
する。FIG. 5 is a flow chart showing the command execution processing of the queue management means. Step 1 ... Checks whether there is no command in the queue 8 and it is empty. The determination is the current
It can be performed by checking whether the value of the pointer is "0". Step 2 ... If not empty, the memory 12 executes the command in the first stage of the queue. Step 3 ... It is determined whether or not the processing of the memory 12 is completed.
【0026】ステップ4…終了したら、処理要求元のバ
ス・マスタへの返信コマンドの生成をコマンド発行手段
11に依頼する。この返信コマンドは、図2のものと同
様なフォーマットを持ち、自己のIDのフィールドに当
該バス・スレーブのID、相手のIDのフィールドに処
理要求元のバス・マスタのIDを書き込み、リード/ラ
イトの別を書き込むフィールド,リクエスト・レベルを
書き込むフィールド,相手のアドレスを書き込むフィー
ルドは空欄とする。また、メッセージ・フィールドに
は、要求された処理がリードであった時には、メモリ1
2から読み出したデータまたはエラー・メッセージを書
き込む。また、ライトであった時は、書込完了メッセー
ジまたはエラー・メッセージを書き込む。Step 4 ... Upon completion, the command issuing means 11 is requested to generate a reply command to the bus master as the processing request source. This reply command has a format similar to that of FIG. 2, and writes the ID of the bus slave in the field of its own ID, the ID of the bus master of the processing request source in the field of the other party, and read / write. The fields for writing other information, the field for writing the request level, and the field for writing the other party's address are blank. Also, the message field contains the memory 1 when the requested process is read.
Write the data or error message read from 2. If it is a write, a write completion message or error message is written.
【0027】ステップ5…カレント・ポインタの値をリ
クエスト・レベルとして、バス使用要求手段10に対し
て、共有バス1の使用要求を行うように処理を依頼す
る。 ステップ6…カレント・ポインタ及びライト・ポインタ
の値をそれぞれ−1する。 ステップ7…キュー8内にある全てのコマンドをキュー
の第1段の方向へ移動させる。 ステップ8…ビジー解除コマンドの発行をコマンド発行
手段11に依頼する。その際、図2に示すコマンドの相
手のIDのフィールドに、共有バス1上の全てのバス・
マスタへの送信を意味する“0”を入れ、メッセージ・
フィールドにビジー解除のメッセージを入れて送出す
る。なお、この実施例では、処理を簡略化するため、ビ
ジー・コマンドが発行された後であるか否かに関係な
く、1つのコマンドの処理が実行される毎にビジー解除
コマンドを発行するようにしたが、ビジー・コマンドが
発行された後である場合だけビジー解除コマンドを発行
するようにしてもよい。Step 5 ... Using the value of the current pointer as the request level, the bus use request means 10 is requested to perform a process for making a request for use of the shared bus 1. Step 6 ... Decrements the values of the current pointer and the write pointer by -1. Step 7 ... Move all the commands in the queue 8 toward the first stage of the queue. Step 8: The command issuing means 11 is requested to issue the busy cancellation command. At this time, all the buses on the shared bus 1 are set in the ID field of the other party of the command shown in FIG.
Enter "0", which means to send to the master,
Send a busy release message in the field. In this embodiment, in order to simplify the processing, regardless of whether or not the busy command is issued, the busy release command is issued every time the processing of one command is executed. However, the busy release command may be issued only after the busy command is issued.
【0028】バス使用要求手段10は、キュー管理手段
9から共有バス1の使用要求を行うように依頼を受けた
時には、バス使用要求信号を発行し、その結果、バス調
停手段から使用許可が得られたら、それをコマンド発行
手段11に伝える。コマンド発行手段11は、キュー管
理手段9からのコマンド生成依頼を受けて返信コマンド
を生成し、バス使用要求手段10から上記通知を受けた
時に、生成した返信コマンドを共有バス1上に発行す
る。When the bus use request means 10 receives a request from the queue management means 9 to make a use request for the shared bus 1, it issues a bus use request signal, and as a result, a use permission is obtained from the bus arbitration means. When it is given, it is transmitted to the command issuing means 11. The command issuing means 11 receives a command generation request from the queue managing means 9, generates a reply command, and when the bus use request means 10 receives the above notification, issues the generated reply command on the shared bus 1.
【0029】なお、上記実施例では、バス・スレーブS
1 の処理実行部がメモリ12である場合で示したが、本
発明は、それに限定されずI/O装置等の他のバス・ス
レーブでも同様に適用可能である。In the above embodiment, the bus slave S
Although the case where the processing execution unit 1 is the memory 12 is shown, the present invention is not limited to this and is similarly applicable to other bus slaves such as I / O devices.
【0030】[0030]
【発明の効果】以上述べた如く、本発明の情報処理装置
によれば、バス・スレーブにコマンドを溜めておくキュ
ーを設けたため、あるバス・マスタからの要求により処
理を行っているバス・スレーブでも、他のバス・マスタ
から処理要求を受け付けることができるようになった。
その結果、バス・マスタは、バス・スレーブの処理が終
わるまで待たされるということがなくなり、バスの使用
効率が低下するということはなくなった。As described above, according to the information processing apparatus of the present invention, since the bus slave is provided with the queue for storing the commands, the bus slave performing the processing in response to a request from a certain bus master. However, it has become possible to receive processing requests from other bus masters.
As a result, the bus master does not have to wait until the processing of the bus slave is completed, and the efficiency of use of the bus no longer decreases.
【0031】また、前記バス・マスタは、リクエスト・
レベルを含んだ処理要求コマンドを発行し、前記キュー
管理手段は、前記キュー内で複数のリード要求コマンド
が連続した部分の順番を、前記リクエスト・レベルが高
い順になるように並べ替える。そのため、緊急に処理し
たいような状況になったとき、高いリクエスト・レベル
を付けてコマンドを発行することにより、該処理を早く
実行させることができるというように、コマンド処理に
柔軟性を持たせるられるようになった。Further, the bus master requests
The processing request command including the level is issued, and the queue management unit rearranges the order of the portion in which the plurality of read request commands are consecutive in the queue so that the request level becomes higher. Therefore, when an emergency situation arises, command processing can be made flexible by issuing a command with a high request level so that the command can be executed quickly. It became so.
【0032】そしてまた、前記キュー管理手段が、前記
キューにコマンドを入れる際に、キューが満杯になって
いる場合は、ビジー・コマンドをブロードキャストす
る。そのため、バス・マスタが、ビジーなバス・スレー
ブに対して、むやみにコマンドを発行してバス・トラフ
ィックを増やすのを防止できるようになった。Further, when the queue management means puts a command in the queue, if the queue is full, it broadcasts a busy command. Therefore, it becomes possible to prevent the bus master from issuing a command to the busy bus slaves unnecessarily to increase the bus traffic.
【0033】さらにまた、前記キューに溜まったコマン
ド数が多くなるのに従って、バス使用のリクエスト・レ
ベルを高くする。そのため、多数のコマンドが溜まった
バス・スレーブでは、優先的にバスの使用ができて処理
が早く進み、その分キューに溜まるコマンド数が減少
し、キューの段数が少なくても済むようになった。Furthermore, as the number of commands accumulated in the queue increases, the request level for bus usage is increased. Therefore, in a bus / slave where a large number of commands have accumulated, the bus can be used preferentially and processing will proceed faster, the number of commands accumulated in the queue will decrease correspondingly, and the number of queue stages will also be reduced. .
【図1】 バス・マスタとバス・スレーブの概略の構成
を示す図FIG. 1 is a diagram showing a schematic configuration of a bus master and a bus slave.
【図2】 コマンド・フォーマットを示す図[Figure 2] Diagram showing command format
【図3】 キューの内容の一例を示す図FIG. 3 is a diagram showing an example of the contents of a queue.
【図4】 キュー管理手段のコマンド格納処理を示すフ
ローチャートFIG. 4 is a flowchart showing a command storing process of a queue managing means.
【図5】 キュー管理手段のコマンド実行処理を示すフ
ローチャートFIG. 5 is a flowchart showing command execution processing of queue management means.
【図6】 バス・マスタ及びバス・スレーブが共有バス
に接続された状態を示す図FIG. 6 is a diagram showing a state in which a bus master and a bus slave are connected to a shared bus.
1…共有バス、2…バス調停手段、3…命令実行手段、
4,10…バス使用要求手段、5,11…コマンド発行
手段、6,7…バス監視手段、8…キュー、9…キュー
管理手段、12…メモリ、M1 〜M3 …バス・マスタ、
S1 〜S3 …バス・スレーブ1 ... Shared bus, 2 ... Bus arbitration means, 3 ... Instruction execution means,
4,10 ... bus request means, 5,11 ... command issuing unit, 6,7 ... bus monitor means, 8 ... queues, 9 ... queue managing unit, 12 ... memory, M 1 ~M 3 ... bus master,
S 1 ~S 3 ... bus slave
Claims (4)
と、バス・マスタに要求された処理を実行するバス・ス
レーブと、それらバス・マスタ,バス・スレーブを共通
に接続する共有バスと、該共有バスの使用権を調停する
バス調停手段とを有する情報処理装置において、前記バ
ス・マスタは、バス・スレーブに処理を要求する際に、
共有バスの使用要求を前記バス調停手段に対して発行す
るバス使用要求手段と、共有バスの使用権を獲得後、処
理を要求するコマンドをバス・スレーブに対して発行
し、共有バスを解放するコマンド発行手段とを具え、前
記バス・スレーブは、受信したコマンドを溜めておくキ
ューと、共有バスから受信した自己宛のコマンドを前記
キューに入れ、また、該キューに溜められたコマンドの
中から1つを選択して処理実行部に送るキュー管理手段
と、処理実行部の処理終了後に、処理要求元のバス・マ
スタへの返信コマンドを作成するコマンド発行手段と、
処理要求元のバス・マスタに返信コマンドを送るため、
前記バス調停手段に対して共有バス使用要求を発行する
バス使用要求手段とを具えたことを特徴とする情報処理
装置。1. A plurality of bus masters that request processing, a bus slave that executes the processing requested by the bus master, and a shared bus that connects these bus masters and bus slaves in common. In an information processing device having a bus arbitration unit that arbitrates the right to use the shared bus, the bus master, when requesting processing from the bus slave,
A bus use request means for issuing a shared bus use request to the bus arbitration means, and a command for requesting processing to the bus slave after acquiring the shared bus use right, and releasing the shared bus. The bus / slave comprises a queue for storing received commands and a command addressed to itself received from a shared bus in the queue, and a command is issued from the commands stored in the queue. Queue management means for selecting one and sending it to the processing execution portion, and command issuing means for creating a reply command to the bus master of the processing request source after the processing execution portion completes processing,
To send a reply command to the processing request source bus master,
An information processing apparatus, comprising: a bus use request means for issuing a shared bus use request to the bus arbitration means.
処理を要求する際に、リクエスト・レベルを指定してコ
マンドを発行し、前記キュー管理手段は、前記キュー内
のコマンドの内、複数連続したリード要求コマンドの順
番を、前記リクエスト・レベルが高い順になるように並
べ替えることを特徴とする請求項1記載の情報処理装
置。2. The bus master issues a command by designating a request level when requesting a process from a bus slave, and the queue managing means issues a plurality of consecutive commands in the queue. The information processing apparatus according to claim 1, wherein the order of the read request commands is rearranged so that the request levels are higher.
手段が前記キューにコマンドを入れる際にキューが満杯
になっている場合は、そのことを示すビジー・コマンド
を全てのバス・マスタに対して送信することを特徴とす
る請求項1または2記載の情報処理装置。3. The bus slave sends a busy command to all the bus masters indicating that the queue is full when the queue management unit puts a command in the queue. The information processing apparatus according to claim 1, wherein the information processing apparatus transmits the information.
まったコマンド数が多くなるのに従って、共有バス使用
要求のリクエスト・レベルを高くすることを特徴とする
請求項1,2または3記載の情報処理装置。4. The information according to claim 1, wherein the bus slave raises the request level of the shared bus use request as the number of commands accumulated in the queue increases. Processing equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19357994A JPH0844662A (en) | 1994-07-26 | 1994-07-26 | Information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19357994A JPH0844662A (en) | 1994-07-26 | 1994-07-26 | Information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0844662A true JPH0844662A (en) | 1996-02-16 |
Family
ID=16310353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP19357994A Pending JPH0844662A (en) | 1994-07-26 | 1994-07-26 | Information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0844662A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6671761B2 (en) | 2000-08-11 | 2003-12-30 | Samsung Electronics Co., Ltd. | Bus system |
US6782439B2 (en) | 2000-07-21 | 2004-08-24 | Samsung Electronics Co., Ltd. | Bus system and execution scheduling method for access commands thereof |
JP2005284578A (en) * | 2004-03-29 | 2005-10-13 | Mitsubishi Electric Corp | Bus device |
JP2006201999A (en) * | 2005-01-20 | 2006-08-03 | Nec Access Technica Ltd | Bus system, slave device, bus system control method and program |
JP2012079165A (en) * | 2010-10-04 | 2012-04-19 | Canon Inc | Bus arbitration apparatus and bus arbitration method |
-
1994
- 1994-07-26 JP JP19357994A patent/JPH0844662A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6782439B2 (en) | 2000-07-21 | 2004-08-24 | Samsung Electronics Co., Ltd. | Bus system and execution scheduling method for access commands thereof |
KR100708096B1 (en) * | 2000-07-21 | 2007-04-16 | 삼성전자주식회사 | How to adjust the bus system and its execution order |
US6671761B2 (en) | 2000-08-11 | 2003-12-30 | Samsung Electronics Co., Ltd. | Bus system |
JP2005284578A (en) * | 2004-03-29 | 2005-10-13 | Mitsubishi Electric Corp | Bus device |
JP2006201999A (en) * | 2005-01-20 | 2006-08-03 | Nec Access Technica Ltd | Bus system, slave device, bus system control method and program |
JP2012079165A (en) * | 2010-10-04 | 2012-04-19 | Canon Inc | Bus arbitration apparatus and bus arbitration method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR910001790B1 (en) | Apparatus and its method for arbitrating assigning control of a communications path digital computer system | |
US6141715A (en) | Method and system for avoiding live lock conditions on a computer bus by insuring that the first retired bus master is the first to resubmit its retried transaction | |
JP3807250B2 (en) | Cluster system, computer and program | |
JPS61109164A (en) | Bus control | |
JPH0844681A (en) | Centralized management of resource shared by plurality of processors | |
US5528766A (en) | Multiple arbitration scheme | |
JP6129976B2 (en) | Method and apparatus using high efficiency atomic operations | |
JPH0772889B2 (en) | Information processing system | |
KR100708096B1 (en) | How to adjust the bus system and its execution order | |
JPH0679305B2 (en) | Device and method for responding to an interrupt using a hold bus | |
US5649209A (en) | Bus coupling information processing system for multiple access to system bus | |
KR20020009823A (en) | Bus system and bus arbitration method thereof | |
EP1187029B1 (en) | Peripheral component interconnect arbiter implementation with dynamic priority scheme | |
JPH0844662A (en) | Information processor | |
JPH06337843A (en) | Data transfer control method | |
JPH0844661A (en) | Information processor | |
JP4856413B2 (en) | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus | |
JPH09269927A (en) | Bus access method, bus and bus connection system | |
JP3261715B2 (en) | Input/Output Data Transfer Processing Device | |
JP2007241922A (en) | Arbitration method for use of shared resource, and arbitration device therefor | |
JPH0689257A (en) | Arbitration device of bus bridge | |
JPH01305461A (en) | Bus right control method | |
JP2555941B2 (en) | Bus arbitration method | |
JP2003085125A (en) | Memory controller and memory control method | |
JP2984594B2 (en) | Multi-cluster information processing system |