JPH0677251B2 - Slave processor control system - Google Patents
Slave processor control systemInfo
- Publication number
- JPH0677251B2 JPH0677251B2 JP27014386A JP27014386A JPH0677251B2 JP H0677251 B2 JPH0677251 B2 JP H0677251B2 JP 27014386 A JP27014386 A JP 27014386A JP 27014386 A JP27014386 A JP 27014386A JP H0677251 B2 JPH0677251 B2 JP H0677251B2
- Authority
- JP
- Japan
- Prior art keywords
- processor
- slave
- slave processor
- master
- master 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
Links
Landscapes
- Advance Control (AREA)
- Multi Processors (AREA)
Description
【発明の詳細な説明】 〈産業上の利用分野〉 本発明はスレーブ・プロセッサの制御方式に係わり、特
にマスタ・プロセッサとスレーブ・プロセッサとの接続
状態を検出するための制御方式に関する。The present invention relates to a control system for a slave processor, and more particularly to a control system for detecting a connection state between a master processor and a slave processor.
〈従来の技術〉 大規模集積回路(LSI)として1チップ上に形成される
マイクロプロセッサでは、チップ内に集積できる素子数
に限りがあるため、浮動小数点演算などの高機能な命令
を実行するのは困難である。そこで、命令セットを基本
命令と大規模な演算回路を必要とする高機能命令とに分
割し、基本命令をマスタ・プロセッサに、高機能命令を
スレーブ・プロセッサに、実行させる方法が広く用いら
れている。マスタ・プロセッサとは単独でも中央処理装
置(CPU)として動作できるプロセッサである。スレー
ブ・プロセッサとは、マスタ・プロセッサでは実行でき
ない高機能命令等をマスタ・プロセッサに代って実行す
るプロセッサである。マスタ・プロセッサ及びスレーブ
・プロセッサは各々1チップのLSIで構成され、チップ
間の接続を少なくし、各チップの端子数を最小限にする
ため、マスタ・プロセッサと主記憶装置間のデータ・バ
スをスレーブ・プロセッサと共有するのが普通である。<Prior Art> In a microprocessor formed on a single chip as a large-scale integrated circuit (LSI), there is a limit to the number of elements that can be integrated in the chip, so high-performance instructions such as floating-point arithmetic are executed. It is difficult. Therefore, a method is widely used in which the instruction set is divided into a basic instruction and a high-performance instruction that requires a large-scale arithmetic circuit, and the basic instruction is executed by a master processor and the high-performance instruction is executed by a slave processor. There is. A master processor is a processor that can operate as a central processing unit (CPU) by itself. The slave processor is a processor that executes, in place of the master processor, high-performance instructions that cannot be executed by the master processor. The master processor and the slave processor are each composed of a one-chip LSI. In order to reduce the connections between chips and minimize the number of terminals on each chip, the data bus between the master processor and the main memory is It is usually shared with slave processors.
マスタ・プロセッサとスレーブ・プロセッサとをそれぞ
れ1チップで実現した例としてNS32332とNS32081とがあ
る。マスタ・プロセッサNS32332とスレーブ・プロセッ
サNS32081との間のインターフェースおよび通信手順は
「NS32332 32−Bit Advanced Microprocessor with Vir
tual Memory, 1985 National Semiconductor Corporati
on」に記載されている。NS32332 and NS32081 are examples in which a master processor and a slave processor are realized by one chip. The interface and communication procedure between the master processor NS32332 and the slave processor NS32081 are described in "NS32332 32-Bit Advanced Microprocessor with Vir.
tual Memory, 1985 National Semiconductor Corporati
on ”.
従来例のハードウエア構成を第5図に示す。マスタ・プ
ロセッサ110はシステムの中央処理装置として機能し、
スレーブ・プロセッサ120はマスタ・プロセッサ110の拡
張命令を実行する。メモリ130はマスタ・プロセッサ110
によってアクセスされる主記憶装置である。アドレス・
データ・バス144はマスタ・プロセッサ110、スレーブ・
プロセッサ120、メモリ130の間でデータを送受信するた
めのバスであり、バス・ステータス143はマスタ・プロ
セッサ110によって駆動され、アドレス・データ・バス1
44上のアドレス/データの送信装置および受信装置がマ
スタ・プロセッサ110かメモリ130かスレーブ・プロセッ
サ120かを指定するために使用される。スレーブ・プロ
セッサ存在フラグ115はマスタ・プロセッサ110に含まれ
ており、マスタ・プロセッサ110にスレーブ・プロセッ
サ120が接続されているか否かを示す。マスタ・プロセ
ッサ110は、前記スレーブ・プロセッサ存在フラグ115の
値によって制御の流れを分岐させることができる。終了
信号153は、スレーブ・プロセッサ120上での演算の実行
終了をロウ(low)レベルのパルスで示す負論理の信号
であり、スレーブ・プロセッサ120とオープン・ドレイ
ン接続されており、駆動されていないときはプルアップ
抵抗152によってハイ(high)レベルに保たれている。
マスタ・プロセッサ110は前記終了信号153の供給を受
け、終了信号153のレベルによって制御の流れを分岐さ
せることができる。A hardware configuration of a conventional example is shown in FIG. The master processor 110 functions as the central processing unit of the system,
Slave processor 120 executes the extension instructions of master processor 110. Memory 130 is the master processor 110
Is a main storage device accessed by. address·
Data bus 144 consists of master processor 110, slave
A bus for transmitting and receiving data between the processor 120 and the memory 130, the bus status 143 is driven by the master processor 110, and the address data bus 1
Address / data senders and receivers on 44 are used to designate master processor 110, memory 130, or slave processor 120. The slave processor present flag 115 is included in the master processor 110 and indicates whether or not the slave processor 120 is connected to the master processor 110. The master processor 110 can branch the flow of control according to the value of the slave processor present flag 115. The end signal 153 is a negative logic signal indicating the end of execution of the operation on the slave processor 120 with a low level pulse, and is open-drain connected to the slave processor 120 and is not driven. At this time, it is kept at a high level by the pull-up resistor 152.
The master processor 110 is supplied with the end signal 153 and can branch the control flow according to the level of the end signal 153.
スレーブ・プロセッサ120用命令をマスタ・プロセッサ1
10がデコードしたときのマスタ・プロセッサ110の動作
を説明するフローチャートを第6図に示す。第6図で実
行される命令は、A+B→Bの様な二項演算であり、前
記Aを第1オペランド、前記Bを第2オペランドと呼
ぶ。先ず、マスタ・プロセッサ110はスレーブ・プロセ
ッサ存在フラグ115をチェックし(601)、スレーブ・プ
ロセッサ120がマスタ・プロセッサ110に接続されていれ
ば後述の手順を行なう。一方、スレーブ・プロセッサ12
0がマスタ・プロセッサ110に接続されていなければ、マ
スタ・プロセッサ110は後述の手順を行なわず未定義命
令例外を発生する(610)。Master processor 1 with instructions for slave processor 120
A flowchart illustrating the operation of master processor 110 when 10 is decoded is shown in FIG. The instruction executed in FIG. 6 is a binary operation such as A + B → B. The A is called the first operand and the B is called the second operand. First, the master processor 110 checks the slave processor present flag 115 (601), and if the slave processor 120 is connected to the master processor 110, the procedure described below is performed. Meanwhile, slave processor 12
If a 0 is not connected to master processor 110, master processor 110 does not perform the procedure described below and issues an undefined instruction exception (610).
スレーブ・プロセッサ存在フラグ115がスレーブ・プロ
セッサ120の存在を示していると、マスタ・プロセッサ1
10はスレーブ・プロセッサ120用命令の命令コードを、
バス・ステータス143とアドレス・データ・バス144とを
操作してスレーブ・プロセッサ120に転送する(602)。
次に、マスタ・プロセッサ110は、メモリ130から第1オ
ペランドのデータを(必要ならば)バス・ステータス14
3とアドレス・データ・バス144とを操作してスレーブ・
プロセッサ120に転送し(603)、同様に第2オペランド
を(必要ならば)スレーブ・プロセッサ120に転送する
(604)。前記スレーブ・プロセッサ用命令の実行に必
要な命令コードとデータが全て転送されると、スレーブ
・プロセッサ120は演算を実行し始め、演算実行が終了
後、終了信号153を一定期間ロウレベルに移行させる。
マスタ・プロセッサ110は、終了信号153をチェックする
ことにより演算ユニット121の演算が終了するまで待つ
(605)。その後、マスタ・プロセッサ110はスレーブ・
プロセッサ120から状態を示す値(ステータス)をアド
レス・データ・バス144を介して入力し(606)、前記ス
テータスの値をチェックして(607)、ステータスの値
が正常終了を示した場合は、バス・ステータス143とア
ドレス・データ・バス144とを操作してスレーブ・プロ
セッサ120から演算結果を読みだしてメモリ130上の第2
オペランドに書き込み(608)、命令を終了する。ステ
ータスのチェック(607)において、ステータスの値が
演算において例外事象が発生したことを示した場合に
は、マスタ・プロセッサ110はスレーブ・プロセッサ演
算例外を発生する(609)。When the slave processor present flag 115 indicates the presence of the slave processor 120, the master processor 1
10 is the instruction code of the instruction for the slave processor 120,
The bus status 143 and the address / data bus 144 are operated to transfer to the slave processor 120 (602).
Next, the master processor 110 transfers the data of the first operand from the memory 130 to the bus status 14 (if necessary).
3 and address data bus 144 to operate the slave
Transfer to processor 120 (603) and likewise transfer the second operand (if necessary) to slave processor 120 (604). When all the instruction codes and data necessary for executing the slave processor instruction have been transferred, the slave processor 120 starts executing the operation, and after the execution of the operation ends, the end signal 153 is shifted to the low level for a certain period.
The master processor 110 waits until the operation of the arithmetic unit 121 is completed by checking the end signal 153 (605). After that, the master processor 110
A value indicating the status (status) is input from the processor 120 via the address data bus 144 (606), the status value is checked (607), and if the status value indicates normal end, The bus status 143 and the address / data bus 144 are operated to read the operation result from the slave processor 120, and the second result on the memory 130 is read.
Write to the operand (608) and end the instruction. In the status check (607), if the status value indicates that an exceptional event has occurred in the operation, the master processor 110 issues a slave processor operation exception (609).
第7図に上記第6図に示されている各ステップの内、命
令コードの書き込み(602)からステータスの読み出し
(606)までの、タイム・チャートを示す。オペランド
の転送(603、604)は必要ない場合として省略した。FIG. 7 shows a time chart from the writing of the instruction code (602) to the reading of the status (606) among the steps shown in FIG. The transfer of operands (603, 604) is omitted when it is not necessary.
マスタ・プロセッサ110が命令コードをスレーブ・プロ
セッサ120へ書き込む制御を行なうと(タイミング701
(602))、バス・ステータス143、アドレス・データ・
バス144が駆動され、コマンド・ポート122への書き込み
バス・サイクルを実行する。前記バス・サイクル終了後
(タイミング702)、スレーブ・プロセッサ120は演算ユ
ニット121での演算を開始し、マスタ・プロセッサ110は
終了信号153がロウレベルになるまで待ち状態(605)と
なる。スレーブ・プロセッサ120での演算が終了すると
(タイミング703)、終了信号153が一定期間ロウレベル
になり、マスタ・プロセッサ110は次の処理(606)に移
る。When the master processor 110 controls to write the instruction code to the slave processor 120 (timing 701
(602)), bus status 143, address data
Bus 144 is driven to perform a write bus cycle to command port 122. After the end of the bus cycle (timing 702), the slave processor 120 starts the arithmetic operation in the arithmetic unit 121, and the master processor 110 waits until the end signal 153 becomes low level (605). When the arithmetic operation in the slave processor 120 is completed (timing 703), the end signal 153 becomes low level for a certain period, and the master processor 110 shifts to the next processing (606).
次に、スレーブ・プロセッサ120がマスタ・プロセッサ1
10に接続されていない場合について述べる。Then slave processor 120 becomes master processor 1
The case where it is not connected to 10 is described.
第6図において、マスタ・プロセッサ110はスレーブ・
プロセッサ存在フラグ115をチェックし(601)、スレー
ブ・プロセッサ120がマスタ・プロセッサ110に接続され
ていなければ、マスタ・プロセッサ110は命令実行の手
順を行なわず未定義命令例外を発生する(610)。マス
タ・プロセッサ110は、未定義命令例外での例外ハンド
ラ・ルーチンの記述によって、スレーブ・プロセッサ12
0をソフトウェアでエミュレートすることができる。In FIG. 6, the master processor 110 is a slave
The processor present flag 115 is checked (601), and if the slave processor 120 is not connected to the master processor 110, the master processor 110 does not execute the instruction execution procedure and generates an undefined instruction exception (610). The master processor 110 allows the slave processor 12 to write an exception handler routine with an undefined instruction exception.
0 can be emulated in software.
スレーブ・プロセッサ120が接続されていないのに、ス
レーブ・プロセッサ存在フラグ115がスレーブ・プロセ
ッサ120の存在を示している場合(異常な使い方ではあ
る)は、以下のような不具合が生ずる。このとき、終了
信号153はプルアップ抵抗152によってハイレベルに保た
れる。そのため、マスタ・プロセッサ110は第6図のフ
ローチャートにおいて、終了信号153のチェック(605)
の待ち状態から抜けられず、無限待機状態に陥る。以上
のことは、スレーブ・プロセッサ存在フラグ115が不可
欠であることを示す。If the slave processor 120 is not connected but the slave processor presence flag 115 indicates the presence of the slave processor 120 (which is an abnormal use), the following problems occur. At this time, the end signal 153 is kept at the high level by the pull-up resistor 152. Therefore, the master processor 110 checks the end signal 153 (605) in the flowchart of FIG.
Can't get out of the waiting state and falls into an infinite waiting state. The above indicates that the slave processor present flag 115 is indispensable.
次に、マスタ・プロセッサ110にスレーブ・プロセッサ
が複数接続されたコンピュータ・システムについて考え
る。ハードウェア構成を第8図に示す。Next, consider a computer system in which a plurality of slave processors are connected to the master processor 110. The hardware configuration is shown in FIG.
スレーブ・プロセッサ811、812、813は第5図のスレー
ブ・プロセッサ120と同等のものである。スレーブ・プ
ロセッサ存在フラグ821、822、823は、第5図のスレー
ブ・プロセッサ存在フラグ115と同等のフラグであり、
それぞれスレーブ・プロセッサ811、812、813がマスタ
・プロセッサ110に接続されているか否かを示す。例え
ば、スレーブ・プロセッサ812用の命令を実行するとき
マスタ・プロセッサ110は、スレーブ・プロセッサ存在
フラグ822をチェックし、スレーブ・プロセッサ812が存
在することが示されていれば、命令を実行する。このこ
とは、スレーブ・プロセッサ存在フラグの個数は、何個
のスレーブ・プロセッサがマスタ・プロセッサ110に接
続されているかではなく、マスタ・プロセッサ110に最
大何個のスレーブ・プロセッサが接続可能かで、決定さ
れることを示す。Slave processors 811, 812, 813 are equivalent to slave processor 120 of FIG. Slave processor presence flags 821, 822, 823 are equivalent to the slave processor presence flag 115 of FIG.
Indicates whether slave processors 811, 812, 813 are connected to master processor 110, respectively. For example, when executing an instruction for slave processor 812, master processor 110 checks slave processor present flag 822 and executes the instruction if slave processor 812 is shown to be present. This means that the number of slave processor present flags does not mean how many slave processors are connected to the master processor 110, but how many slave processors can be connected to the master processor 110. Indicates that it will be decided.
〈発明の解決しようとする問題点〉 しかしながら、マスタ・プロセッサとスレーブ・プロセ
ッサとを備えた従来のシステムでは以下に説明する2つ
の問題点があった。すなわち、第1の問題点はスレーブ
・プロセッサ用命令の実行手段(第6図)において、最
初にスレーブ・プロセッサ存在フラグ115をチェックし
なければならないため、命令の実行時間が増加すること
である。このチェックはスレーブ・プロセッサ120が接
続されていないコンピュータシステムでは有効である
が、スレーブ・プロセッサ120が接続されているコンピ
ュータシステムでは演算速度を低下させ、命令実行時間
を増加させることにしかならない。また、第2の問題点
はマスタ・プロセッサ110にスレーブ・プロセッサが複
数接続できる場合にはマスタ・プロセッサ110に接続可
能な最大のスレーブ・プロセッサ数nと同数のスレーブ
・プロセッサ存在フラグを必要としていることである。
したがって、接続可能な最大のスレーブ・プロセッサ数
nが大きいときにはマスタ・プロセッサ110に接続され
る頻度の低いスレーブ・プロセッサのために多数のスレ
ーブ・プロセッサ存在フラグを形成しなければならず、
ハードウエア上の負担が大きくなっていた。かといって
も、1個のスレーブ・プロセッサ存在フラグで複数個n
のスレーブ・プロセッサの存在/不存在を表現しようと
すると、スレーブ・プロセッサがn個接続されている
か、あるいは全く接続されていない場合以外には未定義
命令例外が正確に実行されない。<Problems to be Solved by the Invention> However, the conventional system including the master processor and the slave processor had the following two problems. That is, the first problem is that the instruction execution time increases because the slave processor present flag 115 must first be checked by the slave processor instruction execution means (FIG. 6). Although this check is effective in the computer system to which the slave processor 120 is not connected, it only reduces the operation speed and increases the instruction execution time in the computer system to which the slave processor 120 is connected. The second problem is that when a plurality of slave processors can be connected to the master processor 110, the same number of slave processor presence flags as the maximum number n of slave processors connectable to the master processor 110 are required. That is.
Therefore, when the maximum number n of slave processors that can be connected is large, a large number of slave processor present flags must be formed for slave processors that are less frequently connected to the master processor 110.
The burden on the hardware was increasing. However, one slave processor presence flag is used for multiple n
When the presence / absence of the slave processor is attempted to be expressed, the undefined instruction exception is not correctly executed unless n slave processors are connected or no slave processors are connected at all.
かかる問題点を解決するためにはスレーブ・プロセッサ
存在フラグを用意せずに、スレーブ・プロセッサ命令実
行手順の中でスレーブ・プロセッサの存在/不存在をチ
ェックすることが望ましい。そこで、第6図のスレーブ
・プロセッサ命令実行手順ではステータスの読み出し
(606)とそのチェックとのステップを設けこのステー
タスの値が異常値ならスレーブ・プロセッサが不存在で
あると判別していた。この方式ではスレーブ・プロセッ
サ存在フラグが不要であるので、上記2つの問題点は解
決される。この方式は文献「MC68020 32−Bit MICROPRO
CESSOR User′s Manual」によって周知になっており、
この文献によると、マスタ・プロセッサは終了信号では
なくステータスのチェックによってスレーブ・プロセッ
サの演算終了を知るため、スレーブ・プロセッサの演算
中はデータ・バスがステータスの読み出しで占有されて
しまうという新たな問題点が生じる。かかる新たな問題
点を生じさせないためには終了信号による演算終了の通
知が是非とも必要になる。In order to solve such a problem, it is desirable to check the presence / absence of a slave processor in the slave processor instruction execution procedure without preparing the slave processor presence flag. Therefore, in the slave processor instruction execution procedure of FIG. 6, a step of reading the status (606) and its check is provided, and if the status value is an abnormal value, it is determined that the slave processor does not exist. In this method, the slave processor present flag is not necessary, so the above two problems are solved. This method is based on the document “MC68020 32-Bit MICROPRO
CESSOR User's Manual ",
According to this document, since the master processor knows the end of operation of the slave processor by checking the status instead of the end signal, a new problem that the data bus is occupied by reading the status during the operation of the slave processor Dots occur. In order not to cause such a new problem, it is absolutely necessary to notify the end of calculation by the end signal.
したがって、上述の従来例はスレーブ・プロセッサの演
算中にデータ・バスがステータスの読み出しで占有され
ることがないという有利な点を有しているものの、上記
問題点があり、しかもマスタ・プロセッサ110にスレー
ブ・プロセッサ120が接続されていない状態で第6図の
スレーブ・プロセッサ命令実行手順を命令コードの転送
(602)から実行すると、終了信号153がハイレベルのま
まなのでマスタ・プロセッサ110は無限待機状態に陥る
という問題点も発生する。Therefore, although the above-mentioned conventional example has an advantage that the data bus is not occupied by the reading of the status during the operation of the slave processor, it has the above-mentioned problems and the master processor 110 When the slave processor instruction execution procedure of FIG. 6 is executed from the instruction code transfer (602) when the slave processor 120 is not connected to the master processor 110, the end signal 153 remains at high level and the master processor 110 waits indefinitely. There is also the problem of falling into a state.
〈問題点を解決するための手段、作用および効果〉 本発明は中央処理装置として機能するマスタ・プロセッ
サとデータ・バスを共有し上記マスタ・プロセッサによ
り制御されてマスタ・プロセッサの機能拡張を図るスレ
ーブ・プロセッサの制御方式にして、上記マスタ・プロ
セッサはスレーブ・プロセッサによる演算の実行に必要
なデータを上記データ・バスを介して供給可能であると
ともに上記スレーブ・プロセッサの状態を判別可能な第
1手段と、該第1手段によるデータの供給のために上記
データ・バスの使用状態を判別する第2の手段と、状態
通知手段により上記スレーブ・プロセッサが演算実行中
であることを判別する第3手段とを有しており、上記マ
スタ・プロセッサは上記第1手段により上記スレーブ・
プロセッサに演算の実行を開始させ、上記第2手段によ
り第1手段によるデータ・バスの使用終了を検出し、上
記第3手段により上記スレーブ・プロセッサが演算実行
中でないことを確認した後に、上記第1手段により判別
される上記スレーブ・プロセッサの状態に基づき該スレ
ーブ・プロセッサと上記マスタ・プロセッサとが接続さ
れているか否かを識別することを特徴としている。した
がって、本発明に係わるスレーブ・プロセッサの制御方
式によると、スレーブ・プロセッサの存在/不存在を確
認するためのフラグが不要になり、命令実行速度の向上
が図られるとともに、ハードウエアの減少を図ることが
でき、マスタ・プロセッサはスレーブ・プロセッサの未
接続を有効に識別できる。<Means, Actions and Effects for Solving Problems> The present invention is a slave which shares a data bus with a master processor functioning as a central processing unit and is controlled by the master processor to expand the function of the master processor. First means capable of supplying data necessary for execution of an operation by a slave processor via the data bus and determining the state of the slave processor as a processor control system A second means for discriminating the use state of the data bus for supplying data by the first means; and a third means for discriminating that the slave processor is executing an arithmetic operation by the state notifying means. And the master processor has the slave means by the first means.
After causing the processor to start executing an operation, detecting the end of use of the data bus by the first means by the second means, and confirming by the third means that the slave processor is not executing an operation, It is characterized in that whether or not the slave processor and the master processor are connected is discriminated based on the state of the slave processor discriminated by one means. Therefore, according to the control method of the slave processor according to the present invention, the flag for confirming the presence / absence of the slave processor becomes unnecessary, the instruction execution speed is improved, and the hardware is reduced. And the master processor can effectively identify the slave processor's unconnection.
<実施例> 次に、本発明の実施例について図面を参照して説明す
る。<Example> Next, the Example of this invention is described with reference to drawings.
第1図は本発明の一実施例に係わるスレーブ・プロセッ
サ制御方式のハードウエア構成を示すブロック図であ
る。マスタ・プロセッサ150は中央処理装置、スレーブ
・プロセッサ160はマスタ・プロセッサ150の拡張命令を
実行するスレーブ・プロセッサ、メモリ170はマスタ・
プロセッサ150によってアクセスされる主記憶装置であ
る。データ・バス182はマスタ・プロセッサ150、スレー
ブ・プロセッサ160、メモリ170の間でデータを受信する
ためのバス、アドレス・バス181はマスタ・プロセッサ1
50によって駆動され、メモリ170やスレーブ・プロセッ
サ160のアドレスを指定するためのバスである。FIG. 1 is a block diagram showing a hardware configuration of a slave processor control system according to an embodiment of the present invention. The master processor 150 is a central processing unit, the slave processor 160 is a slave processor that executes the extended instructions of the master processor 150, and the memory 170 is the master processor.
A main storage device accessed by the processor 150. The data bus 182 is a bus for receiving data between the master processor 150, the slave processor 160 and the memory 170, and the address bus 181 is the master processor 1
It is a bus driven by 50 and for designating addresses of the memory 170 and the slave processor 160.
マスタ・プロセッサ150は、マスタ・プロセッサ150とス
レーブ・プロセッサ160とが実行する命令をデコードす
る命令デコード・ユニット153、前記命令のオペランド
・アドレスを計算する実効アドレス計算ユニット154、
マスタ・プロセッサ150全体を制御して命令を実行する
マイクロ・プログラム制御による実行ユニット151、ア
ドレス・バス181とデータ・バス182を制御してメモリ17
0とスレーブ・プロセッサ160をアクセスするバス・制御
ユニット152から成る。The master processor 150 includes an instruction decode unit 153 that decodes instructions executed by the master processor 150 and the slave processor 160, an effective address calculation unit 154 that calculates an operand address of the instruction,
A memory 17 that controls an execution unit 151 and a address bus 181 and a data bus 182 that are controlled by a micro program that controls the entire master processor 150 to execute instructions.
0 and a bus control unit 152 for accessing the slave processor 160.
スレーブ・プロセッサ160は、スレーブ・プロセッサ160
用の命令の演算を実行する演算ユニット161、データ・
バス182から演算ユニット161が実行する命令の命令コー
ドを入力するコマンド・ポート162、演算ユニット161の
状態をデータ・バス182に出力するステータス・ポート1
63、演算ユニット161の演算に必要なデータを入力し演
算結果を出力するためのオペランド・ポート164、アド
レス・バス181の値をデコードしてコマンド・ポート16
2、ステータス・ポート163、オペランド・ポート164を
選択するアドレス・デコード165から成る。Slave processor 160, slave processor 160
Unit 161, which executes the calculation of instructions for
Command port 162 that inputs the instruction code of the instruction executed by arithmetic unit 161 from bus 182, status port 1 that outputs the state of arithmetic unit 161 to data bus 182
63, the operand port 164 for inputting the data necessary for the operation of the operation unit 161, and outputting the operation result, and the command port 16 by decoding the value of the address bus 181
2. Status port 163 and address decode 165 for selecting the operand port 164.
ビジー信号190は、スレーブ・プロセッサ160の演算ユニ
ット161が実行中であることをロウレベルで示す負論理
の信号であり、スレーブ・プロセッサ160からはオープ
ン・ドレインで駆動され、駆動されないときはプルアッ
プ抵抗192によってハイレベルに保たれている。マスタ
・プロセッサ150の実行ユニット151は、前記ビジー信号
190と、バス制御ユニット152がバス・サイクルを実行中
か否かを示すバス状態信号191を、入力し、信号190、19
1の値によって制御の流れを分岐させることができる。The busy signal 190 is a negative logic signal that indicates at low level that the arithmetic unit 161 of the slave processor 160 is executing. The busy signal 190 is driven by the open drain from the slave processor 160, and is pulled up when not driven. It is kept at a high level by 192. The execution unit 151 of the master processor 150 uses the busy signal
190 and a bus status signal 191, which indicates whether the bus control unit 152 is executing a bus cycle, and signals 190, 19
A value of 1 allows the control flow to branch.
スレーブ・プロセッサ160用命令を命令デコード・ユニ
ット153がデコードしたときの実行ユニット151の動作を
フローチャートで第2図に示す。第2図で実行される命
令は、A+B→Bの様な二項演算であり、前記Aを第1
オペランド、前記Bを第2オペランドと呼ぶ。The operation of the execution unit 151 when the instruction decoding unit 153 decodes the instruction for the slave processor 160 is shown in a flowchart in FIG. The instruction executed in FIG. 2 is a binary operation such as A + B → B.
The operand B is called the second operand.
先ず、実行ユニット151はバス・制御ユニット152を制御
してメモリ170から第1オペランドのデータをデータ・
バス182を介してオペランド・ポート164に書き込み(20
1)、同様に第2オペランドをオペランド・ポート164に
書き込む(202)。次に、実行ユニット151は、命令デコ
ード・ユニット153から入力した命令コードを、バス・
制御ユニット152を制御してデータ・バス182を介してコ
マンド・ポート162に書き込む(203)。前記コマンド・
ポート162への書き込みのバス・サイクルが行なわれる
と、スレーブ・プロセッサ160の演算ユニット161は演算
を実行し始め、演算実行中、ビジー信号190をロウレベ
ルで駆動する。マスタ・プロセッサ150は、バス状態信
号191をチェックすることにより前記書き込みバス・サ
イクルが終了するまで待ち(204)、更に、ビジー信号1
90をチェックすることにより演算ユニット161の演算が
終了するまで待つ(205)。その後、実行ユニット151は
スレーブ・プロセッサ160のステータス・ポート163の値
(ステータス)をバス・制御ユニット152、データ・バ
ス182を介して入力し(206)、前記ステータスの値をチ
ェックして(207)、ステータスの値が正常終了を示し
た場合は、バス・制御ユニット152、データ・バス182を
介してオペランド・ポート164から演算結果を読み出し
てメモリ170上の第2オペランドに書き込み(208)、命
令を終了する。ステータスのチェック(207)におい
て、ステータスの値が演算において例外事象が発生した
ことを示した場合は、実行ユニット151はスレーブ・プ
ロセッサ演算例外を発生する(209)。ステータスの値
が定められた値以外の異常な値を示した場合は、実行ユ
ニット151はスレーブ・プロセッサ160がマスタ・プロセ
ッサ150に接続されていないものと判断し、スレーブ・
プロセッサ不在例外(210)を発生する。First, the execution unit 151 controls the bus / control unit 152 to transfer the data of the first operand from the memory 170.
Write to operand port 164 via bus 182 (20
1), similarly, write the second operand to the operand port 164 (202). Next, the execution unit 151 converts the instruction code input from the instruction decoding unit 153 into a bus code.
Control unit 152 to write to command port 162 via data bus 182 (203). The command
When a bus cycle for writing to the port 162 is performed, the arithmetic unit 161 of the slave processor 160 starts executing an arithmetic operation, and drives the busy signal 190 at a low level during the arithmetic operation. The master processor 150 waits until the write bus cycle is complete by checking the bus status signal 191 (204) and then the busy signal 1
By checking 90, the operation unit 161 waits until the operation is completed (205). Thereafter, the execution unit 151 inputs the value (status) of the status port 163 of the slave processor 160 via the bus control unit 152 and the data bus 182 (206) and checks the status value (207). ), If the status value indicates normal termination, the operation result is read from the operand port 164 via the bus / control unit 152 and the data bus 182 and written to the second operand on the memory 170 (208), Finish the instruction. In the status check (207), if the value of the status indicates that an exceptional event has occurred in the operation, the execution unit 151 issues a slave processor operation exception (209). If the status value shows an abnormal value other than the specified value, the execution unit 151 determines that the slave processor 160 is not connected to the master processor 150, and
Generate a processor out exception (210).
第3図に、コマンド・ポート162への書き込み(203)か
らステータス・ポート163の読み出し(206)までの、タ
イム・チャートを示す。実行ユニット151が命令コード
をコマンド・ポート162へ書き込むようにバス・制御ユ
ニット152に指示すると(301)、バス・制御ユニット15
2はアドレス・バス181、データ・バス182を駆動して、
コマンド・ポート162への書き込みバス・サイクルを実
行する。前記バス・サイクルの期間中は、バス状態信号
191はハイレベルであり、実行ユニット151は待機してい
る(204)。前記バス・サイクル終了後(302)、スレー
ブ・プロセッサ160は演算ユニット161での演算を開始す
ると同時にビジー信号190をロウレベルに駆動し、実行
ユニット151はビジー信号190がハイレベルになるまで待
ち状態(205)となる。演算ユニット161での演算が終了
すると(303)、ビジー信号190がハイレベルになり、実
行ユニット151は次の処理(206)に移る。FIG. 3 shows a time chart from the writing (203) to the command port 162 to the reading (206) of the status port 163. When the execution unit 151 instructs the bus control unit 152 to write the instruction code to the command port 162 (301), the bus control unit 15
2 drives address bus 181, data bus 182,
Perform a write bus cycle to command port 162. Bus status signal during the bus cycle
191 is high and execution unit 151 is waiting (204). After the end of the bus cycle (302), the slave processor 160 starts the operation in the operation unit 161, and simultaneously drives the busy signal 190 to the low level, and the execution unit 151 waits until the busy signal 190 becomes the high level ( 205). When the calculation in the calculation unit 161 is completed (303), the busy signal 190 becomes high level, and the execution unit 151 moves to the next process (206).
次に、スレーブ・プロセッサ160がマスタ・プロセッサ1
50に接続されていない場合について述べる。Then slave processor 160 becomes master processor 1
The case when not connected to 50 is described.
このとき、ビジー信号190はプルアップ抵抗192によって
ハイレベルに保たれる。また、マスタ・プロセッサ150
がステータス・ポート163を読み出すバス・サイクルを
実行すると、データ・バス182を駆動するものがないた
め、全てハイレベル、または全てロウレベルの値が入力
される。そのため、マスタ・プロセッサ150は第2図の
フローチャートにおいて、ビジー信号190のチェック(2
05)は待ち状態にならず、ステータスの値のチェック
(207)は、ステータスの値が全て0か全て1かの異常
な値のため、スレーブ・プロセッサ不在例外を発生す
る。マスタ・プロセッサ150は、スレーブ・プロセッサ
不在例外での例外ハンドラ・ルーチンの記述によって、
スレーブ・プロセッサ160をソフトウェアでエミュレー
トすることができる。At this time, the busy signal 190 is kept at the high level by the pull-up resistor 192. Also, the master processor 150
When a bus cycle that reads the status port 163 is executed, since there is nothing that drives the data bus 182, all high level values or all low level values are input. Therefore, the master processor 150 checks the busy signal 190 (2
05) does not enter the waiting state, and the status value check (207) generates a slave processor absence exception because the status values are all 0 or 1 as an abnormal value. The master processor 150 uses the exception handler routine description in the slave processor absent exception to
The slave processor 160 can be emulated in software.
以上述べたように、本実施例ではコマンド・ポートへの
書き込み後に、スレーブ・プロセッサ160での演算開始
を確認せず、演算終了だけを確する。そのため、スレー
ブ・プロセッサ160が接続されていない場合もマスタ・
プロセッサ150が無限待機状態に陥ることはない。As described above, in the present embodiment, after the writing to the command port, the operation start in the slave processor 160 is not confirmed, but only the operation end is confirmed. Therefore, even if the slave processor 160 is not connected,
Processor 150 never goes into an infinite wait state.
また、ステータス・ポートの読み出し(206)及びチェ
ック(207)によって、スレーブ・プロセッサ160の未接
続を検出することにより、従来例のようにフラグを用意
する必要がない。なお、ステータスのチェック(207)
は、演算ユニット161での演算例外を発見するために必
要であり、スレーブ・プロセッサ未接続の検出のために
スレーブ・プロセッサ用命令の実行が遅くなることはな
い。Further, by detecting (206) and checking (207) the status port to detect the non-connection of the slave processor 160, it is not necessary to prepare a flag as in the conventional example. Check the status (207)
Are necessary for finding an arithmetic exception in the arithmetic unit 161, and the execution of the slave processor instruction is not delayed due to the detection of the slave processor non-connection.
次に、マスタ・プロセッサ150にスレーブ・プロセッサ
が複数接続されたコンピュータ・システムについて考え
る。ハードウェア構成を第4図に示す。スレーブ・プロ
セッサ411、412、413は第1図のスレーブ・プロセッサ1
20と同等のものである。Next, consider a computer system in which a plurality of slave processors are connected to the master processor 150. The hardware configuration is shown in FIG. Slave processors 411, 412, 413 are slave processors 1 in FIG.
It is equivalent to 20.
スレーブ・プロセッサ411、412、413のコマンド・ポー
ト162、ステータス・ポート163、オペランド・ポート16
4は、それぞれ独自のアドレス空間に置かれているた
め、同時に複数のポートがアクセスされることはない。
また、ビジー信号190は演算実行中のスレーブ・プロセ
ッサによって駆動される。このことは、マスタ・プロセ
ッサが制御するスレーブ・プロセッサの個数にかかわら
ず、スレーブ・プロセッサ用命令の実行がマスタ・プロ
セッサ150と実行するスレーブ・プロセッサとの間で1
対1で行なわれることを示す。Command port 162, status port 163, operand port 16 of slave processors 411, 412, 413
Since 4 is placed in its own address space, multiple ports cannot be accessed at the same time.
The busy signal 190 is also driven by the slave processor that is executing the operation. This means that, regardless of the number of slave processors controlled by the master processor, execution of instructions for the slave processor may occur between the master processor 150 and the executing slave processor.
It shows that it is done in one-to-one.
例えば、スレーブ・プロセッサ411用の命令を実行する
とき、マスタ・プロセッサ110はスレーブ・プロセッサ4
11のポートだけをアクセスし、ビジー信号190はスレー
ブ・プロセッサ411によって駆動されるため、第2図の
スレーブ・プロセッサ制御手順は正常に実行される。も
し、スレーブ・プロセッサ411が接続されていない場
合、ビジー信号190は駆動されないためハイレベルのま
まであり、読み込まれたステータスも全て1または全て
0の異常置な値であるため、スレーブ・プロセッサ不在
例外が発生する。For example, when executing instructions for slave processor 411, master processor 110 may
Since only the 11 ports are accessed and the busy signal 190 is driven by the slave processor 411, the slave processor control procedure of FIG. 2 is executed normally. If the slave processor 411 is not connected, the busy signal 190 remains high because it is not driven, and the read status is an abnormal value of all 1s or all 0s. An exception occurs.
以上述べたように、本実施例ではマスタ・プロセッサに
接続できるスレーブ・プロセッサの個数が多くなって
も、従来例で述べたようなハードウェアの増加はなく、
応用範囲の広いスレーブ・プロセッサ未接続検出方式を
実現できる。As described above, in this embodiment, even if the number of slave processors that can be connected to the master processor increases, the increase in hardware as described in the conventional example does not occur,
It is possible to realize a slave processor disconnection detection method with a wide range of applications.
第1図は本発明の一実施例を示すブロック図、第2図は
一実施例のフローチャート図、第3図は一実施例のタイ
ミングチャート図、第4図は一実施例において複数のス
レーブ・プロセッサを接続した場合のブロック図、第5
図は従来例のブロック図、第6図は従来例のフローチャ
ート図、第7図は従来例のタイミングチャート図、第8
図は従来例において複数のスレーブ・プロセッサを接続
した場合のブロック図である。 150……マスタ・プロセッサ、 151……実行ユニット、 152……バス制御ユニット、 153……命令デコードユニット、 154……命令アドレス計算ユニット、 160……スレーブ・プロセッサ、 170……メモリ、 182……データ・バス、 190……ビジー信号、 191……バス状態信号。FIG. 1 is a block diagram showing one embodiment of the present invention, FIG. 2 is a flow chart of one embodiment, FIG. 3 is a timing chart of one embodiment, and FIG. Block diagram when a processor is connected, No. 5
FIG. 6 is a block diagram of a conventional example, FIG. 6 is a flowchart of the conventional example, FIG. 7 is a timing chart of the conventional example, and FIG.
The figure is a block diagram when a plurality of slave processors are connected in the conventional example. 150 …… master processor, 151 …… execution unit, 152 …… bus control unit, 153 …… instruction decode unit, 154 …… instruction address calculation unit, 160 …… slave processor, 170 …… memory, 182 …… Data bus, 190 ... busy signal, 191 ... bus status signal.
Claims (1)
セッサとデータ・バスを共有し前記マスタ・プロセッサ
により制御されて前記マスタ・プロセッサの機能拡張を
図るスレーブ・プロセッサの制御方式にして、前記マス
タ・プロセッサは前記スレーブ・プロセッサによる演算
の実行に必要なデータを前記データ・バスを介して供給
可能であるとともに前記スレーブ・プロセッサの状態を
判別可能な第1の手段(163)と、前記第1の手段によ
るデータの供給のために前記データ・バスの使用状態を
判別する第2の手段(191)と、スレーブプロセッサの
状態を通知する手段により前記スレーブ・プロセッサが
演算実行中であることを判別する第3の手段(190)と
を有しており、前記マスタ・プロセッサは前記第1の手
段により前記スレーブ・プロセッサに演算の実行を開始
させ、前記第2の手段により前記第1の手段による前記
データ・バスの使用終了を検出し、前記第3の手段によ
り前記スレーブ・プロセッサが演算実行中でないことを
確認した後に、前記第1の手段により判別される前記ス
レーブ・プロセッサの状態に基づき前記スレーブ・プロ
セッサと前記マスタ・プロセッサとが接続されているか
否かを識別することを特徴とするスレーブ・プロセッサ
の制御方式。1. A master processor that shares a data bus with a master processor functioning as a central processing unit and is controlled by the master processor to expand the functions of the master processor, thereby providing a slave processor control system, The processor is capable of supplying data necessary for execution of an operation by the slave processor via the data bus and is capable of discriminating the state of the slave processor; and a first means (163); Second means (191) for determining the use state of the data bus for supplying data by means, and means for notifying the state of the slave processor determine that the slave processor is executing an operation. Third means (190), wherein the master processor has the slave means by the first means. The processor is made to start executing the operation, the second means detects the end of use of the data bus by the first means, and the third means confirms that the slave processor is not executing the operation. After that, the control of the slave processor is characterized in that whether or not the slave processor and the master processor are connected is identified based on the state of the slave processor determined by the first means. method.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP27014386A JPH0677251B2 (en) | 1986-11-12 | 1986-11-12 | Slave processor control system |
US07/119,601 US4926318A (en) | 1986-11-12 | 1987-11-12 | Micro processor capable of being connected with a coprocessor |
DE3751108T DE3751108T2 (en) | 1986-11-12 | 1987-11-12 | Microprocessor with the ability to be connected to a coprocessor. |
EP87116726A EP0267613B1 (en) | 1986-11-12 | 1987-11-12 | Micro processor capable of being connected with coprocessor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP27014386A JPH0677251B2 (en) | 1986-11-12 | 1986-11-12 | Slave processor control system |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS63123154A JPS63123154A (en) | 1988-05-26 |
JPH0677251B2 true JPH0677251B2 (en) | 1994-09-28 |
Family
ID=17482143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP27014386A Expired - Fee Related JPH0677251B2 (en) | 1986-11-12 | 1986-11-12 | Slave processor control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0677251B2 (en) |
-
1986
- 1986-11-12 JP JP27014386A patent/JPH0677251B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPS63123154A (en) | 1988-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2573566B2 (en) | Bus converter | |
US4942519A (en) | Coprocessor having a slave processor capable of checking address mapping | |
EP0313097B1 (en) | Microcomputer system including master processor and slave processor | |
WO2021244194A1 (en) | Register reading/writing method, chip, subsystem, register group, and terminal | |
JPS5832416B2 (en) | computer interface | |
JPH07311716A (en) | Computer system,parallel port circuit for interfacing of peripheral device with computer system and its operating method | |
JPS58501923A (en) | Interface circuit for subsystem controller | |
JPH01197866A (en) | Interface apparatus and method | |
JP2822782B2 (en) | Single chip microcomputer | |
JPH0232659B2 (en) | ||
EP0104545A2 (en) | Input and output port control unit | |
CN111615691A (en) | Direct memory access adapter | |
US5742842A (en) | Data processing apparatus for executing a vector operation under control of a master processor | |
EP0385136B1 (en) | Microprocessor cooperating with a coprocessor | |
JPH0677251B2 (en) | Slave processor control system | |
US20010023481A1 (en) | Processor that executes control signals included in operand section of control instruction | |
US5577260A (en) | Data processing system having a serial interface comprising an end-of-transmission flag | |
JPH05143320A (en) | Floating point arithmetic method and floating point arithmetic unit | |
JPH05242008A (en) | Data processor | |
JP2003296130A (en) | Microcomputer | |
JPH023217B2 (en) | ||
JP2004048228A (en) | Programmable logic circuit, computer system and circuit initializing method | |
JPH03132857A (en) | Inter-cpu data transfer circuit | |
JPH11143732A (en) | Microcomputer and emulator | |
JPH0650500B2 (en) | Slave processor control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |