JP3839005B2 - HDLC monitoring circuit and frame relay monitoring circuit - Google Patents
HDLC monitoring circuit and frame relay monitoring circuit Download PDFInfo
- Publication number
- JP3839005B2 JP3839005B2 JP2003299815A JP2003299815A JP3839005B2 JP 3839005 B2 JP3839005 B2 JP 3839005B2 JP 2003299815 A JP2003299815 A JP 2003299815A JP 2003299815 A JP2003299815 A JP 2003299815A JP 3839005 B2 JP3839005 B2 JP 3839005B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- data
- hdlc
- fcs
- frame relay
- 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
Images
Landscapes
- Detection And Prevention Of Errors In Transmission (AREA)
- Communication Control (AREA)
Description
本発明は、データリンク層の通信プロトコルであるHDLC(ハイレベルデータリンクコントロール)及びフレームリレーの誤り訂正に用いるFCS(フレームチェックシーケンス)のエラー制御に関する。 The present invention relates to error control of HDLC (High Level Data Link Control), which is a data link layer communication protocol, and FCS (Frame Check Sequence) used for error correction of frame relay.
情報ネットワークの構成を模式化したものにOSIの7階層モデルがある。この階層で直接接続された端末相互でのデータのやり取りを行うデータリンク層のプロトコルの一種としてX.25で用いられるHDLC(ハイレベルデータリンクコントロール)とフレームリレーが規定されている。 There is a seven-layer model of OSI as a schematic configuration of an information network. As a kind of data link layer protocol for exchanging data between terminals directly connected in this hierarchy, X. HDLC (High Level Data Link Control) and frame relay used in No. 25 are defined.
図6はHDLCのメッセージ形式を表す図でデータ構成図である。 FIG. 6 shows the HDLC message format and is a data structure diagram.
HDLCデータ100はスタートフラグ101、アドレス102、制御部103、実データ104、FCS(フレームチェックシーケンス)105及びエンドフラグ106から構成される。
The HDLC
HDLCではフラグシーケンスを用いてデータの開始、終了を識別する。すなわち、「01111110」で表されるスタートフラグ101でデータが開始され、同じく「01111110」のビット列であるエンドフラグ106でデータの終了が表される。スタートフラグ101とエンドフラグ106の間にアドレス102、制御部103、FCS105と併せてネットワーク層以上で用いられる実データ104が格納されてフレームが構成される。従って、スタートフラグ101からエンドフラグ106の間に「01111110」というビット列が発生することは許さない。よって、アドレス102、制御部103、実データ104、FCS105の中で「1」が5つ連続すると、強制的に「0」が挿入されるようHDLCプロトコルでは規定されている(「0」挿入除去)。
In HDLC, the start and end of data are identified using a flag sequence. That is, data is started by the
制御部103は原則8ビットのデータであり、フレームの種類(情報フレーム、監視フレーム、非番号制フレーム)によって構成が異なる。従って、制御部103には該フレームがどの種類かを表す制御情報とモジュロによる送信順序番号(情報フレーム)若しくはコマンドの種別(監視フレーム、非番号制フレーム)、そしてレスポンスを要求するか否かを表すPOLL/FINALビットが含まれている。この、送信順序番号の存在が相手側端末からのACKを待たずにデータの送信することが可能と言うベーシック手順と大きく異なる特徴をHDLCに与えている。なお送信順序番号はモジュロ表記であり、通常は「8」で割った余りが用いられるが、衛星通信などでは除数として「128」が用いられることもある。
The
図7は従来のHDLCフレームを受信時の処理の一例を表すフローチャートである。HDLCの処理で一般的に行われている処理と併せて本図によって説明する。 FIG. 7 is a flowchart showing an example of processing when receiving a conventional HDLC frame. This diagram will be described together with processing generally performed in HDLC processing.
データの受信をした際に、スタートフラグ101を検知すると(ステップ901)、エンドフラグの認識がなされるまで(ステップ902)、以後のデータをバッファに記録する(ステップ903)。この際、いわゆる「0」挿入がなされている「1」が5つ連続した後の「0」ビットは削除する「0」削除処理も併せて行う(ステップ904)。このバッファへの記録に際し、スタートフラグとエンドフラグは記録の対象から除外するのが一般的である。記録対象のデータ量の低減の為である。従って、ここではスタートフラグとエンドフラグを記録の対象としない前提で話を進める。
When data is received, if the
バッファにデータの格納が終了すると、先頭8ビットのアドレス部のデータを抽出し(ステップ905)、自身へ送信されたデータか否かを判定する(ステップ906)。この際、自身に送信されたデータで無ければ、バッファに格納されたデータは破棄される。 When the storage of data in the buffer is completed, the data of the address portion of the first 8 bits is extracted (step 905), and it is determined whether or not the data is transmitted to itself (step 906). At this time, if the data is not transmitted to itself, the data stored in the buffer is discarded.
自身宛のデータであれば、FCS部105の値を抽出する。HDLCにおいてはフレーム単位でデータのやり取りを行っており、受け取ったフレームに何がしかの理由でエラーが含まれている場合にはデータの送信元に対して再送要求を掛けることになる。HDLCプロトコルでは誤り検出に巡回検査符号(以下CRC)が用いられている。これにより、同じデータリンク層のプロトコルであるベーシック手順より強力な誤り検出・訂正が可能になっていることがHDLCプロトコルの特徴である。
If the data is addressed to itself, the value of the
CRC自体は送信データを送信側・受信側共通の生成多項式で除算した「余り」を表す剰余多項式を求め、送信データ末尾に導出した剰余多項式を添付してデータを送信し、受信側でデータの誤りを確認する方式である。FCS部105はこの剰余多項式を表しており、送信元で剰余多項式の導出を行った後、実データ104の末尾に添付されたものである。
The CRC itself obtains a remainder polynomial representing a “remainder” obtained by dividing the transmission data by the generator polynomial common to the transmission side and the reception side, transmits the data with the remainder polynomial derived at the end of the transmission data, and transmits the data on the reception side. This is a method for confirming an error. The
受信側は受信したデータのアドレス部102、情報部103及び実データ104を生成多項式で除算した余りをFCS部105と対比する(ステップ907)。なおHDLCで用いられている生成多項式はITU−Tで標準化された16ビット長のCRC−16が用いられることが多いが、32ビット長のものを用いても良い。
The receiving side compares the remainder obtained by dividing the
除算の余りとFCS部105の値が一致すれば(ステップ908:No)、受信データに誤りなしとして上位層での処理及び送信元へのレスポンスの準備を行う。一方、一致しなければ(ステップ908:Yes)、不正なデータを受信したとして送信元に再送要求を行う(監視フレームのREJコマンドなど)。
If the remainder of the division and the value of the FCS
このフレームの再送に付いては各種方式が存在する。標準的なHDLC仕様では、再送要求した送信順序番号以降のフレームの要求を行うREJコマンド及び要求した送信順序番号のみのフレームの要求を行うSREJコマンドが採用されている。これに対し、特開平08−097880号公報及び特開2000−083012号においては再送要求をある一定の範囲の送信順序番号を持つフレームに限定してその範囲のフレームの再送を行う技術が記載されている。 There are various methods for resending this frame. In the standard HDLC specification, a REJ command for requesting a frame after the transmission order number requested for retransmission and a SREJ command for requesting a frame only for the requested transmission order number are employed. On the other hand, Japanese Patent Application Laid-Open No. 08-097880 and Japanese Patent Application Laid-Open No. 2000-083012 describe a technique in which retransmission requests are limited to frames having a certain range of transmission order numbers and frames in that range are retransmitted. ing.
上記文献はCRCの適否によってのみフレームの正誤を判断している。一般的な場合においてはこの判断手法で十分である。 In the above document, the correctness of a frame is judged only by the suitability of CRC. This judgment method is sufficient in general cases.
しかし、エンドフラグ直前のFCS105の末尾に「1」が5つ並んでいると、本来は「・・・11111001111110」とのビット並びになるべきところが雑音等によるランダム誤りによって「・・・1111101111110」になる可能性がある。そして、掛かる場合は、本来的にはHDLC規定違反となるべきはずなのだが、除去すべき「0」が無い為復元されるFCS105の値は正常なままとなり、CRCの処理が適式になされる可能性がある。
However, if five “1” s are arranged at the end of the FCS 105 immediately before the end flag, the bit “... 11111001111110” is supposed to be “... 11111011111110” due to a random error due to noise or the like. there is a possibility. If it is applied, it should be a violation of the HDLC regulations. However, since there is no “0” to be removed, the value of the restored
本発明は掛かる問題を解決する為のものであり、FCS部105末尾に生じたランダム誤りによってCRCエラーが生じないがHDLC規定違反となる場合に、エラーとして処理可能な回路を提供することにある。
An object of the present invention is to provide a circuit capable of handling an error when a CRC error does not occur due to a random error generated at the end of the
本発明に係わるHDLC受信回路は、受信回路、FCS比較回路、フラグ検出回路及びFCS監視回路を含み、前記フラグ検出回路はHDLCデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、前記受信回路はHDLCプロトコルに基づきHDLCデータから「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、前記FCS比較回路は前記受信回路によって得られた前記HDLCデータの前記FCSの値と剰余多項式から求めた値が一致するかによってCRCエラーの有無を判断し、前記FCS監視回路はエンドフラグ直前のデータ列の並びが「11111」であるか否かでHDLCプロトコルに反するか否かを判断することを特徴とする。 The HDLC reception circuit according to the present invention includes a reception circuit, an FCS comparison circuit, a flag detection circuit, and an FCS monitoring circuit. The flag detection circuit performs a reception process after a start flag of HDLC data in the reception circuit and the FCS monitoring circuit. The receiver circuit removes “0” from the HDLC data based on the HDLC protocol, and then extracts the address part, the control part, the FCS and the actual data, performs CRC (cyclic redundancy check) code processing, and compares the FCS The circuit determines whether or not there is a CRC error depending on whether the FCS value of the HDLC data obtained by the receiving circuit matches the value obtained from the remainder polynomial, and the FCS monitoring circuit arranges the data string immediately before the end flag. whether or not Han but contrary to the HDLC protocol at whether or not it is "11111" Characterized in that it.
更に上述のHDLC受信回路は制御部を含み、前記CRCエラー若しくはHDLCエラーのいずれかが生じている場合には再送要求を行うことを特徴とする。 Further, the HDLC reception circuit described above includes a control unit, and makes a retransmission request when either the CRC error or the HDLC error occurs.
加えて本発明に係わるHDLC受信回路は受信回路、FCS比較回路、フラグ検出回路、ビット数カウント回路、「0」挿入回路及びデータ数比較回路を含み、前記フラグ検出回路はHDLCデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、前記受信回路はHDLCプロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、前記ビット数カウント回路は「0」除去前のHDLCデータのビット数をカウントし、前記「0」挿入回路は「0」除去を行った後のHDLCデータに再度HDLCプロトコルに基づき「0」挿入を行い「0」挿入後のデータのビット数をカウントし、前記データ数比較回路は前記ビット数カウント回路のカウント結果と前記「0」挿入回路のカウント結果を対比し、HDLCエラーの有無を確認することを特徴とする。 In addition, the HDLC reception circuit according to the present invention includes a reception circuit, an FCS comparison circuit, a flag detection circuit, a bit number count circuit, a “0” insertion circuit, and a data number comparison circuit. The flag detection circuit is provided after the start flag of HDLC data. Is received by the receiving circuit and the FCS monitoring circuit, and after removing “0” based on the HDLC protocol, the receiving circuit extracts the address part, the control part, the FCS, and the actual data to obtain CRC (cyclic redundancy). Check) code processing is performed, the bit count circuit counts the number of bits of HDLC data before “0” is removed, and the “0” insertion circuit again converts the HDLC protocol to HDLC data after the removal of “0”. Is inserted, and the number of bits of the data after the insertion of “0” is counted, and the data number comparison circuit It compared the counting result of the counting result and the "0" insertion circuit of the bit count circuit, characterized in that to check for HDLC error.
更に本発明に係わるHDLC受信回路は制御部を含み、前記CRCエラー若しくはHDLCエラーのいずれかが生じている場合には再送要求を行うことを特徴とする。 Further, the HDLC receiving circuit according to the present invention includes a control unit, and makes a retransmission request when either the CRC error or the HDLC error occurs.
本発明に係わるフレームリレー受信回路は、受信回路、FCS比較回路、フラグ検出回路及びFCS監視回路を含み、前記フラグ検出回路はフレームリレーデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、前記受信回路はフレームリレープロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、
前記FCS比較回路は前記受信回路によって得られたデータの剰余多項式が前記FCS
の値と一致によってCRCエラーの有無を判断し、前記FCS監視回路はエンドフラグ直
前のデータ列の並びが「11111」であるか否かでフレームリレープロトコルに反しないか否かを判断することを特徴とする。
A frame relay reception circuit according to the present invention includes a reception circuit, an FCS comparison circuit, a flag detection circuit, and an FCS monitoring circuit. The flag detection circuit performs a reception process after a start flag of frame relay data in the reception circuit and the FCS monitoring circuit. The receiver circuit removes “0” based on the frame relay protocol, and then extracts the address part, the control part, the FCS, and the actual data, performs CRC (cyclic redundancy check) code processing,
In the FCS comparison circuit, the remainder polynomial of the data obtained by the receiving circuit is the FCS.
The FCS monitoring circuit determines whether there is a violation of the frame relay protocol based on whether the sequence of the data string immediately before the end flag is “11111”. Features.
更に制御部を含み、前記CRCエラー若しくはフレームリレーエラーのいずれかが生じている場合には受信したフレームリレーデータの破棄を行うことにしても良い。 Further, a control unit may be included, and when either the CRC error or the frame relay error has occurred, the received frame relay data may be discarded.
また、本発明に係わる別のフレームリレー受信回路は、受信回路、FCS比較回路、フラグ検出回路、ビット数カウント回路、「0」挿入回路及びデータ数比較回路を含み、前記フラグ検出回路はフレームリレーデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、前記受信回路はフレームリレープロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、前記ビット数カウント回路は「0」除去前のフレームリレーデータのビット数をカウントし、前記「0」挿入回路は「0」除去を行った後のフレームリレーデータに再度フレームリレープロトコルに基づき「0」挿入を行い「0」挿入後のデータのビット数をカウントし、前記データ数比較回路は前記ビット数カウント回路のカウント結果と前記「0」挿入回路のカウント結果を対比し、フレームリレーエラーの有無を確認することを特徴とする。 Another frame relay receiving circuit according to the present invention includes a receiving circuit, an FCS comparing circuit, a flag detecting circuit, a bit number counting circuit, a “0” insertion circuit, and a data number comparing circuit, and the flag detecting circuit is a frame relay. The reception process after the data start flag is notified to the reception circuit and the FCS monitoring circuit, and the reception circuit extracts “0” based on the frame relay protocol and then extracts the address part, the control part, the FCS, and the actual data. CRC (cyclic redundancy check) code processing is performed, the bit count circuit counts the number of bits of frame relay data before “0” removal, and the “0” insertion circuit performs “0” removal. Based on the frame relay protocol, “0” is inserted again into the frame relay data of “0” and the data after “0” is inserted Counting the Wattage, the number of data comparison circuit by comparing the count result of the count result and the "0" insertion circuit of the bit count circuit, characterized in that to check for frame relay errors.
更に、上記フレームリレー受信回路は更に制御部を含み、前記制御部は前記CRCエラー若しくはフレームリレーエラーのいずれかが生じている場合には受信したデータの破棄を行うことも可能である。 Further, the frame relay reception circuit further includes a control unit, and the control unit can discard the received data when either the CRC error or the frame relay error occurs.
下記の構成を取ることにより、以下の効果を発揮する。 By taking the following configuration, the following effects are exhibited.
すなわち、CRCのデータの正誤のみならず、HDLCプロトコル若しくはフレームリレープロトコルの「0」挿入に関する規定が守られているか否かを判定することにより、より正確なデータの送受信を可能とする。 That is, it is possible to transmit and receive more accurate data by determining whether or not the provisions regarding insertion of “0” in the HDLC protocol or the frame relay protocol are observed, as well as correctness of CRC data.
また、結果として誤りが無かったものであっても、その信頼性に疑義があるデータに付いては再送要求を行うことで、受信したデータの信頼性を維持し、上位層における負荷の軽減を図ることが可能となる。 In addition, even if there are no errors as a result, it is possible to maintain the reliability of the received data and reduce the load on the upper layer by making a retransmission request for data with doubtful reliability. It becomes possible to plan.
図1は本発明の第1の実施形態に係わるHDLC受信回路の構成を表すブロック図である。このHDLC受信回路はCPU1、受信回路2、FCS比較回路3、フラグ検出回路4及びFCS監視回路5から構成されている。また受信回路2は「0」除去回路21とCRC演算回路22から構成されている。
FIG. 1 is a block diagram showing the configuration of an HDLC receiver circuit according to the first embodiment of the present invention. This HDLC reception circuit is composed of a CPU 1, a
CPU(制御回路)1は受信したHDLCデータが正常なものであればネットワーク層以降の処理の為のデータの加工及びネットワーク層以降の処理自体を行うブロックである。また、本実施例においてはHDLCによる送信処理も行っているものとする。なおCPU1は代替えが効くのであればDSP等を用いても良い。 A CPU (control circuit) 1 is a block for processing data for processing after the network layer and processing itself after the network layer if the received HDLC data is normal. In the present embodiment, transmission processing by HDLC is also performed. The CPU 1 may use a DSP or the like as long as substitution is effective.
受信回路2は物理層によって受信されたHDLCデータからアドレス、制御部、FCS及び実データを抽出し、「0」除去を行い、HDLC規定を遵守しているか及びFCSを用いてデータに誤りが含まれているかを検討するブロックである。
The receiving
「0」除去回路21はアドレス102、制御部103、実データ104及びFCS(フレームチェックシーケンス)105中の「1」が5つ連続した次の「0」を削除するブロックである。
The “0”
CRC演算回路22は「0」除去後のアドレス102、制御部103及び実データ104を生成多項式で割るブロックである。2進数の除算回路はシフトレジスタで生成できる為、非常にシンプルな構成で実現可能である。
The
FCS比較回路3はCRC演算回路22の計算結果とFCS105を対比するブロックである。受け取ったデータに誤りが無ければCRC演算回路22の計算結果とFCS105は一致する。
The
フラグ検出回路4は、スタートフラグ101を表すビット列「01111110」を検出し、検出結果を受信回路2及びFCS監視回路5に通知するブロックである。受信回路2はこの通知をトリガとして動作の開始・停止を行う。
The
FCS監視回路5は、エンドフラグ106直前の5ビット、即ちFCS105の末尾5ビットをチェックするブロックである。RXCLKをトリガとしてRXDのデータをラッチする5ビット分のシフトレジスタを用意し、フラグ検出回路4からの信号を受け取った際にレジスタがすべて1になっていればCPU1にHDLC規定違反を通知する構成が簡単ではあるが、構成はこれに限られるものではない。
The
次に、このHDLC受信回路を用いてどのような処理が行われるかを図2及び図3を使って説明する。 Next, what kind of processing is performed using this HDLC receiving circuit will be described with reference to FIGS.
図2は本発明で検知することが予定されている不正HDLCデータ200のデータ構造を表している。図6と図2が相違するのは、不正FCS部205が含まれている点である。本発明で検知することが予定されている不正FCS205はその末尾に「1」が5つ並び、その後に本来挿入される「0」がないデータを有する。従って、受信したデータは本来的にはHDLC規定に反しているのだが、本来挿入されていて削除の対象となる「0」が存在しないだけであり、CRCによるデータの検証は行えてしまう可能性のあるデータである。
FIG. 2 shows the data structure of
この不正HDLCデータ200を本発明の第1の実施の形態でどのように取り扱うかを表したものが図3記載のフローチャートである。このフローチャートを元に本発明の実施の処理を説明する。
The flowchart shown in FIG. 3 shows how the
フラグ検出回路4がスタートフラグ101を検知して(ステップ301)、データの受信を確認すると、FCS監視回路5がエンドフラグ106を検知するまで(ステップ302)受信データをキャッシュする(ステップ303)。この際、本発明の実施の形態においてはスタートフラグ101とエンドフラグ106はキャッシュの対象としないものとする。
When the
データのキャッシュが終了すると、キャッシュしたデータの末尾5ビットを抽出する(ステップ304)。抽出した5ビットの並びが「11111」であれば(ステップ305:Yes)、HDLC規定違反としてその旨記録する(ステップ306)。 When the data cache is completed, the last 5 bits of the cached data are extracted (step 304). If the extracted 5-bit arrangement is “11111” (step 305: Yes), it is recorded as a violation of the HDLC rules (step 306).
HDLC規定違反の有無に係わらず、「0」除去回路21がキャッシュしたデータの「0」削除を実施し(ステップ307)、CPU1がアドレス部102及び制御部103を抽出する(ステップ308)。受信したデータが自身宛のものでないことをCPU1によって抽出されたアドレス部102によって確認されると(ステップ308:No)、CPU1によってキャッシュしたデータは破棄されて処理が終了する。
Regardless of whether or not there is a violation of the HDLC rules, the data “0” removed by the “0”
自分宛のデータであれば(ステップ308:Yes)、ステップ305で確認したHDLC規定違反の有無をCPU1が確認し(ステップ309)、HDLCプロトコル違反があれば(ステップ309:Yes)、送信元に再送要求を行う。また、HDLCプロトコル違反がなければ(ステップ309:No)、FCS部105とCRC演算回路22が導出した剰余多項式をFCS比較回路3が対比し(ステップ310)、CRCエラーがあるか否かを検討する(ステップ311)。CRCエラーがあればCPU1が再送要求を行い、誤りがなければ受信完了処理を行う。なおCRCエラーの有無の判断に付いては図7と同様なので、ここでは割愛する。
If it is data addressed to itself (step 308: Yes), the CPU 1 checks whether there is a violation of the HDLC rules confirmed in step 305 (step 309), and if there is a violation of the HDLC protocol (step 309: Yes), Request retransmission. If there is no violation of the HDLC protocol (step 309: No), the
以上のようにCRCエラーに係わらずHDLCプロトコル違反か否かの監視を行い、HDLC規定違反の場合には受信したデータを破棄し、送信元に再送要求を行うことができ、より信頼性の高いデータの送受信を行うことが可能になる。 As described above, whether or not the HDLC protocol is violated is monitored regardless of the CRC error. If the HDLC standard is violated, the received data can be discarded, and a retransmission request can be sent to the transmission source. Data can be sent and received.
次に本発明の第二の実施の形態について図4及び図5に基づき説明する。対象となる不正データは図2と同様であるが、それの適否についての判断方法が第1の実施の形態と相違する。 Next, a second embodiment of the present invention will be described with reference to FIGS. The target illegal data is the same as in FIG. 2, but the method for determining whether or not it is appropriate is different from that of the first embodiment.
図4は本発明の第二の実施の形態を適用したHDLC受信回路の構成を表すブロック図である。このHDLC受信回路はCPU1、受信回路2、FCS比較回路3、フラグ検出回路4、ビット数カウント回路7、「0」挿入回路8、データ数比較回路9から構成されている。以下、これらの構成要素の説明を行うが、図2と同様の機能を発揮する構成についての説明は省略する。
FIG. 4 is a block diagram showing the configuration of an HDLC receiver circuit to which the second embodiment of the present invention is applied. This HDLC reception circuit is composed of a CPU 1, a
ビット数カウント回路7は、受信したデータのビット数をカウントする回路である。スタートフラグ101とエンドフラグ106のビット数は固定である(各8ビット)であるため、総ビット数を導出できれば、自ずと「0」挿入の対象となるデータのビット数が導出可能になる。なお、本実施例においてはFCS監視回路5同様エンドフラグ106を検出することによってビット数のカウントを終了する。
The bit number counting circuit 7 is a circuit that counts the number of bits of received data. Since the number of bits of the
「0」挿入回路8は、一旦「0」除去回路21で「0」を除去したデータを再度HDLCプロトコルに基づき「0」を挿入する回路である。正常なデータであれば、「0」除去回路21で「0」除去される前のデータ長と「0」挿入回路8で「0」を挿入した後のデータ長が同一になるはずである。このデータ長が同一であるか否かを検討するのがデータ数比較回路9である。
The “0” insertion circuit 8 is a circuit that inserts “0” once again from the data from which “0” has been removed by the “0”
データ数比較回路9は、ビット数カウント回路7のカウント結果と「0」挿入回路8処理後のデータのビット数を対比する回路である。双方が同数であれば、受信したデータはHDLCプロトコルに則ったデータであり、誤りは無かったと判別できる。一方、双方の値が異なれば、受信したデータはHDLCプロトコルに則っていないデータであり、その真偽が疑わしいと言うことができる。
The data
図5は上記不正HDLCデータ200を本発明の第2の実施の形態でどのように取り扱うかを表したフローチャートである。これに基づき図4で表したHDLC受信回路がどのような動作を行うかを説明する。
FIG. 5 is a flowchart showing how the
フラグ検出回路4がスタートフラグ101を検知して(ステップ501)、データの受信を確認するとエンドフラグ106を検知するまで(ステップ502)、受信データを図示しないメモリにキャッシュする(ステップ503)。スタートフラグ101の検知に伴い、フラグ検出回路4はビット数カウント回路7に受信データのビット数をカウントする信号を出力する。
When the
受信データのエンドフラグ106を受信すると、ビット数カウント回路7が受信したデータのビット数のカウントを終了する(ステップ504)。このカウントの対象にスタートフラグ101、エンドフラグ106を含めるか否かは設計事項であるが、ここではスタートフラグ101及びエンドフラグ106は記録しないものとする。
When the reception
データのキャッシュが終了すれば、スタートフラグ101及びエンドフラグ106を除いたデータから「0」除去回路21が「0」除去処理を行い(ステップ505)、CPU1が図示しないメモリに記録する。この際、メモリに記録するためにCPU1にも「0」除去処理後のデータを「0」挿入回路8にも出力される。
When the data cache is completed, the “0”
次に、「0」除去後のデータに、「0」挿入回路8が再度HDLCプロトコルに基づく「0」挿入を行い(ステップ506)、ビット数がどの程度になるかをカウントする(ステップ507)。この際、再挿入後のデータのビット数が問題になるのであって、データ自体は再利用する予定は無いので、メモリに保存しても保存しなくても構わない。 Next, the “0” insertion circuit 8 again inserts “0” based on the HDLC protocol into the data after the removal of “0” (step 506), and counts the number of bits (step 507). . At this time, the number of bits of the data after reinsertion becomes a problem, and the data itself is not scheduled to be reused, and may or may not be saved in the memory.
ステップ504のカウント結果並びにステップ507のカウント結果はいずれもデータ数比較回路9に出力され、データ数比較回路9において、その値が等しいか否かを判断する(ステップ508)。値が異なれば(ステップ508:No)、HDLCエラーがある旨CPU1が記憶する(ステップ509)。
Both the count result of
その後、メモリに記録した「0」除去後のデータからアドレス部102及び制御部103を抽出し(ステップ510)、自分宛のデータか否かをCPU1が確認する(ステップ510)。自分宛のデータでなければ(ステップ511:No)、受信したデータを破棄し、処理を終了する。一方受信したデータが自分宛のデータであれば(ステップ511:Yes)、CRC演算回路22による剰余多項式の導出及びFCS比較回路3による剰余多項式とFCSの対比を行いCPU1に結果を通知する(ステップ512)。CRCエラー若しくはHDLCプロトコルエラーがあるなら(ステップ513:Yes)CPU1が再送要求を行い、エラーが存在しなければ受信処理を完了し、より上位の階層による処理を実行する。
After that, the
なお、上記事例ではHDLCプロトコルでの適用のみを説明したが、ほぼ同一のフレーム構成を持ち、同じCRC誤り検出を行うフレームリレーに対しても適用可能である。この際には、上述のアドレス部102及び制御部103を適宜読み代えて対応する。また、フレームリレーには再送処理は存在しないので、図3及び図5の再送要求はデータの破棄となる。
In the above example, only the application in the HDLC protocol has been described. However, the present invention can also be applied to a frame relay having almost the same frame configuration and performing the same CRC error detection. In this case, the
本発明はHDLCプロトコル及びHDLCプロトコルをデータリンク層として含むX.25パケット交換プロトコルに準拠する機器やフレームリレー網への接続を予定する機器への使用が想定される。例えば、ISDNルータやフレームリレー交換機などである。 The present invention provides an HDLC protocol and an X.264 including HDLC protocol as a data link layer. It is assumed to be used for a device conforming to the 25-packet exchange protocol and a device scheduled to be connected to the frame relay network. For example, an ISDN router or a frame relay switch.
1 CPU(制御回路)
2 受信回路
3 FCS比較回路
4 フラグ検出回路
5 FCS監視回路
7 ビット数カウント回路
8 「0」挿入回路
9 データ数比較回路
100 HDLCパケット
1 CPU (control circuit)
2 receiving
Claims (8)
前記フラグ検出回路はHDLCデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、
前記受信回路はHDLCプロトコルに基づき前記HDLCデータから「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、
前記FCS比較回路は前記受信回路によって得られた前記HDLCデータの前記FCSの値に基づいてCRCエラーの有無を判断し、
前記FCS監視回路はエンドフラグ直前のデータ列の並びが「11111」であるか否かでHDLCプロトコルに反するか否かを判断することを特徴とするHDLC受信回路。 An HDLC reception circuit that receives data (HDLC data) based on an HDLC (High Level Data Link Control) protocol including a reception circuit, an FCS comparison circuit, a flag detection circuit, and an FCS monitoring circuit,
The flag detection circuit notifies the reception circuit and the FCS monitoring circuit of reception processing after the start flag of the HDLC data,
The receiving circuit removes “0” from the HDLC data based on the HDLC protocol, and then extracts the address part, the control part, the FCS, and the actual data, performs CRC (cyclic redundancy check) code processing,
The FCS comparison circuit determines the presence or absence of a CRC error based on the FCS value of the HDLC data obtained by the reception circuit,
The FCS monitoring circuit, wherein the FCS monitoring circuit determines whether or not the HDLC protocol is violated by whether or not the arrangement of the data string immediately before the end flag is “11111” .
前記制御回路は、前記CRCエラー若しくは前記HDLCエラーのいずれかが生じている場合には再送要求を行うことを特徴とする請求項1に記載のHDLC受信回路。 Further including a control circuit,
The HDLC reception circuit according to claim 1 , wherein the control circuit issues a retransmission request when either the CRC error or the HDLC error occurs.
前記フラグ検出回路はHDLCデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、
前記受信回路はHDLCプロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、
前記ビット数カウント回路は「0」除去前のHDLCデータのビット数をカウントし、
前記「0」挿入回路は「0」除去を行った後のHDLCデータに再度HDLCプロトコルに基づき「0」挿入を行い「0」挿入後のデータのビット数をカウントし、
前記データ数比較回路は前記ビット数カウント回路のカウント結果と前記「0」挿入回路のカウント結果を対比し、HDLCエラーの有無を確認することを特徴とするHDLC受信回路。 An HDLC reception circuit that receives HDLC data including a reception circuit, an FCS comparison circuit, a flag detection circuit, a bit number count circuit, a “0” insertion circuit, and a data number comparison circuit,
The flag detection circuit notifies the reception circuit and the FCS monitoring circuit of reception processing after the start flag of the HDLC data,
The receiver circuit removes “0” based on the HDLC protocol and then extracts the address part, the control part, the FCS, and the actual data, performs CRC (cyclic redundancy check) code processing,
The bit number counting circuit counts the number of bits of HDLC data before removing “0”,
The “0” insertion circuit inserts “0” into the HDLC data after removing “0” again based on the HDLC protocol, counts the number of bits of the data after insertion of “0”,
The HDLC reception circuit, wherein the data number comparison circuit compares the count result of the bit number count circuit with the count result of the “0” insertion circuit to check whether there is an HDLC error.
前記制御回路は前記CRCエラー若しくは前記HDLCエラーのいずれかが生じている場合には再送要求を行うことを特徴とする請求項3記載のHDLC受信回路。 Further including a control circuit,
4. The HDLC receiving circuit according to claim 3, wherein the control circuit makes a retransmission request when either the CRC error or the HDLC error occurs.
前記フラグ検出回路はフレームリレーデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、
前記受信回路はフレームリレープロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、
前記FCS比較回路は前記受信回路によって得られたデータの剰余多項式が前記FCSの値に基づいてCRCエラーの有無を判断し、
前記FCS監視回路はエンドフラグ直前のデータ列の並びが「11111」であるか否かでフレームリレープロトコルに反しないか否かを判断することを特徴とするフレームリレー受信回路。 A frame relay receiving circuit for receiving data (frame relay data) based on a frame relay protocol including a receiving circuit, an FCS comparison circuit, a flag detection circuit, and an FCS monitoring circuit,
The flag detection circuit notifies the reception processing after the start flag of the frame relay data to the reception circuit and the FCS monitoring circuit,
The receiver circuit removes “0” based on the frame relay protocol, and then extracts the address part, the control part, the FCS, and the actual data, performs CRC (cyclic redundancy check) code processing,
The FCS comparison circuit determines whether the remainder polynomial of the data obtained by the receiving circuit has a CRC error based on the FCS value;
The FCS monitoring circuit determines whether or not the frame relay protocol is not violated by whether or not the arrangement of the data string immediately before the end flag is “11111” .
前記制御回路は、前記CRCエラー若しくは前記フレームリレーエラーのいずれかが生じている場合には受信したフレームリレーデータの破棄を行うことを特徴とする請求項5記載のフレームリレー受信回路。 Further including a control circuit,
6. The frame relay receiving circuit according to claim 5 , wherein the control circuit discards the received frame relay data when either the CRC error or the frame relay error occurs.
前記フラグ検出回路はフレームリレーデータのスタートフラグ以降の受信処理を前記受信回路及び前記FCS監視回路に通知し、
前記受信回路はフレームリレープロトコルに基づき「0」除去を行った後アドレス部、制御部、FCS及び実データを抽出しCRC(サイクリックリダンダンシーチェック)符号処理を行い、
前記ビット数カウント回路は「0」除去前のフレームリレーデータのビット数をカウントし、
前記「0」挿入回路は「0」除去を行った後のフレームリレーデータに再度フレームリレープロトコルに基づき「0」挿入を行い「0」挿入後のデータのビット数をカウントし、
前記データ数比較回路は前記ビット数カウント回路のカウント結果と前記「0」挿入回路のカウント結果を対比し、フレームリレーエラーの有無を確認することを特徴とするフレームリレー受信回路。 A frame relay receiving circuit for receiving frame relay data including a receiving circuit, an FCS comparing circuit, a flag detecting circuit, a bit number counting circuit, a “0” insertion circuit and a data number comparing circuit;
The flag detection circuit notifies the reception processing after the start flag of the frame relay data to the reception circuit and the FCS monitoring circuit,
The receiver circuit removes “0” based on the frame relay protocol, and then extracts the address part, the control part, the FCS, and the actual data, performs CRC (cyclic redundancy check) code processing,
The bit number counting circuit counts the number of bits of the frame relay data before removing “0”,
The “0” insertion circuit inserts “0” into the frame relay data after removing “0” again based on the frame relay protocol, counts the number of bits of the data after insertion of “0”,
The data number comparison circuit compares the count result of the bit number count circuit with the count result of the “0” insertion circuit, and confirms the presence or absence of a frame relay error.
前記制御回路は前記CRCエラー若しくは前記フレームリレーエラーのいずれかが生じている場合には受信したデータの破棄を行うことを特徴とする請求項7記載のフレームリレー受信回路。 Further including a control circuit,
8. The frame relay receiving circuit according to claim 7, wherein the control circuit discards received data when either the CRC error or the frame relay error occurs.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003299815A JP3839005B2 (en) | 2003-08-25 | 2003-08-25 | HDLC monitoring circuit and frame relay monitoring circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003299815A JP3839005B2 (en) | 2003-08-25 | 2003-08-25 | HDLC monitoring circuit and frame relay monitoring circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005072950A JP2005072950A (en) | 2005-03-17 |
| JP3839005B2 true JP3839005B2 (en) | 2006-11-01 |
Family
ID=34404932
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003299815A Expired - Fee Related JP3839005B2 (en) | 2003-08-25 | 2003-08-25 | HDLC monitoring circuit and frame relay monitoring circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3839005B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010103602A1 (en) | 2009-03-09 | 2010-09-16 | 富士通株式会社 | Transmission data error check device and method thereof |
| KR101572810B1 (en) * | 2014-08-20 | 2015-12-14 | 신우이.엔.지 주식회사 | asynchronous communication and synchronous communication system and its control method |
-
2003
- 2003-08-25 JP JP2003299815A patent/JP3839005B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005072950A (en) | 2005-03-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7269186B2 (en) | Protocol for framing a payload | |
| EP1190520B1 (en) | System and method for implementing hybrid automatic repeat request using parity check combining | |
| US8381055B2 (en) | System for communicating data in xDSL using data retransmission | |
| US8402343B2 (en) | Reliable packet cut-through | |
| CN101031110B (en) | Apparatus and method for processing bursts in wireless communication system | |
| JP2005526414A5 (en) | ||
| CN1476699A (en) | Forward Error Correction System and Method for Packet Based Communication System | |
| WO2006095385A1 (en) | Wireless communication apparatus | |
| WO2024169301A1 (en) | Data retransmission method, electronic device, and computer readable storage medium | |
| KR100772528B1 (en) | Efficient Packet Retransmission Method and Device in Wired / Wireless Networks | |
| WO2023098430A1 (en) | Data packet processing method, communication apparatus and communication system | |
| JP5236735B2 (en) | Improved data structure boundary synchronization between transmitter and receiver | |
| CN101662339A (en) | Method and device for verifying data recovered by forward error correction | |
| CN113556290B (en) | FC frame redundancy receiving method, system, equipment and medium based on frame characteristic symbol | |
| RU2216868C2 (en) | System and method for automatic hybrid request to repeat using parity check combination | |
| JP3839005B2 (en) | HDLC monitoring circuit and frame relay monitoring circuit | |
| CN109039552A (en) | A kind of data reconstruction method and device | |
| JP2003209577A (en) | Communication system, communication method, transmitting terminal, receiving terminal, and relay device | |
| CN112181883B (en) | Data transmission method, system and storage medium for serial communication | |
| CN119449425B (en) | Gateway security filtering method, electronic device, storage medium and program product | |
| JP3950865B2 (en) | ATM communication system | |
| CN105897601A (en) | Business request processing method and device | |
| JP3316730B2 (en) | Data communication device | |
| JP3979251B2 (en) | Data falsification prevention program, data falsification prevention packet transmitter and data falsification prevention repeater | |
| JP4702104B2 (en) | COMMUNICATION DEVICE, COMMUNICATION PROCESSING METHOD, AND COMMUNICATION PROCESSING PROGRAM |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050328 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060420 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060425 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060615 |
|
| 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: 20060711 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060801 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090811 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100811 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees |