JPS63158608A - Quick arithmetic processing system for sequencer - Google Patents

Quick arithmetic processing system for sequencer

Info

Publication number
JPS63158608A
JPS63158608A JP30683986A JP30683986A JPS63158608A JP S63158608 A JPS63158608 A JP S63158608A JP 30683986 A JP30683986 A JP 30683986A JP 30683986 A JP30683986 A JP 30683986A JP S63158608 A JPS63158608 A JP S63158608A
Authority
JP
Japan
Prior art keywords
bit
instruction
memory device
circuit
program
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.)
Granted
Application number
JP30683986A
Other languages
Japanese (ja)
Other versions
JP2504974B2 (en
Inventor
Koji Oki
沖 光二
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP61306839A priority Critical patent/JP2504974B2/en
Publication of JPS63158608A publication Critical patent/JPS63158608A/en
Application granted granted Critical
Publication of JP2504974B2 publication Critical patent/JP2504974B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To increase the arithmetic processing speed by providing a bit operating circuit and a bit selecting circuit to process a fundamental operation instruction and an OUT instruction at the same time. CONSTITUTION:A bit selecting circuit 4 selects one bit in case of the fundamental operation instruction and inserts a bit in case of the OUT instruction in accordance with the instruction of a bit operating circuit 5 and outputs them to a bus D. The bit operating circuit 5 takes in data on the bus D to perform bit operation in case of the fundamental operation instruction and outputs a write signal WT to a memory device 3 to write data including the operation result in a memory device 3 in case of the OUT instruction. Thus, the fundamental operation instruction and the OUT instruction pass the same processing process until operation data is latched in a latch circuit 8c. Consequently, the difference of processing time between the fundamental operation instruction and the OUT instruction is eliminated to increase the processing speed.

Description

【発明の詳細な説明】 [技術分野] 本発明はシーケンス・コントローラに於ける論理演算処
Fl!(ビット演算処理)を高速に行うシーケンサの高
速演算処理方式に関するものである。
[Detailed Description of the Invention] [Technical Field] The present invention relates to a logic operation processor Fl! in a sequence controller. This invention relates to a high-speed arithmetic processing method for a sequencer that performs (bit arithmetic processing) at high speed.

[背景技術1 シーケンス・コントローラに於けるプログラムの処理方
式は一般にシーケンス制御の全プログラムをスキャンし
ながら順次演算し、1スキヤンに1度、演算結果を出力
し、機械を制御する方式を採用しており、プログラム量
の増加に比例してスキャン時間が増加する。つまり、制
御する間隔が長くなって、機械への応答が遅くなる。
[Background technology 1 The program processing method in a sequence controller generally employs a method in which the entire sequence control program is scanned and calculated sequentially, and the calculation results are output once per scan to control the machine. Therefore, the scan time increases in proportion to the increase in program amount. This means that the control interval becomes longer and the response to the machine becomes slower.

この為、一般に演算の高速化を図っており、例えば特開
昭60−237503号公報に示された公知例はデータ
読み出しとビット演算処理を並列で処理し、CPUだけ
の順次演算だけでなくとラド演算部のハードウェア処理
という構成で高速化を図っている。 ここでビット演算
に基本演算命令(AND、OR)と、基本演算命令の演
算結果を再1メモリ装置に書き込むOUT命令と言う2
種類の異なった手順に必要な命令があるが、かかる従来
例では基本演算命令とOUT命令で処理時間が異なり、
同じプログラム量でも、OUT命令の多少により、スキ
ャン時間が異なるという問題があった。
For this reason, efforts are generally made to speed up calculations. For example, the known example shown in Japanese Patent Application Laid-Open No. 60-237503 processes data reading and bit calculation processing in parallel, and not only performs sequential calculations by the CPU. The hardware processing of the rad calculation unit is used to increase speed. Here, there are basic operation instructions (AND, OR) for bit operations, and an OUT instruction that writes the operation results of the basic operation instructions to the memory device.
There are instructions required for different types of procedures, but in such conventional examples, the processing time differs between basic operation instructions and OUT instructions.
There is a problem in that even if the program size is the same, the scan time varies depending on the number of OUT instructions.

[発明の目的] 本発明は上述の問題点に鑑みて為されたもので、その目
的するところは総ての演算処理を同一時間で処理するこ
とによって演算処理の高速化を図ったシーケンサの高速
演算処理方式に関するものである。
[Object of the Invention] The present invention has been made in view of the above-mentioned problems, and its purpose is to improve the speed of a sequencer that speeds up arithmetic processing by processing all arithmetic processing in the same amount of time. This relates to arithmetic processing methods.

[発明の開示1 本発明はプログラムを記憶する第1のメモリ装置とデー
タを記憶す第2のメモリ装置と、第1のメモリ装置ヘア
ドレスを与えるアドレス発生回路と、第1のメモリ装置
からプログラム命令とデータアドレスが読み出されたデ
ータに対してプログラム命令に応じて、プログラムで指
示されたビットを選び出すか、若しくは演算結果をプロ
グラムで指示されたビットの位置に入れるかの動作をす
るビット選択回路と、選択されたビットに対してプログ
ラム命令で指示された論理演算を実行するか、若しくは
演算結果を前元ビット選択へ与える動作をするビット演
算回路とで構成され、第1のメモリ装置からのプログラ
ム命令を読み出し、プログラム命令に応じてビット演算
回路でビット演算を実行する動作と、演算結果をメモリ
装置へ書き込む動作を、同一時間内で実行することを特
徴する。
[Disclosure 1 of the Invention] The present invention includes a first memory device that stores a program, a second memory device that stores data, an address generation circuit that provides an address to the first memory device, and a program that stores a program from the first memory device. Bit selection that selects the bit specified by the program or puts the operation result into the bit position specified by the program according to the program instruction for the data whose instruction and data address are read. and a bit operation circuit that operates to execute a logical operation instructed by a program instruction on a selected bit or to provide an operation result to a previous original bit selection, A feature of the present invention is that the operation of reading out a program instruction, executing a bit operation in a bit operation circuit according to the program instruction, and the operation of writing the operation result to a memory device are executed within the same time.

以下実施例により本発明を説明する。The present invention will be explained below with reference to Examples.

及1九 第1図は本発明高速演算処理方式を採用した回路構成を
示しており、基本クロックCLKをクロック発生器7か
ら発生させ、この基本クロγりCLKを基準として、ビ
ット演算コントロール回路1により演算処理に必要な各
種タイミング信号を作る。
FIG. 1 shows a circuit configuration adopting the high-speed arithmetic processing method of the present invention, in which a basic clock CLK is generated from a clock generator 7, and the bit arithmetic control circuit 1 uses this basic clock CLK as a reference. creates various timing signals necessary for arithmetic processing.

メモリ装(i!2はユーザ・プログラムを記憶するもの
で、アドレス発生回路6からのアドレスデータにで指定
されたアドレスからプログラムデータを出力する。アド
レス発生回路6はビット演算コントロール回路1からの
タイミング信号CK2によって出力するアドレスデータ
の7ドレスを+1増加させるようになっている。
The memory device (i!2) stores the user program and outputs program data from the address specified by the address data from the address generation circuit 6. The 7 addresses of the address data to be output are increased by +1 in response to the signal CK2.

ラッチ回路8 at 8 b、 8 d及び8cはビッ
ト演算コントロール回路1からのタイミング信号によっ
て制御され、パスB1パスCのデータを一時記憶するも
のである。メモリ装置3はシーケンス演算に必要なデー
タや、演算結果を記憶するもので、ラッチ回路8dのラ
ッチ出力を取り込み、また記憶しているデータをパスC
とラッチ回路8Cを通じてビット選択回路4へ出力する
ようになっている。
The latch circuits 8 at 8 b, 8 d, and 8 c are controlled by a timing signal from the bit operation control circuit 1, and temporarily store data of paths B1 and C. The memory device 3 stores the data necessary for sequence calculations and the calculation results, and takes in the latch output of the latch circuit 8d, and also transfers the stored data to the path C.
and is output to the bit selection circuit 4 through the latch circuit 8C.

ビット選択回路4はメモリ装e3からのデータを受は取
って、ラッチ回路8bを通じて入力するユーザ・プログ
ラムで指示されたビットの位置へビット演算回路5から
の演算結果を取り込んでバスDへ出力するものである。
The bit selection circuit 4 receives data from the memory device e3, takes in the operation result from the bit operation circuit 5 to the bit position specified by the user program input through the latch circuit 8b, and outputs it to the bus D. It is something.

ビット演算回路5は上記ビット選択回路4で選択された
ビットについて、4、ふ聞味Q7色:山(−イl七十1
1−4.イロゲラムで指示された演算処理を行うもので
、演算結果を保持するようになっている。
The bit arithmetic circuit 5 calculates the bit selected by the bit selection circuit 4, 4, taste Q7 color: mountain (-Il71
1-4. It performs arithmetic processing as instructed by Ilogerum, and stores the results of the calculation.

ここでユーザ・プログラムとしではビット演算回路5へ
のビットのセットを命令する5TRT命令、前演算結果
と今回のビットとの論理積演算を命令するAND命令、
前演算結果と今回のビットとの論理和演算を命令するO
R命令、前演算結果をビット選択回路4への出力を指示
するOUT命令がある。
Here, the user program includes a 5TRT instruction that instructs bit calculation circuit 5 to set a bit, an AND instruction that instructs an AND operation of the previous operation result and the current bit,
O commands the OR operation of the previous operation result and the current bit
There is an R instruction and an OUT instruction that instructs output of the pre-operation result to the bit selection circuit 4.

これら命令のビット構成は第2図に示すような構成とな
っている。つまり命令は16ビツトの2バイトで構成さ
れ、ピッ)bus−baを命令1バイト目、ビットb、
〜b0を命令2バイト目とし、ユーザ・プログラムには
1バイト目、2バイト目で記憶され、読み出しも1バイ
ト目から行なわれる。
The bit configuration of these instructions is as shown in FIG. In other words, an instruction consists of 2 bytes of 16 bits, bus-ba is the first byte of the instruction, bit b is
~b0 is the second byte of the instruction, which is stored in the user program as the first and second bytes, and is read from the first byte.

ピッ)b、5〜b12は演算命令の種類を示すオペコー
ドを示す。またピッ)b++〜b、は演算を行う特定ビ
ットのデータ上での位置を示すビット選択を示す、デー
タは8ビツトで取り扱われているので、23=8から位
置を示すビット選択は3ビツトで表現できる。ビットb
s−50はメモリ装置3のデータ・アドレスを示す。
b) b, 5 to b12 indicate operation codes indicating the type of arithmetic instruction. Also, p) b++~b indicates the bit selection that indicates the position of the specific bit on the data to perform the operation.Since the data is handled as 8 bits, the bit selection that indicates the position from 23=8 is 3 bits. I can express it. bit b
s-50 indicates the data address of memory device 3.

次に命令の動きを第1図に示すブロック図と、!#3図
に示すタイムチャートを使って説明する。
Next, a block diagram showing the movement of instructions is shown in Figure 1, and! #3 This will be explained using the time chart shown in Figure 3.

まず第3図(a)に示すように演算はクロック発生器7
で発生させる基本クロックCLKの5ブロック分で完結
する。
First, as shown in FIG. 3(a), the calculation is performed by the clock generator 7.
This process is completed with 5 blocks of the basic clock CLK generated by .

まずデータの流れはアドレス発生回路6で発生した命令
1バイト目アドレスが第3図(b)のようにバスAを通
じてメモリ装置2に与えられると、メモリ装置2からは
当該アドレスに格納された1バイト目の命令が読み出さ
れる。この1バイト目の命令が読み出されると、1バイ
ト目の命令の内、オペコード(bl、〜b12)はバス
Bを通し、ラッチ回路8aにラッチされ、ビット演算回
路5へ与えられる。ビット選択(b、1〜b、)はバス
Bを通して、ラッチ回路8bにラッチされ、ビット選択
回路4へ与えられる。
First, the data flow is such that when the address of the first byte of the command generated by the address generation circuit 6 is given to the memory device 2 through the bus A as shown in FIG. The byte-th instruction is read. When this first byte instruction is read out, the operation code (bl, to b12) of the first byte instruction is passed through bus B, latched by latch circuit 8a, and given to bit operation circuit 5. The bit selection (b, 1 to b,) is latched by the latch circuit 8b through the bus B, and is applied to the bit selection circuit 4.

またとγ)bsのデータ・アドレスの一部がバスBを通
してラッチ回路8dにラッチされ、メモリ装ra3のア
ドレスとなる。ラッチ回路8 at B b、 8dの
ラッチはクロックT、の立ち下がりで行なわれ、次のサ
イクルのクロックT、で更新される。
Also, a part of the data address of γ)bs is latched by the latch circuit 8d through the bus B, and becomes the address of the memory device ra3. The latch circuits 8 at Bb, 8d are latched at the falling edge of the clock T, and updated at the clock T of the next cycle.

オペコードを受は取ったビット演算回路5はオペコード
により、バスEに制御信号を出力する。
Bit arithmetic circuit 5, which has received the opcode, outputs a control signal to bus E in accordance with the opcode.

アドレス発生回路6はクロックCK2が与えられて、出
力するアドレスを先の7ドレスに+1したアドレスとし
、該アドレスをメモリ装置2に与える。
The address generation circuit 6 is supplied with the clock CK2, sets the output address to the previous 7 addresses +1, and supplies the address to the memory device 2.

メモリ装置2からは与えられたアドレスにより第3図(
e)に示すように2バイト目の命令が読み出される。こ
の2バイト目の命令はバスBを通してクロックT2の立
ち下がりでラッチ回路8dにラッチされ、メモリ装置3
のアドレスとなる。アドレスが確定したメモリ装fi3
からは演算データが読み出される。この演算データはバ
スCを通してクロックT、の立ち下がりで#S3図(d
)に示すようにラッチ回路8cにラッチされる。ビット
選択回路4はビット演算回路5の指示により基本演算命
令なら1ビット選択を、OUT命令ならビット挿入の動
作を行い、バスDI:第3図(e)に示すように出力す
る。
From the memory device 2, the address given is shown in Figure 3 (
As shown in e), the second byte instruction is read. This second byte instruction is latched by the latch circuit 8d through the bus B at the falling edge of the clock T2, and is latched into the latch circuit 8d by the memory device 3.
The address will be Memory device fi3 with fixed address
Computed data is read from. This calculation data is transmitted through bus C at the falling edge of clock T, as shown in #S3 (d
) is latched by the latch circuit 8c. The bit selection circuit 4 selects one bit in response to instructions from the bit operation circuit 5 in the case of a basic operation instruction, inserts a bit in the case of an OUT instruction, and outputs the bus DI as shown in FIG. 3(e).

そして基本演算命令であればビット演算回路5はバスD
のデータを取り込んでビット演算を行い、OUT命令な
らばメモリ装置3へ書き込み信号−丁を出して、演算結
果を含んだデータをメモリ装置3に書き込む。
If it is a basic operation instruction, the bit operation circuit 5 is connected to the bus D.
If it is an OUT command, a write signal is issued to the memory device 3, and data including the operation result is written to the memory device 3.

以上のように演算データがラッチ回路8Cにラッチされ
るまでの過程は基本演算命令とOUT命令とも同じ処理
過程となる。そしてビット演算回路5とビット選択面v
I4を設けることにより、基本演算命令とOUT命令を
同一時間で処理できるのである。
As described above, the process until the arithmetic data is latched by the latch circuit 8C is the same for both the basic arithmetic instruction and the OUT instruction. Then, the bit operation circuit 5 and the bit selection surface v
By providing I4, basic operation instructions and OUT instructions can be processed in the same amount of time.

[発明の効果1 本発明はプログラムを記憶する#S1のメモリ装置とデ
ータを記憶す第2のメモリ、lfと、第1のメモリ装置
ヘアドレスを与えるアドレス発生回路と、第1のメモリ
装置からプログラム命令とデータアドレスが読み出され
たデータに対してプログラム命令に応じて、プログラム
で指示され−たビットを選び出すか、若しくは演算結果
をプログラムるビットの位置に入れるかの動作をするビ
ット選択回路と、選択されたビットに対してプログラム
命令で指示された論理演算を実行するが、若しくは演算
結果を前記ビット選択へ与える動作をするビット演算回
路とで構成され、第1のメモリ装置からのプログラム命
令を読み出し、プログラム命令に応じてビット演算回路
でビット演算を実行する動作と、演算結果をメモリ装置
へ書き込む動作を、同−vf間内で実行するので、従来
の高速演算処理に於いてあった基本演算命令とOUT命
令による処理時間差を無くすことができるとともに、C
PUの順次演算とハードフェアによるビット演算とを並
列処理で行うような別回路化も必要なく、高速化が図れ
るという効果を奏する。
[Effect of the Invention 1] The present invention provides a memory device #S1 for storing a program, a second memory lf for storing data, an address generation circuit that provides an address to the first memory device, and a A bit selection circuit that operates to select the bit specified by the program or to put the operation result into the position of the bit to be programmed, depending on the program instruction and the data read from the data address. and a bit operation circuit that operates to execute a logical operation instructed by a program instruction on a selected bit or to provide an operation result to the bit selection, The operation of reading an instruction and executing a bit operation in the bit operation circuit according to the program instruction, and the operation of writing the operation result to the memory device are executed within the same interval -vf, which is different from conventional high-speed arithmetic processing. It is possible to eliminate the processing time difference between basic operation instructions and OUT instructions.
There is no need for separate circuits to perform sequential operations of the PU and bit operations by hardware in parallel processing, resulting in an effect that speeding up can be achieved.

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

第1図は本発明の実施例の回路ブロック図、第2図は同
上の命令のビット構成を示す説明図、第3図は同上の動
作説明用のタイムチャートである。 2・・・第1のメモリ装置、3・・・第2のメモリ装置
、4・・・ビット選択回路、5・・・ビット演算回路、
6・・・アドレス発生回路。
FIG. 1 is a circuit block diagram of an embodiment of the present invention, FIG. 2 is an explanatory diagram showing the bit structure of the same instruction, and FIG. 3 is a time chart for explaining the operation of the same. 2... First memory device, 3... Second memory device, 4... Bit selection circuit, 5... Bit operation circuit,
6...Address generation circuit.

Claims (1)

【特許請求の範囲】[Claims] (1)プログラムを記憶する第1のメモリ装置とデータ
を記憶す第2のメモリ装置と、第1のメモリ装置へアド
レスを与えるアドレス発生回路と、第1のメモリ装置か
らプログラム命令とデータアドレスが読み出されたデー
タに対してプログラム命令に応じて、プログラムで指示
されたビットを選び出すか、若しくは演算結果をプログ
ラムで指示されたビットの位置に入れるかの動作をする
ビト選択回路と、選択されたビットに対してプログラム
命令で指示された論理演算を実行するか、若しくは演算
結果を前記ビット選択へ与える動作をするビット演算回
路とで構成され、第1のメモリ装置からのプログラム命
令を読み出し、プログラム命令に応じてビット演算回路
でビット演算を実行する動作と、演算結果をメモリ装置
へ書き込む動作を、同一時間内で実行することを特徴す
るシーケンサの高速演算処理方式。
(1) A first memory device that stores a program, a second memory device that stores data, an address generation circuit that provides an address to the first memory device, and a program instruction and data address that are output from the first memory device. a bit selection circuit that selects a bit specified by the program or inputs an operation result into a bit position specified by the program according to a program instruction from the read data; a bit operation circuit that operates to execute a logical operation instructed by a program instruction on the selected bit or to provide an operation result to the bit selection, reads the program instruction from the first memory device, A high-speed arithmetic processing method for a sequencer that is characterized by executing bit operations in a bit arithmetic circuit in accordance with program instructions and writing operation results to a memory device within the same amount of time.
JP61306839A 1986-12-23 1986-12-23 Sequencer high-speed processing method Expired - Lifetime JP2504974B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61306839A JP2504974B2 (en) 1986-12-23 1986-12-23 Sequencer high-speed processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61306839A JP2504974B2 (en) 1986-12-23 1986-12-23 Sequencer high-speed processing method

Publications (2)

Publication Number Publication Date
JPS63158608A true JPS63158608A (en) 1988-07-01
JP2504974B2 JP2504974B2 (en) 1996-06-05

Family

ID=17961877

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61306839A Expired - Lifetime JP2504974B2 (en) 1986-12-23 1986-12-23 Sequencer high-speed processing method

Country Status (1)

Country Link
JP (1) JP2504974B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010138943A (en) * 2008-12-09 2010-06-24 Hellermann Tyton Co Ltd Arrangement implement for member to be inserted

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60237503A (en) * 1984-05-09 1985-11-26 Sharp Corp High-speed processing system of sequence controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60237503A (en) * 1984-05-09 1985-11-26 Sharp Corp High-speed processing system of sequence controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010138943A (en) * 2008-12-09 2010-06-24 Hellermann Tyton Co Ltd Arrangement implement for member to be inserted

Also Published As

Publication number Publication date
JP2504974B2 (en) 1996-06-05

Similar Documents

Publication Publication Date Title
US4476525A (en) Pipeline-controlled data processing system capable of performing a plurality of instructions simultaneously
EP0211087A1 (en) Test pattern generator
EP0497485A2 (en) Computer for implementing two-operand instructions
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
EP0164418B1 (en) Microprogram control system
JPH0743648B2 (en) Information processing equipment
JPS63158608A (en) Quick arithmetic processing system for sequencer
JPH0363092B2 (en)
JP2885197B2 (en) Arithmetic processing device and arithmetic processing method
JP3043341B2 (en) Microcomputer system
JP2982129B2 (en) Micro program controller
JP2812610B2 (en) Pipeline control method
JP3117214B2 (en) Sequencer microprogram control method
KR900002602B1 (en) Microprogram control method
JPH09146769A (en) Pipeline processor
JPS58154045A (en) Information processor
JPH02217924A (en) Storing processing system for data processor
JPH09274566A (en) Information processor
JPH0412491B2 (en)
JPH0769800B2 (en) Data processing device
JPH02287732A (en) Register address generating device
JPH0364886B2 (en)
JPS6028014B2 (en) microprocessor
JPH04343132A (en) Central processing unit
JPS63219031A (en) High speed floating point computing element