o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
sample-app.c File Reference
#include <unistd.h>
#include <sys/syscall.h>
#include <sched.h>
#include <assert.h>
#include <err.h>
#include <libgen.h>
#include <sys/time.h>
#include <time.h>
#include <stdio.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/stat.h>
#include "common.h"
#include "config.h"
#include "xran_mlog_lnx.h"
#include "xran_fh_o_du.h"
#include "xran_compression.h"
#include "xran_cp_api.h"
#include "xran_sync_api.h"
#include "xran_mlog_task_id.h"
Include dependency graph for sample-app.c:

Go to the source code of this file.

Data Structures

struct  FPGAPhaseCompCfg
 
struct  XranLibConfig
 
struct  BbuIoBufCtrlStruct
 
struct  BbuXranIoIfStruct
 

Macros

#define _GNU_SOURCE
 
#define MAX_BBU_POOL_CORE_MASK   (4)
 
#define SW_FPGA_TOTAL_BUFFER_LEN   4*1024*1024*1024
 
#define SW_FPGA_SEGMENT_BUFFER_LEN   1*1024*1024*1024
 
#define SW_FPGA_FH_TOTAL_BUFFER_LEN   1*1024*1024*1024
 
#define FPGA_TO_SW_PRACH_RX_BUFFER_LEN   (8192)
 
#define NSEC_PER_SEC   1000000000
 
#define MAX_PKT_BURST   (448+4)
 
#define N_MAX_BUFFER_SEGMENT   MAX_PKT_BURST
 
#define MAIN_PRIORITY   98
 
#define NUM_OF_SUBFRAME_PER_FRAME   (10)
 
#define CPU_HZ   tick_per_usec
 
#define NS_PER_SEC   1E9
 

Typedefs

typedef struct XranLibConfig XranLibConfigStruct
 

Enumerations

enum  SWXRANInterfaceTypeEnum {
  XRANFTHTX_OUT = 0, XRANFTHTX_PRB_MAP_OUT, XRANFTHTX_SEC_DESC_OUT, XRANFTHRX_IN,
  XRANFTHRX_PRB_MAP_IN, XRANFTHTX_SEC_DESC_IN, XRANFTHRACH_IN, XRANSRS_IN,
  MAX_SW_XRAN_INTERFACE_NUM
}
 

Functions

void xran_fh_rx_callback (void *pCallbackTag, int32_t status)
 
void xran_fh_rx_prach_callback (void *pCallbackTag, int32_t status)
 
void xran_fh_rx_srs_callback (void *pCallbackTag, xran_status_t status)
 
unsigned long timer_get_ticks (void)
 
int timer_set_tsc_freq_from_clock (void)
 
int physide_dl_tti_call_back (void *param)
 
int physide_ul_half_slot_call_back (void *param)
 
int physide_ul_full_slot_call_back (void *param)
 
int32_t init_xran (void)
 
int init_xran_iq_content (void)
 
void stop_xran (void)
 
int get_xran_iq_content (void)
 
void version_print (void)
 
int main (int argc, char *argv[])
 

Variables

enum app_state state
 
uint64_t tick_per_usec
 
RuntimeConfig startupConfiguration = {0}
 
uint32_t nFpgaToSW_FTH_RxBufferLen
 
uint32_t nFpgaToSW_PRACH_RxBufferLen
 
uint32_t nSW_ToFpga_FTH_TxBufferLen
 
void * xranHandle = NULL
 
struct xran_fh_config xranConf
 
struct xran_fh_configpXranConf = NULL
 
long rx_counter
 
long tx_counter
 
long tx_bytes_counter
 
long rx_bytes_counter
 
long tx_bytes_per_sec
 
long rx_bytes_per_sec
 
long old_rx_counter = 0
 
long old_tx_counter = 0
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 19 of file sample-app.c.

◆ CPU_HZ

#define CPU_HZ   tick_per_usec

Definition at line 181 of file sample-app.c.

◆ FPGA_TO_SW_PRACH_RX_BUFFER_LEN

#define FPGA_TO_SW_PRACH_RX_BUFFER_LEN   (8192)

Definition at line 52 of file sample-app.c.

◆ MAIN_PRIORITY

#define MAIN_PRIORITY   98

Definition at line 59 of file sample-app.c.

◆ MAX_BBU_POOL_CORE_MASK

#define MAX_BBU_POOL_CORE_MASK   (4)

Definition at line 46 of file sample-app.c.

◆ MAX_PKT_BURST

#define MAX_PKT_BURST   (448+4)

Definition at line 56 of file sample-app.c.

◆ N_MAX_BUFFER_SEGMENT

#define N_MAX_BUFFER_SEGMENT   MAX_PKT_BURST

Definition at line 57 of file sample-app.c.

◆ NS_PER_SEC

#define NS_PER_SEC   1E9

◆ NSEC_PER_SEC

#define NSEC_PER_SEC   1000000000

Definition at line 54 of file sample-app.c.

◆ NUM_OF_SUBFRAME_PER_FRAME

#define NUM_OF_SUBFRAME_PER_FRAME   (10)

Definition at line 60 of file sample-app.c.

◆ SW_FPGA_FH_TOTAL_BUFFER_LEN

#define SW_FPGA_FH_TOTAL_BUFFER_LEN   1*1024*1024*1024

Definition at line 51 of file sample-app.c.

◆ SW_FPGA_SEGMENT_BUFFER_LEN

#define SW_FPGA_SEGMENT_BUFFER_LEN   1*1024*1024*1024

Definition at line 50 of file sample-app.c.

◆ SW_FPGA_TOTAL_BUFFER_LEN

#define SW_FPGA_TOTAL_BUFFER_LEN   4*1024*1024*1024

Definition at line 49 of file sample-app.c.

Typedef Documentation

◆ XranLibConfigStruct

Enumeration Type Documentation

◆ SWXRANInterfaceTypeEnum

Enumerator
XRANFTHTX_OUT 
XRANFTHTX_PRB_MAP_OUT 
XRANFTHTX_SEC_DESC_OUT 
XRANFTHRX_IN 
XRANFTHRX_PRB_MAP_IN 
XRANFTHTX_SEC_DESC_IN 
XRANFTHRACH_IN 
XRANSRS_IN 
MAX_SW_XRAN_INTERFACE_NUM 

Definition at line 101 of file sample-app.c.

Function Documentation

◆ get_xran_iq_content()

int get_xran_iq_content ( void  )

Definition at line 1139 of file sample-app.c.

◆ init_xran()

int32_t init_xran ( void  )

Definition at line 375 of file sample-app.c.

◆ init_xran_iq_content()

int init_xran_iq_content ( void  )

Definition at line 793 of file sample-app.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1319 of file sample-app.c.

Here is the call graph for this function:

◆ physide_dl_tti_call_back()

int physide_dl_tti_call_back ( void *  param)

Definition at line 351 of file sample-app.c.

Here is the caller graph for this function:

◆ physide_ul_full_slot_call_back()

int physide_ul_full_slot_call_back ( void *  param)

Definition at line 367 of file sample-app.c.

Here is the caller graph for this function:

◆ physide_ul_half_slot_call_back()

int physide_ul_half_slot_call_back ( void *  param)

Definition at line 359 of file sample-app.c.

Here is the caller graph for this function:

◆ stop_xran()

void stop_xran ( void  )

Definition at line 1122 of file sample-app.c.

Here is the call graph for this function:

◆ timer_get_ticks()

unsigned long timer_get_ticks ( void  )
Parameters
void
Returns
Ticks

This function reads the rtdsc clock and returns the current value in there.

Definition at line 289 of file sample-app.c.

◆ timer_set_tsc_freq_from_clock()

int timer_set_tsc_freq_from_clock ( void  )
Parameters
void
Returns
0 if SUCCESS

This function gets the clock speed of the core and figures out number of ticks per usec. It is used by l1app and testmac applications to initialize the mlog utility

Definition at line 323 of file sample-app.c.

◆ version_print()

void version_print ( void  )

Definition at line 1297 of file sample-app.c.

Here is the caller graph for this function:

◆ xran_fh_rx_callback()

void xran_fh_rx_callback ( void *  pCallbackTag,
int32_t  status 
)

Definition at line 226 of file sample-app.c.

◆ xran_fh_rx_prach_callback()

void xran_fh_rx_prach_callback ( void *  pCallbackTag,
int32_t  status 
)

Definition at line 246 of file sample-app.c.

◆ xran_fh_rx_srs_callback()

void xran_fh_rx_srs_callback ( void *  pCallbackTag,
xran_status_t  status 
)

Definition at line 261 of file sample-app.c.

Variable Documentation

◆ nFpgaToSW_FTH_RxBufferLen

uint32_t nFpgaToSW_FTH_RxBufferLen

Definition at line 71 of file sample-app.c.

◆ nFpgaToSW_PRACH_RxBufferLen

uint32_t nFpgaToSW_PRACH_RxBufferLen

Definition at line 72 of file sample-app.c.

◆ nSW_ToFpga_FTH_TxBufferLen

uint32_t nSW_ToFpga_FTH_TxBufferLen

Definition at line 73 of file sample-app.c.

◆ old_rx_counter

long old_rx_counter = 0

Definition at line 176 of file sample-app.c.

◆ old_tx_counter

long old_tx_counter = 0

Definition at line 177 of file sample-app.c.

◆ pXranConf

struct xran_fh_config* pXranConf = NULL

Definition at line 79 of file sample-app.c.

◆ rx_bytes_counter

long rx_bytes_counter

Definition at line 120 of file xran_common.c.

◆ rx_bytes_per_sec

long rx_bytes_per_sec

Definition at line 122 of file xran_common.c.

◆ rx_counter

long rx_counter

Definition at line 117 of file xran_common.c.

◆ startupConfiguration

RuntimeConfig startupConfiguration = {0}

Definition at line 68 of file sample-app.c.

◆ state

enum app_state state

Definition at line 62 of file sample-app.c.

◆ tick_per_usec

uint64_t tick_per_usec

Definition at line 64 of file sample-app.c.

◆ tx_bytes_counter

long tx_bytes_counter

Definition at line 119 of file xran_common.c.

◆ tx_bytes_per_sec

long tx_bytes_per_sec

Definition at line 121 of file xran_common.c.

◆ tx_counter

long tx_counter

Definition at line 118 of file xran_common.c.

◆ xranConf

struct xran_fh_config xranConf

Definition at line 78 of file sample-app.c.

◆ xranHandle

void* xranHandle = NULL

Definition at line 76 of file sample-app.c.