JP3331682B2 - Arithmetic unit - Google Patents
Arithmetic unitInfo
- Publication number
- JP3331682B2 JP3331682B2 JP18117493A JP18117493A JP3331682B2 JP 3331682 B2 JP3331682 B2 JP 3331682B2 JP 18117493 A JP18117493 A JP 18117493A JP 18117493 A JP18117493 A JP 18117493A JP 3331682 B2 JP3331682 B2 JP 3331682B2
- Authority
- JP
- Japan
- Prior art keywords
- shift
- shift number
- bus
- memory
- barrel shifter
- 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
Links
Description
【0001】[0001]
【産業上の利用分野】本発明は、特に、複数種類のシフ
ト数に対する算術、若しくは論理シフト演算を行うのに
適する演算装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic unit suitable for performing arithmetic or logical shift operations on a plurality of types of shift numbers.
【0002】[0002]
【従来の技術】近年、ディジタル信号処理には、より高
度な技術が導入され、より高速度の処理を行うことが演
算装置に要求されている。このような処理の中には、論
理シフトおよび算術シフトの動作を多く含むものがあ
り、そのシフト数が変数で与えられる場合が多い。2. Description of the Related Art In recent years, more advanced techniques have been introduced into digital signal processing, and there has been a demand for an arithmetic unit to perform processing at a higher speed. Some of such processes include many logical shift and arithmetic shift operations, and the number of shifts is often given as a variable.
【0003】以下、従来の演算装置の一例について図面
を参照しながら説明する。図2は従来の演算装置を示す
ブロック図である。Hereinafter, an example of a conventional arithmetic unit will be described with reference to the drawings. FIG. 2 is a block diagram showing a conventional arithmetic unit.
【0004】図2において、101は入力データが与え
られるバス、102は入力データバス101のデータを
算術、若しくは論理シフトするバレルシフタ、103は
シフト数を保持するシフト数レジスタ、104はALU
(算術論理演算回路)、105は出力データバスであ
る。シフト数は、出力データバス105からシフト数レ
ジスタ103に与えられる。In FIG. 2, reference numeral 101 denotes a bus to which input data is supplied, 102 denotes a barrel shifter for arithmetically or logically shifting data on the input data bus 101, 103 denotes a shift number register for holding a shift number, and 104 denotes an ALU.
(Arithmetic logic operation circuit) 105 is an output data bus. The shift number is provided from the output data bus 105 to the shift number register 103.
【0005】以上の構成において、以下、そのシフト演
算動作について説明する。まず、入力データをシフトす
るシフト数が、入力データバス101からALU104
を介して出力データバス105に出力され、続いてシフ
ト数は出力データバス105からシフト数レジスタ10
3に格納される。次に、入力データバス101からシフ
トされる入力データがバレルシフタ102に入力され、
バレルシフタ102でシフト数レジスタ103に格納さ
れている値をもとに算術、若しくは論理シフト演算さ
れ、シフト結果はALU104に出力される。The shift operation of the above configuration will be described below. First, the number of shifts for shifting the input data is changed from the input data bus 101 to the ALU 104.
Is output to the output data bus 105, and then the shift number is output from the output data bus 105 to the shift number register 10.
3 is stored. Next, input data shifted from the input data bus 101 is input to the barrel shifter 102,
Arithmetic or logical shift operation is performed by the barrel shifter 102 based on the value stored in the shift number register 103, and the shift result is output to the ALU 104.
【0006】[0006]
【発明が解決しようとする課題】しかしながら、上記従
来の演算装置では、シフト数を保持しておくシフト数レ
ジスタ103が1つ、若しくは2つしかなく、それ以上
の種類のシフト数については、シフトの度にシフト数レ
ジスタ103へ格納しなければならない。したがって、
多変数演算において、それぞれの変数に対して異なった
シフト数でシフトする場合には、シフトごとにシフト数
レジスタ103へのシフト数の格納が必要となるため、
動作スピードの低減を招き、プログラミングも煩雑にな
るなどの問題があった。However, in the above-mentioned conventional arithmetic unit, there is only one or two shift number registers 103 for holding the shift numbers. Must be stored in the shift number register 103 every time. Therefore,
In multivariable arithmetic, when shifting with a different shift number for each variable, it is necessary to store the shift number in the shift number register 103 for each shift.
There has been a problem that the operation speed is reduced and programming is complicated.
【0007】本発明は、上記従来の問題を解決するもの
であり、複数種類のシフト数に対する算術、若しくは論
理シフト演算において、シフト演算を高速に行うことが
でき、また、プログラムを簡潔にすることができるよう
にした演算装置を提供することを目的とするものであ
る。SUMMARY OF THE INVENTION The present invention solves the above-mentioned conventional problem. In an arithmetic or logical shift operation for a plurality of types of shift numbers, a shift operation can be performed at a high speed and a program can be simplified. It is an object of the present invention to provide an arithmetic device capable of performing the following.
【0008】[0008]
【課題を解決するための手段】上記目的を達成するため
の本発明の技術的手段は、入力データが与えられるバス
と、このバスのデータを算術、若しくは論理シフトする
バレルシフタと、シフト数を保持するメモリと、このメ
モリから上記バレルシフタにシフト数を与えるシフト数
バスと、このシフト数バスに送出する上記メモリのアド
レスを示す複数のポインタとを備えたものである。The technical means of the present invention for achieving the above object comprises a bus to which input data is given, a barrel shifter for arithmetically or logically shifting data on the bus, and a shift number. Memory, a shift number bus for giving a shift number from the memory to the barrel shifter, and a plurality of pointers indicating addresses of the memory to be transmitted to the shift number bus.
【0009】[0009]
【作用】したがって、本発明によれば、バレルシフタが
シフト数メモリポインタの示すアドレスの内容のシフト
数で入力データを算術、若しくは論理シフトするように
しているので、変数シフト数が複数種類存在し、それぞ
れを用いてデータのシフトを行う場合において、バレル
シフタに与えるシフト数をシフト動作ごとにセットする
必要がない。Therefore, according to the present invention, the barrel shifter arithmetically or logically shifts the input data by the shift number of the contents of the address indicated by the shift number memory pointer, so that there are a plurality of variable shift numbers, When shifting data using each of them, it is not necessary to set the number of shifts given to the barrel shifter for each shift operation.
【0010】[0010]
【実施例】以下、本発明の一実施例について図面を参照
しながら説明する。An embodiment of the present invention will be described below with reference to the drawings.
【0011】図1は本発明の一実施例における演算装置
を示す図である。図1において、1は入力データが与え
られるバス、2は入力データバス1のデータを算術、若
しくは論理シフトするバレルシフタ、3はシフト数を保
持するメモリ、4はシフト数メモリ3からバレルシフタ
2にシフト数を与えるシフト数バス、5はシフト数バス
4に送出するシフト数メモリ3のアドレスを示す複数の
ポインタ、6はALU、7は出力データバスである。FIG. 1 is a diagram showing an arithmetic unit according to an embodiment of the present invention. In FIG. 1, 1 is a bus to which input data is supplied, 2 is a barrel shifter for arithmetically or logically shifting data on the input data bus 1, 3 is a memory for holding a shift number, 4 is a shift from a shift number memory 3 to a barrel shifter Reference numeral 5 denotes a shift number bus for giving a number, 5 denotes a plurality of pointers indicating addresses of the shift number memory 3 to be transmitted to the shift number bus 4, 6 denotes an ALU, and 7 denotes an output data bus.
【0012】以上にような構成において、以下、そのシ
フト演算動作について説明する。ある変数X、Y、Zを
算術、若しくは論理シフトしようとするとき、まず、入
力データバス1を通じて、それぞれのシフト数sX、s
Y、sZをシフト数メモリ3の連続したアドレスに順次
格納する。次に、入力データバス1を通じてpsaで表
わすシフト数メモリポインタ5の一つをシフト数sXが
格納されているシフト数メモリ3のアドレスにセットす
る。変数X、Y、Zが入力データバス1を介し、連続し
てバレルシフタ2に与えられるとき、シフト数sXが格
納されているアドレスを示すシフト数メモリポインタ5
のpsaを選び、シフト数バス4にX、Y、Zそれぞれ
に対応するシフト数sX、sY、sZが与えられるよう
に、psaをインクリメントすることにより、X、Y、
Zが、それぞれに対応するシフト数sX、sY、sZが
シフトされ、ALU6を介して出力データバス7に出力
される。The shift operation of the above configuration will be described below. When trying to arithmetically or logically shift certain variables X, Y, Z, first, the respective shift numbers sX, s
Y and sZ are sequentially stored at consecutive addresses in the shift number memory 3. Next, one of the shift number memory pointers 5 represented by psa is set to the address of the shift number memory 3 storing the shift number sX through the input data bus 1. When variables X, Y and Z are successively applied to barrel shifter 2 via input data bus 1, shift number memory pointer 5 indicating the address where shift number sX is stored
Is selected, and psa is incremented so that shift numbers sX, sY, and sZ corresponding to X, Y, and Z are given to the shift number bus 4, thereby obtaining X, Y, and
Z is shifted by the corresponding shift numbers sX, sY, and sZ, and output to the output data bus 7 via the ALU 6.
【0013】このように本実施例によれば、変数に対す
るシフト数をシフト数メモリ3に保持し、シフト数メモ
リポインタ5で示されるシフト数メモリ3のアドレスの
内容をシフト数バス4に与えることにより、変数シフト
数が多種類存在し、それぞれを用いてデータのシフトを
行う場合において、シフト動作ごとにシフト数のセット
を行う必要がなくなるので、プログラムのオーバーヘッ
ドを削減することができ、高速なシフト動作を行うこと
ができる。As described above, according to the present embodiment, the shift number for the variable is held in the shift number memory 3 and the contents of the address of the shift number memory 3 indicated by the shift number memory pointer 5 are given to the shift number bus 4. Thus, when there are many types of variable shifts, and when data is shifted using each of them, it is not necessary to set the number of shifts for each shift operation. A shift operation can be performed.
【0014】[0014]
【発明の効果】以上説明したように本発明によれば、バ
レルシフタがシフト数メモリポインタの示すアドレスの
内容のシフト数で入力データを算術、若しくは論理シフ
トするようにしているので、変数シフト数が複数種類存
在し、それぞれを用いてデータのシフトを行う場合にお
いて、バレルシフタに与えるシフト数をシフト動作ごと
にセットする必要がなくなる。したがって、高速にシフ
ト演算を行うことができ、また、プログラムのオーバー
ヘッドを削減することができ、しかも、煩雑なシフト数
のセットを避けることができるので、プログラムを簡潔
にすることができる。As described above, according to the present invention, the barrel shifter arithmetically or logically shifts the input data by the shift number of the content of the address indicated by the shift number memory pointer. When a plurality of types exist and data is shifted using each of them, it is not necessary to set the number of shifts given to the barrel shifter for each shift operation. Therefore, the shift operation can be performed at high speed, the overhead of the program can be reduced, and a complicated setting of the number of shifts can be avoided, so that the program can be simplified.
【図1】本発明の一実施例における演算装置を示すブロ
ック図FIG. 1 is a block diagram showing an arithmetic unit according to an embodiment of the present invention.
【図2】従来の演算装置を示すブロック図FIG. 2 is a block diagram showing a conventional arithmetic unit.
1 入力データ 2 バレルシフタ 3 シフト数メモリ 4 シフト数バス 5 シフト数メモリポインタ 6 ALU 7 出力データバス 1 input data 2 barrel shifter 3 shift number memory 4 shift number bus 5 shift number memory pointer 6 ALU 7 output data bus
Claims (1)
スのデータを算術、若しくは論理シフトするバレルシフ
タと、シフト数を保持するメモリと、このメモリから上
記バレルシフタにシフト数を与えるシフト数バスと、こ
のシフト数バスに送出する上記メモリのアドレスを示す
複数のポインタとを備えた演算装置。A bus to which input data is supplied, a barrel shifter for arithmetically or logically shifting data on the bus, a memory for holding a shift number, a shift number bus for giving a shift number from the memory to the barrel shifter, And a plurality of pointers indicating addresses of the memory to be transmitted to the shift number bus.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18117493A JP3331682B2 (en) | 1993-07-22 | 1993-07-22 | Arithmetic unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18117493A JP3331682B2 (en) | 1993-07-22 | 1993-07-22 | Arithmetic unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0736663A JPH0736663A (en) | 1995-02-07 |
| JP3331682B2 true JP3331682B2 (en) | 2002-10-07 |
Family
ID=16096183
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP18117493A Expired - Fee Related JP3331682B2 (en) | 1993-07-22 | 1993-07-22 | Arithmetic unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3331682B2 (en) |
-
1993
- 1993-07-22 JP JP18117493A patent/JP3331682B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0736663A (en) | 1995-02-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0068764A2 (en) | Vector processing units | |
| EP0047440A1 (en) | Shift circuit | |
| US4907284A (en) | Image processing apparatus having function of enlargement and/or shrinkage of image | |
| US5539685A (en) | Multiplier device with overflow detection function | |
| US4891780A (en) | Divisional operation system for obtaining a quotient by repeated subtraction and shift operations | |
| GB1522324A (en) | Data processing | |
| AU644848B2 (en) | Address processor for a signal processor | |
| US3997771A (en) | Apparatus and method for performing an arithmetic operation and multibit shift | |
| JPS6160133A (en) | Address calculator | |
| US4754424A (en) | Information processing unit having data generating means for generating immediate data | |
| JP3331682B2 (en) | Arithmetic unit | |
| JPS63136710A (en) | Digital signal processing circuit | |
| JPS619725A (en) | Microprogram control circuit | |
| JP3541498B2 (en) | Data processing device | |
| JP3210356B2 (en) | Data zero judgment device | |
| JPS62237523A (en) | Sorting circuit | |
| JPH05161094A (en) | Programmable device for storing digital video line | |
| JP2924281B2 (en) | Address pointer | |
| JPH02287732A (en) | Register address generating device | |
| JP2748404B2 (en) | Binary data memory | |
| JPH05165875A (en) | Vector arithmetic processor | |
| JPH04330519A (en) | Multiplier | |
| JPH0477349B2 (en) | ||
| JPH01197840A (en) | Information processor | |
| JPH0736857A (en) | Signal processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |