21 #include <sys/syscall.h> 46 #define MAX_BBU_POOL_CORE_MASK (4) 49 #define SW_FPGA_TOTAL_BUFFER_LEN 4*1024*1024*1024 50 #define SW_FPGA_SEGMENT_BUFFER_LEN 1*1024*1024*1024 51 #define SW_FPGA_FH_TOTAL_BUFFER_LEN 1*1024*1024*1024 52 #define FPGA_TO_SW_PRACH_RX_BUFFER_LEN (8192) 54 #define NSEC_PER_SEC 1000000000 56 #define MAX_PKT_BURST (448+4) // 4x14x8 57 #define N_MAX_BUFFER_SEGMENT MAX_PKT_BURST 59 #define MAIN_PRIORITY 98 60 #define NUM_OF_SUBFRAME_PER_FRAME (10) 65 static volatile uint64_t timer_last_irq_tick = 0;
66 static uint64_t tsc_resolution_hz = 0;
181 #define CPU_HZ tick_per_usec //us 192 static void print_menu()
194 puts(
"+---------------------------------------+");
195 puts(
"| Press 1 to start 5G NR XRAN traffic |");
196 puts(
"| Press 2 reserved for future use |");
197 puts(
"| Press 3 to quit |");
198 puts(
"+---------------------------------------+");
205 uint32_t nSubframeIdx;
209 uint32_t nXranTime =
xran_get_slot_idx(&nFrameIdx, &nSubframeIdx, &nSlotIdx, &nSecond);
211 + nSubframeIdx*nNrOfSlotInSf
214 printf(
"\nxranTime is %d, return is %d, radio frame is %d, subframe is %d slot is %d tsc is %llu us",
229 uint32_t mlogVar[10];
230 uint32_t mlogVarCnt = 0;
232 uint8_t nNrOfSlotInSf = 1<<Numerlogy;
233 int32_t sfIdx = get_xran_sfidx(nNrOfSlotInSf);
235 mlogVar[mlogVarCnt++] = 0xCCCCCCCC;
236 mlogVar[mlogVarCnt++] = status >> 16;
237 mlogVar[mlogVarCnt++] = status & 0xFF;
238 mlogVar[mlogVarCnt++] = (uint32_t)sfIdx;
249 uint32_t mlogVar[10];
250 uint32_t mlogVarCnt = 0;
252 mlogVar[mlogVarCnt++] = 0xDDDDDDDD;
253 mlogVar[mlogVarCnt++] = status >> 16;
254 mlogVar[mlogVarCnt++] = status & 0xFF;
264 uint32_t mlogVar[10];
265 uint32_t mlogVarCnt = 0;
267 mlogVar[mlogVarCnt++] = 0xCCCCCCCC;
268 mlogVar[mlogVarCnt++] = status >> 16;
269 mlogVar[mlogVarCnt++] = status & 0xFF;
294 unsigned long tsc_64;
302 __asm
volatile(
"rdtsc" :
306 ret = ((
unsigned long)tsc.tsc_64);
325 #define NS_PER_SEC 1E9 326 struct timespec sleeptime = {.tv_nsec = 5E8 };
327 struct timespec t_start, t_end;
328 uint64_t tsc_resolution_hz = 0;
330 if (clock_gettime(CLOCK_MONOTONIC_RAW, &t_start) == 0)
333 nanosleep(&sleeptime,NULL);
334 clock_gettime(CLOCK_MONOTONIC_RAW, &t_end);
336 ns = ((t_end.tv_sec - t_start.tv_sec) *
NS_PER_SEC);
337 ns += (t_end.tv_nsec - t_start.tv_nsec);
340 tsc_resolution_hz = (
unsigned long)((end - start)/secs);
343 printf(
"System clock (rdtsc) resolution %lu [Hz]\n", tsc_resolution_hz);
406 printf (
"XRAN front haul xran_mm_init \n");
410 printf (
"Failed at XRAN front haul xran_mm_init \n");
420 printf (
"get sector instance failed %d for XRAN nInstanceNum %d\n",k, psBbuIo->
nInstanceNum);
424 printf(
"%s [%d]: CC %d handle %p\n", __FUNCTION__, k, i, psBbuIo->
nInstanceHandle[0][i]);
428 printf(
"Sucess xran_mm_init \n");
430 ptrLibConfig = gpXranLibConfig;
435 ptrLibConfig->pFecInstanceHandles = &(psBbuIo->
nInstanceHandle[FPGA_FEC][0]);
438 ptrLibConfig->
nFhConfig = psFPGAInitPara->nEthPorts;
441 ptrLibConfig->
nNrOfSlotInSf = pConfigParams->nNumOfSlotPerSubframe;
442 if (pConfigParams->nNumerology < 3)
444 ptrLibConfig->
nSectorNum = psFPGAInitPara->nSecNum;
450 printf (
"could not allocate ptrLibConfig in init_xran\n");
454 printf(
"nSectorNum %d\n", nSectorNum);
460 printf(
"nSectorIndex[%d] = %d\n",i, nSectorIndex[i]);
464 rte_panic(
"Failed at xran_bm_init , status %d\n", status);
483 rte_panic(
"Failed at xran_bm_allocate_buffer , status %d\n",status);
489 u32dptr = (uint32_t*)(ptr);
490 uint8_t *ptr_temp = (uint8_t *)ptr;
506 rte_panic(
"Failed at xran_bm_init , status %d\n", status);
513 rte_panic(
"Failed at xran_bm_init , status %d\n", status);
532 rte_panic(
"Failed at xran_bm_allocate_buffer , status %d\n",status);
547 for (elm_id = 0; elm_id < p_rb_map->
nPrbElm; elm_id++){
552 rte_panic(
"SD Failed at xran_bm_allocate_buffer , status %d\n",status);
569 printf(
"Failed at xran_bm_init, status %d\n", status);
589 rte_panic(
"Failed at xran_bm_allocate_buffer , status %d\n",status);
594 u32dptr = (uint32_t*)(ptr);
595 uint8_t *ptr_temp = (uint8_t *)ptr;
611 rte_panic(
"Failed at xran_bm_init , status %d\n", status);
617 rte_panic(
"Failed at xran_bm_init, status %d\n", status);
634 rte_panic(
"Failed at xran_bm_allocate_buffer , status %d\n",status);
649 for (elm_id = 0; elm_id < p_rb_map->
nPrbElm; elm_id++){
654 rte_panic(
"SD Failed at xran_bm_allocate_buffer , status %d\n",status);
672 rte_panic(
"Failed at xran_bm_init, status %d\n", status);
690 rte_panic(
"Failed at xran_bm_allocate_buffer, status %d\n",status);
695 u32dptr = (uint32_t*)(ptr);
711 rte_panic(
"Failed at xran_bm_init, status %d\n", status);
729 rte_panic(
"Failed at xran_bm_allocate_buffer, status %d\n",status);
734 u32dptr = (uint32_t*)(ptr);
768 pFthTxPrbMapBuffer[i],
770 pFthRxPrbMapBuffer[i],
799 int32_t cc_id, ant_id, sym_id, tti;
802 uint8_t frame_id = 0;
803 uint8_t subframe_id = 0;
820 printf (
"init_xran_iq_content\n");
829 flowId = XRAN_MAX_ANTENNA_NR*cc_id + ant_id;
856 for (idxElm = 0; idxElm < pRbMap->
nPrbElm; idxElm++){
857 p_pRbMapElm = &pRbMap->
prbMap[idxElm];
860 int16_t ext_len = 9600;
861 int16_t ext_sec_total = 0;
867 ext_buf += (RTE_PKTMBUF_HEADROOM +
869 sizeof(struct xran_cp_radioapp_section1));
871 ext_len -= (RTE_PKTMBUF_HEADROOM +
873 sizeof(struct xran_cp_radioapp_section1));
880 if(ext_sec_total > 0){
884 rte_panic(
"xran_cp_populate_section_ext_1 return error [%d]\n", ext_sec_total);
887 rte_panic(
"xran_malloc return NULL\n");
893 printf(
"DL pRbMap ==NULL\n");
902 u8dptr = (uint8_t*)ptr;
903 int16_t payload_len = 0;
905 uint8_t *dst = (uint8_t *)u8dptr;
906 uint8_t *src = (uint8_t *)pos;
909 for (idxElm = 0; idxElm < pRbMap->
nPrbElm; idxElm++) {
911 p_prbMapElm = &pRbMap->
prbMap[idxElm];
914 if(p_sec_desc == NULL){
915 printf (
"p_sec_desc == NULL\n");
922 rte_memcpy(dst, src, payload_len);
931 bfp_com_req.
data_in = (int16_t*)src;
937 bfp_com_rsp.
data_out = (int8_t*)dst;
941 printf (
"compression failed [%d]\n",
945 payload_len = bfp_com_rsp.
len;
948 printf (
"p_prbMapElm->compMethod == %d is not supported\n",
963 printf(
"ptr ==NULL\n");
994 for (idxElm = 0; idxElm < pRbMap->
nPrbElm; idxElm++){
995 p_pRbMapElm = &pRbMap->
prbMap[idxElm];
998 int16_t ext_len = 9600;
999 int16_t ext_sec_total = 0;
1002 int16_t *ptr = NULL;
1005 ext_buf += (RTE_PKTMBUF_HEADROOM +
1007 sizeof(struct xran_cp_radioapp_section1));
1009 ext_len -= (RTE_PKTMBUF_HEADROOM +
1011 sizeof(struct xran_cp_radioapp_section1));
1019 if(ext_sec_total > 0){
1023 rte_panic(
"xran_cp_populate_section_ext_1 return error [%d]\n", ext_sec_total);
1026 rte_panic(
"xran_malloc return NULL\n");
1032 printf(
"DL pRbMap ==NULL\n");
1062 flowId = XRAN_MAX_ANTENNA_NR*cc_id + ant_id;
1070 u32dptr = (uint32_t*)(ptr);
1076 printf(
"ptr ==NULL\n");
1089 flowId = XRAN_MAX_ANT_ARRAY_ELM_NR*cc_id + ant_id;
1095 if(startupConfiguration.
srsSymMask & (1 << sym_id) ){
1097 u32dptr = (uint32_t*)(ptr);
1102 printf(
"ptr ==NULL\n");
1127 free(gpXranLibConfig);
1128 gpXranLibConfig = NULL;
1134 printf(
"Failed at xran_mm_destroy, status %d\n",status);
1145 int32_t cc_id, ant_id, sym_id, tti;
1148 uint8_t frame_id = 0;
1149 uint8_t subframe_id = 0;
1150 uint8_t slot_id = 0;
1165 printf (
"get_xran_iq_content\n");
1179 flowId = XRAN_MAX_ANTENNA_NR * cc_id + ant_id;
1181 pRbElm = &pRbMap->
prbMap[0];
1187 u32dptr = (uint32_t*)(ptr);
1188 char* my_ptr =(
char *)ptr;
1191 printf(
"[%d][%d][%d][%d]ptr ==NULL\n",tti,cc_id,ant_id, sym_id);
1195 for(idxElm = 0; idxElm < pRbMap->
nPrbElm; idxElm++ ) {
1196 pRbElm = &pRbMap->
prbMap[idxElm];
1199 if(sym_id >= pRbElm->
nStartSymb && sym_id < pRbElm->nStartSymb + pRbElm->
numSymb){
1201 ptr = p_sec_desc->
pData;
1203 int32_t payload_len = 0;
1204 u32dptr = (uint32_t*)(ptr);
1212 bfp_decom_req.
data_in = (int8_t *)u32dptr;
1219 bfp_decom_rsp.
len = 0;
1222 printf (
"compression failed [%d]\n",
1226 payload_len = bfp_decom_rsp.
len;
1244 flowId = XRAN_MAX_ANTENNA_NR * cc_id + ant_id;
1251 u32dptr = (uint32_t*)(ptr);
1254 printf(
"ptr ==NULL\n");
1270 flowId = XRAN_MAX_ANT_ARRAY_ELM_NR*cc_id + ant_id;
1276 u32dptr = (uint32_t*)(ptr);
1279 printf(
"ptr ==NULL\n");
1299 char sysversion[100];
1300 char *compilation_date = __DATE__;
1301 char *compilation_time = __TIME__;
1306 snprintf(sysversion, 99,
"Version: %s",
VERSIONX);
1307 nLen = strlen(sysversion);
1310 printf(
"===========================================================================================================\n");
1311 printf(
"SAMPLE-APP VERSION\n");
1312 printf(
"===========================================================================================================\n");
1314 printf(
"%s\n", sysversion);
1315 printf(
"build-date: %s\n", compilation_date);
1316 printf(
"build-time: %s\n", compilation_time);
1325 char prefix_name[256];
1326 uint32_t nCenterFreq;
1328 struct stat st = {0};
1329 uint32_t filenameLength = strlen(argv[1]);
1330 char *pCheckName1 = NULL, *pCheckName2 = NULL;
1333 uint64_t nMask = (uint64_t)1;
1334 uint16_t nCoreUsage[4*64+1];
1335 uint16_t nCoreId[4*64];
1337 uint64_t nTotalTime;
1344 errx(2,
"Need two argument - the PCI address of the network port");
1345 if (filenameLength >= 256)
1347 printf(
"Config file name input is too long, exiting!\n");
1354 len = strlen(argv[1]) + 1;
1355 if (len > (
sizeof(filename) - 10))
1356 len = (
sizeof(filename) - 10);
1357 strncpy(filename, argv[1], (
sizeof(filename) - 10));
1358 filename[len] =
'\0';
1361 printf(
"Machine is not synchronized using PTP!\n");
1363 printf(
"Machine is synchronized using PTP!\n");
1368 printf(
"Configuration file error.\n");
1372 if(startupConfiguration.
ant_file[0] == NULL){
1373 printf(
"it looks like test vector for antennas were not provided\n");
1378 printf(
"Number of cells %d exceeds max number supported %d!\n", startupConfiguration.
numCC,
XRAN_MAX_SECTOR_NR);
1392 if (startupConfiguration.
mu_number <= 1){
1397 sizeof(struct xran_ecpri_hdr) +
1398 sizeof(struct radio_app_common_hdr) +
1399 sizeof(struct data_section_hdr));
1400 }
else if (startupConfiguration.
mu_number == 3){
1405 sizeof(struct xran_ecpri_hdr) +
1406 sizeof(struct radio_app_common_hdr) +
1407 sizeof(struct data_section_hdr));
1409 printf(
"given numerology is not supported %d\n", startupConfiguration.
mu_number);
1417 printf(
"set O-DU\n");
1425 printf(
"set O-RU\n");
1458 xranInit.
mtu = startupConfiguration.
mtu;
1463 sprintf(prefix_name,
"wls_%d",startupConfiguration.
instance_id);
1499 printf(
"IQ files size is %d slots\n", startupConfiguration.
numSlots);
1533 "DL IFFT IN IQ Samples in binary format",
1550 "DL BF weights IQ Samples in binary format",
1568 "UL BF weights IQ Samples in binary format",
1587 "PRACH IQ Samples in binary format",
1608 "SRS IQ Samples in binary format",
1661 if (stat(
"./logs", &st) == -1) {
1662 mkdir(
"./logs", 0777);
1667 sprintf(filename,
"./logs/%s-play_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1669 "DL IFFT IN IQ Samples in human readable format",
1674 sprintf(filename,
"./logs/%s-play_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1676 "DL IFFT IN IQ Samples in binary format",
1683 sprintf(filename,
"./logs/%s-dl_bfw_ue%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1685 "DL Beamformig weights IQ Samples in human readable format",
1690 sprintf(filename,
"./logs/%s-dl_bfw_ue%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1692 "DL Beamformig weightsIQ Samples in binary format",
1698 sprintf(filename,
"./logs/%s-ul_bfw_ue%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1700 "UL Beamformig weights IQ Samples in human readable format",
1705 sprintf(filename,
"./logs/%s-ul_bfw_ue%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1707 "UL Beamformig weightsIQ Samples in binary format",
1715 sprintf(filename,
"./logs/%s-play_prach_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1717 "PRACH IQ Samples in human readable format",
1722 sprintf(filename,
"./logs/%s-play_prach_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1724 "PRACH IQ Samples in binary format",
1737 sprintf(filename,
"./logs/%s-play_srs_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1739 "SRS IQ Samples in human readable format",
1744 sprintf(filename,
"./logs/%s-play_srs_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
1746 "SRS IQ Samples in binary format",
1753 if (startupConfiguration.
iqswap == 1){
1755 printf(
"TX: Swap I and Q to match RU format: [%d]\n",i);
1764 ptr[j] = ptr[j + 1];
1769 printf(
"DL BFW: Swap I and Q to match RU format: [%d]\n",i);
1778 ptr[j] = ptr[j + 1];
1782 printf(
"UL BFW: Swap I and Q to match RU format: [%d]\n",i);
1791 ptr[j] = ptr[j + 1];
1800 printf(
"PRACH: Swap I and Q to match RU format: [%d]\n",i);
1809 ptr[j] = ptr[j + 1];
1820 printf(
"SRS: Swap I and Q to match RU format: [%d]\n",i);
1829 ptr[j] = ptr[j + 1];
1840 sprintf(filename,
"./logs/swap_IQ_play_ant%d.txt", i);
1842 "DL IFFT IN IQ Samples in human readable format",
1850 printf(
"TX: Convert S16 I and S16 Q to network byte order for XRAN Ant: [%d]\n",i);
1856 printf(
"DL BFW: Convert S16 I and S16 Q to network byte order for XRAN Ant: [%d]\n",i);
1860 printf(
"UL BFW: Convert S16 I and S16 Q to network byte order for XRAN Ant: [%d]\n",i);
1869 printf(
"PRACH: Convert S16 I and S16 Q to network byte order for XRAN Ant: [%d]\n",i);
1880 printf(
"SRS: Convert S16 I and S16 Q to network byte order for XRAN Ant: [%d]\n",i);
1892 sprintf(filename,
"./logs/swap_be_play_ant%d.txt", i);
1894 "DL IFFT IN IQ Samples in human readable format",
1910 pRbMap = &startupConfiguration.
PrbMapDl;
1928 pRbMap = &startupConfiguration.
PrbMapUl;
1949 printf(
"xran_init failed %d\n", xret);
1967 for (i = 0; i < startupConfiguration.
nTddPeriod; i++){
1989 while (startupConfiguration.
nULFftSize >>= 1)
1999 printf(
"DL center freq %d DL NR-ARFCN %d\n", nCenterFreq, pXranConf->
nDLCenterFreqARFCN);
2003 printf(
"UL center freq %d UL NR-ARFCN %d\n", nCenterFreq, pXranConf->
nULCenterFreqARFCN);
2025 printf(
"xran_open failed %d\n", xret);
2029 sprintf(filename,
"mlog-%s", startupConfiguration.
appMode == 0 ?
"o-du" :
"o-ru");
2033 MLogOpen(256, 3, 20000, 0, filename);
2036 puts(
"----------------------------------------");
2038 puts(
"----------------------------------------");
2043 uint32_t numCarriers = startupConfiguration.
numCC;
2047 fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
2050 printf(
"Start XRAN traffic\n");
2062 nUsedPercent = ((float)nUsedTime * 100.0) / (float)nTotalTime;
2064 printf(
"[%s][rx %ld pps %ld kbps %ld][tx %ld pps %ld kbps %ld] [on_time %ld early %ld late %ld corrupt %ld pkt_dupl %ld Total %ld] IO Util: %5.2f %%\n",
2088 printf(
"error xran_get_common_counters\n");
2094 if (NULL == fgets(input, 10, stdin)) {
2098 const int sel_opt = atoi(input);
2102 printf(
"Start XRAN traffic\n");
2108 printf(
"Stop XRAN traffic\n");
2112 puts(
"Wrong option passed!");
2121 puts(
"Closing l1 app... Ending all threads...");
2126 puts(
"Dump IQs...");
2128 if (startupConfiguration.
iqswap == 1){
2130 printf(
"RX: Swap I and Q to match CPU format: [%d]\n",i);
2139 ptr[j] = ptr[j + 1];
2149 printf(
"SRS: Swap I and Q to match CPU format: [%d]\n",i);
2158 ptr[j] = ptr[j + 1];
2169 printf(
"RX: Convert S16 I and S16 Q to cpu byte order from XRAN Ant: [%d]\n",i);
2179 printf(
"SRS: Convert S16 I and S16 Q to cpu byte order from XRAN Ant: [%d]\n",i);
2189 sprintf(filename,
"./logs/%s-rx_log_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2191 "UL FFT OUT IQ Samples in human readable format",
2196 sprintf(filename,
"./logs/%s-rx_log_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2198 "UL FFT OUT IQ Samples in binary format",
2208 sprintf(filename,
"./logs/%s-srs_log_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2210 "SRS UL FFT OUT IQ Samples in human readable format",
2215 sprintf(filename,
"./logs/%s-srs_log_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2217 "SRS UL FFT OUT IQ Samples in binary format",
2225 if (startupConfiguration.
iqswap == 1){
2227 printf(
"PRACH: Swap I and Q to match CPU format: [%d]\n",i);
2236 ptr[j] = ptr[j + 1];
2246 printf(
"PRACH: Convert S16 I and S16 Q to cpu byte order from XRAN Ant: [%d]\n",i);
2256 sprintf(filename,
"./logs/%s-prach_log_ant%d.txt",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2258 "PRACH FFT OUT IQ Samples in human readable format",
2263 sprintf(filename,
"./logs/%s-prach_log_ant%d.bin",((startupConfiguration.
appMode ==
APP_O_DU) ?
"o-du" :
"o-ru"), i);
2265 "PRACH FFT OUT IQ Samples in binary format",
+
int32_t xran_get_common_counters(void *pXranLayerHandle, struct xran_common_counters *pStats)
+
+
int32_t DynamicSectionEna
+
+
int physide_ul_full_slot_call_back(void *param)
+
#define XRAN_MAX_SECTIONS_PER_SYM
+
+
int parseConfigFile(char *filename, RuntimeConfig *config)
+
int32_t prach_log_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
+
+
struct ether_addr o_du_addr
+
+
+
BbuIoBufCtrlStruct sFHPrachRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
+
+
#define MAX_ANT_CARRIER_SUPPORTED
+
int iq_bfw_buffer_size_ul
+
int32_t tx_dl_bfw_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
phy_encoder_poll_fn bbdev_enc
+
+
+
+
#define XRAN_MAX_ANT_ARRAY_ELM_NR
+
+
+
int32_t tx_ul_bfw_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
+
+
#define XRAN_N_FE_BUF_LEN
+
+
+
int32_t rx_log_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
#define XRAN_STATUS_SUCCESS
+
+
int16_t * p_rx_log_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
int get_xran_iq_content(void)
+
+
+
+
+
+
int32_t xran_open(void *pHandle, struct xran_fh_config *pConf)
+
+
+
+
+
+
+
+
+
+
+
int32_t xran_init(int argc, char *argv[], struct xran_fh_init *p_xran_fh_init, char *appName, void **pHandle)
+
+
struct XranLibConfig XranLibConfigStruct
+
+
int32_t xran_mm_init(void *pHandle, uint64_t nMemorySize, uint32_t nMemorySegmentSize)
+
uint16_t mask_bandSectorId
+
+
+
+
+
struct xran_flat_buffer sFHSrsRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_MAX_NUM_OF_SRS_SYMBOL_PER_SLOT]
+
struct xran_flat_buffer sFrontHaulTxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT]
+
+
char prach_file[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANTENNA_NR][512]
+
+
+
+
int physide_ul_half_slot_call_back(void *param)
+
int main(int argc, char *argv[])
+
uint32_t app_xran_get_scs(uint8_t nMu)
+
+
int xranlib_decompress_avx512(const struct xranlib_decompress_request *request, struct xranlib_decompress_response *response)
+
int iq_playback_buffer_size_dl
+
+
+
+
+
+
struct xran_flat_buffer sFrontHaulTxPrbMapBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
+
enum xran_input_byte_order byteOrder
+
struct xran_fh_config * pXranConf
+
+
+
+
+
+
struct xran_prb_map PrbMapDl
+
+
+
+
+
int32_t tx_prach_play_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
int32_t xran_bm_init(void *pHandle, uint32_t *pPoolIndex, uint32_t nNumberOfBuffers, uint32_t nBufferSize)
+
+
Request structure containing pointer to data and its length.
+
+
+
RuntimeConfig startupConfiguration
+
#define XRAN_MAX_SECTOR_NR
+
int32_t xran_get_slot_idx(uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond)
+
+
+
+
+
uint8_t * xran_add_hdr_offset(uint8_t *dst, int16_t compMethod)
+
#define MLogAddVariables(x, y, z)
+
+
+
+
External API for compading with the use BFP algorithm.
+
char dl_bfw_file[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANTENNA_NR][512]
+
+
+
struct xran_srs_config srs_conf
+
struct xran_eaxcid_config eAxCId_conf
+
int32_t xran_start(void *pHandle)
+
+
+
+
+
+
+
+
phy_decoder_poll_fn bbdev_dec
+
#define XRAN_MAX_ANTENNA_NR
+
+
+
+
int init_xran_iq_content(void)
+
+
+
+
struct xran_cp_bf_weight bf_weight
+
+
enum xran_if_state xran_get_if_state(void)
+
+
+
+
+
+
+
+
+
int physide_dl_tti_call_back(void *param)
+
uint32_t nNumberOfElements
+
+
#define PRACH_PLAYBACK_BUFFER_BYTES
+
enum xran_input_i_q_order iqOrder
+
+
+
+
int sys_load_file_to_buff(char *filename, char *bufname, unsigned char *pBuffer, unsigned int size, unsigned int buffers_num)
+
int32_t tx_dl_bfw_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
+
+
struct xran_flat_buffer sFrontHaulRxPrbMapBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
#define PID_GNB_PROC_TIMING
+
+
+
struct xran_io_cfg io_cfg
+
#define FPGA_TO_SW_PRACH_RX_BUFFER_LEN
+
+
int32_t xran_5g_srs_req(void *pHandle, struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANT_ARRAY_ELM_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
+
+
void sys_save_buf_to_file_txt(char *filename, char *bufname, unsigned char *pBuffer, unsigned int size, unsigned int buffers_num)
+
+
+
+
+
+
+
+
int32_t tx_srs_play_buffer_size[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
+
+
+
+
uint32_t nULCenterFreqARFCN
+
+
+
+
+
+
struct ether_addr o_ru_addr
+
+
uint32_t nFpgaToSW_PRACH_RxBufferLen
+
+
void sys_save_buf_to_file(char *filename, char *bufname, unsigned char *pBuffer, unsigned int size, unsigned int buffers_num)
+
+
int32_t xran_5g_prach_req(void *pHandle, struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
+
+
+
+
+
+
+
struct xran_flat_buffer sFHPrachRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT]
+
+
#define NUM_OF_SUBFRAME_PER_FRAME
+
+
+
+
struct xran_frame_config frame_conf
+
+
+
+
This file provides interface to synchronization related APIs (PTP/1588) for XRAN. ...
+
int32_t xran_mm_destroy(void *pHandle)
+
+
int32_t xran_close(void *pHandle)
+
Request structure containing pointer to data and its length.
+
+
+
uint16_t app_xran_get_num_rbs(uint32_t nNumerology, uint32_t nBandwidth, uint32_t nAbsFrePointA)
+
+
+
+
+
int16_t * p_tx_ul_bfw_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
+
uint32_t nSW_ToFpga_FTH_TxBufferLen
+
+
#define MAX_BBU_POOL_CORE_MASK
+
+
int16_t * p_tx_play_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
#define MLogOpen(a, b, c, d, e)
+
+
void xran_fh_rx_callback(void *pCallbackTag, int32_t status)
+
+
int xranlib_compress_avx512(const struct xranlib_compress_request *request, struct xranlib_compress_response *response)
+
+
+
+
+
int timer_set_tsc_freq_from_clock(void)
+
+
+
+
struct xran_flat_buffer * pBuffers
+
BbuIoBufCtrlStruct sFrontHaulRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
#define SW_FPGA_FH_TOTAL_BUFFER_LEN
+
#define SW_FPGA_SEGMENT_BUFFER_LEN
+
int32_t tx_srs_play_buffer_position[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
+
+
+
+
void * nInstanceHandle[XRAN_PORTS_NUM][XRAN_MAX_SECTOR_NR]
+
+
+
uint32_t app_xran_cal_nrarfcn(uint32_t nCenterFreq)
+
int32_t xran_bm_allocate_buffer(void *pHandle, uint32_t nPoolIndex, void **ppData, void **ppCtrl)
+
#define MAX_ANT_CARRIER_SUPPORTED_CAT_B
+
int16_t * p_srs_log_buffer[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
struct xran_prach_config prach_conf
+
+
+
+
BbuIoBufCtrlStruct sFHSrsRxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANT_ARRAY_ELM_NR]
+
+
+
+
+
+
+
+
enum xran_category xranCat
+
int32_t xran_stop(void *pHandle)
+
struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY]
+
+
void * xran_malloc(size_t buf_len)
+
+
+
+
+
int iq_playback_buffer_size_ul
+
+
int32_t prach_log_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
+
struct xran_flat_buffer sFrontHaulRxBuffers[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR][XRAN_NUM_OF_SYMBOL_PER_SLOT]
+
+
+
+
+
+
+
struct xran_ru_config ru_conf
+
#define N_MAX_BUFFER_SEGMENT
+
int32_t tx_play_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
+
struct xran_section_desc * p_sec_desc[XRAN_NUM_OF_SYMBOL_PER_SLOT]
+
+
+
+
+
+
+
+
#define XRAN_MAX_NUM_OF_SRS_SYMBOL_PER_SLOT
+
+
+
+
#define XRAN_NUM_OF_SYMBOL_PER_SLOT
+
int32_t xran_cp_populate_section_ext_1(int8_t *p_ext1_dst, uint16_t ext1_dst_len, int16_t *p_bfw_iq_src, uint16_t rbNumber, uint16_t bfwNumber, uint8_t bfwiqWidth, uint8_t bfwCompMeth)
+
Response structure containing pointer to data and its length.
+
int32_t DynamicSectionEna
+
char ul_bfw_file[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANTENNA_NR][512]
+
int32_t tx_prach_play_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
int16_t * p_tx_dl_bfw_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
+
+
+
int xran_is_synchronized(void)
Function checks if machine is synchronized using PTP for Linux software.
+
+
+
+
+
char * dpdk_dev[XRAN_VF_MAX]
+
+
This file provides public interface to xRAN Front Haul layer implementation as defined in the ORAN-WG...
+
int32_t srs_log_buffer_position[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
+
+
int32_t xran_sector_get_instances(void *pHandle, uint16_t nNumInstances, xran_cc_handle_t *pSectorInstanceHandles)
+
+
int iq_srs_buffer_size_ul
+
+
struct xran_buffer_list sBufferList
+
+
+
+
int16_t * p_tx_prach_play_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
char ant_file[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANTENNA_NR][512]
+
+
+
+
#define MLogGetFileLocation()
+
+
+
+
void xran_fh_rx_srs_callback(void *pCallbackTag, xran_status_t status)
+
+
+
+
+
+
+
void xran_fh_rx_prach_callback(void *pCallbackTag, int32_t status)
+
+
+
#define MLogTask(w, x, y)
+
+
+
+
+
BbuIoBufCtrlStruct sFrontHaulRxPrbMapBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
#define MLogAddTestCase(a, b)
+
+
+
+
+
+
+
+
+
int32_t rx_log_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
void * pFthInstanceHandles
+
+
int iq_bfw_buffer_size_dl
+
struct xran_prb_elm prbMap[XRAN_MAX_PRBS]
+
BbuIoBufCtrlStruct sFrontHaulTxBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
+
+
unsigned long timer_get_ticks(void)
+
BbuIoBufCtrlStruct sFrontHaulTxPrbMapBbuIoBufCtrl[XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
+
struct rte_mempool * bbuio_buf_pool
+
+
+
struct xran_fh_config xranConf
+
+
+
uint32_t xran_get_time_stats(uint64_t *total_time, uint64_t *used_time, uint32_t *core_used, uint32_t clear)
+
+
+
+
int32_t tx_ul_bfw_buffer_position[MAX_ANT_CARRIER_SUPPORTED]
+
int32_t tx_play_buffer_size[MAX_ANT_CARRIER_SUPPORTED]
+
int32_t srs_log_buffer_size[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
+
#define MLogGetFileSize()
+
This file provides the definitions for Control Plane Messages APIs.
+
struct xran_prb_map PrbMapUl
+
uint32_t nBufPoolIndex[XRAN_MAX_SECTOR_NR][MAX_SW_XRAN_INTERFACE_NUM]
+
+
+
+
+
+
+
+
int16_t * p_prach_log_buffer[MAX_ANT_CARRIER_SUPPORTED]
+
char ul_srs_file[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR][512]
+
uint32_t nDLCenterFreqARFCN
+
+
+
+
int32_t xran_reg_physide_cb(void *pHandle, xran_fh_tti_callback_fn Cb, void *cbParam, int skipTtiNum, enum callback_to_phy_id)
+
+
Response structure containing pointer to data and its length.
+
+
struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY]
+
int16_t * p_tx_srs_play_buffer[XRAN_MAX_SECTOR_NR *XRAN_MAX_ANT_ARRAY_ELM_NR]
+
int32_t xran_5g_fronthault_config(void *pHandle, struct xran_buffer_list *pSrcBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pSrcCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], struct xran_buffer_list *pDstCpBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], xran_transport_callback_fn pCallback, void *pCallbackTag)
+
uint32_t nFpgaToSW_FTH_RxBufferLen
+
uint8_t nPrachSubcSpacing
+
+
+
+
+
+
+
+
+
uint32_t nElementLenInBytes
+
+