This relates generally to wireless communications circuitry, and more particularly, to methods for testing wireless communications circuitry.
Electronic devices that contain wireless communications circuitry may be a computer such as a computer that is integrated into a display, a laptop computer, a tablet computer, a somewhat smaller portable device such as a wrist-watch device, pendant device, or other wearable or miniature device, a cellular telephone, a media player, a tablet computer, a gaming device, a navigation device, a computer monitor, a television, or other electronic equipment. Electronic devices may use short-range wireless communications circuitry such as WiFi® (IEEE 802.11) circuitry and Bluetooth® circuitry. Electronic devices may also use long-range wireless communications circuitry such as cellular telephone circuitry and WiMax (IEEE 802.16) circuitry.
Consider a system in which a master network device is being used as an access point to service wireless communications among multiple slave network devices (i.e., among multiple end hosts). To establish an active connection with the master, each slave has to perform a clock synchronization operation with the master. If the clock synchronization operation is not properly performed between a master and a given slave, a master reference clock associated with the master and a slave reference clock associated with the given slave may have corresponding clock edges that are offset by an intolerable amount.
It would therefore be desirable to provide improved ways of performing master-slave clock synchronization and to provide ways for verifying whether or not the clock synchronization has been properly executed.
A test system for testing clock synchronization operations among multiple networking devices is provided. The test system may include at least a master test station acting as an access point (sometimes referred to as master network equipment) and slave test station acting as an end host (sometimes referred to as slave network equipment). The master may have an associated master reference clock signal, whereas the slave may have an associated slave reference clock signal. Synchronization operations may be performed so that the slave reference clock is synchronized to the master reference clock according to design criteria.
The master test station may include a first transceiver that is being actively used as a transmitter, first control logic, and a first processor. The slave test station may include a second transceiver that is being actively used as a receiver, second control logic, and a second processor. The first processor may configure the transmitter to periodically (or aperiodically) transmit synchronization (sync) packets to the receiver. When a sync packet is sent, the first control logic may send a master timestamp sample to the first processor. Each master timestamp sample may include a master clock index value and a master counter value reflective of the amount of elapsed master clock cycles. More than one master timestamp sample may be accumulated at the first processor in this way. When a sufficient number of master timestamp samples have been accumulated, the first processor may generate a corresponding timestamp packet that contains the accumulated master timestamp samples. The transmitter may then be used to send the timestamp packet to the receiver.
When the receiver receives a sync packet from the transmitter, the second control logic may forward a slave timestamp sample to the second processor. The slave timestamp sample may include a slave clock index value and a slave counter value reflective of the amount of elapsed slave clock cycles. More than one slave timestamp sample may be accumulated at the second processor in this way.
When the receiver receives a timestamp packet from the transmitter, the master timestamp samples in the timestamp packet may be extracted and fed to the second processor. The second processor may then be used to compare the master timestamp samples with the slave timestamp samples to determine an amount of mismatch that is present between the master and slave reference clocks (e.g., by comparing the master and slave counter values corresponding to the same clock index values). If the mismatch between the master and slave reference clocks exceeds a predetermined threshold, the slave counter value may be updated based on the amount of mismatch. If the mismatch between the master and slave reference clocks is less than the predetermined threshold, the frequency of the slave reference clock may be temporarily adjusted to reduce any existing mismatch.
Further features of the present invention, its nature and various advantages will be more apparent from the accompanying drawings and the following detailed description.
Electronic devices such as device 10 of
As shown in
Storage and processing circuitry 28 may be used to run software on device 10, such as internet browsing applications, voice-over-internet-protocol (VOIP) telephone call applications, email applications, media playback applications, operating system functions, functions related to communications band selection during radio-frequency transmission and reception operations, etc. To support interactions with external equipment such as base station 21, storage and processing circuitry 28 may be used in implementing communications protocols. Communications protocols that may be implemented using storage and processing circuitry 28 include internet protocols, wireless local area network protocols (e.g., IEEE 802.11 protocols—sometimes referred to as WiFi®), protocols for other short-range wireless communications links such as the Bluetooth® protocol, IEEE 802.16 (WiMax) protocols, cellular telephone protocols such as the “2G” Global System for Mobile Communications (GSM) protocol, the “2G” Code Division Multiple Access (CDMA) protocol, the “3G” Universal Mobile Telecommunications System (UMTS) protocol, and the “4G” Long Term Evolution (LTE) protocol, MIMO (multiple input multiple output) protocols, antenna diversity protocols, etc. Wireless communications operations such as communications band selection operations may be controlled using software stored and running on device 10 (i.e., stored and running on storage and processing circuitry 28 and/or input-output circuitry 30).
Input-output circuitry 30 may include input-output devices 32. Input-output devices 32 may be used to allow data to be supplied to device 10 and to allow data to be provided from device 10 to external devices. Input-output devices 32 may include user interface devices, data port devices, and other input-output components. For example, input-output devices may include touch screens, displays without touch sensor capabilities, buttons, joysticks, click wheels, scrolling wheels, touch pads, key pads, keyboards, microphones, cameras, buttons, speakers, status indicators, light sources, audio jacks and other audio port components, digital data port devices, light sensors, motion sensors (accelerometers), capacitance sensors, proximity sensors, etc.
Input-output circuitry 30 may include wireless communications circuitry 34 for communicating wirelessly with external equipment. Wireless communications circuitry 34 may include radio-frequency (RF) transceiver circuitry formed from one or more integrated circuits, power amplifier circuitry, low-noise input amplifiers, passive RF components, one or more antennas, transmission lines, and other circuitry for handling RF wireless signals. Wireless signals can also be sent using light (e.g., using infrared communications).
Wireless communications circuitry 34 may include radio-frequency transceiver circuitry 90 for handling various radio-frequency communications bands. For example, circuitry 90 may include transceiver circuitry 36, 38, and 42. Transceiver circuitry 36 may handle 2.4 GHz and 5 GHz bands for WiFi® (IEEE 802.11) communications and may handle the 2.4 GHz Bluetooth® communications band. Circuitry 34 may use cellular telephone transceiver circuitry 38 for handling wireless communications in cellular telephone bands such as at 850 MHz, 900 MHz, 1800 MHz, 1900 MHz, and 2100 MHz and/or the LTE bands and other bands (as examples). Circuitry 38 may handle voice data and non-voice data traffic.
Transceiver circuitry 90 may include global positioning system (GPS) receiver equipment such as GPS receiver circuitry 42 for receiving GPS signals at 1575 MHz or for handling other satellite positioning data. In WiFi® and Bluetooth® links and other short-range wireless links, wireless signals are typically used to convey data over tens or hundreds of feet. In cellular telephone links and other long-range links, wireless signals are typically used to convey data over thousands of feet or miles.
Wireless communications circuitry 34 may include one or more antennas 40. Antennas 40 may be formed using any suitable antenna types. For example, antennas 40 may include antennas with resonating elements that are formed from loop antenna structure, patch antenna structures, inverted-F antenna structures, slot antenna structures, planar inverted-F antenna structures, helical antenna structures, hybrids of these designs, etc. Different types of antennas may be used for different bands and combinations of bands. For example, one type of antenna may be used in forming a local wireless link antenna and another type of antenna may be used in forming a remote wireless link antenna.
As shown in
Baseband processor 88 may be used to provide data to storage and processing circuitry 28. Data that is conveyed to circuitry 28 from baseband processor 88 may include raw and processed data associated with wireless (antenna) performance metrics for received signals such as received power, transmitted power, frame error rate, bit error rate, channel quality measurements based on received signal strength indicator (RSSI) information, channel quality measurements based on received signal code power (RSCP) information, channel quality measurements based on reference symbol received power (RSRP) information, channel quality measurements based on signal-to-interference ratio (SINR) and signal-to-noise ratio (SNR) information, channel quality measurements based on signal quality data such as Ec/Io or Ec/No data, information on whether responses (acknowledgements) are being received from a cellular telephone tower corresponding to requests from the electronic device, information on whether a network access procedure has succeeded, information on how many re-transmissions are being requested over a cellular link between the electronic device and a cellular tower, information on whether a loss of signaling message has been received, information on whether paging signals have been successfully received, and other information that is reflective of the performance of wireless circuitry 34. This information may be analyzed by storage and processing circuitry 28 and/or processor 88 and, in response, storage and processing circuitry 28 (or, if desired, baseband processor 58) may issue control commands for controlling wireless circuitry 34. For example, baseband processor 88 may issue commands that direct transceiver circuitry 90 to switch into use desired transmitters/receivers and antennas.
Antenna diversity schemes may be implemented in which multiple redundant antennas are used in handling communications for a particular band or bands of interest. In an antenna diversity scheme, storage and processing circuitry 28 may select which antenna to use in real time based on signal strength measurements or other data. In multiple-input-multiple-output (MIMO) schemes, multiple antennas may be used in transmitting and receiving multiple data streams, thereby enhancing data throughput.
As shown in
The slave network device may initially be placed in a low power standby mode. In order for the slave network device to establish an active data connection with the master network device, a series of master-slave handshake operations may be performed. In particular, synchronization (or “sync”) packets may be transmitted in a dedicated synchronization channel from the master network device (e.g., using transmitter 110) to the slave network device to ensure that a reference clock associated with the slave is sufficiently synchronized with a reference clock associated with the master. The slave network device may receive the sync packets from the master using receiver 110′ (as an example).
The slave reference clock may be considered to be “synchronized” with the master reference clock when the frequency offset, phase offset, and index offset between the two reference clocks are within satisfactory limits. The frequency offset refers to any mismatch in frequency between the master and slave reference clocks. The phase offset may refer to the amount by which adjacent master-slave clock edges are misaligned. Each clock edge may correspond to an associated index value. The index offset may refer to any mismatch between master and slave rising clock edges that have the same index value.
For example, it may be desirable to ensure that the master and reference clocks each having a clock rate of 50 kHz is synchronized to within 10 μs (e.g., to ensure that the frequency, phase, and index offset amounts to less than a half clock cycle). Applications in which such degree of synchronization accuracy is required may include a system having wirelessly connected speakers, where each of the wirelessly linked speakers have to be synchronized with a master access point to ensure that the acoustic wavefronts produced by the respective speakers are sufficiently aligned.
The operation of each test station 106 may be coordinated using test host 102. In particular, test host 102 may be connected to the control logic circuitry in each test station via network switch 104 and path 122. Data and control signals may be conveyed between the control logic circuitry in each test station and test host 102 via path 122. Network switch 104 may be a gigabit Ethernet switching circuit, and path 122 may be formed using Ethernet cables such as Category 5 or Category 5e (enhanced) cables (as an example). In general, test host 102 may include one or more networked computers and may be used to maintain a database of test results, may be used in sending test commands to test stations 106, may send user data signals to test stations 106, may receive user data signals from test stations 106, and may perform other control operations. In another suitable arrangement, test host 102 may instead be connected to transceiver 36 via dotted path 124.
Test host 102 may configure a selected one of test stations 106 to serve as an access point to which other test stations in system 100 may be synchronized. For example, first test station 106-1 may be selected to act as the access point while remaining test stations 106-2 to 106-n act as end hosts (e.g., test station 106-1 may be selected as the master while other test stations are configured as slaves). Test system 100 may support both unicast and multicast synchronization configurations. In the unicast configuration, the access point may synchronize with each end host one at a time. In the multicast synchronization configuration, the access point may synchronize with multiple end hosts in parallel (as shown by wireless paths 126 and 128).
Control logic circuitry 116 in each test station 106 may be used to generate a corresponding output clock signal. In the example of
The arrangement of
Data signals and synchronization signals may be transmitted from antenna 112 associated with transmitter 110 in the master to antenna 112 associated with receiver 110′ in the slave (as shown via wireless path 126). In other words, the master device is generally associated with the transmission (Tx) of critical timing signals while the slave device is general associated with the reception (Rx) of the critical timing signals during synchronization operations. Master test station 106-1 also includes receiver 110′ but is omitted from
Control logic circuitry 200 may receive synchronization control signals from transmitter 110. In particular, control logic 200 may receive a transmit trigger signal Trig_Tx via path 120-1 and may receive a transmit index signal Idx_Tx via path 120-2. During synchronization, transmitter 110 may transmit synchronization (sync) packets, timestamp packets, and normal data packets to receiver 110′. Transmitter 110 may be configured to pulse signal Trig_Tx high whenever transmitter 110 transmits a synchronization packet to receiver 110′. Signal Idx_Tx may be a four-bit digital signal and may be used to uniquely identify up to 16 synchronization packets (as an example). If desired, signal Idx_Tx may include less than four bits or more than four bits.
Control logic 200 may include a controller 202, counter 204, and clock generator 206. Control logic 200 may receive a master reference clock signal RefClk_Tx that is used to drive free running counter 204 (e.g., a counter that periodically increments at each and every rising edge of master reference signal RefClk_Tx). Clock generator 206 may be used to output clock signal Clk1 that is derived from RefClk_Tx. As an example, clock generator 206 may be a frequency divider that produces signal Clk1 that is a frequency divided version of signal RefClk_Tx (e.g., RefClk_Tx may have a clock rate that is an integer multiple of the clock rate of Clk1).
Controller 202 may be used to implement a state machine that directs the operation of control logic 200. As an example, when control logic 200 detects an asserted Trig_Tx, controller 202 may capture a timestamp value (or sample) TimeStamp_Tx and may then forward the timestamp sample to processing circuitry 208 via path 214. Control logic 200 may be configured using configuration data and other control signals that are sent from processor 208 via path 212. Paths 212 and 214 linking control logic 200 and processor 208 may be a Universal Asynchronous Receiver/Transmitter (UART) based connection, a Universal Serial Bus (USB) based connection, a Generic Serial Peripheral Interface (gSPI) based connection, or may be formed using other suitable interface standards.
Processor 208 may be used to run transmit (Tx) test software 210 (e.g., software running autonomously on processor 208) that processes timing information received from control logic 200, places control logic 200 in desired states, generates timestamp packets, forwards timestamp packets and normal user data to transmitter 110 via HSIC path 118, and directs other test operations. As shown in
As with control logic circuitry 200, control logic circuitry 250 associated with the slave may receive synchronization control signals from receiver 110′. In particular, control logic 250 may receive a receive trigger signal Trig_Rx via path 120-1 and may receive a receive index signal Idx_Rx via path 120-2. During synchronization, receiver 110′ may receive synchronization packets, timestamp packets, and normal data packets from transmitter 110. Receiver 110′ may be configured to pulse signal Trig_Rx high whenever receiver 110′ receives a sync packet from transmitter 110. Signal Idx_Rx may be extracted from the received sync packet and presented on path 120-2. Signal Idx_Rx may have at least the same bit-width as Idx_Tx and may be used to uniquely identify up to a certain number of sync packets depending on the bit-width of Idx_Rx.
Control logic 250 may include a controller 252, counter 254, and clock generator 256. Control logic 250 may receive a slave reference clock signal RefClk_Rx that is used to drive free running counter 254 (e.g., a counter that increments at each and every rising edge of signal RefClk_Rx). Clock generator 256 may be used to output clock signal Clk2 that is derived from RefClk_Rx. As an example, clock generator 256 may be a frequency divider operable to produce signal Clk2 that is a frequency divided version of signal RefClk_Rx (e.g., RefClk_Rx may have a clock rate that is an integer multiple of the clock rate of Clk2). In general, master reference clock RefClk_Tx and slave reference clock RefClk_Rx should exhibit closely matched frequencies, and the amount of frequency division provided using generator 206 and 256 should be the same.
Controller 252 may be used to implement a state machine that controls the operation of logic 250. As an example, when control logic 250 detects an asserted Trig_Rx, controller 252 may capture a timestamp sample TimeStamp_Rx and may then forward the timestamp sample to processor circuitry 258 via path 264. Control logic 250 may be configured using configuration data and other control signals that are sent from processor 258 via path 262. Paths 262 and 264 that link control logic 200 and processor 258 may be a Universal Asynchronous Receiver/Transmitter (UART) based connection, a Universal Serial Bus (USB) based connection, a Generic Serial Peripheral Interface (gSPI) based connection, or may be formed using other suitable interface standards.
In contrast to Tx processor 208, Rx processor 258 may be used to run Rx test software 260 that is used to process timing information received from control logic 250, to place control logic 250 in desired states, to receive timestamp packets and normal user data from receiver 110′ via HSIC path 118, to determine the amount of timing mismatch between signals RefClk_Tx and RefClk_Rx based on the received timestamp data, and to direct other test operations. As shown in
Rx test software 260 may adjust the frequency of RefClk_Rx so that slave RefClk_Rx is sufficiently synchronized with respect to master RefClk_Tx. In order for RefClk_Rx to be considered as being properly synchronized, RefClk_Tx and RefClk_Rx should be matched in terms on frequency, phase, and index. If either the frequency offset, phase offset, or index offset is greater than pre-specified frequency, phase, and index deviation thresholds, RefClk_Rx should not be considered as being properly synchronized.
Every time a sync packet is sent, transmitter 110 will temporarily assert Trig_Tx and increment Idx_Tx. Idx_Tx may or may not be initialized to zero. When control logic 200 detects an asserted Trig_Tx (e.g., when control logic 200 detects a rising edge on path 120-1), control logic 200 may forward a current timestamp data point TimeStamp_Tx that is based on the current value of counter 204 to processing module 208 via path 214 (see,
In the example of
Signal RefClk_Rx may be used to drive a free running counter 254. Counter 254 may be used to keep a running tally of the number of elapsed clock cycles for slave test station 106-2. As shown in
In the example of
Test software 260 running on processor 258 may be used to compare timestamp information received from transmitter 110 with timestamp information received from Rx control logic 250. For example, software 260 may compare timestamp samples with matching indices to determine whether RefClk_Rx is clocking ahead of or behind RefClk_Tx. By comparing TS_Tx(0) with TS_Rx(0), processor 258 may obtain an index error of −1 (i.e., RefClk_Tx is trailing RefClk_Rx by one clock cycle). By comparing TS_Tx(3) with TS_Rx(3), processor 258 may obtain an index error of −2 (i.e., RefClk_Tx is trailing RefClk_Rx by two clock cycles). Note that it is possible to be frequency matched (assuming RefClk_Tx and RefClk_Rx are clocking at the same clock rate) and phase matched (assuming RefClk_Tx and RefClk_Rx have aligned clock edges) but not index matched (i.e., the index error is not equal to zero).
In scenarios in which timestamp comparisons show that master RefClk_Tx trails RefClk_Rx (as is shown in
The formats of packets 296 and 298 as shown in
When placed in the sync transmission mode, transmitter 110 may opportunistically send sync packets to receiver 110′ (step 304). For example, transmitter 110 may wait for a random amount of time before sending each successive sync packet. In particular, transmitter 110 may wirelessly transmit a sync packet 296 of the type described in connection with
When Tx control logic 200 detects an asserted Trig_Tx, control logic 200 may capture a current timestamp sample based on a previously received Idx_Tx and the current output of counter 204 and may then forward the captured timestamp sample to Tx processor 208 (step 314).
At step 316, Tx processor 208 may receive the timestamp sample from control logic 200 and may store the received timestamp sample in memory. At step 318, software 210 may determine whether a sufficient number of timestamp samples have been accumulated at processor 208 (e.g., whether a timestamp sample counter output reflective of the number of accumulated timestamp samples is equal to predetermined amount m). Predetermined amount m may be dependent on the bit width of Idx_Tx. For example, if Idx_Tx is a four bit signal, m may be equal to 16 (i.e., 24). As another example, if Idx_Tx is a six bit signal, m may be equal to 64 (i.e., 26).
If the timestamp sample counter output is less predetermined threshold m, processing may loop back to step 304 in preparation of transmitting a subsequent sync packet after a random amount of wait time has elapsed (as indicated by path 326).
If the timestamp sample counter output is equal to predetermined threshold m, test software 210 may proceed to step 320 to generate a timestamp packet that includes each timestamp sample accumulated in processor 208 during step 316 since a previous timestamp packet transmission (e.g., timestamp packet may include m timestamp samples).
At step 322, Tx processor 208 may forward the timestamp packet to transmitter 110 for wireless transmission (e.g., the timestamp packet generated at step 320 is transmitted from transmitter 110 to receiver 110′ via wireless path 126). At step 324, the timestamp sample counter may be reset to zero and processing may loop back to step 304 in preparation of transmitting a subsequent sync packet after a random amount of wait time (as indicated by path 328).
When placed in the sync receive mode, receiver 110′ may continuously monitor a dedicated sync channel in anticipation of a sync packet broadcast from transmitter 110. In response to receiving a sync packet, receiver 110′ may temporarily pulse Trig_Rx high, extract an index value from the received sync packet (see,
When Rx control logic 250 detects an asserted Trig_Rx, control logic 250 may capture a current timestamp sample based on the currently received Idx_Rx and the current output of counter 254 and may then be used to forward the captured timestamp sample to Rx processor 258 (step 406).
At step 408, Rx processor 258 may receive the timestamp sample from control logic 250 and may store the received timestamp sample in memory. Processing may then loop back to step 404 in preparation of receiving a subsequent sync packet from transmitter 110 (as indicated by path 410).
When receiver 110′ receives a timestamp packet from transmitter 110, receiver 110′ may extract the timestamp data from the timestamp packet and may forward the extracted timestamp data to Rx processor 258 via path 118 (see,
When Rx processor 258 receives the master timestamp samples from receiver 110′ (step 414), test software 260 may be used to perform clock timing evaluation (e.g., to determine an amount of mismatch present between master clock RefClk_Tx and slave clock RefClk_Rx, if any).
At step 416, software 260 may compare the master timestamp samples with the slave timestamp samples to determine whether any timestamp samples have been dropped. As an example, missing timestamp samples may be detected by examining each pair of adjacent timestamp samples to ensure that the associated indices are consecutively increasing integers. If a pair of adjacent timestamp samples exhibits non-consecutive indices (jumping from an index of 1 to an index of 3 as described in the example of
At step 418, test software 260 may apply digital filtering on the master timestamp samples and the slave timestamp samples (e.g., using a finite impulse response filter or an infinite impulse response filter) to remove jitter and other sources of nonsystematic variation.
At step 420, test software 260 may evaluate the amount of index error present between RefClk_Tx and RefClk_Rx by comparing the master timestamp indices with the slave timestamp indices (e.g., by comparing the absolute timestamp count values for corresponding pairs of master-slave timestamp samples with the same index, as described in connection with the example in
If the amount of index error exceeds a predetermined threshold, processor 258 may configure counter 254 to jump to a desired count value by sending appropriate commands over path 262 (step 424). Directing counter 254 to jump to the desired count value may effectively remove any index error. If the amount of index error is less than the predetermined threshold, test software 260 may temporarily adjust the frequency of RefClk_Rx to reduce any remaining index/phase mismatch between RefClk_Tx and RefClk_Rx (step 426). As an example, if RefClk_Rx is delayed with respect to RefClk_Tx, the frequency of RefClk_Rx may be slightly increased to help “catch up” to the RefClk_Tx. As another example, if RefClk_Rx is clocking ahead of RefClk_Tx, the frequency of RefClk_Rx may be slightly decreased to allow RefClk_Tx to catch up to RefClk_Rx.
At step 428, a test operator or automated test equipment may verify that RefClk_Tx and RefClk_Rx are synchronized according to design criteria by analyzing the waveform of Clk1 and Clk2 (derived from RefClk_Tx and RefClk_Rx, respectively) on oscilloscope 132.
The steps as shown in
In another suitable arrangement, each test station 106 need not include a processing module (see, e.g.,
The foregoing is merely illustrative of the principles of this invention and various modifications can be made by those skilled in the art without departing from the scope and spirit of the invention. The foregoing embodiments may be implemented individually or in any combination.
This application claims the benefit of provisional patent application No. 61/646,207, filed May 11, 2012, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
61646207 | May 2012 | US |