Commit 103168a0 authored by Raymond Knopp's avatar Raymond Knopp

standalone RRU executable initial testing version

parent 90b10268
......@@ -2601,6 +2601,31 @@ target_link_libraries(du_test
${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB}
)
add_executable(oairu
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/ru_control.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/executables/main_ru.c
${T_SOURCE}
${OPENAIR_DIR}/common/utils/LOG/log.c
${CONFIG_SOURCES}
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (oairu
-Wl,--start-group
SCHED_RU_LIB
PHY_COMMON PHY_RU
-Wl,--end-group z dl)
target_link_libraries (oairu pthread m ${CONFIG_LIB} rt ${CMAKE_DL_LIBS} ${T_LIB})
# lte-uesoftmodem is UE implementation
#######################################
......
......@@ -100,6 +100,8 @@ Options
Makes the NR softmodem
--nrUE
Makes the NR UE softmodem
--RU
Makes the OAI RRU (without full stack)
--UE
Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file
--UE-conf-nvram [configuration file]
......@@ -242,6 +244,10 @@ function main() {
NR="True"
echo_info "Will compile gNB"
shift;;
--RU)
RU=1
echo_info "Will compile RRU"
shift;;
-a | --agent)
echo_info "FlexRAN support is always compiled into the eNB"
shift;;
......@@ -443,7 +449,7 @@ function main() {
########################################################
# to be discussed
if [ "$eNB" = "1" -o "$gNB" = "1" ] ; then
if [ "$eNB" = "1" -o "$gNB" = "1" =o "$RU" = "1"] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected"
fi
......@@ -574,7 +580,7 @@ function main() {
config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then
# softmodem compilation
......@@ -609,6 +615,9 @@ function main() {
if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem"
fi
if [ "$RU" = "1" ] ; then
execlist="$execlist oairu"
fi
if [ "$UE" = 1 ] ; then
execlist="$execlist lte-uesoftmodem"
fi
......@@ -820,7 +829,7 @@ function main() {
####################################################
# Build RF device and transport protocol libraries #
####################################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then
# build RF device libraries
if [ "$HW" != "None" ] ; then
......
......@@ -73,7 +73,6 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) {
init_unscrambling_lut();
init_scrambling_lut();
//set_taus_seed(1328);
init_sss();
}
void free_lte_top(void) {
......
......@@ -384,6 +384,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell);
generate_pcfich_reg_mapping (fp);
generate_phich_reg_mapping (fp);
init_sss();
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
eNB->first_run_timing_advance[UE_id] =
......
......@@ -629,6 +629,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
init_frame_parms(&ue->frame_parms,1);
lte_sync_time_init(&ue->frame_parms);
init_lte_top(&ue->frame_parms);
init_sss();
init_7_5KHz();
init_ul_hopping(&ue->frame_parms);
// many memory allocation sizes are hard coded
......
......@@ -2677,28 +2677,8 @@ void set_function_spec_param(RU_t *ru) {
} // switch on interface type
}
//extern void RCconfig_RU(void);
void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync) {
void init_RU(char *rf_config_file, int send_dmrssync) {
int ru_id, i, CC_id;
RU_t *ru;
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
// create status mask
RC.ru_mask= (1 << RC.nb_RU) - 1;
pthread_mutex_init(&RC.ru_mutex,NULL);
pthread_cond_init(&RC.ru_cond,NULL);
if (RC.nb_CC != 0)
for (i=0; i<RC.nb_L1_inst; i++)
for (CC_id=0; CC_id<RC.nb_CC[i]; CC_id++) RC.eNB[i][CC_id]->num_RU=0;
LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU);
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
LOG_D(PHY,"Process RC.ru[%d]\n",ru_id);
ru = RC.ru[ru_id];
ru->rf_config_file = rf_config_file;
ru->idx = ru_id;
ru->ts_offset = 0;
......@@ -2725,6 +2705,31 @@ void init_RU(char *rf_config_file, int send_dmrssync) {
ru->wakeup_L1_sleeptime = 2000;
ru->wakeup_L1_sleep_cnt_max = 3;
}
// This part if on eNB side
void init_RU(char *rf_config_file, int send_dmrssync) {
int ru_id, i, CC_id;
RU_t *ru;
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
// create status mask
RC.ru_mask= (1 << RC.nb_RU) - 1;
pthread_mutex_init(&RC.ru_mutex,NULL);
pthread_cond_init(&RC.ru_cond,NULL);
if (RC.nb_CC != 0)
for (i=0; i<RC.nb_L1_inst; i++)
for (CC_id=0; CC_id<RC.nb_CC[i]; CC_id++) RC.eNB[i][CC_id]->num_RU=0;
LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU);
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
LOG_D(PHY,"Process RC.ru[%d]\n",ru_id);
ru = RC.ru[ru_id];
init_RU0(ru,ru_id,rf_config_file,send_dmrssync);
if (ru->num_eNB > 0) {
LOG_D(PHY, "%s() RC.ru[%d].num_eNB:%d ru->eNB_list[0]:%p RC.eNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_eNB, ru->eNB_list[0], RC.eNB[0][0], ru->rf_config_file);
......
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