JPH0855010A - Priority encoder - Google Patents
Priority encoderInfo
- Publication number
- JPH0855010A JPH0855010A JP7129945A JP12994595A JPH0855010A JP H0855010 A JPH0855010 A JP H0855010A JP 7129945 A JP7129945 A JP 7129945A JP 12994595 A JP12994595 A JP 12994595A JP H0855010 A JPH0855010 A JP H0855010A
- Authority
- JP
- Japan
- Prior art keywords
- bit
- data
- code
- bits
- binary
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、算術演算装置などにお
いて好適に用いられるプライオリティ・エンコーダ(以
下、PEと略記する。)に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a priority encoder (hereinafter abbreviated as PE) which is preferably used in an arithmetic operation device or the like.
【0002】[0002]
【従来の技術】浮動小数点算術演算装置における正規化
処理では、仮数の演算結果を構成する多ビットの2進数
データの中で先行する“0”のビットの数を検知する必
要が生じる。この先行“0”のビット数の検知に、PE
が使用される。また、整数フォーマットと正規化浮動小
数点フォーマットとの間のフォーマット変換においても
PEが使用される。その他の用途にPEが使用されるこ
ともある。2. Description of the Related Art In a normalization process in a floating-point arithmetic operation device, it is necessary to detect the number of leading "0" bits in multi-bit binary number data forming a mantissa operation result. To detect the bit number of this leading "0", PE
Is used. PE is also used in the format conversion between integer format and normalized floating point format. PE may be used for other purposes.
【0003】特開昭59−121435号公報には、6
ビットの2進数コードを出力するように8個の8ビット
入力PE(第1〜第8のPE)で構成された64ビット
入力PEが開示されている。8個の8ビット入力PEの
各々は、イネーブル入力EIが“1”でありかつ与えら
れた8ビットデータを構成する全てのビットの中に少な
くとも1つの“1”のビットが存在する場合には、与え
られた8ビットデータの中に最初に出現する“1”のビ
ットを該8ビットデータの最上位ビットから探し、該探
し当てた最初の“1”のビットの位置を示す3ビットの
第1のコードを出力するとともに、個々の8ビット入力
PEに固有のブロック位置アドレス(7〜0)を示す3
ビットの第2のコードを出力し、かつイネーブル出力E
Oを“0”にリセットするものである。また、8ビット
入力PEの各々は、イネーブル入力EIが“1”であり
かつ与えられた8ビットデータを構成する全てのビット
の値が“0”である場合には、第1及び第2のコード出
力をハイ・インピーダンスに設定(非活性化)するとと
もに、イネーブル出力EOを“1”にセットする。更
に、8ビット入力PEの各々は、イネーブル入力EIが
“0”である場合には、第1及び第2のコード出力をハ
イ・インピーダンスに設定(非活性化)するとともに、
イネーブル出力EOを“0”にリセットする。そして、
ブロック位置アドレスとして7が割り当てられた第1の
PEのイネーブル入力EIは“1”に固定され、該第1
のPEのイネーブル出力EOはブロック位置アドレスと
して6が割り当てられた第2のPEへイネーブル入力E
Iとして供給される。以下、n=2〜7とするとき、第
nのPEのイネーブル出力EOは、第(n+1)のPE
へイネーブル入力EIとしてそれぞれ供給される。Japanese Unexamined Patent Publication No. 59-121435 discloses 6
A 64-bit input PE composed of eight 8-bit input PEs (first to eighth PEs) so as to output a binary code of bits is disclosed. Each of the eight 8-bit inputs PE is provided if the enable input EI is "1" and there is at least one "1" bit among all the bits forming the given 8-bit data. , The first appearing "1" bit in the given 8-bit data is searched from the most significant bit of the 8-bit data, and the first 3 bits indicating the position of the found first "1" bit 3 which indicates the block position address (7 to 0) unique to each 8-bit input PE while outputting the code
Outputs a second code of bits and enables output E
O is reset to "0". Further, each of the 8-bit inputs PE has a first and a second if the enable input EI is "1" and the values of all the bits forming the given 8-bit data are "0". The code output is set to high impedance (deactivated), and the enable output EO is set to "1". Further, each of the 8-bit inputs PE sets (deactivates) the first and second code outputs to high impedance when the enable input EI is “0”, and
The enable output EO is reset to "0". And
The enable input EI of the first PE assigned with 7 as the block position address is fixed to "1", and
The enable output EO of the PE of the second PE is the enable input E to the second PE assigned with 6 as the block position address.
Supplied as I. Hereinafter, when n = 2 to 7, the enable output EO of the nth PE is the (n + 1) th PE.
Respectively to the enable inputs EI.
【0004】このような構成を有する64ビット入力P
Eによれば、与えられた64ビットデータの中に最初に
出現する“1”のビットを含む8ビットデータを受け取
った1個の8ビット入力PEの第1及び第2のコード出
力のみが活性化され、該活性化された第1及び第2のコ
ードをマージしてなる6ビットのコードが、最初の
“1”のビットの位置を示す6ビットの2進数コードと
して出力される。64-bit input P having such a configuration
According to E, only the first and second code outputs of one 8-bit input PE receiving the 8-bit data including the bit of "1" that first appears in the given 64-bit data are active. A 6-bit code obtained by merging the activated first and second codes is output as a 6-bit binary code indicating the position of the first "1" bit.
【0005】特開平5−27946号公報には、4ビッ
トの2進数コードを出力するように5個の4ビット入力
PE(第1〜第5のPE)と2個のデコード選択回路と
で構成された16ビット入力PEが開示されている。5
個の4ビット入力PEの各々は、与えられた4ビットデ
ータの中に最初に出現する“1”のビットを該4ビット
データの最上位ビットから探し、該探し当てた最初の
“1”のビットの位置を示す2ビットのコードを生成
し、かつ与えられた4ビットデータを構成する全てのビ
ットの論理和を生成するものである。第1〜第4のPE
の各々で生成された論理和は第5のPEへ4ビットデー
タとして供給され、該第5のPEから前記2進数コード
の上位2ビットが出力される。該2進数コードの上位2
ビットは、与えられた16ビットデータの中に最初に出
現する“1”のビットを含む4ビットデータを第1〜第
4のPEのうちのいずれが受け取ったかを示している。
そこで、2個のデコード選択回路は、前記2進数コード
の上位2ビットの値に応じて第1〜第4のPEの出力コ
ードのうちのいずれかを選択し、該選択したコードを前
記2進数コードの下位2ビットとして出力するものであ
る。In Japanese Patent Laid-Open No. 5-27946, there are five 4-bit input PEs (first to fifth PEs) and two decode selection circuits so as to output a 4-bit binary code. A 16-bit input PE is disclosed. 5
Each of the four 4-bit inputs PE searches for the first appearing "1" bit in the given 4-bit data from the most significant bit of the 4-bit data, and finds the first "1" bit found. A 2-bit code indicating the position of is generated, and a logical sum of all the bits forming the given 4-bit data is generated. 1st-4th PE
Is supplied as 4-bit data to the fifth PE, and the upper 2 bits of the binary code are output from the fifth PE. Upper 2 of the binary code
The bit indicates which of the first to fourth PEs has received the 4-bit data including the bit of "1" that first appears in the given 16-bit data.
Therefore, the two decode selection circuits select one of the output codes of the first to fourth PEs according to the value of the upper 2 bits of the binary code, and select the selected code from the binary number. It is output as the lower 2 bits of the code.
【0006】[0006]
【発明が解決しようとする課題】上記特開昭59−12
1435号公報の64ビット入力PEは、イネーブル入
出力EI,EOで各8ビット入力PEの動作を制御して
いたので、与えられた64ビットデータの中に最初に出
現する“1”のビットの位置が下位であればあるほど、
6ビットの2進数コードの出力に大きな遅延が生じる問
題があった。特に、第8のPEの第1及び第2のコード
出力は、第1〜第7のPEの各々のイネーブル出力EO
が順次“1”にセットされた後に、はじめて活性化され
得る。この際、第1〜第7のPEの各々は、それぞれの
イネーブル入力EIとイネーブル出力EOとの間に2個
の論理ゲート(1個のインバータと1個の9入力NOR
ゲート)における遅延を生じさせる。DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
The 64-bit input PE of Japanese Patent No. 1435 controls the operation of each 8-bit input PE by the enable inputs / outputs EI and EO, so that the "1" bit that appears first in the given 64-bit data is The lower the position,
There is a problem that a large delay occurs in the output of the 6-bit binary code. In particular, the first and second code outputs of the eighth PE are the enable output EO of each of the first to seventh PEs.
Can be activated for the first time after each is sequentially set to "1". At this time, each of the first to seventh PEs has two logic gates (one inverter and one 9-input NOR) between the respective enable inputs EI and EO.
Gate).
【0007】さて、上記特開昭59−121435号公
報の64ビット入力PEの中の第1〜第4のPEは32
ビット入力PEを、第1及び第2のPEは16ビット入
力PEをそれぞれ構成している。このうち、32ビット
入力PEの遅延は、16ビット入力PEの遅延に2個の
論理ゲート(1個のインバータと1個の9入力NORゲ
ート)における遅延を加算したものである。また、64
ビット入力PEの遅延は、32ビット入力PEの遅延に
6個の論理ゲートにおける遅延を加算したものである。The first to fourth PEs among the 64-bit input PEs disclosed in the above-mentioned Japanese Patent Laid-Open No. 59-121435 are 32.
The bit input PE constitutes the 16-bit input PE, and the first and second PEs constitute the 16-bit input PE. Of these, the delay of the 32-bit input PE is the delay of the 16-bit input PE plus the delay of two logic gates (one inverter and one 9-input NOR gate). Also, 64
The delay of the bit input PE is the delay of the 32-bit input PE plus the delays of the six logic gates.
【0008】一方、特開平5−27946号公報の16
ビット入力PEでも2進数コードの出力に大きな遅延が
生じる問題があった。この16ビット入力PEは、第1
〜第4のPEで構成された第1段のエンコーダと、第5
のPEで構成された第2段のエンコーダとを備えた階層
構造を持っている。第5のPEは、第1〜第4のPEと
同様に6個の論理ゲートで構成され、入力と出力との間
に最大3個の論理ゲート(1個のインバータと2個の2
入力NORゲート)における遅延を生じさせる。また、
2個のデコード選択回路は、ハードウエア量の増大を招
くとともに、出力コード遅延の大きな要因になってい
た。各デコード選択回路は、11個もの論理ゲートで構
成され、最大4個の論理ゲート(1個のインバータ、1
個の2入力NORゲート、1個の2入力NANDゲート
及び1個の4入力NANDゲート)における遅延を生じ
させる。結局、特開平5−27946号公報の16ビッ
ト入力PEの遅延は、最大10個の論理ゲートにおける
遅延の程度である。On the other hand, 16 of JP-A-5-27946
Even with the bit input PE, there is a problem that a large delay occurs in the output of the binary code. This 16-bit input PE is the first
A first stage encoder composed of a fourth PE and a fifth stage encoder
Has a hierarchical structure including a second stage encoder composed of PEs. The fifth PE is composed of six logic gates like the first to fourth PEs, and a maximum of three logic gates (one inverter and two two gates) are provided between the input and the output.
It causes a delay in the input NOR gate). Also,
The two decode selection circuits cause an increase in the amount of hardware and are a major cause of output code delay. Each decode selection circuit is composed of as many as 11 logic gates, and a maximum of 4 logic gates (1 inverter, 1
2 2-input NOR gates, 1 2-input NAND gates and 1 4-input NAND gates). After all, the delay of the 16-bit input PE in Japanese Patent Laid-Open No. 5-27946 is the degree of delay in a maximum of 10 logic gates.
【0009】本発明の目的は、探し当てたビットの位置
にかかわらず一定かつ小さい遅延でNビット入力PEの
出力2進数コードが決定されるようにすることにある。An object of the present invention is to determine the output binary code of the N-bit input PE with a constant and small delay regardless of the position of the searched bit.
【0010】本発明の他の目的は、2Nビット入力PE
の遅延とNビット入力PEの遅延との差を、1個の論理
ゲートにおける遅延の程度まで短縮することにある。Another object of the present invention is to provide a 2N bit input PE.
To reduce the difference between the delay of 1 logic gate and the delay of the N-bit input PE to the extent of the delay in one logic gate.
【0011】本発明の更に他の目的は、Nビット入力P
Eのハードウエア量を低減することにある。Still another object of the present invention is to provide an N bit input P
E is to reduce the amount of hardware.
【0012】[0012]
【課題を解決するための手段】本発明は、2n+1 ビット
入力PE(nは2以上の整数)において、与えられた2
n+1 ビットデータのうちの上位2n ビットのみから、
(n+1)ビットの出力2進数コードのうちの最上位ビ
ットを決定し得ることに着目したものである。本発明に
係る正論理の2n+1 ビット入力PEは、2個の正論理2
n ビット入力PE(第1及び第2のPE)と、簡単な選
択回路とで構成される。第1のPEは、与えられた2
n+1 ビットデータのうちの上位2n ビットをエンコード
するとともに、該上位2n ビットに関する1ビットの論
理和否定を生成する。第2のPEは、与えられた2n+1
ビットデータのうちの下位2n ビットをエンコードす
る。第1のPEで生成された1ビットの論理和否定は、
そのまま出力2進数コードの最上位ビットとして出力さ
れるとともに、選択回路に供給される。選択回路は、生
成された1ビットの論理和否定の値のみに応じて第1の
PEのエンコード結果と第2のPEのエンコード結果と
のうちのいずれか一方を選択し、該選択したエンコード
結果を出力2進数コードの下位nビットとして出力す
る。この選択回路は、各々少なくともn個のトランスフ
ァ・ゲートを有する2個のスイッチ回路で構成される。According to the present invention, in a 2 n + 1- bit input PE (n is an integer of 2 or more), a given 2
From only the upper 2 n bits of n + 1 bit data,
It is noted that the most significant bit of the output binary code of (n + 1) bits can be determined. The positive logic 2 n + 1 bit input PE according to the present invention includes two positive logic 2
It is composed of n- bit input PEs (first and second PEs) and a simple selection circuit. The first PE is given 2
The upper 2 n bits of the n + 1 bit data are encoded, and a 1-bit logical sum negation of the upper 2 n bits is generated. The second PE is given 2 n + 1
The lower 2 n bits of the bit data are encoded. The 1-bit logical sum negation generated by the first PE is
It is output as it is as the most significant bit of the output binary code and is also supplied to the selection circuit. The selection circuit selects either one of the encoding result of the first PE and the encoding result of the second PE according to only the generated 1-bit logical OR negation value, and the selected encoding result Is output as the lower n bits of the output binary code. The selection circuit is composed of two switch circuits each having at least n transfer gates.
【0013】上記第1の正論理2n ビット入力PEは、
2個の正論理2n-1 ビット入力PE(第3及び第4のP
E)と、簡単な選択回路と、簡単な論理回路とで構成さ
れる。また、上記第2の正論理2n ビット入力PEは、
2個の正論理2n-1 ビット入力PE(第5及び第6のP
E)と、簡単な選択回路とで構成される。第3、第4及
び第5のPEは、2n-1 ビットデータをエンコードする
機能に加えて、該2n- 1 ビットデータに関する1ビット
の論理和否定を生成する機能を備えている。論理回路
は、前記与えられた2n+1 ビットデータのうちの上位2
n ビットの全てが“0”のビットであるか否かを調べる
ものであり、少なくとも1個の2入力論理ゲートで構成
される。The first positive logic 2 n- bit input PE is
Two positive logic 2 n-1 bit inputs PE (third and fourth P
E), a simple selection circuit, and a simple logic circuit. The second positive logic 2 n bit input PE is
Two positive logic 2 n-1 bit inputs PE (fifth and sixth P
E) and a simple selection circuit. The third, fourth, and fifth PEs have a function of encoding 2 n-1 bit data and a function of generating 1-bit logical negation of the 2 n- 1 bit data. The logic circuit is the upper 2 of the given 2 n + 1 bit data.
It is to check whether or not all n bits are "0" bits, and is composed of at least one 2-input logic gate.
【0014】[0014]
【作用】本発明に係る8ビット入力PEは、互いに完全
並列動作する2個の4ビット入力PEと、1個の選択回
路とで構成される。各4ビット入力PEの遅延は、上記
特開平5−27946号公報中の第1〜第5のPEと同
様に、たかだか3個の論理ゲートにおける遅延の程度で
ある。つまり、本発明に係る8ビット入力PEの遅延
は、たかだか3個の論理ゲートにおける遅延の程度であ
る。The 8-bit input PE according to the present invention is composed of two 4-bit inputs PE which operate in parallel with each other and one selection circuit. The delay of each 4-bit input PE is at most about the degree of delay in three logic gates, as in the first to fifth PEs of Japanese Patent Laid-Open No. 5-27946. That is, the delay of the 8-bit input PE according to the present invention is at most the delay of three logic gates.
【0015】本発明に係る16ビット入力PEは、互い
に完全並列動作する4個の4ビット入力PEと、2段の
階層構造に配置された3個(1+2個)の選択回路と、
1個の論理回路とで構成される。該16ビット入力PE
の遅延は、本発明に係る8ビット入力PEの遅延に1個
の論理ゲートにおける遅延を加算したものである。The 16-bit input PE according to the present invention includes four 4-bit input PEs which operate in parallel with each other, and three (1 + 2) selection circuits arranged in a two-stage hierarchical structure.
It is composed of one logic circuit. The 16-bit input PE
Is the sum of the delay of the 8-bit input PE according to the present invention and the delay of one logic gate.
【0016】本発明に係る32ビット入力PEは、互い
に完全並列動作する8個の4ビット入力PEと、3段の
階層構造に配置された7個(1+2+4個)の選択回路
と、2段の階層構造に配置された4個(1+3個)の論
理回路とで構成される。該32ビット入力PEの遅延
は、本発明に係る16ビット入力PEの遅延に1個の論
理ゲートにおける遅延を加算したものである。A 32-bit input PE according to the present invention includes eight 4-bit input PEs that operate in parallel with each other, seven (1 + 2 + 4) selection circuits arranged in a three-stage hierarchical structure, and two-stage input PEs. It is composed of four (1 + 3) logic circuits arranged in a hierarchical structure. The delay of the 32-bit input PE is the delay of the 16-bit input PE according to the present invention plus the delay of one logic gate.
【0017】本発明に係る64ビット入力PEは、互い
に完全並列動作する16個の4ビット入力PEと、4段
の階層構造に配置された15個(1+2+4+8個)の
選択回路と、3段の階層構造に配置された11個(1+
3+7個)の論理回路とで構成される。該64ビット入
力PEの遅延は、本発明に係る32ビット入力PEの遅
延に1個の論理ゲートにおける遅延を加算したものであ
る。The 64-bit input PE according to the present invention includes 16 4-bit input PEs that operate in parallel with each other, 15 (1 + 2 + 4 + 8) selection circuits arranged in a 4-stage hierarchical structure, and 3-stage input PEs. 11 (1+) arranged in a hierarchical structure
3 + 7) logic circuits. The delay of the 64-bit input PE is the delay of the 32-bit input PE according to the present invention plus the delay of one logic gate.
【0018】[0018]
【実施例】以下、本発明の実施例に係るPEについて、
図面を参照しながら説明する。EXAMPLES Hereinafter, PEs according to examples of the present invention will be described.
This will be described with reference to the drawings.
【0019】(実施例1)図1は、本発明の第1の実施
例に係る8ビット入力PEの回路図である。この回路
は、入力が全て“0”となっている場合の出力はケアー
しないという構成になっている。図1の8ビット入力P
Eは、4ビット入力PE1011,1012と選択回路
1013とを組み合せることによって構成されており、
8ビット入力PEの入力端子I7〜I4は4ビット入力
PE1011の入力端子I3〜I0と接続され、8ビッ
ト入力PEの入力端子I3〜I0は4ビット入力PE1
012の入力端子I3〜I0と接続されている。選択回
路1013は、各々2対のCMOSトランスファ・ゲー
トで構成された2個のスイッチ回路11,12を備えて
いる。4ビット入力PE1011の出力XS4(論理和
否定)は、そのまま8ビット入力PEの出力コードのう
ちの最上位ビットP2として出力される。4ビット入力
PE1011の出力P1,P0と4ビット入力PE10
12の出力P1,P0とは、4ビット入力PE1011
の出力XS4(論理和否定)及び出力S4(論理和)を
用いて選択回路1013で選択され、それぞれ8ビット
入力PEの出力コードのうちの下位2ビットP1,P0
として出力される。(Embodiment 1) FIG. 1 is a circuit diagram of an 8-bit input PE according to the first embodiment of the present invention. This circuit does not care the output when all the inputs are "0". 8-bit input P of FIG.
E is configured by combining 4-bit inputs PE 1011 and 1012 and a selection circuit 1013,
The input terminals I7 to I4 of the 8-bit input PE are connected to the input terminals I3 to I0 of the 4-bit input PE 1011 and the input terminals I3 to I0 of the 8-bit input PE are 4-bit input PE1.
012 is connected to the input terminals I3 to I0. The selection circuit 1013 includes two switch circuits 11 and 12 each composed of two pairs of CMOS transfer gates. The output XS4 (logical sum negation) of the 4-bit input PE 1011 is output as it is as the most significant bit P2 of the output code of the 8-bit input PE. Outputs P1 and P0 of 4-bit input PE1011 and 4-bit input PE10
12 outputs P1 and P0 are 4-bit input PE1011
Output XS4 (logical sum negative) and output S4 (logical sum) are selected by the selection circuit 1013, and the lower 2 bits P1 and P0 of the output code of the 8-bit input PE are selected.
Is output as
【0020】図2は、図1中の4ビット入力PE101
1,1012の回路図である。図2の回路は、表1に示
される動作を実現するように、2個のインバータ102
1,1026と、3個の2入力NORゲート1022,
1023,1024と、1個の4入力NORゲート10
25とで構成されている。FIG. 2 shows the 4-bit input PE101 shown in FIG.
FIG. 3 is a circuit diagram of 1,1012. The circuit of FIG. 2 has two inverters 102 so as to realize the operation shown in Table 1.
1, 1026 and three 2-input NOR gates 1022
1023, 1024 and one 4-input NOR gate 10
And 25.
【0021】[0021]
【表1】 [Table 1]
【0022】図1の8ビット入力PEに求められる動作
を表2に示す。Table 2 shows the operations required for the 8-bit input PE in FIG.
【0023】[0023]
【表2】 [Table 2]
【0024】表2を見ると、最上位ビットI7を含む入
力I7〜I4のうちに少なくとも1つ“1”のビットが
あれば出力P2は“0”となり、入力I7〜I4の全て
が“0”であれば出力P2は“1”となっていることが
判る。更に、P2=“0”の場合には入力I7〜I4に
関する4ビット入力のエンコード結果が、P2=“1”
の場合には入力I3〜I0に関する4ビット入力のエン
コード結果がそれぞれ出力P1,P0となっていること
が判る。Looking at Table 2, if there is at least one "1" bit among the inputs I7 to I4 including the most significant bit I7, the output P2 becomes "0", and all the inputs I7 to I4 are "0". If it is ", it is understood that the output P2 is" 1 ". Further, when P2 = “0”, the 4-bit input encoding result regarding the inputs I7 to I4 is P2 = “1”.
In the case of, it can be seen that the 4-bit input encoding results for the inputs I3 to I0 are the outputs P1 and P0, respectively.
【0025】図1の8ビット入力PEは、入力I7〜I
4の論理和否定XS4を出力コードの最上位ビットP2
として出力し、入力I7〜I4、入力I3〜I0をそれ
ぞれ4ビット入力PE1011,1012でエンコード
し、XS4=“0”の場合には4ビット入力PE101
1のエンコード結果を、XS4=“1”の場合には4ビ
ット入力PE1012のエンコード結果をそれぞれ出力
コードの下位2ビットP1,P0として出力するもので
ある。The 8-bit input PE of FIG. 1 has inputs I7-I.
The logical sum negation XS4 of 4 is the most significant bit P2 of the output code.
And inputs I7 to I4 and inputs I3 to I0 are encoded by 4-bit inputs PE1011 and 1012, respectively, and when XS4 = "0", 4-bit input PE101.
When XS4 = “1”, the encoding result of 1 is output as the lower 2 bits P1 and P0 of the output code of the 4-bit input PE 1012, respectively.
【0026】(実施例2)図3は、本発明の第2の実施
例に係る16ビット入力PEの回路図である。この回路
は、入力が全て“0”となっている場合の出力はケアー
しないという構成になっている。図3の16ビット入力
PEは、8ビット入力PE1031,1032と選択回
路1033とを組み合せることによって構成されてお
り、16ビット入力PEの入力端子I15〜I8は8ビ
ット入力PE1031の入力端子I7〜I0と接続さ
れ、16ビット入力PEの入力端子I7〜I0は8ビッ
ト入力PE1032の入力端子I7〜I0と接続されて
いる。選択回路1033は、各々3対のCMOSトラン
スファ・ゲートで構成された2個のスイッチ回路11
1,112を備えている。8ビット入力PE1031の
出力XS8(論理和否定)は、そのまま16ビット入力
PEの出力コードのうちの最上位ビットP3として出力
される。8ビット入力PE1031の出力P2,P1,
P0と8ビット入力PE1032の出力P2,P1,P
0とは、8ビット入力PE1031の出力XS8(論理
和否定)及び出力S8(論理和)を用いて選択回路10
33で選択され、それぞれ16ビット入力PEの出力コ
ードのうちの下位3ビットP2,P1,P0として出力
される。(Embodiment 2) FIG. 3 is a circuit diagram of a 16-bit input PE according to a second embodiment of the present invention. This circuit does not care the output when all the inputs are "0". The 16-bit input PE of FIG. 3 is configured by combining 8-bit inputs PE 1031 and 1032 with a selection circuit 1033, and the input terminals I15 to I8 of the 16-bit input PE are the input terminals I7 to I8 of the 8-bit input PE 1031. The input terminals I7 to I0 of the 16-bit input PE are connected to I0 and the input terminals I7 to I0 of the 8-bit input PE 1032. The selection circuit 1033 includes two switch circuits 11 each including three pairs of CMOS transfer gates.
1, 112 are provided. The output XS8 (logical sum negation) of the 8-bit input PE 1031 is directly output as the most significant bit P3 of the output code of the 16-bit input PE. 8-bit input PE 1031 outputs P2, P1,
P0 and 8-bit input PE1032 outputs P2, P1, P
0 means the selection circuit 10 using the output XS8 (logical sum negation) and the output S8 (logical sum) of the 8-bit input PE 1031.
It is selected by 33 and is output as the lower 3 bits P2, P1, P0 of the output code of the 16-bit input PE, respectively.
【0027】図4は、図3中の8ビット入力PE103
1,1032の回路図である。図4の回路は、図1と同
様の2個の4ビット入力PE1041,1042と1個
の選択回路1043とに加えて、論理和否定XS8を生
成するための2入力NORゲート1044と、論理和S
8を生成するための2入力NANDゲート1045とを
備えたものである。ただし、一方の8ビット入力PE1
032は、図1と同様の構成でよい。FIG. 4 shows the 8-bit input PE 103 shown in FIG.
1 is a circuit diagram of 1032. The circuit of FIG. 4 includes two 4-bit inputs PE 1041 and 1042 and one selection circuit 1043 similar to those of FIG. 1, a 2-input NOR gate 1044 for generating a logical sum negation XS8, and a logical sum. S
And a two-input NAND gate 1045 for generating eight. However, one 8-bit input PE1
032 may have the same configuration as that in FIG.
【0028】図3の16ビット入力PEに求められる動
作を表3に示す。Table 3 shows the operation required for the 16-bit input PE in FIG.
【0029】[0029]
【表3】 [Table 3]
【0030】表3を見ると、最上位ビットI15を含む
入力I15〜I8のうちに少なくとも1つ“1”のビッ
トがあれば出力P3は“0”となり、入力I15〜I8
の全てが“0”であれば出力P3は“1”となっている
ことが判る。更に、P3=“0”の場合には入力I15
〜I8に関する8ビット入力のエンコード結果が、P3
=“1”の場合には入力I7〜I0に関する8ビット入
力のエンコード結果がそれぞれ出力P2,P1,P0と
なっていることが判る。Looking at Table 3, if there is at least one bit "1" among the inputs I15 to I8 including the most significant bit I15, the output P3 becomes "0", and the inputs I15 to I8.
It can be seen that the output P3 is "1" if all of the above are "0". Further, when P3 = "0", the input I15
~ 8-bit input encoding result for I8 is P3
It can be seen that when = 1, the 8-bit input encoding results for the inputs I7 to I0 are the outputs P2, P1 and P0, respectively.
【0031】図3の16ビットPEは、入力I15〜I
8の論理和否定XS8を出力コードの最上位ビットP3
として出力し、入力I15〜I8、入力I7〜I0をそ
れぞれ8ビット入力PE1031,1032でエンコー
ドし、XS8=“0”の場合には8ビット入力PE10
31のエンコード結果を、XS8=“1”の場合には8
ビット入力PE1032のエンコード結果をそれぞれ出
力コードの下位3ビットP2,P1,P0として出力す
るものである。The 16-bit PE of FIG. 3 has inputs I15-I.
8 logical sum negation XS8 is output as the most significant bit P3 of the code
And inputs I15 to I8 and inputs I7 to I0 are encoded by 8-bit inputs PE 1031 and 1032, respectively, and 8-bit input PE10 when XS8 = "0".
The encoding result of 31 is 8 when XS8 = "1".
The encoding result of the bit input PE 1032 is output as the lower 3 bits P2, P1, P0 of the output code, respectively.
【0032】なお、上記第1及び第2の実施例の原理に
よれば、nを2以上の任意の整数とするとき、2n+1 ビ
ット入力PEを2個の2n ビット入力PEと1個の選択
回路とで構成することができる。例えば、32ビット入
力PEはこのようにして構成される。この32ビット入
力PEで24ビットの入力データを扱う場合には、下位
8ビットI7〜I0として8個のダミー“1”を与えれ
ば、24ビットの入力I23〜I0が全て“0”となる
ケースは生じない。According to the principles of the first and second embodiments described above, when n is an arbitrary integer of 2 or more, 2 n + 1 bit input PE and 2 2 n bit input PE and 1 It can be configured with individual selection circuits. For example, the 32-bit input PE is constructed in this way. In the case of handling 24-bit input data with this 32-bit input PE, if eight dummy “1” are given as the lower 8 bits I7 to I0, all the 24-bit inputs I23 to I0 become “0”. Does not occur.
【0033】第1及び第2の実施例では最上位ビットか
ら下位方向へ検索して最初に“1”となっているビット
位置をエンコードする構成について説明したが、最初に
“0”となっているビット位置をエンコードする構成に
することもできる。最下位ビットから上位方向へ検索し
て、最初に“1”となっているビット位置又は最初に
“0”となっているビット位置をエンコードする構成に
することもできる。In the first and second embodiments, the structure in which the most significant bit is searched in the lower direction and the bit position which is first "1" is encoded has been described, but it is first "0". It is also possible to adopt a configuration in which the bit position that exists is encoded. It is also possible to perform a search from the least significant bit to the upper direction, and to encode the bit position that is initially "1" or the bit position that is initially "0".
【0034】(実施例3)図5は、本発明の第3の実施
例に係る24ビット入力PEの回路図である。この回路
は、入力が全て“0”となっている場合の出力はケアー
しないという構成になっている。図5の24ビット入力
PEは、16ビット入力PE1051と8ビット入力P
E1052と選択回路1053とを組み合わせることに
よって構成されており、24ビット入力PEの入力端子
I23〜I8は16ビット入力PE1051の入力端子
I15〜I0と接続され、24ビット入力PEの入力端
子I7〜I0は8ビット入力PE1052の入力端子I
7〜I0と接続されている。選択回路1053は、各々
4対のCMOSトランスファ・ゲートで構成された2個
のスイッチ回路211,212を備えている。一方のス
イッチ回路212の中の1対のCMOSトランスファ・
ゲートの入力は、“0”(グラウンド)に固定されてい
る。16ビット入力PE1051の出力XS16(論理
和否定)は、そのまま24ビット入力PEの出力コード
のうちの最上位ビットP4として出力される。16ビッ
ト入力PE1051の出力P3,P2,P1,P0と8
ビット入力PE1052の出力P2,P1,P0の上位
に“0”を付加してなる4ビットのコードとは、16ビ
ット入力PE1051の出力XS16(論理和否定)及
び出力S16(論理和)を用いて選択回路1053で選
択され、それぞれ24ビット入力PEの出力コードのう
ちの下位4ビットP3,P2,P1,P0として出力さ
れる。(Third Embodiment) FIG. 5 is a circuit diagram of a 24-bit input PE according to a third embodiment of the present invention. This circuit does not care the output when all the inputs are "0". The 24-bit input PE of FIG. 5 is a 16-bit input PE 1051 and an 8-bit input P.
The input terminal I23 to I8 of the 24-bit input PE is connected to the input terminals I15 to I0 of the 16-bit input PE 1051 and the input terminals I7 to I0 of the 24-bit input PE are configured by combining the E1052 and the selection circuit 1053. Is an 8-bit input PE1052 input terminal I
7 to 10 are connected. The selection circuit 1053 includes two switch circuits 211 and 212 each composed of four pairs of CMOS transfer gates. A pair of CMOS transfer circuits in one switch circuit 212.
The gate input is fixed to "0" (ground). The output XS16 (logical sum negation) of the 16-bit input PE 1051 is directly output as the most significant bit P4 of the output code of the 24-bit input PE. 16-bit input PE1051 outputs P3, P2, P1, P0 and 8
A 4-bit code obtained by adding "0" to the higher order of the outputs P2, P1, P0 of the bit input PE1052 is the output XS16 (logical NOT) and the output S16 (logical OR) of the 16-bit input PE1051. It is selected by the selection circuit 1053 and is output as the lower 4 bits P3, P2, P1, P0 of the output code of the 24-bit input PE.
【0035】図6は、図5中の16ビット入力PE10
51の回路図である。図6の回路は、図3と同様の2個
の8ビット入力PE1061,1062と1個の選択回
路1063とに加えて、論理和否定XS16を生成する
ための2入力NORゲート1064と、論理和S16を
生成するための2入力NANDゲート1065とを備え
たものである。図5中の8ビット入力PE1052の内
部構成は、図1又は図4のとおりである。FIG. 6 shows the 16-bit input PE10 shown in FIG.
It is a circuit diagram of 51. The circuit of FIG. 6 has two 8-bit inputs PE 1061 and 1062 and one selection circuit 1063 similar to those of FIG. 3, a 2-input NOR gate 1064 for generating a logical sum negation XS16, and a logical sum. And a two-input NAND gate 1065 for generating S16. The internal configuration of the 8-bit input PE 1052 in FIG. 5 is as shown in FIG. 1 or 4.
【0036】図5の24ビット入力PEに求められる動
作を表4に示す。Table 4 shows the operations required for the 24-bit input PE of FIG.
【0037】[0037]
【表4】 [Table 4]
【0038】表4を見ると、最上位ビットI23を含む
入力I23〜I8のうちに少なくとも1つ“1”のビッ
トがあれば出力P4は“0”となり、入力I23〜I8
の全てが“0”であれば出力P4は“1”となっている
ことが判る。また、P4=“0”の場合には、入力I2
3〜I8に関する16ビット入力のエンコード結果が出
力P3,P2,P1,P0となっていることが判る。更
に、P4=“1”の場合には、出力P3は必ず“0”に
なり、かつ入力I7〜I0に関する8ビット入力のエン
コード結果が出力P2,P1,P0となっていることが
判る。Looking at Table 4, if there is at least one "1" bit among the inputs I23 to I8 including the most significant bit I23, the output P4 becomes "0", and the inputs I23 to I8.
It can be seen that the output P4 is "1" if all of the above are "0". If P4 = "0", the input I2
It can be seen that the 16-bit input encoding results for 3 to I8 are outputs P3, P2, P1 and P0. Further, when P4 = "1", the output P3 is always "0", and the 8-bit input encoding result for the inputs I7 to I0 is output P2, P1, P0.
【0039】図5の24ビット入力PEは、入力I23
〜I8の論理和否定(XS16)を出力コードの最上位
ビットP4として出力し、入力I23〜I8を16ビッ
ト入力PE1051でエンコードし、入力I7〜I0を
8ビット入力PE1052でエンコードして、XS16
=“0”の場合には16ビット入力PE1051のエン
コード結果を、XS16=“1”の場合には8ビット入
力PE1052のエンコード結果の上位に“0”を付加
してなる4ビットのコードをそれぞれ出力コードの下位
4ビットP3,P2,P1,P0として出力するもので
ある。The 24-bit input PE of FIG.
~ I8 is output as the most significant bit P4 of the output code (XS16), inputs I23 to I8 are encoded by 16-bit input PE1051, inputs I7 to I0 are encoded by 8-bit input PE1052, and XS16
If "0", the 16-bit input PE 1051 encodes the result, and if XS16 = "1", 8-bit input PE 1052 encodes the 4-bit code obtained by adding "0" to the upper position. It is output as the lower 4 bits P3, P2, P1, P0 of the output code.
【0040】(実施例4)図7は、本発明の第4の実施
例に係る11ビット入力PEの回路図である。この回路
は、入力が全て“0”となっている場合の出力はケアー
しないという構成になっている。図7の11ビット入力
PEは、8ビット入力PE1071と3ビット入力PE
1072と選択回路1073とを組み合わせることによ
って構成されており、11ビット入力PEの入力端子I
10〜I3は8ビット入力PE1071の入力端子I7
〜I0と接続され、11ビット入力PEの入力端子I2
〜I0は3ビット入力PE1072の入力端子I2〜I
0と接続されている。選択回路1073は、各々3対の
CMOSトランスファ・ゲートで構成された2個のスイ
ッチ回路111,112を備えている。一方のスイッチ
回路112の中の1対のCMOSトランスファ・ゲート
の入力は、“0”(グラウンド)に固定されている。8
ビット入力PE1071の出力XS8(論理和否定)
は、そのまま11ビット入力PEの出力コードのうちの
最上位ビットP3として出力される。8ビット入力PE
1071の出力P2,P1,P0と3ビット入力PE1
072の出力P1,P0の上位に“0”を付加してなる
3ビットのコードとは、8ビット入力PE1071の出
力XS8(論理和否定)及び出力S8(論理和)を用い
て選択回路1073で選択され、それぞれ11ビット入
力PEの出力コードのうちの下位3ビットP2,P1,
P0として出力される。(Fourth Embodiment) FIG. 7 is a circuit diagram of an 11-bit input PE according to a fourth embodiment of the present invention. This circuit does not care the output when all the inputs are "0". The 11-bit input PE in FIG. 7 is an 8-bit input PE 1071 and a 3-bit input PE.
The input terminal I of the 11-bit input PE is formed by combining a selection circuit 1072 and a selection circuit 1073.
10 to I3 are input terminals I7 of the 8-bit input PE 1071
~ I0, 11-bit input PE input terminal I2
To I0 are input terminals I2 to I of the 3-bit input PE1072
It is connected to 0. The selection circuit 1073 includes two switch circuits 111 and 112 each composed of three pairs of CMOS transfer gates. The inputs of the pair of CMOS transfer gates in one of the switch circuits 112 are fixed to "0" (ground). 8
Bit input PE1071 output XS8 (logical NOT)
Is directly output as the most significant bit P3 of the output code of the 11-bit input PE. 8-bit input PE
1071 outputs P2, P1, P0 and 3-bit input PE1
The 3-bit code formed by adding “0” to the higher order of the outputs P1 and P0 of 072 is the output of the 8-bit input PE 1071 XS8 (logical sum negative) and the output S8 (logical sum). The lower 3 bits P2, P1, of the output codes of the selected 11-bit input PEs are selected.
It is output as P0.
【0041】図7中の8ビット入力PE1071の内部
構成は、図4のとおりである。図8は、図7中の3ビッ
ト入力PE1072の回路図である。図8の回路は、表
5に示される動作を実現するように、1個のインバータ
1081と、2個の2入力NORゲート1082,10
83とで構成されており、最下位ビットI0を使用しな
い構成となっている。The internal structure of the 8-bit input PE 1071 in FIG. 7 is as shown in FIG. FIG. 8 is a circuit diagram of the 3-bit input PE 1072 shown in FIG. The circuit of FIG. 8 has one inverter 1081 and two two-input NOR gates 1082, 10 so that the operation shown in Table 5 is realized.
83, and the configuration is such that the least significant bit I0 is not used.
【0042】[0042]
【表5】 [Table 5]
【0043】図7の11ビット入力PEに求められる動
作を表6に示す。Table 6 shows the operation required for the 11-bit input PE in FIG.
【0044】[0044]
【表6】 [Table 6]
【0045】表6を見ると、最上位ビットI10を含む
入力I10〜I3のうちに少なくとも1つ“1”のビッ
トがあれば出力P3は“0”となり、入力I10〜I3
の全てが“0”であれば出力P3は“1”となっている
ことが判る。また、P3=“0”の場合には、入力I1
0〜I3に関する8ビット入力のエンコード結果が出力
P2,P1,P0となっていることが判る。更に、P3
=“1”の場合には、出力P2は必ず“0”になり、か
つ入力I2〜I0に関する3ビット入力のエンコード結
果が出力P1,P0となっていることが判る。Looking at Table 6, if there is at least one "1" bit among the inputs I10 to I3 including the most significant bit I10, the output P3 becomes "0" and the inputs I10 to I3.
It can be seen that the output P3 is "1" if all of the above are "0". If P3 = "0", the input I1
It can be seen that the 8-bit input encoding results for 0 to I3 are outputs P2, P1 and P0. Furthermore, P3
It can be seen that when = 1, the output P2 is always "0" and the 3-bit input encoding results for the inputs I2 to I0 are the outputs P1 and P0.
【0046】図7の11ビット入力PEは、入力I10
〜I3の論理和否定(XS8)を出力コードの最上位ビ
ットP3として出力し、入力I10〜I3を8ビット入
力PE1071でエンコードし、入力I2〜I0を3ビ
ット入力PE1072でエンコードして、XS8=
“0”の場合には8ビット入力PE1071のエンコー
ド結果を、XS8=“1”の場合には3ビット入力PE
1072のエンコード結果の上位に“0”を付加してな
る3ビットのコードをそれぞれ出力コードの下位3ビッ
トP2,P1,P0として出力するものである。The 11-bit input PE in FIG. 7 is the input I10.
~ I3 is ORed as negative (XS8) as the most significant bit P3 of the output code, inputs I10 to I3 are encoded by 8-bit input PE1071, inputs I2 to I0 are encoded by 3-bit input PE1072, and XS8 =
When it is "0", the encoding result of the 8-bit input PE 1071 is shown. When XS8 = "1", it is the 3-bit input PE.
A 3-bit code obtained by adding "0" to the higher order of the encoding result of 1072 is output as the lower 3 bits P2, P1, P0 of the output code, respectively.
【0047】なお、上記第3及び第4の実施例の原理に
よれば、n,m,kはn≧m+2、m≧1、かつ1≦k
≦2m を満たす任意の整数とするとき、(2n +2m +
k)ビット入力PEを1個の2n ビット入力PEと1個
の(2m +k)ビット入力PEと1個の選択回路(入力
固定あり)とで構成することができる。第3及び第4の
実施例では最上位ビットから下位方向へ検索して最初に
“1”となっているビット位置をエンコードする構成に
ついて説明したが、最初に“0”となっているビット位
置をエンコードする構成にすることもできる。最下位ビ
ットから上位方向へ検索して、最初に“1”となってい
るビット位置又は最初に“0”となっているビット位置
をエンコードする構成にすることもできる。According to the principles of the third and fourth embodiments, n, m and k are n ≧ m + 2, m ≧ 1 and 1 ≦ k.
If it is an arbitrary integer satisfying ≦ 2 m , (2 n +2 m +
The k) bit input PE can be composed of one 2 n bit input PE, one (2 m + k) bit input PE, and one selection circuit (with fixed input). In the third and fourth embodiments, the configuration has been described in which the most significant bit is searched in the lower direction and the bit position which is first "1" is encoded, but the bit position which is initially "0" is described. Can be configured to be encoded. It is also possible to perform a search from the least significant bit to the upper direction, and to encode the bit position that is initially "1" or the bit position that is initially "0".
【0048】また、図1中の一方の4ビット入力PE1
012を図7中の3ビット入力PE1072に置き換え
れば、他方の4ビット入力PE1011及び選択回路
(入力固定なし)1013はそのままで、7ビット入力
PEを実現できる。一般的に言うと、n,m,kはn≧
m+1、m≧1、かつ1≦k≦2m を満たす任意の整数
とするとき、(2n +2m +k)ビット入力PEを1個
の2n ビット入力PEと1個の(2m +k)ビット入力
PEと1個の選択回路(入力固定なし)とで構成するこ
とができる。Further, one 4-bit input PE1 shown in FIG.
If 012 is replaced with the 3-bit input PE 1072 in FIG. 7, the 7-bit input PE can be realized without changing the other 4-bit input PE 1011 and the selection circuit (without fixed input) 1013. Generally speaking, n, m and k are n ≧
Assuming that m + 1, m ≧ 1, and any integer satisfying 1 ≦ k ≦ 2 m , a (2 n +2 m + k) bit input PE is a 2 n bit input PE and a (2 m + k) bit PE. It can be configured by a bit input PE and one selection circuit (without fixed input).
【0049】(実施例5)図9は、本発明の第5の実施
例に係る8ビット入力PEの回路図である。この回路
は、制御信号Cに応じて最初の“1”の検索方向を変更
できるように図1の回路を変形したものである。ただ
し、制御信号C以外の入力が全て“0”となっている場
合の出力はケアーしないという構成になっている。(Fifth Embodiment) FIG. 9 is a circuit diagram of an 8-bit input PE according to a fifth embodiment of the present invention. This circuit is a modification of the circuit of FIG. 1 so that the search direction of the first "1" can be changed according to the control signal C. However, when all the inputs other than the control signal C are "0", the output is not cared.
【0050】図9の8ビット入力PEは、4ビット入力
PE1091,1092と選択回路1093とを組み合
わせることによって構成されており、8ビット入力PE
の入力端子I7〜I4は4ビット入力PE1091の入
力端子I3〜I0と接続され、8ビット入力PEの入力
端子I3〜I0は4ビット入力PE1092の入力端子
I3〜I0と接続されている。選択回路1093は、各
々2対のCMOSトランスファ・ゲートで構成された2
個のスイッチ回路11,12と、インバータ1と、5個
の2入力NORゲート2D,2U,3D,3U,7と、
2個の2入力ANDゲート4D,4Uと、2個の2入力
ORゲート5,6とを備えている。The 8-bit input PE shown in FIG. 9 is constructed by combining 4-bit input PEs 1091 and 1092 with a selection circuit 1093.
Input terminals I7 to I4 are connected to the input terminals I3 to I0 of the 4-bit input PE 1091, and the input terminals I3 to I0 of the 8-bit input PE are connected to the input terminals I3 to I0 of the 4-bit input PE 1092. The selection circuit 1093 is composed of two pairs of CMOS transfer gates.
Switch circuits 11 and 12, an inverter 1, five 2-input NOR gates 2D, 2U, 3D, 3U, and 7,
It is provided with two 2-input AND gates 4D and 4U and two 2-input OR gates 5 and 6.
【0051】C=“0”の場合には、2入力NORゲー
ト2D及び2入力ORゲート5を介して、4ビット入力
PE1091の出力S4(論理和)の反転、すなわち該
4ビット入力PE1091の出力XS4(論理和否定)
が8ビット入力PEの出力コードのうちの最上位ビット
P2として出力される。また、4ビット入力PE109
1の出力P1,P0と4ビット入力PE1092の出力
P1,P0とは、4ビット入力PE1091の出力XS
4(論理和否定)及び出力S4(論理和)を用いて選択
回路1093で選択され、それぞれ8ビット入力PEの
出力コードのうちの下位2ビットP1,P0として出力
される。これにより、図1の場合と同様に、8ビットデ
ータの最上位ビットI7から下位方向へ検索して得られ
る最初の“1”のビット位置に関する3ビットの2進数
コードが出力される。When C = "0", the output S4 (logical sum) of the 4-bit input PE 1091 is inverted through the 2-input NOR gate 2D and the 2-input OR gate 5, that is, the output of the 4-bit input PE 1091. XS4 (logical sum negation)
Is output as the most significant bit P2 of the output code of the 8-bit input PE. 4-bit input PE109
The outputs P1 and P0 of 1 and the outputs P1 and P0 of the 4-bit input PE 1092 are the output XS of the 4-bit input PE 1091.
4 (logical OR negation) and output S4 (logical OR) are used to select by the selection circuit 1093, which are respectively output as the lower 2 bits P1 and P0 of the output code of the 8-bit input PE. As a result, as in the case of FIG. 1, the 3-bit binary code relating to the first bit position of "1" obtained by searching the most significant bit I7 of the 8-bit data in the lower direction is output.
【0052】一方、C=“1”の場合には、2入力NO
Rゲート2U及び2入力ORゲート5を介して、4ビッ
ト入力PE1092の出力S4(論理和)の反転、すな
わち該4ビット入力PE1092の出力XS4(論理和
否定)が8ビット入力PEの出力コードのうちの最上位
ビットP2として出力される。また、4ビット入力PE
1092の出力P1,P0と4ビット入力PE1091
の出力P1,P0とは、4ビット入力PE1092の出
力XS4(論理和否定)及び出力S4(論理和)を用い
て選択回路1093で選択され、それぞれ8ビット入力
PEの出力コードのうちの下位2ビットP1,P0とし
て出力される。これにより、図1の場合とは逆に、8ビ
ットデータの最下位ビットI0から上位方向へ検索して
得られる最初の“1”のビット位置に関する3ビットの
2進数コードが出力される。On the other hand, when C = "1", 2-input NO
Through the R gate 2U and the 2-input OR gate 5, the output S4 (logical sum) of the 4-bit input PE 1092 is inverted, that is, the output XS4 (logical negative) of the 4-bit input PE 1092 is the output code of the 8-bit input PE. It is output as the most significant bit P2 of them. 4-bit input PE
1092 outputs P1 and P0 and 4-bit input PE1091
Outputs P1 and P0 are selected by the selection circuit 1093 by using the output XS4 (logical sum negation) and the output S4 (logical sum) of the 4-bit input PE 1092, and the lower two of the output codes of the 8-bit input PE are respectively selected. It is output as bits P1 and P0. As a result, contrary to the case of FIG. 1, a 3-bit binary code relating to the first bit position of "1" obtained by searching the least significant bit I0 of the 8-bit data in the upper direction is output.
【0053】図10は、図9中の4ビット入力PE10
91,1092の回路図である。図10の回路は、表7
(a)及び表7(b)に示される動作を実現するよう
に、4個のインバータ1101D,1101U,110
6,1107と、2個の2入力NORゲート1102
D,1102Uと、4個の3入力NORゲート1103
D,1103U,1104D,1104Uと、1個の4
入力NORゲート1105と、2個の2入力ORゲート
1108,1109とで構成されている。図10中のイ
ンバータ1101D、2入力NORゲート1102D、
3入力NORゲート1103D、3入力NORゲート1
104D、4入力NORゲート1105及びインバータ
1106は、図2中のインバータ1021、2入力NO
Rゲート1022、2入力NORゲート1023、2入
力NORゲート1024、4入力NORゲート1025
及びインバータ1026にそれぞれ相当するものであ
る。FIG. 10 shows the 4-bit input PE10 shown in FIG.
It is a circuit diagram of 91,1092. The circuit of FIG.
Four inverters 1101D, 1101U, 110 are provided so as to realize the operation shown in (a) and Table 7 (b).
6, 1107 and two 2-input NOR gates 1102
D, 1102U and four 3-input NOR gates 1103
D, 1103U, 1104D, 1104U and one 4
It is composed of an input NOR gate 1105 and two 2-input OR gates 1108 and 1109. Inverter 1101D and 2-input NOR gate 1102D in FIG.
3-input NOR gate 1103D, 3-input NOR gate 1
104D, 4-input NOR gate 1105 and inverter 1106 are inverter 1021, 2-input NO in FIG.
R gate 1022, 2-input NOR gate 1023, 2-input NOR gate 1024, 4-input NOR gate 1025
And the inverter 1026, respectively.
【0054】[0054]
【表7】 [Table 7]
【0055】図9の8ビット入力PEに求められる動作
を、表8(a)及び表8(b)に示す。The operations required for the 8-bit input PE of FIG. 9 are shown in Tables 8 (a) and 8 (b).
【0056】[0056]
【表8】 [Table 8]
【0057】図9の8ビット入力PEは、C=“0”
(下位方向への検索)の場合には、入力I7〜I4の論
理和否定XS4を出力コードの最上位ビットP2として
出力し、入力I7〜I4、入力I3〜I0をそれぞれ4
ビット入力PE1091,1092でエンコードし、入
力I7〜I4の論理和否定XS4が“0”ならば4ビッ
ト入力PE1091のエンコード結果を、入力I7〜I
4の論理和否定XS4が“1”ならば4ビット入力PE
1092のエンコード結果をそれぞれ出力コードの下位
2ビットP1,P0として出力するものである。また、
図9の8ビット入力PEは、C=“1”(上位方向への
検索)の場合には、入力I0〜I3の論理和否定XS4
を出力コードの最上位ビットP2として出力し、入力I
0〜I3、入力I4〜I7をそれぞれ4ビット入力PE
1092,1091でエンコードし、入力I0〜I3の
論理和否定XS4が“0”ならば4ビット入力PE10
92のエンコード結果を、入力I0〜I3の論理和否定
XS4が“1”ならば4ビット入力PE1091のエン
コード結果をそれぞれ出力コードの下位2ビットP1,
P0として出力するものである。The 8-bit input PE of FIG. 9 has C = “0”.
In the case of (search in the lower direction), the logical sum negation XS4 of the inputs I7 to I4 is output as the most significant bit P2 of the output code, and the inputs I7 to I4 and the inputs I3 to I0 are set to 4 respectively.
When the bit inputs PE1091 and 1092 are encoded and the logical sum negation XS4 of the inputs I7 to I4 is "0", the encoding result of the 4-bit input PE1091 is input to the inputs I7 to I4.
4 bit input PE if logical sum negation XS4 of 4 is "1"
The encoding result of 1092 is output as the lower 2 bits P1 and P0 of the output code, respectively. Also,
The 8-bit input PE in FIG. 9 has the logical sum negation XS4 of the inputs I0 to I3 when C = “1” (search in the upper direction).
Is output as the most significant bit P2 of the output code, and the input I
0 to I3 and inputs I4 to I7 are 4-bit inputs PE respectively
Encoded by 1092 and 1091, and if the logical sum negation XS4 of inputs I0 to I3 is "0", 4-bit input PE10
If the logical sum NOT XS4 of the inputs I0 to I3 is "1", the encoding result of the 4-bit input PE1091 is the lower 2 bits P1 of the output code.
It is output as P0.
【0058】(実施例6)図11は、本発明の第6の実
施例に係る8ビット入力PEの回路図である。この回路
は、最上位ビットと最下位ビットとの双方向から最初の
“1”を検索できるように図1の回路を変形したもので
ある。ただし、入力が全て“0”となっている場合の出
力はケアーしないという構成になっている。(Embodiment 6) FIG. 11 is a circuit diagram of an 8-bit input PE according to a sixth embodiment of the present invention. This circuit is a modification of the circuit of FIG. 1 so that the first "1" can be searched from both directions of the most significant bit and the least significant bit. However, the output is not cared when all the inputs are "0".
【0059】図11の8ビット入力PEは、4ビット入
力PE1111,1112と選択回路1113とを組み
合わせることによって構成されており、8ビット入力P
Eの入力端子I7〜I4は4ビット入力PE1111の
入力端子I3〜I0と接続され、8ビット入力PEの入
力端子I3〜I0は4ビット入力PE1112の入力端
子I3〜I0と接続されている。選択回路1113は、
各々2対のCMOSトランスファ・ゲートで構成された
4個のスイッチ回路11D,12D,11U,12Uを
備えている。4ビット入力PE1111の出力XS4
(論理和否定)は、そのまま8ビット入力PEの第1の
出力コードのうちの最上位ビットD2として出力され
る。4ビット入力PE1111の出力D1,D0と4ビ
ット入力PE1112の出力D1,D0とは、4ビット
入力PE1111の出力XS4(論理和否定)及び出力
S4(論理和)を用いて2個のスイッチ回路11D,1
2Dで選択され、それぞれ8ビット入力PEの第1の出
力コードのうちの下位2ビットD1,D0として出力さ
れる。4ビット入力PE1112の出力XS4(論理和
否定)は、そのまま8ビット入力PEの第2の出力コー
ドのうちの最上位ビットU2として出力される。4ビッ
ト入力PE1112の出力U1,U0と4ビット入力P
E1111の出力U1,U0とは、4ビット入力PE1
112の出力XS4(論理和否定)及び出力S4(論理
和)を用いて2個のスイッチ回路11U,12Uで選択
され、それぞれ8ビット入力PEの第2の出力コードの
うちの下位2ビットU1,U0として出力される。The 8-bit input PE of FIG. 11 is constructed by combining 4-bit inputs PE 1111 and 1112 and a selection circuit 1113, and 8-bit input P
The input terminals I7 to I4 of E are connected to the input terminals I3 to I0 of the 4-bit input PE 1111, and the input terminals I3 to I0 of the 8-bit input PE are connected to the input terminals I3 to I0 of the 4-bit input PE 1112. The selection circuit 1113 is
It is provided with four switch circuits 11D, 12D, 11U and 12U each of which is composed of two pairs of CMOS transfer gates. Output XS4 of 4-bit input PE1111
(Logical OR negation) is output as it is as the most significant bit D2 of the first output code of the 8-bit input PE. The outputs D1 and D0 of the 4-bit input PE1111 and the outputs D1 and D0 of the 4-bit input PE1112 are two switch circuits 11D by using the output XS4 (logical NOT) and the output S4 (logical OR) of the 4-bit input PE1111. , 1
It is selected by 2D and is output as the lower 2 bits D1 and D0 of the first output code of the 8-bit input PE, respectively. The output XS4 (logical NOT) of the 4-bit input PE 1112 is output as it is as the most significant bit U2 of the second output code of the 8-bit input PE. Outputs U1 and U0 of 4-bit input PE1112 and 4-bit input P
E1111 outputs U1 and U0 are 4-bit input PE1
The output XS4 (logical NOT) of 112 and the output S4 (logical OR) are used to select the two switch circuits 11U and 12U, and the lower 2 bits U1 of the second output code of the 8-bit input PE are respectively selected. It is output as U0.
【0060】図12は、図11中の4ビット入力PE1
111,1112の回路図である。図12の回路は、表
9(a)及び表9(b)に示される動作を実現するよう
に、3個のインバータ1121D,1121U,112
6と、6個の2入力NORゲート1122D,1122
U,1123D,1123U,1124D,1124U
と、1個の4入力NORゲート1125とで構成されて
いる。図12中のインバータ1121D、2入力NOR
ゲート1122D、2入力NORゲート1123D、2
入力NORゲート1124D、4入力NORゲート11
25及びインバータ1126は、図2中のインバータ1
021、2入力NORゲート1022、2入力NORゲ
ート1023、2入力NORゲート1024、4入力N
ORゲート1025及びインバータ1026にそれぞれ
相当するものである。FIG. 12 shows the 4-bit input PE1 shown in FIG.
It is a circuit diagram of 111,1112. The circuit of FIG. 12 has three inverters 1121D, 1121U, 112 so as to realize the operations shown in Table 9 (a) and Table 9 (b).
6 and 6 two-input NOR gates 1122D and 1122
U, 1123D, 1123U, 1124D, 1124U
And one 4-input NOR gate 1125. Inverter 1121D and 2-input NOR in FIG.
Gate 1122D, 2-input NOR gate 1123D, 2
Input NOR gate 1124D, 4-input NOR gate 11
25 and the inverter 1126 are the inverter 1 in FIG.
021, 2-input NOR gate 1022, 2-input NOR gate 1023, 2-input NOR gate 1024, 4-input N
They correspond to the OR gate 1025 and the inverter 1026, respectively.
【0061】[0061]
【表9】 [Table 9]
【0062】図11の8ビット入力PEに求められる動
作を表10(a)及び表10(b)に示す。The operations required for the 8-bit input PE of FIG. 11 are shown in Tables 10 (a) and 10 (b).
【0063】[0063]
【表10】 [Table 10]
【0064】図11の8ビット入力PEは、入力I7〜
I4の論理和否定XS4を第1の出力コードの最上位ビ
ットD2として出力し、入力I7〜I4、入力I3〜I
0をそれぞれ4ビット入力PE1111,1112でエ
ンコードし、入力I7〜I4の論理和否定XS4が
“0”の場合には4ビット入力PE1111のエンコー
ド結果を、入力I7〜I4の論理和否定XS4が“1”
の場合には4ビット入力PE1112のエンコード結果
をそれぞれ第1の出力コードの下位2ビットD1,D0
として出力するものである。また、図11の8ビット入
力PEは、入力I0〜I3の論理和否定XS4を第2の
出力コードの最上位ビットU2として出力し、入力I0
〜I3、入力I4〜I7をそれぞれ4ビット入力PE1
112,1111でエンコードし、入力I0〜I3の論
理和否定XS4が“0”の場合には4ビット入力PE1
112のエンコード結果を、入力I0〜I3の論理和否
定XS4が“1”の場合には4ビット入力PE1111
のエンコード結果をそれぞれ第2の出力コードの下位2
ビットU1,U0として出力するものである。The 8-bit input PE of FIG. 11 has inputs I7 ...
The logical sum negation XS4 of I4 is output as the most significant bit D2 of the first output code, and the inputs I7 to I4 and the inputs I3 to I are output.
0 is encoded by 4-bit inputs PE1111 and 1112 respectively, and when the logical sum negation XS4 of the inputs I7 to I4 is "0", the encoding result of the 4-bit input PE1111 is converted to the logical sum negation XS4 of the inputs I7 to I4. 1 ”
In the case of, the encoding result of the 4-bit input PE 1112 is converted into the lower 2 bits D1 and D0 of the first output code, respectively.
Is output as. Further, the 8-bit input PE of FIG. 11 outputs the logical sum negation XS4 of the inputs I0 to I3 as the most significant bit U2 of the second output code, and the input I0
To I3 and inputs I4 to I7 are 4-bit inputs PE1 respectively
112, 1111 encoded, 4-bit input PE1 when logical sum negation XS4 of inputs I0 to I3 is "0"
When the logical sum negation XS4 of the inputs I0 to I3 is “1”, the encoded result of 112 is input as a 4-bit input PE1111.
The encoding result of each is the lower 2 of the second output code
It is output as bits U1 and U0.
【0065】なお、上記第5及び第6の実施例の原理に
よれば、nを2以上の任意の整数とするとき、双方向2
n+1 ビット入力PEを2個の双方向2n ビット入力PE
と1個の選択回路とで構成することができる。また、最
初に“0”となっている位置をエンコードする構成にす
ることもできる。According to the principles of the fifth and sixth embodiments, when n is an arbitrary integer of 2 or more, bidirectional 2
Two bidirectional 2 n bit input PEs with n + 1 bit input PEs
And one selection circuit. Further, it is also possible to adopt a configuration in which the position which is initially "0" is encoded.
【0066】[0066]
【発明の効果】以上説明してきたとおり、本発明に係る
2n+1 ビット入力PEは、互いに完全並列動作する2個
の2n ビット入力PEと、簡単な選択回路とで構成され
る。したがって、探し当てたビットの位置にかかわら
ず、一定かつ小さい遅延で(n+1)ビットの出力2進
数コードが決定される。また、2n+1 ビット入力PEの
遅延と2n ビット入力PEの遅延との差は、1個の論理
ゲートにおける遅延の程度まで短縮される。更に、本発
明に係る2n+1 ビット入力PEは、従来とは違ってデコ
ード選択回路を要しないので、ハードウエア量が低減さ
れる。As described above, the 2 n + 1 bit input PE according to the present invention is composed of two 2 n bit input PEs that operate in parallel with each other and a simple selection circuit. Therefore, regardless of the position of the searched bit, the output binary code of (n + 1) bits is determined with a constant and small delay. Further, the difference between the delay of the 2 n + 1 bit input PE and the delay of the 2 n bit input PE is reduced to the extent of the delay in one logic gate. Further, the 2 n +1 bit input PE according to the present invention does not require a decode selection circuit unlike the conventional case, so that the amount of hardware is reduced.
【図1】本発明の第1の実施例に係る8ビット入力プラ
イオリティ・エンコーダの回路図である。FIG. 1 is a circuit diagram of an 8-bit input priority encoder according to a first embodiment of the present invention.
【図2】図1中の4ビット入力プライオリティ・エンコ
ーダの回路図である。2 is a circuit diagram of a 4-bit input priority encoder shown in FIG.
【図3】本発明の第2の実施例に係る16ビット入力プ
ライオリティ・エンコーダの回路図である。FIG. 3 is a circuit diagram of a 16-bit input priority encoder according to a second embodiment of the present invention.
【図4】図3中の8ビット入力プライオリティ・エンコ
ーダの回路図である。4 is a circuit diagram of an 8-bit input priority encoder shown in FIG.
【図5】本発明の第3の実施例に係る24ビット入力プ
ライオリティ・エンコーダの回路図である。FIG. 5 is a circuit diagram of a 24-bit input priority encoder according to a third embodiment of the present invention.
【図6】図5中の16ビット入力プライオリティ・エン
コーダの回路図である。6 is a circuit diagram of the 16-bit input priority encoder shown in FIG.
【図7】本発明の第4の実施例に係る11ビット入力プ
ライオリティ・エンコーダの回路図である。FIG. 7 is a circuit diagram of an 11-bit input priority encoder according to a fourth embodiment of the present invention.
【図8】図7中の3ビット入力プライオリティ・エンコ
ーダの回路図である。8 is a circuit diagram of the 3-bit input priority encoder shown in FIG. 7. FIG.
【図9】本発明の第5の実施例に係る8ビット入力プラ
イオリティ・エンコーダの回路図である。FIG. 9 is a circuit diagram of an 8-bit input priority encoder according to a fifth embodiment of the present invention.
【図10】図9中の4ビット入力プライオリティ・エン
コーダの回路図である。10 is a circuit diagram of a 4-bit input priority encoder shown in FIG.
【図11】本発明の第6の実施例に係る8ビット入力プ
ライオリティ・エンコーダの回路図である。FIG. 11 is a circuit diagram of an 8-bit input priority encoder according to the sixth embodiment of the present invention.
【図12】図11中の4ビット入力プライオリティ・エ
ンコーダの回路図である。12 is a circuit diagram of the 4-bit input priority encoder in FIG.
11,12 スイッチ回路 11D,11U,12D,12U スイッチ回路 111,112 スイッチ回路 211,212 スイッチ回路 1011,1012 4ビット入力プライオリティ・エ
ンコーダ 1013 選択回路 1031,1032 8ビット入力プライオリティ・エ
ンコーダ 1033 選択回路 1041,1042 4ビット入力プライオリティ・エ
ンコーダ 1043 選択回路 1044 2入力NORゲート 1045 2入力NANDゲート 1051 16ビット入力プライオリティ・エンコーダ 1052 8ビット入力プライオリティ・エンコーダ 1053 選択回路 1061,1062 8ビット入力プライオリティ・エ
ンコーダ 1063 選択回路 1064 2入力NORゲート 1065 2入力NANDゲート 1071 8ビット入力プライオリティ・エンコーダ 1072 3ビット入力プライオリティ・エンコーダ 1073 選択回路 1091,1092 4ビット入力プライオリティ・エ
ンコーダ 1093 選択回路 1111,1112 4ビット入力プライオリティ・エ
ンコーダ 1113 選択回路11 and 12 switch circuits 11D, 11U, 12D and 12U switch circuits 111 and 112 switch circuits 211 and 212 switch circuits 1011 and 1012 4-bit input priority encoder 1013 selection circuit 1031 and 1032 8-bit input priority encoder 1033 selection circuit 1041 1042 4-bit input priority encoder 1043 selection circuit 1044 2-input NOR gate 1045 2-input NAND gate 1051 16-bit input priority encoder 1052 8-bit input priority encoder 1053 selection circuit 1061, 1062 8-bit input priority encoder 1063 selection circuit 1064 2-input NOR gate 1065 2-input NAND gate 1071 8-bit input Priority encoder 1072 3-bit input priority encoder 1073 selection circuit 1091, 1092 4-bit input priority encoder 1093 selection circuit 1111, 1112 4-bit input priority encoder 1113 selection circuit
Claims (16)
トとのうちのいずれか一方を指定値ビット、他方を非指
定値ビットとそれぞれ定義するとき、与えられた2n+1
ビット(nは2以上の整数)の2進数データの中に最初
に出現する指定値ビットを該2進数データの最上位ビッ
トから探し、該探し当てた最初の指定値ビットの位置を
示す(n+1)ビットの2進数コードを出力するための
プライオリティ・エンコーダであって、 前記2進数データのうちの上位2n ビットで構成された
第1のデータの中に最初に出現する指定値ビットを該第
1のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第1のコードを
生成し、かつ前記第1のデータを構成する全てのビット
が非指定値ビットであるか否かを示す1ビットコードを
前記2進数コードの最上位ビットとして出力するための
第1の手段と、 前記2進数データのうちの下位2n ビットで構成された
第2のデータの中に最初に出現する指定値ビットを該第
2のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第2のコードを
生成するための第2の手段と、 前記2進数コードの最上位ビットの値のみに応じて前記
第1及び第2のコードのうちの一方を選択し、該選択し
たコードを前記2進数コードの下位nビットとして出力
するための第3の手段とを備えたことを特徴とするプラ
イオリティ・エンコーダ。1. When a bit having a value of "1" or a bit having a value of "0" is defined as a designated value bit and the other is defined as a non-designated value bit, a given 2 n + is given. 1
The designated value bit that first appears in the binary data of bits (n is an integer of 2 or more) is searched from the most significant bit of the binary data, and the position of the searched first designated value bit is indicated (n + 1). A priority encoder for outputting a binary code of bits, wherein the designated value bit first appearing in the first data composed of the upper 2 n bits of the binary data is the first specified value bit. From the most significant bit of the data, generate an n-bit first code indicating the position of the found first designated value bit, and all the bits forming the first data are non-designated value bits. first means for outputting a 1-bit code indicating whether the most significant bit of the binary code, in the second data constituted by the lower 2 n bits of said binary data Second means for searching the designated value bit that appears first from the most significant bit of the second data, and generating an n-bit second code indicating the position of the searched first designated value bit; A third for selecting one of the first and second codes according to only the value of the most significant bit of the binary code and outputting the selected code as the lower n bits of the binary code. Priority encoder characterized by having the means of.
ーダにおいて、 前記第3の手段は、各々少なくともn個のトランスファ
・ゲートを有する2個のスイッチ回路を備えたことを特
徴とするプライオリティ・エンコーダ。2. The priority encoder according to claim 1, wherein the third means includes two switch circuits each having at least n transfer gates.
ーダにおいて、 前記第1の手段は、 前記第1のデータのうちの上位2n-1 ビットで構成され
た第3のデータの中に最初に出現する指定値ビットを該
第3のデータの最上位ビットから探し、該探し当てた最
初の指定値ビットの位置を示す(n−1)ビットの第3
のコードを生成し、かつ前記第3のデータを構成する全
てのビットが非指定値ビットであるか否かを示す第1の
1ビットコードを前記第1のコードの最上位ビットとし
て生成するための第4の手段と、 前記第1のデータのうちの下位2n-1 ビットで構成され
た第4のデータの中に最初に出現する指定値ビットを該
第4のデータの最上位ビットから探し、該探し当てた最
初の指定値ビットの位置を示す(n−1)ビットの第4
のコードを生成し、かつ前記第4のデータを構成する全
てのビットが非指定値ビットであるか否かを示す第2の
1ビットコードを生成するための第5の手段と、 前記第1のコードの最上位ビットの値のみに応じて、前
記第3及び第4のコードのうちの一方を前記第1のコー
ドの下位(n−1)ビットとして選択するための第6の
手段と、 前記第1及び第2の1ビットコードに基づき、前記第1
のデータを構成する全てのビットが非指定値ビットであ
るか否かを示す1ビットコードを生成するための第7の
手段とを備えたことを特徴とするプライオリティ・エン
コーダ。3. The priority encoder according to claim 1, wherein the first means first appears in the third data composed of upper 2 n-1 bits of the first data. The designated value bit to be specified is searched from the most significant bit of the third data, and the third (n-1) -th bit indicating the position of the found first designated value bit is searched.
To generate a first 1-bit code that indicates whether or not all the bits that make up the third data are non-specified value bits as the most significant bit of the first code. And a designated value bit first appearing in the fourth data composed of lower 2 n-1 bits of the first data from the most significant bit of the fourth data. The fourth (n-1) -th bit indicating the position of the first designated value bit searched for
Means for generating a second 1-bit code indicating whether or not all the bits forming the fourth data are non-designated value bits, and the first means. Means for selecting one of the third and fourth codes as the lower (n-1) bits of the first code depending only on the value of the most significant bit of the code of Based on the first and second 1-bit codes, the first
Priority means for generating a 1-bit code indicating whether or not all the bits forming the data are non-designated value bits.
ーダにおいて、 前記第6の手段は各々少なくとも(n−1)個のトラン
スファ・ゲートを有する2個のスイッチ回路を備えたこ
とを特徴とするプライオリティ・エンコーダ。4. The priority encoder according to claim 3, wherein the sixth means includes two switch circuits each having at least (n-1) transfer gates. Encoder.
ーダにおいて、 前記第7の手段は、少なくとも1個の2入力論理ゲート
を備えたことを特徴とするプライオリティ・エンコー
ダ。5. The priority encoder according to claim 3, wherein the seventh means includes at least one two-input logic gate.
ーダにおいて、 前記第2の手段は、 前記第2のデータのうちの上位2n-1 ビットで構成され
た第5のデータの中に最初に出現する指定値ビットを該
第5のデータの最上位ビットから探し、該探し当てた最
初の指定値ビットの位置を示す(n−1)ビットの第5
のコードを生成し、かつ前記第5のデータを構成する全
てのビットが非指定値ビットであるか否かを示す1ビッ
トコードを前記第2のコードの最上位ビットとして生成
するための第8の手段と、 前記第2のデータのうちの下位2n-1 ビットで構成され
た第6のデータの中に最初に出現する指定値ビットを該
第6のデータの最上位ビットから探し、該探し当てた最
初の指定値ビットの位置を示す(n−1)ビットの第6
のコードを生成するための第9の手段と、 前記第2のコードの最上位ビットの値のみに応じて、前
記第5及び第6のコードのうちの一方を前記第2のコー
ドの下位(n−1)ビットとして選択するための第10
の手段とを備えたことを特徴とするプライオリティ・エ
ンコーダ。6. The priority encoder according to claim 1, wherein the second means first appears in the fifth data composed of upper 2 n−1 bits of the second data. The designated value bit to be specified is searched from the most significant bit of the fifth data, and the fifth (n-1) -th bit indicating the position of the searched first designated value bit.
And a 1-bit code indicating that all the bits forming the fifth data are non-specified value bits as the most significant bit of the second code. And searching for the designated value bit that first appears in the sixth data composed of the lower 2 n-1 bits of the second data from the most significant bit of the sixth data, 6th (n-1) -th bit indicating the position of the first specified value bit found
Means for generating a code of the second code and one of the fifth code and the sixth code depending on only the value of the most significant bit of the second code. n-1) tenth for selecting as bit
Priority encoder characterized by having the means of.
ーダにおいて、 前記第10の手段は、各々少なくとも(n−1)個のト
ランスファ・ゲートを有する2個のスイッチ回路を備え
たことを特徴とするプライオリティ・エンコーダ。7. The priority encoder according to claim 6, wherein the tenth means includes two switch circuits each having at least (n-1) transfer gates. -Encoder.
ーダにおいて、 前記2進数コードは、前記2進数データの中の最上位ビ
ットから連続する非指定値ビットの数を表わすことを特
徴とするプライオリティ・エンコーダ。8. The priority encoder according to claim 1, wherein the binary code represents the number of non-specified value bits consecutive from the most significant bit in the binary data. .
トとのうちのいずれか一方を指定値ビット、他方を非指
定値ビットとそれぞれ定義するとき、与えられた(2n
+2m +k)ビット(n,m,kは整数、n=m+1、
m≧1、かつ1≦k≦2m )の2進数データの中に最初
に出現する指定値ビットを該2進数データの最上位ビッ
トから探し、該探し当てた最初の指定値ビットの位置を
示す(n+1)ビットの2進数コードを出力するための
プライオリティ・エンコーダであって、 前記2進数データのうちの上位2n ビットで構成された
第1のデータの中に最初に出現する指定値ビットを該第
1のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第1のコードを
生成し、かつ前記第1のデータを構成する全てのビット
が非指定値ビットであるか否かを示す1ビットコードを
前記2進数コードの最上位ビットとして出力するための
手段と、 前記2進数データのうちの下位(2m +k)ビットで構
成された第2のデータの中に最初に出現する指定値ビッ
トを該第2のデータの最上位ビットから探し、該探し当
てた最初の指定値ビットの位置を示すnビットの第2の
コードを生成するための手段と、 前記2進数コードの最上位ビットの値のみに応じて前記
第1及び第2のコードのうちの一方を選択し、該選択し
たコードを前記2進数コードの下位nビットとして出力
するための手段とを備えたことを特徴とするプライオリ
ティ・エンコーダ。9. When one of a bit having a value of "1" and a bit having a value of "0" is defined as a designated value bit and the other is defined as a non-designated value bit, given (2 n
+2 m + k) bits (n, m, k are integers, n = m + 1,
m ≧ 1, and 1 ≦ k ≦ 2 m ), the specified value bit that first appears in the binary data is searched from the most significant bit of the binary data, and the position of the searched specified value bit is indicated. A priority encoder for outputting a binary code of (n + 1) bits, wherein a designated value bit first appearing in first data composed of upper 2 n bits of the binary data is Searching from the most significant bit of the first data, generating an n-bit first code indicating the position of the found first designated value bit, and all bits constituting the first data are undesignated Means for outputting a 1-bit code indicating whether or not it is a value bit as the most significant bit of the binary number code; and a second (2 m + k) bit of the binary number data. Of data Means for searching the most significant bit of the second data for the first appearing designated value bit therein, and generating an n-bit second code indicating the position of the found first designated value bit; Means for selecting one of the first and second codes according to only the value of the most significant bit of the binary code and outputting the selected code as the lower n bits of the binary code. A priority encoder that is equipped with.
コーダにおいて、 前記2進数コードは、前記2進数データの中の最上位ビ
ットから連続する非指定値ビットの数を表わすことを特
徴とするプライオリティ・エンコーダ。10. The priority encoder according to claim 9, wherein the binary code represents the number of non-specified value bits consecutive from the most significant bit in the binary data. .
ットとのうちのいずれか一方を指定値ビット、他方を非
指定値ビットとそれぞれ定義するとき、与えられた(2
n +2m +k)ビット(n,m,kは整数、n≧m+
2、m≧1、かつ1≦k≦2m )の2進数データの中に
最初に出現する指定値ビットを該2進数データの最上位
ビットから探し、該探し当てた最初の指定値ビットの位
置を示す(n+1)ビットの2進数コードを出力するた
めのプライオリティ・エンコーダであって、 前記2進数データのうちの上位2n ビットで構成された
第1のデータの中に最初に出現する指定値ビットを該第
1のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第1のコードを
生成し、かつ前記第1のデータを構成する全てのビット
が非指定値ビットであるか否かを示す1ビットコードを
前記2進数コードの最上位ビットとして出力するための
手段と、 前記2進数データのうちの下位(2m +k)ビットで構
成された第2のデータの中に最初に出現する指定値ビッ
トを該第2のデータの最上位ビットから探し、該探し当
てた最初の指定値ビットの位置を示す(m+1)ビット
の第2のコードを生成するための手段と、 前記第2のコードの最上位ビットより上位に少なくとも
1つの固定値ビットを付加することによりnビットの第
3のコードを生成するための手段と、 前記2進数コードの最上位ビットの値のみに応じて前記
第1及び第3のコードのうちの一方を選択し、該選択し
たコードを前記2進数コードの下位nビットとして出力
するための手段とを備えたことを特徴とするプライオリ
ティ・エンコーダ。11. When one of a bit having a value of "1" and a bit having a value of "0" is defined as a designated value bit and the other is defined as a non-designated value bit, the given (2
n +2 m + k) bits (n, m, k are integers, n ≧ m +
2, m ≧ 1, and 1 ≦ k ≦ 2 m ), the specified value bit that first appears in the binary data is searched from the most significant bit of the binary data, and the position of the found specified value bit is searched. Which is a priority encoder for outputting a (n + 1) -bit binary code indicating that the designated value first appearing in the first data composed of the upper 2 n bits of the binary data. A bit is searched for from the most significant bit of the first data, an n-bit first code indicating the position of the first specified value bit searched for is generated, and all the bits forming the first data are Means for outputting a 1-bit code indicating whether or not it is a non-specified value bit as the most significant bit of the binary code, and a low-order (2 m + k) bit of the binary data. Day 2 To find the designated value bit that first appears in the data from the most significant bit of the second data, and to generate a (m + 1) -bit second code indicating the position of the searched designated value bit. Means for generating an n-bit third code by adding at least one fixed value bit higher than the most significant bit of the second code, and the most significant bit of the binary code. Means for selecting one of the first and third codes according to only the value and outputting the selected code as the lower n bits of the binary code. -Encoder.
ンコーダにおいて、 前記2進数コードは、前記2進数データの中の最上位ビ
ットから連続する非指定値ビットの数を表わすことを特
徴とするプライオリティ・エンコーダ。12. The priority encoder according to claim 11, wherein the binary code represents the number of non-specified value bits consecutive from the most significant bit in the binary data. .
ットとのうちのいずれか一方を指定値ビット、他方を非
指定値ビットとそれぞれ定義するとき、検索方向を指示
する制御信号を受け取り、該受け取った制御信号に応じ
て、与えられた2n+1 ビット(nは2以上の整数)の2
進数データの中に最初に出現する指定値ビットを該2進
数データの最上位ビットから順に探し、あるいは前記2
進数データの中に最初に出現する指定値ビットを該2進
数データの最下位ビットから探して、該探し当てた最初
の指定値ビットの位置を示す(n+1)ビットの2進数
コードを出力するためのプライオリティ・エンコーダで
あって、 前記制御信号が下位方向への検索を指示している場合に
は前記2進数データのうちの上位2n ビットで構成され
た第1のデータの中に最初に出現する指定値ビットを該
第1のデータの最上位ビットから順に探し、前記制御信
号が上位方向への検索を指示している場合には前記第1
のデータの中に最初に出現する指定値ビットを該第1の
データの最下位ビットから探して、該探し当てた最初の
指定値ビットの位置を示すnビットの第1のコードを生
成するための手段と、 前記第1のデータを構成する全てのビットが非指定値ビ
ットであるか否かを示す第1の1ビットコードを生成す
るための手段と、 前記制御信号が下位方向への検索を指示している場合に
は前記2進数データのうちの下位2n ビットで構成され
た第2のデータの中に最初に出現する指定値ビットを該
第2のデータの最上位ビットから順に探し、前記制御信
号が上位方向への検索を指示している場合には前記第2
のデータの中に最初に出現する指定値ビットを該第2の
データの最下位ビットから探して、該探し当てた最初の
指定値ビットの位置を示すnビットの第2のコードを生
成するための手段と、 前記第2のデータを構成する全てのビットが非指定値ビ
ットであるか否かを示す第2の1ビットコードを生成す
るための手段と、 前記制御信号が下位方向への検索を指示している場合に
は、前記第1の1ビットコードを前記2進数コードの最
上位ビットとして出力し、かつ前記第1の1ビットコー
ドのみに応じて前記第1及び第2のコードのうちの一方
を選択し、該選択したコードを前記2進数コードの下位
nビットとして出力するための手段と、 前記制御信号が上位方向への検索を指示している場合に
は、前記第2の1ビットコードを前記2進数コードの最
上位ビットとして出力し、かつ前記第2の1ビットコー
ドのみに応じて前記第2及び第1のコードのうちの一方
を選択し、該選択したコードを前記2進数コードの下位
nビットとして出力するための手段とを備えたことを特
徴とするプライオリティ・エンコーダ。13. A control for instructing a search direction when one of a bit having a value of "1" and a bit having a value of "0" is defined as a designated value bit and the other is defined as a non-designated value bit. 2 of the given 2 n + 1 bits (n is an integer of 2 or more) according to the received control signal.
The designated value bit that first appears in the binary data is searched in order from the most significant bit of the binary data, or
To search for a designated value bit that first appears in the binary data from the least significant bit of the binary data, and output an (n + 1) -bit binary code indicating the position of the searched first designated value bit. A priority encoder, which appears first in the first data composed of the upper 2 n bits of the binary data when the control signal instructs a search in the lower direction. The designated value bits are searched in order from the most significant bit of the first data, and if the control signal indicates a search in the upper direction, then the first bit is searched.
For finding the designated value bit first appearing in the data of the first data from the least significant bit of the first data, and generating the n-bit first code indicating the position of the found first designated value bit. Means, means for generating a first 1-bit code indicating whether or not all the bits forming the first data are non-designated value bits, and the control signal is used for searching in a lower direction. When instructed, the designated value bit that first appears in the second data composed of the lower 2 n bits of the binary data is searched in order from the most significant bit of the second data, If the control signal indicates a search in the upper direction, then the second
To find the designated value bit that first appears in the data of the second data from the least significant bit of the second data, and to generate an n-bit second code indicating the position of the searched first designated value bit. Means, means for generating a second 1-bit code indicating whether or not all the bits forming the second data are non-designated value bits, and the control signal performs a search in a lower direction. When instructed, the first 1-bit code is output as the most significant bit of the binary code, and the first and second codes are output according to only the first 1-bit code. Means for selecting one of the two and outputting the selected code as the lower n bits of the binary code; and if the control signal instructs a search in the upper direction, the second 1 The bit code is the binary code Output as the most significant bit, and selects one of the second and first codes according to only the second 1-bit code, and the selected code is the lower n bits of the binary code. And a means for outputting as a priority encoder.
ンコーダにおいて、 前記2進数コードは、前記制御信号が下位方向への検索
を指示している場合には前記2進数データの中の最上位
ビットから連続する非指定値ビットの数を、前記制御信
号が上位方向への検索を指示している場合には前記2進
数データの中の最下位ビットから連続する非指定値ビッ
トの数をそれぞれ表わすことを特徴とするプライオリテ
ィ・エンコーダ。14. The priority encoder according to claim 13, wherein the binary code is consecutive from the most significant bit of the binary data when the control signal indicates a search in a lower direction. The number of non-designated value bits that are consecutive from the least significant bit in the binary data when the control signal directs a search in the upper direction. Characteristic priority encoder.
ットとのうちのいずれか一方を指定値ビット、他方を非
指定値ビットと定義するとき、与えられた2n+1 ビット
(nは2以上の整数)の2進数データの中に最初に出現
する指定値ビットを該2進数データの最上位ビットから
探し、該探し当てた最初の指定値ビットの位置を示す
(n+1)ビットの第1の2進数コードを出力し、かつ
前記2進数データの中に最初に出現する指定値ビットを
該2進数データの最下位ビットから探し、該探し当てた
最初の指定値ビットの位置を示す(n+1)ビットの第
2の2進数コードを出力するためのプライオリティ・エ
ンコーダであって、 前記2進数データのうちの上位2n ビットで構成された
第1のデータの中に最初に出現する指定値ビットを該第
1のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第1のコードを
生成するための手段と、 前記第1のデータの中に最初に出現する指定値ビットを
該第1のデータの最下位ビットから探し、該探し当てた
最初の指定値ビットの位置を示すnビットの第2のコー
ドを生成するための手段と、 前記第1のデータを構成する全てのビットが非指定値ビ
ットであるか否かを示す1ビットコードを前記第1の2
進数コードの最上位ビットとして出力するための手段
と、 前記2進数データのうちの下位2n ビットで構成された
第2のデータの中に最初に出現する指定値ビットを該第
2のデータの最上位ビットから探し、該探し当てた最初
の指定値ビットの位置を示すnビットの第3のコードを
生成するための手段と、 前記第2のデータの中に最初に出現する指定値ビットを
該第2のデータの最下位ビットから探し、該探し当てた
最初の指定値ビットの位置を示すnビットの第4のコー
ドを生成するための手段と、 前記第2のデータを構成する全てのビットが非指定値ビ
ットであるか否かを示す1ビットコードを前記第2の2
進数コードの最上位ビットとして出力するための手段
と、 前記第1の2進数コードの最上位ビットの値のみに応じ
て前記第1及び第3のコードのうちの一方を選択し、該
選択したコードを前記第1の2進数コードの下位nビッ
トとして出力するための手段と、 前記第2の2進数コードの最上位ビットの値のみに応じ
て前記第2及び第4のコードのうちの一方を選択し、該
選択したコードを前記第2の2進数コードの下位nビッ
トとして出力するための手段とを備えたことを特徴とす
るプライオリティ・エンコーダ。15. When one of a bit having a value of “1” and a bit having a value of “0” is defined as a designated value bit and the other is defined as a non-designated value bit, a given 2 n + 1 is given. The designated value bit that first appears in the binary data of bits (n is an integer of 2 or more) is searched from the most significant bit of the binary data, and the position of the searched first designated value bit is indicated (n + 1). A first binary code of bits is output, and the designated value bit that first appears in the binary data is searched from the least significant bit of the binary data, and the position of the searched first designated value bit is determined. A priority encoder for outputting a second binary code of (n + 1) bits shown, which first appears in the first data composed of the upper 2 n bits of the binary data. The designated value bit is the first Means for searching the most significant bit of the data and generating an n-bit first code indicating the position of the found first designated value bit; and the designated value bit first appearing in the first data For searching the least significant bit of the first data, and generating an n-bit second code indicating the position of the first specified value bit found, and all of the units forming the first data. The 1-bit code indicating whether the bit is a non-specified value bit is the first 2
Means for outputting as the most significant bit of a binary code, and a designated value bit that first appears in the second data composed of the lower 2 n bits of the binary data, of the second data Means for searching from the most significant bit and generating an n-bit third code indicating the position of the found first designated value bit; and a designated value bit that appears first in the second data, Means for searching the least significant bit of the second data and generating an n-bit fourth code indicating the position of the first specified value bit found, and all the bits forming the second data The 1-bit code indicating whether it is a non-specified value bit is the second 2
Means for outputting as the most significant bit of a binary code, and selecting one of the first and third codes according to only the value of the most significant bit of the first binary code, and selecting Means for outputting a code as the lower n bits of the first binary code, one of the second and fourth codes depending on only the value of the most significant bit of the second binary code And a means for outputting the selected code as the lower n bits of the second binary code.
ンコーダにおいて、 前記第1の2進数コードは前記2進数データの中の最上
位ビットから連続する非指定値ビットの数を、前記第2
の2進数コードは前記2進数データの中の最下位ビット
から連続する非指定値ビットの数をそれぞれ表わすこと
を特徴とするプライオリティ・エンコーダ。16. The priority encoder according to claim 15, wherein the first binary code is the number of unspecified value bits consecutive from the most significant bit in the binary data.
2. The priority encoder according to claim 1, wherein the binary code represents the number of non-specified value bits consecutive from the least significant bit in the binary data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7129945A JPH0855010A (en) | 1994-06-07 | 1995-05-29 | Priority encoder |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6-125025 | 1994-06-07 | ||
JP12502594 | 1994-06-07 | ||
JP7129945A JPH0855010A (en) | 1994-06-07 | 1995-05-29 | Priority encoder |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0855010A true JPH0855010A (en) | 1996-02-27 |
Family
ID=26461569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP7129945A Pending JPH0855010A (en) | 1994-06-07 | 1995-05-29 | Priority encoder |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0855010A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SG85091A1 (en) * | 1996-12-20 | 2001-12-19 | Sony Corp | Method of operation of arithmetic and logic unit, storage medium, and arithmetic and logic unit |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63239526A (en) * | 1987-03-27 | 1988-10-05 | Toshiba Corp | Priority encoder |
JPH05303485A (en) * | 1991-11-19 | 1993-11-16 | Texas Instr Inc <Ti> | Circuit for detecting position of endmost bit '1' of binary number |
-
1995
- 1995-05-29 JP JP7129945A patent/JPH0855010A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63239526A (en) * | 1987-03-27 | 1988-10-05 | Toshiba Corp | Priority encoder |
JPH05303485A (en) * | 1991-11-19 | 1993-11-16 | Texas Instr Inc <Ti> | Circuit for detecting position of endmost bit '1' of binary number |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SG85091A1 (en) * | 1996-12-20 | 2001-12-19 | Sony Corp | Method of operation of arithmetic and logic unit, storage medium, and arithmetic and logic unit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4163211A (en) | Tree-type combinatorial logic 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 | |
KR0152169B1 (en) | Priority, encoder | |
JPH01204138A (en) | Arithmetic circuit | |
JP3198379B2 (en) | Maximum value selection circuit | |
US5995029A (en) | Parallel bit counter using bit sorters | |
JPS61214025A (en) | Comparator for difference absolute value | |
JP3507517B2 (en) | Position detection circuit for the end "1" bit in the binary number | |
JPS595349A (en) | Adder | |
US6329838B1 (en) | Logic circuits and carry-lookahead circuits | |
US5325321A (en) | High speed parallel multiplication circuit having a reduced number of gate stages | |
US5559730A (en) | Shift operation unit and shift operation method | |
US4187549A (en) | Double precision residue combiners/coders | |
JPH0855010A (en) | Priority encoder | |
JP3459330B2 (en) | High-speed barrel shifter | |
EP0661820A2 (en) | Parallel-to-serial data conversion circuit | |
US10680641B2 (en) | Decoder circuit and decoder circuit design method | |
JPH0366693B2 (en) | ||
JPH01187630A (en) | Size comparison circuit | |
US6522690B1 (en) | Zero determination signal generating circuit | |
KR950006354B1 (en) | Comparating circuit | |
KR100201030B1 (en) | Select encoder network | |
JPH04178011A (en) | Selector | |
JP2004171491A (en) | Addition circuit and semiconductor device equipped with addition circuit | |
JPH0727452B2 (en) | Priority Encoder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19971202 |