JPH02264324A - Shift circuit - Google Patents
Shift circuitInfo
- Publication number
- JPH02264324A JPH02264324A JP1084887A JP8488789A JPH02264324A JP H02264324 A JPH02264324 A JP H02264324A JP 1084887 A JP1084887 A JP 1084887A JP 8488789 A JP8488789 A JP 8488789A JP H02264324 A JPH02264324 A JP H02264324A
- Authority
- JP
- Japan
- Prior art keywords
- shift
- circuit
- shift amount
- data
- input
- 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
Links
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は演算回路、とくに、固定小数点演算を行なう演
算回路に適用されるシフト回路に関するものである。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an arithmetic circuit, and particularly to a shift circuit applied to an arithmetic circuit that performs fixed-point arithmetic.
(従来の技術)
最近、信号処理の分野でディジタル・シグナルプロセッ
サ(DSP)が多用されている0周知のようにディジタ
ル・シグナルプロセッサは、浮動小数点演算を基本とす
るものと、固定小数点演算を基本とするものがある。浮
動小数点演算を基本とするディジタル・シグナルプロセ
ッサは、数値を指数部と仮数部に分けて表現するので、
同一ビット幅で表現可能な数値の幅すなわちダイナミッ
クレンジが広い特徴がある。しかし、計算処理の結果、
仮数部の値が所定の範囲を逸脱したときは、仮数部の値
を左または右にシフトし、それにともない指数部をシフ
ト分だけ増減することによって、仮数部を所定の範囲に
おさめる正規化処理を行なわなければならない、したが
って1回路が複雑であり、固定小数点演算を基本とする
ディジタル・シグナルプロセッサに比較して、低速動作
、高価格および大消費電力の欠点を有する。(Prior Art) Recently, digital signal processors (DSPs) have been widely used in the field of signal processing.As is well known, digital signal processors can be divided into two types: one based on floating-point arithmetic and the other based on fixed-point arithmetic. There is something that says. Digital signal processors based on floating-point arithmetic express numbers by dividing them into an exponent and a mantissa.
It is characterized by a wide range of numerical values that can be expressed with the same bit width, that is, a wide dynamic range. However, as a result of calculation processing,
When the value of the mantissa deviates from a predetermined range, a normalization process that shifts the value of the mantissa to the left or right and accordingly increases or decreases the exponent by the amount of shift to keep the mantissa within the predetermined range. Therefore, one circuit is complicated, and compared with a digital signal processor based on fixed-point arithmetic, it has disadvantages of slow operation, high cost, and large power consumption.
固定小数点演算を基本とするディジタル・シグナルプロ
セッサは、数値を仮数部のみで表現し、指数部は固定さ
れている。このため、ダイナミックレンジが狭い、しか
し、高速動作、低価格および低消費電力である点で優れ
、多くの装置に使用されている。Digital signal processors based on fixed-point arithmetic express numerical values using only the mantissa part, and the exponent part is fixed. Therefore, although the dynamic range is narrow, it is superior in terms of high speed operation, low price, and low power consumption, and is used in many devices.
固定小数点演算を基本とするディジタル・シグナルプロ
セッサ、たとえばテキサスインスツルメント社のモデル
TMS 32030などでは、ダイナミックレンジの狭
さを補償するためにシフト回路を内蔵している。このシ
フト回路は、計算処理によって広がったビット幅のうち
の所望の部分を外部からの信号によって抜き出す操作を
行なう、この信号は、シフト量の記述されたプログラム
を実行スるプログラム制御機構から与えられる。このよ
うなプログラムは、計算処理で予定される信号のすべて
についてシミュレーションおよび評価を行ない、演算部
の計算能力を最も有効に利用可能なシフト量を決めて、
作成される。Digital signal processors based on fixed-point arithmetic, such as the Texas Instruments Model TMS 32030, incorporate a shift circuit to compensate for the narrow dynamic range. This shift circuit extracts a desired portion of the bit width expanded by calculation processing using an external signal. This signal is given from a program control mechanism that executes a program in which the shift amount is written. . Such a program simulates and evaluates all the signals scheduled for calculation processing, determines the amount of shift that can most effectively utilize the calculation capacity of the calculation section, and
Created.
(発明が解決しようとする課題)
しかしこの方法では、ディジタル拳シグナルプロセッサ
において、たとえば、信号間のN次相間から平均信号パ
ワーによる信号比を求める場合、その信号が音声信号な
ど最大値と最小値との差が大きい信号であるときは1次
のような問題が生ずる。(Problem to be Solved by the Invention) However, in this method, in a digital fist signal processor, for example, when calculating the signal ratio based on the average signal power from the N-order phase between signals, the signal has a maximum value and a minimum value such as an audio signal. When the signal has a large difference between the two, a first-order problem occurs.
浮動小数点演算を基本とするディジタル・シグナルプロ
セッサを用いて解を求めるときは、その表現できる数値
のダイナミックレンジが広いため、固定小数点演算を基
本とするディジタル・シグナルプロセッサを用いた場合
に生ずる問題は、発生しない、しかしディジタル・シグ
ナルプロセッサ自体が低速動作、高価格および大消費電
力である。When finding a solution using a digital signal processor based on floating-point arithmetic, the dynamic range of the numerical values that can be expressed is wide, so the problems that arise when using a digital signal processor based on fixed-point arithmetic are However, the digital signal processor itself operates slowly, is expensive, and consumes a lot of power.
一方、固定小数点演算を基本とするディジタル・シグナ
ルプロセッサを用いて解を求める場合。On the other hand, when finding a solution using a digital signal processor based on fixed-point arithmetic.
シフト量をプログラムで定義しなければならない、その
ため、前述のように、予定されるすべての信号について
シミュレーションと評価を行ない、演算部の計算能力を
最も効果的に利用できるシフト量を決定するが、次の問
題がある。The amount of shift must be defined in the program. Therefore, as mentioned above, simulations and evaluations are performed for all planned signals to determine the amount of shift that can most effectively utilize the computational power of the arithmetic unit. There is the following problem.
たとえば、予定される最大値を有する信号に合わせてシ
フト量を決定すると、大部分の信号が必要以上に小さな
値をとり、したがって演算部の計算能力に無駄が多い、
このため、正確な解が得られない、そこで、予定される
信号の平均値に合わせてシフト量を決定すれば、最大値
を有する信号が入力されたとき演算部の計算能力を越え
るので、オーバフローが生ずる。このため、誤った結果
が発生する。つまり、シフト量をどのように決定しても
、常に正しい結果が得られるとは限らない、このように
、浮動小数点演算を基本とするディジタル拳シグナルプ
ロセッサを使用すると、高価で、しかも低速にしか解が
得られない、また固定小数点演算を基本とするディジタ
ル・シグナルプロセッサを用いると、プログラムに記述
すべきシフト量が決定できないので、正しい解が得られ
ないという欠点があった。For example, if the shift amount is determined according to the signal with the expected maximum value, most of the signals will take a smaller value than necessary, which wastes the calculation power of the arithmetic unit.
Therefore, an accurate solution cannot be obtained. Therefore, if the shift amount is determined according to the expected average value of the signal, when the signal with the maximum value is input, it will exceed the calculation capacity of the arithmetic unit, so overflow will occur. occurs. This results in incorrect results. In other words, no matter how the shift amount is determined, the correct result cannot always be obtained.Using a digital fist signal processor based on floating point arithmetic is expensive and slow. If a digital signal processor based on fixed-point arithmetic is used, it is impossible to determine the shift amount to be written in the program, so a correct solution cannot be obtained.
本発明は、以上述べた欠点を解消し、信号の最大値と最
小値との差が大きい場合でも固定小数点を基本とするデ
ィジタル・シグナルプロセッサで正確な解を得ることを
可能とするシフト回路を提供することを目的とする。The present invention eliminates the above-mentioned drawbacks and provides a shift circuit that makes it possible to obtain accurate solutions using a fixed-point based digital signal processor even when the difference between the maximum and minimum values of a signal is large. The purpose is to provide.
(課題を解決するための手段)
本発明によれば、プログラム制御の下に入力データをシ
フトして出力するシフト回路は、入力データの最上位ビ
ットに続くサインビットを単一ビットに変換するための
第1のシフト量を求めるシフト量計算手段と、プログラ
ムに記述されている第2のシフト量が入力され、プログ
ラム制御の下に、第1および第2のシフト量のいずれか
を選択する選択手段と、入力データを受け、この選択さ
れたいずれかのシフト量に応じて入力データをシフトし
て出力するシフト手段とを有する。(Means for Solving the Problems) According to the present invention, a shift circuit that shifts and outputs input data under program control converts a sign bit following the most significant bit of input data into a single bit. A shift amount calculation means for calculating a first shift amount, and a second shift amount described in the program are input, and a selection device for selecting either the first or second shift amount under program control. and a shifting means that receives input data, shifts the input data according to the selected shift amount, and outputs the shifted data.
(作 用)
本発明によれば、シフト量計算手段で入力データの最上
位ビットに続くサインビットを1ビツトに変換するため
の第1のシフト量を求める。(Function) According to the present invention, the first shift amount for converting the sign bit following the most significant bit of input data into 1 bit is determined by the shift amount calculation means.
方、プログラムに記述されている第2のシフト量が入力
される0選択手段は、プログラム制御を受け、両者の一
方を選択してシフト手段に入力する。シフト手段のシフ
トを、プログラムに決められている第1のシフト量で制
御する以外に、プログラム制御では実行できない入力デ
ータに対応してその情報量を最大に活用する第2のシフ
ト量による制御を行なう、さらに、第2のシフト量を固
定または更新することにより、演算に対応したデータを
供給することができる。On the other hand, the 0 selection means to which the second shift amount described in the program is input is under program control, selects one of the two, and inputs it to the shift means. In addition to controlling the shift of the shift means using the first shift amount determined by the program, control is performed using a second shift amount that maximizes the amount of information in response to input data that cannot be executed by program control. Furthermore, by fixing or updating the second shift amount, data corresponding to the calculation can be supplied.
(実施例)
次に添付図面を参照して本発明によるシフト回路の実施
例を詳細に説明する。(Example) Next, an example of a shift circuit according to the present invention will be described in detail with reference to the accompanying drawings.
第1図に示す本発明の実施例のシフト回路lOは、たと
えば、ディジタル・シグナルプロセッサとアキュミュレ
ータ(図示せず)との間に接続される0本口路10は、
アキュミュレータの演算によりビット幅が広がったデー
タが入力ポート1に入力されると、これをシフトしてデ
ータバスのビット幅に縮小し、出力ポート3よりデータ
バスに出力する演算回路である。シフトの制御は、ディ
ジタル拳シグナルプロセッサのプログラム制御部(図示
せず)からの制御信号によって行なわれる。この点は、
基本的には従来例と同じである。In the shift circuit 10 of the embodiment of the present invention shown in FIG.
When data whose bit width has been expanded by the operation of the accumulator is input to the input port 1, this arithmetic circuit shifts the data to reduce it to the bit width of the data bus, and outputs it to the data bus from the output port 3. Shifting is controlled by control signals from a program control section (not shown) of the digital fist signal processor. This point is
This is basically the same as the conventional example.
しかし本実施例は、シフト量計算回路12を有し、プロ
グラム制御によらないシフト制御を行なえることが従来
例と基本的に相違する点の1つである。However, one fundamental difference between the present embodiment and the conventional example is that it includes a shift amount calculation circuit 12 and can perform shift control not based on program control.
本回路10はシフト部14を有し、これは、入力ポート
lより入力される入力データInをマルチプレクサ01
0X) 113から与えられるシフト量SOに従ってシ
フトし、その結果の出力データODを出力ポート3に出
力する回路である。シフト量計算部12は、入力ポート
1よりの入力データ10からデータシフト量S1を計算
し、これをその出力20からレジスタ18へ出力する演
算回路である。ディジタル拳シグナルプロセッサのプロ
グラム制御部からは。This circuit 10 has a shift section 14, which transfers input data In input from an input port l to a multiplexer 01.
This circuit shifts according to the shift amount SO given from 0X) 113 and outputs the resulting output data OD to the output port 3. The shift amount calculation unit 12 is an arithmetic circuit that calculates a data shift amount S1 from the input data 10 from the input port 1 and outputs this from its output 20 to the register 18. From the program control section of the digital fist signal processor.
レジスタ18の制御信号入力端子5にレジスタ制御信号
S4が入力され、マルチプレクサ16の入力端子7およ
び8にそれぞれプログラムシフト量S2および選択信号
S3が入力される。A register control signal S4 is input to the control signal input terminal 5 of the register 18, and a program shift amount S2 and a selection signal S3 are input to input terminals 7 and 8 of the multiplexer 16, respectively.
レジスタ18は、後述する動作モードに応じてレジスタ
制御信号S4により、その保有するデータシフト量を固
定したり、または更新して、データシフト量S5として
マルチプレクサ1Bに与える回路である。マルチプレク
サ1Bは、制御端子8に与えらる選択信号S3に応じて
レジスタ18からの第1のシフト量S5またはプログラ
ム制御部からの第2のシフト量S2を選択し、最終的な
シフト量SOとしてシフト部14へ与える回路である。The register 18 is a circuit that fixes or updates the data shift amount held by the register control signal S4 according to the operation mode described later, and provides the data shift amount S5 to the multiplexer 1B. The multiplexer 1B selects the first shift amount S5 from the register 18 or the second shift amount S2 from the program control unit in accordance with the selection signal S3 applied to the control terminal 8, and selects the first shift amount S5 from the register 18 or the second shift amount S2 from the program control unit as the final shift amount SO. This is a circuit that supplies the signal to the shift section 14.
第2図にシフト量計算部12の具体的な回路構成例を示
す、この回路12は、入力ポート1より入力データ10
が入力されると、シフト量の計算を行ない、その計算結
果を示すシフト量S1を出力ポート20に出力する。こ
の例では、入力データIDは8ビットNSR,a8.
a5〜aOよりなり、シフト量を示す出力データSlは
7ビツ) bo、 blNbElからなる。FIG. 2 shows a specific example of the circuit configuration of the shift amount calculating section 12.
When inputted, a shift amount is calculated and a shift amount S1 indicating the calculation result is output to the output port 20. In this example, the input data ID is 8 bits NSR, a8.
It consists of a5 to aO, and the output data Sl indicating the shift amount is 7 bits) bo, blNbEl.
両ポートlと20の間には、排他的論理和ゲート31、
32〜37、ORゲー)41.42〜45、および一方
の入力が負論理の2人力ANDゲー)51.52〜5B
が図示のように接続されて構成されている。この回路1
2において、たとえば、入力ポート1に入力ビット列r
0OIOQ100Jが入力されると、出力ポート20
にはシフト量Stlとしてビット列r0100000
Jが生成される。これをここでは例(a)と称する。ま
た、たとえば入力ビット列r lll0IIOIJが入
力されると、出力ビツト列r0010000 Jが生成
される。これを例(b)とする。Between both ports l and 20, an exclusive OR gate 31,
32-37, OR game) 41.42-45, and two-man AND game where one input is negative logic) 51.52-5B
are connected and configured as shown in the figure. This circuit 1
2, for example, an input bit string r is input to input port 1.
When 0OIOQ100J is input, output port 20
The bit string r0100000 is used as the shift amount Stl.
J is generated. This will be referred to here as example (a). For example, when an input bit string rllll0IIOIJ is input, an output bit string r0010000J is generated. This is taken as example (b).
入力ビツト列のMSHに続くサインビット、例(a)で
は「0」、また例(b)ではril」、が有意ビットで
ないので、シフト量計算部12は、シフト部14で複数
のサインビットを単一のビットに変換するための第1の
シフト量Stを生成する。これによりシフト部14では
、例(a)について1ビツト、同(b)については2ビ
ツトのシフトが行なわれる。したがって、従来のシフト
方式に比べて、シフト部14の出力3に得られる出力デ
ータOnの有効桁数が多くなり、その情報量が増加する
。Since the sign bit following MSH in the input bit string, ``0'' in example (a) and ``ril'' in example (b), is not a significant bit, the shift amount calculation unit 12 uses the shift unit 14 to select a plurality of sign bits. A first shift amount St for conversion into a single bit is generated. As a result, the shift unit 14 performs a 1-bit shift for example (a) and a 2-bit shift for example (b). Therefore, compared to the conventional shift method, the number of effective digits of the output data On obtained at the output 3 of the shift section 14 increases, and the amount of information thereof increases.
本シフト回路lOは1次のような3通りの動作モードを
有する。まず第1に、プログラム制御部がレジスタ18
にその保有するレジスタ値を固定する旨を指示するレジ
スタ制御信号S4を与え、マルチプレクサ18には、そ
の人カフに第2のシフ)11S2を与えるとともに、制
御人力8に第2のシフト量S2の選択を指示する選択信
号S3を与える場合である。この選択信号S3に応動し
てマルチプレクサ18は、第2のシフト量S2を選択し
てこれを最終のシフト量SOとしてシフト部14へ出力
する。この場合、実際のシフト量SOは、プログラム制
御部から与えられたちのS2であり、したがって従来と
同様なプログラム制御によるシフトが行なわれる。This shift circuit IO has three operation modes such as primary. First of all, the program control section registers 18
A register control signal S4 instructing to fix the register value held by the person is given to the multiplexer 18, a second shift (11S2) is given to the person's cuff, and a second shift amount S2 is given to the control human power 8. This is a case where a selection signal S3 instructing selection is given. In response to this selection signal S3, the multiplexer 18 selects the second shift amount S2 and outputs it to the shift unit 14 as the final shift amount SO. In this case, the actual shift amount SO is S2 given by the program control section, and therefore the shift is performed under program control as in the conventional case.
第2の動作モードでは、プログラム制御部がレジスタ1
8にシフト量計算部12から新たな第1のシフト量St
を取り込む旨を指示するレジスタ制御信号S4を与え、
マルチプレクサ1Bには、その人力8に第1のシフト量
S5の選択を指示する選択信号S3を与える。シフト量
計算部12は、前述の機能により入力データInを取り
込み、これについてシフト量の演算を行なう0選択性号
S3に応動してマルチプレクサ1Bは、第1のシフト量
S1を選択してこれを更新されたシフト量SOとしてシ
フト部14へ提供する。In the second mode of operation, the program control section registers 1
8, a new first shift amount St is sent from the shift amount calculation unit 12.
Gives a register control signal S4 instructing to take in the
The multiplexer 1B is given a selection signal S3 that instructs the human power 8 to select the first shift amount S5. The shift amount calculation section 12 takes in the input data In using the above-mentioned function, and in response to the 0 selectivity signal S3 for calculating the shift amount, the multiplexer 1B selects the first shift amount S1 and selects the first shift amount S1. The updated shift amount SO is provided to the shift unit 14.
第3の動作モードにおいて、プログラム制御部はレジス
タ18にレジスタ値を固定する旨のレジスタ制御信号S
4を与え、マルチプレクサ1Bには、その人力8に第1
のシフト量S5の選択を指示する選択信号S3を与える
0選択性号S3に応動してマルチプレクサ18は、レジ
スタに保持されている第1のシフト量S5を選択してこ
れをシフト量SOとしてシフト部14へ送る。In the third operation mode, the program control unit sends a register control signal S to fix a register value in the register 18.
4, and multiplexer 1B has the first
In response to the 0 selectivity signal S3 that provides the selection signal S3 instructing selection of the shift amount S5, the multiplexer 18 selects the first shift amount S5 held in the register and shifts this as the shift amount SO. Send to Department 14.
本実施例で実現される第2および第3の動作モードを組
み合わせることにより、信号間の比を求める問題であっ
てその信号が音声信号のように最大値と最小値との差が
大きい信号である場合でも、固定小数点を基本とするデ
ィジタル・シグナルプロセッサで正確な解を得ることが
できる。また、第1、第2および第3の動作モードを組
み合わせることにより、上述の場合で固定小数点を基本
とするディジタル・シグナルプロセッサで正確な解が得
られることを、具体的な例で従来と比較して説明する。By combining the second and third operation modes realized in this embodiment, the problem of finding the ratio between signals can be solved even if the signal has a large difference between the maximum value and the minimum value, such as an audio signal. In some cases, a fixed-point based digital signal processor can provide an accurate solution. In addition, we will use a concrete example to demonstrate that by combining the first, second, and third operating modes, accurate solutions can be obtained using fixed-point based digital signal processors in the above-mentioned cases. and explain.
信号の0次と1次の相関値の比を計算する場合、m個の
入力信号のj次相関値Cjの式は、で表現される。ただ
し、Siは1番目の入力信号、0次と1次の相関値の比
は、C1/Coで表現される。When calculating the ratio of the 0th-order and 1st-order correlation values of signals, the equation of the j-order correlation value Cj of m input signals is expressed as follows. However, Si is the first input signal, and the ratio of 0th-order to 1st-order correlation values is expressed as C1/Co.
ここで、外部データ幅8ピツ) (−128〜÷127
を表現可能)の固定小数点演算を基本とするディジタル
・シグナルプロセッサで計算する場合、s−4゜aO−
58,51m14G、 52−72.53m−80,5
4m4Bとするとき、シフト回路10に入力される信号
は、C0=6400. CI=1280と計算される
。Here, the external data width is 8 bits) (-128 to ÷127
s-4゜aO-
58,51m14G, 52-72.53m-80,5
4m4B, the signal input to the shift circuit 10 is C0=6400. CI=1280 is calculated.
従来のシフト回路では、シフト量がプログラムに記載さ
れている。たとえば、そのようなシフト回路の出力が8
ビツト幅におさまるように「6ビツト右にシフト」と記
述されていると、これにより、 CG=100. CI
=20となり、CI/C0・2G/100と計算される
。In conventional shift circuits, the shift amount is written in the program. For example, if the output of such a shift circuit is 8
If it is written as "shift 6 bits to the right" to fit within the bit width, then CG=100. C.I.
=20, and it is calculated as CI/C0·2G/100.
これを本実施例におけるシフト回路lOで行なうと、C
Oが入力されたときに第1のシフト量S5が入力データ
IDで決まり、シフト部14では8ビツト幅に収まるよ
うに6ビツト右にシフトさせる。これによりC0=10
0となり1次にCIシカ−力されたとき、シフト動作は
同様に6ビツト右にシフトとなる。そこでCI=20と
なる。この結果からCI / C0=20/100と計
算される。When this is done in the shift circuit IO in this embodiment, C
When O is input, the first shift amount S5 is determined by the input data ID, and the shift section 14 shifts the data to the right by 6 bits so that the width is within 8 bits. As a result, C0=10
When the value becomes 0 and the primary CI shift is applied, the shift operation similarly shifts 6 bits to the right. Therefore, CI=20. From this result, CI/C0=20/100 is calculated.
次に、これと同じプログラムを入力信号の大きさがl/
8になった場合について考える。これは、信号が小さい
ときに相当し、正解は
CI / C0=20/100となる。Next, run this same program with the input signal size l/
Consider the case where the number becomes 8. This corresponds to when the signal is small, and the correct answer is CI/C0=20/100.
シフト量がプログラムで決められている方式の固定小数
点演算を基本とするディジタル・シグナルプロセッサで
は、先の操作と同様に6ビツト右にシフトされない、し
たがってシフト回路の出力はCO=1. CI=0とな
り、 CI/CO=0/Iと計算され、正しい解が求ま
らない。In a digital signal processor based on fixed-point arithmetic in which the amount of shift is determined by the program, the shift is not performed to the right by 6 bits as in the previous operation, so the output of the shift circuit is CO=1. CI=0, and the calculation is CI/CO=0/I, and the correct solution cannot be found.
しかし、本実施例のシフト回路10では、データCOが
入力されたときに第1のシフト量を入力データ■0で更
新する。すなわち、入力値が8ビツト幅に収まっている
ので、シフトを行なわない第2の動作モードとなる。シ
フト回路10の出力はco=tooとなり1次にCtが
入力されたときシフト動作は、レジスタI8の情報によ
り行なわれない。However, in the shift circuit 10 of this embodiment, when data CO is input, the first shift amount is updated with input data ``0''. That is, since the input value is within the 8-bit width, the second operation mode is entered in which no shifting is performed. The output of the shift circuit 10 becomes co=too, and when the primary Ct is input, the shift operation is not performed according to the information in the register I8.
このため、シフト回路lOの出力は、CI=20となり
、C1/C0・20/100と計算される。Therefore, the output of the shift circuit IO becomes CI=20, which is calculated as C1/C0·20/100.
(発明の効果)
このように本発明によれば、シフト回路は、有意値を有
さないサインビットを1ビツトに圧縮することにより、
シフト後のデータの情報量が増加し、他の処理回路に精
度のよい演算を可能とする。また、固定小数点演算によ
り信号比を求めるシグナルプロセッサなどでは、従来例
のようにプログラムのみによりシフト量を決めていると
入力データの変化に追従できない場合に誤った解を生成
していたが、本発明では、入力データに対応したシフト
が可能であり、シフトにより誤った解が出力されること
がない。(Effects of the Invention) As described above, according to the present invention, the shift circuit compresses the sign bit that does not have a significant value into one bit.
The information amount of the shifted data increases, allowing other processing circuits to perform accurate calculations. In addition, in signal processors that calculate signal ratios using fixed-point arithmetic, if the shift amount was determined only by a program as in the conventional example, incorrect solutions would be generated if changes in input data could not be followed. In the invention, it is possible to perform a shift corresponding to input data, and an incorrect solution will not be output due to the shift.
第1図は本発明によるシフト回路の実施例を示す機能ブ
ロック図、
第2図は、第1図に示す実施例におけるシフト量計算部
の回路構成例を示す回路図である。
、1分の の1
10、、、シフト回路
12、、、シフト量計算部
14、、、マルチプレクサ
18、、、レジスタFIG. 1 is a functional block diagram showing an embodiment of a shift circuit according to the present invention, and FIG. 2 is a circuit diagram showing an example of the circuit configuration of a shift amount calculating section in the embodiment shown in FIG. , 1/1 10, , Shift circuit 12, , Shift amount calculation unit 14, , Multiplexer 18, , Register
Claims (1)
するシフト回路において、該回路は、前記入力データの
最上位ビットに続くサインビットを単一ビットに変換す
るための第1のシフト量を求めるシフト量計算手段と、 プログラムに記述されている第2のシフト量が入力され
、プログラム制御の下に、第1および第2のシフト量の
いずれかを選択する選択手段と、 前記入力データを受け、該選択されたいずれかのシフト
量に応じて該入力データをシフトして出力するシフト手
段とを有することを特徴とするシフト回路。 2、請求項1に記載のシフト回路において、該回路は、 前記求められた第1のシフト量を記憶する記憶手段を含
み、 該記憶手段は、該記憶手段の記憶内容の固定および更新
を選択的に、プログラム制御の下に、行なうことを特徴
とするシフト回路。[Claims] 1. A shift circuit for shifting input data and outputting the same under program control, the circuit comprising a first shift circuit for converting a sign bit following the most significant bit of the input data into a single bit. a shift amount calculation means for calculating the first shift amount; and a selection means for receiving the second shift amount described in the program and selecting either the first or second shift amount under program control. , a shift circuit that receives the input data, shifts the input data according to the selected shift amount, and outputs the shifted data. 2. The shift circuit according to claim 1, wherein the circuit includes storage means for storing the determined first shift amount, and the storage means selects fixing and updating of the storage contents of the storage means. A shift circuit characterized in that it operates under program control.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1084887A JPH02264324A (en) | 1989-04-05 | 1989-04-05 | Shift circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1084887A JPH02264324A (en) | 1989-04-05 | 1989-04-05 | Shift circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02264324A true JPH02264324A (en) | 1990-10-29 |
Family
ID=13843268
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1084887A Pending JPH02264324A (en) | 1989-04-05 | 1989-04-05 | Shift circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02264324A (en) |
-
1989
- 1989-04-05 JP JP1084887A patent/JPH02264324A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2651267B2 (en) | Arithmetic processing device and arithmetic processing method | |
| JP2001092636A (en) | Device and method for processing data for applying floating point arithmetic to first, second and third operand | |
| US4796218A (en) | Arithmetic circuit capable of executing floating point operation and fixed point operation | |
| US4878191A (en) | Multiplication circuit capable of operating at a high speed with a small amount of hardware | |
| JPH02264324A (en) | Shift circuit | |
| US4683546A (en) | Floating point condition code generation | |
| JPH02210576A (en) | Integrated circuit accumulator | |
| KR0175974B1 (en) | Processor for selectively performing multiplaying dividing operation s based on pipeline structure | |
| JP3462670B2 (en) | Calculation execution method and calculation device | |
| EP1197874B1 (en) | Signal processor and product-sum operating device for use therein with rounding function | |
| EP0780759A1 (en) | Elimination of math overflow flag generation delay in an alu | |
| JPS6115233A (en) | Multiplier | |
| SU1564617A2 (en) | Device for extraction of square root | |
| JPH03269621A (en) | Arithmetic processor | |
| SU943709A1 (en) | Arithmetic-logic device | |
| SU1589270A1 (en) | Device for summation of two numbers with floating point | |
| SU922734A1 (en) | Device for computing sine and cosine functions | |
| JP3551291B2 (en) | Serial numerical operation device | |
| SU1273918A1 (en) | Adding-subtracting device | |
| JPS60263230A (en) | Adding circuit of multiple accuracy floating point | |
| JPH0324614A (en) | Shifting arithmetic unit | |
| JPS6149234A (en) | Multiplier circuit for floating point | |
| JPH03131966A (en) | Information processor | |
| JPH01276222A (en) | Data converter | |
| JP2002108604A (en) | Table conversion in SIMD type microprocessor |