Clock and Data Recovery With Coded Data Streams Author: Leonard Dieguez

Similar documents
R Using the Virtex Delay-Locked Loop

CHAPTER 6 PHASE LOCKED LOOP ARCHITECTURE FOR ADC

ICS PLL BUILDING BLOCK

CDR in Mercury Devices

This chapter discusses the design issues related to the CDR architectures. The

Lecture 160 Examples of CDR Circuits in CMOS (09/04/03) Page 160-1

Transmitting DDR Data Between LVDS and RocketIO CML Devices Author: Martin Kellermann

ZLAN-35 Applications of the ZL30406 and MT9046 SONET/SDH Linecard Solutions

INF4420 Phase locked loops

Features. Applications

MK LOW PHASE NOISE T1/E1 CLOCK GENERATOR. Features. Description. Block Diagram DATASHEET. Pullable Crystal

Features. EXTERNAL PULLABLE CRYSTAL (external loop filter) FREQUENCY MULTIPLYING PLL 2

3.3 VOLT COMMUNICATIONS CLOCK PLL MK Description. Features. Block Diagram DATASHEET

Dual Programmable Clock Generator

Low-Jitter, 8kHz Reference Clock Synthesizer Outputs MHz

MK VCXO-BASED FRAME CLOCK FREQUENCY TRANSLATOR. Features. Description. Block Diagram DATASHEET. Pullable Crystal

MK SPREAD SPECTRUM MULTIPLIER CLOCK. Description. Features. Block Diagram DATASHEET

MK SPREAD SPECTRUM MULTIPLIER CLOCK. Description. Features. Block Diagram DATASHEET

ICS507-01/02 PECL Clock Synthesizer

ICS663 PLL BUILDING BLOCK

Features. Applications

OSC2 Selector Guide appears at end of data sheet. Maxim Integrated Products 1

ICS663 PLL BUILDING BLOCK. Description. Features. Block Diagram DATASHEET

High quality standard frequency transfer

DS1267B Dual Digital Potentiometer

74F50729 Synchronizing dual D-type flip-flop with edge-triggered set and reset with metastable immune characteristics

MK3722 VCXO PLUS AUDIO CLOCK FOR STB. Description. Features. Block Diagram DATASHEET

ZL30111 POTS Line Card PLL

ECEN620: Network Theory Broadband Circuit Design Fall 2014

DS1868B Dual Digital Potentiometer

Ultrahigh Speed Phase/Frequency Discriminator AD9901

Dual-Rate Fibre Channel Repeaters

TOP VIEW. Maxim Integrated Products 1

TCS230 PROGRAMMABLE COLOR LIGHT TO FREQUENCY CONVERTER TAOS046 - FEBRUARY 2003

74F5074 Synchronizing dual D-type flip-flop/clock driver

All Digital VCXO Replacement for Gigabit Transceiver Applications (UltraScale FPGAs)

Features. Applications

Best Design and Layout Practices for SiTime Oscillators

Features VDD 2. 2 Clock Synthesis and Control Circuitry. Clock Buffer/ Crystal Oscillator GND

74VHC4046 CMOS Phase Lock Loop

ICS CLOCK SYNTHESIZER FOR PORTABLE SYSTEMS. Description. Features. Block Diagram PRELIMINARY DATASHEET

ISSN:

ICS LOW EMI CLOCK GENERATOR. Description. Features. Block Diagram DATASHEET

Features. Applications. Markets

XRT7295AE E3 (34.368Mbps) Integrated line Receiver

Digital Dual Mixer Time Difference for Sub-Nanosecond Time Synchronization in Ethernet

SY10EP33V/SY100EP33V. General Description. Features. Pin Configuration. Pin Description. 5V/3.3V, 4GHz, 4 PECL/LVPECL Divider.

MK2703 PLL AUDIO CLOCK SYNTHESIZER. Description. Features. Block Diagram DATASHEET

ICS LOW PHASE NOISE CLOCK MULTIPLIER. Features. Description. Block Diagram DATASHEET

Interfacing Virtex-6 FPGAs with 3.3V I/O Standards Author: Austin Tavares

ICS511 LOCO PLL CLOCK MULTIPLIER. Description. Features. Block Diagram DATASHEET

SY89871U. General Description. Features. Typical Performance. Applications

ICS CLOCK MULTIPLIER AND JITTER ATTENUATOR. Description. Features. Block Diagram DATASHEET

Phase-Locked Loop High-Performance Silicon-Gate CMOS

MK1413 MPEG AUDIO CLOCK SOURCE. Features. Description. Block Diagram DATASHEET

High Speed Clock Distribution Design Techniques for CDC 509/516/2509/2510/2516

MK2705 AUDIO CLOCK SOURCE. Description. Features. Block Diagram DATASHEET

Clock Recovery and Data Retiming Phase-Locked Loop AD800/AD802*

ICS502 LOCO PLL CLOCK MULTIPLIER. Description. Features. Block Diagram DATASHEET

SCG4540 Synchronous Clock Generators

SY10EL34/L SY100EL34/L

EVB /433MHz Transmitter Evaluation Board Description

Features. Truth Table (1)

ICS NETWORKING AND PCI CLOCK SOURCE. Description. Features. Block Diagram DATASHEET

Test Results: RocketIO MGTs with High- Speed Samtec QTE/QSE Connectors and EQCD-EQDP Cable Assemblies

PT7C4511. PLL Clock Multiplier. Features. Description. Pin Configuration. Pin Description

Integer-N Clock Translator for Wireline Communications AD9550

PCI-EXPRESS CLOCK SOURCE. Features

ICS QUAD PLL CLOCK SYNTHESIZER. Description. Features. Block Diagram PRELIMINARY DATASHEET

VS-751 VS-751. Dual Frequency VCSO. Description. Features. Applications. Block Diagram. Vcc COutput Output SAW 1 SAW 2. Vc FS Gnd

SERIALLY PROGRAMMABLE CLOCK SOURCE. Features

Maximum data rate: 50 MBaud Data rate range: ±15% Lock-in time: 1 bit

ICS NETWORKING CLOCK SYNTHESIZER. Description. Features. Block Diagram DATASHEET

Features. Applications. Markets

Integrated Circuit Design for High-Speed Frequency Synthesis

Features. Applications

AN1954 APPLICATION NOTE

ZL30100 T1/E1 System Synchronizer

ZLED7000 / ZLED7020 Application Note - Buck Converter LED Driver Applications

Features. Applications. Markets

SP623 IBERT Getting Started Guide (ISE 11.4) UG752 (v1.0.1) January 26, 2011

TDA7478. Single chip RDS demodulator. Features. Description

SY89847U. General Description. Functional Block Diagram. Applications. Markets

ICS LOW EMI CLOCK GENERATOR. Description. Features. Block Diagram DATASHEET

3.3 VOLT FRAME RATE COMMUNICATIONS PLL MK1574. Features. Description. Block Diagram DATASHEET

MT9046 T1/E1 System Synchronizer with Holdover

Spread Spectrum Frequency Timing Generator

FSK DEMODULATOR / TONE DECODER

LOCO PLL CLOCK MULTIPLIER. Features

MK3727D LOW COST 24 TO 36 MHZ 3.3 VOLT VCXO. Description. Features. Block Diagram DATASHEET

NOT RECOMMENDED FOR NEW DESIGNS. Features. Applications. Markets

Programmable Clock Generator

IDT5V60014 LOW PHASE NOISE ZERO DELAY BUFFER. Description. Features. Block Diagram DATASHEET

Obsolete Product(s) - Obsolete Product(s)

MIC5271. Applications. Low. output current). Zero-current off mode. and reduce power. GaAsFET bias Portable cameras. le enable pin, allowing the user

NETWORKING CLOCK SYNTHESIZER. Features

DATASHEET HSP Features. Description. Applications. Ordering Information. Block Diagram. Digital QPSK Demodulator. FN4162 Rev 3.

ICS276 TRIPLE PLL FIELD PROGRAMMABLE VCXO CLOCK SYNTHESIZER. Description. Features. Block Diagram DATASHEET

ICS722 LOW COST 27 MHZ 3.3 VOLT VCXO. Description. Features. Block Diagram DATASHEET

Introduction to CMOS RF Integrated Circuits Design

Transcription:

Application Note: Virtex-II Family XAPP250 (v1.3) September 19, 2003 Clock and Data ecovery With Coded Data Streams Author: Leonard Dieguez Summary This application note and reference design outline a method to implement clock and data recovery in Virtex -II devices. Although not limiting the implementation to a specific FPGA family, this reference design focuses on the Virtex-II architecture. With minor modifications, Clock and Data ecovery (CD) is possible with Virtex-E and Spartan -IIE devices. A implementation of CD at 270 Mb/s with 8B/10B coded data is described herein. Note: Designs not requiring a recovered clock should refer to a specific Data ecovery application note XAPP224. Introduction This application note describes Clock and Data recovery methods allowing a receiver to extract embedded clock information and retimed data from an incoming encoded data stream. Sometimes, the received clock is also used for onward data transmission. The speed of operation is limited by the maximum input clock frequency from an external and internal routing resources. The maximum operational speed is 420 MHz using a Virtex-II device (-5 speed grade). Figure 1 shows a CD primitive. Data ef. CD Primitive Internal Interface External Interface Figure 1: CD Primitive ecovered etimed DATA Loop Filter x250_01_012502 If a recovered clock is not required in a design, then XAPP224 (Data ecovery) is more appropriate. System requirements are as follows: Clock and data must be coded into a single data stream. This method is proven using 8B/10B coded data. A reference oscillator The availability of four FPGA pins in close proximity (two input LVDS pins and two output CMOS pins) An external Voltage Controlled Oscillator () A block diagram describing the system is illustrated in Figure 2. In practice, any or VCXO can be used. As an example, a Maxim was chosen. The Maxim 2605-2609 devices, operating in frequency ranges from 45 MHz to 650 MHz, come in a SOT-23 6-pin package. These integrated s have tuning diodes and differential outputs. The only external circuit components are a tuning inductor, a bypass capacitor, and an output matching network. The goal is to have a trimless phase-locked loop (PLL) design operating across temperature and 2003 Xilinx, Inc. All rights reserved. All Xilinx trademarks, registered trademarks, patents, and further disclaimers are as listed at http://www.xilinx.com/legal.htm. All other trademarks and registered trademarks are the property of their respective owners. All specifications are subject to change without notice. NOTICE OF DISCLAIME: Xilinx is providing this design, code, or information "as is." By providing the design, code, or information as one possible implementation of this feature, application, or standard, Xilinx makes no representation that this implementation is free from any claims of infringement. You are responsible for obtaining any rights you may require for your implementation. Xilinx expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation, including but not limited to any warranties or representations that this implementation is free from claims of infringement and any implied warranties of merchantability or fitness for a particular purpose. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 1

CD Function device variations. Working knowledge of PLL function, design, and implementation are important when using the accompanying reference design. FPGA ASSP Data Encoder Serializer TX_p TX_n X_p X_n CD Primitive X_p X_n TX_p TX_n ef Osc LPF ef Osc x250_02_051403 Figure 2: CD In Virtex-II Devices CD Function The clock and data recovery circuit shown in Figure 2 includes a delay-line phase detector, a standard phase and frequency detector (PFD), a, a loop filter, and a control circuit. The PFD is used to lock the output signal to the reference clock. Normally the reference clock is a sub-multiple of the bit rate. Therefore, a divided down version of the clock is used for the comparison. Once the is locked to the approximate bit-rate frequency as defined by the reference clock using a simple PFD (see 3-State Phase Detector ), the logic circuitry switches the correction values to the inputs of the delay line phase frequency detector (DLPFD). The DLLPFD further adjusts the to match the exact frequency of the received data rate. CD Architecture The Figure 3 illustrates the typical block diagram for implementing a PLL. The basic blocks for a PLL are: Phase detector Loop filter Voltage controlled oscillator Counters ef Divide by D Phase Detector Kφ Loop Filter Voltage Controlled Oscillator DATA Divide by M Clock Figure 3: PLL Block Diagram x250_03_040102 2 www.xilinx.com XAPP250 (v1.3) September 19, 2003

CD Architecture Phase Detectors A combination of a 3-state phase frequency detector and a delay line phase detector are used in this design for clock recovery and data synchronization. There are two phase frequency detectors (PFDs) in the phase detector block. One PFD compares the phase and frequency of the to the reference clock. Once the is locked to the reference, the data input rate and the rate should be within a small known difference (approximately 200 ppm from each other). The second PFD, the delay line PFD, further adjusts the to lock to the data stream. Logic is used to determine when the is locked to the reference and when data is present. If both conditions are met, then the second PFD is used to match the to the data rate. The DLPFD is used to match the to the datastream. 3-State Phase Detector The 3-state phase detector is used because it is simple, has a linear range of ±2π radians (at the comparison frequency), and acts as both phase and frequency detector (PFD). A state diagram for the circuit is shown in Figure 4. State 1 ef State 2 ef State 3 up 0 dn 1 up 0 dn 0 up 1 dn 0 Figure 4: State Diagram for a 3-State PFD ef x250_04_040102 One implementation of the 3-state PFD is shown in Figure 5. State 2 is the assumed initial state (both up and down are zero). A rising edge on the reference causes "up" to be asserted, therefore, forcing a transition to the third state. Then when a rising edge of occurs, both up and down are high for an instant. After the gate propagation delay, the registers are both reset. The PFD is now in state 2. The maximum useful frequency for this PFD is limited by the minimum duration of state 2. This PFD is not sensitive to the duty cycle of the or the reference oscillator. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 3

CD Architecture V CC D Q is Faster (Down) V CC D Q is Slower (Up) ef ef is Faster is Slower Figure 5: 3-State Phase-Frequency Detector x250_05_040102 When the is running at a faster frequency or is leading the reference frequency in phase and needs to be slowed down or delayed, is indicated by a signal " is Faster". A " is Slower" signal indicates a slower than the reference frequency. The phase detector gain is the following: V K H V L D ------------------- 2π Delay Line Phase Detector The delay line phase detector is composed of three main blocks: Delay line egisters on the outputs of the delay line Phase encoder. The two basic techniques for detecting the phase between the output and the input data are: 1. Pass the data through a delay line. Then sample the delayed elements with the. 2. Pass the clock through a delay line. Then sample the delayed elements with the DATA from the IOB. 4 www.xilinx.com XAPP250 (v1.3) September 19, 2003

CD Architecture The application note covers the first method. The sampled delay line is shown in Figure 6. From IOB through Delay Chain Tap Adjust to force transition to occur in the center of delay elements Delayed Data Bit Stream d1 d1 d1 d1 d0 d0 d0 d0 d0 Clock from Figure 6: Sampled Delay Line Last Data Tap x250_06_012502 After the PLL has achieved lock to the reference oscillator, control circuitry attempts to recover the clock from coded data. Although other methods can be used, this application note uses 8B/10B encoded data streams. 8B/10B coded data has an NZ format (i.e., there may be several bit times with no transitions). With 8B/10B coded data, the maximum number of bit times without transitions (maximum run length) is limited to five. The data stream is described as a reference clock with missing transitions (a punched clock). A data stream that only transitions once during a bit time is a single data rate (SD) signal. This makes the data stream appear as a half-rate clock when an alternating one/zero pattern is present. General architecture used for the delay line phase detector is depicted in Figure 7. The delay line phase detector is similar to a quadrature phase detector because it outputs a frequency error by detecting phase slippage between the reference clock and the data.the delay line phase detector separates the phase differences in discrete intervals. In a Virtex-II or Virtex-II Pro design, a "MUXCY" carry chain is utilized for the discrete delay elements. The phase detector provides the following functions. Detects if a data transition occurred within the current sample period. Produces a phase error output. Produces the retimed DATA output. The delay line should have a delay of greater than one period, but not greater than two periods. The phase detector adjusts the causing it to align the data transition to the center of the delay line. Outputs from the delay line are registered twice to remove any metastability. The MUXCY carry chain is used for a delay line in this application note. Entry to the MUXCY carry chain is at the bottom of the die. Therefore the data input should be placed at the bottom or near the bottom to keep routing from the pin to the carry chain to a minimum. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 5

CD Architecture Clock Leads Delay Line Double egister Weighted Phase Encoder Clock Lags Control Data Clock is Fast Frequency Detector Clock is Slow Internal External Voltage Controlled Oscillator Loop Filter Figure 7: Delay Line Phase Detector x250_07_021102 Data Transition Detection Detection of data transitions for the current sample time can be accomplished by comparing strategically spaced sample points on the delay line. The sample points should be close enough to the adjacent sample point to guarantee that two transitions cannot occur. The sample points would be equal (all ones or all zeros) for sample time periods with no data transitions. A clock enable signal is constructed from the comparison of the sample points. The phase error signal is only updated when valid transitions occur in the data stream. Multiple Data Transition Detection The delay line phase detector should be designed for a maximum of two data transitions are allowed to occur in the delay line. A filtering mechanism is employed allowing the use of only one of the data transitions for phase error calculations. For example, if two data transitions are detected at both the beginning and the end of the delay line, a phase correction is input to the such that the phase of one transition is forced to the center of the delay line. The transition selected depends on the last known phase or whether the is running a faster or slower frequency than the nominal bit rate frequency. The example given in this application note does not use the frequency error input from the delay line phase detector. In this application note the multiple transitions are avoided by only using the rising edges of the data for phase correction. Phase Error Output The phase error output is decoded in order to indicate the relative number of delay elements from the center of the delay line. Phase errors close to the center of the taped delay line indicate small phase errors and, hence, smaller corrections are needed. Phase errors further from the center of the taped delay line indicate larger corrections are needed. See Figure 8. 6 www.xilinx.com XAPP250 (v1.3) September 19, 2003

CD Architecture Phase Difference Lead/Lag Correction Figure 8: Phase Error Output x250_08_040102 This application note uses phase accumulators to integrate phase noise over an update period of time. This is accomplished with two counters where the increments are adjusted by the amount of phase error. One counter is used for lead phase errors and the other is used for lag phase errors. etimed Data Output A tap at the center of the delay line is sampled with the register clocked by the opposite edge of the clock source. This ensures that the sampling of the data is 180 out of phase with the jitter present on the data signal. In practice, the jitter tolerance of the CD system above the loop filter roll off frequency is 0.6 UI. See Figure 9. Center delay element DATA D Q D Q D Q D Q D Q DCO e-timed Data Figure 9: etimed Data x250_09_040102 External Voltage Controlled Oscillator Although this design uses the MAX2605-2609 for the external, any other device with the same functionality can be substituted. The MAX2605-2609 was chosen because it is low cost, contains an integrated tuning diode, is available in a small package (SOT23-6), produces low phase noise, and improves noise immunity by placement physically away from the FPGA. The footprint of the external solution is extremely small. Figure 10 shows the basic configuration for using an external. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 7

CD Architecture V CC 3.3V L1 1 U1 IND OUT+ 6 L2 2 GND V CC 5 C5 GND C1 3 4 TUNE OUT- MAX2605-2609 L3 C3 3 GND Differential Input (LVDS) + - CONTOL VOLTAGE C4 1 UP 4 C2 2 DOWN CD Phase Detector EF DATAIN GND FPGA ecovered etimed DATA Figure 10: External Configuration with Passive Loop Filter x250_10_051503 Passive Loop Filter The loop filter described in this section is a passive-lag loop filter. The designer is encouraged to explore using an active loop filter. To quote Gardner from Phaselock Techniques [1], "Better performance almost always will be obtained through use of an active filter." Assume the transmission of the data stream is made with a stable 100 ppm crystal oscillator when selecting devices to build the loop filter. The design only has to track temperature variations in a noisy environment. Figure 11 depicts the loop filter used. 1 V i 2 V 0 C GND Figure 11: Loop Filter x250_11_040101 8 www.xilinx.com XAPP250 (v1.3) September 19, 2003

CD Architecture The transfer function F(s) is given by: Fs ( ) 1 + sτ 2 --------------------------------------- + ( + ) 1 s τ 1 τ 2 If τ 2 is much smaller than τ 1, the following approximation can be used: Fs ( ) 1 + sτ 2 -------------------- 1 + sτ 1 τ 1 ( 1 + 2 )C τ 2 2 C Active Loop Filters The PLL bandwidth is determined by: ω3db K d K h K o K Where K d is the gain of the phase detector, K h is the high-frequency gain of the loop filter and K o is the gain of the or VCXO. A large DC gain in the loop filter is desirable. For a passive loop filter, the maximum gain is unity. The DC gain for the active loop filter shown in Figure 12, the gain is essentially infinite. 2 C DOWN 1A 1A OUT C C TLC2272A C C UP 1A 1A 2 C C C Figure 12: Active Loop Filter x250_12_091203 Design Example This design example is needed to track temperature related voltage changes. Normally these changes occur over long periods of time. The components were chosen to give an over damped response and a cut off frequency greater than a factor of 10 below the comparision frequency. A damping factor (ζ) of 0.707 is considered to be critically damped while values over 0.707 are considered to be overdamped. An overdamped response was chosen to avoid frequency ringing or hunting. In this design, the comparison frequency (1 MHz) is greater than 10 times the cutoff frequency (ω n 15.1K ad/sec), providing adequate filtering for the PLL operation. This design example values are not intended to restrict the designer to a set of parameters. ather, component values chosen are easy to obtain for the SMT footprints and also produce the desired results. The Xilinx SDV demo board has this design example implemented on it. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 9

eference Design 1 10.2Ω 2 1KΩ C 0.1µF K o 6 125.6 10 K d 3 5 10 τ 1 6 1020 10 τ 2 6 100 10 ω n 3 15.1 10 ζ 0.75 Where K o is the gain: ω 2π 20MHz K o ----------- --------------------------------- V C 1Volt K OEFF K o ------ N N 270 for a comparison frequency of 1 MHz. K d is the PD gain: V K H V L d -------------------- 2π 3.3 0 ---------------- 2π The natural frequency of the loop is: ω n K o K -------------- d τ 1 The damping factor is: 1 ζ -- 2 K o K d -------------- τ 1 1 τ 2 + -------------- K o K d eference Design Conclusion The VHDL and Verilog versions of the reference design is available on the Xilinx web site at http://direct.xilinx.com/bvdocs/appnotes/xapp250.zip. Virtex-II devices are used for performing CD functions by extracting DATA and CLOCK from encoded serial bit streams. A Virtex-E device can run at link speeds up to 200 Mb/s (SD rates) and a Virtex-II or Virtex-II Pro device can run at 400 Mb/s with additional components added to the board. 10 www.xilinx.com XAPP250 (v1.3) September 19, 2003

eferences eferences 1. Floyd M. Gardner, Phaselock Techniques, 2nd Edition, August 1979, John Wiley & Sons, ISBN 0-471-04294-3, page 92. 2. Dan H. Wolaver, Phase-Locked Loop Circuit Design, 1991 Prentice Hall, ISBN 0-13- 662743-9, Chapter 3. evision History The following table shows the revision history for this document. Date Version evision 04/01/02 1.0 Initial Xilinx release. 04/25/02 1.1 Corrected equation for τ 1 on page 8. 09/12/03 1.2 Added new section on Active Loop Filters. Clarified CD Function. 09/19/03 1.3 Added new section on Active Loop Filters. Clarified CD Function. XAPP250 (v1.3) September 19, 2003 www.xilinx.com 11