JPH03216728A - N-bit comparator - Google Patents
N-bit comparatorInfo
- Publication number
- JPH03216728A JPH03216728A JP1236590A JP1236590A JPH03216728A JP H03216728 A JPH03216728 A JP H03216728A JP 1236590 A JP1236590 A JP 1236590A JP 1236590 A JP1236590 A JP 1236590A JP H03216728 A JPH03216728 A JP H03216728A
- Authority
- JP
- Japan
- Prior art keywords
- data
- output
- circuit
- bit
- flip
- 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
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
【発明の詳細な説明】
[概要]
優先順位付きのnビット比較回路に関し、ゲート規模の
削減を図ることを目的とし、データ長nビットの2系列
のデータAiとBi(i=1、2)をそれぞれ対応する
データの組毎にビット毎の一致をとる一致回路と、各デ
ータの組毎に一致回路の出力を入力し、nビットのデタ
のうち1ビットでも不一致があるとクロックを出力する
デコーダと、該デコーダの出力をクロック人力として、
、前記一致回路の2組の出力を1人力及びに入力として
受けるJKフリップフロップと、前記一致回路の2組の
出力を受けてJKフリップフロップの出力に応じていず
れか一つをセレクトするセレクタと、該セレクタ出力を
受けてnビットのデータ全てが一致した時にキャリー信
号を出力する比較回路と、該比較回路の出力を受けて保
護をかける保護回路と、これら各構成要素を制御する制
御回路とにより構成される。[Detailed Description of the Invention] [Summary] Regarding an n-bit comparison circuit with priority, for the purpose of reducing the gate scale, two series of data Ai and Bi (i = 1, 2) with a data length of n bits are used. A matching circuit matches each bit for each corresponding data set, and the output of the matching circuit is input for each data set, and a clock is output if there is a mismatch in even 1 bit among the n bits of data. A decoder and the output of the decoder as clock power,
, a JK flip-flop that receives two sets of outputs from the matching circuit as inputs, and a selector that receives the two sets of outputs from the matching circuit and selects one of them according to the output of the JK flip-flop. , a comparison circuit that receives the selector output and outputs a carry signal when all n bits of data match, a protection circuit that receives the output of the comparison circuit and applies protection, and a control circuit that controls each of these components. Consisted of.
[産業上の利用分野] 本発明は優先順位付きのnビット比較回路に関する。[Industrial application field] The present invention relates to a prioritized n-bit comparison circuit.
[従来の技術〕
第4図は従来のデータ送受信システムの構成ブロック図
である。1は送信装置、2は受信装置である。送信装置
1に入ったデータaはCRC演算器1aによりCRC演
算を行った後、データbとして送信される。一方、デー
タaもそのまま送信される。受信装置2では、これら2
つのデータa,bを受信し、データaについてはCRC
演算器2aによりCRC演算を行う。受信側にそのまま
入ったデータをBとし、CRC演算を行ったデータをA
とする。[Prior Art] FIG. 4 is a block diagram of a conventional data transmission/reception system. 1 is a transmitting device, and 2 is a receiving device. The data a that has entered the transmitting device 1 is subjected to a CRC calculation by the CRC calculator 1a, and is then transmitted as data b. On the other hand, data a is also transmitted as is. In receiving device 2, these two
data a and b are received, and the CRC for data a is
A CRC calculation is performed by the calculation unit 2a. The data that entered the receiving side as is is B, and the data that has been subjected to CRC calculation is A.
shall be.
比較器2bは、これら2つのデータA, Bをビット
毎に比較する。しかしながら、CRC演算器2aのCR
C演算を始めるタイミングが変化するため、データAと
Bの一致をとることが困難である。そこで、第5図に示
すように、受信側に複数のCRC演算器2aを設け、デ
ータBと一致するデータAiを出力するCRC演算器を
セレクトすることが考えられる。つまり、各CRC演算
器2aの出力データAtをデータBと比較し、一致する
データをセレクタ2Cでセレクトしてやるのである。Comparator 2b compares these two data A and B bit by bit. However, the CR of the CRC calculator 2a
Since the timing of starting the C calculation changes, it is difficult to match data A and B. Therefore, as shown in FIG. 5, it is conceivable to provide a plurality of CRC calculators 2a on the receiving side and select the CRC calculator that outputs data Ai that matches data B. That is, the output data At of each CRC calculator 2a is compared with data B, and data that match is selected by the selector 2C.
第6図は従来回路の構成ブロック図で、第5図の受信装
置2側の構成を示している。つまり、第5図のデータB
とデータAt以降の比較回路の構成例を示している。図
において、10’.11は2組の2個のデータ(ビット
長n)AiとBi (i=1、2)をビット毎に比較す
る比較部である(以下、図に示すようにCOMPI,C
OMP2と略す)。なお、データAiとBiとは第5図
に示したように、どちらか一方が全て同じデータの場合
もあるし、そうでない場合もある。第6図ではデータA
iが共通の場合を示している。FIG. 6 is a block diagram of a conventional circuit, showing the configuration of the receiving device 2 shown in FIG. In other words, data B in Figure 5
An example of the configuration of a comparison circuit after data At is shown. In the figure, 10'. Reference numeral 11 is a comparison unit that compares two sets of two data (bit length n) Ai and Bi (i=1, 2) bit by bit (hereinafter, as shown in the figure, COMPI, C
(abbreviated as OMP2). Note that, as shown in FIG. 5, the data Ai and Bi may or may not be the same data. In Figure 6, data A
The case where i is common is shown.
12は比較部10.11より出力される比較結果が、全
ビットが一致した組が複数存在する時、予め定められた
優先順位に基づいてその内の1組をセレクトする信号を
出力する優先順位回路で、ここではJKフリップフロッ
プが用いられている。12 is a priority order for outputting a signal to select one of the sets based on a predetermined priority order when there are multiple sets in which all bits match in the comparison results output from the comparison unit 10.11. The circuit uses a JK flip-flop.
COMPIの出力はフリップフロップ12の1人力に入
り、COMP2の出力はK入力に入っている。The output of COMPI goes into one input of flip-flop 12, and the output of COMP2 goes into the K input.
13は2個のデータ比較結果を受けてJKフリップフロ
ップ回路l2の出力に基づいて1組をセレクトする2−
1セレクタである。14はセレクタ13の出力を受ける
で保護をかける保護回路である。該保護回路14は、デ
ータの全ビットが一致しない状態が例えば1回生じても
直ちにデータ系列を他の系列に切換えることはしないで
、所定の数だけデータの全ビットが一致しない状態が続
いた時にはじめてデータ系列を切換えるようにする働き
をするものである。13 receives the two data comparison results and selects one set based on the output of the JK flip-flop circuit l2.
1 selector. 14 is a protection circuit that receives the output of the selector 13 and applies protection. The protection circuit 14 does not immediately switch the data series to another series even if a state in which all bits of data do not match occurs once, and the state in which all bits of data do not match continues for a predetermined number of times. It functions to switch the data series for the first time.
15は比較部10,11.7Kフリップフロップ回路1
2及び保護回路14の制御を行う制御回路である。この
ように構成された回路の動作を説明すれば、以下のとお
りである。15 is a comparison section 10, 11.7K flip-flop circuit 1
2 and the protection circuit 14. The operation of the circuit configured as described above will be explained as follows.
比較部10.11に入ったデータ(A系,B系)は各組
毎に全ビットの比較が行われる。w47図は比較部10
の構成例を示す図である。図では、1個の組のみ示して
いるが、実際には組の数2だけ、図に示す回路がある。All bits of the data (A system, B system) input to the comparison section 10.11 are compared for each set. w47 figure is comparison part 10
It is a figure showing an example of composition. Although only one set is shown in the figure, there are actually two sets of circuits shown in the figure.
シリアル/パラレル変換器20.21に入ったそれぞれ
の系のデータAi,Biはn個のパラレルデータDI,
D2,・・・Dnに変換される。変換されたデータは、
ビット毎に比較器22で比較され、その比較結果がオア
回路23に送られる。オア回路23は、n個の比較器2
2の出力の内、1個でも不一致があれば、“0゛を出力
する。全ビットが一致した場合にのみ、“1′を出力す
る。The data Ai and Bi of each system that entered the serial/parallel converter 20 and 21 are n parallel data DI,
D2, . . . Dn. The converted data is
Each bit is compared by a comparator 22, and the comparison result is sent to an OR circuit 23. The OR circuit 23 includes n comparators 2
If even one of the two outputs does not match, "0" is output. Only when all bits match, "1" is output.
フリップフ口ップ11は、先ずセレクタ13にCOMP
l側をセレクトするような信号を与えている。そして、
CMPIのビットが一致している間はセレクタ10はC
OMPIをセレクトしている。ここで、COMPIのビ
ットに不一致が生じたら、その出力は0になり、フリッ
プフロップ12の出力は制御回路15からのクロックに
より″1″から“0”に落ち、セレクタ13は今度はC
OMP2の出力をセレクトするようになる。保護回路1
4はセレクタ13から送られてくるデータに保護をかけ
る。The flip-flop 11 first sends COMP to the selector 13.
A signal is given to select the l side. and,
While the CMPI bits match, the selector 10 is set to C.
I have selected OMPI. Here, if a mismatch occurs in the bits of COMPI, its output becomes 0, the output of the flip-flop 12 falls from "1" to "0" by the clock from the control circuit 15, and the selector 13 then changes to
The output of OMP2 will be selected. Protection circuit 1
4 protects the data sent from the selector 13.
[発明が解決しようとする課題]
従来の優先順位付きnビット比較回路は、第7図に示す
ような全ビットの一致.不一致を比較する回路をデータ
系列の組2だけ用意する必要があり、ゲート規模が極め
て大きくなという不具合があった。[Problems to be Solved by the Invention] The conventional priority-based n-bit comparison circuit does not match all bits as shown in FIG. It is necessary to prepare a circuit for comparing discrepancies only for data series set 2, and there is a problem that the gate scale is extremely large.
本発明はこのような課題に鑑みてなされたものであって
、ゲート規模の削減を図ることができるnビット比較回
路を提供することを目的としている。The present invention has been made in view of these problems, and an object of the present invention is to provide an n-bit comparison circuit that can reduce the gate scale.
[課題を解決するための手段]
第1図は本発明の原理ブロック図である。第6図と同一
のものは、同一の符号を付して示す。図において、30
はデータ長nビットの2系列のデータAiとBi(i=
1、2)をそれぞれ対応するデータの組毎にビット毎の
一致をとる一致回路、31は各データの組毎に一致回路
30の出力を入力し、nビットのデータのうち1ビット
でも不一致があるとクロックを出力するデコーダ、12
はデコーダ31の出力をクロック入力として、前記一致
回路30の2組の出力をJ入力及びに入力として受ける
JKフリップフロップ、13は前記一致回路30の2組
の出力を受けてJKフリップフロップ12の出力に応じ
ていずれか一つをセレクトするセレクタ、32は該セレ
クタ13出力を受けてnビットのデータ全てが一致した
時にキャリー信号を出力する比較回路、14は該比較回
路32の出力を受ける保護回路、33はこれら各構成要
素を制御する制御回路である。[Means for Solving the Problems] FIG. 1 is a block diagram of the principle of the present invention. Components that are the same as those in FIG. 6 are designated by the same reference numerals. In the figure, 30
is two series of data Ai and Bi (i=
1 and 2) are matching circuits that match bit by bit for each corresponding data set, and 31 inputs the output of the matching circuit 30 for each data set, and checks if even 1 bit out of n bits of data does not match. A decoder that outputs a clock if there is one, 12
13 is a JK flip-flop which receives the output of the decoder 31 as a clock input and the two sets of outputs from the coincidence circuit 30 as inputs; A selector that selects one according to the output; 32 a comparison circuit that receives the output of the selector 13 and outputs a carry signal when all n bits of data match; 14 a protection circuit that receives the output of the comparison circuit 32; A circuit 33 is a control circuit that controls each of these components.
[作用]
一致回路30でデータの組毎にビットシリアルデータの
一致がとられ、順次デコーダ31に送られる。JKフリ
ッププロップ12は、通常はAと81の組をセレクトし
ている。ここで、Aと81の組に不一致が生じると一致
回路30の対応する出力は“0゛を出力する。デコーダ
31はこの“0”を受けると、クロックに同期してクロ
ックパルスを発生し、JKフリップフロップ12に印加
する。この結果、フリップフロップ12の出力は、それ
までの“1”から“0゜に落ち、セレクタとしてAと8
2の組をセレクトする。[Operation] The matching circuit 30 matches the bit serial data for each data set, and sequentially sends the data to the decoder 31. The JK flip-prop 12 normally selects the pair A and 81. Here, when a mismatch occurs between the pair A and 81, the corresponding output of the matching circuit 30 outputs "0". When the decoder 31 receives this "0", it generates a clock pulse in synchronization with the clock, JK flip-flop 12. As a result, the output of the flip-flop 12 drops from "1" to "0°", and the selectors A and 8
Select pair 2.
比較回路32は、セレクタ13から送られてくるシリア
ルデータをクロックに同期してカウントし、n進カウン
タがキャリーアウトしたら、少なくともnビットの全て
のビットが一致したデータの組が1組存在することを示
している。比較回路32の出力は保護回路14に送られ
、保護がかかる。保護回路14の出力が、検出出力DE
Tとなる。The comparison circuit 32 counts the serial data sent from the selector 13 in synchronization with the clock, and when the n-ary counter carries out, it determines that at least one set of data in which all n bits match exists. It shows. The output of the comparison circuit 32 is sent to the protection circuit 14 and is protected. The output of the protection circuit 14 is the detection output DE
It becomes T.
本発明によれば、データAtとBiとの一致を一致回路
30でビット毎に比較し、比較結果をデコーダ31に知
らせるようにし、デコーダ31はデータの組毎に1ビッ
トでも不一致が生じればクロックを出力してJKフリッ
プフロップ12の出力によりセレクタ13を切換えるよ
うにしているので、nビット比較回路を1個ですませる
ことができる。According to the present invention, the coincidence circuit 30 compares the coincidence of data At and Bi bit by bit, and informs the decoder 31 of the comparison result. Since the clock is output and the selector 13 is switched by the output of the JK flip-flop 12, only one n-bit comparison circuit is required.
[実施例]
以下、図面を参照して本発明の実施例を詳細に説明する
。[Example] Hereinafter, an example of the present invention will be described in detail with reference to the drawings.
第2図は本発明の一実施例を示す回路図である。FIG. 2 is a circuit diagram showing one embodiment of the present invention.
第1図と同一のものは、同一の符号を付して示す。Components that are the same as those in FIG. 1 are designated by the same reference numerals.
図に示す実施例は、A, Bのデータの組が2個でビ
ット長が6の場合を示している。一致回路30は、2人
力のEXNORゲート30a,30bで構成されている
。従って、そのゲート出力は、2つの入力AiとBiが
一致の時に“1“、不一致の時“0゜となる。The embodiment shown in the figure shows a case where there are two sets of data A and B and the bit length is 6. The coincidence circuit 30 is composed of two manually powered EXNOR gates 30a and 30b. Therefore, the gate output becomes "1" when the two inputs Ai and Bi match, and becomes "0°" when they do not match.
デコーダ31は、ナンドゲート31aとDタイプフリッ
プフロップ31b,31cより構成されている。アンド
ゲート31aには一致回路30のゲート30a,30b
の出力がそのまま入り、ナンドゲート31aの出力は第
1のDタイプフリップフロツプ3lb(DFFIと略す
)のD入力に入っている。DFFIのクロック入力には
、制御回路33からクロックが与えられている。The decoder 31 is composed of a NAND gate 31a and D type flip-flops 31b and 31c. The gates 30a and 30b of the matching circuit 30 are connected to the AND gate 31a.
The output of the NAND gate 31a is input as is, and the output of the NAND gate 31a is input to the D input of the first D type flip-flop 3lb (abbreviated as DFFI). A clock is supplied from the control circuit 33 to the clock input of the DFFI.
DFFIのQ出力は、第2のDタイプフリップフロップ
31c(DFF2と略す)のクロック人力CKに入って
いる。DFF2のD入力は“1′に固定されている。そ
して、DFF2のQ出力からJKフリップフロツプ12
に与えるクロックが出ている。これらDFFI,DFF
2には制御回路33からリセット信号が入るようになっ
ており、リセットされると各DFFのQ出力は“0”に
なる。なお、前記リセット信号はJKフリップフロップ
12のリセット人力Rにも入るようになっている。The Q output of DFFI is input to the clock CK of a second D-type flip-flop 31c (abbreviated as DFF2). The D input of DFF2 is fixed at "1".Then, the JK flip-flop 12 is connected from the Q output of DFF2.
There is a clock to give to. These DFFI, DFF
2 receives a reset signal from the control circuit 33, and when reset, the Q output of each DFF becomes "0". Note that the reset signal is also input to the reset manual R of the JK flip-flop 12.
セレクタl3は、一致回路30の各ゲートの出力をその
一方の入力に、他方の入力にJKフリップフロップ12
のXQ出力を受けるオアゲート13a,他方の入力にJ
Kフリップフロツプ12のQ出力を受けるオアゲート1
3b及びこれらオアゲート13a,13bの出力を受け
るアンドゲート13cより構成されている。The selector l3 has one input of the output of each gate of the matching circuit 30, and the other input of the JK flip-flop 12.
OR gate 13a receives the XQ output of
OR gate 1 receives Q output of K flip-flop 12
3b and an AND gate 13c which receives the outputs of these OR gates 13a and 13b.
比較回路32は、セレクタ13の出力Qをその一方の入
力に、他方の入力にフィードバック信号を受けるアンド
ゲート32a,該アンドゲート32aの出力をイネーブ
ル人力ENに受ける8進カウンタ32b (CNTR2
)及び該カウンタ32bのキャリーアウト出力COを受
けるDタイプフリップフロップ32cより構成されてい
る。カウンタ32bには、16進のブリセット値“1”
が人力されており、制御回路33からのロードパルスT
LOによりプリセット値がセットされる。また、該カウ
ンタ32bのクロックは、制御回路33から与えられて
いる。フリップフロップ32Cは、カウンタ32bのキ
ャリー出力COを制御回路34から出力されるラッチパ
ルスDECKによリラッチする。そして、ラッチされた
信号がCOPMとなる。このCOMP信号は、前記ゲー
ト1lbの他方の入力に人っている。The comparison circuit 32 includes an AND gate 32a which receives the output Q of the selector 13 at one input, a feedback signal at the other input, and an octal counter 32b (CNTR2) which receives the output of the AND gate 32a at an enable input EN.
) and a D-type flip-flop 32c which receives the carry-out output CO of the counter 32b. The counter 32b has a hexadecimal reset value “1”.
is manually operated, and the load pulse T from the control circuit 33
A preset value is set by LO. Further, the clock of the counter 32b is given from the control circuit 33. The flip-flop 32C relatches the carry output CO of the counter 32b using the latch pulse DECK output from the control circuit 34. Then, the latched signal becomes COPM. This COMP signal is applied to the other input of the gate 1lb.
制御回路33は、タイミング信号TiMとマスタークロ
ックMCKを受けて、クロック,リセットバルスCTI
CO,初期値ロードバルスTLO及びラッチパルスDE
CKを作る。該制御回路33は、Dタイプフリップフロ
ップ33a〜33C,8進カウンタ33d (CNTR
I)及びアンドゲート33eより構成されている。この
ように構成された回路の動作を、第3図のタイミングチ
ャートを参照しつつ説明すれば、以下のとおりである。The control circuit 33 receives the timing signal TiM and the master clock MCK, and generates a clock and a reset pulse CTI.
CO, initial value load pulse TLO and latch pulse DE
Make a CK. The control circuit 33 includes D-type flip-flops 33a to 33C and an octal counter 33d (CNTR
I) and an AND gate 33e. The operation of the circuit configured as described above will be explained below with reference to the timing chart of FIG.
制御回路33には、(a)に示すようなマスタークロッ
クMCKと(b)に示すようなタイミング信号TiMか
入り、それぞれ(C)に示すような初期値ロードバルス
TLO, (d)に示すようなカウント (e)に示
すようなリセット信号CTICO及び(f)に示すよう
なラッチパルスDECKを出力する。カウンタ33dは
(d)に示すような6進カウントを行い、そのキャリー
アウトCTI COは(e)に示すようなものとなる。The control circuit 33 receives a master clock MCK as shown in (a) and a timing signal TiM as shown in (b), and receives an initial value load pulse TLO as shown in (C) and an initial value load pulse TLO as shown in (d), respectively. A reset signal CTICO as shown in (e) and a latch pulse DECK as shown in (f) are output. The counter 33d performs hexadecimal counting as shown in (d), and its carryout CTI CO is as shown in (e).
データAが(g),データBl,B2がそれぞれ(h)
. (i)に示すようなものであったものとする。ま
た、一致回路30の各ゲート30a.30bの出力J,
Kがそれぞれ(j).(k)に示すようなものであっ
たものとする。比較開始前に制御回路33からのリセッ
ト信号CTI CoによりフリップフロップDDFI,
DDF2,JKフリップフロップ12のQ出力は”o”
になる。Data A is (g), data Bl and B2 are each (h)
.. Assume that it is as shown in (i). Furthermore, each gate 30a . 30b output J,
K is (j) respectively. Assume that it is as shown in (k). Before starting the comparison, the flip-flops DDFI,
The Q output of DDF2 and JK flip-flop 12 is “o”
become.
この結果、オアゲート13bが開くので一致回路30の
出力はKがセレクトされる。また、ロードパルスTLO
によりカウンタ32bの初期値は“1”となる。一致出
力Kはアンドゲート13cを介して比較回路32に入り
、カウンタ32bをイネーブルにする。As a result, the OR gate 13b opens, so that K is selected as the output of the matching circuit 30. In addition, load pulse TLO
As a result, the initial value of the counter 32b becomes "1". The coincidence output K enters the comparison circuit 32 via the AND gate 13c and enables the counter 32b.
この結果、カウンタ32bは初期値“1″からカウント
を開始する。そして、(k)に示すように6ビット目で
K出力に不一致が発生したものとする。デコーダ31の
ナンドゲート31a出力は“12となる。この“1′レ
ベルはDFFIにラツチされ、次にこのDFFIのQ出
力がクロツクに同期して“1”になると同時にDFF2
のQ出力が“1“になる。As a result, the counter 32b starts counting from the initial value "1". Assume that a mismatch occurs in the K output at the 6th bit as shown in (k). The output of the NAND gate 31a of the decoder 31 becomes "12". This "1' level is latched to the DFFI, and then the Q output of this DFFI becomes "1" in synchronization with the clock, and at the same time, the DFF2
Q output becomes "1".
この結果、JKフリップフロップ12のQ出力が“1”
,XQ出力が“0”になり、今度は一致回路30出力の
Jをセレクトする。つまり、オアゲート13aが開かれ
、Jデータが入力される。As a result, the Q output of the JK flip-flop 12 is “1”
, XQ output becomes "0", and J of the matching circuit 30 output is selected this time. That is, the OR gate 13a is opened and J data is input.
アンドゲート13Cの出力Qは、Kが“0”に落ちると
同時に“0”になるが、J人力が入ると速やかに(p)
に示すように″12になる。Q出力はカウンタ32bの
イネーブル人力ENに人っているが、クロックの入力時
には常にイネーブルであり、クロックをカウントする。The output Q of the AND gate 13C becomes "0" as soon as K falls to "0", but as soon as the J input is applied, the output Q becomes "0" (p).
The Q output is set to the enable input EN of the counter 32b, and is always enabled when the clock is input and counts the clock.
比較回路32では、初期値゜1”からクロックカウント
を開始し、カウントアップしたらキャリーアウトCOを
出力する。前記セレクタ13の出力Qはアンドゲート3
3Cを介してカウンタ32bのイネーブル人力ENに人
っており、ENが“1゜の間にクロックをカウントする
。前記セレクタ13の出力Qは、データの組の内、一致
している組がある間は“1”を出力し続けるので、6ビ
ット全部が一致するデータの組がある限り、カウンタ3
2bはキャリーアウトCOを出力する。The comparator circuit 32 starts clock counting from the initial value ゜1'' and outputs a carry-out CO when the count is up.The output Q of the selector 13 is output from the AND gate 3.
The output Q of the selector 13 indicates that there is a matching data set among the data sets. As long as there is a set of data in which all 6 bits match, counter 3 continues to output "1".
2b outputs carryout CO.
このCOは、制御回路33から出力される(f)に示す
ようなラッチパルスDECKによりラッチされ、(S)
に示すようなCOMP信号として出力される。フリップ
フロップ32cの出力は、図示しない保護回路14(第
1図参照)に入り、保護がかかることになる。This CO is latched by a latch pulse DECK as shown in (f) output from the control circuit 33, and (S)
It is output as a COMP signal as shown in FIG. The output of the flip-flop 32c enters a protection circuit 14 (see FIG. 1), not shown, and is protected.
このように、本発明によれば、一致回路30及びデコー
ダ31により、データの組毎にビットシリアルなデータ
を順次ビット毎に一致しているかどうかチェックできる
ので、第7図に示すようにシリアル/パラレル変換器は
不要となり、ゲート規模の削減を図ることができる。ま
た、ビット毎に優先順位を機能させることにより、6ビ
ット比較した時点で最も優先順位の高いデータの組がセ
レクタ12によりセレクトされているため、検出時間を
短縮することができる。As described above, according to the present invention, the matching circuit 30 and the decoder 31 can sequentially check whether or not bit-serial data matches each other bit by bit for each data set. A parallel converter is no longer required, and the gate scale can be reduced. Further, by controlling the priority order for each bit, the data set with the highest priority is selected by the selector 12 at the time of 6-bit comparison, so that the detection time can be shortened.
上述の実施例ではデータの組が2、ビット長(n)が6
の場合を例にとって説明したが、本発明はこれに限るも
のでないことはいうまでもない。In the above embodiment, the number of data sets is 2 and the bit length (n) is 6.
Although the case has been described as an example, it goes without saying that the present invention is not limited to this.
任意のデータの組の任意のビット長のデータに本発明を
適用することができる。その場合、第1図に示す一致回
路30及びJKフリップフロップ12の数を2つのデー
タの組毎に用意する必要がある。The present invention can be applied to data of any bit length in any data set. In that case, it is necessary to prepare the same number of matching circuits 30 and JK flip-flops 12 as shown in FIG. 1 for each two data sets.
[発明の効果]
以上、詳細に説明したように、本発明によれば、データ
AiとBiとの一致を一致回路30でビット毎に比較し
、比較結果をデコーダ31に知らせるようにし、デコー
ダ31はデータの組毎に1ビットでも不一致が生じれば
“0”を出力するようにしているので、nビット比較回
路を1個ですませることができる。従って、ゲート規模
を小さくすることができる。[Effects of the Invention] As described above in detail, according to the present invention, the matching circuit 30 compares the coincidence of data Ai and Bi bit by bit, and the comparison result is notified to the decoder 31. Since the circuit outputs "0" if even one bit of mismatch occurs in each data set, only one n-bit comparison circuit is required. Therefore, the gate scale can be reduced.
第1図は本発明の原理ブロック図、
第2図は本発明の一実施例を示す回路図、第3図は各部
の動作を示すタイミングチャート、第4図は従来のデー
タ送受信システムの構成ブロック図、
第5図は従来のデータ送受信システムの構成ブロック図
、
第6図は従来回路の構成ブロック図、
第7図は比較部の従来構成例を示す図である。
第1図において、
12はJKフリップフロツプ、
13はセレクタ、
14は保護回路、
30は一致回路、
31はデコーダ、
32は比較回路、
33は制御回路である。Fig. 1 is a block diagram of the principle of the present invention, Fig. 2 is a circuit diagram showing an embodiment of the invention, Fig. 3 is a timing chart showing the operation of each part, and Fig. 4 is a configuration block of a conventional data transmission/reception system. 5 is a configuration block diagram of a conventional data transmission/reception system, FIG. 6 is a configuration block diagram of a conventional circuit, and FIG. 7 is a diagram showing an example of a conventional configuration of a comparison section. In FIG. 1, 12 is a JK flip-flop, 13 is a selector, 14 is a protection circuit, 30 is a matching circuit, 31 is a decoder, 32 is a comparison circuit, and 33 is a control circuit.
Claims (1)
、2)をそれぞれ対応するデータの組毎にビット毎の一
致をとる一致回路(30)と、各データの組毎に一致回
路(30)の出力を入力し、nビットのデータのうち1
ビットでも不一致があるとクロックを出力するデコーダ
(31)と、 該デコーダ(31)の出力をクロック入力として、前記
一致回路(30)の2組の出力をJ入力及びに入力とし
て受けるJKフリップフロップ(12)と、 前記一致回路(30)の2組の出力を受けてJKフリッ
プフロップ(12)の出力に応じていずれか一つをセレ
クトするセレクタ(13)と、該セレクタ(13)出力
を受けてnビットのデータ全てが一致した時にキャリー
信号を出力する比較回路(32)と、 該比較回路(32)の出力を受けて保護をかける保護回
路(14)と、 これら各構成要素を制御する制御回路(33)とにより
構成されてなるnビット比較回路。[Claims] Two series of data Ai and Bi (i=1
, 2) are inputted to a matching circuit (30) that matches bit by bit for each corresponding data set, and the output of the matching circuit (30) for each data set is input, and one of the n bits of data is input.
A decoder (31) that outputs a clock when there is a mismatch in bits, and a JK flip-flop that uses the output of the decoder (31) as a clock input and receives two sets of outputs from the matching circuit (30) as inputs. (12), a selector (13) that receives two sets of outputs from the matching circuit (30) and selects one of them according to the output of the JK flip-flop (12); A comparison circuit (32) that outputs a carry signal when all n bits of data match, a protection circuit (14) that receives the output of the comparison circuit (32) and protects it, and controls each of these components. and a control circuit (33).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1236590A JPH03216728A (en) | 1990-01-22 | 1990-01-22 | N-bit comparator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1236590A JPH03216728A (en) | 1990-01-22 | 1990-01-22 | N-bit comparator |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03216728A true JPH03216728A (en) | 1991-09-24 |
Family
ID=11803248
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1236590A Pending JPH03216728A (en) | 1990-01-22 | 1990-01-22 | N-bit comparator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03216728A (en) |
-
1990
- 1990-01-22 JP JP1236590A patent/JPH03216728A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4587445A (en) | Data output circuit with means for preventing more than half the output lines from transitioning simultaneously | |
| US3553656A (en) | Selector for the dynamic assignment of priority on a periodic basis | |
| CA1266096A (en) | Fully programmable linear feedback shift register | |
| US4663620A (en) | Modified crossbar switch operation with fixed priority conflict resolution and apparatus for performing same | |
| US8779825B2 (en) | Signal processing apparatus | |
| US5890001A (en) | Arbitration apparatus employing token ring for arbitrating between active jobs | |
| JPH03216728A (en) | N-bit comparator | |
| US4069478A (en) | Binary to binary coded decimal converter | |
| JPH06195319A (en) | Multi-processor system | |
| JPH03216727A (en) | N-bit comparator | |
| ES2271949T3 (en) | ALIGNMENT OF PARITY BITS TO ELIMINATE ERRORS IN THE SWITCHING OF AN ACTIVE PROCESSING CIRCUIT TO A RESERVATION. | |
| US5428654A (en) | Up/down counter apparatus | |
| SU1629962A1 (en) | Redundant r-s flip-flop | |
| US6882184B2 (en) | Clock switching circuit | |
| JPH10117147A (en) | Data generating circuit for error check | |
| US7453293B2 (en) | High frequency divider state correction circuit | |
| JP2002077306A (en) | Bit string detection circuit | |
| US7061284B2 (en) | High frequency divider state correction circuit with data path correction | |
| IE46668B1 (en) | A device for detecting errors ina digital transmission system | |
| JPH043134B2 (en) | ||
| RU2270477C1 (en) | Multi-channel adaptive device | |
| JPH05289956A (en) | Data transmission method of supervisory control device | |
| JP3087877B2 (en) | Line switching protection method | |
| SU1091369A1 (en) | Redundant three-channel priority device | |
| JPH02292936A (en) | Monitoring circuit |