JPH02207366A - Inter-processor communication system - Google Patents

Inter-processor communication system

Info

Publication number
JPH02207366A
JPH02207366A JP2761389A JP2761389A JPH02207366A JP H02207366 A JPH02207366 A JP H02207366A JP 2761389 A JP2761389 A JP 2761389A JP 2761389 A JP2761389 A JP 2761389A JP H02207366 A JPH02207366 A JP H02207366A
Authority
JP
Japan
Prior art keywords
data
processor
area
pattern
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2761389A
Other languages
Japanese (ja)
Inventor
Kunio Nakatsuka
中塚 國男
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2761389A priority Critical patent/JPH02207366A/en
Publication of JPH02207366A publication Critical patent/JPH02207366A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、マルチプロセッサシステムにおける複数の
プロセッサ間で通信が行われていても、他のプロセッサ
間でも通信を可能にするプロセッサ間通信方式に関する
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to an inter-processor communication method that enables communication between multiple processors in a multiprocessor system and also between other processors. .

〔従来の技術〕[Conventional technology]

第7図は例えば特開昭60−237566号公報に示さ
れた従来のプロセッサ間通信方式を示すマイクロプロセ
ッサシステムのブロック接続図であシ、図において、1
.2はプロセッサ、4は共有メモリ、5.6は割込原因
信号である。
FIG. 7 is a block connection diagram of a microprocessor system showing a conventional inter-processor communication method disclosed in, for example, Japanese Patent Application Laid-Open No. 60-237566.
.. 2 is a processor, 4 is a shared memory, and 5.6 is an interrupt cause signal.

次に動作について説明する。Next, the operation will be explained.

第7図に示すように、プロセッサ1又はプロセッサ2の
いずれからもアクセスできる共有メモリ4を置くことに
よシ、データ受授を行うものである。この共有メモリ4
はプロセッサ1またはプロセッサ2から自分のメモリと
同様に使用でき、この共有メモリ4のうちあるエリアを
例えば送信側プロセッサ1用および受信側プロセッサ2
用と分けて、アドレスを決めて割付けておく。従りて、
送信側プロセッサ1が相手先プロセッサとしての受信側
プロセッサ2に送シたい指示あるいは状態等のデータを
、自分に割付けられたエリアに書込む。これは通常のメ
モリアクセスと全く同様に行われる。送信側プロセッサ
1はデータを書込み後、受信側プロセッサ2KI10命
令等を送出する。受信側プロセッサ2は、送信側プロセ
ッサ1の命令を受信側プロセッサ2の割込原因とするよ
うに設定しておく。また、受信側プロセッサ2は、送信
側プロセッサ1が、すぐ次の処理に移行できるように、
つまF)I10命令等を終了させるべく、応答信号を即
時返送する。受信側プロセッサ2は、その後ゆり〈シと
自分の好きな時間に送信側から送られてきた指示等のデ
ータを読取シ処理すればよい。このとき、送信側プロセ
ッサはどちらのプロセッサ1tたは2であっても、同じ
方法で通信を行なりてもかまわないし、可能である。な
お、上記では、2個のプロセッサ1,2間について説明
したが、複数個のプロセッサ間でも同様な方法で実行し
得ることは明らかである。また、上記したような方法で
データを転送したとき1両プロセッサ1.2の処理のス
ピードが合わないとき(例えば片方のプロセッサ1が相
手のプロセッサ2に送りたいデータが沢山あるのに受信
側プロセッサ2は別の処理に忙しくそデータを受けつけ
る時間がないようなときがあると、データの受授確認を
しなければならない。この場合には、受信側プロセッサ
2が受信を完了すると、そのエリアをクリア(またはあ
る応答パターンを誉込む)することによって、送信側プ
ロセッサ1に未だデータを処理し終ってないことを通知
する。従9て、送信側プロセッサ1は通信エリアが空に
なりていなければ、たとえ送信データをかかえていても
、待っているような処理を行う。こうすることによりて
、プロセッサ1.2間の処理スピードの違いによるデー
タの紛失はさけられる。
As shown in FIG. 7, data is exchanged by providing a shared memory 4 that can be accessed by either processor 1 or processor 2. This shared memory 4
can be used by processor 1 or processor 2 in the same way as its own memory, and an area of this shared memory 4 can be used, for example, for transmitter processor 1 and receiver processor 2.
Decide and allocate addresses separately for use. Therefore,
The sending processor 1 writes data such as instructions or status that it wants to send to the receiving processor 2 as the destination processor in the area assigned to it. This is done just like normal memory access. After writing the data, the transmitting processor 1 sends a KI10 command to the receiving processor 2. The receiving processor 2 is set so that the instruction from the transmitting processor 1 causes an interrupt to the receiving processor 2. The receiving processor 2 also allows the transmitting processor 1 to immediately move on to the next process.
F) Immediately sends back a response signal to terminate the I10 command, etc. The receiving processor 2 may then read and process data such as instructions sent from the transmitting side at any time of its own choosing. At this time, it does not matter whether the transmitting processor is the processor 1t or 2, and it is possible to communicate using the same method. Although the above description has been made regarding the two processors 1 and 2, it is clear that the same method can be used between a plurality of processors. Also, when data is transferred using the method described above, if the processing speeds of both processors 1 and 2 do not match (for example, one processor 1 has a lot of data to send to the other processor 2, but the receiving processor If processor 2 is busy with other processing and does not have time to receive the data, it must confirm receipt of the data.In this case, when the receiving processor 2 completes reception, it clears the area. By clearing (or accepting a certain response pattern), the sending processor 1 is notified that the data has not yet been processed. , even if there is data to be sent, a waiting process is performed.By doing this, data loss due to differences in processing speed between the processors 1 and 2 can be avoided.

第8図は上記の動作を示すツー−チャートである。同図
において、送信エリアと受信エリアは、第7図に示すよ
うに共有メモリ4上で同一のアドレスエリアであり、デ
ータの流れている方向によシ送信エリア、受信エリアと
名ずけられている。
FIG. 8 is a two-chart showing the above operation. In the figure, the transmission area and reception area are the same address area on the shared memory 4 as shown in Figure 7, and are named transmission area and reception area depending on the direction of data flow. There is.

また、送信側プロセッサ1と受信側プロセッサ2が入れ
かわつてもよい様に、各プロセッサ1,2毎に送信エリ
ア(相手側の受信エリア)を分けてあれば、データの混
信はない。
Further, if the transmission area (reception area of the other party) is divided for each processor 1 and 2 so that the transmission side processor 1 and the reception side processor 2 can be interchanged, there will be no data interference.

次に、この第8図の70−チャートについて各ステップ
の動作を説明する。まず、送信側アクセス?1では送信
データが有るか否かおよび共有メモリ4の送信エリアが
空か否かをそれぞれ判定しく、ステップ5T201 、
5T202)送信データ有でない場合および送信エリア
が空でない場合には、送信処理を終了する。一方、ステ
ップ5T202が空である場合には、送信エリアにデー
タを書込み(ステップ5T203 ) 、受信側プロセ
ッサ2である相手先プロセッサに割込通知をする(ステ
ップ5T204 )。
Next, the operation of each step of the chart 70 in FIG. 8 will be explained. First, sender access? In step 1, it is determined whether there is transmission data or not and whether the transmission area of the shared memory 4 is empty, respectively, and in step 5T201,
5T202) If there is no transmission data or if the transmission area is not empty, the transmission process ends. On the other hand, if step 5T202 is empty, data is written in the transmission area (step 5T203), and an interrupt notification is sent to the destination processor, which is the receiving processor 2 (step 5T204).

一方、受信側プロセッサ2ではステップ5T204でな
された割込を処理し、送信側プロセッサ1へ応答すると
ともに(ステップ5T206 )、受信エリアの読取り
を行い(ステップ5T207 ) 、この読取りを行っ
た後に、その受信エリアをクリアして(ステップ5T2
08 )、受信処理を終了する。なお、上記ステップ5
T206で送信側へ応答を返したことを、送信側プロセ
ッサ1で確認したときには(ステップ5T205 )、
送信処理を終了する。
On the other hand, the receiving processor 2 processes the interrupt made in step 5T204, responds to the transmitting processor 1 (step 5T206), and reads the receiving area (step 5T207). Clear the reception area (Step 5T2)
08), the reception process ends. Note that step 5 above
When the sending processor 1 confirms that the response has been returned to the sending side at T206 (step 5T205),
End the sending process.

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

従来のプロセッサ間通信方式は以上の様に構成されてい
るので、例えば送信側プロセッサ1のデータを受信側プ
ロセッサ2に通信している際に送信側プロセッサ1また
は受信側プロセッサ2以外の他のプロセッサより受信側
プロセッサ2に通信を行うとすれば、プロセッサ1,2
.・・・毎に受信エリアを設けると、送信側プロセッサ
1の通信を受信側プロセッサ2が受信完了するまで、上
記他のプロセッサのプロセッサ2への通信を待たせる処
理が必要で、グロセッt1.2.−・・間の通信のオー
バヘッドがかかるほか、プロセッサ1,2.・・・の組
合わせによシ送信エリアと受信エリアを設けると、プロ
セッサ数nに比してn(n−1)/2で共有メモリ4に
おける送受信エリアが増大し、プロセッサの数が多いマ
ルチプロセッサシステムには使えないなどの問題点があ
った。
Since the conventional inter-processor communication system is configured as described above, for example, when data from the transmitting processor 1 is being communicated to the receiving processor 2, other processors other than the transmitting processor 1 or the receiving processor 2 If communication is to be performed to processor 2 on the receiving side, processors 1 and 2
.. . . . If a receiving area is provided for each processor, it is necessary to make the communication to the processor 2 of the other processor wait until the receiving processor 2 completes receiving the communication from the transmitting processor 1, and the gross set t1.2 .. -... In addition to the overhead of communication between processors 1, 2... If a transmission area and a reception area are provided for a combination of It had problems such as not being able to be used with processor systems.

この発明は上記のような問題点を解消するためになされ
たもので、送信側のプロセッサから受信側のプロセッサ
への通信中でありても、さらに他のプロセッサから上記
受信側のプロセッサへの通信ができるとともに、マルチ
プロセッサシステムのプロセッサ数が増大しても、プロ
セッサ数に比して共有メモリの送受信エリアを増大する
のを抑えることができるプロセッサ間通信方式を得るこ
とを目的とする。
This invention was made to solve the above-mentioned problems, and even when communication is in progress from a sending processor to a receiving processor, communication from another processor to the receiving processor can be interrupted. It is an object of the present invention to provide an inter-processor communication method that can suppress an increase in the transmission/reception area of a shared memory compared to the number of processors even if the number of processors in a multiprocessor system increases.

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

この発明に係るプロセッサ間通信方式は、共有メモリを
分割しエリアを割付け、これらの各エリアに、データ有
の情報。
The inter-processor communication method according to the present invention divides a shared memory, allocates areas, and stores information on the presence of data in each of these areas.

相手プロセッサの情報および通信データを格納し、相手
先プロセッサに割込通知することによシ、プロセッサ間
通信を高速で行うようにしたものである。
By storing information and communication data of the other processor and notifying the other processor of an interrupt, communication between processors is performed at high speed.

〔作用〕[Effect]

この発明における共有メモリは、複数のエリアに分割さ
れ、各エリアにはデータ書込中、データ有又はデータ無
の情報、相手プロセッサの情報および通信データが格納
され、送信データが発生される毎に、送信側プロセッサ
が上記共有メモリにおけるデータ無のエリアを捜し、こ
のエリアにデータ有の情報、相手プロセッサの情報1通
信データを格納し、相手先プロセッサである受信側プロ
セッサに通知するように動作する。
The shared memory in this invention is divided into a plurality of areas, and each area stores information on whether data is being written, data presence or no data, information on the other processor, and communication data, and each area stores , the transmitting side processor searches for an area with no data in the shared memory, stores the data presence information and the other party's processor information 1 communication data in this area, and operates to notify the other party's processor, the receiving side processor. .

〔発明の実施例〕[Embodiments of the invention]

以下、この発明の一実施例を図について、説明する。第
1図において、1はプロセッサ、2はプロセッサ、3は
プロセッサ、4は共有メモリである。
An embodiment of the present invention will be described below with reference to the drawings. In FIG. 1, 1 is a processor, 2 is a processor, 3 is a processor, and 4 is a shared memory.

また、12.21はプロセッサ1およびプロセッサ2間
の割込信号、13.31はプロセッサ1およびプロセッ
サ3間の割込信号、23.32はプロセッサ2およびプ
ロセッサ3間の割込信号である。−方、共有メモリ4は
第2図に示すように複数のエリア4AK分割されておシ
、これらのエリア4Aにおいて、4aはデータ無、デー
タ書込中、データ有の情報を書込むデータ状態書込みエ
リア、4bは通信相手のプロセッサ情報を書込むプロセ
ッサ情報書込みエリア、4cは通信データ書込みエリア
である。
Further, 12.21 is an interrupt signal between processor 1 and processor 2, 13.31 is an interrupt signal between processor 1 and processor 3, and 23.32 is an interrupt signal between processor 2 and processor 3. - On the other hand, the shared memory 4 is divided into a plurality of areas 4AK as shown in FIG. Area 4b is a processor information writing area in which processor information of the communication partner is written, and 4c is a communication data writing area.

次に動作について説明する。なお、初期状態においては
共有メモリ4の内容は全て101が格納されているもの
とする。
Next, the operation will be explained. It is assumed that all contents of the shared memory 4 are 101 in the initial state.

初めに1送信側プロセツサとしてのプロセッサ1から受
信側プロセッサとしてのプロセッサ2への送信側処理に
ついて、第3図のフロー図に従って説明する。まず、プ
ロセッサ1は送信データの有無を判定しくステップST
I )、有る場合には送信動作を開始する。次に、プロ
セッサ1は共有メモリ4のエリア4Aにおけるデータ無
のパターン100″が格納されているデータ状態書込み
エリア4aを捜して、これにデータ書込中のパターン”
10″をセットする(ステップST2 )。また、プロ
セッサ1は相手先のプロセッサ情報書込みエリア4bK
、通信相手のプロセッサ2を示すパターンを書込み(ス
テップST3 ’)、送信するデータを通信データ書込
みエリア4cに書込む(ステップST4 )。さらに、
プロセッサ1はデータ状態書込みエリア4aにデータ有
のパターン”20”を書込み(ステップ5T5)、さら
に割込信号12を用い、プロセッサ2に割込を発生させ
、通信要求を通知する(ステップST6 )。次に1プ
ロセツサ1は上記データ状態書込みエリア4aを参照し
、その内容がデータ無のパターンl 001が書込まれ
ているか否かを調べて、書込まれている場合には、通信
の完了を知シ、ステップ5TIK戻る(ステップ5T7
)。
First, the transmitting side processing from the processor 1 as the transmitting side processor to the processor 2 as the receiving side processor will be explained according to the flowchart of FIG. First, the processor 1 determines the presence or absence of transmission data in step ST.
I), if there is one, start the transmission operation. Next, the processor 1 searches for the data state write area 4a in which the no-data pattern 100'' is stored in the area 4A of the shared memory 4, and searches for the data state write area 4a in which the no-data pattern 100'' is stored, and searches for the data state write area 4a in which the no-data pattern 100'' is stored.
10'' (step ST2).The processor 1 also writes the other party's processor information writing area 4bK.
, writes a pattern indicating the processor 2 of the communication partner (step ST3'), and writes data to be transmitted in the communication data writing area 4c (step ST4). moreover,
Processor 1 writes pattern "20" with data in data state writing area 4a (step 5T5), and uses interrupt signal 12 to generate an interrupt to processor 2 to notify a communication request (step ST6). Next, 1 processor 1 refers to the data status writing area 4a, checks whether the pattern 1001 with no data has been written, and if so, indicates the completion of communication. Chishi, step 5TIK return (step 5T7
).

次に、プロセッサ2側の割込処理では、プロセッサ2が
共有メモリ4内のエリア4Aを先頭から順に調べていき
、相手先プロセッサ情報書込みエリア4bの内容を調べ
、自己と一致するパターンが書込まれているか否かを調
べ(ステップ5TII)、自己と一致する場合には、さ
らにデータ状態書込みエリア4aの内容を調べて、デー
タ有のパターン1201が書込まれているかどうかを判
定する(ステップ5T12)。ステップ5TI1.ステ
ップ5T12でそれぞれ自己と一致せず、またはデータ
有でないと判定された場合には、エリア4Aを次に進め
、共有メモリ4の全エリア4Aを調べて、これらの各ス
テップを繰シ返す(ステップ5T13)。一方、ステッ
プ5T13で全エリアを完了すれば、割込処理を終了す
る。
Next, in the interrupt processing on the processor 2 side, the processor 2 sequentially examines the area 4A in the shared memory 4 from the beginning, examines the contents of the destination processor information writing area 4b, and writes a pattern that matches its own. It is checked whether the pattern 1201 with data is written (Step 5 TII), and if it matches the self, the contents of the data status writing area 4a are further checked to determine whether the data presence pattern 1201 is written (Step 5 T12). ). Step 5TI1. If it is determined in step 5T12 that the area 4A does not match with itself or that there is no data, the area 4A is advanced to the next step, all areas 4A of the shared memory 4 are checked, and these steps are repeated (step 5T13). On the other hand, if all areas are completed in step 5T13, the interrupt processing ends.

次に、ステップ5T12でデータ有と判定された場合に
は、プロセッサ2は通信データ書込みエリア4cの内容
を受信し、データを受信エリアに転送しくステップ5T
14)、データ状態書込みエリア4aにデータ無のパタ
ーンloomを書込んで(ステップ5T15)、割込処
理を終了する。
Next, if it is determined in step 5T12 that there is data, the processor 2 receives the contents of the communication data writing area 4c and transfers the data to the receiving area in step 5T.
14) Writes a pattern "LOOM" with no data in the data state writing area 4a (step 5T15), and ends the interrupt processing.

さらに、プロセッサ2の処理では、このプロセッサ2が
エリア4AKデータが有るか否かを調べ(ステップ5T
21)、有ればエリア4Aのデータを処理し、この処理
の終了後に、エリア4Aのデータを消去する(ステップ
5T22)。
Furthermore, in the processing of the processor 2, the processor 2 checks whether or not there is area 4AK data (step 5T).
21) If there is, process the data in area 4A, and after completing this processing, erase the data in area 4A (step 5T22).

第4図は第1図に示すマルチプロセッサシステムによる
他のプロセッサ間通信方式を示すフロー図である。これ
によれば、プロセッサ1からプロセッサ2への送信側処
理における各ステップ5T31〜ステツプ5T37は、
第3図に示す場合の各ステップSTI〜ステップST7
までと同様である。この場合において、ステップ5T3
7では、プロセッサ1はデータ状態書込みエリア4aを
参照し、その内容からデータ受信中のパターンg3ol
が書込まれていることを検知することにょシ、通信完了
を知シ、ステップ5T31に戻る。
FIG. 4 is a flow diagram showing another inter-processor communication method in the multiprocessor system shown in FIG. According to this, each step 5T31 to step 5T37 in the transmission side processing from processor 1 to processor 2 is as follows.
Each step STI to step ST7 in the case shown in FIG.
This is the same as before. In this case, step 5T3
In step 7, the processor 1 refers to the data status writing area 4a and determines the pattern g3ol that is currently receiving data based on its contents.
When it detects that has been written, it knows that the communication is complete and returns to step 5T31.

次に、プロセッサ2側の割込処理では、プロセッサ2は
共有メモリ4のエリア4Aを先端から順に調べていき、
相手先プロセッサ情報書込みエリア4bの内容を調べ、
自己と一致するパターンがあるか否かを調べ(ステップ
5T61)、一致するパターンがある場合には、続いて
データ状態書込みエリア4aを調べ、データ有のパター
ン″20”が書かれているか否かを調べる(ステップ5
T62)。
Next, in the interrupt processing on the processor 2 side, the processor 2 sequentially examines the area 4A of the shared memory 4 from the top,
Check the contents of the destination processor information writing area 4b,
Check whether there is a pattern that matches the self (step 5T61), and if there is a matching pattern, then check the data status writing area 4a and check whether the pattern "20" with data is written. (Step 5)
T62).

ここで、ステップ5T61.ステップ5T62のいずれ
かの判定結果が否定された(NOになる)場合には、エ
リア4Aを先に進めて、共有メモリ4のエリア4A全部
を調べるまで、ステップ5T61の処理を繰少返しくス
テップ5T63)、全てのエリア4Aを完了すれば割込
処理を終了する。一方、ステップ5T62で、データ有
と判定された場合には、データ状態書込みエリア4aに
データ受信中のパターン130“を書込み(ステップ5
T64 ) 、割込処理を終了する。
Here, step 5T61. If any of the determination results in step 5T62 is negative (NO), advance to area 4A and repeat the process in step 5T61 until all areas 4A of shared memory 4 are examined. 5T63), the interrupt processing ends when all areas 4A are completed. On the other hand, if it is determined in step 5T62 that there is data, a pattern 130'' indicating that data is being received is written in the data status writing area 4a (step 5T62).
T64), the interrupt processing ends.

一方、プロセッサ2の処理では、このプロセッサ2が共
有メモリ4のエリア4Aを先頭がら)@に調べていき、
さらに相手先プロセッサ情報書込みエリア4bの内容を
調べ、自己と一致するパターンがあるか否かを判定する
(ステップ5T71)。次に、プロセッサ2はデータ状
態書込みエリア4aの内容を調べて、データ有のパター
ンがあるか否かを調べ、データ有のパターンがない場合
またはステップ5T71で自己と一致するパターンがな
い場合には、エリア4Aを先に進め、このエリア4Aの
全部を調べるまで、ステップ5T71の処理を繰り返す
(ステップ5T73)。ステップ5T72でデータ受信
中である場合には、プロセッサ2は通信データ書込みエ
リア4cの内容を受信し、その内容にもとづく処理を実
行する(ステップ5T74)。続いて、プロセッサ2は
データ状態書込みエリア4aにデータ無のパターンl0
01を書込む(ステップ5T75)。
On the other hand, in the processing of the processor 2, the processor 2 examines the area 4A of the shared memory 4 starting from the beginning)
Furthermore, the contents of the destination processor information writing area 4b are examined to determine whether there is a pattern that matches the self (step 5T71). Next, the processor 2 examines the contents of the data state writing area 4a to check whether there is a pattern with data, and if there is no pattern with data or if there is no pattern that matches itself in step 5T71, , area 4A is advanced, and the process of step 5T71 is repeated until the entire area 4A is examined (step 5T73). If data is being received in step 5T72, processor 2 receives the contents of communication data writing area 4c and executes processing based on the contents (step 5T74). Subsequently, the processor 2 writes a pattern 10 of no data in the data state write area 4a.
01 is written (step 5T75).

第5図はこの発明の他の実施例を説明するマルチプロセ
ッサシステムであシ、これが第1図に示したものと異な
るのは、各プロセッサ1.2.3の相互をつなぐ割込信
号ライン中に、各割込信号12.21 、[3,31,
23,32をそれぞれ選択する割込信号の選択回路14
,15.16,17.18.19を設けた点である。
FIG. 5 shows a multiprocessor system illustrating another embodiment of the present invention. This differs from the one shown in FIG. , each interrupt signal 12.21, [3,31,
Interrupt signal selection circuit 14 that selects signals 23 and 32, respectively.
, 15.16, 17.18.19.

第6図はこの実施例によるプロセッサ間通信方式を示す
70−図である。これによれば、プロセッサ1からプロ
セッサ2への送信側処理におけるステップ5T81〜ス
テツプ5T86は、第3図に示すステップSTI〜ステ
ップST6と同様である。この場合において、ステップ
5T86ではプロセッサ1が割込信号12を用いて、プ
ロセッサ2に割込を発生させ、通信要求を通知し、ステ
ップ5T81に戻る。
FIG. 6 is a diagram 70 showing an inter-processor communication system according to this embodiment. According to this, steps 5T81 to 5T86 in the transmission side processing from processor 1 to processor 2 are similar to steps STI to ST6 shown in FIG. In this case, in step 5T86, processor 1 generates an interrupt to processor 2 using interrupt signal 12, notifies processor 2 of the communication request, and returns to step 5T81.

次に、プロセッサ2の割込処理では、まず、プロセラ?
2が割込通知72グINTに割込受信パターンl FF
 lを書込み(ステップ5T91)、他のプロセッサよ
シの割込信号の選択回路14.16をオフにして割込禁
止としくステップ5T92)、割込処理を終了する。
Next, in the interrupt processing of processor 2, first, the processor?
2 is interrupt notification 72g INT interrupt reception pattern l FF
1 is written (step 5T91), the interrupt signal selection circuit 14.16 for other processors is turned off to disable interrupts (step 5T92), and the interrupt processing is terminated.

一方、プロセッサ2の受信処理では、割込通知フラグI
NTの内容を調べ、割込受信パターン1 FF 1が有
るか否かを判定しくステップ5TIOI )、有る場合
にはカウント値工をクリアする(ステップ5T102)
。次に、プロセッサ2は共有メモリ4内のエリア4Aを
先頭から順に調べていき、さらに相手先のプロセッサ2
の内容を調べて、自己と一致するパターン1B1が書か
れているか否かを判定する(ステップ5T103 )。
On the other hand, in the reception process of the processor 2, the interrupt notification flag I
Check the contents of NT to determine whether interrupt reception pattern 1 FF 1 exists (Step 5TIOI), and if it exists, clear the count value (Step 5T102).
. Next, the processor 2 examines the area 4A in the shared memory 4 in order from the beginning, and then the processor 2 of the other party
, and determines whether a pattern 1B1 that matches the self is written (step 5T103).

この判定の結果、書かれている場合には、データ状態書
込みエリア4aの内容を調べて、データ有のパターンが
有るか否かを判定しくステップ5T104 ) 、デー
タ有のパターンがない場合あるいはステップ5T103
でパターンIB−が書かれていない場合には、ステップ
5T108に移行する。次に、ステップST 104で
データ有と判定された場合には、カウント値Iをインク
リメントしくステップ5T105 ) 、通信データ書
込みエリア4cの内容を受けて、所定のデータ処理を行
う(ステップ5T106 )。また、プロセッサ2はデ
ータ状態書込みエリア4aKデータ無のパターンWoo
lを書込み(ステップ5T107 )、エリア4Aを先
に進めて、共有メモリ4のエリア4Aのすべてを調べて
ステップ5T103以下の処理を繰シ返し実行する(ス
テップ5T108 )。こうして、カウント値■の値を
調べ、0でなければステップ5T102以下の処理を繰
シ返す(ステップ5T109 )。続りて、カウント値
工が0ならば、割込通信フラグINTの内容を調べ、割
込受信パターンII FF lが格納されていなければ
、ステップ5TIOI以下の処理を繰シ返しくステップ
5T110)、割込通知フラグINTに割込完了パター
ンloomを格納する(ステラ7’5T111)。そし
て、他のプロセッサよシの割込信号の選択回路14.1
6をオンにして、割込許可にする(ステップ5T112
)。
As a result of this determination, if it has been written, the contents of the data status writing area 4a are examined to determine whether there is a pattern with data (step 5T104); if there is no pattern with data, or step 5T103
If pattern IB- is not written in step 5T108. Next, if it is determined in step ST104 that there is data, the count value I is incremented (step 5T105), and predetermined data processing is performed based on the contents of the communication data writing area 4c (step 5T106). In addition, the processor 2 also writes data state write area 4aK dataless pattern Woo.
1 is written (step 5T107), the area 4A is advanced, the entire area 4A of the shared memory 4 is examined, and the processing from step 5T103 onward is repeatedly executed (step 5T108). In this way, the value of the count value ■ is checked, and if it is not 0, the processing from step 5T102 onward is repeated (step 5T109). Subsequently, if the count value is 0, the contents of the interrupt communication flag INT are checked, and if the interrupt reception pattern II FF l is not stored, the processes from step 5TIOI are repeated (step 5T110), The interrupt completion pattern room is stored in the interrupt notification flag INT (Stella 7'5T111). And an interrupt signal selection circuit 14.1 for other processors.
6 to enable interrupts (step 5T112
).

なお、上記実施例ではプロセッサ1からプロセッサ2へ
の送信の例を示したが、例えばプロセッサ3からプロセ
ッサ2への送信なども同様にして実行できる。
Although the above embodiment shows an example of transmission from processor 1 to processor 2, transmission from processor 3 to processor 2, for example, can be executed in the same manner.

また、上記実施例ではプロセッサ1.2.3の3台を設
けた場合について述べたが、4台以上としてもよく、上
記実施例と同様の効果を奏する。
Further, in the above embodiment, a case has been described in which three processors 1, 2, and 3 are provided, but four or more processors may be provided, and the same effects as in the above embodiment can be obtained.

〔発明の効果〕〔Effect of the invention〕

以上のように、この発明によれば複数台のプロセッサの
プロセッサ間の通信を共有メモリを複数のエリアに分割
し、送信が発生する毎に、送信プロセッサがデータ無の
上記エリアを捜し、このエリアにデータ有の情報と、相
手プロセッサの情報と、通信データとを格納し、相手プ
ロセッサに通知するように構成したので、プロセッサの
数が増大した場合においても、プロセッサ間通信のオー
バヘッドを減らし、かつ共有メモリのメモリサイX 7
’ oセッサの数が増大しても、プロセッサ数ニ比して
共有メモリを増大する必要のないものが得られる効果が
ある。
As described above, according to the present invention, the shared memory is divided into a plurality of areas for communication between processors of a plurality of processors, and each time a transmission occurs, the transmitting processor searches for the area with no data, and Since the configuration is configured to store data presence information, information on the other processor, and communication data, and notify the other processor, even when the number of processors increases, the overhead of inter-processor communication can be reduced. Memory size of shared memory x 7
' Even if the number of processors increases, there is an effect that the shared memory does not need to be increased compared to the number of processors.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例による共有メモリによるプ
ロセッサ間通信方式を示すマルチプロセッサシステムの
ブロック接続図、第2図はこの発明の一実施例による共
有メモリの構成を示す説明図、第3図はこの発明の一実
施例による共有メモリによるプロセッサ間通信方式の処
理手順を示すフロー図、第4図はこの発明の他の実施例
による共有メモリによるプロセッサ間通信方式の処理手
順を示すフロー図、第5図はこの発明の他の実施例によ
る共有メモリによるプロセッサ間通信方式を示すマルチ
プロセッサシステムを示すブロック接続図、第6図は第
5図に示すプロセッサ間通信方式の処理手順を示すフロ
ー図、第7図は従来の共有メモリによるプロセッサ間通
信方式を示すマルチプロセッサシステムを示すブロック
接続図、第8図は従来の共有メモリによるプロセッサ間
通信方式の処理手順を示すフロー図である。 1.2.3はプロセッサ、4は共有メモリ、Sr2はデ
ータ書込み中パターン書込みステップ、Sr1は相手先
プロセッサ書込みステップ、 Sr1はデータ書込みス
テップ、Sr5はデータ有書込みステップ、 Sr6は
割込発生ステップ、 Sr1は戻システップ、5TII
は内容一致判定ステップ、5T12はデータ有無判定ス
テップ、5T13は全エリア判定ステップ、5T15は
データ無パターン書込みステップ。 なお、図中、同一符号は同一、又は相当部分を示す。
FIG. 1 is a block connection diagram of a multiprocessor system showing an inter-processor communication system using a shared memory according to an embodiment of the present invention, FIG. 2 is an explanatory diagram showing the configuration of a shared memory according to an embodiment of the present invention, and FIG. FIG. 4 is a flowchart showing a processing procedure for an inter-processor communication method using a shared memory according to an embodiment of the present invention, and FIG. 4 is a flowchart showing a processing procedure for an inter-processor communication method using a shared memory according to another embodiment of the invention. , FIG. 5 is a block connection diagram showing a multiprocessor system showing an inter-processor communication method using a shared memory according to another embodiment of the present invention, and FIG. 6 is a flowchart showing the processing procedure of the inter-processor communication method shown in FIG. 7 is a block connection diagram showing a multiprocessor system showing a conventional inter-processor communication method using a shared memory, and FIG. 8 is a flow diagram showing a processing procedure of the conventional inter-processor communication method using a shared memory. 1.2.3 is a processor, 4 is a shared memory, Sr2 is a pattern writing step during data writing, Sr1 is a destination processor writing step, Sr1 is a data writing step, Sr5 is a writing step with data, Sr6 is an interrupt generation step, Sr1 is return step, 5TII
5T12 is a content matching determination step, 5T12 is a data presence/absence determination step, 5T13 is an entire area determination step, and 5T15 is a data-free pattern writing step. In addition, in the figures, the same reference numerals indicate the same or equivalent parts.

Claims (1)

【特許請求の範囲】[Claims] 共有メモリを複数のプロセッサで共通に使用して相互に
データの通信を行うプロセッサ間通信方式において、送
信側のプロセッサが送信を開始する際、上記共有メモリ
内にデータ無のエリアを捜し、このエリアのデータ状態
エリアにデータ書込み中のパターンを書込むデータ書込
み中パターン書込みステップと、この書込みステップに
続いて、上記エリアの相手先プロセッサ情報書込みエリ
アにこの相手先プロセッサを示すパターンを書込む相手
先プロセッサ書込みステップと、上記エリアの通信デー
タ書込みエリアに送信する上記データを書込むデータ書
込みステップと、上記エリアのデータ状態エリアにデー
タ有のパターンを書込むデータ有書込みステップと、送
信側の上記プロセッサから相手先プロセッサに割込を発
生して通信要求する割込発生ステップと、上記相手先プ
ロセッサにおいて、上記共有メモリのエリアを先頭から
順に調べて、各相手先プロセッサ情報書込みエリアの内
容が自己と一致するか否かを判定する内容一致判定ステ
ップと、上記相手先プロセッサがデータ状態エリアの内
容を調べて、データ有か否かを判定するデータ有無判定
ステップと、上記相手先プロセッサ情報書込みエリアの
内容が自己と一致せず、または上記データ有でない場合
に、次のエリアを順次調べて、これを全部のエリアにつ
いて実施した後割込終了とする全エリア判定ステップと
、上記相手先プロセッサがデータ状態エリアにデータ無
のパターンを書込んで、割込処理を終了するデータ無パ
ターン書込みステップと、上記データ状態エリアへのデ
ータ無のパターンの書込みを検出したとき、送信側プロ
セッサが通信の完了を判定して上記パターン書込みステ
ップに戻る戻りステップとを備えたプロセッサ間通信方
式。
In an inter-processor communication method in which a shared memory is commonly used by multiple processors to mutually communicate data, when a transmitting processor starts transmission, it searches for an area with no data in the shared memory and stores data in this area. A data writing pattern write step in which the pattern that is currently being written is written in the data status area of the destination device, and following this writing step, a pattern indicating this destination processor is written in the destination processor information write area in the above area. a processor write step, a data write step of writing the above data to be sent to the communication data write area of the above area, a data presence write step of writing a pattern with data in the data status area of the above area, and the above processor on the sending side. an interrupt generation step in which an interrupt is generated to request communication from the target processor, and the target processor examines the area of the shared memory in order from the beginning, and determines that the contents of the information write area of each target processor are the same as its own. a content match determination step for determining whether or not there is a match; a data presence/absence determination step for the destination processor to examine the contents of the data status area and determine whether or not there is data; If the content does not match the self or the above data does not exist, the next area is sequentially checked and the interrupt is terminated after this is carried out for all areas. A no-data pattern write step that writes a no-data pattern to the status area and ends interrupt processing, and when the no-data pattern is detected to be written to the data status area, the sending processor indicates the completion of communication. and a return step of making a determination and returning to the pattern writing step.
JP2761389A 1989-02-08 1989-02-08 Inter-processor communication system Pending JPH02207366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2761389A JPH02207366A (en) 1989-02-08 1989-02-08 Inter-processor communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2761389A JPH02207366A (en) 1989-02-08 1989-02-08 Inter-processor communication system

Publications (1)

Publication Number Publication Date
JPH02207366A true JPH02207366A (en) 1990-08-17

Family

ID=12225788

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2761389A Pending JPH02207366A (en) 1989-02-08 1989-02-08 Inter-processor communication system

Country Status (1)

Country Link
JP (1) JPH02207366A (en)

Similar Documents

Publication Publication Date Title
JPS62206658A (en) storage management device
US7069305B2 (en) Computer system and a data transfer method thereof using remote direct memory access
CN113535425A (en) A data transmission method, device, electronic device and storage medium
US7062588B2 (en) Data processing device accessing a memory in response to a request made by an external bus master
JP3481308B2 (en) Interface device, data transfer system and data transfer method
US20020040414A1 (en) Multiprocessor system and transaction control method for the same
JPH02207366A (en) Inter-processor communication system
US5943509A (en) Small size inter-processor data transfer system
EP0169909B1 (en) Auxiliary memory device
JPS61165170A (en) Bus controlling system
US6904481B1 (en) Bus sequence operation with automatic linking from current I/O information to subsequent I/O information
JP2522412B2 (en) Communication method between programmable controller and input / output device
JP3356110B2 (en) Function expansion system and data transfer method used therefor
JP3056169B2 (en) Data transmission / reception method and method
JP4411138B2 (en) Data flow control system, circuit thereof, and method thereof
JP2573790B2 (en) Transfer control device
JPH04287456A (en) Transmission controller
JPS61165160A (en) Bus controlling system
JP2948380B2 (en) Data communication device
JP3594952B2 (en) A link between the central system and the satellite system to perform operations of the central system
JPH03131953A (en) Inter-processor communication equipment
JPH0573509A (en) Communication method between processors
JPH103463A (en) Communication method between processors
JPH03180959A (en) Interface circuit
JPH0511339B2 (en)