JP5761944B2 - Error check circuit and error check method - Google Patents
Error check circuit and error check method Download PDFInfo
- Publication number
- JP5761944B2 JP5761944B2 JP2010180325A JP2010180325A JP5761944B2 JP 5761944 B2 JP5761944 B2 JP 5761944B2 JP 2010180325 A JP2010180325 A JP 2010180325A JP 2010180325 A JP2010180325 A JP 2010180325A JP 5761944 B2 JP5761944 B2 JP 5761944B2
- Authority
- JP
- Japan
- Prior art keywords
- error detection
- checksum
- communication data
- crc
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 27
- 238000001514 detection method Methods 0.000 claims description 127
- 238000004891 communication Methods 0.000 claims description 106
- 238000004364 calculation method Methods 0.000 claims description 78
- 238000012360 testing method Methods 0.000 description 66
- 230000005540 biological transmission Effects 0.000 description 40
- 238000012545 processing Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 6
- 230000001360 synchronised effect Effects 0.000 description 5
- 238000007726 management method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000012447 hatching Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 210000003813 thumb Anatomy 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Detection And Prevention Of Errors In Transmission (AREA)
Description
本発明は、エラーチェック回路及びエラーチェック方法に関する。 The present invention relates to an error check circuit and an error check method.
データ処理装置の間又はLSI(Large Scale Integration)の間においては、数ギガバイトの大容量データが、高速で送信される。このようなデータ送信の信頼性を評価するために、大量のテストデータを高速でデータ送信し、データが正しく送信されたかをチェックする。 Large data of several gigabytes is transmitted at high speed between data processing devices or between LSI (Large Scale Integration). In order to evaluate the reliability of such data transmission, a large amount of test data is transmitted at high speed to check whether the data has been transmitted correctly.
データ送信の信頼性を評価の方法として、チェックサムによるチェックが知られている。チェックサムによるチェックにおいては、送信装置において、データのチェックサムが算出され、データに付加されて送信される。この後、受信装置において、受信したデータから生成されたチェックサムが算出され、送信されたチェックサムと受信したデータのチェックサムとが比較され、比較の結果が評価される。 A checksum check is known as a method for evaluating the reliability of data transmission. In the check using the checksum, the checksum of the data is calculated in the transmission device, and is added to the data and transmitted. Thereafter, in the receiving apparatus, a checksum generated from the received data is calculated, the transmitted checksum is compared with the checksum of the received data, and the comparison result is evaluated.
また、他のデータ送信の信頼性を評価の方法として、巡回冗長検査(Cyclic Redundancy Check、以下CRCという)によるチェックが知られている。CRCによるチェックにおいては、送信装置のCRC生成回路において生成されたCRCコードがデータに付加されて送信される。この後、受信装置のCRCチェック回路において、受信したデータから生成したCRCコードと送信されたCRCコードとが比較され、比較の結果が評価される。 As another method for evaluating the reliability of data transmission, a check by a cyclic redundancy check (hereinafter referred to as CRC) is known. In the check by CRC, the CRC code generated in the CRC generation circuit of the transmission apparatus is added to the data and transmitted. Thereafter, the CRC check circuit of the receiving apparatus compares the CRC code generated from the received data with the transmitted CRC code, and evaluates the comparison result.
また、更に他のデータ送信の信頼性を評価の方法として、比較によるチェックが知られている。比較によるチェックにおいては、送信装置から送信されたデータを受信し、受信したデータと記憶装置に予め保存してある期待値とが比較され、比較の結果が評価される。 Further, as a method for evaluating the reliability of other data transmission, a check by comparison is known. In the check by comparison, the data transmitted from the transmission device is received, the received data is compared with the expected value stored in advance in the storage device, and the comparison result is evaluated.
なお、内部データの管理・確認方法において、表示デバイスに表示して書換え可能デバイスの素性を確認するための管理記号が格納される領域と、書き込み時に制御プログラムで正当性の確認のための領域を設け、パーソナルコンピュータよりの書き込み信号受信時に、前記制御プログラムで算出した値と比較し、正当性確認時にプログラムやデータを前記書換え可能デバイスの書き込み領域に格納すると共に、当該プログラムやデータの管理記号を前記管理記号格納領域に書き込む手段等が提案されている。 In the internal data management / confirmation method, there are an area for storing the management symbol for confirming the identity of the rewritable device displayed on the display device, and an area for confirming the validity by the control program at the time of writing. When the write signal is received from the personal computer, the value is compared with the value calculated by the control program, and when the validity is confirmed, the program or data is stored in the write area of the rewritable device, and the management symbol of the program or data is Means for writing in the management symbol storage area have been proposed.
また、CRT表示制御回路の試験方式において、CRT表示制御回路と、該CRT表示制御回路の出力する複数の信号のパリティビットを生成するパリティビット生成回路と、上記CRT表示制御回路のクロックと同期したクロックを生成する同期クロック発生回路と、上記パリティビット生成回路の出力するパリティビット列のCRC演算を同期クロックに従って行うCRC演算回路等が提案されている。 Further, in the test method of the CRT display control circuit, the CRT display control circuit, the parity bit generation circuit for generating parity bits of a plurality of signals output from the CRT display control circuit, and the clock of the CRT display control circuit are synchronized. There have been proposed a synchronous clock generation circuit for generating a clock, a CRC calculation circuit for performing CRC calculation of a parity bit string output from the parity bit generation circuit in accordance with the synchronous clock, and the like.
また、多重通信装置において、送信時、1パケット毎に付加するCRCチェックコード等の誤り検出用データとは別に、内容データに対し、この送信内容データのエラーを検出するための第2の誤り検出用データを付加して送信し、受信したデータフィールドの内容に対し、読み込んだデータに誤りがないか否かをデータフィールド内に含まれる第2の誤り検出用データを用いて判定し、メモリ異常やパラレルバス上のノイズ等によるデータ化けを検出する手段等が提案されている。 Further, in the multiplex communication apparatus, a second error detection for detecting an error in the transmission content data with respect to the content data separately from the error detection data such as a CRC check code added for each packet at the time of transmission. Data is added and transmitted, and the content of the received data field is determined using the second error detection data included in the data field to determine whether or not the read data is error-free. Means for detecting data corruption due to noise on the parallel bus or the like have been proposed.
例えば、図7(A)に示すように、装置101Aは、送信データファイル102に格納したテスト用データを、高速シリアル信号の伝送路105を介して、装置101Bに送信する。装置101Bは、装置101Aから受信したテスト用データを、受信データファイル103に格納し、データ送信の信頼性を評価する。換言すれば、図7(B)に示すように、大容量のデータ送信処理201が実行された後に、何らかの比較チェック処理202が実行される。例えば、前述の比較によるチェックを用いてデータ送信の信頼性を評価する場合には、装置101Bは、受信し受信データファイル103に格納したテスト用データと、期待値ファイル104に予め格納された期待値とを比較する。
For example, as shown in FIG. 7A, the
しかし、チェックサムによるチェックにおいては、テスト用データに付加されて送信されたチェックサムと受信したデータから生成されたチェックサムとが、本来は異なる値であるにも拘らず、偶然により又は桁上がりにより一致してしまう場合がある。この場合、本来は検出されるはずのエラーが検出されない。また、送信側の装置101Aが、テスト用データにチェック専用データとしてのチェックサムを付加する必要がある。また、送信されたチェックサムそれ自体が、正しく送信されない場合がある。
However, in the check by checksum, the checksum added to the test data and the checksum generated from the received data are different from each other in spite of being originally different values. May match. In this case, an error that should originally be detected is not detected. Further, it is necessary for the transmitting
また、CRCによるチェックにおいては、例えば64ビットのように、ビット幅の大きいテスト用データについてデータ送信の信頼性を評価する場合、受信側の装置101BにおけるCRCチェック回路の規模が相当に大きくなり、現実的ではない。換言すれば、CRCチェック回路の規模が大きくなり、CRCチェック回路をFPGA(Field Programmable Gate Array)に搭載できない場合がある。また、送信側の装置101Aが、テスト用データにチェック専用データとしてのCRCコードを付加する必要がある。
In the check by CRC, for example, when evaluating the reliability of data transmission for test data having a large bit width such as 64 bits, the scale of the CRC check circuit in the receiving-
また、比較によるチェックにおいては、図7(A)に示すように、比較チェック処理202のための期待値を格納するための期待値ファイル104が必要である。データのサイズが数ギガバイトと大きい場合には、期待値を格納するための大規模な記憶領域が必要となる。換言すれば、データ送信の信頼性を評価するためだけに、コストが増加することになり、採用できない。また、データのサイズが大きい場合には、比較チェック処理202に時間を要するため、受信したデータの比較チェック処理202の実行中は、新たに受信したデータをチェックすることができない。換言すれば、比較チェック処理202のための時間が装置101Bの実際の運用時と異なる結果、装置101Bの実際の運用におけるデータ送信の信頼性の評価としては適切ではない。
Further, in the check by comparison, as shown in FIG. 7A, an expected
本発明は、送信されるデータにチェック専用データを付加することなく、小規模の回路でデータ送信の正当性を確認することができるエラーチェック回路を提供することを目的とする。 It is an object of the present invention to provide an error check circuit that can confirm the validity of data transmission with a small circuit without adding check-dedicated data to transmitted data.
開示されるエラーチェック回路は、受信回路と、複数のパリティ演算部と、複数のCRCエラー検出部と、チェックサムエラー検出部と、検出回路と、周期制御部とを含む。受信回路は、通信データを受信する。複数のパリティ演算部は、通信データを分割した複数の単位データの各々についてパリティビットを生成する。複数のCRCエラー検出部は、複数のパリティ演算部に対応して設けられ、対応するパリティ演算部が出力するパリティビットを用いてCRCコードを生成し、CRCコードを用いたエラー検出を実行する。チェックサムエラー検出部は、通信データについてのチェックサムを生成し、チェックサムを用いたエラー検出を実行する。検出回路は、複数のCRCエラー検出部の各々におけるCRCコードを用いたエラー検出の結果と、チェックサムエラー検出部におけるチェックサムを用いたエラー検出の結果とに基づいて、通信データのエラーを検出する。周期制御部は、複数のCRCエラー検出部とチェックサムエラー検出部とを制御することにより、通信データについて、CRCコードを用いたエラー検出とチェックサムを用いたエラー検出とを繰返し実行させる。受信回路が、同一の通信データを繰返し受信し、チェックサムエラー検出部が、周期制御部の制御に従って、現在の通信データのチェックサムと現在の通信データの1個前の通信データのチェックサムとを比較することにより、チェックサムを用いたエラー検出を実行し、複数のCRCエラー検出部が、周期制御部の制御に従って、現在の通信データのCRCコードと現在の通信データの1個前の通信データのCRCコードとを比較することにより、CRCコードを用いたエラー検出を実行する。 The disclosed error check circuit includes a reception circuit, a plurality of parity calculation units, a plurality of CRC error detection units, a checksum error detection unit, a detection circuit, and a cycle control unit . The receiving circuit receives communication data. The plurality of parity calculation units generate parity bits for each of the plurality of unit data obtained by dividing the communication data. The plurality of CRC error detection units are provided corresponding to the plurality of parity calculation units, generate CRC codes using the parity bits output from the corresponding parity calculation units, and execute error detection using the CRC codes. Checksum error detection unit generates a checksum about the communication data, performs error detection using the checksum. The detection circuit detects an error in communication data based on a result of error detection using a CRC code in each of a plurality of CRC error detection units and a result of error detection using a checksum in a checksum error detection unit To do. The cycle control unit controls the plurality of CRC error detection units and the checksum error detection unit to repeatedly execute error detection using a CRC code and error detection using a checksum for communication data. The reception circuit repeatedly receives the same communication data, and the checksum error detection unit, according to the control of the cycle control unit, checks the checksum of the current communication data and the checksum of the previous communication data. The error detection using the checksum is performed by comparing the CRC codes of the current communication data and the communication immediately before the current communication data according to the control of the cycle control unit. By comparing the data with the CRC code, error detection using the CRC code is executed.
開示されるエラーチェック回路によれば、パリティビットとCRCコードの組み合わせを用いたチェックと、チェックサムを用いたチェックとにより、送信されるデータにチェック専用データを付加することなく、小規模の回路でデータ送信の正当性を確認することができる。 According to the error check circuit disclosed, and a check using a combination of parity bits and CRC codes, by a check using the checksum, without adding a check only data in the data to be transmitted, small circuit Can confirm the validity of data transmission.
図1は、データ処理装置の構成の一例等についての説明図である。 FIG. 1 is an explanatory diagram of an example of the configuration of the data processing apparatus.
データ処理装置は、図1(A)に示すように、第1の装置1Aと、第2の装置1Bと、これらの間を接続するケーブル15とを含む。第1の装置1A及び第2の装置1Bは、例えば、大規模な信号処理を実行するデータ処理装置である。第1の装置1A及び第2の装置1Bは、大規模な信号処理を実行する回路を搭載するFPGA等の半導体装置であっても良い。ケーブル15は、例えば、シリアル伝送を行うケーブルである。
As shown in FIG. 1A, the data processing device includes a first device 1A, a
図1(A)においては、第1の装置1Aが第2の装置1Bへ信号を送信し、第2の装置1Bが第1の装置1Aから送信された信号を受信する。換言すれば、図1は、第1の装置1Aが送信装置であり、第2の装置1Bが受信装置である場合について示す。
In FIG. 1A, the first device 1A transmits a signal to the
なお、第1の装置1A及び第2の装置1Bが、相互にデータの転送を行うようにしても良い。この場合、ケーブル15は、例えば、双方向にシリアル伝送を行うケーブルである。この場合、第1の装置1A及び第2の装置1Bは、共に、信号を送受信する送受信装置であり、従って、第1の装置1Aは、第2の装置1Bと同様の構成を含む。
Note that the first device 1A and the
第2の装置1Bは、受信回路2、エラーチェック回路3、信号処理回路4を含む。受信回路2は、ケーブル15を介して、第1の装置1Aから送信された信号を受信し、エラーチェック回路3及び信号処理回路4に入力する。エラーチェック回路3は、入力された信号についてのエラー検出処理を実行する。信号処理回路4は、受信回路2から入力された信号についてのデータ処理を実行する。
The
受信回路2は、図1(B)に示すように、装置1Aから、複数のデータ送信処理#1〜#3を、予め定められたテスト周期で、繰り返し受信する。換言すれば、各々のデータ送信処理#1〜#3がテスト周期である。従って、各々のデータ送信処理#1〜#3の長さは等しい。エラーチェック回路3は、複数のデータ送信処理#1〜#3の受信に応じて、チェック処理#1〜#3を、予め定められたテスト周期で、繰り返し実行する。後述するように、チェック処理#1〜#3は、事実上、データ送信処理#1〜#3と並列して実行されるので、チェック処理#1〜#3の期間は無視でき、データ送信処理の後にチェック処理が実行されることは無い。
As illustrated in FIG. 1B, the reception circuit 2 repeatedly receives a plurality of data transmission processes # 1 to # 3 from the apparatus 1A at a predetermined test cycle. In other words, each data
なお、エラーチェック回路3が、チェック処理の都度に、チェック処理の結果を出力するようにしても良い。この場合でも、チェック処理の結果の出力は、データ送信処理と並列に実行することができる。
The
図2は、主として、エラーチェック回路の構成の一例を示す図である。 FIG. 2 is a diagram mainly showing an example of the configuration of the error check circuit.
受信回路2は、第2の装置1Bの外部から、換言すれば、第1の装置1Aから、ケーブル15を介して、通信信号として、シリアル信号を受信する。受信回路2は、シリアルパラレル変換回路において、シリアル信号を、パラレル信号に変換する。パラレル信号は、予め定められたビット幅とされ、例えば64ビット幅とされる。パラレル信号のビット幅は64ビットに限られない。受信回路2は、64ビットのパラレル信号を、エラーチェック回路3のデータ受信バッファ5に入力する。
The receiving circuit 2 receives a serial signal as a communication signal from the outside of the
なお、受信回路2が、光ファイバケーブルを介して光信号(シリアル信号)を受信して、OE変換回路において光信号(シリアル信号)を電気信号(シリアル信号)に変換するようにしても良い。この場合、電気信号に変換されたシリアル信号が、パラレル信号に変換される。 The receiving circuit 2 may receive an optical signal (serial signal) via an optical fiber cable, and the OE conversion circuit may convert the optical signal (serial signal) into an electric signal (serial signal). In this case, the serial signal converted into an electric signal is converted into a parallel signal.
また、受信回路2は、第1の装置1Aから、ケーブル15を介して、通信データの受信に先立って、テスト開始信号を受信する。テスト開始信号は、例えばテストの開始、換言すれば、通信データの送信の開始を指示する信号である。テスト開始信号により、テストの開始のタイミング、換言すれば、通信データの位置が定まる。これにより、受信回路2は、受信した複数の通信データを順次64ビット幅のパラレル信号に変換し、受信した順にデータ受信バッファ5に格納することができる。
The receiving circuit 2 receives a test start signal from the first device 1A via the
なお、テスト開始信号として、フレーム信号を用いるようにしても良い。フレーム信号は、例えばフレームの開始、換言すれば、通信データの送信の開始を指示する信号である。フレーム信号により、フレームの開始位置、換言すれば、通信データの位置が定まる。これにより、通信データが、テスト用のデータである場合に限らず、装置1A及び装置1Bの運用中にこれらの間で送信されるデータについて、エラー検出を実行することができる。この場合、前述したように、チェック処理#1〜#3はデータ送信処理#1〜#3と並列して実行され、データ送信処理の後にチェック処理が実行されないので、エラー検出が、運用中の装置1A及び装置1Bの間における通信の障害となることはない。従って、図1のデータ処理装置の運用中においても、通信データの送受信と並列して、当該通信データの正当性をチェックすることができる。
Note that a frame signal may be used as the test start signal. The frame signal is, for example, a signal that instructs the start of a frame, in other words, the start of transmission of communication data. The frame signal determines the start position of the frame, in other words, the position of the communication data. Thereby, not only when the communication data is test data, error detection can be performed on data transmitted between the
エラーチェック回路3は、データ受信バッファ5と、複数のパリティ演算部6と、複数のCRCエラー検出部7と、チェックサムエラー検出部10と、検出回路14とを含む。複数のCRCエラー検出部7は、各々、CRC演算部8と、CRC結果保持比較部9とを含む。チェックサムエラー検出部10は、サム演算部11と、サム結果保持比較部12とを含む。
The
データ受信バッファ5は、受信回路2で受信した通信データを、複数の単位データに分割して、複数のパリティ演算部6に出力する。例えば、通信データのビット幅が64ビットであるので、図2の例においては、8個の8ビットデータに分割される。従って、単位データのビット幅は8ビットであり、パリティ演算部6は8個設けられる。単位データのビット幅は8ビットに限られず、パリティ演算部6の数は8個に限られない。パリティ演算部6毎に、入力される単位データ、換言すれば、64ビットの通信データにおけるビット位置が、予め定められる。 The data reception buffer 5 divides the communication data received by the reception circuit 2 into a plurality of unit data, and outputs the data to a plurality of parity calculation units 6. For example, since the bit width of the communication data is 64 bits, the communication data is divided into 8 pieces of 8-bit data in the example of FIG. Therefore, the bit width of the unit data is 8 bits, and 8 parity operation units 6 are provided. The bit width of the unit data is not limited to 8 bits, and the number of parity operation units 6 is not limited to 8. For each parity calculation unit 6, input unit data, in other words, a bit position in 64-bit communication data is determined in advance.
複数のパリティ演算部6は、各々、パリティ演算を実行する回路であり、通信データを分割した複数の単位データの各々についてパリティビットを生成する。図2の例において、パリティ演算部6は、8bit偶数パリティ演算を実行して、1ビットのパリティビットを出力する演算回路である。 Each of the plurality of parity calculation units 6 is a circuit that executes a parity calculation, and generates a parity bit for each of a plurality of unit data obtained by dividing communication data. In the example of FIG. 2, the parity operation unit 6 is an operation circuit that executes 8-bit even parity operation and outputs one parity bit.
図3は、パリティ演算部の構成の一例を示す図である。 FIG. 3 is a diagram illustrating an example of the configuration of the parity calculation unit.
パリティ演算部6は、7個の2入力の排他的論理和回路(以下、XORゲートという)61A〜61Gを含む。データ受信バッファ5から出力された第0ビット(bit0)〜第7ビット(bit7)の8ビットのデータであって、当該パリティ演算部6に対応するデータが、図3に示すように、パリティ演算部6に入力される。 The parity calculation unit 6 includes seven 2-input exclusive OR circuits (hereinafter referred to as XOR gates) 61A to 61G. The 8-bit data from the 0th bit (bit0) to the 7th bit (bit7) output from the data reception buffer 5, and the data corresponding to the parity calculation unit 6 is a parity calculation as shown in FIG. Input to unit 6.
具体的には、bit0及びbit1がXORゲート61Aに入力され、bit2及びbit3がXORゲート61Bに入力される。bit4及びbit5がXORゲート61Cに入力され、bit6及びbit7がXORゲート61Dに入力される。XORゲート61A及びXORゲート61Bの出力が、XORゲート61Eに入力され、XORゲート61C及びXORゲート61Dの出力が、XORゲート61Fに入力される。更に、XORゲート61E及びXORゲート61Fの出力が、XORゲート61Gに入力される。
Specifically, bit0 and bit1 are input to the
以上のような排他的論理和演算の組み合わせにより、XORゲート61の出力として、第0ビット(bit0)〜第7ビット(bit7)の8ビットのデータについての偶数パリティが得られる。パリティ演算部6が出力する偶数パリティは、1ビットである。パリティ演算部6は、1ビットの偶数パリティを、対応するCRCエラー検出部7のCRC演算部8に入力する。換言すれば、パリティ演算部6により生成されるパリティは、パリティチェック用ではなく、エラーの有無を示す情報を加味した上で、受信した通信データを圧縮したデータである。
By the combination of the exclusive OR operations as described above, an even parity for 8-bit data from the 0th bit (bit0) to the 7th bit (bit7) is obtained as the output of the XOR gate 61. The even parity output from the parity calculation unit 6 is 1 bit. The parity calculation unit 6 inputs 1-bit even parity to the
なお、パリティ演算部6が奇数パリティを生成するようにしても良い。また、パリティ演算部6が、8ビットの単位データ以外のビット幅の単位データについて、パリティビットを生成するようにしても良い。また、パリティ演算部6が、複数のビットを含むパリティビットを生成するようにしても良い。 The parity calculation unit 6 may generate odd parity. Further, the parity calculation unit 6 may generate parity bits for unit data having a bit width other than 8-bit unit data. Further, the parity calculation unit 6 may generate a parity bit including a plurality of bits.
図2に戻って、複数のCRCエラー検出部7は、複数のパリティ演算部6に対応して設けられ、対応するパリティ演算部6が出力するパリティビットを用いてCRCコードを生成し、CRCコードを用いたエラー検出を実行する。このように、CRCコードは受信装置である第2の装置1Bにおいて生成される。従って、送信装置である第1の装置1Aは、CRCコードを生成して通信データに付加して送信する必要が無く、CRCコード生成回路を備える必要も無い。また、CRCコードは、エラーの有無を示す情報を加味した上で通信データを圧縮したパリティビットを用いて生成される。従って、CRCエラー検出部7の回路規模を小さくすることができ、かつ、エラーの有無を示す情報を含んだデータに基づいてCRCコードを生成することができる。
Returning to FIG. 2, the plurality of CRC
複数のCRCエラー検出部7は、各々、CRC演算部8と、CRC結果保持比較部9とを含む。CRC演算部8は、対応するパリティ演算部6が出力するパリティビットを用いてCRCコードを生成する。図2の例において、CRC演算部8は、図4に示すように、CRC−16−CCITTの演算を実行する演算回路である。CRC結果保持比較部9は、CRCコードを用いたエラー検出を実行する。
Each of the plurality of CRC
図4は、CRC演算部の構成の一例を示す図である。 FIG. 4 is a diagram illustrating an example of the configuration of the CRC calculation unit.
CRC演算部8は、3個の2入力のXORゲート81A〜81Cと、5個のフリップフロップ回路(以下、FF回路)82Aと、7個のFF回路82Bと、4個のFF回路82Cとを含む。FF回路82A〜82Cの各々の初期値は、「1」とされる。
The
具体的には、XORゲート81Aに対応して、第1のシフトレジスタが設けられる。第1のシフトレジスタは、5個のFF回路82Aを含む。XORゲート81Bに対応して、第2のシフトレジスタが設けられる。第2のシフトレジスタは、7個のFF回路82Bを含む。XORゲート81Cに対応して、第3のシフトレジスタが設けられる。第3のシフトレジスタは、4個のFF回路82Cを含む。
Specifically, a first shift register is provided corresponding to the
パリティ演算部6から出力された1ビットの偶数パリティが、図4に示すように、CRC演算部8のXORゲート81Aに入力される。また、XORゲート81Aには、第3のシフトレジスタの出力、換言すれば、後述するbit15が入力される。
The 1-bit even parity output from the parity calculation unit 6 is input to the
XORゲート81Aの出力は、5個のFF回路82A、換言すれば、第1のシフトレジスタに入力される。また、XORゲート81Aの出力は、XORゲート81B、及び、XORゲート81Cに入力される。第1のシフトレジスタの出力、換言すれば、後述するbit4は、XORゲート81Bに入力される。第2のシフトレジスタの出力、換言すれば、後述するbit11は、XORゲート81Cに入力される。
The output of the
以上のような演算により、16ビットのCRCコードが得られる。具体的には、第1のシフトレジスタの各桁の出力、換言すれば、5個のFF回路82Aの出力が、CRCコードのbit0〜bit4として出力される。第2のシフトレジスタの各桁の出力、換言すれば、7個のFF回路82Bの出力が、CRCコードのbit5〜bit11として出力される。第3のシフトレジスタの各桁の出力、換言すれば、4個のFF回路82Cの出力が、CRCコードのbit12〜bit15として出力される。
A 16-bit CRC code is obtained by the above operation. Specifically, the output of each digit of the first shift register, in other words, the outputs of the five
これにより、CRC演算部8において、X16+X12+X5+1の演算が実行され、16ビットのCRCコードが得られる。CRC演算部8は、16ビットのCRCコードを、対応するCRC結果保持比較部9に出力する。
As a result, the
なお、CRC演算部8が、他の演算によって16ビットのCRCコードを生成する回路を含むようにしても良い。また、CRC演算部8が、他のCRCコードを生成する演算回路であっても良い。
The
図2に戻って、CRC結果保持比較部9には、対応するCRC演算部8から出力された16ビットのCRCコードが、そのまま入力される。これにより、当該新たなCRCコードに先行して直前に取込まれたCRCコードではなく、CRC結果保持比較部9には、当該新たなCRCコード、換言すれば、最新の16ビットのCRCコードが入力される。この最新の16ビットのCRCコードは、例えば比較回路に入力される。なお、CRC結果保持比較部9が、CRC演算部8から新たなCRCコードが入力される都度に、当該新たなCRCコードを取り込むようにしても良い。
Returning to FIG. 2, the CRC result holding / comparing unit 9 receives the 16-bit CRC code output from the corresponding
最新のCRCコードに先行して取込まれたCRCコードを保持しなくても、最新のCRCコードは、それ以前に生成された全てのCRCコードを引き継いでいる。換言すれば、最新のCRCコードは、それ以前に生成された全てのCRCコードが正しくない限り、正しい値とならない。従って、CRC結果保持比較部9に最新のCRCコードを入力することにより、最新のCRCコードに対応する通信データとそれ以前の通信データとについて、CRCコードを用いたエラー検出を実行することができる。 Even if the CRC code fetched prior to the latest CRC code is not retained, the latest CRC code inherits all the CRC codes generated before that. In other words, the latest CRC code does not have a correct value unless all CRC codes generated before that are correct. Therefore, by inputting the latest CRC code to the CRC result holding / comparing unit 9, error detection using the CRC code can be executed for communication data corresponding to the latest CRC code and communication data before that. .
更に、CRC結果保持比較部9は、周期制御部13からの指示に従って、予め定められたテスト周期で、その時点で入力されている最新のCRCコードをレジスタに取込んで保持する。レジスタに保持されたCRCコードは、次のテスト周期の最後に、その時点の最新のCRCコードと比較される。換言すれば、レジスタに保持されたCRCコードは、現在のテスト周期の1周期前のCRCコードである。
Further, the CRC result holding / comparing unit 9 captures and holds the latest CRC code input at that time in a register in a predetermined test cycle in accordance with an instruction from the
レジスタに保持されたCRCコードは、現在のテスト周期の1周期前のテスト周期における、最後のCRCコードである。従って、例えばテスト周期が1万個の通信データを送信する期間に相当する場合、最後の1個の通信データに基づいて生成されたCRCコードが、レジスタに保持される。残りの9999個の通信データに基づいて生成されたCRCコードは、直接的には、エラー検出のために使用されない。しかし、前述したように、9999個の通信データが正しくない限り、最後の1個の通信データに基づいて生成されたCRCコードも正しい値とならない。従って、最後の1個の通信データに基づいて生成されたCRCコードを用いることにより、エラーを検出することができる。 The CRC code held in the register is the last CRC code in the test cycle one cycle before the current test cycle. Therefore, for example, when the test cycle corresponds to a period for transmitting 10,000 pieces of communication data, a CRC code generated based on the last piece of communication data is held in the register. The CRC code generated based on the remaining 9999 pieces of communication data is not directly used for error detection. However, as described above, unless the 9999 pieces of communication data are correct, the CRC code generated based on the last piece of communication data is not a correct value. Therefore, an error can be detected by using a CRC code generated based on the last piece of communication data.
テスト周期は予め定められる。図1(B)に示すデータ送信処理#1〜#3において、複数の通信データが連続して送信される。通信データは、前述したように、例えば64ビットの固定長とされる。1テスト周期において送信される通信データの数は、予め定められ、例えば1万〜10万個とされる。換言すれば、予め定められた数の通信データが連続して送信される期間が、1テスト周期である。 The test period is predetermined. In the data transmission processes # 1 to # 3 shown in FIG. 1B, a plurality of communication data are continuously transmitted. As described above, the communication data has a fixed length of 64 bits, for example. The number of communication data transmitted in one test cycle is predetermined, for example, 10,000 to 100,000. In other words, a period in which a predetermined number of communication data is continuously transmitted is one test cycle.
データ送信処理#1〜#3の各々において1万個の通信データが送信される場合、各々のデータ送信処理#1〜#3の各々において送信される1万個の通信データは、同一である。これにより、チェック処理#1〜#3において、現在のテスト周期のCRCコードと、1周期前のテスト周期のCRCコードとの比較により、通信データのエラーを検出することができる。 When 10,000 pieces of communication data are transmitted in each of the data transmission processes # 1 to # 3, the 10,000 pieces of communication data transmitted in each of the data transmission processes # 1 to # 3 are the same. . Thereby, in the check processes # 1 to # 3, communication data errors can be detected by comparing the CRC code of the current test cycle with the CRC code of the test cycle one cycle before.
また、CRC結果保持比較部9は、周期制御部13からの指示に従って、前記テスト周期で、その時点で入力されている最新のCRCコードと、レジスタに取込んで保持しているCRCコードとを、比較回路において比較する。換言すれば、現在のテスト周期の最新のCRCコードと、1周期前のテスト周期のCRCコードとが比較される。
Further, the CRC result holding / comparing unit 9 follows the instruction from the
実際には、CRC結果保持比較部9は、周期制御部13からの指示に従って、その時点で入力されている最新のCRCコードと、レジスタに取込んで保持している1周期前のテスト周期のCRCコードとを比較し、その結果を比較回路から検出回路14に出力する。その後、CRC結果保持比較部9は、その時点で入力されている最新のCRCコードを、レジスタに取込む。これにより、レジスタの内容は上書きされる。
Actually, the CRC result holding / comparing unit 9 follows the instruction from the
各々のCRC結果保持比較部9は、その時点で入力されている最新のCRCコードと、レジスタに保持している1周期前のテスト周期のCRCコードとが一致した場合、一致信号を検出回路14に出力する。また、各々のCRC結果保持比較部9は、その時点で入力されている最新のCRCコードと、レジスタに取込んで保持している1周期前のテスト周期のCRCコードとが一致しない場合、不一致信号を検出回路14に出力する。
Each CRC result holding / comparing unit 9 detects the coincidence signal when the latest CRC code inputted at that time coincides with the CRC code of the previous test period held in the register. Output to. Each CRC result holding / comparing unit 9 does not match if the latest CRC code input at that time does not match the CRC code of the previous test period fetched and held in the register. The signal is output to the
一方、チェックサムエラー検出部10は、通信データの各々についてのチェックサムを生成し、チェックサムを用いたエラー検出を実行する。これにより、チェックサムは受信装置である第2の装置1Bにおいて生成される。従って、送信装置である第1の装置1Aは、チェックサムを生成して通信データに付加して送信する必要が無く、チェックサム生成回路を備える必要も無い。
On the other hand, the checksum
チェックサムエラー検出部10は、サム演算部11と、サム結果保持比較部12とを含む。サム演算部11は、通信データの各々についてのチェックサムを生成する。サム結果保持比較部12は、チェックサムを用いたエラー検出を実行する。
The checksum
具体的には、サム演算部11は、データ受信バッファ5から複数のパリティ演算部6に出力された複数の単位データを取込む。具体的には、8個の8ビットデータが、サム演算部11に取り込まれる。これにより、結果として、サム演算部11は、データ受信バッファ5に入力された64ビットの通信データを得る。なお、サム演算部11が、データ受信バッファ5から64ビットの通信データを取り込むようにしても良い。
Specifically, the
サム演算部11は、取り込んだ複数の単位データを2分割し、2分割した部分データを加算する。具体的には、サム演算部11は、取り込んだ複数の単位データを、64ビットの通信データの上位の32ビット及び下位の32ビットに対応するように2分割し、これらを加算する。そして、サム演算部11は、加算結果を2分割し、加算結果の上位の32ビットを廃棄し、下位の32ビットをチェックサムとしてサム結果保持比較部12に出力する。
The
なお、サム演算部11が、他の演算によってチェックサムを生成するようにしても良い。また、サム演算部11が、32ビットのチェックサム以外のビット長のチェックサムを生成するようにしても良い。
Note that the
サム結果保持比較部12は、対応するサム演算部11から新たなチェックサムが出力される都度に、加算回路において、その時点まで保持していたチェックサムに、新たなチェックサムを加算する。そして、サム結果保持比較部12は、2個のチェックサムの加算結果を2分割し、加算結果の上位の32ビットを廃棄し、下位の32ビットを最新のチェックサムとして加算回路に保持する。
Each time a new checksum is output from the corresponding
これにより、最新のチェックサムに先行して保持されていたチェックサムは破壊される。しかし、最新のチェックサムは、それ以前に生成された全てのチェックサムを引き継いでいる。換言すれば、最新のチェックサムは、それ以前に生成された全てのチェックサムが正しくない限り、正しい値とならない。従って、サム結果保持比較部12に最新のチェックサムを保持することにより、最新のチェックサムに対応する通信データとそれ以前の通信データとについて、チェックサムを用いたエラー検出を実行することができる。
As a result, the checksum held prior to the latest checksum is destroyed. However, the latest checksum inherits all checksums generated before that time. In other words, the latest checksum will not be the correct value unless all previously generated checksums are correct. Therefore, by holding the latest checksum in the sum result holding / comparing
更に、サム結果保持比較部12は、周期制御部13からの指示に従って、前記テスト周期で、その時点で加算回路に保持している最新のチェックサムをレジスタに取込んで保持する。レジスタに保持されたチェックサムは、次のテスト周期の最後に、その時点の最新のチェックサムと比較される。換言すれば、レジスタに保持されたチェックサムは、現在のテスト周期の1周期前のチェックサムである。
Further, the sum result holding / comparing
レジスタに保持されたチェックサムは、現在のテスト周期の1周期前のテスト周期における、最終的なチェックサムである。従って、例えばテスト周期が1万個の通信データを送信する期間に相当する場合、最後の1個の通信データの加算に基づいて生成されたチェックサムが、レジスタに保持される。残りの9999個の通信データに基づいて生成されたチェックサムは、直接的には、エラー検出のために使用されない。しかし、前述したように、9999個の通信データが正しくない限り、最後の1個の通信データの加算に基づいて生成されたチェックサムも正しい値とならない。従って、最後の1個の通信データの加算に基づいて生成されたチェックサムを用いることにより、エラーを検出することができる。 The checksum held in the register is the final checksum in the test cycle one cycle before the current test cycle. Therefore, for example, when the test cycle corresponds to a period for transmitting 10,000 pieces of communication data, a checksum generated based on the addition of the last piece of communication data is held in the register. The checksum generated based on the remaining 9999 pieces of communication data is not directly used for error detection. However, as described above, unless the 9999 pieces of communication data are correct, the checksum generated based on the addition of the last piece of communication data is not a correct value. Therefore, an error can be detected by using a checksum generated based on the addition of the last piece of communication data.
サム結果保持比較部12は、周期制御部13からの指示に従って、前記テスト周期で、その時点で加算回路に保持されている最新のチェックサムと、レジスタに取込んで保持しているチェックサムとを比較する。換言すれば、現在のテスト周期の最新のチェックサムと、1周期前のテスト周期のチェックサムとが比較される。
In accordance with an instruction from the
実際には、サム結果保持比較部12は、周期制御部13からの指示に従って、その時点で加算回路に保持されている最新のチェックサムと、レジスタに取込んで保持している1周期前のテスト周期のチェックサムとを比較し、その結果を比較回路から検出回路14に出力する。その後、サム結果保持比較部12は、その時点で加算回路に保持されている最新のチェックサムを、レジスタに取込む。これにより、レジスタの内容は上書きされる。
Actually, the sum result holding / comparing
各々のサム結果保持比較部12は、その時点で加算回路に保持されている最新のチェックサムと、レジスタに取込んで保持している1周期前のテスト周期のチェックサムとが一致した場合、一致信号を検出回路14に出力する。また、各々のサム結果保持比較部12は、その時点で加算回路に保持されている最新のチェックサムと、レジスタに取込んで保持している1周期前のテスト周期のチェックサムとが一致しない場合、不一致信号を検出回路14に出力する。
When each sum result holding
検出回路14は、複数のCRCエラー検出部7の各々からCRCコードを用いたエラー検出の結果が出力されると、これらをそのまま取り込む。また、検出回路14は、チェックサムエラー検出部10からチェックサムを用いたエラー検出の結果が出力されると、これをそのまま取り込む。そして、検出回路14は、複数のCRCエラー検出部7の各々におけるCRCコードを用いたエラー検出の結果と、チェックサムエラー検出部10におけるチェックサムを用いたエラー検出の結果とに基づいて、当該テスト周期において受信された複数の通信データのエラーを検出する。
When the error detection result using the CRC code is output from each of the plurality of CRC
具体的には、検出回路14は、全てのCRCエラー検出部7から一致信号を受信し、かつ、チェックサムエラー検出部10から一致信号を受信した場合に、一致フラグをレジスタの予め定められたビットに格納する。また、検出回路14は、CRCエラー検出部7のいずれかから1個でも不一致信号を受信した場合、又は、チェックサムエラー検出部10から不一致信号を受信した場合には、一致フラグをレジスタの予め定められたビットに格納しない。検出回路14は、予め定められた制御信号に従って、レジスタの一致フラグを装置1Bの外部に出力する。
Specifically, when the
なお、一致フラグを格納しないことに代えて、不一致フラグをレジスタの予め定められたビットに格納するようにしても良い。また、検出回路14が、レジスタに一致フラグを格納する以外の手段により、エラー検出の結果を出力するようにしても良い。
Instead of storing the match flag, the mismatch flag may be stored in a predetermined bit of the register. Further, the
周期制御部13は、複数のCRCエラー検出部とチェックサムエラー検出部とを制御することにより、通信データについて、CRCコードを用いたエラー検出とチェックサムを用いたエラー検出とを実行させる。
The
具体的には、周期制御部13は、複数のCRC演算部8とサム演算部11とを制御することにより、通信データについて、CRCコードとチェックサムとを生成させる。周期制御部13は、複数のCRC演算部8に、第1の制御信号を供給する。これにより、複数のCRC演算部8は、データ受信バッファ5から出力された単位データからパリティビットが生成されたタイミングで、パリティビットを取込む。また、周期制御部13は、サム演算部11に、第1の制御信号を供給する。これにより、サム演算部11は、データ受信バッファ5から複数の単位データが出力されたタイミングで、複数の単位データを取込む。
Specifically, the
このために、例えば、周期制御部13は、データ受信バッファ5に入力された通信データの数をカウントし、1個の通信データが入力される都度に、第1の制御信号を形成して複数のCRC演算部8とサム演算部11に供給する。なお、周期制御部13が、通信データが同期する動作クロックをカウントするようにしても良い。
For this purpose, for example, the
複数のCRC演算部8とサム演算部11とは、同一のタイミングで制御される。従って、実際には、サム演算部11は、データ受信バッファ5から複数の単位データが出力されたタイミングから遅れて、前記パリティビットが生成されたタイミングで、複数の単位データを取込む。これにより、複数のCRC演算部8及びサム演算部11は、同一の通信データについて、各々、複数のCRCコード及びチェックサムを生成する。
The plurality of
また、周期制御部13は、複数のCRC結果保持比較部9とサム結果保持比較部12とを制御することにより、予め定められた複数の通信データ毎に、CRCコードを用いたエラー検出とチェックサムを用いたエラー検出とを実行させる。周期制御部13は、複数のCRC結果保持比較部9に、第2の制御信号を供給する。これにより、複数のCRC結果保持比較部9は、前記テスト周期で、現在のテスト周期の最新のCRCコードとレジスタに保持した1周期前のテスト周期のCRCコードとを比較し、両者が一致する場合には、一致信号を出力する。また、周期制御部13は、サム結果保持比較部12に、第2の制御信号を供給する。これにより、サム結果保持比較部12は、前記テスト周期で、現在のテスト周期の最新のチェックサムとレジスタに保持した1周期前のテスト周期のチェックサムとを比較し、両者が一致する場合には、一致信号を出力する。
The
このために、例えば、周期制御部13は、データ受信バッファ5に入力された固定長の通信データの数をカウントし、予め定められた数、例えば1万個の通信データが入力される都度に、第2の制御信号を形成して複数のCRC演算部8とサム演算部11に供給する。なお、周期制御部13が、通信データが同期する動作クロックをカウントするようにしても良い。
For this purpose, for example, the
複数のCRC結果保持比較部9とサム結果保持比較部12とは、同一のタイミングで制御される。例えば、複数のCRC結果保持比較部9とサム結果保持比較部12とは、現在のテスト周期が終了したタイミングから予め定められた時刻だけ遅れて、比較処理を実行する。これにより、現在のテスト周期のCRCコードとチェックサムとが確実に入力されたタイミングで、かつ、1周期後のテスト周期と並列して、比較処理を実行することができる。これにより、複数のCRC結果保持比較部9とサム結果保持比較部12は、同一の現在のテスト周期の通信データと、同一の1周期前のテスト周期の通信データとについて、各々、CRCコードを用いたエラー検出とチェックサムを用いたエラー検出とを実行することができる。
The plurality of CRC result holding / comparing units 9 and the sum result holding / comparing
図5は、データのエラー検出処理の説明図であり、特に、CRCコードを用いたエラー検出処理について示す。 FIG. 5 is an explanatory diagram of data error detection processing, and particularly shows error detection processing using a CRC code.
受信回路2から出力された第63ビット(bit63)〜第0ビット(bit0)の64ビットのデータは、データ受信バッファ5により、8ビット毎に分割される。従って、8個の単位データが得られる。8個の8ビットの単位データは、各々、予め定められた8個のパリティ演算部6に入力される。 The 64-bit data from the 63rd bit (bit 63) to the 0th bit (bit 0) output from the reception circuit 2 is divided by the data reception buffer 5 every 8 bits. Accordingly, eight unit data are obtained. Eight pieces of 8-bit unit data are input to eight predetermined parity operation units 6, respectively.
8個のパリティ演算部6は、各々、1ビットの偶数パリティを生成する。1ビットの偶数パリティは、周期制御部13からの第1の制御信号に従って、対応するCRC演算部8に入力される。
Each of the eight parity calculation units 6 generates even parity of 1 bit. The 1-bit even parity is input to the corresponding
8個のCRC演算部8は、対応するパリティ演算部6からの入力に基づいて、CRCコードを生成する。通信データではなく、パリティビットに基づいてCRCコードを生成することにより、CRC演算部8の回路規模を小さくすることができる。CRCコードは、周期制御部13からの第2の制御信号に従って、対応するCRC結果保持比較部9に入力される。
The eight
8個のCRC結果保持比較部9は、周期制御部13からの第2の制御信号に従って、現在のテスト周期の最新のCRCコードとレジスタに保持した1周期前のテスト周期のCRCコードとを比較し、両者が一致する場合には、一致信号を出力する。なお、図5において、8個のCRC結果保持比較部9のレジスタに保持した1周期前のテスト周期のCRCコードを、斜線を施して示す。
The eight CRC result holding / comparing units 9 compare the latest CRC code of the current test cycle with the CRC code of the previous test cycle held in the register according to the second control signal from the
従って、8個のCRC結果保持比較部9は、8個の16ビットのCRCコードをレジスタに保持するのみで良い。これにより、CRCコードを保持するための記憶領域を設けることなく、レジスタに格納することができる。また、8個のCRC結果保持比較部9は、2個の8ビットのCRCコードを比較するのみで良い。これにより、CRCコードを比較するための比較回路の回路規模を小さくすることができる。 Accordingly, the eight CRC result holding / comparing units 9 need only hold eight 16-bit CRC codes in the register. Thereby, the data can be stored in the register without providing a storage area for holding the CRC code. In addition, the eight CRC result holding / comparing units 9 need only compare two 8-bit CRC codes. Thereby, the circuit scale of the comparison circuit for comparing CRC codes can be reduced.
図6は、データのエラー検出処理の説明図であり、特に、チェックサムを用いたエラー検出処理について示す。 FIG. 6 is an explanatory diagram of data error detection processing, and particularly shows error detection processing using a checksum.
受信回路2から出力された第63ビット(bit63)〜第0ビット(bit0)の64ビットのデータは、前述したように、データ受信バッファ5を経て、サム演算部11に入力される。
The 64-bit data from the 63rd bit (bit63) to the 0th bit (bit0) output from the receiving circuit 2 is input to the
サム演算部11は、64ビットの通信データ、換言すれば、8個の単位データを2分割し、2分割した部分データを加算する。そして、サム演算部11は、加算結果を2分割し、加算結果の上位の32ビットを廃棄し、下位の32ビットをチェックサムとする。チェックサムは、周期制御部13からの第2の制御信号に従って、サム結果保持比較部12に出力する。
The
サム結果保持比較部12は、周期制御部13からの第2の制御信号に従って、現在のテスト周期の最新のチェックサムとレジスタに保持した1周期前のテスト周期のチェックサムとを比較し、両者が一致する場合には、一致信号を出力する。なお、図6において、サム結果保持比較部12のレジスタに保持した1周期前のテスト周期のチェックサムを、斜線を施して示す。
The sum result holding / comparing
従って、サム結果保持比較部12は、32ビットのチェックサムをレジスタに保持するのみで良い。これにより、チェックサムの期待値を保持するための数ギガバイトの記憶領域を設けることなく、レジスタに格納することができる。また、サム結果保持比較部12は、2個の32ビットのチェックサムを比較するのみで良い。これにより、チェックサムを比較するための比較回路の回路規模を小さくすることができる。
Therefore, the sum result holding
図5及び図6から判るように、パリティビットとCRCコードの組み合わせを用いたチェックと、サムチェックを用いたチェックにより、送信されるデータにチェック専用データを付加することなく、小規模の回路でデータ送信の正当性を確認することができる。具体的には、通信データのパリティビットを生成することにより、CRCコードの生成の元になるデータのサイズを小さくすることができ、回路を小さくすることができる。その上で、CRCコードを用いてエラー検出を実行することにより、小規模な回路で正確にエラー検出を実行することができる。一方、CRCコードの生成にパリティビットを用いることに対応するために、CRCコードを用いたエラー検出に合わせて、チェックサムを用いたエラー検出を実行することにより、エラー検出の精度を高くすることができる。更に、CRCコードを用いたエラー検出と同一のテスト周期で、チェックサムを用いたエラー検出を実行することにより、より一層エラー検出の精度を高くすることができる。 As can be seen from FIGS. 5 and 6, a check using a combination of a parity bit and a CRC code and a check using a sum check can be performed with a small-scale circuit without adding dedicated check data to transmitted data. Validity of data transmission can be confirmed. Specifically, by generating parity bits of communication data, the size of data that is a source of CRC code generation can be reduced, and the circuit can be reduced. In addition, error detection can be performed accurately with a small circuit by executing error detection using a CRC code. On the other hand, in order to cope with the use of parity bits for CRC code generation, error detection using checksums is performed in accordance with error detection using CRC codes, thereby increasing the accuracy of error detection. Can do. Furthermore, the error detection accuracy can be further increased by executing error detection using the checksum in the same test cycle as the error detection using the CRC code.
2 受信回路
3 エラーチェック回路
4 信号処理回路
5 データ受信バッファ
6 パリティ演算部
7 CRCエラー検出部
8 CRC演算部
9 CRC結果保持比較部
10 チェックサムエラー検出部
11 サム演算部
12 サム結果保持比較部
13 周期制御部
14 検出回路
2
Claims (7)
前記通信データを分割した複数の単位データの各々についてパリティビットを生成する複数のパリティ演算部と、
前記複数のパリティ演算部に対応して設けられ、対応するパリティ演算部が出力する前記パリティビットを用いてCRCコードを生成し、前記CRCコードを用いたエラー検出を実行する複数のCRCエラー検出部と、
前記通信データについてのチェックサムを生成し、前記チェックサムを用いたエラー検出を実行するチェックサムエラー検出部と、
前記複数のCRCエラー検出部の各々における前記CRCコードを用いたエラー検出の結果と、前記チェックサムエラー検出部における前記チェックサムを用いたエラー検出の結果とに基づいて、前記通信データのエラーを検出する検出回路と、
前記複数のCRCエラー検出部と前記チェックサムエラー検出部とを制御することにより、前記通信データについて、前記CRCコードを用いたエラー検出と前記チェックサムを用いたエラー検出とを繰返し実行させる周期制御部とを含み、
前記受信回路が、同一の前記通信データを繰返し受信し、
前記チェックサムエラー検出部が、前記周期制御部の制御に従って、現在の通信データのチェックサムと前記現在の通信データの1個前の通信データのチェックサムとを比較することにより、前記チェックサムを用いたエラー検出を実行し、
前記複数のCRCエラー検出部が、前記周期制御部の制御に従って、現在の通信データのCRCコードと前記現在の通信データの1個前の通信データのCRCコードとを比較することにより、前記CRCコードを用いたエラー検出を実行する
ことを特徴とするエラーチェック回路。 A receiving circuit for receiving communication data;
A plurality of parity calculators for generating parity bits for each of a plurality of unit data obtained by dividing the communication data;
A plurality of CRC error detection units that are provided corresponding to the plurality of parity calculation units, generate a CRC code using the parity bits output from the corresponding parity calculation unit, and execute error detection using the CRC code When,
A checksum error detector that generates a checksum for the communication data and performs error detection using the checksum;
Based on a result of error detection using the CRC code in each of the plurality of CRC error detection units and a result of error detection using the checksum in the checksum error detection unit, errors in the communication data are determined. A detection circuit to detect;
Period control for repeatedly executing error detection using the CRC code and error detection using the checksum for the communication data by controlling the plurality of CRC error detection units and the checksum error detection unit Including
The receiving circuit repeatedly receives the same communication data,
The checksum error detection unit compares the checksum of the current communication data with the checksum of the previous communication data of the current communication data according to the control of the cycle control unit, thereby calculating the checksum. Perform the error detection used,
The plurality of CRC error detection units compare the CRC code of the current communication data with the CRC code of the previous communication data of the current communication data according to the control of the cycle control unit. An error check circuit characterized by executing error detection using the.
前記受信回路で受信した前記通信データを、前記複数の単位データに分割して前記複数のパリティ演算部に出力するバッファ回路を含む
ことを特徴とする請求項1に記載のエラーチェック回路。 The error check circuit further comprises:
The error check circuit according to claim 1, further comprising: a buffer circuit that divides the communication data received by the receiving circuit into the plurality of unit data and outputs the divided data to the plurality of parity calculation units.
ことを特徴とする請求項1に記載のエラーチェック回路。 Each of the plurality of CRC error detection units generates a CRC code using the parity bits output from the corresponding parity calculation unit, and holds a CRC result for performing error detection using the CRC code The error check circuit according to claim 1, further comprising a comparison unit.
ことを特徴とする請求項1に記載のエラーチェック回路。 The checksum error detection unit includes a sum calculation unit that generates a checksum for each of the communication data, and a sum result holding and comparison unit that performs error detection using the checksum. The error check circuit according to Item 1.
前記チェックサムエラー検出部が、前記通信データの各々についてのチェックサムを生成するサム演算部と、前記チェックサムを用いたエラー検出を実行するサム結果保持比較部とを含み、
前記周期制御部が、複数の前記CRC演算部と前記サム演算部とを制御することにより、前記通信データについて、前記CRCコードと前記チェックサムとを生成させる
ことを特徴とする請求項1に記載のエラーチェック回路。 Each of the plurality of CRC error detection units generates a CRC code using the parity bits output from the corresponding parity calculation unit, and holds a CRC result for performing error detection using the CRC code A comparison section,
The checksum error detection unit includes a sum calculation unit that generates a checksum for each of the communication data, and a sum result holding comparison unit that performs error detection using the checksum,
The cycle control unit controls the plurality of CRC calculation units and the sum calculation unit to generate the CRC code and the checksum for the communication data. Error check circuit.
ことを特徴とする請求項5に記載のエラーチェック回路。 The cycle control unit controls the plurality of CRC result holding / comparing units and the sum result holding / comparing unit to detect errors using the CRC code for each of a plurality of predetermined communication data. The error check circuit according to claim 5, wherein error detection using a checksum is executed.
前記通信データを分割した複数の単位データの各々についてパリティビットを生成するステップと、
前記複数の単位データの各々について生成された前記パリティビットを用いてCRCコードを生成し、前記CRCコードを用いたエラー検出を実行するステップと、
前記通信データについてのチェックサムを生成し、前記チェックサムを用いたエラー検出を実行するステップと、
前記チェックサムを用いたエラー検出の結果と、前記CRCコードを用いたエラー検出の結果とに基づいて、前記通信データのエラーを検出するステップと、
前記通信データについて、前記CRCコードを用いたエラー検出と前記チェックサムを用いたエラー検出とを繰返し実行させるステップとを含み、
前記通信データを受信するステップにおいて、同一の前記通信データを繰返し受信し、
前記チェックサムを用いたエラー検出を実行するステップにおいて、現在の通信データのチェックサムと前記現在の通信データの1個前の通信データのチェックサムとを比較することにより、前記チェックサムを用いたエラー検出を実行し、
前記CRCコードを用いたエラー検出を実行するステップにおいて、現在の通信データのCRCコードと前記現在の通信データの1個前の通信データのCRCコードとを比較することにより、前記CRCコードを用いたエラー検出を実行する
ことを特徴とするエラーチェック方法。
Receiving communication data of a predetermined number of bits;
Generating a parity bit for each of a plurality of unit data obtained by dividing the communication data;
Generating a CRC code using the parity bits generated for each of the plurality of unit data, and performing error detection using the CRC code;
Generating a checksum for the communication data and performing error detection using the checksum;
Result of the error detection using the previous SL checksums, based on the result of the error detection using the previous SL CRC code, detecting an error of the communication data,
Repeating the error detection using the CRC code and the error detection using the checksum for the communication data,
In the step of receiving the communication data, the same communication data is repeatedly received,
Wherein in the step of performing error detection using the checksum, by comparing the checksum of the one previous communication data checksum and the current communication data of the communication data of current, use the checksum Error detection that was
In the step of performing error detection using the CRC code, by comparing the CRC code of one previous communication data CRC code and the current communication data of the communication data of current, use the CRC code An error check method characterized by executing error detection.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010180325A JP5761944B2 (en) | 2010-08-11 | 2010-08-11 | Error check circuit and error check method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010180325A JP5761944B2 (en) | 2010-08-11 | 2010-08-11 | Error check circuit and error check method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2012039552A JP2012039552A (en) | 2012-02-23 |
| JP5761944B2 true JP5761944B2 (en) | 2015-08-12 |
Family
ID=45850999
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010180325A Expired - Fee Related JP5761944B2 (en) | 2010-08-11 | 2010-08-11 | Error check circuit and error check method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5761944B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10353837B2 (en) | 2013-09-09 | 2019-07-16 | Qualcomm Incorporated | Method and apparatus to enable multiple masters to operate in a single master bus architecture |
| KR20160070171A (en) * | 2013-10-09 | 2016-06-17 | 퀄컴 인코포레이티드 | ERROR DETECTION CAPABILITY OVER CCIe PROTOCOL |
| CN117091462B (en) * | 2022-11-11 | 2025-12-23 | 上海芯跳科技有限公司 | Electronic detonator circuit with high reliable communication, application method and system |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61107286A (en) * | 1984-10-30 | 1986-05-26 | 株式会社ピーエフユー | Testing system of crt display control circuit |
| JPS63164642A (en) * | 1986-12-26 | 1988-07-08 | Fanuc Ltd | Data transmission system |
| JPS6464433A (en) * | 1987-09-04 | 1989-03-10 | Nec Corp | On-line monitor system |
| JP3246096B2 (en) * | 1993-07-14 | 2002-01-15 | ソニー株式会社 | Self-diagnosis device for digital equipment |
| AU695562B2 (en) * | 1994-07-28 | 1998-08-13 | Koninklijke Philips Electronics N.V. | Method of and system for communicating messages |
| JP3639455B2 (en) * | 1999-04-07 | 2005-04-20 | 富士重工業株式会社 | Multiplex communication equipment |
| JP5094565B2 (en) * | 2008-06-02 | 2012-12-12 | 本田技研工業株式会社 | On-vehicle electronic control device and fuel cell vehicle |
-
2010
- 2010-08-11 JP JP2010180325A patent/JP5761944B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2012039552A (en) | 2012-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114328316B (en) | DMA controller, SOC system and data transfer method based on DMA controller | |
| EP0280013B1 (en) | Device for verifying proper operation of a checking code generator | |
| JP3234130B2 (en) | Error correction code decoding method and circuit using this method | |
| KR102094878B1 (en) | Semiconductor Memory Apparatus and Operating Method Thereof | |
| CN101527615A (en) | Implementation method of cyclic redundancy check (CRC) codes and device | |
| JP2001358702A (en) | Device for inspecting error correction code | |
| CN103778028A (en) | Semiconductor device | |
| CN112380046B (en) | Calculation result verification method, system, device, equipment and storage medium | |
| JP5761944B2 (en) | Error check circuit and error check method | |
| EP4440015A1 (en) | Sending method and apparatus, receiving method and apparatus, system, device, and storage medium | |
| US20080163036A1 (en) | Cyclic redundancy check code generating circuit, semiconductor memory device, and method of driving semiconductor memory device | |
| JP6458626B2 (en) | Debug circuit, semiconductor device, and debugging method | |
| US9054840B2 (en) | Error detection and correction of a data transmission | |
| WO2024243338A1 (en) | Concurrent forward error correction (fec) and cyclic redundancy check (crc) | |
| CN101207467B (en) | Generation of cyclic redundancy check code as well as method and apparatus for sending and testing data sequence | |
| JP3579039B2 (en) | Error correction circuit using cyclic code | |
| CN118611682A (en) | Data verification method, device, chip, electronic device and storage medium | |
| JP2010193217A (en) | Relay device, and relay method of relay device | |
| CN116861493A (en) | Verification code generation method, processor and electronic equipment | |
| US8539306B2 (en) | Data processing circuit and data processing method | |
| CN101114888B (en) | Method for generating cyclic error check code | |
| US10623018B2 (en) | Method of arrangement of an algorithm in cyclic redundancy check | |
| US7954034B1 (en) | Method of and system for protecting data during conversion from an ECC protection scheme to a parity protection scheme | |
| El-Medany | FPGA implementation of CRC with error correction | |
| CN112036117A (en) | CRC check control system suitable for multiple bit width parallel input data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130517 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140411 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140415 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140616 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141209 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150115 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20150609 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150609 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5761944 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |