JP2807170B2 - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JP2807170B2
JP2807170B2 JP7559294A JP7559294A JP2807170B2 JP 2807170 B2 JP2807170 B2 JP 2807170B2 JP 7559294 A JP7559294 A JP 7559294A JP 7559294 A JP7559294 A JP 7559294A JP 2807170 B2 JP2807170 B2 JP 2807170B2
Authority
JP
Japan
Prior art keywords
input data
output
data
significant bit
selection circuit
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 - Fee Related
Application number
JP7559294A
Other languages
Japanese (ja)
Other versions
JPH0749778A (en
Inventor
俊一 九郎丸
久 児玉
真木 豊蔵
敏之 荒木
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 JP7559294A priority Critical patent/JP2807170B2/en
Priority to US08/251,311 priority patent/US5432726A/en
Publication of JPH0749778A publication Critical patent/JPH0749778A/en
Application granted granted Critical
Publication of JP2807170B2 publication Critical patent/JP2807170B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/5055Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination in which one operand is a constant, i.e. incrementers or decrementers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30058Conditional branch instructions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • H04N19/45Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder performing compensation of the inverse transform mismatch, e.g. Inverse Discrete Cosine Transform [IDCT] mismatch
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、データの量子化及び逆
量子化の処理に使用される演算装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic unit used for data quantization and inverse quantization.

【0002】[0002]

【従来の技術】従来のマイクロプログラム方式の信号処
理プロセッサの算術論理演算部の基本構成を図6に示
す。図6において、61は算術論理演算器(ALU)、
62は該ALU61の演算の種類を制御するための制御
回路である。
2. Description of the Related Art FIG. 6 shows a basic configuration of an arithmetic and logic operation unit of a conventional microprogram type signal processor. In FIG. 6, reference numeral 61 denotes an arithmetic logic unit (ALU),
Reference numeral 62 denotes a control circuit for controlling the type of operation of the ALU 61.

【0003】制御回路62は、不図示のメモリに格納さ
れたプログラムを構成する命令を順次解読しながら、A
LU61による演算の実行を制御する。ALU61は、
入力データA及び入力データBに対して制御回路62か
ら指定された種類の演算を施し、その演算の結果を出力
データFとして出力する。両入力データA,B及び出力
データFは、例えば2の補数表示の2進数(固定小数点
数)である。
[0005] The control circuit 62 sequentially decodes instructions constituting a program stored in a memory (not shown),
The execution of the calculation by the LU 61 is controlled. ALU61,
An operation of the type specified by the control circuit 62 is performed on the input data A and the input data B, and the result of the operation is output as output data F. The input data A and B and the output data F are, for example, binary numbers (fixed-point numbers) in 2's complement notation.

【0004】さて、蓄積メディア動画像符号化国際標準
の1つとして、MPEG1が知られている。図6の算術
論理演算部は、MPEG1に基づく画像データの量子化
の処理と、逆量子化の処理とを実行することができる。
[0006] MPEG1 is known as one of the international standards for moving image coding of storage media. The arithmetic and logic unit shown in FIG. 6 can execute a process of quantizing image data based on MPEG1 and a process of inverse quantization.

【0005】図7は、図6の構成による画像データの復
号化処理の内容を示すデータフロー図である。図7にお
いて、71はVLD部、72はZZ-1部、73はQ
-1部、74はミスマッチ制御部、75はSAT(サチュ
レーション)部、76はIDCT部、77はリファレン
スメモリ部である。このうち、Q-1部73、ミスマッチ
制御部74及びSAT部75では、逆量子化処理が実行
される。ミスマッチ制御部74は、IDCT部76での
ミスマッチを避けるためにQ-1部73の出力を偶数又は
奇数に制限するものであり、図8(a)及び図8(b)
に示すような条件分岐演算を実行する。なお、画像デー
タの量子化処理にも同様の条件分岐演算が要求される。
FIG. 7 is a data flow diagram showing the contents of the image data decoding process according to the configuration of FIG. In FIG. 7, reference numeral 71 denotes a VLD section, 72 denotes a ZZ- 1 section, and 73 denotes a QD section.
Reference numeral 1 denotes a mismatch control unit, 74 denotes a mismatch control unit, 75 denotes a SAT (saturation) unit, 76 denotes an IDCT unit, and 77 denotes a reference memory unit. Among them, the Q- 1 section 73, the mismatch control section 74, and the SAT section 75 perform an inverse quantization process. The mismatch control unit 74 limits the output of the Q- 1 unit 73 to an even number or an odd number in order to avoid a mismatch in the IDCT unit 76, and FIG. 8A and FIG.
The conditional branch operation shown in FIG. Note that a similar conditional branch operation is required for the quantization processing of image data.

【0006】図8(a)に示す演算1は、入力データB
の正負0と、入力データAの偶奇とに応じた条件分岐演
算である。具体的には、入力データAが奇数であれば、
入力データBの如何にかかわらず、該入力データBがそ
のまま出力データFとして出力される。入力データAが
偶数であれば、入力データBの正負0に応じて出力が決
定される。すなわち、入力データAが偶数でありかつ入
力データBが正であれば、入力データBに1を加算した
結果B+1が出力される。入力データAが偶数でありか
つ入力データBが0であれば、0(=B)が出力され
る。入力データAが偶数でありかつ入力データBが負で
あれば、入力データBから1を減算した結果B−1が出
力される。
Operation 1 shown in FIG.
Is a conditional branch operation in accordance with the sign 0 of the input data A and the evenness of the input data A. Specifically, if the input data A is odd,
Regardless of the input data B, the input data B is output as output data F as it is. If the input data A is an even number, the output is determined according to the positive or negative 0 of the input data B. That is, if the input data A is even and the input data B is positive, a result B + 1 of adding 1 to the input data B is output. If the input data A is even and the input data B is 0, 0 (= B) is output. If the input data A is even and the input data B is negative, a result B-1 obtained by subtracting 1 from the input data B is output.

【0007】図8(b)に示す演算2も、上記演算1と
同様に、入力データBの正負0と、入力データAの偶奇
とに応じた条件分岐演算である。ただし、演算2の場合
には、演算1のB+1とB−1との出力条件が入れ替っ
ている。
Operation 2 shown in FIG. 8 (b) is also a conditional branch operation according to the positive / negative 0 of the input data B and the even / odd of the input data A, similarly to the operation 1. However, in the case of the operation 2, the output conditions of B + 1 and B-1 of the operation 1 are interchanged.

【0008】図8(a)に示す演算1を図6の構成で実
行する場合には、次のようなプログラム(手順)が使用
される。
When the operation 1 shown in FIG. 8A is executed with the configuration shown in FIG. 6, the following program (procedure) is used.

【0009】演算1 STEP1:Aの最下位ビットが 1ならばSTEP5へ 0ならば次のSTEPへ STEP2:Bのゼロ判定をする STEP3:Bのゼロ判定フラグが 1ならばSTEP5へ 0ならば次のSTEPへ STEP4:Bの最上位ビットが 0ならばSTEP6へ 1ならばSTEP7へ STEP5:Bをレジスタに書き込みSTEP8へ STEP6:B+1をレジスタに書き込みSTEP8へ STEP7:B−1をレジスタに書き込み次のSTEP
へ STEP8:
Operation 1 STEP 1: If the least significant bit of A is 1, go to STEP 5 If it is 0, go to the next STEP STEP4: If the most significant bit of B is 0, go to STEP6. If 1, go to STEP7. STEP5: Write B to the register. STEP8. Write STEP6: B + 1 to the register. STEP8: Write STEP7: B-1 to the register. STEP
To STEP8:

【0010】図8(b)に示す演算2を図6の構成で実
行する場合には、次のようなプログラム(手順)が使用
される。
When the operation 2 shown in FIG. 8B is executed with the configuration shown in FIG. 6, the following program (procedure) is used.

【0011】演算2 STEP1:Aの最下位ビットが 1ならばSTEP5へ 0ならば次のSTEPへ STEP2:Bのゼロ判定をする STEP3:Bのゼロ判定フラグが 1ならばSTEP5へ 0ならば次のSTEPへ STEP4:Bの最上位ビットが 1ならばSTEP6へ 0ならばSTEP7へ STEP5:Bをレジスタに書き込みSTEP8へ STEP6:B+1をレジスタに書き込みSTEP8へ STEP7:B−1をレジスタに書き込み次のSTEP
へ STEP8:
Operation 2 STEP 1: If the least significant bit of A is 1, go to STEP 5 If 0, go to the next STEP STEP4: If the most significant bit of B is 1, go to STEP6. If 0, go to STEP7. STEP5: Write B to the register. STEP8. Write STEP6: B + 1 to the register. STEP8: Write STEP7: B-1 to the register. STEP
To STEP8:

【0012】上記2つのプログラムは、いずれも条件分
岐命令を含んでいる。
Each of the above two programs includes a conditional branch instruction.

【0013】[0013]

【発明が解決しようとする課題】画像データの処理には
高速性が要求される。信号処理プロセッサは、次々と入
力されてくる膨大な量のデータを各々短時間に処理する
ことが要求される。
The processing of image data requires high speed. The signal processor is required to process a huge amount of input data one after another in a short time.

【0014】ところが、上記従来の信号処理プロセッサ
は、マイクロプログラム方式を採用したものであったの
で、大きなプログラムエリアを必要とするだけでなく、
処理時間が長くなる問題があった。特に条件分岐命令の
実行は、処理遅延の1つの要因であった。具体的には、
上記の演算1、2とも、7STEPのプログラムエリア
と、最大5STEPの実行サイクルとが必要である。
However, the above-mentioned conventional signal processor employs a microprogram system, so that it not only requires a large program area,
There is a problem that the processing time becomes long. In particular, execution of a conditional branch instruction was one factor in processing delay. In particular,
Each of the above operations 1 and 2 requires a program area of 7 STEPs and an execution cycle of 5 STEPs at maximum.

【0015】本発明の目的は、データの量子化及び逆量
子化の処理に必要な条件分岐演算を高速に実行できる演
算装置を提供することにある。
An object of the present invention is to provide an arithmetic unit capable of executing a conditional branch operation required for data quantization and inverse quantization at high speed.

【0016】[0016]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係る演算装置は、データの量子化及び逆量
子化の処理において、第1の入力データBの正負0と、
第2の入力データAの偶奇とに応じて、第1の入力デー
タBに1を加算して出力する、第1の入力データBから
1を減算して出力する又は第1の入力データBをそのま
ま出力するという条件分岐演算を、単一の命令に基づい
て1サイクルで実行できるようにしたものである。
In order to achieve the above-mentioned object, an arithmetic unit according to the present invention, in a process of quantizing and dequantizing data, determines whether the first input data B is positive or negative 0,
Depending on whether the second input data A is even or odd, 1 is added to the first input data B and output, 1 is subtracted from the first input data B and output, or the first input data B is output. The conditional branch operation of outputting as it is can be executed in one cycle based on a single instruction.

【0017】具体的に説明すると、請求項1の発明は、
図1及び図2に示すように、次のような第1及び第2の
選択回路11,14と、加算器12と、0判定回路13
と、選択制御回路15とを備えた演算装置の構成を採用
したものである。すなわち、第1の選択回路11は、第
1の入力データBの最上位ビットを入力し、第1の制御
信号に従い、第1の入力データBの最上位ビットと該第
1の入力データBの最上位ビットの反転とのうちいずれ
かを選択して出力する。加算器12は、図2に示すよう
に、第1の入力データBと第1の選択回路11の出力と
を入力し、第1の入力データBの最下位ビットには1
を、該第1の入力データBの他の全てのビットには第1
の選択回路11の出力を各々加算して、その加算結果を
出力する。第2の選択回路14は、第1の入力データB
と加算器12の出力とを入力し、第2の制御信号に従
い、第1の入力データBと加算器12の出力とのうちい
ずれかを選択して当該演算装置の出力として出力する。
0判定回路13は、第1の入力データBを入力し、該第
1の入力データBが0であるかどうかを判定し、0であ
る場合にはフラグを立てる。選択制御回路15は、第2
の入力データAの最下位ビットと0判定回路13からの
フラグとを入力し、第2の入力データAの最下位ビット
が1であるか又は0判定回路13からのフラグが立てら
れている場合には第2の選択回路14が第1の入力デー
タBを選択し、それ以外の場合には第2の選択回路14
が加算器12の出力を選択するように、前記第2の制御
信号を第2の選択回路14へ供給するものである。
More specifically, the invention of claim 1 is
As shown in FIG. 1 and FIG. 2, the following first and second selection circuits 11 and 14, an adder 12, and a 0 determination circuit 13
And a selection control circuit 15. That is, the first selection circuit 11 inputs the most significant bit of the first input data B, and, according to the first control signal, the most significant bit of the first input data B and the most significant bit of the first input data B. One of the inversion of the most significant bit is selected and output. As shown in FIG. 2, the adder 12 receives the first input data B and the output of the first selection circuit 11, and the least significant bit of the first input data B is 1
For all other bits of the first input data B.
, And outputs the result of the addition. The second selection circuit 14 outputs the first input data B
And the output of the adder 12 are input, and one of the first input data B and the output of the adder 12 is selected and output as the output of the arithmetic unit in accordance with the second control signal.
The 0 determination circuit 13 receives the first input data B, determines whether the first input data B is 0, and sets a flag if the first input data B is 0. The selection control circuit 15
Input the least significant bit of the input data A and the flag from the 0 determination circuit 13 and the least significant bit of the second input data A is 1 or the flag from the 0 determination circuit 13 is set The second selection circuit 14 selects the first input data B. Otherwise, the second selection circuit 14
Supplies the second control signal to a second selection circuit 14 so that the output of the adder 12 is selected.

【0018】請求項2の発明は、図3に示すように、次
のような第1及び第2の選択回路31,34と、加算器
32と、0判定回路33と、選択制御回路35とを備え
た演算装置の構成を採用したものである。すなわち、第
1の選択回路31は、第1の入力データBの最上位ビッ
トを入力し、第1の制御信号に従い、第1の入力データ
Bの最上位ビットと該第1の入力データBの最上位ビッ
トの反転とのうちいずれかを選択して出力する。加算器
32は、定数データである−1と第1の入力データBと
第1の選択回路31の出力とを入力し、−1と第1の入
力データBとを加算し、更にその加算結果の最下位ビッ
トから最上位ビットの方向へ数えて2ビット目に第1の
選択回路31の出力を加算して、その加算結果を出力す
る。第2の選択回路34は、第1の入力データBと加算
器32の出力とを入力し、第2の制御信号に従い、第1
の入力データBと加算器32の出力とのうちいずれかを
選択して当該演算装置の出力として出力する。0判定回
路33は、第1の入力データBを入力し、該第1の入力
データBが0であるかどうかを判定し、0である場合に
はフラグを立てる。選択制御回路35は、第2の入力デ
ータAの最下位ビットと0判定回路33からのフラグと
を入力し、第2の入力データAの最下位ビットが1であ
るか又は0判定回路33からのフラグが立てられている
場合には第2の選択回路34が第1の入力データBを選
択し、それ以外の場合には第2の選択回路34が加算器
32の出力を選択するように、前記第2の制御信号を第
2の選択回路34へ供給するものである。
As shown in FIG. 3, the invention of claim 2 includes the following first and second selection circuits 31, 34, an adder 32, a 0 determination circuit 33, and a selection control circuit 35. Is adopted. That is, the first selection circuit 31 inputs the most significant bit of the first input data B, and in accordance with the first control signal, the most significant bit of the first input data B and the most significant bit of the first input data B. One of the inversion of the most significant bit is selected and output. The adder 32 receives the constant data of -1 and the first input data B and the output of the first selection circuit 31, adds -1 to the first input data B, and further adds the result. , The output of the first selection circuit 31 is added to the second bit counted from the least significant bit to the most significant bit, and the addition result is output. The second selection circuit 34 receives the first input data B and the output of the adder 32 and receives the first input data B and outputs the first
Of the input data B and the output of the adder 32 are selected and output as the output of the arithmetic unit. The 0 determination circuit 33 receives the first input data B, determines whether the first input data B is 0, and sets a flag if the first input data B is 0. The selection control circuit 35 inputs the least significant bit of the second input data A and the flag from the 0 determination circuit 33, and determines whether the least significant bit of the second input data A is 1 or Is set, the second selection circuit 34 selects the first input data B. Otherwise, the second selection circuit 34 selects the output of the adder 32. , And supplies the second control signal to the second selection circuit 34.

【0019】請求項3の発明は、図4に示すように、次
のような第1及び第2の選択回路41,45と、第1及
び第2の選択制御回路42,46と、加算器43と、0
判定回路44とを備えた演算装置の構成を採用したもの
である。すなわち、第1の選択回路41は、1と−1と
を第1及び第2の定数データとして入力し、第1の制御
信号に従い、前記第1及び第2の定数データのうちいず
れかを選択して出力する。第1の選択制御回路42は、
第1の入力データBの最上位ビットを入力し、該第1の
入力データBの最上位ビットが1であるか0であるかに
基づいて第1の定数データすなわち1又は第2の定数デ
ータすなわち−1を選択するように、前記第1の制御信
号を第1の選択回路41へ供給する。加算器43は、第
1の入力データBと第1の選択回路41の出力とを入力
し、該第1の入力データBと第1の選択回路41の出力
とを加算して、その加算結果を出力する。第2の選択回
路45は、第1の入力データBと加算器43の出力とを
入力し、第2の制御信号に従い、第1の入力データBと
加算器43の出力とのうちいずれかを選択して当該演算
装置の出力として出力する。0判定回路44は、第1の
入力データBを入力し、該第1の入力データBが0であ
るかどうかを判定し、0である場合にはフラグを立て
る。第2の選択制御回路46は、第2の入力データAの
最下位ビットと0判定回路44からのフラグとを入力
し、第2の入力データAの最下位ビットが1であるか又
は0判定回路44からのフラグが立てられている場合に
は第2の選択回路45が第1の入力データBを選択し、
それ以外の場合には第2の選択回路45が加算器43の
出力を選択するように、前記第2の制御信号を第2の選
択回路45へ供給するものである。
As shown in FIG. 4, the invention of claim 3 comprises the following first and second selection circuits 41 and 45, first and second selection control circuits 42 and 46, and an adder. 43 and 0
This employs the configuration of an arithmetic unit including the determination circuit 44. That is, the first selection circuit 41 inputs 1 and -1 as the first and second constant data, and selects one of the first and second constant data according to the first control signal. And output. The first selection control circuit 42
The most significant bit of the first input data B is input, and whether the most significant bit of the first input data B is 1 or 0
Based on the first constant data, ie, the first or second constant data.
The first control signal is supplied to the first selection circuit 41 so as to select the data , that is, −1 . The adder 43 receives the first input data B and the output of the first selection circuit 41, adds the first input data B and the output of the first selection circuit 41, and adds the addition result. Is output. The second selection circuit 45 receives the first input data B and the output of the adder 43 and inputs either the first input data B or the output of the adder 43 according to the second control signal. Select and output as the output of the arithmetic unit. The 0 determination circuit 44 receives the first input data B, determines whether the first input data B is 0, and sets a flag if the first input data B is 0. The second selection control circuit 46 inputs the least significant bit of the second input data A and the flag from the 0 determination circuit 44, and determines whether the least significant bit of the second input data A is 1 or 0. When the flag from the circuit 44 is set, the second selection circuit 45 selects the first input data B,
In other cases, the second control signal is supplied to the second selection circuit 45 so that the second selection circuit 45 selects the output of the adder 43.

【0020】請求項4の発明は、図5に示すように、次
のような加算器51と、減算器52と、0判定回路53
と、選択回路54と、選択制御回路55とを備えた演算
装置の構成を採用したものである。すなわち、加算器5
1は、第1の入力データBと定数データである1とを入
力し、該第1の入力データBと1とを加算して、その加
算結果を出力する。減算器52は、第1の入力データB
と定数データである1とを入力し、該第1の入力データ
Bから1を減算して、その減算結果を出力する。選択回
路54は、第1の入力データBと加算器51の出力と減
算器52の出力とを入力し、制御信号に従い、第1の入
力データBと加算器51の出力と減算器52の出力との
うちいずれか1つを選択して当該演算装置の出力として
出力する。0判定回路53は、第1の入力データBを入
力し、該第1の入力データBが0であるかどうかを判定
し、0である場合にはフラグを立てる。選択制御回路5
5は、第2の入力データAの最下位ビットと0判定回路
53からのフラグと第1の入力データBの最上位ビット
とを入力し、第2の入力データAの最下位ビットが1で
あるか又は0判定回路53からのフラグが立てられてい
る場合には選択回路54が第1の入力データBを選択
し、それ以外の場合には第1の入力データBの最上位ビ
ットが1であるか0であるかに応じて選択回路54が加
算器51の出力又は減算器52の出力を選択するよう
に、前記制御信号を選択回路54へ供給するものであ
る。
As shown in FIG. 5, the invention according to claim 4 comprises an adder 51, a subtractor 52, and a 0 determination circuit 53 as described below.
, A selection circuit 54, and a selection control circuit 55. That is, the adder 5
1 inputs the first input data B and 1 which is constant data, adds the first input data B and 1, and outputs the addition result. The subtractor 52 outputs the first input data B
And 1 as constant data, 1 is subtracted from the first input data B, and the result of the subtraction is output. The selection circuit 54 receives the first input data B, the output of the adder 51, and the output of the subtractor 52, and receives the first input data B, the output of the adder 51, and the output of the subtractor 52 according to the control signal. And outputs it as an output of the arithmetic unit. The 0 determination circuit 53 receives the first input data B, determines whether the first input data B is 0, and sets a flag if the first input data B is 0. Selection control circuit 5
5 inputs the least significant bit of the second input data A, the flag from the 0 determination circuit 53 and the most significant bit of the first input data B, and the least significant bit of the second input data A is 1 If the flag is present or if the flag from the 0 determination circuit 53 is set, the selection circuit 54 selects the first input data B. Otherwise, the most significant bit of the first input data B is 1 The control signal is supplied to the selection circuit 54 so that the selection circuit 54 selects the output of the adder 51 or the output of the subtractor 52 depending on whether the value is 0 or 0.

【0021】[0021]

【作用】請求項1の発明によれば、第1の選択回路11
への第1の制御信号により、図8(a)及び図8(b)
に示す演算1、2のうちいずれかが選択される。
According to the first aspect of the present invention, the first selection circuit 11
8 (a) and 8 (b) by the first control signal to
Either of the operations 1 and 2 shown in FIG.

【0022】請求項1の発明において、演算1が選択さ
れた場合には、第1の選択回路11から第1の入力デー
タBの最上位ビットがそのまま出力される。したがっ
て、第1の入力データBが正又は0ならば(第1の入力
データBの最上位ビットが0ならば)、加算器12は、
第1の入力データBの最下位ビットには1を、他の全て
のビットには0を各々加算して、その加算結果すなわち
B+1を出力する。また、第1の入力データBが負なら
ば(第1の入力データBの最上位ビットが1ならば)、
加算器12は、第1の入力データBの全てのビットに1
を加算して、その加算結果すなわちB−1を出力する。
第2の選択回路14は、第2の入力データAが奇数であ
るか又は第1の入力データBが0である場合には第1の
入力データBを(B=0ならば0を)選択し、それ以外
の場合には加算器12の出力すなわちB+1又はB−1
を選択する。
In the first aspect of the present invention, when the operation 1 is selected, the most significant bit of the first input data B is output from the first selection circuit 11 as it is. Therefore, if the first input data B is positive or 0 (if the most significant bit of the first input data B is 0), the adder 12
1 is added to the least significant bit of the first input data B, and 0 is added to all other bits, and the addition result, that is, B + 1 is output. If the first input data B is negative (if the most significant bit of the first input data B is 1),
The adder 12 adds 1 to all bits of the first input data B.
And outputs the addition result, that is, B-1.
The second selection circuit 14 selects the first input data B when the second input data A is an odd number or when the first input data B is 0 (0 when B = 0). Otherwise, the output of the adder 12, ie, B + 1 or B-1
Select

【0023】請求項1の発明において、演算2が選択さ
れた場合には、第1の選択回路11から第1の入力デー
タBの最上位ビットの反転が出力される。したがって、
第1の入力データBが正又は0ならば(第1の入力デー
タBの元の最上位ビットが0ならば)、加算器12は、
第1の入力データBの全てのビットに1を加算して、そ
の加算結果すなわちB−1を出力する。また、第1の入
力データBが負ならば(第1の入力データBの元の最上
位ビットが1ならば)、加算器12は、第1の入力デー
タBの最下位ビットには1を、他の全てのビットには0
を各々加算して、その加算結果すなわちB+1を出力す
る。第2の選択回路14は、第2の入力データAが奇数
であるか又は第1の入力データBが0である場合には第
1の入力データBを(B=0ならば0を)選択し、それ
以外の場合には加算器12の出力すなわちB−1又はB
+1を選択する。
In the first aspect of the present invention, when the operation 2 is selected, the first selection circuit 11 outputs the inverted most significant bit of the first input data B. Therefore,
If the first input data B is positive or 0 (if the original most significant bit of the first input data B is 0), the adder 12
1 is added to all the bits of the first input data B, and the addition result, that is, B-1 is output. If the first input data B is negative (if the original most significant bit of the first input data B is 1), the adder 12 sets 1 to the least significant bit of the first input data B. , 0 for all other bits
And outputs the result of the addition, that is, B + 1. The second selection circuit 14 selects the first input data B when the second input data A is an odd number or when the first input data B is 0 (0 when B = 0). Otherwise, the output of the adder 12, ie, B-1 or B
Select +1.

【0024】請求項2の発明によれば、第1の選択回路
31への第1の制御信号により、図8(a)及び図8
(b)に示す演算1、2のうちいずれかが選択される。
According to the second aspect of the present invention, the first control signal to the first selection circuit 31 is supplied to the first selection circuit 31 as shown in FIGS.
One of the operations 1 and 2 shown in (b) is selected.

【0025】請求項2の発明において、演算1が選択さ
れた場合には、第1の選択回路31から第1の入力デー
タBの最上位ビットの反転が出力される。したがって、
第1の入力データBが正又は0ならば(第1の入力デー
タBの元の最上位ビットが0ならば)、加算器32は、
第1の入力データBと−1と2とを加算して、その加算
結果すなわちB+1を出力する。また、第1の入力デー
タBが負ならば(第1の入力データBの元の最上位ビッ
トが1ならば)、加算器32は、第1の入力データBと
−1と0とを加算して、その加算結果すなわちB−1を
出力する。第2の選択回路34は、第2の入力データA
が奇数であるか又は第1の入力データBが0である場合
には第1の入力データBを(B=0ならば0を)選択
し、それ以外の場合には加算器32の出力すなわちB+
1又はB−1を選択する。
According to the second aspect of the present invention, when the operation 1 is selected, the first selection circuit 31 outputs the inverted most significant bit of the first input data B. Therefore,
If the first input data B is positive or 0 (if the original most significant bit of the first input data B is 0), the adder 32
The first input data B is added to -1 and 2, and the addition result, that is, B + 1 is output. If the first input data B is negative (if the original most significant bit of the first input data B is 1), the adder 32 adds the first input data B, -1 and 0. Then, the result of the addition, that is, B-1 is output. The second selection circuit 34 outputs the second input data A
Is odd or the first input data B is 0, the first input data B is selected (0 if B = 0), otherwise the output of the adder 32, B +
Select 1 or B-1.

【0026】請求項2の発明において、演算2が選択さ
れた場合には、第1の選択回路31から第1の入力デー
タBの最上位ビットがそのまま出力される。したがっ
て、第1の入力データBが正又は0ならば(第1の入力
データBの最上位ビットが0ならば)、加算器32は、
第1の入力データBと−1と0とを加算して、その加算
結果すなわちB−1を出力する。また、第1の入力デー
タBが負ならば(第1の入力データBの最上位ビットが
1ならば)、加算器32は、第1の入力データBと−1
と2とを加算して、その加算結果すなわちB+1を出力
する。第2の選択回路34は、第2の入力データAが奇
数であるか又は第1の入力データBが0である場合には
第1の入力データBを(B=0ならば0を)選択し、そ
れ以外の場合には加算器32の出力すなわちB−1又は
B+1を選択する。
In the second aspect of the present invention, when the operation 2 is selected, the most significant bit of the first input data B is output from the first selection circuit 31 as it is. Therefore, if the first input data B is positive or 0 (if the most significant bit of the first input data B is 0), the adder 32
The first input data B, -1 and 0 are added, and the addition result, that is, B-1 is output. If the first input data B is negative (if the most significant bit of the first input data B is 1), the adder 32 outputs the first input data B and -1.
And 2 are added, and the addition result, that is, B + 1 is output. When the second input data A is an odd number or the first input data B is 0, the second selection circuit 34 selects the first input data B (0 if B = 0). Otherwise, the output of the adder 32, that is, B-1 or B + 1 is selected.

【0027】請求項3の発明によれば、第1の選択制御
回路42は、図8(a)に示す演算1を実行する場合に
は、第1の入力データBが正又は0ならば1を、第1の
入力データBが負ならば−1を各々第1の選択回路41
が選択するように、該第1の選択回路41を制御する。
したがって、加算器43は、第1の入力データBが正又
は0ならばB+1を、第1の入力データBが負ならばB
−1を各々出力する。第2の選択回路45は、第2の入
力データAが奇数であるか又は第1の入力データBが0
である場合には第1の入力データBを(B=0ならば0
を)選択し、それ以外の場合には加算器43の出力すな
わちB+1又はB−1を選択する。
According to the third aspect of the invention, when the first selection control circuit 42 executes the operation 1 shown in FIG. 8A, the first selection control circuit 42 outputs 1 if the first input data B is positive or 0. And -1 if the first input data B is negative.
The first selection circuit 41 is controlled so that is selected.
Therefore, the adder 43 outputs B + 1 if the first input data B is positive or 0, and outputs B + 1 if the first input data B is negative.
-1 is output. The second selection circuit 45 determines whether the second input data A is an odd number or the first input data B is 0.
, The first input data B is set to (0 if B = 0).
) Is selected, otherwise, the output of the adder 43, that is, B + 1 or B-1 is selected.

【0028】請求項3の発明において、図8(b)に示
す演算2を実行する場合には、第1の選択制御回路42
は、第1の入力データBが正又は0ならば−1を、第1
の入力データBが負ならば1を各々第1の選択回路41
が選択するように、該第1の選択回路41を制御する。
したがって、加算器43は、第1の入力データBが正又
は0ならばB−1を、第1の入力データBが負ならばB
+1を各々出力する。第2の選択回路45は、第2の入
力データAが奇数であるか又は第1の入力データBが0
である場合には第1の入力データBを(B=0ならば0
を)選択し、それ以外の場合には加算器43の出力すな
わちB−1又はB+1を選択する。
According to the third aspect of the present invention, when the operation 2 shown in FIG.
Is -1 if the first input data B is positive or 0,
If the input data B is negative, 1 is assigned to the first selection circuit 41.
The first selection circuit 41 is controlled so that is selected.
Therefore, the adder 43 outputs B-1 if the first input data B is positive or 0, and outputs B-1 if the first input data B is negative.
+1 is output. The second selection circuit 45 determines whether the second input data A is an odd number or the first input data B is 0.
, The first input data B is set to (0 if B = 0).
) Is selected, otherwise, the output of the adder 43, that is, B-1 or B + 1 is selected.

【0029】請求項4の発明によれば、加算器51はB
+1を、減算器52はB−1を各々出力する。選択制御
回路55は、第2の入力データAが奇数であるか又は第
1の入力データBが0である場合には、選択回路54が
第1の入力データBを選択するように該選択回路54を
制御する。また、それ以外の場合には、図8(a)及び
図8(b)に示す演算1、2のうちいずれを実行するか
に応じて、また第1の入力データBの最上位ビットが1
であるか0であるかに応じて、加算器51の出力B+1
又は減算器52の出力B−1のうちいずれかを選択回路
54が選択するように該選択回路54を制御する。すな
わち、図8(a)に示す演算1を実行する場合には、第
1の入力データBの最上位ビットが0ならば(第1の入
力データBが正ならば)加算器51の出力B+1を、第
1の入力データBの最上位ビットが1ならば(第1の入
力データBが負ならば)減算器52の出力B−1を各々
選択回路54が選択するように、該選択回路54を制御
する。また、図8(b)に示す演算2を実行する場合に
は、第1の入力データBの最上位ビットが0ならば減算
器52の出力B−1を、第1の入力データBの最上位ビ
ットが1ならば加算器51の出力B+1を各々選択回路
54が選択するように、該選択回路54を制御する。
According to the invention of claim 4, the adder 51 outputs B
+1 and the subtractor 52 outputs B-1. When the second input data A is an odd number or the first input data B is 0, the selection control circuit 55 selects the first input data B so that the selection circuit 54 selects the first input data B. 54 is controlled. In other cases, the most significant bit of the first input data B is 1 depending on which of the operations 1 and 2 shown in FIGS. 8A and 8B is to be executed.
Or the output B + 1 of the adder 51 according to whether
Alternatively, the selection circuit 54 is controlled so that the selection circuit 54 selects one of the outputs B-1 of the subtractor 52. That is, when the operation 1 shown in FIG. 8A is executed, if the most significant bit of the first input data B is 0 (if the first input data B is positive), the output B + 1 of the adder 51 is obtained. The selection circuit 54 selects the output B-1 of the subtracter 52 if the most significant bit of the first input data B is 1 (if the first input data B is negative). 54 is controlled. When the operation 2 shown in FIG. 8B is performed, if the most significant bit of the first input data B is 0, the output B-1 of the subtractor 52 is changed to the most significant bit of the first input data B. If the upper bit is 1, the selection circuit 54 is controlled so that the output B + 1 of the adder 51 is selected by the selection circuit 54.

【0030】[0030]

【実施例】以下、図8(a)及び図8(b)に示す条件
分岐演算1、2を実行するための4つの演算装置を説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Four arithmetic units for executing conditional branch operations 1 and 2 shown in FIGS. 8A and 8B will be described below.

【0031】(実施例1)本発明の第1の実施例に係る
演算装置の構成を図1に、図1中の加算器の入力の詳細
を図2にそれぞれ示す。
(Embodiment 1) FIG. 1 shows a configuration of an arithmetic unit according to a first embodiment of the present invention, and FIG. 2 shows details of inputs of an adder in FIG.

【0032】図1及び図2において、11は定数データ
1又は−1の生成に用いられる第1の選択回路、12は
2入力の加算器、13は入力データBの0判定を行うた
めの0判定回路、14は入力データBと加算器12の出
力とのいずれかを選択するための第2の選択回路、15
は第2の選択回路14を制御するための選択制御回路で
ある。
In FIGS. 1 and 2, reference numeral 11 denotes a first selection circuit used to generate constant data 1 or -1, 12 denotes a 2-input adder, and 13 denotes a 0 for judging 0 of input data B. A decision circuit 14 for selecting one of the input data B and the output of the adder 12;
Is a selection control circuit for controlling the second selection circuit 14.

【0033】まず、図8(a)に示す演算1を実行する
場合の動作を説明する。
First, the operation for executing the operation 1 shown in FIG. 8A will be described.

【0034】第1の選択回路11は、制御線上の制御信
号に従い、入力データBの最上位ビットをそのまま出力
する。加算器12は、第1の入力データBと第1の選択
回路11の出力とを入力し、入力データBの最下位ビッ
トには1を、該入力データBの他の全てのビットには第
1の選択回路11の出力を各々加算する。つまり、入力
データBの最上位ビットが0ならば、すなわち入力デー
タBが正又は0ならば、加算器12は、入力データBの
最下位ビットには1を、他の全てのビットには0を各々
加算して、その加算結果すなわちB+1を出力する。ま
た、入力データBの最上位ビットが1ならば、すなわち
入力データBが負ならば、加算器12は、入力データB
の全てのビットに1を加算して、その加算結果すなわち
B−1を出力する。
The first selection circuit 11 outputs the most significant bit of the input data B as it is in accordance with the control signal on the control line. The adder 12 receives the first input data B and the output of the first selection circuit 11, and inputs 1 to the least significant bit of the input data B, and outputs the 1st to all the other bits of the input data B. The outputs of the selection circuits 11 are each added. That is, if the most significant bit of the input data B is 0, that is, if the input data B is positive or 0, the adder 12 sets 1 to the least significant bit of the input data B and 0 to all other bits. And outputs the result of the addition, that is, B + 1. If the most significant bit of the input data B is 1, that is, if the input data B is negative, the adder 12
, And 1 is added to all the bits, and the addition result, that is, B-1 is output.

【0035】一方、0判定回路13は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。このフラグは、入力データAの最下位ビットととも
に選択制御回路15に入力される。第2の選択回路14
は、選択制御回路15からの制御信号に従って、入力デ
ータAの最下位ビットが1であるか又は0判定回路13
からのフラグが1である場合、すなわち入力データAが
奇数であるか又は入力データBが0である場合には入力
データBを選択し、それ以外の場合には加算器12の出
力すなわちB+1又はB−1を選択する。
On the other hand, the 0 judgment circuit 13 judges 0 of the input data B, and outputs 1 as a flag when B = 0. This flag is input to the selection control circuit 15 together with the least significant bit of the input data A. Second selection circuit 14
According to the control signal from the selection control circuit 15, the least significant bit of the input data A is 1 or 0
Is selected, that is, if the input data A is odd or the input data B is 0, the input data B is selected. Otherwise, the output of the adder 12, that is, B + 1 or Select B-1.

【0036】以上の動作により、図1及び図2の演算装
置で図8(a)に示す演算1を実行できる。
By the above operation, the arithmetic unit shown in FIGS. 1 and 2 can execute the arithmetic operation 1 shown in FIG. 8A.

【0037】次に、図8(b)に示す演算2を実行する
場合の動作を説明する。
Next, the operation when the operation 2 shown in FIG. 8B is executed will be described.

【0038】第1の選択回路11は、制御線上の制御信
号に従い、入力データBの最上位ビットの反転を出力す
る。加算器12は、入力データBの最下位ビットには1
を、該入力データBの他の全てのビットには第1の選択
回路11の出力を各々加算する。つまり、入力データB
の最上位ビットの反転が1ならば、すなわち入力データ
Bが正又は0ならば、加算器12は、入力データBの全
てのビットに1を加算して、その加算結果すなわちB−
1を出力する。また、入力データBの最上位ビットの反
転が0ならば、すなわち入力データBが負ならば、加算
器12は、入力データBの最下位ビットには1を、他の
全てのビットには0を各々加算して、その加算結果すな
わちB+1を出力する。
The first selection circuit 11 outputs the inverted most significant bit of the input data B according to the control signal on the control line. The adder 12 adds 1 to the least significant bit of the input data B.
And the output of the first selection circuit 11 is added to all other bits of the input data B. That is, the input data B
If the inversion of the most significant bit is 1, that is, if the input data B is positive or 0, the adder 12 adds 1 to all the bits of the input data B, and the addition result, that is,
Outputs 1. If the inversion of the most significant bit of the input data B is 0, that is, if the input data B is negative, the adder 12 outputs 1 for the least significant bit of the input data B and 0 for all other bits. And outputs the result of the addition, that is, B + 1.

【0039】一方、0判定回路13は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。第2の選択回路14は、選択制御回路15からの制
御信号に従って、入力データAの最下位ビットが1であ
るか又は0判定回路13からのフラグが1である場合、
すなわち入力データAが奇数であるか又は入力データB
が0である場合には入力データBを選択し、それ以外の
場合には加算器12の出力すなわちB−1又はB+1を
選択する。
On the other hand, the 0 judgment circuit 13 judges 0 of the input data B, and outputs 1 as a flag when B = 0. According to the control signal from the selection control circuit 15, the second selection circuit 14 determines whether the least significant bit of the input data A is 1 or the flag from the 0 determination circuit 13 is 1.
That is, the input data A is odd or the input data B
Is 0, the input data B is selected. Otherwise, the output of the adder 12, that is, B-1 or B + 1 is selected.

【0040】以上の動作により、図1及び図2の演算装
置で図8(b)に示す演算2を実行できる。
With the above operation, the arithmetic unit shown in FIGS. 1 and 2 can execute the arithmetic operation 2 shown in FIG. 8B.

【0041】(実施例2)本発明の第2の実施例に係る
演算装置の構成を図3に示す。
(Embodiment 2) FIG. 3 shows the configuration of an arithmetic unit according to a second embodiment of the present invention.

【0042】図3において、31は定数データ2又は0
の生成に用いられる第1の選択回路、32は3入力の加
算器、33は入力データBの0判定を行うための0判定
回路、34は入力データBと加算器32の出力とのいず
れかを選択するための第2の選択回路、35は第2の選
択回路34を制御するための選択制御回路である。
In FIG. 3, 31 is constant data 2 or 0
, A reference numeral 32 denotes a 3-input adder, a reference numeral 33 denotes a 0 decision circuit for performing a 0 decision on the input data B, and a reference numeral 34 denotes one of the input data B and the output of the adder 32 And 35 is a selection control circuit for controlling the second selection circuit 34.

【0043】まず、図8(a)に示す演算1を実行する
場合の動作を説明する。
First, the operation when the operation 1 shown in FIG. 8A is executed will be described.

【0044】第1の選択回路31は、制御線上の制御信
号に従い、入力データBの最上位ビットの反転を出力す
る。加算器32は、−1と第1の入力データBと第1の
選択回路31の出力とを入力し、−1と入力データBと
を加算し、更にその加算結果の最下位ビットから数えて
2ビット目に第1の選択回路31の出力を加算する。つ
まり、入力データBの最上位ビットの反転が1ならば、
すなわち入力データBが正又は0ならば、加算器32
は、入力データBと−1と2とを加算して、その加算結
果すなわちB+1を出力する。また、入力データBの最
上位ビットの反転が0ならば、すなわち入力データBが
負ならば、加算器32は、入力データBと−1と0とを
加算して、その加算結果すなわちB−1を出力する。
The first selection circuit 31 outputs the inverted most significant bit of the input data B according to the control signal on the control line. The adder 32 receives −1, the first input data B, and the output of the first selection circuit 31, adds −1 to the input data B, and counts from the least significant bit of the addition result. The output of the first selection circuit 31 is added to the second bit. That is, if the inversion of the most significant bit of the input data B is 1,
That is, if the input data B is positive or 0, the adder 32
Adds the input data B, -1 and 2, and outputs the addition result, that is, B + 1. If the inversion of the most significant bit of the input data B is 0, that is, if the input data B is negative, the adder 32 adds the input data B and −1 to 0, and the addition result, that is, B− Outputs 1.

【0045】一方、0判定回路33は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。このフラグは、入力データAの最下位ビットととも
に選択制御回路35に入力される。第2の選択回路34
は、選択制御回路35からの制御信号に従って、入力デ
ータAの最下位ビットが1であるか又は0判定回路33
からのフラグが1である場合、すなわち入力データAが
奇数であるか又は入力データBが0である場合には入力
データBを選択し、それ以外の場合には加算器32の出
力すなわちB+1又はB−1を選択する。
On the other hand, the 0 judgment circuit 33 judges 0 of the input data B, and outputs 1 as a flag when B = 0. This flag is input to the selection control circuit 35 together with the least significant bit of the input data A. Second selection circuit 34
According to the control signal from the selection control circuit 35, the least significant bit of the input data A is 1 or 0
, The input data B is selected when the input data A is odd or the input data B is 0, otherwise, the output of the adder 32, that is, B + 1 or Select B-1.

【0046】以上の動作により、図3の演算装置で図8
(a)に示す演算1を実行することができる。
With the above operation, the arithmetic unit shown in FIG.
The operation 1 shown in FIG.

【0047】次に、図8(b)に示す演算2を実行する
場合の動作を説明する。
Next, the operation for executing the operation 2 shown in FIG. 8B will be described.

【0048】第1の選択回路31は、制御線上の制御信
号に従い、入力データBの最上位ビットをそのまま出力
する。加算器32は、定数−1と第1の入力データBと
第1の選択回路31の出力とを入力し、定数−1と入力
データBとを加算し、更にその加算結果の最下位ビット
から数えて2ビット目に第1の選択回路31の出力を加
算する。つまり、入力データBの最上位ビットが0なら
ば、すなわち入力データBが正又は0ならば、加算器3
2は、入力データBと−1と0とを加算して、その加算
結果すなわちB−1を出力する。また、入力データBの
最上位ビットが1ならば、すなわち入力データBが負な
らば、加算器32は、入力データBと−1と2とを加算
して、その加算結果すなわちB+1を出力する。
The first selection circuit 31 outputs the most significant bit of the input data B as it is in accordance with the control signal on the control line. The adder 32 receives the constant −1, the first input data B, and the output of the first selection circuit 31, adds the constant −1 to the input data B, and further calculates the least significant bit of the addition result. The output of the first selection circuit 31 is added to the counted second bit. That is, if the most significant bit of the input data B is 0, that is, if the input data B is positive or 0, the adder 3
2 adds the input data B, -1 and 0, and outputs the addition result, that is, B-1. If the most significant bit of the input data B is 1, that is, if the input data B is negative, the adder 32 adds the input data B, -1 and 2, and outputs the addition result, that is, B + 1. .

【0049】一方、0判定回路33は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。第2の選択回路34は、選択制御回路35からの制
御信号に従って、入力データAの最下位ビットが1であ
るか又は0判定回路33からのフラグが1である場合、
すなわち入力データAが奇数であるか又は入力データB
が0である場合には入力データBを選択し、それ以外の
場合には加算器32の出力すなわちB−1又はB+1を
選択する。
On the other hand, the 0 judgment circuit 33 judges 0 of the input data B, and outputs 1 as a flag when B = 0. According to the control signal from the selection control circuit 35, the second selection circuit 34 determines whether the least significant bit of the input data A is 1 or the flag from the 0 determination circuit 33 is 1.
That is, the input data A is odd or the input data B
Is 0, the input data B is selected. Otherwise, the output of the adder 32, that is, B-1 or B + 1 is selected.

【0050】以上の動作により、図3の演算装置で図8
(b)に示す演算2を実行することができる。
With the above operation, the arithmetic unit of FIG.
Operation 2 shown in (b) can be executed.

【0051】(実施例3)本発明の第3の実施例に係る
演算装置の構成を図4に示す。
(Embodiment 3) FIG. 4 shows the configuration of an arithmetic unit according to a third embodiment of the present invention.

【0052】図4において、41は定数1又は−1の選
択のための第1の選択回路、42は第1の選択回路41
を制御するための第1の選択制御回路、43は2入力の
加算器、44は入力データBの0判定を行うための0判
定回路、45は入力データBと加算器43の出力とのい
ずれかを選択するための第2の選択回路、46は第2の
選択回路45を制御するための第2の選択制御回路であ
る。
In FIG. 4, reference numeral 41 denotes a first selection circuit for selecting a constant 1 or -1, and reference numeral 42 denotes a first selection circuit 41.
, A reference numeral 43 denotes a two-input adder, a reference numeral 44 denotes a 0 decision circuit for performing a 0 decision on the input data B, and a reference numeral 45 denotes either the input data B or the output of the adder 43. A second selection circuit 46 for selecting the second selection circuit is a second selection control circuit for controlling the second selection circuit 45.

【0053】まず、図8(a)に示す演算1を実行する
場合の動作を説明する。
First, the operation for executing the operation 1 shown in FIG. 8A will be described.

【0054】第1の選択回路41は、第1の選択制御回
路42からの制御信号に従って、入力データBの最上位
ビットが0である場合すなわち入力データBが正又は0
である場合には1を、入力データBの最上位ビットが1
である場合すなわち入力データBが負である場合には−
1を各々出力する。加算器43は、入力データBと第1
の選択回路41の出力とを加算する。したがって、加算
器43は、入力データBが正又は0ならばB+1を、負
ならばB−1を各々出力する。
The first selection circuit 41 responds to a control signal from the first selection control circuit 42 when the most significant bit of the input data B is 0, that is, when the input data B is positive or 0.
, The most significant bit of the input data B is 1
, That is, if the input data B is negative,
1 is output. The adder 43 has the input data B and the first data.
And the output of the selection circuit 41 is added. Therefore, the adder 43 outputs B + 1 if the input data B is positive or 0, and outputs B-1 if the input data B is negative.

【0055】一方、0判定回路44は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。このフラグは、入力データAの最下位ビットととも
に第2の選択制御回路46に入力される。第2の選択回
路45は、第2の選択制御回路46からの制御信号に従
って、入力データAの最下位ビットが1であるか又は0
判定回路44からのフラグが1である場合、すなわち入
力データAが奇数であるか又は入力データBが0である
場合には入力データBを選択し、それ以外の場合には加
算器43の出力すなわちB+1又はB−1を選択する。
On the other hand, the 0 judgment circuit 44 judges 0 of the input data B, and outputs 1 as a flag when B = 0. This flag is input to the second selection control circuit 46 together with the least significant bit of the input data A. The second selection circuit 45 determines whether the least significant bit of the input data A is 1 or 0 according to a control signal from the second selection control circuit 46.
When the flag from the determination circuit 44 is 1, that is, when the input data A is odd or the input data B is 0, the input data B is selected. Otherwise, the output of the adder 43 is selected. That is, B + 1 or B-1 is selected.

【0056】以上の動作により、図4の演算装置で図8
(a)に示す演算1を実行することができる。
By the above operation, the arithmetic unit of FIG.
The operation 1 shown in FIG.

【0057】次に、図8(b)に示す演算2を実行する
場合の動作を説明する。
Next, the operation when the operation 2 shown in FIG. 8B is executed will be described.

【0058】第1の選択回路41は、第1の選択制御回
路42からの制御信号に従って、入力データBの最上位
ビットが0である場合すなわち入力データBが正又は0
である場合には−1を、入力データBの最上位ビットが
1である場合すなわち入力データBが負である場合には
1を各々出力する。加算器43は、入力データBと第1
の選択回路41の出力とを加算する。したがって、加算
器43は、入力データBが正又は0ならばB−1を、負
ならばB+1を各々出力する。
The first selection circuit 41 responds to a control signal from the first selection control circuit 42 when the most significant bit of the input data B is 0, that is, when the input data B is positive or 0.
, And outputs -1 when the most significant bit of the input data B is 1, that is, when the input data B is negative. The adder 43 has the input data B and the first data.
And the output of the selection circuit 41 is added. Therefore, the adder 43 outputs B-1 if the input data B is positive or 0, and outputs B + 1 if the input data B is negative.

【0059】一方、0判定回路44は、入力データBの
0判定を行い、B=0のとき1をフラグとして出力す
る。第2の選択回路45は、第2の選択制御回路46か
らの制御信号に従って、入力データAの最下位ビットが
1であるか又は0判定回路44からのフラグが1である
場合、すなわち入力データAが奇数であるか又は入力デ
ータBが0である場合には入力データBを選択し、それ
以外の場合には加算器43の出力すなわちB−1又はB
+1を選択する。
On the other hand, the 0 judgment circuit 44 judges 0 of the input data B, and outputs 1 as a flag when B = 0. According to the control signal from the second selection control circuit 46, the second selection circuit 45 determines whether the least significant bit of the input data A is 1 or the flag from the 0 determination circuit 44 is 1, If A is odd or input data B is 0, input data B is selected; otherwise, output of adder 43, ie, B-1 or B
Select +1.

【0060】以上の動作により、図4の演算装置で図8
(b)に示す演算2を実行することができる。
With the above operation, the arithmetic unit of FIG.
Operation 2 shown in (b) can be executed.

【0061】(実施例4)本発明の第4の実施例に係る
演算装置の構成を図5に示す。
(Embodiment 4) FIG. 5 shows the configuration of an arithmetic unit according to a fourth embodiment of the present invention.

【0062】図5において、51は入力データBに1を
加算するための加算器、52は入力データBから1を減
算するための減算器、53は入力データBの0判定を行
うための0判定回路、54は入力データBと加算器51
の出力と減算器52の出力とのいずれか1つを選択する
ための選択回路、55は選択回路54を制御するための
選択制御回路である。
In FIG. 5, reference numeral 51 denotes an adder for adding 1 to the input data B, 52 denotes a subtractor for subtracting 1 from the input data B, and 53 denotes 0 for determining 0 of the input data B. The judgment circuit 54 is composed of the input data B and the adder 51
Is a selection circuit for selecting one of the output of the subtractor 52 and the output of the subtracter 52, and 55 is a selection control circuit for controlling the selection circuit 54.

【0063】まず、図8(a)に示す演算1を実行する
場合の動作を説明する。
First, the operation when the operation 1 shown in FIG. 8A is executed will be described.

【0064】加算器51はB+1を、減算器52はB−
1を各々出力する。一方、0判定回路53は、入力デー
タBの0判定を行い、B=0のとき1をフラグとして出
力する。このフラグは、入力データAの最下位ビットと
ともに選択制御回路55に入力される。
The adder 51 calculates B + 1, and the subtractor 52 calculates B-
1 is output. On the other hand, the 0 judgment circuit 53 judges 0 of the input data B, and outputs 1 as a flag when B = 0. This flag is input to the selection control circuit 55 together with the least significant bit of the input data A.

【0065】選択制御回路55は、入力データAの最下
位ビットが1であるか又は0判定回路53からのフラグ
が1である場合、すなわち入力データAが奇数であるか
又は入力データBが0である場合には、選択回路54が
入力データBを選択するように該選択回路54を制御す
る。また、入力データAの最下位ビットが0でありかつ
0判定回路53からのフラグが0である場合、すなわち
入力データAが偶数でありかつ入力データBが0でない
場合には、入力データBの最上位ビットが0ならば(入
力データBが正ならば)加算器51の出力B+1を、入
力データBの最上位ビットが1ならば(入力データBが
負ならば)減算器52の出力B−1をそれぞれ選択回路
54に選択させる。
The selection control circuit 55 determines whether the least significant bit of the input data A is 1 or the flag from the 0 determination circuit 53 is 1, that is, whether the input data A is odd or the input data B is 0. In the case of, the selection circuit controls the selection circuit so that the input data B is selected. When the least significant bit of the input data A is 0 and the flag from the 0 determination circuit 53 is 0, that is, when the input data A is even and the input data B is not 0, the input data B If the most significant bit is 0 (if the input data B is positive), the output B + 1 of the adder 51 is used. If the most significant bit of the input data B is 1 (if the input data B is negative), the output B + −1 is selected by the selection circuit 54.

【0066】以上の動作により、図5の演算装置で図8
(a)に示す演算1を実行することができる。
By the above operation, the arithmetic unit of FIG.
The operation 1 shown in FIG.

【0067】次に、図8(b)に示す演算2を実行する
場合の動作を説明する。
Next, the operation when the operation 2 shown in FIG. 8B is executed will be described.

【0068】加算器51はB+1を、減算器52はB−
1を各々出力する。一方、0判定回路53は、入力デー
タBの0判定を行い、B=0のとき1をフラグとして出
力する。
The adder 51 calculates B + 1 and the subtractor 52 calculates B−
1 is output. On the other hand, the 0 judgment circuit 53 judges 0 of the input data B, and outputs 1 as a flag when B = 0.

【0069】選択制御回路55は、入力データAの最下
位ビットが1であるか又は0判定回路53からのフラグ
が1である場合、すなわち入力データAが奇数であるか
又は入力データBが0である場合には、入力データBを
選択するように選択回路54を制御する。また、入力デ
ータAの最下位ビットが0でありかつ0判定回路53か
らのフラグが0である場合、すなわち入力データAが偶
数でありかつ入力データBが0でない場合には、入力デ
ータBの最上位ビットが0ならば(入力データBが正な
らば)減算器52の出力B−1を、入力データBの最上
位ビットが1ならば(入力データBが負ならば)加算器
51の出力B+1をそれぞれ選択回路54に選択させ
る。
The selection control circuit 55 determines whether the least significant bit of the input data A is 1 or the flag from the 0 determination circuit 53 is 1, that is, whether the input data A is odd or the input data B is 0. If, the selection circuit 54 is controlled so as to select the input data B. When the least significant bit of the input data A is 0 and the flag from the 0 determination circuit 53 is 0, that is, when the input data A is even and the input data B is not 0, the input data B If the most significant bit is 0 (if the input data B is positive), the output B-1 of the subtractor 52 is used. If the most significant bit of the input data B is 1 (if the input data B is negative), the output B-1 is used. The selection circuit 54 selects the output B + 1.

【0070】以上の動作により、図5の演算装置で図8
(b)に示す演算2を実行することができる。
With the above operation, the arithmetic unit of FIG.
Operation 2 shown in (b) can be executed.

【0071】なお、上記各実施例においては入力データ
Bが0の場合に0判定回路13,33,44,53がフ
ラグを1に設定するものとしたが、入力データBが0の
場合にフラグを0に設定するようにしてもよい。
In each of the above embodiments, when the input data B is 0, the 0 decision circuits 13, 33, 44, and 53 set the flag to 1. However, when the input data B is 0, the flag is set to 1. May be set to 0.

【0072】[0072]

【発明の効果】以上説明してきたとおり、本発明によれ
ば、第1の入力データBの正負0と、第2の入力データ
Aの偶奇とに応じて、第1の入力データBに1を加算し
て出力する、第1の入力データBから1を減算して出力
する又は第1の入力データBをそのまま出力するという
条件分岐演算を単一の命令に基づいて1サイクルで実行
できるハードウェア構成を採用したので、データの量子
化及び逆量子化の処理に必要な条件分岐演算を高速に実
行できる演算装置を実現できる。また、条件分岐命令を
用いる場合に比べて、プログラムの格納エリアを縮小で
きる。
As described above, according to the present invention, 1 is input to the first input data B in accordance with the positive / negative 0 of the first input data B and the odd / odd of the second input data A. Hardware that can execute a conditional branch operation of adding and outputting, subtracting 1 from first input data B and outputting, or outputting first input data B as it is in one cycle based on a single instruction Since the configuration is employed, it is possible to realize an arithmetic device capable of executing a conditional branch operation required for data quantization and inverse quantization at high speed. Further, the storage area of the program can be reduced as compared with the case where the conditional branch instruction is used.

【0073】特に、請求項1の発明によれば、2入力加
算器が1個で済むので、ハードウェア規模を縮小でき
る。
In particular, according to the first aspect of the present invention, since only one two-input adder is required, the hardware scale can be reduced.

【0074】また、請求項4の発明によれば、最終段に
のみ選択回路を備えた回路構成を採用したので、内部処
理の完全並列化が図られる結果、演算が高速化される。
According to the fourth aspect of the present invention, since a circuit configuration having a selection circuit only in the last stage is employed, the internal processing is completely parallelized, so that the operation is speeded up.

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

【図1】本発明の第1の実施例に係る演算装置の構成を
示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an arithmetic device according to a first embodiment of the present invention.

【図2】図1中の加算器の入力の詳細を示すブロック図
である。
FIG. 2 is a block diagram showing details of an input of an adder in FIG. 1;

【図3】本発明の第2の実施例に係る演算装置の構成を
示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of an arithmetic device according to a second embodiment of the present invention.

【図4】本発明の第3の実施例に係る演算装置の構成を
示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of an arithmetic unit according to a third embodiment of the present invention.

【図5】本発明の第4の実施例に係る演算装置の構成を
示すブロック図である。
FIG. 5 is a block diagram illustrating a configuration of an arithmetic unit according to a fourth embodiment of the present invention.

【図6】従来の信号処理プロセッサの算術論理演算部の
基本構成を示すブロック図である。
FIG. 6 is a block diagram showing a basic configuration of an arithmetic and logic unit of a conventional signal processor.

【図7】図6の算術論理演算部の構成による画像データ
の復号化処理の内容を示すデータフロー図である。
FIG. 7 is a data flow diagram showing the contents of a decoding process of image data by the configuration of the arithmetic and logic unit in FIG. 6;

【図8】(a)及び(b)は、図7中のミスマッチ制御
部において実行される条件分岐演算の内容を示す図であ
る。
FIGS. 8A and 8B are diagrams showing contents of a conditional branch operation executed in a mismatch control unit in FIG. 7;

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

11,14 選択回路 12 加算器 13 0判定回路 15 選択制御回路 31,34 選択回路 32 加算器 33 0判定回路 35 選択制御回路 41,45 選択回路 42,46 選択制御回路 43 加算器 44 0判定回路 51 加算器 52 減算器 53 0判定回路 54 選択回路 55 選択制御回路 11, 14 selection circuit 12 adder 13 0 determination circuit 15 selection control circuit 31, 34 selection circuit 32 adder 33 0 determination circuit 35 selection control circuit 41, 45 selection circuit 42, 46 selection control circuit 43 adder 44 0 determination circuit 51 adder 52 subtractor 53 0 decision circuit 54 selection circuit 55 selection control circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI H03M 7/30 G06F 15/31 D H04N 7/24 15/66 330A H04N 7/13 Z (72)発明者 荒木 敏之 大阪府門真市大字門真1006番地 松下電 器産業株式会社内 (56)参考文献 特開 平2−249025(JP,A) 特開 平4−84317(JP,A) 荒木敏之他、「動画コーデック用ベク トルDSP」、電子情報通信学会技術研 究報告、VOL.92、NO.73、PP. 9〜16(1992)(ICD92−9) (58)調査した分野(Int.Cl.6,DB名) G06F 9/302 G06F 9/318 G06F 7/00 G06F 7/50 G06F 17/10 G06T 1/20 G06T 9/00 H03M 7/30 H04N 7/24 H04N 11/04────────────────────────────────────────────────── ─── Continued on the front page (51) Int.Cl. 6 Identification symbol FI H03M 7/30 G06F 15/31 D H04N 7/24 15/66 330A H04N 7/13 Z (72) Inventor Toshiyuki Araki Kadoma, Osaka 1006 Kadoma, Ichidai, Matsushita Electric Industrial Co., Ltd. (56) References JP-A-2-249025 (JP, A) JP-A-4-84317 (JP, A) Toshiyuki Araki, et al. ", IEICE Technical Report, VOL. 92, NO. 73, PP. 9-16 (1992) (ICD92-9) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 9/302 G06F 9/318 G06F 7/00 G06F 7/50 G06F 17 / 10 G06T 1/20 G06T 9/00 H03M 7/30 H04N 7/24 H04N 11/04

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 データの量子化及び逆量子化の処理にお
いて、第1の入力データの正負0と、第2の入力データ
の偶奇とに応じて、前記第1の入力データに1を加算し
て出力する、前記第1の入力データから1を減算して出
力する又は前記第1の入力データをそのまま出力すると
いう条件分岐演算を実行するための演算装置であって、 前記第1の入力データの最上位ビットを入力し、第1の
制御信号に従い、前記第1の入力データの最上位ビット
と該第1の入力データの最上位ビットの反転とのうちい
ずれかを選択して出力するための第1の選択回路と、 前記第1の入力データと前記第1の選択回路の出力とを
入力し、前記第1の入力データの最下位ビットには1
を、該第1の入力データの他の全てのビットには前記第
1の選択回路の出力を各々加算して、その加算結果を出
力するための加算器と、 前記第1の入力データと前記加算器の出力とを入力し、
第2の制御信号に従い、前記第1の入力データと前記加
算器の出力とのうちいずれかを選択して前記演算装置の
出力として出力するための第2の選択回路と、 前記第1の入力データを入力し、該第1の入力データが
0であるかどうかを判定し、0である場合にはフラグを
立てるための0判定回路と、 前記第2の入力データの最下位ビットと前記0判定回路
からのフラグとを入力し、前記第2の入力データの最下
位ビットが1であるか又は前記0判定回路からのフラグ
が立てられている場合には前記第2の選択回路が前記第
1の入力データを選択し、それ以外の場合には前記第2
の選択回路が前記加算器の出力を選択するように、前記
第2の制御信号を前記第2の選択回路へ供給するための
選択制御回路とを備えたことを特徴とする演算装置。
1. In data quantization and dequantization processing, 1 is added to the first input data in accordance with positive / negative 0 of the first input data and even / odd of the second input data. An arithmetic device for performing a conditional branching operation of outputting by subtracting 1 from the first input data or outputting the first input data as it is, wherein the first input data To select and output one of the most significant bit of the first input data and the inversion of the most significant bit of the first input data in accordance with a first control signal. A first selection circuit, and the first input data and the output of the first selection circuit, and the least significant bit of the first input data is 1
An adder for adding the output of the first selection circuit to all other bits of the first input data, and outputting the addition result; and And the output of the adder,
A second selection circuit for selecting one of the first input data and the output of the adder according to a second control signal and outputting the selected data as an output of the arithmetic device; Inputting data, determining whether the first input data is 0, and if 0, a 0 determination circuit for setting a flag; and a least significant bit of the second input data and the 0 A flag from the determination circuit, and when the least significant bit of the second input data is 1 or the flag from the 0 determination circuit is set, the second selection circuit Select the first input data, otherwise select the second
And a selection control circuit for supplying the second control signal to the second selection circuit so that the selection circuit selects the output of the adder.
【請求項2】 データの量子化及び逆量子化の処理にお
いて、第1の入力データの正負0と、第2の入力データ
の偶奇とに応じて、前記第1の入力データに1を加算し
て出力する、前記第1の入力データから1を減算して出
力する又は前記第1の入力データをそのまま出力すると
いう条件分岐演算を実行するための演算装置であって、 前記第1の入力データの最上位ビットを入力し、第1の
制御信号に従い、前記第1の入力データの最上位ビット
と該第1の入力データの最上位ビットの反転とのうちい
ずれかを選択して出力するための第1の選択回路と、 定数データである−1と前記第1の入力データと前記第
1の選択回路の出力とを入力し、前記定数データと前記
第1の入力データとを加算し、更にその加算結果の最下
位ビットから最上位ビットの方向へ数えて2ビット目に
前記第1の選択回路の出力を加算して、その加算結果を
出力するための加算器と、 前記第1の入力データと前記加算器の出力とを入力し、
第2の制御信号に従い、前記第1の入力データと前記加
算器の出力とのうちいずれかを選択して前記演算装置の
出力として出力するための第2の選択回路と、 前記第1の入力データを入力し、該第1の入力データが
0であるかどうかを判定し、0である場合にはフラグを
立てるための0判定回路と、 前記第2の入力データの最下位ビットと前記0判定回路
からのフラグとを入力し、前記第2の入力データの最下
位ビットが1であるか又は前記0判定回路からのフラグ
が立てられている場合には前記第2の選択回路が前記第
1の入力データを選択し、それ以外の場合には前記第2
の選択回路が前記加算器の出力を選択するように、前記
第2の制御信号を前記第2の選択回路へ供給するための
選択制御回路とを備えたことを特徴とする演算装置。
2. In data quantization and dequantization processing, 1 is added to the first input data in accordance with positive / negative 0 of the first input data and even / odd of the second input data. An arithmetic device for performing a conditional branching operation of outputting by subtracting 1 from the first input data or outputting the first input data as it is, wherein the first input data To select and output one of the most significant bit of the first input data and the inversion of the most significant bit of the first input data in accordance with a first control signal. A first selection circuit, and -1 which is constant data, the first input data, and the output of the first selection circuit are input, and the constant data and the first input data are added. Furthermore, the least significant bit to the most significant bit of the addition result An adder for adding the output of the first selection circuit to the second bit counting in the direction of the bit, and outputting the addition result; and the first input data and the output of the adder. type in,
A second selection circuit for selecting one of the first input data and the output of the adder according to a second control signal and outputting the selected data as an output of the arithmetic device; Inputting data, determining whether the first input data is 0, and if 0, a 0 determination circuit for setting a flag; and a least significant bit of the second input data and the 0 A flag from the determination circuit, and when the least significant bit of the second input data is 1 or the flag from the 0 determination circuit is set, the second selection circuit Select the first input data, otherwise select the second
And a selection control circuit for supplying the second control signal to the second selection circuit so that the selection circuit selects the output of the adder.
【請求項3】 データの量子化及び逆量子化の処理にお
いて、第1の入力データの正負0と、第2の入力データ
の偶奇とに応じて、前記第1の入力データに1を加算し
て出力する、前記第1の入力データから1を減算して出
力する又は前記第1の入力データをそのまま出力すると
いう条件分岐演算を実行するための演算装置であって、 1と−1とを各々第1及び第2の定数データとして入力
し、第1の制御信号に従い、前記第1及び第2の定数デ
ータのうちいずれかを選択して出力するための第1の選
択回路と、 前記第1の入力データの最上位ビットを入力し、該第1
の入力データの最上位ビットが1であるか0であるかに
基づいて前記第1の定数データ又は前記第2の定数デー
タを選択するように、前記第1の制御信号を前記第1の
選択回路へ供給するための第1の選択制御回路と、 前記第1の入力データと前記第1の選択回路の出力とを
入力し、該第1の入力データと該第1の選択回路の出力
とを加算して、その加算結果を出力するための加算器
と、 前記第1の入力データと前記加算器の出力とを入力し、
第2の制御信号に従い、前記第1の入力データと前記加
算器の出力とのうちいずれかを選択して前記演算装置の
出力として出力するための第2の選択回路と、 前記第1の入力データを入力し、該第1の入力データが
0であるかどうかを判定し、0である場合にはフラグを
立てるための0判定回路と、 前記第2の入力データの最下位ビットと前記0判定回路
からのフラグとを入力し、前記第2の入力データの最下
位ビットが1であるか又は前記0判定回路からのフラグ
が立てられている場合には前記第2の選択回路が前記第
1の入力データを選択し、それ以外の場合には前記第2
の選択回路が前記加算器の出力を選択するように、前記
第2の制御信号を前記第2の選択回路へ供給するための
第2の選択制御回路とを備えたことを特徴とする演算装
置。
3. In the data quantization and dequantization processing, 1 is added to the first input data in accordance with positive / negative 0 of the first input data and even / odd of the second input data. An arithmetic device for performing a conditional branch operation of subtracting 1 from the first input data and outputting the same, or outputting the first input data as it is, wherein 1 and -1 are A first selection circuit for inputting as first and second constant data, respectively, and selecting and outputting one of the first and second constant data according to a first control signal; Input the most significant bit of the input data of the first
Whether the most significant bit of the input data is 1 or 0
The first constant data or the second constant data based on
A first selection control circuit for supplying the first control signal to the first selection circuit so as to select the first input data and the first input data and an output of the first selection circuit. An adder for inputting, adding the first input data and the output of the first selection circuit, and outputting the addition result; and the first input data and the output of the adder. type in,
A second selection circuit for selecting one of the first input data and the output of the adder according to a second control signal and outputting the selected data as an output of the arithmetic device; Inputting data, determining whether the first input data is 0, and if 0, a 0 determination circuit for setting a flag; and a least significant bit of the second input data and the 0 A flag from the determination circuit, and when the least significant bit of the second input data is 1 or the flag from the 0 determination circuit is set, the second selection circuit Select the first input data, otherwise select the second
And a second selection control circuit for supplying the second control signal to the second selection circuit such that the selection circuit selects the output of the adder. .
【請求項4】 データの量子化及び逆量子化の処理にお
いて、第1の入力データの正負0と、第2の入力データ
の偶奇とに応じて、前記第1の入力データに1を加算し
て出力する、前記第1の入力データから1を減算して出
力する又は前記第1の入力データをそのまま出力すると
いう条件分岐演算を実行するための演算装置であって、 前記第1の入力データと定数データである1とを入力
し、該第1の入力データと該定数データとを加算して、
その加算結果を出力するための加算器と、 前記第1の入力データと定数データであるとを入力
し、該第1の入力データから該定数データを減算して、
その減算結果を出力するための減算器と、 前記第1の入力データと前記加算器及び減算器の出力と
を入力し、制御信号に従い、前記第1の入力データと前
記加算器の出力と前記減算器の出力とのうちいずれか1
つを選択して前記演算装置の出力として出力するための
選択回路と、 前記第1の入力データを入力し、該第1の入力データが
0であるかどうかを判定し、0である場合にはフラグを
立てるための0判定回路と、 前記第2の入力データの最下位ビットと前記0判定回路
からのフラグと前記第1の入力データの最上位ビットと
を入力し、前記第2の入力データの最下位ビットが1で
あるか又は前記0判定回路からのフラグが立てられてい
る場合には前記選択回路が前記第1の入力データを選択
し、それ以外の場合には前記第1の入力データの最上位
ビットが1であるか0であるかに応じて前記選択回路が
前記加算器の出力又は前記減算器の出力を選択するよう
に、前記制御信号を前記選択回路へ供給するための選択
制御回路とを備えたことを特徴とする演算装置。
4. In the data quantization and dequantization processing, 1 is added to the first input data in accordance with positive / negative 0 of the first input data and even / odd of the second input data. An arithmetic device for performing a conditional branching operation of outputting by subtracting 1 from the first input data or outputting the first input data as it is, wherein the first input data And 1 which is constant data, and the first input data and the constant data are added.
An adder for outputting a result of the addition; inputting the first input data and 1 which is constant data; subtracting the constant data from the first input data;
A subtractor for outputting a result of the subtraction, inputting the first input data and outputs of the adder and the subtractor, and inputting the first input data, the output of the adder, Any one of the outputs of the subtractor
A selection circuit for selecting one and outputting it as an output of the arithmetic device; and inputting the first input data; determining whether the first input data is 0; Inputs a 0 decision circuit for setting a flag, a least significant bit of the second input data, a flag from the 0 decision circuit, and a most significant bit of the first input data; The selection circuit selects the first input data when the least significant bit of the data is 1 or the flag from the 0 determination circuit is set; otherwise, the first input data is selected. Supplying the control signal to the selection circuit such that the selection circuit selects the output of the adder or the output of the subtractor depending on whether the most significant bit of the input data is 1 or 0. And a selection control circuit of A computing device.
JP7559294A 1993-06-01 1994-04-14 Arithmetic unit Expired - Fee Related JP2807170B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP7559294A JP2807170B2 (en) 1993-06-01 1994-04-14 Arithmetic unit
US08/251,311 US5432726A (en) 1993-06-01 1994-05-31 Arithmetic unit for quantization/inverse quantigation

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP13034293 1993-06-01
JP5-130342 1993-06-01
JP7559294A JP2807170B2 (en) 1993-06-01 1994-04-14 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPH0749778A JPH0749778A (en) 1995-02-21
JP2807170B2 true JP2807170B2 (en) 1998-10-08

Family

ID=26416738

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7559294A Expired - Fee Related JP2807170B2 (en) 1993-06-01 1994-04-14 Arithmetic unit

Country Status (2)

Country Link
US (1) US5432726A (en)
JP (1) JP2807170B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3323312B2 (en) * 1993-12-28 2002-09-09 株式会社アドバンテスト Accelerated test pattern generator
JP3102843B2 (en) 1995-12-08 2000-10-23 シャープ株式会社 Image recording device
JPH1091397A (en) * 1996-09-12 1998-04-10 Toshiba Corp Arithmetic circuit
JP7137067B2 (en) * 2018-10-25 2022-09-14 富士通株式会社 Arithmetic processing device, learning program and learning method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NL169535C (en) * 1974-11-14 1982-07-16 Philips Nv DIGITAL SIGNAL PROCESSING DEVICE WITH CONTROLLED QUANTIZATION.
US4569052A (en) * 1983-07-14 1986-02-04 Sperry Corporation Coset code generator for computer memory protection
JPS62220028A (en) * 1986-03-20 1987-09-28 Fujitsu Ltd Logic circuit
US5054103A (en) * 1987-09-24 1991-10-01 Matsushita Electric Works, Ltd. Picture encoding system
JPH0371329A (en) * 1989-08-11 1991-03-27 Fujitsu Ltd Arithmetic control circuit for arithmetic and logicical operation processor
JPH04180125A (en) * 1990-11-15 1992-06-26 Fujitsu Ltd Adder
JPH04246722A (en) * 1991-01-31 1992-09-02 Nec Corp Adder/subtracter
JPH04245534A (en) * 1991-01-31 1992-09-02 Fujitsu Ltd Adder/subtractor
US5349545A (en) * 1992-11-24 1994-09-20 Intel Corporation Arithmetic logic unit dequantization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
荒木敏之他、「動画コーデック用ベクトルDSP」、電子情報通信学会技術研究報告、VOL.92、NO.73、PP.9〜16(1992)(ICD92−9)

Also Published As

Publication number Publication date
JPH0749778A (en) 1995-02-21
US5432726A (en) 1995-07-11

Similar Documents

Publication Publication Date Title
JP3790619B2 (en) Processor capable of suitably performing rounding processing including positive value processing and saturation calculation processing
US4578750A (en) Code determination using half-adder based operand comparator
US5862065A (en) Method and circuit for fast generation of zero flag condition code in a microprocessor-based computer
US5633897A (en) Digital signal processor optimized for decoding a signal encoded in accordance with a Viterbi algorithm
JPH05216624A (en) Arithmetic unit
JPH0850545A (en) Digital processor with minimum/maximum retrieval instruction
JP2807170B2 (en) Arithmetic unit
US5179629A (en) Device for computing membership functions in fuzzy computers
US6202078B1 (en) Arithmetic circuit using a booth algorithm
WO1992022027A1 (en) Divider
US6065034A (en) Circuit and method employing an adder for sign extending operands
JPS62197868A (en) Linear approximation conversion circuit for pipeline construction
US5204962A (en) Processor with preceding operation circuit connected to output of data register
JP2991788B2 (en) Decoder
JP2555577B2 (en) Arithmetic unit
KR0176883B1 (en) Complex number multiplier
JP2664750B2 (en) Arithmetic device and arithmetic processing method
JP3229057B2 (en) Exception handling device
JP3517162B2 (en) Division and square root arithmetic unit
JP2608090B2 (en) High radix non-restoring divider
JPH0435777B2 (en)
JP2555967B2 (en) Floating point adder / subtractor
US6041341A (en) Method and circuit for adding operands of multiple size
JPH06214754A (en) Rounding arithmetic circuit and picture processor having it
JPS5999542A (en) Arithmetic circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980707

LAPS Cancellation because of no payment of annual fees