JPH01259415A - Data correcting circuit - Google Patents

Data correcting circuit

Info

Publication number
JPH01259415A
JPH01259415A JP63087455A JP8745588A JPH01259415A JP H01259415 A JPH01259415 A JP H01259415A JP 63087455 A JP63087455 A JP 63087455A JP 8745588 A JP8745588 A JP 8745588A JP H01259415 A JPH01259415 A JP H01259415A
Authority
JP
Japan
Prior art keywords
data
shift
bits
correction
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
JP63087455A
Other languages
Japanese (ja)
Inventor
Yuji Tanigawa
裕二 谷川
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 JP63087455A priority Critical patent/JPH01259415A/en
Publication of JPH01259415A publication Critical patent/JPH01259415A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the scale of circuits by swapping upper and lower bits of data, which should be subjected to correction of digit movement, on demand and right or left shifting data once by the number of required bits and swapping high-order and low-order bits. CONSTITUTION:A data selector 3 swaps high-order bits and low-order bits of the output of an input data register 1 when the value in a shift control register 2 indicates the left shift direction, but the selector 3 selects the output value of the input data register 1 when it indicates the right shift direction. The output is right or left shifted once by the number of required bits, and high-order bits and low-order bits are swapped again. Thus, the processing of digit movement correction is executed without requiring a selecting circuit of the bit width of digit movement for the purpose of preventing bit losses at the time of digit movement correction.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、小数点演算、ビット演算等に於ける桁移動補
正を行なうデータ補正回路に閃するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention is directed to a data correction circuit that performs digit shift correction in decimal point operations, bit operations, and the like.

従来の技術 従来のデータ補正回路の構成を第5図に示す。Conventional technology FIG. 5 shows the configuration of a conventional data correction circuit.

第5図において、tiは桁移動の補正を行なうデータを
人力して保持する人力データラッチ、12は桁移動の補
正を行なうデータを右に1ワード算術シフトして保持す
る入力データラッチ、2はシフト数を人力して保持する
シフト制御レジスタ、71は左あるいは右シフトかを示
す左右シフト指示信号、72はシフト数を示すシフト量
指示信号、31は左右シフト指示信号71により人力デ
ータラッチ11または12の内容を選択するセレクタ、
70は左右シフト指示信号71及びシフ)It指示信号
72よりシフト制御を行なうデコーダ、41はセレクタ
31の出力データをデコーダ70の制御に従って左シフ
トを行なうシフタ、8はシフタ41により桁移動補正さ
れたデータを出力するデータ出力線である。
In FIG. 5, ti is a manual data latch that manually holds data for correcting digit shift, 12 is an input data latch that arithmetic shifts one word to the right and holds data for correcting digit shift, and 2 is an input data latch that holds data for correcting digit shift. A shift control register 71 manually holds the shift number; 71 is a left/right shift instruction signal indicating left or right shift; 72 is a shift amount instruction signal indicating the shift number; 31 is a manual data latch 11 or A selector for selecting 12 contents,
70 is a decoder that performs shift control based on the left/right shift instruction signal 71 and the shift) It instruction signal 72; 41 is a shifter that shifts the output data of the selector 31 to the left according to the control of the decoder 70; and 8 is the digit shift corrected by the shifter 41. This is a data output line that outputs data.

従来では、入力データラッチ11及び12より選択され
たデータを左右シフト指示信号71とシフト量指示信号
72とより決定された量だけ左シフトして、左右両方向
シフト動作を実現していた(例えば、特開昭59−19
5741)。
Conventionally, the data selected from the input data latches 11 and 12 was shifted to the left by an amount determined by the left/right shift instruction signal 71 and the shift amount instruction signal 72 to realize a left/right shift operation (for example, Japanese Unexamined Patent Publication 1986-19
5741).

発明が解決しようとする課題 従来の回路では、桁移動の補正する値のビット損失を防
ぐために、左に桁移動するビット数分の選択回路を備え
なければならず、ビット長の長いデータを取り扱う構成
では回路規模が大きくなるという問題点を有する。
Problems to be Solved by the Invention In conventional circuits, in order to prevent bit loss in the value to be corrected for digit shift, it is necessary to include selection circuits for the number of bits to be shifted to the left, and it is difficult to handle data with a long bit length. This configuration has a problem in that the circuit scale becomes large.

本発明はかかる点に鑑み、回路規模の小さいデータ補正
回路を提供することを目的とする。
In view of this point, it is an object of the present invention to provide a data correction circuit with a small circuit scale.

課題を解決するための手段 本発明は前記問題点を解決する手段として、桁移動の補
正を行なうデータを人力して保持する人力データ・レジ
スタと、前記人力データ・レジスタのデータの各ビット
を上位と下位でスワップさせるデータ・セレクタと、シ
フト数に応じてデータを右あるいは左の単一方向にシフ
トさせる複数段のシックと、前記シフタにより補正され
たデータの各ビットを上位と下位でスワップさせるデー
タ・セレクタと、算術右シフト時に符号延長を行なう符
号補正回路と、補正データを出力する出力データ・バス
とを備え、シフト方向により一度シフタへの人力データ
のビットを上位と下位でスワップさせて任意ビット分シ
フトした後再びビットを上位と下位でスワップすること
により双方向のシフトを行なう。
Means for Solving the Problems The present invention solves the above-mentioned problems by providing a manual data register that manually stores data for correcting digit shift, and a manual data register that manually stores each bit of the data in the manual data register. a data selector that swaps the data at the lower end, a multi-stage chic that shifts the data in a single direction to the right or left depending on the number of shifts, and swaps each bit of the data corrected by the shifter between the upper and lower ends. It is equipped with a data selector, a sign correction circuit that performs sign extension during an arithmetic right shift, and an output data bus that outputs correction data, and swaps the bits of the manual data sent to the shifter between upper and lower positions depending on the shift direction. After shifting by an arbitrary bit, the bits are again swapped between upper and lower bits to perform a bidirectional shift.

作用 本発明は前記した構成により、桁移動の補正を行なうデ
ータを必要に応じて上位と下位ビットでスワップさせ、
必要ビット分有または左に単一シフトを行ない、再び上
位と下位のビットでスワップさせることにより、桁移動
補正時のビット損失を防ぐために桁移動するビット幅の
選択回路を備える必要がなく、桁移動補正の処理を実行
することができる。
According to the above-described configuration, the present invention swaps the upper and lower bits of the data for correcting digit shift as necessary,
By performing a single shift to the left for the required bits and swapping the upper and lower bits again, there is no need to provide a bit width selection circuit for shifting digits to prevent bit loss during digit shift correction. Movement correction processing can be executed.

実施例 第1図は、本発明の一実施例のデータ補正回路の構成を
示す。
Embodiment FIG. 1 shows the configuration of a data correction circuit according to an embodiment of the present invention.

第1図において、1は桁移動補正を行なうデータを入力
して保持する人力データレジスタ、2はシフトの方向、
算術又は論理シフト及びシフト数などのシフト制御の制
御値を入力して保持するシフト制御レジスタ、3はシフ
ト制御レジスタ2のシフト方向により入力データレジス
タ1の上位と下位のビットをスワップさせるデータセレ
クタ、4はシフト制御レジスタ2のシフト数に対応した
ビット分をシフトするシフタ、5はシフト制御レジスタ
2のシフト方向によりシフタ4の出力を上位と下位のビ
ットでスワップさせるデータセレクタ、6はシフト制御
レジスタ2が算術右シフトの場合に入力データレジスタ
の符号ビットを人力してシフタ4に於けるシフト時の符
号延長補正を行なう符号補正回路、7はシフト制御レジ
スタ2の出力信号を示すシフト制御信号、8は桁移動補
正を行ったデータを出力するデータ出力線、9は符号補
正回路6からシフタ4に与えられる符号補正信号、10
は人力データレジスタの符号ビットである。
In FIG. 1, 1 is a manual data register that inputs and holds data for performing digit shift correction; 2 is a shift direction;
a shift control register that inputs and holds shift control control values such as arithmetic or logical shifts and shift numbers; 3 a data selector that swaps the upper and lower bits of the input data register 1 according to the shift direction of the shift control register 2; 4 is a shifter that shifts bits corresponding to the shift number of shift control register 2; 5 is a data selector that swaps the output of shifter 4 between upper and lower bits according to the shift direction of shift control register 2; 6 is a shift control register 2 is a sign correction circuit that manually inputs the sign bit of the input data register in the case of an arithmetic right shift and performs code extension correction at the time of shift in the shifter 4; 7 is a shift control signal indicating the output signal of the shift control register 2; 8 is a data output line for outputting data subjected to digit shift correction; 9 is a code correction signal applied from the code correction circuit 6 to the shifter 4; 10
is the sign bit of the manual data register.

シフタ4の一実施例を第2図に示す。An embodiment of the shifter 4 is shown in FIG.

第2図に示すように、シフタ4は複数段のデータ・セレ
クタより構成され、41は人力データを右に1ビツト・
シフトした値とシフトしない元の値とをシフト制御信号
7により選択する20ビツトφセレクタ、42は20ビ
・ント番セレクタ41の出力を右に2ビツト・シフトし
た値とシフトしない元の値とをシフト制御信号7により
選択する21ビツト・セレクタ、同様にn個の21ビツ
ト・セレクタ(i=o、  1.  ・・・、n−1)
を備え、人力データを任意ビット数右シフトすることが
出来る構成である。
As shown in FIG. 2, the shifter 4 is composed of multiple stages of data selectors, and the shifter 41 selects one bit of human input data to the right.
A 20-bit φ selector 42 selects between the shifted value and the unshifted original value using the shift control signal 7, and 42 selects between the output of the 20-bit number selector 41 shifted two bits to the right and the unshifted original value. 21-bit selector for selecting by shift control signal 7, similarly n 21-bit selectors (i=o, 1. . . . , n-1)
It has a configuration that allows manual data to be shifted to the right by an arbitrary number of bits.

21ビツト・セレクタ41〜43の各ビット構成を第3
図に示す。各ビット・セレクタの人力信号と出力信号は
反転して出力される(正論理が負論理に、負論理が正論
理に反転される)が、シフタ4が偶数段で構成されると
シフタ4の人出力信号は同じ論理となる。
The bit configuration of the 21-bit selectors 41 to 43 is
As shown in the figure. The manual signal and output signal of each bit selector are inverted and output (positive logic is inverted to negative logic, and negative logic is inverted to positive logic), but if shifter 4 is configured with an even number of stages, Human output signals have the same logic.

以上のように構成された本実施例のデータ補正回路につ
いて、以下にその動作を説明する。
The operation of the data correction circuit of this embodiment configured as described above will be explained below.

桁移動補正の処理を行なうデータを入力データレジスタ
lに、シフト制御用の値をシフト制御レジスタ2に設定
する。データセレクタ3はシフト制御レジスタ2のシフ
ト方向を示す値が左を示す時人力データ・レジスタ1の
出力を上位ビットと下位ビットでスワップさせ、右を示
す場合は人力データ・レジスタ1の出力値を選択する。
The data for performing the digit shift correction process is set in the input data register 1, and the value for shift control is set in the shift control register 2. The data selector 3 swaps the output of the manual data register 1 between the upper bit and the lower bit when the value indicating the shift direction of the shift control register 2 indicates left, and when it indicates the right, the output value of the manual data register 1 is swapped. select.

シフタ4を構成する21ビツト・セレクタはそれぞれシ
フト制御レジスタのシフト数に従って1つ前の段の出力
を21ビツト・シフトした値かシフトしない元の値かを
選択して出力する。符合補正回路6はシフト制御レジス
タ2が算術右シフトを示す時人力データ・レジスタ2か
らの符合ビット10をシフタ4に与え、符合延長操作を
行ない、その他の場合は正論理「OJを与える。データ
・セレクト5はシフト制御レジスタ2のシフト方向を示
す値が左を示す時シフタ4の出力を上位ビットと下位ビ
ットでスワップさせ、右を示す場合はシフタ4の出力値
を選択する。データ補正されたデータはデータ出力線8
により出力される。
Each of the 21-bit selectors constituting the shifter 4 selects and outputs either a value obtained by shifting the output of the previous stage by 21 bits or an unshifted original value, according to the number of shifts in the shift control register. The sign correction circuit 6 provides the sign bit 10 from the manual data register 2 to the shifter 4 to perform a sign extension operation when the shift control register 2 indicates an arithmetic right shift, and otherwise provides a positive logic "OJ". - Select 5 swaps the output of shifter 4 between the upper and lower bits when the value indicating the shift direction of shift control register 2 indicates left, and selects the output value of shifter 4 when it indicates right. The data is sent to data output line 8.
is output by

本発明では、右方向の単一シフトについて説明したが、
右方向をシフトを左シフトに置き換えることにより、同
様に左方向の単一シックでも構成することができる。
In the present invention, a single rightward shift has been described;
A single chic in the left direction can be constructed as well by replacing the right shift with a left shift.

また、人力データ・レジスタlとデータセレクタ9及び
データ・セレクタ5と出力線8との接続を第4図に示す
ように、バス結合方式にすることにより、上位ビットと
下位ビットをスワップさせるための接続線を簡単に構成
することが可能である。
In addition, as shown in FIG. 4, the connections between the human data register 1 and the data selector 9, and between the data selector 5 and the output line 8 are connected to a bus connection system, so that the upper bits and lower bits can be swapped. It is possible to easily configure the connecting lines.

発明の効果 本発明は、桁移動の補正を行なうデータを必要に応じて
」三位と下位ビットでスワップさせ、必要ビット分布ま
たは左に単一シフトを行ない、再び1位と下位のビット
でスワップさせることにより、桁移動補正による桁落ち
防止のためのビット幅のビット・セレクタが不要になり
、回路規模の小さい任意ビット数の算術シフトができる
という効果がある。
Effects of the Invention The present invention swaps data for correcting digit shift between the third and lower bits as necessary, performs a single shift to the required bit distribution or left, and swaps again between the first and lower bits. By doing so, there is no need for a bit selector for the bit width to prevent digit loss due to digit shift correction, and there is an effect that arithmetic shift of an arbitrary number of bits can be performed with a small circuit scale.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明の一実施例におけるデータ補正回路の
ブロック図、第2図は第1図のシフタ4の詳細な構成を
示すブロック図、第3図は同実施例のデータセレクタ3
.5及びシフタ4を構成するビットセレクタの回路図、
第4図は第1図のデータ・セレクタ3.5の人出力線の
接続を示す構成図、第5図は従来のデータ補正回路の構
成図である。 l・・・人力データレジスタ、 2・・・シフト制御レジスタ、3・・・データセレクタ
、4・・・単一方向シック、5・・・データセレクタ、
6・・・符号補正回路、7・・・シフト制御信号、8・
・・出力線、9・・・符号補正信号、10・・・符号ビ
ット、 11.12・・・人力データラッチ、 31・・・データセレクタ、41・・・シック、70・
・・デコーダ、71・・・左右シフト指示信号、72・
・・シフ)I!指示信号。 代理人の氏名 弁理士 中尾敏男 はか1名第1図 第2図 第3図 第4図
FIG. 1 is a block diagram of a data correction circuit according to an embodiment of the present invention, FIG. 2 is a block diagram showing a detailed configuration of the shifter 4 of FIG. 1, and FIG. 3 is a block diagram of the data selector 3 of the same embodiment.
.. 5 and a circuit diagram of a bit selector configuring shifter 4,
FIG. 4 is a block diagram showing the connection of the human output lines of the data selector 3.5 in FIG. 1, and FIG. 5 is a block diagram of a conventional data correction circuit. l...Manual data register, 2...Shift control register, 3...Data selector, 4...Unidirectional thick, 5...Data selector,
6... Sign correction circuit, 7... Shift control signal, 8.
...Output line, 9...Sign correction signal, 10...Sign bit, 11.12...Manual data latch, 31...Data selector, 41...Sick, 70...
...Decoder, 71...Left and right shift instruction signal, 72.
... Schiff) I! instruction signal. Name of agent: Patent attorney Toshio Nakao (1 person) Figure 1 Figure 2 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】[Claims] 桁移動の補正を行なうデータの各ビットをシフトする方
向により上位と下位でスワップさせるデータ・セレクタ
と、シフト数に応じてデータを右または左の単一方向に
シフトさせるシフタと、前記シフタにより補正されたデ
ータの各ビットをシフトする方向により上位と下位でス
ワップさせるデータ・セレクタと、算術右シフト時に符
号延長を行なう符号補正回路と、補正データを出力する
出力データ・バスとを備えたことを特徴とするデータ補
正回路。
A data selector that performs digit shift correction swaps the upper and lower bits of data depending on the shifting direction, a shifter that shifts data in a single direction to the right or left depending on the number of shifts, and correction using the shifter. The present invention is equipped with a data selector that swaps the upper and lower bits of each bit of data according to the shifting direction, a sign correction circuit that performs sign extension during arithmetic right shift, and an output data bus that outputs correction data. Characteristic data correction circuit.
JP63087455A 1988-04-08 1988-04-08 Data correcting circuit Pending JPH01259415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63087455A JPH01259415A (en) 1988-04-08 1988-04-08 Data correcting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63087455A JPH01259415A (en) 1988-04-08 1988-04-08 Data correcting circuit

Publications (1)

Publication Number Publication Date
JPH01259415A true JPH01259415A (en) 1989-10-17

Family

ID=13915337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63087455A Pending JPH01259415A (en) 1988-04-08 1988-04-08 Data correcting circuit

Country Status (1)

Country Link
JP (1) JPH01259415A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0421025A (en) * 1990-05-15 1992-01-24 Toshiba Corp Left and right shifter
US5708800A (en) * 1994-09-27 1998-01-13 Mitsubishi Denki Kabushiki Kaisha High speed microprocessor for processing and transferring N-bits of M-bit data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60233729A (en) * 1984-04-19 1985-11-20 コンカレント・コンピュ−タ−・コ−ポレイション High-speed barrel shift
JPS61157936A (en) * 1984-12-28 1986-07-17 Matsushita Electric Ind Co Ltd Data shifting circuit
JPS6398729A (en) * 1986-10-15 1988-04-30 Fujitsu Ltd Barrel shifter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60233729A (en) * 1984-04-19 1985-11-20 コンカレント・コンピュ−タ−・コ−ポレイション High-speed barrel shift
JPS61157936A (en) * 1984-12-28 1986-07-17 Matsushita Electric Ind Co Ltd Data shifting circuit
JPS6398729A (en) * 1986-10-15 1988-04-30 Fujitsu Ltd Barrel shifter

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0421025A (en) * 1990-05-15 1992-01-24 Toshiba Corp Left and right shifter
US5708800A (en) * 1994-09-27 1998-01-13 Mitsubishi Denki Kabushiki Kaisha High speed microprocessor for processing and transferring N-bits of M-bit data

Similar Documents

Publication Publication Date Title
JP2674754B2 (en) Barrel shifter
US4472788A (en) Shift circuit having a plurality of cascade-connected data selectors
US4658355A (en) Pipeline arithmetic apparatus
JPH03186924A (en) Divider
US5262971A (en) Bidirectional shifter
US4617641A (en) Operation unit for floating point data having a variable length exponent part
KR0142334B1 (en) Extended Bit Slice Processor Arithmetic Logic Unit
JPH01259415A (en) Data correcting circuit
US20050256996A1 (en) Register read circuit using the remainders of modulo of a register number by the number of register sub-banks
US5708800A (en) High speed microprocessor for processing and transferring N-bits of M-bit data
JPH1063500A (en) Signal processor
JPS622328B2 (en)
JPH0335353A (en) Discrete cosine converting device
SU1762319A1 (en) Device for shift of information
US20020156818A1 (en) Microprocessor comprising an instruction for inverting bits in a binary word
JPH08292876A (en) Arithmetic unit
JPH04330519A (en) Multiplier
JP2615746B2 (en) Bit operation circuit
JPS585838A (en) Shift circuit
JPS61265632A (en) Data correcting circuit
JPH03149656A (en) Arithmetic circuit
JPS5843049A (en) Correcting system of micro electronic computer
JPH0644226B2 (en) Processor
JPH10320221A (en) Processor
JPH11119976A (en) Data dividing parallel shifter