JPH0317135B2 - - Google Patents

Info

Publication number
JPH0317135B2
JPH0317135B2 JP59030061A JP3006184A JPH0317135B2 JP H0317135 B2 JPH0317135 B2 JP H0317135B2 JP 59030061 A JP59030061 A JP 59030061A JP 3006184 A JP3006184 A JP 3006184A JP H0317135 B2 JPH0317135 B2 JP H0317135B2
Authority
JP
Japan
Prior art keywords
data
instruction
memory
register
microprogram
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 - Lifetime
Application number
JP59030061A
Other languages
Japanese (ja)
Other versions
JPS60175146A (en
Inventor
Tadashi Okamoto
Hiromasa Yamaoka
Kazuhiko Shimoyama
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3006184A priority Critical patent/JPS60175146A/en
Publication of JPS60175146A publication Critical patent/JPS60175146A/en
Publication of JPH0317135B2 publication Critical patent/JPH0317135B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、プラントのプロセス制御に用いるプ
ログラマブル・コントローラに関し、特に、高速
高機能を必要とする制御に使用するに好適なプロ
グラマブル・コントローラの内部の制御方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a programmable controller used for plant process control, and in particular, to a programmable controller suitable for use in control requiring high speed and high functionality. Regarding control method.

〔発明の背景〕[Background of the invention]

プログラマブル・コントローラは、当所、簡単
なシーケンス制御からスタートした。しかし、最
近では、適用分野の拡大とともに、数値演算を高
速処理する必要性から、使用素子自体の高速化を
はじめとして、命令,データの先読みと命令実行
の並行処理方式が採用されるに至つている。とこ
ろが、制御対象の複雑化等に起因して、よりきめ
こまかな、並行処理の制御及び、1つの命令で複
数データを処理するような高機能処理の制御方式
が要望されている。
Our programmable controller started with simple sequence control. However, in recent years, as the field of application has expanded and the need to process numerical operations at high speed has led to the adoption of parallel processing methods for prefetching instructions and data and executing instructions, including increasing the speed of the used elements themselves. There is. However, due to the increasing complexity of objects to be controlled, there is a demand for more fine-grained control of parallel processing and control methods of high-performance processing such as processing multiple data with one command.

ここで、第1図に従来のプログラマブル・コン
トローラの一例を示す。まず、概略について述べ
る。このコントローラは、命令,データの先読み
を行なう制御方式を採用したものである。先読み
とは、現在実行中の演算において次に必要となる
命令,データを先行的に読み出しておくことであ
る。
Here, FIG. 1 shows an example of a conventional programmable controller. First, I will give an overview. This controller employs a control system that pre-reads commands and data. Pre-reading means reading in advance the instructions and data that will be needed next in the currently executing operation.

第2図はこのコントローラにおいて使用する命
令のフオーマツトを示し、第1図中のプログラ
ム・メモリ1に格納されている。
FIG. 2 shows the format of instructions used in this controller, which are stored in the program memory 1 shown in FIG.

第3図は、第2図の命令をさらにマイクロプロ
グラムで実行する場合の、マイクロ命令のフオー
マツトを示し、第1図中のマイクロプログラム・
メモリ8に格納されている。このマイクロ命令の
制御コドの内容は次の第1表の通りである。
FIG. 3 shows the format of microinstructions when the instructions in FIG. 2 are further executed by a microprogram.
It is stored in memory 8. The contents of the control code of this microinstruction are shown in Table 1 below.

第 1 表 102…プログラムカウンタ更新(+1) 103…メモリアドレスレジスタ更新(+1) 104…Dレジスタ書込み 105…書込データレジスタにデータをセツト 106…データ読出し開始 107…データ書込み開始 108…JMAP(次の命令を実行) 次に、第4図に以上のコントローラ各部の動作
タイムチヤートを示してある。
Table 1 102...Program counter update (+1) 103...Memory address register update (+1) 104...D register write 105...Set data in write data register 106...Data read start 107...Data write start 108...JMAP (next) (execution of the command) Next, FIG. 4 shows an operation time chart of each part of the controller described above.

この制御方式の大きな特徴は、命令の中にデー
タ先読む許可ビツト(以下、POFビツトと略
す。)を持つこと、また、構成上、プログラム・
メモリ1とデータ・メモリ2が独立に存在し、命
令レジスタとして第1命令レジスタ3、および第
2命令レジスタ4との2段設けてあり、第1命令
レジスタ3のアドレス部分がメモリ・アドレス・
レジスタ5に接続されている点である。
The major feature of this control method is that it has a data prefetch permission bit (hereinafter abbreviated as POF bit) in the instruction, and that the program
A memory 1 and a data memory 2 exist independently, and two stages of a first instruction register 3 and a second instruction register 4 are provided as instruction registers, and the address part of the first instruction register 3 is used as a memory address.
This is the point where it is connected to the register 5.

以下、動作上の特徴を説明る。第1図において
第2命令レジスタ4に格納されている命令は、命
令コーダ5で解読され、マイクロ・プログラム・
カウンタ7、マイクロプログラム・メモリ8を経
て演算回路9に与えられ、その命令に従つて演算
が実行される。このとき、次に実行する命令が第
1命令レジスタ3にすでに格納されており、
POFビツト101(第2図)が“1”の時、こ
の命令のデータ読み出し(つまり、データの先読
み)を行う。一方、プログラム・カウンタ6は、
現在実行している命令の次の次の命令の読み出し
を行なつている。そして、今実行中の命令が終り
次の命令の実行に移る時に、その命令データが読
み出しデータレジスタ18に入り、また、読み出
し中であつた次の命令は、第1命令レジスタ3に
格納されている。
The operational characteristics will be explained below. The instructions stored in the second instruction register 4 in FIG.
The command is applied to an arithmetic circuit 9 via a counter 7 and a microprogram memory 8, and an arithmetic operation is executed according to the instruction. At this time, the next instruction to be executed has already been stored in the first instruction register 3,
When the POF bit 101 (FIG. 2) is "1", data reading for this instruction (that is, pre-reading of data) is performed. On the other hand, the program counter 6 is
The next instruction following the currently executed instruction is being read. Then, when the currently executed instruction ends and the execution of the next instruction begins, the instruction data enters the read data register 18, and the next instruction that was being read is stored in the first instruction register 3. There is.

以上の動作のタイムチヤートを第4図に示して
ある。第4図において、A,B,C……は、それ
ぞれ命令を示し、並行処理されていることがわか
る。
A time chart of the above operation is shown in FIG. In FIG. 4, A, B, C, . . . indicate instructions, and it can be seen that they are processed in parallel.

以上の方式において、プログラム・メモリ・イ
ンターフエイス回路10、データ・メモリ・イン
ターフエイス回路11、第1命令レジスタ3、第
2命令レジスタ4、演算回路9の各部の動作は、
全て、各命令の区切りを示すJMAP信号108に
同期して進めるため、回路及び考え方が単純であ
る利点がある。ここに、JMAP信号とはJUMP・
MAP信号の略であり、命令の特定ビツトをマイ
クロプログラムのアドレスに変換するためのもの
であり、先頭アドレスを指定して次の命令を実行
させる信号である。
In the above system, the operations of each part of the program memory interface circuit 10, data memory interface circuit 11, first instruction register 3, second instruction register 4, and arithmetic circuit 9 are as follows.
Since everything proceeds in synchronization with the JMAP signal 108 that indicates the break between each instruction, there is an advantage that the circuit and concept are simple. Here, the JMAP signal is JUMP/
This is an abbreviation for MAP signal, which is used to convert specific bits of an instruction into a microprogram address, and is a signal that specifies the start address and executes the next instruction.

さて、以上の方式においては、1つの命令で処
理するデータ数が1ケあるいは、固定の数である
ことが必要であり、1命令で任意のデータ数、例
えば、倍長演算が混在する場合等においては、処
理することができないという点で高速化が妨げら
れている。
Now, in the above method, it is necessary that the number of data processed by one instruction is 1 or a fixed number, and any number of data can be processed by one instruction, for example, when double-length operations are mixed, etc. In this case, speeding up is hindered by the inability to process it.

次に、第1図のコントローラの構成の詳細を以
下に示しておく。先にも述べたように、プログラ
ム・メモリ1には第2図に示すようなプログラム
命令が格納されている。データ・メモリ2には演
算の対象となるデータが書込まれたり、読み出さ
れたりする。
Next, details of the configuration of the controller shown in FIG. 1 will be shown below. As mentioned above, the program memory 1 stores program instructions as shown in FIG. Data to be operated on is written to and read from the data memory 2.

プログラム・メモリ1から読み出された命令は
第1命令レジスタ3に格納され、次いで第2命令
レジスタ4に転送される。なお、この命令のフオ
ーマツトは第2図に示した通りであり、命令の種
数を示す命令コード部112、POF101、デ
ータ・アドレス113で構成される。POF10
1は、データを読み出して加工する命令の場合
“1”、データを出力する命令の場合“0”とし、
“1”の命令に関しては、演算実行に先立つて、
データを先読みすることができる。
Instructions read from program memory 1 are stored in first instruction register 3 and then transferred to second instruction register 4. The format of this instruction is as shown in FIG. 2, and is composed of an instruction code section 112 indicating the type of instruction, a POF 101, and a data address 113. POF10
1 is "1" for an instruction to read and process data, "0" for an instruction to output data,
Regarding the “1” instruction, before executing the operation,
Data can be read ahead.

プログラム・メモリ1から命令を読み出す際の
アドレスは、プログラム・カウンタ6より与えら
れ、1命令終る毎に、プログラム・カウンタ更新
信号102を用いて、カウント・アツプする。ま
た、命令を読み出す際に、プログラム・メモリ1
とインターフエイスを取るプログラム・メモリ・
インターフエイス回路10は、第4図の読み出し
タイミングを発生するものである。第4図の矢印
は、信号変化の順序を示す。このプログラム・メ
モリ・インターフエイス回路10に、読み出し開
始の起動をかけるのがPFE(命令先読み開始)信
号114である。
The address for reading an instruction from the program memory 1 is given by a program counter 6, and is counted up using a program counter update signal 102 every time one instruction is completed. Also, when reading instructions, program memory 1
The program memory that interfaces with
The interface circuit 10 generates the read timing shown in FIG. The arrows in FIG. 4 indicate the order of signal changes. A PFE (instruction prefetch start) signal 114 activates the program memory interface circuit 10 to start reading.

命令デコーダ5は、命令レジスタ2段目に入つ
た命令コードを解読し、その命令を処理するため
のマイクロプログラムが格納されている先頭アド
レスを、マイクロプログラム・カウンタ7にセツ
トするものである。
The instruction decoder 5 decodes the instruction code entered into the second stage of the instruction register, and sets in the microprogram counter 7 the starting address where the microprogram for processing the instruction is stored.

マイクロプログラム・カウンタ7は、マイクロ
プログラムを順次実行するために、マイクロプロ
グラム・メモリ8に対し、実行すべきマイクロプ
ログラムのアドレスを与える。
The microprogram counter 7 provides the address of the microprogram to be executed to the microprogram memory 8 in order to execute the microprograms sequentially.

マイクロプログラム・メモリ8は、マイクロ命
令(第3図)が呼び出されるたびに、第1表に定
義した内容、つまり、演算コード、次に実行する
マイクロプログラム・アドレス及び、102〜1
08に示すように、ハードウエアを動作させる。
Each time a microinstruction (FIG. 3) is called, the microprogram memory 8 stores the contents defined in Table 1, that is, the operation code, the microprogram address to be executed next, and 102 to 1
The hardware is operated as shown in 08.

次に、演算回路9は、マイクロ命令の演算コー
ドに従つて、加減算を初めとする各種の演算を行
なうものである。演算回路9の内部は、アキユム
レータA91,AL92と演算用の一時的な用途
に用いるTレジスタ93、演算器94と、演算結
果のキヤリーを一時的に記憶し、倍長語演算の桁
上げ等に用いるキヤリーフラグ95から成つてい
る。演算回路9の外には、読み出しデータレジス
タ18と演算回路9との間にDレジスタ12があ
り、データの受け渡しに用いる。内部データ・バ
ス115は、演算回路9とその周辺のレジスタ数
とのデータのやり取りの経路に用いる。データ・
メモリ2を読み書きする場合のアドレスは、メモ
リアドレス・レジスタ21から与える。メモリ・
アドレス・レジスタ21にアドレスをセツトする
手段として2通りあり、まず、第1に第1命令レ
ジスタ3のアドレス部を直接セツトするデータ先
読みの場合と、第2には演算回路9から与える場
合がある。以上の切替えはスイツチ13によつて
行なわれ、データ先読みの条件、つまり、命令先
読み信号(PFE)114が与えられて命令レジ
スタ1段目3にセツトされた命令のPOF信号1
01が“1”の時に、メモリ・アドレス・レジス
タ21に命令レジスタ1段目3のアドレス部が直
接セツトされる。
Next, the arithmetic circuit 9 performs various operations including addition and subtraction according to the operation code of the microinstruction. The inside of the arithmetic circuit 9 includes accumulators A91 and AL92, a T register 93 used for temporary purposes for arithmetic operations, an arithmetic unit 94, and a carry for the arithmetic result, which is used to temporarily store the carry of the arithmetic operation, etc. It consists of a carry flag 95 to be used. Outside the arithmetic circuit 9, there is a D register 12 between the read data register 18 and the arithmetic circuit 9, which is used for data exchange. The internal data bus 115 is used as a path for exchanging data between the arithmetic circuit 9 and its peripheral registers. data·
Addresses for reading and writing from memory 2 are given from memory address register 21. memory·
There are two ways to set an address in the address register 21. First, there is a data lookahead method in which the address field of the first instruction register 3 is directly set, and the second method is to provide it from the arithmetic circuit 9. . The above switching is performed by the switch 13, and the data prefetch condition, that is, the POF signal 1 of the instruction set in the first stage 3 of the instruction register when the instruction prefetch signal (PFE) 114 is applied.
When 01 is "1", the address part of the first stage 3 of the instruction register is directly set in the memory address register 21.

読み出しデータ・レジスタ18には、データ・
メモリから読み出されたデータがセツトされる。
セツトされるタイミングは、データ・メモリ2の
応答信号116が返された時点である。
The read data register 18 contains data.
Data read from memory is set.
The timing to be set is when the response signal 116 of the data memory 2 is returned.

書込データ・レジスタ14には、データ・メモ
リ2へ書き込むデータをセツトして、データ・メ
モリ・インターフエイス回路11を起動して、デ
ータ書込みを実行する。
Data to be written to the data memory 2 is set in the write data register 14, and the data memory interface circuit 11 is activated to execute data writing.

データ・メモリ・インターフエイス回路11
は、データの読み出しの時にも働き、第7図に示
すタイミングを発生する。
Data memory interface circuit 11
also works when reading data and generates the timing shown in FIG.

クロツク回路15は、マイクロプログラムを実
行するためのクロツク信号117を発生する。
Clock circuit 15 generates a clock signal 117 for executing the microprogram.

なお、特開昭50−24044号公報、特開昭55−
43604号公報にも命令の先読みに関する技術が記
載されているが、いずれのものでも命令の先読み
と内部演算を並行して行なうことができない。
In addition, JP-A-50-24044, JP-A-55-
Although Japanese Patent Publication No. 43604 also describes techniques related to prefetching of instructions, none of them allows prefetching of instructions and internal operations to be performed in parallel.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、命令およびデータの先読み処
理と内部演算処理とを並行して行なうことができ
るプログラマブル・コントローラを提供すること
にある。
An object of the present invention is to provide a programmable controller that can perform prefetching of instructions and data and internal arithmetic processing in parallel.

〔発明の概要〕[Summary of the invention]

上記目的を達成するために、本発明は、プログ
ラム・メモリに格納された命令およびデータ・メ
モリに格納された演算に必要なデータの先読みを
行いつつ前記命令に基づいてマイクロプログラム
より演算回路において演算を実行するプログラマ
ブル・コントローラにおいて、命令の先読みの実
行後に、先読みされた命令の読み出しに要する時
間を規定したタイミング信号を発生する第1タイ
ミング信号発生手段と、データの先読みの実行後
に、先読みされたデータの読み出しに要する時間
を規定したタイミング信号を発生する第2タイミ
ング信号発生手段と、前記各タイミング信号の発
生時前記演算回路に対する内部処理を指令する内
部処理指令手段と、前記各タイミング信号を受
け、各タイミング信号で規定された時間だけ前記
マイクロプログラムの進行を停止する制御手段を
備えたことを特徴とするプログラマブル・コント
ローラを構成したものである。
In order to achieve the above object, the present invention prefetches instructions stored in a program memory and data necessary for operations stored in a data memory, and executes operations in an arithmetic circuit from a microprogram based on the instructions. In a programmable controller that executes a programmable controller, a first timing signal generating means generates a timing signal specifying the time required to read the prefetched instruction after executing the prefetch of the instruction; a second timing signal generation means for generating a timing signal specifying the time required to read data; an internal processing command means for instructing internal processing to the arithmetic circuit when each of the timing signals is generated; and an internal processing command means for receiving each of the timing signals. , a programmable controller characterized in that it comprises a control means for stopping the progress of the microprogram for a time specified by each timing signal.

かかる本発明によれば、倍語長命令等の1つの
命令で、複数のデータを取扱う処理においても、
命令の先読み、データの先読み、複数データの読
み出し中においても、内部演算を並行して行なう
ことができ、従つて処理速度を向上させることが
できる。
According to the present invention, even in a process that handles multiple pieces of data with one instruction such as a double word length instruction,
Even during prefetching of instructions, prefetching of data, and reading of multiple data, internal calculations can be performed in parallel, and therefore processing speed can be improved.

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

次に、本発明によるプログラマブル・コントロ
ーラの一実施例を図面に基づいて説明する。本発
明の実施例を第5図〜第10図に示し、第1図〜
第4図と重複する部分には同一の符号を附してそ
の詳細な説明を省略する。
Next, one embodiment of the programmable controller according to the present invention will be described based on the drawings. Examples of the present invention are shown in FIGS. 5 to 10, and FIGS.
Parts that overlap with those in FIG. 4 are given the same reference numerals, and detailed explanation thereof will be omitted.

第5図において、従来のコントローラ(第1
図)と異なる主な部分を太線で示してある。すな
わち、この実施例において、従来のコントローラ
(第1図)の構成に加え、命令の先読みの実行後
に、先読みされた命令の読み出しに要する時間を
規定したタイミング信号(セツト信号111)を
発生すぐ第1タイミング信号発生手段と、データ
の先読みの実行後に、先読みされたデータの読み
出しに要する時間を規定したタイミング信号(セ
ツト信号110)を発生する第2タイミング信号
発生手段と、前記各タイミング信号の発生時演算
回路9に対する内部処理を指令する内部処理指令
手段とをマイクロプログラム8に設け、さらにプ
ログラム・メモリ1からの命令の先読み開始タイ
ミングおよび命令読み出し待ちタイミングと、デ
ータ・メモリ2からのデータの先読み開始タイミ
ングおよびデータ読み出し待ちタイミングとを
各々独立してマイクロプログラム・メモリ8から
のマイクロ命令(具体的にはセツト信号110,
111)により制御する手段を設けた点に特徴を
有する。
In Fig. 5, the conventional controller (first
The main differences from the figure) are indicated by thick lines. That is, in this embodiment, in addition to the configuration of the conventional controller (FIG. 1), after the prefetching of an instruction is executed, a timing signal (set signal 111) specifying the time required to read the prefetched instruction is generated and immediately started. a second timing signal generating means for generating a timing signal (set signal 110) that defines the time required to read the prefetched data after prefetching the data; and a second timing signal generating means for generating each of the timing signals. The microprogram 8 is provided with an internal processing command means for instructing the internal processing to the time calculation circuit 9, and further includes a timing for starting prefetching of instructions from the program memory 1, a timing for waiting for instruction readout, and a timing for prefetching data from the data memory 2. The start timing and the data read wait timing are each independently controlled by a microinstruction from the microprogram memory 8 (specifically, the set signal 110,
111) is provided.

この制御手段は、プログラム・メモリ1または
データ・メモリ2と演算回路9との同期をとるた
めの命令同期フリツプ・フロツプ16ならびにデ
ータ同期フリツプ・フロツプ17と、これらの各
出力のNORをとるNOR回路19と、このNOR
回路19の出力によつてクロツク回路15からマ
イクロプログラム・カウンタ7へのクロツク信号
117の送出を禁止するスイツチ20とより構成
される。
This control means includes an instruction synchronization flip-flop 16 and a data synchronization flip-flop 17 for synchronizing the program memory 1 or data memory 2 and the arithmetic circuit 9, and a NOR circuit for NORing the outputs of these flip-flops. 19 and this NOR
The circuit 19 includes a switch 20 which inhibits the output of the clock signal 117 from the clock circuit 15 to the microprogram counter 7 based on the output of the circuit 19.

本実施例(第5図)において、プログラム・メ
モリ1には、例えば第8図に示すようにプログラ
ムが格納されている。その命令仕様の例を次の第
2表に示す。
In this embodiment (FIG. 5), the program memory 1 stores programs as shown in FIG. 8, for example. An example of the instruction specification is shown in Table 2 below.

第 2 表 命令仕様 (1) LDD(ロードダブル) D100番地のデータをALレジスタにセツトす
る。
Table 2 Instruction specifications (1) LDD (load double) Set the data at address D100 to the AL register.

D101番地のデータをAUレジスタにセツトす
る。
Set the data at address D101 to the AU register.

(2) ×2D(2倍のダブル) AL,AUレジスタの内容を2倍してAL,AU
にセツトする。
(2) ×2D (double double) Double the contents of the AL and AU registers to create AL and AU
Set to .

但し、AUレジスタのデータをALの上位桁
として扱う。
However, the data in the AU register is treated as the upper digits of AL.

(3) SUBD(引算ダブル) AL,AUレジスタの内容からD300,D301番地
のデータを引きAL,AUレジスタにセツトす
る。
(3) SUBD (subtraction double) Subtracts the data at addresses D300 and D301 from the contents of the AL and AU registers and sets them in the AL and AU registers.

但し、AUレジスタ、D301番地のデータを上
位桁として扱う。
However, the data in the AU register, address D301, is treated as the upper digit.

また、命令を読み出す場合のプログラム・メモ
リ・インターフエイス回路10の読み出しタイミ
ングを第7図aに示し、書込みタイミングを第7
図bに示す。第7図における矢印は信号変化の順
序を示している。
Further, the read timing of the program memory interface circuit 10 when reading an instruction is shown in FIG. 7a, and the write timing is shown in FIG.
Shown in Figure b. The arrows in FIG. 7 indicate the order of signal changes.

さらに、マイクロプログラム・メモリ8には、
第6図に示すフオーマツトのマイクロ命令が格納
されており、マイクロ命令が呼び出されるたび
に、次の第3表に定義した内容、つまり、演算コ
ード、次に実行するマイクロプログラム・アドレ
ス及び(1)〜(11)に示すように、ハードウエアを動作
させる。
Furthermore, in the microprogram memory 8,
A microinstruction in the format shown in Figure 6 is stored, and each time a microinstruction is called, the contents defined in Table 3 below are stored, including the operation code, the microprogram address to be executed next, and (1) - Operate the hardware as shown in (11).

第 3 表 102…プログラムカウンタ更新(+1) 〔(PC)+1→PC〕 103…メモリアドレスレジスタ更新(+1) 〔(MAR)+1→MAR〕 104…Dレジスタ書込み〔(RDR)→D〕 105…書込データレジスタにデータをセツト 109…DFE(データ先読み開始) 〔DFE〕 106…データ読み出し開始 〔Read〕 107…データ書込開始 110…データ同期フリツプ・フロツプのセツト
〔DWRQ〕 111…命令同期フリツプ・フロツプのセツト 〔PWRQ〕 108…JMAP(次の命令を実行) 〔JMAP〕 114…PFE(命令先読み開始)〔PFE〕 RDR:読み出しデータレジスタ 次に動作を説明する。命令同期フリツプ・フロ
ツプ16は次のように動作する。まず、マイクロ
プログラム・メモリ8から命令先読み開始信号
(PFE)114がプログラム・メモリ・インター
フエイス回路10に与えられて先読みを実行して
いる状態において、マイクロ・プログラム・メモ
リ8からセツト信号(PWRQ)111が命令同
期フリツプ・フロツプ16に与えられると、この
命令同期フリツプ・フロツプ16がセツトされ、
NOR回路19を通じてスイツチ20が開き、ク
ロツク回路15からのクロツク信号117がプロ
グラム・メモリ1からの命令の読み出しが終了す
るまで禁止されてマイクロプログラムが待ち状態
となる。データ同期フリツプ・フロツプ17の動
作も同様に、データ・メモリ・インターフエイス
回路11が、データ先読み開始信号(DFE)1
09あるいは、データ読み出し開始信号106で
起動された状態で、データ同期フリツプ・フロツ
プのセツト信号(DWRQ)110を与えると、
データの読み出しが終るまでクロツク信号117
が禁止されてマイクロプログラムが待ち状態とな
る。
Table 3 102...Program counter update (+1) [(PC)+1→PC] 103...Memory address register update (+1) [(MAR)+1→MAR] 104...D register write [(RDR)→D] 105... Set data in the write data register 109...DFE (start reading data ahead) [DFE] 106...Start reading data [Read] 107...Start writing data 110...Set data synchronous flip-flop
[DWRQ] 111...Set instruction synchronous flip-flop [PWRQ] 108...JMAP (Execute next instruction) [JMAP] 114...PFE (Start prefetching of instruction) [PFE] RDR: Read data register The operation will be explained next. . Instruction synchronous flip-flop 16 operates as follows. First, in a state where the instruction prefetch start signal (PFE) 114 is applied from the microprogram memory 8 to the program memory interface circuit 10 to execute prefetching, the set signal (PWRQ) is sent from the microprogram memory 8. 111 is applied to the instruction synchronous flip-flop 16, the instruction synchronous flip-flop 16 is set;
The switch 20 is opened through the NOR circuit 19, and the clock signal 117 from the clock circuit 15 is inhibited until reading of the instructions from the program memory 1 is completed, and the microprogram is placed in a waiting state. The operation of the data synchronous flip-flop 17 is similar to that in which the data memory interface circuit 11 receives the data prefetch start signal (DFE) 1.
09, or if the data synchronous flip-flop set signal (DWRQ) 110 is applied while activated by the data read start signal 106,
Clock signal 117 until data reading is completed.
is prohibited and the microprogram enters a wait state.

次に、第8図に示すプログラムの例により、動
作を説明する。このプログラム(第8図)に記述
している命令LDD,2D,SUBDの仕様は第2表
に示す通りであり、さらに各命令を実行するため
のマイクロプログラム例を第9図に示す。第9図
におけるニモニツク(mnemonic)は、第6図に
おいてマイクロプログラムの動作定義とともに
( )で示しているものである。
Next, the operation will be explained using the example program shown in FIG. The specifications of the instructions LDD, 2D, and SUBD described in this program (FIG. 8) are as shown in Table 2, and an example of a microprogram for executing each instruction is shown in FIG. The mnemonic in FIG. 9 is shown in parentheses along with the operation definition of the microprogram in FIG. 6.

ここで、( )の内容、例えば、(D)は「D
レジスタの内容」の意味を示し、→は、データの
転送方向を示している。第9図において、マイク
ロプログラム・アドレスが各命令でとびとびにな
つているのは、命令毎にマイクロプログラムさ
れ、決まつたアドレスに格納されているためであ
り、実行する時に命令から命令へのつながりは
JMAPで、命令デコーダ5とマイクロプログラ
ム・カウンタ7で行う。なお、第9図において、
点線で囲んだ部分は先読みを行い、演算と並行し
て処理していることを示している。このプログラ
ム例を実行した場合のタイムチヤートを第10図
に示。
Here, the content of ( ), for example, (D) is "D
"Register contents" is indicated, and "→" indicates the direction of data transfer. In Figure 9, the microprogram addresses are discrete for each instruction because each instruction is microprogrammed and stored at a fixed address, and the connection from one instruction to another during execution is teeth
This is done using the instruction decoder 5 and microprogram counter 7 in JMAP. In addition, in Fig. 9,
The part surrounded by a dotted line indicates that prefetching is performed and processing is performed in parallel with the calculation. Figure 10 shows a time chart when this example program is executed.

第10図において、時間T5〜T13は、LDD命令
を実行している時間帯を示し、2語目のデータの
読み出し起動がT6であり、T7〜T9で読み出しが
終るまで待つている状態を示している。この場合
は、並行処理が行なわれていないが、T10〜T13
では、次の次の命令であるSUBD命令の読み出し
と、内部処理であるAUへのデータのセツト動作
を並行処理しているのが分る。すなわち、SUBD
命令の先読みが終了するまで演算回路9の内部処
理として、(RDR)→Dの処理が行なわれる。更
にT14〜T17においては2D命令の実行であり、こ
の場合は、命令先読み、データ先読みタイミング
がT14と早い時期に行なうことができるために
T14〜T16の演算をした後、T17で同期をとるた
め、メモリに対する待ち時間が短かく、効率の良
い並行処理を行なつていることが分る。
In FIG. 10, times T 5 to T 13 indicate the time period during which the LDD instruction is executed, and the reading of the second word data starts at T 6 and waits until the reading ends at T 7 to T 9 . This indicates the state in which the In this case, parallel processing is not performed, but T 10 ~ T 13
It can be seen that the reading of the next instruction, the SUBD instruction, and the internal processing of setting data to the AU are being processed in parallel. That is, SUBD
The process of (RDR)→D is performed as an internal process of the arithmetic circuit 9 until the prefetching of the instruction is completed. Furthermore, from T 14 to T 17 , a 2D instruction is executed, and in this case, the instruction prefetch and data prefetch timing can be performed as early as T 14 , so
After performing the calculations from T 14 to T 16 , synchronization is achieved at T 17 , so it can be seen that the waiting time for the memory is short and efficient parallel processing is performed.

このように、命令,データの先読みと命令実行
の並行処理をきめこまかに制御することにより、
複数データを処理する命令の並行処理を行なうこ
とができる。
In this way, by finely controlling the parallel processing of instructions and data prefetching and instruction execution,
It is possible to perform parallel processing of instructions that process multiple data.

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

本発明によれば、命令およびデータの先読み処
理と演算回路の内部処理とを並行して実行できる
ため、処理速度の向上に寄与することができる。
According to the present invention, the prefetch processing of instructions and data and the internal processing of the arithmetic circuit can be executed in parallel, thereby contributing to an improvement in processing speed.

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

第1図は従来のプログラマブル・コントローラ
の例を示すブロツク図、第2図はプログラム・メ
モリから出力される命令フオーマツトの例を示す
説明図、第3図は従来使用されたマイクロ命令フ
オーマツトの例を示す説明図、第4図は従来のプ
ログラマブル・コントローラの動作を示すタイム
チヤート、第5図は本発明によるプログラマブ
ル・コントローラの実施例を示すブロツク図、第
6図は本発明において用いられるマイクロ命令の
フオーマツトを示す説明図、第7図はインターフ
エイスの動作を示すタイムチヤート、第8図はプ
ログラム・メモリに格納されているプログラムの
例を示す説明図、第9図は本発明におけるマイク
ロプログラムの内容の例を示す説明図、第10図
は第8図のプログラムを実行した場合の動作を示
すタイムチヤートである。 1…プログラム・メモリ、2…データ・メモ
リ、3…第1命令レジスタ、4…第2命令レジス
タ、5…命令デコーダ、6…プログラム・カウン
タ、7…マイクロプログラム・カウンタ、8…マ
イクロプログラム・メモリ、9…演算回路、10
…プログラム・メモリ・インターフエイス回路、
11…データ・メモリ・インターフエイス回路、
14…書込データ・レジスタ、15…クロツク回
路、16…命令同期フリツプ・フロツプ、17…
データ同期フリツプ・フロツプ、18…読み出し
データ・レジスタ、19…NOR回路、20…ス
イツチ。
Figure 1 is a block diagram showing an example of a conventional programmable controller, Figure 2 is an explanatory diagram showing an example of an instruction format output from a program memory, and Figure 3 is an example of a conventionally used microinstruction format. 4 is a time chart showing the operation of a conventional programmable controller, FIG. 5 is a block diagram showing an embodiment of the programmable controller according to the present invention, and FIG. 6 is a diagram showing the microinstructions used in the present invention. FIG. 7 is an explanatory diagram showing the format, FIG. 7 is a time chart showing the operation of the interface, FIG. 8 is an explanatory diagram showing an example of the program stored in the program memory, and FIG. 9 is the contents of the microprogram in the present invention. FIG. 10 is a time chart showing the operation when the program shown in FIG. 8 is executed. 1...Program memory, 2...Data memory, 3...First instruction register, 4...Second instruction register, 5...Instruction decoder, 6...Program counter, 7...Microprogram counter, 8...Microprogram memory , 9... Arithmetic circuit, 10
...program memory interface circuit,
11...Data memory interface circuit,
14...Write data register, 15...Clock circuit, 16...Instruction synchronous flip-flop, 17...
Data synchronous flip-flop, 18...read data register, 19...NOR circuit, 20...switch.

Claims (1)

【特許請求の範囲】[Claims] 1 プログラム・メモリに格納された命令および
データ・メモリに格納された演算に必要なデータ
の先読みを行いつつ前記命令に基づいてマイクロ
プログラムより演算回路において演算を実行する
プログラマブル・コントローラにおいて、命令の
先読みの実行後に、先読みされた命令の読み出し
に要する時間を規定したタイミング信号を発生す
る第1タイミング信号発生手段と、データの先読
みの実行後に、先読みされたデータの読み出しに
要する時間を規定したタイミング信号を発生する
第2タイミング信号発生手段と、前記各タイミン
グ信号の発生時前記演算回路に対する内部処理を
指令する内部処理指令手段と、前記各タイミング
信号を受け、各タイミング信号で規定された時間
だけ前記マイクロプログラムの進行を停止する制
御手段を備えたことを特徴とするプログラマブ
ル・コントローラ。
1 In a programmable controller that executes an operation in an arithmetic circuit from a microprogram based on the instructions while prefetching the instructions stored in the program memory and the data necessary for the operation stored in the data memory, a first timing signal generating means that generates a timing signal that specifies the time required to read the prefetched instruction after execution of the prefetched instruction; and a timing signal that specifies the time required to read the prefetched data after the data prefetch is executed. second timing signal generating means for generating a second timing signal; internal processing command means for instructing the arithmetic circuit to perform internal processing when each of the timing signals is generated; A programmable controller characterized by comprising a control means for stopping the progress of a microprogram.
JP3006184A 1984-02-20 1984-02-20 Programmable controller Granted JPS60175146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3006184A JPS60175146A (en) 1984-02-20 1984-02-20 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3006184A JPS60175146A (en) 1984-02-20 1984-02-20 Programmable controller

Publications (2)

Publication Number Publication Date
JPS60175146A JPS60175146A (en) 1985-09-09
JPH0317135B2 true JPH0317135B2 (en) 1991-03-07

Family

ID=12293299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3006184A Granted JPS60175146A (en) 1984-02-20 1984-02-20 Programmable controller

Country Status (1)

Country Link
JP (1) JPS60175146A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5005118A (en) * 1987-04-10 1991-04-02 Tandem Computers Incorporated Method and apparatus for modifying micro-instructions using a macro-instruction pipeline
JPH02197961A (en) * 1989-01-27 1990-08-06 Koufu Nippon Denki Kk Information processor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5024044A (en) * 1973-07-04 1975-03-14
JPS5543604A (en) * 1978-09-21 1980-03-27 Toshiba Corp Electronic computer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5024044A (en) * 1973-07-04 1975-03-14
JPS5543604A (en) * 1978-09-21 1980-03-27 Toshiba Corp Electronic computer

Also Published As

Publication number Publication date
JPS60175146A (en) 1985-09-09

Similar Documents

Publication Publication Date Title
JPH0731615B2 (en) Information processing equipment
JPS6232503B2 (en)
KR920007253B1 (en) Controlling apparatus for micro-program
JPS62115542A (en) Information processor
JPH03233630A (en) Information processor
JPH0317135B2 (en)
JP2583506B2 (en) Data processing device
JP2758624B2 (en) Speed control method of micro program
JPS6134188B2 (en)
JPH0651984A (en) Microprocessor
JPH0561660B2 (en)
JP2762441B2 (en) Coprocessor
JPH0241770B2 (en)
JP2825315B2 (en) Information processing device
JPS595354A (en) Data processing device
JP3182796B2 (en) Central processing unit
JPS6028014B2 (en) microprocessor
JPS5896346A (en) Hierarchical arithmetic system
JPS6353644A (en) Instruction control device
JPS6221130B2 (en)
JPH0424731B2 (en)
JPS6186843A (en) Control method for high-speed programmable controller
JPS61161509A (en) System and device for operating high speed sequence
JPH0658629B2 (en) Data processing device
JPH0194437A (en) Information processor