Professional Documents
Culture Documents
Polarfire Fpga Cpri An4949
Polarfire Fpga Cpri An4949
AN4949
Important: The protocol standard uses the terminology “Master” and “Slave”. The equivalent
Microchip terminology used in this document is Initiator and Target, respectively.
Table of Contents
Introduction........................................................................................................................................................................... 1
2. Design Requirements....................................................................................................................................................4
3. Prerequisites.................................................................................................................................................................. 5
4. Demo Design..................................................................................................................................................................6
4.1. Design Implementation.....................................................................................................................................7
5. Port Description.......................................................................................................................................................... 14
6. Register Configuration................................................................................................................................................15
7. Clocking Structure....................................................................................................................................................... 16
8. Reset Structure............................................................................................................................................................ 17
Microchip Information....................................................................................................................................................... 36
The Microchip Website............................................................................................................................................... 36
Product Change Notification Service........................................................................................................................ 36
Customer Support.......................................................................................................................................................36
Microchip Devices Code Protection Feature............................................................................................................ 36
Legal Notice..................................................................................................................................................................37
Trademarks.................................................................................................................................................................. 37
Quality Management System.....................................................................................................................................38
Worldwide Sales and Service..................................................................................................................................... 39
Layer2 Layer2
PHY PHY
Master Slave
CPRI Link
This demo design is created using the PolarFire® high-speed transceiver blocks and CPRI Slave IP
core. The design operates in the loopback mode by sending the CPRI Master data to the CPRI Slave
IP core through the transceiver lanes, which are looped back on the board. This loopback setup
facilitates a stand-alone CPRI interface demo that does not require CPRI testers and other devices to
validate the design.
The demo design shows CPRI loopback using transceiver on the evaluation board. The CPRI Slave IP
is configured with the following settings:
• Line Rate 5: 4.9152 Gbps
• Number of Antenna carriers: 4
• The transceiver is configured in 8b10b mode running at 4.9152 Gbps data-rate
• 32-bit PCS fabric interface using a 122.88 MHz reference clock
Important: Libero® SmartDesign and configuration screen shots shown in this guide are
for illustration purpose only. Open the Libero design to see the latest updates.
PolarFire® FPGA
Test Interface Mi-Subsystem
AHB AHB
UART Error Mi_V
CPRI
GUI Injector Processor
Interface
Clock
Reset
Gen
Gen
The following steps describe the data flow in the demo design:
1. The Mi_V_module configures the registers of the CPRI Master module and CPRI slave IP blocks.
2. The reference design uses a transceiver interface (PF_XCVR_ERM) configured in 8b10b mode
running at 4.9152 Gbps data rate, 32-bit PCS fabric interface, and 122.88 MHz reference clock.
3. The CPRI master module and CPRI IP are configured at Line Rate 5: 4.9152 Gbps with four
Antenna carriers.
4. The CPRI master module receives the IQ data from the TX IQ Data Generator and control
information such as Ethernet data, Vendor specific data, and Antenna carrier control from the
respective pattern generators.
5. CPRI master module then frames the incoming data and transmits a 32-bit CPRI frame to the
transceiver.
6. The differential serial data of TX and RX is looped back using an on-board loopback.
7. The CPRI slave IP receives the incoming frames and segregates the incoming data according to
the CPRI protocol.
8. The segregated IQ data, Vendor specific data, Ethernet data, and Antenna carrier control
information are written to the respective loop back FIFO’s.
9. CPRI slave IP then reads the data from loopback FIFO's frames the data and transmits the a
32-bit CPRI frame to CPRI master module through the transceiver.
10. The CPRI master module receives the incoming frames, segregates and sends the incoming data
to respective pattern checkers.
11. Incoming control information is compared with the control data for Vendor specific, Fast
Ethernet, IQ data, and Antenna carrier control data. When the data is matched, the respective
lock signals are asserted.
12. The IQ data and control information such as Ethernet, Vendor specific, and Antenna carrier
control lock signals from CPRI slave IP and master module along with transceiver RX_Valid and
RX_ready for both the lanes are sent to the UART_interface block.
13. The UART_interface block forwards these status signal and locks information on its TX interface
to the GUI for display.
32-bit
16'h5555 Incremental
16-bit 16-bit
• 32-bit VSS data: The 16-bit of MSB is constant and the16-bit of LSB is incremental data.
32-bit
16'hCCCC Incremental
16-bit 16-bit
• 32-bit Antenna Carrier Control data: The 16-bit of MSB is constant and the 16-bit of LSB is
incremental data.
32-bit
16'hAAAA Incremental
16-bit 16-bit
• In this demo four Antenna carriers are used, each antenna generates 32-bit data. The IQ data
samples of each Antenna carrier control are fixed at 15-bit. The user-interface width is fixed at
32-bit, with zero appending on MSB. 15-bit IQ data samples are bit-stuffed in the 32-bit user
interface for each Antenna carrier.
32-bit
0 Q Data 0 I Data
15-bit 15-bit
AHBLite_MMIO_0
HCLK
AHBmslave5
HRESETN
AHBmslave6
REMAP_M0
AHBmmaster0
AHBmslave7 MIV_RV32_C0_0
CLK
AHBLite_MMIO RESETN
TIME_COUNT_IN[63:0]
DEBUG
EXT_RESETN
JTAG_TCK
JTAG_TDI
CLK AHB_to_APB3_0 JTAG_TDO
AHBL_MSTR AHBmslave6_Master
AHBmslave7_Slave
JTAG_TDO_DR
HCLK
JTAG_TMS
RESETN HRESETN APBmaster
JTAG_TRSTN
TCK AHBslave
IRQ
TDI
EXT_IRQ
TMS AHB_to_APB3 TMR_IRQ
TRSTB
TDO
APB3_0 MIV_RV32_C0 GPIO_OUT[0:0]
APB3mmaster APBmslave1
APB3
GPIO_0
PRESETN
PCLK INT[0:0]
GPIO_IN[0:0] GPIO_OUT[0:0]
APB_bif
GPIO
JTAG_Debug_0
JTAG_HEADER DEBUG_TARGET_0
TCK TGT_TCK_0
TDI TGT_TDI_0
TDO TGT_TDO_0
TMS TGT_TMS_0
TRSTB TGT_TRSTN_0
JTAG_Debug
For more information about how to build the Mi-V subsystem, see TU0775 Tutorial PolarFire FPGA:
Building a Mi-V Processor Subsystem.
The following table lists the address map of Mi-V processor.
data_in[31:0]
Inject_Error
DFN1_1
D Q
CLK
DFN1
UART_CORE_0
BIT8
CLK
CSN
OVERFLOW
ODD_N_EVEN
PARITY_ERR
OEN
RXRDY
PARITY_EN
TX
RESET_N
TXRDY
RX
FRAMING_ERR
WEN
13'h0035 DATA_OUT[7:0]
BAUD_VAL[12:0]
DATA_IN[7:0]
3'h2
BAUD_VAL_FRACTION[2:0]
UART_CORE
The following table lists the register configuration and these registers are configured in the
SoftConsole project: mpf_an4949_v2022p3_df\SoftConsole\CPRI_config\main.c.
Clock Domain 1
Clock Domain 2
On-Board 122.88 MHz 160 MHz
Crystal Oscillator Internal
Oscilltor
PF_XCVR_REF_CLK PF_CCC
CLK Divider
100 MHz
REF_CLK
PF_TX_PLL 40 MHz
CLKS_TO_XCVR
XCVR
RX_CLK_L0_R TX_CLK_L1_R
HCLK HCLK
UART CLK HCLK
The following table lists the clocks used in the demo design.
External Resetn
XCVR_INIT_Done
XCVR_SubSystem
PF_CCC PF_INIT_Monitor
PLL_Lock Device_INIT_Done
CPRI_Master_ CPRI_Slave_
Test Interface MiV_SubSystem
SubSystem SubSystem
The following figure shows these options in the Design Flow window.
...........continued
Type Used Total Percentage
µSRAM 12 2772 0.43
LSRAM 75 952 7.88
Math 0 924 0
H-Chip Global 10 48 20 83
Local Global 4 1008 0.4
PLL 1 8 12.5
DLL 0 8 0
BANKEN 1 7 14.29
CRN INT 1 24 4.17
UJTAG 1 1 100
INIT 1 1 100
OSC RC160MHZ 1 1 100
Transceiver Lanes 2 16 12.5
Transceiver PCIe 0 2 0
TX PLL 1 11 9.09
XCVR REF CLK 1 11 9.09
ICB CLKDIV 1 24 4.17
ICB CLKINT 4 72 5.56
ICB INT 1 12 8.33
On the Design Flow window, double-click Place and Route. When place and route is successful, a
green tick mark appears.
The following table lists the resource utilization after place and route.
2. In the Fabric RAMs tab, select the LSRAM client from the list, and then click Edit.
3. In the Edit Fabric RAM Initialization Client dialog box, select the
Content from file option, and locate the CPRI_config.hex file from
DesignFiles_directory\mpf_an4949_v2022p3_df\Libero_Project folder, and then click
OK.
4. Click Apply.
5. To generate design initialization data, click Generate Initialization Data on the Design Flow
window. After successful generation of the Initialization data, a green tick mark appears next to
Generate Initialization Data option. See Figure 9-8.
The device is successfully programmed and a green tick mark appears next to Run PROGRAM
Action, see Figure 9-1. LED 4 is asserted once the device is programmed.
7. Click Start. The data is generated and framed using the CPRI master module and sent over the
serial transmit link. It is then received by the receiver, and CPRI slave IP unpacks the data and
loopbacks the data to the CPRI master module. The checker in the master system checks the
incoming data for any errors. The status is monitored using the status signals on the GUI at any
time. The following are the status signals:
– Serial Link: Indicates transceiver link status
8. Click Payload Error to induce error in VSS data, Ethernet data, Antenna carrier control data, and
Antenna carrier data. Observe the error status of Master tab. See the following figure. The LED
5, LED 6, LED 7, LED 8, LED 9, LED 10, and LED 11 are deasserted at the same time.
9. Disable Payload Error to stop generating an error and observe that the Serial Link, Rx Valid, and
all the status signals of Master turn green. See the following figure. When the error is cleared,
the LED 5 to LED 11 is asserted at the same time.
11. Appendix 1: Programming the Device Using FlashPro Express (Ask a Question)
This chapter describes how to program the PolarFire device with the Job programming
file using a FlashPro programmer. The default location of the .stp file is
mpf_an4949_v2022p3_df\Programming_Job.
To program the PolarFire device using FlashPro Express, perform the following steps:
1. Ensure that the jumper settings on the board are the same as listed in Table 9-3.
Tip: The power supply switch must be switched OFF while making the jumper
connections.
7. Enter the following in the New Job Project from FlashPro Express Job dialog box:
– Programming job file: Click Browse, and navigate to the location where
the .job file is located and select the file. The default location is
<download_folder>\mpf_an4949_v2022p3_df\Programming_Job.
– FlashPro Express job project location: Click Browse and navigate to the location where
you want to save the project.
8. Click OK. The required programming file is selected and ready to be programmed in the device.
9. The FlashPro Express window appears. Confirm that a programmer number appears in the
Programmer field. If it does not, confirm the board connections and click Refresh/Rescan
Programmers.
10. Click RUN. When the device is programmed successfully, a RUN PASSED status is displayed.
• Microchip products meet the specifications contained in their particular Microchip Data Sheet.
• Microchip believes that its family of products is secure when used in the intended manner, within
operating specifications, and under normal conditions.
• Microchip values and aggressively protects its intellectual property rights. Attempts to breach the
code protection features of Microchip product is strictly prohibited and may violate the Digital
Millennium Copyright Act.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of its
code. Code protection does not mean that we are guaranteeing the product is “unbreakable”.
Code protection is constantly evolving. Microchip is committed to continuously improving the
code protection features of our products.
Average Matching, DAM, ECAN, Espresso T1S, EtherGREEN, GridTime, IdealBridge, In-Circuit Serial
Programming, ICSP, INICnet, Intelligent Paralleling, IntelliMOS, Inter-Chip Connectivity, JitterBlocker,
Knob-on-Display, KoD, maxCrypto, maxView, memBrain, Mindi, MiWi, MPASM, MPF, MPLAB Certified
logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net,
PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple Blocker, RTAX, RTG4, SAM-
ICE, Serial Quad I/O, simpleMAP, SimpliPHY, SmartBuffer, SmartHLS, SMART-I.S., storClad, SQI,
SuperSwitcher, SuperSwitcher II, Switchtec, SynchroPHY, Total Endurance, Trusted Time, TSHARC,
USBCheck, VariSense, VectorBlox, VeriPHY, ViewSpan, WiperLock, XpressConnect, and ZENA are
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered
trademarks of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary
of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2023, Microchip Technology Incorporated and its subsidiaries. All Rights Reserved.
ISBN: 978-1-6683-2477-6