JPH02164134A - Parity counting circuit - Google Patents

Parity counting circuit

Info

Publication number
JPH02164134A
JPH02164134A JP31978488A JP31978488A JPH02164134A JP H02164134 A JPH02164134 A JP H02164134A JP 31978488 A JP31978488 A JP 31978488A JP 31978488 A JP31978488 A JP 31978488A JP H02164134 A JPH02164134 A JP H02164134A
Authority
JP
Japan
Prior art keywords
parity
circuit
input data
bit
counting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP31978488A
Other languages
Japanese (ja)
Inventor
Katsutoshi Miyaji
勝利 宮路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP31978488A priority Critical patent/JPH02164134A/en
Publication of JPH02164134A publication Critical patent/JPH02164134A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decide the parity of the entire serial input data by providing a 1st parity counting means counting the parity from the head of the serial input data till one preceding bit of the final bit and a 2nd parity counting means counting the parity of the final bit. CONSTITUTION:The 1st parity counting circuit composed of a JK FF circuit 10, a D FF circuit 20 and an inverter 30 counts the parity from the leading bit of a serial input data till one preceding bit to the final bit and the count is latched at the rise of a timer pulse. On the other hand, the timer pulse and the clock are ANDed by an AND circuit 40 and the data of the final bit is latched at a D FF 21 at the rise of the pulse. An EX-OR circuit 50 exclusively ORs the output of the D FF circuit 20 and the output of the D FF circuit 21. The result is a parity counted value of all bits of the serial input data and indicates '0' when number of '1s' in the input data is an even number and indicates '1' when number of '1s' in the input data is an odd number.

Description

【発明の詳細な説明】 〔概 要〕 シリアルで入力されるデータ列のパリティカウント回路
に関し、 シリアルで入力されるデータ列全ビットのパリティカウ
ントを行うことができるパリティカウント回路を提供す
ることを目的とし、 シリアルで入力されるデータ列の最終ビットの1ビット
手前までのパリティをカウントする第1のパリティカウ
ント手段と、残りの最終1ビットのパリティをカウント
する第2のパリティカウント手段と、第1のパリティカ
ウント手段の出力と第2のパリティカウント手段の出力
から入力されたデータ列の全てのビットのパリティカウ
ントを行う判定手段とを備えたことを特徴とするパリテ
ィカウント回路。
[Detailed Description of the Invention] [Summary] Regarding a parity counting circuit for a serially input data string, an object of the present invention is to provide a parity counting circuit that can perform parity counting for all bits of a serially input data string. and a first parity counting means for counting the parity up to one bit before the final bit of the serially input data string, a second parity counting means for counting the parity of the remaining final bit, and a first parity counting means for counting the parity of the remaining final bit. 1. A parity counting circuit comprising: a determining means for performing a parity count of all bits of a data string inputted from the output of the second parity counting means and the output of the second parity counting means.

〔産業上の利用分野] 本発明は、シリアルで入力されるデータ列のパリティカ
ウント回路に関する。
[Industrial Application Field] The present invention relates to a parity counting circuit for serially input data strings.

伝送路上においてノイズが発生したり、瞬断が発生する
と、送信側より送信したデータが、受信側に正しく伝送
されないことになる。
If noise or momentary interruption occurs on the transmission path, data transmitted from the transmitting side will not be correctly transmitted to the receiving side.

データが正しく受信できたか否かをチエツクする方法と
して、−船釣にパリティカウント方式が広く採用されて
いる。
A parity count method is widely used in boat fishing as a method of checking whether data has been received correctly.

これまでのパリティカウント回路ではデータの先頭1ビ
ットはフレーム同期信号に使用されているためパリティ
カウントの対象外となっていた。
In conventional parity counting circuits, the first bit of data is used for a frame synchronization signal and is therefore not subject to parity counting.

しかし、通信ネットワークが高度化、複雑化してくるに
したがって、データ長全てのビットのパリティカウント
可能なパリティカウント回路が要求されている。
However, as communication networks become more sophisticated and complex, a parity counting circuit capable of parity counting of all bits of data length is required.

〔従来の技術〕[Conventional technology]

第4図は従来例を説明するブロック図、第5図は従来例
のタイムチャートを説明する図をそれぞれ示す。
FIG. 4 is a block diagram illustrating a conventional example, and FIG. 5 is a diagram illustrating a time chart of the conventional example.

第4図の例は、入力端子J、Kをパラレルに接続したJ
Kフリップフロップ回路(以下FF回路と称する)10
と、 タイマパルスを反転させるインバータ30と、JKFF
回路の出力をラッチするためのDFF回路20とを具備
している。
The example in Fig. 4 is J in which input terminals J and K are connected in parallel.
K flip-flop circuit (hereinafter referred to as FF circuit) 10
, inverter 30 that inverts the timer pulse, and JKFF
It also includes a DFF circuit 20 for latching the output of the circuit.

上述の回路の動作は第5図に示す通りであり、JKFF
回路10のパラレルに接続された入力端子J、Kにはシ
リアルデータが入力され、クロック端子CKにはクロッ
ク信号が入力される。
The operation of the above circuit is as shown in FIG.
Serial data is input to the input terminals J and K connected in parallel of the circuit 10, and a clock signal is input to the clock terminal CK.

タイマパルスはパリティチエツクを行う時間を決定する
パルスである。
The timer pulse is a pulse that determines the time to perform the parity check.

タイマパルスはインバータ30にて反転されJKFF回
路10のリセット端子Rに入力される。
The timer pulse is inverted by the inverter 30 and input to the reset terminal R of the JKFF circuit 10.

この人力よりJKFF回路10はリセットされ、且つこ
のパルス幅の時間は動作しない。
The JKFF circuit 10 is reset by this human power and does not operate during the time of this pulse width.

インバータ30にて反転されたタイマパルスが「1」な
ると、JKFF回路10は動作を開始しシリアル人力デ
ータの中の「1」が到来する毎に出力Qは「1」と「0
」の状態を繰り返し、入力データの中の「1」の数が偶
数であれば、出力Qは「0」、奇数であれば、出力Qは
「1」となる。
When the timer pulse inverted by the inverter 30 becomes "1", the JKFF circuit 10 starts operating, and every time "1" in the serial manual data arrives, the output Q becomes "1" and "0".
'' is repeated, and if the number of 1's in the input data is an even number, the output Q will be 0, and if the number is odd, the output Q will be 1.

このJKFF回路10の出力Qを、DFF回路20の入
力端子に入力し、タイマパルスをクロック端子に入力す
ることにより、DFF回路20の出力Qは、次のタイマ
パルスが到来するまで、その状態を保持する。
By inputting the output Q of this JKFF circuit 10 to the input terminal of the DFF circuit 20 and inputting the timer pulse to the clock terminal, the output Q of the DFF circuit 20 will maintain its state until the next timer pulse arrives. Hold.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述の回路においては、タイマパルスをインバータ30
にて反転し、JKFF回路10のリセット端子に入力し
ており、この入力が「0」の間はJKFF回路10が動
作しないために、シリアル入力データの先頭1ビットは
、パリティカウントの対象外となる。
In the circuit described above, the timer pulse is transferred to the inverter 30.
Since the JKFF circuit 10 does not operate while this input is "0", the first bit of the serial input data is not subject to parity counting. Become.

本発明は、シリアルで人力されるデータ列全ビットのパ
リティカウントを行うことができるパリティカウント回
路を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a parity counting circuit capable of performing parity counting of all bits of a serially inputted data string.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の詳細な説明するブロック図を示す。 FIG. 1 shows a block diagram illustrating the invention in detail.

第1図に示す本発明の原理ブロック図中の1はシリアル
入力データの先頭から最終ビットの1ビット前までのパ
リティをカウントする第1のパリティカウント手段であ
り、 2はシリアル入力データの最終ビットのパリティをカウ
ントする第2のパリティカウント手段であり、 3は第1のパリティカウント手段および第2のパリティ
カウント手段の内容から、シリアル入力データ全体のパ
リティを判定する判定手段であり、かかる手段を具備す
ることにより本課題を解決するための手段とする。
In the block diagram of the principle of the present invention shown in FIG. 1, 1 is a first parity counting means that counts the parity from the beginning of serial input data to one bit before the final bit, and 2 is the final bit of serial input data. 3 is a determining means for determining the parity of the entire serial input data from the contents of the first parity counting means and the second parity counting means; This is a means to solve this problem.

〔作 用〕[For production]

第1のパリティカウント手段1によりシリアル入力デー
タの先頭ビットから最終ビットの1ビット前までの、デ
ータ中の「1」の数をカウントし、「1」の数が偶数で
あればその出力を「0」、「1」の数が奇数であればそ
の出力を「1」とする。
The first parity counting means 1 counts the number of "1"s in the serial input data from the first bit to one bit before the last bit, and if the number of "1"s is even, the output is "1". If the number of ``0'' and ``1'' is an odd number, the output is set as ``1''.

第2のパリティカウント手段2により最終ビットのみの
「1」の数をカウントし、「l」の数が偶数であればそ
の出力を「0」、「1」の数が奇数であればその出力を
「l」とする。
The second parity counting means 2 counts the number of "1"s in only the last bit, and if the number of "l"s is an even number, its output is "0", and if the number of "1"s is an odd number, its output is Let be "l".

判定手段3により第1のカウント手段および第2のカウ
ント手段2の内容が、それぞれ「偶数」、「偶数」のと
きおよび「奇数」、「奇数」のときは判定手段3の出力
を「0」に、「奇数」、「偶数」および「偶数」、「奇
数」のときは判定手段3の出力を「l」とすることによ
り、シリアル入力データ全体のパリティをカウントする
ことが可能となる。
The determining means 3 sets the output of the determining means 3 to "0" when the contents of the first counting means and the second counting means 2 are "even number" and "even number", and when they are "odd number" and "odd number", respectively. In addition, by setting the output of the determining means 3 to "l" when the number is "odd" or "even" and "even" or "odd," it becomes possible to count the parity of the entire serial input data.

〔実施例〕〔Example〕

以下本発明の要旨を第2図〜第3図に示す実施例により
具体的に説明する。
The gist of the present invention will be specifically explained below with reference to embodiments shown in FIGS. 2 and 3.

第2図は本発明の詳細な説明するブロック図、第3図は
本発明の実施例のタイムチャートを説明する図をそれぞ
れ示す。
FIG. 2 is a block diagram illustrating the present invention in detail, and FIG. 3 is a diagram illustrating a time chart of an embodiment of the present invention.

第2図に示す本発明の実施例は第1図で説明した第1の
パリティカウント手段としてJKFF回路10とDFF
回路20とインバータ30、第2のカウント手段2とし
て、DFF回路21とAND回路40、 判定手段3として、EX−OR回路50とインバータ3
1と、DFF回路22.60 から構成した例である。
The embodiment of the present invention shown in FIG. 2 uses a JKFF circuit 10 and a DFF as the first parity counting means explained in FIG.
The circuit 20 and the inverter 30, the DFF circuit 21 and the AND circuit 40 as the second counting means 2, the EX-OR circuit 50 and the inverter 3 as the determining means 3.
1 and a DFF circuit 22.60.

この回路の動作は第3図のタイムチャートに示す通りで
ある。
The operation of this circuit is as shown in the time chart of FIG.

JKFF回路10、DFF回路20、インバータ30に
よる第1のパリティカウントの動作は、第5図で説明し
た従来例と同じであるが、タイマパルスのタイミングの
みが異なっており、タイマパルスはシリアル入力データ
の最終ビットにくるようにしである。
The operation of the first parity count by the JKFF circuit 10, the DFF circuit 20, and the inverter 30 is the same as the conventional example explained in FIG. 5, but only the timing of the timer pulse is different. It should come to the last bit.

この回路によりシリアル入力データの先頭ビットから、
最終ビットの1ビット前までのパリティをカウントし、
タイマパルスの立ち上がりでそのカウント値をラッチす
る。
With this circuit, from the first bit of serial input data,
Count the parity up to 1 bit before the final bit,
The count value is latched at the rising edge of the timer pulse.

一方、タイマパルスとクロックの論理積をAND回路4
0でとり、このパルスの立ち上がりで、最終ビットのデ
ータをDFF21によりラッチする。
On the other hand, the AND circuit 4 performs the logical product of the timer pulse and the clock.
The final bit data is latched by the DFF 21 at the rising edge of this pulse.

EX−OR回路50でDFF回路20の出力とDFF回
路21の排他的論理和をとる。すなわちそれぞれの出力
が「(偶数)、(偶数)」、「(奇数)、(奇数)」の
ときには「偶数」を、「(偶数)、(奇数)」、「(奇
数)、(偶数)」のときには奇数を出力する。
An EX-OR circuit 50 calculates the exclusive OR of the output of the DFF circuit 20 and the DFF circuit 21. In other words, when each output is "(even number), (even number)", "(odd number), (odd number)", it is "even number", "(even number), (odd number)", "(odd number), (even number)" Outputs an odd number when .

インバータ31、DFF22はEX−OR回路の出力を
ラッチするタイミングを決めているものであり、タイマ
パルスをインバータ30により反転させたパルスとクロ
ックを反転させたパルスをDFF22に入力し、クロッ
クの1周期分遅れたタイマパルスを反転させたパルスを
発生させる。
The inverter 31 and DFF 22 determine the timing of latching the output of the EX-OR circuit, and a pulse obtained by inverting the timer pulse by the inverter 30 and a pulse obtained by inverting the clock are input to the DFF 22, and one cycle of the clock is input to the DFF 22. Generates a pulse that is an inversion of the timer pulse delayed by a minute.

DFF回路60の入力端子にEX−OR回路50の出力
を、クロック端子にDFF回路22の出力を入力するこ
とにより、次のタイマパルスが入力されるまで、EX−
OR回路50の出力をDFF回路60でラッチする。
By inputting the output of the EX-OR circuit 50 to the input terminal of the DFF circuit 60 and the output of the DFF circuit 22 to the clock terminal, the EX-OR circuit 50 is input until the next timer pulse is input.
The output of the OR circuit 50 is latched by the DFF circuit 60.

この結果が、シリアル人力データ全ビットのパリティカ
ウント値となり、入力データの中の「1」の数が「偶数
」であれば「0」、「奇数jであれば「1」を示す。
This result becomes the parity count value of all bits of the serial manual data, and indicates "0" if the number of "1"s in the input data is "even", and "1" if it is "odd number j".

〔発明の効果〕〔Effect of the invention〕

以上のような本発明によれば、シリアル入力データの全
ビットをパリティカウントの対象とする、パリティカウ
ント回路を提供することが可能となる。
According to the present invention as described above, it is possible to provide a parity counting circuit that targets all bits of serial input data for parity counting.

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

第1図は本発明の詳細な説明するブロック図、第2図は
本発明の詳細な説明するブロック図、第3図は本発明の
実施例のタイムチャートを説明する図、 第4図は従来例を説明するブロック図、第5図は従来例
のタイムチャートを説明する図、をそれぞれ示す。 図において、 lは第1のパリティカウント手段、 2は第2のパリティカウント手段、 3は判定手段、 10はJKFF回路、 20.2L22.60はDFF回路、 30.31はインバータ、 40はAND回路、 50はEX−OR回路、 をそれぞれ示す。 本発明の詳細な説明するブロック図 第2図 本発明の詳細な説明するブロック図 第1図 従来例を説明するブロック図 第4図
FIG. 1 is a block diagram explaining the present invention in detail, FIG. 2 is a block diagram explaining the present invention in detail, FIG. 3 is a diagram explaining a time chart of an embodiment of the present invention, and FIG. 4 is a conventional block diagram. A block diagram illustrating an example, and FIG. 5 a diagram illustrating a time chart of a conventional example are shown, respectively. In the figure, l is the first parity counting means, 2 is the second parity counting means, 3 is the judgment means, 10 is the JKFF circuit, 20.2L22.60 is the DFF circuit, 30.31 is the inverter, 40 is the AND circuit , 50 is an EX-OR circuit, respectively. Figure 2: A block diagram explaining the present invention in detail Figure 1: A block diagram explaining the conventional example Figure 4: A block diagram explaining the present invention in detail

Claims (1)

【特許請求の範囲】 シリアルで入力されるデータ列のパリテイカウント回路
であって、 シリアルで入力されるデータ列の最終ビットの1ビット
手前までのパリテイをカウントする第1のパリテイカウ
ント手段(1)と、 残りの最終1ビットのパリテイをカウントする第2のパ
リテイカウント手段(2)と、 前記第1のパリテイカウント手段(1)の出力と前記第
2のパリテイカウント手段(2)の出力から入力された
データ列の全てのビットのパリテイカウントを行う判定
手段(3)とを備えたことを特徴とするパリテイカウン
ト回路。
[Scope of Claim] A parity counting circuit for a serially input data string, comprising a first parity counting means ( 1), a second parity counting means (2) that counts the parity of the remaining final bit, and an output of the first parity counting means (1) and the second parity counting means (2). ) A parity counting circuit characterized in that it comprises a determining means (3) for performing a parity count of all bits of a data string inputted from the output of the circuit.
JP31978488A 1988-12-19 1988-12-19 Parity counting circuit Pending JPH02164134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31978488A JPH02164134A (en) 1988-12-19 1988-12-19 Parity counting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31978488A JPH02164134A (en) 1988-12-19 1988-12-19 Parity counting circuit

Publications (1)

Publication Number Publication Date
JPH02164134A true JPH02164134A (en) 1990-06-25

Family

ID=18114151

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31978488A Pending JPH02164134A (en) 1988-12-19 1988-12-19 Parity counting circuit

Country Status (1)

Country Link
JP (1) JPH02164134A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0392016A (en) * 1989-09-05 1991-04-17 Nec Corp Parity circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0392016A (en) * 1989-09-05 1991-04-17 Nec Corp Parity circuit

Similar Documents

Publication Publication Date Title
JPH1117526A (en) Up/down conversion counter
JPH02164134A (en) Parity counting circuit
JP2948245B2 (en) Transmission / reception synchronization device for communication network station
KR100239437B1 (en) Serial interface communication
JP2695037B2 (en) Error pulse stretching circuit
JP2814978B2 (en) Frame synchronization circuit
JPH05235905A (en) Crc arithmetic unit
JPS61289741A (en) Consecutive protection circuit
JPH05347651A (en) Pause time setting circuit between data frames
KR19990042148A (en) Ethernet interface device with frame transmission control function
JPH07283844A (en) Waveform control circuit
JP2624865B2 (en) Serial signal transmission circuit
JPH0691432B2 (en) Flip-flop circuit
JP3403714B2 (en) Remote control waveform output device
JPH0223104B2 (en)
JPH03262214A (en) Initializing setting circuit for crc detection circuit
JPH03207135A (en) Circuit capable of varying number of protective stages
JPH0981367A (en) Pattern detection circuit
JPS633533A (en) Word synchronization circuit
JPH02228846A (en) Cmi coding circuit
JPH02188834A (en) Parity counting circuit
JPH04150334A (en) Parallel parity detection circuit
JPH04144325A (en) Frame synchronizing device
JPH0541701A (en) Parity circuit
JPH02202738A (en) Serial data receiving circuit