JP3272033B2 - Shifter circuit with sticking function - Google Patents

Shifter circuit with sticking function

Info

Publication number
JP3272033B2
JP3272033B2 JP14263092A JP14263092A JP3272033B2 JP 3272033 B2 JP3272033 B2 JP 3272033B2 JP 14263092 A JP14263092 A JP 14263092A JP 14263092 A JP14263092 A JP 14263092A JP 3272033 B2 JP3272033 B2 JP 3272033B2
Authority
JP
Japan
Prior art keywords
circuit
bit
output
input
data
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
JP14263092A
Other languages
Japanese (ja)
Other versions
JPH05334043A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP14263092A priority Critical patent/JP3272033B2/en
Publication of JPH05334043A publication Critical patent/JPH05334043A/en
Application granted granted Critical
Publication of JP3272033B2 publication Critical patent/JP3272033B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、固定小数点数値で演算
が実行される装置(特に、ディジタル・シグナル・プロ
セッサ)に内蔵される形で使用される張り付け機能付き
シフタ回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shifter circuit having a sticking function which is used in a device (particularly, a digital signal processor) which executes an operation with a fixed-point value.

【0002】[0002]

【従来の技術】近年、ディジタル信号処理技術の発展に
伴い、固定小数点数値で演算処理を実行するディジタル
・シグナル・プロセッサ(以下、DSPと呼ぶ)が多用
されている。DSPは信号を離散的な数値として処理す
るため、複雑な演算が簡単に実現できる。
2. Description of the Related Art In recent years, with the development of digital signal processing technology, digital signal processors (hereinafter referred to as DSPs) for executing arithmetic processing with fixed-point numerical values have been frequently used. Since the DSP processes the signal as discrete numerical values, complicated calculations can be easily realized.

【0003】前記DSPには、内部数値表現を仮数部お
よび指数部の2つの部分で行う浮動小数点演算型DSP
と、内部数値表現を仮数部のみで行う固定小数点演算型
DSPとがある。ここに、浮動小数点演算型DSPは、
固定小数点演算型DSPと比較して、表現可能な数値範
囲が広く高性能であるが、その反面、大型で高価であ
り、しかも消費電力も大きい。このため、大量に使用さ
れる分野では、固定小数点演算型DSPを使用すること
が一般的であり、特に、大きさや消費電力が問題となる
携帯電話等には、固定小数点演算型DSPが使用されて
いる。
[0003] The DSP includes a floating-point arithmetic DSP that performs internal numerical representation in two parts, a mantissa part and an exponent part.
And a fixed-point arithmetic DSP that performs internal numerical representation only with a mantissa. Here, the floating-point arithmetic DSP
Compared to a fixed-point arithmetic DSP, the range of representable numerical values is wider and the performance is higher, but on the other hand, it is large, expensive, and consumes large power. For this reason, in fields used in large quantities, it is common to use fixed-point arithmetic DSPs, especially for mobile phones where size and power consumption are a problem. ing.

【0004】しかし、固定小数点演算型DSPは、本来
は仮数部および指数部で表現されるべき数値を仮数部の
みで表現しているため、使用変数毎に小数点位置を決定
しておいて、演算の際に数値の小数点位置合わせを行う
必要があり、この演算の際の数値の小数点位置合わせの
ためにシフタ回路を内蔵した構成とされている。
However, in the fixed-point arithmetic DSP, a value that should be expressed by a mantissa part and an exponent part is represented only by a mantissa part. In this case, it is necessary to align the decimal point of the numerical value, and a shifter circuit is incorporated for aligning the decimal point of the numerical value in this calculation.

【0005】例えば、数値Aの小数点位置が最上位ビッ
トから5ビット目に有り、数値Bの小数点位置が最上位
ビットから7ビット目にあるとき、A+Bの演算を行う
ためには、前記シフタ回路によってAを2ビット右にシ
フトしてから、Bとの加算処理を実行する。
For example, when the decimal point position of the numerical value A is at the fifth bit from the most significant bit and the decimal point position of the numerical value B is at the seventh bit from the most significant bit, the shifter circuit Shifts A two bits to the right, and then performs addition processing with B.

【0006】この様に、シフタ回路の入力データビット
幅と出力データビット幅とが等しい場合、入力データ最
上位の符号ビットと出力データ最上位の符号ビットとの
比較で、オーバーフローの検出および張り付けは簡単で
ある。なお、DSPにおけるオーバーフローの検出動作
や張り付け動作は、次に示す文献に詳述されている。 文献:ADSP-2100 User's Manual analog devices社
As described above, when the input data bit width and the output data bit width of the shifter circuit are equal, overflow detection and pasting can be performed by comparing the most significant code bit of the input data with the most significant code bit of the output data. Easy. The overflow detecting operation and the sticking operation in the DSP are described in detail in the following documents. Reference: ADSP-2100 User's Manual analog devices

【0007】[0007]

【発明が解決しようとする課題】ところで、固定小数点
演算型DSPでは、使用変数毎に小数点位置を決定して
いるため、精度を考えて演算は大きなビット幅で実行
し、メモリに転送する時に前記シフタ回路によって大き
なビット幅の内から必要な部分のみを選択する方法を取
っている。
By the way, in the fixed-point operation type DSP, the position of the decimal point is determined for each variable to be used. A method of selecting only a necessary portion from a large bit width by a shifter circuit is adopted.

【0008】具体例を挙げて説明する。今、16ビット
の数値 0000 1010 1111 1010 : 2810(10進数表現) をシフタ回路の入力データとして、シフタ回路では、こ
の入力データの最上位ビットより数えて5ビット目以降
の8ビットを選択する場合を考える。
[0008] A specific example will be described. Now, assuming that a 16-bit numerical value 0000 1010 1111 1010: 2810 (decimal notation) is input data of the shifter circuit, the shifter circuit selects the 8th bit after the fifth bit counting from the most significant bit of this input data. think of.

【0009】張り付けが行われないと、出力データは、 1010 1111 : −81(10進数表現) となり、数値的な誤差以外に正負の反転が発生してしま
う。
If the pasting is not performed, the output data becomes 1010 1111: -81 (decimal notation), and positive / negative inversion occurs in addition to a numerical error.

【0010】同様の処理の際に、張り付けがなされる
と、出力データは、 0111 1111 : 127(10進数表現) となり、本来の数値‘175’に近い数となり、また、
正負の反転といった不都合が発生しない。
In the same processing, if the pasting is performed, the output data becomes 0111 1111: 127 (decimal notation), which is a number close to the original numerical value '175'.
Inconvenience such as reversal of positive / negative does not occur.

【0011】即ち、大きなビット幅の内から必要な部分
のみ選択する処理の場合では、張り付け処理が適正にな
されないと正負の反転が発生し、この正負の反転は、数
値に誤差を含む以上に結果的に大きなエラー発生の原因
となる。この事からも固定小数点演算型DSPのシフタ
回路が張り付け機能を持つ事には重要な意義がある。し
かし、大きなビット幅の内から必要な部分のみ選択する
処理の場合では、シフタ回路の入力データビット幅が出
力データビット幅と比較して大きいため、出力データの
オーバーフローの検出や張り付けが難しく、張り付け処
理をハードウェアで実現しようとすると、シフタ回路の
構成が繁雑化し、ハードウェア量の大幅な追加による高
コスト化や回路の大型化といった不都合の発生が懸念さ
れていた。
That is, in the case of a process of selecting only a necessary portion from a large bit width, if the pasting process is not properly performed, a positive / negative reversal occurs. As a result, a large error may occur. For this reason, it is important that the shifter circuit of the fixed-point arithmetic DSP has the attaching function. However, in the case of selecting only a necessary part from a large bit width, since the input data bit width of the shifter circuit is larger than the output data bit width, it is difficult to detect and paste output data overflow. If the processing is to be realized by hardware, the configuration of the shifter circuit becomes complicated, and there is a concern that inconveniences such as an increase in cost and an increase in the size of the circuit due to a large addition of hardware may occur.

【0012】そこで、固定小数点演算型DSPに内蔵さ
れる従来のシフタ回路の場合では、前記張り付け機能を
ソフトウェアで得るようにしていた。しかし、ソフトウ
ェアによって張り付け機能を補う場合では、処理速度が
犠牲にされるという問題があった。
Therefore, in the case of a conventional shifter circuit built in a fixed-point arithmetic DSP, the above-mentioned attaching function has been obtained by software. However, when the pasting function is supplemented by software, there is a problem that the processing speed is sacrificed.

【0013】本発明は前記事情に鑑みてなされたもの
で、張り付け処理をハードウェアで実現するため処理を
高速化することができ、しかも、前記張り付け処理を実
行するための回路構成が簡単で、ハードウェア量の増加
による大型化を防止することもでき、固定小数点演算型
DSP等への内蔵に適した張り付け機能付きシフタ回路
を提供することを目的とする。
[0013] The present invention has been made in view of the above circumstances, the processing can be speeded up by realizing the pasting processing by hardware, and the circuit configuration for executing the pasting processing is simple. It is another object of the present invention to provide a shifter circuit with a sticking function that can prevent an increase in hardware due to an increase in the amount of hardware and is suitable for being incorporated in a fixed-point arithmetic DSP or the like.

【0014】[0014]

【課題を解決するための手段】本発明に係る張り付け機
能付きシフタ回路は、指定されたシフト量に基づいて入
力データのビット列に対してシフト処理するシフタ回路
の他に、入力データを示すビット列に対してオーバーフ
ローが発生するビット位置を示したビット列を出力する
オーバーフロー検出回路と、前記オーバーフロー検出回
路の出力するビット列から前記シフタ回路のシフト量に
対応するビット位置のデータを選択する第1の選択回路
と、前記入力データに基づいて張り付けに使用する張り
付けビット列を動的に生成し、前記第1の選択回路の選
択結果に応じて、前記シフタ回路が出力するビット列ま
たは当該張り付けビット列のいずれかを選択して出力す
る第2の選択回路とを備える。
According to the present invention, there is provided a shifter circuit with an attaching function according to the present invention, which shifts a bit sequence of input data based on a designated shift amount, and also generates a bit sequence indicating input data. An overflow detection circuit that outputs a bit string indicating a bit position at which an overflow occurs, and a first selection circuit that selects data at a bit position corresponding to the shift amount of the shifter circuit from the bit string output by the overflow detection circuit And a stitch used for stitching based on the input data.
Bit string is dynamically generated, and the selection of the first selection circuit is performed.
Depending on the selection result, the bit string output by the shifter circuit
Or a second selection circuit for selecting and outputting one of the attached bit strings .

【0015】そして、前記オーバーフロー検出回路は、
前記入力データを示すビット列上のビット反転位置を検
出する排他的論理和回路と、この排他的論理和回路の検
出したビット反転を下位ビット側に伝搬させる論理和回
路とを備えた構成とする。
The overflow detection circuit includes:
An exclusive OR circuit for detecting a bit inversion position on the bit string indicating the input data, and an OR circuit for transmitting the bit inversion detected by the exclusive OR circuit to the lower bit side.

【0016】[0016]

【作用】本発明に係る張り付け機能付きシフタ回路で
は、オーバーフロー検出回路,第1の選択回路,論理積
回路,第2の選択回路等のハードウェアで張り付け処理
を実現するため、処理を高速化することができる。
In the shifter circuit with the pasting function according to the present invention, since the pasting process is realized by hardware such as an overflow detection circuit, a first selection circuit, an AND circuit, and a second selection circuit, the processing is speeded up. be able to.

【0017】しかも、前記オーバーフロー検出回路,第
1の選択回路,論理積回路,第2の選択回路等の回路を
得るために基本回路であるシフタ回路に追加しなければ
ならないハードウェア量は、出力データのビット幅1ビ
ット当りに、排他的論理和回路,論理和回路,出力デー
タのビット幅と等しい入力数の入力セレクタ、2入力セ
レクタ等で済み、前記張り付け処理を実現するための回
路構成が簡単であるとともに、必要なハードウェア量が
極めて少なく、ハードウェア量の増加による大型化を防
止することもでき、固定小数点演算型DSP等への内蔵
に適した張り付け機能付きシフタ回路を提供することが
可能になる。
In addition, the amount of hardware that must be added to the shifter circuit, which is a basic circuit, to obtain the overflow detection circuit, the first selection circuit, the AND circuit, the second selection circuit, etc. An exclusive OR circuit, a logical OR circuit, an input selector having the same number of inputs as the bit width of the output data, a two-input selector, or the like may be used for one bit width of the data, and a circuit configuration for realizing the pasting process is required. To provide a shifter circuit with a sticking function that is simple and requires a very small amount of hardware, can prevent an increase in the amount of hardware, and can be prevented from increasing in size. Becomes possible.

【0018】また、オーバーフロー検出回路や第2の選
択回路は、図2および図3に示すように、整然とした規
則的な回路構成にすることができるため、LSI化も容
易であり、LSI化によって固定小数点演算型DSPの
内蔵に適したコンパクト化を一層促進することも期待で
きる。
Further, since the overflow detection circuit and the second selection circuit can be arranged in an orderly and regular circuit configuration as shown in FIGS. 2 and 3, it is easy to implement an LSI. It can be expected that compactness suitable for incorporating a fixed-point arithmetic DSP is further promoted.

【0019】[0019]

【実施例】図1は、本発明に係る張り付け機能付きシフ
タ回路の一実施例のブロック図である。この一実施例の
張り付け機能付きシフタ回路は、シフト処理すべきデー
タを受け付けるデータ入力端子1と、該データ入力端子
1に入力したデータを受け取ってオーバーフローがどの
ビットから発生するかを検出するためのオーバーフロー
検出回路2と、シフト量を指定するためのシフト量入力
端子3と、前記データ入力端子1に入力されたデータを
受け付けて前記シフト量入力端子3から指定されたシフ
ト量に基づいてシフト処理するシフタ回路4と、前記オ
ーバーフロー検出回路2の出力の内から1ビットの情報
を選択出力する第1の選択回路5と、張り付け機能を使
用するか否かを決定する張り付け指示信号入力部6と、
この張り付け指示信号入力部6の信号と前記第1の選択
回路5の出力信号とを論理積する論理積回路7と、この
論理積回路7の出力に応じてシフタ値および張り付け値
のいずれかを選択出力する第2の選択回路8と、この第
2の選択回路8によって選択されたデータを他の回路に
送出するための出力端子9とで構成されている。
FIG. 1 is a block diagram of an embodiment of a shifter circuit with a sticking function according to the present invention. The shifter circuit with a sticking function according to this embodiment includes a data input terminal 1 for receiving data to be shifted, and a data input terminal 1 for receiving data input to the data input terminal 1 and detecting from which bit an overflow occurs. An overflow detection circuit 2; a shift amount input terminal 3 for designating a shift amount; and shift processing based on a shift amount specified from the shift amount input terminal 3 by receiving data input to the data input terminal 1. A shifter circuit 4, a first selection circuit 5 for selecting and outputting 1-bit information from the output of the overflow detection circuit 2, and a pasting instruction signal input unit 6 for determining whether to use the pasting function. ,
An AND circuit 7 for performing an AND operation on the signal of the pasting instruction signal input unit 6 and the output signal of the first selection circuit 5, and either a shifter value or a pasting value according to the output of the AND circuit 7. It comprises a second selection circuit 8 for selecting and outputting, and an output terminal 9 for sending out the data selected by the second selection circuit 8 to another circuit.

【0020】前記オーバーフロー検出回路2は、図2に
示すように、前記データ入力端子1からのnビットの入
力データに対して各ビットのデータを抽出する入力部2
0と、この入力部20で抽出された各ビットのデータに
対して隣接する2ビットのデータを入力として前記入力
データを示すビット列上のビット反転位置を検出する排
他的論理和回路21と、この排他的論理和回路21の検
出したビット反転を下位ビット側に伝搬させる論理和回
路22と、これらの論理和回路22の出力をオーバーフ
ローが発生するビット位置を示したビット列として出力
する出力部24とを具備した構成で、前記出力部24の
データが前記第1の選択回路5に出力される。このオー
バーフロー検出回路2が出力部24に出力したビット列
では、オーバーフローが発生するビット位置の値が
‘1’となる。
As shown in FIG. 2, the overflow detecting circuit 2 is an input unit 2 for extracting data of each bit from n-bit input data from the data input terminal 1.
0, an exclusive OR circuit 21 which receives two-bit data adjacent to each bit data extracted by the input unit 20 and detects a bit inversion position on a bit string indicating the input data; An OR circuit 22 for transmitting the bit inversion detected by the exclusive OR circuit 21 to the lower bits, and an output unit 24 for outputting the outputs of these OR circuits 22 as a bit string indicating the bit position at which overflow occurs. The data of the output unit 24 is output to the first selection circuit 5. In the bit string output from the overflow detection circuit 2 to the output unit 24, the value of the bit position at which an overflow occurs is “1”.

【0021】前記シフタ回路4は、指定されたシフト量
に従って入力データをシフト処理する一般的なものであ
る。張り付け機能をソフトウェアによって得る従来のシ
フタ回路は、ハードウェア的には、このシフタ回路4
と、データ入力端子1と、シフト量入力端子3とで構成
されていた。
The shifter circuit 4 is a general circuit that shifts input data according to a designated shift amount. The conventional shifter circuit that obtains the pasting function by software is hardware-based.
, A data input terminal 1 and a shift amount input terminal 3.

【0022】前記第1の選択回路5は、オーバーフロー
検出回路2の出力と前記シフト量入力端子3で指定され
たシフト量とを入力として、前記オーバーフロー検出回
路2の出力部24の出力データの内から指定のシフト量
に対応した1ビットの情報(即ち、オーバーフローが発
生しているか否かを示すビット値)を選択出力するもの
で、前記シフタ回路4の1ビット分と同じ回路構成(即
ち、出力データのビット幅と等しい入力セレクタ)とさ
れている。
The first selection circuit 5 receives the output of the overflow detection circuit 2 and the shift amount designated by the shift amount input terminal 3 as inputs and outputs the output data of the output section 24 of the overflow detection circuit 2. , And selectively outputs 1-bit information (ie, a bit value indicating whether or not overflow has occurred) corresponding to the designated shift amount, and has the same circuit configuration as one bit of the shifter circuit 4 (ie, The input selector is equal to the bit width of the output data.

【0023】前記張り付け指示信号入力部6は、張り付
け機能を使用するか否かを示す信号の入力部で、入力信
号が‘1’の場合は「張り付け機能を使用する」ことを
意味し、‘0’の場合は「張り付け機能を使用しない」
ことを意味する。
The pasting instruction signal input section 6 is an input section for a signal indicating whether or not to use the pasting function. If the input signal is "1", it means "use the pasting function". If 0 ', "do not use the paste function"
Means that.

【0024】前記第2の選択回路8は、図3に示すよう
に、前記シフタ回路4の出力データ(即ち、シフタ値)
が入力される第1入力部81と、データ入力端子1に入
力したデータの最上位ビット(即ち、張り付け値)が入
力する第2入力部82と、前記論理積回路7の出力を受
ける第3入力部83と、前記第3入力部83への入力
(即ち、論理積回路7の出力)を制御信号として第1入
力部81への入力信号または第2入力部82への入力信
号のいずれかを選択出力する2入力セレクタ(即ち、2
in1セレクタ)84と、この2入力セレクタ84の出力
信号を前記出力端子9に送出する出力部85とを具備し
た構成とされている。
As shown in FIG. 3, the second selection circuit 8 outputs the output data of the shifter circuit 4 (ie, the shifter value).
, A second input unit 82 to which the most significant bit (ie, a pasted value) of the data input to the data input terminal 1 is input, and a third input unit 82 to receive the output of the AND circuit 7. An input unit 83 and either an input signal to the first input unit 81 or an input signal to the second input unit 82 using the input to the third input unit 83 (ie, the output of the AND circuit 7) as a control signal. Input selector (ie, 2 input selector) for selecting and outputting
(in1 selector) 84 and an output unit 85 for sending the output signal of the two-input selector 84 to the output terminal 9.

【0025】なお、前記2入力セレクタ84は、論理積
回路7の出力が‘1’ならば第2入力部82に入力した
信号(即ち、最上位ビットの信号で張り付け値)を、論
理積回路7の出力が‘0’ならば第1入力部81に入力
した信号(即ち、シフタ回路4の出力するシフタ値)を
出力する。また、第2入力部82への入力信号は、2番
目以降の2入力セレクタ84に対してはインバータ86
によって反転入力されている。
If the output of the AND circuit 7 is "1", the two-input selector 84 converts the signal input to the second input section 82 (ie, the value of the most significant bit) into an AND circuit. If the output of 7 is '0', the signal input to the first input section 81 (that is, the shifter value output from the shifter circuit 4) is output. The input signal to the second input unit 82 is supplied to an inverter 86 for the second and subsequent two-input selectors 84.
Is inverted.

【0026】以上の一実施例において、オーバーフロー
を検出して張り付けを行う場合の一連の動作について、
図1に基づいて、説明する。
In the above embodiment, a series of operations in the case where the overflow is detected and the pasting is performed will be described.
This will be described with reference to FIG.

【0027】まず、データ入力端子1にデータが入力す
ると、オーバーフロー検出回路2が、シフタ回路4がど
の位置からデータを選ぶとオーバーフローが発生するか
を計算する。図2の回路の場合、オーバーフローが発生
するビット位置が‘1’のビット列を出力する。そし
て、オーバーフロー検出回路2による各ビットの出力の
内、指示されたシフト量に対応するビット位置のデータ
が第1の選択回路5によって選択されて論理積回路7へ
出力される。この第1の選択回路5からの出力が1の場
合は、オーバーフローが発生することを意味している。
First, when data is input to the data input terminal 1, the overflow detection circuit 2 calculates from which position the shifter circuit 4 selects data to cause an overflow. In the case of the circuit of FIG. 2, a bit string in which the bit position where overflow occurs is “1” is output. Then, from the output of each bit by the overflow detection circuit 2, the data at the bit position corresponding to the designated shift amount is selected by the first selection circuit 5 and output to the AND circuit 7. When the output from the first selection circuit 5 is 1, it means that an overflow occurs.

【0028】一方、シフタ回路4では、従来と同様に、
データ入力端子1への入力データに対してシフト処理
し、処理後のシフト値を第2の選択回路8へ出力する。
On the other hand, in the shifter circuit 4, as in the prior art,
The shift processing is performed on the input data to the data input terminal 1, and the processed shift value is output to the second selection circuit 8.

【0029】前記論理積回路7は、前記第1の選択回路
5の出力と前記張り付け指示信号入力部6の入力信号と
に応じた信号を第2の選択回路8に出力する。この論理
積回路7の出力信号は、前記第1の選択回路5の出力が
‘1’で、かつ張り付け指示信号入力部6の信号が張り
付けを指示する‘1’の時(即ち、オーバーフローが検
出され、かつ張り付け処理が指示されている場合)に限
って‘1’となる。
The AND circuit 7 outputs to the second selection circuit 8 a signal corresponding to the output of the first selection circuit 5 and the input signal of the sticking instruction signal input section 6. The output signal of the AND circuit 7 is output when the output of the first selection circuit 5 is "1" and the signal of the sticking instruction signal input unit 6 is "1" indicating sticking (that is, overflow is detected). Is set to “1” only when the pasting process is performed and the pasting process is instructed).

【0030】前記第2の選択回路8は、論理積回路7の
出力を制御信号としてシフタ回路4が出力したシフタ値
または入力データからの張り付け値のいずれかを選択し
て出力端子9に出力する。論理積回路7の出力が‘1’
の場合は、前記第2の選択回路8は張り付け値を選択す
る。
The second selection circuit 8 uses the output of the AND circuit 7 as a control signal to select either the shifter value output by the shifter circuit 4 or the paste value from the input data and outputs the selected signal to the output terminal 9. . The output of the AND circuit 7 is "1"
In the case of (2), the second selection circuit 8 selects the pasted value.

【0031】以上に詳述したように、本発明の一実施例
の張り付け機能付きシフタ回路では、オーバーフロー検
出回路2,第1の選択回路5,論理積回路7,第2の選
択回路8等のハードウェアで張り付け処理を実現するた
め、処理を高速化することができる。
As described in detail above, in the shifter circuit with a sticking function according to one embodiment of the present invention, the overflow detection circuit 2, the first selection circuit 5, the logical product circuit 7, the second selection circuit 8, etc. Since the pasting processing is realized by hardware, the processing can be speeded up.

【0032】しかも、前記オーバーフロー検出回路2,
第1の選択回路5,論理積回路7,第2の選択回路8等
の回路を得るためにシフタ回路4に追加しなければなら
ないハードウェア量は、出力データのビット幅1ビット
当りに、排他的論理和回路,論理和回路,出力データの
ビット幅と等しい入力数の入力セレクタ、2入力セレク
タ等で済み、前記張り付け処理を実現するための回路構
成が簡単であるとともに、必要なハードウェア量が極め
て少なく、ハードウェア量の増加による大型化を防止す
ることもでき、固定小数点演算型DSP等への内蔵に適
した張り付け機能付きシフタ回路を提供することが可能
になる。
In addition, the overflow detection circuit 2,
The amount of hardware that must be added to the shifter circuit 4 in order to obtain circuits such as the first selection circuit 5, the AND circuit 7, and the second selection circuit 8 is exclusive for each bit width of output data. A logical OR circuit, a logical OR circuit, an input selector having the same number of inputs as the bit width of the output data, a two-input selector, etc. are required, and the circuit configuration for realizing the pasting process is simple and the necessary hardware amount It is possible to provide a shifter circuit with a sticking function suitable for being built in a fixed-point operation type DSP or the like, because the number of hardware components is extremely small, and an increase in the amount of hardware can be prevented.

【0033】また、図2,図3に示したように、オーバ
ーフロー検出回路2や第2の選択回路8が整然とした規
則的な回路構成となっているため、LSI化も容易であ
り、LSI化によって固定小数点演算型DSPの内蔵に
適したコンパクト化を促進することも期待できる。
As shown in FIGS. 2 and 3, since the overflow detection circuit 2 and the second selection circuit 8 have an orderly and regular circuit configuration, it is easy to implement LSI. Accordingly, it is expected that compactness suitable for incorporating a fixed-point arithmetic DSP can be promoted.

【0034】[0034]

【発明の効果】以上の説明から明らかなように、本発明
に係る張り付け機能付きシフタ回路では、オーバーフロ
ー検出回路,第1の選択回路,論理積回路,第2の選択
回路等のハードウェアで張り付け処理を実現するため、
処理を高速化することができる。
As is apparent from the above description, in the shifter circuit with a pasting function according to the present invention, pasting is performed by hardware such as an overflow detection circuit, a first selection circuit, an AND circuit, and a second selection circuit. To realize the processing,
Processing can be sped up.

【0035】しかも、前記オーバーフロー検出回路,第
1の選択回路,論理積回路,第2の選択回路等の回路を
得るために基本回路であるシフタ回路に追加しなければ
ならないハードウェア量は、出力データのビット幅1ビ
ット当りに、排他的論理和回路,論理和回路,出力デー
タのビット幅と等しい入力数の入力セレクタ、2入力セ
レクタ等で済み、前記張り付け処理を実現するための回
路構成が簡単であるとともに、必要なハードウェア量が
極めて少なく、ハードウェア量の増加による大型化を防
止することもでき、固定小数点演算型DSP等への内蔵
に適した張り付け機能付きシフタ回路を提供することが
可能になる。
In addition, the amount of hardware that must be added to the shifter circuit, which is the basic circuit, to obtain the overflow detection circuit, the first selection circuit, the AND circuit, the second selection circuit, etc. An exclusive OR circuit, a logical OR circuit, an input selector having the same number of inputs as the bit width of the output data, a two-input selector, or the like may be used for one bit width of the data, and a circuit configuration for realizing the pasting process is required. To provide a shifter circuit with a sticking function that is simple and requires a very small amount of hardware, can prevent an increase in the amount of hardware, and can be prevented from increasing in size. Becomes possible.

【0036】また、オーバーフロー検出回路や第2の選
択回路は、図2および図3に示すように、整然とした規
則的な回路構成にすることができるため、LSI化も容
易であり、LSI化によって固定小数点演算型DSPの
内蔵に適したコンパクト化を一層促進することも期待で
きる。
Further, since the overflow detection circuit and the second selection circuit can be arranged in an orderly and regular circuit configuration as shown in FIGS. 2 and 3, it is easy to implement an LSI. It can be expected that compactness suitable for incorporating a fixed-point arithmetic DSP is further promoted.

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

【図1】本発明に係る張り付け機能付きシフタ回路の一
実施例のブロック図である。
FIG. 1 is a block diagram of one embodiment of a shifter circuit with a pasting function according to the present invention.

【図2】本発明の一実施例のオーバーフロー検出回路の
構成図である。
FIG. 2 is a configuration diagram of an overflow detection circuit according to one embodiment of the present invention.

【図3】本発明の一実施例における第2の選択回路の構
成図である。
FIG. 3 is a configuration diagram of a second selection circuit in one embodiment of the present invention.

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

1 データ入力端子 2 オーバーフロー検出回路 3 シフト量入力端子 4 シフタ回路 5 第1の選択回路 6 張り付け指示信号入力部 7 論理積回路 8 第2の選択回路 9 出力端子 20 入力部 21 排他的論理和回路 22 論理和回路 24 出力部 81 第1入力部 82 第2入力部 83 第3入力部 84 2入力セレクタ 85 出力部 86 インバータ DESCRIPTION OF SYMBOLS 1 Data input terminal 2 Overflow detection circuit 3 Shift amount input terminal 4 Shifter circuit 5 First selection circuit 6 Pasting instruction signal input section 7 AND circuit 8 Second selection circuit 9 Output terminal 20 Input section 21 Exclusive OR circuit Reference Signs List 22 OR circuit 24 Output section 81 First input section 82 Second input section 83 Third input section 84 2-input selector 85 Output section 86 Inverter

フロントページの続き (56)参考文献 特開 平4−76621(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 5/01 G06F 7/00 G06F 7/38 Continuation of the front page (56) References JP-A-4-76621 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 5/01 G06F 7/00 G06F 7/38

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 指定されたシフト量に基づいて入力デー
タのビット列に対してシフト処理するシフタ回路の他
に、 前記入力データを示すビット列上のビット反転位置を検
出する排他的論理和回路と、この排他的論理和回路の検
出したビット反転を下位ビット側に伝搬させる論理和回
路とを備えて、オーバーフローが発生するビット位置を
示したビット列を出力するオーバーフロー検出回路と、 前記オーバーフロー検出回路の出力するビット列から前
記シフタ回路のシフト量に対応するビット位置のデータ
を選択する第1の選択回路と、前記入力データに基づいて張り付けに使用する張り付け
ビット列を動的に生成し、前記第1の選択回路の選択結
果に応じて、前記シフタ回路が出力するビット列または
当該張り付けビット列のいずれかを選択して 出力する第
2の選択回路とを備えたことを特徴とする張り付け機能
付きシフタ回路。
A shift circuit that shifts a bit string of input data based on a designated shift amount; an exclusive OR circuit that detects a bit inversion position on the bit string indicating the input data; An overflow circuit for transmitting a bit inversion detected by the exclusive OR circuit to the lower bit side, and outputting a bit string indicating a bit position at which an overflow occurs; and an output of the overflow detection circuit. A first selection circuit for selecting data at a bit position corresponding to the shift amount of the shifter circuit from a bit sequence to be executed, and a pasting unit used for pasting based on the input data
A bit string is dynamically generated, and a selection result of the first selection circuit is generated.
Depending on the result, the bit string output by the shifter circuit or
And a second selection circuit for selecting and outputting one of the pasted bit strings .
JP14263092A 1992-06-03 1992-06-03 Shifter circuit with sticking function Expired - Fee Related JP3272033B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14263092A JP3272033B2 (en) 1992-06-03 1992-06-03 Shifter circuit with sticking function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14263092A JP3272033B2 (en) 1992-06-03 1992-06-03 Shifter circuit with sticking function

Publications (2)

Publication Number Publication Date
JPH05334043A JPH05334043A (en) 1993-12-17
JP3272033B2 true JP3272033B2 (en) 2002-04-08

Family

ID=15319813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14263092A Expired - Fee Related JP3272033B2 (en) 1992-06-03 1992-06-03 Shifter circuit with sticking function

Country Status (1)

Country Link
JP (1) JP3272033B2 (en)

Also Published As

Publication number Publication date
JPH05334043A (en) 1993-12-17

Similar Documents

Publication Publication Date Title
US8429217B2 (en) Executing fixed point divide operations using a floating point multiply-add pipeline
US8260837B2 (en) Handling denormal floating point operands when result must be normalized
US7236995B2 (en) Data processing apparatus and method for converting a number between fixed-point and floating-point representations
KR100955557B1 (en) Floating-point processor with selectable subprecision
JPH10207693A (en) Floating point arithmetic unit
EP3447634A1 (en) Non-linear function computing device and method
US20050060359A1 (en) Arithmetic unit for addition or subtraction with preliminary saturation detection
GB2549153B (en) Apparatus and method for supporting a conversion instruction
JP3272033B2 (en) Shifter circuit with sticking function
US6779008B1 (en) Method and apparatus for binary leading zero counting with constant-biased result
EP0809179A2 (en) Digital microprocessor device having variable-delay division hardware
JP2695178B2 (en) Arithmetic circuit
JPH10187416A (en) Floating point arithmetic unit
CN112667197A (en) Parameterized addition and subtraction operation circuit based on POSIT floating point number format
US6615228B1 (en) Selection based rounding system and method for floating point operations
JP2645422B2 (en) Floating point processor
US5805487A (en) Method and system for fast determination of sticky and guard bits
US20040049528A1 (en) Apparatus and method for adding multiple-bit binary-strings
JP2998324B2 (en) Normalized shift device and normalized shift method
JPH01282633A (en) Non-normalized number processing system
JPH0383126A (en) Floating-point multiplier
US5801978A (en) Overflow detection for integer-multiply instruction
JPH0291724A (en) Arithmetic unit
JP3110072B2 (en) Pre-normalization circuit
JP3077880B2 (en) Sticky bit detection circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees