Documente Academic
Documente Profesional
Documente Cultură
This application note describes how to implement deterministic latency for Common
Public Radio Interface (CPRI) and Open Base Station Architecture Initiative Reference
Point 3-01 (OBSAI RP3-01) protocols with transceivers in Stratix® IV, HardCopy® IV,
Arria® II GX, and Cyclone® IV devices. It also describes the transceiver configuration
and clocking scheme to implement deterministic latency. You can create your
proprietary CPRI, OBSAI RP3-01, or other interfaces requiring deterministic latency
designs based on the implementation descriptions in this application note.
The CPRI and OBSAI RP3-01 are point-to-point, high-speed serial interfaces in
wireless applications for connecting base station component and remote radio heads.
Figure 1 shows various CPRI topologies. Fundamentally, CPRI connects between a
radio equipment controller (REC) and radio equipment (RE) modules (in single-hop
connections). For high bandwidth, multiple REs can be chained to a single REC (in
multi-hop connections), with CPRI links between the RE modules. The REC port is
always the master port and the RE is the slave port for links between REC and RE.
For links between REs, the port nearest to REC is the master.
RE
RE
RE
Ring
RE
RE
RE
RE
RE
Chain RE
Point-to Point
RE
The CPRI and OBSAI RP3-01 specifications have stringent requirements concerning
the accuracy of round-trip delay measurements that the system must make. For
example, the CPRI specification requires that the round-trip delay measurement
accuracy, excluding the cable, must be within ± 16.276 ns for single-hop and
multi-hop connections. In multi-hop connections, the allowed delay uncertainty is
accumulated over the number of hops in the connection.
To speed development time, Altera offers the complete easy-to-use intellectual
property (IP) core for building a CPRI v4.1 that includes the transceiver.
f For more information about the Altera ® CPRI IP solution, refer to the Altera CPRI IP.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 2 Transceiver Support for CPRI and OBSAI RP3-01 Applications
Table 1. Supported Data Rates for CPRI and OBSAI RP3-01 Implementations (Note 1)
Data Rate
Protocol (Mbps) Stratix IV HardCopy IV Arria II GX Cyclone IV
614.4 v v v v
1228.8 v v v v
2457.6 v v v v
CPRI
3072 v v v v
4915.2 v v v —
6144 v v v —
768 v v v v
1536 v v v v
OBSAI RP3-01
3072 v v v v
6144 v v v —
Note to Table 1:
(1) To implement deterministic latency on other proprietary protocols, refer to the respective device family data sheet
on the supported data rate.
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Implementing Deterministic Latency for CPRI and OBSAI RP3-01 Interfaces Page 3
REC RE #1 RE #2
CPRI
User User User
PD PD PD
Logic Logic Logic
Sync Rx Tx Sync Rx Tx
Buffer Buffer
PD PD
Use the Deterministic Latency functional mode on the transceiver channels. In this
mode, the transmitter channel is configured with no delay uncertainty, and with
datapath latency fixed relative to the core fabric interface clock (on the tx_clkout
port). The transmitter channel datapath latency can be fixed relative to the transmitter
phase-locked loop (PLL) input reference clock (on the pll_inclk port) by enabling
the PLL phase frequency detector (PFD) feedback. Using the PLL PFD feedback
simplifies port implementations in remote radio heads, effectively eliminating the
need for additional logic in the core fabric to implement a synchronization buffer with
a phase detector.
The requirement for port implementations in remote radio heads without PLL PFD
feedback is discussed in “Interface Clocking” on page 9. The phase detector
implementation is discussed in “Phase Detector Logic” on page 11.
1 In CPRI, PLL PFD feedback is optional for REC port implementation. Altera
recommends enabling the PLL PFD feedback for RE port implementation to simplify
your interface design.
For the receiver, the channel datapath is configured with no latency uncertainty. The
latency variation from the link synchronization function (in the word aligner block) is
deterministic with the rx_bitslipboundaryselectout port. You can optionally
fix the round trip transceiver latency for port implementation in the remote radio
head to compensate the latency variation in the word aligner block using the
tx_bitslipboundaryselect port. The tx_bitslipboundaryselect port is
available to control the amount of bits to be slipped in the transmitter serial data
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 4 Implementing Deterministic Latency for CPRI and OBSAI RP3-01
stream. You can optionally use the tx_bitslipboundaryselect port to round the
round-trip latency to a whole number of cycles. Using the byte deserializer in the
transceiver requires you to create additional logic in the core fabric to determine if the
comma byte is received in the lower or upper byte of the word. The delay is
dependent on which word the comma byte appears in.
The total transmitter and receiver channel datapath latencies are computed as follows:
■ Total transmitter channel datapath latency = transmitter fixed latency +
tx_bitslipboundaryselect delay
■ Total receiver channel datapath latency = receiver fixed latency +
rx_bitslipboundaryselectout delay + byte deserializer delay
Figure 3 shows the transceiver configuration in Deterministic Latency mode. In the
receiver channel, the recovered clock is available in the core fabric to capture receiver
data from the rx_dataout port. The ×1 (single) and ×4 (bonded) channel
configurations are supported in this mode.
tx_dataout
Serializer
TX Phase
Byte Serializer
Compensation 8B/10B Encoder
FIFO (1)
Serial Clock
High-Speed
/2
tx_clkout Low-Speed Parallel Clock
PIPE Interface
PCIe hard IP
Deskew FIFO
Word Aligner
Deserializer
rx_datain
RX Phase
FIFO (1)
CDR
/2 Parallel
rx_clkout Parallel Recovered Clock Recovered Clock
Note to Figure 3:
(1) The TX and RX phase compensation FIFOs are configured to register mode.
1 Physical layer functions required for CPRI, OBSAI RP3-01, or other protocols not
offered in the transceiver must be implemented in user logics.
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Transceiver Channel Instantiation Page 5
Table 2 lists the transceiver configurations for the supported CPRI and OBSAI
RP3-01 data rates.
Table 2. FPGA Fabric-Transceiver Interface Clock Rates for Supported Line Rates and Channel Widths
Stratix IV/HardCopy IV Interface Clock Arria II GX Interface Clock Cyclone IV Interface
Rates (MHz) Rates (MHz) Clock Rates (MHz
Line Rate
Protocol
(Mbps) Channel Width (1) Channel Width (1) Channel Width (1)
8/10 16/20 (2) 32/40 (3) 8/10 16/20 (2) 8/10 16/20 (4)
614.4 61.44 30.72 (4) — 61.44 30.72 (4) 61.44 30.72
1228.8 122.88 61.44 30.72 122.88 61.44 122.88 61.44
2457.6 245.76 122.88 61.44 — 122.88 — 122.88
CPRI
3072 — 153.6 76.8 — 153.6 — 153.6
4915.2 — 245.76 (5) 122.88 — 245.76 (5) — —
6144 — — 153.6 — 307.2 (5) — —
768 76.8 38.4 — 76.8 38.4 (4) 76.8 38.4
1536 153.6 76.8 38.4 (4) 153.6 76.8 153.6 76.8
OBSAI RP3
3072 — 153.6 76.8 — 153.6 — 153.6
6144 — — 153.6 — 307.2 (5) — —
Notes to Table 2:
(1) The 8/16/32 bit channel widths are supported with 8B/10B encoder/decoder and the 10/20/40 bits without 8B1/0B encoder/decoder. The ALTGX
megafunction automatically enables the 8B/10B encoder/decoder according to the channel width selection.
(2) Supported in double-width mode or with the byte serializer/deserializer block.
(3) Supported in double-width mode and with the byte serializer/deserializer block.
(4) Supported with the byte serializer/deserializer block only.
(5) Supported in double-width mode only.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 6 Transceiver Channel Instantiation
For supported transceiver configurations at desired data rates for the CPRI
and OBSAI RP3-01 interfaces, refer to Table 2.
3. In the PLL/Ports tab, select Enable PLL phase frequency detector (PFD) feedback
to compensate latency uncertainty in the Tx dataout and Tx clkout paths relative
to the reference clock option.
1 To select the PLL PFD feedback option, the input clock frequency
(provided to pll_inclk) must be the same as the transmitter interface
clock frequency (on the tx_clkout port). In this example, the pll_inclk
frequency of 153.6 MHz is the same as the tx_clkout frequency (as listed
in Table 2).
1 The PLL PFD feedback is not supported when using the ATX PLL in
Stratix IV and HardCopy IV devices.
4. In the Ports/Calibration tab, ensure that the Enable TX Phase Comp FIFO in
register mode option is checked. If you uncheck it, the FIFO contributes one or
two clock cycles of latency uncertainty.
5. In the Word Aligner tab, select the Use manual word alignment mode option to
control the word aligner operation using the rx_enapatternalign port.
f For additional information about the options and settings in the ALTGX
MegaWizard Plug-In Manager interface, refer to the ALGX Transceiver
Setup Guide in volume 3 of the Stratix IV Device Handbook.
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Input Reference Clocks and Transmit Side Clock Generation Page 7
REC RE
RE #1
#1 RE #2
rx_clkout rx_clkout
Note to Figure 4:
(1) The input clock ports shown in the diagram are applicable for Stratix IV, HardCopy IV, and Arria II GX devices only.
For the REC, use a common input reference clock source for the transmitter PLL and
the CDR. In any RE, send the receiver recovered clock from the slave port to an
external clean-up PLL before feeding into the transmitter PLL input reference clocks
of the slave port and master port (in a multi-hop connection). The external clean-up
PLL is required to reduce the phase noise of the receiver recovered clock.
Use the following guidelines when selecting the appropriate external clean-up PLL
for port implementation in RE:
■ Choose an external cleanup PLL device with a sufficient input and output
frequency range to handle auto-rate negotiation scenarios in your application.
■ The output clock from the clean-up PLL must meet the TX REFCLK phase noise
requirement as specified in respective device family data sheets. An example of a
suitable clean-up PLL device for such implementation is the CDCL6010 from
Texas Instruments.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 8 Input Reference Clocks and Transmit Side Clock Generation
Use any of the supported input reference clocking methods to the transmitter PLL and
the CDR.
f For details about supported input reference clocking methods in each device family,
refer to the following documents:
Figure 5. Transmit Side Clock Generation and CDR Clocking for Multi-Hop RE using Cyclone IV GX
Device with PLL PFD Feedback Enabled (Note 1)
MPLL_6
Ch 3 Tx
Ch 3 Rx
Ch 2 Tx
Ch 2 Rx
Transceiver
Block GXBL0
Ch 1 Tx (Master)
High and Low-Speed Clocks
CDR Clocks
Ch 1 Rx (Master)
Ch 0 Tx (Slave)
Ch 0 Rx (Slave)
MPLL_5 GPLL_1
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Interface Clocking Page 9
Interface Clocking
This section explains the core fabric-transceiver interface clocking requirements.
The clocking requirements are dependent on PLL PFD feedback usage and core
fabric-transceiver interface clock frequency.
The PLL PFD feedback enables the transmitter channel datapath latency to be fixed
relative to the input reference clock on the pll_inclk port by ensuring a
deterministic path between clocks from the tx_clkout and pll_inclk ports. Use
the clock from the pll_inclk port to clock core registers sending data to the
transmitter channel as shown in Figure 6.
Figure 6. Core Fabric-Transmitter Interface Clocking with the PLL PFD Feedback (Note 1)
reference clock source
pll_inclk
tx_reg tx_pipereg
D Q D Q tx_datain/tx_ctrlenable
tx_dataout
ALTGX
tx_clkout
Note to Figure 6:
(1) Registers in the shaded block are optionally used to achieve timing closure.
Without the PLL PFD feedback, the transmitter channel datapath latency is fixed
relative to the interface clock on the tx_clkout port. Use the clock from the
tx_clkout port to clock core registers sending data to the transmitter channel as
shown in Figure 7.
1 Without the PLL PFD feedback, delay uncertainty exists between clocks from the
tx_clkout and pll_inclk ports.
Figure 7. Core Fabric-Transmitter Interface Clocking without the PLL PFD Feedback (Note 1)
Notes to Figure 7:
(1) Registers in the shaded block are optionally used to achieve timing closure.
(2) Additional timing constraint is required when the tx_pipereg2 registers are used.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 10 Interface Clocking
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Phase Detector Logic Page 11
rx_reg (1)
Q D rx_dataout/rx_ctrldetect
ALTGX
rx_clkout
For details about the methods described for scenarios on the transmitter channel
without PLL PFD feedback and receiver channel, refer to AN 580: Achieving Timing
Closure in Basic (PMA Direct) Functional Mode.
1 Use the described methods to meet the core fabric-transceiver interface timing
requirement only if you are not able to achieve timing when interfacing core registers
to the transmitter and receiver channels. Each stage of pipeline registers adds a
latency of one clock cycle to the transmit datapath.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 12 Phase Detector Logic
rx_clkout D Q D Q Q D Q D tx_clkout
measure_clk
Phase Offset
rx_clkout_phase_offs
PLL PLL Phase Shift Comparator
State Machine
Phase Offset
tx_clkout_phase_offs
Comparator
phase of measure_clk
reference_clk
f For details about implementing dynamic phase shifting in Stratix IV, HardCopy IV,
and Arria II GX devices, refer to the PLL Dynamic Phase Shifting in the Quartus II
Software section of AN 454: Implementing PLL Reconfiguration in Stratix III and Stratix IV
Devices. For Cyclone IV devices, refer to the Implementing PLL Dynamic Phase Shifting
in Quartus II Software section in AN 507: Implementing PLL Reconfiguration in Cyclone III
Devices.
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Design Considerations for Auto-Rate Negotiation Page 13
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 14 Design Considerations for Auto-Rate Negotiation
Table 3. Auto-Rate Negotiation Implementation Scenarios using Stratix IV, HardCopy IV, and Arria II GX Devices
(Part 1 of 2)
Scenarios Channel Utilization Reconfiguration Option Details
Dedicated CMU PLL Up to two independent Channel and CMU PLL ■ Perform negotiation to the desired data rate
per channel ×1 duplex channels in reconfiguration by reconfiguring the specific receiver
a transceiver block, channel and CMU PLL (affecting the
with each channel transmitter only).
using a dedicated ■ Supports PLL PFD feedback for each
CMU PLL transmitter channel. Ensure that the input
reference clock frequency is the same as the
clock from the tx_clkout port at each
reconfigured data rate.
Shared CMU PLL Up to four independent Channel and CMU PLL Perform negotiation to the desired data rate by
(without PLL PFD ×1 duplex channels in reconfiguration reconfiguring the specific receiver channel.
feedback path a transceiver block, Data rate division in TX ■ Perform negotiation to related data rates (in
support) with the channels multiples of /1, /2 or /4 of each other) by
sharing one or two reconfiguring the TX local clock divider of
CMUs the specific transmitter channel.
For example:
From 4915.2 Mbps to 2457.6 Mbps,
or 1228.8 Mbps
From 6144 Mbps to 3072 Mbps
■ Enable the channels to share the same CMU
PLL and perform negotiation independently
without affecting each other while listening
to the same CMU PLL.
Channel Perform negotiation to the unrelated data rates
reconfiguration with TX (not in multiples of /1, /2, or /4 of each other)
PLL select by reconfiguring the specific transmitter
channel to select clocks from another CMU
PLL. For example:
From 6144 Mbps to 4915.2 Mbps
From 4915.2 Mbps to 3072 Mbps
■ Uses two CMUs—one with the initial line
rate clock settings and the other with the
negotiated lower line rate clock settings.
■ Reconfiguration at the specific transmitter
channel does not affect the other channels
that listen to either of the CMU PLLs.
■ Use with Data rate division in TX
reconfiguration option for greater
negotiation flexibility.
For example:
From 6144 Mbps to 4915.2 Mbps, then to
3072 Mbps
From 4915.2 Mbps to 3072 Mbps, then to
2457.6 Mbps
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Design Considerations for Auto-Rate Negotiation Page 15
Table 3. Auto-Rate Negotiation Implementation Scenarios using Stratix IV, HardCopy IV, and Arria II GX Devices
(Part 2 of 2)
Scenarios Channel Utilization Reconfiguration Option Details
Shared CMU PLL Four duplex channels Channel and CMU PLL Perform negotiation to the desired line rate by
(with PLL PFD bundled in (×4) reconfiguration reconfiguring the specific receiver channel. Do
feedback support) bonded mode, with all not implement over-sampling logic on the
channels sharing receiver datapath.
CMU0PLL Implement ■ Implement variable over-sampling (sending
over-sampling in your the same bit multiple times) in the user logic
user logic at each transmitter path with the CMU0 PLL
clock settings at the highest data rate
intended for the device.
■ Implement 8B/10B encoding in the user
logic—selects 10/20/40 bits channel width
to bypass the 8B/10B encoder in transceiver.
■ Perform negotiation to the data rates that are
multiples of each other (/2, /4, or even /8) by
enabling the appropriate over-sampling path
in the user logic.
■ Negotiation at a specific transmitter channel
does not affect other channels in the bundle.
■ Supports the PLL PFD feedback path for
each transmitter, compensating transmitter
uncertainty in the four bonded channels at
the same time to the CMU0 PLL.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 16 Design Considerations for Auto-Rate Negotiation
AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices © July 2010 Altera Corporation
Summary Page 17
Summary
In this application note, transceiver configuration and clocking schemes to implement
deterministic latency for CPRI and OBSAI RP3-01 protocols with transceivers in
Stratix IV, HardCopy IV, Arria II GX and Cyclone IV devices are discussed. You can
create your proprietary CPRI, OBSAI RP3-01, or other interfaces requiring
deterministic latency designs based on the described implementations.
© July 2010 Altera Corporation AN 610: Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Document Revision History
Copyright © 2010 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized
Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service
marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other
countries. All other product or service names are the property of their respective holders. Altera products are protected
101 Innovation Drive under numerous U.S. and foreign patents and pending applications, maskwork rights, and copyrights. Altera warrants
San Jose, CA 95134 performance of its semiconductor products to current specifications in accordance with Altera's standard warranty,
www.altera.com but reserves the right to make changes to any products and services at any time without notice. Altera assumes no
Technical Support responsibility or liability arising out of the application or use of any information, product, or service
www.altera.com/support described herein except as expressly agreed to in writing by Altera Corporation. Altera customers are
advised to obtain the latest version of device specifications before relying on any published
information and before placing orders for products or services .