JPH08137738A - Cpu arbitration circuit - Google Patents

Cpu arbitration circuit

Info

Publication number
JPH08137738A
JPH08137738A JP6277640A JP27764094A JPH08137738A JP H08137738 A JPH08137738 A JP H08137738A JP 6277640 A JP6277640 A JP 6277640A JP 27764094 A JP27764094 A JP 27764094A JP H08137738 A JPH08137738 A JP H08137738A
Authority
JP
Japan
Prior art keywords
cpu
shared memory
read
address
designated
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
JP6277640A
Other languages
Japanese (ja)
Inventor
Tsukasa Saito
司 齊藤
Takashi Shibamata
敬 柴又
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
NEC Miyagi Ltd
Original Assignee
NEC Corp
NEC Miyagi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, NEC Miyagi Ltd filed Critical NEC Corp
Priority to JP6277640A priority Critical patent/JPH08137738A/en
Publication of JPH08137738A publication Critical patent/JPH08137738A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To eliminate the excessive processings of respective CPU by immediately inputting an interruption signal to CPU on a read-side when CPU on a writing-side terminates writing into a shared memory at the time of transferring data between CPU. CONSTITUTION: Monitor circuits 6 and 7 monitor whether respective address signals A1, A2 transmitted from CPU 1 and 2 are matched with designated addresses or not. When they are matched, designated address access signals B1 and B2 are transmitted, the completion of the reading of data from the shared memory 5 by CPU 1 and 2 are detected and shared memory read completion signals C1 and C2 are transmitted. An arbitration circuit 8 transmits the interruption signals E1 and E2 of a read request to CPU 2 on the read-side in response to designated address access B1 and B2 and releases the transmission of the interruption signals E1 and E2 in response to the shared memory read completion signals C1 and C2. Thus, respective CPU 1 and 2 need only to read and write data from/into the shared memory 5, and the excessive processings become unnecessary.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は調停回路に関し、特にマ
スタCPU(セントラル・プロセッサ・ユニット)及び
サブマスタCPUなどの複数のCPU間にて使用される
共有メモリ対するCPUの調停回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arbitration circuit, and more particularly to an arbitration circuit of a CPU for a shared memory used among a plurality of CPUs such as a master CPU (central processor unit) and a submaster CPU.

【0002】[0002]

【従来の技術】CPUを用いた制御システムなどにおい
て、複数個のCPUを併設して使用し処理を分散させる
構成が、システムの処理能力の向上や性能の向上を目的
として使用される。このような場合に、マルチCPU間
の情報の伝送のために各CPUで共通に読み書き可能な
共有メモリを設け、CPU間で交換する情報をその共有
メモリへの書き込み、読出しを行うことにより情報伝達
を行う。
2. Description of the Related Art In a control system or the like using a CPU, a structure in which a plurality of CPUs are installed side by side and processing is distributed is used for the purpose of improving the processing capacity and performance of the system. In such cases, a shared readable / writable shared memory is provided for each CPU to transfer information between the multiple CPUs, and information exchanged between the CPUs is written to and read from the shared memory to transfer information. I do.

【0003】図3は、マルチCPU1及び2が共有メモ
リ5を利用する従来の方式を例示するブロック図であ
る。同図において、CPU1及びCPU2はそれぞれ、
アドレス/コントロールバスA1,A2とデータバスD
1、D2とを有しており、共有メモリ5にはアドレス/
コントロールバスA3及びデータバスD3が接続されて
いる。CPU1及びCPU2はそれぞれのゲート回路3
及び4を介し、さらにアドレス/コントロールバスA3
及びデータバスD3を介して共有メモリ5へのアクセス
を行う。
FIG. 3 is a block diagram illustrating a conventional method in which the multiple CPUs 1 and 2 utilize the shared memory 5. In the figure, CPU1 and CPU2 are respectively
Address / control buses A1 and A2 and data bus D
1 and D2, and the shared memory 5 has an address /
The control bus A3 and the data bus D3 are connected. CPU1 and CPU2 are gate circuits 3 respectively
And via address bus A3
Also, the shared memory 5 is accessed via the data bus D3.

【0004】CPU1及びCPU2間でのデータの受け
渡しは、共有メモリ5を使って行われる。例えばCPU
1からCPU2へ情報の伝達をする場合、CPU1から
の書き込みデータは、ゲート回路3を経由して共有メモ
リ5に書き込まれる。共有メモリ5に書き込まれたデー
タは、CPU2が周期的に読み出しを行い、CPU1か
らの書き込み情報を更新する。逆にCPU2からCPU
1へ情報を伝達する場合、CPU2からの書き込みデー
タは、ゲート回路4を経由して共有メモリ5に書き込ま
れ、共有メモリ5の書き込みデータは、CPU1が周期
的に読み出しを行い、CPU2からの書き込みデータを
更新する。
Data is transferred between the CPU 1 and the CPU 2 by using the shared memory 5. CPU
When transmitting information from 1 to the CPU 2, write data from the CPU 1 is written in the shared memory 5 via the gate circuit 3. The CPU 2 periodically reads the data written in the shared memory 5, and the write information from the CPU 1 is updated. Conversely, CPU2 to CPU
When transmitting information to 1, the write data from the CPU 2 is written to the shared memory 5 via the gate circuit 4, and the write data of the shared memory 5 is periodically read by the CPU 1 and written from the CPU 2. Update the data.

【0005】一方のCPUの読み出すタイミングが他方
の書き込むタイミングより早い場合には、そのCPUの
読み出したデータは他方から書き込む前のデータのまま
であり、更新データを読み落さないようにするには、読
み出す側のCPUが周期的に共有メモリ5のデータを読
み出す必要がある。
When the reading timing of one CPU is earlier than the writing timing of the other CPU, the data read by the CPU remains the data before being written from the other CPU, and it is necessary to prevent the update data from being missed. The CPU on the reading side needs to periodically read the data in the shared memory 5.

【0006】[0006]

【発明が解決しようとする課題】上述したように従来の
共有メモリでは、CPU1及びCPU2での読み書きの
周期が非同期のまま処理しているために、読み出し側で
は、書き込み側が共有メモリにどの時点でデータを更新
したかわからず、書き込みの有無にかかわらず周期的に
共有メモリ5のデータを読み出す必要があり、余分な処
理時間を浪費することが多いという問題点がある。
As described above, in the conventional shared memory, the reading and writing cycles of the CPU1 and CPU2 are processed asynchronously. There is a problem in that it is necessary to periodically read the data in the shared memory 5 regardless of whether or not the data has been written, regardless of whether the data has been updated, and extra processing time is often wasted.

【0007】[0007]

【課題を解決するための手段】本発明の回路は、複数の
CPUからアクセス可能に設けてあり1つのCPUから
のデータ書き込み終了を表わすための少くとも1つのア
ドレスが指定されている1つの共有メモリと、前記CP
Uから送出される各アドレス信号が前記指定アドレスに
一致する否かを監視して一致時に指定アドレスアクセス
信号を送出し、また各前記CPUが前記共有メモリから
のデータ読み出しを完了したのを検出して共有メモリ読
出完了信号を送出する複数の監視回路と、前記指定アド
レスアクセス信号に応答して読み出し側の前記CPUへ
読み出し要求の割り込み信号を送出し、また前記共有メ
モリ読出完了信号に応答して前記割り込み信号の送出を
解除する1つの調停回路とを備えている。
The circuit of the present invention is provided so that it can be accessed by a plurality of CPUs, and at least one address is designated to indicate the end of data writing from one CPU. Memory and the CP
It monitors whether each address signal sent from U matches the designated address, sends a designated address access signal when they match, and detects that each CPU has completed reading data from the shared memory. A plurality of monitoring circuits for transmitting a shared memory read completion signal, a read request interrupt signal to the read side CPU in response to the designated address access signal, and a shared memory read complete signal in response to the shared memory read completion signal. One arbitration circuit for canceling the transmission of the interrupt signal.

【0008】[0008]

【実施例】次に、本発明について図面を参照して説明す
る。
Next, the present invention will be described with reference to the drawings.

【0009】図1は、本発明の一実施例を示すブロック
図であり、参照番号1及び2はCPU、3及び4はゲー
ト回路、5は共有メモリ、6及び7はアドレス監視回
路、8は調停回路をそれぞれ示す。同図において、共有
メモリ5はCPU1またはCPU2からみたアドレス空
間を2分割されている。すなわち図2に例示するよう
に、共有メモリ5は、CPU1が書き込みを行いCPU
2が読み出しを行うアドレス空間Aと、CPU2が書き
込みを行いCPU1の読み出しを行うアドレス空間Bと
に2分割してある。アドレス監視回路6及び7は、アド
レス/コントロールバスA1及びA2のアドレス/コン
トロール信号を受信しながら、CPU1及びCPU2が
それぞれ共有メモリ5にアクセスしている状況を監視し
ている。CPU1(またはCPU2)は、共有メモリ5
のアドレス空間A(B)に対し一まとまりのデータを連
続的あるいは断続的に書き込んでいき、そのデータを全
て書き込み終えたらすぐにアドレス空間A内に予め指定
してあるアドレスa(b)をアクセスしたあと、データ
書き込みのアクセスを完了する。アドレス監視回路6
(7)においては、指定アドレスa(b)を受信した時
に指定アドレスアクセス信号B1(B2)を調停回路8
に送出する。調停回路8は、アドレス監視回路6(7)
から指定アドレスアクセス信号B1(B2)を入力され
と、書き込み側のCPU1(2)がアドレス/コントロ
ールバスA3を開放したとみなし、割り込み信号E2
(E1)をCPU2(1)、に送出する。CPU2
(1)は、割り込み信号E2(E1)を検出すると、共
有メモリ5の読み出しを行う。アドレス監視回路7
(6)は、その読み出し状況を検出して完了時に調停回
路8に対し共有メモリ読出完了信号C2(C1)を送出
する。調停回路8は、共有メモリ読出完了信号C2(C
1)に応答して送出中の割り込み信号E2(E1)を解
除する。また調停回路8は、共有メモリ5のアドレス/
コントロールバスA3及びデータバスD3へのゲート開
放をCPU1及びCPU2のいずれかにするかを、バス
開放制御信号G1及びG2のいずれかを送出するかによ
り制御する。
FIG. 1 is a block diagram showing an embodiment of the present invention. Reference numerals 1 and 2 are CPUs, 3 and 4 are gate circuits, 5 is a shared memory, 6 and 7 are address monitoring circuits, and 8 is a reference numeral. Each arbitration circuit is shown. In the figure, the shared memory 5 is divided into two address spaces as viewed from the CPU 1 or the CPU 2. That is, as illustrated in FIG. 2, the shared memory 5 is written by the CPU 1
2 is divided into an address space A in which 2 reads and an address space B in which the CPU 2 writes and reads from the CPU 1. The address monitoring circuits 6 and 7 monitor the situation where the CPU 1 and the CPU 2 are accessing the shared memory 5, respectively, while receiving the address / control signals of the address / control buses A1 and A2. CPU1 (or CPU2) is shared memory 5
Of the address space A (B) is continuously or intermittently written, and immediately after writing all the data, the address a (b) specified in advance in the address space A is accessed. After that, the data write access is completed. Address monitoring circuit 6
In (7), when the designated address a (b) is received, the designated address access signal B1 (B2) is sent to the arbitration circuit 8.
Send to. The arbitration circuit 8 is the address monitoring circuit 6 (7).
When the designated address access signal B1 (B2) is input from the CPU 1, it is considered that the writing side CPU 1 (2) has opened the address / control bus A3, and the interrupt signal E2
(E1) is sent to CPU2 (1). CPU2
When detecting the interrupt signal E2 (E1), (1) reads the shared memory 5. Address monitoring circuit 7
(6) detects the read state and sends the shared memory read completion signal C2 (C1) to the arbitration circuit 8 upon completion. The arbitration circuit 8 uses the shared memory read completion signal C2 (C
In response to 1), the interrupt signal E2 (E1) being sent is released. Further, the arbitration circuit 8 uses the address of the shared memory 5 /
Which of the CPU1 and CPU2 is used to open the gate to the control bus A3 and the data bus D3 is controlled by sending either of the bus open control signals G1 and G2.

【0010】上述した割り込み発生手順をさらに具体的
な動作例について説明する。CPU1は、共有メモリ5
のアドレス空間Aにデータを書き込み終了した直後に、
アドレス空間A内の指定アドレスaに対しアドレス設定
を行う。この指定アドレスaは、CPU2と共用しても
良い。アドレスaが設定されたことを検出したアドレス
監視回路6は、それを指定アドレスアクセス信号B1に
より調停回路8に通知する。調停回路8は、その通知を
受けるとアドレス/コントロールバスA3が開放された
とみなし、CPU2に対して割り込み信号E2を送出す
る。CPU2は、割り込み信号E2を受けると共有メモ
リ5のアドレス空間Aのデータが更新されたと判断し、
その内容の読み出しを行う。CPU2の読み出しが完了
したことを検出すると、監視回路7は、調停回路8に共
有メモリ読出完了信号C2を送出する。調停回路8で
は、この共有メモリ読出完了信号C2を受けたら割り込
み信号E2を解除する。この一連の動作により、CPU
1から共有メモリ5へのデータ更新があると、すぐCP
U2でその更新データを読み取ることができる。
A more specific operation example of the above-described interrupt generation procedure will be described. CPU1 is shared memory 5
Immediately after writing data to the address space A of
The address is set to the designated address a in the address space A. This designated address a may be shared with the CPU 2. The address monitoring circuit 6 which has detected that the address a has been set notifies the arbitration circuit 8 of it by the designated address access signal B1. Upon receiving the notification, the arbitration circuit 8 considers that the address / control bus A3 has been opened, and sends an interrupt signal E2 to the CPU 2. Upon receiving the interrupt signal E2, the CPU 2 determines that the data in the address space A of the shared memory 5 has been updated,
The content is read. When detecting that the reading of the CPU 2 is completed, the monitoring circuit 7 sends a shared memory reading completion signal C2 to the arbitration circuit 8. The arbitration circuit 8 releases the interrupt signal E2 when receiving the shared memory read completion signal C2. By this series of operations, the CPU
As soon as there is a data update from 1 to the shared memory 5, CP
The updated data can be read by U2.

【0011】以上説明したように実施例では、書き込み
側のCPU1(または2)が共有メモリ5に書き込み終
了するとすぐに、読み出し側のCPU2(または1)に
割り込み信号E2(またはE1)が入力されるので、各
CPUは周期的に共有メモリ5を読み出す必要が無くな
り、一方からの書き込み終了時にすぐ他方で読み出すこ
とができる。すなわち、各CPUは周期的処理や外部ポ
ート制御を実行しなくとも共有メモリ5への読み書きを
行えば済むから、各CPUでの余分な処理が不必要にな
る。
As described above, in the embodiment, the interrupt signal E2 (or E1) is input to the CPU 2 (or 1) on the reading side as soon as the CPU 1 (or 2) on the writing side finishes writing to the shared memory 5. Therefore, each CPU does not need to read the shared memory 5 periodically, and when the writing from one ends, the other can immediately read. That is, each CPU only needs to read from and write to the shared memory 5 without executing periodical processing or external port control, so that extra processing in each CPU becomes unnecessary.

【0012】[0012]

【発明の効果】以上説明したように本発明によれば、C
PU間のデータ転送時に書き込み側のCPUが共有メモ
リへの書き込みを終了したとき、すぐに読み出し側のC
PUに割り込み信号が入力されるので、読み出し側のC
PUでは従来のような周期的に共有メモリを読み出す必
要がなくなり、一方からの書き込み終了時にすぐ他方か
ら読み出すことができる。すなわち、各CPUは周期処
理や外部ポート制御を実行しなくとも共有メモリへの読
み書きのみを行えば良いから、各CPUでは従来のよう
な余分な処理が不必要になる。
As described above, according to the present invention, C
When the writing side CPU finishes writing to the shared memory during data transfer between PUs, the reading side C
Since an interrupt signal is input to PU, C on the read side
The PU does not need to periodically read the shared memory as in the conventional case, and can immediately read from the other when writing from one is completed. That is, each CPU only needs to read from and write to the shared memory without executing the periodic processing or the external port control, and therefore each CPU does not need the extra processing as in the prior art.

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

【図1】本発明の一実施例のブロック図。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】本発明の実施例における共有メモリ5の内部ブ
ロック図。
FIG. 2 is an internal block diagram of the shared memory 5 according to the embodiment of the present invention.

【図3】従来の共有メモリ方式を例示するブロック図。FIG. 3 is a block diagram illustrating a conventional shared memory system.

【符号の説明】[Explanation of symbols]

1、2 CPU 3、4 ゲート回路 5 共有メモリ 6、7 アドレス監視回路 8 調停回路 A1、A2、A3 アドレス/コントロール信号 D1、D2、D3 データバス B1、B2 指定アドレスアクセス信号 C1、C2 共有メモリ読出完了信号 E1、E2 割り込み信号 G1、G2 バス開放制御信号 1, 2 CPU 3, 4 Gate circuit 5 Shared memory 6, 7 Address monitoring circuit 8 Arbitration circuit A1, A2, A3 Address / control signal D1, D2, D3 Data bus B1, B2 Designated address access signal C1, C2 Shared memory read Completion signal E1, E2 Interrupt signal G1, G2 Bus release control signal

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数のCPUからアクセス可能に設けて
あり1つのCPUからのデータ書き込み終了を表わすた
めの少くとも1つのアドレスが指定されている1つの共
有メモリと、前記CPUから送出される各アドレス信号
が前記指定アドレスに一致する否かを監視して一致時に
指定アドレスアクセス信号を送出し、また各前記CPU
が前記共有メモリからのデータ読み出しを完了したのを
検出して共有メモリ読出完了信号を送出する複数の監視
回路と、前記指定アドレスアクセス信号に応答して読み
出し側の前記CPUへ読み出し要求の割り込み信号を送
出し、また前記共有メモリ読出完了信号に応答して前記
割り込み信号の送出を解除する1つの調停回路とを備え
ていることを特徴とするCPU調停回路。
1. A shared memory provided so as to be accessible from a plurality of CPUs and having at least one address designated to indicate the end of data writing from one CPU, and each of the shared memories sent from the CPUs. Whether or not the address signal matches the designated address is monitored and a designated address access signal is sent out when the addresses match, and each of the CPUs
A plurality of monitoring circuits that detect completion of data reading from the shared memory and send a shared memory read completion signal, and a read request interrupt signal to the read side CPU in response to the designated address access signal. And one arbitration circuit that releases the interrupt signal in response to the shared memory read completion signal.
【請求項2】 前記共有メモリは、前記CPUごとに相
異なるアドレス空間を分割し割当ててある請求項1記載
のCPU調停回路。
2. The CPU arbitration circuit according to claim 1, wherein the shared memory divides and allocates different address spaces for each of the CPUs.
【請求項3】 前記共有メモリは、前記CPUごとに相
異なる前記指定アドレスが指定されている請求項1記載
のCPU調停回路。
3. The CPU arbitration circuit according to claim 1, wherein the designated address different for each CPU is designated in the shared memory.
JP6277640A 1994-11-11 1994-11-11 Cpu arbitration circuit Pending JPH08137738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6277640A JPH08137738A (en) 1994-11-11 1994-11-11 Cpu arbitration circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6277640A JPH08137738A (en) 1994-11-11 1994-11-11 Cpu arbitration circuit

Publications (1)

Publication Number Publication Date
JPH08137738A true JPH08137738A (en) 1996-05-31

Family

ID=17586254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6277640A Pending JPH08137738A (en) 1994-11-11 1994-11-11 Cpu arbitration circuit

Country Status (1)

Country Link
JP (1) JPH08137738A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7929020B2 (en) 2003-02-26 2011-04-19 Casio Computer Co., Ltd. Camera device and method and program for starting the camera device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01233651A (en) * 1988-03-15 1989-09-19 Fujitsu Ltd Communication control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01233651A (en) * 1988-03-15 1989-09-19 Fujitsu Ltd Communication control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7929020B2 (en) 2003-02-26 2011-04-19 Casio Computer Co., Ltd. Camera device and method and program for starting the camera device

Similar Documents

Publication Publication Date Title
EP1646925B1 (en) Apparatus and method for direct memory access in a hub-based memory system
JP2591502B2 (en) Information processing system and its bus arbitration system
CA1269771A (en) Method for bus access for data transmission through a multiprocessor bus
JPH08137738A (en) Cpu arbitration circuit
JPH10307788A (en) Bus bridge
JP2906197B2 (en) Duplex bus device
JP2000155738A (en) Data processor
JP2573790B2 (en) Transfer control device
JP2574821B2 (en) Direct memory access controller
KR100380328B1 (en) Down prevention device at board disconnection of exchange system
JPH1055341A (en) Interface control system
JPH0114616B2 (en)
JP2837522B2 (en) I / O instruction control method
JPH02211571A (en) Information processor
JPH0527146B2 (en)
JPS60118967A (en) Multiprocessor system
JPH0429101B2 (en)
JPH0512219A (en) Process transferring system
JPH058462B2 (en)
JPH02277142A (en) Duplex computer system
JPH06223031A (en) Transfer controller
WO1993010499A1 (en) Device for transmission of data
JPH0784972A (en) Data communication system
JPH02301837A (en) Multiple system processing system
JPS62184564A (en) Electronic computer control system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970506