Commit 5a04f969 authored by navid's avatar navid

* update bladerf interface

* update the runtime and deadline calcualtion 
* fix the isse with LIB_NAS_UE
* add additional testcases and fix the issues with autotest 


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7736 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 23fd8953
...@@ -377,8 +377,10 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") ...@@ -377,8 +377,10 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c ${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
) )
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu/") LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
set(option_HW_lib "bladeRF")
#set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "ETHERNET") elseif (${RF_BOARD} STREQUAL "ETHERNET")
include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB") include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
...@@ -1219,7 +1221,7 @@ set (libnas_utils_OBJS ...@@ -1219,7 +1221,7 @@ set (libnas_utils_OBJS
${NAS_SRC}COMMON/UTIL/OctetString.c ${NAS_SRC}COMMON/UTIL/OctetString.c
) )
if(NAS_UE) if(NAS_UE)
set(libnas_ue_api_OBJS set(libnas_ue_api_OBJS
${NAS_SRC}UE/API/USER/at_command.c ${NAS_SRC}UE/API/USER/at_command.c
${NAS_SRC}UE/API/USER/at_error.c ${NAS_SRC}UE/API/USER/at_error.c
...@@ -1307,6 +1309,8 @@ if(NAS_UE) ...@@ -1307,6 +1309,8 @@ if(NAS_UE)
${libnas_ue_esm_OBJS} ${libnas_ue_esm_OBJS}
${libnas_ue_esm_sap_OBJS} ${libnas_ue_esm_sap_OBJS}
) )
set(NAS_UE_LIB LIB_NAS_UE)
include_directories(${NAS_SRC}UE) include_directories(${NAS_SRC}UE)
include_directories(${NAS_SRC}UE/API/USER) include_directories(${NAS_SRC}UE/API/USER)
include_directories(${NAS_SRC}UE/API/USIM) include_directories(${NAS_SRC}UE/API/USIM)
...@@ -1554,17 +1558,19 @@ add_executable(lte-softmodem ...@@ -1554,17 +1558,19 @@ add_executable(lte-softmodem
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_SOURCE_SOFTMODEM}
) )
if (MESSAGE_CHART_GENERATOR) if (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} LIB_NAS_UE ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group ) -Wl,--end-group )
else (MESSAGE_CHART_GENERATOR) else (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} LIB_NAS_UE ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group ) -Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR) endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${XFORMS_LIBRARIES} ) target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES})
...@@ -1757,8 +1763,6 @@ target_link_libraries (rrh_gw ${option_HW_lib} ${LIBBOOST_LIBRARIES} ) ...@@ -1757,8 +1763,6 @@ target_link_libraries (rrh_gw ${option_HW_lib} ${LIBBOOST_LIBRARIES} )
Message("-- option_HW_lib=${option_HW_lib}") Message("-- option_HW_lib=${option_HW_lib}")
Message("-- HW_SOURCE=${HW_SOURCE}") Message("-- HW_SOURCE=${HW_SOURCE}")
# USIM process # USIM process
################# #################
#add_executable(usim #add_executable(usim
......
...@@ -20,7 +20,7 @@ test_compile() { ...@@ -20,7 +20,7 @@ test_compile() {
make -j4 $2 make -j4 $2
} > $tdir/log/$1.txt 2>&1 } > $tdir/log/$1.txt 2>&1
if [ -s $3 ] ; then if [ -s $3 ] ; then
cp $3 $tdir/bin/`basename $3`.$1 cp $3 $tdir/bin/`basename $3`.$5.$1
echo_success "$1 $3 $5 compiled" echo_success "$1 $3 $5 compiled"
xUnit_success "compilation" $1 xUnit_success "compilation" $1
else else
...@@ -47,25 +47,36 @@ test_compile \ ...@@ -47,25 +47,36 @@ test_compile \
test.0102 oaisim_nos1 \ test.0102 oaisim_nos1 \
oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas
cp $tdir/test.0103/CMakeLists.txt.Rel8 $tdir/test.0103/CMakeLists.txt
test_compile \ test_compile \
test.0103 lte-softmodem \ test.0103 lte-softmodem \
lte-softmodem $tdir/bin/lte-softmodem.r8.rf rel8.rf lte-softmodem $tdir/bin/lte-softmodem.r8.rf Rel8.EXMIMO
cp $tdir/test.0103/CMakeLists.txt.Rel10 $tdir/test.0103/CMakeLists.txt
test_compile \
test.0103 lte-softmodem \
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.EXMIMO
cp $tdir/test.0103/CMakeLists.txt.USRP $tdir/test.0103/CMakeLists.txt
test_compile \
test.0103 lte-softmodem \
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.USRP
test_compile \ test_compile \
test.0104 dlsim \ test.0104 dlsim \
dlsim $tdir/bin/dlsim dlsim $tdir/bin/dlsim dlsim.Rel8
test_compile \ test_compile \
test.0104 ulsim \ test.0104 ulsim \
ulsim $tdir/bin/ulsim ulsim $tdir/bin/ulsim ulsim.Rel8
test_compile \ test_compile \
test.0106 oaisim \ test.0106 oaisim \
oaisim $tdir/bin/oaisim.r8.itti rel8.itti oaisim $tdir/bin/oaisim.r8.itti Rel8.itti
test_compile \ test_compile \
test.0107 oaisim_nos1 \ test.0107 oaisim_nos1 \
oaisim_nos1 $tdir/bin/oaisim.r10 rel10.nos1 oaisim_nos1 $tdir/bin/oaisim.r10 Rel10.nos1
test_compile \ test_compile \
test.0108 oaisim \ test.0108 oaisim \
...@@ -77,7 +88,7 @@ test_compile \ ...@@ -77,7 +88,7 @@ test_compile \
test_compile \ test_compile \
test.0115 oaisim \ test.0115 oaisim \
oaisim $tdir/bin/oaisim.r10.itti.ral oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
test_compile \ test_compile \
test.0120 nasmesh \ test.0120 nasmesh \
......
...@@ -42,7 +42,7 @@ set ( NAS_BUILT_IN_EPC False ) ...@@ -42,7 +42,7 @@ set ( NAS_BUILT_IN_EPC False )
set ( NAS_BUILT_IN_UE False ) set ( NAS_BUILT_IN_UE False )
set ( NAS_MME False ) set ( NAS_MME False )
set ( NAS_NETLINK False ) set ( NAS_NETLINK False )
set ( NAS_UE False ) set ( NAS_UE True )
set ( NB_ANTENNAS_RX 2 ) set ( NB_ANTENNAS_RX 2 )
set ( NB_ANTENNAS_TX 2 ) set ( NB_ANTENNAS_TX 2 )
set ( NB_ANTENNAS_TXRX 2 ) set ( NB_ANTENNAS_TXRX 2 )
...@@ -69,9 +69,9 @@ set ( PHY_EMUL False ) ...@@ -69,9 +69,9 @@ set ( PHY_EMUL False )
set ( PHYSIM True ) set ( PHYSIM True )
set ( PUCCH True ) set ( PUCCH True )
set ( RANDOM_BF False ) set ( RANDOM_BF False )
set ( RF_BOARD EXMIMO ) set ( RF_BOARD OAI_USRP )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION Rel8 ) set ( RRC_ASN1_VERSION Rel10 )
set ( RRC_DEFAULT_RAB_IS_AM False ) set ( RRC_DEFAULT_RAB_IS_AM False )
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False ) set ( RTAI False )
...@@ -103,5 +103,5 @@ set ( USE_MME False ) ...@@ -103,5 +103,5 @@ set ( USE_MME False )
set ( USER_MODE True ) set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( XFORMS False ) set ( XFORMS False )
set(PACKAGE_NAME "lte-softmodem")
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_USE_NAS False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI False )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST False )
set ( ENABLE_PGM_TRANSPORT False )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINUX False )
set ( LINUX_LIST False )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_EPC False )
set ( NAS_BUILT_IN_UE False )
set ( NAS_MME False )
set ( NAS_NETLINK False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX 2 )
set ( NB_ANTENNAS_TX 2 )
set ( NB_ANTENNAS_TXRX 2 )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OAISIM False )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PBS_SIM False )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PDCP_USE_NETLINK False )
set ( PDCP_USE_NETLINK_QUEUES False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION False )
set ( PHY_CONTEXT 1 )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD EXMIMO )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION Rel10 )
set ( RRC_DEFAULT_RAB_IS_AM False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
set ( S1AP_VERSION R10 )
set ( SMBV False )
set ( SPECTRA False )
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
set ( TEST_OMG False )
set ( TRACE_RLC_AM_BO False )
set ( TRACE_RLC_AM_FREE_SDU False )
set ( TRACE_RLC_AM_HOLE False )
set ( TRACE_RLC_AM_PDU False )
set ( TRACE_RLC_AM_RESEGMENT False )
set ( TRACE_RLC_AM_RX_DECODE False )
set ( TRACE_RLC_AM_RX False )
set ( TRACE_RLC_AM_STATUS_CREATION False )
set ( TRACE_RLC_AM_TX False )
set ( TRACE_RLC_AM_TX_STATUS False )
set ( TRACE_RLC_PAYLOAD False )
set ( TRACE_RLC_UM_DAR False )
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
set ( TRACE_RLC_UM_PDU False )
set ( TRACE_RLC_UM_RX False )
set ( TRACE_RLC_UM_SEGMENT False )
set ( TRACE_RLC_UM_TX_STATUS False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME False )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set(PACKAGE_NAME "lte-softmodem")
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_USE_NAS False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI False )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST False )
set ( ENABLE_PGM_TRANSPORT False )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINUX False )
set ( LINUX_LIST False )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_EPC False )
set ( NAS_BUILT_IN_UE False )
set ( NAS_MME False )
set ( NAS_NETLINK False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX 2 )
set ( NB_ANTENNAS_TX 2 )
set ( NB_ANTENNAS_TXRX 2 )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OAISIM False )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PBS_SIM False )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PDCP_USE_NETLINK False )
set ( PDCP_USE_NETLINK_QUEUES False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION False )
set ( PHY_CONTEXT 1 )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD EXMIMO )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION Rel8 )
set ( RRC_DEFAULT_RAB_IS_AM False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
set ( S1AP_VERSION R10 )
set ( SMBV False )
set ( SPECTRA False )
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
set ( TEST_OMG False )
set ( TRACE_RLC_AM_BO False )
set ( TRACE_RLC_AM_FREE_SDU False )
set ( TRACE_RLC_AM_HOLE False )
set ( TRACE_RLC_AM_PDU False )
set ( TRACE_RLC_AM_RESEGMENT False )
set ( TRACE_RLC_AM_RX_DECODE False )
set ( TRACE_RLC_AM_RX False )
set ( TRACE_RLC_AM_STATUS_CREATION False )
set ( TRACE_RLC_AM_TX False )
set ( TRACE_RLC_AM_TX_STATUS False )
set ( TRACE_RLC_PAYLOAD False )
set ( TRACE_RLC_UM_DAR False )
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
set ( TRACE_RLC_UM_PDU False )
set ( TRACE_RLC_UM_RX False )
set ( TRACE_RLC_UM_SEGMENT False )
set ( TRACE_RLC_UM_TX_STATUS False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME False )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set(PACKAGE_NAME "lte-softmodem")
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_USE_NAS False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI False )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST False )
set ( ENABLE_PGM_TRANSPORT False )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINUX False )
set ( LINUX_LIST False )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_EPC False )
set ( NAS_BUILT_IN_UE False )
set ( NAS_MME False )
set ( NAS_NETLINK False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX 2 )
set ( NB_ANTENNAS_TX 2 )
set ( NB_ANTENNAS_TXRX 2 )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OAISIM False )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PBS_SIM False )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PDCP_USE_NETLINK False )
set ( PDCP_USE_NETLINK_QUEUES False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION False )
set ( PHY_CONTEXT 1 )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD OAI_USRP )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION Rel10 )
set ( RRC_DEFAULT_RAB_IS_AM False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
set ( S1AP_VERSION R10 )
set ( SMBV False )
set ( SPECTRA False )
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
set ( TEST_OMG False )
set ( TRACE_RLC_AM_BO False )
set ( TRACE_RLC_AM_FREE_SDU False )
set ( TRACE_RLC_AM_HOLE False )
set ( TRACE_RLC_AM_PDU False )
set ( TRACE_RLC_AM_RESEGMENT False )
set ( TRACE_RLC_AM_RX_DECODE False )
set ( TRACE_RLC_AM_RX False )
set ( TRACE_RLC_AM_STATUS_CREATION False )
set ( TRACE_RLC_AM_TX False )
set ( TRACE_RLC_AM_TX_STATUS False )
set ( TRACE_RLC_PAYLOAD False )
set ( TRACE_RLC_UM_DAR False )
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
set ( TRACE_RLC_UM_PDU False )
set ( TRACE_RLC_UM_RX False )
set ( TRACE_RLC_UM_SEGMENT False )
set ( TRACE_RLC_UM_TX_STATUS False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME False )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set(PACKAGE_NAME "lte-softmodem")
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -46,8 +46,6 @@ int trx_brf_init(openair0_device *openair0) { ...@@ -46,8 +46,6 @@ int trx_brf_init(openair0_device *openair0) {
} }
openair0_timestamp trx_get_timestamp(openair0_device *device) { openair0_timestamp trx_get_timestamp(openair0_device *device) {
int status; int status;
...@@ -68,23 +66,44 @@ int trx_brf_start(openair0_device *openair0) { ...@@ -68,23 +66,44 @@ int trx_brf_start(openair0_device *openair0) {
return 0; return 0;
} }
static void trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc) { static void trx_brf_stats(openair0_device *device){
}
static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc) {
int status; int status, i;
brf_state_t *brf = (brf_state_t*)device->priv; brf_state_t *brf = (brf_state_t*)device->priv;
/* BRF has only 1 rx/tx chaine : is it correct? */ /* BRF has only 1 rx/tx chaine : is it correct? */
void *samples = (void*)buff[0]; void *samples = (void*)buff[0];
brf->meta_tx.timestamp= ptimestamp;
//brf->meta_tx.flags |= BLADERF_META_FLAG_TX_NOW;
status = bladerf_sync_tx(brf->dev, samples, (unsigned int) nsamps, &brf->meta_tx, brf->timeout_ms); //brf->meta_tx.flags &= ~BLADERF_META_FLAG_TX_NOW;
brf->meta_tx.flags = BLADERF_META_FLAG_TX_BURST_START |
BLADERF_META_FLAG_TX_NOW |
BLADERF_META_FLAG_TX_BURST_END;
brf->meta_tx.timestamp= (uint64_t) ptimestamp;
status = bladerf_sync_tx(brf->dev, samples, (unsigned int) nsamps, &brf->meta_tx, 2*brf->tx_timeout_ms);
if (status != 0) { if (status != 0) {
fprintf(stderr, "Failed to TX sample: %s\n", bladerf_strerror(status)); fprintf(stderr,"Failed to TX sample: %s\n", bladerf_strerror(status));
brf->num_tx_errors++; brf->num_tx_errors++;
brf_error(status); brf_error(status);
} } else if (brf->meta_tx.status & BLADERF_META_STATUS_UNDERRUN){
/* libbladeRF does not report this status. It is here for future use. */
fprintf(stderr, "TX Underrun detected. %u valid samples were read.\n", brf->meta_tx.actual_count);
brf->num_underflows++;
}
// printf("tx status %d \n",brf->meta_tx.status);
brf->tx_current_ts=brf->meta_tx.timestamp;
brf->tx_actual_nsamps+=brf->meta_tx.actual_count;
brf->tx_nsamps+=nsamps;
brf->tx_count++;
return(0);
} }
static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
...@@ -95,22 +114,26 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, ...@@ -95,22 +114,26 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp,
// BRF has only one rx/tx chain // BRF has only one rx/tx chain
void *samples = (void*)buff[0]; void *samples = (void*)buff[0];
brf->meta_rx.flags |= BLADERF_META_FLAG_RX_NOW; brf->meta_rx.flags |= BLADERF_META_FLAG_RX_NOW;