JP2007096737A - Communication controller and its control method - Google Patents

Communication controller and its control method Download PDF

Info

Publication number
JP2007096737A
JP2007096737A JP2005283254A JP2005283254A JP2007096737A JP 2007096737 A JP2007096737 A JP 2007096737A JP 2005283254 A JP2005283254 A JP 2005283254A JP 2005283254 A JP2005283254 A JP 2005283254A JP 2007096737 A JP2007096737 A JP 2007096737A
Authority
JP
Japan
Prior art keywords
packet
size
communication control
received packet
transmission side
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.)
Granted
Application number
JP2005283254A
Other languages
Japanese (ja)
Other versions
JP4649304B2 (en
Inventor
Shinya Okazaki
真也 岡崎
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2005283254A priority Critical patent/JP4649304B2/en
Publication of JP2007096737A publication Critical patent/JP2007096737A/en
Application granted granted Critical
Publication of JP4649304B2 publication Critical patent/JP4649304B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication controller capable of correctly recognizing a faulty packet and increasing error resistance, and to provide its control method. <P>SOLUTION: A USB controller 48 stores a packet size which is received in a size register 84, counts re-transmission to a re-transmission counter 86, inputs the packet size received by a size inspecting part 104 and the counts, compares the predetermined packet size with the received packet size, adopts at least one of a comparison result and the counts as a size condition, inspects the received packet with respect to the size condition, determines whether no response is made to a handshake to a transmission side in response to an inspection result, performs control in response to the determination so as to make no response to the handshake, and then, allows the transmission side to adequately perform re-transmission relative to the erroneous recognition of the packet size. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、通信制御装置およびその制御方法に関するものである。本発明の通信制御装置は、とくに、USB(Universal Serial Bus)の通信において生じるエラーの耐性を向上させる技術に関するものである。また、本発明の通信制御方法は、たとえばUSB通信のショートパケット等で生じるパケット誤認識を的確に判断し、この判断に応じてパケット通信を制御する手順に関するものである。   The present invention relates to a communication control device and a control method therefor. The communication control apparatus according to the present invention particularly relates to a technique for improving resistance to errors that occur in USB (Universal Serial Bus) communication. The communication control method of the present invention relates to a procedure for accurately determining packet misrecognition caused by, for example, a short packet of USB communication and controlling packet communication in accordance with this determination.

USB(Universal Serial Bus)通信では、通信品質の確保のためクロック精度、信号波形、ジッタおよびスキュー等の影響にともなう信号品質、ならびにノイズ対策等の様々な条件が規定されている。また、USB通信は、通信エラーに関してもパケットの各フィールドにCRC(Cyclic Redundancy Check)等の冗長部を持たせることでエラー検出する仕組みが採用されている。また、ハンドシェークを使い分けることにより、USB通信は、フロー制御ができるだけでなく、検出したエラーに対する再送の仕組みも用意されている。
特開2001−148719号公報 特開2001−211210号公報
In USB (Universal Serial Bus) communication, various conditions such as clock quality, signal quality due to the influence of signal waveform, jitter, skew, etc., and noise countermeasures are defined to ensure communication quality. Also, USB communication employs a mechanism for detecting errors by providing redundant fields such as CRC (Cyclic Redundancy Check) in each field of a packet even for communication errors. By using handshaking properly, USB communication not only allows flow control, but also provides a mechanism for retransmitting detected errors.
JP 2001-148719 A Japanese Patent Laid-Open No. 2001-211210

前述したようにUSB通信には、通信品質、パケットのエラー検出および再送に関する各種の規定が設けられている。しかしながら、パケット長に関しては、EOP(End Of Packet)を検出することでパケットの終端と認識する。したがって、パケットはパケット長を示すフィールドを持たない。このため、EOPの検出を誤ると、正常なパケットであっても、そのパケット長を知ることができない。さらに、USB通信におけるパケット長は可変長である。   As described above, the USB communication is provided with various regulations relating to communication quality, packet error detection, and retransmission. However, the packet length is recognized as the end of the packet by detecting EOP (End Of Packet). Therefore, the packet does not have a field indicating the packet length. For this reason, if the EOP is detected incorrectly, the packet length cannot be known even for a normal packet. Furthermore, the packet length in USB communication is variable.

ここで、パケット破損が発生し、これによりEOPを誤認識すると、パケットはショートパケットとして扱われてしてしまう。この場合、パケット破損は、冗長部によるフィールドのエラー検出機能に基づく検出を頼ることとなる。たとえばパケットがショートパケットとして扱われた場合、テータフィールドにおけるデータの並びには制約がとくにないことから、データフィールドの正常に転送できた部分とCRCフィールドとして扱われた部分によるCRC検査において偶然、CRC値が一致してしまうことが有り得る。これが生じると、結果的に破損パケットが正常パケットと認識されてしまう。   Here, when packet corruption occurs and thus EOP is misrecognized, the packet is treated as a short packet. In this case, the packet corruption depends on detection based on the error detection function of the field by the redundant part. For example, if a packet is treated as a short packet, there is no restriction on the data sequence in the data field, so the CRC value by chance in the CRC check by the part that was successfully transferred and the part that was treated as a CRC field. May match. When this occurs, the corrupted packet is recognized as a normal packet as a result.

ところで、USB通信規格のバージョンl.1にて規定され、USB通信規格のバージョン2.0でも継承されているUSB通信のフルスピードにおいて、EOPは信号の種類を表わすバスコンディションとして、他では再現され難い2ビットタイムのSE0(Send End 0)ステートとして定義されていた。通常の信号は差動信号であるため、2つのデータ線で位相が逆になるが、SEOは2つのデータ線がともにローレベルの信号になる。すなわち、それが2ビットタイムを継続することになる。これにより、このような破損したパケットの検出に支障をきたす可能性を完全になくすことはできないが、その可能性は低く抑えられていた。   By the way, at the full speed of USB communication specified in version l.1 of the USB communication standard and inherited in version 2.0 of the USB communication standard, EOP is difficult to be reproduced elsewhere as a bus condition representing the type of signal. It was defined as the SE0 (Send End 0) state of bit time. Since the normal signal is a differential signal, the phase is reversed between the two data lines, but in SEO, the two data lines are both low level signals. That is, it will continue for 2 bit times. As a result, the possibility of hindering the detection of such a damaged packet cannot be completely eliminated, but the possibility has been kept low.

一方、USB通信規格のバージョン2.0で追加されたハイスピード通信でEOPは、フルスピード通信と定義が異なる。ハイスピード通信においてEOPは、通常のデータビットと同一な差動信号であるJステートまたはKステートの8ビットタイム継続として定義された。JおよびKステートは通常のデータビットと同一なステートではあるが、USB通信ではビットスタッフという仕組みにより7ビット以上同じステートが続く場合、JおよびKステートがトグルする規則があり、8ビットタイム継続するJおよびKステートはデータ並びとしては発生せず、EOPを識別できることになる。   On the other hand, EOP is a high-speed communication added in version 2.0 of the USB communication standard, and the definition differs from full-speed communication. In high-speed communication, EOP was defined as 8-bit time continuation in J state or K state, which is the same differential signal as normal data bits. The J and K states are the same states as normal data bits, but in USB communication, if the same state continues for 7 or more bits due to the mechanism of bit stuff, there is a rule that the J and K states toggle, and the 8-bit time continues The J and K states do not occur as data sequences, and EOP can be identified.

ここで、このビットスタッフに対するエラー、すなわちビットスタッフエラーが発生すると、フルスピード通信ではエラーとして検出し、検出したエラーのパケットを破棄する。しかしながら、ハイスピード通信では、直ちにEOPと同じバスコンディションとなり、USB通信規格のバージョン2.0でもEOPとして扱われることが明記されている。この結果、ビットスタッフエラーが検出できなくなっている。したがって、フルスピード通信では2ビット分のエラーが発生しない限り、EOPを誤認識することはなかったが、ハイスピード通信では、データ並びによっては1ビット分のエラーでもEOPを誤認識することとなる。これにより、フルスピード通信よりもハイスピード通信では、EOP検出に対するエラー耐性が低くなっている。この結果として、EOPの誤認識による破損した短いパケットを正常パケットとして扱う危険性が増してしまう。   Here, when an error with respect to this bit stuff, that is, a bit stuff error occurs, it is detected as an error in full-speed communication, and the packet of the detected error is discarded. However, it is specified that in high-speed communication, the bus condition immediately becomes the same as that of EOP, and it is treated as EOP even in version 2.0 of the USB communication standard. As a result, a bit stuff error cannot be detected. Therefore, EOP was not misrecognized unless an error of 2 bits occurred in full-speed communication. However, in high-speed communication, EOP was misrecognized even with an error of 1 bit depending on the data arrangement. . As a result, error tolerance for EOP detection is lower in high-speed communication than in full-speed communication. As a result, there is an increased risk of handling a short packet that is damaged due to erroneous recognition of EOP as a normal packet.

この危険性について簡単に説明する。偶然CRCが一致し、EOPが誤認識にあるエラーパケットの残りに対するデータ送信完了前にACK(ACKnowledge)応答が返された場合、送信側はACK応答が受け取れない。このため、送信側はパケット送信が失敗したと認識、すなわち異常なトランザクションの完了と判断する。しかしながら、エラーパケットの残りに対するデータが送信完了後にACK応答が返されると、送信側はACK応答を受け取るから、正常受信と誤認識する。この結果、送信データの再送が起こらない。   This danger will be briefly explained. If the CRC coincides and the ACK (ACKnowledge) response is returned before the data transmission for the rest of the error packets in which EOP is misrecognized, the transmitting side cannot receive the ACK response. For this reason, the transmission side recognizes that the packet transmission has failed, that is, determines that the abnormal transaction has been completed. However, if the ACK response is returned after the data for the remainder of the error packet is transmitted, the transmitting side receives the ACK response, so that it is erroneously recognized as normal reception. As a result, transmission data is not retransmitted.

本発明はこのような従来技術の欠点を解消し、破損したパケットに対する認識を正しくし、より一層エラー耐性を向上させることができる通信制御装置およびその制御方法を提供することを目的とする。   It is an object of the present invention to provide a communication control device and a control method therefor that can eliminate such drawbacks of the prior art, correct recognition of damaged packets, and further improve error resistance.

本発明は上述の課題を解決するために、送信側から供給されるパケットを受信し、受信したパケットを解析し、解析により得られる情報を基にこの受信したパケットの受信状態に応じて送信側に対してこの受信したパケットの通信を制御する通信制御装置において、この装置は、受信したパケットの解析により得られた第1のパケットサイズを格納する情報格納手段と、送信側から供給されるパケットの再送される回数をカウントするカウント手段と、第1のパケットサイズおよび回数が入力され、受信したパケットに対してあらかじめ設定された第2のパケットサイズと第1のパケットサイズとを比較し、少なくとも、比較結果および回数のいずれか一方をサイズ条件とし、このサイズ条件に対する受信したパケットを検査し、検査結果に応じて送信側へのハンドシェークを無応答にするか否かを判定し、制御するサイズ検査手段とを含むことを特徴とする。   In order to solve the above-mentioned problem, the present invention receives a packet supplied from the transmission side, analyzes the received packet, and based on the information obtained by the analysis, the transmission side according to the reception state of the received packet In the communication control device for controlling the communication of the received packet, the device includes an information storage means for storing the first packet size obtained by analyzing the received packet, and a packet supplied from the transmission side. Counting means for counting the number of times of retransmission, a first packet size and the number of times are input, a second packet size set in advance for the received packet is compared with the first packet size, and at least , One of the comparison result and the number of times is set as a size condition, and the received packet for this size condition is inspected, and Flip handshaking to the sender determines whether the no-response, characterized in that it comprises a size checking means for controlling.

本発明の通信制御装置は、情報格納手段に第1のパケットサイズを格納し、カウント手段に再送した回数をカウントし、サイズ検査手段で第1のパケットサイズおよび回数が入力され、受信したパケットに対してあらかじめ設定された第2のパケットサイズと第1のパケットサイズとを比較し、少なくとも、比較結果および回数のいずれか一方をサイズ条件とし、このサイズ条件に対する受信したパケットを検査し、検査結果に応じて送信側へのハンドシェークを無応答にするか否かを判定し、この判定に応じて制御することにより通常どのサイズであっても、パケットのペイロードが所定のサイズ以内であれば、ACK(ACKnowledge)応答を返すところを、サイズ条件の一致や回数によりハンドシェークを無応答とすることによりパケットサイズの誤認識に対して的確に再送を送信側にさせる。   The communication control apparatus of the present invention stores the first packet size in the information storage means, counts the number of retransmissions in the counting means, receives the first packet size and the number of times in the size inspection means, The second packet size set in advance and the first packet size are compared, and at least one of the comparison result and the number of times is set as the size condition, and the received packet for the size condition is inspected. If the packet payload is within the specified size, the ACK is normally determined regardless of the size. (ACKnowledge) The packet size by returning no response when the handshake is not responded depending on the size condition match or the number of times. Is the correct retransmitted against erroneous recognition to the sender.

また、本発明は上述の課題を解決するために、送信側から供給されるパケットを受信し、受信したパケットを解析し、解析により得られる情報を基に該受信したパケットの受信状態に応じて送信側に対してこの受信したパケットの通信を制御する通信制御方法において、この方法は、解析により受信したパケットのサイズを第1のパケットサイズとして求める第1の工程と、送信側から供給されるパケットの再送される回数をカウントする第2の工程と、あらかじめ第2のパケットサイズを設定しておき、第1のパケットサイズと第2のパケットサイズとの比較結果および回数をサイズ条件とし、このサイズ条件に対する受信したパケットを検査する第3の工程と、受信したパケットの検査結果に応じて送信側へのハンドシェークを無応答にするか否かを判定し、制御する第4の工程とを含み、第4の工程は、回数の判定がパケットの再送を認める限界より小さい回数の場合、送信側へのハンドシェークを無応答に制御し、回数が限界に一致した場合、送信側に対し正常として制御し、この通信制御方法にて規定される上位階層の構成要素に対して受信したパケットのエラーを割り込みでアサートし、この受信したパケットを保持することを特徴とする。   In order to solve the above-described problem, the present invention receives a packet supplied from the transmission side, analyzes the received packet, and based on information obtained by the analysis, according to the reception state of the received packet. In the communication control method for controlling the communication of the received packet with respect to the transmission side, this method is supplied from the transmission side and a first step for obtaining the size of the packet received by analysis as the first packet size. A second step of counting the number of times a packet is retransmitted, a second packet size is set in advance, and the comparison result and the number of times between the first packet size and the second packet size are used as size conditions. The third step of inspecting the received packet for the size condition, and the handshake to the transmission side according to the inspection result of the received packet, no response And the fourth step of controlling whether or not the handshake to the transmitting side is made to be unresponsive when the number of times is smaller than the limit for allowing retransmission of the packet. If the number of times matches the limit, the transmission side is controlled as normal, and the received packet error is asserted by an interrupt to the upper layer component specified by this communication control method. It is characterized by holding a packet.

本発明の通信制御方法は、解析により受信したパケットのサイズを第1のパケットサイズとして求め、送信側から供給されるパケットの再送される回数をカウントし、あらかじめ第2のパケットサイズを設定しておき、第1のパケットサイズと第2のパケットサイズとの比較結果およびカウントした回数をサイズ条件とし、このサイズ条件に対する受信したパケットを検査し、受信したパケットの検査結果に応じて送信側へのハンドシェークを無応答にするか否かを判定し、制御し、この制御は回数の判定がパケットの再送を認める限界より小さい回数の場合、送信側へのハンドシェークを無応答にし、回数が限界に一致した場合、送信側に対し正常として制御し、この通信制御方法にて規定される上位階層の構成要素に対して受信したパケットのエラーを割り込みでアサートし、この受信したパケットを保持することで破損したパケット、とくに、ショートパケットに対する認識を正しくし、より一層エラー耐性を向上させる。   The communication control method according to the present invention obtains the size of a packet received by analysis as the first packet size, counts the number of times the packet supplied from the transmission side is retransmitted, and sets a second packet size in advance. Then, the comparison result between the first packet size and the second packet size and the number of times counted are used as the size condition, the received packet is inspected for the size condition, and the transmission side is inspected according to the inspection result of the received packet. Determines whether or not to make the handshake unresponsive, and controls this. If the number of times is less than the limit that allows packet retransmission, the handshake to the sending side is made unresponsive and the number matches the limit. In this case, the transmission side is controlled as normal, and the received packet is received for the upper layer component specified by this communication control method. Bets errors asserted by interrupt, corrupted packets by holding this received packet, in particular, properly awareness of short packets, it improves the more error tolerant.

本発明の通信制御装置および通信制御方法によれば、上位層プロトコルで決まっているサイズ条件によりUSBプロトコルでは検出できないエラーを検出して誤り検出率を高めることができる。また、再送単位を小さく、さらにハードウェアにより応答速度も通常のエラーパケットと同様にすることでエンドポイントの転送パフォーマンスへの影響および無駄なパケットの転送をなくすことができ、USBバス全体のバンド幅も有効に使用することができる。   According to the communication control device and the communication control method of the present invention, an error that cannot be detected by the USB protocol due to the size condition determined by the upper layer protocol can be detected and the error detection rate can be increased. In addition, the resend unit is reduced and the response speed of hardware is the same as that of normal error packets, so that the impact on endpoint transfer performance and unnecessary packet transfer can be eliminated, and the bandwidth of the entire USB bus Can also be used effectively.

次に添付図面を参照して本発明による通信制御装置の一実施例を詳細に説明する。   Next, an embodiment of a communication control apparatus according to the present invention will be described in detail with reference to the accompanying drawings.

本実施例は、本発明の通信制御装置をUSB通信装置10に適用した場合である。本発明と直接関係のない部分について図示および説明を省略する。以下の説明で、信号はその現れる接続線の参照番号で指示する。   In this embodiment, the communication control device of the present invention is applied to the USB communication device 10. The illustration and description of parts not directly related to the present invention are omitted. In the following description, the signal is indicated by the reference number of the connecting line in which it appears.

USB通信装置10は、図2に示すように、プロトコルを制御するハードウェア12(HW)、ソフトウェア14(SW)がスタックした階層構造を有する。また、レイヤの観点から見ると、大きくUSBバス1/Fレイヤ16、USB論理デバイスレイヤ18、ファンクションレイヤ20の3つに分けることができる。   As shown in FIG. 2, the USB communication device 10 has a hierarchical structure in which hardware 12 (HW) and software 14 (SW) for controlling a protocol are stacked. Further, from the viewpoint of the layer, it can be roughly divided into the USB bus 1 / F layer 16, the USB logical device layer 18, and the function layer 20.

USBバス1/Fレイヤ16は、USBの物理層(PHYsical HW)22とUSBのコントローラ(リンク層HW)24を含む。物理層HW(22)は、クロック同期、バスステート検出、EOP検出、NRZI(Non-Return to Zero Invert)コーデックおよびビットスタッフ/アンスタッフ等の機能を有する。NRZIとは、変調符号のビットにデータ"1"が現れるごとに極性を反転する方法である。   The USB bus 1 / F layer 16 includes a USB physical layer (PHYsical HW) 22 and a USB controller (link layer HW) 24. The physical layer HW (22) has functions such as clock synchronization, bus state detection, EOP detection, NRZI (Non-Return to Zero Invert) codec, and bit stuff / unstuff. NRZI is a method of inverting the polarity every time data “1” appears in a modulation code bit.

また、USBリンク層HW(24)では、パケットエラー検出、トランザクション管理、アドレス、エンドポイント管理等の機能を有する。通信路としてエンドポイント毎にアクセスするためのインタフェースを持つ。   The USB link layer HW (24) has functions such as packet error detection, transaction management, address, and endpoint management. It has an interface for accessing each endpoint as a communication path.

USB論理デバイスレイヤ18は、USBデバイスとして標準コマンドによるPnP(Plug and Play)や電源管理および状態管理等を制御し、複数のトランザクションが集まったトランスファ単位で通信を管理する機能を有する。USB論理デバイスレイヤ18には、この機能を実現させるプロトコルが実装される。これが、たとえばUSBペリフェラルドライバ26である。   The USB logical device layer 18 functions as a USB device to control PnP (Plug and Play), power management, status management, and the like using standard commands, and manage communication in units of transfer in which a plurality of transactions are collected. The USB logical device layer 18 is implemented with a protocol for realizing this function. This is the USB peripheral driver 26, for example.

ファンクションレイヤ20は、周辺機器としての機能を制御する機能を有する。ファンクションレイヤ20には、いくつかのトランスファを組み合わせたファンクション毎のプロトコルが実装される。本実施例では、ファンクションを限定していないが、たとえば大容量のストレージクラスのファンクションとしてUSBクラスドライバ28やアプリケーション30を含む。   The function layer 20 has a function of controlling functions as a peripheral device. In the function layer 20, a protocol for each function in which several transfers are combined is implemented. In the present embodiment, the functions are not limited. For example, the USB class driver 28 and the application 30 are included as functions of a large-capacity storage class.

上述した構成要素を含むUSB通信装置10の一例にUSB HDD(Hard Disk Drive)がある。USB HDD 32を図3に示す。USB HDD 32は、図3に示すように、USBホスト34とデバイス36との間に配され、両装置の間の通信を担う。USB HDD 32は、この場合、クラスドライバとしては、USBデバイスクラスを用いて定義される大容量ストレージクラス38が実装される。また、アプリケーションとしては、ソフトウェアの対応によりコマンド解析AP(APplication)40で解析し、データ処理することにより具体的にはUSB to IDE(Integrated Drive Electronics)ブリッジ機能を実装し、実現させている。   An example of the USB communication device 10 including the above-described components is a USB HDD (Hard Disk Drive). A USB HDD 32 is shown in FIG. As shown in FIG. 3, the USB HDD 32 is arranged between the USB host 34 and the device 36, and is responsible for communication between both devices. In this case, the USB HDD 32 is mounted with a mass storage class 38 defined using the USB device class as a class driver. In addition, as an application, a command analysis AP (APplication) 40 is analyzed according to software, and a USB to IDE (Integrated Drive Electronics) bridge function is implemented and realized by processing data.

ここで、IDEとは、パーソナルコンピュータの互換機用ハードディスクインターフェイスの1つである。   Here, IDE is one of hard disk interfaces for compatible computers of personal computers.

USBイベント制御ソフトウェア42は、USB HDD 32におけるUSB論理デバイスレイヤ18の具体例である。デバイスドライバ44は、デバイス36側のドライバである。   The USB event control software 42 is a specific example of the USB logical device layer 18 in the USB HDD 32. The device driver 44 is a driver on the device 36 side.

制御部46は、USBデバイスコントローラ48およびデバイスコントローラ50を含む。USBデバイスコントローラ48は、USBパケットの送受信を制御し、本発明を適用して誤認識により短いパケットの正常なパケットと認識してしまうことで生じるエラー耐性の低下を防ぐ機能を有する。この機能を実現させる構成例を後段にて示しながら説明する。デバイスコントローラ50は、デバイス側との通信を制御する機能を有する。   The control unit 46 includes a USB device controller 48 and a device controller 50. The USB device controller 48 has a function of controlling transmission / reception of USB packets and preventing a reduction in error resistance caused by recognizing a short packet as a normal packet by erroneous recognition by applying the present invention. A configuration example for realizing this function will be described below. The device controller 50 has a function of controlling communication with the device side.

デバイス36には、ATA(Advanced Technology Attachment)/SCSI(Small Computer System Interface)規格のHDD/CD-ROM(Compact Disk-Read Only Memory)/FDD(Floppy Disk Driver)(登録商標)等がある。   The device 36 includes ATA (Advanced Technology Attachment) / SCSI (Small Computer System Interface) standard HDD / CD-ROM (Compact Disk-Read Only Memory) / FDD (Floppy Disk Driver) (registered trademark).

次に本実施例におけるUSBデバイスコントローラ48の概略的な構成例を図1に示す。USBコントローラ48は、複数のエンドポイント処理部をたとえば、エンドポイントA(52), B(54),・・・として含み、さらに、トランザクション制御部56、MUX(MUltipleXer)58および60、データパケット送信処理部62、ハンドシェーク送信処理部64、トークン送信処理部66、PID(Packet Identifier)生成部68、データパケット送信処理部62、ハンドシェーク送信処理部64、トークン送信処理部66、PID(Packet Identifier)生成部68、データパケット受信処理部70、ハンドシェーク受信処理部72、トークン受処理部74、ならびにPID検査部76を含む。   Next, FIG. 1 shows a schematic configuration example of the USB device controller 48 in the present embodiment. The USB controller 48 includes a plurality of endpoint processing units, for example, as endpoints A (52), B (54),..., A transaction control unit 56, MUX (MUltipleXer) 58 and 60, and data packet transmission Processing unit 62, handshake transmission processing unit 64, token transmission processing unit 66, PID (Packet Identifier) generation unit 68, data packet transmission processing unit 62, handshake transmission processing unit 64, token transmission processing unit 66, PID (Packet Identifier) generation Unit 68, data packet reception processing unit 70, handshake reception processing unit 72, token reception processing unit 74, and PID inspection unit 76.

エンドポイント処理部を代表してエンドポイントA(52)を示す。エンドポイントA(52)は、一般的に含まれるFIFO(First-IN First-Out)メモリ78、送受信カウンタ80、ステータスレジスタ82とともに、特徴としてサイズレジスタ84および再送カウンタ86を含む。サイズレジスタ84は、エンドポイント毎に送受信の両方で使用され、送信時に既知および予測可能なサイズに指定された送信サイズを格納する機能を有し、受信時に受信サイズおよびサイズ検査回路の有効/無効を指定する機能も有する。後者の指定機能で無効を指定すると、USBコントローラ48は、通常のUSBコントローラと同じように動作させることができる。USBコントローラ48は、MCU(Micro-Controller Unit)インタフェース上に作られたレジスタインタフェースよりサイズレジスタ84を動的に設定することができる。サイズレジスタ84は、各指定された機能を実現するように動作する。   The endpoint A (52) is shown on behalf of the endpoint processing unit. The endpoint A (52) includes a first-in first-out (FIFO) memory 78, a transmission / reception counter 80, a status register 82, and a size register 84 and a retransmission counter 86 as features. The size register 84 is used for both transmission and reception for each endpoint, and has the function of storing the transmission size specified in the known and predictable size at the time of transmission, and the reception size and size check circuit valid / invalid at the time of reception It also has a function to specify. When invalid is designated by the latter designation function, the USB controller 48 can be operated in the same manner as a normal USB controller. The USB controller 48 can dynamically set the size register 84 from a register interface created on an MCU (Micro-Controller Unit) interface. The size register 84 operates to implement each designated function.

再送カウンタ86は、受信専用に用いてパケットの再送された回数を歩進計測する機能を有する。エンドポイントA、B、・・・はMUX 58に接続される。とくに、サイズレジスタ84および再送カウンタ86は、それぞれ、パケットサイズおよび再送回数をデータパケット受信処理部70に供給する。   The retransmission counter 86 has a function of measuring the number of times a packet has been retransmitted by using it exclusively for reception. Endpoints A, B,... Are connected to MUX 58. In particular, the size register 84 and the retransmission counter 86 supply the packet size and the number of retransmissions to the data packet reception processing unit 70, respectively.

トランザクション制御部56は、MUX 58および60にイネーブル信号86を供給して動作を制御し、送受信における各ステートを制御する機能を有する。この機能を実現させるように、トランザクション制御部56は、送信処理ブロックとしてのデータパケット送信処理部62、ハンドシェーク送信処理部64、トークン送信処理部66、PID生成部68、受信処理ブロックとしてのデータパケット受信処理部70、ハンドシェーク受信処理部72、トークン受信処理部74およびPID検査部76に制御信号88〜102が供給される。   The transaction control unit 56 has a function of controlling an operation by supplying an enable signal 86 to the MUXs 58 and 60 and controlling each state in transmission and reception. In order to realize this function, the transaction control unit 56 includes a data packet transmission processing unit 62 as a transmission processing block, a handshake transmission processing unit 64, a token transmission processing unit 66, a PID generation unit 68, and a data packet as a reception processing block. Control signals 88 to 102 are supplied to the reception processing unit 70, the handshake reception processing unit 72, the token reception processing unit 74, and the PID checking unit 76.

データパケット送信処理部62は、図示しないがCRC生成部およびトグル値生成部を含む。データパケット送信処理部62はMUX 60に接続される。また、ハンドシェーク送信処理部64はPID生成部68と接続され、トークン送信処理部66もPID生成部68と接続される。トークン送信処理部66は、図示しないがエンドポイント番号生成部およびアドレス生成部を含む。PID生成部68は、MUX 60に接続される。送信処理ブロックではパケットの各フィールド値を生成する。データパケットの処理ブロックそれぞれはエンドポイントの各レジスタとデータパスにより接続される。   Although not shown, data packet transmission processing unit 62 includes a CRC generation unit and a toggle value generation unit. The data packet transmission processing unit 62 is connected to the MUX 60. The handshake transmission processing unit 64 is connected to the PID generation unit 68, and the token transmission processing unit 66 is also connected to the PID generation unit 68. Although not shown, the token transmission processing unit 66 includes an endpoint number generation unit and an address generation unit. The PID generation unit 68 is connected to the MUX 60. In the transmission processing block, each field value of the packet is generated. Each processing block of the data packet is connected to each register of the endpoint by a data path.

データパケット受信処理部70は、サイズ検査部104、CRC検査部106およびトグル値検査部106を含む。サイズ検査部104は、パケットのサイズエラーを検出する機能を有する。サイズ検査部104は、トランザクション制御部56だけでなく、エンドポイント毎のサイズレジスタ84、送受信のうちの受信カウンタおよび再送カウンタ86とのデータパスを有する。これにより、サイズ検査部104はサイズレジスタ84、受信カウンタおよび再送カウンタ86それぞれの値を取得する。サイズ検査部104は取得した値を基に再送カウンタ86に対する値を設定することができ、取得した値によりサイズを検査する。既存のUSBコントローラでもサイズ検査として、該当するエンドポイントの最大パケットサイズを超えているかどうかだけを検査するが、本実施例では、これに加えて、サイズレジスタ84で指定したパケットサイズと実際のパケットサイズとを比較し、検査する。ここで、比較検査が一致しない場合、無効パケットとしてトランザクション制御部56に通知する。これによりハンドシェークを無応答にできる。受信処理ブロックとして、データパケット受信処理部70、ハンドシェーク受信処理部72、トークン受信処理部74およびPID検査部76は各フィールドを検査する機能を有する。   The data packet reception processing unit 70 includes a size inspection unit 104, a CRC inspection unit 106, and a toggle value inspection unit 106. The size inspection unit 104 has a function of detecting a packet size error. The size checking unit 104 includes not only the transaction control unit 56 but also a data path to the size register 84 for each end point, the reception counter for retransmission and the retransmission counter 86. As a result, the size inspection unit 104 acquires values of the size register 84, the reception counter, and the retransmission counter 86. The size checking unit 104 can set a value for the retransmission counter 86 based on the acquired value, and checks the size based on the acquired value. Even in the existing USB controller, as the size check, only the maximum packet size of the corresponding endpoint is checked, but in this embodiment, in addition to this, the packet size specified by the size register 84 and the actual packet are also checked. Compare with size and inspect. If the comparison inspection does not match, the transaction control unit 56 is notified as an invalid packet. As a result, the handshake can be made unresponsive. As a reception processing block, the data packet reception processing unit 70, the handshake reception processing unit 72, the token reception processing unit 74, and the PID inspection unit 76 have a function of inspecting each field.

前述した再送カウンタ86は、サイズ検査部104でエラー判定された場合、カウントが加算され、正常判定をした場合にクリアする連続した再送回数を記憶する機能を有する。また、記憶した再送回数は、サイズ検査の判定後に行なうハンドシェークを選択する際にも使用される。   The above-described retransmission counter 86 has a function of storing the number of consecutive retransmissions that are incremented when an error determination is made by the size inspection unit 104 and cleared when a normal determination is made. The stored number of retransmissions is also used when selecting a handshake to be performed after determination of size inspection.

データパケット受信処理部70の動作について簡単に説明する。データパケット受信処理部70では、トグル値検査とCRC検査を行ない、これらの検査の完了後に受信したパケットが正常なパケットと判定した場合、サイズ検査部104でサイズ検査を実行する。サイズ検査では、受信したパケットに該当するエンドポイントのサイズレジスタ84からサイズ検査の有効/無効の指定を取得する。取得したサイズ検査結果が有効であればサイズ検査を実行し、無効であればサイズ検査は実行しない。   The operation of the data packet reception processing unit 70 will be briefly described. The data packet reception processing unit 70 performs toggle value inspection and CRC inspection, and when the received packet is determined to be a normal packet after completion of these inspections, the size inspection unit 104 executes size inspection. In the size inspection, the designation of validity / invalidity of the size inspection is acquired from the size register 84 of the endpoint corresponding to the received packet. If the acquired size inspection result is valid, the size inspection is executed, and if it is invalid, the size inspection is not executed.

サイズ検査を実施する場合、サイズ検査部104はサイズレジスタ84と送受信カウンタ80の受信カウンタとからそれぞれ受信サイズを取得する。サイズ検査部104は取得した受信サイズを比較する。この受信サイズの値が一致すれば、サイズ検査部104は正常と判定する。この判定結果を基にデータ受信パケット処理部70はトランザクション制御部56に正常パケットの受信をアサートする。これにともない該当するエンドポイントの再送カウンタ86をゼロに戻し、処理を終了する。   When performing the size inspection, the size inspection unit 104 acquires the reception size from the size register 84 and the reception counter of the transmission / reception counter 80, respectively. The size inspection unit 104 compares the acquired reception sizes. If the values of the reception sizes match, the size inspection unit 104 determines that it is normal. Based on the determination result, the data reception packet processing unit 70 asserts reception of a normal packet to the transaction control unit 56. Along with this, the retransmission counter 86 of the corresponding endpoint is returned to zero, and the process ends.

また、サイズ検査部104にてサイズの値が一致しなければ、サイズ検査を異常と判断する。そして、さらに再送カウンタ86を確認する。再送カウンタ86のカウント値が2以下であれば、データ受信パケット処理部70は、トランザクション制御56に異常パケットの受信をアサートする。また、再送カウンタ86のカウント値が3であれば、データ受信パケット処理部70は、反対に正常パケットの受信をアサートする。データ受信パケット処理部70はこのアサートとともに、MCUに外部割込み要求としてショートパケットの受信割込みをアサートする。そして、再送カウンタ86をゼロに戻し処理を終了する。   If the size inspection unit 104 does not match the size values, the size inspection is determined to be abnormal. Then, the retransmission counter 86 is further confirmed. If the count value of the retransmission counter 86 is 2 or less, the data reception packet processing unit 70 asserts reception of an abnormal packet to the transaction control 56. On the other hand, if the count value of the retransmission counter 86 is 3, the data reception packet processor 70 asserts reception of a normal packet. Along with this assertion, the data reception packet processing unit 70 asserts a short packet reception interrupt as an external interrupt request to the MCU. Then, the retransmission counter 86 is returned to zero and the processing is terminated.

本実施例のUSBコントローラ48におけるソフトウェアの動作を含む通信処理、とくにパケットの受信手順について図4および図5を参照しながら説明する。図4に受信エンドポイントのUSB制御ソフトウェアの手順を示す。第1にUSBコントローラ48を動作可能にするように初期化等を実施する(ステップS10)。この後、データ受信に割り当てられたエンドポイントに対して設定する(ステップS12)。この設定はエンドポイントが有するサイズレジスタ84に対してソフトウェアにより行なわれる。サイズレジスタ84は供給されるパケットを予期しているパケットサイズとショートパケットの受信を許すか否かを設定する。   A communication process including a software operation in the USB controller 48 of the present embodiment, particularly a packet reception procedure will be described with reference to FIGS. 4 and 5. FIG. FIG. 4 shows the procedure of the USB control software of the receiving endpoint. First, initialization or the like is performed so that the USB controller 48 can operate (step S10). Thereafter, the setting is made for the endpoint assigned to data reception (step S12). This setting is performed by software for the size register 84 of the end point. The size register 84 sets the packet size expected for the supplied packet and whether or not reception of a short packet is permitted.

次にアプリケーションからのトランスファ要求が有るか否かを判断する(ステップS14)。トランスファ要求が有る場合(YES)、トランスファの受付・解析処理に進む(ステップS16へ)。また、トランスファ要求がない場合(NO)、この手順を終了する。   Next, it is determined whether or not there is a transfer request from the application (step S14). If there is a transfer request (YES), the process proceeds to transfer acceptance / analysis processing (to step S16). If there is no transfer request (NO), this procedure is terminated.

トランスファの受付・解析処理(ステップS16)は、転送されるパケットを受け付けて、このパケットを解析する。この解析においてUSBコントローラ48は、受信したパケットのサイズを求める。この後、トランスファ受信処理に進む(サブルーチンSUB1)。トランスファ受信処理では、受信したパケットのサイズを評価し、正常の評価に応じて受信する。   The transfer acceptance / analysis process (step S16) accepts a transferred packet and analyzes the packet. In this analysis, the USB controller 48 obtains the size of the received packet. Thereafter, the process proceeds to transfer reception processing (subroutine SUB1). In the transfer reception process, the size of the received packet is evaluated and received according to normal evaluation.

次にトランスファ要求が無いか否かを判断する(ステップS18)。トランスファ要求が無い場合(YES)、受信するパケットが無いと判断してデータ受信を終了する。また、トランスファ要求が有る場合(NO)、トランスファの受付・解析処理に戻る(ステップS16へ)。   Next, it is determined whether or not there is a transfer request (step S18). If there is no transfer request (YES), it is determined that there is no packet to be received, and data reception is terminated. If there is a transfer request (NO), the process returns to the transfer acceptance / analysis process (to step S16).

次にトランスファ受信処理(サブルーチンSUB1)を簡単に説明する。受信したパケットのサイズが既知および予測可能のいずれかを判定する(サブステップSS10)。受信したパケットのサイズが既知および予測可能のいずれかの場合(YES)、パケットサイズの設定に進む(サブステップSS12へ)。また、パケットのサイズが不定および可変長のいずれかの場合(NO)、パケットの受信に進む(サブステップSS14へ)。   Next, the transfer reception process (subroutine SUB1) will be briefly described. It is determined whether the size of the received packet is known or predictable (substep SS10). If the size of the received packet is either known or predictable (YES), the process proceeds to the setting of the packet size (go to substep SS12). If the packet size is either indefinite or variable length (NO), the process proceeds to packet reception (go to sub-step SS14).

次に受信したパケットのサイズを設定する(サブステップSS12)。次に受信したパケットのサイズエラーを検出する(サブステップSS16)。サイズ検査部104にてサイズエラーは、データを受信した際にUSBコントローラ48が設定レジスタ、すなわちサイズレジスタ84の値とパケット解析の結果により得られた受信パケットサイズとを比較する。比較した値が異なる場合は、無効パケットと判断する。このときUSBコントローラ48はデータトグルを変化させずにパケットを破棄し、ハンドシェークは無応答とする。   Next, the size of the received packet is set (substep SS12). Next, a size error of the received packet is detected (substep SS16). When the size check unit 104 receives a size error, the USB controller 48 compares the value of the setting register, that is, the size register 84, with the received packet size obtained from the result of packet analysis when data is received. If the compared values are different, it is determined as an invalid packet. At this time, the USB controller 48 discards the packet without changing the data toggle, and the handshake does not respond.

ただし、サイズ検査部104は再送カウンタ86から再送回数を受け、この再送回数に応じて通信を制御する。サイズ検査部104は、たとえば受信側が3回連続の無応答をした場合、送信側は通信不能と判断するため、無応答は2回までに制御する。サイズ検査部104は、3回連続でパケットサイズが異なる場合、ACKハンドシェークを返し、有効パケットとして受信する(サブステップSS14)。この場合、サイズエラーパケットの受信を示す割り込みを発生する。   However, the size inspection unit 104 receives the number of retransmissions from the retransmission counter 86 and controls communication according to the number of retransmissions. For example, when the receiving side makes no response for three consecutive times, the size checking unit 104 determines that the transmitting side cannot communicate, and therefore controls no response up to two times. When the packet size is different three times consecutively, the size checking unit 104 returns an ACK handshake and receives it as a valid packet (substep SS14). In this case, an interrupt indicating reception of a size error packet is generated.

また、サイズ検査部104は、サイズ比較の結果が同値であれば、状況に応じたハンドシェークを返し、パケット受信を示す割り込みを発生する。   If the size comparison results are the same value, the size checking unit 104 returns a handshake according to the situation and generates an interrupt indicating packet reception.

次に割込みが有るか否かを判断する(サブステップSS18)。割込みが無い場合サブステップSS18に戻って、待機する。また、割込みが有る場合(YES)、正常受信か否かを判断する(サブステップSS20)。正常受信の場合(YES)、トランスファ完了の判断に進む(サブステップSS22へ)。異常受信の場合(NO)、サイズエラーと判断して、リターンに進む。そして、このときエラーパケット受信割り込みが発生した場合のソワトウェア制御としては、上位層にトランスファエラーを通知する。   Next, it is determined whether or not there is an interrupt (substep SS18). If there is no interrupt, return to substep SS18 and wait. If there is an interrupt (YES), it is determined whether or not the reception is normal (substep SS20). In the case of normal reception (YES), the process proceeds to transfer completion determination (go to sub-step SS22). In the case of abnormal reception (NO), it is determined as a size error and the process proceeds to return. Then, as software control when an error packet reception interrupt occurs at this time, a transfer error is notified to the upper layer.

次にトランスファ完了か否かを判断する(サブステップSS22)。トランスファ未完了の場合(NO)、受信するパケットがまだ存在すると判断して、パケットサイズの既知および予測可能か否かの判断処理に戻る(サブステップSS10へ)。また、トランスファ完了の場合(YES)、トランスファ受信完了と判断して、リターンに進む。   Next, it is determined whether or not the transfer is completed (substep SS22). If the transfer is not completed (NO), it is determined that there are still packets to be received, and the process returns to the determination process of whether the packet size is known and predictable (go to sub-step SS10). When the transfer is completed (YES), it is determined that the transfer reception is completed, and the process proceeds to return.

USBコントローラ48は、このように上位アプリケーション、クラスドライバ次第で、転送するパケットサイズを知ることができる場合、簡単なハードウェアを追加し、ソフトウェア制御することによりエラーパケットだけの再送を実現することができる。また、この場合、とくに、ソフトウェアによりUSBにおける最小の再送単位であるパケット単位の再送を行なうため、パケット単位の再送方法として、ハードウェアでエラー判定とレスポンスの選択を行なうことが好ましい。   If the USB controller 48 can know the packet size to be transferred depending on the host application and class driver in this way, it can realize retransmission of only error packets by adding simple hardware and controlling the software. it can. In this case, in particular, since retransmission is performed in units of packets, which is the minimum retransmission unit in USB, by software, it is preferable to perform error determination and response selection by hardware as a retransmission method in units of packets.

これに対して、ソフトウェアによる応答を変更することで早期に再送を実行させる方法も考えられるが、この場合、再送単位が大きくなってしまう。一般的に階層構造のプロトコルでは、階層が上位になるほど扱うデータの単位が大きくなるからである。   On the other hand, a method of executing retransmission at an early stage by changing a response by software is also conceivable, but in this case, a retransmission unit becomes large. This is because, in general, in a hierarchical protocol, the higher the hierarchy, the larger the data unit handled.

具体的に前述した構成および動作を要約すると、USBコントローラ48は、エンドポイント毎にサイズ条件の設定とサイズによるエラー判定とこれに応じたトランザクションのハンドシェーク選択ができるように改良され、ショートパケットに対するレスポンスがパケット受信前に設定できる機能を有する。USBコントローラ48は、このサイズ条件とサイズエラーの判定とともに、ハンドシェーク選択の有効/無効を、レジスタインタフェースを介してオプショナルな機能としてソフトウェアにより設定する。さらに、USBコントローラ48はこの設定を動的に変更可能とし、この機能の動的に制御することを可能にする。   To summarize the configuration and operation specifically described above, the USB controller 48 has been improved so that it can set the size condition for each endpoint, determine the error according to the size, and select the handshake of the transaction according to this, and respond to short packets Has a function that can be set before receiving a packet. The USB controller 48 sets validity / invalidity of handshake selection as an optional function via the register interface, together with determination of the size condition and the size error, by software. In addition, the USB controller 48 allows this setting to be changed dynamically and allows this function to be controlled dynamically.

このソフトウェアでは、上位レイヤプロトコルにより決まるトランスファのサイズ条件に応じてサイズエラー再送機能の有効/無効の切替えとサイズ条件を設定しなおすように制御することが好ましい。サイズ条件はパケット毎に設定するとよい。   In this software, it is preferable to perform control so that the size error retransmission function is enabled / disabled and the size condition is reset according to the transfer size condition determined by the upper layer protocol. The size condition should be set for each packet.

バルク転送の場合、一つのトランスファで最終パケット以外は、ペイロードサイズで転送され、最終パケットだけトランスファの残りのバイト数となるため、トランスファの最終パケットとそれ以外でサイズ条件を設定するように制御することが望ましい。   In the case of bulk transfer, all but the last packet in one transfer is transferred with the payload size, and only the last packet is the number of remaining bytes in the transfer. Therefore, control is performed so that the size condition is set for the last packet of the transfer and others. It is desirable.

そして、連続再送の最大回数である3回目の再送に関して、USBコントローラ48は、下位プロトコルではエラーしていないと判断して、ハードウェアはACK応答して、正常受信し、MCUにショートパケットエラー割込みを発生させる。これによりトランスファサイズが期待したサイズより小さいショートパケット中止に対しても対応することができる。   Then, regarding the third retransmission, which is the maximum number of continuous retransmissions, the USB controller 48 determines that there is no error in the lower protocol, the hardware responds with an ACK, receives normally, and interrupts the short packet error to the MCU. Is generated. As a result, it is possible to cope with a short packet cancellation in which the transfer size is smaller than the expected size.

以上のように構成することにより通常、USBプロトコルで検出できないエラーを上位層プロトコルで決まっているサイズ条件を基に検出することでよりエラー検出率を高めることができる。再送単位が大きければ、当然、再送時間が長くなり、転送対象となるエンドポイントの転送パフォーマンスが低下するだけでなく、無駄なパケットの転送によりUSBのバンド幅を消費してしまい、USBバス全体のバンド幅を低下させてしまう。本発明を適用した本実施例によれば、再送単位を小さくし、さらにハードウェアにより応答速度も通常のエラーパケットと同様にして、パフォーマンスヘの影響をなくすことができる。   With the above configuration, it is possible to increase the error detection rate by detecting an error that cannot be detected by the USB protocol based on the size condition determined by the upper layer protocol. Naturally, if the retransmission unit is large, the retransmission time will be longer and not only the transfer performance of the endpoint to be transferred will be degraded, but also the USB bandwidth will be consumed due to the transfer of useless packets, and the entire USB bus will be consumed. Reduces bandwidth. According to the present embodiment to which the present invention is applied, the resend unit can be reduced, and the response speed can be reduced by hardware in the same manner as a normal error packet, thereby eliminating the influence on the performance.

本発明に係る通信制御装置を適用したUSB通信装置内のUSBコントローラの概略的な構成を示すブロック図である。It is a block diagram which shows schematic structure of the USB controller in the USB communication apparatus to which the communication control apparatus which concerns on this invention is applied. 図1のUSB通信装置における概略的な階層構造を示すブロック図である。It is a block diagram which shows the schematic hierarchical structure in the USB communication apparatus of FIG. 図1のUSB通信装置としてのUSB HDDにおける概略的な構成を示すブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of a USB HDD as the USB communication device in FIG. 1. 図1のUSBコントローラにおけるデータ受信の手順を説明するフローチャートである。2 is a flowchart for explaining a data reception procedure in the USB controller of FIG. 1. 図4のトランスファ受信処理の手順を説明するフローチャートである。5 is a flowchart for explaining a procedure of a transfer reception process in FIG. 4.

符号の説明Explanation of symbols

10 USB通信装置
48 USBコントローラ
52、54 エンドポイントA, B
84 サイズレジスタ
86 再送カウンタ
104 サイズ検査部
10 USB communication device
48 USB controller
52, 54 Endpoint A, B
84 Size register
86 Retransmission counter
104 Size inspection section

Claims (10)

送信側から供給されるパケットを受信し、受信したパケットを解析し、解析により得られる情報を基に該受信したパケットの受信状態に応じて送信側に対して該受信したパケットの通信を制御する通信制御装置において、該装置は、
前記受信したパケットの解析により得られた第1のパケットサイズを格納する情報格納手段と、
前記送信側から供給されるパケットの再送される回数をカウントするカウント手段と、
第1のパケットサイズおよび前記回数が入力され、前記受信したパケットに対してあらかじめ設定された第2のパケットサイズと第1のパケットサイズとを比較し、少なくとも、比較結果および前記回数のいずれか一方をサイズ条件とし、該サイズ条件に対する前記受信したパケットを検査し、検査結果に応じて前記送信側へのハンドシェークを無応答にするか否かを判定し、制御するサイズ検査手段とを含むことを特徴とする通信制御装置。
Receives a packet supplied from the transmission side, analyzes the received packet, and controls the communication of the received packet to the transmission side according to the reception state of the received packet based on information obtained by the analysis In the communication control device, the device
Information storage means for storing a first packet size obtained by analyzing the received packet;
Counting means for counting the number of times the packet supplied from the transmission side is retransmitted;
The first packet size and the number of times are input, the second packet size set in advance for the received packet is compared with the first packet size, and at least one of the comparison result and the number of times Size check means for inspecting the received packet for the size condition, determining whether or not to make no response to the handshake to the transmitting side according to the inspection result, A communication control device.
請求項1に記載の装置において、第2のパケットサイズは、既知のサイズおよび予測可能なサイズであることを特徴とする通信制御装置。   The communication control apparatus according to claim 1, wherein the second packet size is a known size and a predictable size. 請求項1または2に記載の装置において、前記サイズ検査手段は、前記回数が前記パケットの再送を認める限界にて供給されるパケットに対する応答を返し、該パケットの受信を前記送信側に対し正常として制御し、該装置が有する上位階層の構成要素に対して前記受信したパケットのエラーを割り込みでアサートし、該受信したパケットを保持することを特徴とする通信制御装置。   3. The apparatus according to claim 1, wherein the size inspection unit returns a response to the packet supplied at a limit that allows the retransmission of the packet, and sets the reception of the packet as normal to the transmission side. A communication control device that controls, asserts an error of the received packet to an upper layer component of the device by an interrupt, and holds the received packet. 請求項3に記載の装置において、該装置は、前記情報格納手段および前記カウント手段がエンドポイント毎に管理する回路に配設されることを特徴とする通信制御装置。   4. The communication control device according to claim 3, wherein the information storage unit and the counting unit are arranged in a circuit managed for each end point. 請求項3または4に記載の装置において、該装置は、USB(Universal Serial Bus)規格に応じて通信を制御することを特徴とする通信制御装置。   5. The communication control apparatus according to claim 3, wherein the apparatus controls communication in accordance with a USB (Universal Serial Bus) standard. 送信側から供給されるパケットを受信し、受信したパケットを解析し、解析により得られる情報を基に該受信したパケットの受信状態に応じて送信側に対して該受信したパケットの通信を制御する通信制御方法において、該方法は、
前記解析により前記受信したパケットのサイズを第1のパケットサイズとして求める第1の工程と、
前記送信側から供給されるパケットの再送される回数をカウントする第2の工程と、
あらかじめ第2のパケットサイズを設定しておき、第1のパケットサイズと第2のパケットサイズとの比較結果および前記回数をサイズ条件とし、該サイズ条件に対する前記受信したパケットを検査する第3の工程と、
前記受信したパケットの検査結果に応じて前記送信側へのハンドシェークを無応答にするか否かを判定し、制御する第4の工程とを含み、
第4の工程は、前記回数の判定が前記パケットの再送を認める限界より小さい回数の場合、前記送信側へのハンドシェークを無応答に制御し、前記回数が限界に一致した場合、前記送信側に対し正常として制御し、該通信制御方法にて規定される上位階層の構成要素に対して前記受信したパケットのエラーを割り込みでアサートし、該受信したパケットを保持することを特徴とする通信制御方法。
Receives a packet supplied from the transmission side, analyzes the received packet, and controls the communication of the received packet to the transmission side according to the reception state of the received packet based on information obtained by the analysis In the communication control method, the method includes:
A first step of determining the size of the received packet as a first packet size by the analysis;
A second step of counting the number of times the packet supplied from the transmission side is retransmitted;
A third step in which a second packet size is set in advance, the comparison result between the first packet size and the second packet size and the number of times are set as size conditions, and the received packet is inspected with respect to the size conditions When,
Determining whether or not to make no response to the handshake to the transmission side according to the inspection result of the received packet, and a fourth step of controlling,
In the fourth step, when the number of times is smaller than the limit for allowing retransmission of the packet, the handshake to the transmission side is controlled to be no response, and when the number of times matches the limit, the transmission side A communication control method, comprising: controlling as normal, asserting an error of the received packet with an interrupt to an upper layer component defined by the communication control method, and holding the received packet .
請求項6に記載の方法において、第3の工程は、前記サイズ条件としてあらかじめ設定したサイズ検査の有効および無効のいずれかに応じて動作することを特徴とする通信制御方法。   7. The communication control method according to claim 6, wherein the third step operates according to whether the size inspection preset as the size condition is valid or invalid. 請求項6または7記載の方法において、該方法は、バルク転送の場合、一つのトランスファにおいて最終パケット以外のパケットをペイロードサイズで転送し、最終パケットだけトランスファの残りのバイト数とし、トランスファの最終パケットとそれ以外のパケットに対してサイズ条件を設定し、制御することを特徴とする通信制御方法。   The method according to claim 6 or 7, wherein, in the case of bulk transfer, the method transfers a packet other than the last packet in one transfer with a payload size, and sets the remaining packet number of the transfer only for the last packet. And a communication control method characterized by setting and controlling size conditions for other packets. 請求項8に記載の方法において、該方法は、前記サイズ条件および再送の有効または無効の切替えをパケット毎に設定し、制御することを特徴とする通信制御方法。   The communication control method according to claim 8, wherein the method sets and controls the switching of the size condition and retransmission valid / invalid for each packet. 請求項8または9に記載の方法において、該方法は、USB(Universal Serial Bus)規格に応じて通信を制御することを特徴とする通信制御方法。   10. The communication control method according to claim 8, wherein the method controls communication according to a USB (Universal Serial Bus) standard.
JP2005283254A 2005-09-29 2005-09-29 COMMUNICATION CONTROL DEVICE AND ITS CONTROL METHOD Expired - Fee Related JP4649304B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005283254A JP4649304B2 (en) 2005-09-29 2005-09-29 COMMUNICATION CONTROL DEVICE AND ITS CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005283254A JP4649304B2 (en) 2005-09-29 2005-09-29 COMMUNICATION CONTROL DEVICE AND ITS CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2007096737A true JP2007096737A (en) 2007-04-12
JP4649304B2 JP4649304B2 (en) 2011-03-09

Family

ID=37981904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005283254A Expired - Fee Related JP4649304B2 (en) 2005-09-29 2005-09-29 COMMUNICATION CONTROL DEVICE AND ITS CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4649304B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021171687A1 (en) * 2020-02-26 2021-09-02 パナソニックIpマネジメント株式会社 Video signal processing device, video signal processing method, program, and signal processing circuit

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60246140A (en) * 1984-05-21 1985-12-05 Meidensha Electric Mfg Co Ltd Error check device in data transmission system
JPH06177941A (en) * 1992-12-09 1994-06-24 Nec Ic Microcomput Syst Ltd Home bus controller
JPH10261268A (en) * 1997-03-19 1998-09-29 Hitachi Ltd Digital signal processing method, recording method using it and device therefor
JP2003179626A (en) * 2001-12-10 2003-06-27 Fujitsu Ltd Relay connection management program and relay connection management method
JP2003241870A (en) * 2002-02-20 2003-08-29 Brother Ind Ltd Usb device
JP2005018496A (en) * 2003-06-27 2005-01-20 Kyocera Mita Corp Information processor, usb-connected apparatus, information processor control program, usb-connected apparatus control program, and recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60246140A (en) * 1984-05-21 1985-12-05 Meidensha Electric Mfg Co Ltd Error check device in data transmission system
JPH06177941A (en) * 1992-12-09 1994-06-24 Nec Ic Microcomput Syst Ltd Home bus controller
JPH10261268A (en) * 1997-03-19 1998-09-29 Hitachi Ltd Digital signal processing method, recording method using it and device therefor
JP2003179626A (en) * 2001-12-10 2003-06-27 Fujitsu Ltd Relay connection management program and relay connection management method
JP2003241870A (en) * 2002-02-20 2003-08-29 Brother Ind Ltd Usb device
JP2005018496A (en) * 2003-06-27 2005-01-20 Kyocera Mita Corp Information processor, usb-connected apparatus, information processor control program, usb-connected apparatus control program, and recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021171687A1 (en) * 2020-02-26 2021-09-02 パナソニックIpマネジメント株式会社 Video signal processing device, video signal processing method, program, and signal processing circuit
EP4114020A4 (en) * 2020-02-26 2023-05-03 Panasonic Intellectual Property Management Co., Ltd. Video signal processing device, video signal processing method, program, and signal processing circuit
US12015822B2 (en) 2020-02-26 2024-06-18 Panasonic Intellectual Property Management Co., Ltd. Video signal processing device, video signal processing method, recording medium, and signal processing circuit

Also Published As

Publication number Publication date
JP4649304B2 (en) 2011-03-09

Similar Documents

Publication Publication Date Title
EP3893415B1 (en) Characterizing error correlation based on error logging for computer buses
US20080163005A1 (en) Error injection in pci-express devices
US20050002384A1 (en) Method of transmitting data through an I2C router
US20070002827A1 (en) Automated serial protocol target port transport layer retry mechanism
EP1224548B1 (en) System and method improving fault isolation and diagnosis in computers
CN104699576B (en) Serial communication testing device, system comprising same and method thereof
US8281189B2 (en) SATA primitive prediction and correction
US7430619B2 (en) Communication device, host apparatus, and communication method
JP3996928B2 (en) How to handle corrupted data
CN111625388B (en) SSD front end error processing method, SSD front end error processing device, computer equipment and storage medium
US7701846B2 (en) Bad data packet capture device
US8874989B2 (en) Memory system capable of increasing data transfer efficiency
US7436777B2 (en) Failed link training
US20040095929A1 (en) Data processor, packet recognition method, and error correction method
US8327212B2 (en) Error identifying method, data processing device, and semiconductor device
JP4649304B2 (en) COMMUNICATION CONTROL DEVICE AND ITS CONTROL METHOD
US7363402B2 (en) Data communications architecture employing parallel SERDES channels
US7606253B2 (en) Successful transactions
JP4455393B2 (en) Programmable logic controller
KR100604842B1 (en) Method for optimizing UDMA transfer signals using CRC errors
US7310762B2 (en) Detection of errors
US20050154968A1 (en) Detection of errors
JPH0535616A (en) Data transfer system
US7454514B2 (en) Processing data with uncertain arrival time
US20240214111A1 (en) Network interface device with frame sequence value checking

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080305

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20081203

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100629

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100827

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: 20101116

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101213

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131217

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4649304

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees