diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d76434190..26eb35eb51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,12 +189,17 @@ elseif(${CPUARCH} NOT STREQUAL "x86_64")
message(FATAL_ERROR "Cannot compile for CPU architecture ${CPUARCH}")
endif()
-set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -fno-var-tracking-assignments -march=native")
+set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=native")
# add autotools definitions that were maybe used!
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
-set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
+set(commonOpts "-pipe -fPIC -Wall -fno-strict-aliasing")
+# GNU C/C++ Compiler might throw many warnings without packed-bitfield-compat, see man page
+# also, we need -rdynamic to incorporate all symbols in shared objects, again, see man page
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set(commonOpts "${commonOpts} -Wno-packed-bitfield-compat -rdynamic")
+endif()
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu11 -funroll-loops")
@@ -1513,6 +1518,7 @@ set (MAC_NR_SRC_UE
${NR_UE_MAC_DIR}/nr_ue_scheduler.c
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
${NR_UE_MAC_DIR}/nr_ra_procedures.c
+ ${NR_UE_MAC_DIR}/nr_ue_power_procedures.c
)
set (ENB_APP_SRC
diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt
index d2d5db704e..9e16576ba9 100755
--- a/cmake_targets/at_commands/CMakeLists.txt
+++ b/cmake_targets/at_commands/CMakeLists.txt
@@ -82,7 +82,7 @@ endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel)
#
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat ")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb -DMALLOC_CHECK_=3 -O2")
diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml
index 24b18e41dc..7840e89e28 100755
--- a/cmake_targets/autotests/test_case_list.xml
+++ b/cmake_targets/autotests/test_case_list.xml
@@ -443,7 +443,10 @@
(Test22: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test),
(Test23: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test),
(Test24: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test),
- (Test25: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers)
+ (Test25: 3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers),
+ (Test26: 3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers),
+ (Test27: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers),
+ (Test28: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers)
nr_ulsim
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5
@@ -469,8 +472,11 @@
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1
-n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2
-n100 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9
- -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7
- test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25
+ -n100 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s1.7 -S1.7
+ -n100 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s-2.1 -S-2.1
+ -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7
+ -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2
+ test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25 test26 test27 test28
PUSCH test OK
segmentation fault|assertion|exiting|fatal
3
diff --git a/cmake_targets/nas_sim_tools/CMakeLists.txt b/cmake_targets/nas_sim_tools/CMakeLists.txt
index 739e55a33e..05d7a42712 100755
--- a/cmake_targets/nas_sim_tools/CMakeLists.txt
+++ b/cmake_targets/nas_sim_tools/CMakeLists.txt
@@ -10,7 +10,7 @@ add_definitions(-std=gnu99)
ENABLE_LANGUAGE(C)
set(CMAKE_C_FLAGS
- "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -Werror -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -g")
+ "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -Werror -Wall -Wstrict-prototypes -g")
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c
index ca9d735fca..25586abe82 100644
--- a/common/utils/nr/nr_common.c
+++ b/common/utils/nr/nr_common.c
@@ -36,20 +36,20 @@
const char *duplex_mode[]={"FDD","TDD"};
-int tables_5_3_2[5][11] = {
- {25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1}, // 15 FR1
- {11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 273}, // 30 FR1
- {-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 135}, // 60 FR1
- {66, 132, 264, -1 , -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
- {32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1} // 120FR2
+int tables_5_3_2[5][12] = {
+ {25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
+ {11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273},// 30 FR1
+ {-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
+ {66, 132, 264, -1 , -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
+ {32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
};
-int get_supported_band_index(int scs, int band, int n_rbs){
-
+int get_supported_band_index(int scs, int band, int n_rbs)
+{
int scs_index = scs;
- if (band>256)
+ if (band > 256)
scs_index++;
- for (int i=0; i<11; i++) {
+ for (int i = 0; i < 11; i++) {
if(n_rbs == tables_5_3_2[scs][i])
return i;
}
@@ -130,6 +130,66 @@ const nr_bandentry_t nr_bandtable[] = {
{261,27500040,28350000,27500040,28350000, 2,2070833, 120}
};
+int get_supported_bw_khz(frequency_range_t frequency_range, int bw_index)
+{
+ if (frequency_range == FR1) {
+ switch (bw_index) {
+ case 0 :
+ return 5000; // 5MHz
+ case 1 :
+ return 10000;
+ case 2 :
+ return 15000;
+ case 3 :
+ return 20000;
+ case 4 :
+ return 25000;
+ case 5 :
+ return 30000;
+ case 6 :
+ return 40000;
+ case 7 :
+ return 50000;
+ case 8 :
+ return 60000;
+ case 9 :
+ return 80000;
+ case 10 :
+ return 90000;
+ case 11 :
+ return 100000;
+ default :
+ AssertFatal(false, "Invalid band index for FR1 %d\n", bw_index);
+ }
+ }
+ else {
+ switch (bw_index) {
+ case 0 :
+ return 50000; // 50MHz
+ case 1 :
+ return 100000;
+ case 2 :
+ return 200000;
+ case 3 :
+ return 400000;
+ default :
+ AssertFatal(false, "Invalid band index for FR2 %d\n", bw_index);
+ }
+ }
+}
+
+bool compare_relative_ul_channel_bw(int nr_band, int scs, int nb_ul, frame_type_t frame_type)
+{
+ // 38.101-1 section 6.2.2
+ // Relative channel bandwidth <= 4% for TDD bands and <= 3% for FDD bands
+ int index = get_nr_table_idx(nr_band, scs);
+ int bw_index = get_supported_band_index(scs, nr_band, nb_ul);
+ int band_size_khz = get_supported_bw_khz(nr_band > 256 ? FR2 : FR1, bw_index);
+ float limit = frame_type == TDD ? 0.04 : 0.03;
+ float rel_bw = (float) (2 * band_size_khz) / (float) (nr_bandtable[index].ul_max + nr_bandtable[index].ul_min);
+ return rel_bw <= limit;
+}
+
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex)
{
const int64_t dl_freq_khz = downlink_frequency / 1000;
diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h
index fc3e5c3fa4..9c3ba88be2 100644
--- a/common/utils/nr/nr_common.h
+++ b/common/utils/nr/nr_common.h
@@ -93,6 +93,7 @@ int get_nb_periods_per_frame(uint8_t tdd_period);
int get_supported_band_index(int scs, int band, int n_rbs);
long rrc_get_max_nr_csrs(const int max_rbs, long b_SRS);
void get_K1_K2(int N1, int N2, int *K1, int *K2);
+bool compare_relative_ul_channel_bw(int nr_band, int scs, int nb_ul, frame_type_t frame_type);
void get_samplerate_and_bw(int mu,
int n_rb,
int8_t threequarter_fs,
diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h
index 19b0ba32a9..131606f6fe 100644
--- a/common/utils/ocp_itti/intertask_interface.h
+++ b/common/utils/ocp_itti/intertask_interface.h
@@ -64,6 +64,9 @@ typedef struct itti_lte_time_s {
typedef struct IttiMsgEmpty_s {
+ // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
+ // To be removed if the structure is filled
+ uint32_t dummy;
} IttiMsgEmpty;
typedef struct IttiMsgText_s {
diff --git a/doc/SW_archi.md b/doc/SW_archi.md
index 6b509cc627..cccead370b 100644
--- a/doc/SW_archi.md
+++ b/doc/SW_archi.md
@@ -340,8 +340,6 @@ At Rx side, pdcp_data_ind() is the entry point that receives the data from RLC.
nr_pdcp_config_set_security(): sets the keys for AS security of a UE
-nr_DRB_preconfiguration(): the mac layer calls this for configuration in phy-test/do-ra mode
-
nr_pdcp_add_srbs() adds UE SRBs in pdcp, nr_pdcp_remove_UE() removes it
nr_pdcp_add_drbs() adds UE DRBs in pdcp, nr_pdcp_remove_UE() removes it
diff --git a/docker/Dockerfile.phySim.rhel8.2 b/docker/Dockerfile.phySim.rhel8.2
index 6abbd52832..ad0944f02b 100644
--- a/docker/Dockerfile.phySim.rhel8.2
+++ b/docker/Dockerfile.phySim.rhel8.2
@@ -31,14 +31,16 @@ RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
-#only install address sanitizer for this container, the others don't need it
-RUN yum install -y libasan
+#only install address sanitizer and LLVM (clang, ...) for this container, the others don't need it
+RUN yum install -y libasan llvm-toolset
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
- ./build_oai --phy_simulators --ninja --verbose-ci --sanitize-address --noavx512 -c
+ export CC=/usr/bin/clang && \
+ export CXX=/usr/bin/clang++ && \
+ ./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --sanitize-address --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim
diff --git a/executables/lte-enb.c b/executables/lte-enb.c
index b9f0816764..516fafd336 100644
--- a/executables/lte-enb.c
+++ b/executables/lte-enb.c
@@ -206,7 +206,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
T(T_ENB_PHY_DL_TICK, T_INT(eNB->Mod_id), T_INT(proc->frame_tx), T_INT(proc->subframe_tx));
// if this is IF5 or 3GPP_eNB
- if (eNB->RU_list && eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
+ if (eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
wakeup_prach_eNB(eNB,NULL,proc->frame_rx,proc->subframe_rx);
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
}
diff --git a/executables/lte-ru.c b/executables/lte-ru.c
index a784ee5a09..23e2a3e4b4 100644
--- a/executables/lte-ru.c
+++ b/executables/lte-ru.c
@@ -1126,7 +1126,7 @@ static void do_ru_synch(RU_t *ru) {
int check_sync(RU_t *ru, RU_t *ru_master, int subframe) {
- if (fabs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
+ if (labs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
return 0;
return 1;
@@ -1178,12 +1178,12 @@ void wakeup_L1s(RU_t *ru) {
if (ru->is_slave == 0 && ( (proc->RU_mask[ru->proc.tti_rx]&(1<RU_list[i]->state == RU_RUN) { //This is master & the RRU has already been received
if (check_sync(eNB->RU_list[i],eNB->RU_list[0],ru->proc.tti_rx) == 0)
- LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",
- eNB->RU_list[i]->idx, ru->proc.tti_rx, fabs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
+ LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %ld this is master\n",
+ eNB->RU_list[i]->idx, ru->proc.tti_rx, labs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
} else if (ru->is_slave == 1 && ru->state == RU_RUN && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<0)) == 1)) { // master already received. TODO: we assume that RU0 is master.
if (check_sync(ru,eNB->RU_list[0],ru->proc.tti_rx) == 0)
- LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",
- ru->idx, ru->proc.tti_rx, fabs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
+ LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %ld\n",
+ ru->idx, ru->proc.tti_rx, labs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
}
}
diff --git a/executables/lte-softmodem.h b/executables/lte-softmodem.h
index e9fc35ed1a..4143bce3a4 100644
--- a/executables/lte-softmodem.h
+++ b/executables/lte-softmodem.h
@@ -41,13 +41,13 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_UEMODEPARAMS_DESC { \
- {"calib-ue-rx", CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
- {"calib-ue-rx-med", CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
- {"calib-ue-rx-byp", CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
- {"debug-ue-prach", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
- {"no-L2-connect", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
- {"calib-prach-tx", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
- {"ue-dump-frame", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \
+ {"calib-ue-rx", CONFIG_HLP_CALUER, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
+ {"calib-ue-rx-med", CONFIG_HLP_CALUERM, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
+ {"calib-ue-rx-byp", CONFIG_HLP_CALUERB, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
+ {"debug-ue-prach", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
+ {"no-L2-connect", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
+ {"calib-prach-tx", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
+ {"ue-dump-frame", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, .iptr=&dumpframe, .defintval=0, TYPE_INT, 0}, \
}
#define CMDLINE_CALIBUERX_IDX 0
#define CMDLINE_CALIBUERXMED_IDX 1
@@ -90,25 +90,25 @@
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off
#define CMDLINE_UEPARAMS_DESC { \
- {"U", CONFIG_HLP_NUMUE, 0, iptr:&NB_UE_INST, defuintval:1, TYPE_INT, 0}, \
- {"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:130, TYPE_DOUBLE, 0}, \
- {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
- {"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
- {"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \
- {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
- {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
- {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:23, TYPE_INT, 0}, \
- {"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
- {"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
- {"num-ues", NULL, 0, iptr:&(NB_UE_INST), defuintval:1, TYPE_INT, 0}, \
- {"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
- {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
- {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:&usrp_args, defstrval:"type=b200",TYPE_STRING, 0}, \
- {"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
- {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
- {"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0}, \
- {"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0}, \
- {"node-number", NULL, 0, u16ptr:&node_number, defuintval:2, TYPE_UINT16, 0}, \
+ {"U", CONFIG_HLP_NUMUE, 0, .iptr=&NB_UE_INST, .defuintval=1, TYPE_INT, 0}, \
+ {"ue-rxgain", CONFIG_HLP_UERXG, 0, .dblptr=&(rx_gain[0][0]), .defdblval=130, TYPE_DOUBLE, 0}, \
+ {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, .dblptr=&rx_gain_off, .defdblval=0, TYPE_DOUBLE, 0}, \
+ {"ue-txgain", CONFIG_HLP_UETXG, 0, .dblptr=&(tx_gain[0][0]), .defdblval=0, TYPE_DOUBLE, 0}, \
+ {"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, .u8ptr=&nb_antenna_rx, .defuintval=1, TYPE_UINT8, 0}, \
+ {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, .u8ptr=&nb_antenna_tx, .defuintval=1, TYPE_UINT8, 0}, \
+ {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, .iptr=&UE_scan_carrier, .defintval=0, TYPE_INT, 0}, \
+ {"ue-max-power", NULL, 0, .iptr=&(tx_max_power[0]), .defintval=23, TYPE_INT, 0}, \
+ {"emul-iface", CONFIG_HLP_EMULIFACE, 0, .strptr=&emul_iface, .defstrval="lo", TYPE_STRING, 100}, \
+ {"L2-emul", NULL, 0, .u8ptr=&nfapi_mode, .defuintval=3, TYPE_UINT8, 0}, \
+ {"num-ues", NULL, 0, .iptr=&(NB_UE_INST), .defuintval=1, TYPE_INT, 0}, \
+ {"r" , CONFIG_HLP_PRB, 0, .u8ptr=&(frame_parms[0]->N_RB_DL), .defintval=25, TYPE_UINT8, 0}, \
+ {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, .iptr=(int32_t *)&dlsch_demod_shift, .defintval=0, TYPE_INT, 0}, \
+ {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, .strptr=&usrp_args, .defstrval="type=b200",TYPE_STRING, 0}, \
+ {"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, .uptr=&mmapped_dma, .defintval=0, TYPE_INT, 0}, \
+ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, .iptr=&tddflag, .defintval=0, TYPE_INT, 0}, \
+ {"A", CONFIG_HLP_TADV, 0, .iptr=&(timingadv), .defintval=0, TYPE_INT, 0}, \
+ {"ue-idx-standalone", NULL, 0, .u16ptr=&ue_idx_standalone, .defuintval=0xFFFF, TYPE_UINT16, 0}, \
+ {"node-number", NULL, 0, .u16ptr=&node_number, .defuintval=2, TYPE_UINT16, 0}, \
}
// clang-format on
diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c
index 8e0161c1b6..7e6f779095 100644
--- a/executables/lte-uesoftmodem.c
+++ b/executables/lte-uesoftmodem.c
@@ -482,7 +482,7 @@ void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
void terminate_task(task_id_t task_id, module_id_t mod_id) {
LOG_I(ENB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id);
MessageDef *msg;
- msg = itti_alloc_new_message (ENB_APP, 0, TERMINATE_MESSAGE);
+ msg = itti_alloc_new_message (TASK_ENB_APP, 0, TERMINATE_MESSAGE);
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
}
diff --git a/executables/nr-cuup.c b/executables/nr-cuup.c
index 352eed9f4a..90490e327f 100644
--- a/executables/nr-cuup.c
+++ b/executables/nr-cuup.c
@@ -84,21 +84,11 @@ int nr_rlc_get_available_tx_space(const rnti_t rntiP, const logical_chan_id_t ch
return 0;
}
-void nr_rlc_bearer_init(NR_RLC_BearerConfig_t *RLC_BearerConfig, NR_RLC_BearerConfig__servedRadioBearer_PR rb_type)
-{
- abort();
-}
-
void rrc_gNB_generate_dedicatedRRCReconfiguration(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, NR_CellGroupConfig_t *cell_groupConfig_from_DU)
{
abort();
}
-void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig)
-{
- abort();
-}
-
void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
{
abort();
@@ -110,11 +100,6 @@ int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ct
return 0;
}
-void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config_pr)
-{
- abort();
-}
-
void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_context_p, e1ap_bearer_setup_resp_t *e1ap_resp)
{
abort();
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 4024075651..b4510b1f53 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -356,9 +356,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
mac->scc->tdd_UL_DL_ConfigurationCommon :
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
ul_info.slot_tx, mac->frame_type)) {
- LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind() and nr_ue_pucch_scheduler() from %s\n", ul_info.slot_tx, __FUNCTION__);
+ LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind()\n", ul_info.slot_tx);
nr_ue_ul_scheduler(&ul_info);
- nr_ue_pucch_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx, NULL);
}
process_queued_nr_nfapi_msgs(mac, sfn_slot);
}
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
index 5e8fde4487..7ce7da2290 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
@@ -1897,6 +1897,9 @@ typedef struct {
} nfapi_ul_config_periodic_cqi_pmi_ri_report_re13_t;
typedef struct {
+ // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
+ // To be removed if the structure is filled
+ uint32_t dummy;
} nfapi_ul_config_aperiodic_cqi_pmi_ri_report_re13_t;
typedef struct {
@@ -3020,9 +3023,15 @@ typedef struct {
#define NFAPI_LBT_DL_INDICATION_BODY_TAG 0x2058
typedef struct {
+ // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
+ // To be removed if the structure is filled
+ uint32_t dummy;
} nfapi_error_indication_msg_invalid_state;
typedef struct {
+ // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
+ // To be removed if the structure is filled
+ uint32_t dummy;
} nfapi_error_indication_msg_bch_missing;
typedef struct {
diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c
index 9dd5e45958..72762ba441 100644
--- a/openair1/PHY/CODING/TESTBENCH/polartest.c
+++ b/openair1/PHY/CODING/TESTBENCH/polartest.c
@@ -29,7 +29,6 @@ int main(int argc, char *argv[])
uint32_t decoderState=0, blockErrorState=0; //0 = Success, -1 = Decoding failed, 1 = Block Error.
uint16_t testLength = NR_POLAR_PBCH_PAYLOAD_BITS, coderLength = NR_POLAR_PBCH_E;
uint16_t blockErrorCumulative=0, bitErrorCumulative=0;
- double timeEncoderCumulative = 0, timeDecoderCumulative = 0;
uint8_t aggregation_level = 8, decoderListSize = 8, logFlag = 0;
uint16_t rnti=0;
@@ -326,8 +325,6 @@ int main(int argc, char *argv[])
#endif
//Iteration times are in microseconds.
- timeEncoderCumulative+=(timeEncoder.diff/(get_cpu_freq_GHz()*1000.0));
- timeDecoderCumulative+=(timeDecoder.diff/(get_cpu_freq_GHz()*1000.0));
if (logFlag) fprintf(logFile,",%f,%d,%u,%f,%f\n", SNR, nBitError, blockErrorState, (timeEncoder.diff/(get_cpu_freq_GHz()*1000.0)), (timeDecoder.diff/(get_cpu_freq_GHz()*1000.0)));
if (nBitError<0) {
@@ -351,14 +348,11 @@ int main(int argc, char *argv[])
decoderListSize, SNR, ((double)blockErrorCumulative/iterations),
((double)bitErrorCumulative / (iterations*testLength)),
(double)timeEncoder.diff/timeEncoder.trials/(get_cpu_freq_GHz()*1000.0),(double)timeDecoder.diff/timeDecoder.trials/(get_cpu_freq_GHz()*1000.0));
- //(timeEncoderCumulative/iterations),timeDecoderCumulative/iterations);
if (blockErrorCumulative==0 && bitErrorCumulative==0) break;
blockErrorCumulative = 0;
bitErrorCumulative = 0;
- timeEncoderCumulative = 0;
- timeDecoderCumulative = 0;
}
print_meas(&timeEncoder,"polar_encoder",NULL,NULL);
diff --git a/openair1/PHY/CODING/lte_rate_matching.c b/openair1/PHY/CODING/lte_rate_matching.c
index 548b7bfcba..37298623c5 100644
--- a/openair1/PHY/CODING/lte_rate_matching.c
+++ b/openair1/PHY/CODING/lte_rate_matching.c
@@ -174,7 +174,7 @@ uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w) {
void sub_block_deinterleaving_turbo(uint32_t D,int16_t *d,int16_t *w) {
uint32_t RTC = (D>>5), ND, ND3;
- uint32_t row,col,Kpi,index;
+ uint32_t row,col,Kpi;
uint32_t index3,k,k2;
int16_t *d1,*d2,*d3;
@@ -200,7 +200,6 @@ void sub_block_deinterleaving_turbo(uint32_t D,int16_t *d,int16_t *w) {
#ifdef RM_DEBUG2
printf("Col %d\n",col);
#endif
- index = bitrev[col];
index3 = bitrev_x3[col];//3*index;
for (row=0; row