JP2005107683A - Communication controller, communications system, communication apparatus, and communication method - Google Patents

Communication controller, communications system, communication apparatus, and communication method Download PDF

Info

Publication number
JP2005107683A
JP2005107683A JP2003337867A JP2003337867A JP2005107683A JP 2005107683 A JP2005107683 A JP 2005107683A JP 2003337867 A JP2003337867 A JP 2003337867A JP 2003337867 A JP2003337867 A JP 2003337867A JP 2005107683 A JP2005107683 A JP 2005107683A
Authority
JP
Japan
Prior art keywords
packet
data packet
host
function
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003337867A
Other languages
Japanese (ja)
Inventor
Fumihiro Fukae
文博 深江
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2003337867A priority Critical patent/JP2005107683A/en
Priority to TW093129262A priority patent/TWI296083B/en
Priority to CNB2004100120211A priority patent/CN100366029C/en
Priority to US10/950,563 priority patent/US7461318B2/en
Publication of JP2005107683A publication Critical patent/JP2005107683A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize a send and receive system capable of carrying out data transfer by IN transaction of a USB2.0 without problems, even when a channel with a transfer rate that is slower, in comparison with a native speed of the USB2.0 is used between a host and a function. <P>SOLUTION: In a host-side controller 100, when reception of an OUT packet and a DATA packet from a USB host is confirmed, the packets are transferred to a function-side controller 110, and an ACK packet is received from the function side. The received ACK packet is temporarily stored in a FIFO 108, and when an OUT packet and a DATA packet are received again from the USB host, the DATA packet stored in the FIFO 108 is sent to the USB host. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、USB規格におけるUSB信号の伝送を行う通信コントローラに関するものである。   The present invention relates to a communication controller that transmits USB signals in the USB standard.

ユニバーサルシリアルバス(Universal Serial Bus:以下USB)は、パーソナルコンピュータ等において、周辺装置の拡張性の自由度を高めるために開発されたインタフェース仕様であり、様々なUSB対応デバイスとの通信に共通に使用できるシリアルインタフェース規格である。   Universal Serial Bus (hereinafter referred to as USB) is an interface specification developed to increase the degree of freedom of expandability of peripheral devices in personal computers, etc., and is commonly used for communication with various USB compatible devices. It is a serial interface standard that can be used.

このUSBは、原理上、1つのシステムの中で、1台のホストと最大127台までのデバイスを同一バス上に接続できる。これらの接続は、物理的にはツリー型のネットワーク構造のバスであり、論理的にはUSBホストのクライアントソフトウェアとUSBファンクションのクライアントソフトウェアとが1対1で通信する。このような接続形態を維持するために、最下層のプロトコルは時分割で通信し、ホストがスケジューリングを行う。USB1.xでは、ロースピードモード(以下LS)において1.5Mbps、また、フルスピードモード(以下FS)において12Mbpsと2つのデータ転送速度が規定されている。   In principle, this USB can connect one host and up to 127 devices on the same bus in one system. These connections are physically a bus having a tree-type network structure, and logically, client software of the USB host and client software of the USB function communicate on a one-to-one basis. In order to maintain such a connection form, the lowest layer protocol communicates in a time division manner, and the host performs scheduling. In USB 1.x, two data transfer rates of 1.5 Mbps in the low speed mode (hereinafter LS) and 12 Mbps in the full speed mode (hereinafter FS) are defined.

近年、ハードディスク、DVDなどの高速データ転送が必要なアプリケーションにUSBが採用されるようになり、前記転送速度では不十分となってきていた。そこで、USB2.0という新しい規格が策定され、USB2.0規格では、ハイスピードモード(以下HS)において、480Mbpsと非常に高速なデータ転送速度が追加された。   In recent years, USB has been adopted for applications that require high-speed data transfer such as hard disks and DVDs, and the transfer speed has been insufficient. Therefore, a new standard called USB 2.0 was established, and in the USB 2.0 standard, a very high data transfer speed of 480 Mbps was added in the high speed mode (hereinafter referred to as HS).

USB上のデータ通信は、トランザクションと呼ばれる単位で行われる。このトランザクションは、トークンパケット、データパケット、そしてハンドシェイクパケットと呼ばれるパケットで構成されている。ホストがトランザクション開始時に発行するトークンパケットで必ず始まり、トークンパケットに含まれるアドレス及びエンドポイントにより、対応するファンクションが応答する。   Data communication on the USB is performed in units called transactions. This transaction consists of a packet called a token packet, a data packet, and a handshake packet. It always starts with a token packet issued by the host at the start of the transaction, and the corresponding function responds with the address and endpoint contained in the token packet.

エンドポイントとは、転送データを格納するためのFIFOバッファのことであり、USBホストとUSBファンクションとのデータのやりとりは、かならずエンドポイントを介して実行される。USBファンクションは、最大16個のエンドポイントを持つことができ、複数のエンドポイントを認識するために、エンドポイントには番号がつけられる。USBホストはデータ転送の際にUSBファンクションのUSBアドレスとエンドポイントとによりアクセスを行う。エンドポイントの中で0番のものは、エンドポイント0と呼ばれ、USBファンクションに必ず1つ存在しなければならない。このエンドポイント0は、コントロール転送時にSETUPパケットによって行われる初期化時に用いられる。   The end point is a FIFO buffer for storing transfer data, and data exchange between the USB host and the USB function is always executed via the end point. A USB function can have up to 16 endpoints, and the endpoints are numbered to recognize multiple endpoints. The USB host performs access using the USB address and end point of the USB function during data transfer. The end point number 0 is called the end point 0 and must always exist in the USB function. This endpoint 0 is used at the time of initialization performed by the SETUP packet at the time of control transfer.

USBパケットの種別としては、図17に示すように、トークンパケット、データパケット、ハンドシェイクパケット、及び特殊(スペシャル)パケットがある。トークンパケットには、INパケット、OUTパケット、SETUPパケット、SOFパケットがある。それぞれのパケットは、図17に示す目的で用いられる。データパケットには、DATA0パケット、DATA1パケットなどがある。ハンドシェイクパケットには、ACKパケット、NAKパケット、STALLパケット、NYETパケットがある。また、特殊パケットとして、PINGパケットなどがある。   As types of USB packets, there are a token packet, a data packet, a handshake packet, and a special packet as shown in FIG. Token packets include IN packets, OUT packets, SETUP packets, and SOF packets. Each packet is used for the purpose shown in FIG. Data packets include a DATA0 packet and a DATA1 packet. Handshake packets include ACK packets, NAK packets, STALL packets, and NYET packets. Further, as a special packet, there is a PING packet or the like.

USBのパケットフォーマットを図18に示す。PIDはパケットの識別子であり8ビットで構成される。また、トークンパケットにはCRC5、データパケットにはCRC16がそれぞれ付加されており、パケットを受信した際に前記CRCをチェックすることで、パケットの中身が正しいかどうかを判別することが可能となる。   The USB packet format is shown in FIG. PID is an identifier of a packet and is composed of 8 bits. Further, CRC5 is added to the token packet and CRC16 is added to the data packet, respectively, and it is possible to determine whether or not the contents of the packet are correct by checking the CRC when the packet is received.

SOFパケットは、ホストが発行するフレームの始まりを示すパケットである。SOFパケットは、LS、FSモードでは1ms周期で、またHSモードでは、125us周期でホストから発行される。   The SOF packet is a packet indicating the start of a frame issued by the host. The SOF packet is issued from the host at a 1 ms cycle in the LS and FS modes and at a 125 us cycle in the HS mode.

〔OUTトランザクション〕
USB2.0規格におけるUSBホストがUSBファンクションにデータを書き込む方法として、OUTトランザクションがある。以下に図19を用いて、OUTトランザクションを説明する。
[OUT transaction]
There is an OUT transaction as a method for a USB host in the USB 2.0 standard to write data to a USB function. The OUT transaction will be described below with reference to FIG.

まず、タイミングt1901において、USBホストはUSBファンクションにOUTパケットを送信し、OUTトランザクションの開始を通知した後、t1902において、DATAパケットを送信する。USBファンクションは、USBホストから受信したOUTパケット及びDATAパケットのCRCチェックを行い、受信パケットに誤りがないかどうかを判別する。上記受信パケットに誤りが無い場合、USBファンクションは、受信DATAのパケットを処理できる状態であればACKパケットを、受信DATAのパケットを処理できる状態でなければNAKパケットをUSBホストに返す。また、受信パケットに誤りがある場合は、何も返さない。図19においては、受信パケットに誤りは無いが、USBファンクションが受信DATAのパケットを処理できない状態であるとして、t1903においてNAKパケットを返している。   First, at timing t1901, the USB host transmits an OUT packet to the USB function, notifies the start of the OUT transaction, and then transmits a DATA packet at t1902. The USB function performs a CRC check on the OUT packet and the DATA packet received from the USB host, and determines whether or not there is an error in the received packet. If there is no error in the received packet, the USB function returns an ACK packet to the USB host if the received DATA packet can be processed, and a NAK packet if the received DATA packet cannot be processed. If there is an error in the received packet, nothing is returned. In FIG. 19, it is assumed that there is no error in the received packet, but the USB function cannot process the received DATA packet, and the NAK packet is returned at t1903.

このNAKパケットを受信したUSBホストは、USBファンクションが受信パケットを処理できる状態でないことを認識し、USBファンクションの状態を把握するために、t1904においてPINGパケットを送信する。前記PINGパケットを受信したUSBファンクションは、データを処理できる状態であるならばACKパケットを、またデータを処理できる状態でなければNAKパケットをUSBホストに送信する。図19においては、タイミングt1905においてデータの処理ができる状態であるとし、ACKパケットを送信している。   The USB host that has received the NAK packet recognizes that the USB function is not ready to process the received packet, and transmits a PING packet at t1904 in order to grasp the state of the USB function. The USB function that has received the PING packet transmits an ACK packet to the USB host if the data can be processed and an NACK packet if the data cannot be processed. In FIG. 19, it is assumed that the data can be processed at timing t1905, and an ACK packet is transmitted.

USBホストは、前記PINGパケットに対してACKパケットが返ってきたことから、USBファンクションがデータを処理できる状態であることを認識する。USBホストが、仮にNAKパケットを受信した場合は、USBファンクションがデータを処理できない状態であると認識し、再びPINGパケットを送信してUSBファンクションがデータを処理できる状態になるまで繰り返す。図19においては、PINGパケットに対してACKパケットを受信し、USBファンクションがデータを処理できる状態であると認識できたため、USBホストは、t1906において再びOUTパケットを、またt1907において再びDATAパケットを送信する。これを受信したUSBファンクションは、今度はデータを処理できる状態であるため、受信パケットのCRCチェック後、誤りがなければACKパケットを送信する。USBホストは前記ACKパケットを受信することで、OUTパケット及びDATAパケットがUSBファンクションに誤り無く転送され、また処理されたことを認識し、OUTトランザクションを終了する。   The USB host recognizes that the USB function can process data because an ACK packet is returned in response to the PING packet. If the USB host receives a NAK packet, it recognizes that the USB function is incapable of processing data, and repeats until it transmits a PING packet again and the USB function is in a state of being able to process data. In FIG. 19, since the ACK packet is received in response to the PING packet and the USB function can recognize that the data can be processed, the USB host transmits the OUT packet again at t1906 and the DATA packet again at t1907. To do. Since the USB function that has received this is ready to process data, it transmits an ACK packet if there is no error after CRC check of the received packet. By receiving the ACK packet, the USB host recognizes that the OUT packet and the DATA packet have been transferred to the USB function without error and processed, and ends the OUT transaction.

前期の方法によりOUTトランザクションが行われ、USBホストはUSBファンクションにデータを書き込むことが可能となる。   The OUT transaction is performed by the method of the previous period, and the USB host can write data to the USB function.

〔USBの時間的制約〕
USB2.0規格では、データ信号の伝播時間に制約が存在する。
[USB time constraints]
In the USB 2.0 standard, there is a restriction on the propagation time of the data signal.

LS及びFSモードでは、USBホストからUSBファンクションまでのターンアラウンドタイムは16ビットタイム(1333ns)以下でなければならない。つまり、USBホストがUSBファンクションに向けて送信したパケットに対するUSBファンクションからの返答パケットが、前記1333ns以内にUSBホストに届かない場合、USBホストはUSBファンクションに送信したパケットは正常にUSBファンクションに届かなかったとみなし、前記パケットを再送する。   In the LS and FS modes, the turnaround time from the USB host to the USB function must be 16 bits time (1333 ns) or less. In other words, if the response packet from the USB function to the packet sent from the USB host to the USB function does not reach the USB host within 1333 ns, the USB host does not normally send the packet sent to the USB function to the USB function. The packet is retransmitted.

また、HSモードでは、USBホストからUSBファンクションまでのターンアラウンドタイムは721ビットタイム(1502ns)以下でなければならない。USBホストがUSBファンクションに向けて送信したパケットに対するUSBファンクションからの返答パケットが、前記1502ns以内にUSBホストに届かない場合、USBホストはUSBファンクションに送信したパケットは正常にUSBファンクションに届かなかったとみなし、前記パケットを再送する。   In the HS mode, the turnaround time from the USB host to the USB function must be 721 bit times (1502 ns) or less. If the response packet from the USB function to the packet sent by the USB host to the USB function does not reach the USB host within the 1502 ns, the USB host considers that the packet sent to the USB function has not normally reached the USB function. , Resend the packet.

前記OUTトランザクションにおいて、USBホストがDATAパケット送信後に待つ予め定められた時間は、USBの時間制約として定められているLS、FSモードにおける1333nsおよびHSモードにおける1502nsである。各転送モードにおいて、前記の制約時間以内に前記ACKパケット(もしくは他のハンドシェイクパケット)を受信できなければ、OUTトランザクションは正常に終了しない。
特開2000−284872号公報(公開日平成12年10月13日)
In the OUT transaction, the predetermined time that the USB host waits after transmitting the DATA packet is 1333 ns in the LS and FS modes and 1502 ns in the HS mode defined as USB time constraints. In each transfer mode, if the ACK packet (or other handshake packet) cannot be received within the limited time, the OUT transaction does not end normally.
JP 2000-284872 A (publication date October 13, 2000)

近年、デジタルカメラ、PDA(Personal Digital Assistants)などにUSBが搭載されるようになってきている。これらのモバイル機器におけるデータ伝送手段では、クレイドル方式が多く用いられており、クレイドルについたUSBコネクタと前記モバイル機器のUSBコネクタとを接続することでUSB伝送を可能としている。これらのコネクタは物理的な接点を持つため、コネクタの抜き差しによりコネクタの劣化が進み、品質の高いデータ転送が困難になる可能性がある。   In recent years, USB has been installed in digital cameras, PDAs (Personal Digital Assistants), and the like. The data transmission means in these mobile devices often use a cradle method, and USB transmission is possible by connecting the USB connector attached to the cradle and the USB connector of the mobile device. Since these connectors have physical contacts, there is a possibility that the deterioration of the connectors will progress due to the insertion / removal of the connectors, and high-quality data transfer will be difficult.

前記の物理的な接点をなくす方法として、光を用いた空間伝送を行う方法があるが、USB2.0の480Mbpsをそのまま空間伝送するためには、光学系及び受信部でのCDR(Clock Data Recovery)などに高い性能が必要となり、コスト増へとつながる。前記光学系及び受信部でのCDRのコストを抑えるためには、より低速な転送速度でUSB2.0のデータ転送を行うことが考えられるが、その場合は以下のような問題がある。   As a method of eliminating the physical contact, there is a method of performing spatial transmission using light. In order to perform spatial transmission of 480 Mbps of USB 2.0 as it is, CDR (Clock Data Recovery) in the optical system and the receiving unit is used. ), Etc., require high performance, leading to increased costs. In order to reduce the cost of CDR in the optical system and the receiving unit, it is conceivable to perform USB 2.0 data transfer at a lower transfer speed, but in this case, there are the following problems.

図20に光通信路の転送速度をたとえば100Mbpsと、USB2.0のネイティブ速度480Mbpsよりも遅い転送速度にした場合のOUTトランザクションの様子を示す。   FIG. 20 shows the state of an OUT transaction when the transfer speed of the optical communication path is, for example, 100 Mbps, and a transfer speed slower than the native speed 480 Mbps of USB 2.0.

USBホストにより、タイミングt2001に送信されたOUTパケット及びタイミングt2002に送信されたDATAパケットは、ホスト側コントローラにより光信号に変換され、ファンクション側コントローラに送信される。ファンクション側コントローラは受信した光信号から、USBパケットを抽出し、USBファンクションに送信する。ここで、ファンクション側コントローラがUSBファンクションに送信を開始するタイミングがt2003であるのは、USBファンクションに対する送信ではUSBネイティブの480Mbpsでの転送が行われるためである。   The OUT packet transmitted at timing t2001 by the USB host and the DATA packet transmitted at timing t2002 are converted into optical signals by the host-side controller and transmitted to the function-side controller. The function-side controller extracts the USB packet from the received optical signal and transmits it to the USB function. Here, the timing at which the function-side controller starts transmission to the USB function is t2003 because transmission at USB native 480 Mbps is performed for transmission to the USB function.

USBファンクションが前記OUTパケット及びDATAパケットを誤り無く受信し、かつ処理できた場合、タイミングt2004において、USBホストに向けてACKパケットを送信する。ファンクション側コントローラは、USBファンクションからのACKパケットを光信号に変換し、ホスト側コントローラに送信する。ホスト側コントローラは、ファンクション側コントローラと同様にACKパケットの受信完了を待ってから、t2005にUSBホストに向かってACKパケットを送信する。USBホストは、t2006に初めてUSBファンクションからのACKパケットを受信することが可能となる。   When the USB function has received and processed the OUT packet and the DATA packet without error, at time t2004, an ACK packet is transmitted to the USB host. The function-side controller converts the ACK packet from the USB function into an optical signal and transmits it to the host-side controller. The host-side controller waits for completion of reception of the ACK packet in the same manner as the function-side controller, and then transmits the ACK packet toward the USB host at t2005. The USB host can receive the ACK packet from the USB function for the first time at t2006.

ここで、ホスト−ファンクション間でのデータ転送速度がUSB2.0のネイティブ速度と比べて遅い場合(特に、DATAパケット長が長い場合)、t2001からt2006までの時間(ターンアラウンドタイム)が長くなるため、最大ターンアラウンドタイム(HSモードにおける1502ns)を超えてしまうこととなり、OUTトランザクションが正常に終了しないこととなる。   Here, when the data transfer speed between the host and the function is slower than the native speed of USB 2.0 (particularly when the DATA packet length is long), the time from t2001 to t2006 (turnaround time) becomes long. The maximum turnaround time (1502 ns in the HS mode) will be exceeded, and the OUT transaction will not end normally.

また、上記図20では、USBホストから送信されるOUTパケット及びDATAパケットに対して、USBファンクションからACKパケットが返信される場合を示している。しかしながら、OUTトランザクションでは、OUTパケット及びDATAパケットを受信した時点でのUSBファンクションの状態により、ACKパケット以外のハンドシェイクパケット(NAKパケット等)が返信されてくる場合もある。このように、USBファンクションがACKパケット以外のハンドシェイクパケットを返してくる場合においても、このハンドシェイクパケットのUSBホストでの受信が最大ターンアラウンドタイムを超えてしまう場合には、OUTトランザクションが正常に行えず、同様の問題が生じる。   FIG. 20 shows a case where an ACK packet is returned from the USB function in response to an OUT packet and a DATA packet transmitted from the USB host. However, in the OUT transaction, a handshake packet (such as a NAK packet) other than the ACK packet may be returned depending on the state of the USB function at the time when the OUT packet and the DATA packet are received. As described above, even when the USB function returns a handshake packet other than the ACK packet, if the reception of the handshake packet by the USB host exceeds the maximum turnaround time, the OUT transaction is normally performed. It cannot be done, and the same problem occurs.

本発明は、上記の問題点に鑑みてなされたものであり、その目的は、ホスト−ファンクション間でUSB2.0のネイティブ速度と比べて転送速度が低い通信路(例えば100Mbpsの光通信路)を用いた場合でも、USB2.0のOUTトランザクションによるデータ転送を問題なく行える送受信回路を実現することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a communication path (for example, an optical communication path of 100 Mbps) having a lower transfer speed than the native speed of USB 2.0 between the host and the function. It is to realize a transmission / reception circuit that can perform data transfer by a USB 2.0 OUT transaction without any problem even when it is used.

本発明に係る通信コントローラは、上記課題を解決するために、USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置から送信されるOUTパケットおよびDATAパケットをファンクション装置側に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置に転送するホスト側コントローラとして機能する通信コントローラであって、ホスト装置からのOUTパケットおよびDATAパケットの受信を確認する受信確認手段と、ファンクション装置側から送信されてくるハンドシェイクパケットを格納する格納手段と、上記受信認識手段によりホスト装置からのOUTパケットおよびDATAパケット受信が確認された時点で、上記格納手段にハンドシェイクパケットが格納されているか否かを確認する格納確認手段と、上記格納確認手段により上記ハンドシェイクパケットが格納されていないことが確認された時には、ホスト装置にNAKパケットを送信し、上記格納確認手段によりハンドシェイクパケットが格納されていることが確認された時には、ホスト装置に該ハンドシェイクパケットを送信する送信制御手段とを備えていることを特徴としている。   In order to solve the above-described problem, the communication controller according to the present invention transfers an OUT packet and a DATA packet transmitted from the host device to the function device when performing an OUT transaction as data communication on the USB, and the OUT controller A communication controller functioning as a host-side controller for transferring a handshake packet that is a reply to a packet and a DATA packet to a host device, a reception confirmation unit for confirming reception of an OUT packet and a DATA packet from the host device, and a function device Storage means for storing the handshake packet transmitted from the side, and when the reception recognition means confirms receipt of the OUT packet and DATA packet from the host device, the handshake packet is stored in the storage means. Storage confirmation means for confirming whether or not the data is stored, and when it is confirmed by the storage confirmation means that the handshake packet is not stored, a NAK packet is transmitted to the host device, and the storage confirmation means The transmission control means for transmitting the handshake packet to the host device when it is confirmed that the handshake packet is stored is provided.

また、上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、ホスト側コントローラからのOUTパケットおよびDATAパケットの受信およびホスト側コントローラへのハンドシェイクパケットの送信に係る転送速度がUSB規格に定められた転送速度よりも低く、OUTパケットおよびDATAパケットのファンクション装置への送信およびファンクション装置からのハンドシェイクパケットの受信に係る転送速度がUSB規格に定められた転送速度であり、さらに、ホスト側コントローラから受信したOUTパケットおよびDATAパケットを上記格納手段に格納する際の格納データ量を確認するデータ量確認手段を有し、上記送信制御手段は、上記データ量確認手段によって確認された受信データ量が予め定められた値よりも多くなった時点で、ファンクション装置へのOUTパケットおよびDATAパケットの送信を開始することを特徴としている。   The communication controller also transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as a side controller, and the transfer rate related to the reception of OUT packets and DATA packets from the host side controller and the transmission of handshake packets to the host side controller is lower than the transfer rate defined in the USB standard, The transfer rate related to the transmission of OUT packets and DATA packets to the function device and the reception of handshake packets from the function device is the transfer rate defined in the USB standard, and A data amount confirmation unit for confirming a storage data amount when the OUT packet and the DATA packet received from the controller are stored in the storage unit, wherein the transmission control unit receives the received data amount confirmed by the data amount confirmation unit; Is characterized in that transmission of an OUT packet and a DATA packet to the function device is started when the value exceeds a predetermined value.

また、上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断される場合、該DATAパケットを破棄し、ファンクション装置に転送しないことを特徴としている。   The communication controller also transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as a side controller, and has error analysis means for analyzing whether or not the DATA packet received from the host side controller contains an error. The transmission control means is received by the error analysis means. If it is determined that the DATA packet is incorrect, the DATA packet is discarded and not transferred to the function device.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ファンクション側コントローラへのDATAパケットの送信をその時点で中止することを特徴としている。   The communication controller has error analysis means for analyzing whether or not the DATA packet received from the host device contains an error, and the transmission control means uses the error analysis means to make the received DATA packet erroneous. If it is determined that the data packet has been transmitted, the transmission of the DATA packet to the function-side controller is stopped at that time.

また、上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、上記受信確認手段は、ファンクション装置にDATAパケットを送信した後、該DATAパケットに対するACKパケットがファンクション装置から返ってきたか否かを確認し、上記送信制御手段は、ファンクション装置にDATAパケットを送信した後、所定時間内に上記受信確認手段によるACKパケットの受信が確認されなかった場合には、前回ファンクション装置に送信したものと同じOUTパケットおよびDATAパケットをファンクション装置に送信する再送処理を行うことを特徴としている。   The communication controller also transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. The reception confirmation means transmits a DATA packet to the function device, confirms whether an ACK packet for the DATA packet is returned from the function device, and the transmission control means If the reception of the ACK packet by the reception confirmation means is not confirmed within a predetermined time after transmitting the DATA packet to the function device, the same OUT packet as that transmitted to the function device last time and It is characterized by performing a retransmission process of transmitting the ATA packet to the function unit.

また、上記通信コントローラは、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴としている。   The communication controller has error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error, and the transmission control means performs the retransmission processing by the error analysis means. It is characterized in that it is performed only when it is confirmed that there is no error in the DATA packet held by the device.

また、上記通信コントローラは、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信することを特徴としている。   When the communication controller receives a PING packet from the host device, the transmission control means transmits an ACK packet to the host device.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、または、ファンクション側コントローラからそれ以前に送信したDATAパケットに対するACKパケットを受信していた場合は、ホスト装置に対してACKパケットを送信し、それ以外の場合は、ホスト装置に対してNAKパケットを送信することを特徴としている。   Further, the communication controller has error analysis means for analyzing whether or not the DATA packet received from the host apparatus includes an error. When the PING packet is received from the host apparatus, the transmission control means When it is determined by the analyzing means that the received DATA packet is incorrect, or when the ACK packet for the DATA packet transmitted before is received from the function side controller, the ACK packet is sent to the host device. In other cases, a NAK packet is transmitted to the host device.

また、上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段と、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ホスト側コントローラにDATAパケットの再送要求を行う再送要求手段とを有していることを特徴としている。   The communication controller also transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as a side controller, and it is determined by the error analysis means for analyzing whether or not the DATA packet received from the host side controller contains an error, and the received DATA packet is incorrect by the error analysis means. In this case, the host side controller has a retransmission request means for requesting retransmission of the DATA packet.

また、上記通信コントローラは、ファンクション側コントローラから再送要求を受信した場合には、前回ファンクション側コントローラに送信したDATAパケットと同じDATAパケットをホスト側コントローラに送信する再送処理を行うことを特徴としている。   The communication controller is characterized in that, when a retransmission request is received from the function-side controller, a retransmission process is performed in which the same DATA packet as the DATA packet transmitted to the function-side controller is transmitted to the host-side controller.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴としている。   Further, the communication controller has error analysis means for analyzing whether or not the DATA packet received from the host device contains an error, and the transmission control means performs the retransmission processing by using the error analysis means. This is performed only when it is confirmed that there is no error in the DATA packet held by.

また、上記通信コントローラは、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合、ファンクション側コントローラへ送信するDATAパケットのパケットフォーマット中に、該DATAパケットには誤りが無いことを示すフラグを立てることを特徴としている。   In addition, the communication controller, when it is confirmed by the error analysis means that there is no error in the DATA packet held by itself, the DATA packet is included in the DATA packet during the packet format of the DATA packet transmitted to the function side controller. It is characterized by setting a flag indicating that there is no error.

また、上記通信コントローラは、ホスト側コントローラからDATAパケットを受信し、該DATAパケットにおいて誤りのあることが上記誤り解析手段により検出された場合、上記ホスト側コントローラで保有されているDATAパケットにおける誤りの有無を示すフラグが受信したDATAパケットに立てられており、該フラグによりホスト側コントローラ側で誤りの無いDATAパケットが保有されていることが確認された場合のみ上記再送要求を行うことを特徴としている。   The communication controller receives a DATA packet from the host-side controller, and when the error analysis means detects that there is an error in the DATA packet, the communication controller detects an error in the DATA packet held by the host-side controller. A flag indicating presence / absence is set in the received DATA packet, and the retransmission request is made only when it is confirmed by the flag that the host-side controller has an error-free DATA packet. .

また、上記通信コントローラは、ファンクション側コントローラから再送要求を受信し、その後、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信することを特徴としている。   Further, when the communication controller receives a retransmission request from the function-side controller and then receives a PING packet from the host device, the transmission control means transmits an ACK packet to the host device. .

また、上記通信コントローラは、上記OUTトランザクションの実行前に、通信相手側の通信コントローラと転送速度調整を行うことを特徴としている。   In addition, the communication controller adjusts the transfer rate with the communication controller on the communication partner side before executing the OUT transaction.

また、上記通信コントローラは、上記転送速度調整において、USB規格に定められた転送速度で通信が可能であると判断される場合は、通信相手側の通信コントローラに送信される各パケットは、パケットの送信タイミング制御を行わずに、変復調のみを行って相手側の通信コントローラへの転送を行うことを特徴としている。   In addition, when the communication controller determines that communication can be performed at the transfer speed defined in the USB standard in the transfer speed adjustment, each packet transmitted to the communication controller on the communication partner side is It is characterized in that, without performing transmission timing control, only modulation / demodulation is performed and transfer to the communication controller on the other side is performed.

また、上記通信コントローラは、通信相手側の通信コントローラとの間での通信路におけるエラーレートを解析し、該エラーレートが予め定められたエラーレートよりも悪いと判断される場合、上記転送速度調整を行って転送速度を下げることを特徴としている。   The communication controller analyzes the error rate in the communication path with the communication controller on the communication partner side, and determines that the error rate is worse than a predetermined error rate, the transfer rate adjustment To reduce the transfer speed.

また、上記通信コントローラは、通信相手側の通信コントローラとの間で、全二重通信を行うことを特徴としている。   The communication controller performs full duplex communication with a communication controller on the communication partner side.

また、上記通信コントローラは、通信相手側の通信コントローラとの間の通信が、光ファイバを用いた通信路によって行われるものであることを特徴としている。   Further, the communication controller is characterized in that communication with the communication controller on the communication partner side is performed by a communication path using an optical fiber.

また、上記通信コントローラは、通信相手側の通信コントローラとの間の通信が、電波を用いた無線によって行われるものであることを特徴としている。   The communication controller is characterized in that communication with the communication controller on the communication partner side is performed by radio using radio waves.

また、上記通信コントローラは、通信相手側の通信コントローラとの間の通信が、光を用いた空間伝送によって行われるものであることを特徴としている。   Further, the communication controller is characterized in that communication with the communication controller on the communication partner side is performed by spatial transmission using light.

また、本発明に係る他の通信コントローラは、上記課題を解決するために、USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして通信コントローラであって、ホスト装置側との送信に係る転送速度がUSB規格に定められた転送速度よりも低く、ファンクション装置への送信に係る転送速度がUSB規格に定められた転送速度であり、ホスト装置側から送信されるOUTパケットおよびDATAパケットの受信が完了した時点で、該OUTパケットおよびDATAパケットのファンクション装置への転送を開始することを特徴としている。   In order to solve the above-described problem, another communication controller according to the present invention functions as a USB standard OUT packet and DATA packet transmitted from the host device when performing an OUT transaction as USB data communication. A communication controller serving as a function-side controller that transfers to the host device and transfers a handshake packet that is a reply to the OUT packet and the DATA packet to the host device, and the transfer speed for transmission with the host device is determined by the USB standard Lower than the determined transfer rate, the transfer rate related to transmission to the function device is the transfer rate defined in the USB standard, and when reception of the OUT packet and DATA packet transmitted from the host device side is completed, OUT packet and DAT It is characterized by starting the transfer to the function device of the packet.

また、本発明に係るさらに他の通信コントローラは、上記課題を解決するために、USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして通信コントローラであって、ホスト装置側との送信に係る転送速度がUSB規格に定められた転送速度よりも低く、ファンクション装置への送信に係る転送速度がUSB規格に定められた転送速度であり、ホスト側コントローラから受信したOUTパケットおよびDATAパケットを上記格納手段に格納する際の格納データ量を確認するデータ量確認手段を有し、上記送信制御手段は、上記データ量確認手段によって確認された受信データ量が予め定められた値よりも多くなった時点で、ファンクション装置へのOUTパケットおよびDATAパケットの送信を開始することを特徴としている。   Further, in order to solve the above-described problem, another communication controller according to the present invention transmits a USB standard OUT packet and a DATA packet transmitted from the host device side when performing an OUT transaction as data communication on the USB. A communication controller as a function-side controller that transfers to the function device and transfers a handshake packet that is a reply to the OUT packet and the DATA packet to the host device side, and the transfer speed for transmission with the host device side conforms to the USB standard The transfer rate is lower than the determined transfer rate, and the transfer rate related to transmission to the function device is the transfer rate defined in the USB standard, and when storing the OUT packet and the DATA packet received from the host-side controller in the storage unit Amount of stored data A data amount confirming means for confirming, and the transmission control means, when the amount of received data confirmed by the data amount confirming means exceeds a predetermined value, It is characterized by starting transmission of a packet.

また、上記通信コントローラは、ファンクション装置にDATAパケットを送信した後、該DATAパケットに対するACKパケットがファンクション装置から返ってきたか否かを確認し、DATAパケットの送信から所定時間内に上記受信確認手段によるACKパケットの受信が確認されなかった場合には、前回ファンクション装置に送信したものと同じOUTパケットおよびDATAパケットをファンクション装置に送信する再送処理を行うことを特徴としている。   In addition, after transmitting the DATA packet to the function device, the communication controller confirms whether or not an ACK packet for the DATA packet has been returned from the function device, and within a predetermined time from the transmission of the DATA packet, When reception of the ACK packet is not confirmed, a retransmission process is performed in which the same OUT packet and DATA packet as those transmitted to the function device last time are transmitted to the function device.

また、上記通信コントローラは、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析し、上記再送処理を、上記解析により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴としている。   In addition, the communication controller analyzes whether the DATA packet received from the host-side controller contains an error, and confirms that the retransmission process is performed by the above analysis and that the DATA packet held by the own device is free of errors. It is characterized in that it is performed only when it is done.

また、上記通信コントローラは、ホスト装置側から受信したDATAパケットが誤りを含むものであるか否かを解析し、上記解析により、受信したDATAパケットが誤っていると判断された場合、ホスト側コントローラにDATAパケットの再送要求を行うことを特徴としている。   Further, the communication controller analyzes whether or not the DATA packet received from the host device side includes an error. If the analysis determines that the received DATA packet is incorrect, the communication controller sends a DATA to the host side controller. It is characterized by requesting retransmission of a packet.

また、上記通信コントローラは、ホスト装置側からDATAパケットを受信し、該DATAパケットにおいて誤りのあることが検出された場合、上記ホスト側コントローラで保有されているDATAパケットにおける誤りの有無を示すフラグが受信したDATAパケットに立てられており、該フラグによりホスト側コントローラ側で誤りの無いDATAパケットが保有されていることが確認された場合のみ上記再送要求を行うことを特徴としている。   In addition, when the communication controller receives a DATA packet from the host device side and detects that there is an error in the DATA packet, a flag indicating the presence or absence of an error in the DATA packet held by the host side controller is displayed. The retransmission request is made only when it is set in the received DATA packet and it is confirmed by the flag that the host-side controller holds an error-free DATA packet.

また、本発明に係る通信システムは、上記課題を解決するために、上記記載のホスト側コントローラとして機能する通信コントローラと、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして機能する通信コントローラとを備えたことを特徴としている。   In order to solve the above problems, a communication system according to the present invention uses a communication controller functioning as the above-described host-side controller and USB standard OUT packets and DATA packets transmitted from the host device side as function devices. And a communication controller functioning as a function-side controller for transferring and transferring a handshake packet as a response to the OUT packet and the DATA packet to the host device side.

また、本発明に係る通信機器は、上記課題を解決するために、上記記載の通信コントローラを備えたことを特徴としている。   In addition, a communication device according to the present invention includes the communication controller described above in order to solve the above-described problem.

また、本発明に係る通信方法は、上記課題を解決するために、ホスト装置からのOUTパケットおよびDATAパケットの受信を確認すると、その時点で該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットを受信しているか否かを確認し、上記ハンドシェイクパケットを受信している場合には、受信した上記OUTパケットおよびDATAパケットに対して該ハンドシェイクパケットをホスト装置に送信し、上記ハンドシェイクパケットを受信していない場合には、ホスト装置にNAKパケットを送信することを特徴としている。   Further, in order to solve the above problems, the communication method according to the present invention confirms reception of an OUT packet and a DATA packet from a host device, and at that time, a handshake packet that becomes a response to the OUT packet and the DATA packet is received. If the handshake packet is received, the handshake packet is transmitted to the host device in response to the received OUT packet and DATA packet, and the handshake packet is received. If not received, a NAK packet is transmitted to the host device.

本発明に係る通信コントローラは、以上のように、ホスト装置からのOUTパケットおよびDATAパケットの受信を確認する受信確認手段と、ファンクション装置側から送信されてくるハンドシェイクパケットを格納する格納手段と、上記受信認識手段によりホスト装置からのOUTパケットおよびDATAパケット受信が確認された時点で、上記格納手段にハンドシェイクパケットが格納されているか否かを確認する格納確認手段と、上記格納確認手段により上記ハンドシェイクパケットが格納されていないことが確認された時には、ホスト装置にNAKパケットを送信し、上記格納確認手段によりハンドシェイクパケットが格納されていることが確認された時には、ホスト装置に該ハンドシェイクパケットを送信する送信制御手段とを備えている。   As described above, the communication controller according to the present invention includes a reception confirmation unit that confirms reception of an OUT packet and a DATA packet from the host device, a storage unit that stores a handshake packet transmitted from the function device side, When the reception recognition means confirms reception of the OUT packet and DATA packet from the host device, the storage confirmation means for confirming whether or not a handshake packet is stored in the storage means, and the storage confirmation means When it is confirmed that no handshake packet is stored, a NAK packet is transmitted to the host device, and when it is confirmed by the storage confirmation means that the handshake packet is stored, the handshake packet is transmitted to the host device. A transmission control means for transmitting packets; Eteiru.

上記の構成によれば、最初にホスト装置から受信したOUTパケットおよびDATAパケットの応答としてファンクション装置側から送信されてくるハンドシェイクパケットを格納手段に格納しておき、ホスト装置からOUTパケットおよびDATAパケットが再送されてきた時に、格納手段にて格納されているハンドシェイクパケットをホスト装置に送信する。それゆえ、ホスト装置から再送されてきたOUTパケットおよびDATAパケットに対して、ハンドシェイクパケットをファンクション装置側から再度送信してもらう必要が無く、ホスト−ファンクション間の転送速度が低速であったり、ホスト−ファンクション間の転送経路が長い場合であっても、USB伝送で規定される制約時間内でOUTトランザクションの処理を正常に行えるという効果を奏する。   According to the above configuration, the handshake packet transmitted from the function device side as a response to the OUT packet and the DATA packet first received from the host device is stored in the storage means, and the OUT packet and the DATA packet are transmitted from the host device. Is retransmitted, the handshake packet stored in the storage means is transmitted to the host device. Therefore, there is no need to have the handshake packet sent again from the function device side for the OUT packet and DATA packet retransmitted from the host device, and the transfer rate between the host and function is low, -Even if the transfer path between functions is long, there is an effect that the OUT transaction can be processed normally within the restricted time defined by USB transmission.

また、ファンクション側コントローラとしても機能する上記通信コントローラは、ホスト側コントローラからのOUTパケットおよびDATAパケットの受信およびホスト側コントローラへのハンドシェイクパケットの送信に係る転送速度がUSB規格に定められた転送速度よりも低く、OUTパケットおよびDATAパケットのファンクション装置への送信およびファンクション装置からのハンドシェイクパケットの受信に係る転送速度がUSB規格に定められた転送速度であり、さらに、ホスト側コントローラから受信したOUTパケットおよびDATAパケットを上記格納手段に格納する際の格納データ量を確認するデータ量確認手段を有し、上記送信制御手段は、上記データ量確認手段によって確認された受信データ量が予め定められた値よりも多くなった時点で、ファンクション装置へのOUTパケットおよびDATAパケットの送信を開始する。   In addition, the communication controller functioning also as a function-side controller has a transfer rate defined in the USB standard for the transfer rate for receiving OUT packets and DATA packets from the host-side controller and transmitting handshake packets to the host-side controller. The transfer rate for transmission of OUT packets and DATA packets to the function device and reception of handshake packets from the function device is the transfer rate defined in the USB standard, and further, OUT received from the host-side controller A data amount confirmation unit for confirming a storage data amount when storing the packet and the DATA packet in the storage unit, and the transmission control unit determines a reception data amount confirmed by the data amount confirmation unit in advance. And when it becomes more than the value, it starts transmitting OUT packet and the DATA packet to a function device.

上記の構成によれば、ホスト−ファンクション間の通信路における転送速度が、ファンクション側コントローラとファンクション装置との間での転送速度(USB規格に定められた転送速度)よりも低い場合であっても、上記の予め定められた値が、その時点でOUTパケットおよびDATAパケットのホスト装置への転送を開始しても格納手段がEMPTYになることがないような値以上であるならば、ホスト装置側からのOUTパケットおよびDATAパケットの受信終了を待たずにパケットの送信を開始することができる。それゆえ、OUTパケットおよびDATAパケットの送信タイミングを早くすることが可能となり、全体としての転送速度の向上を図ることができるという効果を奏する。   According to the above configuration, even when the transfer speed on the communication path between the host and the function is lower than the transfer speed (transfer speed defined in the USB standard) between the function-side controller and the function device. If the above-mentioned predetermined value is equal to or greater than the value at which the storage means does not become EMPTY even if the transfer of the OUT packet and the DATA packet to the host device is started at that time, the host device side Packet transmission can be started without waiting for the end of reception of the OUT packet and DATA packet from. As a result, the transmission timing of the OUT packet and the DATA packet can be advanced, and the transfer rate as a whole can be improved.

また、ファンクション側コントローラとしても機能する上記通信コントローラは、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断される場合、該DATAパケットを破棄し、ファンクション装置に転送しない。   The communication controller that also functions as a function-side controller has error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error, and the transmission control means includes the error analysis means. If it is determined that the received DATA packet is incorrect, the DATA packet is discarded and not transferred to the function device.

それゆえ、送信にかかる電力を低減するとともに、ファンクション装置が誤りのあるパケットを受信することで生じる予期せぬ異常動作の抑制を行うことが可能となるという効果を奏する。   Therefore, it is possible to reduce the power required for transmission, and to suppress the unexpected abnormal operation caused by the function device receiving an erroneous packet.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ファンクション側コントローラへのDATAパケットの送信をその時点で中止する。   The communication controller has error analysis means for analyzing whether or not the DATA packet received from the host device contains an error, and the transmission control means uses the error analysis means to make the received DATA packet erroneous. If it is determined, the transmission of the DATA packet to the function side controller is stopped at that time.

それゆえ、転送の途中でも上記DATAパケットの送信をやめることで、低速通信路の転送効率の悪化を抑制することができるという効果を奏する。   Therefore, by stopping the transmission of the DATA packet even during the transfer, there is an effect that the deterioration of the transfer efficiency of the low-speed communication path can be suppressed.

また、ファンクション側コントローラとしても機能する上記通信コントローラでは、上記受信確認手段は、ファンクション装置にDATAパケットを送信した後、該DATAパケットに対するACKパケットがファンクション装置から返ってきたか否かを確認し、上記送信制御手段は、ファンクション装置にDATAパケットを送信した後、所定時間内に上記受信確認手段によるACKパケットの受信が確認されなかった場合には、前回ファンクション装置に送信したものと同じOUTパケットおよびDATAパケットをファンクション装置に送信する再送処理を行う。   In the communication controller that also functions as a function-side controller, the reception confirmation unit transmits a DATA packet to the function device, and then confirms whether an ACK packet for the DATA packet is returned from the function device. The transmission control means transmits the DATA packet to the function device. If the reception confirmation means does not confirm the reception of the ACK packet within a predetermined time, the transmission control means outputs the same OUT packet and DATA as those transmitted to the function device last time. Performs retransmission processing to send the packet to the function device.

それゆえ、ファンクション側コントローラがDATAパケットをファンクション装置に対して送信する際に、ファンクション装置とファンクション側コントローラとの間でデータ誤りが発生した場合、ホスト装置側に再度DATAパケットの送信を要求することなく、DATAパケットの再送処理を行うことができるという効果を奏する。   Therefore, when a data error occurs between the function device and the function-side controller when the function-side controller transmits a DATA packet to the function device, the host device requests the host device to send the DATA packet again. In this way, the data packet can be retransmitted.

また、上記通信コントローラは、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行う。   The communication controller has error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error, and the transmission control means performs the retransmission processing by the error analysis means. This is performed only when it is confirmed that there is no error in the DATA packet held by the device.

それゆえ、上記通信コントローラがファンクション側コントローラとして機能する場合、受信DATAパケットが正しいと判別される場合のみ、ファンクション装置への再送処理を行うことができるという効果を奏する。   Therefore, when the communication controller functions as a function-side controller, there is an effect that retransmission processing to the function device can be performed only when it is determined that the received DATA packet is correct.

また、上記通信コントローラは、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信する。   When the communication controller receives a PING packet from the host device, the transmission control unit transmits an ACK packet to the host device.

それゆえ、ホスト装置に対してOUTパケットおよびDATAパケットを再度送信させることができるという効果を奏する。   Therefore, there is an effect that the OUT packet and the DATA packet can be transmitted again to the host device.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、または、ファンクション側コントローラからそれ以前に送信したDATAパケットに対するACKパケットを受信していた場合は、ホスト装置に対してACKパケットを送信し、それ以外の場合は、ホスト装置に対してNAKパケットを送信する。   Further, the communication controller has error analysis means for analyzing whether or not the DATA packet received from the host apparatus includes an error. When the PING packet is received from the host apparatus, the transmission control means When it is determined by the analyzing means that the received DATA packet is incorrect, or when the ACK packet for the DATA packet transmitted before is received from the function side controller, the ACK packet is sent to the host device. Otherwise, a NAK packet is transmitted to the host device.

それゆえ、ホスト側コントローラが必要とする場合のみ、ホスト装置に対してOUTパケットおよびDATAパケットを再度送信させることができ、DATAパケットによるホスト装置とホスト側コントローラ間の通信路の使用効率の低下を抑制できるという効果を奏する。   Therefore, the OUT packet and the DATA packet can be transmitted again to the host device only when the host side controller requires it, and the use efficiency of the communication path between the host device and the host side controller due to the DATA packet can be reduced. There is an effect that it can be suppressed.

また、ファンクション側コントローラとしても機能する上記通信コントローラは、ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段と、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ホスト側コントローラにDATAパケットの再送要求を行う再送要求手段とを有している。   The communication controller that also functions as a function-side controller includes an error analysis unit that analyzes whether the DATA packet received from the host-side controller includes an error, and the error analysis unit that receives the received DATA packet incorrectly. If it is determined that the packet is retransmitted, it has retransmission request means for requesting the host side controller to retransmit the DATA packet.

それゆえ、ホスト−ファンクション間の通信路において、DATAパケットに誤りが発生した場合は、ファンクション側コントローラは、ホスト装置側に対して、その旨を通知することができるという効果を奏する。   Therefore, when an error occurs in the DATA packet in the communication path between the host and the function, the function-side controller can notify the host device side accordingly.

また、上記通信コントローラは、ファンクション側コントローラから再送要求を受信した場合には、前回ファンクション側コントローラに送信したDATAパケットと同じDATAパケットをホスト側コントローラに送信する再送処理を行う。   When the communication controller receives a retransmission request from the function-side controller, the communication controller performs a retransmission process of transmitting the same DATA packet as the DATA packet transmitted to the function-side controller to the host-side controller.

それゆえ、ファンクション側コントローラからの再送要求を元にホスト側コントローラからの再送処理が可能となるという効果を奏する。   Therefore, it is possible to perform retransmission processing from the host-side controller based on the retransmission request from the function-side controller.

また、上記通信コントローラは、ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行う。   Further, the communication controller has error analysis means for analyzing whether or not the DATA packet received from the host device contains an error, and the transmission control means performs the retransmission processing by using the error analysis means. This is performed only when it is confirmed that there is no error in the DATA packet held by.

それゆえ、受信DATAパケットが正しいと判別される場合のみ、ファンクション側コントローラへの再送処理を行うことができるという効果を奏する。   Therefore, only when it is determined that the received DATA packet is correct, the retransmission process to the function-side controller can be performed.

また、上記通信コントローラは、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合、ファンクション側コントローラへ送信するDATAパケットのパケットフォーマット中に、該DATAパケットには誤りが無いことを示すフラグを立てる。   In addition, the communication controller, when it is confirmed by the error analysis means that there is no error in the DATA packet held by itself, the DATA packet is included in the DATA packet during the packet format of the DATA packet transmitted to the function side controller. Set a flag indicating that there are no errors.

それゆえ、ホスト側コントローラの保有しているDATAパケットが再送できるパケットかどうかという情報をファンクション装置側に通知することが可能となるという効果を奏する。   Therefore, there is an effect that it is possible to notify the function device side of whether or not the DATA packet held by the host-side controller is a retransmittable packet.

また、上記通信コントローラは、ホスト側コントローラからDATAパケットを受信し、該DATAパケットにおいて誤りのあることが上記誤り解析手段により検出された場合、上記ホスト側コントローラで保有されているDATAパケットにおける誤りの有無を示すフラグが受信したDATAパケットに立てられており、該フラグによりホスト側コントローラ側で誤りの無いDATAパケットが保有されていることが確認された場合のみ上記再送要求を行う。   The communication controller receives a DATA packet from the host-side controller, and when the error analysis means detects that there is an error in the DATA packet, the communication controller detects an error in the DATA packet held by the host-side controller. The retransmission request is made only when a flag indicating presence / absence is set in the received DATA packet and it is confirmed by the flag that the host-side controller holds an error-free DATA packet.

それゆえ、受信DATAパケットに誤りがあると判断された場合に、ホスト側コントローラに対して再送要求を行うことができるという効果を奏する。   Therefore, there is an effect that when it is determined that there is an error in the received DATA packet, a retransmission request can be made to the host-side controller.

また、上記通信コントローラは、ファンクション側コントローラから再送要求を受信し、その後、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信する。   When the communication controller receives a retransmission request from the function-side controller and then receives a PING packet from the host device, the transmission control unit transmits an ACK packet to the host device.

それゆえ、ホスト側コントローラが誤りのないDATAパケットを保有していない場合に、ホスト装置に再びDATAパケットを出させることが可能となるという効果を奏する。   Therefore, when the host-side controller does not have an error-free DATA packet, it is possible to cause the host device to output a DATA packet again.

また、上記通信コントローラは、上記OUTトランザクションの実行前に、通信相手側の通信コントローラと転送速度調整を行う。   The communication controller adjusts the transfer rate with the communication controller on the communication partner side before the execution of the OUT transaction.

それゆえ、ホスト−ファンクション間の通信路において、実際の通信が可能な転送速度で、かつ、必要以上に転送速度を低下させない転送速度が設定可能となるという効果を奏する。   Therefore, in the communication path between the host and the function, it is possible to set a transfer rate at which actual communication is possible and a transfer rate that does not lower the transfer rate more than necessary.

また、上記通信コントローラは、上記転送速度調整において、USB規格に定められた転送速度で通信が可能であると判断される場合は、通信相手側の通信コントローラに送信される各パケットは、パケットの送信タイミング制御を行わずに、変復調のみを行って相手側の通信コントローラへの転送を行う。   In addition, when the communication controller determines that communication can be performed at the transfer speed defined in the USB standard in the transfer speed adjustment, each packet transmitted to the communication controller on the communication partner side is Without performing transmission timing control, only modulation / demodulation is performed and transfer to the communication controller on the other side is performed.

それゆえ、ホスト−ファンクション間の通信路における転送速度が前述の最大ターンアラウンドを満足する程、十分であると判断される場合は、データ転送速度の低下をおこすことなく、USB2.0のデータ転送を行うことができるという効果を奏する。   Therefore, if it is determined that the transfer speed on the communication path between the host and the function is sufficient to satisfy the above-mentioned maximum turnaround, the USB 2.0 data transfer is performed without causing a decrease in the data transfer speed. There is an effect that can be performed.

また、上記通信コントローラは、通信相手側の通信コントローラとの間での通信路におけるエラーレートを解析し、該エラーレートが予め定められたエラーレートよりも悪いと判断される場合、上記転送速度調整を行って転送速度を下げる。   The communication controller analyzes the error rate in the communication path with the communication controller on the communication partner side, and determines that the error rate is worse than a predetermined error rate, the transfer rate adjustment To reduce the transfer speed.

それゆえ、仮にホスト−ファンクション間の通信路における品質が悪いと判断された場合は、転送速度を落とすことにより、品質の良い通信路においてデータ転送が可能となるという効果を奏する。   Therefore, if it is determined that the quality of the communication path between the host and the function is poor, it is possible to transfer the data on the communication path with a good quality by reducing the transfer speed.

また、上記通信コントローラは、通信相手側の通信コントローラとの間で、全二重通信を行うことで、ホスト−ファンクション間の通信において、半二重通信の際に必要なプリアンブルをなくすことが可能となり、通信路の使用効率を向上することができるという効果を奏する。   In addition, the communication controller performs full-duplex communication with the communication controller on the communication partner side, thereby eliminating the preamble required for half-duplex communication in host-function communication. Thus, the use efficiency of the communication path can be improved.

また、上記通信コントローラは、通信相手側の通信コントローラとの間の通信を、光ファイバを用いた通信路によって行うことで、ホスト−ファンクション間の通信において長距離伝送が可能となるという効果を奏する。   In addition, the communication controller has an effect of enabling long-distance transmission in communication between the host and the function by performing communication with the communication controller on the communication partner side through a communication path using an optical fiber. .

また、上記通信コントローラは、通信相手側の通信コントローラとの間の通信を、電波を用いた無線によって行うことで、あるいは、光を用いた空間伝送によって行うことで、ホスト−ファンクション間の通信において、ケーブルレスのため利便性が向上するという効果を奏する。   In addition, the communication controller performs communication with the communication controller on the communication partner side by radio using radio waves or by performing spatial transmission using light, thereby enabling communication between the host and the function. Because it is cableless, it has the effect of improving convenience.

〔実施の形態1〕
本発明の一実施形態について図1ないし図5に基づいて説明すると以下の通りである。
[Embodiment 1]
An embodiment of the present invention will be described below with reference to FIGS.

先ず、実施の形態1に係る送受信システム(通信システム)の概略構成を図1に示す。図1に示す送受信システムは、ホスト側コントローラ100とファンクション側コントローラ110とから構成される。また、USBホスト(ホスト装置)となる機器とUSBファンクション(ファンクション装置)となる機器との間での通信は、USBホスト側に接続されるホスト側コントローラ100と、USBファンクション側に接続されるファンクション側コントローラ110との間で行われる。   First, a schematic configuration of a transmission / reception system (communication system) according to Embodiment 1 is shown in FIG. The transmission / reception system shown in FIG. 1 includes a host-side controller 100 and a function-side controller 110. In addition, communication between a device serving as a USB host (host device) and a device serving as a USB function (function device) is performed by a host-side controller 100 connected to the USB host side and a function connected to the USB function side. This is performed with the side controller 110.

また、図1におけるホスト側コントローラ100とファンクション側コントローラ110との間の通信は光通信手段によって行われ、該光通信手段はUSB規格に定められた転送速度と同一もしくはそれ以下の転送速度を有しているものとする。   In addition, communication between the host-side controller 100 and the function-side controller 110 in FIG. 1 is performed by optical communication means, and the optical communication means has a transfer speed equal to or lower than the transfer speed defined in the USB standard. Suppose you are.

ホスト側コントローラ100は、USBホストからの信号を受信するとこれをファンクション側コントローラ110に送信し、ファンクション側コントローラ110からの信号を受信するとこれをUSBホストに向かって送信する。ホスト側コントローラ100は、USBホストとUSBケーブルで接続する以外にUSBハブのダウンストリームのポートとUSBケーブルで接続されていても構わない。また、USBホストやUSBハブの一部として、構成されていても構わない。   When receiving a signal from the USB host, the host-side controller 100 transmits it to the function-side controller 110, and when receiving a signal from the function-side controller 110, transmits it to the USB host. The host-side controller 100 may be connected to the downstream port of the USB hub via a USB cable in addition to being connected to the USB host via a USB cable. Further, it may be configured as a part of a USB host or a USB hub.

ファンクション側コントローラ110は、ホスト側コントローラ100からの信号を受信するとこれをUSBファンクションに送信し、USBファンクションからの信号を受信するとこれをホスト側コントローラ100に向かって送信する。ファンクション側コントローラ110は、USBファンクションとUSBケーブルで接続する以外にUSBハブのアップストリームのポートとUSBケーブルで接続されても構わない。また、USBファンクションやUSBハブの一部として構成されていても構わない。   When the function-side controller 110 receives a signal from the host-side controller 100, the function-side controller 110 transmits the signal to the USB function. When the function-side controller 110 receives a signal from the USB function, the function-side controller 110 transmits the signal to the host-side controller 100. The function-side controller 110 may be connected to the upstream port of the USB hub via a USB cable, in addition to being connected to the USB function via a USB cable. Moreover, you may comprise as a part of USB function or USB hub.

以下にホスト側コントローラ100およびファンクション側コントローラ110の各構成要素の説明を行う。   Hereinafter, each component of the host-side controller 100 and the function-side controller 110 will be described.

ホスト側コントローラ100は、ホスト側ステートマシン101、USB受信機102、FIFO103、変調回路104、光送信機105、光受信機106、復調回路107、FIFO108、USB送信機109を備えている。また、ファンクション側コントローラ110は、ファンクション側ステートマシン111、光受信機112、復調回路113、FIFO114、USB送信機115、USB受信機116、FIFO117、変調回路118、光送信機119を備えている。   The host-side controller 100 includes a host-side state machine 101, a USB receiver 102, a FIFO 103, a modulation circuit 104, an optical transmitter 105, an optical receiver 106, a demodulation circuit 107, a FIFO 108, and a USB transmitter 109. The function-side controller 110 includes a function-side state machine 111, an optical receiver 112, a demodulation circuit 113, a FIFO 114, a USB transmitter 115, a USB receiver 116, a FIFO 117, a modulation circuit 118, and an optical transmitter 119.

ホスト側コントローラ100において、USBホストから送信されてUSB受信機102にて受信されたUSB信号は、ホスト側ステートマシン101によって、信号及びパケット解析が行われるとともに、FIFO103によってパケットが蓄えられる。このFIFO103は、ホスト側コントローラ100とファンクション側コントローラ110間の通信路がUSBの通信路と比べて同一もしくは低速であるため、前記通信路にパケットを転送する際のタイミング調整を行う。   In the host-side controller 100, the USB signal transmitted from the USB host and received by the USB receiver 102 is subjected to signal and packet analysis by the host-side state machine 101, and packets are stored by the FIFO 103. Since the communication path between the host-side controller 100 and the function-side controller 110 is the same or slower than the USB communication path, the FIFO 103 performs timing adjustment when transferring a packet to the communication path.

ホスト側ステートマシン101は、USBホストからの受信パケットがOUTパケットもしくはDATAパケットである場合は、ファンクション側コントローラ110へのパケット転送を行う。すなわち、ホスト側コントローラ100では、転送しても良いと判断されるパケットをUSBホストから受信すると、ホスト側ステートマシン101は、変調回路104に該パケットの送信及び変調の開始を通知する。これにより、FIFO103に蓄えられたパケットは、変調回路104にて変調され、光送信機105によってファンクション側コントローラ110に向けて送信される。   When the received packet from the USB host is an OUT packet or a DATA packet, the host-side state machine 101 performs packet transfer to the function-side controller 110. In other words, when the host-side controller 100 receives from the USB host a packet that can be transferred, the host-side state machine 101 notifies the modulation circuit 104 of the transmission of the packet and the start of modulation. Thus, the packet stored in the FIFO 103 is modulated by the modulation circuit 104 and transmitted to the function-side controller 110 by the optical transmitter 105.

本実施の形態に係る説明では、ホスト側コントローラ100とファンクション側コントローラ110との間(以下、ホスト−ファンクション間)の通信路を光通信路としているため、光送信機105は、例えば発光ダイオードやレーザーとなるが、光通信路は、光ファイバを用いた有線の通信路であっても、空間通信であっても問題ない。光ファイバを用いた場合は、長距離伝送が可能となり、空間通信の場合は、ケーブルレスのため利便性が向上することとなる。   In the description according to the present embodiment, since the communication path between the host-side controller 100 and the function-side controller 110 (hereinafter referred to as host-function) is an optical communication path, the optical transmitter 105 is, for example, a light-emitting diode, Although it is a laser, there is no problem whether the optical communication path is a wired communication path using an optical fiber or spatial communication. When an optical fiber is used, long-distance transmission is possible, and in the case of spatial communication, convenience is improved because it is cable-free.

また、変調回路104では、ホスト−ファンクション間の通信路を光通信とする場合、例えば8B10Bなどの変調方法が選択されるが、上記通信路は光に限定する必要は無く、例えば無線でも構わない。その場合は、変調回路104において別の変調方式を用いても構わない。また、ホスト−ファンクション間の通信方式は、半二重通信と全二重通信のどちらを選択してもよいが、全二重通信を選択すると、光送信機105が常に発光しているため、パケットにプリアンブルを付加する必要がなく、通信路の使用効率の向上へとつながる。   In the modulation circuit 104, when the communication path between the host and the function is optical communication, a modulation method such as 8B10B is selected. However, the communication path is not necessarily limited to light, and may be wireless, for example. . In that case, the modulation circuit 104 may use another modulation method. The communication method between the host and function may be selected from half duplex communication or full duplex communication. However, when full duplex communication is selected, the optical transmitter 105 always emits light. There is no need to add a preamble to the packet, which leads to an improvement in communication path usage efficiency.

また、ホスト側コントローラ100がUSBホストから最初にOUTパケットおよびDATAパケットの受信パケットを受けた場合、ホスト側コントローラ100はこの時点でファンクション側コントローラ110からACKパケットを受信していない。このため、ホスト側ステートマシン101は、FIFO108およびUSB送信機109を介してNAKパケットをUSBホストに送信する。こうすることで、ホスト側コントローラ100は、USBホストに対して、USBファンクションがDATAパケットを処理することができなかったことを通知することができ、OUTトランザクションの終了を行わせないようにすることができる。   Further, when the host-side controller 100 first receives an OUT packet and a DATA packet from the USB host, the host-side controller 100 has not received an ACK packet from the function-side controller 110 at this time. For this reason, the host-side state machine 101 transmits a NAK packet to the USB host via the FIFO 108 and the USB transmitter 109. By doing so, the host-side controller 100 can notify the USB host that the USB function could not process the DATA packet, so that the OUT transaction is not terminated. Can do.

一方、ホスト側コントローラ100からファンクション側コントローラ110に向けて送信された光信号は、ファンクション側コントローラ110の光受信機112によって受信されると、復調回路113により例えば8B10B復調された後、ファンクション側ステートマシン111によってそのパケットの中身が解釈される。ここで光受信機112は例えばフォトダイオードであるが、前述のとおり、ホスト−ファンクション間の通信路の種類により異なり、無線である場合は受信アンテナとなる。上記パケットが、ホスト側コントローラ100からのOUTパケットもしくはDATAパケットであると判断された場合は、該パケットはFIFO114に蓄えられる。また、ファンクション側ステートマシン111は、ホスト側コントローラ100からのパケットの受信が完了するのを待って、該パケットを、USB送信機115を通してUSBファンクションにUSB信号として送信する。   On the other hand, when the optical signal transmitted from the host-side controller 100 to the function-side controller 110 is received by the optical receiver 112 of the function-side controller 110, the demodulating circuit 113 demodulates, for example, 8B10B, and then the function-side state. The machine 111 interprets the contents of the packet. Here, the optical receiver 112 is, for example, a photodiode. As described above, the optical receiver 112 differs depending on the type of the communication path between the host and the function. When it is determined that the packet is an OUT packet or a DATA packet from the host-side controller 100, the packet is stored in the FIFO 114. Also, the function-side state machine 111 waits for completion of reception of the packet from the host-side controller 100, and transmits the packet as a USB signal to the USB function through the USB transmitter 115.

こうして、ファンクション側コントローラ110のUSB送信機115から送信されたOUTパケットおよびDATAパケットをUSBファンクションが受信すると、USBファンクションは、その時の状態によって以下の何れかの動作を行う。   Thus, when the USB function receives the OUT packet and the DATA packet transmitted from the USB transmitter 115 of the function-side controller 110, the USB function performs any of the following operations depending on the state at that time.

DATAパケットが正常に受信され、受信したDATAパケットに誤りが無く、DATAパケットの処理を終了して、かつ、エンドポイントにまだ余裕がある場合は、USBファンクションはACKパケットをファンクション側コントローラ110に送信する。DATAパケットが正常に受信され、受信したDATAパケットに誤りが無く、DATAパケットの処理を終了して、かつ、エンドポイントに余裕が無い場合は、USBファンクションはNYETパケットをファンクション側コントローラ110に送信する。DATAパケットが正常に受信され、受信したDATAパケットに誤りが無いが、USBファンクションのエンドポイントに空きが無くDATAパケットの処理ができなかった場合は、USBファンクションはNAKパケットをファンクション側コントローラ110に送信する。USBファンクションが受信パケットを処理できない状態(USBファンクションが異常状態になり、それ以降のINトランザクション、OUTトランザクションなどのデータ転送ができなくなった状態)の場合は、USBファンクションはSTALLパケットをファンクション側コントローラ110に送信する。また、受信したDATAパケットに誤りがあった場合は、USBファンクションはファンクション側コントローラ110に対して何も返さない。   If the DATA packet is received normally, there is no error in the received DATA packet, the processing of the DATA packet is completed, and the endpoint still has room, the USB function sends an ACK packet to the function-side controller 110. To do. If the DATA packet is normally received, the received DATA packet is error-free, the processing of the DATA packet is completed, and the end point has no room, the USB function transmits a NYET packet to the function-side controller 110. . If the DATA packet is received normally and there is no error in the received DATA packet, but the USB function endpoint is not available and the DATA packet cannot be processed, the USB function sends a NAK packet to the function-side controller 110. To do. In a state where the USB function cannot process the received packet (the USB function is in an abnormal state and data transfer such as subsequent IN transaction and OUT transaction cannot be performed), the USB function sends the STALL packet to the function-side controller 110. Send to. If there is an error in the received DATA packet, the USB function returns nothing to the function side controller 110.

ファンクション側コントローラ110のUSB受信機116にて受信されたACKパケット、NYETパケット、NAKパケット、もしくはSTALLパケットは、ファンクション側ステートマシン111により、そのパケットの中身を解釈されると共に、FIFO117に蓄えられる。そして、変調回路118により例えば8B10B変調され、光送信機119を介して光信号としてホスト側コントローラ100に向けて送信される。   The ACK packet, NYET packet, NAK packet, or STALL packet received by the USB receiver 116 of the function side controller 110 is interpreted by the function side state machine 111 and stored in the FIFO 117. Then, for example, 8B10B modulation is performed by the modulation circuit 118 and transmitted to the host-side controller 100 as an optical signal via the optical transmitter 119.

ホスト側コントローラ100の光受信機106によって受信された信号は、復調回路107によって例えば8B10B復調され、ホスト側ステートマシン101によって該受信信号がACKパケット、NYETパケット、NAKパケット、STALLパケットの各ハンドシェイクパケットであることが認識されると、FIFO108によってそのパケットが蓄えられる。   The signal received by the optical receiver 106 of the host-side controller 100 is demodulated by, for example, 8B10B by the demodulation circuit 107, and the received signal is received by the host-side state machine 101 as ACK packet, NYET packet, NAK packet, STALL packet When the packet is recognized, the FIFO 108 stores the packet.

また、USBホストは、上述したように、最初のOUTパケットおよびDATAパケットの送信に対してホスト側コントローラ100からNAKパケットを返されるため、ホスト側コントローラ100に対して再度OUTパケットおよびDATAパケットを送信することが必要となる。ホスト側コントローラ100は、USB受信機102によりOUTパケットおよびDATAパケットを再度受信した時点で、FIFO108に格納されているハンドシェイクパケットがあれば、このハンドシェイクパケットをUSBホストに送信する。   Further, as described above, the USB host returns the NAK packet from the host-side controller 100 for the transmission of the first OUT packet and DATA packet, and therefore transmits the OUT packet and the DATA packet to the host-side controller 100 again. It is necessary to do. If there is a handshake packet stored in the FIFO 108 when the USB receiver 102 receives the OUT packet and the DATA packet again by the USB receiver 102, the host-side controller 100 transmits this handshake packet to the USB host.

また、NAKパケットに関しては、ホスト側コントローラ100がUSBホストからOUTパケットおよびDATAパケットを受信した時点で、ファンクション側コントローラ110から何れのハンドシェイクパケットを受信していない場合においても、ファンクション側コントローラ110からのNAKパケットの受信に関係なく、USBホストに対してホスト側コントローラ100から送信される。   In addition, regarding the NAK packet, even when no handshake packet is received from the function-side controller 110 when the host-side controller 100 receives the OUT packet and the DATA packet from the USB host, the function-side controller 110 receives the NAK packet. Regardless of the reception of the NAK packet, it is transmitted from the host controller 100 to the USB host.

ここで、USBホストが、最初のOUTパケットおよびDATAパケットの送信後、ホスト側コントローラ100に対してOUTパケットおよびDATAパケットを再送するためには、例えば、以下のような動作が考えられる。   Here, in order for the USB host to retransmit the OUT packet and the DATA packet to the host-side controller 100 after transmitting the first OUT packet and the DATA packet, for example, the following operation can be considered.

すなわち、USBホストは、最初のOUTパケットおよびDATAパケットの送信に対してホスト側コントローラ100からNAKパケットを返されるため、このNAKパケットに対して、PINGパケットをホスト側コントローラ100に送信する。そして、ホスト側コントローラ100は、このPINGパケットに対してACKパケットをUSBホストへ返信すればよい。USBホストは、このACKパケットの受信により、OUTパケットおよびDATAパケットをホスト側コントローラ100に再送することとなる。   That is, the USB host returns a NAK packet from the host-side controller 100 in response to the transmission of the first OUT packet and DATA packet, and transmits a PING packet to the host-side controller 100 in response to this NAK packet. Then, the host-side controller 100 may return an ACK packet to the USB host in response to this PING packet. Upon receiving this ACK packet, the USB host retransmits the OUT packet and the DATA packet to the host-side controller 100.

尚、再送されてきたOUTパケットおよびDATAパケットを受信したホスト側コントローラ100では、その時点でファンクション側コントローラ110からハンドシェイクパケットを受け取っていれば、これをUSBホストへ送信すればよい。一方、ハンドシェイクパケットを受け取っていなければ、再度NAKパケットをUSBホストへ送信すれば、ホスト側コントローラ100がファンクション側コントローラ110よりハンドシェイクパケットを受信するまで上記処理が繰り返される。   If the host-side controller 100 that has received the retransmitted OUT packet and DATA packet has received a handshake packet from the function-side controller 110 at that time, it may be transmitted to the USB host. On the other hand, if a handshake packet has not been received, if the NAK packet is transmitted again to the USB host, the above processing is repeated until the host-side controller 100 receives a handshake packet from the function-side controller 110.

以上のように、ホスト側コントローラ100では、USBホストから最初に受信したOUTパケットおよびDATAパケットに対する返答としてのハンドシェイクパケット(ACKパケット、NYETパケット、NAKパケット、またはSTALLパケット)をFIFO108にて格納し、USBホストからOUTパケットおよびDATAパケットが再度送信されてきた時に、FIFO108にて格納されているハンドシェイクパケットをUSBホストに送信する。これにより、USBホストとUSBファンクションとの間にUSB規格よりも低速な通信路が存在していても、OUTパケットおよびDATAパケットに対して、ホスト−ファンクション間での通信を再度行うことなくハンドシェイクパケットを制約時間内にUSBホストに確実に送信することができるので、問題なくOUTトランザクションを行うことができる。   As described above, the host-side controller 100 stores in the FIFO 108 the handshake packet (ACK packet, NYET packet, NAK packet, or STALL packet) as a response to the OUT packet and the DATA packet received first from the USB host. When the OUT packet and the DATA packet are transmitted again from the USB host, the handshake packet stored in the FIFO 108 is transmitted to the USB host. As a result, even if a communication path slower than the USB standard exists between the USB host and the USB function, the handshake is performed without performing communication between the host and the function again for the OUT packet and the DATA packet. Since the packet can be reliably transmitted to the USB host within the time limit, the OUT transaction can be performed without any problem.

ここで、図2を用いて、本発明の実施の形態1におけるホスト側コントローラ100のホスト側ステートマシン101の動作説明を行う。   Here, the operation of the host-side state machine 101 of the host-side controller 100 according to Embodiment 1 of the present invention will be described with reference to FIG.

S201は、USBホストからOUTパケットを受信したかどうかを判別するステップである。OUTパケットを受信した場合はS202へ、またOUTパケット以外のパケットを受信した場合は再びS201へとそれぞれ遷移する。   S201 is a step of determining whether or not an OUT packet has been received from the USB host. If an OUT packet is received, the process proceeds to S202. If a packet other than an OUT packet is received, the process proceeds to S201 again.

S202は、ファンクション側コントローラ110にOUTパケットを送信するステップである。OUTパケットの送信終了後、S203へと遷移する。   S 202 is a step of transmitting an OUT packet to the function-side controller 110. After transmission of the OUT packet ends, the process proceeds to S203.

S203は、DATAパケットを受信したかどうかを判別するステップである。DATAパケットを受信した場合はS204へ、またそれ以外のパケットを受信した場合はS201へとそれぞれ遷移する。ここで、DATAパケット以外のパケットを受信した場合にS201へ遷移するのは、正常な動作においては、S201でOUTパケットを受信した後には、続けてDATAパケットを受信しなければならず、それ以外のパケットを受信した場合には異常動作であると判断されるためである。   S203 is a step of determining whether or not a DATA packet has been received. If a DATA packet is received, the process proceeds to S204, and if any other packet is received, the process proceeds to S201. Here, when a packet other than a DATA packet is received, the process proceeds to S201. In normal operation, after receiving an OUT packet in S201, a DATA packet must be received continuously. This is because it is determined that the operation is abnormal when the packet is received.

S204は、DATAパケットをファンクション側コントローラ110に送信するステップである。DATAパケットを送信開始後、S205へと遷移する。   S <b> 204 is a step of transmitting a DATA packet to the function-side controller 110. After starting the transmission of the DATA packet, the process proceeds to S205.

S205は、USBホストからのOUTパケット及びDATAパケットの受信があった時点で、ファンクション側コントローラ110から受信しているハンドシェイクパケットがあるか否かを判別するステップである。ACK、NYET、STALLパケットの何れかを受信していた場合はS207へ、またNAKパケットを受信していたか、もしくは何も受信していない場合はS206へとそれぞれ遷移する。   S205 is a step of determining whether or not there is a handshake packet received from the function-side controller 110 when an OUT packet and a DATA packet are received from the USB host. If any of the ACK, NYET, and STALL packets has been received, the process proceeds to S207. If a NAK packet has been received or nothing has been received, the process proceeds to S206.

S206は、USBホストにNAKパケットを送信するステップである。NAKパケット送信終了後S201へと遷移する。   S206 is a step of transmitting a NAK packet to the USB host. After completing the NAK packet transmission, the process proceeds to S201.

S207は、受信していたハンドシェイクパケット(ACK、NYET、STALLパケットの何れか)をUSBホストに送信するステップである。送信終了後、OUTトランザクションを終了する。   S207 is a step of transmitting the received handshake packet (any of ACK, NYET, and STALL packets) to the USB host. After the transmission is completed, the OUT transaction is terminated.

尚、上記S207において送信されたハンドシェイクパケットがNYETパケットである場合、USBファンクションは、今回のOUTトランザクションによるDATAパケットは正常に終了できたが、エンドポイントに空きがなくなり、次にOUTトランザクションを行うと、タイミングによってはDATAパケットを処理できない可能性がある状態となっている。このため、NYETパケットをUSBホストが受信した場合は、次のOUTトランザクションにおいて、PINGパケットを最初に送信して、USBファンクションのエンドポイントに空きがあるかを確認してから、OUTパケット及びDATAパケットを送信するといったフロー制御を行うことが可能となる。上記により、NYETパケットでもOUTトランザクションは正常に終了する。   When the handshake packet transmitted in S207 is a NYET packet, the USB function has successfully completed the DATA packet by the current OUT transaction, but the endpoint has no free space, and then performs the OUT transaction. The DATA packet may not be processed depending on the timing. For this reason, when the USB host receives the NYET packet, in the next OUT transaction, the PING packet is first transmitted to check whether the USB function endpoint is empty, and then the OUT packet and the DATA packet. It is possible to perform flow control such as transmitting. As described above, the OUT transaction ends normally even with the NYET packet.

また、上記S207において送信されたハンドシェイクパケットがSTALLパケットである場合、USBファンクションは、何らかの原因により、異常状態となってしまっている状態である。このため、STALLパケットをUSBホストが受信した場合は、USBホストはUSBファンクションが異常状態であることを認識し、OUTトランザクションを異常終了する。その後、USBホストから、前記異常状態の解除パケットがUSBファンクションあてに送信された後、パケット転送可能状態となる。つまり、STALLパケットによっては、OUTトランザクションは強制終了される。   When the handshake packet transmitted in S207 is a STALL packet, the USB function is in an abnormal state for some reason. For this reason, when the USB host receives the STALL packet, the USB host recognizes that the USB function is in an abnormal state, and ends the OUT transaction abnormally. Thereafter, after the abnormal state release packet is transmitted from the USB host to the USB function, the packet transfer is enabled. That is, the OUT transaction is forcibly terminated depending on the STALL packet.

上記図2のS206の処理において、ホスト側コントローラ100がUSBホストにNAKパケットを送信すると、USBホストはホスト側コントローラ100にPINGパケットを送信するか、もしくは、再びOUTパケット及びDATAパケットを送信する。PINGパケットを送信した場合は、ホスト側コントローラ100において、PINGパケットを受信した場合のホスト側ステートマシン101の動作は図3に示すものとなる。尚、この動作を行うステートマシンは、PINGパケットに関する状態遷移のみを記述しており、図2に示したOUTトランザクションのステートマシン内に構成されていても、また、独立に存在していても構わない。   In the process of S206 of FIG. 2, when the host-side controller 100 transmits a NAK packet to the USB host, the USB host transmits a PING packet to the host-side controller 100, or transmits an OUT packet and a DATA packet again. When the PING packet is transmitted, the operation of the host-side state machine 101 when the host-side controller 100 receives the PING packet is as shown in FIG. Note that the state machine that performs this operation describes only the state transition related to the PING packet, and may be configured in the state machine of the OUT transaction shown in FIG. 2 or may exist independently. Absent.

S301は、USBホストから受信したパケットがPINGパケットかどうかを判別するステップである。PINGパケットである場合はS302へ、またそれ以外のパケットである場合は再びS301へとそれぞれ遷移する。   S301 is a step of determining whether or not the packet received from the USB host is a PING packet. If it is a PING packet, the process proceeds to S302, and if it is any other packet, the process proceeds to S301 again.

S302は、USBホストに対してACKパケットを送信するステップである。ACKパケットを送信終了した後、PINGパケットに関する処理を終了する。また、受信したPINGパケットは、ファンクション側コントローラに対して送信しても送信しなくても構わない。   S302 is a step of transmitting an ACK packet to the USB host. After the transmission of the ACK packet is finished, the processing related to the PING packet is finished. The received PING packet may or may not be transmitted to the function-side controller.

上記のようなステートマシンをホスト側コントローラ100内に持つことにより、OUTトランザクション中にPINGパケットをホスト側コントローラ100が受信したとしても、常にACKパケットを返すことにより、USBホストに再びOUTパケット及びDATAパケットを出させることが可能となる。   By having the above-described state machine in the host-side controller 100, even if the host-side controller 100 receives a PING packet during an OUT transaction, it always returns an ACK packet to the USB host to send the OUT packet and DATA again. Packets can be sent out.

次に、図4を用いて、本発明の実施の形態1におけるファンクション側コントローラ110のファンクション側ステートマシン111の動作説明を行う。   Next, the operation of the function side state machine 111 of the function side controller 110 according to the first embodiment of the present invention will be described with reference to FIG.

S401は、ホスト側コントローラ100から受信したパケットがOUTパケット及びDATAパケットであるかどうかを判別するステップである。OUTパケット及びDATAパケットである場合はS402へ、またそれ以外のパケットであった場合は再びS401へとそれぞれ遷移する。   S401 is a step of determining whether or not the packets received from the host-side controller 100 are OUT packets and DATA packets. If the packet is an OUT packet or DATA packet, the process proceeds to S402. If the packet is any other packet, the process proceeds to S401 again.

S402は、USBファンクションにOUTパケット及びDATAパケットを送信するステップである。OUTパケット及びDATAパケット送信終了後、タイマをスタートし、S403へと遷移する。   S402 is a step of transmitting an OUT packet and a DATA packet to the USB function. After transmission of the OUT packet and DATA packet is completed, a timer is started and the process proceeds to S403.

S403は、USBファンクションから、ハンドシェイクパケット(ACK、NYET、STALL、NAKパケットの何れか)を受信したかどうかを判別するステップである。ハンドシェイクパケットを受信した場合はS404へ、またハンドシェイクパケットを受信せずに予め定められた時間が経過し、タイムアウトした場合はS401へとそれぞれ遷移する。   S403 is a step of determining whether or not a handshake packet (any of ACK, NYET, STALL, and NAK packet) has been received from the USB function. If a handshake packet is received, the process proceeds to S404. If a predetermined time has elapsed without receiving a handshake packet, and if a time-out occurs, the process proceeds to S401.

S404は、ホスト側コントローラにハンドシェイクパケットを送信するステップである。ハンドシェイクパケットを送信終了後、OUTトランザクションを終了する。   S404 is a step of transmitting a handshake packet to the host-side controller. After sending the handshake packet, the OUT transaction is finished.

上記のようにホスト側コントローラ100においては、図2および図3に示すような動作を行うステートマシンを、またファンクション側コントローラ110においては、図4に示すような動作を行うステートマシンをそれぞれ実装することで、ホスト側コントローラ100とファンクション側コントローラ110との通信路がUSBと同一もしくは低速であっても、問題なくOUTトランザクションを行うことが可能となる。   As described above, the host-side controller 100 is mounted with a state machine that performs operations as shown in FIGS. 2 and 3, and the function-side controller 110 is mounted with a state machine that performs operations as shown in FIG. As a result, even if the communication path between the host-side controller 100 and the function-side controller 110 is the same as or slower than the USB, an OUT transaction can be performed without any problem.

尚、上記図2の処理では、ホスト側コントローラ100は、USBホストから受信したOUTパケットおよびDATAパケットをS202、S204においてファンクション側コントローラ110に転送している。しかしながら、ホスト側コントローラ100がUSBホストに対してACKパケットを送信できる状態である場合には、上記OUTパケットおよびDATAパケットをファンクション側コントローラ110に送信する必要は無い。厳密には、USBファンクションは、OUTパケットおよびDATAパケットに対してACKパケットを送信した時点でOUTトランザクションが終了したと見なしているため、このような場合は、OUTパケットおよびDATAパケットをUSBファンクションに転送しないほうがいいと考えられる。   In the process of FIG. 2, the host-side controller 100 transfers the OUT packet and DATA packet received from the USB host to the function-side controller 110 in S202 and S204. However, when the host-side controller 100 can send an ACK packet to the USB host, it is not necessary to send the OUT packet and the DATA packet to the function-side controller 110. Strictly speaking, the USB function considers that the OUT transaction has been completed when an ACK packet is transmitted in response to the OUT packet and the DATA packet. In such a case, the OUT packet and the DATA packet are transferred to the USB function. I think it is better not to.

このため、ホスト側コントローラ100がUSBホストからOUTパケットおよびDATAパケットを受信した時点でファンクション側コントローラ110からACKパケットを受信していた場合には、上記OUTパケットおよびDATAパケットをファンクション側コントローラ110に送信しないという制御を行うことが考えられる。   Therefore, when the host-side controller 100 receives an ACK packet from the function-side controller 110 when it receives an OUT packet and a DATA packet from the USB host, it transmits the OUT packet and the DATA packet to the function-side controller 110. It is conceivable to perform control of not.

実施の形態1において、ファンクション側コントローラ110では、USBホストからOUTパケットおよびDATAパケットを受信した際に、これらのパケットを完全に受信してからのみ、USBファンクションに対してOUTパケットおよびDATAパケットを送信することが可能であった。これは、DATAパケットのパケットフォーマット中にパケットの長さを意味するフィールドが存在しないことが原因であり、低速通信路からの受信データをUSBの高速通信路に転送する際にDATAの抜けなく転送を確実に行うためである。但し、DATAパケットのパケット長の上限は、USB2.0においては、図5に示すように各転送モードにおいて、パケットの最大長が定められている。   In the first embodiment, when the function-side controller 110 receives the OUT packet and the DATA packet from the USB host, the function-side controller 110 transmits the OUT packet and the DATA packet to the USB function only after completely receiving these packets. It was possible to do. This is because there is no field indicating the length of the packet in the packet format of the DATA packet. When receiving data from the low-speed communication path is transferred to the USB high-speed communication path, the data is transferred without omission. This is to ensure that However, as for the upper limit of the packet length of the DATA packet, in USB 2.0, the maximum packet length is determined in each transfer mode as shown in FIG.

〔実施の形態2〕
本発明の他の実施形態について図6に基づいて説明すると以下の通りである。
[Embodiment 2]
Another embodiment of the present invention will be described with reference to FIG.

先ず、実施の形態2に係る送受信システムの概略構成を図6に示す。図6に示す送受信システムは、ホスト側コントローラ100とファンクション側コントローラ120とから構成される。ファンクション側コントローラ120は、ファンクション側ステートマシン111、光受信機112、復調回路113、FIFO114、USB送信機115、USB受信機116、FIFO117、変調回路118、光送信機119、カウンタ121を備えている。ファンクション側コントローラ120において、カウンタ121以外の構成要素はすべて、図1に示したファンクション側コントローラ110と同一の構成および機能をもつため、詳細な説明は省略する。また、図6におけるホスト側コントローラ100は、図1に示したホスト側コントローラ100と同一のものであるため、これについても詳細な説明は省略する。   First, FIG. 6 shows a schematic configuration of a transmission / reception system according to the second embodiment. The transmission / reception system shown in FIG. 6 includes a host-side controller 100 and a function-side controller 120. The function-side controller 120 includes a function-side state machine 111, an optical receiver 112, a demodulation circuit 113, a FIFO 114, a USB transmitter 115, a USB receiver 116, a FIFO 117, a modulation circuit 118, an optical transmitter 119, and a counter 121. . In the function-side controller 120, all the components other than the counter 121 have the same configuration and function as those of the function-side controller 110 shown in FIG. Further, the host-side controller 100 in FIG. 6 is the same as the host-side controller 100 shown in FIG.

カウンタ121は、ホスト側コントローラ100から受信したDATAパケットがFIFO114に書き込まれる際に、書き込まれたDATAの分だけその値が増えていくカウンタである。   The counter 121 is a counter whose value increases by the amount of the written DATA when the DATA packet received from the host-side controller 100 is written to the FIFO 114.

ここで、上記実施の形態1では、ファンクション側コントローラ110からUSBファンクションへのDATAパケットの送信は、ファンクション側コントローラ110においてDATAパケットの受信が完全に終了した後で開始されていた。これは、ホスト−ファンクション間の通信路における転送速度が、ファンクション側コントローラ110とUSBファンクションとの間での転送速度(USB規格に定められた転送速度)よりも低い場合、ホスト側コントローラ100からのDATAパケットの受信が終了する前にUSBファンクションへのDATAパケットの転送を開始すると、正常な転送処理が行えなくなる可能性があるためである。すなわち、上述の場合では、ホスト側コントローラ100からのDATAパケットの受信終了前に、ファンクション側コントローラ110においてDATAパケットを格納するFIFO114がEMPTYになり、USBファンクションに対してDATAパケットを連続して転送できないといった不具合が生じる可能性がある。   Here, in the first embodiment, the transmission of the DATA packet from the function side controller 110 to the USB function is started after the reception of the DATA packet is completely completed in the function side controller 110. This is because when the transfer speed on the communication path between the host and the function is lower than the transfer speed between the function-side controller 110 and the USB function (transfer speed defined in the USB standard), This is because if the transfer of the DATA packet to the USB function is started before the reception of the DATA packet is completed, there is a possibility that normal transfer processing cannot be performed. That is, in the above-described case, the FIFO 114 that stores the DATA packet in the function-side controller 110 becomes EMPTY before receiving the DATA packet from the host-side controller 100, and the DATA packet cannot be continuously transferred to the USB function. Such a problem may occur.

しかしながら、例えば、ファンクション側コントローラ110とUSBファンクションとの間での転送がアイソクロナス転送である場合、FIFO114に格納されているDATAパケットのデータ量が、図5中で示されているアイソクロナス転送時の最大パケット長の3072バイトに相当する値まで達していない状態でUSB2.0の通信路にDATAパケットの送信を開始したとしても、その後の送信においてFIFO114がEMPTYになることがなければ、ホスト側コントローラ100からのDATAパケットの受信終了を待たずにUSB通信路に対してDATAパケットを送信しても上記不具合は生じない。   However, for example, when the transfer between the function-side controller 110 and the USB function is isochronous transfer, the data amount of the DATA packet stored in the FIFO 114 is the maximum at the time of isochronous transfer shown in FIG. Even if the transmission of the DATA packet to the USB 2.0 communication path is started without reaching the value corresponding to the packet length of 3072 bytes, if the FIFO 114 does not become EMPTY in the subsequent transmission, the host controller 100 Even if the DATA packet is transmitted to the USB communication path without waiting for the completion of the reception of the DATA packet from the above, the above problem does not occur.

このため、本実施の形態2に係るファンクション側コントローラ120では、ホスト側コントローラ100からDATAパケットを受信し、該DATAパケットをFIFO114に格納する際、格納されたDATAパケットのデータ量の値をカウンタ121で管理する。そして、カウンタ121で管理される値が、その時点でDATAパケットのUSBファンクションへの転送を開始してもFIFO114がEMPTYになることがないような値以上であるならば、ホスト側コントローラ100からのDATAパケットの受信終了を待たずにUSBファンクションへDATAパケットの送信を開始することで、DATAパケットの送信タイミングを早くすることが可能となり、全体としての転送速度の向上を図ることが可能となる。   Therefore, when the function-side controller 120 according to the second embodiment receives a DATA packet from the host-side controller 100 and stores the DATA packet in the FIFO 114, the value of the data amount of the stored DATA packet is set to the counter 121. Manage with. If the value managed by the counter 121 is equal to or greater than the value at which the FIFO 114 does not become EMPTY even if the transfer of the DATA packet to the USB function is started at that time, the value from the host-side controller 100 is By starting the transmission of the DATA packet to the USB function without waiting for the completion of the reception of the DATA packet, the transmission timing of the DATA packet can be advanced, and the transfer rate as a whole can be improved.

また、ファンクション側コントローラ120とUSBファンクションとの間での転送方式がアイソクロナス転送でなく、最大データ長がアイソクロナス転送よりも小さいバルク転送を行うようなアプリケーションの場合は、上記カウンタの設定値を低くすることが可能となり、より全体としての転送速度の向上を図ることが可能となる。   If the transfer method between the function-side controller 120 and the USB function is not isochronous transfer, and the application performs bulk transfer in which the maximum data length is smaller than that of isochronous transfer, the counter setting value is lowered. It becomes possible to improve the transfer speed as a whole.

〔実施の形態3〕
本発明のさらに他の実施形態について図7に基づいて説明すると以下の通りである。
[Embodiment 3]
Still another embodiment of the present invention will be described with reference to FIG.

先ず、実施の形態3に係る送受信システムの概略構成を図7に示す。図7に示す送受信システムは、ホスト側コントローラ100とファンクション側コントローラ130とから構成される。ファンクション側コントローラ130は、ファンクション側ステートマシン111、光受信機112、復調回路113、FIFO114、USB送信機115、USB受信機116、FIFO117、変調回路118、光送信機119、CRCチェック回路131を備えている。ファンクション側コントローラ130において、CRCチェック回路131以外の構成要素はすべて、図1に示したファンクション側コントローラ110と同一の構成および機能をもつため、詳細な説明は省略する。また、図7におけるホスト側コントローラ100は、図1に示したホスト側コントローラ100と同一のものであるため、これについても詳細な説明は省略する。   First, FIG. 7 shows a schematic configuration of a transmission / reception system according to the third embodiment. The transmission / reception system shown in FIG. 7 includes a host controller 100 and a function controller 130. The function-side controller 130 includes a function-side state machine 111, an optical receiver 112, a demodulation circuit 113, a FIFO 114, a USB transmitter 115, a USB receiver 116, a FIFO 117, a modulation circuit 118, an optical transmitter 119, and a CRC check circuit 131. ing. In the function-side controller 130, all the components other than the CRC check circuit 131 have the same configuration and function as those of the function-side controller 110 shown in FIG. Further, since the host-side controller 100 in FIG. 7 is the same as the host-side controller 100 shown in FIG. 1, detailed description thereof is also omitted here.

CRCチェック回路131は、ホスト側コントローラ100から受信したDATAパケット中のCRC(Cyclic Redundancy Check)16を計算し、受信したDATAパケットに誤りがあるかどうかを判別することが可能である。CRCチェック回路131によって誤りがあると判断されたDATAパケットはファンクション側ステートマシン111によって破棄され、USBパケットとして送信しないことで、送信にかかる電力を低減するとともに、USBファンクションが誤りのあるパケットを受信することで生じる予期せぬ異常動作の抑制を行うことが可能となる。   The CRC check circuit 131 can calculate a CRC (Cyclic Redundancy Check) 16 in the DATA packet received from the host-side controller 100 and determine whether there is an error in the received DATA packet. A DATA packet that is determined to have an error by the CRC check circuit 131 is discarded by the function-side state machine 111 and is not transmitted as a USB packet, thereby reducing the power required for transmission and receiving a packet with an error by the USB function. This makes it possible to suppress unexpected abnormal operations that occur.

〔実施の形態4〕
本発明のさらに他の実施形態について図8に基づいて説明すると以下の通りである。
[Embodiment 4]
Still another embodiment of the present invention will be described with reference to FIG.

先ず、実施の形態4に係る送受信システムの概略構成を図8に示す。図8に示す送受信システムは、ホスト側コントローラ140とファンクション側コントローラ110とから構成される。ホスト側コントローラ140は、ホスト側ステートマシン101、USB受信機102、FIFO103、変調回路104、光送信機105、光受信機106、復調回路107、FIFO108、USB送信機109、CRCチェック回路141を備えている。ホスト側コントローラ140において、CRCチェック回路141以外の構成要素はすべて、図1に示したホスト側コントローラ100と同一の構成および機能をもつため、詳細な説明は省略する。また、図8におけるファンクション側コントローラ110は、図1に示したファンクション側コントローラ110と同一のものであるため、これについても詳細な説明は省略する。   First, FIG. 8 shows a schematic configuration of a transmission / reception system according to the fourth embodiment. The transmission / reception system shown in FIG. 8 includes a host-side controller 140 and a function-side controller 110. The host-side controller 140 includes a host-side state machine 101, a USB receiver 102, a FIFO 103, a modulation circuit 104, an optical transmitter 105, an optical receiver 106, a demodulation circuit 107, a FIFO 108, a USB transmitter 109, and a CRC check circuit 141. ing. In the host-side controller 140, all the components other than the CRC check circuit 141 have the same configuration and function as those of the host-side controller 100 shown in FIG. Further, the function-side controller 110 in FIG. 8 is the same as the function-side controller 110 shown in FIG.

CRCチェック回路141は、USBホストから受信したDATAパケット中のCRC16を計算し、受信したDATAパケットに誤りがないかどうかを判別することが可能である。ここで、USBホストから受信したDATAパケットに誤りがある場合、これをファンクション側コントローラ110に転送しても意味がなく、この場合のホスト−ファンクション間の低速通信路へのDATAパケットの転送は、無駄なものとなる。このため、CRCチェック回路141によって誤りがあると判断されたDATAパケットは、転送の途中でも該パケットの送信をやめることで、低速通信路の転送効率の悪化を抑制することが可能となる。   The CRC check circuit 141 can calculate the CRC 16 in the DATA packet received from the USB host and determine whether or not there is an error in the received DATA packet. If there is an error in the DATA packet received from the USB host, there is no point in transferring it to the function-side controller 110. In this case, the transfer of the DATA packet to the low-speed communication path between the host and the function is as follows: It becomes useless. For this reason, a DATA packet determined to have an error by the CRC check circuit 141 can be prevented from deteriorating the transfer efficiency of the low-speed communication path by stopping the transmission of the packet even during the transfer.

〔実施の形態5〕
本発明のさらに他の実施形態について図9に基づいて説明すると以下の通りである。
[Embodiment 5]
Still another embodiment of the present invention will be described with reference to FIG.

先ず、実施の形態5に係る送受信システムの概略構成を図9に示す。図9に示す送受信システムは、ホスト側コントローラ100とファンクション側コントローラ150とから構成される。ファンクション側コントローラ150は、ファンクション側ステートマシン111、光受信機112、復調回路113、FIFO151、USB送信機115、USB受信機116、FIFO117、変調回路118、光送信機119を備えている。ファンクション側コントローラ150において、FIFO151以外の構成要素はすべて、図1に示したファンクション側コントローラ110と同一の構成および機能をもつため、詳細な説明は省略する。また、図9におけるホスト側コントローラ100は、図1に示したホスト側コントローラ100と同一のものであるため、これについても詳細な説明は省略する。   First, FIG. 9 shows a schematic configuration of a transmission / reception system according to the fifth embodiment. The transmission / reception system shown in FIG. 9 includes a host-side controller 100 and a function-side controller 150. The function-side controller 150 includes a function-side state machine 111, an optical receiver 112, a demodulation circuit 113, a FIFO 151, a USB transmitter 115, a USB receiver 116, a FIFO 117, a modulation circuit 118, and an optical transmitter 119. In the function-side controller 150, all the components other than the FIFO 151 have the same configuration and function as those of the function-side controller 110 shown in FIG. Further, the host-side controller 100 in FIG. 9 is the same as the host-side controller 100 shown in FIG.

ファンクション側コントローラ150は、ホスト側コントローラ100からのDATAパケットを受信すると、ファンクション側ステートマシン111が受信したDATAパケットをFIFO151に書き込むよう制御する。   When receiving the DATA packet from the host-side controller 100, the function-side controller 150 controls the function-side state machine 111 to write the DATA packet received by the function-side state machine 111 into the FIFO 151.

このFIFO151は、OUTパケットおよびDATAパケット送信時に、あらかじめリードポインタの値を保持しておく。ファンクション側ステートマシン111は、OUTパケットおよびDATAパケットをUSBファンクションに送信後、あらかじめ定められた一定時間の間にUSBファンクションからACKパケットを受信しない場合は、USBファンクションとファンクション側コントローラ150との間の通信路において、データ誤りが発生したものと判断する。そして、ファンクション側ステートマシン111は、前述のリードポインタの値にリードポインタを設定し、予め定められた一定時間経過後、再び同じOUTパケットおよびDATAパケットを送信する。   This FIFO 151 holds the value of the read pointer in advance when sending OUT packets and DATA packets. If the function-side state machine 111 does not receive an ACK packet from the USB function for a predetermined time after transmitting the OUT packet and the DATA packet to the USB function, the function-side state machine 111 is connected between the USB function and the function-side controller 150. It is determined that a data error has occurred in the communication path. Then, the function-side state machine 111 sets the read pointer to the value of the read pointer described above, and transmits the same OUT packet and DATA packet again after a predetermined time has elapsed.

この場合、FIFO151でのリードポインタの制御により、DATAパケットの再送を実現しているが、この再送処理は、RAMなどで開始アドレスを保持することにより実現しても問題ない。また、ファンクション側コントローラにおいて、図7に示すようなCRCチェック回路131を備え、CRCチェック回路131によってファンクション側コントローラ110からの受信DATAパケットが正しいかどうかを判別することも可能であり、受信DATAパケットが正しいと判別される場合のみ、上記再送処理を行うといった制御を行うことも可能である。   In this case, the retransmission of the DATA packet is realized by the control of the read pointer in the FIFO 151, but this retransmission process can be realized by holding the start address in the RAM or the like. Further, the function-side controller includes a CRC check circuit 131 as shown in FIG. 7, and the CRC check circuit 131 can determine whether the received DATA packet from the function-side controller 110 is correct. It is also possible to perform control such that the retransmission processing is performed only when it is determined that is correct.

〔実施の形態6〕
本発明のさらに他の実施形態について図10に基づいて説明すると以下の通りである。
[Embodiment 6]
Still another embodiment of the present invention will be described with reference to FIG.

上述の実施の形態1における図3の処理では、ホスト側コントローラ100は、USBホストからOUTパケットおよびDATAパケットを再度送信させるために、USBホストからPINGパケットを受信した場合には、これに対してACKパケットを送信する処理を行っている。しかしながら、この処理では、上記ACKパケットに対してUSBホストが再送してきたOUTパケット及びDATAパケットをホスト側コントローラ100が受信しても、その時点でファンクション側からACKパケットを受信していなければ、ホスト側コントローラ100はUSBホストにACKパケットを返送することができない。このため、DATAパケットのパケット長が長いときなどは、USBホストとホスト側コントローラ100間におけるUSB通信路の使用効率に無駄が生じることとなる。   In the process of FIG. 3 in the first embodiment described above, when the host-side controller 100 receives a PING packet from the USB host in order to retransmit the OUT packet and the DATA packet from the USB host, A process of transmitting an ACK packet is performed. However, in this process, even if the host-side controller 100 receives an OUT packet and a DATA packet retransmitted by the USB host in response to the ACK packet, if the host-side controller 100 does not receive an ACK packet from the function side at that time, the host The side controller 100 cannot return an ACK packet to the USB host. For this reason, when the packet length of the DATA packet is long, use efficiency of the USB communication path between the USB host and the host-side controller 100 is wasted.

また、ホスト側コントローラ100がPINGパケットを受信する前に受信したDATAパケットが誤っていた場合、この誤ったDATAパケットに対して、ファンクション側コントローラ110からホスト側コントローラ100がACKパケットを受信することはありえない。この場合、ホスト側コントローラ100は、USBホストに対して再びOUTパケット及びDATAパケットを出させなければならないが、このような場合の処理は実施の形態1では考慮されていない。   In addition, when the DATA packet received before the host-side controller 100 receives the PING packet is incorrect, the host-side controller 100 receives an ACK packet from the function-side controller 110 for the erroneous DATA packet. Impossible. In this case, the host-side controller 100 must cause the USB host to output the OUT packet and the DATA packet again, but the processing in such a case is not considered in the first embodiment.

本実施の形態6では、上記USB通信路の使用効率の無駄を低減させ、また、ホスト側コントローラ100にて受信したDATAパケットに誤りがある場合に、USBホストにOUTパケット及びDATAパケットを再度送信させるための方法を示す。   In the sixth embodiment, waste of use efficiency of the USB communication path is reduced, and when there is an error in the DATA packet received by the host-side controller 100, the OUT packet and the DATA packet are transmitted again to the USB host. The method for making it show.

本実施の形態6に係る送受信システムの概略構成は実施の形態4における図8に示した構成と同様であり、各構成要素は、実施の形態4に係る送受信システムと同じ機能をもつため、詳細な説明は省略する。   The schematic configuration of the transmission / reception system according to the sixth embodiment is the same as the configuration shown in FIG. 8 in the fourth embodiment, and each component has the same function as the transmission / reception system according to the fourth embodiment. The detailed explanation is omitted.

先ず、図10を用いて、実施の形態6に係るホスト側コントローラ140のホスト側ステートマシン101の動作を説明する。尚、この状態遷移を行うステートマシンは、PINGパケットに関する状態遷移のみを記述しており、前述のOUTトランザクションのステートマシン内に構成されたとしても、また、独立に存在したとしても構わない。   First, the operation of the host-side state machine 101 of the host-side controller 140 according to the sixth embodiment will be described with reference to FIG. It should be noted that the state machine that performs this state transition describes only the state transition related to the PING packet, and may be configured in the state machine of the aforementioned OUT transaction or may exist independently.

S1001は、USBホストから受信したパケットがPINGパケットであるかどうかを判別するステップである。PINGパケットであった場合はS1002へ、それ以外のパケットであった場合は再びS1001へとそれぞれ遷移する。   S1001 is a step of determining whether or not the packet received from the USB host is a PING packet. If it is a PING packet, the process proceeds to S1002, and if it is any other packet, the process proceeds to S1001 again.

S1002は、前回受信したDATAパケットに誤りがあったかどうかをCRCチェック回路141により判別するステップである。誤りが無く正しいDATAパケットを受信していた場合はS1003へ、また、受信DATAパケットに誤りがある場合はS1005へとそれぞれ遷移する。   In step S1002, the CRC check circuit 141 determines whether there is an error in the previously received DATA packet. If there is no error and a correct DATA packet has been received, the process proceeds to S1003. If there is an error in the received DATA packet, the process proceeds to S1005.

S1003は、上記PINGパケットの受信時点において、ファンクション側コントローラ110からACKパケットを受信しているかどうかを判別するステップである。ACKパケットを受信していた場合はS1005へ、またACKパケットを受信していない場合はS1004へとそれぞれ遷移する。   S1003 is a step of determining whether or not an ACK packet is received from the function-side controller 110 at the time of receiving the PING packet. If an ACK packet has been received, the process proceeds to S1005. If an ACK packet has not been received, the process proceeds to S1004.

S1004は、USBホストに対して、NAKパケットを送信するステップである。NAKパケットを送信終了後、S1001へと遷移する。   S1004 is a step of transmitting a NAK packet to the USB host. After transmitting the NAK packet, the process proceeds to S1001.

S1005は、USBホストに対して、ACKパケットを送信するステップである。ACKパケットを送信終了後、PINGパケットに関する処理を終了する。また、受信したPINGパケットは、ファンクション側コントローラに対して、送信しても送信しなくても構わない。   S1005 is a step of transmitting an ACK packet to the USB host. After the transmission of the ACK packet is completed, the processing related to the PING packet is terminated. The received PING packet may or may not be transmitted to the function-side controller.

上記のようにホスト側コントローラ140において、図10に示すような動作を行うステートマシンを実装することにより、ホスト側コントローラ140は、必要な時のみ、USBホストに対してOUTパケット及びDATAパケットを出させることが可能となる。すなわち、ホスト側コントローラ140において、ファンクション側コントローラ110からACKパケットを受信している状態や前回の受信DATAパケットに誤りがあった状態でUSBホストからPINGパケットを受信した際には、USBホストにACKパケットを返してOUTパケット及びDATAパケットを出させ、それ以外の状態ではPINGパケットに対しNAKパケットを返すことで不要なOUTパケット及びDATAパケットの送信を回避できる。   As described above, by installing the state machine that performs the operation as shown in FIG. 10 in the host-side controller 140, the host-side controller 140 outputs an OUT packet and a DATA packet to the USB host only when necessary. It becomes possible to make it. That is, when the host-side controller 140 receives a PING packet from the USB host while receiving an ACK packet from the function-side controller 110 or an error in the previous received DATA packet, the host-side controller 140 receives an ACK By returning a packet and outputting an OUT packet and a DATA packet, and otherwise returning a NAK packet to the PING packet, unnecessary transmission of an OUT packet and a DATA packet can be avoided.

〔実施の形態7〕
本発明のさらに他の実施形態について図11に基づいて説明すると以下の通りである。
[Embodiment 7]
Still another embodiment of the present invention will be described with reference to FIG.

図11に、本実施の形態7に係るパケットフォーマットを示す。図11において、USBパケットとは、USBで規定された転送速度で通信されるデータパケットのパケットフォーマットであり、また、低速用パケットとは、低速通信路用に変換されたパケットフォーマットである。つまり、低速用パケットは、ホスト側コントローラがファンクション側コントローラに向けてDATAパケットを送信する際のパケットフォーマットである。   FIG. 11 shows a packet format according to the seventh embodiment. In FIG. 11, a USB packet is a packet format of a data packet communicated at a transfer rate defined by USB, and a low-speed packet is a packet format converted for a low-speed communication path. That is, the low-speed packet is a packet format when the host-side controller transmits a DATA packet to the function-side controller.

図11に示すように、低速用パケットでは、USBパケットのCRC16の後に、CRC_OKというフィールドが設けてある。ホスト側コントローラが保有しているDATAパケットに誤りが無い場合は、上記CRC_OKのフィールドにその旨を示す値を入れ(その旨を示すフラグを立て)、また保有しているDATAパケットに誤りがある場合は、同じくその旨を入れてファンクション側コントローラに該DATAパケットを送信する。そうすることで、ホスト側コントローラの保有しているDATAパケットが再送できるパケットかどうかという情報をファンクション側コントローラに通知することが可能となる。ファンクション側コントローラにおいては、上記CRC_OKフィールドを監視することにより、仮に受信DATAパケットに誤りがあると判断された場合に、ホスト側コントローラに対して、再送要求を行うかどうかの制御を行うことが可能となる。   As shown in FIG. 11, in the low-speed packet, a CRC_OK field is provided after the CRC 16 of the USB packet. If there is no error in the DATA packet held by the host-side controller, a value indicating that is put in the CRC_OK field (a flag indicating that is set), and there is an error in the held DATA packet. In this case, the DATA packet is transmitted to the function-side controller with the same effect. By doing so, it is possible to notify the function-side controller of whether or not the DATA packet held by the host-side controller is a retransmittable packet. By monitoring the CRC_OK field, the function-side controller can control whether to make a retransmission request to the host-side controller if it is determined that there is an error in the received DATA packet. It becomes.

〔実施の形態8〕
本発明のさらに他の実施形態について図12に基づいて説明すると以下の通りである。
[Embodiment 8]
Still another embodiment of the present invention will be described with reference to FIG.

本実施の形態8では、ホスト側コントローラとファンクション側コントローラ間でデータ誤りが発生し、ホスト側コントローラがファンクション側コントローラから再送要求を受信した場合に、ホスト側コントローラが正しいDATAパケットを準備するための方法を示す。   In the eighth embodiment, when a data error occurs between the host-side controller and the function-side controller and the host-side controller receives a retransmission request from the function-side controller, the host-side controller prepares a correct DATA packet. The method is shown.

本実施の形態8に係る送受信システムの概略構成は実施の形態3における図7に示した構成と同様であり、各構成要素は、実施の形態3に係る送受信システムと同じ機能をもつため、詳細な説明は省略する。   The schematic configuration of the transmission / reception system according to the eighth embodiment is the same as the configuration shown in FIG. 7 in the third embodiment, and each component has the same function as the transmission / reception system according to the third embodiment. The detailed explanation is omitted.

先ず、図12を用いて、実施の形態8に係るホスト側コントローラ100のホスト側ステートマシン101の動作を説明する。尚、この状態遷移を行うステートマシンは、PINGパケットに関する状態遷移のみを記述しており、前述のOUTトランザクションのステートマシン内に構成されたとしても、また、独立に存在したとしても構わない。   First, the operation of the host-side state machine 101 of the host-side controller 100 according to the eighth embodiment will be described with reference to FIG. It should be noted that the state machine that performs this state transition describes only the state transition related to the PING packet, and may be configured in the state machine of the aforementioned OUT transaction or may exist independently.

S1201は、USBホストから受信したパケットがPINGパケットがどうかを判別するステップである。PINGパケットであった場合はS1202へ、またそれ以外のパケットであった場合は再びS1201へとそれぞれ遷移する。   S1201 is a step of determining whether or not the packet received from the USB host is a PING packet. If it is a PING packet, the process proceeds to S1202, and if it is any other packet, the process proceeds to S1201 again.

S1202は、ファンクション側コントローラからDATAパケットの再送要求を受信しているかどうかを判別するステップである。再送要求を受信していた場合はS1204へ、また、再送要求を受信していない場合はS1203へとそれぞれ遷移する。   S1202 is a step of determining whether or not a DATA packet retransmission request has been received from the function-side controller. If a retransmission request has been received, the process proceeds to S1204. If a retransmission request has not been received, the process proceeds to S1203.

S1203は、USBホストに対してNAKパケットを送信するステップである。NAKパケットを送信終了後S1201へと遷移する。   S1203 is a step of transmitting a NAK packet to the USB host. After transmitting the NAK packet, the process proceeds to S1201.

S1204は、USBホストに対してACKパケットを送信するステップである。ACKパケットを送信終了後PINGパケットに関する処理を終了する。   S1204 is a step of transmitting an ACK packet to the USB host. After transmitting the ACK packet, the process related to the PING packet is terminated.

上記のようにホスト側コントローラ100において、図12に示すような動作を行うステートマシンを実装することにより、ホスト側コントローラ100は、ホスト側コントローラとファンクション側コントローラ間でデータ誤りが発生した場合に、USBホストが送信したPINGパケットに対してACKパケットを返すことで、USBホストにOUTパケット及びDATAパケットを出させることが可能となり、ファンクション側コントローラに対して再びOUTパケット及びDATAパケットを送信することが可能となる。   As described above, in the host-side controller 100, by implementing the state machine that performs the operation as shown in FIG. 12, the host-side controller 100 can be used when a data error occurs between the host-side controller and the function-side controller. By returning an ACK packet in response to a PING packet transmitted by the USB host, it is possible to cause the USB host to output an OUT packet and a DATA packet, and to transmit an OUT packet and a DATA packet to the function controller again. It becomes possible.

〔実施の形態9〕
本発明のさらに他の実施形態について図13ないし図16に基づいて説明すると以下の通りである。
[Embodiment 9]
Still another embodiment of the present invention is described below with reference to FIGS.

先ず、実施の形態9に係る送受信システムの概略構成を図13に示す。図13に示す送受信システムは、ホスト側コントローラ160とファンクション側コントローラ170とから構成される。ホスト側コントローラ160は、ホスト側ステートマシン101、USB受信機102、FIFO103、変調回路104、光送信機105、光受信機106、復調回路107、FIFO108、USB送信機109、スピードネゴシエーションステートマシン161、エラー検出回路162を備えている。ホスト側コントローラ160において、スピードネゴシエーションステートマシン161、エラー検出回路162以外の構成要素はすべて、図1に示したホスト側コントローラ100と同一の構成および機能をもつため、詳細な説明は省略する。また、ファンクション側コントローラ170は、ファンクション側ステートマシン111、光受信機112、復調回路113、FIFO114、USB送信機115、USB受信機116、FIFO117、変調回路118、光送信機119、スピードネゴシエーションステートマシン171、エラー検出回路172を備えている。ファンクション側コントローラ170において、スピードネゴシエーションステートマシン171、エラー検出回路172以外の構成要素はすべて、図1に示したファンクション側コントローラ110と同一の構成および機能をもつため、詳細な説明は省略する。   First, FIG. 13 shows a schematic configuration of a transmission / reception system according to the ninth embodiment. The transmission / reception system shown in FIG. 13 includes a host-side controller 160 and a function-side controller 170. The host-side controller 160 includes a host-side state machine 101, a USB receiver 102, a FIFO 103, a modulation circuit 104, an optical transmitter 105, an optical receiver 106, a demodulation circuit 107, a FIFO 108, a USB transmitter 109, a speed negotiation state machine 161, An error detection circuit 162 is provided. In the host-side controller 160, all the components other than the speed negotiation state machine 161 and the error detection circuit 162 have the same configuration and functions as those of the host-side controller 100 shown in FIG. The function-side controller 170 includes a function-side state machine 111, an optical receiver 112, a demodulation circuit 113, a FIFO 114, a USB transmitter 115, a USB receiver 116, a FIFO 117, a modulation circuit 118, an optical transmitter 119, and a speed negotiation state machine. 171 and an error detection circuit 172 are provided. In the function-side controller 170, all the components other than the speed negotiation state machine 171 and the error detection circuit 172 have the same configuration and functions as those of the function-side controller 110 shown in FIG.

スピードネゴシエーションステートマシン161および171は、ホスト側コントローラ160とファンクション側コントローラ170との間において、スピードネゴシエーション(転送速度調整)を行って、複数の転送速度から一つの転送速度を選択するためのステートマシンである。エラー検出回路162、172は、低速通信路(図13においては、ホスト−ファンクション間の光通信路)のエラー検出を行う回路である。尚、このスピードネゴシエーションは、OUTトランザクションの実行前に行われる。   The speed negotiation state machines 161 and 171 perform speed negotiation (transfer speed adjustment) between the host-side controller 160 and the function-side controller 170, and select a transfer speed from a plurality of transfer speeds. It is. The error detection circuits 162 and 172 are circuits that detect errors in the low-speed communication path (in FIG. 13, the optical communication path between the host and the function). This speed negotiation is performed before the execution of the OUT transaction.

図14を用いて、スピードネゴシエーションの動作を説明する。尚、図14におけるスピードネゴシエーションのプロトコルは一例であり、本発明はこのプロトコルに限定されるものではない。   The operation of speed negotiation will be described with reference to FIG. The speed negotiation protocol in FIG. 14 is an example, and the present invention is not limited to this protocol.

ホスト側コントローラ160のスピードネゴシエーションステートマシン161は、t1401において、所定の転送速度Aで、keep_speed信号の送信を開始し、また、keep_speed信号の送信と同時にタイマをスタートさせる。なお、keep_speed信号は、転送速度を決めるための送信コード(リクエスト信号)の1つであり、ファンクション側コントローラ170に、現在の転送速度を維持することを求める信号である。   The speed negotiation state machine 161 of the host-side controller 160 starts transmission of a keep_speed signal at a predetermined transfer speed A at t1401, and starts a timer simultaneously with the transmission of the keep_speed signal. The keep_speed signal is one of transmission codes (request signals) for determining the transfer rate, and is a signal for requesting the function-side controller 170 to maintain the current transfer rate.

一方、ファンクション側コントローラ170では、このkeep_speed信号の受信をシグナルディテクト信号によって確認すると、t1402において、タイマをスタートさせると共に、ホスト側コントローラ160に対するkeep_speed信号の送信を開始する。   On the other hand, when the function-side controller 170 confirms reception of the keep_speed signal with the signal detect signal, the function-side controller 170 starts a timer and starts transmission of the keep_speed signal to the host-side controller 160 at t1402.

ホスト側コントローラ160およびファンクション側コントローラ170のそれぞれは、予め定められた時間Tの期間は、特定の送信コードを送信しつづける。   Each of the host-side controller 160 and the function-side controller 170 continues to transmit a specific transmission code for a predetermined period of time T.

t1403においてホスト側コントローラ160から送信されたkeep_speed信号が、光通信路においてピット化けし、ファンクション側コントローラ170が正常に受信できなかった場合、ファンクション側コントローラ170は、t1404において、keep_speed信号に代えて、lower_speed信号をホスト側コントローラ160に送信する。このlower_speed信号は、転送速度を決めるためのリクエスト信号の1つであり、送信先(ホスト側コントローラ160)に、転送速度を下げるよう求める信号である。   When the keep_speed signal transmitted from the host-side controller 160 at t1403 is garbled in the optical communication path and cannot be normally received by the function-side controller 170, the function-side controller 170 replaces the keep_speed signal at t1404. A lower_speed signal is transmitted to the host-side controller 160. The lower_speed signal is one of request signals for determining the transfer rate, and is a signal for requesting the transmission destination (host-side controller 160) to lower the transfer rate.

ファンクション側コントローラ170からのlower_speed信号を受信したホスト側コントローラ160では、現在の転送速度Aでは、ファンクション側コントローラ170が受信を正常に行えないと認識する。そして、ファンクション側コントローラ170に対し、lower_speed信号を送信する(t1405において、送信コードをlower_speedに切り替える)。   The host-side controller 160 that has received the lower_speed signal from the function-side controller 170 recognizes that the function-side controller 170 cannot normally receive at the current transfer rate A. Then, a lower_speed signal is transmitted to the function-side controller 170 (at t1405, the transmission code is switched to lower_speed).

ファンクション側コントローラ170は、t1406において、ホスト側コントローラ160からlower_speed信号を受信することで、自身の送信したlower_speed信号がホスト側コントローラ160に認識されたと判断する。   The function-side controller 170 receives the lower_speed signal from the host-side controller 160 at t1406, and determines that the host-side controller 160 has recognized the lower_speed signal transmitted by itself.

そして、ホスト側コントローラ160およびファンクション側コントローラ170のそれぞれにおいて所定時間Tの経過後、ホスト側コントローラ160およびファンクション側コントローラ170は、その時点で送受信されている信号がlower_speed信号であるため、転送速度を、例えば半分(A/2)に低下させる。   Then, after the predetermined time T has elapsed in each of the host-side controller 160 and the function-side controller 170, the host-side controller 160 and the function-side controller 170 have a transfer rate that is the lower_speed signal because the signal being transmitted and received at that time is For example, it is reduced to half (A / 2).

すなわち、ホスト側コントローラ160が、t1407において、転送速度A/2でkeep_speed信号の送信を開始するとともに、タイマをリスタートさせる。一方、ファンクション側コントローラ170も、t1408において、転送速度A/2でkeep_speed信号の送信を開始するとともに、タイマをリスタートさせる。   That is, at t1407, the host-side controller 160 starts transmitting a keep_speed signal at the transfer rate A / 2 and restarts the timer. On the other hand, the function-side controller 170 also starts transmitting a keep_speed signal at a transfer rate A / 2 at t1408 and restarts the timer.

そして、ホスト側コントローラ160およびファンクション側コントローラ170の双方でエラーが検出されずに所定時間Tが経過すると、ホスト側コントローラ160およびファンクション側コントローラ170は、t1409、t1410において、スピードネゴシエーションの終了信号(終了リクエスト)であるEnd_Nego信号の送信を開始する。そして、ホスト側コントローラ160およびファンクション側コントローラ170のそれぞれは、相手機器からのEnd_Nego信号を受信したときに、スピードネゴシエーションを終了し、アクティブ状態へと遷移する。   Then, when a predetermined time T has elapsed without an error being detected by both the host-side controller 160 and the function-side controller 170, the host-side controller 160 and the function-side controller 170 indicate a speed negotiation end signal (end) at t1409 and t1410. Transmission of an End_Nego signal, which is a request). Each of the host-side controller 160 and the function-side controller 170 ends the speed negotiation when it receives the End_Nego signal from the counterpart device, and transitions to the active state.

ここで、図15を用いて、ホスト側コントローラ160におけるスピードネゴシエーションステートマシン161の動作を説明する。   Here, the operation of the speed negotiation state machine 161 in the host-side controller 160 will be described with reference to FIG.

ステートST0は、スピードネゴシエーションの開始ステートである。ここでは、スピードネゴシエーションステートマシン161は、送信コードをkeep_speed信号とし、タイマをリスタートした後、ステートST1に状態を遷移する。   State ST0 is a speed negotiation start state. Here, the speed negotiation state machine 161 uses the transmission code as a keep_speed signal, restarts the timer, and then transitions to the state ST1.

ステートST1は、スピードネゴシエーションを行うステートである。ここでは、スピードネゴシエーションステートマシン161は、受信コードにエラーがあるか、相手機器(ファンクション側コントローラ170)からのlower_speed信号を受信した場合は、送信コードをlower_speedに切り替える。   The state ST1 is a state for performing speed negotiation. Here, the speed negotiation state machine 161 switches the transmission code to lower_speed when there is an error in the reception code or when a lower_speed signal is received from the counterpart device (function-side controller 170).

また、スピードネゴシエーションステートマシン161は、所定時間Tの経過した後、送信コードがlower_speed信号であった場合はステートST0へ、また送信コードがkeep_speedであった場合はステートST2に状態を遷移する。   Further, after a predetermined time T has elapsed, the speed negotiation state machine 161 transitions to the state ST0 when the transmission code is a lower_speed signal, and transitions to the state ST2 when the transmission code is keep_speed.

ここで、ステートST0に遷移する場合は、転送速度を現在の転送速度に対して、例えば半分にする(転送速度の低下の幅(度合い)は、ユーザーの所望の値に設定可能である。また、この幅は、あらかじめスピードネゴシエーションステートマシン161に記憶されている)。   Here, when transitioning to the state ST0, the transfer rate is halved with respect to the current transfer rate, for example (the width (degree) of decrease in the transfer rate can be set to a value desired by the user. This width is stored in advance in the speed negotiation state machine 161).

一方、ステートST2に遷移する場合は、送信コードをEnd_Nego信号へと切り替える。このステートST2は、スピードネゴシエーションの終了を確認するステートである。相手機器(ファンクション側コントローラ170)からEnd_Nego信号を受信すると、スピードネゴシエーションを終了し、アクティプ状態へと遷移する。   On the other hand, when transitioning to the state ST2, the transmission code is switched to the End_Nego signal. This state ST2 is a state for confirming the end of the speed negotiation. When the End_Nego signal is received from the counterpart device (function-side controller 170), the speed negotiation is terminated and the state transitions to the active state.

次に、図16を用いて、ファンクション側コントローラ170におけるスピードネゴシエーションステートマシン171の動作について説明する。   Next, the operation of the speed negotiation state machine 171 in the function-side controller 170 will be described with reference to FIG.

ステートST0,ST1,ST2の各ステートにおける動作は、スピードネゴシエーションステートマシン161の動作と同一である。   The operations in the states ST0, ST1, and ST2 are the same as the operations of the speed negotiation state machine 161.

ステートST0の前の状態であるステートST4は、ホスト側コントローラ160からリクエスト信号を受信したか否かを判別するステートである。光受信機112(あるいは他の受信信号検出回路)からシグナルディテクト信号を受けた場合、スピードネゴシエーションステートマシン171は、ステートST0に状態を遷移する。   State ST4, which is a state before state ST0, is a state for determining whether or not a request signal has been received from host-side controller 160. When receiving a signal detect signal from the optical receiver 112 (or other received signal detection circuit), the speed negotiation state machine 171 changes the state to the state ST0.

上記のステートマシンをホスト側コントローラ160とファンクション側コントローラ170とがそれぞれ構成することで、複数の転送速度から一つの転送速度を決定することが可能となる。   By configuring the state machine with the host-side controller 160 and the function-side controller 170, it is possible to determine one transfer rate from a plurality of transfer rates.

エラー検出回路162および172は、ホスト−ファンクション間の光通信路におけるビットエラーの検出を行う。具体的には、例えば8B10B復調時にテーブル引きを行い、テーブルにないキャラクタを受信した場合はエラーとする。このエラーの定義については、言及しない。   The error detection circuits 162 and 172 detect bit errors in the optical communication path between the host and the function. Specifically, for example, table lookup is performed at the time of 8B10B demodulation, and an error occurs when a character not in the table is received. I will not mention the definition of this error.

スピードネゴシエーション終了後、アクティブ状態になると、エラー検出回路162および172により得られたエラー数とタイマ163および173の計測値により、一定時間におけるエラー数(エラーレート)を測定することが可能となる。前記エラーレートが予め定められた値よりも大きい場合は、通信路の品質が悪くなっている(例えばモバイル機器とPC(Personal Computer)間の通信におけるモバイル機器とPCとの通信距離の変化など)と判断されるため、現時点での転送速度での通信をあきらめ、再度スピードネゴシエーションを行い、正常な通信が可能な転送速度を再決定した後、OUTトランザクションを行うことで正常にデータ転送を行うことが可能となる。   When the active state is entered after the speed negotiation is completed, the number of errors (error rate) in a predetermined time can be measured based on the number of errors obtained by the error detection circuits 162 and 172 and the measured values of the timers 163 and 173. When the error rate is larger than a predetermined value, the quality of the communication path is deteriorated (for example, a change in the communication distance between the mobile device and the PC in communication between the mobile device and the PC (Personal Computer)). Therefore, after giving up communication at the current transfer rate, performing speed negotiation again, re-determining the transfer rate at which normal communication is possible, and then performing data transfer normally by performing an OUT transaction Is possible.

また、本実施の形態に係る説明では、ホスト−ファンクション間の光通信路はUSBのネイティブ速度よりも低い転送速度であることを想定しているが、将来的に安価でより高速な光トランシーバが製造可能となれば、ホスト−ファンクション間における光通信路でUSBのネイティブ速度でのデータ転送が可能な通信手段を用いることも考えられる。このような場合、はじめはUSBのネイティブ速度に相当する速度(8B10B変調の場合、600Mbps)でスピードネゴシエーションを行い、仮にエラーレートが悪くなかった場合は、本発明のステートマシンによるパケット制御を行わずに、純粋なリピートを行うことでUSB2.0の純粋な光化を行うことが可能となり、データ転送速度の低下を防ぐことができる。   In the description according to the present embodiment, it is assumed that the optical communication path between the host and the function has a transfer speed lower than the native speed of USB. However, an inexpensive and faster optical transceiver will be used in the future. If it can be manufactured, it is possible to use a communication means capable of transferring data at the USB native speed on the optical communication path between the host and the function. In such a case, first, speed negotiation is performed at a speed corresponding to the native speed of USB (600 Mbps in the case of 8B10B modulation). If the error rate is not bad, packet control by the state machine of the present invention is not performed. In addition, it is possible to perform pure opticalization of USB 2.0 by performing pure repeat, and it is possible to prevent a decrease in data transfer speed.

そして、600Mbpsで正常に通信ができなければ、転送速度を落とした上で本発明のステートマシンによりパケットを制御し、OUTトランザクションを行うことが可能となる。つまり、ステートマシンによるパケットの制御のON、OFFをスピードネゴシエーションの結果で判断することにより、最も高効率な方法でパケット転送を行うことが可能となる。   If communication cannot be performed normally at 600 Mbps, the packet can be controlled by the state machine of the present invention after the transfer rate is lowered, and an OUT transaction can be performed. That is, it is possible to perform packet transfer by the most efficient method by determining ON / OFF of packet control by the state machine based on the result of speed negotiation.

尚、上記実施の形態1ないし9の説明は、ホスト−ファンクション間の通信速度がUSBのネイティブ速度に比べて低速であり、従来の伝送方式ではUSBで規定されている制約時間内での通信が完了しないといった課題を解決するものとして記載されている。しかしながら、ホスト−ファンクション間の通信速度がUSBのネイティブ速度と等しい場合であっても、ホスト−ファンクション間の通信経路が非常に長くなる場合(例えば数100mの光ファイバ)には、ターンアラウンドタイムが長くなり、制約時間内にOUTトランザクションを終了できなくなる可能性がある。これは、USBの規格では、USBハブの段数(最大6段)のリピート時間とUSBのケーブル長(最大5m)によって、最大ターンアラウンドタイムが定められているためである。本発明の伝送方法は、このようにホスト−ファンクション間の通信経路が非常に長くなり、従来の伝送方式ではUSBで規定されている制約時間内での通信が完了しないといった場合においても適用可能である。   In the description of the first to ninth embodiments, the communication speed between the host and the function is lower than the native speed of the USB. In the conventional transmission method, communication within the restricted time defined by the USB is possible. It is described as solving the problem of not completing. However, even when the host-function communication speed is equal to the USB native speed, if the host-function communication path is very long (for example, an optical fiber of several hundred meters), the turnaround time is There is a possibility that the OUT transaction cannot be completed within the constraint time. This is because in the USB standard, the maximum turnaround time is determined by the repeat time of the number of stages of the USB hub (maximum of 6 stages) and the cable length of the USB (maximum of 5 m). The transmission method of the present invention can be applied even when the communication path between the host and the function becomes very long as described above, and the conventional transmission method does not complete communication within the restricted time defined by USB. is there.

また、上記実施の形態1ないし9の説明においては、USB2.0規格を想定しているが、USB2.0規格ではホスト側とファンクション側との機能がそれぞれ固定している。すなわち、USB2.0規格の下でのデータのやり取りは、PCをUSBホストとして、該PCにUSBファンクションとなるデバイス(デジタルカメラやプリンタ等)を接続して行っていた。   In the description of the first to ninth embodiments, the USB 2.0 standard is assumed. In the USB 2.0 standard, the functions on the host side and the function side are fixed. That is, data exchange under the USB 2.0 standard is performed by connecting a device (digital camera, printer, or the like) serving as a USB function to the PC using the PC as a USB host.

しかしながら、近年、USB−OTG(USB-On-The-Go)という規格が制定され、通常USBシステムで必要であったPC(USBホスト)が必要でなくなっている。すなわち、USB−OTG規格では、PC(USBホスト)なしにUSB機器同士でデータの送受信が可能であるため、利便性の向上が図られている。USB−OTGにおいては、繋がれたケーブルのコネクタの種類により、USBホストとしても、USBファンクションとしても動作可能となる。   However, in recent years, a standard called USB-OTG (USB-On-The-Go) has been established, and a PC (USB host) that is normally required in a USB system is no longer necessary. That is, in the USB-OTG standard, data can be transmitted and received between USB devices without a PC (USB host), so that convenience is improved. The USB-OTG can operate as a USB host or a USB function depending on the type of connector of the connected cable.

USB−OTGでは、USB2.0と同様に、LS(1.5Mbps),FS(12Mbps),HS(480Mbps)の転送速度をサポートしている。また、USB−OTG対応機器は、USBホストとしても、またUSBファンクションとしても動作可能である。また、USB−OTG規格においては、miniABという新しいコネクタの種類が追加された。このminiABは、miniA,miniBの両方のプラグを持ったケーブルを接続することが可能であり、接続されるケーブルのプラグの形状により、miniAが接続された場合は、USBホストとして動作し、またminiBが接続された場合は、USBファンクションとして動作する。また、HNP(Host Negotiation Protocol)という新しいプロトコルにより、ケーブルを接続した状態で、動的にホストとファンクションの機能を交代するといった機構を追加されている。つまり、USB−OTGでは、接続される機器がUSBホストとなるかUSBファンクションとなるかは、ケーブルのコネクタの種類、もしくはUSB−OTGで定められたHNP(Host Negotiation Protocol)で決定する。   USB-OTG supports transfer rates of LS (1.5 Mbps), FS (12 Mbps), and HS (480 Mbps) as in USB 2.0. Further, the USB-OTG compatible device can operate as a USB host or a USB function. In the USB-OTG standard, a new connector type called miniAB has been added. This miniAB can be connected to a cable having both miniA and miniB plugs. Depending on the shape of the plug of the connected cable, when miniA is connected, it operates as a USB host, and miniB When is connected, it operates as a USB function. In addition, a new protocol called HNP (Host Negotiation Protocol) has added a mechanism for dynamically changing the function of the host and the function while the cable is connected. In other words, in USB-OTG, whether the connected device is a USB host or a USB function is determined by the type of cable connector or HNP (Host Negotiation Protocol) defined by USB-OTG.

すなわち、本発明をこのUSB−OTGに応用する場合、USBホストおよびUSBファンクションはその役割が固定されているものではなく、伝送されるデータの方向によってその役割が入れ替わることもありうる。同様に、ホスト側コントローラおよびファンクション側コントローラもその役割が固定されているものではなく、伝送されるデータの方向によってその役割が入れ替わることも可能であるため、一つの通信コントローラがホスト側コントローラとファンクション側コントローラとの両方の機能を持っていることが好ましい。このためには、各コントローラのステートマシンにおいて、ホスト側コントローラおよびファンクション側コントローラの両方の機能として動作可能なプログラムが組み込まれていれば良い。   That is, when the present invention is applied to the USB-OTG, the roles of the USB host and the USB function are not fixed, and the roles may be switched depending on the direction of data to be transmitted. Similarly, the roles of the host-side controller and the function-side controller are not fixed, and the roles can be switched depending on the direction of the transmitted data. It is preferable to have both functions of the side controller. For this purpose, it is only necessary to incorporate a program operable as a function of both the host-side controller and the function-side controller in the state machine of each controller.

また、上記実施の形態1ないし9の説明において、ホスト側コントローラおよびファンクション側コントローラ間の通信は全二重通信である。こうすることで、ホスト−ファンクション間の通信において、半二重通信の際に必要なプリアンブルをなくすことが可能となり、通信路の使用効率を向上することができる。もちろん、半二重通信でシステムを構築しても問題はない。   In the description of the first to ninth embodiments, communication between the host-side controller and the function-side controller is full-duplex communication. By doing so, it is possible to eliminate the preamble necessary for half-duplex communication in the communication between the host and the function, and the use efficiency of the communication path can be improved. Of course, there is no problem even if the system is constructed with half-duplex communication.

本発明に係る送受信システムでは、以上の実施の形態にて説明したように、USBネイティブの速度よりも遅い速度(例えば100Mbps)でUSBホスト−ホスト側コントローラ−ファンクション側コントローラ−USBファンクション間のデータ転送を行う場合であっても、USBネイティブの速度(480Mbps)でUSBホストとUSBファンクション間のデータ転送を行う場合に比べて、全体としてほぼ同じ転送速度が得られる場合もある。   In the transmission / reception system according to the present invention, as described in the above embodiment, data transfer between the USB host, the host side controller, the function side controller, and the USB function at a speed (for example, 100 Mbps) slower than the USB native speed. Even when performing the above, there may be a case where almost the same transfer speed as a whole can be obtained as compared with the case where the data transfer between the USB host and the USB function is performed at the USB native speed (480 Mbps).

例えば、フラッシュメモリなどの低速データ転送(50Mbps)のアプリケーション用いるような場合に、上記OUTトランザクションを連続して実施すると、HDDなどの高速データ転送(200Mbps程度)が必要なアプリケーションを用いる場合に比べてOUTトランザクション間の時間を長く取る必要がある。つまり、高速データ転送のアプリケーション使用時には、トランザクション間の時間が短く、低速データ転送のアプリケーション使用時には、トランザクション間の時間が長くなる。   For example, when an application for low-speed data transfer (50 Mbps) such as a flash memory is used, the OUT transaction is continuously performed, compared to a case where an application that requires high-speed data transfer (about 200 Mbps) such as an HDD is used. It is necessary to take a long time between OUT transactions. That is, the time between transactions is short when using an application for high-speed data transfer, and the time between transactions is long when using an application for low-speed data transfer.

このため、本発明に係る方法でOUTトランザクションを行った場合、1回のOUTトランザクションに係る時間は、USBネイティブの転送速度でホスト−ファンクション間のデータ転送を行う場合に比べて長くなるものの、トランザクション間において要する時間内に終了すれば、次のOUTトランザクション開始時間は、USBのネイティブ速度の場合のOUTトランザクション開始時間と比べて遅くならない。つまり、ホスト−ファンクション間に低速通信路を用いた場合とUSBネイティブの速度で通信を行う場合とを比較すると、全体としては転送速度が変わらない結果となる。   For this reason, when an OUT transaction is performed by the method according to the present invention, the time for one OUT transaction is longer than that when data transfer between the host and the function is performed at the USB native transfer speed. If the time is finished within the time required for the interval, the next OUT transaction start time is not delayed compared to the OUT transaction start time in the case of the USB native speed. That is, comparing the case where the low-speed communication path is used between the host and the function and the case where communication is performed at the USB native speed, the result is that the transfer speed does not change as a whole.

また、USB2.0を単純に光化しようとする場合、例えば8B10Bの変調方式を用いたとすると、480×10/8=600Mbpsの帯域を持った光トランシーバが必要である。これを満たす光トランシーバはLD(レーザーダイオード)ある。一方、本発明を用いて低速な通信路でUSB2.0の転送ができる場合、低速通信路が例えば100Mbpsの場合、これを満たす光トランシーバは、LED(発光ダイオード)である。LDとLEDを比較すると、圧倒的にLEDの方が安価であり、本発明の構成により、光トランシーバのコストの削減が可能となる。   In addition, in the case where the USB 2.0 is simply made optical, for example, if an 8B10B modulation method is used, an optical transceiver having a bandwidth of 480 × 10/8 = 600 Mbps is required. An optical transceiver that satisfies this requirement is an LD (laser diode). On the other hand, when USB 2.0 can be transferred over a low-speed communication path using the present invention, when the low-speed communication path is, for example, 100 Mbps, the optical transceiver satisfying this is an LED (light emitting diode). Compared with the LD and the LED, the LED is overwhelmingly less expensive, and the configuration of the present invention enables the cost of the optical transceiver to be reduced.

さらに、コントローラにおいても、たとえばホスト側コントローラがUSBホストに一体化され、他のメタルポートをなくし、光ポートのみの構成となった場合、コントローラの必要とする帯域が、600Mbpsから100Mbpsへと大きく低くなる。これは、安価な製造プロセスにより、コントローラの作成が可能となることを意味しており、やはり本発明によりコスト削減が可能となる。   Furthermore, in the controller, for example, when the host-side controller is integrated with the USB host, and other metal ports are eliminated and only the optical port is configured, the bandwidth required by the controller is greatly reduced from 600 Mbps to 100 Mbps. Become. This means that the controller can be created by an inexpensive manufacturing process, and the present invention can also reduce the cost.

以上により、低速のアプリケーションを使用する場合、本発明によりコスト削減が可能であり、低速のアプリケーションとして例えばフラッシュメモリが搭載された携帯電話、デジタルカメラなどの機器においては、本発明が有効であると考えられる。   As described above, when a low-speed application is used, the present invention can reduce the cost. For example, the present invention is effective in a low-speed application such as a mobile phone or a digital camera equipped with a flash memory. Conceivable.

ホスト−ファンクション間の転送速度を低速としても、ターンアラウンドタイムを意識することなくOUTトランザクションを正常に行える送受信システムによって、USBにてデータ通信を行う種々の通信機器に適用できる。   Even if the transfer rate between the host and the function is low, the present invention can be applied to various communication devices that perform data communication with USB by a transmission / reception system that can normally perform an OUT transaction without being aware of the turnaround time.

本発明の一実施形態を示すものであり、実施の形態1における送受信システムの要部構成を示すブロック図である。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 illustrates an embodiment of the present invention and is a block diagram illustrating a main configuration of a transmission / reception system according to a first embodiment. 実施の形態1における送受信システムのホスト側コントローラのステートマシンの動作を示すフローチャートである。4 is a flowchart showing the operation of the state machine of the host-side controller of the transmission / reception system in the first embodiment. 実施の形態1における送受信システムのホスト側コントローラのステートマシンにおけるPINGパケットの受信に係る動作を示すフローチャートである。6 is a flowchart illustrating an operation related to reception of a PING packet in a state machine of a host-side controller of the transmission / reception system according to the first embodiment. 実施の形態1における送受信システムのファンクション側コントローラのステートマシンの動作を示すフローチャートである。3 is a flowchart showing the operation of the state machine of the function-side controller of the transmission / reception system in the first embodiment. USB2.0において各転送モードにおけるDATAパケット最大長を示す図である。It is a figure which shows the DATA packet maximum length in each transfer mode in USB2.0. 実施の形態2における送受信システムの要部構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of a main part of a transmission / reception system in a second embodiment. 実施の形態3における送受信システムの要部構成を示すブロック図である。FIG. 10 is a block diagram showing a main configuration of a transmission / reception system in a third embodiment. 実施の形態4における送受信システムの要部構成を示すブロック図である。FIG. 10 is a block diagram illustrating a main configuration of a transmission / reception system in a fourth embodiment. 実施の形態5における送受信システムの要部構成を示すブロック図である。FIG. 10 is a block diagram illustrating a main configuration of a transmission / reception system in a fifth embodiment. 実施の形態6における送受信システムのホスト側コントローラのステートマシンにおけるPINGパケットの受信に係る動作を示すフローチャートである。18 is a flowchart illustrating an operation related to reception of a PING packet in a state machine of a host-side controller of a transmission / reception system according to a sixth embodiment. 実施の形態7におけるUSBパケットおよび低速通信路におけるパケットフォーマットを示す図である。FIG. 20 is a diagram illustrating a USB packet and a packet format in a low-speed communication path in the seventh embodiment. 実施の形態8における送受信システムのホスト側コントローラのステートマシンにおけるPINGパケットの受信に係る動作を示すフローチャートである。28 is a flowchart illustrating an operation related to reception of a PING packet in a state machine of a host-side controller of a transmission / reception system according to an eighth embodiment. 実施の形態9における送受信システムの要部構成を示すブロック図である。209 is a block diagram illustrating a main configuration of a transmission / reception system according to Embodiment 9. FIG. 実施の形態9におけるスピードネゴシエーション処理を示すタイミングチャートである。10 is a timing chart illustrating a speed negotiation process according to the ninth embodiment. 実施の形態9における送受信システムのホスト側コントローラのスピードネゴシエーションステートマシンの動作を示すタイミングチャートである。FIG. 40 is a timing chart illustrating an operation of a speed negotiation state machine of the host-side controller of the transmission / reception system according to the ninth embodiment. 実施の形態9における送受信システムのファンクション側コントローラのスピードネゴシエーションステートマシンの動作を示すタイミングチャートである。FIG. 40 is a timing chart showing the operation of the speed negotiation state machine of the function-side controller of the transmission / reception system in the ninth embodiment. USB2.0におけるパケットの種類を示す図である。It is a figure which shows the kind of packet in USB2.0. USB2.0における代表的なパケットのパケットフォーマットを示す図である。It is a figure which shows the packet format of the typical packet in USB2.0. USB2.0におけるOUTトランザクションを示すタイミングチャートである。It is a timing chart which shows the OUT transaction in USB2.0. USB2.0におけるOUTトランザクションを低速通信路で行う場合のパケット転送の様子を示すタイミングチャートである。It is a timing chart which shows the mode of the packet transfer in the case of performing OUT transaction in USB2.0 by a low-speed communication path.

符号の説明Explanation of symbols

100,140,160
ホスト側コントローラ
101 ホスト側ステートマシン
(受信確認手段,格納確認手段,送信制御手段)
108 FIFO(格納手段)
110,120,130,150,170
ファンクション側コントローラ
111 ファンクション側ステートマシン(再送要求手段)
121 カウンタ(データ量確認手段)
131,141 CRCチェック回路(誤り解析手段)
100, 140, 160
Host-side controller 101 Host-side state machine
(Reception confirmation means, storage confirmation means, transmission control means)
108 FIFO (storage means)
110, 120, 130, 150, 170
Function-side controller 111 Function-side state machine (retransmission request means)
121 Counter (Data amount confirmation means)
131, 141 CRC check circuit (error analysis means)

Claims (30)

USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置から送信されるOUTパケットおよびDATAパケットをファンクション装置側に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置に転送するホスト側コントローラとして機能する通信コントローラであって、
ホスト装置からのOUTパケットおよびDATAパケットの受信を確認する受信確認手段と、
ファンクション装置側から送信されてくるハンドシェイクパケットを格納する格納手段と、
上記受信認識手段によりホスト装置からのOUTパケットおよびDATAパケット受信が確認された時点で、上記格納手段にハンドシェイクパケットが格納されているか否かを確認する格納確認手段と、
上記格納確認手段により上記ハンドシェイクパケットが格納されていないことが確認された時には、ホスト装置にNAKパケットを送信し、上記格納確認手段によりハンドシェイクパケットが格納されていることが確認された時には、ホスト装置に該ハンドシェイクパケットを送信する送信制御手段とを備えていることを特徴とする通信コントローラ。
When an OUT transaction is performed as data communication over USB, an OUT packet and a DATA packet transmitted from the host device are transferred to the function device, and a handshake packet that is a response to the OUT packet and the DATA packet is transferred to the host device. A communication controller that functions as a host-side controller,
Reception confirmation means for confirming reception of the OUT packet and DATA packet from the host device;
Storage means for storing a handshake packet transmitted from the function device side;
Storage confirmation means for confirming whether or not a handshake packet is stored in the storage means when reception of the OUT packet and DATA packet from the host device is confirmed by the reception recognition means;
When it is confirmed by the storage confirmation means that the handshake packet is not stored, a NAK packet is transmitted to the host device, and when it is confirmed by the storage confirmation means that the handshake packet is stored, A communication controller comprising transmission control means for transmitting the handshake packet to a host device.
上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、
ホスト側コントローラからのOUTパケットおよびDATAパケットの受信およびホスト側コントローラへのハンドシェイクパケットの送信に係る転送速度がUSB規格に定められた転送速度よりも低く、OUTパケットおよびDATAパケットのファンクション装置への送信およびファンクション装置からのハンドシェイクパケットの受信に係る転送速度がUSB規格に定められた転送速度であり、
さらに、ホスト側コントローラから受信したOUTパケットおよびDATAパケットを上記格納手段に格納する際の格納データ量を確認するデータ量確認手段を有し、
上記送信制御手段は、上記データ量確認手段によって確認された受信データ量が予め定められた値よりも多くなった時点で、ファンクション装置へのOUTパケットおよびDATAパケットの送信を開始することを特徴とする請求項1に記載の通信コントローラ。
The communication controller transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as
The transfer rate related to the reception of OUT packets and DATA packets from the host-side controller and the transmission of handshake packets to the host-side controller is lower than the transfer rate defined in the USB standard, and the OUT packet and DATA packet to the function device The transfer rate related to transmission and reception of handshake packets from the function device is the transfer rate defined in the USB standard,
Furthermore, it has a data amount confirmation means for confirming the storage data amount when storing the OUT packet and the DATA packet received from the host-side controller in the storage means,
The transmission control means starts transmission of OUT packets and DATA packets to the function device when the amount of received data confirmed by the data amount confirmation means exceeds a predetermined value. The communication controller according to claim 1.
上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、
ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、
上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断される場合、該DATAパケットを破棄し、ファンクション装置に転送しないことを特徴とする請求項1に記載の通信コントローラ。
The communication controller transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as
Having an error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error;
2. The communication according to claim 1, wherein when the error analysis unit determines that the received DATA packet is incorrect, the transmission control unit discards the DATA packet and does not transfer it to the function device. controller.
ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、
上記送信制御手段は、上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ファンクション側コントローラへのDATAパケットの送信をその時点で中止することを特徴とする請求項1に記載の通信コントローラ。
Having an error analysis means for analyzing whether or not the DATA packet received from the host device contains an error;
2. The transmission control unit according to claim 1, wherein when the error analysis unit determines that the received DATA packet is incorrect, the transmission control unit stops transmission of the DATA packet to the function-side controller at that time. The communication controller described.
上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、
上記受信確認手段は、ファンクション装置にDATAパケットを送信した後、該DATAパケットに対するACKパケットがファンクション装置から返ってきたか否かを確認し、
上記送信制御手段は、ファンクション装置にDATAパケットを送信した後、所定時間内に上記受信確認手段によるACKパケットの受信が確認されなかった場合には、前回ファンクション装置に送信したものと同じOUTパケットおよびDATAパケットをファンクション装置に送信する再送処理を行うことを特徴とする請求項1に記載の通信コントローラ。
The communication controller transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as
The reception confirmation means confirms whether or not an ACK packet for the DATA packet is returned from the function device after transmitting the DATA packet to the function device.
The transmission control means transmits the DATA packet to the function device, and if the reception confirmation means does not confirm the reception of the ACK packet within a predetermined time, the same OUT packet as that transmitted to the function device last time and The communication controller according to claim 1, wherein a retransmission process for transmitting a DATA packet to the function device is performed.
ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、
上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴とする請求項5に記載の通信コントローラ。
Having an error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error;
6. The communication controller according to claim 5, wherein the transmission control unit performs the retransmission process only when it is confirmed by the error analysis unit that there is no error in the DATA packet held by the own device.
ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信することを特徴とする請求項1に記載の通信コントローラ。   2. The communication controller according to claim 1, wherein, when a PING packet is received from a host device, the transmission control means transmits an ACK packet to the host device. ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、
ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、
上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、または、ファンクション側コントローラからそれ以前に送信したDATAパケットに対するACKパケットを受信していた場合は、ホスト装置に対してACKパケットを送信し、
それ以外の場合は、ホスト装置に対してNAKパケットを送信することを特徴とする請求項1に記載の通信コントローラ。
Having an error analysis means for analyzing whether or not the DATA packet received from the host device contains an error;
When a PING packet is received from the host device, the transmission control means
If it is determined by the error analysis means that the received DATA packet is incorrect, or if an ACK packet for the DATA packet transmitted before is received from the function-side controller, an ACK is sent to the host device. Send a packet,
In other cases, the communication controller according to claim 1, wherein a NAK packet is transmitted to the host device.
上記通信コントローラは、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとしても機能するものであり、
ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段と、
上記誤り解析手段により、受信したDATAパケットが誤っていると判断された場合、ホスト側コントローラにDATAパケットの再送要求を行う再送要求手段とを有していることを特徴とする請求項1に記載の通信コントローラ。
The communication controller transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side. It also functions as
Error analysis means for analyzing whether or not the DATA packet received from the host-side controller contains an error;
2. The apparatus according to claim 1, further comprising: a retransmission request unit configured to request the host-side controller to retransmit the DATA packet when the error analysis unit determines that the received DATA packet is incorrect. Communication controller.
ファンクション側コントローラから再送要求を受信した場合には、前回ファンクション側コントローラに送信したDATAパケットと同じDATAパケットをホスト側コントローラに送信する再送処理を行うことを特徴とする請求項1に記載の通信コントローラ。   2. The communication controller according to claim 1, wherein when a retransmission request is received from the function-side controller, a retransmission process is performed in which the same DATA packet as the DATA packet transmitted to the function-side controller is transmitted to the host-side controller last time. . ホスト装置から受信したDATAパケットが誤りを含むものであるか否かを解析する誤り解析手段を有し、
上記送信制御手段は、上記再送処理を、上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴とする請求項10に記載の通信コントローラ。
Having an error analysis means for analyzing whether or not the DATA packet received from the host device contains an error;
11. The communication controller according to claim 10, wherein the transmission control unit performs the retransmission process only when it is confirmed by the error analysis unit that there is no error in the DATA packet held by the own device.
上記誤り解析手段により自機器が保有しているDATAパケットに誤りがないと確認された場合、ファンクション側コントローラへ送信するDATAパケットのパケットフォーマット中に、該DATAパケットには誤りが無いことを示すフラグを立てることを特徴とする請求項11に記載の通信コントローラ。   When it is confirmed by the error analysis means that there is no error in the DATA packet held by the device, a flag indicating that the DATA packet has no error during the packet format of the DATA packet to be transmitted to the function side controller. The communication controller according to claim 11, wherein: ホスト側コントローラからDATAパケットを受信し、該DATAパケットにおいて誤りのあることが上記誤り解析手段により検出された場合、
上記ホスト側コントローラで保有されているDATAパケットにおける誤りの有無を示すフラグが受信したDATAパケットに立てられており、該フラグによりホスト側コントローラ側で誤りの無いDATAパケットが保有されていることが確認された場合のみ上記再送要求を行うことを特徴とする請求項9に記載の通信コントローラ。
When a DATA packet is received from the host-side controller and an error in the DATA packet is detected by the error analysis means,
A flag indicating whether or not there is an error in the DATA packet held by the host-side controller is set in the received DATA packet, and it is confirmed that the host-side controller has an error-free DATA packet by the flag. The communication controller according to claim 9, wherein the retransmission request is made only when the request is made.
ファンクション側コントローラから再送要求を受信し、その後、ホスト装置からPINGパケットを受信した場合、上記送信制御手段は、ホスト装置に対してACKパケットを送信することを特徴とする請求項1に記載の通信コントローラ。   2. The communication according to claim 1, wherein when the retransmission request is received from the function-side controller and then the PING packet is received from the host device, the transmission control unit transmits an ACK packet to the host device. controller. 上記OUTトランザクションの実行前に、通信相手側の通信コントローラと転送速度調整を行うことを特徴とする請求項1に記載の通信コントローラ。   2. The communication controller according to claim 1, wherein transfer rate adjustment is performed with a communication controller on a communication partner side before execution of the OUT transaction. 上記転送速度調整において、USB規格に定められた転送速度で通信が可能であると判断される場合は、
通信相手側の通信コントローラに送信される各パケットは、パケットの送信タイミング制御を行わずに、変復調のみを行って相手側の通信コントローラへの転送を行うことを特徴とする請求項15記載の通信コントローラ。
In the above transfer speed adjustment, when it is determined that communication is possible at the transfer speed defined in the USB standard,
16. The communication according to claim 15, wherein each packet transmitted to the communication controller on the other side of the communication is transferred to the communication controller on the other side by performing only modulation / demodulation without performing packet transmission timing control. controller.
通信相手側の通信コントローラとの間での通信路におけるエラーレートを解析し、該エラーレートが予め定められたエラーレートよりも悪いと判断される場合、上記転送速度調整を行って転送速度を下げることを特徴とする請求項15記載の通信コントローラ。   Analyzing the error rate on the communication path with the communication controller on the communication partner side, and if the error rate is determined to be worse than the predetermined error rate, the transfer rate is adjusted to lower the transfer rate The communication controller according to claim 15. 通信相手側の通信コントローラとの間で、全二重通信を行うことを特徴とする請求項1ないし17の何れかに記載の通信コントローラ。   The communication controller according to any one of claims 1 to 17, wherein full-duplex communication is performed with a communication controller on a communication partner side. 通信相手側の通信コントローラとの間の通信が、光ファイバを用いた通信路によって行われるものであることを特徴とする請求項1ないし18の何れかに記載の通信コントローラ。   The communication controller according to any one of claims 1 to 18, wherein communication with a communication controller on a communication partner side is performed by a communication path using an optical fiber. 通信相手側の通信コントローラとの間の通信が、電波を用いた無線によって行われるものであることを特徴とする請求項1ないし17の何れかに記載の通信コントローラ。   The communication controller according to any one of claims 1 to 17, wherein communication with a communication controller on a communication partner side is performed by radio using radio waves. 通信相手側の通信コントローラとの間の通信が、光を用いた空間伝送によって行われるものであることを特徴とする請求項1ないし18の何れかに記載の通信コントローラ。   The communication controller according to any one of claims 1 to 18, wherein communication with a communication controller on a communication partner side is performed by spatial transmission using light. USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして通信コントローラであって、
ホスト装置側との送信に係る転送速度がUSB規格に定められた転送速度よりも低く、ファンクション装置への送信に係る転送速度がUSB規格に定められた転送速度であり、
ホスト装置側から送信されるOUTパケットおよびDATAパケットの受信が完了した時点で、該OUTパケットおよびDATAパケットのファンクション装置への転送を開始することを特徴とする通信コントローラ。
When an OUT transaction is performed as data communication over USB, the USB standard OUT packet and DATA packet transmitted from the host device side are transferred to the function device, and a handshake packet that is a response to the OUT packet and DATA packet is sent to the host. A communication controller as a function-side controller that transfers to the device side,
The transfer rate related to transmission with the host device side is lower than the transfer rate defined in the USB standard, and the transfer rate related to transmission to the function device is the transfer rate defined in the USB standard,
A communication controller, which starts transfer of an OUT packet and a DATA packet to a function device when reception of an OUT packet and a DATA packet transmitted from the host device side is completed.
USB上のデータ通信としてOUTトランザクションを行う際に、ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして通信コントローラであって、
ホスト装置側との送信に係る転送速度がUSB規格に定められた転送速度よりも低く、ファンクション装置への送信に係る転送速度がUSB規格に定められた転送速度であり、
ホスト側コントローラから受信したOUTパケットおよびDATAパケットを上記格納手段に格納する際の格納データ量を確認するデータ量確認手段を有し、
上記送信制御手段は、上記データ量確認手段によって確認された受信データ量が予め定められた値よりも多くなった時点で、ファンクション装置へのOUTパケットおよびDATAパケットの送信を開始することを特徴とする通信コントローラ。
When an OUT transaction is performed as data communication over USB, the USB standard OUT packet and DATA packet transmitted from the host device side are transferred to the function device, and a handshake packet that is a response to the OUT packet and DATA packet is sent to the host. A communication controller as a function-side controller that transfers to the device side,
The transfer rate related to transmission with the host device side is lower than the transfer rate defined in the USB standard, and the transfer rate related to transmission to the function device is the transfer rate defined in the USB standard,
Data amount confirmation means for confirming the amount of stored data when storing the OUT packet and DATA packet received from the host-side controller in the storage means;
The transmission control means starts transmission of OUT packets and DATA packets to the function device when the amount of received data confirmed by the data amount confirmation means exceeds a predetermined value. Communication controller.
ファンクション装置にDATAパケットを送信した後、該DATAパケットに対するACKパケットがファンクション装置から返ってきたか否かを確認し、DATAパケットの送信から所定時間内に上記受信確認手段によるACKパケットの受信が確認されなかった場合には、前回ファンクション装置に送信したものと同じOUTパケットおよびDATAパケットをファンクション装置に送信する再送処理を行うことを特徴とする請求項22または23に記載の通信コントローラ。   After transmitting the DATA packet to the function device, it is confirmed whether or not an ACK packet corresponding to the DATA packet has been returned from the function device, and the receipt of the ACK packet by the reception confirmation means is confirmed within a predetermined time from the transmission of the DATA packet. 24. The communication controller according to claim 22 or 23, wherein if there is not, retransmission processing for transmitting the same OUT packet and DATA packet as those transmitted to the function device last time to the function device is performed. ホスト側コントローラから受信したDATAパケットが誤りを含むものであるか否かを解析し、
上記再送処理を、上記解析により自機器が保有しているDATAパケットに誤りがないと確認された場合のみ行うことを特徴とする請求項24に記載の通信コントローラ。
Analyzes whether or not the DATA packet received from the host-side controller contains an error,
25. The communication controller according to claim 24, wherein the retransmission process is performed only when it is confirmed by the analysis that the DATA packet held by the device is free of errors.
ホスト装置側から受信したDATAパケットが誤りを含むものであるか否かを解析し、上記解析により、受信したDATAパケットが誤っていると判断された場合、ホスト側コントローラにDATAパケットの再送要求を行うことを特徴とする請求項22または23に記載の通信コントローラ。   Analyzing whether or not the DATA packet received from the host device side includes an error, and if it is determined by the above analysis that the received DATA packet is incorrect, the host side controller is requested to retransmit the DATA packet. 24. The communication controller according to claim 22 or 23. ホスト装置側からDATAパケットを受信し、該DATAパケットにおいて誤りのあることが検出された場合、
上記ホスト側コントローラで保有されているDATAパケットにおける誤りの有無を示すフラグが受信したDATAパケットに立てられており、該フラグによりホスト側コントローラ側で誤りの無いDATAパケットが保有されていることが確認された場合のみ上記再送要求を行うことを特徴とする請求項26に記載の通信コントローラ。
When a DATA packet is received from the host device side and an error is detected in the DATA packet,
A flag indicating whether or not there is an error in the DATA packet held by the host-side controller is set in the received DATA packet, and it is confirmed that the host-side controller has an error-free DATA packet by the flag. 27. The communication controller according to claim 26, wherein the retransmission request is made only when the request is made.
上記請求項1,4,7,8,10,11,12,14の何れかに記載のホスト側コントローラとして機能する通信コントローラと、
ホスト装置側から送信されるUSB規格のOUTパケットおよびDATAパケットをファンクション装置に転送し、該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットをホスト装置側に転送するファンクション側コントローラとして機能する通信コントローラとを備えたことを特徴とする通信システム。
A communication controller that functions as a host-side controller according to any one of claims 1, 4, 7, 8, 10, 11, 12, and 14;
A communication controller that functions as a function-side controller that transfers a USB standard OUT packet and DATA packet transmitted from the host device side to the function device, and transfers a handshake packet as a response to the OUT packet and DATA packet to the host device side A communication system comprising:
請求項1ないし27の何れかに記載の通信コントローラを備えた通信機器。   A communication device comprising the communication controller according to any one of claims 1 to 27. ホスト装置からのOUTパケットおよびDATAパケットの受信を確認すると、その時点で該OUTパケットおよびDATAパケットに対する返答となるハンドシェイクパケットを受信しているか否かを確認し、
上記ハンドシェイクパケットを受信している場合には、受信した上記OUTパケットおよびDATAパケットに対して該ハンドシェイクパケットをホスト装置に送信し、
上記ハンドシェイクパケットを受信していない場合には、ホスト装置にNAKパケットを送信することを特徴とする通信方法。
When the reception of the OUT packet and the DATA packet from the host device is confirmed, it is confirmed whether or not a handshake packet that is a response to the OUT packet and the DATA packet is received at that time.
When the handshake packet is received, the handshake packet is transmitted to the host device in response to the received OUT packet and DATA packet,
A communication method characterized by transmitting a NAK packet to a host device when the handshake packet is not received.
JP2003337867A 2003-09-29 2003-09-29 Communication controller, communications system, communication apparatus, and communication method Pending JP2005107683A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2003337867A JP2005107683A (en) 2003-09-29 2003-09-29 Communication controller, communications system, communication apparatus, and communication method
TW093129262A TWI296083B (en) 2003-09-29 2004-09-27 Communication controller, host-side controller, communication system, usb system, communication equipment, communication method, packet-based communication method, packet-based communication program, and storage medium
CNB2004100120211A CN100366029C (en) 2003-09-29 2004-09-28 Communication controller, host-side controller, communication equipment, communication system and method
US10/950,563 US7461318B2 (en) 2003-09-29 2004-09-28 Communication system realizing USB communications between a host computer and its peripheral device and a communication controller transmitting a USB signal under the USB standard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003337867A JP2005107683A (en) 2003-09-29 2003-09-29 Communication controller, communications system, communication apparatus, and communication method

Publications (1)

Publication Number Publication Date
JP2005107683A true JP2005107683A (en) 2005-04-21

Family

ID=34533564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003337867A Pending JP2005107683A (en) 2003-09-29 2003-09-29 Communication controller, communications system, communication apparatus, and communication method

Country Status (1)

Country Link
JP (1) JP2005107683A (en)

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019255A (en) * 2004-03-24 2011-01-27 Qualcomm Inc High data rate interface apparatus and method
JP2011198046A (en) * 2010-03-19 2011-10-06 Kddi Corp Repeater and method
JP2011198047A (en) * 2010-03-19 2011-10-06 Kddi Corp Usb repeater and method
US8539119B2 (en) 2004-11-24 2013-09-17 Qualcomm Incorporated Methods and apparatus for exchanging messages having a digital data interface device message format
US8606946B2 (en) 2003-11-12 2013-12-10 Qualcomm Incorporated Method, system and computer program for driving a data signal in data interface communication data link
US8611215B2 (en) 2005-11-23 2013-12-17 Qualcomm Incorporated Systems and methods for digital data transmission rate control
US8625625B2 (en) 2004-03-10 2014-01-07 Qualcomm Incorporated High data rate interface apparatus and method
US8630305B2 (en) 2004-06-04 2014-01-14 Qualcomm Incorporated High data rate interface apparatus and method
US8635358B2 (en) 2003-09-10 2014-01-21 Qualcomm Incorporated High data rate interface
US8650304B2 (en) 2004-06-04 2014-02-11 Qualcomm Incorporated Determining a pre skew and post skew calibration data rate in a mobile display digital interface (MDDI) communication system
US8667363B2 (en) 2004-11-24 2014-03-04 Qualcomm Incorporated Systems and methods for implementing cyclic redundancy checks
US8670457B2 (en) 2003-12-08 2014-03-11 Qualcomm Incorporated High data rate interface with improved link synchronization
US8681817B2 (en) 2003-06-02 2014-03-25 Qualcomm Incorporated Generating and implementing a signal protocol and interface for higher data rates
US8687658B2 (en) 2003-11-25 2014-04-01 Qualcomm Incorporated High data rate interface with improved link synchronization
US8694652B2 (en) 2003-10-15 2014-04-08 Qualcomm Incorporated Method, system and computer program for adding a field to a client capability packet sent from a client to a host
US8692838B2 (en) 2004-11-24 2014-04-08 Qualcomm Incorporated Methods and systems for updating a buffer
US8692839B2 (en) 2005-11-23 2014-04-08 Qualcomm Incorporated Methods and systems for updating a buffer
US8694663B2 (en) 2001-09-06 2014-04-08 Qualcomm Incorporated System for transferring digital data at a high rate between a host and a client over a communication path for presentation to a user
US8705521B2 (en) 2004-03-17 2014-04-22 Qualcomm Incorporated High data rate interface apparatus and method
US8705571B2 (en) 2003-08-13 2014-04-22 Qualcomm Incorporated Signal interface for higher data rates
US8730069B2 (en) 2005-11-23 2014-05-20 Qualcomm Incorporated Double data rate serial encoder
US8745251B2 (en) 2000-12-15 2014-06-03 Qualcomm Incorporated Power reduction system for an apparatus for high data rate signal transfer using a communication protocol
US8756294B2 (en) 2003-10-29 2014-06-17 Qualcomm Incorporated High data rate interface
US8873584B2 (en) 2004-11-24 2014-10-28 Qualcomm Incorporated Digital data interface device
JP2014216738A (en) * 2013-04-24 2014-11-17 セイコーエプソン株式会社 Communication circuit, physical value measuring apparatus, electronic apparatus, mobile apparatus, and communication method
KR20160031494A (en) * 2013-06-20 2016-03-22 마이크론 테크놀로지, 인코포레이티드 Encapsulation Enabled PCIE Virtualisation
JP2016206891A (en) * 2015-04-21 2016-12-08 株式会社ソシオネクスト Access interruption circuit, semiconductor integrated circuit, and access interruption method

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8745251B2 (en) 2000-12-15 2014-06-03 Qualcomm Incorporated Power reduction system for an apparatus for high data rate signal transfer using a communication protocol
US8812706B1 (en) 2001-09-06 2014-08-19 Qualcomm Incorporated Method and apparatus for compensating for mismatched delays in signals of a mobile display interface (MDDI) system
US8694663B2 (en) 2001-09-06 2014-04-08 Qualcomm Incorporated System for transferring digital data at a high rate between a host and a client over a communication path for presentation to a user
US8681817B2 (en) 2003-06-02 2014-03-25 Qualcomm Incorporated Generating and implementing a signal protocol and interface for higher data rates
US8705579B2 (en) 2003-06-02 2014-04-22 Qualcomm Incorporated Generating and implementing a signal protocol and interface for higher data rates
US8700744B2 (en) 2003-06-02 2014-04-15 Qualcomm Incorporated Generating and implementing a signal protocol and interface for higher data rates
US8705571B2 (en) 2003-08-13 2014-04-22 Qualcomm Incorporated Signal interface for higher data rates
US8719334B2 (en) 2003-09-10 2014-05-06 Qualcomm Incorporated High data rate interface
US8635358B2 (en) 2003-09-10 2014-01-21 Qualcomm Incorporated High data rate interface
US8694652B2 (en) 2003-10-15 2014-04-08 Qualcomm Incorporated Method, system and computer program for adding a field to a client capability packet sent from a client to a host
US8756294B2 (en) 2003-10-29 2014-06-17 Qualcomm Incorporated High data rate interface
US8606946B2 (en) 2003-11-12 2013-12-10 Qualcomm Incorporated Method, system and computer program for driving a data signal in data interface communication data link
US8687658B2 (en) 2003-11-25 2014-04-01 Qualcomm Incorporated High data rate interface with improved link synchronization
US8670457B2 (en) 2003-12-08 2014-03-11 Qualcomm Incorporated High data rate interface with improved link synchronization
US8669988B2 (en) 2004-03-10 2014-03-11 Qualcomm Incorporated High data rate interface apparatus and method
US8730913B2 (en) 2004-03-10 2014-05-20 Qualcomm Incorporated High data rate interface apparatus and method
US8625625B2 (en) 2004-03-10 2014-01-07 Qualcomm Incorporated High data rate interface apparatus and method
US8705521B2 (en) 2004-03-17 2014-04-22 Qualcomm Incorporated High data rate interface apparatus and method
JP2011019255A (en) * 2004-03-24 2011-01-27 Qualcomm Inc High data rate interface apparatus and method
US8630305B2 (en) 2004-06-04 2014-01-14 Qualcomm Incorporated High data rate interface apparatus and method
US8650304B2 (en) 2004-06-04 2014-02-11 Qualcomm Incorporated Determining a pre skew and post skew calibration data rate in a mobile display digital interface (MDDI) communication system
US8699330B2 (en) 2004-11-24 2014-04-15 Qualcomm Incorporated Systems and methods for digital data transmission rate control
US8667363B2 (en) 2004-11-24 2014-03-04 Qualcomm Incorporated Systems and methods for implementing cyclic redundancy checks
US8539119B2 (en) 2004-11-24 2013-09-17 Qualcomm Incorporated Methods and apparatus for exchanging messages having a digital data interface device message format
US8873584B2 (en) 2004-11-24 2014-10-28 Qualcomm Incorporated Digital data interface device
US8692838B2 (en) 2004-11-24 2014-04-08 Qualcomm Incorporated Methods and systems for updating a buffer
US8730069B2 (en) 2005-11-23 2014-05-20 Qualcomm Incorporated Double data rate serial encoder
US8611215B2 (en) 2005-11-23 2013-12-17 Qualcomm Incorporated Systems and methods for digital data transmission rate control
US8692839B2 (en) 2005-11-23 2014-04-08 Qualcomm Incorporated Methods and systems for updating a buffer
JP2011198047A (en) * 2010-03-19 2011-10-06 Kddi Corp Usb repeater and method
JP2011198046A (en) * 2010-03-19 2011-10-06 Kddi Corp Repeater and method
JP2014216738A (en) * 2013-04-24 2014-11-17 セイコーエプソン株式会社 Communication circuit, physical value measuring apparatus, electronic apparatus, mobile apparatus, and communication method
KR20160031494A (en) * 2013-06-20 2016-03-22 마이크론 테크놀로지, 인코포레이티드 Encapsulation Enabled PCIE Virtualisation
KR102144330B1 (en) 2013-06-20 2020-08-13 마이크론 테크놀로지, 인코포레이티드 Encapsulation Enabled PCIE Virtualisation
JP2016206891A (en) * 2015-04-21 2016-12-08 株式会社ソシオネクスト Access interruption circuit, semiconductor integrated circuit, and access interruption method

Similar Documents

Publication Publication Date Title
JP2005107683A (en) Communication controller, communications system, communication apparatus, and communication method
US7461318B2 (en) Communication system realizing USB communications between a host computer and its peripheral device and a communication controller transmitting a USB signal under the USB standard
TWI294083B (en) Device-side controller, host-side controller, communication controller, usb system, and packet communications method
EP2397949B1 (en) Flow control for universal serial bus (USB)
JP3632695B2 (en) Data transfer control device, electronic device, and data transfer control method
US9047418B2 (en) Methods and devices for extending USB 3.0-compliant communication
US9081905B2 (en) Low latency interconnect bus protocol
KR20120091321A (en) Systems, methods and apparatus for data communication
WO2009012426A2 (en) A distributed interconnect bus apparatus
JP2007088775A (en) Radio communication system, device, and method
JP4971366B2 (en) Method and apparatus for transmitting medium busy signal to other devices
EP0886410A2 (en) Data communication method, data communication apparatus, and data communication program recording medium
JP2005107677A (en) Communication controller, communication system, communication apparatus, and communication method
JP2005129008A (en) Host-side controller, usb system, communication controller, method and system for packet-based communication, and recording medium
CN114443533A (en) Removal of USB devices and PING intervention in extended environments
US9477615B1 (en) Bi-directional low latency bus mode
JP2007074641A (en) Communication system
JP2014222466A (en) Information processing device, information processing system, and information processing system communication method
US20050273541A1 (en) Circuit and method for adaptively recognizing a data packet in a universal serial bus network device
CN113572569B (en) Transmission rate switching method and related device
JP5691600B2 (en) Communication circuit device and electronic device
CN116737616A (en) Method, controller and memory device for error handling of interconnect protocol
JP2002281034A (en) Information transfer device
JP2002077304A (en) Communication system, communication control method, and record medium with its control program recorded thereon
JP2006109312A (en) Communication control apparatus and its method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080415

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080415

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081028