1 .. Copyright (c) 2019 Intel
3 .. Licensed under the Apache License, Version 2.0 (the "License");
4 .. you may not use this file except in compliance with the License.
5 .. You may obtain a copy of the License at
7 .. http://www.apache.org/licenses/LICENSE-2.0
9 .. Unless required by applicable law or agreed to in writing, software
10 .. distributed under the License is distributed on an "AS IS" BASIS,
11 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 .. See the License for the specific language governing permissions and
13 .. limitations under the License.
26 The xRAN Library consists of multiple modules where different
27 functionality is encapsulated. The complete list of all \*.c and \*.h
28 files as well as Makefile for xRAN (aka FHI Lib Bronze Release) release is:
52 │ │ └── xran_mlog_task_id.h
80 │ │ ├── xran_compression.h
82 │ │ ├── xran_compression.hpp
86 │ │ ├── xran_fh_o_du.h
88 │ │ ├── xran_mlog_lnx.h
96 │ │ ├── xran_sync_api.h
100 │ │ ├── xran_transport.h
102 │ │ └── xran_up_api.h
118 │ ├── xran_app_frag.c
120 │ ├── xran_app_frag.h
122 │ ├── xran_bfp_cplane16.cpp
124 │ ├── xran_bfp_cplane32.cpp
126 │ ├── xran_bfp_cplane64.cpp
128 │ ├── xran_bfp_cplane8.cpp
130 │ ├── xran_bfp_ref.cpp
132 │ ├── xran_bfp_utils.hpp
138 │ ├── xran_compression.cpp
142 │ ├── xran_frame_struct.c
144 │ ├── xran_frame_struct.h
146 │ ├── xran_lib_mlog_tasks_id.h
152 │ ├── xran_sync_api.c
156 │ ├── xran_transport.c
158 │ ├── xran_ul_tables.c
174 │ ├── common_typedef_xran.h
178 │ ├── MIT_License.txt
180 │ ├── xranlib_unit_test_main.cc
182 │ └── xran_lib_wrap.hpp
192 ├── compander_functional.cc
198 ├── init_sys_functional.cc
202 ├── prach_functional.cc
204 ├── prach_performance.cc
208 └── u_plane_functional.cc
214 The xRAN Library functionality is broken down into two main sections:
216 - XRAN specific packet handling (src)
218 - Ethernet and supporting functionality (Ethernet)
220 External functions and structures are available via set of header files
223 This library depends on DPDK primitives to perform Ethernet networking
224 in userspace, including initialization and control of Ethernet ports.
225 Ethernet ports are expected to be SRIOV virtual functions (VF) but also
226 can be physical functions (PF) as well.
228 This library is expected to be included in the project via
229 xran_fh_o_du.h, statically compiled and linked with the L1 application
230 as well as DPDK libraries. The xRAN packet processing-specific
231 functionality is encapsulated into this library and not exposed to the
232 rest of the 5G NR pipeline.
234 This way, xRAN specific changes are decoupled from the 5G NR L1
235 pipeline. As a result, the design and implementation of the 5G L1
236 pipeline code and xRAN library can be done in parallel, provided the
237 defined interface is not modified.
239 Ethernet consists of two modules:
241 - Ethernet implements xRAN specific HW Ethernet initialization, close,
244 - ethdi provides Ethernet level software primitives to handle xRAN
247 The xRAN layer implements the next set of functionalities:
249 - Common code specific for both C-plane and U-plane as well as TX and
252 - Implementation of C-plane API available within the library and
255 - The primary function where general library initialization and
256 configuration performed
258 - Module to provide the status of PTP synchronization
260 - Timing module where system time is polled
262 - eCPRI specific transport layer functions
264 - APIs to handle U-plane packets
266 - A set of utility modules for debugging (printf) and data tables are
269 .. image:: images/Illustration-of-xRAN-Sublayers.jpg
271 :alt: Figure 24. Illustration of xRAN Sublayers
273 Figure 24. Illustration of xRAN Sublayers
275 A detailed description of functions and input/output arguments, as well
276 as key data structures, can be found in the Doxygen file for the FlexRAN
277 5G NR release. In this document supplemental information is provided
278 with respect to the overall design and implementation assumptions.
280 Initialization and Close
281 ------------------------
283 An example of the initialization sequence can be found in the sample
284 application code. It consists of the following steps:
286 1.Setup structure struct xran_fh_init according to configuration.
288 2.Call xran_init() to instantiate the xRAN lib memory model and
289 threads. The function returns a pointer to xRAN handle which is used
290 for consecutive configuration functions.
292 3.Initialize memory buffers used for L1 and xRAN exchange of
295 4.Assign callback functions for (one) TTI event and for the reception
296 of half of the slot of symbols (7 symbols) and Full slot of symbols
299 5.Call xran_open() to initialize PRACH configuration, initialize DPDK,
300 and launch xRAN timing thread.
302 6.Call xran_start() to start processing xRAN packets for DL and UL.
304 After this is complete 5G L1 runs with xRAN Front haul interface. During
305 run time for every TTI event, the corresponding call back is called. For
306 packet reception on UL direction, the corresponding call back is called.
307 OTA time information such as frame id, subframe id and slot id can be
308 obtained as result synchronization of the L1 pipeline to GPS time is
311 To stop and close the interface, perform this sequence of steps:
313 7.Call xran_stop() to stop the processing of DL and UL.
315 8.Call xran_close() to remove usage of xRAN resources.
317 9.Call xran_mm_destroy() to destroy memory management subsystem.
319 After this session is complete, a restart of the full L1 application is
320 required. The current version of the library does not support multiple
321 sessions without a restart of the full L1 application.
326 The xRAN library configuration is provided in the set of structures, such as struct xran_fh_init and struct xran_fh_config.
327 The sample application gives an example of a test configuration used for LTE and 5GNR mmWave and Sub 6. Sample application
328 folder /app/usecase/ contains set of examples for different Radio Access technology (LTE|5G NR), different category (A|B)
329 and list of numerologies (0,1,3) and list of bandwidths (5,10,20,100Mhz).
331 Some configuration options are not used in the Bronze Release and are reserved
334 The following options are available:
336 **Structure** struct xran_fh_init\ **:**
338 - Number of CC and corresponding settings for each
340 - Core allocation for xRAN
342 - Ethernet port allocation
344 - O-DU and RU Ethernet Mac address
346 - Timing constraints of O-DU and 0-RU
350 **Structure** struct xran_fh_config\ **:**
354 - TTI Callback function and parameters
356 - PRACH 5G NR specific settings
358 - TDD frame configuration
360 - BBU specific configuration
362 - RU specific configuration
364 **From an implementation perspective:**
366 xran_init() performs init of the xRAN library and interface according to
367 struct xran_fh_init information as per the start of application
370 - Init DPDK with corresponding networking ports and core assignment
374 - Init DPDK timers and DPDK rings for internal packet processing
376 - Instantiate ORAN FH thread doing
378 - Timing processing (xran_timing_source_thread())
380 - ETH PMD (process_dpdk_io())
382 - IO XRAN-PHY exchange (ring_processing_func())
384 **xran_open()** performs additional configuration as per run scenario:
386 - PRACH configuration
388 - C-plane initialization
390 The Function **xran_close()** performs free of resources and allows potential
391 restart of front haul interface with a different scenario.
396 The Functions **xran_start()/xran_stop()** enable/disable packet processing for
397 both DL and UL. This triggers execution of callbacks into the L1
403 Exchange of IQ samples, as well as C-plane specific information, is
404 performed using a set of buffers allocated by xRAN library from DPDK
405 memory and shared with the l1 application. Buffers are allocated as a
406 standard mbuf structure and DPDK pools are used to manage the allocation
407 and free resources. Shared buffers are allocated at the init stage and
408 are expected to be reused within 80 TTIs (10 ms).
410 The xRAN protocol requires U-plane IQ data to be transferred in network
411 byte order, and the L1 application handles IQ sample data in CPU byte
412 order, requiring a swap. The PHY BBU pooling tasks perform copy and byte
413 order swap during packet processing.
415 C-plane Information Settings
416 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
418 The interface between the xRAN library and PHY is defined via struct
419 xran_prb_map and similar to the data plane. The same mbuf memory is used
420 to allocate memory map of PRBs for each TTI.
422 /\* Beamforming waights for single stream for each PRBs given number of Antenna elements \*/
423 struct xran_cp_bf_weight{
425 int16_t nAntElmTRx; /\*< num TRX for this allocation \*/
426 int8_t* p_ext_start; /\*< pointer to start of buffer for full C-plane packet \*/
427 int8_t* p_ext_section; /\*< pointer to form extType \*/
428 int16_t ext_section_sz; /\*< extType section size \*/
430 /\* section descriptor for given number of PRBs used on U-plane packet creation \*/
431 struct xran_section_desc {
433 uint16_t section_id; /\*< section id used for this element \*/
435 int16_t iq_buffer_offset; /\*< Offset in bytes for the content of IQs with in main symb buffer \*/
436 int16_t iq_buffer_len; /\*< Length in bytes for the content of IQs with in main symb buffer \*/
438 uint8_t \*pData; /\*< optional pointer to data buffer \*/
439 void \*pCtrl; /\*< optional poitner to mbuf \*/
443 struct xran_prb_elm {
444 int16_t nRBStart; /\*< start RB of RB allocation \*/
445 int16_t nRBSize; /\*< number of RBs used \*/
446 int16_t nStartSymb; /\*< start symbol ID \*/
447 int16_t numSymb; /\\*< number of symbols \*/
448 int16_t nBeamIndex; /\*< beam index for given PRB \*/
449 int16_t bf_weight_update; /\* need to update beam weights or not \*/
450 int16_t compMethod; /\*< compression index for given PRB \*/
451 int16_t iqWidth; /\*< compression bit width for given PRB \*/
452 int16_t BeamFormingType; /\*< index based, weights based or attribute based beam forming\*/
454 struct xran_section_desc * p_sec_desc[XRAN_NUM_OF_SYMBOL_PER_SLOT]; /\*< section desctiptors to U-plane data given RBs \*/
455 struct xran_cp_bf_weight bf_weight; /\*< beam forming information relevant for given RBs \*/
458 struct xran_cp_bf_attribute bf_attribute;
459 struct xran_cp_bf_precoding bf_precoding;
463 /\* PRB map structure \*/
465 struct xran_prb_map {
466 uint8_t dir; /\*< DL or UL direction \*/
467 uint8_t xran_port; /\*< xran id of given RU [0-(XRAN_PORTS_NUM-1)] \*/
468 uint16_t band_id; /\*< xran band id \*/
469 uint16_t cc_id; /\*< componnent carrier id [0 - (XRAN_MAX_SECTOR_NR-1)] \*/
470 uint16_t ru_port_id; /\*< RU device antenna port id [0 - (XRAN_MAX_ANTENNA_NR-1) \*/
471 uint16_t tti_id; /\*< xRAN slot id [0 - (max tti-1)] \*/
472 uint8_t start_sym_id; /\*< start symbol Id [0-13] \*/
473 uint32_t nPrbElm; /\*< total number of PRB elements for given map [0- (XRAN_MAX_PRBS-1)] \*/
474 struct xran_prb_elm prbMap[XRAN_MAX_PRBS];
479 For the Bronze release C-plane sections are expected to be provided by L1
480 pipeline. If 100% of RBs always allocated single element of RB map
481 is expected to be allocated across all symbols. Dynamic RB allocation is
482 performed base on C-plane configuration.
484 The xRAN library will require that the content of the PRB map should be
485 sorted in increasing order of PRB first and then symbols.
490 Memory used for the exchange of IQ data as well as control information,
491 is controlled by the xRAN library. L1 application at the init stage
494 - init memory management subsystem
496 - init buffer management subsystem (via DPDK pools)
498 - allocate buffers (mbuf) for each CC, antenna, symbol, and direction \
499 (DL, UL, PRACH) for XRAN_N_FE_BUF_LEN TTIs.
501 - buffers are reused for every XRAN_N_FE_BUF_LEN TTIs
503 After the session is completed, the application can free buffers and
504 destroy the memory management subsystem.
506 From an implementation perspective, the xRAN library uses a standard
507 mbuf primitive and allocates a pool of buffers for each sector. This
508 function is performed using rte_pktmbuf_pool_create(),
509 rte_pktmbuf_alloc(), rte_pktmbuf_append() to allocate one buffer per
510 symbol for the mmWave case. More information on mbuf and DPDK pools can
511 be found in the DPDK documentation.
513 In the current implementation, mbuf, the number of buffers shared with
514 the L1 application is the same number of buffers used to send to and
515 receive from the Ethernet port. Memory copy operations are not required
516 if the packet size is smaller than or equal to MTU. Future versions of
517 the xRAN library are required to remove the memory copy requirement for
518 packets where the size larger than MTU.
520 External Interface Memory
521 ~~~~~~~~~~~~~~~~~~~~~~~~~
523 The xRAN library header file defines a set of structures to simplify
524 access to memory buffers used for IQ data.
526 struct xran_flat_buffer {
528 uint32_t nElementLenInBytes;
530 uint32_t nNumberOfElements;
532 uint32_t nOffsetInBytes;
542 struct xran_buffer_list {
544 uint32_t nNumBuffers;
546 struct xran_flat_buffer \*pBuffers;
550 void \*pPrivateMetaData;
560 int32_t nSegGenerated;
562 int32_t nSegTransferred;
564 struct rte_mbuf \*pData[N_MAX_BUFFER_SEGMENT];
566 struct xran_buffer_list sBufferList;
568 } BbuIoBufCtrlStruct;
570 There is no explicit requirement for user to organize a set of buffers
571 in this particular way. From a compatibility |br|
572 perspective it is useful to
573 follow the existing design of the 5G NR l1app used for Front Haul FPGA
574 and define structures shared between l1 and xRAN lib as shown:
579 sFrontHaulTxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR]\
580 [XRAN_MAX_ANTENNA_NR];
583 sFrontHaulTxPrbMapBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR];
586 sFrontHaulRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR];
589 sFrontHaulRxPrbMapBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR];
592 sFHPrachRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR];
597 sFHSrsRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANT_ARRAY_ELM_NR];
601 struct xran_flat_buffer
602 sFrontHaulTxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT];
604 struct xran_flat_buffer
605 sFrontHaulTxPrbMapBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT];
607 struct xran_flat_buffer
608 sFrontHaulRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT];
610 struct xran_flat_buffer
611 sFrontHaulRxPrbMapBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT];
613 struct xran_flat_buffer
614 sFHPrachRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT];
616 /\* Cat B SRS buffers \*/
618 struct xran_flat_buffer
619 sFHSrsRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_MAX_NUM_OF_SRS_SYMBOL_PER_SLOT];
621 Doxygen file and xran_fh_o_du.h provide more details on the definition
622 and usage of these structures.
624 xRAN Specific Functionality
625 ---------------------------
627 Front haul interface implementation in the general case is abstracted
628 away using the interface defined in xran_fh_o_du.h
630 The L1 application is not required to access xRAN protocol primitives
631 (eCPRI header, application header, and others) directly. It is
632 recommended to use the interface to remove dependencies between
633 different software modules such as the l1 pipeline and xRAN library.
638 The U-plane and C-plane APIs can be used directly from the application
639 if such an option is required. The set of header files can be exported
642 xran_fh_o_du.h – xRAN main header file for O-DU scenario
644 xran_cp_api.h – Control plane functions
646 xran_pkt_cp.h – xRAN control plane packet definition
648 xran_pkt.h – xRAN packet definition
650 xran_pkt_up.h – xRAN User plane packet definition
652 xran_sync_api.h – api functions to check PTP status
654 xran_timer.h – API for timing
656 xran_transport.h – eCPRI transport layer definition and api
658 xran_up_api.h – user plane functions and definitions
660 xran_compression.h – interface to compression/decompression functions
662 Doxygen files provide detailed information on functions and structures
670 Implementation of the C-plane set of functions is defined in
671 xran_cp_api.c and is used to prepare the content of C-plane packets
672 according to the given configuration. Users can enable/disable
673 generation of C-plane messages using enableCP field in struct
674 xran_fh_init structure during init of ORAN front haul. The time of
675 generation of C-plane message for DL and UL is done “Slot-based,” and
676 timing can be controlled using O-DU settings according to Table 4.
678 The C-plane module contains:
680 - initialization of C-plane database to keep track of allocation of
683 - code to prepare C-plane packet for TX (O-DU)
687 - append radio application header
689 - append control section header
691 - append control section
693 - parser of C-plane packet for RX (O-RU emulation)
695 - parses and checks Section 1 and Section 3 packet content
697 Sending and receiving packets is performed using xRAN ethdi sublayer
700 Creating a C-Plane Packet
701 ^^^^^^^^^^^^^^^^^^^^^^^^^
703 API and Data Structures
704 '''''''''''''''''''''''
706 A C-Plane message can be composed using the following API:
708 int xran_prepare_ctrl_pkt(struct rte_mbuf \*mbuf,
710 struct xran_cp_gen_params \*params,
712 uint8_t CC_ID, uint8_t Ant_ID, uint8_t seq_id);
714 mbuf is the pointer of a DPDK packet buffer, which is allocated from the
717 params are the pointer of the structure which has the parameters to
720 CC_ID is the parameter to specify component carrier index, Ant_ID is the
721 parameters to specify the antenna port index (RU port index).
723 seq_id is the sequence index for the message.
725 params, the parameters to create a C-Plane message are defined as the
726 structure of xran_cp_gen_params with an |br|
729 struct xran_cp_gen_params {
735 uint16_t numSections;
737 struct xran_cp_header_params hdr;
739 struct xran_section_gen_info \*sections;
743 dir is the direction of the C-Plane message to be generated. Available
744 parameters are defined as XRAN_DIR_UL and XRAN_DIR_DL.
746 sectionType is the section type for C-Plane message to generate, as ORAN
747 specification defines all sections in a C-Plane message shall have the
748 same section type. If different section types are required, they shall
749 be sent with separate C-Plane messages. Available types of sections are
750 defined as XRAN_CP_SECTIONTYPE_x. Please refer to the Table 5-2 Section
751 Types in chapter 5.4 of ORAN specification.
753 numSections is the total number of sections to generate, i.e., the
754 number of the array in sections (struct xran_section_gen_info).
756 hdr is the structure to hold the information to generate the radio
757 application and section header in the C-Plane message. It is defined as
758 the structure of xran_cp_header_params. Not all parameters in this
759 structure are used for the generation, and the required parameters are
760 slightly different by the type of section, as described in Table 10 and
763 Table 10. struct xran_cp_header_params – Common Radio Application Header
765 +------------+---------------------------------------------+---------+
766 | | Description | Remarks |
767 +============+=============================================+=========+
768 | filterIdx | Filter Index. Available values are defined | 5.4.4.3 |
769 | | as XRAN_FILTERINDEX_xxxxx. | |
770 +------------+---------------------------------------------+---------+
771 | frameId | Frame Index. It is modulo 256 of frame | 5.4.4.4 |
773 +------------+---------------------------------------------+---------+
774 | subframeId | Sub-frame Index. | 5.4.4.5 |
775 +------------+---------------------------------------------+---------+
776 | slotId | Slot Index. The maximum number is 15, as | 5.4.4.6 |
777 | | defined in the specification. | |
778 +------------+---------------------------------------------+---------+
779 | startSymId | Start Symbol Index. | 5.4.4.7 |
780 +------------+---------------------------------------------+---------+
782 Table 11. struct xran_cp_header_params – Section Specific Parameters
784 +----------+----------+----------+---------+---+---+---+---+----------+
785 | | Des\ | Section | Remarks | | | | | |
786 | | cription | Type | | | | | | |
787 | | | ap\ | | | | | | |
788 | | | plicable | | | | | | |
789 +==========+==========+==========+=========+===+===+===+===+==========+
790 | | | 0 | 1 | 3 | 5 | 6 | 7 | |
791 +----------+----------+----------+---------+---+---+---+---+----------+
792 | fftSize | FFT size | X | | X | | | | 5.4.4.13 |
793 | | in frame | | | | | | | |
794 | | st\ | | | | | | | |
795 | | ructure. | | | | | | | |
796 | | A\ | | | | | | | |
797 | | vailable | | | | | | | |
798 | | values | | | | | | | |
799 | | are | | | | | | | |
800 | | defined | | | | | | | |
801 | | as | | | | | | | |
802 | | X\ | | | | | | | |
803 | | RAN_FFTS\| | | | | | | |
804 | | IZE_xxxx | | | | | | | |
805 +----------+----------+----------+---------+---+---+---+---+----------+
806 | Scs | Su\ | X | | X | | | | 5.4.4.13 |
807 | | bcarrier | | | | | | | |
808 | | Spacing | | | | | | | |
809 | | in the | | | | | | | |
810 | | frame | | | | | | | |
811 | | st\ | | | | | | | |
812 | | ructure. | | | | | | | |
813 | | A\ | | | | | | | |
814 | | vailable | | | | | | | |
815 | | values | | | | | | | |
816 | | are | | | | | | | |
817 | | defined | | | | | | | |
818 | | as | | | | | | | |
819 | | XRAN_SCS\| | | | | | | |
820 | | _xxxx | | | | | | | |
821 +----------+----------+----------+---------+---+---+---+---+----------+
822 | iqWidth | I/Q bit | | X | X | X | | | 5.4.4.10 |
823 | | width in | | | | | | | |
824 | | user | | | | | | | 6.3.3.13 |
825 | | data | | | | | | | |
826 | | com\ | | | | | | | |
827 | | pression | | | | | | | |
828 | | header. | | | | | | | |
829 | | Should | | | | | | | |
830 | | be set | | | | | | | |
831 | | by zero | | | | | | | |
832 | | for | | | | | | | |
833 | | 16bits | | | | | | | |
834 +----------+----------+----------+---------+---+---+---+---+----------+
835 | compMeth | Com\ | | X | X | X | | | 5.4.4.10 |
836 | | pression | | | | | | | |
837 | | Method | | | | | | | 6.3.3.13 |
838 | | in user | | | | | | | |
839 | | data | | | | | | | |
840 | | com\ | | | | | | | |
841 | | pression | | | | | | | |
842 | | header. | | | | | | | |
843 | | A\ | | | | | | | |
844 | | vailable | | | | | | | |
845 | | values | | | | | | | |
846 | | are | | | | | | | |
847 | | defined | | | | | | | |
848 | | as | | | | | | | |
849 | | XRAN\ | | | | | | | |
850 | | _COMPMET\| | | | | | | |
851 | | HOD_xxxx | | | | | | | |
852 +----------+----------+----------+---------+---+---+---+---+----------+
853 | numUEs | Number | | | | | X | | 5.4.4.11 |
854 | | of UEs. | | | | | | | |
855 | | Applies | | | | | | | |
856 | | to | | | | | | | |
857 | | section | | | | | | | |
858 | | type 6 | | | | | | | |
859 | | and not | | | | | | | |
860 | | s\ | | | | | | | |
861 | | upported | | | | | | | |
862 | | in this | | | | | | | |
863 | | release. | | | | | | | |
864 +----------+----------+----------+---------+---+---+---+---+----------+
865 | ti\ | Time | X | | X | | | | 5.4.4.12 |
866 | meOffset | Offset. | | | | | | | |
867 | | Time | | | | | | | |
868 | | offset | | | | | | | |
869 | | from the | | | | | | | |
870 | | start of | | | | | | | |
871 | | the slot | | | | | | | |
872 | | to start | | | | | | | |
873 | | of | | | | | | | |
874 | | Cyclic | | | | | | | |
875 | | Prefix. | | | | | | | |
876 +----------+----------+----------+---------+---+---+---+---+----------+
877 | cpLength | Cyclic | X | | X | | | | 5.4.4.14 |
878 | | Prefix | | | | | | | |
879 | | Length. | | | | | | | |
880 +----------+----------+----------+---------+---+---+---+---+----------+
882 **Only sections types 1 and 3 are supported in the current release.**
884 Sections are the pointer to the array of structure which has the
885 parameters for section(s) and it is defined as below:
887 struct xran_section_gen_info {
889 struct xran_section_info info;
901 } exData[XRAN_MAX_NUM_EXTENSIONS];
905 info is the structure to hold the information to generate section and it
906 is defined as the structure of xran_section_info. Like
907 xran_cp_header_params, all parameters are not required to generate
908 section and Table 12 describes which |br|
909 parameters are required for each
912 Table 12. Parameters for Sections
914 +-------+-------+-------+-------+-------+-------+-------+-------+
915 | | D\ | Se\ | Re\ | | | | |
916 | | escri\| ction | marks | | | | |
917 | | ption | Type | | | | | |
918 | | | appli\| | | | | |
919 | | | cable | | | | | |
920 +=======+=======+=======+=======+=======+=======+=======+=======+
921 | | | 0 | 1 | 3 | 5 | 6 | |
922 +-------+-------+-------+-------+-------+-------+-------+-------+
923 | Id | Se\ | **X** | **X** | **X** | **X** | **X** | 5.\ |
924 | | ction | | | | | | 4.5.1 |
926 | | denti\| | | | | | |
927 | | fier. | | | | | | |
928 +-------+-------+-------+-------+-------+-------+-------+-------+
929 | Rb | Res\ | **X** | **X** | **X** | **X** | **X** | 5.\ |
930 | | ource | | | | | | 4.5.2 |
931 | | Block\| | | | | | |
932 | | Indic\| | | | | | |
933 | | ator. | | | | | | |
934 | | Avai\ | | | | | | |
935 | | lable | | | | | | |
937 | | alues | | | | | | |
938 | | are | | | | | | |
939 | | de\ | | | | | | |
940 | | fined | | | | | | |
942 | | XRAN\ | | | | | | |
944 | | RBI\ | | | | | | |
945 | | ND_xx\| | | | | | |
946 | | xx. | | | | | | |
947 +-------+-------+-------+-------+-------+-------+-------+-------+
948 | s\ | S\ | **X** | **X** | **X** | **X** | **X** | 5.\ |
949 | ymInc | ymbol | | | | | | 4.5.3 |
951 | | umber | | | | | | |
952 | | Incr\ | | | | | | |
953 | | ement | | | | | | |
954 | | com\ | | | | | | |
955 | | mand. | | | | | | |
956 | | Avai\ | | | | | | |
957 | | lable | | | | | | |
959 | | alues | | | | | | |
960 | | are | | | | | | |
961 | | de\ | | | | | | |
962 | | fined | | | | | | |
964 | | XRA\ | | | | | | |
965 | | N_SYM\| | | | | | |
966 | | BOL\ | | | | | | |
967 | | NUMBE\| | | | | | |
968 | | R_xx\ | | | | | | |
969 | | xx. | | | | | | |
970 +-------+-------+-------+-------+-------+-------+-------+-------+
971 | star\ | Sta\ | **X** | **X** | **X** | **X** | **X** | 5.\ |
972 | tPrbc | rting\| | | | | | 4.5.4 |
973 | | PRB | | | | | | |
975 | | data | | | | | | |
976 | | se\ | | | | | | |
977 | | ction | | | | | | |
978 | | de\ | | | | | | |
979 | | scrip\| | | | | | |
980 | | tion. | | | | | | |
981 +-------+-------+-------+-------+-------+-------+-------+-------+
982 | nu | The | **X** | **X** | **X** | **X** | **X** | 5.\ |
983 | mPrbc | n\ | | | | | | 4.5.6 |
984 | | umber | | | | | | |
986 | | conti\| | | | | | |
987 | | guous | | | | | | |
988 | | PRBs | | | | | | |
989 | | per | | | | | | |
990 | | data | | | | | | |
991 | | se\ | | | | | | |
992 | | ction | | | | | | |
993 | | de\ | | | | | | |
994 | | scrip\| | | | | | |
995 | | tion. | | | | | | |
996 | | When | | | | | | |
997 | | nu\ | | | | | | |
998 | | mPrbc | | | | | | |
1000 | | gr\ | | | | | | |
1001 | | eater | | | | | | |
1002 | | than | | | | | | |
1003 | | 255, | | | | | | |
1004 | | it | | | | | | |
1005 | | will | | | | | | |
1006 | | be | | | | | | |
1007 | | conv\ | | | | | | |
1008 | | erted | | | | | | |
1009 | | to | | | | | | |
1010 | | zero | | | | | | |
1011 | | by | | | | | | |
1012 | | the | | | | | | |
1013 | | macro | | | | | | |
1014 | | (XR\ | | | | | | |
1015 | | AN_CO\| | | | | | |
1016 | | NVERT\| | | | | | |
1017 | | _NUMP\| | | | | | |
1018 | | RBC). | | | | | | |
1019 +-------+-------+-------+-------+-------+-------+-------+-------+
1020 | r\ | Res\ | **X** | **X** | **X** | **X** | | 5.\ |
1021 | eMask | ource\| | | | | | 4.5.5 |
1022 | | El\ | | | | | | |
1023 | | ement\| | | | | | |
1024 | | Mask. | | | | | | |
1025 +-------+-------+-------+-------+-------+-------+-------+-------+
1026 | numS\ | N\ | **X** | **X** | **X** | **X** | | 5.\ |
1027 | ymbol | umber | | | | | | 4.5.7 |
1028 | | of | | | | | | |
1029 | | Sym\ | | | | | | |
1030 | | bols. | | | | | | |
1031 +-------+-------+-------+-------+-------+-------+-------+-------+
1032 | b\ | Beam\ | | **X** | **X** | | | 5.\ |
1033 | eamId | I\ | | | | | | 4.5.9 |
1034 | | denti\| | | | | | |
1035 | | fier. | | | | | | |
1036 +-------+-------+-------+-------+-------+-------+-------+-------+
1037 | freqO\| Freq\ | | | **X** | | | 5.4\ |
1038 | ffset | uency\| | | | | | .5.11 |
1039 | | Of\ | | | | | | |
1040 | | fset. | | | | | | |
1041 +-------+-------+-------+-------+-------+-------+-------+-------+
1042 | ueId | UE\ | | | | **X** | **X** | 5.4\ |
1043 | | i\ | | | | | | .5.10 |
1044 | | denti\| | | | | | |
1045 | | fier. | | | | | | |
1046 | | Not | | | | | | |
1047 | | supp\ | | | | | | |
1048 | | orted | | | | | | |
1049 | | in | | | | | | |
1050 | | this | | | | | | |
1051 | | rel\ | | | | | | |
1052 | | ease. | | | | | | |
1053 +-------+-------+-------+-------+-------+-------+-------+-------+
1054 | regF\ | Regu\ | | | | | **X** | 5.4\ |
1055 | actor | lariz\| | | | | | .5.12 |
1056 | | ation | | | | | | |
1057 | | Fa\ | | | | | | |
1058 | | ctor. | | | | | | |
1059 | | Not | | | | | | |
1060 | | supp\ | | | | | | |
1061 | | orted | | | | | | |
1062 | | in | | | | | | |
1063 | | this | | | | | | |
1064 | | re\ | | | | | | |
1065 | | lease | | | | | | |
1066 +-------+-------+-------+-------+-------+-------+-------+-------+
1067 | Ef | Exte\ | | **X** | **X** | **X** | **X** | 5.\ |
1068 | | nsion | | | | | | 4.5.8 |
1069 | | Flag. | | | | | | |
1070 | | Not | | | | | | |
1071 | | supp\ | | | | | | |
1072 | | orted | | | | | | |
1073 | | in | | | | | | |
1074 | | this | | | | | | |
1075 | | rel\ | | | | | | |
1076 | | ease. | | | | | | |
1077 +-------+-------+-------+-------+-------+-------+-------+-------+
1079 **Only sections types 1 and 3 are supported in the current release.**
1081 **The xran_section_info has more parameters – type, startSymId, iqWidth,
1082 compMeth. These are the same parameters as those of radio application
1083 or section header but need to be copied into this structure again for
1084 the section data base.**
1086 exDataSize and exData are used to add section extensions for the
1089 exDataSize is the number of elements in the exData array. The maximum
1090 number of elements is defined as XRAN_MAX_NUM_EXTENSIONS and it is
1091 defined by four in this release with the assumption that four different
1092 types of section extensions can be added to a section (section extension
1093 type 3 is excluded since it is not supported). exData.type is the type
1094 of section extension and exData.len is the length of structure of
1095 section extension parameter in exData.data. exData.data is the pointer
1096 to the structure of section extensions and different structures are used
1097 by the type of section extensions like below.
1099 struct xran_sectionext1_info {
1101 uint16_t rbNumber; /* number RBs to ext1 chain \*/
1103 uint16_t bfwNumber; /* number of bf weights in this section \*/
1107 uint8_t bfwCompMeth;
1109 int16_t \*p_bfwIQ; /* pointer to formed section extention \*/
1111 int16_t bfwIQ_sz; /* size of buffer with section extention information
1118 uint8_t blockScaler;
1120 uint8_t compBitWidthShift;
1122 uint8_t activeBeamspaceCoeffMask[XRAN_MAX_BFW_N]; /\* ceil(N/8)*8,
1123 should be multiple of 8 \*/
1129 For section extension type 1, the structure of xran_sectionext1_info is
1130 used. Please note that the xRAN library will use bfwIQ (beamforming
1131 weight) as-is, i.e., xRAN library will not perform the compression, so
1132 the user should provide proper data to bfwIQ.
1134 struct xran_sectionext2_info {
1136 uint8_t bfAzPtWidth;
1140 uint8_t bfZePtWidth;
1144 uint8_t bfAz3ddWidth;
1148 uint8_t bfZe3ddWidth;
1158 For section extension type 2, the structure of xran_sectionext2_info is
1159 used. Each parameter will be packed as specified bit width.
1161 struct xran_sectionext4_info {
1167 uint16_t modCompScaler;
1171 For section extension type 4, the structure of xran_sectionext4_info is
1174 struct xran_sectionext5_info {
1182 uint16_t mcScaleReMask;
1184 uint16_t mcScaleOffset;
1186 } mc[XRAN_MAX_MODCOMP_ADDPARMS];
1190 For section extension type 5, the structure of xran_sectionext5_info is
1191 used. Please note that current implementation supports maximum two sets
1192 of additional parameters.
1194 **Section extensions type 3 is not supported since it is LTE specific.**
1196 Section Extensions are not fully verified in this release.
1198 Detail Procedures in API
1199 ''''''''''''''''''''''''
1201 xran_prepare_ctrl_pkt() has several procedures to compose a C-Plane
1204 1. Append transport header
1206 - Reserve eCPRI header space in the packet buffer
1208 - eCPRI version is fixed by XRAN_ECPRI_VER (0x0001)
1210 - Concatenation and transport layer fragmentation is not supported.
1212 ecpri_concat=0, ecpri_seq_id.sub_seq_id=0 and ecpri_seq_id.e_bit=1
1214 - The caller needs to provide a component carrier index, antenna index,
1215 and message identifier through function arguments.
1217 CC_ID, Ant_ID and seq_id
1219 - ecpriRtcid (ecpri_xtc_id) is composed with CC_ID and Ant_ID by
1222 - DU port ID and band sector ID are fixed by zero in this release.
1224 - The output of xran_compose_cid is stored in network byte order.
1226 - The length of the payload is initialized by zero.
1228 2. Append radio application header:
1230 - xran_append_radioapp_header() checks the type of section through
1231 params->sectionType and determines proper function to append
1232 remaining header components.
1234 - Only section type 1 and 3 are supported, returns
1235 XRAN_STATUS_INVALID_PARAM for other types.
1237 - Each section uses a different function to compose the remaining
1238 header and size to calculate the total length in the transport
1241 For section type 1, xran_prepare_section1_hdr() and sizeof(struct
1242 xran_cp_radioapp_section1_header)
1244 For section type 3, xran_prepare_section3_hdr() and sizeof(struct
1245 xran_cp_radioapp_section3_header)
1247 - Reserves the space of common radio application header and composes
1248 header by xran_prepare_radioapp_common_header().
1250 - The header is stored in network byte order.
1252 - Appends remaining header components by the selected function above
1254 - The header is stored in network byte order
1256 3. Append section header and section
1258 - xran_append_control_section() determines proper size and function to
1259 append section header and contents.
1261 - For section type 1, xran_prepare_section1() and sizeof(struct
1262 xran_cp_radioapp_section1)
1264 - For section type 3, xran_prepare_section3() and sizeof(struct
1265 xran_cp_radioapp_section3)
1267 - Appends section header and section(s) by selected function above.
1269 - If multiple sections are configured, then those will be added.
1271 - Since fragmentation is not considered in this implementation, the
1272 total length of a single C-Plane message shall not exceed MTU
1275 - The header and section(s) are stored in network byte order.
1277 - Appends section extensions if it is set (ef=1)
1279 - xran_append_section_extensions() adds all configured extensions by
1282 - xran_prepare_sectionext_x() (x = 1,2,4,5) will be called by the
1283 type from xran_append_section_extensions() and these functions
1284 will create extension field.
1286 **Example Usage of API**
1287 ''''''''''''''''''''''''
1289 There are two reference usages of API to generate C-Plane message in
1290 lib/src/xran_common.c
1292 - generate_cpmsg_dlul()
1294 - generate_cpmsg_prach()
1296 generate_cpmsg_dlul() is to generate the C-Plane message with section
1297 type 1 for DL or UL symbol data scheduling.
1299 This function has hardcoded values for some parameters such as:
1301 - The filter index is fixed to XRAN_FILTERINDEX_STANDARD.
1303 - RB indicator is fixed to XRAN_RBIND_EVERY.
1305 - Symbol increment is not used (XRAN_SYMBOLNUMBER_NOTINC)
1307 - Resource Element Mask is fixed to 0xfff
1309 The extension is not used.
1311 After C-Plane message generation, API send_cpmsg() is called. This
1312 function also includes the implementation for these capabilities:
1314 - Send the generated packet to the TX ring after adding an Ethernet
1317 - Add section information of generated C-Plane packet to section
1318 database, to generate U-plane message by C-Plane configuration
1320 send_cpmsg_prach() is to generate the C-Plane message with section type
1321 3 for PRACH scheduling.
1323 This functions also has some hardcoded values for the following
1326 - RB indicator is fixed to XRAN_RBIND_EVERY.
1328 - Symbol increment is not used (XRAN_SYMBOLNUMBER_NOTINC).
1330 - Resource Element Mask is fixed to 0xfff.
1332 And similar to generate_cpmsg_dlul(), after this function generates the
1333 message, send_cpmsg() sends the generated packet to the TX ring and adds
1334 section information of the packet to the section database. Checking and
1335 parsing received PRACH symbol data by section information from the
1336 C-Plane are not implemented in this release.
1338 Example Configuration of C-Plane Messages
1339 '''''''''''''''''''''''''''''''''''''''''
1341 C-Plane messages can be composed through API, and the sample application
1342 shows several reference usages of the configuration for different
1345 Below are the examples of C-Plane message configuration with a sample
1346 application for mmWave – numerology 3, 100 MHz bandwidth, TDD (DDDS)
1348 **C-Plane Message – downlink symbol data for a downlink slot**
1350 - Single CP message with the single section of section type 1
1352 - Configures single CP message for all consecutive downlink symbols
1354 - Configures whole RBs (66) for a symbol
1356 - Compression and beamforming are not used
1358 Common Header Fields::
1360 - dataDirection = XRAN_DIR_DL
1361 - payloadVersion = XRAN_PAYLOAD_VER
1362 - filterIndex = XRAN_FILTERINDEX_STANDARD
1364 - subframeId = [0..9]
1367 - numberOfsections = 1
1368 - sectionType = XRAN_CP_SECTIONTYPE_1
1369 - udCompHdr.idIqWidth = 0
1370 - udCompHdr.udCompMeth = XRAN_COMPMETHOD_NONE
1375 - sectionId = [0..4095]
1376 - rb = XRAN_RBIND_EVERY
1377 - symInc = XRAN_SYMBOLNUMBER_NOTINC
1386 **C-Plane Message – uplink symbol data for uplink slot**
1388 - Single CP message with the single section of section type 1
1390 - Configures single CP message for all consecutive uplink symbols (UL
1391 symbol starts from 3)
1393 - Configures whole RBs (66) for a symbol
1395 - Compression and beamforming are not used
1397 Common Header Fields::
1399 - dataDirection = XRAN_DIR_UL
1400 - payloadVersion = XRAN_PAYLOAD_VER
1401 - filterIndex = XRAN_FILTERINDEX_STANDARD
1403 - subframeId = [0..9]
1406 - numberOfsections = 1
1407 - sectionType = XRAN_CP_SECTIONTYPE_1
1408 - udCompHdr.idIqWidth = 0
1409 - udCompHdr.udCompMeth = XRAN_COMPMETHOD_NONE
1414 - sectionId = [0..4095]
1415 - rb = XRAN_RBIND_EVERY
1416 - symInc = XRAN_SYMBOLNUMBER_NOTINC
1425 **C-Plane Message – PRACH**
1427 - Single CP message with the single section of section type 3 including
1430 - Configures PRACH format A3, config index 81, and detail parameters
1437 - Time offset : 2026
1441 - Subcarrier spacing : 120KHz
1443 - Start symbol index : 7
1445 - Number of symbols : 6
1447 - Number of PRBCs : 12
1449 - Frequency offset : -792
1451 - Compression and beamforming are not used
1453 Common Header Fields::
1455 - dataDirection = XRAN_DIR_UL
1456 - payloadVersion = XRAN_PAYLOAD_VER
1457 - filterIndex = XRAN_FILTERINDEPRACH_ABC
1459 - subframeId = [0,3]
1462 - numberOfSections = 1
1463 - sectionType = XRAN_CP_SECTIONTYPE_3
1465 - frameStructure.FFTSize = XRAN_FFTSIZE_1024
1466 - frameStructure.u = XRAN_SCS_120KHZ
1468 - udCompHdr.idIqWidth = 0
1469 - udCompHdr.udCompMeth = XRAN_COMPMETHOD_NONE
1473 - sectionId = [0..4095]
1474 - rb = XRAN_RBIND_EVERY
1475 - symInc = XRAN_SYMBOLNUMBER_NOTINC
1482 - frequencyOffset = -792
1486 Functions to Store/Retrieve Section Information
1487 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1489 There are several functions to store/retrieve section information of
1490 C-Plane messages. Since U-plane messages must be generated by the
1491 information in the sections of a C-Plane message, it is required to
1492 store and retrieve section information.
1494 **APIs and Data Structure**
1495 '''''''''''''''''''''''''''
1497 APIs for initialization and release storage are:
1499 - int xran_cp_init_sectiondb(void \*pHandle);
1501 - int xran_cp_free_sectiondb(void \*pHandle);
1503 APIs to store and retrieve section information are:
1505 - int xran_cp_add_section_info(void \*pHandle, uint8_t dir, uint8_t
1506 cc_id, uint8_t ruport_id, uint8_t ctx_id, struct xran_section_info
1509 - int xran_cp_add_multisection_info(void \*pHandle, uint8_t cc_id,
1510 uint8_t ruport_id, uint8_t ctx_id, struct xran_cp_gen_params
1513 - struct xran_section_info \*xran_cp_find_section_info(void \*pHandle,
1514 uint8_t dir, uint8_t cc_id, uint8_t ruport_id, uint8_t ctx_id,
1515 uint16_t section_id);
1517 - struct xran_section_info \*xran_cp_iterate_section_info(void
1518 \*pHandle, uint8_t dir, uint8_t cc_id, uint8_t ruport_id, uint8_t
1519 ctx_id, uint32_t \*next);
1521 - int xran_cp_getsize_section_info(void \*pHandle, uint8_t dir, uint8_t
1522 cc_id, uint8_t ruport_id, uint8_t ctx_id);
1524 APIs to reset the storage for a new slot are:
1526 - int xran_cp_reset_section_info(void \*pHandle, uint8_t dir, uint8_t
1527 cc_id, uint8_t ruport_id, uint8_t ctx_id);
1529 The structure of xran_section_info is used to store/retrieve
1530 information. This is the same structure used to generate a C-Plane
1531 message. Please refer to Section 5.4.2.1.1 for more details.
1533 The storage for section information is declared as a multi-dimensional
1534 array and declared as a local static variable to limit direct access.
1535 Each item is defined as the structure of xran_sectioninfo_db, and it has
1536 the number of stored section information items (cur_index) and the array
1537 of the information (list), as shown below.
1541 \* This structure to store the section information of C-Plane
1543 \* in order to generate and parse corresponding U-Plane \*/
1545 struct xran_sectioninfo_db {
1547 uint32_t cur_index; /* Current index to store for this eAXC \*/
1549 struct xran_section_info list[XRAN_MAX_NUM_SECTIONS]; /* The array of
1550 section information \*/
1554 static struct xran_sectioninfo_db
1555 sectiondb[XRAN_MAX_SECTIONDB_CTX][XRAN_DIR_MAX][XRAN_COMPONENT_CARRIERS_MAX][XRAN_MAX_ANTENNA_NR*2
1556 + XRAN_MAX_ANT_ARRAY_ELM_NR];
1558 The maximum size of the array can be adjusted if required by system
1559 configuration. Since transmission and reception window of U-Plane can be
1560 overlapped with the start of new C-Plane for next slot, functions have
1561 context index to identify and protect the information. Currently the
1562 maximum number of context is defined by two and it can be adjusted if
1565 Note. Since the context index is not managed by the library and APIs are
1566 expecting it from the caller as a parameter, the caller shall
1567 consider a proper method to manage it to avoid corruption. The
1568 current reference implementation uses a slot and subframe index to
1569 calculate the context index.
1571 **Example Usage of APIs**
1572 '''''''''''''''''''''''''
1574 There are references to show the usage of APIs as below.
1576 - Initialization and release:
1578 - xran_cp_init_sectiondb(): xran_open() in lib/src/xran_main.c
1580 - xran_cp_free_sectiondb(): xran_close() in lib/src/xran_main.c
1582 - Store section information:
1584 - xran_cp_add_section_info(): send_cpmsg_dlul() and
1585 send_cpmsg_prach()in lib/src/xran_main.c
1587 - Retrieve section information:
1589 - xran_cp_iterate_section_info(): xran_process_tx_sym() in
1592 - xran_cp_getsize_section_info(): xran_process_tx_sym() in
1595 - Reset the storage for a new slot:
1597 - xran_cp_reset_section_info(): tx_cp_dl_cb() and tx_cp_ul_cb() in
1600 **Function for RU emulation and Debug**
1601 '''''''''''''''''''''''''''''''''''''''
1603 xran_parse_cp_pkt() is a function which can be utilized for RU emulation
1604 or debug. It is defined below:
1606 int xran_parse_cp_pkt(struct rte_mbuf \*mbuf,
1608 struct xran_cp_gen_params \*result,
1610 struct xran_recv_packet_info \*pkt_info);
1612 It parses a received C-Plane packet and retrieves the information from
1613 its headers and sections.
1615 The retrieved information is stored in the structures:
1617 struct xran_cp_gen_params: section information from received C-Plane
1620 struct xran_recv_packet_info: transport layer header information (eCPRI
1623 These functions can be utilized to debug or RU emulation purposes.
1630 Single Section is the default mode of xRAN packet creation. It assumes
1631 that there is only one section per packet, and all IQ samples are
1632 attached to it. Compression is not supported.
1634 A message is built in mbuf space given as a parameter. The library
1635 builds eCPRI header filling structure fields by taking the IQ sample
1636 size and populating a particular packet length and sequence number.
1638 With compression, supported IQ bit widths are 8,9,10,12,14.
1640 Implementation of a U-plane set of functions is defined in xran_up_api.c
1641 and is used to prepare U-plane packet content according to the given
1644 The following list of functions is implemented for U-plane:
1646 - Build eCPRI header
1648 - Build application header
1650 - Build section header
1652 - Append IQ samples to packet
1654 - Prepare full symbol of xRAN data for single eAxC
1656 - Process RX packet per symbol.
1658 The time of generation of a U-plane message for DL and UL is
1659 “symbol-based” and can be controlled using O-DU settings (O-RU),
1660 according to Table 4.
1665 The xRAN library has a set of functions used to assist in packet
1666 processing and data exchange not directly used for xRAN packet
1672 The sense of time for the xRAN protocol is obtained from system time,
1673 where the system timer is synchronized to GPS time via PTP protocol
1674 using the Linux PHP package. On the software side, a simple polling loop
1675 is utilized to get time up to nanosecond precision and particular packet
1676 processing jobs are scheduled via the DPDK timer.
1678 long poll_next_tick(int interval)
1682 struct timespec start_time;
1684 struct timespec cur_time;
1690 clock_gettime(CLOCK_REALTIME, &start_time);
1692 target_time = (start_time.tv_sec \* NSEC_PER_SEC + start_time.tv_nsec +
1693 interval \* NSEC_PER_USEC) / (interval \* NSEC_PER_USEC) \* interval;
1699 clock_gettime(CLOCK_REALTIME, &cur_time);
1701 delta = (cur_time.tv_sec \* NSEC_PER_SEC + cur_time.tv_nsec) -
1702 target_time \* NSEC_PER_USEC;
1704 if(delta > 0 \|\| (delta < 0 && abs(delta) < THRESHOLD))
1718 Polling is used to achieve the required precision of symbol time. For
1719 example, in the mmWave scenario, the symbol time is 125µs/14=~8.9µs.
1720 Small deterministic tasks can be executed within the polling interval
1721 provided. It’s smaller than the symbol interval time.
1726 DPDK provides sets of primitives (struct rte_rimer) and functions
1727 (rte_timer_reset_sync() rte_timer_manage()) to |br|
1728 schedule processing of
1729 function as timer. The timer is based on the TSC clock and is not
1730 synchronized to PTP time. As a |br|
1731 result, this timer cannot be used as a
1732 periodic timer because the TSC clock can drift substantially relative to
1733 the system timer which in turn is synchronized to PTP (GPS)
1735 Only single-shot timers are used to schedule processing based on
1736 events such as symbol time. The packet |br|
1738 calls rte_timer_manage() in the loop, and the resulting execution of
1739 timer function happens right |br|
1740 after the timer was “armed”.
1745 xran_init_port() function performs initialization of DPDK ETH port.
1746 Standard port configuration is used as per reference example from DPDK.
1748 Jumbo Frames are used by default. Mbufs size is extended to support 9600
1751 Mac address and VLAN tag are expected to be configured by Infrastructure
1752 software. See Appendix A.4.
1754 From an implementation perspective, modules provide functions to handle:
1760 - Send and Receive mbuf.
1765 Ethdi provides functionality to work with the content of an Ethernet
1766 packet and dispatch processing to/from the xRAN layer. Ethdi
1767 instantiates a main PMD driver thread and dispatches packets between the
1768 ring and RX/TX using rte_eth_rx_burst() and rte_eth_tx_burst() DPDK
1771 For received packets, it maintains a set of handlers for ethertype
1772 handlers and xRAN layer register one xRAN ethtype |br|
1773 0xAEFE, resulting in
1774 packets with this ethertype being routed to the xRAN processing
1775 function. This function checks the message type of the eCPRI header and
1776 dispatches packet to either C-plane processing or U-plane processing.
1778 Initialization of memory pools, allocation and freeing of mbuf for
1779 Ethernet packets occur in this layer.