Commit bdee4587 authored by laurent's avatar laurent

cleanup branch

parent e376241a
......@@ -167,7 +167,7 @@ endif()
#
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
# add autotools definitions that were maybe used!
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
set(CMAKE_C_FLAGS
......@@ -2440,9 +2440,9 @@ endif (${T_TRACER})
#This rule and the following deal with it.
add_custom_command (
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
COMMAND $(MAKE) clean
COMMAND $(MAKE)
COMMAND $(MAKE) check_vcd
COMMAND make clean
COMMAND make
COMMAND make check_vcd
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
......@@ -3000,7 +3000,7 @@ if (${T_TRACER})
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_NR MAC_UE_NR
CN_UTILS GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB
ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT_LIB)
if (TARGET ${i})
add_dependencies(${i} generate_T)
endif()
......@@ -3043,7 +3043,7 @@ function(make_driver name dir)
endforeach()
CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
add_custom_command(OUTPUT ${name}.ko
COMMAND $(MAKE) -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
COMMENT "building ${module}.ko"
VERBATIM
......
......@@ -408,6 +408,10 @@ function main() {
SKIP_SHARED_LIB_FLAG="True"
echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
shift;;
--ninja)
CMAKE_CMD="$CMAKE_CMD -GNinja"
MAKE_CMD=ninja
shift;;
-h | --help)
print_help
exit 1;;
......
......@@ -183,11 +183,15 @@ compilations() {
else
COV_SCAN_PREFIX=""
fi
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $2
else
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else
$COV_SCAN_PREFIX make -j`nproc` $2
fi
fi
} > $dlog/$2.$REL.txt 2>&1
set -e
......@@ -619,6 +623,7 @@ check_install_oai_software() {
build-essential \
cmake \
cmake-curses-gui \
ninja-build \
doxygen \
doxygen-gui \
texlive-latex-base \
......
This diff is collapsed.
......@@ -1510,6 +1510,7 @@ void *cu_fs6(void *arg) {
char remoteIP[1024];
strncpy(remoteIP,get_softmodem_params()->split73+3, 1023); //three first char should be cu: or du:
char port_def[256]=DU_PORT;
for (int i=0; i <1000; i++)
if (remoteIP[i]==':') {
strncpy(port_def,remoteIP+i+1,255);
......@@ -1558,12 +1559,14 @@ void *du_fs6(void *arg) {
char remoteIP[1024];
strncpy(remoteIP,get_softmodem_params()->split73+3,1023); //three first char should be cu: or du:
char port_def[256]=CU_PORT;
for (int i=0; i <1000; i++)
if (remoteIP[i]==':') {
strncpy(port_def,remoteIP+i+1,255);
remoteIP[i]=0;
break;
}
AssertFatal(createUDPsock(NULL, DU_PORT, remoteIP, port_def, &sockFS6), "");
if (ru->rfdevice.trx_start_func(&ru->rfdevice) != 0)
......
......@@ -734,9 +734,7 @@ void init_gNB_proc(int inst) {
gNB_L1_rxtx_proc_t *L1_proc,*L1_proc_tx;
// LOG_I(PHY,"%s(inst:%d) RC.nb_nr_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_nr_CC[inst]);
gNB = RC.gNB[inst];
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing gNB processes instance:%d CC_id %d \n",inst,CC_id);
#endif
proc = &gNB->proc;
L1_proc = &proc->L1_proc;
......@@ -950,9 +948,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
NR_POLAR_PBCH_PAYLOAD_BITS,
NR_POLAR_PBCH_AGGREGATION_LEVEL);*/
LOG_I(PHY,"Initializing gNB %d single_thread_flag:%d\n",inst,gNB->single_thread_flag);
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing gNB %d\n",inst);
#endif
LOG_I(PHY,"Registering with MAC interface module (before %p)\n",gNB->if_inst);
AssertFatal((gNB->if_inst = NR_IF_Module_init(inst))!=NULL,"Cannot register interface");
......
......@@ -1677,9 +1677,7 @@ void init_RU_proc(RU_t *ru) {
int i=0;
RU_proc_t *proc;
char name[100];
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
#endif
proc = &ru->proc;
memset((void *)proc,0,sizeof(RU_proc_t));
proc->ru = ru;
......
......@@ -837,7 +837,7 @@ void *UE_thread(void *arg) {
if ( decoded_frame_rx != curMsg->proc.frame_rx &&
((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx )
LOG_D(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
decoded_frame_rx, curMsg->proc.frame_rx );
nbSlotProcessing++;
......
......@@ -22,7 +22,7 @@
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32];
extern unsigned short lte_cqi_eff1024[16];
extern char lte_cqi_snr_dB[15];
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern short minus_one[8];
extern short minus_one[8];
extern short *ul_ref_sigs[30][2][34];
......
......@@ -29,8 +29,6 @@
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs_UE.h"
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
......@@ -63,4 +61,3 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
}
#endif
......@@ -29,8 +29,6 @@
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs_UE.h"
extern int
......@@ -66,5 +64,3 @@ void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx)
}
}
#endif
......@@ -29,8 +29,6 @@
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs_UE.h"
......@@ -39,5 +37,3 @@ void generate_slss(PHY_VARS_UE *ue,SLSS_t *slss,int frame_tx,int subframe_tx) {
AssertFatal(1==0,"Should get here yet for UE %d\n",ue->Mod_id);
}
#endif
......@@ -25,6 +25,7 @@
#include "nr_modulation.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <common/utils/LOG/log.h>
//#define DEBUG_FEP
......
......@@ -31,7 +31,7 @@
__m64 byte2m64_re[256];
__m64 byte2m64_im[256];
void init_byte2m64() {
void init_byte2m64(void) {
for (int s=0;s<256;s++) {
byte2m64_re[s] = _mm_insert_pi16(byte2m64_re[s],(1-2*(s&1)),0);
......@@ -53,7 +53,7 @@ void init_byte2m64() {
}
}
void init_scrambling_luts() {
void init_scrambling_luts(void) {
init_byte2m64();
......
......@@ -61,4 +61,5 @@ uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint
uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r);
void init_pucch2_luts(void);
#endif
......@@ -304,7 +304,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
}
#ifdef DEBUG_RB_EXT
printf("re = %d, is_dmrs_symbol_flag = %d, symbol = %d\n", re, is_dmrs_symbol_flag, symbol);
printf("re = %d, is_ptrs_symbol_flag = %d, symbol = %d\n", re, is_ptrs_symbol_flag, symbol);
#endif
if ( is_dmrs_re == 0 && is_ptrs_symbol_flag == 0) {
......@@ -315,8 +315,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
ul_ch0_ptrs_ext[ul_ch0_ptrs_ext_index] = ul_ch0_ptrs[ul_ch0_ptrs_index];
#ifdef DEBUG_RB_EXT
printf("rxF_ext[%d] = %d\n", rxF_ext_index, rxF_ext[rxF_ext_index]);
printf("rxF_ext[%d] = %d\n", rxF_ext_index+1, rxF_ext[rxF_ext_index+1]);
printf("rxF_ext[%d] = %d, %d\n", rxF_ext_index, rxF_ext[rxF_ext_index], rxF_ext[rxF_ext_index+1]);
#endif
ul_ch0_ext_index++;
......
......@@ -42,6 +42,7 @@
#include "PHY/defs_gNB.h"
#include "PHY/sse_intrin.h"
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
......@@ -263,7 +264,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
}
#else
int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
const int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
int16_t xr[24] __attribute__((aligned(32)));
int16_t xrt[24] __attribute__((aligned(32)));
int32_t xrtmag=0;
......@@ -966,7 +967,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
//extract pucch and dmrs first
int l2;
int l2=-1;
int re_offset = (12*pucch_pdu->prb_start) + (12*pucch_pdu->bwp_start) + frame_parms->first_carrier_offset;
if (re_offset>= frame_parms->ofdm_symbol_size)
re_offset-=frame_parms->ofdm_symbol_size;
......@@ -1330,7 +1331,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int harq_bytes=pucch_pdu->bit_len_harq>>3;
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
uci_pdu->harq.harq_payload = (nfapi_nr_harq_t*)malloc(harq_bytes);
uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes);
uci_pdu->harq.harq_crc = 2;
for (int i=0;i<harq_bytes;i++) {
uci_pdu->harq.harq_payload[i] = cw_ML & 255;
......
......@@ -38,6 +38,7 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
#include "T.h"
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
......
......@@ -38,6 +38,7 @@
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......
......@@ -148,11 +148,7 @@ static inline void* malloc16_clear( size_t size )
#define NB_BANDS_MAX_NB_IoT 8
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
typedef enum {normal_txrx_NB_IoT=0,rx_calib_ue_NB_IoT=1,rx_calib_ue_med_NB_IoT=2,rx_calib_ue_byp_NB_IoT=3,debug_prach_NB_IoT=4,no_L2_connect_NB_IoT=5,calib_prach_tx_NB_IoT=6,rx_dump_frame_NB_IoT=7,loop_through_memory_NB_IoT=8} runmode_NB_IoT_t;
#endif
/*
enum transmission_access_mode {
NO_ACCESS=0,
......
......@@ -45,9 +45,6 @@
#define MAX_RRU_CONFIG_SIZE 1024
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
typedef enum {
normal_txrx=0,
......@@ -93,7 +90,6 @@ typedef enum {
synch_to_other, // synch to another source_(timer, other RU)
synch_to_mobipass_standalone // special case for mobipass in standalone mode
} node_timing_t;
#endif
typedef struct {
......
......@@ -99,9 +99,6 @@
#define NB_RX_ANTENNAS_MAX 64
#ifdef OCP_FRAMEWORK
#include "enums.h"
#else
typedef enum {TDD=1,FDD=0} lte_frame_type_t;
......@@ -122,7 +119,6 @@ typedef enum {
one=6,
two=12
} PHICH_RESOURCE_t;
#endif
/// PHICH-Config from 36.331 RRC spec
typedef struct {
/// Parameter: PHICH-Duration, see TS 36.211 (Table 6.9.3-1).
......@@ -250,12 +246,10 @@ typedef struct {
} UL_REFERENCE_SIGNALS_PUSCH_t;
/// Enumeration for parameter Hopping-mode \ref PUSCH_CONFIG_COMMON::hoppingMode.
#ifndef OCP_FRAMEWORK
typedef enum {
interSubFrame=0,
intraAndInterSubFrame=1
} PUSCH_HOPPING_t;
#endif
/// PUSCH-ConfigCommon from 36.331 RRC spec.
typedef struct {
......@@ -434,7 +428,6 @@ typedef struct {
uint8_t filterCoefficient;
} UL_POWER_CONTROL_DEDICATED;
#ifndef OCP_FRAMEWORK
/// Enumeration for parameter \f$\alpha\f$ \ref UL_POWER_CONTROL_CONFIG_COMMON::alpha.
typedef enum {
al0=0,
......@@ -446,7 +439,6 @@ typedef enum {
al09=6,
al1=7
} PUSCH_alpha_t;
#endif
/// \note UNUSED
typedef enum {
......
......@@ -38,7 +38,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern unsigned int DAQ_MBOX;
extern int number_of_cards;
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern RAN_CONTEXT_t RC;
......@@ -73,8 +73,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -82,23 +82,22 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
......@@ -34,7 +34,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
//#include "PHY/LTE_TRANSPORT/transport_extern.h"
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern int number_of_cards;
......@@ -70,8 +70,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -79,23 +79,19 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
......@@ -36,7 +36,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern int number_of_cards;
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern PHY_VARS_UE ***PHY_vars_UE_g;
......@@ -70,8 +70,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -79,23 +79,23 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -86,17 +86,6 @@ char nr_mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
extern double cpuf;
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
uint32_t frame,
uint32_t slot);
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
int frame,
int nr_tti_rx,
fapi_nr_dci_indication_t *dci_ind);
/*
int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
uint8_t eNB_id,
......
......@@ -465,7 +465,7 @@ int main(int argc, char **argv)
mcs=table1_mcs[actual_payload];
else if(nr_bit==2)
mcs=table2_mcs[actual_payload];
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n");
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n", nr_bit, sr_flag);
}
for(SNR=snr0;SNR<=snr1;SNR=SNR+1){
......
......@@ -78,7 +78,6 @@
* the key length is 32 bytes (256 bits)
*/
#define SECURITY_KEY_LENGTH 32
#ifndef OCP_FRAMEWORK
typedef enum cell_type_e {
CELL_MACRO_ENB,
CELL_HOME_ENB,
......@@ -110,7 +109,6 @@ typedef enum cn_domain_s {
CN_DOMAIN_PS = 1,
CN_DOMAIN_CS = 2
} cn_domain_t;
#endif
typedef struct net_ip_address_s {
unsigned ipv4:1;
......@@ -126,7 +124,6 @@ typedef struct ambr_s {
bitrate_t br_dl;
} ambr_t;
#ifndef OCP_FRAMEWORK
typedef enum priority_level_s {
PRIORITY_LEVEL_SPARE = 0,
PRIORITY_LEVEL_HIGHEST = 1,
......@@ -145,7 +142,6 @@ typedef enum pre_emp_vulnerability_e {
PRE_EMPTION_VULNERABILITY_DISABLED = 1,
PRE_EMPTION_VULNERABILITY_MAX,
} pre_emp_vulnerability_t;
#endif
typedef struct allocation_retention_priority_s {
priority_level_t priority_level;
......
......@@ -60,7 +60,7 @@ extern uint16_t NB_THREAD_INST;
extern unsigned char NB_RN_INST;
extern unsigned short NODE_ID[1];
extern int cqi_to_mcs[16];
extern const int cqi_to_mcs[16];
extern uint32_t RRC_CONNECTION_FLAG;
......
......@@ -36,6 +36,7 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include <openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
......
......@@ -45,7 +45,7 @@ extern const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
extern UE_RRC_INST *UE_rrc_inst;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern int cqi_to_mcs[16];
extern const int cqi_to_mcs[16];
extern uint32_t RRC_CONNECTION_FLAG;
extern uint8_t rb_table[34];
extern mac_rlc_am_muilist_t rlc_am_mui;
......
......@@ -375,7 +375,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
int CC_id, UE_id = 0;
gNB_MAC_INST *gNB = RC.nrmac[module_idP];
NR_UE_list_t *UE_list = &gNB->UE_list;
UE_sched_ctrl_t *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
NR_UE_sched_ctrl_t *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
NR_COMMON_channels_t *cc = gNB->common_channels;
NR_sched_pucch *pucch_sched = (NR_sched_pucch*) malloc(sizeof(NR_sched_pucch));
......@@ -423,7 +423,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
// TbD once RACH is available, start ta_timer when UE is connected
if (ue_sched_ctl->ta_timer) ue_sched_ctl->ta_timer--;
#if 0
if (ue_sched_ctl->ta_timer) ue_sched_ctl->ta_timer--;
if (ue_sched_ctl->ta_timer == 0) {
gNB->ta_command = ue_sched_ctl->ta_update;
......@@ -435,6 +436,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
/* MAC CE flag indicating TA length */
gNB->ta_len = 2;
}
#endif
// Phytest scheduling
if (get_softmodem_params()->phy_test && slot_txP==1){
......
......@@ -245,7 +245,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
int current_rnti = 0, UE_id = -1, harq_pid = 0;
gNB_MAC_INST *gNB_mac = NULL;
NR_UE_list_t *UE_list = NULL;
UE_sched_ctrl_t *UE_scheduling_control = NULL;
NR_UE_sched_ctrl_t *UE_scheduling_control = NULL;
current_rnti = rntiP;
UE_id = find_nr_UE_id(gnb_mod_idP, current_rnti);
......@@ -261,7 +261,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
CC_idP,
frameP,
slotP,
UE_scheduling_control->round_UL[CC_idP][harq_pid],
-1, //UE_scheduling_control->round_UL[CC_idP][harq_pid],
current_rnti,
UE_id,
ul_cqi);
......@@ -277,7 +277,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
#endif
if (sduP != NULL){
UE_scheduling_control->ta_update = timing_advance;
//UE_scheduling_control->ta_update = timing_advance;
LOG_D(MAC, "Received PDU at MAC gNB \n");
nr_process_mac_pdu(gnb_mod_idP, CC_idP, frameP, sduP, sdu_lenP);
}
......
/*
* 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
*/
/*
pdcp_proto_extern.h
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
#ifndef __PDCP_PROTO_EXTERN_H__
# define __PDCP_PROTO_EXTERN_H__
//# include "pdcp_entity.h"
//# include "rb_mux.h"
# include "mem_block.h"
#ifdef ROHC
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP);
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block *sduP);
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
extern void control_pdcp (struct pdcp_entity *pdcpP);
extern void pdcp_process_input_sdus_high(struct pdcp_entity *pdcpP);
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block *sduP, uint16_t data_sizeP, uint16_t rb_idP);
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
extern void *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
extern int reception_from_rohc_mt(void);
extern int reception_from_rohc_bs(void);
#else
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP, uint8_t is_data_plane);
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char *sdu_buffer,
uint8_t is_data_pdu,const uint32_t *const sourceL2Id,const uint32_t *const destinationL2Id
);
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
extern void control_pdcp (struct pdcp_entity *pdcpP);
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP);
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP);
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
extern void *pdcp_tx (void *argP);
#endif
extern void pdcp_pc5_socket_init(void);
#endif
......@@ -6682,14 +6682,6 @@ char openair_rrc_eNB_configuration(
LOG_I(RRC,
PROTOCOL_RRC_CTXT_FMT" Init...\n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt));
#if OCP_FRAMEWORK
while ( RC.rrc[enb_mod_idP] == NULL ) {
LOG_E(RRC, "RC.rrc not yet initialized, waiting 1 second\n");
sleep(1);
}
#endif
AssertFatal(RC.rrc[enb_mod_idP] != NULL, "RC.rrc not initialized!");
AssertFatal(MAX_MOBILES_PER_ENB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
AssertFatal(configuration!=NULL,"configuration input is null\n");
......
......@@ -268,13 +268,6 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
LOG_I(NR_RRC,
PROTOCOL_NR_RRC_CTXT_FMT" Init...\n",
PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
#if OCP_FRAMEWORK
while (rrc == NULL ) {
LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n");
sleep(1);
}
#endif
AssertFatal(rrc != NULL, "RC.nrrrc not initialized!");
AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
AssertFatal(configuration!=NULL,"configuration input is null\n");
......
......@@ -88,16 +88,12 @@ typedef guint8 gboolean;
{ .s5= {NULL }} , \
}
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
typedef enum trace_mode_e {
OPT_WIRESHARK,
OPT_PCAP,
OPT_TSHARK,
OPT_NONE
} trace_mode_t;
#endif
typedef enum radio_type_e {
RADIO_TYPE_FDD = 1,
......
......@@ -19,15 +19,15 @@
* contact@openairinterface.org
*/
/*! \file m2ap_handler.h
* \brief m2ap handler procedures for eNB
/*! \file m3ap_handler.h
* \brief m3ap handler procedures for eNB
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M2AP_MCE_HANDLERS_H_
#define M2AP_MCE_HANDLERS_H_
#ifndef M3AP_MCE_HANDLERS_H_
#define M3AP_MCE_HANDLERS_H_
#include "m2ap_MCE_defs.h"
......
......@@ -19,15 +19,15 @@
* contact@openairinterface.org
*/
/*! \file m2ap_MCE_generate_messages.h
* \brief m2ap procedures for MCE
/*! \file m3ap_MCE_generate_messages.h
* \brief m3ap procedures for MCE
* \author Javier Morgade <javier.morgade@ieee.org>
* \date 2019
* \version 0.1
*/
#ifndef M2AP_MCE_GENERATE_MESSAGES_H_
#define M2AP_MCE_GENERATE_MESSAGES_H_
#ifndef M3AP_MCE_GENERATE_MESSAGES_H_
#define M3AP_MCE_GENERATE_MESSAGES_H_
#include "m2ap_MCE_defs.h"
#include "m2ap_common.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -43,7 +43,7 @@ void gen_network_record_from_conf(const plmn_conf_param_t *conf, network_record_
strcpy(record->fullname, conf->fullname);
strcpy(record->shortname, conf->shortname);
char num[6];
char num[60];
sprintf(num, "%s%s", conf->mcc, conf->mnc);
record->num = atoi(num);
......
This diff is collapsed.
This diff is collapsed.
......@@ -69,13 +69,9 @@ typedef enum {
max_gain=0,med_gain,byp_gain
} rx_gain_t;
#if OCP_FRAMEWORK
#include <enums.h>
#else
typedef enum {
duplex_mode_TDD=1,duplex_mode_FDD=0
} duplex_mode_t;
#endif
/** @addtogroup _GENERIC_PHY_RF_INTERFACE_
......
......@@ -37,15 +37,11 @@
#include "PHY/LTE_TRANSPORT/if5_tools.h"
// ETH transport preference modes
#ifdef OCP_FRAMEWORK
#include "enums.h"
#else
#define ETH_UDP_MODE 0
#define ETH_RAW_MODE 1
#define ETH_UDP_IF4p5_MODE 2
#define ETH_RAW_IF4p5_MODE 3
#define ETH_RAW_IF5_MOBIPASS 4
#endif
// COMMOM HEADER LENGTHS
......
......@@ -851,9 +851,7 @@ void init_eNB_proc(int inst) {
for (CC_id=0; CC_id<RC.nb_CC[inst]; CC_id++) {
eNB = RC.eNB[inst][CC_id];
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing eNB processes instance:%d CC_id %d \n",inst,CC_id);
#endif
proc = &eNB->proc;
L1_proc = &proc->L1_proc;
L1_proc_tx = &proc->L1_proc_tx;
......@@ -1247,9 +1245,7 @@ void init_eNB(int single_thread_flag,
eNB->abstraction_flag = 0;
eNB->single_thread_flag = single_thread_flag;
LOG_I(PHY,"Initializing eNB %d CC_id %d single_thread_flag:%d\n",inst,CC_id,single_thread_flag);
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing eNB %d CC_id %d\n",inst,CC_id);
#endif
LOG_I(PHY,"Registering with MAC interface module\n");
AssertFatal((eNB->if_inst = IF_Module_init(inst))!=NULL,"Cannot register interface");
eNB->if_inst->schedule_response = schedule_response;
......
......@@ -2233,9 +2233,7 @@ void init_RU_proc(RU_t *ru) {
RU_proc_t *proc;
pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL, *attr_prach=NULL, *attr_asynch=NULL, *attr_synch=NULL, *attr_emulateRF=NULL, *attr_ctrl=NULL, *attr_prach_br=NULL;
//pthread_attr_t *attr_fep=NULL;
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
#endif
proc = &ru->proc;
memset((void *)proc,0,sizeof(RU_proc_t));
proc->ru = ru;
......
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