JP2004362422A - Data transfer control device, connecting equipment, and data transfer control method - Google Patents

Data transfer control device, connecting equipment, and data transfer control method Download PDF

Info

Publication number
JP2004362422A
JP2004362422A JP2003162216A JP2003162216A JP2004362422A JP 2004362422 A JP2004362422 A JP 2004362422A JP 2003162216 A JP2003162216 A JP 2003162216A JP 2003162216 A JP2003162216 A JP 2003162216A JP 2004362422 A JP2004362422 A JP 2004362422A
Authority
JP
Japan
Prior art keywords
usb
data
usb device
token
command
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.)
Withdrawn
Application number
JP2003162216A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Kanbara
義幸 神原
Takuya Ishida
卓也 石田
Shinji Kobayashi
信治 小林
Haruo Nishida
治雄 西田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003162216A priority Critical patent/JP2004362422A/en
Publication of JP2004362422A publication Critical patent/JP2004362422A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data transfer control device, connecting equipment and data transfer control method enabling the transfer of data between first and second USB devices. <P>SOLUTION: A transfer controller 80 used in the connecting equipment issues an IN token for receiving a command to either one or both of the USB devices 1 and 2. When data including a command is received as a response to the IN token, the data transfer between the USB devices 1 and 2 is controlled based on the received command. The IN token is issued to the USB device 1 to receive data, and an OUT token is issued to the USB device 2 to transmit the received data to the USB device 2. When not a NAK (or zero-length packet) but data are received as a response to the IN token issued to the USB device 1, the data received from the USB device 1 are transmitted to the USB device 2. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、データ転送制御装置、接続機器及びデータ転送制御方法に関する。
【0002】
【背景技術】
従来より、パーソナルコンピュータなどのホストとペリフェラルデバイスを接続するためのシリアルバス・インターフェース規格として、USB(Universal Serial Bus)が知られている。また、従来のUSB1.1規格に対する互換性を保ちながら、高速な480Mbps(HSモード)の転送速度を実現できる規格としてUSB2.0も策定され、注目を浴びている。
【0003】
【特許文献1】
特開2002−135132号公報
【0004】
【発明が解決しようとする課題】
USBにおいては、IEEE1394とは異なり、データ転送の主導権をホストが有している。即ちデータ転送のトランザクションを発行するのはホストであり、データ転送に関する大部分の制御はホストが行う。従って第1、第2のUSBデバイス(ペリフェラルデバイス)間でデータのやり取りを行う場合には、パーソナルコンピュータを用意し、このパーソナルコンピュータに第1、第2のUSBデバイスを接続する必要がある。このため、第1、第2のUSBデバイス間を直接に接続してデータ転送を行うことが難しかった。
【0005】
また、USBを用いた従来のデータ転送制御手法では、USBデバイス側からホストに対して能動的にコマンドを発行して、データ転送を制御することはできなかった。
【0006】
本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、第1、第2のUSBデバイス間でのデータ転送を可能にするデータ転送制御装置、接続機器及びデータ転送制御方法を提供することにある。
【0007】
【課題を解決するための手段】
本発明は、USB(Universal Serial Bus)を用いて第1、第2のUSBデバイスを接続する接続機器のためのデータ転送制御装置であって、転送データを一時的に格納するデータバッファと、データ転送を制御する転送コントローラとを含み、前記転送コントローラが、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してコマンド受信のためのINトークンを発行し、コマンド受信のためのINトークンに対する応答としてコマンドを含むデータを受信した場合に、受信したコマンドに基づいて、前記第1、第2のUSBデバイス間のデータ転送を制御するデータ転送制御装置に関係する。
【0008】
本発明によれば、第1、第2のUSBデバイスのいずれか一方又は両方に対してコマンド受信のためのINトークンが発行される。そしてこのINトークンに対する応答してコマンドを受信すると、このコマンド(コマンドの解釈結果)に基づいて第1、第2のUSBデバイス間のデータ転送が制御される。これにより、ホストが常に主導権を有する通常のUSBデータ転送手法とは異なり、USBデバイス側に主導権を持たせた第1、第2のUSBデバイス間でのデータ転送制御を実現できる。
【0009】
また本発明では、前記転送コントローラが、コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの一方のUSBデバイスに対してINトークンを発行して、前記一方のUSBデバイスからデータを受信し、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のUSBデバイスに送信するようにしてもよい。
【0010】
このようにすれば、INトークンにより発生するINトランザクションとOUTトークンにより発生するOUTトランザクションを上手く利用して、第1、第2のUSBデバイス間でのデータ転送を実現できる。
【0011】
また本発明では、前記転送コントローラが、コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、ライトコマンド又はリードコマンドを含むデータを他方のUSBデバイスに送信するようにしてもよい。
【0012】
また本発明では、前記転送コントローラが、コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの一方のUSBデバイスに対してOUTトークンを発行して、リードコマンドを含むデータを前記一方のUSBデバイスに送信し、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、ライトコマンドを含むデータを前記他方のUSBデバイスに送信するようにしてもよい。
【0013】
また本発明では、前記転送コントローラが、前記コマンドにより前記第1のUSBデバイスから前記第2のUSBデバイスにデータを転送することが指示された場合には、前記第1のUSBデバイスに対してINトークンを発行して、前記第1のUSBデバイスからデータを受信し、前記第2のUSBデバイスに対してOUTトークンを発行して、前記第1のUSBデバイスから受信したデータを前記第2のUSBデバイスに送信し、前記コマンドにより前記第2のUSBデバイスから前記第1のUSBデバイスにデータを転送することが指示された場合には、前記第2のUSBデバイスに対してINトークンを発行して、前記第2のUSBデバイスからデータを受信し、前記第1のUSBデバイスに対してOUTトークンを発行して、前記第2のUSBデバイスから受信したデータを前記第1のUSBデバイスに送信するようにしてもよい。
【0014】
このようにすれば、第1のUSBデバイスから第2のUSBデバイスへの第1の方向でのデータ転送と、第2のUSBデバイスから第1のUSBデバイスへの第2の方向でのデータ転送を、USBデバイスからのコマンドに基づいて簡素に実現できる。
【0015】
また本発明は、USB(Universal Serial Bus)を用いて第1、第2のUSBデバイスを接続する接続機器のためのデータ転送制御装置であって、転送データを一時的に格納するデータバッファと、データ転送を制御する転送コントローラとを含み、前記転送コントローラが、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してINトークンを発行し、発行したINトークンに対する応答として、前記第1、第2のUSBデバイスの一方のUSBデバイスから、NAK(Negative AcKnowledgment)ではなく零長ではないデータを受信した場合には、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のデバイスに送信するデータ転送制御装置に関係する。
【0016】
本発明によれば、第1、第2のUSBデバイスのいずれか一方又は両方に対してINトークンが発行される。そしてこのINトークンに対する応答して、一方のUSBデバイスからデータ(零長ではないデータ)を受信すると、他方のUSBデバイスに対してOUTトークンが発行されて、受信データが他方のUSBデバイスに送信される。これにより、USBデバイス側に主導権を持たせながら、第1、第2のUSBデバイス間でデータを転送することが可能になる。
【0017】
また本発明では、前記転送コントローラが、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してインタラプト転送を用いて定期的にINトークンを発行するようにしてもよい。
【0018】
また本発明では、前記転送コントローラが、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してバルク転送を用いて定期的に又は不定期にINトークンを発行するようにしてもよい。
【0019】
また本発明は上記のいずれかのデータ転送制御装置と、前記第1のUSBデバイスを接続するための第1のコネクタと、前記第2のUSBデバイスを接続するための第2のコネクタとを含む接続機器に関係する。
【0020】
このような構成の接続機器によれば、あたかも第1、第2のUSBデバイス間で直接にデータ転送しているかのように見えるデータ転送を実現できる。
【0021】
また本発明は、USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御装置であって、転送データを一時的に格納するデータバッファと、データ転送を制御する転送コントローラとを含み、前記転送コントローラが、送信すべきコマンドが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、送信すべきコマンドがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、コマンドを含むデータを送信するデータ転送制御装置に関係する。
【0022】
本発明によれば、コマンドの非送信時には、INトークンに対する応答としてNAK又は零長パケットが送信される。一方、コマンドの送信時には、INトークンに対する応答としてコマンドが送信される。これにより、ホストが常に主導権を有する通常のUSBデータ転送手法とは異なり、USBデバイスに主導権を持たせた第1、第2のUSBデバイス間でのデータ転送制御を実現できる。
【0023】
また本発明は、USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御装置であって、転送データを一時的に格納するデータバッファと、データ転送を制御する転送コントローラとを含み、前記転送コントローラが、前記第2のUSBデバイスに送信すべきデータが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、前記第2のUSBデバイスに送信すべきデータがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、前記第2のUSBデバイスに送信すべきデータを送信するデータ転送制御装置に関係する。
【0024】
本発明によれば、データの非送信時には、INトークンに対する応答としてNAK又は零長パケットが送信される。一方、データの送信時には、INトークンに対する応答としてコマンドが送信される。これにより、USBデバイスに主導権を持たせながら、第1、第2のUSBデバイス間でデータを転送することが可能になる。
【0025】
また本発明は、USB(Universal Serial Bus)を介して第1、第2のUSBデバイス間でデータを転送するためのデータ転送制御方法であって、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してコマンド受信のためのINトークンを発行し、コマンド受信のためのINトークンに対する応答としてコマンドを含むデータを受信した場合に、受信したコマンドに基づいて、前記第1、第2のUSBデバイス間のデータ転送を制御するデータ転送制御方法に関係する。
【0026】
また本発明は、USB(Universal Serial Bus)を介して第1、第2のUSBデバイス間でデータを転送するためのデータ転送制御方法であって、前記第1、第2のUSBデバイスのいずれか一方又は両方に対してINトークンを発行し、発行したINトークンに対する応答として、前記第1、第2のUSBデバイスの一方のUSBデバイスから、NAK(Negative AcKnowledgment)ではなく零長ではないデータを受信した場合には、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のデバイスに送信するデータ転送制御方法に関係する。
【0027】
また本発明は、USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御方法であって、送信すべきコマンドが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、送信すべきコマンドがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、コマンドを含むデータを送信するデータ転送制御方法に関係する。
【0028】
また本発明は、USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御方法であって、前記第2のUSBデバイスに送信すべきデータが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、前記第2のUSBデバイスに送信すべきデータがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、前記第2のUSBデバイスに送信すべきデータを送信するデータ転送制御方法に関係する。
【0029】
【発明の実施の形態】
以下、本実施形態について説明する。なお以下に説明する本実施形態は特許請求の範囲に記載された本発明の内容を不当に限定するものではなく、本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。
【0030】
1.USB
USBではデータ転送の主導権をホストが有している。このためホストの処理負荷は重くなるが、ホストとなるパーソナルコンピュータ等は高性能なCPU(プロセッサ)を有しているため、それほど問題にはならない。一方、USBデバイス(USBデバイス機器、ターゲット)はホストからの要求に対して単に応答するだけでよいため、USBデバイス側の処理、構成については簡素化できるという利点がある。USBではこのようなホスト主導のデータ転送を実現するために、図1(A)に示すようなエンドポイント(EP0〜15)がUSBデバイス側に用意される。ホストは、デバイスアドレスとエンドポイント番号を指定することで、所望のエンドポイントへのデータ送信や、所望のエンドポイントからのデータ受信を自由に行うことができる。
【0031】
なおUSBでは、データ転送のタイプとして、コントロール転送、アイソクロナス転送、インタラプト転送、バルク転送が用意されている。コントロール転送は、ホストとUSBデバイス(ターゲット)との間でエンドポイント0を介して行われる制御用の転送モードである。アイソクロナス転送は、画像や音声のデータを定期的に転送するために用意された転送モードである。インタラプト転送は、比較的低い転送速度で少量のデータを定期的に転送するために用意された転送モードである。バルク転送は、不定期に発生する大量のデータを転送するために用意された転送モードである。
【0032】
図1(B)に示すように、USBのトランザクションは、トークンパケットと、オプショナルなデータパケットと、オプショナルなハンドシェークパケットにより構成される。
【0033】
ここでトークンパケットは、ホストがUSBデバイスのエンドポイントのリードやライトを要求する場合などに使用されるパケットである。このトークンパケットは、PID(OUT、IN、SOF、SETUPなどのパケットID)、ADDR(デバイスアドレス)、ENDP(エンドポイント番号)、CRC(Cyclic Redundancy Check)のフィールドを有する。データパケットは、データの実体(data body)を送るためのパケットであり、PID(DATA0、DATA1)、DATA、CRCのフィールドを有する。ハンドシェークパケットは、データ受信に成功したか否かを受信側が送信側に伝えるためのパケットであり、PID(ACK、NAK、STALL)のフィールドを有する。
【0034】
OUTトランザクション(ホストがUSBデバイスに情報を出力するトランザクション)では、図1(C)に示すように、まず、ホストがUSBデバイスに対してOUTトークン(トークンパケット)を発行する。次に、ホストはUSBデバイスに対してOUTデータ(データパケット)を送信する。そして、USBデバイスは、OUTデータの受信に成功すれば、ホストに対してACK(ハンドシェークパケット)を送信する。このようにすることで、ホストがUSBデバイスにデータをライトする処理が実現される。
【0035】
一方、INトランザクション(ホストがUSBデバイスから情報を入力するトランザクション)では、図1(D)に示すように、まず、ホストがUSBデバイスに対してINトークン(トークンパケット)を発行する。そして、INトークンを受信したUSBデバイスは、ホストに対してINデータ(データパケット)を送信する。そしてホストは、INデータの受信に成功すると、USBデバイスに対してACKを送信する。このようにすることで、ホストがUSBデバイスからデータをリードする処理が実現される。
【0036】
なお図1(C)、(D)において、”D←H”は、ホストからUSBデバイスに対して情報が転送されることを意味し、”D→H”は、USBデバイスからホストに対して情報が転送されることを意味する。
【0037】
図1(C)(D)に示すようにUSBでは、ライト処理の場合にはホストがOUTトークンを発行し、リード処理の場合にはホストがINトークンを発行するというように、データ転送の主導権をホストが有している。従って第1、第2のUSBデバイス間でデータのやり取りを行う場合には、常にホストが必要になるという課題があった。またUSBデバイス側からホストに対して能動的にコマンドを発行して、データ転送を制御することが難しいという課題があった。
【0038】
2.構成例
図2に、以上のような課題を解決できる本実施形態のデータ転送制御装置(データ転送制御回路、データ転送制御IC)の構成例を示す。なお図2の一部の機能ブロックを省略する構成としてもよい。また図2の機能ブロックはハードウェア回路のみにより実現してもよいし、ハードウェア回路とファームウェア(ソフトウェア)の両方により実現してもよい。
【0039】
データ転送制御装置110はトランシーバ10−1、10−2を含む。このトランシーバ10−1、10−2は、差動データ信号DP、DMを用いてUSB(広義にはバス)のデータを送受信する回路であり、USBの物理層回路を含む。トランシーバ10−1、10−2は、USBポートを介してUSBデバイスが接続可能となっている。
【0040】
データ転送制御装置110はルートハブ20を含む。このルートハブ20はホストコントローラ30に直接接続されるハブである。ルートハブ20は、ホストコントローラ30と1又は複数のUSBポートとの間のコネクションを提供する。
【0041】
データ転送制御装置110はホストコントローラ30(広義には転送コントローラ。他の説明でも同様)を含む。このホストコントローラ30はUSBを介したデータ転送を制御するものである。具体的にはINトークン(INトークンパケット)やOUTトークン(OUTトークンパケット)を発行する処理や、パケットを組み立てたり分解する処理や、ハンドシェークパケットを発行する処理や、データ転送のフェーズを制御する処理などを行う。なお本実施形態のホストコントローラ30は、パーソナルコンピュータのホストコントローラに要求されるような全てのホスト機能を具備する必要はなく、例えばUSB On−The−Go(OTG)規格のホストコントローラに要求されるような簡易的なホスト機能(少なくともINトランザクション、OUTトランザクションを発生できる機能)を具備すれば十分である。
【0042】
ホストコントローラ30はメインコントローラ32(CPU、プロセッサ)とSIE(Serial Interface Engine)34を含む。メインコントローラ32はホストコントローラ30の処理シーケンス等を制御するものであり、例えばUSBのドライバ・ソフトウェアなどにより動作する。SIE34は、USBのパケット・ハンドル処理、トランザクション管理処理などを行うものである。
【0043】
データ転送制御装置110はデータバッファ40(FIFO、パケットバッファ)を含む。データバッファ40は、USBを介して転送されるデータ(送信データ又は受信データ)を一時的に格納(バッファリング)するためものである。このデータバッファ40はRAM(Random Access Memory)などのメモリにより構成できる。
【0044】
本実施形態ではホストコントローラ30が、USBデバイス1、USBデバイス2のいずれか一方又は両方に対してINトークン(INトークンのパケット)を発行して、ホストコントローラ30に対して発行すべきコマンドが無いか否かを確かめる。
【0045】
このINトークンの発行は、インタラプト転送などを用いて例えば定期的に行うことができる。即ちホストコントローラ30は、パケットの転送順序を制御、管理し、各転送タイプのパケットの転送を指示する。このためにホストコントローラ30は、フレーム管理を行い、フレーム(1ms、125μs)毎に、SOF(Start Of Frame)パケットをUSBデバイス(ペリフェラル機器)に発行する。ここでSOFは、フレームの先頭を示すためのトークンパケットであり、PIDとフレーム番号とCRCを含む。またフレームは、SOFと次のSOFとの間のインターバルである。ホストコントローラ30は、1つのトランザクションが複数のフレームにまたがらないようにスケジューリング管理を行うことになる。このSOFを利用することでホストコントローラ30は、コマンド受信のためのINトークンパケットを定期的にUSBデバイスに発行することができる。
【0046】
なおINトークンの発行を、バルク転送を用いて定期的又は不定期に行ってもよい。或いは他の転送モード(アイソクロナス転送、コントロール転送)を利用してINトークンを発行してもよい。
【0047】
ホストコントローラ30は、発行したINトークンに対する応答としてコマンド(コマンドを含むデータ)をUSBデバイスから受信した場合には、受信したコマンドを解釈する。例えば受信したコマンドの変換処理(ライトコマンドやリードコマンドへの変換処理)を行う。そしてホストコントローラ30は、コマンドの解釈結果に基づいてデータ転送を制御し、USBデバイス1、USBデバイス2間でのピア・ツー・ピア(peer to peer)のデータ転送を実現する。
【0048】
より具体的には、INトークンに対する応答として、USBデバイス1、USBデバイス2間のデータ転送を指示するコマンド(コマンドを含むデータパケット)を受信した場合には、例えばUSBデバイス1に対してINトークンを発行して、USBデバイス1からデータ(データパケット)を受信する。そしてUSBデバイス2に対してOUTトークンパケットを発行して、USBデバイス1からINトークンにより受信したデータを、USBデバイス2に送信する。或いは逆に、USBデバイス2に対してINトークンを発行して、USBデバイス2からデータを受信し、USBデバイス1に対してOUTトークンを発行して、USBデバイス2から受信したデータをUSBデバイス1に送信してもよい。
【0049】
なお、USBデバイスから受信したコマンドに基づくデータ転送制御処理は、上記のようなデータ転送処理に限定されない。またUSBデバイス1、USBデバイス2の一方から受信したデータ(転送すべきデータやコマンドを含むデータ)を、コマンド等の解釈を行わずに、そのままUSBデバイス1、USBデバイス2の他方に送信してもよい。即ち、発行したINトークンに対する応答として、USBデバイス1、USBデバイス2の一方のUSBデバイスからNAK(NAKのハンドシェークパケット)ではなく零長ではないデータ(零長ではないデータパケット)を受信した場合に、受信データを他方のUSBデバイスに送信するようにしてもよい。
【0050】
またデータ転送制御装置110の構成は図2の構成に限定されない。例えば図3(A)に示すように、USBデバイス1用(第1のUSBポート用)のトランシーバ10−1、ルートハブ20−1、ホストコントローラ30−1、データバッファ40−1と、USBデバイス2用(第2のUSBポート用)のトランシーバ10−2、ルートハブ20−2、ホストコントローラ30−2、データバッファ40−2を別々に設けてもよい。即ち図2の構成では、USBデバイス1、USBデバイス2は1つのUSBにより接続されている。これに対して図3(A)の構成では、USBデバイス1が接続されるUSBと、USBデバイス2が接続されるUSBとは異なっている。
【0051】
図3(A)のような構成にすれば、USBデバイス1とデータ転送制御装置110との間の第1のUSBデータ転送と、USBデバイス2とデータ転送制御装置110との間の第2のUSBデータ転送を、並列(独立)に行うことが可能になる。これによりデータ転送の高速化を図れる。例えばUSBデバイス1との間でINトランザクションのデータ転送を行っている最中に、USBデバイス2との間でOUTトランザクションのデータ転送を行うことなどが可能になる。
【0052】
なお図3(A)のような構成を採用する場合、図3(B)に示すようにデータバッファ40をホストコントローラ30−1、30−2で共用するようにしてもよい。このようにすれば回路の小規模化を図りながらも、USBデバイス1との間の第1のUSBデータ転送とUSBデバイス2との間の第2のUSBデータ転送を、並列(独立)に行うことが可能になる。
【0053】
3.接続機器
図4(A)に本実施形態のデータ転送制御装置110を含む接続機器100(広義には電子機器)の一例を示す。
【0054】
この接続機器100は、データ転送制御装置110(データ転送制御IC)が内蔵される封止部112(接続部、中継部、カバー部)と、封止部112の一端にその一端が接続されるケーブル120と、封止部112の他端にその一端が接続されるケーブル122と、ケーブル120の他端に接続されるコネクタ130(シリーズBコネクタ)と、ケーブル122の他端に接続されるコネクタ132(シリーズBコネクタ)を含む。このコネクタ130、132にはUSBデバイス1、USBデバイス2が接続可能になっている。また第1のコネクタ130はデータ転送制御装置110の第1のUSBポートと電気的に接続され、第2のコネクタ132はデータ転送制御装置110の第2のUSBポートと電気的に接続されている。
【0055】
なおコネクタ130、132は、プラグ(B−Plug)であってもよいし、受け側コネクタであるレセプタクル(B−Receptacle)であってもよい。また図4(B)に示すように一方のケーブル120を設けない構成にしたり、図4(C)に示すように両方のケーブル120、122を設けない構成としてもよい。
【0056】
図4(A)(B)(C)に示す接続機器100を用いれば、USBデバイス1とUSBデバイス2を接続機器100を介して接続できる。そしてデータ転送制御装置110を用いて、USBデバイス1、USBデバイス2間でのピア・ツー・ピアのデータ転送を実現できる。例えばUSBデバイス1がデジタルカメラ、携帯電話などの携帯型電子機器であり、USBデバイス2がプリンタである場合には、いわゆるダイレクト・プリンティングを実現できる。またUSBデバイス1が携帯型電子機器であり、USBデバイス2が光ディスクドライブ、ハードディスクドライブなどのストレージ装置である場合には、USBデバイス1のデータをこれらのストレージ装置にダイレクトにセーブすることが可能になる。
【0057】
4.USBデバイス用データ転送制御装置の構成
図5に、USBデバイス側に内蔵されるデータ転送制御装置190の構成例を示す。なお図5の一部の機能ブロックを省略する構成としてもよい。
【0058】
データ転送制御装置190はトランシーバ60を含む。このトランシーバ60は、差動データ信号DP、DMを用いてUSBのデータを送受信する回路である。このトランシーバ60としては、USB2.0の物理層回路や論理層回路の一部についてのインターフェースを定義したUTMI(USB2.0 Transceiver Macrocell Interface)に準拠したマクロセルなどを用いることができる。
【0059】
データ転送制御装置190はペリフェラルコントローラ80(広義には転送コントローラ。他の説明でも同様)を含む。このペリフェラルコントローラ80はUSBを介したデータ転送を制御するものである。なおペリフェラルコントローラ80としてOTG規格に準拠したコントローラ(ペリフェラル機能とホスト機能の両方を有するコントローラ)を用いてもよい。
【0060】
データ転送制御装置190はデータバッファ90(FIFO、パケットバッファ)を含む。データバッファ90は、USBを介して転送されるデータ(送信データ又は受信データ)を一時的に格納(バッファリング)するためものである。このデータバッファ90はRAMなどのメモリにより構成できる。
【0061】
そして本実施形態ではペリフェラルコントローラ80は、送信すべきコマンドが無い場合には、図4(A)(B)(C)の接続機器100が含むデータ転送制御装置110(ホスト)からのINトークン受信時に、NAK(NAKのハンドシェークパケット)をデータ転送制御装置110(ホスト)に送信する。なお送信すべきコマンドが無い場合にペリフェラルコントローラ80が、零長パケット(零長のデータパケット、ショートパケット)をデータ転送制御装置110(ホスト)に送信するようにしてもよい。
【0062】
一方、送信すべきコマンドがある場合には、INトークン受信時に、コマンド(コマンドを含むデータパケット)をデータ転送制御装置110(ホスト)に送信する。或いは、USBデバイス2に送信すべきデータが無い場合には、データ転送制御装置110からのINトークン受信時に、NAK(或いは零長パケット)を送信し、USBデバイス2に送信すべきデータがある場合には、INトークン受信時に送信データ(零長ではないデータ)をデータ転送制御装置110に送信するようにしてもよい。
【0063】
5.動作
次に本実施形態の動作について説明する。
【0064】
5.1 第1のデータ転送制御手法
図6に本実施形態の第1のデータ転送制御手法のフェーズ遷移図を示し、図7(A)〜図8(C)に第1のデータ転送制御手法の動作説明図を示す。
【0065】
USBデバイス1は、通常のUSB規格で定義されるデバイスでありながら、能動的な動作を実行できるデバイスであり、ホストにコマンドを発行することが可能なデバイスとなっている。一方、USBデバイス2は、通常のUSB規格で定義されるデバイスとなっている。なお、USBデバイス1、USBデバイス2の両方が、能動的な動作(コマンド発行)を実行できるデバイスであってもよい。またUSBデバイスの能動的な動作は、このような動作を実現するプログラム(ファームウェア、アプリケーション層プログラム)をUSBデバイス側のデータ転送制御装置(図5参照)に実装することで実現できる。
【0066】
図6では、まず、USBデバイス1がアイドル状態からデータ転送指示コマンド(コピーコマンド)のコマンドフェーズに移行する。次にUSBデバイス2がライトコマンド(或いはリードコマンド)のコマンドフェーズに移行する。その後、USBデバイス1、USBデバイス2の両方がデータフェーズに移行して、USBデバイス1、USBデバイス2間でデータが転送される。データフェーズが終了するとUSBデバイス2がライトコマンド(或いはリードコマンド)についてのステータスフェーズに移行する。その後、USBデバイス1がデータ転送指示コマンド(コピーコマンド)についてのステータスフェーズに移行する。
【0067】
より具体的には図7(A)に示すように、ホストコントローラ30(ホストと同義。他の説明でも同様)がUSBデバイス1に対して例えばインタラプト転送により定期的にINトークンを発行する。なおインタラプト転送以外の転送モードでINトークンを発行してもよい。またINトークンを不定期に発行してもよい。また図7(A)ではUSBデバイス1にだけコマンド受信のためのINトークンを発行している。しかしながら、USBデバイス2も能動的な動作が可能な場合(コマンド発行のためのプログラムが実装されている場合)には、ホストコントローラ30は、USBデバイス1のみならずUSBデバイス2に対しても、コマンド受信のためのINトークンを定期的に或いは不定期に発行してもよい。
【0068】
USBデバイス1はホストコントローラ30に発行すべきコマンド(データ転送指示コマンド)が無い場合には、INトークンに対する応答としてNAK(Negative AcKnowledgment)を送信する。即ちINトークンで発生したINトランザクションにおいてNAKのハンドシェークパケットを送信する。
【0069】
なおUSBデバイス1が、発行すべきコマンドが無い場合に、ホストコントローラ30からのINトークンに対する応答として零長パケット(零長のデータパケット、ショートパケット)を送信するようにしてもよい。この零長パケットは、IRP(I/Oリクエストパケット)によるデータ転送を終了させる場合などに使用されるものである。そしてホストコントローラ30は、USBデバイス1に発行したINトークンに対する応答として、USBデバイス1から零長パケットを受信すると、USBデバイス1に対してACK(AcKnowledgment)のハンドシェークパケットを送信する。そして、その後に、再度、USBデバイス1(或いはUSBデバイス2)に対してINトークンを発行する。
【0070】
USBデバイス1は、ホストコントローラ30に発行すべきコマンドがある場合には図6の(2)に示すようにコマンドフェーズに移行し、図7(B)に示すようにINトークンに対する応答として、NAK(零長パケット)ではなくコマンドを送信する。即ちINトークンで発生したINトランザクションにおいて、データ転送指示コマンドを含むデータパケットを送信する。このデータ転送指示コマンド(コピーコマンド)は、例えばUSBデバイス1からUSBデバイス2にデータを転送することを指示するコマンドである。ホストコントローラ30は、コマンド受信に成功するとACK(AcKnowledgment)を返送する。
【0071】
通常のUSBでは、コマンドの発行主体はホストコントローラ30に限定されている。これに対して本実施形態では図7(B)に示すようにUSBデバイスが能動的にコマンドを発行する点に大きな特徴がある。
【0072】
ホストコントローラ30は、USBデバイス1からコマンドを受信すると、このコマンドを解釈する。具体的にはデータ転送指示コマンド(コピーコマンド)を例えばライトコマンド(或いはリードコマンド)に変換する。そしてUSBデバイス2に対してバルク転送によりOUTトークンを発行する。なおバルク転送以外の転送モードでOUTトークンを発行してもよい。
【0073】
そしてホストコントローラ30は、OUTトークンで発生したOUTトランザクションにおいて、USBデバイス2に対してライトコマンド(ライトコマンドを含むデータパケット)を送信する。USBデバイス2はこのライトコマンドの受信に成功するとACKを返送する。これにより図6の(3)に示すようにUSBデバイス2はライトコマンドのコマンドフェーズに移行する。
【0074】
次に図8(A)に示すようにホストコントローラ30はUSBデバイス1に対して例えばバルク転送(他の転送モードでもよい)によりINトークンを発行する。そしてINトークンで発生したINトランザクションにおいて、USBデバイス1からデータ(データパケット)を受信し、ACKを返送する。そしてホストコントローラ30はUSBデバイス2に対して例えばバルク転送(他の転送モードでもよい)によりOUTトークンを発行する。そしてOUTトークンで発生したOUTトランザクションにおいて、USBデバイス1からの受信データをUSBデバイス2に送信する。即ち図6の(3)(4)に示すようにUSBデバイス1、USBデバイス2はデータフェーズに移行してデータ転送を行う。
【0075】
なお図2の構成の場合には、ホストコントローラ30、USBデバイス1間のINトランザクション転送と、ホストコントローラ30、USBデバイス2間のOUTトランザクション転送は、1つのUSBを用いて例えば交互に行われる。一方、図3(A)(B)の構成の場合には、これらのINトランザクション転送、OUTトランザクション転送を、2つのUSBを用いて並列(独立)に行うことができる。
【0076】
全てのデータの転送が終了すると、図8(B)に示すようにホストコントローラ30が、USBデバイス2に対してステータス確認のためのINトークンを発行し、図6の(5)に示すようにUSBデバイス2がライトコマンドについてのステータスフェーズに移行する。そしてUSBデバイス2がライトコマンドの処理完了を示すステータスを送信すると、ホストコントローラ30はACKを返送する。
【0077】
次に、図8(C)に示すようにホストコントローラ30がOUTトークンを発行し、データ転送指示コマンドの処理完了を示すステータスをUSBデバイス1に送信する。すると、図6の(6)に示すようにデータ転送指示コマンドについてのステータスフェーズに移行したUSBデバイス1は、ホストコントローラ30にACKを返送する。以上のようにしてUSBデバイス1、USBデバイス2間の一連のデータ転送処理が完了する。
【0078】
なお図7(A)〜図8(C)ではUSBデバイス1からUSBデバイス2にデータを転送する場合について示したが、USBデバイス2からUSBデバイス1にデータを転送する場合には図9(A)〜図10(C)に示すように処理を行えばよい。即ち図9(B)に示すように、ホストコントローラ30からのINトークンに対する応答として、USBデバイス1が、USBデバイス2からUSBデバイス1へのデータ転送を指示するコマンドを送信する。このデータ転送指示コマンドは図7(B)のデータ転送指示コマンドとは逆方向の転送方向を指示するコマンドである。
【0079】
このデータ転送指示コマンドを受信したホストコントローラ30は、受信したデータ転送指示コマンドを解釈して、図9(C)に示すようにUSBデバイス2に対してOUTトークンを発行して、リードコマンド(リードコマンドを含むデータパケット)を送信する。即ち図7(C)ではホストコントローラがデータ転送指示コマンド(コピーコマンド)をライトコマンドに変換してUSBデバイス2に送信しているが、図9(C)では、データ転送指示コマンド(コピーコマンド)をリードコマンドに変換して、USBデバイス2に送信する。
【0080】
そして図10(A)に示すようにホストコントローラ30は、USBデバイス2に対してINトークンを発行して、USBデバイス1からデータを受信する。またホストコントローラ30は、USBデバイス1に対してOUTトークンを発行して、USBデバイス2からの受信データをUSBデバイス1に送信する。即ち図8(A)ではUSBデバイス1にINトークンを発行し、USBデバイス2にOUTトークンを発行していたが、図10(A)では、USBデバイス2にINトークンを発行し、USBデバイス1にOUTトークンを発行している。これにより図7(A)〜図8(C)とは逆方向のデータ転送を実現できる。
【0081】
5.2 第2のデータ転送制御手法
図11に本実施形態の第2のデータ転送制御手法のフェーズ遷移図を示し、図12(A)〜図13(C)に第2のデータ転送制御手法の動作説明図を示す。
【0082】
図11では、まず、USBデバイス1がアイドル状態からデータ転送指示コマンドのコマンドフェーズに移行する。次にUSBデバイス1がリードコマンドのコマンドフェーズに移行し、USBデバイス2がライトコマンドのコマンドフェーズに移行する。その後、USBデバイス1、USBデバイス2がデータフェーズに移行して、USBデバイス1、USBデバイス2間でデータが転送される。データ転送が終了するとUSBデバイス1がリードコマンドについてのステータスフェーズに移行し、USBデバイス2がライトコマンドについてのステータスフェーズに移行する。その後、USBデバイス1がデータ転送指示コマンドについてのステータスフェーズに移行する。
【0083】
より具体的には図12(A)に示すように、ホストコントローラ30がUSBデバイス1に対してINトークンを発行する。USBデバイス1はホストコントローラ30に発行すべきコマンド(データ転送指示コマンド)が無い場合には、INトークンに対する応答としてNAK(或いは零長パケット)を送信する。
【0084】
一方、USBデバイス1は、ホストコントローラ30に発行すべきコマンドがある場合には、図11の(2)に示すようにデータ転送指示コマンドのコマンドフェーズに移行し、図12(B)に示すようにINトークンに対する応答として、NAK(零長パケット)ではなく、データ転送指示コマンドを送信する。
【0085】
ホストコントローラ30は、USBデバイス1からデータ転送指示コマンドを受信すると、このコマンドを解釈して、コマンドの変換処理を行う。そしてホストコントローラ30は図12(C)に示すように、USBデバイス1に対してOUTトークンで発行して、リードコマンド(リードコマンドを含むデータパケット)をUSBデバイス1に送信する。またUSBデバイス2に対してOUTトークンで発行して、ライトコマンド(ライトコマンドを含むデータパケット)をUSBデバイス2に送信する。これにより図11の(3)に示すようにUSBデバイス1、USBデバイス2はリードコマンド、ライトコマンドについてのコマンドフェーズに移行する。
【0086】
次に図13(A)に示すようにホストコントローラ30はUSBデバイス1に対してINトークンを発行し、USBデバイス1からデータを受信する。またUSBデバイス2に対してOUTトークンを発行し、USBデバイス1からの受信データをUSBデバイス2に送信する。即ち図11の(4)に示すようにUSBデバイス1、USBデバイス2はデータフェーズに移行してデータ転送を行う。
【0087】
全てのデータの転送が終了すると、図13(B)に示すようにホストコントローラ30が、USBデバイス1、USBデバイス2に対してステータス確認のためのINトークンを発行し、図11の(5)に示すようにUSBデバイス1、USBデバイス2がリードコマンド、ライトコマンドについてのステータスフェーズに移行する。
【0088】
次に、図13(C)に示すようにホストコントローラ30がOUTトークンを発行し、データ転送指示コマンドの処理完了を示すステータスをUSBデバイス1に送信する。すると、図11の(6)に示すようにデータ転送指示コマンドについてのステータスフェーズに移行したUSBデバイス1は、ホストコントローラ30にACKを返送する。
【0089】
以上のようにしてUSBデバイス1、USBデバイス2間の一連のデータ転送処理が完了する。なお、USBデバイス2からUSBデバイス1にデータを転送する場合には、図12(C)においてホストコントローラ30がUSBデバイス2に対してリードコマンドを送信し、USBデバイス1に対してライトコマンドを送信する。そして図13(A)においてホストコントローラ30が、USBデバイス2に対してINトークンを発行して、データを受信し、USBデバイス1に対してOUTトークンを発行して、USBデバイス2からの受信データをUSBデバイス1に送信すればよい。
【0090】
図6〜図10(C)の第1のデータ転送制御手法では、ホストコントローラ30は、USBデバイス1(広義には、USBデバイス1、USBデバイス2の一方のUSBデバイス。他の説明でも同様)からデータ転送指示コマンドを含むデータを受信すると、USBデバイス2(広義には他方のUSBデバイス。他の説明でも同様)に対してライトコマンド(或いはリードコマンド)を含むデータを送信する。そしてUSBデバイス1はデータ転送指示コマンド(コピーコマンド)についてのコマンドフェーズ、データフェーズ、ステータスフェーズに順次移行する。一方、USBデバイス2はライトコマンド(或いはリードコマンド)についてのコマンドフェーズ、データフェーズ、ステータスフェーズに順次移行する。
【0091】
一方、図11〜図13(C)の第2のデータ転送制御手法では、ホストコントローラ30は、データ転送指示コマンドを含むデータを受信すると、USBデバイス1(一方のUSBデバイス)に対してはリードコマンドを含むデータを送信し、USBデバイス2(他方のUSBデバイス)に対してはライトコマンドを含むデータを送信する。そしてUSBデバイス1はデータ転送指示コマンドについてのコマンドフェーズに移行した後、リードコマンドについてのコマンドフェーズ、データフェーズ、ステータスフェーズに順次移行し、最後にデータ転送指示コマンドについてのステータスフェーズに移行する。一方、USBデバイス2はライトコマンドについてのコマンドフェーズ、データフェーズ、ステータスフェーズに順次移行する。
【0092】
このように第1、第2のデータ転送制御手法は、データ転送指示コマンドを受信したホストコントローラ30がその後に行うコマンド変換処理等が異なっている。そして図6〜図10(C)の第1のデータ転送制御手法では、USBデバイス1(一方のUSBデバイス)は、ホストコントローラ30からのデータ転送指示コマンドに対してどのようにフェーズ処理を行うのかを予め知っておく必要がある。これに対して図11〜図13(C)の第2のデータ転送制御手法では、フェーズ処理の主導権は全てホストコントローラ30が有している。従って、USBデバイス1、USBデバイス2は、ホストコントローラ30からのデータ転送指示コマンドに対してどのようにフェーズ処理を行うのかを予め知っておく必要がない。
【0093】
5.3 第3のデータ転送制御手法
図14(A)〜(C)に本実施形態の第3のデータ転送制御手法の動作説明図を示す。第3のデータ転送制御手法では、ホストコントローラ30が、USBデバイス1、USBデバイス2のいずれか一方又は両方に対してINトークンを発行する。そして発行したINトークンに対する応答として、USBデバイス1、USBデバイス2の一方のUSBデバイスから、NAKではなく零長ではないデータ(零長ではないデータパケット)を受信した場合には、一方のUSBデバイスから受信したデータを、他方のUSBデバイスにそのまま送信する(解釈することなく送信する)。
【0094】
より具体的には図14(A)に示すように、ホストコントローラ30はUSBデバイス1(一方のUSBデバイス)に対してデータ受信のためのINトークンを発行する。USBデバイス1は、USBデバイス2に送信すべきデータが無い場合には、INトークンに対する応答としてNAK(零長パケット)を返送する。なおホストコントローラ30がUSBデバイス1、USBデバイス2の両方に対してINトークンを発行してもよい。
【0095】
一方、図14(B)に示すようにUSBデバイス1は、USBデバイス2に転送すべきデータがある場合には、INトークンに対する応答として、NAK(零長パケット)ではなく、その転送データをホストコントローラ30に送信する。この場合に送信する転送データは、画像データ、音声データ、或いはプリントデータなどのデータそのものであってもよいし、コマンドを含むデータ(パケットのデータ本体のフィールドにコマンドを埋め込んだもの)であってもよい。
【0096】
そして図14(C)に示すようにホストコントローラ30は、USBデバイス1(一方のUSBデバイス)からデータを受信すると、USBデバイス2(他方のUSBデバイス)に対してデータ送信のためのOUTトークンを発行する。そしてOUTトークンで発生したOUTトランザクションにおいて、USBデバイス1からの受信データをUSBデバイス2に送信する。
【0097】
以上のようにすることでUSBデバイス1からUSBデバイス2にデータを送信することが可能になる。これにより、画像データ、音声データ、或いはプリントデータなどのデータそのものをUSBデバイス1からUSBデバイス2に送信できる。これにより、例えばUSBデバイス1がデジタルカメラや携帯電話であり、USBデバイス2がプリンタである場合には、いわゆるダイレクト・プリンティングを実現できる。またこの第3のデータ転送制御手法を用いれば、USBデバイス1のUSBデバイス2に対するコマンドを、USBデバイス1からUSBデバイス2に送信することも可能になる。この場合にはホストコントローラ30は、このコマンドを解釈することなくそのままUSBデバイス1からUSBデバイス2にコマンドを転送することになる。
【0098】
なおUSBデバイス2からUSBデバイス1にデータ(データそのもの、或いはコマンドを含むデータ)を送信する場合には、ホストコントローラ30が、USBデバイス2に対してデータ受信のためのINトークンを発行し、USBデバイス1に対してデータ送信のためのOUTトークンを発行すればよい。
【0099】
なお、本発明は本実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。
【0100】
例えば、本発明のデータ転送制御装置の構成は図2、図3(A)(B)、図5等で説明した構成に限定されず、接続機器の構成も図4(A)(B)(C)で説明した構成に限定されない。また図6〜図14(C)で説明した第1〜第3のデータ転送制御手法以外の手法によりデータ転送を制御してもよい。また本発明のデータ転送制御装置は接続機器以外の電子機器にも適用できる。
【0101】
また本実施形態では、ホストからのINトークンに対する応答としてUSBデバイスがNAKを送信する場合について主に説明したが、ホストからのINトークンに対する応答としてUSBデバイスが零長パケット(零長のデータパケット)を送信する場合にも本発明は適用できる。
【0102】
また、明細書や図面中の記載において広義な用語(転送コントローラ、一方のUSBデバイス、他方のUSBデバイス、電子機器等)として引用された用語(ホストコントローラ・ペリフェラルコントローラ、USBデバイス1、USBデバイス2、接続機器等)は、明細書や図面中の他の記載においても広義な用語に置き換えることができる。
【0103】
また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【0104】
また本発明は、USB1.1、USB2.0、或いはこれらの規格と同様の思想に基づく規格や、これらの規格を発展させた規格におけるデータ転送制御手法にも適用できる。
【図面の簡単な説明】
【図1】図1(A)〜(D)はUSBの転送手法の説明図である。
【図2】本実施形態のデータ転送制御装置の構成の一例である。
【図3】図3(A)(B)は本実施形態のデータ転送制御装置の構成の他の例である。
【図4】図4(A)(B)(C)は接続機器の構成例である。
【図5】USBデバイス用のデータ転送制御装置の構成例である。
【図6】第1のデータ転送制御手法のフェーズ遷移図である。
【図7】図7(A)(B)(C)は第1のデータ転送制御手法の動作説明図である。
【図8】図8(A)(B)(C)も第1のデータ転送制御手法の動作説明図である。
【図9】図9(A)(B)(C)も第1のデータ転送制御手法の動作説明図である。
【図10】図10(A)(B)(C)も第1のデータ転送制御手法の動作説明図である。
【図11】第2のデータ転送制御手法のフェーズ遷移図である。
【図12】図12(A)(B)(C)は第2のデータ転送制御手法の動作説明図である。
【図13】図13(A)(B)(C)も第2のデータ転送制御手法の動作説明図である。
【図14】図14(A)(B)(C)は第3のデータ転送制御手法の動作説明図である。
【符号の説明】
10−1、10−2 トランシーバ、20 ルートハブ、
30 ホストコントローラ(転送コントローラ)、32 メインコントローラ、34 SIE、40 データバッファ(FIFO)、60 トランシーバ、80ペリフェラルコントローラ(転送コントローラ)、82 メインコントローラ、84 SIE、90 データバッファ(FIFO)、100 接続機器、110 データ転送制御装置(接続機器用)、112 封止部、120、122 ケーブル、130、132 コネクタ、190 データ転送制御装置(USBデバイス用)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data transfer control device, a connection device, and a data transfer control method.
[0002]
[Background Art]
Conventionally, USB (Universal Serial Bus) has been known as a serial bus interface standard for connecting a host such as a personal computer to a peripheral device. Further, USB 2.0 has been formulated as a standard capable of realizing a high-speed transfer speed of 480 Mbps (HS mode) while maintaining compatibility with the conventional USB 1.1 standard, and has attracted attention.
[0003]
[Patent Document 1]
JP 2002-135132 A
[0004]
[Problems to be solved by the invention]
In USB, unlike IEEE1394, the host has the initiative of data transfer. That is, the host issues a data transfer transaction, and the host controls most of the data transfer. Therefore, when exchanging data between the first and second USB devices (peripheral devices), it is necessary to prepare a personal computer and connect the first and second USB devices to this personal computer. Therefore, it has been difficult to directly connect the first and second USB devices to perform data transfer.
[0005]
Further, in the conventional data transfer control method using USB, it is not possible to control the data transfer by actively issuing a command from the USB device to the host.
[0006]
The present invention has been made in view of the above technical problems, and has as its object to provide a data transfer control device that enables data transfer between first and second USB devices, An object is to provide a device and a data transfer control method.
[0007]
[Means for Solving the Problems]
The present invention relates to a data transfer control device for a connection device that connects first and second USB devices using a USB (Universal Serial Bus), and a data buffer for temporarily storing transfer data; A transfer controller for controlling a transfer, wherein the transfer controller issues an IN token for receiving a command to one or both of the first and second USB devices, and outputs an IN token for receiving the command. The present invention relates to a data transfer control device that controls data transfer between the first and second USB devices based on a received command when data including a command is received as a response to the token.
[0008]
According to the present invention, an IN token for command reception is issued to one or both of the first and second USB devices. When a command is received in response to the IN token, data transfer between the first and second USB devices is controlled based on the command (the result of interpreting the command). Thus, unlike the normal USB data transfer method in which the host always has the initiative, data transfer control between the first and second USB devices in which the USB device has the initiative can be realized.
[0009]
Further, in the present invention, when the transfer controller receives data including a command instructing data transfer between the first and second USB devices as a response to an IN token for receiving a command, Issues an IN token to one USB device of the second USB device, receives data from the one USB device, and outputs an OUT token to the other USB device of the first and second USB devices. A token may be issued to transmit data received from the one USB device to the other USB device.
[0010]
With this configuration, data transfer between the first and second USB devices can be realized by making good use of the IN transaction generated by the IN token and the OUT transaction generated by the OUT token.
[0011]
Further, in the present invention, when the transfer controller receives data including a command instructing data transfer between the first and second USB devices as a response to an IN token for receiving a command, Alternatively, an OUT token may be issued to the other USB device of the second USB device to transmit data including a write command or a read command to the other USB device.
[0012]
Further, in the present invention, when the transfer controller receives data including a command instructing data transfer between the first and second USB devices as a response to an IN token for receiving a command, Issues an OUT token to one USB device of the second USB device, transmits data including a read command to the one USB device, and outputs the other USB device of the first and second USB devices. , An OUT token may be issued to transmit the data including the write command to the other USB device.
[0013]
Further, in the present invention, when the transfer controller instructs to transfer data from the first USB device to the second USB device by the command, the transfer controller issues an IN signal to the first USB device. Issue a token, receive data from the first USB device, issue an OUT token to the second USB device, and transfer the data received from the first USB device to the second USB device. Device, and when the command instructs to transfer data from the second USB device to the first USB device, issues an IN token to the second USB device. Receiving data from the second USB device, issuing an OUT token to the first USB device, The data received from the second USB device may be transmitted to the first USB device.
[0014]
With this configuration, data transfer in the first direction from the first USB device to the second USB device and data transfer in the second direction from the second USB device to the first USB device Can be simply realized based on a command from a USB device.
[0015]
The present invention is also a data transfer control device for a connection device that connects first and second USB devices using a USB (Universal Serial Bus), and a data buffer for temporarily storing transfer data; A transfer controller that controls data transfer, wherein the transfer controller issues an IN token to one or both of the first and second USB devices, and, as a response to the issued IN token, 1. When one of the second USB devices receives data that is not NAK (Negative AcKnowledgement) and is not zero length from one of the two USB devices, the other USB device of the first and second USB devices is Issue an OUT token and receive it from the one USB device. Relating to the data transfer control device for transmitting data to the other device.
[0016]
According to the present invention, an IN token is issued to one or both of the first and second USB devices. When data (non-zero length data) is received from one USB device in response to the IN token, an OUT token is issued to the other USB device, and the received data is transmitted to the other USB device. You. This allows data to be transferred between the first and second USB devices while the USB device has the initiative.
[0017]
Further, in the present invention, the transfer controller may periodically issue an IN token to one or both of the first and second USB devices using interrupt transfer.
[0018]
In the present invention, the transfer controller may periodically or irregularly issue an IN token to one or both of the first and second USB devices by using bulk transfer. .
[0019]
Further, the present invention includes any one of the above data transfer control devices, a first connector for connecting the first USB device, and a second connector for connecting the second USB device. Related to connected equipment.
[0020]
According to the connection device having such a configuration, it is possible to realize data transfer that looks as if data is directly transferred between the first and second USB devices.
[0021]
The present invention is also a data transfer control device for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device, and temporarily stores transfer data. It includes a data buffer and a transfer controller that controls data transfer. When there is no command to be transmitted, the transfer controller responds to the IN token from the data transfer control device included in the connection device as a NAK (Negative) signal. Acknowledgement) or a zero-length packet is transmitted, and if there is a command to be transmitted, it is related to the data transfer control device transmitting the data including the command as a response to the IN token from the data transfer control device included in the connection device. I do.
[0022]
According to the present invention, when a command is not transmitted, a NAK or zero-length packet is transmitted as a response to the IN token. On the other hand, when transmitting a command, the command is transmitted as a response to the IN token. Thus, unlike the normal USB data transfer method in which the host always has the initiative, data transfer control between the first and second USB devices in which the USB device has the initiative can be realized.
[0023]
The present invention is also a data transfer control device for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device, and temporarily stores transfer data. A data buffer; and a transfer controller for controlling data transfer, wherein the transfer controller includes an IN token from a data transfer control device included in the connection device when there is no data to be transmitted to the second USB device. A NAK (Negative AcKnowledgement) or a zero-length packet is transmitted as a response to the second USB device, and if there is data to be transmitted to the second USB device, a response to an IN token from the data transfer control device included in the connection device Should be sent to the second USB device Relating to the data transfer control device that transmits over data.
[0024]
According to the present invention, when data is not transmitted, a NAK or zero-length packet is transmitted as a response to the IN token. On the other hand, when transmitting data, a command is transmitted as a response to the IN token. Thus, it is possible to transfer data between the first and second USB devices while giving the USB device the initiative.
[0025]
The present invention is also a data transfer control method for transferring data between a first USB device and a second USB device via a USB (Universal Serial Bus). When an IN token for receiving a command is issued to one or both of them, and data including a command is received as a response to the IN token for receiving the command, the first and second commands are received based on the received command. Related to a data transfer control method for controlling data transfer between USB devices.
[0026]
The present invention is also a data transfer control method for transferring data between a first USB device and a second USB device via a USB (Universal Serial Bus). An IN token is issued to one or both, and in response to the issued IN token, non-negative NAK (Negative AcKnowledgement) data is received from one of the first and second USB devices. In this case, an OUT token is issued to the other one of the first and second USB devices to transmit data received from the one USB device to the other device. Related to
[0027]
Further, the present invention is a data transfer control method for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device, and the method includes the steps of: Transmits a NAK (Negative Acknowledgement) or a zero-length packet as a response to an IN token from a data transfer control device included in the connected device, and includes a data transfer control included in the connected device when there is a command to be transmitted. The present invention relates to a data transfer control method for transmitting data including a command as a response to an IN token from a device.
[0028]
The present invention also relates to a data transfer control method for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device, wherein the data transfer control method includes the steps of: If there is no data to be transmitted, a NAK (Negative Acknowledgement) or a zero-length packet is transmitted as a response to the IN token from the data transfer control device included in the connection device, and the data to be transmitted to the second USB device is transmitted. In the case where there is, the present invention relates to a data transfer control method for transmitting data to be transmitted to the second USB device as a response to the IN token from the data transfer control device included in the connection device.
[0029]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present embodiment will be described. The present embodiment described below does not unduly limit the contents of the present invention described in the claims, and all of the configurations described in the present embodiment are essential as means for solving the present invention. Not necessarily.
[0030]
1. USB
In USB, the host has the initiative in data transfer. This increases the processing load on the host, but does not cause much problem since the personal computer or the like as the host has a high-performance CPU (processor). On the other hand, since a USB device (USB device device, target) only needs to respond to a request from a host, there is an advantage that processing and configuration on the USB device side can be simplified. In USB, in order to realize such host-led data transfer, endpoints (EP0 to EP15) as shown in FIG. 1A are prepared on the USB device side. The host can freely transmit data to a desired endpoint or receive data from a desired endpoint by designating a device address and an endpoint number.
[0031]
Note that USB provides control transfer, isochronous transfer, interrupt transfer, and bulk transfer as data transfer types. The control transfer is a control transfer mode performed between the host and the USB device (target) via the endpoint 0. Isochronous transfer is a transfer mode prepared for periodically transferring image and audio data. Interrupt transfer is a transfer mode prepared for periodically transferring a small amount of data at a relatively low transfer rate. The bulk transfer is a transfer mode prepared for transferring a large amount of data generated irregularly.
[0032]
As shown in FIG. 1B, a USB transaction includes a token packet, an optional data packet, and an optional handshake packet.
[0033]
Here, the token packet is a packet used when the host requests reading or writing of the end point of the USB device. This token packet has fields of PID (packet ID such as OUT, IN, SOF, SETUP, etc.), ADDR (device address), ENDP (endpoint number), and CRC (Cyclic Redundancy Check). The data packet is a packet for transmitting a data body, and has fields of PID (DATA0, DATA1), DATA, and CRC. The handshake packet is a packet for the receiving side to inform the transmitting side whether or not the data reception is successful, and has a PID (ACK, NAK, STALL) field.
[0034]
In the OUT transaction (transaction in which the host outputs information to the USB device), first, as shown in FIG. 1C, the host issues an OUT token (token packet) to the USB device. Next, the host transmits OUT data (data packet) to the USB device. If the USB device succeeds in receiving the OUT data, the USB device transmits an ACK (handshake packet) to the host. In this way, a process in which the host writes data to the USB device is realized.
[0035]
On the other hand, in an IN transaction (a transaction in which the host inputs information from a USB device), the host first issues an IN token (token packet) to the USB device as shown in FIG. Then, the USB device having received the IN token transmits IN data (data packet) to the host. When the host has successfully received the IN data, the host transmits an ACK to the USB device. In this way, a process in which the host reads data from the USB device is realized.
[0036]
In FIGS. 1C and 1D, “D ← H” means that information is transferred from the host to the USB device, and “D → H” means that information is transferred from the USB device to the host. It means that information is transferred.
[0037]
As shown in FIGS. 1C and 1D, in the USB, the host issues an OUT token in the case of a write process, and issues an IN token in the case of a read process. The host has the right. Therefore, when exchanging data between the first and second USB devices, there is a problem that a host is always required. Another problem is that it is difficult to control the data transfer by actively issuing a command from the USB device to the host.
[0038]
2. Configuration example
FIG. 2 shows a configuration example of a data transfer control device (data transfer control circuit, data transfer control IC) of the present embodiment that can solve the above-described problems. Note that a configuration in which some functional blocks in FIG. 2 are omitted may be employed. Further, the functional blocks in FIG. 2 may be realized only by hardware circuits, or may be realized by both hardware circuits and firmware (software).
[0039]
Data transfer control device 110 includes transceivers 10-1 and 10-2. The transceivers 10-1 and 10-2 are circuits that transmit and receive USB (bus in a broad sense) data using the differential data signals DP and DM, and include a USB physical layer circuit. The transceivers 10-1 and 10-2 can be connected to USB devices via USB ports.
[0040]
The data transfer control device 110 includes a root hub 20. The root hub 20 is a hub directly connected to the host controller 30. The root hub 20 provides a connection between the host controller 30 and one or more USB ports.
[0041]
The data transfer control device 110 includes a host controller 30 (transfer controller in a broad sense; the same applies to other descriptions). The host controller 30 controls data transfer via USB. Specifically, a process of issuing an IN token (IN token packet) or an OUT token (OUT token packet), a process of assembling and disassembling a packet, a process of issuing a handshake packet, and a process of controlling a data transfer phase And so on. Note that the host controller 30 of the present embodiment does not need to have all the host functions required for a host controller of a personal computer, and is required for a USB On-The-Go (OTG) standard host controller, for example. It is sufficient to provide such a simple host function (at least a function capable of generating an IN transaction and an OUT transaction).
[0042]
The host controller 30 includes a main controller 32 (CPU, processor) and an SIE (Serial Interface Engine) 34. The main controller 32 controls the processing sequence and the like of the host controller 30, and operates with, for example, USB driver software. The SIE 34 performs USB packet handle processing, transaction management processing, and the like.
[0043]
The data transfer control device 110 includes a data buffer 40 (FIFO, packet buffer). The data buffer 40 is for temporarily storing (buffering) data (transmission data or reception data) transferred via USB. The data buffer 40 can be configured by a memory such as a RAM (Random Access Memory).
[0044]
In the present embodiment, the host controller 30 issues an IN token (IN token packet) to one or both of the USB device 1 and the USB device 2, and there is no command to be issued to the host controller 30. Check whether or not.
[0045]
This IN token can be issued, for example, periodically using interrupt transfer or the like. That is, the host controller 30 controls and manages the transfer order of the packets, and instructs the transfer of the packets of each transfer type. For this purpose, the host controller 30 performs frame management and issues an SOF (Start Of Frame) packet to a USB device (peripheral device) for each frame (1 ms, 125 μs). Here, the SOF is a token packet for indicating the beginning of a frame, and includes a PID, a frame number, and a CRC. A frame is an interval between the SOF and the next SOF. The host controller 30 performs scheduling management so that one transaction does not extend over a plurality of frames. By using this SOF, the host controller 30 can periodically issue an IN token packet for receiving a command to a USB device.
[0046]
The IN token may be issued periodically or irregularly using bulk transfer. Alternatively, the IN token may be issued using another transfer mode (isochronous transfer, control transfer).
[0047]
When a command (data including a command) is received from the USB device as a response to the issued IN token, the host controller 30 interprets the received command. For example, conversion processing of a received command (conversion processing to a write command or a read command) is performed. Then, the host controller 30 controls data transfer based on the interpretation result of the command, and realizes peer-to-peer data transfer between the USB device 1 and the USB device 2.
[0048]
More specifically, when a command (data packet including a command) instructing data transfer between the USB device 1 and the USB device 2 is received as a response to the IN token, for example, the IN token is transmitted to the USB device 1. And receives data (data packet) from the USB device 1. Then, an OUT token packet is issued to the USB device 2, and the data received by the IN token from the USB device 1 is transmitted to the USB device 2. Or, conversely, an IN token is issued to the USB device 2, data is received from the USB device 2, an OUT token is issued to the USB device 1, and the data received from the USB device 2 is transmitted to the USB device 1. May be sent.
[0049]
The data transfer control process based on the command received from the USB device is not limited to the above-described data transfer process. In addition, data received from one of the USB device 1 and the USB device 2 (data including data to be transferred and a command) is transmitted to the other of the USB device 1 and the USB device 2 without interpreting a command or the like. Is also good. That is, when a non-zero length data (non-zero length data packet) is received instead of NAK (NAK handshake packet) from one of the USB devices 1 and 2 as a response to the issued IN token. Alternatively, the received data may be transmitted to the other USB device.
[0050]
The configuration of the data transfer control device 110 is not limited to the configuration of FIG. For example, as shown in FIG. 3A, the transceiver 10-1, the root hub 20-1, the host controller 30-1, the data buffer 40-1, and the USB device 2 for the USB device 1 (for the first USB port) (For the second USB port), the root hub 20-2, the host controller 30-2, and the data buffer 40-2 may be separately provided. That is, in the configuration of FIG. 2, the USB device 1 and the USB device 2 are connected by one USB. On the other hand, in the configuration of FIG. 3A, the USB to which the USB device 1 is connected is different from the USB to which the USB device 2 is connected.
[0051]
With the configuration shown in FIG. 3A, the first USB data transfer between the USB device 1 and the data transfer control device 110 and the second USB data transfer between the USB device 2 and the data transfer control device 110 USB data transfer can be performed in parallel (independently). This can speed up data transfer. For example, it is possible to perform OUT transaction data transfer with the USB device 2 while performing IN transaction data transfer with the USB device 1.
[0052]
When the configuration as shown in FIG. 3A is employed, the data buffer 40 may be shared by the host controllers 30-1 and 30-2 as shown in FIG. In this way, the first USB data transfer with the USB device 1 and the second USB data transfer with the USB device 2 are performed in parallel (independently) while reducing the circuit size. It becomes possible.
[0053]
3. Connected equipment
FIG. 4A shows an example of a connection device 100 (electronic device in a broad sense) including the data transfer control device 110 of the present embodiment.
[0054]
The connection device 100 has a sealing unit 112 (connection unit, relay unit, cover unit) in which the data transfer control device 110 (data transfer control IC) is built, and one end connected to one end of the sealing unit 112. Cable 120, cable 122 having one end connected to the other end of sealing portion 112, connector 130 (series B connector) connected to the other end of cable 120, and connector connected to the other end of cable 122 132 (Series B connectors). The USB devices 1 and 2 can be connected to the connectors 130 and 132. In addition, the first connector 130 is electrically connected to a first USB port of the data transfer control device 110, and the second connector 132 is electrically connected to a second USB port of the data transfer control device 110. .
[0055]
The connectors 130 and 132 may be plugs (B-Plug) or receptacles (B-Receptacles) that are receiving connectors. Further, a configuration in which one cable 120 is not provided as shown in FIG. 4B or a configuration in which both cables 120 and 122 are not provided as shown in FIG.
[0056]
By using the connection device 100 shown in FIGS. 4A, 4B, and 4C, the USB device 1 and the USB device 2 can be connected via the connection device 100. Then, using the data transfer control device 110, peer-to-peer data transfer between the USB device 1 and the USB device 2 can be realized. For example, when the USB device 1 is a portable electronic device such as a digital camera or a mobile phone, and the USB device 2 is a printer, so-called direct printing can be realized. When the USB device 1 is a portable electronic device and the USB device 2 is a storage device such as an optical disk drive or a hard disk drive, the data of the USB device 1 can be directly saved to these storage devices. Become.
[0057]
4. Configuration of data transfer control device for USB device
FIG. 5 shows a configuration example of the data transfer control device 190 built in the USB device side. Note that a configuration in which some functional blocks in FIG. 5 are omitted may be adopted.
[0058]
Data transfer control device 190 includes transceiver 60. The transceiver 60 is a circuit that transmits and receives USB data using the differential data signals DP and DM. As the transceiver 60, a macro cell compliant with UTMI (USB 2.0 Transceiver Macrocell Interface) that defines an interface for a part of a USB 2.0 physical layer circuit or a part of a logical layer circuit can be used.
[0059]
The data transfer control device 190 includes a peripheral controller 80 (transfer controller in a broad sense; the same applies to other descriptions). This peripheral controller 80 controls data transfer via USB. Note that a controller compliant with the OTG standard (a controller having both a peripheral function and a host function) may be used as the peripheral controller 80.
[0060]
The data transfer control device 190 includes a data buffer 90 (FIFO, packet buffer). The data buffer 90 is for temporarily storing (buffering) data (transmission data or reception data) transferred via USB. The data buffer 90 can be constituted by a memory such as a RAM.
[0061]
In this embodiment, when there is no command to be transmitted, the peripheral controller 80 receives the IN token from the data transfer control device 110 (host) included in the connection device 100 in FIGS. 4A, 4B, and 4C. At times, it transmits a NAK (NAK handshake packet) to the data transfer control device 110 (host). When there is no command to be transmitted, the peripheral controller 80 may transmit a zero-length packet (a zero-length data packet or a short packet) to the data transfer control device 110 (host).
[0062]
On the other hand, if there is a command to be transmitted, the command (data packet including the command) is transmitted to the data transfer control device 110 (host) when the IN token is received. Alternatively, when there is no data to be transmitted to the USB device 2, a NAK (or zero-length packet) is transmitted when the IN token is received from the data transfer control device 110, and there is data to be transmitted to the USB device 2. Alternatively, the transmission data (data having a length other than zero) may be transmitted to the data transfer control device 110 when the IN token is received.
[0063]
5. motion
Next, the operation of the present embodiment will be described.
[0064]
5.1 First data transfer control method
FIG. 6 shows a phase transition diagram of the first data transfer control method of the present embodiment, and FIGS. 7A to 8C show operation explanatory diagrams of the first data transfer control method.
[0065]
The USB device 1 is a device that can execute an active operation and is a device that can issue a command to a host, while being a device defined by a normal USB standard. On the other hand, the USB device 2 is a device defined by a normal USB standard. Note that both the USB device 1 and the USB device 2 may be devices that can execute an active operation (command issuance). The active operation of the USB device can be realized by mounting a program (firmware, application layer program) for realizing such an operation in the data transfer control device (see FIG. 5) on the USB device side.
[0066]
In FIG. 6, first, the USB device 1 shifts from an idle state to a command phase of a data transfer instruction command (copy command). Next, the USB device 2 shifts to a command phase of a write command (or a read command). Thereafter, both the USB device 1 and the USB device 2 shift to the data phase, and data is transferred between the USB device 1 and the USB device 2. When the data phase ends, the USB device 2 shifts to a status phase for a write command (or a read command). Thereafter, the USB device 1 shifts to a status phase for a data transfer instruction command (copy command).
[0067]
More specifically, as shown in FIG. 7A, the host controller 30 (synonymous with the host; the same applies to other descriptions) issues an IN token to the USB device 1 periodically, for example, by interrupt transfer. The IN token may be issued in a transfer mode other than the interrupt transfer. Also, an IN token may be issued irregularly. In FIG. 7A, an IN token for command reception is issued only to the USB device 1. However, when the USB device 2 can also perform an active operation (when a program for issuing a command is installed), the host controller 30 performs not only the USB device 1 but also the USB device 2. An IN token for receiving a command may be issued periodically or irregularly.
[0068]
When there is no command (data transfer instruction command) to be issued to the host controller 30, the USB device 1 transmits NAK (Negative AcKnowledgement) as a response to the IN token. That is, a NAK handshake packet is transmitted in the IN transaction generated by the IN token.
[0069]
When there is no command to be issued, the USB device 1 may transmit a zero-length packet (a zero-length data packet or a short packet) as a response to the IN token from the host controller 30. This zero-length packet is used, for example, when terminating data transfer by an IRP (I / O request packet). When receiving the zero-length packet from the USB device 1 as a response to the IN token issued to the USB device 1, the host controller 30 transmits an ACK (Acknowledgement) handshake packet to the USB device 1. Then, after that, an IN token is issued to the USB device 1 (or USB device 2) again.
[0070]
When there is a command to be issued to the host controller 30, the USB device 1 shifts to the command phase as shown in (2) of FIG. 6, and as a response to the IN token as shown in FIG. Send command instead of (zero length packet). That is, in the IN transaction generated by the IN token, a data packet including a data transfer instruction command is transmitted. The data transfer instruction command (copy command) is a command for instructing, for example, data transfer from the USB device 1 to the USB device 2. The host controller 30 returns ACK (Acknowledgement) when the command is successfully received.
[0071]
In a normal USB, a command issuing subject is limited to the host controller 30. On the other hand, the present embodiment is greatly characterized in that the USB device actively issues a command as shown in FIG. 7B.
[0072]
When receiving the command from the USB device 1, the host controller 30 interprets the command. Specifically, a data transfer instruction command (copy command) is converted into, for example, a write command (or read command). Then, an OUT token is issued to the USB device 2 by bulk transfer. The OUT token may be issued in a transfer mode other than the bulk transfer.
[0073]
Then, the host controller 30 transmits a write command (a data packet including the write command) to the USB device 2 in the OUT transaction generated by the OUT token. When the USB device 2 successfully receives the write command, it returns an ACK. Thereby, the USB device 2 shifts to the command phase of the write command as shown in (3) of FIG.
[0074]
Next, as shown in FIG. 8A, the host controller 30 issues an IN token to the USB device 1 by, for example, bulk transfer (may be another transfer mode). Then, in the IN transaction generated by the IN token, data (data packet) is received from the USB device 1 and ACK is returned. Then, the host controller 30 issues an OUT token to the USB device 2 by, for example, bulk transfer (may be another transfer mode). Then, in the OUT transaction generated by the OUT token, the data received from the USB device 1 is transmitted to the USB device 2. That is, as shown in (3) and (4) of FIG. 6, the USB device 1 and the USB device 2 shift to the data phase and perform data transfer.
[0075]
In the case of the configuration in FIG. 2, the IN transaction transfer between the host controller 30 and the USB device 1 and the OUT transaction transfer between the host controller 30 and the USB device 2 are performed, for example, alternately using one USB. On the other hand, in the configuration shown in FIGS. 3A and 3B, the IN transaction transfer and the OUT transaction transfer can be performed in parallel (independently) using two USBs.
[0076]
When the transfer of all data is completed, the host controller 30 issues an IN token for status confirmation to the USB device 2 as shown in FIG. 8B, and as shown in FIG. The USB device 2 shifts to the status phase for the write command. Then, when the USB device 2 transmits a status indicating that the processing of the write command has been completed, the host controller 30 returns an ACK.
[0077]
Next, as shown in FIG. 8C, the host controller 30 issues an OUT token and transmits a status indicating completion of processing of the data transfer instruction command to the USB device 1. Then, the USB device 1 that has shifted to the status phase for the data transfer instruction command returns an ACK to the host controller 30 as shown in (6) of FIG. As described above, a series of data transfer processing between the USB device 1 and the USB device 2 is completed.
[0078]
Note that FIGS. 7A to 8C show a case where data is transferred from the USB device 1 to the USB device 2, but a case where data is transferred from the USB device 2 to the USB device 1 is shown in FIG. The processing may be performed as shown in FIGS. That is, as shown in FIG. 9B, in response to the IN token from the host controller 30, the USB device 1 transmits a command instructing data transfer from the USB device 2 to the USB device 1. This data transfer instruction command is a command for instructing a transfer direction opposite to the data transfer instruction command of FIG. 7B.
[0079]
Upon receiving the data transfer instruction command, the host controller 30 interprets the received data transfer instruction command, issues an OUT token to the USB device 2 as shown in FIG. Data packet containing the command). That is, in FIG. 7C, the host controller converts the data transfer instruction command (copy command) into a write command and transmits the write command to the USB device 2. However, in FIG. 9C, the data transfer instruction command (copy command). Is converted into a read command and transmitted to the USB device 2.
[0080]
Then, as shown in FIG. 10A, the host controller 30 issues an IN token to the USB device 2 and receives data from the USB device 1. Further, the host controller 30 issues an OUT token to the USB device 1 and transmits data received from the USB device 2 to the USB device 1. That is, in FIG. 8A, an IN token is issued to the USB device 1 and an OUT token is issued to the USB device 2. In FIG. 10A, an IN token is issued to the USB device 2 and the USB device 1 is issued. Issues an OUT token. As a result, data transfer in the direction opposite to that in FIGS. 7A to 8C can be realized.
[0081]
5.2 Second data transfer control method
FIG. 11 shows a phase transition diagram of the second data transfer control method according to the present embodiment, and FIGS. 12A to 13C show operation explanatory diagrams of the second data transfer control method.
[0082]
In FIG. 11, first, the USB device 1 shifts from the idle state to the command phase of the data transfer instruction command. Next, the USB device 1 shifts to a command phase of a read command, and the USB device 2 shifts to a command phase of a write command. Thereafter, the USB device 1 and the USB device 2 shift to the data phase, and data is transferred between the USB device 1 and the USB device 2. When the data transfer is completed, the USB device 1 shifts to a status phase for a read command, and the USB device 2 shifts to a status phase for a write command. Thereafter, the USB device 1 shifts to the status phase for the data transfer instruction command.
[0083]
More specifically, as shown in FIG. 12A, the host controller 30 issues an IN token to the USB device 1. When there is no command (data transfer instruction command) to be issued to the host controller 30, the USB device 1 transmits a NAK (or a zero-length packet) as a response to the IN token.
[0084]
On the other hand, when there is a command to be issued to the host controller 30, the USB device 1 shifts to the command phase of the data transfer instruction command as shown in (2) of FIG. 11, and as shown in FIG. As a response to the IN token, a data transfer instruction command is transmitted instead of a NAK (zero length packet).
[0085]
Upon receiving the data transfer instruction command from the USB device 1, the host controller 30 interprets the command and performs a command conversion process. Then, as shown in FIG. 12C, the host controller 30 issues an OUT token to the USB device 1 and transmits a read command (a data packet including the read command) to the USB device 1. It issues an OUT token to the USB device 2 and transmits a write command (a data packet including the write command) to the USB device 2. As a result, the USB device 1 and the USB device 2 shift to the command phase for the read command and the write command as shown in (3) of FIG.
[0086]
Next, as shown in FIG. 13A, the host controller 30 issues an IN token to the USB device 1 and receives data from the USB device 1. Further, it issues an OUT token to the USB device 2 and transmits data received from the USB device 1 to the USB device 2. That is, as shown in (4) of FIG. 11, the USB device 1 and the USB device 2 shift to the data phase and perform data transfer.
[0087]
When the transfer of all data is completed, the host controller 30 issues an IN token for status confirmation to the USB device 1 and the USB device 2 as shown in FIG. 13B, and (5) in FIG. As shown in (1), the USB device 1 and the USB device 2 shift to the status phase for the read command and the write command.
[0088]
Next, as shown in FIG. 13C, the host controller 30 issues an OUT token and transmits a status indicating the completion of the processing of the data transfer instruction command to the USB device 1. Then, the USB device 1 that has shifted to the status phase for the data transfer instruction command returns an ACK to the host controller 30 as shown in (6) of FIG.
[0089]
As described above, a series of data transfer processing between the USB device 1 and the USB device 2 is completed. When data is transferred from the USB device 2 to the USB device 1, the host controller 30 transmits a read command to the USB device 2 and transmits a write command to the USB device 1 in FIG. I do. In FIG. 13A, the host controller 30 issues an IN token to the USB device 2 to receive data, issues an OUT token to the USB device 1, and receives data from the USB device 2. May be transmitted to the USB device 1.
[0090]
In the first data transfer control method shown in FIGS. 6 to 10C, the host controller 30 controls the USB device 1 (in a broad sense, one of the USB device 1 and the USB device 2; the same applies to other descriptions). When receiving the data including the data transfer instruction command from the USB device 2, it transmits the data including the write command (or the read command) to the USB device 2 (the other USB device in a broad sense; the same applies to other descriptions). Then, the USB device 1 sequentially shifts to a command phase, a data phase, and a status phase for a data transfer instruction command (copy command). On the other hand, the USB device 2 sequentially shifts to a command phase, a data phase, and a status phase for a write command (or a read command).
[0091]
On the other hand, in the second data transfer control method shown in FIGS. 11 to 13C, when receiving data including a data transfer instruction command, the host controller 30 reads data from the USB device 1 (one USB device). Data including a command is transmitted, and data including a write command is transmitted to the USB device 2 (the other USB device). Then, the USB device 1 shifts to a command phase for a data transfer instruction command, shifts to a command phase for a read command, a data phase, and a status phase sequentially, and finally shifts to a status phase for a data transfer instruction command. On the other hand, the USB device 2 sequentially shifts to a command phase, a data phase, and a status phase for a write command.
[0092]
As described above, the first and second data transfer control methods are different in a command conversion process and the like that are subsequently performed by the host controller 30 that has received the data transfer instruction command. In the first data transfer control method shown in FIGS. 6 to 10C, how the USB device 1 (one USB device) performs the phase process in response to the data transfer instruction command from the host controller 30. It is necessary to know in advance. On the other hand, in the second data transfer control method shown in FIGS. 11 to 13C, the host controller 30 has all the initiative of the phase processing. Therefore, the USB device 1 and the USB device 2 do not need to know in advance how to perform the phase process in response to the data transfer instruction command from the host controller 30.
[0093]
5.3 Third data transfer control method
FIGS. 14A to 14C are diagrams illustrating the operation of the third data transfer control method according to the present embodiment. In the third data transfer control method, the host controller 30 issues an IN token to one or both of the USB device 1 and the USB device 2. When a non-zero length data (non-zero length data packet) is received instead of the NAK from one of the USB devices 1 and 2 as a response to the issued IN token, the one USB device Is transmitted to the other USB device as it is (transmitted without interpretation).
[0094]
More specifically, as shown in FIG. 14A, the host controller 30 issues an IN token to the USB device 1 (one USB device) for data reception. When there is no data to be transmitted to the USB device 2, the USB device 1 returns a NAK (zero-length packet) as a response to the IN token. Note that the host controller 30 may issue an IN token to both the USB device 1 and the USB device 2.
[0095]
On the other hand, as shown in FIG. 14B, when there is data to be transferred to the USB device 2, the USB device 1 sends the transfer data instead of the NAK (zero length packet) to the host device in response to the IN token. Transmit to controller 30. The transfer data to be transmitted in this case may be data itself such as image data, audio data, or print data, or data including a command (a command in which a command is embedded in a field of a data body of a packet). Is also good.
[0096]
Then, as shown in FIG. 14C, when receiving data from the USB device 1 (one USB device), the host controller 30 sends an OUT token for data transmission to the USB device 2 (the other USB device). Issue. Then, in the OUT transaction generated by the OUT token, the data received from the USB device 1 is transmitted to the USB device 2.
[0097]
In this way, data can be transmitted from the USB device 1 to the USB device 2. Thus, data such as image data, audio data, or print data can be transmitted from the USB device 1 to the USB device 2. Thus, for example, when the USB device 1 is a digital camera or a mobile phone and the USB device 2 is a printer, so-called direct printing can be realized. Also, if this third data transfer control method is used, it is possible to transmit a command from the USB device 1 to the USB device 2 from the USB device 1 to the USB device 2. In this case, the host controller 30 transfers the command from the USB device 1 to the USB device 2 without interpreting the command.
[0098]
When transmitting data (data itself or data including a command) from the USB device 2 to the USB device 1, the host controller 30 issues an IN token for data reception to the USB device 2 and transmits the USB token to the USB device 2. An OUT token for data transmission may be issued to the device 1.
[0099]
The present invention is not limited to the present embodiment, and various modifications can be made within the scope of the present invention.
[0100]
For example, the configuration of the data transfer control device of the present invention is not limited to the configurations described in FIGS. 2, 3A, 5B, 5 and the like, and the configurations of the connected devices are also shown in FIGS. The configuration is not limited to the configuration described in C). The data transfer may be controlled by a method other than the first to third data transfer control methods described with reference to FIGS. 6 to 14C. Further, the data transfer control device of the present invention can be applied to electronic devices other than connected devices.
[0101]
In this embodiment, the case where the USB device transmits the NAK as a response to the IN token from the host has been mainly described. However, the USB device transmits the zero-length packet (zero-length data packet) as the response to the IN token from the host. The present invention can also be applied when transmitting
[0102]
Further, terms (host controller / peripheral controller, USB device 1, USB device 2) cited as broad terms (transfer controller, one USB device, other USB device, electronic device, etc.) in the description and drawings. , Connected devices, etc.) can be replaced with broad terms in other descriptions in the description and drawings.
[0103]
Further, in the invention according to the dependent claims of the present invention, a configuration in which some of the constituent elements of the dependent claims are omitted may be adopted. In addition, a main part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.
[0104]
Further, the present invention can be applied to a data transfer control method based on USB 1.1, USB 2.0, or a standard based on the same idea as these standards, or a standard developed from these standards.
[Brief description of the drawings]
FIGS. 1A to 1D are diagrams illustrating a USB transfer method.
FIG. 2 is an example of a configuration of a data transfer control device of the present embodiment.
FIGS. 3A and 3B show another example of the configuration of the data transfer control device of the present embodiment.
FIGS. 4A, 4B, and 4C are configuration examples of connected devices.
FIG. 5 is a configuration example of a data transfer control device for a USB device.
FIG. 6 is a phase transition diagram of the first data transfer control method.
FIGS. 7A, 7B, and 7C are diagrams for explaining the operation of the first data transfer control method;
8 (A), 8 (B), and 8 (C) are diagrams for explaining the operation of the first data transfer control method.
FIGS. 9A, 9B, and 9C are explanatory diagrams of the operation of the first data transfer control method.
FIGS. 10A, 10B, and 10C are explanatory diagrams of the operation of the first data transfer control method.
FIG. 11 is a phase transition diagram of the second data transfer control method.
FIGS. 12A, 12B, and 12C are explanatory diagrams of the operation of the second data transfer control method.
FIGS. 13A, 13B, and 13C are also operation explanatory diagrams of the second data transfer control method.
FIGS. 14A, 14B, and 14C are diagrams for explaining the operation of the third data transfer control method;
[Explanation of symbols]
10-1, 10-2 transceivers, 20 root hubs,
30 host controller (transfer controller), 32 main controller, 34 SIE, 40 data buffer (FIFO), 60 transceiver, 80 peripheral controller (transfer controller), 82 main controller, 84 SIE, 90 data buffer (FIFO), 100 connection equipment , 110 Data transfer control device (for connection device), 112 Sealing part, 120, 122 cable, 130, 132 connector, 190 Data transfer control device (for USB device)

Claims (16)

USB(Universal Serial Bus)を用いて第1、第2のUSBデバイスを接続する接続機器のためのデータ転送制御装置であって、
転送データを一時的に格納するデータバッファと、
データ転送を制御する転送コントローラとを含み、
前記転送コントローラが、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してコマンド受信のためのINトークンを発行し、
コマンド受信のためのINトークンに対する応答としてコマンドを含むデータを受信した場合に、受信したコマンドに基づいて、前記第1、第2のUSBデバイス間のデータ転送を制御することを特徴とするデータ転送制御装置。
A data transfer control device for a connection device that connects first and second USB devices using a USB (Universal Serial Bus),
A data buffer for temporarily storing transfer data,
A transfer controller for controlling data transfer,
The transfer controller,
Issue an IN token for command reception to one or both of the first and second USB devices,
When data including a command is received as a response to an IN token for receiving a command, data transfer between the first and second USB devices is controlled based on the received command. Control device.
請求項1において、
前記転送コントローラが、
コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの一方のUSBデバイスに対してINトークンを発行して、前記一方のUSBデバイスからデータを受信し、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のUSBデバイスに送信することを特徴とするデータ転送制御装置。
In claim 1,
The transfer controller,
When data including a command instructing data transfer between the first and second USB devices is received as a response to the IN token for receiving a command, one of the first and second USB devices is connected to one of the USB devices. Issue an IN token to the device, receive data from the one USB device, issue an OUT token to the other USB device of the first and second USB devices, and issue the OUT token to the one USB device. A data transfer control device for transmitting data received from a device to the other USB device.
請求項2において、
前記転送コントローラが、
コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、ライトコマンド又はリードコマンドを含むデータを他方のUSBデバイスに送信することを特徴とするデータ転送制御装置。
In claim 2,
The transfer controller,
When data including a command instructing data transfer between the first and second USB devices is received as a response to the IN token for command reception, the other USB of the first and second USB devices is received. A data transfer control device for issuing an OUT token to a device and transmitting data including a write command or a read command to another USB device.
請求項2において、
前記転送コントローラが、
コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの一方のUSBデバイスに対してOUTトークンを発行して、リードコマンドを含むデータを前記一方のUSBデバイスに送信し、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、ライトコマンドを含むデータを前記他方のUSBデバイスに送信することを特徴とするデータ転送制御装置。
In claim 2,
The transfer controller,
When data including a command instructing data transfer between the first and second USB devices is received as a response to the IN token for receiving a command, one of the first and second USB devices is connected to one of the USB devices. Issue an OUT token to the device, transmit data including a read command to the one USB device, and issue an OUT token to the other USB device of the first and second USB devices; A data transfer control device for transmitting data including a write command to the other USB device.
請求項2乃至4のいずれかにおいて、
前記転送コントローラが、
前記コマンドにより前記第1のUSBデバイスから前記第2のUSBデバイスにデータを転送することが指示された場合には、前記第1のUSBデバイスに対してINトークンを発行して、前記第1のUSBデバイスからデータを受信し、前記第2のUSBデバイスに対してOUTトークンを発行して、前記第1のUSBデバイスから受信したデータを前記第2のUSBデバイスに送信し、
前記コマンドにより前記第2のUSBデバイスから前記第1のUSBデバイスにデータを転送することが指示された場合には、前記第2のUSBデバイスに対してINトークンを発行して、前記第2のUSBデバイスからデータを受信し、前記第1のUSBデバイスに対してOUTトークンを発行して、前記第2のUSBデバイスから受信したデータを前記第1のUSBデバイスに送信することを特徴とするデータ転送制御装置。
In any one of claims 2 to 4,
The transfer controller,
When the command instructs to transfer data from the first USB device to the second USB device, an IN token is issued to the first USB device, and the first USB device issues an IN token. Receiving data from a USB device, issuing an OUT token to the second USB device, transmitting data received from the first USB device to the second USB device,
When the command instructs to transfer data from the second USB device to the first USB device, an IN token is issued to the second USB device, and the Receiving data from a USB device, issuing an OUT token to the first USB device, and transmitting data received from the second USB device to the first USB device; Transfer control device.
USB(Universal Serial Bus)を用いて第1、第2のUSBデバイスを接続する接続機器のためのデータ転送制御装置であって、
転送データを一時的に格納するデータバッファと、
データ転送を制御する転送コントローラとを含み、
前記転送コントローラが、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してINトークンを発行し、
発行したINトークンに対する応答として、前記第1、第2のUSBデバイスの一方のUSBデバイスから、NAK(Negative AcKnowledgment)ではなく零長ではないデータを受信した場合には、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のデバイスに送信することを特徴とするデータ転送制御装置。
A data transfer control device for a connection device that connects first and second USB devices using a USB (Universal Serial Bus),
A data buffer for temporarily storing transfer data,
A transfer controller for controlling data transfer,
The transfer controller,
Issue an IN token to one or both of the first and second USB devices,
As a response to the issued IN token, if data other than NAK (Negative AcKnowledgement) and not zero length is received from one of the first and second USB devices, the first and second USB devices are received. A data transfer control device which issues an OUT token to the other USB device of the USB device and transmits data received from the one USB device to the other USB device.
請求項1乃至6のいずれかにおいて、
前記転送コントローラが、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してインタラプト転送を用いて定期的にINトークンを発行することを特徴とするデータ転送制御装置。
In any one of claims 1 to 6,
The transfer controller,
A data transfer control device that periodically issues an IN token to one or both of the first and second USB devices using interrupt transfer.
請求項1乃至6のいずれかにおいて、
前記転送コントローラが、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してバルク転送を用いて定期的に又は不定期にINトークンを発行することを特徴とするデータ転送制御装置。
In any one of claims 1 to 6,
The transfer controller,
A data transfer control device which issues an IN token to one or both of the first and second USB devices regularly or irregularly using bulk transfer.
請求項1乃至8のいずれかのデータ転送制御装置と、
前記第1のUSBデバイスを接続するための第1のコネクタと、
前記第2のUSBデバイスを接続するための第2のコネクタと、
を含むことを特徴とする接続機器。
A data transfer control device according to any one of claims 1 to 8,
A first connector for connecting the first USB device;
A second connector for connecting the second USB device;
A connection device characterized by including:
USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御装置であって、
転送データを一時的に格納するデータバッファと、
データ転送を制御する転送コントローラとを含み、
前記転送コントローラが、
送信すべきコマンドが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、
送信すべきコマンドがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、コマンドを含むデータを送信することを特徴とするデータ転送制御装置。
A data transfer control device for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device,
A data buffer for temporarily storing transfer data,
A transfer controller for controlling data transfer,
The transfer controller,
When there is no command to be transmitted, a NAK (Negative AcKnowledgement) or a zero-length packet is transmitted as a response to the IN token from the data transfer control device included in the connection device,
When there is a command to be transmitted, the data transfer control device transmits data including the command as a response to the IN token from the data transfer control device included in the connection device.
USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御装置であって、
転送データを一時的に格納するデータバッファと、
データ転送を制御する転送コントローラとを含み、
前記転送コントローラが、
前記第2のUSBデバイスに送信すべきデータが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、
前記第2のUSBデバイスに送信すべきデータがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、前記第2のUSBデバイスに送信すべきデータを送信することを特徴とするデータ転送制御装置。
A data transfer control device for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device,
A data buffer for temporarily storing transfer data,
A transfer controller for controlling data transfer,
The transfer controller,
If there is no data to be transmitted to the second USB device, a NAK (Negative AcKnowledgement) or a zero-length packet is transmitted as a response to the IN token from the data transfer control device included in the connection device;
When there is data to be transmitted to the second USB device, transmitting the data to be transmitted to the second USB device as a response to the IN token from the data transfer control device included in the connection device is performed. Characteristic data transfer control device.
USB(Universal Serial Bus)を介して第1、第2のUSBデバイス間でデータを転送するためのデータ転送制御方法であって、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してコマンド受信のためのINトークンを発行し、
コマンド受信のためのINトークンに対する応答としてコマンドを含むデータを受信した場合に、受信したコマンドに基づいて、前記第1、第2のUSBデバイス間のデータ転送を制御することを特徴とするデータ転送制御方法。
A data transfer control method for transferring data between a first USB device and a second USB device via a USB (Universal Serial Bus),
Issue an IN token for command reception to one or both of the first and second USB devices,
When data including a command is received as a response to an IN token for receiving a command, data transfer between the first and second USB devices is controlled based on the received command. Control method.
請求項12において、
コマンド受信のためのINトークンに対する応答として、前記第1、第2のUSBデバイス間のデータ転送を指示するコマンドを含むデータを受信した場合に、前記第1、第2のUSBデバイスの一方のUSBデバイスに対してINトークンを発行して、前記一方のUSBデバイスからデータを受信し、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のUSBデバイスに送信することを特徴とするデータ転送制御方法。
In claim 12,
When data including a command instructing data transfer between the first and second USB devices is received as a response to the IN token for receiving a command, one of the first and second USB devices is connected to one of the USB devices. Issue an IN token to the device, receive data from the one USB device, issue an OUT token to the other USB device of the first and second USB devices, and issue the OUT token to the one USB device. A data transfer control method, comprising transmitting data received from a device to the other USB device.
USB(Universal Serial Bus)を介して第1、第2のUSBデバイス間でデータを転送するためのデータ転送制御方法であって、
前記第1、第2のUSBデバイスのいずれか一方又は両方に対してINトークンを発行し、
発行したINトークンに対する応答として、前記第1、第2のUSBデバイスの一方のUSBデバイスから、NAK(Negative AcKnowledgment)ではなく零長ではないデータを受信した場合には、前記第1、第2のUSBデバイスの他方のUSBデバイスに対してOUTトークンを発行して、前記一方のUSBデバイスから受信したデータを前記他方のデバイスに送信することを特徴とするデータ転送制御方法。
A data transfer control method for transferring data between a first USB device and a second USB device via a USB (Universal Serial Bus),
Issue an IN token to one or both of the first and second USB devices,
As a response to the issued IN token, if data other than NAK (Negative AcKnowledgement) and not zero length is received from one of the first and second USB devices, the first and second USB devices are received. A data transfer control method, wherein an OUT token is issued to the other USB device of the USB device, and data received from the one USB device is transmitted to the other USB device.
USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御方法であって、
送信すべきコマンドが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、
送信すべきコマンドがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、コマンドを含むデータを送信することを特徴とするデータ転送制御方法。
A data transfer control method for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device,
When there is no command to be transmitted, a NAK (Negative AcKnowledgement) or a zero-length packet is transmitted as a response to the IN token from the data transfer control device included in the connection device,
A data transfer control method characterized by transmitting data including a command as a response to an IN token from a data transfer control device included in the connected device when there is a command to be transmitted.
USB(Universal Serial Bus)及び接続機器を介して第2のUSBデバイスと接続される第1のUSBデバイスのためのデータ転送制御方法であって、
前記第2のUSBデバイスに送信すべきデータが無い場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、NAK(Negative AcKnowledgment)又は零長パケットを送信し、
前記第2のUSBデバイスに送信すべきデータがある場合には、前記接続機器が含むデータ転送制御装置からのINトークンに対する応答として、前記第2のUSBデバイスに送信すべきデータを送信することを特徴とするデータ転送制御方法。
A data transfer control method for a first USB device connected to a second USB device via a USB (Universal Serial Bus) and a connection device,
If there is no data to be transmitted to the second USB device, a NAK (Negative AcKnowledgement) or a zero-length packet is transmitted as a response to the IN token from the data transfer control device included in the connection device;
When there is data to be transmitted to the second USB device, transmitting the data to be transmitted to the second USB device as a response to the IN token from the data transfer control device included in the connection device is performed. Characteristic data transfer control method.
JP2003162216A 2003-06-06 2003-06-06 Data transfer control device, connecting equipment, and data transfer control method Withdrawn JP2004362422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003162216A JP2004362422A (en) 2003-06-06 2003-06-06 Data transfer control device, connecting equipment, and data transfer control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003162216A JP2004362422A (en) 2003-06-06 2003-06-06 Data transfer control device, connecting equipment, and data transfer control method

Publications (1)

Publication Number Publication Date
JP2004362422A true JP2004362422A (en) 2004-12-24

Family

ID=34054429

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003162216A Withdrawn JP2004362422A (en) 2003-06-06 2003-06-06 Data transfer control device, connecting equipment, and data transfer control method

Country Status (1)

Country Link
JP (1) JP2004362422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928377A (en) * 2022-05-11 2022-08-19 威创集团股份有限公司 Output transmission method, device and equipment for reducing USB data transparent transmission bandwidth

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928377A (en) * 2022-05-11 2022-08-19 威创集团股份有限公司 Output transmission method, device and equipment for reducing USB data transparent transmission bandwidth
CN114928377B (en) * 2022-05-11 2023-04-21 威创集团股份有限公司 Output transmission method, device and equipment for reducing transparent transmission bandwidth of USB data

Similar Documents

Publication Publication Date Title
JP3649227B2 (en) Data transfer control device, electronic device, and data transfer control method
US7028109B2 (en) Data transfer control device including buffer controller with plurality of pipe regions allocated to plurality of endpoints
JP3632695B2 (en) Data transfer control device, electronic device, and data transfer control method
US6618788B1 (en) ATA device control via a packet-based interface
JP3649226B2 (en) Data transfer control device, electronic device, and data transfer control method
TWI296083B (en) Communication controller, host-side controller, communication system, usb system, communication equipment, communication method, packet-based communication method, packet-based communication program, and storage medium
JP4377603B2 (en) Bus communication system and communication control method thereof
JP3870717B2 (en) Data transfer control device and electronic device
JP2010061670A (en) Bus connection system
JP4837659B2 (en) Bus controller for processing split transactions
JP3726898B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2005122372A (en) Data transfer controller, electronic equipment and data transfer control method
US7469304B2 (en) Data transfer control device, electronic equipment, and method for a data transfer through a bus, the data transfer control device including a register and a packet buffer that are commonly used during a host operation and a peripheral operation
US7359996B2 (en) Data transfer control device, electronic equipment, and data transfer control method
JP3636160B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2004362422A (en) Data transfer control device, connecting equipment, and data transfer control method
JP2005100008A (en) Data transfer controller, connection equipment and data transfer control method
JP2008502980A (en) Bus controller for transferring data
JP2001337911A (en) Usb-atapi interface system and atapi-usb converter used for it
JP4127071B2 (en) Data transfer control device, electronic device, and data transfer control method
JP4127069B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2003523576A (en) Link bridge
JP2003323391A (en) Data transfer control device, electronic equipment and data transfer control method
JP2003316734A (en) Data transfer control device, electronic equipment, and data transfer control method
JP2002300228A (en) Device and method for processing data and medium for providing control program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060905