CPRI-RRH
This tutorial shows how to connect an RRH (Remote Radio Head) to Amarisoft Callbox over CPRI interface. Amarisoft Callbox provide/support a dedicated CPRI Card (just as dedicated SDR card is supported) via PCI slots. This would have a few different use cases
- Live Network Deployment : With this setup and Amarisoft software stack (live network statemachine, multi UE support etc), you can deploy a livenetwork (e.g, as a macro cell or a private network)
- Testing a Development Board over Baseband : If the DUT support CPRI interface, you can test the DUT over baseband without RF.
Table of Contents
- CPRI-RRH
Test Setup
Test setup for this tutorial is as shown below.
- SIM Card used in this tutorial is the one delivered with the system as it is.
- If you want to change the configuration, The tutorial Configuration Guide would help
Key Configuration Parameters
Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.
Configuration
In this application, you need to do configuration settings not only for Amarisoft callbox/CPRI but also RRH(Remote Radio Head) connected to the CPRI interface.
Callbox
I used the gnb-sa-cpri.cfg which is modified from gnb-sa.cfg
Configure gnb-sa-cpri.cfg as follows.
Specify Duplex method (NR_TDD), Channel Bandwidth (NR_BANDWIDTH) and MIMO Scheme(N_ANTENNA_DL) to match the capability of RRH(Remote Radio Head) which is connected to CPRI card. (
The most important part (the configuration that is unique to CPRI) is rf_driver:{ }. rf_driver name for CPRI is still set to "sdr" but most of other parameters are cpri specific configuration. cpri_mult specifies the bit rate of the CPRI interface. ifname ("cpri0" in this case) is the TUN interface that will be created and mapped to a specific CPRI port. cpri_mapping is related to 4.2.7.2. Mapping of IQ data of CPRI specification.
Option |
Bit Rate (Mbits/sec) |
Line Coding |
Bit Rate Calculation (Mbits/sec) |
Electrical |
Optical |
|
Short Range |
Long Range |
|||||
Option 1 |
614.4 |
|
E.6 |
OS.6 |
OL.6 |
|
Option 2 |
1,228.8 |
|
E.12 |
OS.12 |
OL.12 |
|
Option 3 |
2,457.6 |
|
E.24 |
OS.24 |
OL.24 |
|
Option 4 |
3,072.0 |
|
E.30 |
OS.30 |
OL.30 |
|
Option 5 |
4,915.2 |
|
E.48 |
OS.48 |
OL.48 |
|
Option 6 |
6,144.0 |
|
E.60 |
OS.60 |
OL.60 |
|
Option 7 |
9,830.4 |
|
E.79 |
N/A |
N/A |
|
Option 7A |
8,110.08 |
|
E.96 |
OS.96 |
OL.96 |
|
Option 8 |
10,137.6 |
|
E.99 |
OS.99 |
OL.99 |
|
Option 9 |
12,165.12 |
|
E.119 |
OS.119 |
OL.119 |
|
Option 10 |
24,330.24 |
|
E.238 |
OS.238 |
OL.238 |
One thing to notice is that tx_gain and rx_gain are not applicable for this setup since the RF power is controlled by RRH.
RRH
In this setup, RRH is not directly controlled by Amarisoft Callbox. The RRH should be configured and controlled by a separate software provided by RRH manufacturer.
The RRH used in this tutorial provide a configuration setting program as shown below.
Specify the Center Frequency and Power as you like and Enable UL/DL for every carrier that you need. The Center Frequency you set here should match the frequency settings in gNB configuration file.
Set the SSB Type and TDD UL/DL configuration(Slot configuration and Special Slot symbols) to match tdd pattern you set in gNB configuration.
Perform the test
Start LTE service and check basic cell configuration.
It would be good to check rf_info. You can see some of the output details that indicates the RF is mapped to CPRI card rather than regular sdr card as highlighed below.
PCIe CPRI indicates that CPRI card is plugged in PCI card and CPRI option indicates CPRI bit rate (option: '7' (x16) in this case.
Now try out 'cell' and 'cell phy' to check if the cell is configured as intended.
Another thing to check (at least once when you try the CPRI for the first time) is the output of 'ifconfig -all'. Make sure that you see 'cpri0' TUN interface (the ifname you set in the configuration file) and tun0,1,2,3 are created properly.
cpri0: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether d6:45:94:92:4c:e8 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 251448 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 192.168.2.1 netmask 255.255.255.0 destination 192.168.2.1 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4 bytes 204 (204.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 192.168.3.1 netmask 255.255.255.0 destination 192.168.3.1 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 58 bytes 9081 (8.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 74 bytes 20085 (19.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun2: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 192.168.4.1 netmask 255.255.255.0 destination 192.168.4.1 inet6 fe80::cead:dd2a:f2d1:9ce4 prefixlen 64 scopeid 0x20<link> inet6 2001:468:3000:1:: prefixlen 48 scopeid 0x0<global> unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 48 bytes 21046 (20.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3490252 bytes 5228152173 (4.8 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun3: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 192.168.5.1 netmask 255.255.255.0 destination 192.168.5.1 inet6 fe80::6755:cf48:fc02:ba1f prefixlen 64 scopeid 0x20<link> inet6 2001:468:4000:1:: prefixlen 48 scopeid 0x0<global> unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 132 bytes 6432 (6.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
Power on UE and let UE attach to the cell. (
Log Analysis
There is nothing specific for log analysis for CPRI since we are not collecting any CPRI specific information. I attached the log mainly as a evidence that the setup in this tutorial works properly to the point where UE camp on the network over RRH + CPRI.
For this kind of application, one important step especially at early deployment would be to perform various tuning (optimization) in terms of power/radio link quality and performance. For this purpose, you can use various visualization features on WebGUI such as SNR, EPRE plots as shown below.
You can also visualize physical resource utilization and CRC distributions using RB map as shown below.
CPRI Frame Structure
In this section I will explain the CPRI frame structure and IQ mapping implemented in Amarisoft CPRI link. Of course, it complies to CPRI specification as outlined here. But CPRI specification allows subtle degree of variations in the implementation, it would be worth clearly describing the details of Amarisoft implementation here.
cpri_mapping
The configuration parameter that varies the structure of CPRI frame structure is cpri_mapping. In Amarisoft The I/Q data are transformed into final cpri frame at two major places. The first step is to form the frame between CPU and PCIe and the second step is to finalize the frame between PCIe and CPRI port. The cpri_mapping parameter affects these two steps.
Followings are short descriptions of each of the configuration parameter
- standard : same as I/Q mapping method1 of CPRI specification
- spread : same as I/Q mapping method3 of CPRI specification
- hw : same as standard in terms of I/Q mapping but the procedure of the mapping is mostly done by the hardware on CPRI card rather than being done by Callbox CPU
- bf1 : Amarisoft proprietary format based on Block Floating Point Compression (BF1).
Frame Structure
The frame structure of CPRI happen at a few levels of hierarchies as below.
- IQ mapping : This is the process of I/Q samples from each antenna into a basic frame. The bit structure of the I/Q samples are called AxC(Antenna Carrier).
- Constructing Basic Frame : This is the process of arranging (packing) control data and I/Q data (AxC) into a sequence of words
- Constructing Hyper Frame : This is the process of arranging (packing) the multiples of Basic Frames into a hyperframe.
The configuration parameter cpri_mapping is applied to IQ mapping step and it does not affect the process / structure of Hyperframe. We use the same Hyperframe structure as specified by CPRI specification regardless of cpri_mapping value.
standard(method 1)
This mapping mehod (i.e, cpri_mapping=standard) is based on 4.2.7.2.5. Mapping method 1: IQ sample based of CPRI specification. The structure and process of constructing the frame is illustrated as below.
The high level procedure of the framing the data in this method can be summarized as below. (
- Each I/Q data sample is comprised of 30bits (15 bits for I, 15 bits for Q)
- I and Q bits are interleaved to construct an AxC sample (i.e, one AxC sample has the width of 30 bits)
- Prepare a basic frame which is made up of 16 words. Each word has the width of 64 bits
- The first word in a basic frame is allocated (reserved) for Control Data (Control bits) and the rest of the words are allocated with AxC samples.
- Determine the AxC group size (i.e, how many AxC samples are packed into one AxC group). In case of the example shown in the illustration, the AxC group size is 2 (i.e, there are two AxC samples within a group).
- In this case, each antenna group has two consecutive AxC from a same antenna and same carrier. For example, the first AxC group carries 'AxC Ant 0 - 0th sample' and 'AxC Ant 0 - 1st sample' and the second AxC group carries 'AxC Ant 1 - 0th sample' and 'AxC Ant 1 - 1st sample'
- Pack each AxC group into basic frame starting from word 1 of the basic frame.
- In this way, contruct 256 basic frames
- Construct a hyper frame out of the 256 basic frames. At this step, data reorganization happens. First, slice out the control word from all of the basic frame and concatenate them at the beginning of the hyperframe. And then starting from the end of the control word, concatenate all the AxC groups.