JPH08137666A - Arithmetic unit and its arithmetic method - Google Patents

Arithmetic unit and its arithmetic method

Info

Publication number
JPH08137666A
JPH08137666A JP6279165A JP27916594A JPH08137666A JP H08137666 A JPH08137666 A JP H08137666A JP 6279165 A JP6279165 A JP 6279165A JP 27916594 A JP27916594 A JP 27916594A JP H08137666 A JPH08137666 A JP H08137666A
Authority
JP
Japan
Prior art keywords
instruction
data
arithmetic
shift
bit
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
JP6279165A
Other languages
Japanese (ja)
Inventor
Hidetoshi Suzuki
秀俊 鈴木
Toshihiro Ishikawa
利広 石川
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 JP6279165A priority Critical patent/JPH08137666A/en
Publication of JPH08137666A publication Critical patent/JPH08137666A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE: To allow the arithmetic unit of a processor structure to conduct bit arithmetic processing such as interleave arithmetic processing, de-interleave arithmetic processing and coding processing of convoluted codes efficiently. CONSTITUTION: An instruction decoder 3 commands directly a shift number and a barrel shifter 4 makes shift operation and an arithmetic logic unit 6 makes OR arithmetic operation in the case of interleave arithmetic processing. In the case of de-interleave arithmetic processing, the unit 6 conducts AND arithmetic processing and conducts exclusive OR arithmetic processing in the case of coding convolution codes.

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 for performing a logical operation with a processor structure and an arithmetic method therefor.

【0002】[0002]

【従来の技術】近年、ディジタル信号処理プロセッサ
(以下、DSPと略称する)は、移動体通信分野でのデ
ィジタルシステムにおいて、機器組み込み用途のプロセ
ッサとして用いられている。
2. Description of the Related Art In recent years, a digital signal processor (hereinafter abbreviated as DSP) has been used as a processor for equipment incorporation in a digital system in the mobile communication field.

【0003】移動体通信分野へのDSPの応用では、バ
ースト誤りの対策としてデータのビット列の並び変えを
行なうインタリーブ処理を行う。インタリーブはビット
単位の演算のため、語単位の処理が中心のプロセッサで
は効率よく処理することができない。
In the application of DSP to the field of mobile communication, interleave processing for rearranging data bit strings is performed as a measure against burst errors. Since interleaving is performed in bit units, it cannot be efficiently processed by a processor that mainly processes words.

【0004】以下、従来の演算装置の動作の一例につい
て図3に示す概略ブロック図を参照しながら説明する。
An example of the operation of the conventional arithmetic unit will be described below with reference to the schematic block diagram shown in FIG.

【0005】図3において、201はデータメモリであ
り、データを保持する。202は命令メモリであり、命
令を保持している。203は命令デコーダであり、命令
メモリ202から出力される命令をデコードする。20
4はバレルシフタであり、指示された数のシフトを行な
う。205はシフト数指示レジスタであり、バレルシフ
タ204のシフト数を指示する。206は算術論理演算
装置であり、バレルシフタ204の出力と後述のバス2
08のデータ間で算術演算、または論理演算を行なう。
207はレジスタであり、算術論理演算装置206の演
算結果を一時保持する。208はバスであり、レジスタ
207のデータを算術論理演算装置206に供給する。
209はバスであり、レジスタ207のデータ、データ
メモリ201および命令デコーダ203の出力のデータ
をバレルシフタ204、またはシフト数指示レジスタ2
05に供給する。
In FIG. 3, 201 is a data memory, which holds data. An instruction memory 202 holds instructions. An instruction decoder 203 decodes an instruction output from the instruction memory 202. 20
Reference numeral 4 is a barrel shifter, which performs the designated number of shifts. Reference numeral 205 denotes a shift number instruction register, which indicates the shift number of the barrel shifter 204. Reference numeral 206 denotes an arithmetic logic operation unit, which outputs the output of the barrel shifter 204 and a bus 2 described later.
An arithmetic operation or a logical operation is performed between 08 data.
Reference numeral 207 is a register, which temporarily holds the operation result of the arithmetic logic operation unit 206. A bus 208 supplies the data of the register 207 to the arithmetic logic operation unit 206.
Reference numeral 209 denotes a bus, which transfers data from the register 207 and data output from the data memory 201 and the instruction decoder 203 to the barrel shifter 204 or the shift number instruction register 2
Supply to 05.

【0006】以上のように構成された演算装置におい
て、以下、そのインタリーブ演算動作について説明す
る。 (1)第1のステップ 命令メモリ202から出力する命令(シフト数指示レジ
スタ205にデータ格納を指示する命令)を命令デコー
ダ203はデコードする。シフト数として、例えば、左
3ビットシフトを指示する命令、命令デコーダ203か
らバス209に3が出力され、バス209を介してシフ
ト数指示レジスタ205に3を保持する。 (2)第2のステップ 命令メモリ202から出力する命令(命令中でデータメ
モリ201のアドレスを直接与え、データメモリ201
の出力に対して、シフト数指示レジスタ205が指示す
るシフト数のシフトをバレルシフタ204を用いて行
い、その結果を算術論理演算装置206を通過してレジ
スタ207に保存する命令)に従って各回路が動作す
る。
In the arithmetic unit configured as described above, the interleave arithmetic operation will be described below. (1) First Step The instruction decoder 203 decodes the instruction output from the instruction memory 202 (instruction to instruct the shift number instruction register 205 to store data). As the shift number, for example, an instruction for instructing a left 3-bit shift, 3 is output from the instruction decoder 203 to the bus 209, and 3 is held in the shift number instruction register 205 via the bus 209. (2) Second step Command output from command memory 202 (address of data memory 201 is directly given in command
Each of the circuits operates in accordance with an instruction to perform the shift of the shift number designated by the shift number designation register 205 using the barrel shifter 204 and to store the result in the register 207 after passing through the arithmetic and logic unit 206. To do.

【0007】この際、データメモリ201に指示するア
ドレスには意味のあるデータが最下位ビットにのみ存在
し、最下位ビット以外には0が入っている語がある。そ
の語に対し、3ビット左シフトを行うので、第2のステ
ップ終了後、レジスタ207に保持されている語は、最
下位ビットから第2ビット目までは0があり、第3ビッ
ト目に意味のあるデータがあり、第4ビット目以降、最
上位ビットまでは0が入っているデータとなる。 (3)第3のステップ 命令メモリ202から出力する命令(命令中で第2のス
テップにおいて指示したアドレスとは異なるアドレスを
データメモリ201に直接与え、データメモリ201の
出力に対し、バレルシフタ204はデータをシフト数0
で通過させ、バス208を介してのレジスタ207の出
力と算術論理演算装置206で論理和を取り、レジスタ
207に保存する命令)に従って各回路が動作する。
At this time, there is a word in which an address designated to the data memory 201 has meaningful data only in the least significant bit, and 0 is included in other than the least significant bit. Since the word is left-shifted by 3 bits, after the second step, the word held in the register 207 has 0 from the least significant bit to the second bit and has the meaning at the third bit. Is present, and 0 is entered from the 4th bit onward up to the most significant bit. (3) Third Step An instruction output from the instruction memory 202 (an address different from the address designated in the second step in the instruction is directly given to the data memory 201, and the barrel shifter 204 outputs the data to the output of the data memory 201. Shift number 0
Each circuit operates in accordance with an instruction to take the logical sum of the output of the register 207 and the output of the register 207 via the bus 208 and the arithmetic logic operation unit 206 and save the result in the register 207.

【0008】この際、データメモリ201に指示するア
ドレスにはインタリーブを行なっている途中の第2ビッ
ト目まで意味のあるデータがあり、第3ビット目以降最
上位ビットまで0が入っているデータがるものとする。
At this time, the address instructed to the data memory 201 has meaningful data up to the second bit in the middle of interleaving, and the data including 0 from the third bit onward to the most significant bit. Shall be.

【0009】第3のステップ終了後、レジスタ207に
は、第3ビット目まで意味のあるデータがあり、第4ビ
ット目以降最上位ビットまでは0が入っているデータと
なる。 (4)第4のステップ 第3のステップにおいてレジスタ207に格納されたデ
ータをバス209を介してデータメモリ201に格納す
る。データメモリ201に格納するアドレスとして第3
のステップにおいて指定したのと同一のアドレスを指定
する。
After the completion of the third step, the register 207 has meaningful data up to the third bit, and has data of 0 from the fourth bit to the most significant bit. (4) Fourth Step The data stored in the register 207 in the third step is stored in the data memory 201 via the bus 209. The third address to be stored in the data memory 201
Specify the same address as specified in step.

【0010】以上に示した第1から第4までのステップ
を通して1ビット分のインタリーブ演算を行うことがで
きる。以上に示した例においては、左3ビットのシフト
を行うことにより、第3ビット目に意味のあるデータを
挿入したが、左シフト数を1ビット、2ビット、4ビッ
ト、5ビットと順次変化させていくことにより、任意の
ビットに意味のあるデータを挿入することができるた
め、シフト数指示レジスタ205に格納する左シフト数
を順次変化させていくことでインタリーブ演算を行う。
The interleave operation for 1 bit can be performed through the steps 1 to 4 described above. In the example shown above, the meaningful data is inserted in the third bit by shifting the left 3 bits, but the left shift number is sequentially changed to 1 bit, 2 bits, 4 bits, 5 bits. By doing so, meaningful data can be inserted into an arbitrary bit, so that the interleave operation is performed by sequentially changing the left shift number stored in the shift number instruction register 205.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、上記従
来の演算装置では、1ビットのインタリーブ演算に4ス
テップを必要とし、nビットのインタリーブ演算を行う
場合、4×nステップを必要とし、処理が効率的でな
い。また、ステップ数を多く要するため電力を多く消費
する。また、上記従来例において、第2のステップで指
示するアドレスは各1ビットのインタリーブ演算ごとに
異なるため、1ビットのインタリーブを行う命令列を繰
り返し実行する際、ベタに命令を与える必要がある(繰
り返し命令を利用することができない)。このため、命
令の静的ステップ数も多く必要とし、命令メモリを多く
必要とする。命令メモリに要するチップ面積の増大は、
価格の上昇につながる。
However, in the above-described conventional arithmetic unit, 1-bit interleave operation requires 4 steps, and when n-bit interleave operation is performed, 4 × n steps are required, resulting in efficient processing. Not relevant. Moreover, since a large number of steps are required, a large amount of power is consumed. Further, in the above-mentioned conventional example, since the address designated in the second step is different for each 1-bit interleaving operation, it is necessary to give a solid instruction when repeatedly executing an instruction sequence for 1-bit interleaving ( Cannot use repeated instructions). Therefore, a large number of static steps of instructions are required, and a large amount of instruction memory is required. The increase in chip area required for instruction memory is
Leading to higher prices.

【0012】本発明は、上記従来の問題を解決するもの
であり、少数の命令で効率よく演算を実行することがで
き、したがって、高性能化、低消費電力化および低コス
ト化を図ることができるようにした演算装置およびその
演算方法を提供することを目的とするものである。
The present invention solves the above-mentioned conventional problems, and it is possible to efficiently execute an operation with a small number of instructions. Therefore, it is possible to achieve high performance, low power consumption and low cost. It is an object of the present invention to provide a calculation device and a calculation method for the calculation device.

【0013】[0013]

【課題を解決するための手段】上記目的を達成するため
の本発明の演算装置は、命令デコーダから直接シフト数
を指示できる構成とし、演算データを保持する記憶手段
と、任意の数のシフトが可能なバレルシフタと、このバ
レルシフタのシフト数を保持するシフト数指示レジスタ
と、論理和を行なう演算手段を備えたものである。
The arithmetic unit of the present invention for achieving the above object has a structure in which the number of shifts can be directly instructed from an instruction decoder, and a storage means for holding arithmetic data and an arbitrary number of shifts are provided. It comprises a possible barrel shifter, a shift number instruction register for holding the shift number of this barrel shifter, and an operation means for performing a logical sum.

【0014】上記目的を達成するための本発明の他の演
算装置は、上記演算装置において、演算手段が論理和に
代えて論理積を行い、定数発生回路を備えたものであ
る。
Another arithmetic unit of the present invention for achieving the above object is the arithmetic unit, wherein the arithmetic unit performs a logical product instead of a logical sum, and is provided with a constant generation circuit.

【0015】上記目的を達成するための本発明の更に他
の演算装置は、上記演算装置において、演算手段が論理
積に代えて排他的論理和を行うように構成されたもので
ある。
Still another arithmetic unit of the present invention for achieving the above object is the above arithmetic unit, wherein the arithmetic unit is configured to perform exclusive OR instead of logical product.

【0016】上記目的を達成するための本発明の演算方
法は、上記第1の演算装置を用い、シフト数の指定と、
シフトを行い、かつ論理和演算を単一命令で行う命令を
用いて、1ビットのみ有効なデータがある語からデータ
を組み上げる方法でインタリーブ演算を行なうようにし
たものである。
The arithmetic method of the present invention for achieving the above object uses the first arithmetic unit described above to specify a shift number,
The interleave operation is performed by a method of assembling data from a word having valid data of only 1 bit by using an instruction for performing shift and logical OR operation with a single instruction.

【0017】上記目的を達成するための本発明の他の演
算装置は、上記第2の演算装置を用い、シフト数の指定
と、シフトを行い、かつ論理積演算を単一命令で行う命
令を用いて、有効なデータがある語から1ビットのみ有
効なデータがある語にデータを分解する方法でデインタ
リーブ演算を行なうようにしたものである。
Another arithmetic unit of the present invention to achieve the above object is to use the second arithmetic unit to specify the number of shifts, perform the shift, and execute an instruction to perform a logical product operation with a single instruction. The deinterleaving operation is performed by a method of decomposing a word having valid data into a word having valid data of only 1 bit.

【0018】上記目的を達成するための本発明の更に他
の演算方法は、上記第3の演算装置を用い、シフト数の
指定と、シフトを行い、かつ排他的論理和演算を単一命
令で行う命令を用いて、任意のビット間の排他的論理和
を取る方法で畳み込み符号の符号化を行うようにしたも
のである。
Still another operation method of the present invention for achieving the above object is to use the third operation device described above, specify a shift number, perform a shift, and perform an exclusive OR operation with a single instruction. The convolutional code is encoded by a method of taking an exclusive OR between arbitrary bits using an instruction to be executed.

【0019】[0019]

【作用】本発明は、上記構成により、シフト数の指定
と、シフトを行い、かつ論理和演算、論理積演算、排他
的論理和演算を行うことが単一命令で可能となる。
With the above arrangement, the present invention makes it possible to specify the number of shifts, perform the shifts, and perform the OR operation, the AND operation, and the exclusive OR operation with a single instruction.

【0020】[0020]

【実施例】以下、本発明の実施例について図面を参照し
ながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0021】まず、本発明の第1の実施例について説明
する。図1は本発明の第1の実施例における演算装置を
示す概略ブロック図である。
First, a first embodiment of the present invention will be described. FIG. 1 is a schematic block diagram showing an arithmetic unit according to the first embodiment of the present invention.

【0022】図1において、1はデータメモリであり、
データを保持する。2は命令メモリであり、命令を保持
している。3は命令デコーダであり、命令メモリ2から
出力される命令をデコードする。4はバレルシフタであ
り、指示された値のシフトを行なう。5はシフト数指示
レジスタであり、、バレルシフタ4のシフト数を指示す
る。6は算術論理演算装置であり、算術演算、または論
理演算を行なう。7はレジスタであり、算術論理演算装
置6の演算結果を一時保持する。8はバスであり、レジ
スタ7のデータを算術論理演算装置6に供給する。9は
バスであり、レジスタ7のデータおよびデータメモリ1
のデータをバレルシフタ4、またはシフト数指示レジス
タ5に供給する。
In FIG. 1, 1 is a data memory,
Holds the data. Reference numeral 2 is an instruction memory, which holds instructions. An instruction decoder 3 decodes an instruction output from the instruction memory 2. Reference numeral 4 is a barrel shifter, which shifts the indicated value. A shift number instruction register 5 indicates the shift number of the barrel shifter 4. Reference numeral 6 denotes an arithmetic logic operation unit, which performs arithmetic operations or logical operations. Reference numeral 7 is a register, which temporarily holds the operation result of the arithmetic logic operation unit 6. A bus 8 supplies the data of the register 7 to the arithmetic and logic unit 6. Reference numeral 9 is a bus, and the data of the register 7 and the data memory 1
Is supplied to the barrel shifter 4 or the shift number instruction register 5.

【0023】以上のように構成された演算装置におい
て、以下、そのインタリーブ演算動作について説明す
る。
In the arithmetic unit configured as described above, the interleave arithmetic operation will be described below.

【0024】命令メモリ2から出力する命令(シフト数
指示レジスタ5にシフト数を指示し、データメモリ1の
アドレスを命令中で直接与え、データメモリ1の出力デ
ータに対し、シフト数指示レジスタ5が指示するシフト
をバレルシフタ4を用いて行い、バス8を介してのレジ
スタ7の出力と算術論理演算装置6で論理和(OR)を
取り、レジスタ7に保存する命令)に従って各回路が動
作する。
An instruction to be output from the instruction memory 2 (instructing the shift number to the shift number instruction register 5 and directly giving the address of the data memory 1 in the instruction, the shift number instruction register 5 to the output data of the data memory 1 The instructed shift is performed by using the barrel shifter 4, and each circuit operates according to the output of the register 7 via the bus 8 and a logical sum (OR) in the arithmetic logic unit 6 and the instruction to save in the register 7.

【0025】この際、データメモリ1に指示するアドレ
スには意味のあるデータが最下位ビットにのみ存在し、
最下位ビット以外は0が入っている語がある。その語に
対し、例えば、3ビット左シフトを行う場合では、バレ
ルシフタ4の出力は、最下位ビットから第2ビット目ま
では0があり、第3ビット目に意味のあるデータがあ
り、第4ビット目以降最上位ビットまでは0が入ってい
るデータとなる。
At this time, meaningful data exists only in the least significant bit at the address designated to the data memory 1,
There is a word that contains 0 other than the least significant bit. In the case where the word is left-shifted by 3 bits, for example, the output of the barrel shifter 4 has 0 from the least significant bit to the 2nd bit, there is meaningful data at the 3rd bit, and the 4th bit. The data is 0 from the bit bit onward to the most significant bit.

【0026】レジスタ7に保持されているデータは、イ
ンタリーブを行っている途中のデータであり、第2ビッ
ト目まで意味のあるデータがあり、第3ビット目以降最
上位ビットまで0が入っているデータがあるものとす
る。
The data held in the register 7 is data in the middle of interleaving, has meaningful data up to the second bit, and contains 0 from the third bit to the most significant bit. It is assumed that there is data.

【0027】算術論理演算装置6での論理和演算終了
後、レジスタ7には、第3ビット目まで意味のあるデー
タがあり、第4ビット目以降最上位ビットまでは0が入
っているデータとなる。
After completion of the logical sum operation in the arithmetic and logic unit 6, the register 7 has significant data up to the third bit, and data including 0 from the fourth bit to the most significant bit. Become.

【0028】以上に示した1ステップのみで1ビット分
のインタリーブ演算を行う。このため、インタリーブ処
理に必要なステップ数を削減することができる。
The interleaving operation for 1 bit is performed only in the one step shown above. Therefore, the number of steps required for interleaving processing can be reduced.

【0029】以上に示した例においては、左3ビットの
シフトを行うことで第3ビット目に意味のあるデータを
挿入したが、左シフト数を4ビット、5ビットと順次変
化させていくことで任意のビットに意味のあるデータを
挿入することができるため、左シフト数を順次変化させ
ていることでインタリーブ演算を行う。
In the example described above, the meaningful data is inserted in the third bit by shifting the left 3 bits, but the left shift number should be sequentially changed to 4 bits and 5 bits. Since it is possible to insert meaningful data in any bit, the interleave operation is performed by sequentially changing the left shift number.

【0030】また、以上の処理ではインタリーブ演算を
実行する場合の例について示したが、インタリーブ演算
以外のビット列処理においても上記の演算装置はステッ
プ数を削減する効果がある。
In the above processing, an example in which an interleave operation is executed has been shown, but the above arithmetic unit also has an effect of reducing the number of steps in the bit string processing other than the interleave operation.

【0031】次に、算術論理演算装置6において論理積
(AND)を取る演算の場合の第2の実施例について説
明する。
Next, a second embodiment in the case of the operation of taking the logical product (AND) in the arithmetic logic operation unit 6 will be described.

【0032】上記実施例では、インタリーブを行うため
にビット列を組み上げる処理を行った。デインタリーブ
処理では、ビット列を分解する。つまり、語のなかです
べてのビットに意味のあるデータがある場合に、語の最
下位ビットにのみ有効なビットがあり、それ以外はすべ
て0であるデータに変換する処理が、デインタリーブ処
理において必要である。
In the above embodiment, the process of assembling the bit strings is performed to perform the interleaving. In the deinterleave processing, the bit string is decomposed. In other words, when all bits in a word have meaningful data, the process of converting to data in which only the least significant bit of the word has valid bits and all other bits are 0 is the deinterleaving process. is necessary.

【0033】以下にデインタリーブ処理を行う場合の第
2の実施例を示す。この第2の実施例においては、図2
に示すように、図1に示す上記第1の実施例において、
定数発生回路10を付加した点に特徴を有する。この定
数発生回路10は、最下位ビットが1で、それ以外のビ
ットが0である数を発生させることができ、バス8に接
続されている。
A second embodiment for performing the deinterleave processing will be described below. In this second embodiment, FIG.
As shown in FIG. 1, in the first embodiment shown in FIG.
The feature is that the constant generation circuit 10 is added. The constant generation circuit 10 is capable of generating a number in which the least significant bit is 1 and the other bits are 0, and is connected to the bus 8.

【0034】命令メモリ2から出力する命令(シフト数
指示レジスタ5にシフト数を指示し、データメモリ1の
アドレスを命令中で直接与え、データメモリ1の出力デ
ータに対し、シフト数指示レジスタ5が指示するシフト
をバレルシフタ4を用いて行い、バス8を介しての定数
発生回路10の出力と算術論理演算装置6で論理和(A
ND)を取り、レジスタ7に保存する命令)に従って各
回路が動作する。
An instruction output from the instruction memory 2 (instructing the shift number to the shift number instruction register 5 and directly giving the address of the data memory 1 in the instruction, the shift number instruction register 5 outputs the output data of the data memory 1 to the shift number instruction register 5). The instructed shift is performed using the barrel shifter 4, and the output of the constant generation circuit 10 via the bus 8 and the logical sum (A
Each circuit operates in accordance with the instruction for taking ND) and saving it in the register 7.

【0035】この際、データメモリ1に指示するアドレ
スの語は、すべてのビットが意味のあるデータで埋まっ
ているものとする。その語に対し、例えば、3ビット右
シフトを行う場合では、バレルシフタ4の出力は、最下
位ビットにシフトする前の第3ビット目のデータがあ
る。
At this time, it is assumed that all the bits of the address word instructing the data memory 1 are filled with meaningful data. In the case where the word is right-shifted by 3 bits, for example, the output of the barrel shifter 4 has the data of the third bit before shifting to the least significant bit.

【0036】算術論理演算装置6での論理積演算終了
後、レジスタ7には、最下位ビットにのみ意味のあるデ
ータがあり、それ以外は0が入っているデータとなる。
After completion of the logical product operation in the arithmetic and logic unit 6, the register 7 has data only in the least significant bit, and is 0 otherwise.

【0037】以上に示した1ステップのみで1ビット分
のデインタリーブ演算を行う。これらによりデインタリ
ーブ処理に要するステップ数を削減することができる。
The deinterleave operation for one bit is performed only in the one step shown above. As a result, the number of steps required for the deinterleave processing can be reduced.

【0038】以上に示した例においては、右3ビットの
シフトを行うことで第3ビット目にあるデータのみを最
下位ビットに移動したが、右シフト数を4ビット、5ビ
ットと順次変化させていくことで任意のビットにあるデ
ータを最下位ビットに移動することができるため、右シ
フト数を順次変化させていることでデインタリーブ演算
を行う。
In the example shown above, only the data at the third bit is moved to the least significant bit by shifting the right 3 bits, but the right shift number is sequentially changed to 4 bits and 5 bits. Since the data in any bit can be moved to the least significant bit by doing so, the deinterleave operation is performed by sequentially changing the right shift number.

【0039】なお、上記に示した例の定数発生回路10
をレジスタとすることも可能である。デインタリーブ処
理を行う際に最下位ビットが1でそれ以外のビットは0
である数を設定することで上記に示した実施例と同様の
動作が可能となる。また、定数発生回路10で発生させ
る数を必要なビットにのみ1を立て、不必要なビットに
は0を設定することで、デインタリーブ以外の他のビッ
ト処理演算においても処理能力を向上させることができ
る。
The constant generating circuit 10 of the above-mentioned example
Can be a register. When performing deinterleave processing, the least significant bit is 1 and the other bits are 0
By setting a certain number, the same operation as that of the above-described embodiment can be performed. Further, the number generated by the constant generation circuit 10 is set to 1 only for the necessary bits and 0 is set for the unnecessary bits, thereby improving the processing capability in other bit processing operations other than deinterleaving. You can

【0040】次に、算術論理演算装置6において排他的
論理和(XOR)を取る演算の場合の第3の実施例につ
いて説明する。
Next, a third embodiment in the case of the operation of taking the exclusive OR (XOR) in the arithmetic logic operation unit 6 will be explained.

【0041】排他的論理和を取る場合の実施例としては
畳み込み符号の生成を行う場合が挙げられる。畳み込み
符号の生成には、データ間で排他的論理和を取る必要が
ある。
As an example of the case of taking the exclusive OR, there is a case of generating a convolutional code. To generate a convolutional code, it is necessary to take an exclusive OR between data.

【0042】以下に畳み込み符号の生成を行う場合の第
3の実施例を示す。この第3の実施例においては、図2
に示す定数発生回路10から発生データは、最下位ビッ
トが1で、それ以外のビットは0の数である。
A third embodiment for generating a convolutional code will be described below. In this third embodiment, FIG.
In the data generated from the constant generating circuit 10 shown in (1), the least significant bit is 1, and the other bits are 0.

【0043】以下の例においは、符号器の生成関数とし
て、遅延素子をDとして G=1+D2(ここでは、+は排他的論理和を示すもの
とする) である場合の例を示す。 (1)第1のステップ 命令メモリ2から出力する命令(シフト数指示レジスタ
5にシフト数を指示し、データメモリ1のアドレスを命
令中で直接与え、データメモリ1の出力データに対し、
シフト数指示レジスタ5が指示するシフトをバレルシフ
タ4を用いて行い。バス8を介しての定数発生回路10
の出力と算術論理演算装置6で論理積(AND)を取
り、レジスタ7に保存する命令)に従って各回路が動作
する。
In the following example, the case where the delay element is D and G = 1 + D 2 (here, + represents an exclusive OR) is shown as the generation function of the encoder. (1) First Step Instruction output from the instruction memory 2 (instructing the shift number in the shift number instruction register 5 and giving the address of the data memory 1 directly in the instruction to output data of the data memory 1
The shift designated by the shift number designation register 5 is performed using the barrel shifter 4. Constant generation circuit 10 via bus 8
And the arithmetic logical operation unit 6 take the logical product (AND) and store it in the register 7. Each circuit operates according to the instruction.

【0044】この際、データメモリ1に指示するアドレ
スには符号化されるデータがあるものとする。本実施例
の第1のステップでは、0ビットのシフトを行う(つま
りシフトを行わない)。
At this time, it is assumed that the address designated to the data memory 1 has data to be encoded. In the first step of this embodiment, 0-bit shift is performed (that is, shift is not performed).

【0045】算術論理演算装置6での排他的論理和演算
終了後、レジスタ7には、最下位ビットにのみ意味のあ
るデータがあり、それ以外は0が入っているデータとな
る。 (2)第2のステップ 命令メモリ2から出力する命令(シフト数指示レジスタ
5にシフト数を指示し、データメモリ1のアドレスを命
令中で直接与え、データメモリ1の出力データに対し、
シフト数指示レジスタ5が指示するシフトをバレルシフ
タ4を用いて行い、バス8を介してのレジスタ7のデー
タと算術論理演算装置6で排他的論理積和(EXOR)
を取り、レジスタ7に保存する命令)に従って各回路が
動作する。
After the exclusive OR operation in the arithmetic and logic unit 6, the register 7 has meaningful data only in the least significant bit, and 0 otherwise. (2) Second step Instruction output from instruction memory 2 (instructing shift number in shift number instruction register 5 and giving address of data memory 1 directly in the instruction to output data of data memory 1
The shift designated by the shift number designation register 5 is performed by using the barrel shifter 4, and the exclusive logical sum (EXOR) is performed by the arithmetic logic unit 6 and the data of the register 7 via the bus 8.
And each circuit operates according to the instruction to store the data in the register 7).

【0046】この際、データメモリ1に指示するアドレ
スには符号化されるデータがあり、第1のステップで指
定したアドレスと同一のアドレスである。
At this time, there is encoded data in the address designated to the data memory 1, and it is the same address as the address designated in the first step.

【0047】本実施例の第2のステップでは、2ビット
の右シフトを行う。算術論理演算装置6での排他的論理
和演算終了後、レジスタ7の最下位ビットには上記に示
した生成関数の演算結果が保存されることになる。
In the second step of this embodiment, a 2-bit right shift is performed. After the exclusive OR operation in the arithmetic logic operation unit 6 is completed, the least significant bit of the register 7 stores the operation result of the above generation function.

【0048】以上に示した2つのステップで符号器の生
成関数Gの生成を行う。これらにより、畳み込み符号の
符号化処理を少ないステップ数で実施することが可能と
なる。
The generation function G of the encoder is generated in the above two steps. As a result, it becomes possible to carry out the encoding process of the convolutional code with a small number of steps.

【0049】以上に示した例においては、符号器の生成
関数としては項が2つであったが、それ以上の数の場合
には、第2のステップにおいてシフト数を変え、第2の
ステップを項の数だけ続けて行うことで可能である。
In the example described above, the number of terms is two as the generation function of the encoder, but if the number is more than that, the shift number is changed in the second step and the second step is used. It is possible to continue by the number of terms.

【0050】なお、本実施例においても上記第2の実施
例と同様に、上記に示した例の定数発生回路10をレジ
スタとすることで、最初に最下位ビットが1でそれ以外
のビットが0である数を設定することにより同様の動作
が可能となる。
In the present embodiment as well, as in the second embodiment, by using the constant generating circuit 10 of the above-described example as a register, the least significant bit is 1 first and the other bits are not. The same operation is possible by setting a number that is 0.

【0051】[0051]

【発明の効果】以上説明したように本発明によれば、従
来4ステップ要していたインタリーブ処理を1ステップ
で実行することができ、静的および動的ステップ数を削
減することが可能となる。また、論理和の代わりに論理
積を行えば、デインタリーブ処理の静的および動的ステ
ップ数を削減することが可能となる。また、論理積の代
わりに排他的論理和を行えば、畳み込み符号の符号化処
理の静的および動的ステップ数を削減することが可能と
なる。このように動的ステップ数を減少させることによ
り、動作速度を下げれば消費電力を減少させることがで
きる。また、同一の動作速度では、他の処理を実行する
ことが可能となり、処理能力が向上する。また、静的ス
テップ数を減少させることにより、命令メモリに要する
面積を減少させることがで、安い価格で提供することが
できる。
As described above, according to the present invention, it is possible to execute the interleave processing which conventionally required four steps in one step, and it is possible to reduce the number of static and dynamic steps. . If the logical product is used instead of the logical sum, the number of static and dynamic steps of the deinterleaving process can be reduced. Also, if exclusive OR is performed instead of logical product, it is possible to reduce the number of static and dynamic steps in the encoding process of the convolutional code. By reducing the number of dynamic steps in this way, power consumption can be reduced by lowering the operating speed. Further, at the same operation speed, other processing can be executed, and the processing capacity is improved. Further, by reducing the number of static steps, the area required for the instruction memory can be reduced, so that the instruction memory can be provided at a low price.

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

【図1】本発明の第1の実施例における演算装置を示す
概略ブロック図
FIG. 1 is a schematic block diagram showing an arithmetic unit according to a first embodiment of the present invention.

【図2】本発明の第2の実施例における演算装置を示す
概略ブロック図
FIG. 2 is a schematic block diagram showing an arithmetic unit according to a second embodiment of the present invention.

【図3】従来の演算装置を示す概略ブロック図FIG. 3 is a schematic block diagram showing a conventional arithmetic unit.

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

1 データメモリ 2 命令メモリ 3 命令デコーダ 4 バレルシフタ 5 シフト数指示レジスタ 6 算術論理演算装置 7 レジスタ 8 バス 9 バス 10 定数発生回路 1 Data Memory 2 Instruction Memory 3 Instruction Decoder 4 Barrel Shifter 5 Shift Number Instruction Register 6 Arithmetic Logic Operation Unit 7 Register 8 Bus 9 Bus 10 Constant Generation Circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 15/31 D ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location G06F 15/31 D

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 演算データを保持する記憶手段と、任意
の数のシフトが可能なバレルシフタと、このバレルシフ
タのシフト数を保持するシフト数指示レジスタと、論理
和を行なう演算手段を備え、シフト数の指定と、シフト
を行い、かつ論理和演算をすることが単一命令で可能と
なるように構成された演算装置。
1. A storage device for storing operation data, a barrel shifter capable of shifting an arbitrary number, a shift number instruction register for holding the shift number of this barrel shifter, and an operation device for performing a logical sum operation. An arithmetic unit configured so that a single instruction can specify, shift, and perform an OR operation.
【請求項2】 演算手段が、論理和に代えて論理積を行
い、定数発生回路を備えた請求項1記載の演算装置。
2. The arithmetic unit according to claim 1, wherein the arithmetic means performs a logical product instead of a logical sum and includes a constant generation circuit.
【請求項3】 演算手段が、論理積に代えて排他的論理
和を行う請求項2記載の演算装置。
3. The arithmetic unit according to claim 2, wherein the arithmetic means performs an exclusive OR instead of the logical product.
【請求項4】 請求項1記載の演算装置を用い、シフト
数の指定と、シフトを行い、かつ論理和演算を単一命令
で行う命令を用いて、1ビットのみ有効なデータである
語からデータを組み上げる方法でインタリーブ演算を行
なう演算方法。
4. An arithmetic unit according to claim 1 is used to specify a shift number, perform a shift, and perform an OR operation with a single instruction. A calculation method that performs interleave calculation by the method of assembling data.
【請求項5】 請求項2記載の演算装置を用い、シフト
数の指定と、シフトを行い、かつ論理積演算を単一命令
で行う命令を用いて、有効なデータがある語から1ビッ
トのみ有効なデータがある語にデータを分解する方法で
デインタリーブ演算を行なう演算方法。
5. The arithmetic unit according to claim 2, wherein an instruction for specifying the number of shifts, performing the shift, and performing a logical product operation with a single instruction is used, and only one bit is present from a word having valid data. A method of deinterleaving operations that decomposes data into words that have valid data.
【請求項6】 請求項3記載の演算装置を用い、シフト
数の指定と、シフトを行い、かつ排他的論理和演算を単
一命令で行う命令を用いて、任意のビット間の排他的論
理和を取る方法で畳み込み符号の符号化を行う演算方
法。
6. An exclusive logic between arbitrary bits using the arithmetic unit according to claim 3 and using an instruction for designating a shift number, performing a shift, and performing an exclusive OR operation with a single instruction. An arithmetic method that encodes a convolutional code by a summation method.
JP6279165A 1994-11-14 1994-11-14 Arithmetic unit and its arithmetic method Pending JPH08137666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6279165A JPH08137666A (en) 1994-11-14 1994-11-14 Arithmetic unit and its arithmetic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6279165A JPH08137666A (en) 1994-11-14 1994-11-14 Arithmetic unit and its arithmetic method

Publications (1)

Publication Number Publication Date
JPH08137666A true JPH08137666A (en) 1996-05-31

Family

ID=17607363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6279165A Pending JPH08137666A (en) 1994-11-14 1994-11-14 Arithmetic unit and its arithmetic method

Country Status (1)

Country Link
JP (1) JPH08137666A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012530978A (en) * 2009-12-17 2012-12-06 インテル・コーポレーション Method and apparatus for performing shift and exclusive OR operations with a single instruction

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012530978A (en) * 2009-12-17 2012-12-06 インテル・コーポレーション Method and apparatus for performing shift and exclusive OR operations with a single instruction
JP2014160500A (en) * 2009-12-17 2014-09-04 Intel Corp Method and apparatus for performing shift and exclusive-or operation in single instruction
JP2014194825A (en) * 2009-12-17 2014-10-09 Intel Corp Method and apparatus for performing shift and exclusive-or operation in single instruction
JP2015164061A (en) * 2009-12-17 2015-09-10 インテル・コーポレーション Method and apparatus for performing shift and exclusive or operation in single instruction
US9495165B2 (en) 2009-12-17 2016-11-15 Intel Corporation Method and apparatus for performing a shift and exclusive or operation in a single instruction
US9495166B2 (en) 2009-12-17 2016-11-15 Intel Corporation Method and apparatus for performing a shift and exclusive or operation in a single instruction
US9501281B2 (en) 2009-12-17 2016-11-22 Intel Corporation Method and apparatus for performing a shift and exclusive or operation in a single instruction
US9747105B2 (en) 2009-12-17 2017-08-29 Intel Corporation Method and apparatus for performing a shift and exclusive or operation in a single instruction
JP2017152016A (en) * 2009-12-17 2017-08-31 インテル・コーポレーション System for performing shift and exclusive or operation in single instruction
US10684855B2 (en) 2009-12-17 2020-06-16 Intel Corporation Method and apparatus for performing a shift and exclusive or operation in a single instruction

Similar Documents

Publication Publication Date Title
US7917733B2 (en) Instruction code compression using instruction codes with reuse flags
KR100403035B1 (en) Viterbi decoding method and Viterbi decoding circuit
US6915413B2 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
JP3274668B2 (en) Arithmetic processing device and arithmetic processing method
US6844834B2 (en) Processor, encoder, decoder, and electronic apparatus
KR100282516B1 (en) Convolutional code generator and digital signal processor
JPH08340263A (en) In-place present condition/next condition register
US20040088497A1 (en) Methods and apparatus for exchanging data using cyclic redundancy check codes
JP3571304B2 (en) Interleaver memory access apparatus and method for CDMA system
EP0332845A2 (en) Dual look ahead mask generator
JPH08137666A (en) Arithmetic unit and its arithmetic method
CN111900999B (en) High-performance polarization coding method and coder for satellite discontinuous communication
US20040024992A1 (en) Decoding method for a multi-length-mode instruction set
US7661059B2 (en) High performance turbo and Viterbi channel decoding in digital signal processors
JP2005072843A (en) Mobile phone, method and program for calculating interleave parameter
JP4873546B2 (en) Data processing apparatus and data processing method
JP3252029B2 (en) Encoding device and encoding method
JP3250363B2 (en) Arithmetic unit
US20060236021A1 (en) Method for addressing a symbol in a memory and device for processing symbols
US6581083B1 (en) Syndrome generator and method for generating syndromes in a video/audio processing system
JPH05151066A (en) Fixed storage readout controller
JPH1146148A (en) Arithmetic processing unit and its utilizing device
JP2757716B2 (en) Huffman code decoding circuit
JP2004139290A (en) Microcontroller, control method therefor and microcontroller device
JPH1188199A (en) Interleave circuit and de-interleave circuit