Commit f37a17e5 authored by yilmazt's avatar yilmazt

develop&-nr current as of 22.7.19 & OAI fully ready for testing

parents 03c28a69 23a804ec
......@@ -193,6 +193,7 @@ RUs = (
att_rx = 20;
eNB_instances = [0];
is_slave = "no";
ota_sync_enabled = "yes";
},
{
local_if_name = "enp129s0f0";
......@@ -210,6 +211,7 @@ RUs = (
att_rx = 20;
eNB_instances = [0];
is_slave = "yes";
ota_sync_enabled = "yes";
}
);
......
......@@ -15,6 +15,7 @@ RUs = (
max_rxgain = 100;
bands = [38];
is_slave = "no";
ota_sync_enabled = "yes";
}
);
......
......@@ -15,6 +15,7 @@ RUs = (
max_rxgain = 100;
bands = [38];
is_slave = "yes";
ota_sync_enabled = "yes";
}
);
......
This diff is collapsed.
......@@ -167,7 +167,7 @@ function variant__v2__basic_sim {
}
function variant__v3__phy_sim {
NB_PATTERN_FILES=3
NB_PATTERN_FILES=12
BUILD_OPTIONS="--phy_simulators"
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
}
......@@ -195,6 +195,7 @@ function variant__v7__enb_ethernet {
NB_PATTERN_FILES=8
BUILD_OPTIONS="--eNB"
}
function variant__v8__ue_ethernet {
VM_MEMORY=4096
ARCHIVES_LOC=ue_eth
......@@ -208,6 +209,7 @@ function variant__v10__flexran_rtc {
BUILD_OPTIONS="cmake . && make -j2"
VARIANT_INFO="non-OSA"
}
function variant__v20__l1_sim {
ARCHIVES_LOC=l1_sim
RUN_OPTIONS="complex"
......
......@@ -34,7 +34,7 @@
<testCase id="030111">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --eNBs.[0].component_carriers.[0].drx_Config_present prRelease</Initialize_eNB_args>
</testCase>
<testCase id="030201">
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-10-cdrx-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-CDRX-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
030112 040302 040512 040612 040650 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030112">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/10MHz) with CDRX</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --eNBs.[0].component_carriers.[0].drx_Config_present prSetup</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040302">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040512">
<class>Ping</class>
<desc>ping (10MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040612">
<class>Iperf</class>
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040650">
<class>Iperf</class>
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
......@@ -22,8 +22,9 @@
-->
<testCaseList>
<htmlTabRef>test-f1-05</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-05MHz</htmlTabName>
<htmlTabName>Test-F1-CU-DU-05MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -22,8 +22,9 @@
-->
<testCaseList>
<htmlTabRef>test-f1-10</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-10MHz</htmlTabName>
<htmlTabName>Test-F1-CU-DU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -22,8 +22,9 @@
-->
<testCaseList>
<htmlTabRef>test-f1-20</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-20MHz</htmlTabName>
<htmlTabName>Test-F1-CU-DU-20MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-multi-rru-10</htmlTabRef>
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030211 030212 030213
030111 030112 030113
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-10mhz-orange</htmlTabRef>
<htmlTabName>Test-10Mhz-Orange</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
090109
090110 000001 090109
......
......@@ -24,6 +24,7 @@
<htmlTabRef>test-10mHz-sfr</htmlTabRef>
<htmlTabName>Test-10MHz-SFR</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
090109
090111 000001 090109
......
......@@ -2645,21 +2645,21 @@ add_executable(nr_dlschsim
${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${T_SOURCE})
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
add_executable(nr_pbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${T_SOURCE})
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
#PUCCH ---> Prashanth
add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR_DIR}/common/utils/backtrace.c
${T_SOURCE})
target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
#PUCCH ---> Prashanth
add_executable(nr_dlsim
......@@ -2673,7 +2673,7 @@ add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${OPENAIR_DIR}/common/utils/backtrace.c
${T_SOURCE})
target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl)
add_executable(nr_ulsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
......
......@@ -184,7 +184,7 @@ void config_printhelp(paramdef_t *params,int numparams, char *prefix) {
printf("--------------------------------------------------------------------\n\n");
}
int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
int config_execcheck(paramdef_t *params, int numparams, char *prefix) {
int st=0;
for (int i=0 ; i<numparams ; i++) {
......@@ -204,7 +204,7 @@ int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
return st;
}
int config_get(paramdef_t *params,int numparams, char *prefix) {
int config_get(paramdef_t *params, int numparams, char *prefix) {
int ret= -1;
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
......@@ -215,11 +215,11 @@ int config_get(paramdef_t *params,int numparams, char *prefix) {
configmodule_interface_t *cfgif = config_get_if();
if (cfgif != NULL) {
ret = config_get_if()->get(params, numparams,prefix);
ret = config_get_if()->get(params, numparams, prefix);
if (ret >= 0) {
config_process_cmdline(params,numparams,prefix);
config_execcheck(params,numparams,prefix);
config_process_cmdline(params, numparams, prefix);
config_execcheck(params, numparams, prefix);
}
return ret;
......
......@@ -123,7 +123,7 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB);
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern WORKER_CONF_t get_thread_worker_conf(void);
void init_RU(char *);
void init_NR_RU(char *);
void stop_RU(int nb_ru);
void do_ru_sync(RU_t *ru);
......@@ -147,7 +147,8 @@ extern int numerology;
extern void wait_gNBs(void);
int attach_rru(RU_t *ru) {
int attach_rru(RU_t *ru)
{
ssize_t msg_len,len;
RRU_CONFIG_msg_t rru_config_msg;
int received_capabilities=0;
......@@ -204,7 +205,8 @@ int attach_rru(RU_t *ru) {
return 0;
}
int connect_rau(RU_t *ru) {
int connect_rau(RU_t *ru)
{
RRU_CONFIG_msg_t rru_config_msg;
ssize_t msg_len;
int tick_received = 0;
......@@ -301,34 +303,39 @@ int connect_rau(RU_t *ru) {
/* Southbound Fronthaul functions, RCC/RAU */
// southbound IF5 fronthaul for 16-bit OAI format
static inline void fh_if5_south_out(RU_t *ru,int frame,int slot,uint64_t timestamp) {
static inline void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
send_IF5(ru, timestamp, slot, &ru->seqno, IF5_RRH_GW_DL);
}
// southbound IF5 fronthaul for Mobipass packet format
static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame,int slot,uint64_t timestamp) {
static inline void fh_if5_mobipass_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
send_IF5(ru, timestamp, slot, &ru->seqno, IF5_MOBIPASS);
}
// southbound IF4p5 fronthaul
static inline void fh_if4p5_south_out(RU_t *ru,int frame,int slot, uint64_t timestamp) {
static inline void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
if (nr_slot_select(&ru->gNB_list[0]->gNB_config,ru->proc.tti_tx)!=SF_UL)
send_IF4p5(ru,frame, slot, IF4p5_PDLFFT);
if (nr_slot_select(&ru->gNB_list[0]->gNB_config,ru->proc.tti_tx)!=SF_UL) send_IF4p5(ru,frame, slot, IF4p5_PDLFFT);
}
/*************************************************************/
/* Input Fronthaul from south RCC/RAU */
// Synchronous if5 from south
void fh_if5_south_in(RU_t *ru,int *frame, int *tti) {
void fh_if5_south_in(RU_t *ru,
int *frame,
int *tti)
{
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
RU_proc_t *proc = &ru->proc;
recv_IF5(ru, &proc->timestamp_rx, *tti, IF5_RRH_GW_UL);
......@@ -355,7 +362,10 @@ void fh_if5_south_in(RU_t *ru,int *frame, int *tti) {
}
// Synchronous if4p5 from south
void fh_if4p5_south_in(RU_t *ru,int *frame,int *slot) {
void fh_if4p5_south_in(RU_t *ru,
int *frame,
int *slot)
{
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
RU_proc_t *proc = &ru->proc;
int f,sl;
......@@ -1361,9 +1371,9 @@ static void *ru_thread( void *param ) {
}
} else {
// Start IF device if any
if (ru->start_if) {
if (ru->nr_start_if) {
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
AssertFatal(ru->start_if(ru,NULL) == 0, "Could not start the IF device\n");
AssertFatal(ru->nr_start_if(ru,NULL) == 0, "Could not start the IF device\n");
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
else ret = attach_rru(ru);
......@@ -1594,7 +1604,7 @@ void *ru_thread_synch(void *arg) {
}
*/
int start_if(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB) {
int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
return(ru->ifdevice.trx_start_func(&ru->ifdevice));
}
......@@ -1951,7 +1961,7 @@ void set_function_spec_param(RU_t *ru) {
ru->feprx = NULL; // nothing (this is a time-domain signal)
ru->feptx_ofdm = NULL; // nothing (this is a time-domain signal)
ru->feptx_prec = NULL; // nothing (this is a time-domain signal)
ru->start_if = start_if; // need to start the if interface for if5
ru->nr_start_if = nr_start_if; // need to start the if interface for if5
ru->ifdevice.host_type = RRU_HOST;
ru->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
......@@ -1975,7 +1985,7 @@ void set_function_spec_param(RU_t *ru) {
ru->feprx = (get_nprocs()<=2) ? fep_full :ru_fep_full_2thread; // RX DFTs
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU)
ru->feptx_prec = NULL;
ru->start_if = start_if; // need to start the if interface for if4p5
ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5
ru->ifdevice.host_type = RRU_HOST;
ru->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
......@@ -1999,7 +2009,7 @@ void set_function_spec_param(RU_t *ru) {
ru->feptx_prec = feptx_prec; // this is fep with idft and precoding
ru->fh_north_in = NULL; // no incoming fronthaul from north
ru->fh_north_out = NULL; // no outgoing fronthaul to north
ru->start_if = NULL; // no if interface
ru->nr_start_if = NULL; // no if interface
ru->rfdevice.host_type = RAU_HOST;
}
......@@ -2032,7 +2042,7 @@ void set_function_spec_param(RU_t *ru) {
ru->fh_south_asynch_in = NULL; // no asynchronous UL
ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL;
ru->start_if = start_if; // need to start if interface for IF5
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru;
......@@ -2058,7 +2068,7 @@ void set_function_spec_param(RU_t *ru) {
ru->fh_north_asynch_in = NULL;
ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL;
ru->start_if = start_if; // need to start if interface for IF4p5
ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru;
......@@ -2081,7 +2091,8 @@ void set_function_spec_param(RU_t *ru) {
extern void RCconfig_RU(void);
void init_RU(char *rf_config_file) {
void init_NR_RU(char *rf_config_file)
{
int ru_id;
RU_t *ru;
PHY_VARS_gNB *gNB0= (PHY_VARS_gNB *)NULL;
......@@ -2149,7 +2160,7 @@ void init_RU(char *rf_config_file) {
}
}
// LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
//LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
set_function_spec_param(ru);
LOG_I(PHY,"Starting ru_thread %d\n",ru_id);
init_RU_proc(ru);
......@@ -2160,9 +2171,8 @@ void init_RU(char *rf_config_file) {
}
void stop_RU(int nb_ru) {
void stop_RU(int nb_ru)
{
for (int inst = 0; inst < nb_ru; inst++) {
LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
kill_NR_RU_proc(inst);
......@@ -2172,7 +2182,8 @@ void stop_RU(int nb_ru) {
/* --------------------------------------------------------*/
/* from here function to use configuration module */
void RCconfig_RU(void) {
void RCconfig_RU(void)
{
int i = 0, j = 0;
paramdef_t RUParams[] = GNBRUPARAMS_DESC;
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
......
......@@ -103,7 +103,7 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*--------------------------------------------------------------------------------------------------------------------------------*/
#define START_MSC softmodem_params.start_msc
#define CMDLINE_LOGPARAMS_DESC { \
#define CMDLINE_LOGPARAMS_DESC_NR { \
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
......
......@@ -126,7 +126,7 @@ unsigned char NB_gNB_INST = 1;
int UE_scan = 1;
int UE_scan_carrier = 0;
runmode_t mode = normal_txrx;
double snr_dB=20;
static double snr_dB=20;
FILE *input_fd=NULL;
......@@ -510,7 +510,7 @@ static void get_options(void) {
uint32_t glog_level, glog_verbosity;
uint32_t start_telnetsrv;
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC ;
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
if (strlen(in_path) > 0) {
......@@ -1047,7 +1047,7 @@ int main( int argc, char **argv )
if (RC.nb_RU >0) {
printf("Initializing RU threads\n");
init_RU(rf_config_file);
init_NR_RU(rf_config_file);
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
RC.ru[ru_id]->rf_map.card=0;
......
......@@ -67,7 +67,7 @@ extern void stop_gNB(int);
extern void kill_gNB_proc(int inst);
// In nr-ru.c
extern void init_RU(char *);
extern void init_NR_RU(char *);
extern void init_RU_proc(RU_t *ru);
extern void stop_RU(int nb_ru);
extern void kill_NR_RU_proc(int inst);
......
......@@ -48,6 +48,7 @@
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
......@@ -114,7 +115,7 @@ volatile int oai_exit = 0;
static clock_source_t clock_source = internal;
int single_thread_flag=1;
double snr_dB=20;
static double snr_dB=20;
int threequarter_fs=0;
......@@ -409,7 +410,7 @@ static void get_options(void) {
uint32_t glog_level, glog_verbosity;
uint32_t start_telnetsrv=0;
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ;
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
if (strlen(in_path) > 0) {
......
......@@ -71,7 +71,7 @@
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, iptr:&do_forms, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:&do_forms, defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
......
......@@ -37,26 +37,27 @@
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
/*
extern uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn);
extern int32_t get_uldl_offset(int nr_bandP);
extern int32_t get_nr_uldl_offset(int nr_bandP);*/
extern openair0_config_t openair0_cfg[MAX_CARDS];
int l1_north_init_gNB() {
int i,j;
int l1_north_init_gNB()
{
if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL) {
AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst);
AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_nr_L1_CC is null\n");
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
for (i=0; i<RC.nb_nr_L1_inst; i++) {
for (int i=0; i<RC.nb_nr_L1_inst; i++) {
AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i);
AssertFatal(RC.nb_nr_L1_CC[i]>0,"RC.nb_nr_L1_CC[%d]=%d\n",i,RC.nb_nr_L1_CC[i]);
LOG_I(PHY,"%s() RC.nb_nr_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_nr_L1_CC[i]);
for (j=0; j<RC.nb_nr_L1_CC[i]; j++) {
for (int j=0; j<RC.nb_nr_L1_CC[i]; j++) {
AssertFatal(RC.gNB[i][j]!=NULL,"RC.gNB[%d][%d] is null\n",i,j);
if ((RC.gNB[i][j]->if_inst = NR_IF_Module_init(i))<0) return(-1);
......@@ -356,8 +357,13 @@ void install_schedule_handlers(IF_Module_t *if_inst)
/// this function is a temporary addition for NR configuration
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst) {
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
int N_RB_DL,
int N_RB_UL,
int mu,
int Nid_cell,
uint64_t position_in_burst)
{
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
nfapi_nr_config_request_t *gNB_config = &gNB->gNB_config;
//overwrite for new NR parameters
......@@ -371,22 +377,22 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20);
gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
gNB_config->sch_config.physical_cell_id.value=Nid_cell;
gNB_config->sch_config.ssb_scg_position_in_burst.value=position_in_burst;
gNB_config->sch_config.physical_cell_id.value = Nid_cell;
gNB_config->sch_config.ssb_scg_position_in_burst.value = position_in_burst;
gNB_config->subframe_config.dl_cyclic_prefix_type.value = (fp->Ncp == NORMAL) ? NFAPI_CP_NORMAL : NFAPI_CP_EXTENDED;
gNB->mac_enabled = 1;
fp->dl_CarrierFreq = 3500000000;//from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
fp->ul_CarrierFreq = 3500000000;//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp->threequarter_fs = 0;
fp->threequarter_fs= 0;
nr_init_frame_parms(gNB_config, fp);
gNB->configured = 1;
LOG_I(PHY,"gNB configured\n");
}
void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
void nr_phy_config_request(NR_PHY_Config_t *phy_config)
{
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id][CC_id]->frame_parms;
......@@ -411,7 +417,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
RC.gNB[Mod_id][CC_id]->mac_enabled = 1;
fp->dl_CarrierFreq = from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_nr_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp->threequarter_fs = openair0_cfg[0].threequarter_fs;
LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,DL freq %u)\n",
Mod_id,
......
......@@ -293,6 +293,8 @@ typedef struct RU_proc_t_s {
pthread_cond_t cond_eNBs;
/// condition variable for gNB signal
pthread_cond_t cond_gNBs;
/// condition variable for ru_thread
pthread_cond_t cond_ru_thread;
/// mutex for RU FH
pthread_mutex_t mutex_FH;
pthread_mutex_t mutex_FH1;
......@@ -419,6 +421,8 @@ typedef struct RU_t_s{
int north_out_cnt;
/// flag to indicate the RU is a slave to another source
int is_slave;
/// flag to indicate if the RU has to perform OTA sync
int ota_sync_enable;
/// flag to indicate that the RU should generate the DMRS sequence in slot 2 (subframe 1) for OTA synchronization and calibration
int generate_dmrs_sync;
/// flag to indicate if the RU has a control channel
......
......@@ -95,7 +95,7 @@
@param *phy_vars_rn pointer to RN variables
*/
void phy_procedures_UE_lte(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type);
#if defined(Rel10) || defined(Rel14)
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/*! \brief Top-level entry routine for relay node procedures actinf as UE. This proc will make us of the existing UE procs.
@param last_slot Index of last slot (0-19)
@param next_slot Index of next_slot (0-19)
......
......@@ -81,9 +81,8 @@ int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {
return (0);
}
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) {
return (0);
}
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
int32_t get_uldl_offset(int eutra_bandP) {
return (0);
}
......
......@@ -68,7 +68,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {return(0);}
uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
//uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
int32_t get_uldl_offset(int nr_bandP) {return(0);}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
......
......@@ -60,14 +60,10 @@ double cpuf;
int nfapi_mode=0;
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);}
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {return(0);}
uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
//uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn) {return(0);}
int32_t get_uldl_offset(int nr_bandP) {return(0);}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
......
......@@ -69,7 +69,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return (0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return (0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return (0); }
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return (0); }
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
int32_t get_uldl_offset(int eutra_bandP) { return (0); }
NR_IF_Module_t * NR_IF_Module_init(int Mod_id) { return (NULL); }
......
......@@ -73,36 +73,16 @@ double cpuf;
// dummy functions
int nfapi_mode = 0;
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) {
return (0);
}
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) {
return (0);
}
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) {
return (0);
}
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
return (0);
}
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) {
return (0);
}
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) {
return (0);
}
int32_t get_uldl_offset(int eutra_bandP) {
return (0);
}
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return (0); }
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return (0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return (0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return (0); }
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_config_request_t *dl_config_req) { return (0); }
//uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_earfcn) { return (0); }
int32_t get_uldl_offset(int eutra_bandP) { return (0); }
NR_IF_Module_t *
NR_IF_Module_init(int Mod_id) {
return (NULL);
}
NR_IF_Module_init(int Mod_id) { return (NULL); }
void exit_function(const char *file, const char *function, const int line, const char *s) {
const char *msg = s == NULL ? "no comment" : s;
......@@ -477,17 +457,17 @@ int main(int argc, char **argv) {
rel15_ul->ulsch_pdu_rel15.n_layers = precod_nbr_layers;
///////////////////////////////////////////////////
fapi_nr_ul_config_request_t ul_config;
/*fapi_nr_ul_config_request_t ul_config;
//fapi_nr_tx_request_t tx_request;
/*nr_scheduled_response_t scheduled_response;
nr_scheduled_response_t scheduled_response;
scheduled_response.module_id = 0;
scheduled_response.CC_id = 0;
scheduled_response.frame = frame;
scheduled_response.slot = slot;
scheduled_response.dl_config = NULL;
scheduled_response.ul_config = &ul_config;
scheduled_response.dl_config = NULL;*/
scheduled_response.dl_config = NULL;
ul_config.sfn_slot = slot;
......@@ -501,7 +481,7 @@ int main(int argc, char **argv) {
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = Imcs;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = 0;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;*/
//there are plenty of other parameters that we don't seem to be using for now. e.g.
//ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.absolute_delta_PUSCH = 0;
......
......@@ -92,6 +92,7 @@ typedef enum {
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
#define CONFIG_STRING_RU_SF_EXTENSION "sf_extension"
#define CONFIG_STRING_RU_END_OF_BURST_DELAY "end_of_burst_delay"
#define CONFIG_STRING_RU_OTA_SYNC_ENABLE "ota_sync_enabled"
#define RU_LOCAL_IF_NAME_IDX 0
#define RU_LOCAL_ADDRESS_IDX 1
......@@ -116,6 +117,7 @@ typedef enum {
#define RU_SDR_CLK_SRC 20
#define RU_SF_EXTENSION_IDX 21
#define RU_END_OF_BURST_DELAY_IDX 22
#define RU_OTA_SYNC_ENABLE_IDX 23
......@@ -147,6 +149,7 @@ typedef enum {
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
}
/*---------------------------------------------------------------------------------------------------------------------------------------*/
......
......@@ -83,8 +83,8 @@ typedef struct band_info_s {
static const eutra_bandentry_t eutra_bandtable[] = {
{1, 19200, 19800, 21100, 21700, 0},
{2, 18500, 19100, 19300, 19900, 6000},
{1, 19200, 19800, 21100, 21700, 0 },
{2, 18500, 19100, 19300, 19900, 6000 },
{3, 17100, 17850, 18050, 18800, 12000},
{4, 17100, 17550, 21100, 21550, 19500},
{5, 8240, 8490, 8690, 8940, 24000},
......@@ -216,7 +216,8 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
}
int32_t get_uldl_offset(int eutra_bandP) {
int32_t get_uldl_offset(int eutra_bandP)
{
int i;
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
......
......@@ -55,8 +55,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
uint64_t dl_CarrierFreqP,
int dl_BandwidthP,
NR_BCCH_BCH_Message_t *mib,
NR_ServingCellConfigCommon_t *servingcellconfigcommon
);
NR_ServingCellConfigCommon_t *servingcellconfigcommon);
int is_nr_UL_slot(NR_COMMON_channels_t * ccP, int slotP);
......@@ -65,14 +64,10 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
frame_t frameP,
sub_frame_t subframeP);
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP);
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP);
......@@ -81,7 +76,6 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
frame_t frameP,
sub_frame_t slotP);
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
nr_scs_e scs_common,
nr_scs_e pdcch_scs,
......@@ -122,6 +116,8 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn);
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw);
int32_t get_nr_uldl_offset(int nr_bandP);
void config_nr_mib(int Mod_idP,
int CC_idP,
int p_gNBP,
......
......@@ -67,8 +67,13 @@ nr_bandentry_t nr_bandtable[] = {
{86, 1710000, 1785000, 000, 000, 20, 342000}
};
void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type) {
#define NR_BANDTABLE_SIZE (sizeof(nr_bandtable)/sizeof(nr_bandentry_t))
void get_band(uint32_t downlink_frequency,
uint8_t *current_band,
int32_t *current_offset,
lte_frame_type_t *current_type)
{
int ind;
int64_t dl_freq_khz = downlink_frequency/1000;
for ( ind=0;
......@@ -96,9 +101,10 @@ void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *c
}
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
uint32_t to_nrarfcn(int nr_bandP,
uint64_t dl_CarrierFreq,
uint32_t bw)
{
uint64_t dl_CarrierFreq_by_1k = dl_CarrierFreq / 1000;
int bw_kHz = bw / 1000;
......@@ -112,8 +118,7 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
"Band %d, bw %u : DL carrier frequency %llu kHz < %llu\n",
nr_bandP, bw, (long long unsigned int)dl_CarrierFreq_by_1k,
(long long unsigned int)nr_bandtable[i].dl_min);
AssertFatal(dl_CarrierFreq_by_1k <=
(nr_bandtable[i].dl_max - bw_kHz),
AssertFatal(dl_CarrierFreq_by_1k <= (nr_bandtable[i].dl_max - bw_kHz),
"Band %d, dl_CarrierFreq %llu bw %u: DL carrier frequency %llu kHz > %llu\n",
nr_bandP, (long long unsigned int)dl_CarrierFreq,bw, (long long unsigned int)dl_CarrierFreq_by_1k,
(long long unsigned int)(nr_bandtable[i].dl_max - bw_kHz));
......@@ -130,9 +135,9 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw)
}
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn)
uint64_t from_nrarfcn(int nr_bandP,
uint32_t dl_nrarfcn)
{
int i;
int deltaFglobal;
......@@ -144,5 +149,16 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn)
AssertFatal(dl_nrarfcn>=nr_bandtable[i].N_OFFs_DL,"dl_nrarfcn %u < N_OFFs_DL %llu\n",dl_nrarfcn, (long long unsigned int)nr_bandtable[i].N_OFFs_DL);
return 1000*(nr_bandtable[i].dl_min + (dl_nrarfcn - nr_bandtable[i].N_OFFs_DL) * deltaFglobal);
}
int32_t get_nr_uldl_offset(int nr_bandP)
{
int i;
for (i = 0; i < NR_BANDTABLE_SIZE && nr_bandtable[i].band != nr_bandP; i++);
AssertFatal(i < NR_BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, NR_BANDTABLE_SIZE);
return (nr_bandtable[i].dl_min - nr_bandtable[i].ul_min);
}
......@@ -74,8 +74,9 @@ typedef struct {
} pdcp_params_t;
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
#ifndef PDCP_USE_NETLINK
#define PDCP_USE_NETLINK ( get_pdcp_optmask() & PDCP_USE_NETLINK_BIT)
#endif
#define LINK_ENB_PDCP_TO_IP_DRIVER ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_IP_DRIVER_BIT)
#define LINK_ENB_PDCP_TO_GTPV1U ( get_pdcp_optmask() & LINK_ENB_PDCP_TO_GTPV1U_BIT)
#define UE_NAS_USE_TUN ( get_pdcp_optmask() & UE_NAS_USE_TUN_BIT)
......
......@@ -51,13 +51,13 @@
#include <linux/in.h>
#include <net/ndisc.h>
#include "constant.h"
#include "platform_types.h"
#include "sap.h"
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
#ifndef MAKE_VERSION
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
#endif
typedef struct ue_ip_priv_s {
int irq;
......
......@@ -158,7 +158,7 @@ typedef struct UE_RRC_INFO_NR_s {
uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus;
uint32_t SIcnt;
#if defined(Rel10) || defined(Rel14)
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
......@@ -260,7 +260,7 @@ typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
typedef struct gNB_RRC_UE_s {
uint8_t primaryCC_id;
#if defined(Rel10) || defined(Rel14)
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SCellToAddMod_r10_t sCell_config[2];
#endif
NR_SRB_ToAddModList_t* SRB_configList;
......
......@@ -486,7 +486,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
//s->tx_md.start_of_burst = false;
//s->tx_md.end_of_burst = true;
first_packet_state = false;
last_packet_state - true;
last_packet_state = true;
} else if (flags == 4) { // start and end
// s->tx_md.start_of_burst = true;
// s->tx_md.end_of_burst = true;
......@@ -502,8 +502,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
// s->tx_md.has_time_spec = false;
// s->tx_md.start_of_burst = false;
// s->tx_md.end_of_burst = true;
first_packet_state=false;
last_packet_state=true;
first_packet_state = false;
last_packet_state = true;
}
s->tx_md.has_time_spec = true;
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet_state;
......
......@@ -471,7 +471,7 @@ void eNB_top(PHY_VARS_eNB *eNB,
proc->subframe_rx = subframe_rx;
if (!oai_exit) {
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(ru_proc->frame_rx), T_INT(ru_proc->subframe_rx));
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(ru_proc->frame_rx), T_INT(ru_proc->tti_rx));
L1_proc->timestamp_tx = ru_proc->timestamp_rx + (sf_ahead*fp->samples_per_tti);
L1_proc->frame_rx = ru_proc->frame_rx;
L1_proc->subframe_rx = ru_proc->tti_rx;
......@@ -523,7 +523,7 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
for(int ru_id=0; ru_id<eNB->num_RU; ru_id++){
ru = eNB->RU_list[ru_id];
ru_proc = &ru->proc;
fp = &ru->frame_parms;
fp = ru->frame_parms;
if (((fp->frame_type == TDD) && (subframe_select(fp,proc->subframe_tx)==SF_UL))||
(eNB->RU_list[ru_id]->state == RU_SYNC)||
(eNB->RU_list[ru_id]->wait_cnt>0)){
......@@ -536,7 +536,7 @@ int wakeup_txfh(PHY_VARS_eNB *eNB,
AssertFatal((ret = pthread_mutex_lock(&ru_proc->mutex_eNBs))==0,"ERROR pthread_mutex_lock failed on mutex_eNBs L1_thread_tx with ret=%d\n",ret);
if (ru_proc->instance_cnt_eNBs == 0) {
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->tti_tx, proc->frame_rx, proc->subframe_rx);
AssertFatal((ret=pthread_mutex_lock(&eNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
eNB->proc.RU_mask_tx = 0;
AssertFatal((ret=pthread_mutex_unlock(&eNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
......@@ -609,7 +609,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int ret;
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->subframe_rx);
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
// wake up TX for subframe n+sl_ahead
// lock the TX mutex and make sure the thread is ready
......@@ -617,7 +617,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe
AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->subframe_rx);
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
return(0);
}
......
......@@ -467,7 +467,7 @@ void fh_if5_north_asynch_in(RU_t *ru,
frame_tx = (timestamp_tx/(fp->samples_per_tti*10))&1023;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU, proc->tti_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
if (proc->first_tx != 0) {
*subframe = tti_tx;
......@@ -1622,7 +1622,7 @@ static void* ru_thread_tx( void* param )
// wait until eNBs are finished subframe RX n and TX n+4
wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.subframe_tx);
LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.tti_tx);
if (oai_exit) break;
......@@ -2007,7 +2007,6 @@ void *ru_thread_synch(void *arg)
RU_t *ru = (RU_t *)arg;
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
int64_t peak_val, avg;
uint32_t sync_corr[307200] __attribute__((aligned(32)));
static int ru_thread_synch_status = 0;
int cnt=0;
thread_top_init("ru_thread_synch",0,5000000,10000000,10000000);
......@@ -2408,7 +2407,7 @@ void init_RU_proc(RU_t *ru)
pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru );
ru->state=RU_RUN;
fill_rf_config(ru,ru->rf_config_file);
init_frame_parms(&ru->frame_parms,1);
init_frame_parms(ru->frame_parms,1);
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
phy_init_RU(ru);
......@@ -2799,10 +2798,14 @@ void init_RU(char *rf_config_file,
// NOTE: multiple CC_id are not handled here yet!
ru->openair0_cfg.clock_source = clock_source;
ru->openair0_cfg.time_source = time_source;
ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
ru->generate_dmrs_sync = 1;
else
ru->generate_dmrs_sync = 0;
if (ru->generate_dmrs_sync == 1) {
generate_ul_ref_sigs();
ru->dmrssync = (int16_t*)malloc16_clear(ofdm_symbol_size*2*sizeof(int16_t));
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
}
ru->wakeup_L1_sleeptime = 2000;
ru->wakeup_L1_sleep_cnt_max = 3;
......@@ -3087,6 +3090,9 @@ void RCconfig_RU(void)
printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
else RC.ru[j]->is_slave=0;
printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) RC.ru[j]->ota_sync_enable=1;
else RC.ru[j]->ota_sync_enable=0;
}
RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
......
......@@ -56,7 +56,6 @@ softmodem_params_t *get_softmodem_params(void) {
void get_common_options(void) {
uint32_t online_log_messages;
uint32_t glog_level ;
uint32_t glog_verbosity;
uint32_t start_telnetsrv;
uint32_t noS1;
uint32_t nokrnmod;
......
......@@ -126,7 +126,7 @@
#define CMDLINE_DUMPMEMORY_IDX 7
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define START_MSC softmodem_params.start_msc
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters specific to UE */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......@@ -224,7 +224,6 @@
#define CMDLINE_LOGPARAMS_DESC { \
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
}
......
......@@ -287,7 +287,7 @@ void init_UE(int nb_inst,
// needed for memcopy below. these are not used in the RU, but needed for UE
RC.ru[0]->frame_parms->nb_antennas_rx = fp0->nb_antennas_rx;
RC.ru[0]->frame_parms->nb_antennas_tx = fp0->nb_antennas_tx;
PHY_vars_UE_g[inst][0] = init_ue_vars(&RC.ru[0]->frame_parms,inst,0);
PHY_vars_UE_g[inst][0] = init_ue_vars(RC.ru[0]->frame_parms,inst,0);
}
// turn off timing control loop in UE
......
......@@ -578,8 +578,8 @@ void* ru_thread_control( void* param )
fill_rf_config(ru,ru->rf_config_file);
init_frame_parms(&ru->frame_parms,1);
ru->frame_parms.nb_antennas_rx = ru->nb_rx;
init_frame_parms(ru->frame_parms,1);
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
phy_init_RU(ru);
//if (ru->is_slave == 1) lte_sync_time_init(&ru->frame_parms);
......
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