An 610
An 610
This application note describes the transceiver configuration and clocking scheme to
implement deterministic latency, and how you can implement deterministic latency
with the transceivers in the Stratix® IV, HardCopy® IV, Arria® II, and Cyclone® IV
devices for the following protocols :
■ Common Public Radio Interface (CPRI)
■ Open Base Station Architecture Initiative Reference Point 3-01 (OBSAI RP3-01)
Based on the implementation in this application note, you can create your designs for
proprietary CPRI, OBSAI RP3-01, or other interfaces requiring deterministic latency.
This application note covers the following topics:
■ “Overview of the CPRI and OBSAI RP3-01 Protocols” on page 1
■ “Transceiver Support for CPRI and OBSAI RP3-01 Applications” on page 2
■ “Implementing Deterministic Latency for CPRI and OBSAI RP3-01 Interfaces” on
page 3
■ “Transceiver Channel Instantiation” on page 5
■ “Input Reference Clocks and Transmit Side Clock Generation” on page 6
■ “Interface Clocking” on page 9
■ “Phase Detector Logic” on page 11
■ “Design Considerations for Auto-Rate Negotiation” on page 13
© 2016 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, HARDCOPY, MAX, MEGACORE, NIOS,
QUARTUS and STRATIX are Reg. U.S. Pat. & Tm. Off. and/or trademarks of Altera Corporation in the U.S. and other countries.
All other trademarks and service marks are the property of their respective holders as described at
www.altera.com/common/legal.html. Altera warrants performance of its semiconductor products to current specifications in
101 Innovation Drive accordance with Altera’s standard warranty, but reserves the right to make changes to any products and services at any time
without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or
San Jose, CA 95134 service described herein except as expressly agreed to in writing by Altera. 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.
www.altera.com
Subscribe
Page 2 Transceiver Support for CPRI and OBSAI RP3-01 Applications
RE
RE
RE
Ring
RE
RE
Tree and Branch RE
REC
RE
RE Point-to-Point
Chain RE
RE
In the CPRI and OBSAI RP3-01 specifications, the requirements for the accuracy of
round-trip delay measurements is stringent. For example, in the CPRI specification,
the round-trip delay measurement accuracy—excluding the cable—must be within
16.276 ns for single- and multi-hop connections. In multi-hop connections, the
allowed delay uncertainty is accumulated over the number of hops in the connection.
To reduce your development time, Altera offers a complete and easy to use
intellectual property (IP) core for building a CPRI v4.1 system that includes the
transceiver.
f For more information about the Altera® CPRI IP solution, refer to the Altera CPRI IP
web page.
Table 1. Supported Data Rates for CPRI and OBSAI RP3-01 Implementations (Part 1 of 2)
Data Rate
Protocol Stratix IV HardCopy IV Arria II Cyclone IV
(Mbps)
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 —
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Implementing Deterministic Latency for CPRI and OBSAI RP3-01 Interfaces Page 3
Table 1. Supported Data Rates for CPRI and OBSAI RP3-01 Implementations (Part 2 of 2)
Data Rate
Protocol Stratix IV HardCopy IV Arria II Cyclone IV
(Mbps)
768 v v v v
1536 v v v v
OBSAI RP3-01
3072 v v v v
6144 v v v —
1 For information about the supported data rate for implementing deterministic latency
on other proprietary protocols, refer to the respective device family datasheet.
REC RE #1 RE #2
Transceiver Transceiver Transceiver Transceiver
Channel Channel (1) (1) Channel Channel (1)
(Master) (Slave) Sync Sync (Master) (Slave) Sync
Buffer Buffer Buffer
TX RX TX RX
PD PD PD
CPRI
CPRI
Note to Figure 2:
(1) The synchronization buffer with phase detector is not required for transceiver implementation with PLL PFD feedback.
On the transceiver channels, use the Deterministic Latency functional mode. In this
mode, the transmitter channel is configured without delay uncertainty. On the
tx_clkout port, the datapath latency is fixed relative to the core fabric interface clock.
To fix the transmitter channel datapath latency relative to the transmitter
phase-locked loop (PLL) input reference clock on the pll_inclk port, enable 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 for implementing a synchronization buffer with a
phase detector.
For information about the port implementations requirement in remote radio heads
without PLL PFD feedback, refer to “Interface Clocking” on page 9. For information
about the phase detector implementation, refer to “Phase Detector Logic” on page 11.
1 In CPRI, the PLL PFD feedback is optional for REC port implementation. To simplify
your interface design, Altera recommends that you enable the PLL PFD feedback for
RE port implementation.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 4 Implementing Deterministic Latency for CPRI and OBSAI RP3-01 Interfaces
For the receiver, the channel datapath is configured without latency uncertainty. In the
word aligner block, the latency variation from the link synchronization function is
deterministic with the rx_bitslipboundaryselectout port.
Optionally, you can 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
stream.
You can also use the tx_bitslipboundaryselect port to round up to a whole number
the round-trip latency cycles. If you use the byte deserializer in the transceiver, you
must 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.
The total transmitter and receiver channel datapath latencies are computed using the
following equations:
■ 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 the Deterministic Latency mode. In
the receiver channel, the recovered clock is available in the core fabric to capture the
receiver data from the rx_dataout port. The x1 single and x4 bonded channel
configurations are supported in this mode.
tx_dataout
Serializer
TX Phase
Byte Serializer
Compensation 8B/10B Encoder
FIFO (1)
wrclk rdclk wrclk rdclk
Serial Clock
High-Speed
/2
tx_clkout Low-Speed Parallel Clock
tx_clkout[0] Local Clock
PIPE Interface
PCIe hard IP
Divider
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.
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 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, Arria II GZ Arria II GX Interface Cyclone IV Interface
Interface Clock Rates (MHz) Clock 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 246.76 (6) 122.88 — 122.88
CPRI
3072 307.2 153.6 76.8 307.2 153.6 — 153.6
4915.2 — 245.76 (5) 122.88 — 245.76 (5) — —
6144 — 307.2 (5) 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 307.2 153.6 76.8 307.2 153.6 — 153.6
6144 — 307.2 (5) 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.
(6) Supported only for Arria II GX devices in the I3 speed grade.
f For more information about using the MegaWizard Plug-In Manager, refer to the
Megafunction Overview User Guide.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 6 Input Reference Clocks and Transmit Side Clock Generation
Table 3. Specific ALTGX Megafunction Options for CPRI Implementation with Deterministic
Latency
Option Settings
Which megafunction would you like to customize Expand I/O and select ALTGX.
Which protocol will you be using? Select Deterministic Latency.
Which subprotocol will you be using? Select X1.
What is the operation mode? Select Receiver and Transmitter.
What is the number of channels? Select 1.
Select Double (valid data rates: >
What is the deserializer block width?
1.000 Gbps).
What is the channel width? Select 32 bits.
What is the effective data rate? Type 6144. (1)
What is the input clock frequency? Select 153.6 MHz.
Enable PLL phase frequency detector(PFD) feedback
to compensate latency uncertainty in Tx dataout and Turn on. (3)
Tx clkout paths relative to the reference clock (2)
Enable Tx Phase Comp FIFO in register mode Turn on. (4)
Use manual word alignment mode Select this option.
Notes to Table 3:
(1) For information about supported transceiver configurations at other data rates for the CPRI and OBSAI RP3-01
interfaces, refer to Table 2 on page 5.
(2) To select this 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 on page 5.
(3) The PLL PFD feedback is not supported if you use the ATX PLL in the Stratix IV and HardCopy IV devices.
(4) If this option is turned off, the FIFO contributes one or two clock cycles of latency uncertainty.
f For more information about the options and settings of the ALTGX megafunction in
the MegaWizard Plug-In Manager, refer to the ALTGX Transceiver Setup Guide for
Stratix IV Devices.
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Input Reference Clocks and Transmit Side Clock Generation Page 7
Figure 4 shows the methods of implementing input reference clocking for CPRI port
implementations in REC and REs (in single-hop and multi-hop connections).
REC RE #1 RE #2
Note to Figure 4:
(1) The input clock ports shown in the diagram are applicable for Stratix IV, HardCopy IV, and Arria II devices only.
1 If you configure the Cyclone IV GX device in the Deterministic Latency mode, the
device provides an input reference clock port for each transmitter PLL and
multipurpose PLL (MPLL) that clocks the CDR.
For the REC, use a common input reference clock source for the transmitter PLL and
the CDR. In any RE module, before feeding the receiver recovered clock from the
slave port into the transmitter PLL input reference clocks of the slave port and master
port (in a multi-hop connection), send it to an external clean-up PLL. You need the
external clean-up PLL 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 the RE:
■ Choose an external clean-up PLL device with a sufficient input and output
frequency range to handle auto-rate negotiation scenarios in your application.
■ Ensure that the output clock from the clean-up PLL complies with the TX REFCLK
phase noise requirement, as specified in the respective device family data sheets.
An example of a suitable clean-up PLL device for such implementation is the
CDCL6010 from Texas Instruments.
Use the following Synopsis Design Contraints (SDC) commands if you enable the PLL
PFD feedback feature for the RE implementation with an external clean-up PLL:
■ On the output clock pin to the external clean-up PLL, if the RX recovered clock
feeds the external clean-up PLL with no clock multiplication or division:
create_generated_clock -divide_by 1 -multiply_by 1 -source <RX PCS recovered
clock> <clkout pin>
■ On the input clock pin from the external clean-up PLL, if there is no clock
multiplication or division from the external clean-up PLL:
create_generated_clock -source <clkout pin> <clkin pin>
set_clock_latency -source -early <min board + external PLL delay> <clkin
pin>
set_clock_latency -source -late <max board + external PLL delay> <clkin
pin>
Use any of the supported input reference clocking methods to the transmitter PLL and
the CDR.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 8 Input Reference Clocks and Transmit Side Clock Generation
f For more information about the 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 (Note 1)
MPLL_6
Ch 3 TX
Ch 3 RX
Ch 2 TX
Ch 2 RX
Transceiver Block High- and Low-Speed Clocks
GXBL0 CDR Clocks
Ch 1 TX (Master)
Ch 1 RX (Master)
Ch 0 TX (Slave)
Ch 0 RX (Slave)
MPLL_5 GPLL_1
Note to Figure 5:
(1) This example assumes that the channels that implement slave and master ports are running at the same data rate.
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Interface Clocking Page 9
Interface Clocking
The core fabric–transceiver interface clocking requirements depend on the PLL PFD
feedback usage and the 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 that are 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
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)
tx_reg tx_pipereg1 tx_pipereg2 (2)
D Q D Q D Q
tx_datain/
tx_ctrlenable
tx_dataout
ALTGX
RCLK or GCLK PCLK
tx_clkout
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.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 10 Interface Clocking
For example, delay uncertainty occurs in a CPRI REC port implementation (without
PLL PFD feedback) between clocks from the rx_clkout and tx_clkout ports. The
delay uncertainty also occurs in the CPRI RE slave port implementation (without PLL
PFD feedback) between clocks from the pll_inclk (derived from rx_clkout through
the external clean-up PLL) and tx_clkout ports. To overcome this delay uncertainty,
create an additional logic in the core fabric to implement a synchronization buffer
with a phase detector to determine the phase difference. Include the measured delay
from the phase difference into the total roundtrip latency computation. For
information about the phase detector implementation, refer to “Phase Detector Logic”
on page 11.
In certain implementations at high core fabric–transceiver interface clock frequencies,
you may not achieve timing closure when you are interfacing core registers to the
transmitter and receiver channels.
1 Use the following methods only if you are not able to achieve timing when interfacing
core registers to the transmitter and receiver channels because each stage of the
pipeline registers adds a latency of one clock cycle to the transmit datapath.
To comply with the core fabric–transceiver interface timing requirement, use the
methods described for these scenarios:
■ “Transmitter Channel with PLL PFD Feedback”
■ “Transmitter Channel without PLL PFD Feedback”
■ “Receiver Channel”
f For more information about the methods described in the “Transmitter Channel
without PLL PFD Feedback” and the “Receiver Channel” scenarios, refer to the
Achieving Timing Closure in Basic (PMA Direct) Functional Mode application note.
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Phase Detector Logic Page 11
The tx_pipereg2 registers are the last stage of the pipeline registers interfacing to the
transmitter channel.
f For more information about the methods described in this scenario, refer to the
Achieving Timing Closure in Basic (PMA Direct) Functional Mode application note.
Receiver Channel
Include the following command in the .sdc, which adjusts the setup requirement
between the receiver channel to capture registers, as shown in Figure 8:
set_multicycle_path -setup -from [get_registers rx_reg*] 0
The rx_reg registers are the registers that are used to capture data from the receiver
channel.
ALTGX
rx_clkout
Note to Figure 8:
(1) To achieve timing closure, additional timing constraint is optional.
f For more information about the method described in this scenario, refer to the
Achieving Timing Closure in Basic (PMA Direct) Functional Mode application note.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 12 Phase Detector Logic
Figure 9 shows a block diagram of the phase detection design that measures the phase
difference between two clock domains—for example, between clocks from rx_clkout
and tx_clkout if you use the design in an RE slave port without PLL PFD feedback.
measure_clk
Phase Offset
PLL rx_clkout_phase_offset
Comparator
PLL Phase Shift
State Machine Phase Offset tx_clkout_phase_offset
Comparator
phase of measure_clk
reference_clk
f For more information about implementing dynamic phase shifting, refer to the
following documents:
■ Stratix IV, HardCopy IV, and Arria II devices—The PLL Dynamic Phase Shifting in
the Quartus II Software section in the AN 454: Implementing PLL Reconfiguration in
Stratix III and Stratix IV Devices application note.
■ Cyclone IV devices—The Implementing PLL Dynamic Phase Shifting in Quartus II
Software section in the Implementing PLL Reconfiguration in Cyclone III Devices
application note.
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Design Considerations for Auto-Rate Negotiation Page 13
1 To facilitate data transfer between the clock domains, create additional logic—for
example, a synchronization buffer. Include the additional latencies from the data
transfer logics to the total latency calculation.
f For more information about dynamic reconfiguration implementation when using the
transceivers, refer to the following documents:
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 14 Design Considerations for Auto-Rate Negotiation
Table 4. Auto-Rate Negotiation Implementation Scenarios using the Stratix IV, HardCopy IV, and Arria II Devices (Part 1
of 2)
Reconfiguration
Scenarios Channel Utilization Details
Option
Up to two Perform negotiation to the desired data rate by
independent x1 reconfiguring the specific receiver channel and the
Dedicated duplex channels in a Channel and CMU PLL (affects the transmitter only).
CMU PLL per transceiver block, CMU PLL Ensure that the input reference clock frequency is the same
channel with each channel reconfiguration as the clock from the tx_clkout port at each reconfigured
using a dedicated data rate. This option supports the PLL PFD feedback for
CMU PLL each transmitter channel.
Channel and
Perform negotiation to the desired data rate by
CMU PLL
reconfiguring the specific receiver channel.
reconfiguration
Perform negotiation to related data rates (in multiples of /1,
/2, or /4 of each other) by reconfiguring the TX local clock
divider of the specific transmitter channel. For example:
Data rate ■ From 4915.2 Mbps to 2457.6 Mbps, or 1228.8 Mbps
division in TX ■ 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.
Up to four
independent x1 Perform negotiation to the unrelated data rates (not in
Shared CMU PLL— multiples of /1, /2, or /4 of each other) by reconfiguring the
duplex channels in a
without the specific transmitter channel to select clocks from another
transceiver block,
PLL PFD feedback CMU PLL. For example:
with the channels
path support
sharing one or two ■ From 6144 Mbps to 4915.2 Mbps
CMUs ■ From 4915.2 Mbps to 3072 Mbps
Channel This option uses two CMUs—one with the initial line rate
reconfiguration clock settings and the other with the negotiated lower line
with TX PLL rate clock settings.
select Reconfiguration at the specific transmitter channel does not
affect the other channels that listen to either one of the
CMU PLLs.
Use with the 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
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Design Considerations for Auto-Rate Negotiation Page 15
Table 4. Auto-Rate Negotiation Implementation Scenarios using the Stratix IV, HardCopy IV, and Arria II Devices (Part 2
of 2)
Reconfiguration
Scenarios Channel Utilization Details
Option
Channel and Perform negotiation to the desired line rate by
CMU PLL reconfiguring the specific receiver channel. Do not
reconfiguration implement oversampling logic on the receiver datapath.
Implement variable oversampling (sends the same bit
multiple times) in the user logic at each transmitter path
with the CMU0 PLL clock set at the highest data rate
intended for the device.
Four duplex
channels bundled in Implement 8B/10B encoding in the user logic, which selects
Shared CMU PLL— 10, 20, or 40 bits channel width to bypass the 8B/10B
(x4) bonded mode,
with the PLL PFD encoder in transceiver.
with all channels Implement
feedback support
sharing the CMU0 oversampling in Perform negotiation to the data rates that are multiples of
PLL your user logic each other (/2, /4, or /8) by enabling the appropriate
oversampling path in the user logic.
Negotiation at a specific transmitter channel does not affect
other channels in the bundle.
This option supports the PLL PFD feedback path for each
transmitter, compensating the transmitter uncertainty in the
four bonded channels at the same time to the CMU0 PLL.
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 16 Design Considerations for Auto-Rate Negotiation
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation
Document Revision History Page 17
December 2016 Altera Corporation Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices
Page 18 Document Revision History
Implementing Deterministic Latency for CPRI and OBSAI Protocols in Altera Devices December 2016 Altera Corporation