Commit ef9e8fd7 authored by Manish's avatar Manish

Following parameter made configurable:

  Compression Method
  IQ Width
  Number of slot based on Numerology

Unused Structure Variable Removed, Debug Logs Updated
parent 71d25e78
......@@ -174,9 +174,9 @@ set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set (OPENAIR_CMAKE ${OPENAIR_DIR}/cmake_targets)
set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
set (XRAN_DIR ${OPENAIR_DIR}/radio/ETHERNET/ORAN_FHI/lib)
#set (XRAN_LIB_DIR /home/vvdn/oai/git_push/phy/fhi_lib/lib/build)
set (INTEL_LIB /usr/local/intel64)
set (DPDK_DIR $ENV{RTE_SDK}/$ENV{RTE_TARGET}/include)
#set (XRAN_LIB_DIR /home/amd/oai/fhi/phy/fhi_lib/lib/build)
set (INTEL_LIB /usr/local/intel64)
set (DPDK_DIR $ENV{RTE_SDK}/$ENV{RTE_TARGET}/include)
if(DEFINED ENV{XRAN_LIB_DIR})
set (XRAN_LIB_DIR $ENV{XRAN_LIB_DIR})
......
......@@ -184,7 +184,7 @@ void dump_oran_config(void *xranlib_){
int nulrbs = xranlib->get_num_ulrbs();
printf("**--**--**--**--**--**--**--**--**--**--**--**\n");
printf("Dump ORAN Configuration\n");
printf("ORAN Configuration\n");
printf("* Numerology = %d\n", numerology);
printf("* Duplex Type = %d\n", duplex_type);
printf("* Number CC = %d\n", num_cc);
......
......@@ -170,7 +170,7 @@ int trx_oran_ctlrecv(openair0_device *device, void *msg, ssize_t msg_len)
printf("ORAN: %s\n", __FUNCTION__);
if (s->last_msg == RAU_tick && s->capabilities_sent == 0) {
printf("CCCCC ORAN ctrlrcv RRU_tick received and send capabilities hard coded\n");
printf("ORAN ctrlrcv RRU_tick received and send capabilities hard coded\n");
RRU_capabilities_t *cap;
rru_config_msg->type = RRU_capabilities;
rru_config_msg->len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_capabilities_t);
......
......@@ -42,9 +42,6 @@ typedef struct ru_info_s{
// Needed for Prach
int *prach_buf;
// Previous Slot Number
int slot_prev;
} ru_info_t;
#ifdef __cplusplus
......
......@@ -405,7 +405,7 @@ xranLibWraper::xranLibWraper()
const char* filePrefix_ = "wls";
// Independent
m_nSlots = 20; // If mu=0 is 10, if mu=1 is 20
m_nSlots = 0;
m_du_mac[0]=0x00; m_du_mac[1]=0x11; m_du_mac[2]=0x22; m_du_mac[3]=0x33; m_du_mac[4]=0x44; m_du_mac[5]=0x55;
int i, temp, j;
......@@ -553,15 +553,32 @@ xranLibWraper::xranLibWraper()
m_xranConf.frame_conf.nNumerology = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "mu");
if(m_xranConf.frame_conf.nNumerology > 3) {
std::cout << "*** Invalid Numerology [" << m_xranConf.frame_conf.nNumerology << "] !!!" << std::endl;
m_xranConf.frame_conf.nNumerology = 0;
std::cout << "****** Set it to " << m_xranConf.frame_conf.nNumerology << "..." << std::endl;
m_xranConf.frame_conf.nNumerology = 1;
std::cout << "****** Setting it to " << m_xranConf.frame_conf.nNumerology << "..." << std::endl;
}
m_xranConf.nCC = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "num_cc");
if(m_xranConf.nCC > XRAN_MAX_SECTOR_NR) {
std::cout << "*** Exceeds maximum number of carriers supported [" << m_xranConf.nCC << "] !!!" << std::endl;
m_xranConf.nCC = XRAN_MAX_SECTOR_NR;
std::cout << "****** Adjusted to " << m_xranConf.nCC << "..." << std::endl;
switch (m_xranConf.frame_conf.nNumerology) {
case 0: /* Numerology - 0 */
m_nSlots = 10;
break;
case 1: /* Numerology - 1 */
m_nSlots = 20;
break;
case 2: /* Numerology - 2 */
m_nSlots = 40;
break;
case 3: /* Numerology - 3 */
m_nSlots = 80;
break;
}
std::cout << "*** Numerology [" << m_xranConf.frame_conf.nNumerology << "] " << std::endl;
std::cout << "*** Number of Slot [" << m_nSlots << "] " << std::endl;
m_xranConf.nCC = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "num_cc");
if (m_xranConf.nCC > XRAN_MAX_SECTOR_NR) {
std::cout << "*** Exceeds maximum number of carriers supported [" << m_xranConf.nCC << "] !!!" << std::endl;
m_xranConf.nCC = XRAN_MAX_SECTOR_NR;
std::cout << "****** Adjusted to " << m_xranConf.nCC << "..." << std::endl;
}
m_xranConf.neAxc = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "num_eaxc");
if(m_xranConf.neAxc > XRAN_MAX_ANTENNA_NR) {
......@@ -601,7 +618,9 @@ xranLibWraper::xranLibWraper()
}
m_xranConf.ru_conf.iqWidth = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "iq_width");
std::cout << "*** IQ Width [" << m_xranConf.ru_conf.iqWidth << "]" << std::endl;
m_xranConf.ru_conf.compMeth = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "comp_meth");
std::cout << "*** Compression Method [" << m_xranConf.ru_conf.compMeth << "]" << std::endl;
temp = get_globalcfg<int>(XRAN_UT_KEY_GLOBALCFG_RU, "fft_size");
m_xranConf.ru_conf.fftSize = 0;
......@@ -826,8 +845,10 @@ int xranLibWraper::Init(struct xran_fh_config *pCfg)
pRbMap->prbMap[0].numSymb = 14;
}
pRbMap->prbMap[0].nBeamIndex = 0;
pRbMap->prbMap[0].compMethod = XRAN_COMPMETHOD_NONE;//BLKFLOAT; // Modify according to the target compression.
pRbMap->prbMap[0].iqWidth = 16; // Modify according to the target compression.
/* Update according to the target compression in conf.json */
pRbMap->prbMap[0].compMethod = m_xranConf.ru_conf.compMeth; /* xran_compression_method */
/* Update according to the target compression in conf.json */
pRbMap->prbMap[0].iqWidth = m_xranConf.ru_conf.iqWidth;
if(get_rucategory() == XRAN_CATEGORY_A) {
pRbMap->prbMap[0].BeamFormingType = XRAN_BEAM_ID_BASED;
......@@ -866,8 +887,11 @@ int xranLibWraper::Init(struct xran_fh_config *pCfg)
pRbMap->prbMap[0].numSymb = 14;
}
pRbMap->prbMap[0].nBeamIndex = 0;
pRbMap->prbMap[0].compMethod = XRAN_COMPMETHOD_NONE;
pRbMap->prbMap[0].iqWidth = 16; // Modify according to the target compression.
/* xran_compression_method */
/* Modify according to the target compression from conf.json */
pRbMap->prbMap[0].compMethod = m_xranConf.ru_conf.compMeth;
/* Update IQ-Width based on conf.json */
pRbMap->prbMap[0].iqWidth = m_xranConf.ru_conf.iqWidth;
if(get_rucategory() == XRAN_CATEGORY_A) {
pRbMap->prbMap[0].BeamFormingType = XRAN_BEAM_ID_BASED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment