JP2003316718A - Usb device - Google Patents

Usb device

Info

Publication number
JP2003316718A
JP2003316718A JP2002124265A JP2002124265A JP2003316718A JP 2003316718 A JP2003316718 A JP 2003316718A JP 2002124265 A JP2002124265 A JP 2002124265A JP 2002124265 A JP2002124265 A JP 2002124265A JP 2003316718 A JP2003316718 A JP 2003316718A
Authority
JP
Japan
Prior art keywords
usb
data
frame data
devices
usb 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
Application number
JP2002124265A
Other languages
Japanese (ja)
Inventor
Masahiro Ito
正博 伊藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2002124265A priority Critical patent/JP2003316718A/en
Publication of JP2003316718A publication Critical patent/JP2003316718A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a USB (universal serial bus) device capable of easily perform highly precise synchronization among a plurality of devices connected via USB. <P>SOLUTION: This device has a USB device function by which a plurality of devices are to be connected with USB standard network. The device is provided with a means for extracting frame data included in an SOF packet, a means for setting prescribed data becoming the comparison object of the frame data, a means for storing the prescribed data, and a means for comparing the extracted frame data with the stored data, and it is characterized in that, when the extracted frame data corresponds with the stored data, the operations of a plurality of devices are synchronized by performing a prescribed sequential processing. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、USBによって接続
されている複数の装置間の動作を高精度に同調させるこ
とのできるUSB装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a USB device capable of accurately synchronizing operations among a plurality of devices connected by USB.

【0002】[0002]

【従来の技術】USBはデジタルデータを高速に転送する
規格で、主にPCとその他周辺機器を接続するためのイン
ターフェイスとして広く普及している。USBはツリー状
のバスを構成し、唯一のホスト機能を持つもの(以下ホ
スト)を頂点に、複数のデバイス機能を持ったもの(以
下デバイス)が接続される。USBでは、ホストが常に制
御の主導権を握っており、デバイス側はホストが要求し
てくる転送を行うことしかできない。
2. Description of the Related Art USB is a standard for transferring digital data at high speed, and is widely used mainly as an interface for connecting a PC and other peripheral devices. USB constitutes a tree-shaped bus, and the one with the only host function (hereinafter referred to as the host) is at the top, and the one with multiple device functions (hereinafter referred to as the device) is connected. With USB, the host is always in control, and the device can only do the transfers that the host requests.

【0003】USBの転送は、1ミリ秒毎にフレームとして
区切られ、各フレームの最初にフレーム値を持ったSOF
パケットが全てのデバイスに対しホストから送られる。
その後、残りのフレーム時間内にコントロール転送・バ
ルク転送・インタラプト転送・アイソクロナス転送が行
われる。
The USB transfer is divided into frames every 1 millisecond, and an SOF having a frame value at the beginning of each frame.
Packets are sent by the host to all devices.
Then, control transfer, bulk transfer, interrupt transfer, and isochronous transfer are performed within the remaining frame time.

【0004】[0004]

【発明が解決しようとする課題】USB転送では、コント
ロール転送・バルク転送・インタラプト転送・アイソク
ロナス転送全てにおいてホストとデバイスが一対一で通
信を行うもので、接続されている複数のデバイスに同時
に転送できるブロードキャストのようなものがない。つ
まり、複数のデバイスに同じ内容の転送を行う時は、個
々のデバイスに同じ転送を順番に繰り返すことになる。
そのため、複数のデバイス間で所定の動作を同調させる
ような場合、その動作開始を告げる転送は個々に行わな
ければならず、時間のずれが生じ高精度な同調を行うの
が困難であるという問題があった。
In USB transfer, the host and the device perform one-to-one communication in all of control transfer, bulk transfer, interrupt transfer, and isochronous transfer, and the transfer can be performed simultaneously to a plurality of connected devices. There is no such thing as a broadcast. That is, when transferring the same content to a plurality of devices, the same transfer is repeated in order to each device.
Therefore, when a predetermined operation is to be synchronized between a plurality of devices, the transfer that signals the start of the operation must be performed individually, which causes a time lag and makes it difficult to perform highly accurate synchronization. was there.

【0005】本発明は、USBで接続された複数のデバイ
ス間で、高精度な同調を容易に行うことができるUSB装
置を提供することを目的とする。
An object of the present invention is to provide a USB device which can easily perform highly accurate tuning among a plurality of devices connected by USB.

【0006】[0006]

【課題を解決するための手段】前述の課題を解決するた
めに、本発明のUSB装置は、USB規格のネットワークに複
数接続されるUSBデバイス機能を持つ装置であって、SOF
パケットに含まれるフレームデータを抽出する手段と、
そのフレームデータの比較対象となる所定のデータを設
定する手段と、その比較対象となる所定のデータを記憶
する手段と、抽出したフレームデータと記憶されている
データを比較する手段を有し、抽出したフレームデータ
と記憶されているデータが一致した場合に所定の順次処
理を行うことで、複数の装置の動作を同調させることを
特徴とする。
In order to solve the above-mentioned problems, a USB device of the present invention is a device having a USB device function connected to a plurality of USB standard networks,
Means for extracting frame data contained in the packet,
It has means for setting predetermined data to be compared with the frame data, means for storing the predetermined data to be compared, and means for comparing the extracted frame data with the stored data. When the frame data and the stored data match, a predetermined sequential process is performed to synchronize the operations of the plurality of devices.

【0007】また、前記USB装置は、抽出したフレーム
データと記憶されているデータを比較して一致すべき回
数を設定できる手段を有し、抽出したフレームデータと
記憶されているデータが所定の回数一致した場合に所定
の順次処理を行うことで、複数の装置の動作を同調させ
ることを特徴とする。
Further, the USB device has means for comparing the extracted frame data with the stored data and setting the number of times of matching, and the extracted frame data and the stored data have a predetermined number of times. It is characterized in that the operations of a plurality of devices are synchronized by performing a predetermined sequential process when they match.

【0008】[0008]

【発明の実施の形態】まず、図1を用いて本装置がUSB
ネットワークに複数接続され、複数の装置間で所定の順
次処理を同調させる例を説明する。図1は本発明の実施
の形態を示す構成図であり、100は本発明のUSB装置
であり、その構成部品として、101はUSB接続するた
めのデバイス機能を持つUSBデバイスコントローラ、1
02は装置全体を制御するCPU、103はCPUが使用する
記憶回路や所定の順次処理を行う回路等を含む周辺回
路、104はUSBデバイスコントローラがSOFパケットを
受信する毎にフレームデータを抽出しCPU102に通知
する回路、105はSOFパケットのフレームデータと比
較されるデータが記憶される回路が設けられている。2
00は本発明のUSB装置100と同じ構成のUSB装置であ
る。10はPCなどのUSBホスト機能を持つ装置であり、U
SB装置100、200が接続されている。
BEST MODE FOR CARRYING OUT THE INVENTION First, referring to FIG.
An example will be described in which a plurality of devices are connected to a network and predetermined sequential processing is synchronized among a plurality of devices. FIG. 1 is a configuration diagram showing an embodiment of the present invention. Reference numeral 100 is a USB device of the present invention, and 101 is a USB device controller having a device function for USB connection as its component parts.
Reference numeral 02 is a CPU that controls the entire apparatus, 103 is a peripheral circuit including a storage circuit used by the CPU and a circuit that performs predetermined sequential processing, and 104 is a CPU 102 that extracts frame data each time the USB device controller receives an SOF packet. And a circuit for storing data to be compared with the frame data of the SOF packet. Two
00 is a USB device having the same configuration as the USB device 100 of the present invention. 10 is a device such as a PC having a USB host function, and U
The SB devices 100 and 200 are connected.

【0009】図2はUSBホスト10が1ミリ秒毎にUSB装
置100、200に送信するSOFパケットの構成図であ
り、20は24ビットで構成されるSOFパケット、21
は8ビットで構成されるパケットの種類を示すPID、2
2は11ビットで構成されるフレーム番号、23は5ビ
ットで構成されるデータが正しく受け取れたことを確認
するためのCRCである。フレーム番号22は0〜204
7ミリ秒を表現することができる。
FIG. 2 is a block diagram of an SOF packet transmitted from the USB host 10 to the USB devices 100 and 200 every 1 millisecond, and 20 is an SOF packet composed of 24 bits, 21.
Is a PID that indicates the type of packet consisting of 8 bits, 2
2 is a frame number composed of 11 bits, and 23 is a CRC for confirming that the data composed of 5 bits is correctly received. Frame number 22 is 0-204
It can represent 7 milliseconds.

【0010】次に、動作について説明する。USBホスト
10は、USB装置100と200の動作を同調させるた
め、その動作を開始する意味を持つSOFのフレーム番号
をUSB装置100と200にそれぞれ通知する。通知す
る転送はコントロール転送が望ましいが、その他の転送
でも構わない。USB装置100は、USBデバイスコントロ
ーラ101及びそれを制御するCPU102によって、USB
ホスト10からのコントロール転送を行う。CPU102
は、転送データを解析し、動作開始のSOFのフレーム番
号を記憶回路105に設定する。ここで設定されるフレ
ーム番号は、前述のようにUSBホスト10から設定され
ても良いし、USB装置100が設定しても良い。
Next, the operation will be described. In order to synchronize the operations of the USB devices 100 and 200, the USB host 10 notifies the USB devices 100 and 200 of the frame number of the SOF which has the meaning of starting the operation. The control transfer is preferable for the transfer to be notified, but other transfer may be used. The USB device 100 is a USB device controller 101 and a CPU 102 that controls the USB device controller 101,
Control transfer from the host 10 is performed. CPU 102
Analyzes the transfer data and sets the frame number of the operation start SOF in the memory circuit 105. The frame number set here may be set from the USB host 10 as described above, or may be set by the USB device 100.

【0011】SOFフレームデータ抽出回路104はUSBホ
スト10からSOFパケットを受信する毎にそのフレーム
番号を抽出しCPU102にその旨を通知しているので、
記憶回路105に動作開始のフレーム番号が設定される
と、CPU102はSOFパケットを受信する毎に、SOFフレ
ームデータ抽出回路104が抽出したフレーム番号と記
憶回路105に設定されているフレーム番号を比較す
る。このCPU102による比較動作は、記憶回路105
に動作開始のフレーム番号が設定されている状態でない
と行わない。
Each time the SOF frame data extraction circuit 104 receives an SOF packet from the USB host 10, it extracts the frame number and notifies the CPU 102 of that fact.
When the frame number of the operation start is set in the memory circuit 105, the CPU 102 compares the frame number extracted by the SOF frame data extraction circuit 104 with the frame number set in the memory circuit 105 every time the SOF packet is received. . The comparison operation by the CPU 102 is performed by the storage circuit 105.
It is not performed unless the frame number of the operation start is set in.

【0012】上記CPU102の比較動作において、SOFフ
レームデータ抽出回路104が抽出したフレーム番号と
記憶回路105に設定されているフレーム番号が一致し
た場合、CPU102は周辺回路103を制御して、所定
の順次処理を行う。この時、CPU102は記憶回路10
5に対して設定されているデータを消去し、動作開始の
フレーム番号が設定されていない状態にする。こうする
ことで、CPU102の比較動作を止め、所定の順次処理
が重複して行われないことを保証する。逆に、重複して
行わせたい場合には、CPU102は記憶回路105に対
して設定されているデータを消去せず、CPU102に比
較動作を続けさせれば良い。
In the comparison operation of the CPU 102, when the frame number extracted by the SOF frame data extraction circuit 104 matches the frame number set in the storage circuit 105, the CPU 102 controls the peripheral circuit 103 to perform a predetermined sequence. Perform processing. At this time, the CPU 102 causes the storage circuit 10
The data set for No. 5 is erased so that the operation start frame number is not set. By doing so, the comparison operation of the CPU 102 is stopped, and it is guaranteed that the predetermined sequential processing is not performed in duplicate. On the other hand, when it is desired to duplicate the operations, the CPU 102 does not erase the data set in the storage circuit 105, and the CPU 102 may continue the comparison operation.

【0013】上記説明は、USB装置100についてであ
るが、USB装置200にも同様のことが言える。よっ
て、USB装置100、200それぞれに対して、所定の
順次動作を開始するSOFのフレーム番号として同じもの
を記憶回路105に設定すれば、USB装置100、20
0は所定の順次動作を同調して行うことができる。
Although the above description is for the USB device 100, the same applies to the USB device 200. Therefore, if the same frame number of the SOF that starts a predetermined sequential operation is set in the storage circuit 105 for each of the USB devices 100 and 200, the USB devices 100 and 20
0 can perform predetermined sequential operations in synchronism.

【0014】また、上記説明においては、SOFのフレー
ム番号が11ビットで0〜2047ミリ秒しか表現でき
ないため、記憶回路105にフレーム番号が設定されて
から所定の順次動作を開始するまでの時間間隔が最大2
048ミリ秒となる制限がある。そこで、記憶回路10
5にフレーム番号を設定する際に比較一致すべき回数も
同時に設定する。この一致回数の設定もUSBホスト10
から設定されても良いし、USB装置100が設定しても
良い。CPU102は、SOFフレームデータ抽出回路104
が抽出したフレーム番号と記憶回路105に設定されて
いるフレーム番号が一致した回数をカウントし、その一
致回数が設定されたものに達した場合に周辺回路103
を制御して、所定の順次処理を行う。この時、CPU10
2は記憶回路105に対して設定されているデータを消
去し、動作開始のフレーム番号及び一致回数が設定され
ていない状態にする。こうすることで、CPU102の比
較動作を止め、所定の順次処理が重複して行われないこ
とを保証する。逆に、重複して行わせたい場合には、CP
U102は記憶回路105に対して設定されているデー
タを消去せず、カウントしていた一致回数をゼロに戻
し、CPU102に比較動作を続けさせれば良い。
In the above description, since the SOF frame number is 11 bits and can be expressed only for 0 to 2047 milliseconds, the time interval from the setting of the frame number in the memory circuit 105 to the start of a predetermined sequential operation. Up to 2
There is a limit of 048 milliseconds. Therefore, the memory circuit 10
When the frame number is set to 5, the number of times of comparison and coincidence is also set at the same time. This match count setting is also USB host 10
May be set by the USB device 100 or may be set by the USB device 100. The CPU 102 uses the SOF frame data extraction circuit 104
The number of times the extracted frame number matches the frame number set in the storage circuit 105 is counted, and when the number of matches reaches the set number, the peripheral circuit 103
Are controlled to perform predetermined sequential processing. At this time, CPU10
In No. 2, the data set in the memory circuit 105 is erased so that the operation start frame number and the number of coincidences are not set. By doing so, the comparison operation of the CPU 102 is stopped, and it is guaranteed that the predetermined sequential processing is not performed in duplicate. On the other hand, if you want to duplicate, CP
The U 102 does not erase the data set in the memory circuit 105, returns the counted number of coincidences to zero, and causes the CPU 102 to continue the comparison operation.

【0015】こうすることで、記憶回路105にフレー
ム番号が設定されてから所定の順次動作を開始するまで
の時間間隔を任意に設定することが可能となる。
By doing so, it becomes possible to arbitrarily set the time interval from the setting of the frame number in the memory circuit 105 to the start of a predetermined sequential operation.

【0016】[0016]

【発明の効果】以上のように、請求項1記載の発明によ
れば、USB規格のネットワークに複数接続されるUSBデバ
イス機能を持つ装置間において、高精度な同調動作を容
易に実現することができる。
As described above, according to the first aspect of the invention, it is possible to easily realize a highly accurate tuning operation between devices having a USB device function which are connected to a plurality of USB standard networks. it can.

【0017】請求項2記載の発明によれば、同調動作を
開始するまでの時間間隔を自由に設定することができ
る。
According to the second aspect of the present invention, it is possible to freely set the time interval until the tuning operation is started.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施の形態を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】SOFパケットの構成図である。FIG. 2 is a configuration diagram of an SOF packet.

【符号の説明】[Explanation of symbols]

10 PC等のUSBホスト機能を持つ装置 20 SOFパケット 100、200 本発明のUSB装置 101、201 USBデバイスコントローラ 102、202 CPU 103、203 周辺回路 104、204 SOFフレームデータ抽出回路 105、205 比較フレームデータ記憶回路 Device with USB host function such as 10 PC 20 SOF packets 100, 200 USB device of the present invention 101, 201 USB device controller 102, 202 CPU 103, 203 peripheral circuits 104, 204 SOF frame data extraction circuit 105, 205 comparative frame data storage circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 USB規格のネットワークに複数接続され
るUSBデバイス機能を持つ装置であって、 SOFパケットに含まれるフレームデータを抽出する手段
と、 そのフレームデータの比較対象となる所定のデータを設
定する手段と、 その比較対象となる所定のデータを記憶する手段と、 抽出したフレームデータと記憶されているデータを比較
する手段を有し、 抽出したフレームデータと記憶されているデータが一致
した場合に所定の順次処理を行うことで、 複数の装置の動作を同調させることを特徴とするUSB装
置。
1. An apparatus having a USB device function, which is connected to a plurality of USB standard networks, wherein a unit for extracting frame data included in an SOF packet and predetermined data to be compared with the frame data are set. When the extracted frame data and the stored data match, the extracted frame data and the stored data are compared, and the predetermined frame data to be compared is stored. A USB device that synchronizes the operations of multiple devices by performing predetermined sequential processing on.
【請求項2】 前記USB装置は、 抽出したフレームデータと記憶されているデータを比較
して一致すべき回数を設定できる手段を有し、 抽出したフレームデータと記憶されているデータが所定
の回数一致した場合に所定の順次処理を行うことで、 複数の装置の動作を同調させることを特徴とするUSB装
置。
2. The USB device has means for comparing the extracted frame data with the stored data and setting the number of times that they should match, and the extracted frame data and the stored data have a predetermined number of times. A USB device that synchronizes the operations of multiple devices by performing predetermined sequential processing when they match.
JP2002124265A 2002-04-25 2002-04-25 Usb device Pending JP2003316718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002124265A JP2003316718A (en) 2002-04-25 2002-04-25 Usb device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002124265A JP2003316718A (en) 2002-04-25 2002-04-25 Usb device

Publications (1)

Publication Number Publication Date
JP2003316718A true JP2003316718A (en) 2003-11-07

Family

ID=29539337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002124265A Pending JP2003316718A (en) 2002-04-25 2002-04-25 Usb device

Country Status (1)

Country Link
JP (1) JP2003316718A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010511868A (en) * 2006-11-30 2010-04-15 エレクトロ サイエンティフィック インダストリーズ インコーポレーテッド Synchronous control of test instruments
JP2010182337A (en) * 2002-07-17 2010-08-19 Chronologic Pty Ltd Synchronized multichannel universal serial bus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010182337A (en) * 2002-07-17 2010-08-19 Chronologic Pty Ltd Synchronized multichannel universal serial bus
JP2010511868A (en) * 2006-11-30 2010-04-15 エレクトロ サイエンティフィック インダストリーズ インコーポレーテッド Synchronous control of test instruments

Similar Documents

Publication Publication Date Title
CN111737175B (en) High-speed SPI master-slave machine communication method, terminal equipment and storage medium
EP1525693B1 (en) Clock synchronizing method over fault-tolerant etherent
EP2047619B1 (en) Consistent distributed timestamp counters
CN101641889A (en) Synchronous network device
CN113839731A (en) Packet scheduling system with required physical transmission time for packets
CN101052938B (en) Low latency data packet reception and processing
JP2003316718A (en) Usb device
US20180083800A1 (en) Aggregation Device, System, And Method Thereof
CN110572234A (en) Method for realizing clock synchronization based on serial port, intelligent terminal and storage medium
CN111045817A (en) PCIe transmission management method, system and device
US10489319B2 (en) Automatic transmission of dummy bits in bus master
US7203205B2 (en) Polling device and communication apparatus
CN110912634B (en) Method for realizing clock synchronization based on SPI, storage medium and terminal equipment
JP3085448B2 (en) Communications system
JPH07202919A (en) Hybrid ring network
JP4095216B2 (en) Printer and data communication method in printer
JPH09219714A (en) Transmission control system
US8831017B2 (en) Data output adjustment apparatus, data output adjustment method, RGMII network system and RGMII network communication path change method
JP2710706B2 (en) Data receiving method
CN117318863A (en) Device for synchronizing Ethernet
WO2001022202A1 (en) Method for synchronizing clocks in electronic units connected to a multi processor data bus
CN111077941A (en) Clock synchronization setting method, equipment and storage medium
JPH0233238A (en) Reception clock recovery circuit for start-stop synchronization data
CN116157786A (en) Synchronous data processing method and equipment
JPH04213259A (en) Data processor