JP2003091498A - Data transferring device - Google Patents
Data transferring deviceInfo
- Publication number
- JP2003091498A JP2003091498A JP2001284424A JP2001284424A JP2003091498A JP 2003091498 A JP2003091498 A JP 2003091498A JP 2001284424 A JP2001284424 A JP 2001284424A JP 2001284424 A JP2001284424 A JP 2001284424A JP 2003091498 A JP2003091498 A JP 2003091498A
- Authority
- JP
- Japan
- Prior art keywords
- data
- fifo
- zero
- length packet
- transferring device
- 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
Links
Landscapes
- Bus Control (AREA)
Abstract
Description
【発明の詳細な説明】
【0001】
【発明の属する技術分野】本発明は、データ転送装置に
関し、特にDMA転送速度の改善を図ったデータ転送装
置に関する。
【0002】
【従来の技術】従来の技術では、ユニバーサル・シリア
ル・バス(USB)でエンドポイントに対してデータを
書き込む場合、0レングスパケットでもFIFO(Fi
rstIn First Out)を1つ使用してい
た。しかしその場合、FIFOがフル状態である場合、
実際にはデータがない0レングスパケットの書き込みに
さえ、FIFOがエンプティー状態になるのを待たなけ
ればならなかった。CPUで処理する場合にはそれでも
割込み等を利用して、待ち時間に他の処理を行なう事が
可能であった。しかし、DMA(Direct Mem
ory Access)での転送を行なう場合で、DM
A中にバスが占有されCPUが止まる機構のときには、
この様な従来技術では、0レングスパケットの書き込み
が終わるまでCPUが動作できず、大きな時間のロスと
なっていた。
【0003】
【発明が解決しようとする課題】上述のごとく、従来の
ユニバーサル・シリアル・バス(USB)でエンドポイ
ントに対してデータを書き込む場合、0レングスパケッ
トでもFIFOを使用してしまい、DMA転送の場合
は、その分、時間ロスとなっていた。本発明は、比較的
簡単な方法でこの問題を解決して、DMA転送時のCP
Uの待ち時間を少なくすることが可能なデータ転送装置
の実現を課題とする。
【0004】
【課題を解決するための手段】上記課題を達成するた
め、本発明は、ユニバーサル・シリアル・バス用のエン
ドポイント用のFIFO方式のデータ転送装置におい
て、FIFOのVLD信号をラッチするフリップフロッ
プ手段(FF)を具備し、このフリップフロップ手段を
用い、ゼロレングスパケットなどの場合、エンドポイン
トに入っているFIFOの個数以上にデータの保持を可
能にすることを特徴とする。これにより、DMA時のC
PUの待ち時間を少なくできる。
【0005】
【発明の実施の形態】以下、本発明にかかるデータ転送
装置を添付図面を参照にして詳細に説明する。
【0006】本発明では、0レングスパケットにはデー
タが無く、実際にFIFOにデータが書き込まれない事
を利用して、データがバリッドであるという事にだけ注
目して、この状態を保持するFFを設けることにより、
このFFに書き込みが終了した時点で、DMAを終了し
CPUは次の処理を開始するようにする。CPUが処理
している間に、FIFOが空けば、自動的にデータバリ
ッド保持FFからFIFOにデータが書き込まれ処理が
行なわれる。
【0007】USBのデータ構造について図1に示す。
FIFOのデータサイズはUSB規格によって定められ
た値(Full−speed:BULKでは8、16、
32、64)(High−speed:BULKでは5
12)があり、そのサイズを超えたデータを転送する場
合、その最大パケットサイズ毎に区切ってデータを出
す。そうして、USBでは、データの終わりを転送先に
知らせるために必ず最後のデータをショートパケット
(マックスパケットサイズに満たないパケット)で終わ
らせる。
【0008】図1に示す通り、もし転送するデータが丁
度マックスパケットサイズで終わった場合には、次の転
送サイクルにゼロレングスパケットを転送する。このた
め、図1の場合、DMA等でデータ転送する場合、エン
ドポイントのFIFOの数を2個とすると、最後のゼロ
レングスパケットを転送するためにFIFOの空きを待
ち続けなければならない。しかし、実際にデータを持た
ないゼロレングスパケットのためにCPUを止めておく
のには無駄がある。そのため、本発明では、DMA中に
ゼロレングスパケットが発生する場合、データバリッド
ビットを立てる事により、DMAを終了させ、ゼロレン
グスパケットが発生する事を保持する。
【0009】FIFOに空きができた時にデータバリッ
ドビットが立っていれば、FIFOのFULLビットが
立ち、エンプティービットがクリアーされ、データー数
ゼロがセットされる。エンドポイントはそのデータ数ゼ
ロのFIFOからデータを出力する時に、FULLビッ
トをクリアーし、エンプティービットをセットする。S
IE(シリアルインターフェースエンジン)はデータ数
ゼロが来ると、PID(Packet Identif
ication)の後にCRC(Cycric Red
undancy Check)符号をつけデータを出力
する。
【0010】実際の構成を図2に示す。図2において、
符号1はFIFO−0、符号2はFIFO−2、符号3
は0レングスパケット保持レジスター、符号4は2入力
ANDゲート、符号5〜7はフリップフロップまたはレ
ジスターである。2入力ANDゲート4の一方の入力に
はHiツルーの0レングスパケット・バリッド信号が、
他方の入力にはHiツルーのFIFOのエンプティー信
号が入力される。このAND信号により、0レングスパ
ケット保持レジスター3がリセットされ、FULL信
号、EMPTY信号がそれぞれのFIFO1および2に
送られる。これにより、FIFOのクリアー、セットが
実行される。
【0011】
【発明の効果】以上説明したように本発明は、ユニバー
サル・シリアル・バス用のエンドポイント用のFIFO
方式のデータ転送装置において、FIFOのVLD信号
をラッチするフリップフロップ手段を具備し、このフリ
ップフロップ手段を用い、ゼロレングスパケットなどの
場合、エンドポイントに入っているFIFOの個数以上
にデータの保持を可能にする。これにより、DMA時の
CPUの待ち時間を少なくすることが可能なユニバーサ
ル・シリアル・バス用のFIFOデータ転送装置を実現
することができる。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer device, and more particularly, to a data transfer device with an improved DMA transfer speed. 2. Description of the Related Art In the prior art, when data is written to an end point via a universal serial bus (USB), a FIFO (Fi
rstIn First Out). But in that case, if the FIFO is full,
Even writing a zero-length packet with no actual data had to wait for the FIFO to go empty. When processing is performed by the CPU, it is still possible to perform other processing during the waiting time by using an interrupt or the like. However, DMA (Direct Mem)
Ory Access) and the DM
When the bus is occupied during A and the CPU stops,
In such a conventional technique, the CPU cannot operate until the writing of the zero-length packet is completed, resulting in a large time loss. [0003] As described above, when data is written to an endpoint using a conventional universal serial bus (USB), a FIFO is used even for a zero-length packet, and DMA transfer is performed. In the case, the time was lost. The present invention solves this problem in a relatively simple manner, and
It is an object to realize a data transfer device capable of reducing the waiting time of U. SUMMARY OF THE INVENTION In order to achieve the above object, the present invention provides a FIFO type data transfer device for an endpoint for a universal serial bus, wherein the flip-flop latches a VLD signal of the FIFO. The flip-flop means is provided, and in the case of a zero-length packet or the like, data can be stored in an amount equal to or greater than the number of FIFOs contained in the endpoint. Thereby, C at the time of DMA
The waiting time of the PU can be reduced. Hereinafter, a data transfer apparatus according to the present invention will be described in detail with reference to the accompanying drawings. In the present invention, utilizing the fact that there is no data in the zero-length packet and no data is actually written to the FIFO, the FF holding this state is focused on only that the data is valid. By providing
When the writing to the FF is completed, the DMA is terminated and the CPU starts the next processing. If the FIFO is empty during the processing by the CPU, data is automatically written from the data valid holding FF to the FIFO and the processing is performed. FIG. 1 shows the USB data structure.
The data size of the FIFO is a value defined by the USB standard (Full-speed: 8, 16, in BULK,
32, 64) (High-speed: 5 in BULK)
12), and when transferring data exceeding that size, the data is output for each maximum packet size. Then, in the USB, the last data is always terminated with a short packet (a packet smaller than the maximum packet size) in order to notify the transfer destination of the end of the data. As shown in FIG. 1, if the data to be transferred has just reached the maximum packet size, a zero-length packet is transferred in the next transfer cycle. For this reason, in the case of FIG. 1, when data is transferred by DMA or the like, assuming that the number of FIFOs at the end point is two, it is necessary to keep waiting for an empty FIFO to transfer the last zero-length packet. However, there is no point in stopping the CPU for a zero-length packet that has no actual data. Therefore, in the present invention, when a zero-length packet is generated during DMA, the DMA is terminated by setting a data valid bit, and the occurrence of the zero-length packet is maintained. If the data valid bit is set when the FIFO becomes empty, the FULL bit of the FIFO is set, the empty bit is cleared, and the number of data is set to zero. The endpoint clears the FULL bit and sets the empty bit when outputting data from the zero data FIFO. S
The IE (Serial Interface Engine) receives a PID (Packet Identif.)
), CRC (Cyclic Red)
(Under Check) code is output. FIG. 2 shows an actual configuration. In FIG.
Symbol 1 is FIFO-0, symbol 2 is FIFO-2, symbol 3
Is a 0-length packet holding register, 4 is a 2-input AND gate, and 5 to 7 are flip-flops or registers. One input of the two-input AND gate 4 is provided with a Hi-true 0-length packet valid signal.
The other input receives the empty signal of the Hi True FIFO. The 0-length packet holding register 3 is reset by this AND signal, and the FULL signal and the EMPTY signal are sent to the respective FIFOs 1 and 2. Thus, clearing and setting of the FIFO are executed. As described above, the present invention provides a FIFO for an endpoint for a universal serial bus.
In the data transfer apparatus of the system, flip-flop means for latching a VLD signal of a FIFO is provided, and in the case of a zero-length packet or the like, data can be held in a number equal to or greater than the number of FIFOs included in the endpoint in the case of a zero-length packet. enable. Thus, it is possible to realize a FIFO data transfer device for a universal serial bus that can reduce the waiting time of the CPU during DMA.
【図面の簡単な説明】
【図1】ユニバーサル・シリアル・バス(USB)のデ
ータ構造の説明図。
【図2】本発明のデータ転送装置のブロック図。
【符号の説明】
1 FIFO−0
2 FIFO−2
3 0レングスパケット保持レジスター
4 2入力ANDゲート
5〜7 フリップフロップまたはレジスターBRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is an explanatory diagram of a data structure of a universal serial bus (USB). FIG. 2 is a block diagram of a data transfer device of the present invention. [Explanation of Signs] 1 FIFO-0 2 FIFO-2 3 0 Length packet holding register 4 2-input AND gates 5 to 7 Flip-flop or register
Claims (1)
ポイント用のFIFO(FirstIn First
Out)方式のデータ転送装置において、 FIFOのVLD(バリッド)信号をラッチするフリッ
プフロップ手段を具備し、このフリップフロップ手段を
用い、ゼロレングスパケットなどの場合、エンドポイン
トに入っているFIFOの個数以上にデータの保持を可
能にすることを特徴とするデータ転送装置。Claims: 1. A FIFO (FirstIn First) for an endpoint for a universal serial bus.
Out) type data transfer device, comprising flip-flop means for latching a VLD (valid) signal of a FIFO, and using this flip-flop means, in the case of a zero-length packet or the like, the number of FIFOs contained in the endpoint or more A data transfer device characterized in that data can be retained in the data transfer device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001284424A JP2003091498A (en) | 2001-09-19 | 2001-09-19 | Data transferring device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001284424A JP2003091498A (en) | 2001-09-19 | 2001-09-19 | Data transferring device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2003091498A true JP2003091498A (en) | 2003-03-28 |
Family
ID=19107749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001284424A Pending JP2003091498A (en) | 2001-09-19 | 2001-09-19 | Data transferring device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2003091498A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006270639A (en) * | 2005-03-24 | 2006-10-05 | Brother Ind Ltd | Packet communication system and apparatus |
-
2001
- 2001-09-19 JP JP2001284424A patent/JP2003091498A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006270639A (en) * | 2005-03-24 | 2006-10-05 | Brother Ind Ltd | Packet communication system and apparatus |
US7773603B2 (en) | 2005-03-24 | 2010-08-10 | Brother Kogyo Kabushiki Kaisha | Packet communication system and packet communication apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3820011B2 (en) | PCI interface synchronization circuit | |
US7506077B2 (en) | Unified controller having host and device functionality | |
US7433977B2 (en) | DMAC to handle transfers of unknown lengths | |
US7016984B2 (en) | System controller using plural CPU's | |
CN113297112B (en) | PCIe bus data transmission method and system and electronic equipment | |
EP1535169B1 (en) | Improved inter-processor communication system for communication between processors | |
JPH0752418B2 (en) | Data reception system | |
EP1225514A2 (en) | bidirectional parallel signal interface | |
US6014717A (en) | PCMCIA host adapter and method for variable data transfers | |
GB2377138A (en) | Ring Bus Structure For System On Chip Integrated Circuits | |
JP2003091498A (en) | Data transferring device | |
EP0690382A2 (en) | Computer system with a multiplexed address bus and pipelined write operations | |
US6330629B1 (en) | Information processing system | |
US6665752B1 (en) | Interrupt driven interface coupling a programmable media access controller and a process controller | |
EP1821217B1 (en) | Asynchronous computer communication | |
US5708852A (en) | Apparatus for serial port with pattern generation using state machine for controlling the removing of start and stop bits from serial bit data stream | |
Qiao et al. | Design of DMA controller for multichannel PCI bus frame engine and data link manager | |
JP2002215562A (en) | Unit and method for dma control | |
US7272680B2 (en) | Method of transferring data between computer peripherals | |
JPH05128049A (en) | Input/output controller | |
KR910009927B1 (en) | Fifo buffer control circuit of 16bit dual port for small computer system interface | |
CN116431532A (en) | Bus interface type network card chip control system | |
KR100192960B1 (en) | Dma interface having channel link function | |
JPS62296637A (en) | Data sink for serial data | |
CN109558076A (en) | A kind of configurable virtual SPI-FLASH |