JPH0727452B2 - Priority Encoder - Google Patents

Priority Encoder

Info

Publication number
JPH0727452B2
JPH0727452B2 JP7187787A JP7187787A JPH0727452B2 JP H0727452 B2 JPH0727452 B2 JP H0727452B2 JP 7187787 A JP7187787 A JP 7187787A JP 7187787 A JP7187787 A JP 7187787A JP H0727452 B2 JPH0727452 B2 JP H0727452B2
Authority
JP
Japan
Prior art keywords
search
bit
output
encoder
information
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
JP7187787A
Other languages
Japanese (ja)
Other versions
JPS63239526A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP7187787A priority Critical patent/JPH0727452B2/en
Publication of JPS63239526A publication Critical patent/JPS63239526A/en
Publication of JPH0727452B2 publication Critical patent/JPH0727452B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、2値化された複数ビットからなる情報を高
速に検索するプライオリティ・エンコーダ(Priority E
ncoder)に関する。
DETAILED DESCRIPTION OF THE INVENTION Object of the Invention (Industrial field of application) The present invention relates to a priority encoder (Priority E) that searches for information consisting of a plurality of binarized bits at high speed.
ncoder) regarding.

(従来の技術) プライオリティ・エンコーダ(以下「Pエンコーダ」と
呼ぶ)は、2値化(“0",“1")された複数ビット長の
論理データ(以下「検索情報」と呼ぶ)を最下位ビット
(LSB)方向あるいは最上位ビット(MSB)方向から検索
(スキャン)して、最初に“1"あるいは“0"となってい
るビット位置を検出し、このビット位置をバイナリーコ
ード(BCD)で表わすものである。
(Prior Art) A priority encoder (hereinafter referred to as “P encoder”) uses binary (“0”, “1”) logical data having a plurality of bit lengths (hereinafter referred to as “search information”). Search (scan) from the lower bit (LSB) direction or the most significant bit (MSB) direction to detect the bit position where the bit is "1" or "0" first, and this bit position is the binary code (BCD) It is represented by.

すなわち、Pエンコーダは、2(n=1,2……)のビッ
ト長の検索情報に対してバイナリーコードでのnビット
の出力を与えるものである。例えば、検索情報がn=5
(32ビット)における最初に“1"となっているビット位
置のエンコーダ出力を第11図(A)及び同図(B)に示
す。第11図(A)は、検索情報を最下位ビット方向(以
下「右方向」と呼ぶ)から検索した時に最初に“1"とな
っているビット位置とこれに対応するバイナリーコード
出力を示しており、第11図(B)は、最上位ビット方向
(以下「左方向」と呼ぶ)から検索した時に最初に“1"
となっているビット位置とこれに対応するバイナリーコ
ード出力を示している。なお、第11図(A)及び同図
(B)、さらには、以下に示す図において、X印は“0"
または“1"であってもかまわないこと(don't care)を
示している。
That is, the P encoder gives an n-bit output as a binary code to search information having a bit length of 2 (n = 1, 2 ...). For example, if the search information is n = 5
The encoder output at the first bit position of "1" in (32 bits) is shown in FIGS. 11 (A) and 11 (B). FIG. 11 (A) shows the bit position which is first "1" when the search information is searched from the least significant bit direction (hereinafter referred to as "right direction") and the corresponding binary code output. In FIG. 11 (B), when searching from the most significant bit direction (hereinafter referred to as “left direction”), “1” is first displayed.
Indicates the bit position and the corresponding binary code output. In addition, in FIG. 11 (A) and FIG. 11 (B), and in the following figures, the X mark is “0”.
Or it indicates that it may be "1"(don't care).

第12図は検索情報のビット長が小さい場合、例えば8ビ
ットの検索情報を検索するPエンコーダの構成図であ
る。同図に示すPエンコーダは、検索情報7i〜0iを各種
論理ゲートの組み合せにより、第13図に示すように、左
方向から検索して最初に“1"となっているビット位置を
3ビット(4d,2b,1b)のバイナリーコードで出力するも
のであり、下位ビットの検索は上位ビットの検索結果に
依存している。
FIG. 12 is a block diagram of a P encoder that searches, for example, 8-bit search information when the bit length of the search information is small. The P encoder shown in the same figure searches the search information 7i to 0i by combining various logic gates from the left as shown in FIG. 4d, 2b, 1b) is output as a binary code, and the lower bit search depends on the upper bit search result.

第12図において、Ei=“0"の時には検索情報7i〜0iより
得られる出力(4b,2b,1b)がそのまま出力される。一
方、Ei=“1"の時には、出力(4b,2b,1b)は強制的にす
べて“0"となり、 を入力するとNANDゲートの出力Eoも強制的に“1"とな
る。このEoはEi=“0"から7i〜0iがすべて“0"でのみ
“0"になり、他の場合は“1"となる。すなわち、第12図
に示した8ビットのPエンコーダを複数用いて検索情報
のビット長を増やす場合に、Ei,Eoは上位ビット側の検
索情報がすべて“0"であるか否かを下位ビット側へ示す
ものとなる。
In FIG. 12, when Ei = “0”, the outputs (4b, 2b, 1b) obtained from the search information 7i to 0i are output as they are. On the other hand, when Ei = "1", all outputs (4b, 2b, 1b) are forced to "0", When is input, the output Eo of the NAND gate is forcibly set to "1". This Eo becomes "0" only when Ei = "0" to 7i to 0i are all "0", and becomes "1" in other cases. That is, when the bit length of the search information is increased by using a plurality of 8-bit P encoders shown in FIG. 12, Ei and Eo determine whether the search information on the upper bit side is all “0” or lower bit. It will be shown to the side.

第14図は第12図で示した8ビットのPエンコーダをカス
ケード接続し、32ビットの検索情報を左方向から検索し
て検索結果をバイナリーコード出力(PE4〜PE0)で与え
るPエンコーダの構成図である。
FIG. 14 is a block diagram of the P encoder shown in FIG. 12, in which the 8-bit P encoder is cascade-connected, 32-bit search information is searched from the left and the search result is given as a binary code output (PE4 to PE0). Is.

同図に示すPエンコーダは、それぞれの8ビットのPエ
ンコーダ(P4,P3,P2,P1)の対応するそれぞれの出力をN
ORゲート(NO1,NO2,NO3)に入力し、それぞれのNORゲー
トの反転出力をバイナリーコードにおける下位側3ビッ
トの出力(PE2,PE1,PE0)としている。さらに、カスケ
ード接続されたPエンコーダ(P4〜P1)において、前述
した上位ビット側のPエンコーダのEoが下位ビット側の
PエンコーダのEiとして与えられており、上位ビット側
のEoが“1"の時には、下位ビット側のすべてのPエンコ
ーダのEiが“1"となるとともに、出力もすべて“0"とな
る。すなわち、検索情報を左方向から検索して最初に
“1"となっているビット位置が検出されると、このビッ
トを含まない下位側のすべてのPエンコーダは、入力さ
れる検索情報にかかわらずその出力が“0"となる。
The P encoder shown in the same figure outputs the respective outputs corresponding to the respective 8-bit P encoders (P4, P3, P2, P1) to N.
It is input to the OR gates (NO1, NO2, NO3), and the inverted output of each NOR gate is used as the output (PE2, PE1, PE0) of the lower 3 bits in the binary code. Furthermore, in the cascade-connected P encoders (P4 to P1), the Eo of the P encoder on the higher-order bit side is given as the Ei of the P encoder on the lower-order bit side, and the Eo of the higher-order bit side is "1". At times, the Ei of all P encoders on the lower bit side become "1" and all outputs also become "0". That is, when the search information is searched from the left and the first bit position of "1" is detected, all lower P encoders that do not include this bit are irrespective of the input search information. The output becomes "0".

一方、上位側2ビットの出力(PE4,PE3)は、それぞれ
のPエンコーダ(P4,P3,P2,PE1)のEo4、Eo3,Eo2,Eo1
4ビットの入力とするPエンコーダP5の出力の下位側2
ビットとして与えられている。
On the other hand, the higher-order 2-bit output (PE4, PE3) is a P-encoder P5 that inputs Eo 4 , Eo 3 , Eo 2 , Eo 1 of each P-encoder (P4, P3, P2, PE1) as a 4-bit input. Lower side of the output of 2
It is given as a bit.

また、このカスケード接続によるPエンコーダにおいて
は、下位ビット側へのEoの伝搬が直列になっているため
に、速度が遅いものとなっていた。そこで、第15図に示
すように、Eoの論理和をとることによりそれぞれEiを求
めるようにして、Eoの伝搬を速めることも行なわれてい
る。
Further, in the P encoder by this cascade connection, the speed is slow because the propagation of Eo to the lower bit side is serial. Therefore, as shown in FIG. 15, Ei is obtained by calculating the logical sum of Eo to accelerate the propagation of Eo.

ところで、上述したPエンコーダは、検索情報を左方向
から検索を行ない、下位ビット側の検索が上位ビット側
の検索結果に依存するような構成になっている。このよ
うな構成において、右方向からの検索を行なう場合に、
第11図(A)に示す右方向からのバイナリーコード出力
は、第11図(B)に示す検索情報の並び方を逆にした検
索情報(0ビット目の検索情報を31ビット目、1ビット
目の検索情報を30ビット目、…以下同様とする。)のバ
イナリーコード出力をビット毎に反転することによって
得ている。
By the way, the above-mentioned P encoder is configured to search the search information from the left, and the search on the lower bit side depends on the search result on the higher bit side. In such a configuration, when performing a search from the right,
The binary code output from the right direction shown in FIG. 11 (A) is the search information in which the arrangement of the search information shown in FIG. 11 (B) is reversed (search information of 0th bit is 31st bit, 1st bit The search information of the 30th bit is the same as the following.) Binary code output is obtained by inverting each bit.

このように、左右両方向からの検索を行なう従来のPエ
ンコーダは、どちらか一方からの検索を行なうPエンコ
ーダに、検索情報の並び方を逆にする回路(図示せず)
と、バイナリーコード出力の1の補数を算出する回路
(図示せず)が付加されている。
As described above, the conventional P encoder that performs a search from both left and right directions has a circuit (not shown) that reverses the arrangement of search information to the P encoder that performs a search from either one.
And a circuit (not shown) for calculating the one's complement of the binary code output is added.

(発明が解決しようとする問題点) 以上説明したように、従来のPエンコーダは両方向から
の検索を同等に扱うように構成されておらず、どちらか
一方からの検索に対してのみ最適化されている。このた
め、両方向からの検索を行なうためには、検索情報の並
び換え及び出力のビット毎の反転という操作を行なわな
ければならなかった。したがって、このような操作を行
なうためのハードウェアが必要となり、ハードウェアの
増加及び検索時間の低下を招いていた。
(Problems to be Solved by the Invention) As described above, the conventional P encoder is not configured to handle searches from both directions equally, and is optimized only for searches from either one. ing. Therefore, in order to perform a search from both directions, it is necessary to rearrange the search information and invert the output bit by bit. Therefore, hardware for performing such an operation is required, resulting in an increase in hardware and a decrease in search time.

このような問題は、検索情報のビット数が比較的少な
く、高速な検索を要求されていなかった従来では、さほ
ど問題とはならなかった。しかしながら、最近ではコン
ピュータの急速な高度化に伴い、検索情報のビット数も
増加する傾向にあり、また、検索の高速化が要求され、
一方向からの検索に対して最適化されたPエンコーダで
は対応することが困難になってきている。
Such a problem was not so serious in the conventional case where the number of bits of search information was relatively small and a high-speed search was not required. However, recently, with the rapid sophistication of computers, the number of bits of search information tends to increase, and higher speed search is required.
It is becoming difficult for a P encoder optimized for a search from one direction to handle it.

そこで、この発明は、上記に鑑みてなされたものであ
り、その目的とするところは、両方向からの検索を同等
の検索時間で行ない、高速な検索を行なうことができる
プライオリティ・エンコーダを提供することにある。
Therefore, the present invention has been made in view of the above, and an object of the present invention is to provide a priority encoder capable of performing a search from both directions in an equivalent search time and performing a high-speed search. It is in.

[発明の構成] (問題点を解決するための手段) 上記目的を達成するために、この発明は、2値のビット
情報からなる検索情報を最上位あるいは最下位ビット方
向から検索して最初に一方のビット情報となっているビ
ット位置を検出する検索作業を行ない、このビット位置
を示すエンコーダ出力を与えるプライオリティ・エンコ
ーダにして、 前記検索情報を所定のビット長に分割した単位検索情報
のそれぞれに対して検索作業を行ない、それぞれエンコ
ード出力を与えるとともに、前記単位検索情報がすべて
他方のビット情報であることを示す検出信号をそれぞれ
出力する検索手段と、前記検索手段のそれぞれの検出信
号及び検索方向を示す検索信号により前記検索情報のエ
ンコード出力の一部を生成する生成手段と、前記検出信
号及び前記検索信号により選択信号を生成する選択信号
生成手段と、前記検索手段のそれぞれのエンコード出力
の中から前記選択信号にしたがって前記検索情報のエン
コード出力の一部として所定のエンコード出力を選択す
る選択手段とから構成される。
[Structure of the Invention] (Means for Solving Problems) In order to achieve the above object, the present invention first searches for search information composed of binary bit information from the most significant bit direction or the least significant bit direction. Performing a search operation to detect the bit position that is one of the bit information, and making it a priority encoder that gives an encoder output indicating this bit position, each of the unit search information obtained by dividing the search information into a predetermined bit length. Search means for performing a search operation for each of them, giving an encoded output to each, and outputting a detection signal indicating that the unit search information is all the other bit information, and a detection signal and a search direction of each of the search means. Generating means for generating a part of the encoded output of the search information by the search signal indicating A selection signal generating means for generating a selection signal according to the search signal; and a selection means for selecting a predetermined encoded output as a part of the encoded output of the search information according to the selection signal from the respective encoded outputs of the searching means. Composed of.

(作用) この発明のプライオリィ・エンコーダは、多数ビットか
らなる検索情報の中から検出されたビット情報の位置を
示すエンコード出力の一部を、それぞれの検出信号及び
検索信号から生成し、残りの部分をそれぞれの単位検索
情報に対するエンコード出力の中から選択信号にしたが
って選択されたエンコード出力とするようにした。
(Operation) The priority encoder of the present invention generates a part of the encoded output indicating the position of the bit information detected from the search information consisting of a large number of bits from each detection signal and the search signal, and the remaining part. Is an encoded output selected according to a selection signal from encoded outputs for each unit search information.

(実施例) 以下図面を用いてこの発明の一実施例を説明する。Embodiment An embodiment of the present invention will be described below with reference to the drawings.

第1図はこの発明の一実施例に係るプライオリィ・エン
コーダの構成図である。同図に示すPエンコーダは、32
ビット長の検索情報を検索方向を示す検索信号PER(右
方向)及びPEL(左方向、PERの反転信号)にしたがって
検索を行ない、最初に“1"となっているビット位置を5
ビットのエンコード出力(PE4,PE3,PE2,PE1,PE0)によ
りバイナリーコードで表わすものである。以下第1図に
示すPエンコーダの構成を、第2図乃至第10図を用いて
詳細に説明する。
FIG. 1 is a block diagram of a priority encoder according to an embodiment of the present invention. The P encoder shown in FIG.
The search information of the bit length is searched according to the search signals PER (right direction) and PEL (left direction, inverted signal of PER) indicating the search direction, and the first bit position of "1" is 5
It is represented by a binary code by bit encoding outputs (PE4, PE3, PE2, PE1, PE0). The configuration of the P encoder shown in FIG. 1 will be described in detail below with reference to FIGS. 2 to 10.

まず、32ビットの検索情報を4ビット幅のブロックに分
割し、それぞれのブロックの4ビットの検索情報をそれ
ぞれ対応するPエンコーダ(以下「<G>,<M>,<
I>,<J>,<K>,<L>,<M>,<N>」と呼
ぶ)で検索を行なう。
First, the 32-bit search information is divided into 4-bit width blocks, and the 4-bit search information of each block is divided into corresponding P encoders (hereinafter “<G>, <M>, <
"I>, <J>, <K>, <L>, <M>, <N>").

第2図はこの<α>(α=G〜N)の具体的な構成を示
す図であり、<α>は同一構成になっている。
FIG. 2 is a diagram showing a specific structure of this <α> (α = G to N), and <α> has the same structure.

第2図において、<α>は論理ゲートの組み合わせによ
って、右方向からの検索時には4ビットの検索情報(D3
〜D0)のバイナリーコードでのエンコード出力PRα1
(1ビット目),PRα0(0ビット目)の反転信号▲
▼,▲▼を生成し、左方向からの検索時
にはそのエンコード出力PLα1,PLα0の反転信号▲
▼,▲▼を生成するものである。さらに、
4ビットの検索情報(D3〜D0)がすべて“0"の場合にの
み“1"となる零検出信号α(α=G〜N)を検索情報
(D3〜D0)を入力とするNORゲートを用いて生成するも
のである。このような<α>において、4ビットの検索
情報(D3〜D0)におけるエンコード出力PRα,PLαは、
第3図(A)に示すようになる。なお、第3図(B)
は、エンコード出力PRα,PLαのブール(Boole)表現を
示した図である。
In FIG. 2, <α> is a combination of logic gates, and 4-bit search information (D 3
~ D 0 ) encoded output in binary code PRα1
Inversion signal of (1st bit), PRα0 (0th bit) ▲
Generates ▼ and ▲ ▼, and when searching from the left direction, the inverted signals of the encoded outputs PLα1, PLα0 ▲
▼ and ▲ ▼ are generated. further,
Input the search information (D 3 to D 0 ) to the zero detection signal α (α = G to N) that becomes “1” only when the 4-bit search information (D 3 to D 0 ) is all “0”. It is generated by using a NOR gate. In such <α>, the encoded outputs PRα and PLα in the 4-bit search information (D 3 to D 0 ) are
It becomes as shown in FIG. Incidentally, FIG. 3 (B)
FIG. 6 is a diagram showing a Boolean expression of encoded outputs PRα and PLα.

また、<α>で生成される零検出信号αのうち、零検出
信号GとH,IとJ,KとL,MとNの論理積を、零検出信号C,
D,E,F(C=G・H,D=I・J,E=K・L,F=M・N)と
し、さらに、この零検出信号C,D,E,Fのうち、零検出信
号CとD,EとFの論理積を、零検出信号A,B(A=C・D,
B=E・F)とする。零検出信号C,D,E,Fは、第4図に示
すように、上位ビットから8ビット幅毎の検索情報の零
検出信号となり、零検出信号Aは上位16ビット、零検出
信号Bは下位16ビットの零検出信号となる。
Further, in the zero detection signal α generated by <α>, the logical product of the zero detection signals G and H, I and J, K and L, M and N is calculated as the zero detection signal C,
D, E, F (C = G · H, D = I · J, E = K · L, F = M · N), and zero detection among the zero detection signals C, D, E, F The logical product of the signals C and D, E and F is calculated as the zero detection signals A and B (A = C · D,
B = EF). As shown in FIG. 4, the zero detection signals C, D, E, F become zero detection signals of search information for every 8 bits from the upper bit, the zero detection signal A is the upper 16 bits, and the zero detection signal B is It is the lower 16-bit zero detection signal.

第5図は<G>〜<N>のそれぞれの零検出信号を生成
するための構成を示す図である。
FIG. 5 is a diagram showing a configuration for generating each zero detection signal of <G> to <N>.

零検出信号Cは、零検出信号G,Hの否定論理積をとり、
さらにこの結果を反転することにより得ており、零検出
信号Dも零検出信号Cと同様である。また、零検出信号
Aは、零検出信号G,H及びI,Jのそれぞれの否定論理積を
とり、それぞれの結果の否定論理和をとることにより得
ている。なお、零検出信号B,E,Fは、零検出信号K,L,M,N
により上述したと同様にして得ている。
The zero detection signal C is the NAND of the zero detection signals G and H,
Further, this result is obtained by inverting, and the zero detection signal D is the same as the zero detection signal C. Further, the zero detection signal A is obtained by taking the NAND of each of the zero detection signals G, H and I, J and taking the NOR of the respective results. The zero detection signals B, E, F are zero detection signals K, L, M, N.
Is obtained in the same manner as described above.

このようにして得られる零検出信号A〜Nを用いて、こ
の実施例のPエンコーダは、そのエンコード出力(PE4
〜PE0)のうち、<G>〜<N>のそれぞれのエンコー
ド出力の中から零検出信号A〜N及び検索信号PER
(“1"の時は右方向からの検索を示す、“0"の時には左
方向からの検索を示す)にしたがって選択された2ビッ
トのエンコード出力を、下位のエンコード出力PE1,PE0
として、零検出信号A〜N及び検索信号PERから、上位
のエンコード出力PE4,PE3,PE2を得るようにしている。
By using the zero detection signals A to N obtained in this way, the P encoder of this embodiment outputs its encoded output (PE4
-PE0), the zero detection signals A to N and the search signal PER are selected from the respective encoded outputs of <G> to <N>.
The 2-bit encode output selected in accordance with (1 indicates a search from the right direction, "0" indicates a search from the left direction), lower-order encode outputs PE1 and PE0
As a result, the higher-order encoded outputs PE4, PE3, PE2 are obtained from the zero detection signals A to N and the search signal PER.

次に、Pエンコーダのエンコード出力(PE4〜PE0)が、
零検出信号A〜N及び検索信号PERからどのようにして
得られるかを説明する。
Next, the encode output (PE4 to PE0) of the P encoder is
How to obtain from the zero detection signals A to N and the search signal PER will be described.

第6図は左右両方向の検索時に、エンコード出力(PE4
〜PE0)と零検出信号A〜Nとの関係を示す図である。
なお、第6図において、<G>〜<H>はそれぞれの回
路の2ビットのエンコード出力を示しており、また、A
=B=“1"の時には検索情報はすべて“0"としている。
Figure 6 shows the encoded output (PE4
~ PE0) and zero detection signals A to N.
In FIG. 6, <G> to <H> represent 2-bit encoded outputs of the respective circuits, and A
= B = “1”, the search information is all “0”.

第6図において、例えば右方向からの検索(PER=
“1")であって零検出信号B,D,Jがそれぞれ“1",“0",
“1"の場合には、零検出信号Iは“0"となるので、20ビ
ット目〜23ビット目に最初の“1"が存在することがわか
る。したがって、上位側のエンコード出力PE4,3,2は
“1,0,1"となり、下位側のエンコード出力PE1,0は<I
>の右方向からエンコード出力によって得られる。
In FIG. 6, for example, a search from the right direction (PER =
"1") and the zero detection signals B, D, J are "1", "0",
In the case of "1", the zero detection signal I becomes "0", so it can be seen that the first "1" exists in the 20th to 23rd bits. Therefore, the high-order side encode output PE4,3,2 is "1,0,1", and the low-order side encode output PE1,0 is <I
It is obtained by encoding output from the right side of>.

このようにして、エンコード出力PE4〜PE2は、零検出信
号A〜Nと検索信号PERから容易に求められ、両方向か
らの検索時におけるエンコード出力(PE4〜PE2)は、第
6図から次式に示すように表わされる。
In this way, the encode outputs PE4 to PE2 can be easily obtained from the zero detection signals A to N and the search signal PER, and the encode outputs (PE4 to PE2) at the time of searching from both directions can be calculated by the following equation from FIG. Represented as shown.

PE4=PER・B+▲▼・ ここで、PEL=▲▼ PE3=PER(B・D+・F)+ ▲▼(A・+・) =PER(B・D+・F)+ ▲▼(A・+) ここで、A=C・Dより・= B=E・Fより・F=・F PE2=PER(B・D・H+B・・J+ +・F・L+・・N) +▲▼(A・E・+A・・+ +・C・+・・) =PER(B・D・H+B・・J+ +・F・L+・N) +▲▼(A・E・+A・・+ +C・・+・) ここで、・C=C・ ・= 一方、PE1,PE0は、<G>〜<N>のエンコード出力を
2段のセレクタ回路により選択し得ている。
PE4 = PER ・ B + ▲ ▼ ・ where PEL = ▲ ▼ PE3 = PER (B ・ D + ・ F) + ▲ ▼ (A ・ + ・) = PER (B ・ D + ・ F) + ▲ ▼ (A ・ + ) Here, from A = C ・ D ・ = B = E ・ F ・ F = ・ F PE2 = PER (B ・ D ・ H + B ・ ・ J + + ・ F ・ L + ・ ・ N) + ▲ ▼ (A ・E ・ + A ・ ・ ++ ・ C ・ + ・ ・) = PER (B ・ D ・ H + B ・ ・ J + + ・ F ・ L + ・ N) + ▲ ▼ (A ・ E ・ + A ・ ・ + + C ・ ・ + ・) Here, · C = C ·· = On the other hand, PE1 and PE0 can select the encoded outputs of <G> to <N> by a two-stage selector circuit.

1段目の第1セレクタ回路は、<G>〜<N>を(<G
>,<H>)、(<I>、<J>),(<K>,<L
>)、(<M>,<N>)となるように組み合わせて4
つのブロックに分割し、第1セレクト信号にしたがっ
て、それぞれのブロックの1ビット目のエンコード出力
の反転信号▲▼,▲▼及び0ビット目
のエンコード出力の反転信号▲▼,▲
▼の中からそれぞれ1出力ずつ選択するものである。
The first selector circuit in the first stage outputs <G> to <N>(<G>
>, <H>), (<I>, <J>), (<K>, <L
>), (<M>, <N>) to be combined 4
It is divided into two blocks, and the inversion signals ▲ ▼ and ▲ ▼ of the 1st bit encode output and the inversion signals ▲ ▼ and ▲ of the 0th bit encode output of each block according to the first select signal.
One output is selected from each of ▼.

第7図は一例として(<G>,<M>)のブロックにお
ける第1セレクタ回路の構成を示す図である。なお、他
のブロックの第1セレクタ回路にあってもこの(<G
>,<H>)のブロックと同様の構成となっている。
FIG. 7 is a diagram showing the configuration of the first selector circuit in the block (<G>, <M>) as an example. Even if the first selector circuit of another block has this (<G
>, <H>) blocks.

第7図において、セレクタSG1〜4,SH1〜4はクロックド
インバータで構成されているが、実際にはトランスファ
ゲートでも十分である。
In FIG. 7, the selectors SG1 to SG4 and SH1 to SH4 are clocked inverters, but in reality, transfer gates are sufficient.

▲▼,▲▼は、第1セレクト信号▲
▼・ηにしたがってそれぞれのセレクタSG1,SG2に
より選択され、▲▼,▲▼は、第1セ
レクト信号PER・HにしたがってそれぞれのセレクタSG
3,SG4により選択される。また、▲▼,▲
▼は第1セレクト信号▲▼・Gにしたがって
それぞれのセレクタSH1,SH2により選択され、▲
▼,▲▼は第1セレクト信号PER・にした
がってそれぞれのセレクタSH3,SH4により選択される。
このようにして、<G>と<H>の1ビット目のエンコ
ード出力及び0ビット目のエンコード出力の中からそれ
ぞれ1出力づつ選択される。ここで選択された1ビット
目のエンコード出力をPGH1とし、0ビット目のエンコー
ド出力をPGH0とする。(<I>、<J>),(<K>,
<L>)、(<M>,<N>)のそれぞれのブロックに
あっても、第8図に示すようにブロック毎に異なる第1
セレクト信号によって、上述したと同様に1ビット目及
び0ビット目のエンコード出力が選択される。
▲ ▼, ▲ ▼ are the first select signal ▲
The selectors SG1 and SG2 are selected according to ▼ and η , and ▲ ▼ and ▲ ▼ are selected according to the first select signal PER · H.
3, Selected by SG4. Also, ▲ ▼, ▲
▼ is selected by the respective selectors SH1 and SH2 according to the first select signal ▲ ▼ ・ G, ▲
▼ and ▲ ▼ are selected by the respective selectors SH3 and SH4 according to the first select signal PER.
In this way, one output is selected from each of the 1st bit encoded output of <G> and <H> and the 0th bit encoded output. The first bit encoded output selected here is PGH1 and the 0th bit encoded output is PGH0. (<I>, <J>), (<K>,
Even in the respective blocks of <L>) and (<M>, <N>), as shown in FIG.
The select signal selects the encoded output of the 1st bit and the 0th bit as described above.

このような選択を行なう第1セレクト信号は、第8図か
ら明らかなように、零検出信号G〜N及び検索信号PER
から容易に生成され、2ないし3段の論理ゲートで得る
ことができる。
As is apparent from FIG. 8, the first select signal for performing such selection is the zero detection signals G to N and the search signal PER.
Can be easily generated from a logic gate having two or three stages.

次に、2段目の第2セレクタ回路を説明する。Next, the second selector circuit in the second stage will be described.

第9図は第2セレクタ回路の構成を示す図である。同図
において、この第2セレクタ回路は、クロックドインバ
ータからなるセレクタSGH1,0、SIJ1,0、SKL1,0、SMN1,0
で構成されている。
FIG. 9 is a diagram showing the configuration of the second selector circuit. In the figure, this second selector circuit is composed of selectors SGH1,0, SIJ1,0, SKL1,0, SMN1,0 composed of clocked inverters.
It is composed of.

この第2セレクタ回路は、第2セレクト信号SS1〜SS4に
より1段目のセレクタ回路で選択された1ビット目のエ
ンコード出力の反転信号▲▼,▲▼,
▲▼,▲▼の中からPエンコーダの1
ビット目のエンコード出力PE1を選択し、0ビット目の
エンコード出力の反転信号▲▼,▲
▼,▲▼,▲▼の中からPエンコーダ
の0ビット目のエンコード出力PE0を選択するものであ
る。
This second selector circuit uses the second select signals SS1 to SS4 to select the inversion signals ▲ ▼, ▲ ▼,
1 of P encoder from ▲ ▼ and ▲ ▼
Select the bit 1 encode output PE1 and invert the encode output 0th bit ▲ ▼, ▲
The encoder output PE0 of the 0th bit of the P encoder is selected from ▼, ▲ ▼ and ▲ ▼.

すなわち、PE1は、▲▼,▲▼,▲
▼,▲▼の中から、第2セレクト信号SS
I〜SS4により、それぞれセレクタSGH1,SIJ1,SKL1,SMN1
を介して選択され、PE0は、▲,,
,▼の中から、第2セレクト信号SS1〜S
S4により、それぞれセレクタSGH0,SIJ0,SKL0,SMN0を介
して選択される。ここで、第9図に示されている第2セ
レクト信号を比較的簡単化したものを第10図に示す。
That is, PE1 is ▲ ▼, ▲ ▼, ▲
The second select signal SS from among ▼ and ▲ ▼
Selector SGH1, SIJ1, SKL1, SMN1 by I to SS4
PE0, ▲ ,,
, ▼, the second select signal SS1 ~ S
It is selected by S4 via selectors SGH0, SIJ0, SKL0 and SMN0, respectively. FIG. 10 shows a relatively simplified version of the second select signal shown in FIG.

このような第2セレクト信号は、第10図から明らかなよ
うに、零検出信号A〜N及び検索信号PERから容易に生
成され、3段程度の論理ゲートで得ることができる。
As is apparent from FIG. 10, such a second select signal is easily generated from the zero detection signals A to N and the search signal PER, and can be obtained with about three stages of logic gates.

以上説明したようにして、第1図に示すPエンコーダは
そのエンコード出力PE4〜PE0を得ている。ここで、第1
図に戻って、<G>と<H>のエンコード出力を選択す
る第1セレクタ回路1aの第1セレクト信号を生成する生
成回路2aは、3段の論理ゲートで構成されており、以下
<I>と<J>,<K>と<L>,<M>と<N>のそ
れぞれのエンコード出力を選択する第1セレクタ回路1
b,1c,1dに対応する第1セレクト信号を生成するそれぞ
れの生成回路2b,2c,2dも、生成回路2aと同様に3段の論
理ゲートで構成されている。したがって、第1セレクト
信号は、検索情報の入力から4段の論理ゲートを介して
得られる。
As described above, the P encoder shown in FIG. 1 obtains its encoded outputs PE4 to PE0. Where the first
Returning to the figure, the generation circuit 2a for generating the first select signal of the first selector circuit 1a for selecting the encoded outputs of <G> and <H> is composed of three stages of logic gates. > And <J>, <K> and <L>, and <M> and <N> encoded output 1
Each of the generation circuits 2b, 2c, 2d that generate the first select signal corresponding to b, 1c, 1d is also composed of three stages of logic gates like the generation circuit 2a. Therefore, the first select signal is obtained from the input of search information via the four-stage logic gate.

第2セレクタ回路3a,3bの第2セレクト信号SS1,SS2を生
成する生成回路4a及び第2セレクト回路3c,3dの第2セ
レクト信号SS3,SS4を生成する生成回路4bは、ともに同
様な構成の3段の論理ゲートで構成されている。したが
って、第2セレクト信号SS4〜SS1は、検索情報の入力か
ら5段の論理ゲートを介して得られる。
The generation circuit 4a that generates the second select signals SS1 and SS2 of the second selector circuits 3a and 3b and the generation circuit 4b that generates the second select signals SS3 and SS4 of the second select circuits 3c and 3d have the same configuration. It is composed of three stages of logic gates. Therefore, the second select signals SS4 to SS1 are obtained from the input of search information through the five-stage logic gates.

また、比較的多くの論理ゲートを通過して得られるエン
コード出力PE2は、第1及び第2セレクト信号の生成過
程の論理信号を用いて得られ、PE2は第1及び第2セレ
クト信号の生成と並行して得ることが可能となる。さら
に、PE3は第2セレクト信号SS1,SS3の論理和をとること
によって得られる。これにより、PE3,PE2を得るための
回路構成を簡単化することができる。
In addition, the encoded output PE2 obtained by passing through a relatively large number of logic gates is obtained by using the logic signal in the process of generating the first and second select signals, and PE2 is used to generate the first and second select signals. It is possible to obtain in parallel. Further, PE3 is obtained by taking the logical sum of the second select signals SS1 and SS3. As a result, the circuit configuration for obtaining PE3 and PE2 can be simplified.

したがって、第1図に示したPエンコーダのエンコード
出力PE4,PE3,PE2は、検索情報の入力からそれぞれ6,7,7
段の論理ゲートの遅延で得られる。また、PE1,PE0は、
セレクタにクロックドインバータを用い、セレクト信号
の遅延を考慮しても、6段の論理ゲートの遅延で得られ
る。
Therefore, the encode outputs PE4, PE3, PE2 of the P encoder shown in FIG.
It is obtained by delaying the logic gates of the stages. PE1 and PE0 are
Even if a clocked inverter is used for the selector and the delay of the select signal is taken into consideration, it can be obtained by delaying the logic gates in six stages.

一方、これに対して、第12図に示した従来のPエンコー
ダでは5段程度の論理ゲートの遅延でエンコード出力が
得られる。しかしながら、第1図に示すPエンコーダに
おける論理ゲートの入力数は平均2〜3程度であるのに
対して、従来では4以上となっている。したがって、従
来はこの実施例に比べて速度的に優れているとは必ずし
も言えない。また、従来は一方向からの検索に対しての
み最適化されており、両方向からの検索を行なえるよう
にするために前述したように付加回路が必要となり、こ
れらを考慮すると、この実施例の優位性は顕著なものに
なると言えよう。
On the other hand, in the conventional P encoder shown in FIG. 12, on the other hand, an encoded output can be obtained with a delay of about 5 stages of logic gates. However, the number of inputs of the logic gate in the P encoder shown in FIG. 1 is about 2 to 3 on average, whereas it is 4 or more in the conventional case. Therefore, it cannot always be said that the prior art is superior to this embodiment in terms of speed. Further, conventionally, the search is optimized only in one direction, and the additional circuit is required as described above in order to perform the search in both directions. It can be said that the superiority becomes remarkable.

[発明の効果] 以上説明したように、この発明によれば、プライオリテ
ィ・エンコーダのエンコード出力の一部を検出信号及び
検索信号から生成し、残りの部分をそれぞれの単位検索
情報に対するエンコード出力の中から選択信号にしたが
って選択されたエンコード出力としたので、検索方向に
依存することなく検索の高速化を達成することができ
る。
[Effect of the Invention] As described above, according to the present invention, a part of the encoded output of the priority encoder is generated from the detection signal and the search signal, and the remaining part is generated from the encoded output for each unit search information. Since the encoded output is selected in accordance with the selection signal, the search speed can be increased without depending on the search direction.

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

第1図はこの発明の一実施例に係るプライオリティ・エ
ンコーダの構成図、第2図は第1図における<G>〜<
N>の構成図、第3図(A)及び同図(B)は第2図の
作用説明図、第4図は検索情報の分割と零検出信号の関
係を示す図、第5図は零検出信号を生成する回路の構成
図、第6図は零検出信号とエンコード出力との関係を示
す図、第7図は第1セレクタ回路の構成図、第8図は第
1セレクト信号を示す図、第9図は第2セレクタ回路の
構成図、第10図は第2セレクト信号を示す図、第11図は
検索情報とエンコード出力との関係を示す図、第12図は
従来の8ビットのブライオリティ・エンコーダの構成
図、第13図は第12図の作用説明図、第14図は従来の32ビ
ットのプライオリティ・エンコーダの構成図、第15図は
第14図の高速化を行なうための構成を示す図である。 (図の主要な部分を表わす符号の説明) <G>〜<N>…4ビットのPエンコーダ 1a〜1d…第1セレクタ回路 2a〜2d…第1セレクト信号生成回路 3a,3b…第2セレクタ回路 4a,4b…第2セレクト信号生成回路
FIG. 1 is a block diagram of a priority encoder according to an embodiment of the present invention, and FIG. 2 is <G>-<in FIG.
N> configuration diagram, FIGS. 3 (A) and 3 (B) are explanatory diagrams of the operation of FIG. 2, FIG. 4 is a diagram showing a relationship between division of search information and a zero detection signal, and FIG. FIG. 6 is a configuration diagram of a circuit for generating a detection signal, FIG. 6 is a diagram showing a relationship between a zero detection signal and an encode output, FIG. 7 is a configuration diagram of a first selector circuit, and FIG. 8 is a diagram showing a first select signal. , FIG. 9 is a block diagram of the second selector circuit, FIG. 10 is a diagram showing the second select signal, FIG. 11 is a diagram showing the relationship between the search information and the encoded output, and FIG. 12 is the conventional 8-bit Fig. 13 is a block diagram of the priority encoder, Fig. 13 is a diagram for explaining the operation of Fig. 12, Fig. 14 is a block diagram of a conventional 32-bit priority encoder, and Fig. 15 is a diagram for speeding up the process of Fig. 14. It is a figure which shows a structure. (Explanation of Codes Representing Main Parts of the Drawing) <G> to <N> ... 4-bit P encoder 1a to 1d ... First selector circuit 2a to 2d ... First select signal generation circuit 3a, 3b ... Second selector Circuits 4a, 4b ... Second select signal generation circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】2値のビット情報からなる検索情報を最上
位あるいは最下位ビット方向から検索して最初に一方の
ビット情報となっているビット位置を検出する検索作業
を行ない、このビット位置を示すエンコーダ出力を与え
るプライオリティ・エンコーダにして、 前記検索情報を所定のビット長に分割した単位検索情報
のそれぞれに対して検索作業を行ない、それぞれエンコ
ード出力を与えるとともに、前記単位検索情報がすべて
他方のビット情報であることを示す検出信号をそれぞれ
出力する検索手段と、 前記検索手段のそれぞれの検出信号及び検索方向を示す
検索信号により前記検索情報のエンコード出力の一部を
生成する生成手段と、 前記検出信号及び前記検索信号により選択信号を生成す
る選択信号生成手段と、 前記検索手段のそれぞれのエンコード出力の中から前記
選択信号にしたがって前記検索情報のエンコード出力の
一部として所定のエンコード出力を選択する選択手段
と、 を有することを特徴とするプライオリティ・エンコー
ダ。
1. A search operation is performed to search for search information consisting of binary bit information in the direction of the most significant bit or the least significant bit, and the bit position which is one of the bit information is detected first. A priority encoder that gives an encoder output shown, performs a search operation for each of the unit search information obtained by dividing the search information into a predetermined bit length, and provides an encoded output for each, and the unit search information is Search means for respectively outputting a detection signal indicating that it is bit information; generation means for generating a part of an encoded output of the search information by each detection signal of the search means and a search signal indicating a search direction; Selection signal generating means for generating a selection signal based on the detection signal and the search signal; and the search means. A priority encoder, comprising: selecting means for selecting a predetermined encoded output as a part of the encoded output of the search information from each encoded output according to the selection signal.
JP7187787A 1987-03-27 1987-03-27 Priority Encoder Expired - Fee Related JPH0727452B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7187787A JPH0727452B2 (en) 1987-03-27 1987-03-27 Priority Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7187787A JPH0727452B2 (en) 1987-03-27 1987-03-27 Priority Encoder

Publications (2)

Publication Number Publication Date
JPS63239526A JPS63239526A (en) 1988-10-05
JPH0727452B2 true JPH0727452B2 (en) 1995-03-29

Family

ID=13473186

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7187787A Expired - Fee Related JPH0727452B2 (en) 1987-03-27 1987-03-27 Priority Encoder

Country Status (1)

Country Link
JP (1) JPH0727452B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04167124A (en) * 1990-10-31 1992-06-15 Matsushita Electric Ind Co Ltd Priority encoder
JPH0855010A (en) * 1994-06-07 1996-02-27 Matsushita Electric Ind Co Ltd Priority encoder
JP4842989B2 (en) * 2008-03-28 2011-12-21 株式会社アドバンテスト Priority encoder, time digital converter and test device using the same

Also Published As

Publication number Publication date
JPS63239526A (en) 1988-10-05

Similar Documents

Publication Publication Date Title
US4623982A (en) Conditional carry techniques for digital processors
JP3244506B2 (en) Small multiplier
JPH0215088B2 (en)
EP0113391A2 (en) Digital multiplier and method for adding partial products in a digital multiplier
US5122982A (en) Carry generation method and apparatus
JP2970231B2 (en) Parallel multiplication circuit
JPH0727452B2 (en) Priority Encoder
EP0467524A2 (en) Lookahead adder
JPH0552530B2 (en)
US6003059A (en) Carry select adder using two level selectors
JPH0467213B2 (en)
US5781465A (en) Method and apparatus for fast carry generation detection and comparison
Bashagha et al. A new digit-serial divider architecture
Hayamizu et al. Extension and performance/accuracy formulation for optimal GeAr-based approximate adder designs
KR100241071B1 (en) Adder for generating sum and sum plus one in parallel
JPH0869372A (en) Binary multiplier
JP3741280B2 (en) Carry look-ahead circuit and addition circuit using the same
JPH07120958B2 (en) Tree search vector quantizer
JP2907276B2 (en) Arithmetic processing unit
KR100248976B1 (en) A circuit for 2&#39;complement operation
JP3106525B2 (en) Addition method and its circuit
JPH05233224A (en) Parallel adder circuit
JPH1115641A (en) Multiplier using redundant binary adder
JP2553162B2 (en) Adder circuit
JPH056262A (en) Multi-input adder circuit

Legal Events

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