JPH0675767A - Processor - Google Patents

Processor

Info

Publication number
JPH0675767A
JPH0675767A JP4200808A JP20080892A JPH0675767A JP H0675767 A JPH0675767 A JP H0675767A JP 4200808 A JP4200808 A JP 4200808A JP 20080892 A JP20080892 A JP 20080892A JP H0675767 A JPH0675767 A JP H0675767A
Authority
JP
Japan
Prior art keywords
instruction
memory
xmax
flag
address
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
JP4200808A
Other languages
Japanese (ja)
Inventor
Hiroyuki Nakahira
博幸 中平
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 Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4200808A priority Critical patent/JPH0675767A/en
Publication of JPH0675767A publication Critical patent/JPH0675767A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the processing speed of a processor by deciding the address of the memory which designates an instruction that is carried out by the signal outputted based on all comparison results. CONSTITUTION:When it is checked whether the value X is included in a range shown by Xmin<X<Xmax or not, a subtraction Xmax-X is carried out by a comparison instruction (subtraction instruction). Thus a comparison result Z is acquired and the most significant bit MSB (Z) of the result Z is inputted to a flag generating circuit 5. The circuit 5 calculates a NOR between the most significant bit MSB (Y) of the arithmetic result Y or X-Xmin and the MSB (Z). Then a flag signal FLG is outputted as an arithmetic result. A conditional branch instruction decides whether the value of the signal FLG is equal to 1 or 0, and a memory address control circuit 3 performs the address control so as to decide the address of a memory 4 which designates the instruction to be carried out next.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プロセッサに関し、特
に、算術演算部を備えており、加減演算や非線形演算な
どの演算をメモリに書き込まれた命令により行なうプロ
セッサに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor, and more particularly to a processor having an arithmetic operation unit and performing operations such as addition and subtraction operations and non-linear operations by instructions written in a memory.

【0002】[0002]

【従来の技術】図4は従来から使用されている水平マイ
クロプログラム型プロセッサの算術演算部を示してお
り、図4において、51は加減算器であり、52は演算
の種類を決定して該種類の演算を行なうように加減算器
51を制御する演算制御回路であり、53はプログラム
が書き込まれているメモリ54のアドレスを制御するメ
モリアドレス制御回路である。加減算器51は、入力さ
れたデータA及びデータBを演算制御回路52の制御に
従い演算し、演算結果Cを出力する。
2. Description of the Related Art FIG. 4 shows an arithmetic operation unit of a conventional horizontal microprogram type processor. In FIG. 4, 51 is an adder / subtractor, 52 is a type of operation, Is a calculation control circuit for controlling the adder / subtractor 51 so as to perform the calculation of, and 53 is a memory address control circuit for controlling the address of the memory 54 in which the program is written. The adder / subtractor 51 calculates the input data A and data B under the control of the calculation control circuit 52, and outputs a calculation result C.

【0003】一般に、このような算術演算部を備えた水
平マイクロプログラム型のプロセッサにおいて、複数の
条件がすべて成り立つときにのみ一の処理を実行する一
方、複数の条件のうち少なくとも1つが成り立たないと
きに別の処理を実行する場合には、演算結果Cに関係す
る条件分岐命令と演算結果Cに関係しない無条件分岐命
令とが用意されている。そして、最初の条件の成否を判
断する命令として、まず、データAの値とデータBの値
との大きさの比較が行なわれ、次に、その比較結果によ
り最初の条件が成り立つと判断された場合に次の条件の
成否を判断する命令に分岐する条件分岐命令が実行され
る。以下、すべての条件についてその条件の成否の判断
を行うために同様の命令が実行される。
Generally, in a horizontal microprogram type processor having such an arithmetic operation unit, one process is executed only when a plurality of conditions are all satisfied, while at least one of the plurality of conditions is not satisfied. When another process is executed, a conditional branch instruction related to the operation result C and an unconditional branch instruction not related to the operation result C are prepared. Then, as an instruction to determine whether or not the first condition is satisfied, first, the magnitude of the value of the data A and the value of the data B are compared, and then it is determined that the first condition is satisfied based on the comparison result. In this case, a conditional branch instruction that branches to an instruction that determines whether the next condition is satisfied is executed. Hereinafter, the same instruction is executed for all conditions to determine whether or not the conditions are satisfied.

【0004】図5は値XがXmin<X<Xmaxで表
される範囲内にあるか否かを調べる場合の命令の実行の
流れを示しており、図5において、第1の条件であるX
>Xminの成否を判断する命令として、まず、ステッ
プS51の比較命令(即ち減算命令)では、XとXmi
nとの大きさの比較、即ち、X−Xminの減算が行な
われその演算結果Yが求められ、次に、ステップS52
の条件分岐命令では、ステップS51における比較結果
としての、演算結果Yの最上位ビットMSB(Y)が1
であるかまたは0であるかを判定し、MSB(Y)=1
である場合には第1の条件:X>Xminが成り立たな
いと判断してステップS53の命令に移る一方、MSB
(Y)=0である場合には第1の条件:X>Xminが
成り立つと判断してステップS54の命令に移る。この
条件分岐命令において、メモリアドレス制御回路53は
次に実行すべき命令を指定するメモリ54のアドレスが
決定されるようにアドレス制御を行なう。ステップS5
3の無条件分岐命令では、次に実行すべき命令としてス
テップS58の命令が指定されることによりステップS
58に移る。第2の条件であるX<Xmaxの成否を判
断する命令として、ステップS54の比較命令(即ち減
算命令)では、XとXmaxとの大きさの比較、即ち、
Xmax−Xの減算が行なわれその演算結果Zが求めら
れ、次に、ステップS55の条件分岐命令では、ステッ
プS54における比較結果としての、演算結果Zの最上
位ビットMSB(Z)が1であるか0であるかを判定
し、MSB(Z)=1である場合には第2の条件:X<
Xmaxが成り立たないと判断してステップS56の命
令に移る一方、MSB(Z)=0である場合には第2の
条件:X<Xmaxが成り立つと判断してステップS5
7の命令に移る。この条件分岐命令において、メモリア
ドレス制御回路53は次に実行すべき命令を指定するメ
モリ54のアドレスが決定されるようにアドレス制御を
行なう。ステップS56の無条件分岐命令では、次に実
行すべき命令としてステップS58の命令が指定される
ことによりステップS58に移る。そして、X−Xmi
nの演算結果Yの最上位ビットMSB(Y)が0であり
且つXmax−Xの演算結果Zの最上位ビットMSB
(Z)が0である場合、即ち、第1の条件:X>Xmi
n及び第2の条件:X<Xmaxが共に成り立つ場合に
はステップS57において値XがXmin<X<Xma
xで表される範囲内にある場合の処理を実行する。一
方、X−Xminの演算結果Yの最上位ビットMSB
(Y)が1であるかまたはXmax−Xの演算結果Zの
最上位ビットMSB(Z)が1である場合、即ち、第1
の条件:X>Xmin及び第2の条件:X<Xmaxの
うち少なくとも1つの条件が成り立たない場合にはステ
ップS58において値XがXmin<X<Xmaxで表
される範囲内にない場合の処理を実行する。
FIG. 5 shows the flow of instruction execution for checking whether or not the value X is within the range expressed by Xmin <X <Xmax. In FIG. 5, the first condition X
As an instruction for determining the success or failure of> Xmin, first, in the comparison instruction (that is, the subtraction instruction) of step S51, X and Xmi
The magnitude is compared with n, that is, X-Xmin is subtracted to obtain the operation result Y, and then step S52.
, The most significant bit MSB (Y) of the operation result Y as the comparison result in step S51 is 1
Or 0, MSB (Y) = 1
If it is, it is determined that the first condition: X> Xmin does not hold, and the process proceeds to the instruction of step S53, while MSB
If (Y) = 0, it is determined that the first condition: X> Xmin is satisfied, and the process proceeds to the instruction of step S54. In this conditional branch instruction, the memory address control circuit 53 performs address control so that the address of the memory 54 designating the next instruction to be executed is determined. Step S5
In the unconditional branch instruction of 3, the instruction of step S58 is designated as the instruction to be executed next, so that the step S58 is executed.
Move to 58. As a command for determining the success or failure of X <Xmax which is the second condition, the comparison command (that is, the subtraction command) in step S54 compares the magnitudes of X and Xmax, that is,
Xmax-X is subtracted to obtain the operation result Z. Next, in the conditional branch instruction of step S55, the most significant bit MSB (Z) of the operation result Z as the comparison result in step S54 is 1. Or 0, and when MSB (Z) = 1, the second condition: X <
When it is determined that Xmax does not hold, the process moves to the instruction of step S56, while when MSB (Z) = 0, it is determined that the second condition: X <Xmax holds and step S5.
Move on to 7. In this conditional branch instruction, the memory address control circuit 53 performs address control so that the address of the memory 54 designating the next instruction to be executed is determined. In the unconditional branch instruction of step S56, the instruction of step S58 is designated as the instruction to be executed next, and the process proceeds to step S58. And X-Xmi
The most significant bit MSB (Y) of the operation result Y of n is 0 and the most significant bit MSB of the operation result Z of Xmax-X
When (Z) is 0, that is, the first condition: X> Xmi
n and the second condition: when X <Xmax is satisfied, the value X is Xmin <X <Xma in step S57.
The processing when it is within the range represented by x is executed. On the other hand, the most significant bit MSB of the operation result Y of X-Xmin
(Y) is 1 or the most significant bit MSB (Z) of the operation result Z of Xmax-X is 1, that is, the first
If at least one of the condition: X> Xmin and the second condition: X <Xmax is not satisfied, the process in the case where the value X is not within the range represented by Xmin <X <Xmax in step S58 is performed. Run.

【0005】このとき、ステップS51及びステップS
54における2つのデータの値同士の大きさの比較は加
減算器51における減算(データAの値−データBの
値)で実現でき、ステップS52及びステップS55の
条件分岐命令においては、それぞれステップS51、ス
テップS54における演算結果Cの最上位ビットMSB
の値に基づいて次に実行すべき命令を指定するメモリ5
4のアドレスがメモリアドレス制御回路53により決定
される。
At this time, step S51 and step S
The comparison of the magnitudes of the two data values in 54 can be realized by subtraction (value of data A-value of data B) in the adder / subtractor 51, and in the conditional branch instructions of step S52 and step S55, respectively, step S51, Most significant bit MSB of operation result C in step S54
Memory 5 that specifies the next instruction to be executed based on the value of
The address 4 is determined by the memory address control circuit 53.

【0006】このような従来のプロセッサにおいて、値
XがXmin<X<Xmaxで表わされる範囲内にある
場合を選出する際には、1つの条件につき1つの比較命
令と1つの条件分岐命令と1つの無条件分岐命令との計
3つの命令が実行されるため、全部で3×2=6つの命
令が実行される。
In such a conventional processor, when selecting a case where the value X is within the range represented by Xmin <X <Xmax, one comparison instruction and one conditional branch instruction and one conditional branch instruction are selected for each condition. Since a total of three instructions including one unconditional branch instruction are executed, a total of 3 × 2 = 6 instructions are executed.

【0007】[0007]

【発明が解決しようとする課題】ところで、画像処理の
応用例においては、特定の領域内だけに処理を行うこと
が多いため、上記のような複数の条件がすべて成立する
か否かを判断するための命令が用いられる場合が多く、
また、データ量が膨大なため、処理速度の高速性が要求
される。
By the way, in application examples of image processing, since processing is often performed only within a specific area, it is determined whether or not all of the above-described plurality of conditions are satisfied. Are often used for
Further, since the amount of data is enormous, high processing speed is required.

【0008】ところが、上記のような従来のプロセッサ
においては、複数の条件がすべて成り立つ場合を選出す
る際に、各条件ごとに条件分岐命令が実行されるため命
令の個数が条件の個数の3倍となり、処理速度の低下を
招くおそれがあるという問題がある。
However, in the conventional processor as described above, when selecting a case where all of a plurality of conditions are satisfied, a conditional branch instruction is executed for each condition, so the number of instructions is three times the number of conditions. Therefore, there is a problem that the processing speed may decrease.

【0009】本発明は上記に鑑みなされたものであり、
複数の条件がすべて成り立つ場合を選出する際の処理速
度を向上させることができるプロセッサを提供すること
を目的とする。
The present invention has been made in view of the above,
An object of the present invention is to provide a processor capable of improving the processing speed when selecting a case where a plurality of conditions are all satisfied.

【0010】[0010]

【課題を解決するための手段】上記の目的を達成するた
め、本発明は、加減算器により2つのデータの値同士の
大きさの比較を行ないその比較結果を出力し、複数の比
較結果のすべてに基づいて信号を出力し、該信号に基づ
いて実行すべき命令を指定するメモリのアドレスを決定
することにより、複数の大小関係の条件がすべて成り立
つ場合を選出するものである。
To achieve the above object, the present invention compares the magnitudes of two data values by an adder / subtractor, outputs the comparison result, and outputs all the comparison results. Based on the signal, the address of the memory designating the instruction to be executed is determined based on the signal to select the case where all the plurality of magnitude relations are satisfied.

【0011】具体的に本発明が講じた解決手段は、2つ
のデータの値同士の大きさの比較を行ない該比較結果を
出力する加減算器を備えており、メモリに書き込まれた
命令のうち該メモリのアドレスにより指定される命令を
実行するプロセッサを対象とし、上記加減算器が出力し
た複数の比較結果のすべてに基づいてフラグ信号を出力
するフラグ発生手段と、該フラグ発生手段が出力したフ
ラグ信号に基づいて上記メモリのアドレスを決定するメ
モリアドレス決定手段とを備えている構成とするもので
ある。
Specifically, the solving means implemented by the present invention comprises an adder / subtractor which compares the magnitudes of two data values and outputs the comparison result, and among the instructions written in the memory, Flag generation means for outputting a flag signal based on all of the plurality of comparison results output by the adder / subtractor, and a flag signal output by the flag generation means, targeting a processor that executes an instruction specified by a memory address And a memory address determining means for determining the address of the memory based on the above.

【0012】[0012]

【作用】上記の構成により、2つのデータの値同士の複
数の大小関係の条件がすべて成り立つ場合には、加減算
器から出力される各比較結果は上記複数の大小関係の条
件のそれぞれが成り立つことを示すため、フラグ発生手
段が出力するフラグ信号は上記複数の大小関係の条件が
すべて成り立つことを示すことになる。従って、メモリ
アドレス決定手段は、上記フラグ信号に基づいて、上記
複数の大小関係の条件がすべて成り立つ場合に実行すべ
き命令を指定するメモリのアドレスを決定することがで
きる。
With the above configuration, when the plurality of magnitude relations between the two data values are all satisfied, each comparison result output from the adder / subtractor is satisfied with each of the plurality of magnitude relations. Therefore, the flag signal output by the flag generating means indicates that all the conditions of the plurality of magnitude relations are satisfied. Therefore, the memory address determining means can determine the address of the memory that specifies the instruction to be executed when all the plurality of magnitude relations are satisfied, based on the flag signal.

【0013】このとき、加減算器により比較命令の実行
が実現され、フラグ発生手段及びメモリアドレス決定手
段により条件分岐命令の実行が実現されるため、上記複
数の大小関係の条件がすべて成り立つ場合の選出を、上
記大小関係の条件の個数と同数の比較命令と1つの条件
分岐命令とが実行されるだけで行なうことができる。
At this time, since the comparison instruction is executed by the adder / subtractor and the conditional branch instruction is executed by the flag generating means and the memory address determining means, selection in the case where all of the plurality of magnitude relational conditions are satisfied. Can be performed only by executing the same number of comparison instructions and one conditional branch instruction as the number of the magnitude relation conditions.

【0014】[0014]

【実施例】図1は本発明の一実施例に係るプロセッサと
しての信号処理プロセッサの算術演算部の構成を示して
おり、図1において、1は加減算器であり、2は演算の
種類を決定して該種類の演算を行なうように加減算器1
を制御する演算制御回路であり、3はプログラムが書き
込まれているメモリ4のアドレスを制御するメモリアド
レス決定手段としてのメモリアドレス制御回路である。
5はフラグ発生手段としてのフラグ発生回路であり、6
はフラグ発生回路5を制御するフラグ制御回路であり、
フラグ発生回路5はフラグ信号FLGを出力する。加減
算器1は、入力されたデータA及びデータBを演算制御
回路2の制御に従い演算し、その演算結果Cを出力す
る。
1 shows the configuration of an arithmetic operation unit of a signal processor as a processor according to an embodiment of the present invention. In FIG. 1, 1 is an adder / subtractor, and 2 is a type of operation. And adder / subtractor 1 to perform the operation of the type
Is an arithmetic control circuit for controlling the memory address, and 3 is a memory address control circuit as a memory address determining means for controlling the address of the memory 4 in which the program is written.
Reference numeral 5 is a flag generation circuit as a flag generation means, and 6
Is a flag control circuit for controlling the flag generation circuit 5,
The flag generation circuit 5 outputs a flag signal FLG. The adder / subtractor 1 calculates the input data A and data B under the control of the calculation control circuit 2 and outputs the calculation result C.

【0015】図2はフラグ発生回路5の一例を示してお
り、図2において、5aは否定論理和ゲートであり、5
bはフリップフロップ回路である。フラグ制御回路6
は、演算制御回路2の制御により、命令が比較命令の場
合にはフリップフロップ回路5bにクロック信号CLK
を出力し、命令がフラグ信号FLGを参照する例えば条
件分岐命令の場合にはフリップフロップ回路5bにクリ
ア信号CLRを出力する。これにより、フラグ信号FL
Gの値は、現在実行している比較命令即ち減算命令の演
算結果の最上位ビットMSBと、それ以前に実行された
比較命令即ち減算命令の演算結果の最上位ビットMSB
との否定論理和演算により与えられる。フラグ発生回路
5のフラグ信号FLGの値によりメモリアドレス制御回
路3は実行すべき命令を指定するメモリ4のアドレスを
決定する。
FIG. 2 shows an example of the flag generation circuit 5. In FIG. 2, 5a is a NOR gate.
b is a flip-flop circuit. Flag control circuit 6
The operation control circuit 2 controls the clock signal CLK to the flip-flop circuit 5b when the instruction is a comparison instruction.
When the instruction refers to the flag signal FLG, for example, a conditional branch instruction, the clear signal CLR is output to the flip-flop circuit 5b. As a result, the flag signal FL
The value of G is the most significant bit MSB of the operation result of the currently executed comparison instruction or subtraction instruction and the most significant bit MSB of the operation result of the comparison instruction or subtraction instruction executed before that.
It is given by the NOR operation with. The memory address control circuit 3 determines the address of the memory 4 designating the instruction to be executed according to the value of the flag signal FLG of the flag generation circuit 5.

【0016】図3は値XがXmin<X<Xmaxで表
される範囲内にあるか否かを調べる場合の命令の実行の
流れを示しており、図3において、第1の条件であるX
>Xmin及び第2の条件であるX<Xmaxの成否を
判断する命令として、まず、ステップS1の比較命令
(即ち減算命令)では、XとXminとの大きさの比
較、即ち、X−Xminの減算が行なわれその演算結果
Yが求められ、比較結果としての該演算結果Yの最上位
ビットMSB(Y)がフラグ発生回路5に入力され、次
に、ステップS2の比較命令(即ち減算命令)では、X
とXmaxとの大きさの比較、即ち、Xmax−Xの減
算が行なわれその演算結果Zが求められ、比較結果とし
ての該演算結果Zの最上位ビットMSB(Z)がフラグ
発生回路5に入力され、フラグ発生回路5においてX−
Xminの演算結果Yの最上位ビットMSB(Y)とX
max−Xの演算結果Zの最上位ビットMSB(Z)と
の否定論理和演算が行なわれ該演算結果としてのフラグ
信号FLGが出力される。次に、ステップS3の条件分
岐命令では、フラグ発生回路5から出力されたフラグ信
号FLGを参照して該フラグ信号FLGの値が1である
かまたは0であるかを判定し、フラグ信号FLGの値が
1である場合には第1の条件:X>Xmin及び第2の
条件:X<Xmaxが共に成り立つと判断してステップ
S4の命令に移る一方、フラグ信号FLGの値が0であ
る場合には第1の条件:X>Xmin及び第2の条件:
X<Xmaxのうち少なくとも1つの条件が成り立たな
いと判断してステップS5の命令に移る。この条件分岐
命令において、メモリアドレス制御回路3は次に実行す
べき命令を指定するメモリ4のアドレスが決定されるよ
うにアドレス制御を行なう。そして、フラグ信号FLG
の値が1である場合、即ち、第1の条件:X>Xmin
及び第2の条件:X<Xmaxが共に成り立つ場合には
ステップS4において値XがXmin<X<Xmaxで
表される範囲内にある場合の処理を実行する。一方、フ
ラグ信号FLGの値が0である場合、即ち、第1の条
件:X>Xmin及び第2の条件:X<Xmaxのうち
少なくとも1つの条件が成り立たない場合にはステップ
S5において値XがXmin<X<Xmaxで表される
範囲内にない場合の処理を実行する。
FIG. 3 shows the flow of instruction execution in the case of checking whether the value X is within the range represented by Xmin <X <Xmax, and in FIG. 3, the first condition X
> Xmin and the second condition X <Xmax as a command to determine the success or failure, first, in the comparison command (that is, the subtraction command) in step S1, the size of X and Xmin is compared, that is, X-Xmin Subtraction is performed to obtain the operation result Y, the most significant bit MSB (Y) of the operation result Y as the comparison result is input to the flag generation circuit 5, and then the comparison instruction (that is, the subtraction instruction) in step S2. Then X
And Xmax are compared, that is, Xmax-X is subtracted to obtain an operation result Z, and the most significant bit MSB (Z) of the operation result Z as a comparison result is input to the flag generation circuit 5. Then, in the flag generation circuit 5, X-
The most significant bit MSB (Y) and X of the operation result Y of Xmin
A NOR operation is performed with the most significant bit MSB (Z) of the operation result Z of max-X, and the flag signal FLG as the operation result is output. Next, in the conditional branch instruction of step S3, it is determined whether the value of the flag signal FLG is 1 or 0 by referring to the flag signal FLG output from the flag generation circuit 5, and the flag signal FLG When the value is 1, it is determined that the first condition: X> Xmin and the second condition: X <Xmax are both satisfied, and the process proceeds to the instruction of step S4, while the value of the flag signal FLG is 0. The first condition: X> Xmin and the second condition:
When it is determined that at least one condition of X <Xmax is not satisfied, the process proceeds to the instruction of step S5. In this conditional branch instruction, the memory address control circuit 3 performs address control so that the address of the memory 4 designating the next instruction to be executed is determined. Then, the flag signal FLG
Is 1, that is, the first condition: X> Xmin
And the second condition: when X <Xmax holds together, the process when the value X is in the range represented by Xmin <X <Xmax is executed in step S4. On the other hand, when the value of the flag signal FLG is 0, that is, when at least one of the first condition: X> Xmin and the second condition: X <Xmax is not satisfied, the value X is determined in step S5. The processing is executed when it is not within the range represented by Xmin <X <Xmax.

【0017】このとき、ステップS1及びステップS2
における2つのデータの値同士の大きさの比較は加減算
器1における減算(データAの値−データBの値)で実
現できると共にステップS2における否定論理和演算は
フラグ発生回路5の否定論理和ゲート5aで行なわれ、
ステップS3の条件分岐命令においては、該否定論理和
ゲート5aから出力されるフラグ信号FLGに基づいて
次に実行すべき命令を指定するメモリ4のアドレスがメ
モリアドレス制御回路3により決定される。
At this time, step S1 and step S2
The comparison of the magnitudes of the two data values can be realized by subtraction (value of data A-value of data B) in the adder / subtractor 1, and the NOR operation in step S2 is the NOR gate of the flag generation circuit 5. 5a,
In the conditional branch instruction of step S3, the address of the memory 4 designating the instruction to be executed next is determined by the memory address control circuit 3 based on the flag signal FLG output from the NOR gate 5a.

【0018】値XがXmin<X<Xmaxで表される
範囲内にある場合を選出する際において、上記実施例に
係るプロセッサの構成からフラグ発生回路5とフラグ制
御回路6とを除いた構成の従来のプロセッサにおいて
は、1つの条件に付き3つの命令が実行されるため全部
で3×2=6つの命令が実行される必要があるが、上記
実施例に係るプロセッサにおいては、第1の条件:X>
Xmin及び第2の条件:X<Xmaxにそれぞれ応じ
た2つの比較命令と1つの条件分岐命令との計3つの命
令が実行されるだけで良い。さらに、上記範囲が2次元
の領域である場合には、上記従来のプロセッサにおいて
は3×4=12個の命令が実行される必要があるが、上
記実施例に係るプロセッサにおいては4+1=5つの命
令が実行されるだけで良い。上記実施例に係るプロセッ
サにおいては、条件の数が多くなればなるほど処理時間
の短縮化についてより大きな効果が得られる。
When selecting the case where the value X is within the range represented by Xmin <X <Xmax, the flag generating circuit 5 and the flag control circuit 6 are excluded from the configuration of the processor according to the above embodiment. In the conventional processor, since three instructions are executed for one condition, it is necessary to execute a total of 3 × 2 = 6 instructions. In the processor according to the above embodiment, the first condition is used. : X>
It is only necessary to execute a total of three instructions, that is, two comparison instructions and one conditional branch instruction corresponding to Xmin and the second condition: X <Xmax. Further, when the range is a two-dimensional area, 3 × 4 = 12 instructions need to be executed in the conventional processor, but 4 + 1 = 5 instructions in the processor according to the embodiment. Only the instructions are executed. In the processor according to the above-described embodiment, the greater the number of conditions, the greater the effect of shortening the processing time.

【0019】[0019]

【発明の効果】以上説明したように、本発明に係るプロ
セッサにおいては、2つのデータの値同士の複数の大小
関係の条件がすべて成り立つ場合には、加減算器から出
力される各比較結果は上記複数の大小関係の条件のそれ
ぞれが成り立つことを示すため、複数の比較結果のすべ
てに基づいて出力されるフラグ信号は上記複数の大小関
係の条件がすべて成り立つことを示すことになるので、
該フラグ信号に基づいて、上記複数の大小関係の条件が
すべて成り立つ場合に実行すべき命令を指定するメモリ
のアドレスが決定されることができる。このとき、比較
命令の実行が加減算器により実現され、条件分岐命令の
実行がフラグ発生手段及びメモリアドレス決定手段によ
り実現されるため、上記複数の大小関係の条件がすべて
成り立つ場合の選出を、上記大小関係の条件の個数と同
数の比較命令と1つの条件分岐命令とが実行されるだけ
で行なうことができる。
As described above, in the processor according to the present invention, each comparison result output from the adder / subtractor is the above when the conditions of plural magnitude relations between two data values are all satisfied. Since it is shown that each of the plurality of magnitude relation conditions is satisfied, the flag signal output based on all of the plurality of comparison results indicates that the plurality of magnitude relation conditions are all satisfied.
Based on the flag signal, it is possible to determine the address of the memory designating the instruction to be executed when the plurality of magnitude relations are all satisfied. At this time, since the execution of the comparison instruction is realized by the adder / subtractor and the execution of the conditional branch instruction is realized by the flag generating means and the memory address determining means, the selection in the case where all the conditions of the plurality of magnitude relations are satisfied is described above. This can be performed only by executing the same number of comparison instructions and one conditional branch instruction as the number of magnitude-related conditions.

【0020】従って、本発明によると、ハードウェアの
構成規模をあまり増大させることなく、複数の条件がす
べて成り立つ場合を選出する際の処理速度を著しく向上
させることができ、例えば、略同様の構成を備えた従来
のプロセッサに比較して処理時間を2分の1以下に短縮
することができるため、その実用的効果は多大である。
Therefore, according to the present invention, it is possible to significantly improve the processing speed when selecting a case where all of a plurality of conditions are satisfied, without significantly increasing the hardware configuration scale. Since the processing time can be shortened to half or less as compared with the conventional processor equipped with, the practical effect is great.

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

【図1】本発明の一実施例に係るプロセッサを示すブロ
ック図である。
FIG. 1 is a block diagram illustrating a processor according to an exemplary embodiment of the present invention.

【図2】上記実施例に係るプロセッサのフラグ発生回路
を示すブロック図である。
FIG. 2 is a block diagram showing a flag generation circuit of the processor according to the embodiment.

【図3】上記実施例に係るプロセッサにおいて値XがX
min<X<Xmaxで表される範囲内にあるか否かを
調べる場合の命令の実行の流れを示すフローチャート図
である。
FIG. 3 shows that the value X is X in the processor according to the above embodiment.
It is a flowchart figure which shows the flow of execution of the instruction at the time of checking whether it exists in the range represented by min <X <Xmax.

【図4】従来例に係るプロセッサを示すブロック図であ
る。
FIG. 4 is a block diagram showing a processor according to a conventional example.

【図5】上記従来例に係るプロセッサにおいて値XがX
min<X<Xmaxで表される範囲内にあるか否かを
調べる場合の命令の実行の流れを示すフローチャート図
である。
FIG. 5 shows that the value X is X in the processor according to the conventional example.
It is a flowchart figure which shows the flow of execution of the instruction at the time of checking whether it exists in the range represented by min <X <Xmax.

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

1 加減算器 2 演算制御回路 3 メモリアドレス制御回路 4 メモリ 5 フラグ発生回路 6 フラグ制御回路 1 adder / subtractor 2 arithmetic control circuit 3 memory address control circuit 4 memory 5 flag generation circuit 6 flag control circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 2つのデータの値同士の大きさの比較を
行ない該比較結果を出力する加減算器を備えており、メ
モリに書き込まれた命令のうち該メモリのアドレスによ
り指定される命令を実行するプロセッサであって、 上記加減算器が出力した複数の比較結果のすべてに基づ
いてフラグ信号を出力するフラグ発生手段と、該フラグ
発生手段が出力したフラグ信号に基づいて上記メモリの
アドレスを決定するメモリアドレス決定手段とを備えて
いることを特徴とするプロセッサ。
1. An adder / subtractor that compares the magnitudes of two data values and outputs the comparison result, and executes an instruction specified by an address of the memory among instructions written in the memory. A flag generating means for outputting a flag signal based on all of the plurality of comparison results output by the adder / subtractor, and an address of the memory based on the flag signal output by the flag generating means. A processor comprising a memory address determining means.
JP4200808A 1992-07-28 1992-07-28 Processor Pending JPH0675767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4200808A JPH0675767A (en) 1992-07-28 1992-07-28 Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4200808A JPH0675767A (en) 1992-07-28 1992-07-28 Processor

Publications (1)

Publication Number Publication Date
JPH0675767A true JPH0675767A (en) 1994-03-18

Family

ID=16430543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4200808A Pending JPH0675767A (en) 1992-07-28 1992-07-28 Processor

Country Status (1)

Country Link
JP (1) JPH0675767A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58146945A (en) * 1982-02-26 1983-09-01 Toshiba Corp Device for controlling branch of program
JPS6388636A (en) * 1986-10-01 1988-04-19 Nec Corp Microcomputer
JPH04191925A (en) * 1990-11-26 1992-07-10 Fujitsu Ltd Arithmetic processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58146945A (en) * 1982-02-26 1983-09-01 Toshiba Corp Device for controlling branch of program
JPS6388636A (en) * 1986-10-01 1988-04-19 Nec Corp Microcomputer
JPH04191925A (en) * 1990-11-26 1992-07-10 Fujitsu Ltd Arithmetic processor

Similar Documents

Publication Publication Date Title
CN108139885B (en) Floating point number rounding
JPH05216624A (en) Arithmetic unit
JPH07193467A (en) Adaptive filter correction coefficient arithmetic circuit
US4598358A (en) Pipelined digital signal processor using a common data and control bus
JPH0690668B2 (en) Fuzzy computing device
JPH0675767A (en) Processor
JP2008530679A (en) Electronic parallel processing circuit
US7216141B2 (en) Computing carry-in bit to most significant bit carry save adder in current stage
US5432726A (en) Arithmetic unit for quantization/inverse quantigation
JPS58200349A (en) Microprogram controller
US5313600A (en) System for controlling the number of data pieces in a queue memory
JPS63153636A (en) Information processor
JPS59184944A (en) Rounding arithmetic system
JPH05143447A (en) Digital processor and control method for the processor
US6983297B2 (en) Shifting an operand left or right while minimizing the number of multiplexor stages
JPH0619700B2 (en) Arithmetic unit
JP2665067B2 (en) Floating point adder / subtracter
JP3111695B2 (en) Arithmetic processing unit
JPH02249025A (en) Signal processor
JP2000305782A (en) Arithmetic unit
JPH0269826A (en) System for controlling instruction with condition
JPS59223846A (en) Arithmetic processor
JPH04307623A (en) Arithmetic logical computing device
JPH0553759A (en) Fixed decimal point arithmetic unit
JPH03282782A (en) Picture signal processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19951128