JP2825589B2 - Bus control method - Google Patents

Bus control method

Info

Publication number
JP2825589B2
JP2825589B2 JP2644890A JP2644890A JP2825589B2 JP 2825589 B2 JP2825589 B2 JP 2825589B2 JP 2644890 A JP2644890 A JP 2644890A JP 2644890 A JP2644890 A JP 2644890A JP 2825589 B2 JP2825589 B2 JP 2825589B2
Authority
JP
Japan
Prior art keywords
bus
memory
bus control
control unit
processor
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
JP2644890A
Other languages
Japanese (ja)
Other versions
JPH03230251A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2644890A priority Critical patent/JP2825589B2/en
Publication of JPH03230251A publication Critical patent/JPH03230251A/en
Application granted granted Critical
Publication of JP2825589B2 publication Critical patent/JP2825589B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Information Transfer Systems (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数のプロセッサとメモリが複数本のバス
で接続されたマルチプロセッサのバス制御方式に関する
ものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bus control method for a multiprocessor in which a plurality of processors and memories are connected by a plurality of buses.

〔従来の技術〕[Conventional technology]

複数台のプロセッサがメモリを共有するマルチプロセ
ッサ構成において、互いに矛盾なく処理を実行するため
には、プロセッサ間で共有するデータの排他制御が必要
である。
In a multiprocessor configuration in which a plurality of processors share a memory, exclusive control of data shared between the processors is necessary in order to execute processing without contradiction.

排他制御とは、あるプロセッサが共有データを使用し
て処理している間は、他のプロセッサに共用データを使
用させないようにするためのものであり、一般に、次の
6つの処理からなっている(第2図参照)。
The exclusive control is for preventing another processor from using the shared data while a certain processor is using the shared data, and generally includes the following six processes. (See FIG. 2).

処理.テスト&セット命令(T&S) 共用データは、そのデータがプロセッサによる処理を
受けているかどうかを示すロックバイトを持っている。
ある共用データのロックバイトに“1"がセットされてい
れば、その共用データがプロセッサによる処理を受けて
いることを示し、“0"ならば、処理を受けていない状態
にあることを示す。
processing. Test & Set Instruction (T & S) Shared data has a lock byte that indicates whether the data is being processed by a processor.
If "1" is set in the lock byte of a certain shared data, it indicates that the shared data is being processed by the processor, and if "0", it indicates that the shared data is not being processed.

テスト&セット命令は、プロセッサが共有データを使
えるか否かをチェックするための命令であり、 (1)ロックバイトのリードアクセス、 (2)読み込んだロックバイトがセットされているか否
かの判断、 (3)ロックバイトが“0"である場合に“1"にセットす
るためのメモリへのライトアクセス(“1"である場合
は、既に他のプロセッサが、対応するロックバイトを持
つ共用データを用いて処理を行っていることを示す)、 (4)ロックバイトが“0"であるか、“1"であるかをプ
ログラムに通知するため、コンディションコードの設
定、 の4つの処理からなる。プロセッサがテスト&セット命
令を実行している期間中は、他プロセッサからのロック
バイトへのアクセスを抑止するため、プロセッサとメモ
リを結合する該バスのロック信号をオンとして、該バス
を占有(ロック)し、他のプロセッサが該バスを使用で
きないようにする(参考:“コンピュータ・アーキテク
チャ 第2版”、村岡陽一、コンピュータ・サイエンス
大学講座11、pp137−139、近代科学社)。
The test & set instruction is an instruction for checking whether or not the processor can use the shared data. (1) Lock byte read access, (2) determination whether the read lock byte is set, (3) Write access to the memory to set it to “1” when the lock byte is “0” (if it is “1”, another processor has already And (4) setting a condition code to notify the program whether the lock byte is "0" or "1". While the processor is executing the test & set instruction, in order to prevent access to the lock byte from other processors, the lock signal of the bus connecting the processor and the memory is turned on to occupy (lock) the bus. ) And prevent other processors from using the bus (reference: "Computer Architecture 2nd Edition", Yoichi Muraoka, Computer Science University Lecture 11, pp. 137-139, Modern Science).

処理.共用データの使用可否の判断 コンディションコードをチェックし、ロックバイトが
“0"であった場合は処理、ロックバイトが“1"であっ
た場合は処理.に進む。
processing. Judgment of availability of shared data Check condition code. If lock byte is "0", process. If lock byte is "1", process. Proceed to.

処理.共用データのリード メモリから共用データを読み込む。processing. Read shared data Reads shared data from memory.

処理.プロセッサ内処理 プロセッサによる読み込んだデータの処理。processing. In-processor processing Processing of data read by the processor.

処理.共有データの書換え プロセッサが処理したデータをメモリへ書き込むため
のライトアクセス(以後、ST1と記す)。
processing. Rewrite of shared data Write access for writing data processed by the processor to the memory (hereinafter referred to as ST1).

処理.ロックバイトのリセット プロセッサがアクセスした共用データのロックバイト
をリセット(即ち“0")するためのメモリライトアクセ
ス(以後、ST2と記す)。
processing. Lock byte reset A memory write access (hereinafter referred to as ST2) for resetting (ie, "0") the lock byte of the shared data accessed by the processor.

以上の順番に従って処理を実行することにより、複数
プロセッサ間で、共用データを用いた処理が矛盾なく行
われる。
By executing the processing in the above order, the processing using the shared data is performed without inconsistency among the plurality of processors.

プロセッサの単位性能を向上させる一つの方法とし
て、メモリへのライトアクセスのおいてきぼり制御があ
る。
As one method for improving the unit performance of a processor, there is a discrimination control in a write access to a memory.

おいてきぼり制御とは、命令実行部(以下、CPUとい
う)がライトアクセスを実行する際、バス制御部が、そ
のライトアドレスとデータを内部の出力バッファに保持
し、CPUに対しては該アドレスとデータを受け取った時
点でライトアクセスの終了を通知するとともに、次の命
令の実行を促し、メモリへの書き込みはCPUの後続命令
の実行と並行して行うものである。この制御により、CP
Uは、ライトアクセスの度にメモリへの書き込み終了を
待たされることなく、次の命令の実行を行うことができ
るので、処理性能が向上する。
In the control, when an instruction execution unit (hereinafter referred to as a CPU) executes a write access, a bus control unit stores the write address and data in an internal output buffer and sends the address and data to the CPU. At the point of receiving, the end of the write access is notified, and the execution of the next instruction is prompted, and the writing to the memory is performed in parallel with the execution of the subsequent instruction of the CPU. With this control, CP
U can execute the next instruction without having to wait for the end of writing to the memory every time a write access is performed, so that the processing performance is improved.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

しかしながら、前記従来の複数のバスで結合されたマ
ルチプロセッサの場合、おいてきぼり制御を行うと、先
に述べた排他制御がうまく機能しないという問題があ
る。
However, in the case of the conventional multiprocessor coupled by a plurality of buses, there is a problem that the exclusive control described above does not function well if the cutoff control is performed.

以下、この問題について説明する。 Hereinafter, this problem will be described.

ここでは、前記問題点を分かりやすく説明するため
に、2台のプロセッサと1台のメモリが、バスをロック
するための機能(ロック信号)を持つ2本のバスで結合
されたマルチプロセッサ構成を想定する。各プロセッサ
は1台のCPUとバス対応に2台のバス制御部とからな
り、バス制御部はおいてきぼり制御用の出力バッファを
持つものとする。メモリ上の1番地には共用データ、0
番地には共用データに対応するロックバイトが格納さ
れ、共用データの値は“A"、ロックバイトの値は“0"に
なっているものとする。更に、メモリの偶数番地へのア
クセスはバス0、奇数番地へのアクセスはバス1を経由
して行われるものとする。ここで想定するマルチプロセ
ッサ構成の全体図を第3図に示す。
Here, in order to easily explain the above problem, a multiprocessor configuration in which two processors and one memory are connected by two buses having a function (lock signal) for locking the bus is described. Suppose. Each processor is composed of one CPU and two bus controllers corresponding to the buses, and the bus controller has an output buffer for squeeze control. Shared data at address 1 in memory, 0
It is assumed that the lock byte corresponding to the shared data is stored in the address, the value of the shared data is “A”, and the value of the lock byte is “0”. Further, it is assumed that access to the even address of the memory is performed via the bus 0 and access to the odd address is performed via the bus 1. FIG. 3 shows an overall view of a multiprocessor configuration assumed here.

第3図において、100はメモリ、#1,#2はプロセッ
サである。プロセッサ#1はバス制御部10,11及びCPU12
からなっている。また、プロセッサ#2はバス制御部2
0,21及びCPU22からなっている。バス制御部10は出力バ
ッファ10Aを有し、バス制御部11は出力バッファ11Aを有
している。また、バス制御部20は出力バッファ20Aを有
し、バス制御部21は出力バッファ21Aを有している。
In FIG. 3, 100 is a memory, and # 1 and # 2 are processors. The processor # 1 includes the bus control units 10 and 11 and the CPU 12
Consists of Processor # 2 is a bus control unit 2
0,21 and CPU22. The bus control unit 10 has an output buffer 10A, and the bus control unit 11 has an output buffer 11A. The bus control unit 20 has an output buffer 20A, and the bus control unit 21 has an output buffer 21A.

次に、前記のマルチプロセッサの構成における各プロ
セッサ#1及び#2の動作について説明する。
Next, the operation of each of the processors # 1 and # 2 in the multiprocessor configuration will be described.

プロセッサ#2のCPU22は、バス0のロック信号をオ
ン状態にして、バス制御部20、バス0を経由して、テス
ト&セット命令を実行し、メモリ100上の0番地にある
ロックバイトを“1"にセットする。ロックバイトをセッ
トしたプロセッサ#2は、バス0のロック信号をオフ状
態にして、1番地にある共用データ(元データはAとす
る)に対するアクセス権を獲得する。
The CPU 22 of the processor # 2 turns on the lock signal of the bus 0, executes the test & set instruction via the bus control unit 20 and the bus 0, and sets the lock byte at the address 0 on the memory 100 to “ Set to 1 ". The processor # 2 that has set the lock byte turns off the lock signal of the bus 0 and acquires an access right to the shared data at address 1 (the original data is assumed to be A).

プロセッサ#2のCPU22は、バス制御部21、バス1を
介して、メモリ100上の1番地にある共用データに対し
てリードアクセスを行い、CPU22内で処理を行う。
The CPU 22 of the processor # 2 performs read access to the shared data at the address 1 on the memory 100 via the bus control unit 21 and the bus 1, and performs processing in the CPU 22.

次に、プロセッサ#2のCPU22は、処理した共用デー
タ(新データはBとする)をメモリ100上の1番地に書
き込む(ST1)ため、ライトアドレスと書換えデータ
(アドレサは1,データはBである)をバス制御部21の出
力バッファ21Aに送る。
Next, the CPU 22 of the processor # 2 writes the processed shared data (new data is assumed to be B) to an address 1 in the memory 100 (ST1), so that the write address and rewrite data (addresser is 1, data is B Is sent to the output buffer 21A of the bus control unit 21.

バス制御部21は、ST1を出力バッファ21Aに格納し、CP
U22に対してライトアクセスの終了を通知する。
The bus control unit 21 stores ST1 in the output buffer 21A,
It notifies U22 of the end of the write access.

続いて、プロセッサ#2のCPU22は、メモリ100上の0
番地にあるロックバイトをリセット(ST2)するため、
ライトアドレスとデータ(アドレスは0,データは0であ
る)をバス制御部20に送る。
Subsequently, the CPU 22 of the processor # 2
To reset the lock byte at the address (ST2)
The write address and the data (the address is 0 and the data is 0) are sent to the bus control unit 20.

バス制御部20はST2を出力バッファ20Aに格納し、CPU2
2に対してライトアクセスの終了を通知する。
The bus control unit 20 stores ST2 in the output buffer 20A,
Notify 2 of the end of write access.

次に、プロセッサ#2のバス制御部20は、バス0のバ
ス権を獲得し、出力バッファ20Aに格納されているST2を
バス0を経由してメモリ100に送出して、メモリ100上の
0番地のロックバイトを“1"から“0"にリセットする。
この時、たまたま、バス1がプロセッサ#1または図に
示していないが入出力チャネルによって使用されてお
り、バス制御部21はバス1を獲得できず、ST1はバス制
御部21の出力バッファに保留されたままになっている。
Next, the bus control unit 20 of the processor # 2 acquires the bus right of the bus 0, sends out the ST2 stored in the output buffer 20A to the memory 100 via the bus 0, and Resets the lock byte at address from “1” to “0”.
At this time, the bus 1 happens to be used by the processor # 1 or an unillustrated input / output channel, the bus control unit 21 cannot acquire the bus 1, and the ST1 is held in the output buffer of the bus control unit 21. Has been done.

今度は、プロセッサ#1のCPU12は、バス0のロック
信号をオン状態にして、バス制御部10、バス0を経由し
て、テスト&セット命令を実行し、メモリ上の0番地に
あるロックバイトを“1"にセットする。ロックバイトを
セットしたプロセッサ#1は、バス0のロック信号をオ
フ状態にして、1番地にある共有用データに対するアク
セス権を獲得する。
This time, the CPU 12 of the processor # 1 turns on the lock signal of the bus 0, executes the test & set instruction via the bus control unit 10 and the bus 0, and executes the lock byte at the address 0 on the memory. To “1”. The processor # 1 that has set the lock byte turns off the lock signal of the bus 0 and acquires the access right to the sharing data at the address 1.

この時、プロセッサ#2のバス制御部21の出力バッフ
ァにあるST1(アドレスは1,データはBである)は依然
として保留状態にあるとする。
At this time, it is assumed that ST1 (address is 1 and data is B) in the output buffer of the bus control unit 21 of the processor # 2 is still on hold.

次に、プロセッサ#1のCPU12は、メモリ100上の1番
地にある共用データに対してリードアクセスをバス制御
部11に要求する。
Next, the CPU 12 of the processor # 1 requests the bus control unit 11 for read access to the shared data at the address 1 on the memory 100.

バス制御部11は1番地のリードアクセス、バス制御部
21は1番地へのライトアクセス(ST1)のため、バス1
を獲得しようとし、図には示していないがバス使用権割
当回路によってバス制御部11にバスの使用権が与えられ
たとする。バス制御部11は、ST1が行われる以前の旧デ
ータ(A)を読み出し、プロセッサ#1のCPU12に与え
る。
The bus control unit 11 is a read access at address 1, a bus control unit.
Bus 21 is for write access to address 1 (ST1), so bus 1
And it is assumed that the bus control unit 11 is given a bus use right by the bus use right assignment circuit (not shown). The bus control unit 11 reads the old data (A) before ST1 is performed, and provides the old data (A) to the CPU 12 of the processor # 1.

以後、プロセッサ#1は、書き換えられる以前の旧デ
ータを用いて処理を継続することになり、処理の矛盾が
発生する。
After that, the processor # 1 continues the process using the old data before the rewriting, and a contradiction in the process occurs.

複数本のバス及びおいてきぼり制御を行うプロセッサ
から構成されるマルチプロセッサにおいては、上記の矛
盾が発生する。このため、従来のマルチプロセッサの構
成方法として、バス制御部に出力バッファを設けずライ
トアクセスのおいてきぼり制御を行わない方法またはバ
スを1本にする方法などが採られていた。
The above contradiction occurs in a multiprocessor including a plurality of buses and a processor that performs squeeze control. Therefore, as a configuration method of the conventional multiprocessor, a method of not providing an output buffer in the bus control unit and not performing the dropout control in the write access, or a method of using one bus has been adopted.

前者の方法は、メモリへのライトアクセス(ST1)が
メモリ上で実行されて、終了するまでは次のメモリアク
セス(ST2)を実行させないことで、処理の矛盾を起こ
させない方法である。しかし、この項目の前半で説明し
たように、おいてきぼり制御を行わないため、プロセッ
サの単体性能が向上しないという問題があった。
The former method is a method in which a write access (ST1) to a memory is executed on the memory and the next memory access (ST2) is not executed until the write access (ST1) is completed, thereby preventing a process inconsistency. However, as described in the first half of this item, there is a problem that the performance of the processor alone is not improved because the cutoff control is not performed.

後者の方法は、バスを1本にすることによりメモリへ
のライトアクセスST1とST2がバスでシリアライズされ、
ST2かST1を追い越してメモリに反映されることがないた
め、前述の問題は発生しない。しかし、この方法では、
プロセッサ台数の増加に伴って、バス競合が増し、それ
による処理性能が飽和するという問題があった。
In the latter method, the write access ST1 and ST2 to the memory are serialized by the bus by using one bus,
The above-mentioned problem does not occur because ST2 or ST1 is not overwritten in the memory. But with this method,
As the number of processors increases, there is a problem that bus contention increases and the processing performance is thereby saturated.

本発明は、前記問題点を解決するためになされたもの
である。
The present invention has been made to solve the above problems.

本発明の目的は、複数本のバスを持ち、かつ、おいて
きぼり制御を行うプロセッサから構成されるマルチプロ
セッサに適したバス制御方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a bus control method suitable for a multiprocessor having a plurality of buses and including a processor that performs bleeding control.

本発明の前記ならびにその他の目的と新規な特徴は、
本明細書の記述及び添付図面によって明らかになるであ
ろう。
The above and other objects and novel features of the present invention are as follows.
It will become apparent from the description of the present specification and the accompanying drawings.

〔課題を解決するための手段〕[Means for solving the problem]

前記目的を達成するために、本発明のバス制御方式
は、メモリへのライトアクセスに有効なおいてきぼり制
御を可能とする出力バッファを持つ複数台のプロセッサ
とメモリとが、複数のプロセッサからのメモリアクセス
の排他制御を行うためのロック信号を有する複数本のバ
スで結合されたマルチプロセッサの構成において、所定
のプロセッサのCPUが所定のバス制御部及びバスを経由
しロック信号をオンとしたリードアクセスを発出した場
合、他のプロセッサの所定のバス以外に接続された全て
のバス制御部は該ロック信号を検出し、出力バッファに
メモリへのライトアクセスが存在しないときは出力バッ
ファが空である旨を、一方、出力バッファにメモリへの
ライトアクセスが存在するときは、該ライトアクセスを
メモリに対して行った後、出力バッファが空になった旨
をロック信号をオンとしたリードアクセスを発出したバ
ス制御部に通知し、該バス制御部は他のプロセッサの所
定バス以外に接続された全てのバス制御部からの該通知
を受け取った後、メモリから読み出したデータをCPUに
送ることを最も主要な特徴とする。
In order to achieve the above object, a bus control method according to the present invention is characterized in that a plurality of processors having an output buffer effective for a write access to a memory and capable of controlling the size of the memory and the memory are configured to perform memory access from the plurality of processors. In a configuration of a multiprocessor coupled by a plurality of buses having lock signals for performing exclusive control, a CPU of a predetermined processor performs read access with a lock signal turned on via a predetermined bus control unit and a bus. In the case of issuing, all the bus control units connected to other than the predetermined bus of the other processor detect the lock signal, and when there is no write access to the memory in the output buffer, it is notified that the output buffer is empty. On the other hand, when there is a write access to the memory in the output buffer, after performing the write access to the memory, The bus control unit that has issued the read access with the lock signal turned on notifies that the output buffer has been emptied, and the bus control unit receives a signal from all the bus control units connected to other processors than the predetermined bus. The most main feature is that after receiving the notification, the data read from the memory is sent to the CPU.

〔作用〕 前述の手段によれば、所定のCPUが所定のバス制御部
及びバスを経由しロック信号をオンとしたリードアクセ
スを発出した場合、他プロセッサの所定のバス以外に接
続された全てのバス制御部は、該ロック信号を検出し、
出力バッファにメモリへのライトアクセスが存在しない
といは出力バッファが空である旨を、一方、出力バッフ
ァにメモリへのライトアクセスが存在するときは、該ラ
イトアクセスをメモリに対して行った後、出力バッファ
が空になった旨をロック信号をオンとしたリードアクセ
スを発出したバス制御部に通知し、該バス制御部は他プ
ロセッサの前記所定のバス以外に接続された全てのバス
制御部からの該通知を受け取った後、メモリから読み出
したデータをCPUに送るので、複数本のバスを持ち、か
つ、おいてきぼり制御を行うプロセッサから構成される
マルチプロセッサに適したバス制御方式を実現すること
ができる。
[Operation] According to the above-described means, when a predetermined CPU issues a read access with a lock signal turned on via a predetermined bus control unit and a bus, all of the other processors connected to other than the predetermined bus are output. The bus control unit detects the lock signal,
When there is no write access to the memory in the output buffer, it indicates that the output buffer is empty.On the other hand, when there is a write access to the memory in the output buffer, after performing the write access to the memory, Notifying the bus control unit that has issued the read access with the lock signal turned on that the output buffer has been emptied, the bus control unit transmits from all the bus control units other than the predetermined bus of the other processor. Since the data read from the memory is sent to the CPU after receiving the notification of the above, it is possible to realize a bus control method suitable for a multiprocessor having a plurality of buses and including a processor that performs control in advance. it can.

すなわち、本発明のバス制御方式は、従来の技術と
は、ロック信号をオンとしたバス以外に接続された全て
のバス制御部が該ロック信号を検出するための信号線と
バス制御部の出力バッファにメモリへのライトアクセス
が存在するか否かをロック信号をオンにしたバス制御部
に通知するための信号線を有する点が異なる。
That is, the bus control system of the present invention is different from the conventional technology in that all the bus control units connected to buses other than the bus with the lock signal turned on detect a signal line for detecting the lock signal and the output of the bus control unit. The difference is that the buffer has a signal line for notifying the bus control unit that has turned on the lock signal whether or not the buffer has a write access to the memory.

〔発明の実施例〕(Example of the invention)

以下、本発明の一実施例を図面を用いて具体的に説明
する。
Hereinafter, an embodiment of the present invention will be specifically described with reference to the drawings.

第1図は、本発明を複数本のバスを持ち、かつ、おい
てきぼり制御を行うプロセッサから構成されるマルチプ
ロセッサに適用した一実施例のバス制御方式を説明する
ためのマルチプロセッサの構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration of a multiprocessor for explaining a bus control method according to an embodiment in which the present invention is applied to a multiprocessor having a plurality of buses and comprising a processor for performing bleeding control. FIG.

第1図において、100は共用データとそのデータに対
するアクセスの有無を示すロックバイトを持つメモリ、
101,103はバス、102,104はバス制御部の出力バッファが
メモリへのライトアクセスを持っているか否かを通知す
る信号線、105,106はロック信号をオンとしたバス以外
に接続されたバス制御部が該ロック信号を検出するため
の信号線、107,109,112,114はメモリ100へのアクセスを
制御するためのバス制御部、108,110,113,115はおいて
きぼり制御を行うために必要なバス制御部の出力バッフ
ァ、111,116は命令を実行するCPU(命令実行部)であ
る。
In FIG. 1, reference numeral 100 denotes a memory having shared data and a lock byte indicating whether or not the data is accessed;
101 and 103 are buses, 102 and 104 are signal lines for notifying whether or not the output buffer of the bus control unit has write access to the memory, and 105 and 106 are bus control units connected to buses other than the bus with the lock signal turned on. Signal lines for detecting signals; 107, 109, 112, and 114 are bus control units for controlling access to the memory 100; 108, 110, 113, and 115 are output buffers of the bus control unit necessary for performing cut-out control; and 111 and 116 are CPUs for executing instructions ( Instruction execution unit).

本発明のバス制御方式を適用した場合、複数のプロセ
ッサ間で行われる動作を分かりやすく説明するために、
新たに追加した2種類の信号線(102,104,105,106)の
部分を除いては、全体のブロック構成は第3図のマルチ
プロセッサ構成と全く同じであるとする。
When the bus control method of the present invention is applied, in order to easily explain operations performed between a plurality of processors,
Except for the newly added two types of signal lines (102, 104, 105, 106), the entire block configuration is assumed to be exactly the same as the multiprocessor configuration in FIG.

次に、前記マルチプロセッサの構成における各プロセ
ッサの動作について説明する。
Next, the operation of each processor in the configuration of the multiprocessor will be described.

プロセッサ#2のCPU116は、バス0のロック信号をオ
ン状態にして、バス制御部112、バス101を経由して、テ
スト&セット命令を実行し、メモリ上の0番地にあるロ
ックバイトを“1"にセットする。ロックバイトをセット
したプロセッサ#2は、バス101のロック信号をオフ状
態にして、1番地にある共用データ(元データはAとす
る)に対するアクセス権を獲得する。
The CPU 116 of the processor # 2 turns on the lock signal of the bus 0, executes the test & set instruction via the bus control unit 112 and the bus 101, and sets the lock byte at address 0 in the memory to “1”. Set to " The processor # 2 that has set the lock byte turns off the lock signal of the bus 101 and acquires an access right to the shared data at address 1 (the original data is assumed to be A).

プロセッサ#2のCPU116は、バス制御部114、バス103
を介して、メモリ100上の1番地にある共用データに対
してリードアクセスを行い、CPU116内で処理を行う。
The CPU 116 of the processor # 2 includes a bus control unit 114, a bus 103
, A read access is made to the shared data at the address 1 on the memory 100, and the processing is performed in the CPU.

次に、プロセッサ#2のCPU116は、処理した共用デー
タ(新データはBとする)をメモリ100上の1番地の領
域に書き込む(ST1)ため、ライトアドレスと書換えデ
ータ(アドレスは1,データはBである)をバス制御部11
4に送る。
Next, the CPU 116 of the processor # 2 writes the processed shared data (the new data is assumed to be B) to the area of the address 1 in the memory 100 (ST1). B) to the bus control unit 11
Send to 4.

バス制御部114は、ST1が出力バッファ115に格納し、C
PU116に対してライトアクセスの終了を通知する。
The bus control unit 114 stores ST1 in the output buffer 115,
The PU 116 is notified of the end of the write access.

続いて、プロセッサ#2のCPU116は、メモリ100上の
0番地のロックバイトをリセット(ST2)するため、ラ
イトアドレスとデータ(アドレスは0,データは○であ
る)をバス制御部112に送る。
Subsequently, the CPU 116 of the processor # 2 sends a write address and data (the address is 0 and the data is に) to the bus control unit 112 in order to reset the lock byte at address 0 on the memory 100 (ST2).

バス制御部112は、ST2を出力バッファ113に格納し、C
PU116に対してライトアクセスの終了を通知する。
The bus control unit 112 stores ST2 in the output buffer 113,
The PU 116 is notified of the end of the write access.

次に、プロセッサ#2のバス制御部112は、バス0の
バス権を獲得し、出力バッファに格納されているST2を
バス101を経由してメモリ100に送出して、0番地のロッ
クバイトを“1"から“0"にリセットする。この時、たま
たま、バス103がプロセッサ#1または図に示していな
いが入出力制御チャネルによって使用されており、バス
制御部114はバス103を獲得できず、ST1はバス制御部114
の出力バッファ115に保留されたままになっている。
Next, the bus control unit 112 of the processor # 2 acquires the bus right of the bus 0, sends out the ST2 stored in the output buffer to the memory 100 via the bus 101, and stores the lock byte at the address 0. Reset from “1” to “0”. At this time, the bus 103 happens to be used by the processor # 1 or an input / output control channel (not shown), the bus control unit 114 cannot acquire the bus 103, and the ST1 returns to the bus control unit 114.
Is held in the output buffer 115.

第1図は、マルチプロセッサが前述した状態にあるこ
とを図示したものである。
FIG. 1 illustrates that the multiprocessor is in the state described above.

マルチプロセッサが第1図の状態にあるものとして、
プロセッサ#1のCPU111は、テスト&セット命令の実行
のため、メモリ100上の0番地のロックバイトのリード
要求をバス制御部107に出す。バス制御部107はバス101
のバス権を獲得して、バス101のロック信号をオンと
し、メモリ100上の0番地のリード要求を出す。
Assuming that the multiprocessor is in the state of FIG.
The CPU 111 of the processor # 1 issues a request to read the lock byte at address 0 on the memory 100 to the bus control unit 107 to execute the test & set instruction. The bus control unit 107 is a bus 101
, The lock signal of the bus 101 is turned on, and a read request for the address 0 on the memory 100 is issued.

この時、プロセッサ#2のバス制御部114は、バス101
のロック信号がオン状態になっていることを信号線105
を通じて検出する。
At this time, the bus control unit 114 of the processor # 2
Signal line 105 indicates that the lock signal is on.
Detect through.

バス制御部114は、その検出を受けて、出力バッファ1
15に保留されている共用データを書き換えるためのライ
トアドレスとデータ(ST1:アドレスは1,データはBであ
る)をバス103を経由してメモリ100に対して送出し、メ
モリ100上の1番地にある共用データを“A"から“B"に
書き換える。
In response to the detection, the bus control unit 114
A write address and data (ST1: address is 1, data is B) for rewriting the shared data held in 15 are sent to the memory 100 via the bus 103, and the address 1 on the memory 100 is sent. Rewrite the shared data in “A” from “A” to “B”.

プロセッサ#2のライトアクセスが終了すると、バス
制御部114の出力バッファ115は空になっているので、バ
ス制御部114はその旨を信号線104を通じてバス制御部10
7に報告する。
When the write access of the processor # 2 is completed, the output buffer 115 of the bus control unit 114 is empty, and the bus control unit 114 notifies the bus control unit 10 via the signal line 104 of the fact.
Report to 7.

プロセッサ#1のバス制御部107は、メモリ100からロ
ックバイトをリードした後、前記の報告をCPU111に送
る。CPU111は、ロックバイトが0のため、共用データに
対するアクセス権を獲得し、ロックバイトを1にするラ
イトアクセスをバス制御部107に送る。バス制御部107
は、該ライトアクセスを出力バッファ108に格納し、CPU
111に対しライトアクセスの終了を通知する。
After reading the lock byte from the memory 100, the bus control unit 107 of the processor # 1 sends the report to the CPU 111. Since the lock byte is 0, the CPU 111 acquires the access right to the shared data and sends a write access to set the lock byte to 1 to the bus control unit 107. Bus control unit 107
Stores the write access in the output buffer 108, and
Notify 111 of the end of the write access.

次に、CPU111は、共用データの読み出しに移るが、こ
の時、共用データは“B"に書き換えられており、以後矛
盾なくに処理が行われる。
Next, the CPU 111 moves to reading of the shared data. At this time, the shared data has been rewritten to “B”, and the processing is performed without contradiction.

以上、本発明を実施例にもとづき具体的に説明した
が、本発明は、前記実施例に限定されるものではなく、
その要旨を逸脱しない範囲において種々変更可能である
ことは言うまでもない。
As mentioned above, although the present invention was explained concretely based on an example, the present invention is not limited to the above-mentioned example.
It goes without saying that various changes can be made without departing from the scope of the invention.

〔発明の効果〕〔The invention's effect〕

以上、説明したように、本発明によれば、おいてきぼ
りライト制御を行うプロセッサを複数本のバスで結合し
たマルチプロセッサ構成を採ることが可能となり、シス
テムの高性能化が図れる。
As described above, according to the present invention, it is possible to adopt a multiprocessor configuration in which a processor for performing write-once control is connected by a plurality of buses, thereby achieving higher performance of the system.

【図面の簡単な説明】[Brief description of the drawings]

第1図は、本発明を複数本のバスを持ち、かつ、おいて
きぼり制御を行うプロセッサから構成されるマルチプロ
セッサに適用した一実施例のバス制御方式を説明するた
めのマルチプロセッサの構成を示すブロック図、 第2図は、プロセッサが行うメモリへのライトアクセス
の排他制御の動作フローチャート、 第3図は、従来の複数本のバスを持つマルチプロセッサ
の動作を説明するための図である。 図中、100……メモリ、101,103……バス、102,104……
信号線、105,106……信号線、107,109,112,114……バス
制御部、108,110,113,115……出力バッファ、111,116…
…CPU。
FIG. 1 is a block diagram showing a configuration of a multiprocessor for explaining a bus control method according to an embodiment in which the present invention is applied to a multiprocessor having a plurality of buses and comprising a processor for performing bleeding control. FIG. 2 is an operation flowchart of exclusive control of write access to a memory performed by a processor, and FIG. 3 is a diagram for explaining an operation of a conventional multiprocessor having a plurality of buses. In the figure, 100 ... memory, 101,103 ... bus, 102,104 ...
Signal lines, 105, 106 ... signal lines, 107, 109, 112, 114 ... bus control units, 108, 110, 113, 115 ... output buffers, 111, 116 ...
…CPU.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のプロセッサとメモリとが複数本のバ
スで接続され、各プロセッサは命令実行部とメモリへの
アクセスを制御するためバス対応に設けられた複数のバ
ス制御部とから構成され、命令実行部からのメモリアク
セスはアドレスによりどのバス制御部を経由して行なう
か、あらかじめ決められた規則に従って一義的に決定さ
れ、各バスは複数のプロセッサからのメモリアクセルの
排他制御用のロック信号を有し、該ロック信号がオンの
間は他プロサッサからのメモリアクケスができないよう
になっており、前記バス制御部は出力バッファを有し、
命令実行部からのライトアクセスに対しアドレスとデー
タを出力バッファに格納すると命令実行部に対しライト
アクセスの終了を通知し、バスが獲得できた時点でメモ
リに対しライトアドレスとデータを送るように構成され
たマルチプロセッサのバス制御方式において、所定の命
令実行部が所定のバス制御部及びバスを経由しロック信
号をオンとしたリードアクセスを発出した場合、他プロ
セッサの所定のバス以外に接続された全てのバス制御部
は、該ロック信号を検出し、出力バッファにメモリへの
ライトアクセスが存在しないときは出力バッファが空で
ある旨を、一方、出力バッファにメモリへのライトアク
セスが存在するときは、該ライトアクセスをメモリに対
して行なった後、出力バッファが空になった旨をロック
信号をオンとしたリードアクセスを発出したバス制御部
に通知し、該バス制御部は他プロセッサの前記所定のバ
ス以外に接続された全てのバス制御部からの該通知を受
け取った後、メモリから読み出したデータを命令実行部
に送ることを特徴とするバス制御方式。
1. A plurality of processors and a memory are connected by a plurality of buses, and each processor comprises an instruction execution unit and a plurality of bus control units provided for the bus for controlling access to the memory. The memory access from the instruction execution unit is uniquely determined according to a predetermined rule as to which bus control unit is to be accessed by an address, and each bus is a lock for exclusive control of a memory accelerator from a plurality of processors. A memory access request from another processor while the lock signal is on, the bus control unit has an output buffer,
When the address and data are stored in the output buffer for the write access from the instruction execution unit, the end of the write access is notified to the instruction execution unit, and the write address and data are sent to the memory when the bus can be acquired. In the multiprocessor bus control method described above, when a predetermined instruction execution unit issues a read access with a lock signal turned on via a predetermined bus control unit and a bus, the read access is connected to a bus other than the predetermined bus of another processor. All bus control units detect the lock signal and indicate that the output buffer is empty when there is no write access to the memory in the output buffer, and when the bus buffer has write access to the memory in the output buffer. Turned on the lock signal indicating that the output buffer was empty after performing the write access to the memory. The bus control unit that has issued the data access, receives the notification from all the bus control units other than the predetermined bus of the other processor, and then executes the data read from the memory. A bus control method characterized by sending to a section.
JP2644890A 1990-02-05 1990-02-05 Bus control method Expired - Fee Related JP2825589B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2644890A JP2825589B2 (en) 1990-02-05 1990-02-05 Bus control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2644890A JP2825589B2 (en) 1990-02-05 1990-02-05 Bus control method

Publications (2)

Publication Number Publication Date
JPH03230251A JPH03230251A (en) 1991-10-14
JP2825589B2 true JP2825589B2 (en) 1998-11-18

Family

ID=12193786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2644890A Expired - Fee Related JP2825589B2 (en) 1990-02-05 1990-02-05 Bus control method

Country Status (1)

Country Link
JP (1) JP2825589B2 (en)

Also Published As

Publication number Publication date
JPH03230251A (en) 1991-10-14

Similar Documents

Publication Publication Date Title
JPH03212755A (en) Inter-processor interrupt system
JP2825589B2 (en) Bus control method
JPH0789328B2 (en) Data processing device
JP3187446B2 (en) Cache memory controller
EP3428799B1 (en) Data access device and access error notification method
US7877533B2 (en) Bus system, bus slave and bus control method
JP3130798B2 (en) Bus transfer device
JP2679440B2 (en) Information processing device
JP2504323B2 (en) System bus control method
JP2848437B2 (en) Multi-cluster exclusive control unit
JPH04140860A (en) Method for controlling bus of multi-processor
JPS601656B2 (en) buffer memory circuit
JPS5834856B2 (en) Kiokuseigiyosouchi
JPH07234850A (en) Device and method for multiprocessor system
JP2781999B2 (en) Startup method of common data channel device in multiprocessor system
JP3219422B2 (en) Cache memory control method
JPS6138504B2 (en)
JPS6130296B2 (en)
JPH058459B2 (en)
JPH0415496B2 (en)
JP2665173B2 (en) Processor trap circuit
JPH01316851A (en) Channel control system
JP3029445B2 (en) Startup reception device and method
JPH07111711B2 (en) Processing end interrupt control system
JPS62184564A (en) Electronic computer control system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees