JP3328867B2 - Multiprocessor arithmetic device and programmable controller having the device - Google Patents

Multiprocessor arithmetic device and programmable controller having the device

Info

Publication number
JP3328867B2
JP3328867B2 JP05228695A JP5228695A JP3328867B2 JP 3328867 B2 JP3328867 B2 JP 3328867B2 JP 05228695 A JP05228695 A JP 05228695A JP 5228695 A JP5228695 A JP 5228695A JP 3328867 B2 JP3328867 B2 JP 3328867B2
Authority
JP
Japan
Prior art keywords
address
instruction
data
slave
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
JP05228695A
Other languages
Japanese (ja)
Other versions
JPH08249022A (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.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP05228695A priority Critical patent/JP3328867B2/en
Publication of JPH08249022A publication Critical patent/JPH08249022A/en
Application granted granted Critical
Publication of JP3328867B2 publication Critical patent/JP3328867B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、各命令をマスタプロせ
ッサ、あるいはスレーブプロセッサで実行するようにし
たマルチプロセッサ演算装置、および該装置を有するプ
ログラマブルコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor arithmetic unit in which each instruction is executed by a master processor or a slave processor, and a programmable controller having such a unit.

【0002】[0002]

【従来の技術】プログラマブルコントローラ等のマルチ
プロセッサ演算装置では、通常、基本的な命令を高速実
行するASIC等のマスタプロセッサと、それ以外の応
用命令等を汎用MPU等によって実行するスレーブプロ
セッサ(1台でも、複数台でも勿論構わない。)とから
構成されている。
2. Description of the Related Art In a multiprocessor arithmetic device such as a programmable controller, a master processor such as an ASIC for executing basic instructions at high speed and a slave processor for executing other applied instructions by a general-purpose MPU (one unit) are usually used. However, a plurality of units may be used.)

【0003】マスタプロせッサは、命令メモリからの命
令を解読して、その命令がこのマスタプロセッサで実行
されるものか、あるいはスレーブプロセッサで実行され
るものかを判断し、自プロセッサが実行可能な命令につ
いてはこのマスタプロセッサで実行すると共に、スレー
ブプロセッサが実行するものについては当該スレーブプ
ロセッサに対して当該命令をデータとして送出するよう
にしている。
A master processor decodes an instruction from an instruction memory, determines whether the instruction is to be executed by the master processor or a slave processor, and allows the own processor to execute the instruction. These instructions are executed by the master processor, and those executed by the slave processor are sent as data to the slave processor.

【0004】一方、スレーブプロセッサは、通常は休止
等していて、マスタプロセッサからスレーブプロセッサ
側で実行すべき命令を受けた場合には、当該命令の解析
を行って実行するようにしている。
[0004] On the other hand, the slave processor is normally inactive or the like, and when receiving an instruction to be executed on the slave processor side from the master processor, the slave processor analyzes and executes the instruction.

【0005】つまり、例えば実行する命令のオペランド
が3つある場合、スレーブプロセッサはマスタプロセッ
サ側から命令を受けると、図6に示すように命令の解釈
(ステップ100)、オペランド1のアドレス計算(ス
テップ110)、オペランド1のデータフェッチ(ステ
ップ120)、オペランド2のアドレス計算(ステップ
130)、オペランド2のデータフェッチ(ステップ1
40)オペランド1によるデータとオペランド2による
データとの演算(ステップ150)、オペランド3によ
るディスティネーション(転送先)アドレスの計算(ス
テップ160)、ディスティネーションへの書込み(ス
テップ170)、という手順で処理を行っている。
That is, for example, when there are three operands of an instruction to be executed, when the slave processor receives an instruction from the master processor, it interprets the instruction (step 100) and calculates the address of operand 1 (step 100) as shown in FIG. 110), data fetch of operand 1 (step 120), address calculation of operand 2 (step 130), data fetch of operand 2 (step 1)
40) Processing in the order of operation of data by operand 1 and data by operand 2 (step 150), calculation of destination (transfer destination) address by operand 3 (step 160), and writing to destination (step 170) It is carried out.

【0006】[0006]

【発明が解決しようとする課題】しかし、このような従
来のマルチプロセッサ演算装置では、スレーブプロセッ
サ側でも、上述の図7に示すように、命令の解釈を行
い、続いて各オペランドにしたがったアドレス計算をし
て、命令の演算に使用するソースデータを取得し、さら
にディスティネーションアドレスを算出して、その後実
際の演算に入るようにしていたため、スレーブプロセッ
サに演算リクエストが送達されてから実際に演算を開始
するまでの処理に時間がかかり、スレーブプロセッサに
おけるオーバヘッドが大きくなってしまう、という問題
があった。
However, in such a conventional multiprocessor arithmetic unit, the slave processor also interprets the instruction as shown in FIG. 7, and then addresses according to each operand. The calculation was performed to obtain the source data used for the operation of the instruction, the destination address was calculated, and then the actual operation was started, so the actual operation was performed after the operation request was delivered to the slave processor. It takes time to start the process, and the overhead in the slave processor increases.

【0007】そこで、本発明はこのような問題に着目し
てなされたもので、スレーブプロセッサ側における演算
処理のオーバーヘッドを減少させることのできるマルチ
プロセッサ演算装置、および該装置を有するプログラマ
ブルコントローラを提供することを目的とする。
Accordingly, the present invention has been made in view of such a problem, and provides a multiprocessor arithmetic device capable of reducing the overhead of arithmetic processing on the slave processor side, and a programmable controller having the multiprocessor arithmetic device. The purpose is to:

【0008】[0008]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明では、各命令をマスタプロセッ
、あるいはスレーブプロセッサで実行するようにした
マルチプロセッサ演算装置であって、上記マスタプロセ
ッサは、命令を解析すると共に当該命令がマスタプロセ
ッサ側で実行されるものか、あるいはスレーブプロセッ
サ側で実行されるものかを判断して、その判断結果に基
づきマスタプロセッサ側あるいはスレーブプロセッサ側
に演算指令を出力すると共に、当該命令のオペランドを
出力するデコード手段と、上記デコード手段からのオペ
ランドに基づいてアドレスを計算するアドレス計算手段
と、上記アドレス計算手段が計算したアドレスを記憶す
るアドレス記憶手段、スレーブプロセッサ側へのデータ
ポートおよびインクリメントデータポート、上記アドレ
スのデータへのスレーブ演算手段のアクセスを制御する
アクセス制御手段を有するインタフェース手段と、を具
備する一方、上記スレーブプロセッサは、上記デコード
部からの演算指令を受けて上記インタフェース手段にア
クセスして、当該インタフェース手段に記憶されたアド
レスのデータを読出し実行するスレーブ演算手段を具備
し、スレーブ演算手段が上記データポートへアクセスし
た場合は、当該スレーブ演算手段に上記アドレスが示す
データへ直接アクセスさせ、インクリメントデータポー
トへアクセスした場合は、当該スレーブ演算手段に上記
アドレスが示すデータへ直接アクセスさせると共に、上
記アドレス記憶手段に記憶されたアドレスをインクリメ
ントするようにしたことを特徴とする。
To achieve the above object, according to an aspect of, in the first aspect of the present invention, Masutapuro set each instruction
A multiprocessor arithmetic unit configured to be executed by a slave processor or a slave processor, wherein the master processor analyzes an instruction and executes the instruction on the master processor side or is executed on the slave processor side And outputs a calculation instruction to the master processor or the slave processor based on the result of the determination, and decode means for outputting an operand of the instruction, and calculates an address based on the operand from the decode means. Address calculating means for storing the address calculated by the address calculating means .
Address storage means, data to slave processor side
Port and increment data port, the above address
Access to slave data by slave computing means
While comprising interfacing means for chromatic access control means, and the slave processor accesses to the interface means receives an operation instruction from the decode unit, reads out the data of the address which is stored in the interface means Equipped with slave operation means to execute
And the slave operation means accesses the data port.
If the address is indicated in the slave operation means,
Direct access to the data and increment data port
Access to the slave operation means,
Direct access to the data indicated by the address
Increments the address stored in the address storage means.
Characterized in that so as to cement.

【0009】また、請求項2記載の発明では、請求項1
記載のマルチプロセッサ演算装置によってユーザプログ
ラムを実行することを特徴とする。
Further, according to the invention described in claim 2, according to claim 1,
User program by the described multiprocessor arithmetic unit
Running the ram .

【0010】[0010]

【0011】[0011]

【0012】[0012]

【作用】発明では、マスタプロセッサ側で、デコード
手段が命令を解析すると共に当該命令がマスタプロセッ
サ側で実行されるものか、あるいはスレーブプロセッサ
側で実行されるものかを判断して、その判断結果に基づ
きマスタプロセッサ側あるいはスレーブプロセッサ側に
演算指令を出力すると共に、当該命令のオペランドを出
力し、アドレス計算手段がそのオペランドに基づいてア
ドレスを計算して、インタフェース手段がそのアドレス
を記憶する。
According to the present invention, on the master processor side, the decoding means analyzes the instruction and determines whether the instruction is executed on the master processor side or on the slave processor side. An operation instruction is output to the master processor or the slave processor based on the result, an operand of the instruction is output, an address calculation unit calculates an address based on the operand, and the interface unit stores the address.

【0013】そして、スレーブプロセッサ側のスレーブ
演算手段が、デコード部からの演算指令を受けてインタ
フェース手段にアクセスすると、インタフェース手段の
制御によってそのインタフェース手段に記憶されたアド
レスのデータを読出し、そのデータを実行する。
When the slave operation means on the slave processor side accesses the interface means in response to the operation command from the decoding section, the data of the address stored in the interface means is read out under the control of the interface means, and the data is read out. Execute.

【0014】インタフェース手段は、アドレス計算手段
が計算したアドレスを記憶しておき、スレーブ演算手段
がデータポートへアクセスした場合には、スレーブ演算
手段にそのアドレスが示すデータへ直接アクセスさせ
インクリメントデータポートへアクセスした場合には、
当該スレーブ演算手段にそのアドレスが示すデータへ直
接アクセスさせると共に、そのアドレスをインクリメン
トするよう制御する。
The interface means stores the address calculated by the address calculation means, and when the slave calculation means accesses the data port, causes the slave calculation means to directly access the data indicated by the address ;
If you access the increment data port,
The slave operation means directly sends the data indicated by the address.
Access, and increment the address.
To Tosuru control.

【0015】[0015]

【0016】[0016]

【実施例】以下、本発明に係るマルチプロセッサ演算装
置、および本装置を有するプログラマブルコントローラ
の実施例を図面に基づいて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a multiprocessor arithmetic unit according to the present invention and a programmable controller having the same will be described below with reference to the drawings.

【0017】図1に、本発明に係るマルチプロセッサ演
算装置の構成を示す。
FIG. 1 shows the configuration of a multiprocessor arithmetic unit according to the present invention.

【0018】このマルチプロセッサ演算装置は、プログ
ラマブルコントローラに設けられるもので、複数(本実
施例では、便宜上2台とする。)のプロセッサ、すなわ
ちマスタプロセッサ1、およびスレーブプロセッサ2
と、ユーザプログラムを格納したユーザプログラムメモ
リ3と、データメモリ4とを基本的構成要素として備え
ている。
This multiprocessor arithmetic unit is provided in a programmable controller, and has a plurality of (two in this embodiment, for convenience) processors, namely a master processor 1 and a slave processor 2.
And a user program memory 3 storing a user program, and a data memory 4 as basic components.

【0019】マスタプロセッサ1は、デコード部11
と、オペランド解析部12と、マスタ演算部13と、イ
ンタフェース部14とを有している。
The master processor 1 includes a decoding unit 11
, An operand analysis unit 12, a master operation unit 13, and an interface unit 14.

【0020】ここで、デコード部11は、ユーザプログ
ラムメモリ3から命令を読出して解析すると共に当該命
令がマスタプロセッサ1側で実行されるものか、あるい
はスレーブプロセッサ2側で実行されるものかを判断し
て、その判断結果に基づきマスタプロセッサ1側あるい
はスレーブプロセッサ2側に演算指令を出力すると共
に、当該命令のオペランドを出力するように構成されて
いる。なお、デコード部11は、基本命令等の高速演算
が要求される命令は、原則としてマスタプロセッサ1側
に実行させ、応用命令や後からユーザが作成した命令等
はスレーブプロセッサ2側実行させるように判断するも
のとする。
Here, the decoding unit 11 reads and analyzes the instruction from the user program memory 3 and determines whether the instruction is executed on the master processor 1 side or on the slave processor 2 side. Then, based on the result of the determination, an operation instruction is output to the master processor 1 or the slave processor 2 and the operand of the instruction is output. Note that the decoding unit 11 causes the master processor 1 to execute an instruction requiring a high-speed operation such as a basic instruction in principle, and causes the slave processor 2 to execute an applied instruction or an instruction created by a user later. Judge.

【0021】オペランド解析部12は、デコード部11
からのオペランドによりアドレスを計算して後述するデ
ータフェッチ部12bおよびインタフェース部14のア
ドレスレジスタ14aに常時出力するアドレス計算部1
2aと、デコード部11での判断結果に基づいて命令が
マスタプロセッサ1側で実行される場合には、アドレス
計算部12aが計算したアドレスに基づきデータメモリ
4にアクセスしてデータを読出し、マスタ演算部13へ
送出するデータフェッチ部12bとから構成されてい
る。なお、このデータフェッチ部12bは、デコード部
11での判断結果に基づいて命令がマスタプロセッサ1
側で実行される場合のみデータメモリ4からデータを読
出してマスタ演算部13へ送出するようにしても、デコ
ード部11での判断結果に基づいて常時命令がデータを
読出してマスタ演算部13へ送出するようにしても良
い。
The operand analyzing unit 12 includes a decoding unit 11
Address calculating unit 1 which calculates an address based on an operand from and outputs it to a data fetch unit 12b and an address register 14a of the interface unit 14 which will be described later.
And 2a, the when the instruction is executed by the master processor 1 side based on the determination result of the decoding unit 11 accesses the data memory 4 based on the address of the address <br/> calculator 12a has calculated data And a data fetch unit 12b for reading and sending the data to the master operation unit 13. The data fetch unit 12b sends an instruction to the master processor 1 based on the result of the determination by the decode unit 11.
Even when the data is read out from the data memory 4 and sent to the master operation unit 13 only when the instruction is executed on the side, the instruction always reads out the data and sends it to the master operation unit 13 based on the judgment result of the decoding unit 11. You may do it.

【0022】マスタ演算部13は、本実施例では、AS
IC等の特定の命令を高速演算するもので、デコード部
11からマスタプロセッサ1側への演算指令を受けて、
その演算指令に基づきオペランド解析部12のデータフ
ェッチ部12bがデータメモリ4から読出したデータを
入力して演算実行するように構成されている。
In the present embodiment, the master calculation unit 13
A high-speed operation of a specific instruction such as an IC is performed. Upon receiving an operation instruction from the decoding unit 11 to the master processor 1 side,
The data fetch unit 12b of the operand analysis unit 12 is configured to input the data read from the data memory 4 and execute a calculation based on the calculation command.

【0023】インタフェース部14は、アドレス計算部
12aで計算された命令のアドレスをスレーブプロセッ
サ2側で実行される命令のアドレスとして命令毎に上書
きで記憶するアドレスレジスタ14aと、インタフェー
スコントローラ14bとから構成されている。
The interface unit 14 comprises an address register 14a for storing the address of the instruction calculated by the address calculation unit 12a as an address of an instruction executed on the slave processor 2 side by side for each instruction, and an interface controller 14b. Have been.

【0024】インタフェースコントローラ14bは、ス
レーブプロセッサ2側からアクセス可能なデータポート
14b1 およびインクリメントデータポート14b2 を
有しており、スレーブプロセッサ2がデータポート14
b1 へアクセスした場合は、レジスタ14aに記憶され
たアドレスをアドレスバスに出力等してスレーブプロセ
ッサ2がデータメモリ4へ直接アクセスできるようメモ
リアクセスの制御を行うと共に、スレーブプロセッサ2
がこのインクリメントデータポート14b2 へアクセス
した場合は、アクセスレジスタ14aに記憶されたアド
レスに基づいてスレーブプロセッサ2がデータメモリ4
へ直接アクセスできるようメモリアクセスの制御を行う
と共に、その後アクセスレジスタ14aに格納されたア
ドレスを1インクリメントするように構成されている。
The interface controller 14b has a data port 14b1 and an increment data port 14b2 accessible from the slave processor 2 side.
When the access to b1 is made, the address stored in the register 14a is output to an address bus to control the memory access so that the slave processor 2 can directly access the data memory 4.
When the slave processor 2 accesses the increment data port 14b2, the slave processor 2 sets the data memory 4 based on the address stored in the access register 14a.
It is configured to control the memory access so as to allow direct access to, and then increment the address stored in the access register 14a by one.

【0025】一方、スレーブプロセッサ2は、命令のデ
コード部も備えてなく、マスタプロセッサ1のデコード
部11から命令の演算指令を受けて、その演算指令にし
たがって次に説明する図2に示す処理手順でインタフェ
ースコントローラ14bのデータポート14b1 あるい
はインクリメントデータポート14b2 にアクセスして
演算実行するスレーブ演算部21を備えている。
On the other hand, the slave processor 2 does not include an instruction decoding unit, but receives an instruction operation instruction from the decoding unit 11 of the master processor 1 and follows the processing procedure shown in FIG. A slave operation unit 21 for accessing the data port 14b1 or the increment data port 14b2 of the interface controller 14b and executing the operation.

【0026】図2に、本実施例のスレーブ演算部21に
おける命令演算手順を示す。
FIG. 2 shows an instruction operation procedure in the slave operation unit 21 of this embodiment.

【0027】本実施例のスレーブ演算部21は、マスタ
プロセッサ1側のデコード部11から演算指令を受ける
と、スレーブ演算処理を開始して、まずはその演算指令
を解釈する(ステップ200)。例えば、その演算指令
がデータポート14b1 へのアクセスか、あるいはイン
クリメントデータポート14b2 へのアクセスを指示し
ているかや、さらにはその命令のオペランドの数等を解
釈する。尚、ここでは、オペランドが3つ、すなわち演
算すべき命令のソースデータのアドレスを示す2つのソ
ースオペランドと、その演算結果の転送先を示す1つの
ディスティネーションオペランドの合計3つのオペラン
ドがあるものとする。
When the slave operation unit 21 of this embodiment receives an operation command from the decoding unit 11 of the master processor 1, it starts a slave operation process, and first interprets the operation instruction (step 200). For example, it interprets whether the operation instruction instructs access to the data port 14b1 or access to the increment data port 14b2, and interprets the number of operands of the instruction. Here, it is assumed that there are three operands, that is, two source operands indicating the address of the source data of the instruction to be operated and one destination operand indicating the destination of the operation result. I do.

【0028】そして、スレーブ演算部21は、その解釈
に基づき、データポート14b1 あるいはインクリメン
トデータポート14b2 のどちらか一方のポートへアク
セスして、アドレスレジスタ14aに格納されたオペラ
ンド1のアドレスが示すデータメモリ4上へ直接アクセ
スし、まずはオペランド1のアドレスのデータをフェッ
チする(ステップ210)。
Based on the interpretation, the slave operation unit 21 accesses one of the data port 14b1 and the increment data port 14b2 and accesses the data memory indicated by the address of the operand 1 stored in the address register 14a. 4 and directly fetches the data at the address of operand 1 (step 210).

【0029】次いで、同様にポートアクセスしてオペラ
ンド2のアドレスのデータをフェッチして(ステップ2
20)、続いて両フェッチしたデータを演算指令にした
がって演算し(ステップ230)、3度目のポートアク
セスによってその演算結果をアドレスレジスタ14aに
格納されたオペランド3のアドレスが示すディスティネ
ーションへ転送して(ステップ240)、この命令の演
算処理を終了する。
Next, the port access is similarly performed to fetch the data at the address of operand 2 (step 2).
20) Then, the both fetched data are operated according to the operation instruction (step 230), and the operation result is transferred to the destination indicated by the address of the operand 3 stored in the address register 14a by the third port access. (Step 240), the arithmetic processing of this instruction ends.

【0030】従って、この図2に示す処理をスレーブプ
ロセッサ2側で実行する本実施例によれば、図6に示す
処理をスレーブプロセッサ2側で実行する従来技術と比
較して、ステップ110,130のオペランド1,2の
計算であるソースデータアドレスの計算、およびステッ
プ160のオペランド3の計算であるディスティネーシ
ョンアドレスの計算処理が不要となり、スレーブプロセ
ッサ2側のオーバーヘッドが減少して、スレーブプロセ
ッサ2側の負担が軽減されると共に、スレーブプロセッ
サ2側の高速演算が可能になる。
Therefore, according to the present embodiment in which the processing shown in FIG. 2 is executed on the slave processor 2 side, steps 110 and 130 are compared with the prior art in which the processing shown in FIG. The calculation of the source data address, which is the calculation of operands 1 and 2, and the calculation of the destination address, which is the calculation of operand 3 in step 160, become unnecessary, and the overhead on the slave processor 2 side is reduced. Is reduced, and a high-speed operation on the slave processor 2 side becomes possible.

【0031】次に、このように構成されたマスタプロセ
ッサ演算装置の動作を、具体的な命令を一例にして説明
する。
Next, the operation of the thus-configured master processor arithmetic unit will be described using specific instructions as an example.

【0032】図3に、具体的な命令の一例を示す。FIG. 3 shows an example of a specific instruction.

【0033】この命令は、スレーブプロセッサ2側で演
算実行されるADD(加算)命令31を示しており、演
算内容を示す命令コード“ADD”と、第1〜第3の3
つのオペランドとで構成されている。
This instruction indicates an ADD (addition) instruction 31 which is executed on the slave processor 2 side, and includes an instruction code "ADD" indicating the content of the operation, and first to third three.
And one operand.

【0034】このADD命令31の動作内容は、「(第
1オペランドの)12番地のデータと、(第2オペラン
ドの)IR0+4番地のデータとを加算して、その加算
結果を(第3オペランドの)18番地のデータが示す番
地のデータに書き込む。」、という内容を示している。
The contents of the operation of the ADD instruction 31 are as follows. "The data at address 12 (of the first operand) and the data at address IR0 + 4 (of the second operand) are added, and the addition result is expressed as ) Write to the data at the address indicated by the data at the address 18. "

【0035】なお、IR0、すなわちユーザプログラム
メモリ3の0番地には、定数“10”のデータが入って
いるものとする。
It is assumed that IR0, that is, address 0 of the user program memory 3 contains data of a constant "10".

【0036】図4に、このADD命令31実行前のデー
タメモリ4のデータ格納状態の一例を示す。
FIG. 4 shows an example of the data storage state of the data memory 4 before the execution of the ADD instruction 31.

【0037】このデータメモリ4には、例えば“8番
地”のアドレスには定数“8”のデータ、“11番地”
のアドレスには定数“1”のデータというように、アド
レス順にデータが格納されている。
In this data memory 4, for example, an address of "address 8" contains data of a constant "8" and an address of "address 11".
Data is stored in the address in the order of addresses, such as data of a constant "1".

【0038】以上のメモリ状態を前提とした上で、この
図2に示すADD命令31がマスタプロセッサ1のデコ
ード部11によってユーザプログラムメモリ3から読み
出されて解析されると、デコード部11からスレーブプ
ロセッサ2側にそのADD命令31の演算内容を示す演
算指令が送出されると共に、このADD命令31の第1
〜第3のオペランド(図2参照)がオペランド解析部1
2に送出される。
On the premise of the above memory state, when the ADD instruction 31 shown in FIG. 2 is read from the user program memory 3 by the decoding unit 11 of the master processor 1 and analyzed, the decoding unit 11 An operation command indicating the operation content of the ADD instruction 31 is sent to the processor 2 and the first instruction of the ADD instruction 31
To the third operand (see FIG. 2) are the operand analyzer 1
2 is sent.

【0039】オペランド解析部12では、この第1〜第
3のオペランドをアドレス計算部12aが受けて、以下
のようにアドレス計算を行う。
In the operand analyzer 12, the first to third operands are received by the address calculator 12a, and the address is calculated as follows.

【0040】つまり、まず第1オペランドの場合、“$
12”の直接アドレス指定であるため、アドレス計算結
果はそのままの定数“12”であり、これをアドレスレ
ジスタ14aに書き込む。
That is, in the case of the first operand, "オ ペ ラ ン ド
Since the address is directly specified as "12", the address calculation result is the constant "12" as it is, and this is written to the address register 14a.

【0041】また、第2オペランドの場合、“#4(I
R0)”の間接アドレス指定であるため、IR0の内容
“10”を読み込むと共に、“IR0+4”の演算を実
行して“14”を得て、この計算結果“14”をアドレ
スレジスタ14aに書き込む。
In the case of the second operand, "# 4 (I
R0) ", the content" 10 "of IR0 is read, the operation" IR0 + 4 "is executed to obtain" 14 ", and the calculation result" 14 "is written to the address register 14a.

【0042】また、第3オペランドの場合、“$18”
の直接アドレス指定であるため、アドレス計算結果はそ
のままの定数“18”であり、これをアドレスレジスタ
14aに書き込む。
In the case of the third operand, "$ 18"
The address calculation result is a constant "18" as it is, and this is written to the address register 14a.

【0043】したがって、アドレスレジスタ14aに
は、このADD命令31の第1〜第3のオペランドに各
々対応した3つのアドレスが格納されることになる。
Therefore, three addresses respectively corresponding to the first to third operands of the ADD instruction 31 are stored in the address register 14a.

【0044】ところで、スレーブプロセッサ2では、マ
スタプロセッサ1側のデコード部11からそのADD命
令31の演算指令をスレーブ演算部21が受けて、スレ
ーブ演算部21がそのADD命令31の演算指令にした
がってインタフェースコントローラ14bのデータポー
ト14b1 若しくはインクリメントデータポート14b
2 にアクセスしてリードおよびライト動作を行う。
In the slave processor 2, the slave processor 21 receives an operation instruction of the ADD instruction 31 from the decoder 11 on the master processor 1 side, and the slave processor 21 interfaces with the slave in accordance with the operation instruction of the ADD instruction 31. Data port 14b1 of controller 14b or increment data port 14b
2 is accessed to perform read and write operations.

【0045】まず、スレーブ演算部21がデータポート
14b1 へアクセスしてリード動作をした場合、インタ
フェースコントローラ14bは、アドレスバスにアドレ
スレジスタ14aに格納された各アドレスを出力等する
ことによりスレーブ演算部21のメモリアクセスをコン
トロールして、アドレスレジスタ14aに格納された第
1オペランドのアドレスである“12”をアドレスレジ
スタ14aから読出してアドレスバスに流す。
First, when the slave operation unit 21 accesses the data port 14b1 and performs a read operation, the interface controller 14b outputs each address stored in the address register 14a to the address bus, thereby outputting the address. , The address of the first operand stored in the address register 14a, "12", is read from the address register 14a and sent to the address bus.

【0046】すると、図4に示すようにデータメモリ4
のアドレス“12番地”のデータ内容である定数“2”
が、リードデータとしてデータメモリ4からデータポー
ト14b1 を介しスレーブプロセッサ2内に読み込まれ
ることになる。
Then, as shown in FIG.
Constant "2" which is the data content of the address "address 12"
Is read from the data memory 4 into the slave processor 2 via the data port 14b1 as read data.

【0047】また、同様にして、スレーブ演算部21
は、インクリメントデータポート14b2 を再度アクセ
スするだけで、マスタプロセッサ1側で計算された第2
オペランドのアドレス“14番地”のデータである定数
“4”をデータメモリから読込むことができる。
Similarly, the slave operation unit 21
The second data calculated on the master processor 1 side can be obtained simply by accessing the increment data port 14b2 again.
The constant “4”, which is the data at the address “14” of the operand, can be read from the data memory 4 .

【0048】そして、スレーブ演算部21は、第1オペ
ランドのアドレスに基づく定数“2”と、第2オペラン
ドのアドレスに基づく定数“4”とを、デコード部11
からのADDの演算指令にしたがって加算して定数
“6”を得て、今度はその演算指令にしたがってデータ
ポート14b1 にアクセスして演算結果“6”のライト
動作を行う。
Then, the slave operation unit 21 decodes the constant “2” based on the address of the first operand and the constant “4” based on the address of the second operand on the decoding unit 11.
A constant "6" is obtained by addition in accordance with the ADD operation command from the CPU, and the data port 14b1 is accessed in accordance with the operation command to write the operation result "6".

【0049】すると、データポート14b1 にライトア
クセスしただけで、インタフェースコントローラ14b
のメモリアクセスコントロールによって、アドレスレジ
スタ14aに格納された第3オペランドのアドレス“8
番地”がアドレスバスに出力され、データメモリ4のア
ドレス“8番地”へ演算結果の定数“6”が書き込まれ
ることになる。
Then, only by making a write access to the data port 14b1, the interface controller 14b
By the memory access control of the third operand, the address "8" of the third operand stored in the address register 14a
The address is output to the address bus, and the constant "6" of the operation result is written to the address "8" of the data memory 4.

【0050】図5は、ADD命令31実行後のデータメ
モリ4の内容を示しており、図に示すように、データメ
モリ4のアドレス“8番地”の内容が定数“6”に変更
されていることがわかる。
FIG. 5 shows the contents of the data memory 4 after the execution of the ADD instruction 31. As shown in FIG. 5, the contents of the address "8" of the data memory 4 are changed to a constant "6". You can see that.

【0051】従って、本実施例によれば、図2にも示す
ように、スレーブプロセッサ2側では、命令のオペラン
ドに基づいてアドレス計算をすることなく、マスタプロ
セッサ1側のインタフェースコントローラ14bのデー
タポート14b1 にアクセスするだけで、インタフェー
スコントローラ14bのメモリアドレスコントロールに
よってデータメモリ4からデータを読込み演算を実行し
て、ディスティネーションへ演算結果を書込むことがで
きることになる。
Therefore, according to the present embodiment, as shown in FIG. 2, the slave processor 2 does not calculate the address based on the operand of the instruction, and the data port of the interface controller 14b on the master processor 1 side. By simply accessing 14b1, data can be read from the data memory 4 by the memory address control of the interface controller 14b to execute the operation, and the operation result can be written to the destination.

【0052】このため、図6に示すようにスレーブプロ
セッサ2側でも各オペランドに基づいてアクセス計算し
ていた従来技術と比較して、ステップ110,130の
オペランド1,2の計算であるソースデータアドレスの
計算、およびステップ160のオペランド3の計算であ
るディスティネーションアドレスの計算処理が不要とな
り、スレーブプロセッサ2側のオーバーヘッドが減少
し、スレーブプロセッサ2側の負担が軽減されると共
に、スレーブプロセッサ2側の高速演算が可能になる。
Therefore, as shown in FIG. 6, the source data address which is the calculation of operands 1 and 2 in steps 110 and 130 is compared with the prior art in which access calculation is also performed on the slave processor 2 side based on each operand. And the calculation of the destination address, which is the calculation of operand 3 in step 160, is not required, the overhead on the slave processor 2 side is reduced, the burden on the slave processor 2 side is reduced, and the slave processor 2 side is reduced. High-speed operation becomes possible.

【0053】次に、本実施例において、デコード部11
からの演算指令に基づいてスレーブ演算部21がインタ
フェースコントローラ14bのインクリメントデータポ
ート14b2 にアクセスした場合について説明する。
Next, in this embodiment, the decoding unit 11
The case where the slave operation unit 21 accesses the increment data port 14b2 of the interface controller 14b based on the operation command from the CPU will be described.

【0054】このインクリメントデータポート14b2
へのアクセスは、デコード部11で解読された命令が、
例えばデータメモリ4のある番地からある番地までの一
定領域の各データを他の領域にブロック単位でコピーす
るデータのブロックコピー命令の場合や、一定領域の各
データを各々演算して他の領域に書込む命令等のブロッ
ク単位の一括処理命令等の場合に行われる。
This increment data port 14b2
Is accessed by the instruction decoded by the decoding unit 11,
For example, in the case of a block copy instruction for data in which data in a certain area from a certain address to a certain address in the data memory 4 is copied to another area in block units, each data in the certain area is calculated and stored in another area. This is performed in the case of a batch processing instruction or the like in block units such as a writing instruction.

【0055】つまり、スレーブ演算部21がデコード部
11からそのようなブロック単位でデータを処理する一
括処理命令等の演算指令をうけたものとすると、スレー
ブ演算部21はインタフェースコントローラ14bのデ
ータポート14b1 ではなくインクリメントデータポー
ト14b2 にアクセスする。
That is, assuming that the slave operation unit 21 receives an operation instruction such as a batch processing instruction for processing data in such a block unit from the decoding unit 11, the slave operation unit 21 transmits the data port 14b1 of the interface controller 14b. Instead, access the increment data port 14b2.

【0056】このようなブロック転送命令の場合、アド
レスレジスタ14aには、そのデータブロックの先頭番
地が格納されているので(例えばアドレス“9番地”が
格納されているものとする。)、スレーブ演算部21が
インクリメントデータポート14b2 にアクセスする
と、インタフェースコントローラ14bがその先頭番地
“9番地”のアドレスをアドレスバスに出力して、スレ
ーブ演算部21にインクリメントデータポート14b2
を介してデータメモリ4に直接アクセスさせ、その“9
番地”のデータである定数“9”を読込み、ブロック単
位のコピー等の演算処理を実行させることができる。
In the case of such a block transfer instruction, since the head address of the data block is stored in the address register 14a (for example, the address "9" is stored), the slave operation is performed. When the section 21 accesses the increment data port 14b2, the interface controller 14b outputs the address of the head address "9" to the address bus, and sends the increment data port 14b2 to the slave operation section 21.
Directly access the data memory 4 via the “9”
The constant "9" which is the data of the "address" is read, and arithmetic processing such as copying in block units can be executed.

【0057】その際、その演算処理が終了すると、イン
タフェースコントローラ14bは、インクリメントデー
タポート14b2 へのアクセスであるため、アドレスレ
ジスタ14aに記憶された各オペランドのアドレスを1
インクリメントする。
At that time, when the arithmetic processing is completed, the interface controller 14b sets the address of each operand stored in the address register 14a to 1 because the access is to the increment data port 14b2.
Increment.

【0058】すると、スレーブ演算部21が再度インク
リメントデータポート14b2 にアクセスした場合、イ
ンタフェースコントローラ14bの制御によって、スレ
ーブ演算部21がアドレスレジスタ14aに格納された
1インクリメントされたアドレス“10番地”のデータ
にアクセスでき、その再度のインクリメントデータポー
ト14b2 のアクセスによってアドレスレジスタ14a
に格納されたアドレスが再度1インクリメントされ、次
のアクセスの際には次のアドレス“11番地”のデータ
にアクセスできることになる。
Then, when the slave operation unit 21 accesses the increment data port 14b2 again, the slave operation unit 21 controls the data of the address "10" which is stored in the address register 14a and is incremented by one under the control of the interface controller 14b. Can be accessed, and the address register 14a can be accessed by accessing the increment data port 14b2 again.
Is incremented by one again, and at the time of the next access, the data at the next address “11” can be accessed.

【0059】従って、本実施例によれば、スレーブ演算
部21は、必要なデータ数分だけインクリメントデータ
ポート14b2 へのアクセスを繰り返すだけで、アドレ
ス計算をすることなく一定領域のデータを読出して実行
することができ、一定領域のデータの一括処理の場合で
もアドレス計算をせずに高速演算が可能になる。
Therefore, according to the present embodiment, the slave arithmetic unit 21 reads out and executes data in a certain area only by repeating access to the increment data port 14b2 by the required number of data without performing address calculation. Therefore, even in the case of batch processing of data in a certain area, high-speed operation can be performed without performing address calculation.

【0060】[0060]

【発明の効果】以上説明したように本発明では、アドレ
ス計算手段が命令のオペランドに基づいて計算したアド
レスをインタフェース手段が記憶しておき、スレーブプ
ロセッサ側のスレーブ演算手段がインタフェース手段に
アクセスした場合には、インタフェース手段はスレーブ
演算手段がその記憶したアクセスのデータへアクセスで
きるようにアクセスコントロールを行うようにしたた
め、スレーブプロセッサ側では、命令のオペランドに基
づいてアドレス計算をすることなく、データメモリから
データを読み込み実行することができる。
As described above, according to the present invention, the address calculated by the address calculation means based on the operand of the instruction is stored in the interface means, and the slave calculation means on the slave processor side accesses the interface means. Since the interface means performs access control so that the slave operation means can access the data of the stored access, the slave processor does not calculate the address based on the operand of the instruction. Data can be read and executed.

【0061】このため、スレーブプロセッサ側でも各オ
ペランドに基づいてアクセス計算していた従来技術と比
較して、ソースデータアドレスおよびディスティネーシ
ョンアドレスの計算処理等が不要となり、スレーブプロ
セッサ側のオーバーヘッドが減少して、スレーブプロセ
ッサ側の負担が軽減されると共に、スレーブプロセッサ
側の高速演算が可能になる。
Therefore, compared with the prior art in which the access calculation is also performed on the slave processor side based on each operand, the calculation processing of the source data address and the destination address becomes unnecessary, and the overhead on the slave processor side is reduced. Thus, the load on the slave processor is reduced, and high-speed operation on the slave processor is enabled.

【0062】また、本発明では、スレーブ演算手段がイ
ンクリメントデータポートへアクセスした場合には、当
該スレーブ演算手段にそのアドレスが示すデータへ直接
アクセスさせると共に、そのアドレスをインクリメント
するようにしたため、スレーブ演算手段が必要なデータ
数分だけインクリメントデータポートへアクセスを繰り
返すだけで、アドレス計算をすることなく一定領域のデ
ータを読出して実行することができ、一定領域のデータ
の一括処理の場合でもアドレス計算をせずに高速演算が
可能になる。
According to the present invention, when the slave operation means accesses the increment data port, the slave operation means is directly accessed to the data indicated by the address and the address is incremented. By simply repeating the access to the increment data port by the required number of data, it is possible to read and execute data in a certain area without performing address calculation. High-speed operation is possible.

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

【図1】本発明に係るマルチプロセッサ演算装置の第1
実施例を示すブロック図。
FIG. 1 shows a first example of a multiprocessor operation device according to the present invention.
FIG. 2 is a block diagram showing an embodiment.

【図2】第1実施例のスレーブ演算部における命令演算
処理の手順を示すフローチャート。
FIG. 2 is a flowchart illustrating a procedure of an instruction operation process in a slave operation unit according to the first embodiment.

【図3】具体的な命令を示す説明図。FIG. 3 is an explanatory diagram showing specific instructions.

【図4】命令実行前のデータメモリのデータ格納状態の
一例を示す説明図。
FIG. 4 is an explanatory diagram showing an example of a data storage state of a data memory before execution of an instruction.

【図5】命令実行後のデータメモリのデータ格納状態の
一例を示す説明図。
FIG. 5 is an explanatory diagram showing an example of a data storage state of a data memory after execution of an instruction.

【図6】従来のスレーブプロセッサにおける命令演算処
理の手順を示すフローチャート。
FIG. 6 is a flowchart showing a procedure of an instruction operation process in a conventional slave processor.

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

1 マスタプロセッサ 11 デコード部(デコード手段) 12 オペランド解析部 12a アドレス計算部(アドレス計算手段) 12b データフェッチ部 13 マスタ演算部 14 インタフェース部(インタフェース手段) 14a アドレスレジスタ(アドレス記憶手段) 14b インタフェースコントローラ(アクセス制御手
段) 2 スレーブプロセッサ 21 スレーブ演算部 3 ユーザプログラムメモリ 4 データメモリ
DESCRIPTION OF SYMBOLS 1 Master processor 11 Decoding part (decoding means) 12 Operand analyzing part 12a Address calculating part (address calculating means) 12b Data fetching part 13 Master calculating part 14 Interface part (interface means) 14a Address register (address storing means) 14b Interface controller ( Access control means) 2 slave processor 21 slave operation unit 3 user program memory 4 data memory

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G05B 19/04 - 19/05 ──────────────────────────────────────────────────続 き Continuation of front page (58) Field surveyed (Int.Cl. 7 , DB name) G05B 19/04-19/05

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 各命令をマスタプロセッサ、あるいはス
レーブプロセッサで実行するようにしたマルチプロセッ
サ演算装置であって、 上記マスタプロセッサは、 命令を解析すると共に当該命令がマスタプロセッサ側で
実行されるものか、あるいはスレーブプロセッサ側で実
行されるものかを判断して、その判断結果に基づきマス
タプロセッサ側あるいはスレーブプロセッサ側に演算指
令を出力すると共に、当該命令のオペランドを出力する
デコード手段と、 上記デコード手段からのオペランドに基づいてアドレス
を計算するアドレス計算手段と、上記アドレス計算手段が計算したアドレスを記憶するア
ドレス記憶手段、スレーブプロセッサ側へのデータポー
トおよびインクリメントデータポート、上記アドレスの
データへのスレーブ演算手段のアクセスを制御するアク
セス制御手段を有 するインタフェース手段と、を具備す
る一方、 上記スレーブプロセッサは、 上記デコード部からの演算指令を受けて上記インタフェ
ース手段にアクセスして、当該インタフェース手段に記
憶されたアドレスのデータを読出し実行するスレーブ演
算手段を具備し、 スレーブ演算手段が上記データポートへアクセスした場
合は、当該スレーブ演算手段に上記アドレスが示すデー
タへ直接アクセスさせ、インクリメントデータポートへ
アクセスした場合は、当該スレーブ演算手段に上記アド
レスが示すデータへ直接アクセスさせると共に、上記ア
ドレス記憶手段に記憶されたアドレスをインクリメント
するようにした ことを特徴とするマルチプロセッサ演算
装置。
1. Each instruction is a master processor.SessaOr
Multiprocessor that is executed by a slave processor
A master processor, wherein the master processor analyzes the instruction and the instruction is transmitted to the master processor.
Is executed or executed on the slave processor side.
Is performed, and based on the result of the
Calculation instructions to the
Output the instruction and output the operand of the instruction
Decoding means; and an address based on the operand from the decoding means.
Address calculating means for calculatingAn address for storing the address calculated by the address calculation means.
Address storage means, data port to slave processor side
And increment data ports,
An action that controls access of the slave operation means to data
Access control means Interface means for performing
On the other hand, the slave processor receives the calculation instruction from the decoding unit and
Access to the source means, and
Slave function that reads and executes the data at the stored address
Equipped with arithmetic meansAnd When the slave operation means accesses the above data port
In this case, the data indicated by the address
To the increment data port
When accessed, the above-mentioned address is
Direct access to the data indicated by the
Increment the address stored in the dress storage means
Tried to do Multiprocessor operation characterized by the following:
apparatus.
【請求項2】 請求項1記載のマルチプロセッサ演算装
置によってユーザプログラムを実行することを特徴とす
るプログラマブルコントローラ。
2. The multiprocessor arithmetic unit according to claim 1,
A user program is executed by the device.
Programmable controller.
JP05228695A 1995-03-13 1995-03-13 Multiprocessor arithmetic device and programmable controller having the device Expired - Fee Related JP3328867B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05228695A JP3328867B2 (en) 1995-03-13 1995-03-13 Multiprocessor arithmetic device and programmable controller having the device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05228695A JP3328867B2 (en) 1995-03-13 1995-03-13 Multiprocessor arithmetic device and programmable controller having the device

Publications (2)

Publication Number Publication Date
JPH08249022A JPH08249022A (en) 1996-09-27
JP3328867B2 true JP3328867B2 (en) 2002-09-30

Family

ID=12910564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05228695A Expired - Fee Related JP3328867B2 (en) 1995-03-13 1995-03-13 Multiprocessor arithmetic device and programmable controller having the device

Country Status (1)

Country Link
JP (1) JP3328867B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10307607A (en) * 1997-05-08 1998-11-17 Hitachi Ltd Main processor and programmable controller
JP4490577B2 (en) 2000-10-02 2010-06-30 株式会社キーエンス PLC system construction support tool

Also Published As

Publication number Publication date
JPH08249022A (en) 1996-09-27

Similar Documents

Publication Publication Date Title
US4942519A (en) Coprocessor having a slave processor capable of checking address mapping
US20020099922A1 (en) Data processing apparatus including a plurality of pipeline processing mechanisms in which memory access instructions are carried out in a memory access pipeline
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JP3328867B2 (en) Multiprocessor arithmetic device and programmable controller having the device
US5369746A (en) Interprocessor data transferring system and method
JP2619425B2 (en) Sequence controller
JPS6349938A (en) Instruction prefetch control device
JPH06324861A (en) System and method for controlling cpu
JP2926941B2 (en) Instruction decoding device
JP3001205B2 (en) Information processing device
JP3457535B2 (en) Communication device between processors
JPH0259829A (en) Microcomputer
JPH06348543A (en) Method for connection with input/output simulator
JP2591211B2 (en) High-speed interrupt processing device
JPH07210454A (en) High-speed processor
JPS5955546A (en) Firmware processor
JPH03168845A (en) Instruction execution control system
JPH03168860A (en) Buffer storage control device for parallel processor
JPH0380355A (en) Computer with dma transfer mechanism
JPH07191844A (en) Microprocessor with programmable logic
JPS63155254A (en) Information processor
JPH07175661A (en) User program load system
JPH0449446A (en) System for controlling plural caches
JPS63214862A (en) Microprocessor
JPH05204416A (en) Programable controller

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020612

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120719

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130719

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees