JPH0363816A - Bit retriever - Google Patents

Bit retriever

Info

Publication number
JPH0363816A
JPH0363816A JP20098389A JP20098389A JPH0363816A JP H0363816 A JPH0363816 A JP H0363816A JP 20098389 A JP20098389 A JP 20098389A JP 20098389 A JP20098389 A JP 20098389A JP H0363816 A JPH0363816 A JP H0363816A
Authority
JP
Japan
Prior art keywords
output
logic
data
bit
positive
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.)
Granted
Application number
JP20098389A
Other languages
Japanese (ja)
Other versions
JP2761558B2 (en
Inventor
Hisaki Sasaki
佐々木 久己
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.)
Advantest Corp
Original Assignee
Advantest Corp
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 Advantest Corp filed Critical Advantest Corp
Priority to JP20098389A priority Critical patent/JP2761558B2/en
Publication of JPH0363816A publication Critical patent/JPH0363816A/en
Application granted granted Critical
Publication of JP2761558B2 publication Critical patent/JP2761558B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To attain bit retrieval and output in one cycle by outputting second and third control signals or the most significant bits of both signals corresponding to the state of a first control signal, selecting positive logic data or negative logic data corresponding to the output, and outputting the positive logic output and the negative logic output of an encoder with the priority order selectively. CONSTITUTION:The positive logic data or the negative logic data is supplied to the encoder 22 with the highest priority corresponding to the states of the first-third control signals IAL1-3 with a first logic circuit 11, a multiplexer 12, and a data selector 19. And the positive logic output or the negative logic output of the encoder 22 with the highest priority is outputted corresponding to a second logic circuit 23, an output selector 24, and a fourth control signal IAL4. In such a way, a various kinds of bit retrieval and a various kinds of output forms can be attained in one cycle.

Description

【発明の詳細な説明】 「−産業上の利用分野」 この発明は浮動小数点演算における正規化処理、ビット
検索命令、算術シフトのオーバーフローの検出などに利
用され、最上位ビットより、それと反転するビットが初
めて出現するビット位置を検索するビット検索装置に関
する。
Detailed Description of the Invention "-Industrial Application Field" This invention is used for normalization processing in floating point arithmetic, bit search instructions, overflow detection in arithmetic shift, etc. The present invention relates to a bit search device that searches for a bit position where .

「従来の技術」 32ビノトの入力データに対してlサイクルでビット検
索を実行する装置として従来より第3図に示すように3
2ビンBut先順位エンコーダが使用されている。これ
は第4図に示すように入力データを最上位ビットMSB
より順次下位ビットを見て論理”°l゛のビットが初め
て出現するビット位置nを、最上位ビット位置を31 
+lo) (l O進数表示)番目として2進コード5
ビツトで出力するものである。
``Prior Art'' As a device that performs a bit search in 1 cycle for input data of 32 bits, there is a 3-bit search as shown in Fig. 3.
A 2-bin But-first encoder is used. As shown in Figure 4, this means that the input data is
Looking at the lower bits sequentially, we set the bit position n where the bit with logic "°l" appears for the first time, and the most significant bit position as 31.
+lo) Binary code 5 as (l O base number display) th
It is output in bits.

ビット検索にはこのように最上位ビットから見て最初に
論理“1”が出現するビット位置nを検索する“1”ビ
ット検索(第5図A)の他に、第5図Bに示すように最
上位ビットから見て最初に論理“0”が出現するビット
位置nを検索する“0”ビット検索と、第5図Cに示す
ように最上位ビットから見て最上位ビットの論理S(S
は“0”又は“1”)と反転した論理Sが最初に出現す
るビット位置nを検索する最上位反転ビット検索とがあ
る。しかもこれら第5図A−Cに示す3つの検索方式に
対し、その検索結果nを、第5図りに示すように最上位
ビン)MSBをlO進数で0番目として2進コード5ビ
ツトPBNで出力する(正論理出力)場合と、第5図已
に示すように最上位ビットMSBを10進数で31番目
として2進コード5ビノトNBN (=PBN)で出力
する(負論理出力)場合とがある。
In addition to the "1" bit search (Figure 5A), which searches for the bit position n where logic "1" first appears from the most significant bit, there is also a bit search as shown in Figure 5B. ``0'' bit search, which searches for the bit position n where logic ``0'' first appears from the most significant bit, and logic S (of the most significant bit from the most significant bit) as shown in Figure 5 S
is "0" or "1") and the most significant inverted bit search which searches for the bit position n where the inverted logic S first appears. Furthermore, for these three search methods shown in Figure 5 A to C, the search result n is output as a binary code 5-bit PBN with the MSB as the 0th in the lO base as shown in Figure 5. (positive logic output), and as shown in Figure 5, the most significant bit MSB is set as the 31st decimal number and is output as a binary code of 5 bits NBN (=PBN) (negative logic output). .

従来においてはこれらビット検索方式や出力形式に応じ
て入力データや出力データをソフトウェア処理を行って
おり、そのために数サイクルのデータ整形処理を必要と
していた。
In the past, input data and output data were processed by software according to these bit search methods and output formats, which required several cycles of data shaping processing.

この発明の目的はビット検索方式や出力形式にかかわら
ずlサイクルで実行できるビット検索装置を提供するこ
とにある。
An object of the present invention is to provide a bit search device that can be executed in one cycle regardless of the bit search method or output format.

「課題を解決するための手段」 この発明によれば入力データは第1論理回路で正論理デ
ータ及び負論理データとして出力され、これら正論理デ
ータ及び負論理データの各最上位ビットと、第1.第2
.第3制御信号とがマルチプレクサへ供給され、第1制
御信号の状態に応じて第2.第3制御信号又は上記雨量
上位ビットがマルチプレクサから出力され、その出力に
応じて上記正論理データ又は負論理データがデータセレ
クタで選択され、その選択されたデータは優先順位エン
コーダへ供給され、優先順位エンコーダは入力されたデ
ータを最上位ビットから見て初めて論理“1”となるビ
ット位置を2進数で出力し、その出力は第2論理回路で
正論理出力及び負論理出力として出力され、その正論理
出力又は負論理出力が出力セレクタで第4制御信号の状
態に応じて選択出力される。
"Means for Solving the Problem" According to the present invention, input data is outputted as positive logic data and negative logic data by the first logic circuit, and each of the most significant bits of these positive logic data and negative logic data and the first .. Second
.. A third control signal is provided to the multiplexer, and a second . The third control signal or the upper bit of the rainfall amount is output from the multiplexer, the positive logic data or the negative logic data is selected by the data selector according to the output, and the selected data is supplied to the priority encoder, and the priority encoder The encoder looks at the input data from the most significant bit and outputs the bit position that becomes logic "1" for the first time as a binary number.The output is output as a positive logic output and a negative logic output by the second logic circuit, and the positive A logic output or a negative logic output is selectively outputted by the output selector according to the state of the fourth control signal.

「実施例」 第1図にこの発明の実施例を示す、32ビツトの入力デ
ータ(DB)は第1論理回路11で正論理データ(DB
)と負論理データ(DB)として出力される。その正論
理データ(DB)の最上位ピッ)DBOOと負論理デー
タ(DB)の最上位ビットDBOOとがマルチプレクサ
12内のアンド回路13.14にそれぞれ供給される。
Embodiment FIG. 1 shows an embodiment of the present invention, in which 32-bit input data (DB) is converted into positive logic data (DB) by the first logic circuit 11.
) and are output as negative logic data (DB). The most significant bit DBOO of the positive logic data (DB) and the most significant bit DBOO of the negative logic data (DB) are supplied to AND circuits 13 and 14 in the multiplexer 12, respectively.

マルチプレクサ12内のアンド回路15.16の両者に
第1制御信号IALIが供給され、アンド回路15゜1
6にそれぞれ第2.第3制御信号I AL 2゜IAL
3が供給され、アンド回路15.16の各出力はそれぞ
れオア回路17.18へ供給される。
A first control signal IALI is supplied to both AND circuits 15 and 16 in the multiplexer 12, and the AND circuit 15.1
6 and 2nd respectively. Third control signal IAL 2゜IAL
3 is supplied, and each output of AND circuits 15 and 16 is supplied to OR circuits 17 and 18, respectively.

アンド回路13.14の両者に第1制御信号の反転信号
IALLが供給され、アンド回路13.14の各出力は
それぞれオア回路17.18へ供給される。
The inverted signal IALL of the first control signal is supplied to both AND circuits 13 and 14, and each output of the AND circuits 13 and 14 is supplied to an OR circuit 17 and 18, respectively.

オア回路17.18の各出力がマルチプレクサ12の出
力としてデータセレクタ19へ供給され、これら出力に
応じて第1論理回路11からの正論理データ(DB)又
は負論理データ(DB)が選択される。データセレクタ
19で選択された32ビツトのデータはバス21を通じ
て32ビット優先順位エンコーダ22へ供給される。優
先順位エコーダ22は入力されたデータを最上位ビット
から見て最初に論理“l”となったビット位置を5ビツ
トの2進数として出力するものである。この出力は第2
論理回路23へ供給され、第2論理回路23からその正
論理出力PBNと負論理出力NBNとが出力されて出力
セレクタ24へ供給される。出力セレクタ24は第4制
御信号[AL4により制御され、第4制御信号IAL4
が論理りで正論理出力PBNが選択され、TAL4が論
理Hで負論理出力NBNが選択される。
Each output of the OR circuits 17 and 18 is supplied to the data selector 19 as an output of the multiplexer 12, and positive logic data (DB) or negative logic data (DB) from the first logic circuit 11 is selected according to these outputs. . The 32-bit data selected by data selector 19 is supplied to 32-bit priority encoder 22 via bus 21. The priority echoer 22 looks at the input data from the most significant bit and outputs the bit position that first becomes logical "1" as a 5-bit binary number. This output is the second
The second logic circuit 23 outputs its positive logic output PBN and negative logic output NBN and supplies them to the output selector 24. The output selector 24 is controlled by a fourth control signal [AL4;
When TAL4 is logic high, the positive logic output PBN is selected, and when TAL4 is logic high, the negative logic output NBN is selected.

上述の構成において第1111al信号IALIが論理
l、の場合は、アンド回路13.14が阻止され、アン
ド回路15.16が通過になって、第2.第3制御信号
IAL2.IAL3がそれぞれオア回路17.18より
出力され、第2制御信号IAL2が論理りで第3制御信
号IAL3が論理Hの場合はデータセレクタ19で負論
理データ(DB)が選択され、従って優先順位エンコー
ダ22では入力データ(DB)に対して“O″ビツト検
索行ったことになる。第2制御信号IAL2が論理Hで
第3制御信号IAL3が論理りの場合はデータセレクタ
19で正論理データ(DB)が選択され、優先順位エン
コーダ22では入力データ(DB)に対し″1″ビット
検索を行ったことになる。
In the above configuration, when the 1111al signal IALI is logic 1, the AND circuit 13.14 is blocked, the AND circuit 15.16 is passed, and the second . Third control signal IAL2. IAL3 is output from the OR circuits 17 and 18, and when the second control signal IAL2 is logical and the third control signal IAL3 is logical H, the data selector 19 selects negative logic data (DB), and therefore the priority encoder In step 22, an "O" bit search is performed on the input data (DB). When the second control signal IAL2 is logical H and the third control signal IAL3 is logical, the data selector 19 selects positive logic data (DB), and the priority encoder 22 selects the "1" bit for the input data (DB). You will have performed a search.

一方策1制御信号IALIが論理Hの場合は、アンド回
路15.16が阻止され、アンド回路13゜14が通過
となり、正論理データ(DB)と負論理データ(DB)
との各最上位ピッ[1BooとDBOOとの反転したも
のがオア回路17.18より出力され、DBOOが論理
りの場合はオア回路17.18の各出力はそれぞれ論理
H,Lとなり、データセレクタ19で正論理データ(D
B)が選択され、最上位ピッ)DBOOが論理L(“0
”)に対し、最初に論理“1”となるビット位置を優先
順位エンコーダ22で検索し、DBOOが論理Hの場合
はオア回路17.18の各出力はそれぞれ論理り、Hと
なり、データセレクタ19で負論理データ(DB)が選
択され、入力データ(DB)について最上位ピッ[)B
OOが論理H(l″)に対し、最初に論理0”となるビ
ット位置を優先順位エンコーダ22で検索したことにな
る。つまり第1I11御信号IALIが論理Hの場合は
入力データ(DB)に対し最上位反転ビット検索が行わ
れる。
On the other hand, when control signal IALI is logic H, AND circuits 15 and 16 are blocked, AND circuits 13 and 14 are passed, and positive logic data (DB) and negative logic data (DB)
The inverted values of Boo and DBOO are output from the OR circuit 17.18, and when DBOO is logical, the outputs of the OR circuit 17.18 become logical H and L, respectively, and the data selector 19, positive logic data (D
B) is selected and the topmost pin) DBOO is set to logic L (“0”).
”), the priority encoder 22 first searches for the bit position where the logic is “1”, and if DBOO is the logic H, each output of the OR circuit 17 and 18 is logic logic and becomes H, and the data selector 19 Negative logic data (DB) is selected in
This means that the priority encoder 22 searches for the bit position where OO becomes logic 0'' for logic H (l''). That is, when the first I11 control signal IALI is at logic H, the most significant inverted bit search is performed on the input data (DB).

このようにして入力データ(DB)に対して″0″ビッ
ト検索、“1″ビツト検索、最上位反転ビット検索が、
第1.第2.第3制御信号TALL。
In this way, "0" bit search, "1" bit search, and most significant inverted bit search for input data (DB) are performed.
1st. Second. Third control signal TALL.

IAL2.IAL3の状態により行われ、その結果が優
先順位エンコーダ22から出力される。この出力は第2
論理回路23で正論理出力と負論理出力とされ、第4制
御信号rAL4が論理りの場合は正論理出力PBNが出
力セレクタ24で選択され、IAL4が論理Hの場合は
負論理出力NBNが選択され、最上位ビットを0番目と
した場合の検索結果出力と最上位ビットを31番目とし
た場合の検索結果出力とを選択的に得ることができる。
IAL2. This is done based on the state of IAL3, and the result is output from the priority encoder 22. This output is the second
The logic circuit 23 outputs a positive logic output and a negative logic output. When the fourth control signal rAL4 is logic high, the output selector 24 selects the positive logic output PBN, and when IAL4 is logic high, the negative logic output NBN is selected. Thus, it is possible to selectively obtain a search result output when the most significant bit is the 0th bit and a search result output when the most significant bit is the 31st bit.

第1〜第4制御信号IALI〜IAL4の各状態に対す
る、検索方式と出力形式との関係を第2図に示す。
FIG. 2 shows the relationship between the search method and output format for each state of the first to fourth control signals IALI to IAL4.

なお、入力データ(DB)が全ビット″0”又は全ビッ
ト″1″でビット検索ができない場合は優先順位エンコ
ーダ22の端子25からオーバーフローとして論理Hが
出力される。
Note that if the input data (DB) is all bits "0" or all bits "1" and the bit search cannot be performed, a logic H is output from the terminal 25 of the priority encoder 22 as an overflow.

「発明の効果」 以上述べたようにこの発明によれば1つの優先順位エン
コーダ22を使用して、第tt*理回路11、マルチプ
レクサ12、データセレクタ19により第1〜第3制御
信号IALI〜IAL3の状態に応じて正論理データ又
は負論理データを優先順位エンコーダ22へ供給し、第
2論理回路23と出力セレクタ24とにより第4制御信
号IAL4に応じて優先順位エンコーダ22の正論理出
力又は負論理出力を出力することにより、1サイクルで
各種のビット検索、各種の出力形式とすることができる
"Effects of the Invention" As described above, according to the present invention, one priority encoder 22 is used to control the first to third control signals IALI to IAL3 by the tt* logic circuit 11, the multiplexer 12, and the data selector 19. The second logic circuit 23 and output selector 24 supply positive logic data or negative logic data to the priority encoder 22 according to the state of By outputting logical outputs, various bit searches and various output formats can be performed in one cycle.

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

第1図はこの発明の実施例を示すブロック図、第2図は
その制御信号の状態とビット検索方式と出力形式との関
係を示す図、第3図は従来のビット検索装置を示すブロ
ック図、第4図はその入力データと出力データとを示す
図、第5図は各種ビット検索方式と出力形式とを示す図
である。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing the relationship between the state of the control signal, the bit search method, and the output format, and FIG. 3 is a block diagram showing a conventional bit search device. , FIG. 4 is a diagram showing the input data and output data, and FIG. 5 is a diagram showing various bit search methods and output formats.

Claims (1)

【特許請求の範囲】[Claims] (1)入力データを正論理データ及び負論理データとし
て出力する第1論理回路と、 これら正論理データ及び負論理データの各最上位ビット
と、第1、第2、第3制御信号とが入力され、その第1
制御信号の状態に応じて上記第2、第3制御信号又は上
記両最上位ビットを出力するマルチプレクサと、 そのマルチプレクサの出力に応じて上記正論理データ又
は負論理データを選択するデータセレクタと、 そのデータセレクタの出力データが供給され、その最上
位ビットから見て初めて論理“1”となるビット位置を
2進数で出力する優先順位エンコーダと、 その優先順位エンコーダの出力を正論理出力及び負論理
出力として出力する第2論理回路と、第4制御信号の状
態に応じて上記第2論理回路の正論理出力又は負論理出
力を選択出力する出力セレクタと、 を具備するビット検索装置。
(1) A first logic circuit that outputs input data as positive logic data and negative logic data, and the most significant bits of these positive logic data and negative logic data, and first, second, and third control signals are inputted. The first
a multiplexer that outputs the second and third control signals or both of the most significant bits according to the state of the control signal; a data selector that selects the positive logic data or the negative logic data according to the output of the multiplexer; A priority encoder that is supplied with the output data of the data selector and outputs the bit position that becomes logic "1" for the first time from the most significant bit in binary, and outputs the output of the priority encoder as a positive logic output and a negative logic output. 1. A bit search device comprising: a second logic circuit that outputs a second logic circuit; and an output selector that selectively outputs a positive logic output or a negative logic output of the second logic circuit according to a state of a fourth control signal.
JP20098389A 1989-08-02 1989-08-02 Bit search device Expired - Fee Related JP2761558B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20098389A JP2761558B2 (en) 1989-08-02 1989-08-02 Bit search device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20098389A JP2761558B2 (en) 1989-08-02 1989-08-02 Bit search device

Publications (2)

Publication Number Publication Date
JPH0363816A true JPH0363816A (en) 1991-03-19
JP2761558B2 JP2761558B2 (en) 1998-06-04

Family

ID=16433561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20098389A Expired - Fee Related JP2761558B2 (en) 1989-08-02 1989-08-02 Bit search device

Country Status (1)

Country Link
JP (1) JP2761558B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005027403A1 (en) * 2003-09-11 2005-03-24 Renesas Technology Corp. Information processing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005027403A1 (en) * 2003-09-11 2005-03-24 Renesas Technology Corp. Information processing device
JPWO2005027403A1 (en) * 2003-09-11 2006-11-24 株式会社ルネサステクノロジ Information processing equipment

Also Published As

Publication number Publication date
JP2761558B2 (en) 1998-06-04

Similar Documents

Publication Publication Date Title
EP0047440A1 (en) Shift circuit
JPH06236252A (en) Leading-zero two-stage and multistage detection unit for detection of number of leading zeros in mantissa part of floating-point number, floating-point left-shift mantissa normalization unit and method for detection of number of leading zeros
JP3378444B2 (en) Shift circuit
JPH0426731B2 (en)
JPH0746310B2 (en) Semiconductor logic circuit
US20030131029A1 (en) Barrel shifter
US4745569A (en) Decimal multiplier device and method therefor
JP3507517B2 (en) Position detection circuit for the end "1" bit in the binary number
JPH0363816A (en) Bit retriever
US6012077A (en) Method and apparatus for indicating overflow status of bit-variable data employing pipelining adder
US4773033A (en) Binary data identification circuit
US4335372A (en) Digital scaling apparatus
JPS5979495A (en) Shift circuit
JP2565730B2 (en) Overflow detection circuit
JPS62256035A (en) Shift mechanism for program control in program unit having variable data bus range
JP3535670B2 (en) Floating point mantissa normalization circuit
JP2558739B2 (en) Absolute value circuit
JPS63111534A (en) Semiconductor integrated circuit
JPS6288031A (en) Register filing system
JPS62135932A (en) Bit shifting device
JPH0566922A (en) Decimal arithmetic circuit
JPH0318926A (en) Arithmetic circuit
JPH0362622A (en) Circuit converting fixed decimal point data into floating decimal point data
JPS61157935A (en) Arithmetic logic unit
JPH0318925A (en) Arithmetic circuit

Legal Events

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