Commit 343bbbac authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch...

Merge remote-tracking branch 'origin/feature-better-sw-configuration-between-various-version' into develop_integration_2018_w19

Conflicts:
	cmake_targets/CMakeLists.txt
	openair1/PHY/LTE_TRANSPORT/prach.c
	openair1/PHY/LTE_TRANSPORT/print_stats.c
	openair1/PHY/LTE_TRANSPORT/transport_eNB.h
	openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
	openair1/PHY/defs_eNB.h
	openair1/PHY/impl_defs_lte.h
	openair1/SCHED/sched_common.h
	openair1/SCHED_UE/phy_procedures_lte_ue.c
	openair2/LAYER2/MAC/mac.h
	openair2/LAYER2/PDCP_v10.1.0/pdcp.c
	openair2/LAYER2/PDCP_v10.1.0/pdcp.h
	openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
	openair2/LAYER2/RLC/rlc.c
	openair2/PHY_INTERFACE/defs.h
	openair2/RRC/LTE/MESSAGES/asn1_msg.c
	openair2/RRC/LTE/MESSAGES/asn1_msg.h
	openair2/RRC/LTE/rrc_UE.c
	openair2/RRC/LTE/rrc_eNB.c
	targets/SIMU/USER/oaisim_functions.c
parents 10385904 c03650fd
......@@ -113,6 +113,14 @@ macro(add_list_string_option name val helpstr)
add_definitions("-D${name}=\"${value}\"")
endif()
endmacro(add_list_string_option)
function(make_version VERSION_VALUE)
math(EXPR RESULT "0")
foreach (ARG ${ARGN})
math(EXPR RESULT "${RESULT} * 16 + ${ARG}")
endforeach()
set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE)
endfunction()
####################################################
# compilation flags
#############################################
......@@ -162,7 +170,7 @@ 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 ")
# add autotools definitions that were maybe used!
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -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"
"${CMAKE_C_FLAGS} -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 -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
......@@ -285,16 +293,21 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
make_version(RRC_VERSION 8 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
make_version(RRC_VERSION 10 2 0)
add_definitions(-DCBA)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
make_version(RRC_VERSION 10 2 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
else()
make_version(RRC_VERSION 14 3 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/RRC-e30.asn)
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION})
add_definitions(-DRRC_VERSION=${RRC_VERSION})
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
if(NOT EXISTS ${asn1c_call})
message( FATAL_ERROR "The script ${asn1c_call} must be present" )
endif(NOT EXISTS ${asn1c_call})
......@@ -333,18 +346,20 @@ add_custom_command (
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(S1AP_VERSION R10 "S1AP Asn.1 grammar version" R8 R9 R10)
add_list1_option(S1AP_RELEASE R10 "S1AP ASN.1 grammar version" R8 R9 R10)
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
if (${S1AP_VERSION} STREQUAL "R10")
set (ASN1RELDIR R10.5)
add_definitions("-DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10")
elseif (${S1AP_VERSION} STREQUAL "R9")
set (ASN1RELDIR R9.8)
add_definitions("-DUPDATE_RELEASE_9")
else(${S1AP_VERSION} STREQUAL "R8")
if (${S1AP_RELEASE} STREQUAL "R8")
make_version(S1AP_VERSION 8 10 0)
set (ASN1RELDIR R8.10)
endif(${S1AP_VERSION} STREQUAL "R10")
elseif (${S1AP_RELEASE} STREQUAL "R9")
make_version(S1AP_VERSION 9 8 0)
set (ASN1RELDIR R9.8)
elseif (${S1AP_RELEASE} STREQUAL "R10")
make_version(S1AP_VERSION 10 5 0)
set (ASN1RELDIR R10.5)
endif(${S1AP_RELEASE} STREQUAL "R8")
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(S1AP_ASN_FILES
${S1AP_ASN_DIR}/S1AP-CommonDataTypes.asn
......@@ -352,7 +367,7 @@ set(S1AP_ASN_FILES
${S1AP_ASN_DIR}/S1AP-IEs.asn
${S1AP_ASN_DIR}/S1AP-PDU.asn
)
set(S1AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR})
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${ASN1RELDIR})
#message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}")
execute_process(COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}
RESULT_VARIABLE ret)
......@@ -364,7 +379,7 @@ execute_process(COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1A
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "asn1tostruct.py: error")
endif (NOT ${ret} STREQUAL 0)
execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION}
execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error")
......@@ -385,7 +400,7 @@ add_custom_command (
OUTPUT ${S1AP_OAI_generated}
COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}
COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1AP_ASN_DIR}/S1AP-PDU-Contents.asn -o${S1AP_C_DIR}
COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION}
COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE}
DEPENDS ${S1AP_ASN_FILES}
)
add_library(S1AP_LIB
......@@ -419,13 +434,16 @@ add_library(S1AP_ENB
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(X2AP_VERSION R11 "X2AP Asn.1 grammar version" R10 R11)
add_list1_option(X2AP_RELEASE R11 "X2AP ASN.1 grammar version" R10 R11)
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
if (${X2AP_VERSION} STREQUAL "R11")
set (ASN1RELDIR R11.2)
elseif (${X2AP_VERSION} STREQUAL "R10")
if (${X2AP_RELEASE} STREQUAL "R10")
make_version(S1AP_VERSION 10 0 0)
set (ASN1RELDIR R.UNKNOWN)
endif(${X2AP_VERSION} STREQUAL "R11")
elseif (${X2AP_RELEASE} STREQUAL "R11")
make_version(S1AP_VERSION 11 2 0)
set (ASN1RELDIR R11.2)
endif(${X2AP_RELEASE} STREQUAL "R10")
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(X2AP_ASN_FILES
${X2AP_ASN_DIR}/X2AP-CommonDataTypes.asn
......@@ -435,7 +453,7 @@ set(X2AP_ASN_FILES
${X2AP_ASN_DIR}/X2AP-Containers.asn
)
set(X2AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${ASN1RELDIR})
#message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}")
execute_process(COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}
RESULT_VARIABLE ret)
......@@ -447,7 +465,7 @@ execute_process(COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "asn1tostruct.py: error")
endif (NOT ${ret} STREQUAL 0)
execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION}
execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error")
......@@ -468,7 +486,7 @@ add_custom_command (
OUTPUT ${X2AP_OAI_generated}
COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}
COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2AP_ASN_DIR}/X2AP-PDU-Contents.asn -o ${X2AP_C_DIR}
COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION}
COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE}
DEPENDS ${X2AP_ASN_FILES}
)
......@@ -2281,7 +2299,7 @@ endforeach()
# castxml doesn't work with c11 (gcc 5 default)
# force castxml and clang compilation with gnu89 standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard
list(APPEND itti_compiler_options "-std=gnu89")
list(APPEND itti_compiler_options "-std=gnu89;-D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h)
if(EXISTS /usr/bin/gccxml)
set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H})
......
......@@ -33,7 +33,7 @@
//#include "TDD-Config.h"
//#include "MBSFN-SubframeConfigList.h"
//#include "MobilityControlInfo.h"
//#if defined(Rel10) || defined(Rel14)
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
//#include "SCellToAddMod-r10.h"
//#endif
......
......@@ -182,7 +182,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->frame_type,
RC.eNB[Mod_id][CC_id]->X_u);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
fp->prach_emtc_config_common.prach_Config_enabled=1;
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
......@@ -735,7 +735,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, UE_id;
......@@ -831,7 +831,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*));
// PRACH BR
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
// assume maximum of 64 RX antennas for PRACH receiver
......@@ -899,7 +899,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, UE_id;
......@@ -932,7 +932,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
free_and_zero(prach_vars->prach_ifft[0]);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (int ce_level = 0; ce_level < 4; ce_level++) {
for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]);
free_and_zero(prach_vars_br->prach_ifft[ce_level]);
......
......@@ -98,7 +98,7 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) {
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j=0;j<4;j++) {
ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
......@@ -176,7 +176,7 @@ void phy_free_RU(RU_t *ru)
for (i = 0; i < ru->nb_rx; i++) {
free_and_zero(ru->prach_rxsigF[i]);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
#endif
}
......
......@@ -342,7 +342,7 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
......
......@@ -32,7 +32,7 @@
#include "PHICH-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MobilityControlInfo.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "SCellToAddMod-r10.h"
#endif
/** @addtogroup _PHY_STRUCTURES_
......@@ -349,7 +349,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint32_t perfect_ce);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
......
......@@ -119,7 +119,7 @@ uint8_t *generate_dci0(uint8_t *dci,
(aggregation_level==2) ||
(aggregation_level==4) ||
(aggregation_level==8)
#ifdef Rel14 // Added for EPDCCH/MPDCCH
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Added for EPDCCH/MPDCCH
||
(aggregation_level==16) ||
(aggregation_level==24) ||
......
......@@ -87,7 +87,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4;
uint16_t j0,j,idelta;
......@@ -110,7 +110,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
// reset = 1;
// x1 is set in lte_gold_generic
if (mbsfn_flag == 0) {
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (dlsch->i0 != 0xFFFF) {
// rule for BL/CE UEs from Section 6.3.1 in 36.211
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
......@@ -124,7 +124,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
#ifdef DEBUG_SCRAMBLING
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
#else
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
......
......@@ -48,7 +48,7 @@
//#define DEBUG_DCI_DECODING 1
//#define DEBUG_PHY
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
}
......
......@@ -47,7 +47,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif
void *tx_buffer = ru->ifbuffer.tx[subframe&1];
......@@ -221,7 +221,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
int16_t *rxF;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
else
......@@ -262,7 +262,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif
void *rx_buffer = ru->ifbuffer.rx;
......@@ -359,7 +359,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
int16_t *rxF;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (*packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0];
else
......
......@@ -43,7 +43,7 @@
#ifndef Rel14
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
#define rx_prach0 rx_prach
#endif
......@@ -54,7 +54,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t *max_preamble_delay,
uint16_t Nf,
uint8_t tdd_mapindex
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag,
uint8_t ce_level
#endif
......@@ -104,7 +104,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
int32_t *prach_ifft=(int32_t*)NULL;
int32_t **prach_ifftp=(int32_t **)NULL;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int prach_ifft_cnt=0;
#endif
#ifdef PRACH_DEBUG
......@@ -123,7 +123,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
frame_type = fp->frame_type;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
"emtc prach_Config is not enabled\n");
......@@ -158,7 +158,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t N_ZC = (prach_fmt <4)?839:139;
if (eNB) {
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
#ifdef PRACH_DEBUG
......@@ -192,7 +192,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
}
}
else {
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
#ifdef PRACH_DEBUG
frame = ru->proc.frame_prach_br;
......@@ -455,7 +455,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if ((eNB==NULL) && (ru!=NULL) && ru->function == NGFI_RRU_IF4p5) {
/// **** send_IF4 of rxsigF to RAU **** ///
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
else
......@@ -598,7 +598,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (new_dft == 1) {
new_dft = 0;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
Xu=(int16_t*)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
prach_ifft = prach_ifftp[prach_ifft_cnt++];
......@@ -655,7 +655,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} // new dft
// check energy in nth time shift, for
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if ((br_flag==0) ||
(eNB->prach_vars_br.repetition_number[ce_level]==
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
......@@ -720,7 +720,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void rx_prach(PHY_VARS_eNB *eNB,
RU_t *ru,
......@@ -762,6 +762,4 @@ void rx_prach(PHY_VARS_eNB *eNB,
}
}
#endif /* Rel14 */
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
......@@ -169,7 +169,7 @@ typedef struct {
int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t sqrt_rho_b;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
uint8_t sib1_br_flag;
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
......@@ -333,7 +333,7 @@ typedef struct {
uint8_t tdd_bundling;
/// Received Energy
uint32_t stat;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// non BL/CE, CEmodeA, CEmodeB
UE_type_t ue_type;
/// Indicates the symbols that are left empty due to eMTC retuning.
......
......@@ -425,7 +425,7 @@ typedef struct eNB_proc_NB_IoT_t_s {
int RU_mask;
/// mask for RUs serving nbiot (PRACH)
int RU_mask_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach_br;
#endif
......
......@@ -85,7 +85,7 @@ typedef struct RU_proc_t_s {
int subframe_tx;
/// subframe to act upon for reception of prach
int subframe_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for reception of prach BL/CE UEs
int subframe_prach_br;
#endif
......@@ -97,7 +97,7 @@ typedef struct RU_proc_t_s {
int frame_tx_unwrap;
/// frame to act upon for reception of prach
int frame_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// frame to act upon for reception of prach
int frame_prach_br;
#endif
......@@ -109,7 +109,7 @@ typedef struct RU_proc_t_s {
int instance_cnt_FH1;
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach_br;
#endif
......@@ -131,7 +131,7 @@ typedef struct RU_proc_t_s {
pthread_t pthread_FH1;
/// pthread structure for RU prach processing thread
pthread_t pthread_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread structure for RU prach processing thread BL/CE UEs
pthread_t pthread_prach_br;
#endif
......@@ -154,7 +154,7 @@ typedef struct RU_proc_t_s {
pthread_attr_t attr_FH1;
/// pthread attributes for RU prach
pthread_attr_t attr_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for RU prach BL/CE UEs
pthread_attr_t attr_prach_br;
#endif
......@@ -173,7 +173,7 @@ typedef struct RU_proc_t_s {
struct sched_param sched_param_FH1;
/// scheduling parameters for RU prach thread
struct sched_param sched_param_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// scheduling parameters for RU prach thread BL/CE UEs
struct sched_param sched_param_prach_br;
#endif
......@@ -186,7 +186,7 @@ typedef struct RU_proc_t_s {
pthread_cond_t cond_FH1;
/// condition variable for RU prach thread
pthread_cond_t cond_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// condition variable for RU prach thread BL/CE UEs
pthread_cond_t cond_prach_br;
#endif
......@@ -207,7 +207,7 @@ typedef struct RU_proc_t_s {
pthread_mutex_t mutex_FH1;
/// mutex for RU prach
pthread_mutex_t mutex_prach;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mutex for RU prach BL/CE UEs
pthread_mutex_t mutex_prach_br;
#endif
......@@ -899,14 +899,14 @@ typedef struct PHY_VARS_eNB_s {
nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU];
/// NFAPI PRACH information
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// NFAPI PRACH information BL/CE UEs
nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES];
#endif
Sched_Rsp_t Sched_INFO;
LTE_eNB_PDCCH pdcch_vars[2];
LTE_eNB_PHICH phich_vars[2];
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_EPDCCH epdcch_vars[2];
LTE_eNB_MPDCCH mpdcch_vars[2];
LTE_eNB_PRACH prach_vars_br;
......@@ -938,7 +938,7 @@ typedef struct PHY_VARS_eNB_s {
uint32_t lte_gold_mbsfn_table[10][3][42];
uint32_t X_u[64][839];
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t X_u_br[4][64][839];
#endif
uint8_t pbch_configured;
......
......@@ -63,7 +63,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
......@@ -128,7 +128,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// adjust transmit amplitude here based on NFAPI info
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
extern uint32_t localRIV2alloc_LUT6[32];
extern uint32_t localRIV2alloc_LUT25[512];
extern uint32_t localRIV2alloc_LUT50_0[1600];
......@@ -145,10 +145,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
uint8_t *sdu)
{
nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
#ifndef Rel8
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
#endif
LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
......@@ -163,7 +163,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0 = eNB->dlsch[UE_id][0];
dlsch1 = eNB->dlsch[UE_id][1];
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[subframe] = 0;
#endif
......@@ -217,7 +217,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
rel8->rnti,UE_id,harq_pid);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
dlsch0->sib1_br_flag=0;
if ((rel13->pdsch_payload_type <2) && (rel13->ue_type>0)) { // this is a BR/CE UE and SIB1-BR/SI-BR
......@@ -271,7 +271,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0->i0 = rel13->initial_transmission_sf_io;
#endif