JPH04153728A - Arithmetic circuit - Google Patents

Arithmetic circuit

Info

Publication number
JPH04153728A
JPH04153728A JP2278266A JP27826690A JPH04153728A JP H04153728 A JPH04153728 A JP H04153728A JP 2278266 A JP2278266 A JP 2278266A JP 27826690 A JP27826690 A JP 27826690A JP H04153728 A JPH04153728 A JP H04153728A
Authority
JP
Japan
Prior art keywords
register
instruction
processing
output
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2278266A
Other languages
Japanese (ja)
Inventor
Tateji Horiguchi
堀口 立二
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2278266A priority Critical patent/JPH04153728A/en
Publication of JPH04153728A publication Critical patent/JPH04153728A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up the processing by performing continuous arithmetic processing and transfer processing for the same register while making the storage step and takeout step of the register overlap with each other when the arithmetic processing and transfer processing are performed for the same register. CONSTITUTION:A register coincidence decision device 8 decides whether an optional register selected among register 3 - 6 for the storage of an arithmetic result and an optional register selected among the registers 3 - 6 as the input of a computing element 9 for current execution are the same or not and makes a coincidence signal 105 active when so. Consequently, the output of a data latch 22 wherein the output of the computing element 9 is stored is inputted to a data latch 21. Consequently, the processing seems to be performed by referring to the value in a register A, which seems to be updated with an instruction, with an instruction 2. Consequently, the arithmetic processing is speeded up.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置でパイプライン的に演算処理を行
う演算回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an arithmetic circuit that performs arithmetic processing in a pipeline manner in an information processing device.

〔従来の技術〕[Conventional technology]

一般に、パイプライン制御による処理は、命令実行を複
数ステップに分解し、各処理ブロックはそれぞれ独立に
動作させ、先行する処理ステップから次々と新しい処理
要求を受は取ってはそのステップに定められた処理を実
行し、次のステップへ送り出すことで行う。
In general, processing using pipeline control breaks down instruction execution into multiple steps, each processing block operates independently, and receives new processing requests one after another from the preceding processing step. This is done by executing the process and sending it to the next step.

その結果、あるタイミングに注目した場合、各処理ブロ
ックが全て独立して同時に動作していることになり、あ
たかも1ステツプに1命令を実行しているかのごとく動
作するため高速処理を行うことができる。
As a result, when focusing on a certain timing, all processing blocks are operating independently and at the same time, making it possible to perform high-speed processing because they operate as if they were executing one instruction per step. .

従来のパイプライン制御によるレジスタ、演算器間のブ
ロック図を第4図に示す。この例は、レジス−pA、B
、CのいずれかとレジスタXとを演算して再びレジスタ
A、B、Cのいずれかに格納する回路である。各レジス
タにはあらかじめ初期値が与えられているものとし、こ
こではその値を用いた演算処理について述べる。
FIG. 4 shows a block diagram between registers and arithmetic units under conventional pipeline control. This example is Regis-pA,B
, C and register X, and stores the result in register A, B, or C again. It is assumed that each register is given an initial value in advance, and the calculation processing using that value will be described here.

また、第4図に示した回路のタイミングを第5図に示す
、これかられかるように、この例では1つの命令実行を
3つのステップに分解して処理し、さらに各ステップ内
ではφ1.φ2のタイミングで2つの処理が行われるも
のとする。
The timing of the circuit shown in FIG. 4 is shown in FIG. 5. As will be seen from now on, in this example, execution of one instruction is broken down into three steps, and within each step, φ1. It is assumed that two processes are performed at the timing of φ2.

第4図中、1はマイクロ・プログラム・シーケンサ、2
は命令デコーダ、3〜6はレジスタ、7は演算器、10
〜11はデータ・セレクタ、20〜22はデータ・ラッ
チである。100〜101はデータ・セレクト信号、1
10〜114はデータ・バスである。
In Figure 4, 1 is a micro program sequencer, 2
is an instruction decoder, 3 to 6 are registers, 7 is an arithmetic unit, 10
11 are data selectors, and 20 to 22 are data latches. 100 to 101 are data select signals, 1
10 to 114 are data buses.

これらの構成要素で、レジスタはφ2期間で記憶したデ
ータを次のφ1からφ2期間まで出力する。データ・ラ
ッチは入力されたクロックの期間にデータを記憶し、記
憶した内容はそのまま出力されるものとする。
With these components, the register outputs the data stored in the φ2 period from the next φ1 to φ2 period. The data latch stores data during the period of the input clock, and the stored contents are output as they are.

以下、第5図を参照しながら各ステップの処理内容を説
明する。
The processing contents of each step will be explained below with reference to FIG.

(1)ステップ1 φ1:マイクロ・プロダラム命令8力期間マイクロ・プ
ログラムの制御を司るマイクロ・プログラム・シーケン
サ1から命令が出力される。
(1) Step 1 φ1: Micro program instruction 8 Input period An instruction is output from the micro program sequencer 1 which controls the micro program.

φ2:マイクロ・プログラム命令解読期間マイクロ・プ
ログラム・シーケンサ1からの命令を命令デコーダで解
読する。このステップにより演算器に入力するレジスタ
、演算器出力を格納するレジスタが決定され、データセ
レクタ11,10にデータ・セレクト信号101,10
0を出力する。本信号はステップ2のタイミングでデー
タ・セレクト信号101が、ステップ3のタイミングで
データ・セレクト信号100が出力される。
φ2: Micro program instruction decoding period The instructions from the micro program sequencer 1 are decoded by the instruction decoder. This step determines the register input to the arithmetic unit and the register that stores the arithmetic unit output, and sends data select signals 101 and 10 to the data selectors 11 and 10.
Outputs 0. The data select signal 101 is output at the timing of step 2, and the data select signal 100 is output at the timing of step 3.

(2)ステップ2 φ1:レジスタ出力期間 各レジスタから値を出力する。(2) Step 2 φ1: Register output period Output values from each register.

φ2:演算器入力期間 φ1でレジスタから出力された値を、 データ・セレクト信号101に従って データ・セレクタ11で選択し、データ・ラッチ20.
21でラッチすることで、演算器7へ値を入力する。
φ2: The value output from the register during the arithmetic unit input period φ1 is selected by the data selector 11 according to the data select signal 101, and the data latch 20.
By latching at 21, the value is input to the arithmetic unit 7.

(3)ステップ3 φ1:演算結果出力期間 演算結果をデータ・ラッチ22でラッチし演算結果を保
持する。
(3) Step 3 φ1: Operation result output period The operation result is latched by the data latch 22 and the operation result is held.

φ2:レジスタ入力期藺− データ・ラッチ22からのデータをデータ・セレクト信
号100に従ってデータ・セレクタ10で選択されたレ
ジスタに入力する。
φ2: Register input period - Data from the data latch 22 is input to the register selected by the data selector 10 according to the data select signal 100.

これらの3つのステップはそれぞれ独立して動作し、各
ステップごとにそのステップに定められた処理を実行し
、次のステップへデータを送り出す、つまり、第6図に
示すように、命令1.命令2・・・と実行されるに従っ
て、各ステップの処理がバイブライン的に処理されてい
く。
These three steps each operate independently, and each step executes the processing prescribed for that step and sends data to the next step, that is, as shown in FIG. As the instruction 2... is executed, each step is processed in a vibe-like manner.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

前述した方式では、同一レジスタに対し連続した処理が
続くときパイプライン制御を行うがために、効率よく処
理が行えない場合が生じる。
In the above-described method, since pipeline control is performed when consecutive processing is performed on the same register, there are cases where processing cannot be performed efficiently.

たとえば、 ’A=B+X”C=A十X’ なる処理が
連続した場合、命令1で°A=B+X’命令2で“C=
A+X’を実行したのでは、命令1の演算結果がレジス
タAに格納される前に命令2でAレジスタの参照が起き
るため、更新される前のAレジスタで演算を行ってしま
う。
For example, if the processing 'A = B +
If A+X' is executed, the A register is referenced by the instruction 2 before the operation result of the instruction 1 is stored in the register A, so the operation is performed in the A register before being updated.

つまり、第6図において、命令1の演算結果がレジスタ
Aに格納されるのは、命令1の実行のFのタイミングで
あり、その値が参照できるのは次のφ1のタイミングで
あるのにもかかわらず、命令2の実行でレジスタAから
値を取り出すのは、命令2の実行のCのタイミングなの
で、命令1の演算結果を参照することができない、した
がって、命令2は処理を行わず(N OPとし)、命令
3で’C=A+X’の実行を行わなければ正しい値を得
ることができない。
In other words, in FIG. 6, the operation result of instruction 1 is stored in register A at timing F of execution of instruction 1, and its value can be referenced at the next timing φ1. Regardless, since the value is retrieved from register A during the execution of instruction 2 at timing C of the execution of instruction 2, the operation result of instruction 1 cannot be referenced. Therefore, instruction 2 does not perform any processing (N OP), the correct value cannot be obtained unless 'C=A+X' is executed in instruction 3.

通常、このNOPの期間は、別の処理を挿入するなどし
てパフォーマンスを上げようとするのだが、処理の流れ
上、やむを得ずNOPを入れなければならない場合も多
々あるのが現状である。このような処理が連続する場合
非常に処理効率が悪くなる。
Normally, during this NOP period, an attempt is made to improve performance by inserting another process, but the current situation is that there are many cases where it is unavoidable to insert a NOP due to the flow of processing. If such processing continues, the processing efficiency will be extremely poor.

〔課題を解決するための手段〕[Means to solve the problem]

本発明による演算回路は、任意の数値を記憶するレジス
タ群およびそれに接続される演算器を含み、前記レジス
タの入出力および前記演算器の入圧力がパイプライン的
に制御さ、さらに、直前に実行された演算結果を格納す
るために選択された前記レジスタ群の中の任意のレジス
タと、現在の実行のために前記演算器の入力として選択
された前記レジスタ群の中の任意のレジスタとが同一の
レジスタであることを判定するレジスタ一致判定器と、
前記判定手段の判定結果に基づき、前記演算器出力と前
記レジスタ出力のどちらを前記演算器入力とするかを選
択するデータ・セレクタとを具備することを特徴とする
The arithmetic circuit according to the present invention includes a group of registers for storing arbitrary numerical values and an arithmetic unit connected thereto, the input/output of the registers and the input pressure of the arithmetic unit are controlled in a pipeline manner, and further, An arbitrary register in the register group selected to store the calculated operation result is the same as an arbitrary register in the register group selected as an input of the arithmetic unit for the current execution. a register match determiner that determines that the register is a register of
It is characterized by comprising a data selector that selects which of the arithmetic unit output and the register output is to be used as the arithmetic unit input based on the determination result of the determination unit.

かくして、演算結果を格納するレジスタと、次に演算を
行うレジスタとが同一の場合の演算処理が高速化される
In this way, arithmetic processing is sped up when the register that stores the arithmetic result and the register that will perform the next arithmetic operation are the same.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を用いて説明する。 Next, embodiments of the present invention will be described using the drawings.

第1図は本発明の一実施例における構成要素を示すブロ
ック図である。はとんどの構成要素は従来の技術で示し
た第4図と同様であるが、異なるのは、レジスタ一致判
定器8.データ・セレクタ12が追加され、それに伴い
一致信号105が追加され、データ・バス114がデー
タ・セレクタ12を介してデータ・ラッチ21の入力と
なるように接続されているところである。
FIG. 1 is a block diagram showing the components in one embodiment of the present invention. Most of the components are the same as those shown in FIG. 4 for the prior art, but the difference is the register match determiner 8. A data selector 12 has been added, a match signal 105 has been added accordingly, and a data bus 114 has been connected to be an input to the data latch 21 via the data selector 12.

第2図は本発明の実施例におけるタイミングを示す図で
ある。
FIG. 2 is a diagram showing timing in an embodiment of the present invention.

ここで、上記各図面を参照しながら第1の実施例を説明
する。
Here, the first embodiment will be described with reference to the above-mentioned drawings.

まず、追加された構成要素の動作を説明する。First, the operations of the added components will be explained.

レジスタ一致判定器8は、データ・セレクト信号100
と101をもとに、両者が選択しているレジスタが同一
のものか否かを判定し、同一の場合は一致信号105を
アクティブにする。
Register match determiner 8 receives data select signal 100
and 101, it is determined whether the registers selected by both parties are the same, and if they are the same, the match signal 105 is activated.

データ・セレクタ12は、一致信号15がアクティブの
場合はデータ・バス114を選択し、致信号15がネガ
ティブの場合はデータ・セレクタ11からの信号を選択
してそれをデータ・ラッチ21の入力とする。
Data selector 12 selects data bus 114 when match signal 15 is active, and selects the signal from data selector 11 and inputs it to data latch 21 when match signal 15 is negative. do.

これらの追加された構成要素による処理を第2図を参照
しながら説明する。
Processing by these added components will be explained with reference to FIG.

再び、“A=B+X″  “C=A+X”なる処理が連
続した場合を考える。つまり、命令1で“A=B+X’
 、命令2で“C=A+X”が実行されるものとする。
Let us consider again the case where the processes "A=B+X" and "C=A+X" are consecutive. In other words, in instruction 1, "A=B+X'
, it is assumed that "C=A+X" is executed in instruction 2.

命令1のステップ3に注目すると、それと同時に命令2
のステップ2が実行されることになる。このとき、命令
デコーダ2からはデータ・セレクト信号100に命令l
の演算結果を格納するレジスタAを選択する信号と、デ
ータ・セレクト信号101に命令2の演算のための入力
としてレジスタAを選択する信号が出力される。
If we pay attention to step 3 of instruction 1, at the same time instruction 2
Step 2 will be executed. At this time, the instruction decoder 2 sends the instruction l to the data select signal 100.
A signal for selecting register A to store the operation result of instruction 2 and a signal for selecting register A as an input for the operation of instruction 2 are outputted to the data select signal 101.

したがって、レジスタ一致判定器8から一致信号105
がアクティブになって出力されるため、データ・ラッチ
21には演算器8の圧力が記憶されているデータ・ラッ
チ22の出力が入力される。
Therefore, the match signal 105 from the register match determiner 8
is activated and output, so the output of the data latch 22 in which the pressure of the calculator 8 is stored is input to the data latch 21.

つまり、演算器8にはレジスタ出力ではなく命令1の演
算結果がそのまま入力されることになる。
In other words, the operation result of the instruction 1 is directly input to the arithmetic unit 8 instead of the register output.

その結果、あたかも命令1で更新されたレジスタAの値
を命令2で参照しているかのごとく処理を行うことがで
きる。
As a result, processing can be performed as if the value of register A updated by instruction 1 was referenced by instruction 2.

次に本発明の第2の実施例について図面を用いて説明す
る。
Next, a second embodiment of the present invention will be described using the drawings.

第3図は第2の実施例における構成要素を示すブロック
図である=第2の実施例では演算処理だけでなく、レジ
スタ間の転送命令処理も実現したものである。
FIG. 3 is a block diagram showing the components of the second embodiment. In the second embodiment, not only arithmetic processing but also transfer instruction processing between registers is realized.

図中、第1の実施例から変わっているのは、命令デ;−
7−ダ2からデータ・セレクト信号102が圧力された
こと。データ・セレクタ13と、データ・セレクタ13
への入力として 0°テータが追加されたことである。
In the figure, what has changed from the first embodiment is the instruction code;
7-The data select signal 102 is pressed from the data selector 2. Data selector 13 and data selector 13
0° theta was added as an input to .

ここで、第3図をもとに本発明の第2の実施例の動作を
説明する。
Here, the operation of the second embodiment of the present invention will be explained based on FIG.

命令デコーダ2から新たに出力されたデータ・セレクト
信号102は、命令デコーダ2で解釈された命令が演算
命令か転送命令かを判別するための信号である。データ
・セレクタ13では、データ・セレクト信号102が演
算命令の時はレジスタ6を、転送命令の時は“0′デー
タを選択し、その結果をデータ・ラッチ20へ入力する
The data select signal 102 newly output from the instruction decoder 2 is a signal for determining whether the instruction interpreted by the instruction decoder 2 is an operation instruction or a transfer instruction. The data selector 13 selects the register 6 when the data select signal 102 is an arithmetic command, selects "0" data when the data select signal 102 is a transfer command, and inputs the result to the data latch 20.

つまり、転送命令時、データ・ラッチ20には1()T
が入力されるため、演算器7による演算処理を行っても
出力にはデータ・ラッチ21のデータがそのまま出力さ
れ、データ・ラッチ22に記憶される。つまり、演算処
理と全く同様にしてレジスタ間の転送が行えることにな
る。
In other words, at the time of a transfer command, the data latch 20 has 1()T.
is input, even if the arithmetic processing is performed by the arithmetic unit 7, the data of the data latch 21 is output as is and is stored in the data latch 22. In other words, transfer between registers can be performed in exactly the same way as arithmetic processing.

したがって、転送命令の後に演算命令が実行され、転送
先のレジスタと演算器の入力レジスタとが一致している
場合、あるいは、演算命令の後に転送命令が実行され、
演算結果の格納レジスタと転送源レジスタとが一致して
いる場合に連続した処理が可能となる。
Therefore, if an arithmetic instruction is executed after a transfer instruction and the transfer destination register and the input register of the arithmetic unit match, or if a transfer instruction is executed after an arithmetic instruction,
Continuous processing is possible when the storage register of the operation result and the transfer source register match.

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

本発明によれば同一レジスタに対する連続した演算処理
や転送処理を行う場合、レジスタへの格納ステップと取
り呂しステップをオーバラップさせて実行できるため処
理の高速化が図れる。
According to the present invention, when performing continuous arithmetic processing or transfer processing on the same register, the storage step and the access step to the register can be executed in an overlapping manner, thereby speeding up the processing.

また、レジスタへの格納時間を考慮してNOP命令など
をプログラマが挿入する必要がないため、プログラミン
グしやすいなどの効果がある。
Furthermore, since the programmer does not need to insert a NOP instruction or the like in consideration of the storage time in the register, programming is easier.

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

第1図は本発明の第1実施例における構成要素を示すブ
ロック図、第2図は本実施例におけるタイミングを示す
図、第3図は本発明の第2の実施例における構成要素を
示すブロック図、第4図は従来例における構成要素を示
すブロック図、第5図は従来例におけるタイミングを示
す図である。 1・・・・・・マイクロ・プログラム・シーケンサ、2
・・・・・・命令デコーダ、3〜6・・・・・・レジス
タ、7・・・・・・演算器、8・・・・−・レジスタ一
致判定器、10〜13・・・・・・データ・セレクタ、
20〜22・・・・・・データ・ラッチ、100〜10
2・・・・・・データ・セレクト信号、105・・・・
・・一致信号、110〜114・・・・・・データ・バ
ス。 代理人 弁理士  内 原   晋 早 阻 φlφ2 pI f2 f/ 41J2φ1戸2戸l峠
φ/−2 茅 閃 茅 田 第 図 φ/ 於2 pIφ2ψIφ2plφ2 pI pI 
11’/ p、?第 回
FIG. 1 is a block diagram showing the components in the first embodiment of the invention, FIG. 2 is a diagram showing the timing in this embodiment, and FIG. 3 is a block diagram showing the components in the second embodiment of the invention. 4 is a block diagram showing the constituent elements in the conventional example, and FIG. 5 is a diagram showing the timing in the conventional example. 1...Micro program sequencer, 2
...Instruction decoder, 3-6...Register, 7...Arithmetic unit, 8--Register match determiner, 10-13...・Data selector,
20~22...Data latch, 100~10
2...Data select signal, 105...
... Match signal, 110-114 ... Data bus. Agent Patent Attorney Susumu Uchihara φlφ2 pI f2 f/ 41J2φ1 house 2 houses l Passφ/-2 Chisen Chita Diagram φ/ 2 pIφ2ψIφ2plφ2 pI pI
11'/p,? The 1st

Claims (1)

【特許請求の範囲】[Claims] 任意の数値を記憶するレジスタ群およびそれに接続され
る演算器を含み、前記レジスタの入出力および前記演算
器の入出力がパイプライン的に制御される演算回路にお
いて、直前に実行された演算結果を格納するために選択
された前記レジスタ群の中の任意のレジスタと、現在の
実行のために前記演算器の入力として選択された前記レ
ジスタ群の中の任意のレジスタとが同一のレジスタであ
ることを判定するレジスタ一致判定器と、前記判定手段
の判定結果に基づき、前記演算器出力と前記レジスタ出
力のどちらを前記演算器入力とするかを選択するデータ
・セレクタとを具備することを特徴とする演算回路。
In an arithmetic circuit that includes a group of registers that store arbitrary numerical values and an arithmetic unit connected thereto, and in which the input/output of the registers and the input/output of the arithmetic unit are controlled in a pipeline manner, the result of the most recently executed operation is Any register in the register group selected for storage and any register in the register group selected as an input of the arithmetic unit for current execution are the same register. and a data selector that selects which of the arithmetic unit output and the register output is to be used as the arithmetic unit input based on the judgment result of the judgment means. calculation circuit.
JP2278266A 1990-10-17 1990-10-17 Arithmetic circuit Pending JPH04153728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2278266A JPH04153728A (en) 1990-10-17 1990-10-17 Arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2278266A JPH04153728A (en) 1990-10-17 1990-10-17 Arithmetic circuit

Publications (1)

Publication Number Publication Date
JPH04153728A true JPH04153728A (en) 1992-05-27

Family

ID=17594947

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2278266A Pending JPH04153728A (en) 1990-10-17 1990-10-17 Arithmetic circuit

Country Status (1)

Country Link
JP (1) JPH04153728A (en)

Similar Documents

Publication Publication Date Title
JPS6239780B2 (en)
JPS633337B2 (en)
US4459666A (en) Plural microcode control memory
EP0094535B1 (en) Pipe-line data processing system
US5479620A (en) Control unit modifying micro instructions for one cycle execution
JPH04153728A (en) Arithmetic circuit
JP3000857B2 (en) Programmable controller
JPS63113634A (en) Relative address calculation system for program counter
JPH01271840A (en) Microcomputer
JP3531856B2 (en) Program control method and program control device
JPH0269826A (en) System for controlling instruction with condition
JPS63141131A (en) Pipeline control system
JPH0375904B2 (en)
JPS5896346A (en) Hierarchical arithmetic system
JPS62147545A (en) Processing system for transfer instruction of information processor
JPH0338613B2 (en)
JPH05341995A (en) Instruction control method in processor and processor
JPS6116111B2 (en)
JPH08297583A (en) Processor and method for interruption processing
JPS60215247A (en) Arithmetic processor
JPS63240633A (en) Central processing unit
JPH02105936A (en) Data processor
JPS60247743A (en) Pipeline arithmetic controller
JPH02103629A (en) Data processing system
JPH09319579A (en) Branch control circuit