JP2004054437A - Data telecommunication system - Google Patents

Data telecommunication system Download PDF

Info

Publication number
JP2004054437A
JP2004054437A JP2002208795A JP2002208795A JP2004054437A JP 2004054437 A JP2004054437 A JP 2004054437A JP 2002208795 A JP2002208795 A JP 2002208795A JP 2002208795 A JP2002208795 A JP 2002208795A JP 2004054437 A JP2004054437 A JP 2004054437A
Authority
JP
Japan
Prior art keywords
data
endpoint
buffer memory
shared
amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002208795A
Other languages
Japanese (ja)
Inventor
Sunao Nakabachi
中鉢 直
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2002208795A priority Critical patent/JP2004054437A/en
Publication of JP2004054437A publication Critical patent/JP2004054437A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data communication system capable of reducing the scale of a circuit, and improving a data transferring speed by sharing a part of a buffer memory by a plurality of end point parts, and changing a shared buffer memory according to the use condition of the buffer memory. <P>SOLUTION: This data communication system for performing data communication based on USB specifications is provided with two buffer memories 20a and 20c for an end point part 13a and two buffer memories 20b and 20c for an end point part 13b wherein the buffer memory 20c of the plurality of buffer memories is shared by the two end point parts 13a and 13b. In deciding which of the end point parts uses the shared buffer memory 20c, data quantity transferred by using the buffer memory is compared for the end points 13a and 13b so that which of those end point parts sharing the shared buffer memory 20c uses the shared buffer memory 20c can be decided. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、例えばパーソナルコンピュータとプリンタなど複数の周辺機器間で、USB規格に準拠したデータ通信を行うデータ通信システムに関する。
【0002】
【従来の技術】
近年、パーソナルコンピュータ(以下、PCと称す)と周辺機器を接続するインターフェースとしてUSB(Universal Serial Bus)規格が使用されている。USB規格ではPCが一つしか存在しないホスト装置となり、そのホスト装置の下に複数のデバイス(周辺機器など)がツリー状に接続され、デバイス内のUSBコントローラがそれぞれ固有のアドレスを持つ。
図8はUSB通信システムの接続概念図である。図8に示したように、ルートハブ(HUB)機能(集配信機能など)をもつUSBホスト装置(以下、ホスト装置と略す)1、ハブ(HUB)2(2a、2b)、デバイス3(3a〜3d)などがUSBバス4により接続されている。このように、USB通信システムでは一つのホスト装置1の下に複数のハブ(HUB)2またはデバイス3がツリー状に接続される。また、デバイス3は図9に示したようにUSBコントローラ6、ターゲット機器7から構成される。
ホスト装置であるPCは固有のアドレスのUSBコントローラ6に対してデータ送受信の要求とデータの送受信を行う。USBコントローラ6は、ホスト装置1からデータ送受信の要求を受信すると、割込み信号などを用いてターゲット機器7内のユーザ回路に対してホスト装置1からデータ送受信の要求を受けたことを示す。そして、ユーザ回路はUSBコントローラ6からデータ送受信の要求の内容を読み出して、USBコントローラ6がホスト装置1から受信したデータを読み出したり、ホスト装置1に対する送信データをUSBコントローラ6に書き込んだりする。なお、USBコントローラ6は、ホスト装置1に対してデータを送信したり、ホスト装置からデータを受信したりする際にデータを一時的に記憶する、通常FIFOメモリ(First In First Out Memory)からなるエンドポイント部を複数もつ(その数は規格によって決められている)。ターゲット機器7は、デバイス3のUSBコントローラ6のローカルバスに接続され、エンドポイント部であるFIFOメモリに対してアクセスするのである。
ところで、USBバスを用いたデータ転送は、パケットという単位で行われる。パケットの種類としては、転送方向やセットアップ情報を送るトークンパケット、実際のデータであるデータパケット、データ転送結果(成功・失敗など)を送るハンドシェイクパケットがある。また、転送のモードも、エンドポイント部ゼロを介して行われる、デバイスの初期化や各種情報のやりとりに使用するコントロール転送、転送周期を問わずプリンタのデータのようにまとまった量のデータを転送するバルク転送、マウスやキーボードのステータスを送るような低周期で少量のデータを送るインタラプト転送、音声データなどリアルタイムのデータを送るときにデータの正当性を保証しない代わりにバンド幅を保証するアイソクロナス転送の4モードある。
【0003】
図10はUSBコントローラ21の構成例である。図10において、USBトランシーバ11は、USBバス4に接続され、図中には示されないホスト装置1から送信されたパケットをUSBバス4の信号から論理信号に変換して次に説明するシリアル入力エンジン12に出力すると同時に、シリアル入力エンジン12からホスト装置1へ送信するパケットを論理信号からUSBバスの信号に変換してUSBホストに出力する。
また、シリアル入力エンジン12は、USBトランシーバ11から入力されるホスト装置1から送信されたパケットのうちトークンパケットおよびハンドシェークパケットをデコードし、それを基にホスト装置1との通信を制御し、必要に応じてハンドシェークパケットをUSBトランシーバ11に出力するとともに、ホスト装置1へ出力するデータを次に説明するエンドポイント群13から読み出し、制御データを付加してデータパケットとしてUSBトランシーバ11へ出力し、USBトランシーバ11から入力するホスト装置1からのデータパケットの中のデータをエンドポイント群13に書き込む制御を行う。
また、エンドポイント群13はローカルバスから受信しホスト装置1へ送信するデータをバッファリングするとともに、ホスト装置1から受信しローカルバスへ出力するデータをバッファリングし、I/Oコントローラ15は図中には示されないユーザ回路とエンドポイント群13、および次に述べるレジスタとの間におけるデータ転送を制御し、レジスタ16はUSBコントローラ内部モジュールの各種設定を行うとともに、コントロール転送の自動応答リクエストを格納しておく。
なお、エンドポイント群13は、エンドポイント部ゼロ130とコントロール転送以外の転送に使用される複数のエンドポイント部131,・・・,13nから構成される。ここで、エンドポイント部ゼロ130はコントロール転送で使用される双方向のエンドポイント部で、ホスト装置1から見た場合のエンドポイント番号は0に固定されている。それを除いては単一の転送方向(ホスト装置1に対して出力または入力)のエンドポイント部で、転送方法、転送の向き、ホスト装置1から見た場合のエンドポイント番号は0以外に固定、または、レジスタ16に利用者が設定して使用する。
【0004】
図11はエンドポイント群13の構成例である。図11に示したように、ホスト装置1に対して送信するデータやホスト装置1から受信したデータを格納するFIFO200、201、そのFIFO200、201に対するデータ書き込みの制御を行うライトコントローラ21、FIFO200、201からのデータ読み出しの制御を行うリードコントローラ22、データを読み出すFIFOを選択するマルチプレクサ23を備える。
このように、各エンドポイント部は、FIFOメモリを二つ持ち、FIFOメモリの一方をデータ書き込み用、他方をデータ読み出し用とする。そして、ライトコントローラ21とリードコントローラ22との間でFIFOメモリの状態を表す信号を授受し、データ書き込み用に設定されたFIFOメモリへのデータ書き込み終了時にデータ読み出し用に設定されているFIFOメモリからのデータ読み出しが終了しているときは直ぐに、また、データ読み出しが終了していないときは、データ読み出しの終了を待って、データ書き込み用FIFOメモリとデータ読み出し用FIFOメモリを切り換えることによりデータ転送速度を向上させる。なお、このような構成を持つUSBコントローラとしては例えば沖電気のML60851Cがある。
【0005】
【発明が解決しようとする課題】
しかしながら、前記した従来技術においては、エンドポイント部毎にFIFOメモリを二つ使用するので、FIFOメモリの数が多くなり、したがって、回路規模が大きくなるという問題点があった。
本発明の目的は、このような従来技術の問題を解決することにあり、具体的には、FIFOメモリなどバッファメモリの一部を複数のエンドポイント部で共有し、共有するバッファメモリを、バッファメモリの使用状況(データ転送状況)に応じて変更することにより、回路規模を小さく抑えつつデータ転送速度を向上させることができるデータ通信システムを提供することにある。
【0006】
【課題を解決するための手段】
前記の課題を解決するために、請求項1記載の発明では、USB規格に準拠したデータ通信を行うデータ通信システムにおいて、一つのエンドポイント部に対してバッファメモリを複数備え、該複数のバッファメモリのうち一つ以上のバッファメモリを他のエンドポイント部と共有する構成とし、共有バッファメモリとして使用するエンドポイント部を決定する際、前記共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて転送されたデータ量を比較することにより決定するように構成にしたことを特徴とする。
また、請求項2記載の発明では、請求項1記載の発明において、バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送する毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とする。
また、請求項3記載の発明では、請求項1記載の発明において、所定時間が経過する毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とする。
また、請求項4記載の発明では、請求項1記載の発明において、共有バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送するか、または所定時間が経過するか、どちらかの条件を満たす毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とする。
また、請求項5記載の発明では、請求項2または請求項4記載の発明において、バッファメモリを介して転送されたデータ量を比較する際の所定のデータ量の値を変更可能な構成にしたことを特徴とする。
また、請求項6記載の発明では、請求項3または請求項4記載の発明において、バッファメモリを介して転送されたデータ量を比較する際の所定時間を変更可能な構成にしたことを特徴とする。
また、請求項7記載の発明では、請求項6記載の発明において、バッファメモリを介して転送されたデータ量に応じて前記所定時間を変更する構成にした。
【0007】
また、請求項8記載の発明では、USB規格に準拠したデータ通信を行うデータ通信システムにおいて、一つのエンドポイント部に対してバッファメモリを複数用意し、その複数のバッファメモリのうち一つ以上のバッファメモリを他のエンドポイント部と共有する構成とし、共有バッファメモリを使用するエンドポイント部を決定する際、その共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて所定のデータ量が転送された所要時間を比較することによりその共有バッファメモリを用いるエンドポイント部を決定するように構成にしたことを特徴とする。
また、請求項9記載の発明では、請求項8記載の発明において、前記所定のデータ量の値を変更可能な構成にしたことを特徴とする。
また、請求項10記載の発明では、請求項5、請求項6、または請求項8記載の発明において、前記所定のデータ量または所定の所要時間の値をエンドポイント部によって異ならせる構成にしたことを特徴とする。
また、請求項11記載の発明では、請求項1乃至請求項9のいずれか1項に記載の発明において、同一エンドポイント部の単位時間当たりの転送データ量が続けて複数回多くなってはじめてそのエンドポイント部に共有バッファメモリの接続先を変更する構成にしたことを特徴とする。
また、請求項12記載の発明では、請求項1乃至請求項11のいずれか1項に記載の発明において、バッファメモリがFIFOメモリである構成にしたことを特徴とする。
【0008】
【発明の実施の形態】
以下、図面により本発明の実施の形態を詳細に説明する。
図1に、本発明の第1の実施例として、イン(IN:ホスト装置から見て入力)転送用のエンドポイント部とアウト(OUT:ホスト装置から見て出力)転送用のエンドポイント部を同時に使用する際にバッファメモリとして用いるFIFOメモリを共有する構成を示す。図示したように、シリアル入力エンジン12、エンドポイント群13、およびI/Oコントローラ15を備えている。なお、ここでは、図を簡略化するために、エンドポイント部としてFIFOメモリを共有するエンドポイント部13a、13bのみを示す。エンドポイント部13aはイン転送のエンドポイント部、エンドポイント13bはアウト転送のエンドポイント部であり、それぞれ1つの占有FIFOメモリと1つの共有FIFOメモリを持つ。つまり、FIFOメモリ20aはエンドポイント部13aの占有FIFOメモリ、FIFO20bはエンドポイント部13bの占有FIFOメモリ、FIFO20cはエンドポイント部13aとエンドポイント部13bの共有FIFOメモリである。
図1では、イン転送においてエンドポイント部13aからホスト装置1へ送るデータ数が、アウト転送においてエンドポイント部13bがホスト装置1から受け取るデータ数より多い場合、(a)図に示したようにFIFOメモリ20cをエンドポイント部13a側で使用して、エンドポイント部13aではFIFOメモリ20aとFIFOメモリ20cを用いてユーザ回路からのデータを交互に受け取ることによりホスト装置1へデータを送り、エンドポイント部13bではFIFOメモリ20bのみ用いてホスト装置1からのデータを受け取りユーザ回路へ送る。
一方、アウト転送においてエンドポイント部13bのホスト装置1から受け取るデータ数がイン転送においてエンドポイント部13aからホスト装置1へ送るデータ数より多い場合は(b)図に示したようにFIFOメモリ20cをエンドポイント部13b側で使用して、エンドポイント部13bではFIFOメモリ20bとFIFOメモリ20cを用いてホスト装置1からのデータを交互に受け取りユーザ回路へ送り、エンドポイント部13aではFIFOメモリ20aのみ用いてユーザ回路からのデータを受け取りホスト装置1へデータを送る。
なお、このようにイン転送用のエンドポイント部とアウト転送用のエンドポイント部を同時に使用する際にホスト装置1へのデータ送信とホスト装置1からのデータ受信のデータ数に差が生じる例としては、ハードディスク記憶装置や光ディスク記憶装置などストレージデバイスで大容量のデータリードやデータライトを行う場合とか、ファクシミリ装置やスキャナ機能付きプリンタにおけるデータスキャン入力やプリント出力を行う場合などがある。また、ここでは説明しないが、例えば一つのUSBコントローラ6に対して複数のユーザ回路が接続されるような場合などにおいてホスト装置1へのデータ送信を行うエンドポイント部同士、ホスト装置1からのデータ受信を行うエンドポイント部同士でデータ数に差が生じる場合もあり得る。
【0009】
図2に、この実施例のUSBコントローラ6の構成を示す。図2に示したUSBコントローラ6が図10に示した従来技術のUSBコントローラ6aと異なる点はエンドポイント群13の中に共有FIFOコントローラ17を持つことである。
この共有FIFOコントローラ17は複数のエンドポイント部で共有するFIFOメモリをどのエンドポイント部に接続するかを制御するものであり、転送されたデータ量を所定時間毎に比較して、またはいずれかのエンドポイント部において所定のデータ量が転送される毎に比較して、またはどちらか一方の条件を満たす毎に比較して、共有FIFOメモリを転送データ量の多いエンドポイント部に接続するように決定し、制御信号を出力する。なお、データ量の計算は共有FIFOメモリを接続する対象のエンドポイント部または共有FIFOコントローラ17にカウンタを設けて行う。
【0010】
図3は本発明の第2の実施例を示すUSBコントローラ6のエンドポイント群の構成である。
この実施例では、二つのエンドポイント部EPA、EPBが一つのFIFOメモリを共有する。図3に示したFIFOメモリ20aにはエンドポイント部EPAのデータを格納し、FIFOメモリ20bにはエンドポイント部EPBのデータを格納し、FIFOメモリ20cはエンドポイント部EPA、EPBが共有する。FIFOメモリ20cはデータ転送の状況に応じてエンドポイント部EPA、EPBのうちどちらかのデータを格納するように制御される。
そのため、この実施例では、図3に示したように、エンドポイント部EPAのFIFOメモリに対するデータ書き込みの制御を行うライトコントローラ21a、エンドポイント部EPBのFIFOメモリに対するデータ書き込みの制御を行うライトコントローラ21b、エンドポイント部EPAのFIFOメモリからのデータ読み出しの制御を行うリードコントローラ22a、エンドポイント部EPBのFIFOメモリからのデータ読み出しの制御を行うリードコントローラ22b、エンドポイント部EPAのデータを読み出すFIFOメモリを選択するマルチプレクサ23a、エンドポイント部EPBのデータを読み出すFIFOメモリを選択するマルチプレクサ23b、エンドポイント部EPA、EPBが共有するFIFOメモリに入力するライト制御信号を切り換えるマルチプレクサ24、エンドポイント部EPA、EPBが共有するFIFOメモリに入力するライトデータ信号を切り換えるマルチプレクサ25、エンドポイント部EPA、EPBで共有するFIFOメモリに入力するリード制御信号を切り換えるマルチプレクサ26、エンドポイント部EPAで転送したデータ量を計算するカウンタ27a、エンドポイント部EPBで転送したデータ量を計算するカウンタ27bなどを備える。
【0011】
図4に、この実施例のエンドポイント群におけるデータリード/ライトの動作フローを示す。以下、図4に従ってこの動作フローを説明する。
まず、エンドポイント部EPA、EPBにより共有されるFIFOメモリ20cの接続されるエンドポイント部が共有FIFOコントローラ17から入力する共有FIFO制御信号によってエンドポイント部EPAに設定される場合(S1でYes)、ライトコントローラ21aからの制御信号によってマルチプレクサ24はエンドポイント部EPAのライト制御信号を出力し、マルチプレクサ25はFIFOメモリ20aに入力するものと同一のエンドポイント部EPAのライトデータ信号を出力する。また、リードコントローラ22aからの制御信号によってマルチプレクサ26はリードコントローラ22aから出力されるエンドポイント部EPAのリード制御信号を出力し、これらはFIFOメモリ20cに接続される(S2)。
そして、FIFOメモリ20cがこのようにエンドポイント部EPAに接続される場合、ライトコントローラ21aはエンドポイント部EPAのライト制御信号をFIFOメモリ20aに出力するように設定され、リードコントローラ22aは、エンドポイント部EPAのリード制御信号をFIFOメモリ20cに出力するように設定される。同時に、エンドポイント部EPAのリードデータを読み出すFIFOメモリを選択するマルチプレクサ23aの制御信号の値をFIFOメモリ20cのリードデータ信号を出力するように設定する(S3)。
この後、エンドポイント部EPAのライト制御信号がライトコントローラ21aに入力すると、ライトコントローラ21aはFIFOメモリ20aに対してライト制御信号を出力し、FIFOメモリ20aではライトコントローラ21aから入力されるライト制御信号に基づいてライトデータをFIFOメモリに書き込む(S4)。
【0012】
そして、FIFOメモリ20aへのデータ書き込みが終了すると(S5でYes)、FIFOメモリ20cからのデータ読み出しが終了しているかどうかの判断を行うが(S6)、最初は読み出し側FIFOメモリ(FIFOメモリ20c)には元々データが入っておらず、その状態を示す信号がデータ読み出し終了であるので(S6でYes)、FIFOメモリ20cが共有FIFO制御信号でエンドポイント部EPAに設定されている場合(S7でYes)、ライトコントローラ21aは、ライト制御信号出力先FIFOメモリをFIFOメモリ20aからFIFOメモリ20cに変更する。また、リードコントローラ22aは、リード制御信号出力先FIFOメモリをFIFOメモリ20cからFIFOメモリ20aに変更し、同時にエンドポイント部EPAのリードデータを読み出すFIFOメモリを選択するマルチプレクサ23aの制御信号の値をFIFOメモリ20aのリードデータ信号を出力するように設定する(S8)。
この後、エンドポイント部EPAのライト制御信号がライトコントローラ21aに入力すると、ライトコントローラ21aは今度はFIFOメモリ20cに対してライト制御信号を出力し、FIFOメモリ20cではライトコントローラ21aから入力されるライト制御信号に基づいてライトデータをFIFOメモリに書き込む。
一方、FIFOメモリ20aへのデータ書き込みが終了したとき、FIFOメモリ20aの状態を示す信号はデータ書き込み中からデータ書き込み終了へと変化するが、その変化は読み出し先(シリアル入力エンジン12またはユーザ回路(I/Oコントーラ15経由の割込み信号、またはエンドポイント部EPAがDMAをサポートする場合はそのリクエスト信号によって))に示される。そして、エンドポイント部EPAのリード制御信号がリードコントローラ22aに入力すると、リードコントローラ22aはFIFOメモリ20aに対してリード制御信号を出力し、FIFOメモリ20aではリードコントローラ22aから入力されるライト制御信号に基づいてリードデータをFIFOメモリから読み出す(S9)。
【0013】
こうして、FIFOメモリ20cへのデータ書き込みが終了したとき(S10でYes)、読み出し側FIFOメモリ(FIFOメモリ20a)の状態を示す信号がデータ読み出し終了状態であり(S11でYes)、FIFOメモリ20cが共有FIFO制御信号でエンドポイント部EPAに設定されている場合(S1でYes)、FIFOメモリ20cの接続はエンドポイント部EPAのままに保つ(S2)。
そして、ライトコントローラ21aはライト制御信号を出力するFIFOメモリをFIFOメモリ20cからFIFOメモリ20aに変更する。また、リードコントローラ22aは、リード制御信号を出力するFIFOメモリをFIFOメモリ20aからFIFOメモリ20cに変更し、同時にエンドポイント部EPAのリードデータを読み出すFIFOメモリを選択するマルチプレクサ23aの制御信号の値をFIFOメモリ20cのリードデータ信号を出力するように設定する(S3)。
【0014】
それに対して、FIFOメモリ20cへのデータ書き込みが終了した時点でFIFOメモリ20aのデータ読み出しが未だ終了していない場合(S11でNo)は、FIFOメモリ20aの読み出しが終わるのを待ち(S9〜S11、この間FIFOメモリ20cへのデータ書き込みは禁止)、FIFOメモリ20aのデータ読み出しが終了した場合(S11でYes)、FIFOメモリ20cが共有FIFO制御信号でエンドポイント部EPAに設定されている場合(S1でYes)、FIFOメモリ20cの接続はエンドポイント部EPAのまま保持する(S2)。
そして、ライトコントローラ21aはライト制御信号を出力するFIFOメモリをFIFOメモリ20cからFIFOメモリ20aに変更する。また、リードコントローラ22aはリード制御信号を出力するFIFOメモリをFIFOメモリ20aからFIFOメモリ20cに変更し、同時にエンドポイント部EPAのリードデータを読み出すFIFOメモリを選択するマルチプレクサ23aの制御信号の値をFIFOメモリ20cのリードデータ信号を出力するように設定する(S3)。
以後、FIFOメモリ20cがエンドポイント部EPAに接続されている間は、同様に、データ書き込みを行うFIFOメモリとデータ読み出しを行うFIFOメモリをライトコントローラ21aとリードコントローラ22aによってFIFOメモリ20aとFIFOメモリ20cの間で切り換えながらデータ転送を行う(S1〜S11)。
【0015】
それに対して、ステップS1またはS7においてFIFOメモリ20cがエンドポイント部EPAに接続されない(EPBに接続される)と判定された場合、ライトコントローラ21bからの制御信号によってマルチプレクサ24はエンドポイント部EPBのライト制御信号を出力し、マルチプレクサ25はFIFOメモリ20bに入力するものと同一のエンドポイント部EPBのライトデータを出力する。また、リードコントローラ22bからの制御信号によってマルチプレクサ26はリードコントローラ22bから出力されるエンドポイント部EPBのリード制御信号を出力し、これらはFIFOメモリ20cに接続される。そのため、エンドポイント部EPAでは、ライトコントローラ21aは共有FIFO制御信号によってライト制御信号をFIFOメモリ20aのみに出力するように設定され、リードコントローラ22aはリード制御信号をFIFOメモリ20aのみに出力するように設定される。同時に、エンドポイント部EPAのリードデータを読み出すFIFOメモリを選択するマルチプレクサ23aの制御信号の値はFIFOメモリ20aのリードデータを出力するように設定される(S12)。そして、FIFOメモリ20aはデータ書き込み用に設定される(S13)。
こうして、エンドポイント部EPAのライト制御信号がライトコントローラ21aに入力すると、ライトコントローラ21aはFIFOメモリ20aに対してライト制御信号を出力し、FIFOメモリ20aではライトコントローラ21aから入力するライト制御信号に基づいてライトデータをFIFOメモリに書き込む(S14、S15でNo)。そして、FIFOメモリ20aへのデータ書き込みが終了すると(S15でYes)、FIFOメモリ20aはデータ読み出し用に設定され(S16)、その状態変化を示す信号が読み出し先(シリアル入力エンジン12またはユーザ回路)に示される。
【0016】
続いて、読み出し先から、エンドポイント部EPAに対するリード制御信号がリードコントローラ22aに入ると、リードコントローラ22aはFIFOメモリ20aに対してリード制御信号を出力し、FIFOメモリ20aではリードコントローラ22aから入力されるリード制御信号に基づいてリードデータをFIFOメモリから読み出す(S17、S18でNo、この間ライトデータは書き込み禁止)。
そして、FIFOメモリ20aからのデータ読み出しが終了し(S18でYes)、FIFOメモリ20cが共有FIFO制御信号でエンドポイント部EPAに設定されない(EPBに接続される)場合(S1でNo)、FIFOメモリ20cはEPBに接続された状態を保持する(S12)。
こうして、FIFOメモリ20aは再び書き込み用に設定され(S13)、エンドポイント部EPAのライト制御信号がライトコントローラ21aに入力するとライトコントローラ21aはFIFOメモリ20aに対してライト制御信号を出力し、FIFOメモリ20aではライトコントローラ21aから入力されるライト制御信号に基づいてライトデータをFIFOメモリに書き込む(S14、S15でNo)。以後、ステップS1においてFIFOメモリ20cがエンドポイント部EPAに接続されない(エンドポイント部EPBに接続される)と判定される限り、ステップS13〜S18を繰り返す。
【0017】
なお、エンドポイント部EPBにおいては、FIFOメモリ20cがエンドポイント部EPAに接続される間、ステップS13〜S18と同様な動作をFIFOメモリ20bを用いて実行し、FIFOメモリ20cがエンドポイント部EPBに接続される間は、ステップS3〜S11と同様の動作をFIFOメモリ20bとFIFOメモリ20cを用いて実行する。
こうして、エンドポイント部EPA、EPBが共有するFIFOメモリ20cの接続されるエンドポイント部が共有FIFOコントローラ17から入力される共有FIFO制御信号によって変更される度に、マルチプレクサ24、25、26によってFIFOメモリ20cに接続されるエンドポイント部のライト制御、ライトデータ、リード制御の各信号が変更され、それにより、エンドポイント部EPA、EPBにおけるデータ転送方法(FIFOメモリ20c使用の有無)が変更される。
なお、それぞれのエンドポイント部のライト制御信号およびライトデータ信号は、イン転送の場合、I/Oコントローラ15との間で接続され、アウト転送の場合はシリアル入力エンジン12との間で接続される。また、エンドポイント部のリード制御信号およびリードデータ信号は、イン転送のエンドポイントの場合、シリアル入力エンジン12との間で接続され、アウト転送の場合はI/Oコントローラ15との間で接続される。
【0018】
また、図3に示したこの実施例の構成では、エンドポイント部EPA、EPBにおける転送の方向は、両方ともイン転送、両方ともアウト転送、一方がイン転送で他方がアウト転送のいずれも可能で、また、転送の種類の組み合わせにもよらない。さらに、この実施例では、二つのエンドポイント部で一つの共有FIFOメモリを持つ場合を示したが、本発明はこのような場合だけに限定されず、他のエンドポイント部と共有しないFIFOメモリを少なくとも一つ持ちさえすれば、例えば三つのエンドポイント部で一つの共有FIFOメモリを持つような構成でもよいし、また、二つのエンドポイント部が二つの共有FIFOメモリを持つような構成でもよい。
また、エンドポイント部EPA、EPBが共有するFIFOメモリ20cの接続されるエンドポイント部の決定については、カウンタ27a、27bから入力される各エンドポイント部のデータ転送量を所定時間が経過する毎に、または、カウンタ27a、27bから入力される各エンドポイント部のデータ転送量の一方が予め設定する値に達する毎に、または所定時間が経過するかあるいは一方が予め設定する値に達する毎に、EPAとEPBのデータ転送量を比較して行う。そして、データ転送量が多いエンドポイント部に共有FIFOメモリ20cを接続することで、データ転送量の多いエンドポイント部のデータ転送速度を向上させることができる。
【0019】
次に、図3に示した共有FIFOメモリ20cの接続先エンドポイント部の切換え動作を図3および図5〜図7に示した動作フロー図により説明する。
図5はFIFOメモリを共有するエンドポイント部のうちの一方のデータ転送量が設定値に達した場合に共有FIFOメモリ20cの接続先を変更する場合の動作フローである。
この場合、共有FIFOメモリ20cはまず共有FIFOコントローラ17によって初期設定されているエンドポイント部に接続される(S21)。続いて、共有FIFOコントローラ17はエンドポイント部EPA、EPB毎のデータ量を計算するカウンタ27a、27bをリセットし(S22)、転送されたデータ量のカウントを開始する(S23)。そして、エンドポイント部EPAの転送データ量が設定値に達せず(S24でNo)、エンドポイント部EPBの転送データ量も設定値に達しない限り(S25でNo)、カウンタ27a、27bにおけるカウントを続行する(S23)。
こうして、エンドポイント部EPAの転送データ量が設定値に達した場合(S24でYes)、共有FIFOコントローラ17は共有FIFOメモリ20cの接続先をエンドポイント部EPAに設定し(S27)、その後、ステップS22以下を繰り返す。また、エンドポイント部EPBの転送データ量が設定値に達した場合(S25でYes)、共有FIFOコントローラ17は共有FIFOメモリ20cの接続先をエンドポイント部EPBに設定し(S26)、その後、ステップS22以下を繰り返す。
【0020】
図6はデータ転送量のカウント開始後、設定された一定時間経過後に双方のデータ転送量を比較して共有FIFOメモリ20cの接続先を変更する場合の動作フロー図である。
この場合も、共有FIFOコントローラ17は、まず共有FIFOメモリ20cを初期設定されたエンドポイント部に接続する(S31)。そして、エンドポイント部EPA、EPB毎のデータ量をカウントするカウンタ27a、27bをリセットし、同時に共有FIFOコントローラ17内にあるデータ転送量カウント開始後の経過時間を計測するタイムカウンタもリセットし(S32)、それぞれ転送されたデータ量のカウントと経過時間の計測を開始させる(S33)。そして、経過時間を計測するタイムカウンタの値が設定値に達しない間は(S34でNo)、カウンタ27a、27bによる転送データ量のカウントとタイムカウンタによる経過時間の計測を続行する。
こうして、経過時間を計測するタイムカウンタの値が設定値に達すると(S34でYes)、共有FIFOコントローラ17はエンドポイント部EPAにおける転送データ量とエンドポイント部EPBにおける転送データ量を比較する(S35)。そして、エンドポイント部EPAの転送データ量の方が多い場合(S35でYes)、共有FIFOコントローラ17は共有FIFOメモリ20cの接続先をエンドポイント部EPAに設定し(S36)、その後、ステップS32以下を繰り返す。また、エンドポイント部EPBの転送データ量の方が多い場合は(S35でNo)、共有FIFOメモリ20cの接続先をエンドポイント部EPBに設定し(S37)、その後、ステップS32以下を繰り返す。
【0021】
図7はFIFOメモリを共有するエンドポイント部のうちの一方のデータ転送量が設定値に達した場合、またはデータ転送量のカウント開始後設定された一定時間経過後に双方のデータ転送量を比較して共有FIFOメモリ20cの接続先を変更する場合の動作フロー図である。
この場合、共有FIFOコントローラ17はまず共有FIFOメモリ20cを初期設定されるエンドポイント部に接続する(S41)。そして、共有FIFOコントローラ17はエンドポイント部EPA、EPB毎のデータ量をカウントするカウンタ27a、27bをリセットし、同時にFIFOコントローラ17内にあるデータ転送量カウント開始後の経過時間を計測するタイムカウンタもリセットし(S42)、それぞれ転送されたデータ量のカウントを開始させる(S43)。
そして、エンドポイント部EPAの転送データ量が設定値に達せず(S44でNo)、エンドポイント部EPBの転送データ量も設定値に達せず(S45でNo)、さらに経過時間を計測するタイムカウンタの値も設定値に達しない(S46でNo)間は、カウンタ27a、27bにおける転送データ量のカウントとタイムカウンタにおける経過時間の計測を続行する。
こうして、エンドポイント部EPAの転送データ量が設定値に達した場合(S44でYes)、共有FIFOコントローラ17は共有FIFOメモリ20cの接続先をエンドポイント部EPAに設定し(S49)、その後、ステップS42以下を繰り返す。また、エンドポイント部EPBの転送データ量が設定値に達した場合(S45でYes)、共有FIFOコントローラ17は共有FIFOメモリ20cの接続先をエンドポイント部EPBに設定し(S48)、その後、ステップS42以下を繰り返す。
また、経過時間を計測するタイムカウンタの値が設定値に達した場合(S46でYes)、共有FIFOコントローラ17はエンドポイント部EPAにおける転送データ量とエンドポイント部EPBにおける転送データ量を比較し(S47)、エンドポイント部EPAの転送データ量の方が多い場合は(S47でYes)、共有FIFOメモリ20cの接続先をエンドポイント部EPAに設定し(S49)、その後、ステップS42以下を繰り返す。また、エンドポイント部EPBの転送データ量の方が多い場合は(S47でNo)、共有FIFOメモリ20cの接続先をエンドポイント部EPBに設定し(S48)、その後、ステップS42以下を繰り返す。
【0022】
なお、図5〜図7に示した動作フロー図では、一つのエンドポイント部の転送データ数が設定値に達する度に、または経過時間が設定値に達する度に、共有FIFOメモリ20cの接続先エンドポイント部が前回と異なれば、共有FIFOメモリ20cの接続先エンドポイント部を変更したが、例えば同一エンドポイント部の所定時間当たりの転送データ量が続けて所定回数(例えば2度)多くなってはじめて接続先のエンドポイント部を変更するようにしてもよい。
また、所定のデータ量を転送するに要した所要時間を共有メモリを共有する各エンドポイント部について比較し、所要時間の短いエンドポイント部に共通FIFOメモリを接続する構成でもよい。
また、転送データ量の設定値、経過時間の設定値をUSBコントローラ内部のレジスタなどを用いて変更できるようにしてもよい。例えば、経過時間の設定値については、バッファメモリを介して転送された所定時間におけるデータ量が少な過ぎる場合には所定時間を長くし、データ量が多すぎれば所定時間を短くするのである。
また、転送データ量の設定値は全てのエンドポイント部で同一である必要はない。
また、転送されたデータ量をエンドポイント部間で比較する代わりに、転送されたデータ量の差を求め、その差が予め設定した所定値以上になった場合に接続先のエンドポイントを変更するようにしてもよい。
また、所定のデータ量を転送するのに要する時間が大幅に変わるような場合は転送データ量の設定値または経過時間の設定値を変更するようにして共有FIFOメモリを接続するエンドポイント部の制御効率を上げることも可能である。
【0023】
【発明の効果】
以上説明したように、本発明によれば、請求項1記載の発明では、USB規格に準拠したデータ通信を行うデータ通信システムにおいて、一つのエンドポイント部に対してバッファメモリが複数用意され、その複数のバッファメモリのうち一つ以上のバッファメモリが他のエンドポイント部と共有され、共有バッファメモリを使用するエンドポイント部を決定する際、その共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて転送されたデータ量を比較することによりその共有バッファメモリを用いるエンドポイント部が決定されるので、バッファメモリを用いて転送されたデータ量の多いエンドポイント部に共有バッファメモリを与えることができ、したがって、回路規模を抑えつつデータ転送速度を向上させることができる。
また、請求項2記載の発明では、請求項1記載の発明において、バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送する毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量が比較されるので、請求項1記載の発明の効果を容易に実現することができる。
また、請求項3記載の発明では、請求項1記載の発明において、所定時間が経過する毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量が比較されるので、同様に、請求項1記載の発明の効果を容易に実現することができる。
また、請求項4記載の発明では、請求項1記載の発明において、共有バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送するか、または所定時間が経過するか、どちらかの条件を満たす毎に共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量が比較されるので、より効果的に請求項1記載の発明の効果を得ることができる。
また、請求項5記載の発明では、請求項2または請求項4記載の発明において、バッファメモリを介して転送されたデータ量を比較する際の所定のデータ量の値を変更することができるので、共有バッファメモリを与える先のエンドポイント部を状況に応じて適切なタイミングで変更することができる。
【0024】
また、請求項6記載の発明では、請求項3または請求項4記載の発明において、バッファメモリを介して転送されたデータ量を比較する際の所定時間を変更することができるので、同様に、共有バッファメモリを与える先のエンドポイント部を状況に応じて適切なタイミングで変更することができる。
また、請求項7記載の発明では、請求項6記載の発明において、バッファメモリを介して転送されたデータ量に応じて所定時間が変更されるので、所定時間を適切に設定することができる。
また、請求項8記載の発明では、一つのエンドポイント部に対してバッファメモリが複数用意され、その複数のバッファメモリのうち一つ以上のバッファメモリが他のエンドポイント部と共有され、共有バッファメモリを使用するエンドポイント部を決定する際、その共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて所定のデータ量が転送された所要時間を比較することによりその共有バッファメモリを用いるエンドポイント部が決定されるので、請求項1記載の発明と同様な効果を得ることができる。
また、請求項9記載の発明では、請求項8記載の発明において、所定のデータ量の値を変更することができるので、共有バッファメモリを与える先のエンドポイント部を状況に応じて適切なタイミングで変更することができる。
また、請求項10記載の発明では、請求項5、請求項6、または請求項8記載の発明において、所定のデータ量または所定の所要時間の値をエンドポイント部によって異ならせることができるので、例えば特定のエンドポイント部に共有バッファメモリを与える度合いをより多くして、そのエンドポイント部における転送速度を他よりも向上させるというような使い方が可能になる。
また、請求項11記載の発明では、請求項1乃至請求項9のいずれか1項に記載の発明において、同一エンドポイント部の単位時間当たりの転送データ量が続けて複数回多くなってはじめてそのエンドポイント部に共有バッファメモリの接続先が変更されるので、一時的な転送データ量の変化で共有バッファメモリの接続先が変更されてしまうのを防ぐことができる。
また、請求項12記載の発明では、請求項1乃至請求項11のいずれか1項に記載の発明において、バッファメモリがFIFOメモリであるので、このような構成の場合で、請求項1乃至請求項10のいずれか1項に記載の発明の効果を得ることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施例を示すUSB通信システム要部の構成ブロック図。
【図2】本発明の第1の実施例を示すUSB通信システム要部の他の構成ブロック図。
【図3】本発明の第2の実施例を示すUSB通信システム要部の構成ブロック図。
【図4】本発明の第2の実施例を示すUSB通信システム要部の動作フロー図。
【図5】本発明の第2の実施例を示すUSB通信システム要部の他の動作フロー図。
【図6】本発明の第2の実施例を示すUSB通信システム要部の他の動作フロー図。
【図7】本発明の第2の実施例を示すUSB通信システム要部の他の動作フロー図。
【図8】従来技術の一例を示すUSB通信システムの接続概念図。
【図9】従来技術の一例を示すUSB通信システム要部の構成ブロック図。
【図10】従来技術の一例を示すUSB通信システム要部の他の構成ブロック図。
【図11】従来技術の一例を示すUSB通信システム要部の他の構成ブロック図。
【符号の説明】
1 USBホスト装置
2 ハブ
3 デバイス
4 USBバス
6 USBコントローラ
11 USBトランシーバ
12 シリアル入力エンジン
13 エンドポイント部
15 I/Oコントローラ
17 共有FIFOコントローラ
20 FIFOメモリ
21 ライトコントローラ
22 リードコントローラ
23 マルチプレクサ
24 マルチプレクサ
25 マルチプレクサ
26 マルチプレクサ
27 カウンタ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data communication system for performing data communication based on the USB standard between a plurality of peripheral devices such as a personal computer and a printer.
[0002]
[Prior art]
2. Description of the Related Art In recent years, the USB (Universal Serial Bus) standard has been used as an interface for connecting a personal computer (hereinafter, referred to as a PC) and peripheral devices. According to the USB standard, a host device has only one PC, a plurality of devices (peripheral devices, etc.) are connected in a tree shape under the host device, and the USB controllers in the devices have unique addresses.
FIG. 8 is a connection conceptual diagram of the USB communication system. As shown in FIG. 8, a USB host device (hereinafter abbreviated as a host device) 1 having a root hub (HUB) function (collection / distribution function, etc.) 1, a hub (HUB) 2 (2a, 2b), and a device 3 (3a to 3b) 3d) are connected by the USB bus 4. As described above, in the USB communication system, a plurality of hubs (HUBs) 2 or devices 3 are connected under one host device 1 in a tree shape. The device 3 includes a USB controller 6 and a target device 7 as shown in FIG.
The PC, which is the host device, sends and receives data to the USB controller 6 at a unique address. When receiving the data transmission / reception request from the host device 1, the USB controller 6 indicates that the data transmission / reception request has been received from the host device 1 to the user circuit in the target device 7 using an interrupt signal or the like. Then, the user circuit reads the content of the request for data transmission / reception from the USB controller 6, reads the data received by the USB controller 6 from the host device 1, or writes the transmission data to the host device 1 to the USB controller 6. The USB controller 6 includes a normal FIFO memory (First In First Out Memory) that temporarily stores data when transmitting data to the host device 1 or receiving data from the host device. It has a plurality of endpoints (the number is determined by standards). The target device 7 is connected to the local bus of the USB controller 6 of the device 3, and accesses the FIFO memory that is the endpoint.
Incidentally, data transfer using the USB bus is performed in units of packets. The packet types include a token packet for transmitting the transfer direction and setup information, a data packet as actual data, and a handshake packet for transmitting a data transfer result (success / failure, etc.). In addition, the transfer mode is controlled via the endpoint unit zero, control transfer used for device initialization and exchange of various information, and transfer of a large amount of data like printer data regardless of transfer cycle Bulk transfer, interrupt transfer that sends a small amount of data at a low frequency such as sending mouse and keyboard status, isochronous transfer that guarantees bandwidth instead of guaranteeing data validity when sending real-time data such as voice data There are four modes.
[0003]
FIG. 10 is a configuration example of the USB controller 21. 10, a USB transceiver 11 is connected to a USB bus 4, converts a packet transmitted from a host device 1 not shown in the figure from a signal on the USB bus 4 to a logical signal, and converts the packet into a serial signal. At the same time as outputting to the USB host, the packet to be transmitted from the serial input engine 12 to the host device 1 is converted from a logical signal to a signal on the USB bus and output to the USB host.
Further, the serial input engine 12 decodes the token packet and the handshake packet among the packets transmitted from the host device 1 input from the USB transceiver 11 and controls the communication with the host device 1 based on the token packet and the handshake packet. In response to this, a handshake packet is output to the USB transceiver 11, and data to be output to the host device 1 is read from the endpoint group 13 described below, control data is added thereto, and the data is output to the USB transceiver 11 as a data packet. Control is performed to write data in a data packet from the host device 1 input from the host device 11 to the endpoint group 13.
The endpoint group 13 buffers data received from the local bus and transmitted to the host device 1 and buffers data received from the host device 1 and output to the local bus. Controls the data transfer between the user circuit (not shown), the endpoint group 13, and the register described below. The register 16 performs various settings of the USB controller internal module and stores an automatic response request for the control transfer. Keep it.
The endpoint group 13 includes an endpoint zero 130 and a plurality of endpoints 131,..., 13n used for transfer other than control transfer. Here, the endpoint zero 130 is a bidirectional endpoint used for control transfer, and the endpoint number when viewed from the host device 1 is fixed to 0. Except for this, in the endpoint portion of a single transfer direction (output or input to the host device 1), the transfer method, the transfer direction, and the endpoint number as viewed from the host device 1 are fixed to values other than 0. Alternatively, the user sets and uses the register 16.
[0004]
FIG. 11 is a configuration example of the end point group 13. As shown in FIG. 11, FIFOs 200 and 201 for storing data to be transmitted to the host device 1 and data received from the host device 1, a write controller 21 for controlling data writing to the FIFOs 200 and 201, and FIFO 200 and 201. And a multiplexer 23 for selecting a FIFO from which data is read.
Thus, each endpoint unit has two FIFO memories, and one of the FIFO memories is used for writing data and the other is used for reading data. Then, a signal indicating the state of the FIFO memory is transmitted and received between the write controller 21 and the read controller 22, and when the data writing to the FIFO memory set for data writing is completed, the signal from the FIFO memory set for data reading is returned. When the data reading is completed, immediately, or when the data reading is not completed, the data transfer speed is switched by switching between the data writing FIFO memory and the data reading FIFO memory after the data reading is completed. Improve. As a USB controller having such a configuration, for example, there is ML60851C of Oki Electric.
[0005]
[Problems to be solved by the invention]
However, in the above-described prior art, since two FIFO memories are used for each end point unit, there is a problem that the number of FIFO memories is increased, and thus the circuit scale is increased.
An object of the present invention is to solve such a problem of the related art. Specifically, a part of a buffer memory such as a FIFO memory is shared by a plurality of endpoint units, and the shared buffer memory is stored in a buffer. It is an object of the present invention to provide a data communication system capable of improving the data transfer speed while keeping the circuit scale small by changing according to the use state of the memory (the data transfer state).
[0006]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, according to the present invention, in a data communication system for performing data communication conforming to the USB standard, a plurality of buffer memories are provided for one endpoint unit, and the plurality of buffer memories are provided. One or more buffer memories are shared with other endpoint units, and when determining an endpoint unit to be used as a shared buffer memory, a buffer memory is used for each endpoint unit that can share the shared buffer memory. It is characterized in that it is configured to determine by comparing the amount of data transferred using the data.
According to a second aspect of the present invention, in the first aspect of the present invention, each of the plurality of endpoint units sharing the buffer memory transfers the predetermined amount of data, the endpoint unit sharing the shared buffer memory. Is characterized by comparing the amount of data transferred via the buffer memory.
According to a third aspect of the present invention, in the first aspect of the present invention, the data amount transferred via the buffer memory is compared with respect to the endpoint portion sharing the shared buffer memory every time a predetermined time elapses. It is characterized by having comprised.
According to a fourth aspect of the present invention, in the first aspect of the present invention, one of the plurality of endpoint units sharing the shared buffer memory transfers a predetermined amount of data, or determines whether a predetermined time elapses. Each time one of the conditions is satisfied, the configuration is such that the data amount transferred via the buffer memory is compared for the end point unit sharing the shared buffer memory.
According to a fifth aspect of the present invention, in the second or fourth aspect of the present invention, the value of the predetermined data amount when comparing the amount of data transferred via the buffer memory can be changed. It is characterized by the following.
According to a sixth aspect of the present invention, in the third or fourth aspect of the present invention, the predetermined time for comparing the amount of data transferred via the buffer memory can be changed. I do.
According to a seventh aspect of the present invention, in the sixth aspect, the predetermined time is changed according to the amount of data transferred via the buffer memory.
[0007]
According to the invention of claim 8, in a data communication system that performs data communication conforming to the USB standard, a plurality of buffer memories are prepared for one endpoint unit, and one or more of the plurality of buffer memories are provided. The buffer memory is shared with other endpoint units, and when determining an endpoint unit that uses the shared buffer memory, a predetermined amount of data is stored in the buffer memory for each endpoint unit that can share the shared buffer memory. Is characterized in that it is configured to determine the end point unit using the shared buffer memory by comparing the required time transferred.
According to a ninth aspect of the present invention, in the invention of the eighth aspect, the configuration is such that the value of the predetermined data amount can be changed.
According to a tenth aspect of the present invention, in the fifth, sixth, or eighth aspect, the predetermined data amount or the predetermined required time value is made different depending on an end point unit. It is characterized by.
Also, in the invention according to claim 11, in the invention according to any one of claims 1 to 9, the amount of transfer data per unit time of the same end point portion increases continuously more than once. It is characterized in that the connection destination of the shared buffer memory is changed to the end point section.
According to a twelfth aspect of the present invention, in any one of the first to eleventh aspects, the buffer memory is a FIFO memory.
[0008]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 shows, as a first embodiment of the present invention, an endpoint portion for IN (IN: input as viewed from the host device) transfer and an endpoint portion for OUT (OUT: output as viewed from the host device) transfer. A configuration is shown in which a FIFO memory used as a buffer memory is shared when used simultaneously. As shown, a serial input engine 12, an endpoint group 13, and an I / O controller 15 are provided. Here, for simplification of the drawing, only the end points 13a and 13b sharing the FIFO memory are shown as end points. The endpoint unit 13a is an endpoint unit for in-transfer, and the endpoint 13b is an endpoint unit for out-transfer, each having one occupied FIFO memory and one shared FIFO memory. That is, the FIFO memory 20a is an occupied FIFO memory of the endpoint unit 13a, the FIFO 20b is an occupied FIFO memory of the endpoint unit 13b, and the FIFO 20c is a shared FIFO memory of the endpoint unit 13a and the endpoint unit 13b.
In FIG. 1, when the number of data to be transmitted from the endpoint unit 13a to the host device 1 in the in-transfer is larger than the number of data received by the endpoint unit 13b from the host device 1 in the out-transfer, the FIFO as shown in FIG. The memory 20c is used on the side of the endpoint unit 13a, and the endpoint unit 13a sends data to the host device 1 by alternately receiving data from the user circuit using the FIFO memory 20a and the FIFO memory 20c, At 13b, the data from the host device 1 is received using only the FIFO memory 20b and sent to the user circuit.
On the other hand, if the number of data received from the host device 1 of the endpoint unit 13b in the out transfer is larger than the number of data transmitted from the endpoint unit 13a to the host device 1 in the in transfer, the FIFO memory 20c is stored in the FIFO memory 20c as shown in FIG. Used on the end point unit 13b side, the end point unit 13b alternately receives data from the host device 1 using the FIFO memory 20b and the FIFO memory 20c and sends it to the user circuit, and the end point unit 13a uses only the FIFO memory 20a. And receives data from the user circuit and sends the data to the host device 1.
An example in which the number of data transmitted to the host apparatus 1 and the number of data received from the host apparatus 1 are different when the in-transfer endpoint and the out-transfer endpoint are used at the same time as described above. There are cases where large-capacity data reading and data writing are performed by a storage device such as a hard disk storage device and an optical disk storage device, and data scanning input and print output in a facsimile device or a printer with a scanner function. Although not described herein, for example, in a case where a plurality of user circuits are connected to one USB controller 6, endpoint units that perform data transmission to the host device 1, data from the host device 1 There may be a case where a difference occurs in the number of data between the receiving end points.
[0009]
FIG. 2 shows the configuration of the USB controller 6 of this embodiment. The USB controller 6 shown in FIG. 2 differs from the conventional USB controller 6 a shown in FIG. 10 in that a shared FIFO controller 17 is provided in the endpoint group 13.
The shared FIFO controller 17 controls which endpoint unit is connected to the FIFO memory shared by the plurality of endpoint units. The shared FIFO controller 17 compares the amount of transferred data at predetermined time intervals, or A comparison is made each time a predetermined amount of data is transferred in the endpoint section, or a comparison is made each time either of the conditions is satisfied, so that the shared FIFO memory is connected to the endpoint section having a large transfer data amount. And outputs a control signal. The calculation of the data amount is performed by providing a counter in the end point unit to which the shared FIFO memory is connected or the shared FIFO controller 17.
[0010]
FIG. 3 shows a configuration of an end point group of the USB controller 6 according to the second embodiment of the present invention.
In this embodiment, the two endpoint units EPA and EPB share one FIFO memory. The data of the endpoint EPA is stored in the FIFO memory 20a shown in FIG. 3, the data of the endpoint EPB is stored in the FIFO memory 20b, and the endpoints EPA and EPB share the FIFO memory 20c. The FIFO memory 20c is controlled so as to store either one of the endpoint units EPA and EPB in accordance with the data transfer status.
Therefore, in this embodiment, as shown in FIG. 3, the write controller 21a for controlling the writing of data to the FIFO memory of the endpoint EPA, and the write controller 21b for controlling the writing of data to the FIFO memory of the endpoint EPB. A read controller 22a for controlling the reading of data from the FIFO memory of the endpoint EPA, a read controller 22b for controlling the reading of data from the FIFO memory of the endpoint EPB, and a FIFO memory for reading the data of the endpoint EPA. A multiplexer 23a to select, a multiplexer 23b to select a FIFO memory from which data of the endpoint unit EPB is read, and an input to a FIFO memory shared by the endpoint units EPA and EPB. A multiplexer 24 for switching the write control signal to be input, a multiplexer 25 for switching the write data signal input to the FIFO memory shared by the endpoint units EPA and EPB, and a read control signal to be input to the FIFO memory shared by the endpoint units EPA and EPB. It includes a multiplexer 26, a counter 27a for calculating the amount of data transferred by the endpoint unit EPA, a counter 27b for calculating the amount of data transferred by the endpoint unit EPB, and the like.
[0011]
FIG. 4 shows an operation flow of data read / write in the end point group of this embodiment. Hereinafter, this operation flow will be described with reference to FIG.
First, when the endpoint unit connected to the FIFO memory 20c shared by the endpoint units EPA and EPB is set to the endpoint unit EPA by a shared FIFO control signal input from the shared FIFO controller 17 (Yes in S1), In response to a control signal from the write controller 21a, the multiplexer 24 outputs a write control signal of the endpoint EPA, and the multiplexer 25 outputs a write data signal of the same endpoint EPA as that input to the FIFO memory 20a. Further, the multiplexer 26 outputs a read control signal of the end point unit EPA output from the read controller 22a according to a control signal from the read controller 22a, and these are connected to the FIFO memory 20c (S2).
When the FIFO memory 20c is connected to the endpoint unit EPA in this manner, the write controller 21a is set to output a write control signal of the endpoint unit EPA to the FIFO memory 20a, and the read controller 22a The read control signal of the unit EPA is set to be output to the FIFO memory 20c. At the same time, the value of the control signal of the multiplexer 23a for selecting the FIFO memory from which the read data of the endpoint EPA is read is set so as to output the read data signal of the FIFO memory 20c (S3).
Thereafter, when a write control signal of the end point unit EPA is input to the write controller 21a, the write controller 21a outputs a write control signal to the FIFO memory 20a, and the write control signal input from the write controller 21a is output to the FIFO memory 20a. Then, the write data is written to the FIFO memory based on the data (S4).
[0012]
When the data writing to the FIFO memory 20a is completed (Yes in S5), it is determined whether the data reading from the FIFO memory 20c is completed (S6). First, the reading-side FIFO memory (FIFO memory 20c) is used. ) Does not originally contain data, and the signal indicating the state is the end of data reading (Yes in S6), so that the FIFO memory 20c is set in the endpoint EPA by the shared FIFO control signal (S7). Yes), the write controller 21a changes the write control signal output destination FIFO memory from the FIFO memory 20a to the FIFO memory 20c. Further, the read controller 22a changes the read control signal output destination FIFO memory from the FIFO memory 20c to the FIFO memory 20a, and at the same time, changes the value of the control signal of the multiplexer 23a for selecting the FIFO memory from which the read data of the endpoint EPA is read out. It is set to output a read data signal of the memory 20a (S8).
Thereafter, when the write control signal of the endpoint unit EPA is input to the write controller 21a, the write controller 21a outputs a write control signal to the FIFO memory 20c, and the write control signal input from the write controller 21a is output to the FIFO memory 20c. Write data is written to the FIFO memory based on the control signal.
On the other hand, when the data writing to the FIFO memory 20a is completed, the signal indicating the state of the FIFO memory 20a changes from the data writing to the data writing end, and the change is determined by the reading destination (the serial input engine 12 or the user circuit ( An interrupt signal via the I / O controller 15 or a request signal when the endpoint EPA supports DMA)). When the read control signal of the endpoint EPA is input to the read controller 22a, the read controller 22a outputs a read control signal to the FIFO memory 20a, and the FIFO memory 20a outputs the read control signal to the write control signal input from the read controller 22a. Read data is read from the FIFO memory based on the read data (S9).
[0013]
Thus, when the data writing to the FIFO memory 20c is completed (Yes in S10), the signal indicating the state of the read-side FIFO memory (FIFO memory 20a) is the data read end state (Yes in S11), and the FIFO memory 20c If the shared FIFO control signal has been set in the endpoint EPA (Yes in S1), the connection of the FIFO memory 20c is maintained as the endpoint EPA (S2).
Then, the write controller 21a changes the FIFO memory that outputs the write control signal from the FIFO memory 20c to the FIFO memory 20a. The read controller 22a changes the FIFO memory that outputs the read control signal from the FIFO memory 20a to the FIFO memory 20c, and simultaneously changes the value of the control signal of the multiplexer 23a that selects the FIFO memory that reads the read data of the endpoint EPA. The setting is made so as to output the read data signal of the FIFO memory 20c (S3).
[0014]
On the other hand, if the data reading from the FIFO memory 20a has not been completed yet (No in S11) at the time when the data writing to the FIFO memory 20c has been completed, the process waits until the reading from the FIFO memory 20a is completed (S9 to S11). During this time, data writing to the FIFO memory 20c is prohibited), when data reading from the FIFO memory 20a is completed (Yes in S11), and when the FIFO memory 20c is set in the endpoint EPA by the shared FIFO control signal (S1). Yes), the connection of the FIFO memory 20c is maintained as the endpoint EPA (S2).
Then, the write controller 21a changes the FIFO memory that outputs the write control signal from the FIFO memory 20c to the FIFO memory 20a. Further, the read controller 22a changes the FIFO memory that outputs the read control signal from the FIFO memory 20a to the FIFO memory 20c, and at the same time, changes the value of the control signal of the multiplexer 23a that selects the FIFO memory from which the read data of the endpoint EPA is read. The setting is made so as to output the read data signal of the memory 20c (S3).
Thereafter, while the FIFO memory 20c is connected to the endpoint EPA, the FIFO memory for writing data and the FIFO memory for reading data are similarly changed by the write controller 21a and the read controller 22a. The data transfer is performed while switching between (S1 to S11).
[0015]
On the other hand, if it is determined in step S1 or S7 that the FIFO memory 20c is not connected to the end point unit EPA (connected to the EPB), the multiplexer 24 causes the write operation of the end point unit EPB to be performed by a control signal from the write controller 21b. The control signal is output, and the multiplexer 25 outputs the same write data of the end point EPB as that input to the FIFO memory 20b. Further, the multiplexer 26 outputs a read control signal of the endpoint section EPB output from the read controller 22b according to a control signal from the read controller 22b, and these are connected to the FIFO memory 20c. Therefore, in the endpoint section EPA, the write controller 21a is set to output the write control signal only to the FIFO memory 20a by the shared FIFO control signal, and the read controller 22a outputs the read control signal only to the FIFO memory 20a. Is set. At the same time, the value of the control signal of the multiplexer 23a for selecting the FIFO memory from which the read data of the endpoint EPA is read is set so as to output the read data of the FIFO memory 20a (S12). Then, the FIFO memory 20a is set for writing data (S13).
Thus, when the write control signal of the end point unit EPA is input to the write controller 21a, the write controller 21a outputs a write control signal to the FIFO memory 20a, and the FIFO memory 20a receives the write control signal based on the write control signal input from the write controller 21a. Write the write data to the FIFO memory (No in S14 and S15). When the data writing to the FIFO memory 20a is completed (Yes in S15), the FIFO memory 20a is set for data reading (S16), and a signal indicating the state change is sent to the reading destination (the serial input engine 12 or the user circuit). Is shown in
[0016]
Subsequently, when a read control signal for the endpoint unit EPA from the read destination enters the read controller 22a, the read controller 22a outputs a read control signal to the FIFO memory 20a, and the read control signal is input from the read controller 22a to the FIFO memory 20a. The read data is read from the FIFO memory based on the read control signal (No in S17 and S18, during which write data is prohibited).
When the data reading from the FIFO memory 20a is completed (Yes in S18), and the FIFO memory 20c is not set to the endpoint EPA by the shared FIFO control signal (connected to the EPB) (No in S1), the FIFO memory 20c holds the state connected to the EPB (S12).
Thus, the FIFO memory 20a is set for writing again (S13), and when the write control signal of the endpoint EPA is input to the write controller 21a, the write controller 21a outputs a write control signal to the FIFO memory 20a, and In step 20a, write data is written to the FIFO memory based on the write control signal input from the write controller 21a (No in S14 and S15). Thereafter, steps S13 to S18 are repeated as long as it is determined in step S1 that the FIFO memory 20c is not connected to the endpoint unit EPA (connected to the endpoint unit EPB).
[0017]
In the endpoint EPB, while the FIFO memory 20c is connected to the endpoint EPA, the same operation as in steps S13 to S18 is performed using the FIFO memory 20b, and the FIFO memory 20c is connected to the endpoint EPB. During the connection, the same operation as in steps S3 to S11 is executed using the FIFO memory 20b and the FIFO memory 20c.
In this way, the multiplexers 24, 25, and 26 each time the end point unit connected to the FIFO memory 20c shared by the end point units EPA and EPB is changed by the shared FIFO control signal input from the shared FIFO controller 17, so that the FIFO memory is used. The write control, write data, and read control signals of the endpoint unit connected to the endpoint unit 20c are changed, thereby changing the data transfer method (whether the FIFO memory 20c is used) in the endpoint units EPA and EPB.
The write control signal and the write data signal of each endpoint are connected to the I / O controller 15 for in-transfer, and to the serial input engine 12 for out-transfer. . Further, the read control signal and the read data signal of the end point portion are connected to the serial input engine 12 in the case of the in-transfer end point, and connected to the I / O controller 15 in the case of the out transfer. You.
[0018]
Further, in the configuration of this embodiment shown in FIG. 3, the direction of transfer in the endpoint units EPA and EPB can be both in transfer, both out transfer, one in transfer, and the other out transfer. Also, it does not depend on the combination of transfer types. Further, in this embodiment, a case where two endpoint units have one shared FIFO memory has been described. However, the present invention is not limited to such a case, and a FIFO memory that is not shared with other endpoint units is used. As long as it has at least one, for example, a configuration in which three endpoint units have one shared FIFO memory may be used, or a configuration in which two endpoint units have two shared FIFO memories may be used.
Further, regarding the determination of the end point unit to be connected to the FIFO memory 20c shared by the end point units EPA and EPB, the data transfer amount of each end point unit input from the counters 27a and 27b is determined every time a predetermined time elapses. Or, each time one of the data transfer amounts of the respective endpoint units input from the counters 27a and 27b reaches a preset value, or every time a predetermined time elapses or one reaches a preset value, This is performed by comparing the data transfer amounts of EPA and EPB. Then, by connecting the shared FIFO memory 20c to the end point unit having a large data transfer amount, the data transfer speed of the end point unit having a large data transfer amount can be improved.
[0019]
Next, the switching operation of the connection destination endpoint portion of the shared FIFO memory 20c shown in FIG. 3 will be described with reference to the operation flowcharts shown in FIG. 3 and FIGS.
FIG. 5 is an operation flow in the case where the connection destination of the shared FIFO memory 20c is changed when the data transfer amount of one of the end points sharing the FIFO memory reaches the set value.
In this case, the shared FIFO memory 20c is first connected to the endpoint section that has been initialized by the shared FIFO controller 17 (S21). Subsequently, the shared FIFO controller 17 resets the counters 27a and 27b for calculating the data amount for each of the endpoint units EPA and EPB (S22), and starts counting the transferred data amount (S23). As long as the transfer data amount of the endpoint unit EPA does not reach the set value (No in S24), and the transfer data amount of the endpoint unit EPB does not reach the set value (No in S25), the counters 27a and 27b keep the count. Continue (S23).
In this manner, when the transfer data amount of the endpoint unit EPA reaches the set value (Yes in S24), the shared FIFO controller 17 sets the connection destination of the shared FIFO memory 20c to the endpoint unit EPA (S27), and thereafter, step Step S22 and subsequent steps are repeated. If the transfer data amount of the end point unit EPB has reached the set value (Yes in S25), the shared FIFO controller 17 sets the connection destination of the shared FIFO memory 20c to the end point unit EPB (S26). Step S22 and subsequent steps are repeated.
[0020]
FIG. 6 is an operation flow diagram in the case where the data transfer amount is compared and the data transfer amount of both is compared and the connection destination of the shared FIFO memory 20c is changed after the lapse of a set time.
Also in this case, the shared FIFO controller 17 first connects the shared FIFO memory 20c to the initialized endpoint unit (S31). Then, the counters 27a and 27b for counting the data amount for each of the endpoint units EPA and EPB are reset, and at the same time, the time counter for measuring the elapsed time after the start of the data transfer amount count in the shared FIFO controller 17 is reset (S32). ), To start counting the amount of transferred data and measuring the elapsed time (S33). Then, while the value of the time counter for measuring the elapsed time does not reach the set value (No in S34), the counting of the transfer data amount by the counters 27a and 27b and the measurement of the elapsed time by the time counter are continued.
Thus, when the value of the time counter for measuring the elapsed time reaches the set value (Yes in S34), the shared FIFO controller 17 compares the transfer data amount in the endpoint unit EPA with the transfer data amount in the endpoint unit EPB (S35). ). Then, when the transfer data amount of the endpoint unit EPA is larger (Yes in S35), the shared FIFO controller 17 sets the connection destination of the shared FIFO memory 20c to the endpoint unit EPA (S36), and thereafter, from step S32 onward. repeat. If the transfer data amount of the end point unit EPB is larger (No in S35), the connection destination of the shared FIFO memory 20c is set to the end point unit EPB (S37), and thereafter, step S32 and subsequent steps are repeated.
[0021]
FIG. 7 shows a comparison between the data transfer amount of one of the endpoint units sharing the FIFO memory when the data transfer amount reaches a set value or after a lapse of a fixed time set after the count of the data transfer amount is started. FIG. 11 is an operation flowchart when the connection destination of the shared FIFO memory 20c is changed by using the operation shown in FIG.
In this case, the shared FIFO controller 17 first connects the shared FIFO memory 20c to the endpoint unit to be initialized (S41). Then, the shared FIFO controller 17 resets the counters 27a and 27b for counting the data amount for each of the end points EPA and EPB. It resets (S42) and starts counting the amount of transferred data (S43).
Then, the transfer data amount of the endpoint unit EPA does not reach the set value (No in S44), the transfer data amount of the endpoint unit EPB also does not reach the set value (No in S45), and a time counter for measuring the elapsed time While the value does not reach the set value (No in S46), the counting of the transfer data amount in the counters 27a and 27b and the measurement of the elapsed time in the time counter are continued.
In this way, when the transfer data amount of the endpoint unit EPA has reached the set value (Yes in S44), the shared FIFO controller 17 sets the connection destination of the shared FIFO memory 20c to the endpoint unit EPA (S49), and then proceeds to step S49. S42 and subsequent steps are repeated. If the transfer data amount of the endpoint unit EPB has reached the set value (Yes in S45), the shared FIFO controller 17 sets the connection destination of the shared FIFO memory 20c to the endpoint unit EPB (S48). S42 and subsequent steps are repeated.
When the value of the time counter for measuring the elapsed time has reached the set value (Yes in S46), the shared FIFO controller 17 compares the transfer data amount in the endpoint unit EPA with the transfer data amount in the endpoint unit EPB ( (S47) If the transfer data amount of the endpoint unit EPA is larger (Yes in S47), the connection destination of the shared FIFO memory 20c is set to the endpoint unit EPA (S49), and thereafter, the steps S42 and subsequent steps are repeated. If the transfer data amount of the endpoint unit EPB is larger (No in S47), the connection destination of the shared FIFO memory 20c is set to the endpoint unit EPB (S48), and thereafter, the process from step S42 is repeated.
[0022]
In the operation flow charts shown in FIGS. 5 to 7, each time the number of transfer data of one end point reaches the set value or the elapsed time reaches the set value, the connection destination of the shared FIFO memory 20c is set. If the end point part is different from the previous end point, the connection end point part of the shared FIFO memory 20c is changed. However, for example, the transfer data amount per predetermined time of the same end point part continuously increases by a predetermined number of times (for example, twice). The connection destination endpoint may be changed for the first time.
Further, the configuration may be such that the required time required to transfer a predetermined amount of data is compared for each of the endpoint units sharing the shared memory, and the common FIFO memory is connected to the endpoint unit having a short required time.
Further, the set value of the transfer data amount and the set value of the elapsed time may be changed by using a register or the like in the USB controller. For example, as for the set value of the elapsed time, if the data amount transferred via the buffer memory during the predetermined time is too small, the predetermined time is lengthened, and if the data amount is too large, the predetermined time is shortened.
Further, the set value of the transfer data amount does not need to be the same in all the endpoint units.
In addition, instead of comparing the transferred data amount between the end point units, a difference in the transferred data amount is obtained, and when the difference becomes equal to or larger than a predetermined value, the connection destination endpoint is changed. You may do so.
When the time required to transfer a predetermined amount of data changes significantly, the setting of the transfer data amount or the setting value of the elapsed time is changed so that the control of the endpoint unit for connecting the shared FIFO memory is performed. It is also possible to increase efficiency.
[0023]
【The invention's effect】
As described above, according to the present invention, according to the first aspect of the present invention, in a data communication system that performs data communication conforming to the USB standard, a plurality of buffer memories are prepared for one endpoint unit. When one or more buffer memories among the plurality of buffer memories are shared with another endpoint section, and an endpoint section that uses the shared buffer memory is determined, a buffer is provided for each endpoint section that can share the shared buffer memory. By comparing the amount of data transferred using the memory, the end point unit that uses the shared buffer memory is determined, and the shared buffer memory is provided to the end point unit that uses the buffer memory to transfer a large amount of data. And thus increase data transfer speed while reducing circuit size It can be.
According to a second aspect of the present invention, in the first aspect of the present invention, each of the plurality of endpoint units sharing the buffer memory transfers the predetermined amount of data, the endpoint unit sharing the shared buffer memory. Since the amount of data transferred via the buffer memory is compared with respect to, the effect of the invention described in claim 1 can be easily realized.
According to the third aspect of the present invention, in the first aspect of the present invention, the data amount transferred via the buffer memory is compared for the endpoints sharing the shared buffer memory every time the predetermined time elapses. Similarly, the effect of the invention described in claim 1 can be easily realized.
According to a fourth aspect of the present invention, in the first aspect of the present invention, one of the plurality of endpoint units sharing the shared buffer memory transfers a predetermined amount of data, or determines whether a predetermined time elapses. Each time one of the conditions is satisfied, the amount of data transferred via the buffer memory is compared for the endpoint portion sharing the shared buffer memory, so that the effect of the invention described in claim 1 can be obtained more effectively. it can.
According to the fifth aspect of the present invention, in the second or fourth aspect of the invention, the value of the predetermined data amount can be changed when comparing the amount of data transferred via the buffer memory. The end point to which the shared buffer memory is provided can be changed at an appropriate timing according to the situation.
[0024]
Also, in the invention according to claim 6, in the invention according to claim 3 or claim 4, the predetermined time for comparing the amount of data transferred via the buffer memory can be changed. The end point section to which the shared buffer memory is provided can be changed at an appropriate timing according to the situation.
Further, in the invention according to claim 7, in the invention according to claim 6, since the predetermined time is changed according to the amount of data transferred via the buffer memory, the predetermined time can be appropriately set.
In the invention according to claim 8, a plurality of buffer memories are prepared for one endpoint unit, and one or more buffer memories among the plurality of buffer memories are shared with another endpoint unit, and a shared buffer is provided. When deciding the end point unit that uses the memory, the shared buffer memory is compared by comparing the required time for transferring a predetermined amount of data using the buffer memory for each end point unit that can share the shared buffer memory. Since the end point part to be used is determined, the same effect as the first aspect of the invention can be obtained.
According to the ninth aspect of the present invention, in the invention of the eighth aspect, the value of the predetermined data amount can be changed. Can be changed with
According to the tenth aspect of the present invention, in the fifth, sixth, or eighth aspect of the present invention, the value of the predetermined data amount or the predetermined required time can be made different depending on the end point portion. For example, it is possible to use a method in which a shared buffer memory is provided to a specific endpoint unit at a greater degree, and the transfer speed at the endpoint unit is improved as compared with others.
Also, in the invention according to claim 11, in the invention according to any one of claims 1 to 9, the amount of transfer data per unit time of the same end point portion increases continuously more than once. Since the connection destination of the shared buffer memory is changed to the end point portion, it is possible to prevent the connection destination of the shared buffer memory from being changed due to a temporary change in the amount of transfer data.
Further, in the invention according to claim 12, in the invention according to any one of claims 1 to 11, the buffer memory is a FIFO memory. Item 10 can achieve the effects of the invention described in any one of Items 10.
[Brief description of the drawings]
FIG. 1 is a configuration block diagram of a main part of a USB communication system according to a first embodiment of the present invention.
FIG. 2 is another configuration block diagram of a main part of the USB communication system showing the first embodiment of the present invention.
FIG. 3 is a configuration block diagram of a main part of a USB communication system according to a second embodiment of the present invention.
FIG. 4 is an operation flowchart of a main part of a USB communication system according to a second embodiment of the present invention.
FIG. 5 is another operation flowchart of the main part of the USB communication system showing the second embodiment of the present invention.
FIG. 6 is another operation flowchart of the main part of the USB communication system according to the second embodiment of the present invention.
FIG. 7 is another operation flowchart of the main part of the USB communication system showing the second embodiment of the present invention.
FIG. 8 is a connection conceptual diagram of a USB communication system showing an example of a conventional technique.
FIG. 9 is a configuration block diagram of a main part of a USB communication system showing an example of the related art.
FIG. 10 is another configuration block diagram of a main part of a USB communication system showing an example of the related art.
FIG. 11 is a block diagram showing another configuration of a main part of a USB communication system showing an example of the related art.
[Explanation of symbols]
1 USB host device
2 hub
3 devices
4 USB bus
6 USB controller
11 USB transceiver
12. Serial input engine
13 Endpoint section
15 I / O controller
17 Shared FIFO Controller
20 FIFO memory
21 Light Controller
22 Read controller
23 Multiplexer
24 Multiplexer
25 Multiplexer
26 Multiplexer
27 Counter

Claims (12)

USB規格に準拠したデータ通信を行うデータ通信システムにおいて、
一つのエンドポイント部に対してバッファメモリを複数備え、該複数のバッファメモリのうち一つ以上のバッファメモリを他のエンドポイント部と共有する構成とし、共有バッファメモリとして使用するエンドポイント部を決定する際、前記共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて転送されたデータ量を比較することにより決定するように構成にしたことを特徴とするデータ通信システム。
In a data communication system that performs data communication conforming to the USB standard,
A plurality of buffer memories are provided for one endpoint unit, and one or more buffer memories of the plurality of buffer memories are configured to be shared with other endpoint units, and an endpoint unit used as a shared buffer memory is determined. The data communication system is characterized in that the data amount is determined by comparing the amount of data transferred using the buffer memory for each of the end points that can share the shared buffer memory.
請求項1記載のデータ通信システムにおいて、バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送する毎に、前記共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とするデータ通信システム。2. The data communication system according to claim 1, wherein each time any one of the plurality of endpoint units sharing the buffer memory transfers a predetermined amount of data, the endpoint unit sharing the shared buffer memory is transferred via the buffer memory. A data communication system characterized by comparing the amount of transferred data. 請求項1記載のデータ通信システムにおいて、所定時間が経過する毎に、前記共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とするデータ通信システム。2. The data communication system according to claim 1, wherein each time a predetermined time elapses, an amount of data transferred via the buffer memory is compared with respect to an endpoint unit sharing the shared buffer memory. Data communication system. 請求項1記載のデータ通信システムにおいて、共有バッファメモリを共有する複数のエンドポイント部のいずれかが所定のデータ量を転送するか、または所定時間が経過するかの何れかの条件を満たす毎に、前記共有バッファメモリを共有するエンドポイント部についてバッファメモリを介して転送されたデータ量を比較するように構成にしたことを特徴とするデータ通信システム。2. The data communication system according to claim 1, wherein any one of the plurality of endpoints sharing the shared buffer memory transfers a predetermined amount of data or satisfies a condition that a predetermined time elapses. A data communication system configured to compare an amount of data transferred via a buffer memory with respect to an end point unit sharing the shared buffer memory. 請求項2または請求項4記載のデータ通信システムにおいて、バッファメモリを介して転送されたデータ量を比較する際の所定のデータ量の値を変更可能にしたことを特徴とするデータ通信システム。5. The data communication system according to claim 2, wherein a value of a predetermined data amount when comparing the amount of data transferred via the buffer memory is changeable. 請求項3または請求項4記載のデータ通信システムにおいて、バッファメモリを介して転送されたデータ量を比較する際の所定時間を変更可能にしたことを特徴とするデータ通信システム。5. The data communication system according to claim 3, wherein a predetermined time for comparing the amount of data transferred via the buffer memory can be changed. 請求項6記載のデータ通信システムにおいて、バッファメモリを介して転送されたデータ量に応じて前記所定時間を変更するように構成にしたことを特徴とするデータ通信システム。7. The data communication system according to claim 6, wherein the predetermined time is changed in accordance with an amount of data transferred via the buffer memory. USB規格に準拠したデータ通信を行うデータ通信システムにおいて、一つのエンドポイント部に対してバッファメモリを複数備え、該複数のバッファメモリのうち一つ以上のバッファメモリを他のエンドポイント部と共有する構成とし、共有バッファメモリとして使用するエンドポイント部を決定する際、前記共有バッファメモリを共有可能な各エンドポイント部についてバッファメモリを用いて所定のデータ量が転送された所要時間を比較することにより、前記共有バッファメモリを用いるエンドポイント部を決定するように構成にしたことを特徴とするデータ通信システム。In a data communication system that performs data communication conforming to the USB standard, a plurality of buffer memories are provided for one endpoint unit, and one or more buffer memories of the plurality of buffer memories are shared with another endpoint unit. With the configuration, when determining the end point unit to be used as the shared buffer memory, by comparing the required time for transferring a predetermined amount of data using the buffer memory for each end point unit that can share the shared buffer memory. A data communication system configured to determine an end point unit using the shared buffer memory. 請求項8記載のデータ通信システムにおいて、前記所定のデータ量の値を変更可能な構成にしたことを特徴とするデータ通信システム。9. The data communication system according to claim 8, wherein the value of the predetermined data amount is changeable. 請求項5、請求項6、または請求項8記載のデータ通信システムにおいて、前記所定のデータ量または所定の所要時間の値をエンドポイント部によって異ならせる構成にしたことを特徴とするデータ通信システム。9. The data communication system according to claim 5, wherein the predetermined data amount or the predetermined required time value is different depending on an end point unit. 請求項1乃至請求項9のいずれか1項に記載のデータ通信システムにおいて、同一エンドポイント部の単位時間当たりの転送データ量が継続して複数回多くなったことにより、はじめて前記エンドポイント部に共有バッファメモリの接続先を変更することを特徴とするデータ通信システム。The data communication system according to any one of claims 1 to 9, wherein the amount of transfer data per unit time of the same endpoint unit continuously increases a plurality of times. A data communication system wherein a connection destination of a shared buffer memory is changed. 請求項1乃至請求項11のいずれか1項に記載のデータ通信システムにおいて、バッファメモリがFIFOメモリであることを特徴とするデータ通信システム。The data communication system according to any one of claims 1 to 11, wherein the buffer memory is a FIFO memory.
JP2002208795A 2002-07-17 2002-07-17 Data telecommunication system Pending JP2004054437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002208795A JP2004054437A (en) 2002-07-17 2002-07-17 Data telecommunication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002208795A JP2004054437A (en) 2002-07-17 2002-07-17 Data telecommunication system

Publications (1)

Publication Number Publication Date
JP2004054437A true JP2004054437A (en) 2004-02-19

Family

ID=31932843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002208795A Pending JP2004054437A (en) 2002-07-17 2002-07-17 Data telecommunication system

Country Status (1)

Country Link
JP (1) JP2004054437A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827088A (en) * 2010-03-15 2010-09-08 北京航空航天大学 Realization method of basic communication protocol based on CPU (Central Processing Unit) bus interconnection
US8700810B2 (en) 2009-03-05 2014-04-15 Samsung Electronics Co., Ltd. Semiconductor devices capable of dividing endpoint into majority of sub-endpoints

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700810B2 (en) 2009-03-05 2014-04-15 Samsung Electronics Co., Ltd. Semiconductor devices capable of dividing endpoint into majority of sub-endpoints
CN101827088A (en) * 2010-03-15 2010-09-08 北京航空航天大学 Realization method of basic communication protocol based on CPU (Central Processing Unit) bus interconnection
CN101827088B (en) * 2010-03-15 2013-03-27 北京航空航天大学 Realization method of basic communication protocol based on CPU (Central Processing Unit) bus interconnection

Similar Documents

Publication Publication Date Title
JP3415567B2 (en) USB transfer control method and USB controller
JP2008513885A (en) Universal serial bus switching hub
JP2001119415A (en) Data transfer controller and electronic apparatus
JP4452690B2 (en) Electronic device, control method thereof, host device and control method thereof
US9471521B2 (en) Communication system for interfacing a plurality of transmission circuits with an interconnection network, and corresponding integrated circuit
KR100944892B1 (en) Bus system and bus interface for connection to a bus
JP3680763B2 (en) Data transfer control device and electronic device
WO2008028910A1 (en) Device for processing a stream of data words
EP0772831B1 (en) Bidirectional parallel signal interface
JP3636158B2 (en) Data transfer control device and electronic device
KR100348545B1 (en) Communication dma device
JP2004054437A (en) Data telecommunication system
JP2004280199A (en) Data communication system
JP2004070423A (en) Usb controller and method of controlling data transfer thereof
KR100633742B1 (en) Direct memory access controller for updating data transmission size automatically from peripheral, and control method thereof
JP2005202794A (en) Data communication system
KR100487199B1 (en) Apparatus and method for data transmission in dma
JP3878785B2 (en) Network interface circuit
JP2006094400A (en) Image processor and image processing method
US7177997B2 (en) Communication bus system
JP4514411B2 (en) Inter-bus communication interface device
JP2002288115A (en) Usb controller
JP4496923B2 (en) Shared memory system
JP2001167046A (en) Image processor
JP2002111748A (en) Data transfer unit