JPS62282331A - Arithmetic processing unit - Google Patents

Arithmetic processing unit

Info

Publication number
JPS62282331A
JPS62282331A JP12473486A JP12473486A JPS62282331A JP S62282331 A JPS62282331 A JP S62282331A JP 12473486 A JP12473486 A JP 12473486A JP 12473486 A JP12473486 A JP 12473486A JP S62282331 A JPS62282331 A JP S62282331A
Authority
JP
Japan
Prior art keywords
instruction
execution
flag
arithmetic processing
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.)
Pending
Application number
JP12473486A
Other languages
Japanese (ja)
Inventor
Takayuki Fujita
孝行 藤田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP12473486A priority Critical patent/JPS62282331A/en
Publication of JPS62282331A publication Critical patent/JPS62282331A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To attain high speed arithmetic processing by providing an instruction execution control means controlling the execution of an instruction code read next while referencing an execution inhibition flag set by a flag setting means so as to eliminate the access of an undesired instruction code and to decrease the program size. CONSTITUTION:An instruction analyzed by an instruction decoder 15 is sent/ received. Whether or not a sent/received instruction is a conditional instruction is judged, in case of YES, a control circuit 2 sets a flag F to an instruction inhibition flag 1 to complete the control. On the other hand, in case of a conventional instruction, whether or not the flag F is set is judged, and in case of YES, the control circuit 2 resets the flag F set in the instruction inhibition flag 1 and in case of NO, the sent/received instruction is executed. Thus, it is not required to write the condition branch instruction into the program, the program size is reduced and the processing speed is improved remarkably.

Description

【発明の詳細な説明】 3、発明の詳細な説明 〔産業上の利用分野〕 □この発明は、メインメモリ等の記憶装置により命令を
読み込み、読み込んだ命令コードに従い演算処理を実行
するマイクロプロセッサ等の演算処理装置に関するもの
である。
[Detailed Description of the Invention] 3. Detailed Description of the Invention [Field of Industrial Application] □This invention relates to a microprocessor, etc. that reads instructions from a storage device such as a main memory and executes arithmetic processing according to the read instruction code. The present invention relates to an arithmetic processing device.

〔従来の技術〕[Conventional technology]

従来、この種の演算処理装置においては、メインメモリ
に実行手順である命令プログラムが格納されており、こ
のメインメモリ中の命令プログラム列をプログラムカウ
ンタの保持値に対応した番地より順次読み出し、実行し
ている。
Conventionally, in this type of arithmetic processing device, an instruction program, which is an execution procedure, is stored in the main memory, and the instruction program sequence in the main memory is sequentially read out from the address corresponding to the value held in the program counter and executed. ing.

この従来の演算処理装置の概略ブロック図を第3図に示
す。
A schematic block diagram of this conventional arithmetic processing device is shown in FIG.

この図において、11は制御回路で、各部を総括的に制
御する。12は演算ユニット(ALU)で、演算処理を
行う、13はプログラムカウンタで、次に読み込む命令
の記憶位置を記憶している。14は命令レジスタ、15
は命令デコーダで、命令レジスタ14の命令を解析する
。16はメモリアドレスレジスタ、17はメモリデータ
レジスタ、18はメモリ制御回路、19はメモリで、プ
ログラム命令列が記憶されているとともに、演算処理装
置での処理において発生するデータを一時記憶する。
In this figure, reference numeral 11 denotes a control circuit that collectively controls each part. 12 is an arithmetic unit (ALU) that performs arithmetic processing, and 13 is a program counter that stores the storage location of the next instruction to be read. 14 is an instruction register, 15
is an instruction decoder that analyzes the instructions in the instruction register 14. Reference numeral 16 is a memory address register, 17 is a memory data register, 18 is a memory control circuit, and 19 is a memory, which stores program instruction sequences and temporarily stores data generated during processing by the arithmetic processing unit.

次に各部の動作について説明する。Next, the operation of each part will be explained.

メモリ19内のプログラム命令列は通常プログラムカウ
ンタ13の内容をメモリアドレスレジスタ16に格納し
、メモリ制御回路18にこのメモリアドレスレジスタ1
6よりのアドレスデータを送り、対応したデータ、すな
わちプログラム命令がメモリデータレジスタ17に読み
込まれ、この命令コードが命令レジスタ14に送られ、
命令デコーダ15で解析され、解析結果は制御回路11
に送られ、解析結果に従った処理を実行する。この時プ
ログラムカウンタ13の値はその内容がメモリアドレス
レジスタ16に格納された後に1つカウントアツプされ
、次の命令コード読出し時にはこの1つカウントアツプ
されたイ直がメモリアドレスレジスタ16に格納される
ことになる。
The program instruction string in the memory 19 normally stores the contents of the program counter 13 in the memory address register 16, and the memory control circuit 18 stores the contents of the program counter 13 in the memory address register 16.
The address data from 6 is sent, the corresponding data, that is, the program instruction is read into the memory data register 17, this instruction code is sent to the instruction register 14,
It is analyzed by the instruction decoder 15, and the analysis result is sent to the control circuit 11.
and executes processing according to the analysis results. At this time, the value of the program counter 13 is incremented by one after its contents are stored in the memory address register 16, and when the next instruction code is read, the value of the program counter 13 that is incremented by one is stored in the memory address register 16. It turns out.

そして、条件によりプログラムの流れを変えるために、
条件分岐命令があり、条件が成立するとジャンプする。
In order to change the flow of the program depending on the conditions,
There is a conditional branch instruction that jumps when the condition is met.

すなわち、プログラムカウンタ]3を変更することによ
り、命令の読み込みアドレスを変更し、プログラムの流
れを変更する。
That is, by changing the program counter]3, the read address of the instruction is changed and the flow of the program is changed.

このように、設定される条件による実行内容の変更はジ
ャンプのみによって実行されている。したがって、第4
図に示す手順により命令を実行する場合を想定すると、
ステップ(1)の条件が成立する場合はステップ(2)
の命令Aを実行し、ステップ(1)の条件が成立しない
場合はステップ(3)にジャンプして命令Bを実行させ
るプログラムを個々に作成しなければならない。
In this way, the execution contents are changed based on the set conditions only by jumping. Therefore, the fourth
Assuming that the instructions are executed according to the steps shown in the figure,
If the conditions of step (1) are met, step (2)
It is necessary to individually create a program that executes instruction A, jumps to step (3), and executes instruction B if the condition of step (1) is not satisfied.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

このため、実行すべき主旨から見て不要なジャンプ命令
が存在することになり、プログラムサイズが必然的に大
きくなる問題が発生する。また実行主旨と逆の条件のジ
ャンプ命令を必ず書かなければならずプログラミングが
難しくなる。さらに、従来の高度なマイクロプロセッサ
では、アドレスバスとデータバスの空き時間を利用して
順次実行すべき命令コード列を記憶装置よりプロセッサ
内に読み込んでおくことにより処理速度を高速化してい
るのが通例であるが、上述したステップ(1)を行う際
に、先読みした命令コード列を破棄してしまうことにな
り、処理速度を低下させてしまう問題が発生してしまう
For this reason, jump instructions that are unnecessary from the point of view of the purpose to be executed are present, resulting in a problem that the program size inevitably increases. Furthermore, programming becomes difficult because a jump instruction with conditions opposite to the purpose of execution must be written. Furthermore, conventional advanced microprocessors increase processing speed by loading instruction code sequences to be executed sequentially from the storage device into the processor using free time on the address bus and data bus. Usually, when performing step (1) described above, the prefetched instruction code string is discarded, resulting in a problem of lowering the processing speed.

この発明は、上記の問題点を解消するためになされたも
ので、順次読み出される命令コードの実行前に、その命
令コードの実行有無を識別するフラグ情報を保持して、
その命令実行を制御することにより、不要なジャンプ命
令アクセスをなくすとともに、プログラムサイズを短縮
して高速演算処理できる演算処理装置を得ることを目的
とする。
The present invention has been made to solve the above-mentioned problems.Before executing instruction codes that are sequentially read out, this invention holds flag information that identifies whether or not the instruction codes are being executed.
It is an object of the present invention to provide an arithmetic processing device that can eliminate unnecessary jump instruction accesses, shorten program size, and perform high-speed arithmetic processing by controlling the instruction execution.

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係る演算処理装置は、記憶手段より順次読み
出される命令コードを解析し、次に読み出す命令コード
の実行を禁止させる実行禁止フラグを設定するフラグ設
定手段と、このフラグ設定手段が設定した実行禁止フラ
グを参照しながら次に読み出す命令コードの実行を制御
する命令実行制御手段とを設けたものである。
The arithmetic processing device according to the present invention includes a flag setting means for analyzing instruction codes sequentially read from a storage means and setting an execution prohibition flag for prohibiting execution of the instruction code to be read next; The instruction execution control means controls the execution of the instruction code to be read next while referring to the prohibition flag.

〔作用〕[Effect]

この発明においては、命令実行制御手段がフラグ設定手
段が設定した実行禁止フラグの設定状態に基づいて次に
読み出す命令コードの実行を禁止させる。
In this invention, the instruction execution control means prohibits execution of the next instruction code to be read based on the setting state of the execution prohibition flag set by the flag setting means.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示す演算処理装置の構成
を説明するブロック図であり、第3図と同一のものには
同じ符号を付している。
FIG. 1 is a block diagram illustrating the configuration of an arithmetic processing device showing an embodiment of the present invention, and the same components as in FIG. 3 are given the same reference numerals.

この図において、1は命令禁止フラグで、次に読み出す
命令コードの実行を禁止するフラグFLAGを保持する
。2はこの発明の命令実行制御手段を兼ねる制御回路で
、フラグ設定手段を兼ねる命令デコーダ]5が解析した
命令に基づいて命令禁止フラグ1にフラグFを設定する
とともに、次に命令コード読み出し後、設定中のフラグ
Fをリセットする。
In this figure, 1 is an instruction prohibition flag, which holds a flag FLAG that prohibits execution of the next instruction code to be read. Reference numeral 2 denotes a control circuit that also serves as an instruction execution control means of the present invention, and an instruction decoder that also serves as a flag setting means] 5 sets flag F in the instruction prohibition flag 1 based on the analyzed instruction, and then after reading the instruction code, Resets flag F that is currently being set.

次に第2図を参照しながら第1図の動作を説明する。Next, the operation shown in FIG. 1 will be explained with reference to FIG.

第2図は第1図に示した制御回路2の動作を説明するフ
ローチャートである。なお、(1)〜(7)は各ステッ
プを示す。
FIG. 2 is a flowchart illustrating the operation of the control circuit 2 shown in FIG. 1. Note that (1) to (7) indicate each step.

メモリ19に格納されたプログラムを読み出すと、制御
回路2が各部の初期化を行い、その際に命令禁止フラグ
1に設定されるフラグFをリセットする。この状態で、
プログラム命令がメモリデータレジスタ17に読み込ま
れ、この命令コードが命令レジスタ14に送られる。
When the program stored in the memory 19 is read, the control circuit 2 initializes each part and resets the flag F set in the instruction prohibition flag 1 at that time. In this state,
A program instruction is read into the memory data register 17 and the instruction code is sent to the instruction register 14.

まず、命令デコーダ15で解析された命令を授受する(
1)0次いで、授受した命令が条件命令かどうかを判断
しく2)、YESならばその未件が成立するかどうかを
判断しく3)、YESならば制御を終了し、NOならば
制御回路2が7ラグFを命令禁止フラグ1にセットしく
4)、制御を終了する。
First, an instruction analyzed by the instruction decoder 15 is sent and received (
1) 0 Next, it is determined whether the command sent and received is a conditional command. 2) If YES, it is determined whether the unconditional condition is established. 3) If YES, the control is terminated. If NO, the control circuit 2 sets the 7-lag F to the instruction prohibition flag 1 (4) and ends the control.

一方、ステップ(2)の判断でNOの場合、すなわち通
常の命令であれば、さらにフラグFが設定中かどうかを
判断しく5)、YESならば制御回路2がステップ(6
)を無視して命令禁止フラグ1に設定中のフラグFをリ
セットしく7)、Noならばステップ(1)で授受した
命令を実行して(8)、ステップ(7)に進む。
On the other hand, if the judgment in step (2) is NO, that is, if it is a normal instruction, it is further judged whether the flag F is being set (5), and if YES, the control circuit 2 moves to step (6).
) is ignored and the flag F which is currently set to command prohibition flag 1 is reset (7). If No, the command sent and received in step (1) is executed (8) and the process proceeds to step (7).

このように、条件命令を設ける代わりに従来の条件分岐
命令を不要にすることができ、条件命令の後にジャンプ
命令を書くことにより条件分岐命令を書いたのと同様の
機能を実行させることが可能となる。
In this way, instead of providing a conditional instruction, it is possible to eliminate the need for a conventional conditional branch instruction, and by writing a jump instruction after a conditional instruction, it is possible to execute the same function as when writing a conditional branch instruction. becomes.

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

以上説明したように、この発明は記憶手段より順次読み
出される命令コードを解析し、次に読み出す命令コード
の実行を禁止させる実行禁止フラグを設定するフラグ設
定手段と、このフラグ設定手段が設定した実行禁止フラ
グを参照しながら次に読み出す命令コードの実行を制御
する命令実行制御手段とを設けたので、条件分岐命令を
プログラムに書き込む必要がなくなり、プログラムサイ
ズを縮小できるとともに処理速度を大幅に向上できる。
As explained above, the present invention includes a flag setting means for analyzing instruction codes sequentially read from a storage means and setting an execution prohibition flag for prohibiting execution of the instruction code to be read next; Since an instruction execution control means is provided that controls the execution of the instruction code to be read next while referring to the prohibition flag, there is no need to write conditional branch instructions into the program, reducing the program size and significantly improving processing speed. .

また全ての命令に関する実行有無をその命令実行前に規
定できるので、プログラム作成を容易にすることができ
る。さらに、特別な命令セット、例えば条件分岐命令を
ジャンプ命令の条件実行としてプログラムすることがで
きる等の幾多の優れた利点を有する。
Furthermore, since it is possible to specify whether or not all instructions are to be executed before the instruction is executed, program creation can be facilitated. Furthermore, it has many advantages, such as the ability to program special instruction sets, such as conditional branch instructions, as conditional execution of jump instructions.

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

第1図はこの発明の一実施例を示す演算処理装置の構成
を説明するプロッ冴図、第2図は第1図に示した制御回
路の動作を説明するフローチャート、第3図は従来の演
算処理装置の概略ブロック図、第4図は第3図の動作を
説明するためのフローチャートである。 図中、1は命令禁止フラグ、2は制御回路。 15は命令デコーダである。 第1図 第2図 第3図
FIG. 1 is a plot diagram explaining the configuration of an arithmetic processing device showing an embodiment of the present invention, FIG. 2 is a flowchart explaining the operation of the control circuit shown in FIG. 1, and FIG. A schematic block diagram of the processing device, FIG. 4 is a flowchart for explaining the operation of FIG. 3. In the figure, 1 is an instruction prohibition flag, and 2 is a control circuit. 15 is an instruction decoder. Figure 1 Figure 2 Figure 3

Claims (2)

【特許請求の範囲】[Claims] (1)記憶手段より命令コードを順次読み出し、読み出
した命令コードに基づいて演算処理を行う演算処理装置
において、前記記憶手段より順次読み出される命令コー
ドを解析し、次に読み出す命令コードの実行を禁止させ
る実行禁止フラグを設定するフラグ設定手段と、このフ
ラグ設定手段が設定した実行禁止フラグを参照しながら
次に読み出す命令コードの実行を制御する命令実行制御
手段とを具備したことを特徴とする演算処理装置。
(1) In an arithmetic processing unit that sequentially reads instruction codes from a storage means and performs arithmetic processing based on the read instruction codes, it analyzes the instruction codes sequentially read from the storage means and prohibits execution of the next instruction code to be read. an execution prohibition flag set by the flag setting means; and an instruction execution control means that controls execution of an instruction code to be read next while referring to the execution prohibition flag set by the flag setting means. Processing equipment.
(2)命令実行制御手段は、命令実行の禁止後、フラグ
設定手段が設定した実行禁止フラグをリセットすること
を特徴とする特許請求の範囲第(1)項記載の演算処理
装置。
(2) The arithmetic processing device according to claim 1, wherein the instruction execution control means resets the execution prohibition flag set by the flag setting means after prohibiting execution of the instruction.
JP12473486A 1986-05-31 1986-05-31 Arithmetic processing unit Pending JPS62282331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12473486A JPS62282331A (en) 1986-05-31 1986-05-31 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12473486A JPS62282331A (en) 1986-05-31 1986-05-31 Arithmetic processing unit

Publications (1)

Publication Number Publication Date
JPS62282331A true JPS62282331A (en) 1987-12-08

Family

ID=14892787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12473486A Pending JPS62282331A (en) 1986-05-31 1986-05-31 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JPS62282331A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533235A (en) * 1978-08-30 1980-03-08 Toshiba Corp Microprogram control system
JPS56153448A (en) * 1980-04-30 1981-11-27 Nec Corp Microprogram control device
JPS57132248A (en) * 1981-02-09 1982-08-16 Nec Corp Instruction execution device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533235A (en) * 1978-08-30 1980-03-08 Toshiba Corp Microprogram control system
JPS56153448A (en) * 1980-04-30 1981-11-27 Nec Corp Microprogram control device
JPS57132248A (en) * 1981-02-09 1982-08-16 Nec Corp Instruction execution device

Similar Documents

Publication Publication Date Title
JPH0314025A (en) Instruction execution control system
JPS6250934A (en) Interrupting control system of processor
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
JPS62282331A (en) Arithmetic processing unit
JP2553200B2 (en) Information processing device
JPS6217773B2 (en)
JPH0954694A (en) Pipeline processor and its processing method
JPS595354A (en) Data processing device
JP3441262B2 (en) Data processing device
JP3651099B2 (en) Programmable controller
JP3705263B2 (en) Sequencer
JPS6116334A (en) Data processor
JPH04167146A (en) Address tracing system for information processor
JPH0259829A (en) Microcomputer
JPS62243032A (en) Information processor
JPH0535499A (en) Data processing device and method
JPS626328A (en) Information processor
JPH03196204A (en) Programmable controller
JPS6235694B2 (en)
JPH0198023A (en) Conditional subroutine calling system
JPH02242335A (en) Electronic computer
JPH07160534A (en) Program controller
JPS63282526A (en) System for controlling electronic computer
JPS6349943A (en) Arithmetic processing unit
JPH0560130B2 (en)