[go: up one dir, main page]

HK1147133B - Synchronized multichannel universal serial bus - Google Patents

Synchronized multichannel universal serial bus Download PDF

Info

Publication number
HK1147133B
HK1147133B HK11101092.2A HK11101092A HK1147133B HK 1147133 B HK1147133 B HK 1147133B HK 11101092 A HK11101092 A HK 11101092A HK 1147133 B HK1147133 B HK 1147133B
Authority
HK
Hong Kong
Prior art keywords
usb
devices
signal
phase
local clock
Prior art date
Application number
HK11101092.2A
Other languages
Chinese (zh)
Other versions
HK1147133A1 (en
Inventor
彼得‧G‧福斯特
克莱夫‧A‧戈德史密斯
帕特里克‧克洛夫科恩
亚当‧M‧韦戈尔德
Original Assignee
克罗诺洛吉克有限公司
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 克罗诺洛吉克有限公司 filed Critical 克罗诺洛吉克有限公司
Publication of HK1147133A1 publication Critical patent/HK1147133A1/en
Publication of HK1147133B publication Critical patent/HK1147133B/en

Links

Description

Synchronous multichannel universal serial bus
This application is a divisional application of the invention patent application entitled "synchronous multichannel universal serial bus" having international application date of 07/17/2003 and chinese application number of 03821012.6, and claims the benefit of priority of this application, which is hereby incorporated by reference in its entirety.
Technical Field
The present invention relates to a method and apparatus for synchronizing Universal Serial Bus (USB) devices of a specific, but by no means exclusive, application, among USB devices connected to a USB host with respect to each other and to any degree of accuracy.
Background
The USB specification is intended to facilitate interoperation of devices from different vendors in an open architecture. USB data is encoded in the form of the difference between the signal levels of two lines using differential signaling (i.e., the two lines carry information). The USB specification is intended as an enhancement to the PC architecture, spanning portable, desktop, and home environments.
By way of example, FIG. 1 is a schematic diagram of a prior art USB device 10 for illustration, the device 10 including a digital control sensor (transducer) 12. The device 10 includes a bus connector 14, digital I/O bus transfer circuitry 16, a microprocessor 18, and a synchronization channel 20 for transferring synchronization information including trigger and clock signals to the sensor 12.
The device 10 is connected by means of a bus connector 14 to a digital bus 22 containing USB and synchronization signals.
The USB specification implicitly assumes that all devices are different. While this is true for environments that are meant to connect devices from a wide variety of manufacturers, there are other environments (such as some common industrial or laboratory environments) that require specifications for operating multiple devices of similar characteristics in a synchronized manner. The specification does not adequately address this issue. Such environments are typically those where testing, measurement or monitoring is performed, which may require the devices to be synchronized to a more precise degree than specified. The USB specification allows for limited inter-device synchronization by providing a 1kHz clock signal to all devices. However, many laboratory and industrial environments require synchronization at MHz frequencies and above.
Referring to FIG. 2, USB uses a tiered star topology 24, where hubs 26 provide connection points for USB devices 28. USB host controller 30 contains a root hub, which is the origin of all USB ports in the system. The root hub provides a number of USB ports to which USB functional devices or additional hubs may be connected.
In turn, more hubs (e.g., USB composite devices 32) may be connected to any of these ports, which then provide additional connection points through the ports for further USB devices 34. Thus, USB allows connection of up to 127 devices (including hubs), subject to the constraint that any device can be up to 5 layers deep.
The root hub in the host transmits a start of frame (SOF) signal packet to each device every 1.0ms, and the time between two SOF packets is referred to as a frame. Each module receives this SOF packet at different times, taking into account the electrical delays inherent to the USB topology. This topology implies that: there may be a significant time delay (specified as at most 380ns) for receiving the same signal between a device directly connected to the host controller and a device below the 5 layers. This is a serious limitation when devices need to be synchronized on the order of MHz and above.
Current synchronization between a USB host and a USB device is possible through two types of USB transfer, interrupt, and synchronization. Interrupt delivery allows the guaranteed polling frequency of the device to have a minimum period of 125 mus, while synchronous delivery guarantees a constant delivery rate. Both methods require that communication (traffic) be generated between the device and the host for synchronization and thus more bandwidth is reserved for higher degrees of synchronization. This unfortunately means that the available USB bandwidth may be exhausted before the maximum number of devices are connected. This approach also places a large computational burden on the host to keep 127 devices synchronized with the host through software, but still fails to address keeping the synchronization between the devices with respect to the host, each device representing a separate process.
Devices that contain some sort of physical sensor, such as a laser diode or photodetector, may require clock and trigger information. Such devices, such as laser diodes with modulated light output at 1MHz, may use a clock signal to perform the sensor function at regular intervals or at a constant frequency. The trigger signal is typically used to start or end operations at a set time. In the example of a laser diode, the trigger signal may be used to turn the modulated light output on or off.
These clock and trigger signals or information (hereinafter referred to as synchronization information) can be used to synchronize a wide variety of devices with each other, as long as the signals are common and simultaneous to all devices. Here "common" and "simultaneous" mean that the signals vary less than a specified amount, δ t, in time between devices. In the case of laser diodes, this would enable a wide variety of laser diodes to modulate their optical output at one frequency. The modulation frequency of all devices will be the same and their waveforms will be in phase. The current USB specification (i.e., 2.0) considers a delay of δ t of up to 0.35 μ s. For a signal with a frequency of 1MHz and a period of 1.0 mus, this delay represents almost half the period. Therefore, as specified, it is unusable as a synchronization signal for regular use.
Devices such as hubs and USB controller chips typically use some amount of phase locking in order to decode the USB protocol. The purpose of the SYNC pattern in the USB protocol is to provide a synchronization pattern for another electronic circuit to lock onto. However, the intention is to synchronize the device to the USB bit stream to a sufficient accuracy to interpret the MHz bit stream. It is not intended to synchronize two separate devices with each other to the precision required by many test and measurement instruments. The USB specification-the degree of synchronization between its processing devices-is primarily concerned with adequately synchronizing USB-CD audio streams for output on USB speaker pairs. The requirements of such an arrangement are in the kHz range and USB provides ideal conditions for this. However, the specification does not address the potential problem of synchronizing 100 USB speaker pairs.
U.S. patent No.6,343,364 to Leydier et al discloses an example of locking to the frequency of USB communications, which is directed to a smart card reader. This patent teaches a local free running clock compared to the USB SYNC and packet ID streams; its period is updated to match this frequency, generating a local clock with a nominal frequency of 1.5 MHz. This provides a degree of synchronization sufficient to read the smart card information into the host PC. Because this method is directed to smart card readers, inter-device synchronization is not addressed. Furthermore, phase control locked to a frequency of 1kHz or better stability and high accuracy is not disclosed.
U.S. Pat. No.6,012,115 to Champers et al sets forth the USB Start of frame (SOF) periodicity and is a timing reference. As explained in the abstract of U.S. patent No.6,012,115, the disclosed invention allows a computer system to make an accurate determination of the timing of a predetermined event occurring within a real-time peripheral device by using a start-of-frame pulse transmitted from a USB host controller to the peripheral device to which it is connected.
U.S. patent No.6,092,210 to Larky et al discloses a method for connecting two USB hosts for data transfer by using a USB-to-USB connection device for synchronizing the local device clock to the data streams of the two USB hosts. The phase locked loop is used to synchronize the local clock and oversampling is used to ensure that no data loss occurs. However, this document relates to mutual synchronization of two USB hosts (and with limited accuracy), and does not relate to synchronization of a wide variety of USB devices to a single USB host.
The USB specification was written with audio applications in mind, and us patent No.5,761,537 to Sturges et al describes how two or more pairs of speakers can be synchronized using separate clocks, one pair operating with stereo audio circuitry in the PC and the other pair being controlled by the USB. Since both speaker pairs use their own clocks, which need to be synchronized, this document teaches a technique for keeping the audio signals synchronized, although the possible clocks are shifted between asynchronous clocks.
While the above is not intended to be exhaustive or to describe the general knowledge in this field, it is clear that there are deficiencies in the current art.
Disclosure of Invention
It is therefore an object of the present invention to supplement the USB specification by implementing a mechanism that allows any number of USB devices up to the maximum allowed number to operate in a synchronized and triggered manner without placing a large computational burden on the host. This frees the host for other tasks such as control, data transfer, logging, and analysis.
In addition to complementing the USB specification, the present invention also has all the advantages of USB, such as the ability to operate multiple devices (up to a current total of 127 devices) through a tree structure, hot-swapping capabilities, auto-enumeration, ease-of-use, cross-compatibility between operating systems, and portability (portability).
The present invention provides a method and apparatus for synchronizing USB devices connected to a USB host with each other. The present invention also provides a backplane that provides a common connection point and a combination of one or more of power, USB, and synchronization signals to a variety of similar USB devices.
In particular, in a first broad aspect, the present invention provides a method of providing a synchronous multi-channel universal serial bus comprising supplementing a wired (or equivalent-possibly wireless-signal channel) as defined in the USB specification with synchronization information from an external source; whereby a plurality of USB devices can be synchronized by means of said synchronization information.
Preferably, the synchronization information includes a trigger signal and a clock signal.
Thus, by providing such information from an external source, synchronization information can be provided at substantially any frequency.
In a second broad aspect, the present invention provides a synchronized multi-channel universal serial bus comprising circuitry to observe USB communications and lock a local clock signal of a USB device to a periodic signal contained in USB data communications.
Preferably, the circuit is adapted to lock the local clock signal to the periodic signal in phase, in frequency or in phase and frequency.
Preferably, the circuit is operable to decode and lock onto a USB start of frame (SOF) packet token (or other periodic data structure).
The invention also provides a method for synchronizing the multi-channel universal serial bus, which comprises the following steps:
observing USB communication; and
locking a local clock signal of the USB device to a periodic signal contained in the USB data communication;
wherein the locking is with respect to phase, frequency, or both phase and frequency.
In a third broad aspect, the present invention provides a synchronized multi-channel universal serial bus having circuitry to observe USB communications at multiple points in a USB tree and measure loop time for each of a plurality of individual packets to derive relative phases of individual USB devices in the tree. Preferably, the circuit is operable to measure the loop time of an ACK packet associated with a particular transaction, whereby the relative phase of the local clock of each device can be controlled so that all connected USB devices can be synchronised.
The invention also provides a method for synchronizing the multi-channel universal serial bus, which comprises the following steps:
observing USB communications at a plurality of points in a USB tree;
measuring a loop time for each of the plurality of individual packets; and
determining from the loop times the relative phases of the individual USB devices in the tree;
whereby any phase offset of said individual USB devices can be adjusted in accordance with said determined relative phase.
In a fourth broad aspect, the present invention provides a method of providing a synchronized multi-channel universal serial bus, comprising:
all devices in the USB topology are signaled with a trigger signal.
Preferably, the trigger signal starts or stops operations on the plurality of devices synchronously.
Preferably, the trigger signal is generated by using SOF packets (preferably including encoded frame numbers) to trigger the sensor at a given time.
Preferably, the method comprises performing the operation in phase with a local oscillator.
This is preferred because the arrival times of SOF packets may vary between devices due to the USB connection topology, and further, the USB specification accounts for significant time jitter in the SOF packets relative to the phase-locked loop oscillator. This may result in a fraction of the clock out-of-phase period.
The present invention also provides a synchronous multi-channel universal serial bus comprising:
circuitry for signaling all devices in a USB topology with a trigger signal.
In a fifth broad aspect, the present invention provides a synchronized multi-channel universal serial bus comprising circuitry and logic to provide synchronization signals to USB devices at frequencies corresponding to national standards (e.g., NIST and NATA).
Indeed, this method may be used with other aspects of the invention.
In a sixth broad aspect, the present invention provides a synchronous multi-channel universal serial bus comprising: a USB backplane for providing any one or more of USB signals, power, sockets, and synchronization information to connectable devices.
The bus may also provide a mechanically supportive structure.
It is also possible to combine these aspects to mutually synchronize the devices. Time accuracy, cost and ease of use requirements may place restrictions on which of those methods can be used for a certain application. In addition, the device according to the invention can be implemented in different ways. For example, such a device may be constructed in the form of: multiple components on a PCB, or at the semiconductor level, i.e., as a single silicon (or other semiconductor material) chip.
Accordingly, the present invention also provides a method for locking the local clock of each of a plurality of USB devices within the same USB tree to substantially the same frequency, comprising:
generating or assigning a special signal structure for transmission in USB data communications;
transmitting the special signal structure to the USB device in a predetermined sequence;
monitoring local USB signals of the USB device for the special signal structure;
generating a local reference signal at each of said USB devices from a special signal structure; and
locking the frequency of the local clock signal to the local reference signal to a predetermined extent at each of the USB devices.
Preferably, the special signal structure is a USB frame start packet token sequence as defined in the USB specification. Alternatively, the special signal structure is a command sequence sent to the USB device or a data sequence sent to the USB device.
Preferably, the method further comprises generating the local reference signal for each of the particular signal structures.
Preferably, the method further comprises generating the local reference signal for substantially all of the particular signal structures.
Preferably, the local clock frequency is substantially the same as the local reference signal frequency.
Preferably, each of said local clock signals is locked to said reference signal in order to generate a frequency having a stability that is better than the stability required for pure data transfer between the host and the respective USB device.
Preferably, the method further comprises: the USB devices are passively synchronized to any degree by connecting the USB devices to a common USB hub by cables of substantially equal length.
The present invention also provides a method for measuring the propagation time of a signal from a USB host to a USB device in a USB tree, comprising:
designating a primary USB device in the USB tree;
generating or assigning a special signal structure for transmission in USB data communications;
transmitting the special signal structure to the USB device in a predefined sequence;
monitoring said USB communication by means of said master USB device for said special signal structure and for a special response signal from said USB device;
generating a local event trigger signal for the primary USB device corresponding to decoding the special signal structure;
generating a local event trigger signal for the primary USB device in response to decoding the response signal from the USB device;
measuring a time interval between said event trigger signals in said primary USB device; and
determining a propagation time from the USB host to the USB device from the time interval.
Preferably, the primary USB device is connected near the top of the USB tree.
Preferably, the method further comprises transmitting the special signal structure to the USB device in the predefined sequence.
Preferably, the special signal structure comprises: OUT tokens, IN tokens, ACK tokens, NAK tokens, STALL tokens, PRE tokens, SOF tokens, SETUP tokens, DATA0 tokens, DATA1 tokens, or programmable sequence bit patterns IN USB DATA packets.
Preferably, said USB device is one of a plurality of USB devices, and said method comprises determining a respective propagation time for each of said USB devices, including statistically analyzing a plurality of such propagation determinations to improve the accuracy of said propagation delay measurements.
The present invention also provides a method of determining the relative propagation delay of electrical signals or data structures between a plurality of USB devices connected to a common USB host, comprising:
according to the method, determining respective propagation delays between each of the USB devices and the USB host;
designating one of the USB devices as a time reference device; and
determining a difference in said propagation delay between said time reference device and each of said plurality of said USB devices.
The present invention also provides a method for synchronizing local clocks of each of a plurality of USB devices connected to a common USB host through a USB tree such that said clocks are substantially in phase and at substantially the same frequency, comprising:
according to the method above, locking the local clock of each of the USB devices to substantially the same frequency;
determining a relative propagation delay of signals from said USB host to each of said USB devices with respect to a selected one of said USB devices with reference to said selected one of said USB devices in accordance with the above method, specifying said selected one of said USB devices;
according to the above method, determining a relative phase of the local clock of each of the plurality of USB devices with respect to the local clock of the reference USB device;
determining a required time adjustment or phase offset for each of the local clocks resulting in the plurality of local clocks across the USB tree being substantially in phase;
transmitting the time adjustment or phase offset from the USB host to the USB device; and
providing phase adjustment of the local clock on each of the USB devices according to the time adjustment or the phase offset, respectively.
Preferably, each phase of the local clocks of at least some of the USB devices is shifted by a desired amount, resulting in an array of USB devices having local clocks of known relative phases.
Additionally, the present invention provides a method for synchronously triggering and thus starting or stopping one or more processes on a plurality of USB devices connected to a common USB host according to a predefined trigger command, comprising:
according to the method, synchronizing the local clock of each USB device;
transmitting a predetermined trigger request signal and a predetermined trigger command signal representing a trigger request and said trigger command, respectively, in a USB data communication;
monitoring the USB data traffic local to each of the USB devices for the trigger request signal and the trigger command signal;
-preparing said USB devices to execute said trigger requests at substantially the same time by means of said USB host sending a start trigger request signal to each of said USB devices;
configuring the USB device to respond to the start trigger request signal by preparing itself to perform the procedure upon receiving the trigger signal;
configuring said USB host to send said trigger command to each of said plurality of said USB devices;
decoding the trigger command by means of the USB device;
configuring the USB devices to perform the processes at substantially the same time; and
thus, upon receiving the trigger command signal from the USB host, one or more processes within the USB device can be started or stopped.
Preferably, the trigger request signal comprises any of the USB packet signal structures defined in the USB specification, a command sequence sent to the USB device, or a data sequence sent to the USB device.
Preferably, the method comprises transmitting the trigger request signal and the trigger command signal in a predetermined sequence.
Preferably, the trigger command signal comprises any of the USB packet signal structures defined in the USB specification, a command sequence sent to the USB device, or a data sequence sent to the USB device.
Preferably, the local USB decoding device is a microcontroller, microprocessor, domain programmable gate array or any other element capable of decoding data structures within the USB.
Preferably, each trigger request signal and start trigger request signal contains an OUT token, an IN token, an ACK token, a NAK token, a STALL token, a PRE token, a SOF token, a SETUP token, a DATA0 token, a DATA1 token, or a programmable sequence of bit patterns IN a USB DATA packet.
Preferably, the trigger command is encoded into the USB communication using a signal protocol defined within the USB specification.
Preferably, each of said USB devices receives a clock signal from an external source.
Preferably, the clock signal is received through an additional electrical or optical connector, or by wireless means.
The present invention also provides an apparatus for locking a local clock of each of a plurality of USB devices within the same USB tree to substantially the same frequency, comprising:
a signal generator for generating a special signal structure in USB data communication, for transmitting said special signal structure to said USB devices in a predefined sequence, and for generating a local reference signal at each of said USB devices from said special signal structure; and
a signal monitor for monitoring local USB signals of the USB device for the special signal structure;
whereby, at each of said USB devices, said frequency of said local clock signal can be locked to said local reference signal to a desired extent.
The present invention also provides an apparatus for measuring signal propagation time from a USB host to a USB device in a USB tree, comprising:
a primary USB device containing one of the USB devices in the USB tree;
a signal generator or root hub for generating a special signal structure in a USB data communication for transmitting the special signal structure to the USB device in a predefined sequence;
a signal monitor for monitoring said USB communication by means of said master USB device for said special signal structure and for said response signal; and
a timer for measuring a time interval between said event trigger signals in said primary USB device; and
thereby, a propagation time from the USB host to the USB device can be determined from the time interval.
Further, the present invention provides an apparatus for determining the relative propagation delay of electrical signals or data structures between a plurality of USB devices connected to a common USB host, comprising:
means for determining a respective propagation time between each said USB device and said USB host, as described above; and
computing means for determining a difference in said propagation time between a reference USB device and each of said plurality of said USB devices.
Wherein the reference USB device comprises one of the USB devices.
In one embodiment the present invention provides an apparatus for synchronizing a local clock of each of a plurality of USB devices connected to a common USB host through a USB tree such that the clocks are substantially in phase and at substantially the same frequency, the apparatus comprising:
means for locking said local clock of each of said USB devices to substantially the same frequency, as described above;
means for determining the relative propagation delay of a signal from said USB host to each of said USB devices with respect to a reference USB device, and for determining the relative phase of said local clock of each of said plurality of USB devices with respect to said local clock of said reference USB device, said reference USB device containing a selected one of said USB devices, as described above; and
a timer for determining a required time adjustment or phase offset for each of said local clocks resulting in said plurality of local clocks across said USB tree being substantially in phase;
wherein said apparatus is adapted to transmit said time adjustment or phase offset from said USB host to said USB devices and to provide a phase adjustment of said local clock at each of said USB devices in accordance with said time adjustment or phase offset, respectively.
Drawings
In order that the invention may be more clearly ascertained, embodiments will now be described, by way of example, with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of an illustrative prior art USB device;
FIG. 2 is a schematic diagram of a prior art USB stacked star topology;
FIG. 3 is a schematic diagram of a synchronous USB circuit according to a first embodiment of the present invention, in which synchronization information is communicated to a device;
FIG. 4 is a schematic diagram of a synchronous USB circuit according to a second embodiment of the present invention, in which USB communications are observed and the local clock signal of the USB device is locked in phase and frequency to USB SOF packets;
FIG. 5A is a schematic diagram of a synchronous USB circuit in which the loop (roundtrip) time of the ACK packet associated with a particular transaction is measured to control the relative phase of the local clock of each of the plurality of devices in accordance with a third embodiment of the present invention;
FIG. 5B is a timing diagram of the transaction of FIG. 5A for device 62;
FIG. 5C is a timing diagram of the transaction of FIG. 5A for device 60;
FIG. 6 is a schematic diagram of a synchronous USB circuit according to a fourth embodiment of the present invention in which circuitry is provided for snooping the USB and locking a signal from a local clock in phase and frequency to SOF packets of the USB;
FIG. 7 is a simplified schematic diagram of one example of a combined synchronous USB circuit in which synchronization is provided without additional connector wiring (wiring) according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a complex synchronous USB circuit incorporating multiple embodiments of the present invention in which synchronization is provided without additional connector wiring;
FIG. 9 is a simplified schematic diagram of another example of a combined synchronous USB circuit according to an embodiment of the present invention, in which synchronization is achieved using additional connector wiring;
FIG. 10 is a simplified schematic diagram of a further example of a combined synchronous USB circuit, which may be compared to the example of FIG. 8 but is more complex, according to an embodiment of the present invention; and
fig. 11 is a schematic diagram of a variation of the example of fig. 10.
Detailed Description
According to a first embodiment of the invention, synchronization information is communicated to the device. FIG. 3 is a schematic diagram of a USB device 10' (similar to USB device 10 of FIG. 1, and like reference numerals may be used to refer to like features from FIG. 1) including a digitally controlled sensor 12. However, according to this embodiment, the number of lines is increased to include channels for providing synchronization information including trigger and clock signals from an external source.
Synchronization information (including trigger and clock signals) is provided to the bus connector 14 from an external source 24 such that the synchronization information provided to the sensor 12 by the synchronization channel 20 includes the externally provided synchronization information.
Such that device 10' does not contain logic or circuitry to generate synchronization information about other devices.
USB communication is based on transferring data during regular 1ms intervals called frames. At the beginning of each frame, a start of frame (SOF) packet (thus repeated at 1kHz) is transmitted to all devices except the low speed device and thus represents a low resolution synchronization signal for each device connected to one common USB port of the host. Thus, according to a second embodiment of the present invention, USB communications are observed and the local clock signal of the USB device is locked in phase and frequency to USB SOF packets.
As is well known in the art, the USB specification defines several unique data structures called TOKENs (TOKENs) that serve as packet headers for control and management functions of the bus. SOF packets have a unique digital signature and can therefore be distinguished from other data, which may also be present on the bus. According to this embodiment, a logic circuit or matched filter may be used to decode the bit sequence, the SOF token is represented by the sequence, and the SOF token sends a timing signal for each SOF packet present on the USB. Because the SOF occurs at a particular frequency and is common to all devices that occur, it and the decoded timing signal can be used by all devices as a common frequency reference. To generate a frequency of 1kHz different from the SOF, a Phase Locked Loop (PLL) may be used to lock the local oscillator to the SOF and timing signals in frequency and phase. This has the added advantage of: a PLL may be used to average out the jitter of the SOF arrival time. Therefore, the frequency of the local oscillator need not be different from the frequency of the SOF packet.
Referring to fig. 4, the method of this second embodiment uses circuitry to observe communications over the USB 40 and decode all SOF packets. The signal Φ from the locally controlled oscillator clock 42 is locked in frequency and phase to the USB 1kHz SOF packet. This first requires that the signal Φ from the clock 42 be divided down by the clock divider 46 to the frequency of the SOF packet (e.g., from an output frequency of 1MHz down to 1 kHz); when the SOF packet arrives (nominally at 1kHz), matched filter 48 sends a clock synchronization signal 50, which is passed to a phase detector 52. The phase detector 52 is coupled to the controlled oscillator clock 42 through a filter 56.
The local clock signal Φ is then provided to the sensor circuitry on the USB device to ensure that all devices connected to the root hub are locked in frequency.
According to this embodiment it is possible to generate a clock signal that is stable at arbitrarily high frequencies, such as clock frequencies of several tens of mhz with random jitter as low as a few nanoseconds. This embodiment thus allows to ensure that the local clock of each device connected to a given USB is synchronized in frequency. However, it does not take into account the synchronicity of those clocks. Each clock will be locked in frequency and phase to the reception of SOF tokens, but each device will receive SOF packets at substantially different times due to differences in signal propagation times of the randomly connected USB star topology. Synchronization of the local clocks of each of the multiple USB devices (so that all clocks are in phase) requires knowledge of the signal propagation time from the host to each device.
According to a third embodiment, the local clocks of each of the plurality of USB devices are synchronized to any degree. USB communications are monitored at different connection points in the USB tree and the propagation time of a particular USB communication transaction is measured to derive and compensate for the phase difference of the local clocks of the different devices due to electronic and cable delays. According to this embodiment, the loop propagation time of a particular data packet from the host to the device and the associated USB acknowledgement ACK token from the device is measured for each device present. This information is used to control the relative phase of the local clock of each device, thus synchronizing all connected USB devices to any degree with each other.
The USB specification allows the local time of two devices to differ by a maximum of 380 ns. However, if two independent devices are to accurately record the true time of the same event, their local times must be determined to effectively any degree of accuracy.
Fig. 5A schematically depicts two devices 60 and 62, which are connected at different points in a USB chain 64. The USB chain 64 also includes a USB host controller 66 and a multiple 7-port USB hub 68. Both devices 60 and 62 will receive the same periodic SOF signal to which they have independently locked their local clock in frequency and phase. However, due to the topological time delay introduced by the greater number of USB hubs 68 between USB host controller 66 and device 62, device 62 will receive SOF packets later than device 60. This time difference needs to be calculated from the time delay measurement and corrected.
As shown by symbol "a" on fig. 5A, the particular connection point of device 60 is not important if it is positioned such that it can decode bus communications for itself and device 62 (i.e., device 60 must be able to decode bus communications for all devices that require synchronization). The connection point for the device 60 is therefore preferably substantially near the top of the USB tree or chain, as shown by fig. 5A.
To measure the loop propagation time, a USB transaction is conducted between the host and the device 62. Device 60 monitors USB communications at point "a" in the tree and detects downstream of transactions and passage of response data packets. Then at point "a" of fig. 5A, the device 60 may determine a time period between detection of a downstream signal from the host to the device 62 (the start of the transaction) and a response signal from the device 62 to the host (the end of the transaction). In the preferred embodiment, the response signal from the device 62 to the host is the ACK token of the transaction acknowledgement ACK packet.
The loop propagation time for the USB transaction between the host and the device 60 relative to point "a" may be determined in a similar manner. Then, relative to the same point "A", the connection topology, which is based on the time phase shift between the frequency locked clocks in devices 60 and 62, is given by substantially half the difference in the loop propagation times for the two devices. Thus, the frequency-locked clock in device 62 is phase-delayed by this amount relative to the frequency-locked clock in device 60. In order to synchronize the clocks in the devices 60 and 62 in frequency and phase, a phase offset corresponding to the number must be introduced to one of the clocks. Most of this is done by introducing a phase delay into the local clock signal of the device 60.
Fig. 5B and 5C further illustrate this method. Fig. 5B is a timing diagram of the transaction of fig. 5A for device 62, and fig. 5C is a timing diagram of the transaction of fig. 5A for device 60. The USB transaction for each device 60, 62 is at TStart xStart, and as from TACK xShown to end when the device returns an ACK packet. (wherein, in both cases, X represents a device number). These transactions do not start at the same time, but have already been relative to TStart xThe figures are aligned to show the relative durations of the transactions. In fig. 5A, device 60 is much closer to detection point "a" so the loop propagation time is much shorter than that of device 62. The difference in propagation time is shown as Δ T. Thus twoThe phase offset between the frequency locked clocks is given by 1/2 Δ T.
It will be clear to the skilled person that: other methods exist to determine the required phase correction. The skilled person will also understand that: other USB DATA protocols may be used to generate the local clock frequency and determine the loop or one-way propagation time, including but not limited to any USB control and management packet token (i.e., SOF, IN, OUT, ACK, NAK, PRE, STALL, DATA0, DATA1), any programmable sequence of bit patterns IN USB DATA packets, any user-defined DATA structure, or any signal protocol defined within the USB specification.
Techniques for locking a local oscillator of a USB device in phase and frequency to accomplish synchronous operation of a variety of USB devices are described above. This local oscillator produces continuous modulation. Devices may also be required to synchronize a particular sequence of operations in time. The devices will require a so-called common trigger signal to do this. This trigger signal may be used in conjunction with a frequency locked local oscillator to complete a complete synchronous operation of multiple independent USB devices.
According to a fourth embodiment, a synchronous trigger signal for a sensor on a given device is generated to trigger the sensor at a given time by using SOF packets that include encoded frame numbers. However, due to the USB connection topology, the arrival times of SOF packets may differ between devices, and in addition, the USB specification takes into account the significant time jitter of the SOF packet frequency with respect to the phase-locked loop local oscillator. This may result in the clocks being out of phase for a fraction of a cycle. However, the trigger signal should be in phase with the local oscillator.
To eliminate the problem of jitter, the SOF signal is latched into a local oscillator. The latch registers the arrival of the SOF trigger request but only generates the trigger signal when the local oscillator next changes state. The error in the trigger time between different devices is a function of the local clock frequency of the device and the nature of the control loop and can be made arbitrarily small.
Thus, FIG. 6 is a schematic diagram of a circuit 70 for monitoring the USB 72 and locking in phase and frequency the clock signal Φ from the local clock 74 (output frequency down to 1 kHz-if necessary-through clock divider 76) to the 1kHz SOF packets of the USB 72. To frequency and phase lock the local clock 74 (as in fig. 4), the first matched filter 80 sends a clock synchronization signal 82 upon arrival of a SOF packet, while the second matched filter 84 sends a trigger request signal 86 upon arrival of a SOF packet with a specific frame number. Similar to the circuit of fig. 4, this circuit also includes a filter 90 and a phase detector 92. The trigger request signal is latched to the locally stable local clock signal Φ to produce a synchronized trigger signal "Trig".
According to a fifth embodiment, circuitry and logic are used to provide a synchronization signal to the USB device at frequencies traceable to a national standard such as NIST or NATA. This is done, for example, by replacing the clock and/or crystal in any hub including the root hub with a frequency reference traceable to national standards.
According to a sixth embodiment, a USB backplane is provided to supply-connectable devices-power, USB signals, connectors, and synchronization information.
In its most complex state, the USB backplane comprises: the power supply is attached to the USB and becomes equipment for providing power for the USB; a hub circuit providing multiple ports; a plurality of connectors associated with those ports providing a plurality of hot-pluggable device connection points and USB signals that meet the USB specification. It may also contain logic elements such as microprocessors, programmable arrays, and digital and analog electronics to adjust and provide synchronization information, including frequency, phase, and triggering using the various techniques described above and power switching sequences. In addition to one or more hubs, the backplane may also contain devices that connect to one of the USB ports provided by the hub. Alternatively, it may be a composite device that provides both hub and synchronization functions. In this manner, the synchronization information is over-the-air (on-the-fly) measurable and programmable.
Various examples
The above-described embodiments may be utilized in different ways. However, these can be divided into devices that supplement the USB connector terminals with isochronous terminals and those that do not. In addition, the logic elements of the second through fifth embodiments may be located on the USB device, on the backplane (if a backplane solution is desired), on both, or not at all.
Depending on the requirements of the application, it will be appreciated that one may or may not want to implement a backplane solution. The application also determines whether additional power needs to be provided to the device.
Example 1: without additional connector wiring for synchronization
The advantages of the system according to the invention, which does not rely on a supplementary synchronization signal, are: the devices do not rely on this information and operate in a synchronous manner, so that a common hub can be used on any individual host. Such a system can be extended to devices requiring very precise synchronization. Thus, an example of such a system, shown generally at 96 in FIG. 7, has an upstream USB port 98 and multiple backplane hub devices 100, 102 (in this example, each being a 7-port USB hub on backplane 104) that may optionally provide additional power to multiple devices 106. Each device 106 may contain a local clock that locks in frequency and phase according to the second embodiment described above. The backplane 104 and the hubs 100, 102 have the capability to: by virtue of the device 108 and the techniques described above in the context of the third embodiment, the time of the phase difference between the devices 106 (each having a random cable length according to the USB specification) is recorded. Furthermore, each device 106 contains a phase shift generator for the local clock, which operates according to the technique described above in the context of the third embodiment.
Example 2
A complex system containing multiple isochronous USB devices is shown generally at 110 in fig. 8. The upstream port 111 receives USB communications from a host. System 110 includes a plurality of backplanes 112, 113, 114, each backplane having two backplane hub devices 115. Each backplane hub device 115 contains a 7-port USB hub and may optionally provide additional power to multiple devices 116. Each device 116 may contain a local clock that is locked in frequency and phase according to the second embodiment described above. Further, the first or main backplane 112 also has additional circuitry or logic elements 117 (as in FIG. 7) and has the ability to: by virtue of element 117 and the techniques described above in the context of the third embodiment, the time of phase difference between devices 116 (each having a different connection topology) is recorded. In addition, each device 116 contains a phase shift generator for shifting the phase of the local clock using the techniques described in the third embodiment above. There may be additional devices and/or hubs and/or backplanes connected to downstream port 118 up to the maximum number of 127 devices defined in the USB specification.
In addition, the frequency provided by the upstream root hub may be generated by the frequency reference according to the fifth embodiment, and any trigger signal may be generated using the method of the fourth embodiment.
Example 3: additional connector wiring for synchronization
According to the above described embodiments, the simplest example of such a method is implemented by connecting all devices to a common synchronization signal, either through a proprietary connector containing USB and synchronization information or through a USB connector, and a separate synchronization link. The synchronization information is independent of the USB communication and can therefore be of any frequency without any major difficulties. The medium for synchronizing information may be any wireless, electrical, or fiber optic device. Fig. 9 schematically depicts a practical example of such a circuit at 120. In practice, the circuit 120 comprises a pair of circuits, each comparable to the circuit of fig. 7, such that 24 USB devices 122 are connected through a 7-port USB hub 124; these may in turn be connected to a PC through an upstream USB port 126. The USB connection topology has no effect on the synchronization signals that are provided to each device separately by an external clock 128 of frequency phi. Thus, device 122 connects to the USB and synchronization signals through one connector (with connections other than USB requirements) or a standard USB connector plus one or more additional connectors.
In a more complex form of this example, a backplane is used that contains additional logic elements that provide precise control and locking in frequency and phase for all connected devices. In such an arrangement, the backplane logic elements observe USB communications and generate their own local clocks according to the methods of the second and third embodiments described above. This backplane generated clock is then distributed to each connected USB device through one or more of the backplane connectors described above.
Thus, referring to fig. 10, which generally depicts such an arrangement at 130, each device 132 is connected to circuitry 134 by an additional connector end 136 (electrical, wireless, fiber optic), which complements the USB specification. By way of example, the circuitry may be located on the backplane 138 that connects the various modules. This backplane 138 also contains one or more 7-port USB hubs 140. The circuit 134 monitors the USB at the USB upstream port 142 for the start of a frame signal and locks the frequency and phase of its internal clock to this signal (as per the second embodiment). The circuit 134 may also arbitrarily delay the incoming clock signal to account for delays due to the USB topology (compare the third embodiment). An internal clock is then made available to each device 132 through the additional connector end. In this manner, all devices 132 receive a common clock signal synchronized thereto.
It should be noted that in the previously described figures, the synchronization circuit was drawn independent of the hub. In another variation, however, shown at 150 in fig. 11, one hub is a compound device 152 (connected to a USB upstream port 154) that contains an expansion port 156 and synchronization circuitry 158 (which generates a local clock signal according to embodiment 2 and using the techniques described in embodiment 3 to provide a phase shift of the local clock to provide synchronization with other devices) that frees a port 160 of a second hub 162 (when compared to the examples discussed above) so that-in the simple configuration shown in fig. 11-up to 13 devices 164 can be connected.
It should also be noted that the USB specification does not limit the number of ports per hub to 7. Thus in fig. 10, there may be one hub 140 that maintains, for example, 12 ports.
Modifications within the spirit and scope of the invention may be readily effected by persons skilled in the art. It is to be understood, therefore, that this invention is not limited to the particular embodiments described by way of example hereinabove. For the purposes of this specification, it is to be understood that the word "comprise" means "including but not limited to", and the word "comprises" has a corresponding meaning.
Furthermore, any reference herein to prior art is not intended to imply that such prior art forms or ever forms a part of the common general knowledge.

Claims (12)

1. A synchronous multi-channel universal serial bus comprising: circuitry to observe USB communications at a plurality of USB devices connected to a common USB host and lock a local clock signal of each USB device to a periodic signal contained in the USB communications, wherein the circuitry is adapted to lock the local clock signal to the periodic signal in phase and frequency;
wherein the circuitry is further adapted to generate a trigger signal when each of the plurality of USB devices registers arrival of a trigger request, a subsequent change in state of a respective local clock signal of each of the plurality of USB devices, and to start or stop one or more processes at each of the plurality of USB devices upon receipt of the trigger signal.
2. The universal serial bus as claimed in claim 1, wherein said circuitry operable to lock a local clock signal of each USB device decodes and locks to a periodic data structure.
3. A universal serial bus as claimed in claim 2, wherein said circuitry operable to lock the local clock signal of each USB device decodes and locks to USB start of frame packet tokens.
4. The universal serial bus of claim 2, further comprising: circuitry to measure a loop time of each of the plurality of individual packets to derive a relative phase of the individual USB device.
5. The universal serial bus as claimed in claim 4, wherein said circuit operable to measure loop time measures the loop time of an ACK packet associated with a particular transaction, thereby controlling the relative phase of the local clock signal of each device so that all connected USB devices are synchronized.
6. The universal serial bus of claim 1, further comprising: circuitry for transmitting at least one USB device of the plurality of USB devices with a trigger signal.
7. The universal serial bus of claim 1, further comprising: a USB backplane for providing any one or more of USB signals, power, sockets, and synchronization information to connectable USB devices.
8. A method of synchronizing a multi-channel universal serial bus, comprising:
observing USB communications at a plurality of USB devices; and
locking the local clock signal of each USB device to a periodic signal contained in the USB communication;
wherein the locking is with respect to phase and frequency;
registering arrival of a trigger request at least one of the plurality of USB devices; and
generating a trigger signal when the state of the respective local clock signal of each of the plurality of USB devices subsequently changes; and
one or more processes at each of the plurality of USB devices are started or stopped upon receiving the trigger signal.
9. The method of claim 8, further comprising:
measuring a loop time for each of the plurality of individual packets;
determining from the loop times the relative phase of individual USB devices in the USB tree; and
adjusting any phase offset of the individual USB devices according to the determined relative phase.
10. The method of claim 8, further comprising:
at least one of the plurality of USB devices is transmitted with a trigger signal.
11. The method of claim 10, further comprising generating the trigger signal by using a start of frame packet to trigger a sensor at a given time.
12. The method of claim 8, comprising performing the one or more processes in phase with a local oscillator.
HK11101092.2A 2002-07-17 2011-02-01 Synchronized multichannel universal serial bus HK1147133B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US39609902P 2002-07-17 2002-07-17
US60/396,099 2002-07-17

Publications (2)

Publication Number Publication Date
HK1147133A1 HK1147133A1 (en) 2011-07-29
HK1147133B true HK1147133B (en) 2014-02-07

Family

ID=

Similar Documents

Publication Publication Date Title
CN1679013B (en) Synchronous multichannel universal serial bus
CN101401055B (en) Distributed synchronization and timing system
HK1147133B (en) Synchronized multichannel universal serial bus
HK1120317A (en) Synchronized multichannel universal serial bus
HK1079302B (en) Synchronized multichannel universal serial bus
HK1146322A (en) Synchronized multichannel universal serial bus
HK1128098B (en) Distributed synchronization and timing system
HK1149097B (en) Distributed synchronization and timing system