Commit 9a04aea8 authored by root's avatar root

UE add RF borad ZC706+AD9371

parent 6770e884
...@@ -485,13 +485,18 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4 ...@@ -485,13 +485,18 @@ add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4") add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
add_list1_option(NB_ANTENNAS_TXRX "2" "Number of antennas in ????" "1" "2" "4") add_list1_option(NB_ANTENNAS_TXRX "2" "Number of antennas in ????" "1" "2" "4")
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR") add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "EXMIMO" "OAI_USRP" "OAI_BLADERF" "CPRIGW" "OAI_LMSSDR" "OAI_ADRV9371_ZC706")
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET") add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
# include RF devices / transport protocols library modules # include RF devices / transport protocols library modules
###################################################################### ######################################################################
if (HWLAT)
add_definitions(-DHWLAT )
endif()
include_directories("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/") include_directories("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS/") include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS/")
...@@ -758,6 +763,9 @@ include_directories("${OPENAIR3_DIR}/UDP") ...@@ -758,6 +763,9 @@ include_directories("${OPENAIR3_DIR}/UDP")
include_directories("${OPENAIR3_DIR}/GTPV1-U") include_directories("${OPENAIR3_DIR}/GTPV1-U")
include_directories("${OPENAIR_DIR}/targets/COMMON") include_directories("${OPENAIR_DIR}/targets/COMMON")
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON") include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
include_directories("${OPENAIR_DIR}/targets/ARCH/ADRV9371_ZC706/USERSPACE/LIB/")
include_directories("${OPENAIR_DIR}/targets/ARCH/ADRV9371_ZC706/USERSPACE/libini/")
include_directories("${OPENAIR_DIR}/targets/ARCH/ADRV9371_ZC706/DEFS/")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
include_directories("${OPENAIR2_DIR}/ENB_APP") include_directories("${OPENAIR2_DIR}/ENB_APP")
...@@ -1780,6 +1788,42 @@ target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ...@@ -1780,6 +1788,42 @@ target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB}) target_link_libraries (lte-softmodem-nos1 ${T_LIB})
# lte-hwlat
###################################################
add_executable(lte-hwlat
${HW_SOURCE}
${OPENAIR_TARGETS}/RT/USER/lte-hwlat.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
)
target_link_libraries (lte-hwlat
-Wl,--start-group
-Wl,--end-group )
target_link_libraries (lte-hwlat rt pthread m )
target_link_libraries (lte-hwlat ${CMAKE_DL_LIBS} )
message( "Linking ADRV9371 ZC706 lib" )
target_link_libraries( lte-hwlat ${OPENAIR_TARGETS}/ARCH/ADRV9371_ZC706/slib/libadrv9371_zc706.so )
# lte-hwlat-test
###################################################
add_executable(lte-hwlat-test
${HW_SOURCE}
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
${OPENAIR_TARGETS}/RT/USER/lte-hwlat2.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
)
target_link_libraries (lte-hwlat-test
-Wl,--start-group
-Wl,--end-group )
target_link_libraries (lte-hwlat-test rt pthread m )
target_link_libraries (lte-hwlat-test ${CMAKE_DL_LIBS} )
# rrh # rrh
################################ ################################
#Note: only one RF type (USRP) is currently supported for RRH #Note: only one RF type (USRP) is currently supported for RRH
...@@ -2013,10 +2057,10 @@ if (${T_TRACER}) ...@@ -2013,10 +2057,10 @@ if (${T_TRACER})
#all "add_executable" definitions (except tests, rb_tool, updatefw) #all "add_executable" definitions (except tests, rb_tool, updatefw)
lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1 lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim pdcchsim pucchsim prachsim syncsim lte-hwlat
#all "add_library" definitions #all "add_library" definitions
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_adrv9371_zc706devif oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
oai_eth_transpro oai_eth_transpro
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS
......
...@@ -52,6 +52,7 @@ REL="Rel14" ...@@ -52,6 +52,7 @@ REL="Rel14"
HW="None" HW="None"
TP="None" TP="None"
NOS1=0 NOS1=0
HW_LATENCY=0
EPC=0 EPC=0
VERBOSE_COMPILE=0 VERBOSE_COMPILE=0
CFLAGS_PROCESSOR_USER="" CFLAGS_PROCESSOR_USER=""
...@@ -102,6 +103,8 @@ Options ...@@ -102,6 +103,8 @@ Options
Specify gen_nvram_path (default \"$gen_nvram_path\") Specify gen_nvram_path (default \"$gen_nvram_path\")
--RRH --RRH
Makes the RRH Makes the RRH
--HWLAT
Makes test program for haw latency tests
-a | --agent -a | --agent
Enables agent for software-defined control of the eNB Enables agent for software-defined control of the eNB
-r | --3gpp-release -r | --3gpp-release
...@@ -109,7 +112,7 @@ Options ...@@ -109,7 +112,7 @@ Options
Rel8 limits the implementation to 3GPP Release 8 version Rel8 limits the implementation to 3GPP Release 8 version
Rel10 limits the implementation to 3GPP Release 10 version Rel10 limits the implementation to 3GPP Release 10 version
-w | --hardware -w | --hardware
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, None (Default) EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, ADRV9371_ZC706, None (Default)
Adds this RF board support (in external packages installation and in compilation) Adds this RF board support (in external packages installation and in compilation)
-t | --transport protocol -t | --transport protocol
ETHERNET , None ETHERNET , None
...@@ -227,13 +230,16 @@ function main() { ...@@ -227,13 +230,16 @@ function main() {
shift 2;; shift 2;;
-w | --hardware) -w | --hardware)
HW="$2" #"${i#*=}" HW="$2" #"${i#*=}"
# Use OAI_USRP as the key word USRP is used inside UHD driver # Use OAI_USRP as the key word USRP is used inside UHD driver
if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" ] ; then if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" -a "$HW" != "ADRV9371_ZC706" ] ; then
echo_fatal "Unknown HW type $HW will exit..." echo_fatal "Unknown HW type $HW will exit..."
else else
if [ "$HW" == "USRP" ] ; then if [ "$HW" == "USRP" ] ; then
HW="OAI_USRP" HW="OAI_USRP"
fi fi
if [ "$HW" == "ADRV9371_ZC706" ] ; then
HW="OAI_ADRV9371_ZC706"
fi
if [ "$HW" == "BLADERF" ] ; then if [ "$HW" == "BLADERF" ] ; then
HW="OAI_BLADERF" HW="OAI_BLADERF"
fi fi
...@@ -290,6 +296,14 @@ function main() { ...@@ -290,6 +296,14 @@ function main() {
NOS1=1 NOS1=1
echo_info "Will compile without S1 interface" echo_info "Will compile without S1 interface"
shift;; shift;;
--HWLAT)
HWLAT=1
echo_info "Will compile hw latency test program"
shift;;
--HWLAT_TEST)
HWLAT_TEST=1
echo_info "Will compile hw latency test program"
shift;;
--verbose-compile) --verbose-compile)
VERBOSE_COMPILE=1 VERBOSE_COMPILE=1
echo_info "Will compile with verbose instructions" echo_info "Will compile with verbose instructions"
...@@ -389,6 +403,11 @@ function main() { ...@@ -389,6 +403,11 @@ function main() {
echo_info "No radio head has been selected (HW set to $HW)" echo_info "No radio head has been selected (HW set to $HW)"
fi fi
fi fi
if [ "$HWLAT" = "1" ] ; then
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
fi
echo_info "RF HW set to $HW" echo_info "RF HW set to $HW"
#Now we set flags to enable deadline scheduler settings #Now we set flags to enable deadline scheduler settings
...@@ -402,6 +421,8 @@ function main() { ...@@ -402,6 +421,8 @@ function main() {
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_USRP" ] ; then elif [ "$HW" = "OAI_USRP" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_ADRV9371_ZC706" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then elif [ "$HW" = "OAI_BLADERF" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_LMSSDR" ] ; then elif [ "$HW" = "OAI_LMSSDR" ] ; then
...@@ -467,6 +488,10 @@ function main() { ...@@ -467,6 +488,10 @@ function main() {
install_usrp_uhd_driver $UHD_IMAGES_DIR install_usrp_uhd_driver $UHD_IMAGES_DIR
fi fi
fi fi
if [ "$HW" == "OAI_ADRV9371_ZC706" ] ; then
echo_info "\nInstalling packages for ADRV9371_ZC706 support"
check_install_libiio_driver
fi
if [ "$HW" == "OAI_BLADERF" ] ; then if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support" echo_info "installing packages for BLADERF support"
check_install_bladerf_driver check_install_bladerf_driver
...@@ -804,16 +829,75 @@ function main() { ...@@ -804,16 +829,75 @@ function main() {
rrh_gw $dbin/rrh_gw rrh_gw $dbin/rrh_gw
fi fi
# HWLAT compilation
#####################
if [ "$HWLAT" = "1" ] ; then
hwlat_exec=lte-hwlat
hwlat_build_dir=lte-hwlat
echo_info "Compiling $hwlat_exec ..."
[ "$CLEAN" = "1" ] && rm -rf $DIR/lte-hwlat/build
mkdir -p $DIR/$hwlat_build_dir/build
cmake_file=$DIR/$hwlat_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set ( PACKAGE_NAME "\"lte-hwlat\"")' >> $cmake_file
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( HWLAT \"${HWLAT}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$hwlat_build_dir/build
cmake ..
compilations \
lte-hwlat lte-hwlat \
lte-hwlat $dbin/lte-hwlat
fi
# HWLAT_TEST compilation
#####################
if [ "$HWLAT_TEST" = "1" ] ; then
hwlat_test_exec=lte-hwlat-test
hwlat_test_build_dir=lte-hwlat-test
echo_info "Compiling $hwlat_test_exec ..."
[ "$CLEAN" = "1" ] && rm -rf $DIR/lte-hwlat-test/build
mkdir -p $DIR/$hwlat_test_build_dir/build
cmake_file=$DIR/$hwlat_test_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set ( PACKAGE_NAME "\"lte-hwlat-test\"")' >> $cmake_file
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( HWLAT \"${HWLAT}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$hwlat_test_build_dir/build
cmake ..
compilations \
lte-hwlat-test lte-hwlat-test \
lte-hwlat-test $dbin/lte-hwlat-test
fi
# build RF device and transport protocol libraries # build RF device and transport protocol libraries
##################################### #####################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$RRH" = "1" ] ; then if [ "$eNB" = "1" -o "$UE" = "1" -o "$RRH" = "1" -o "$HWLAT" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
build_dir=$lte_build_dir build_dir=$lte_build_dir
else fi
if [ "$RRH" = "1" ] ; then
build_dir=$rrh_build_dir build_dir=$rrh_build_dir
fi fi
if [ "$HWLAT" = "1" ] ; then
build_dir=$hwlat_build_dir
fi
# build RF device libraries # build RF device libraries
if [ "$HW" != "None" ] ; then if [ "$HW" != "None" ] ; then
...@@ -829,6 +913,11 @@ function main() { ...@@ -829,6 +913,11 @@ function main() {
ln -sf liboai_exmimodevif.so liboai_device.so ln -sf liboai_exmimodevif.so liboai_device.so
ln -sf $dbin/liboai_exmimodevif.so.$REL $dbin/liboai_device.so ln -sf $dbin/liboai_exmimodevif.so.$REL $dbin/liboai_device.so
echo_info "liboai_device.so is linked to EXMIMO device library" echo_info "liboai_device.so is linked to EXMIMO device library"
elif [ "$HW" == "OAI_ADRV9371_ZC706" ] ; then
ln -sf $OPENAIR_DIR/targets/ARCH/ADRV9371_ZC706/slib/libadrv9371_zc706.so liboai_device.so
echo_info "liboai_device.so is linked to ADRV9371_ZC706 device library"
elif [ "$HW" == "OAI_USRP" ] ; then elif [ "$HW" == "OAI_USRP" ] ; then
if [ -d "/usr/include/uhd" ] ; then if [ -d "/usr/include/uhd" ] ; then
compilations \ compilations \
......
...@@ -235,6 +235,36 @@ install_protobuf_c_from_source(){ ...@@ -235,6 +235,36 @@ install_protobuf_c_from_source(){
) >& $protobuf_c_install_log ) >& $protobuf_c_install_log
} }
install_libiio_driver_from_source(){
libiio_install_log=$OPENAIR_DIR/cmake_targets/log/libiio_install_log.txt
echo_info "\nInstalling LibIIO driver from sources. The log file for LibIIO driver installation is here: $libiio_install_log "
(
cd /tmp
echo "Downloading LibIIO driver"
rm -rf /tmp/libiio
git clone https://github.com/analogdevicesinc/libiio.git
cd libiio
git checkout 2016_R2
cmake ./
make all
$SUDO make install
) >& $libiio_install_log
}
check_install_libiio_driver(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO apt-get install -y --allow-unauthenticated libxml2
$SUDO apt-get install -y --allow-unauthenticated libxml2-dev
$SUDO apt-get install -y --allow-unauthenticated bison
$SUDO apt-get install -y --allow-unauthenticated flex
$SUDO apt-get install -y --allow-unauthenticated libcdk5-dev
$SUDO apt-get install -y --allow-unauthenticated cmake
$SUDO apt-get install -y --allow-unauthenticated libaio-dev
$SUDO apt-get install -y --allow-unauthenticated libavahi-client-dev
install_libiio_driver_from_source
fi
}
install_usrp_uhd_driver_from_source(){ install_usrp_uhd_driver_from_source(){
uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log " echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
......
...@@ -17,3 +17,6 @@ alias oait='cd $OPENAIR_TARGETS' ...@@ -17,3 +17,6 @@ alias oait='cd $OPENAIR_TARGETS'
alias oailte='cd $OPENAIR_TARGETS/RT/USER' alias oailte='cd $OPENAIR_TARGETS/RT/USER'
alias oais='cd $OPENAIR_TARGETS/SIMU/USER' alias oais='cd $OPENAIR_TARGETS/SIMU/USER'
alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES' alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES'
export IIOD_REMOTE=192.168.121.32
...@@ -8246,6 +8246,9 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8246,6 +8246,9 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
// ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; // ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift;
//printf("Format 0 DCI : ulsch (ue): AbsSubframe %d.%d nrb %d harq_pid %d round %d mcs %d\n",proc->frame_rx%1024,nr_tti_rx,ulsch->harq_processes[harq_pid]->nb_rb,
// harq_pid,ulsch->harq_processes[harq_pid]->round,ulsch->harq_processes[harq_pid]->mcs);
#ifdef UE_DEBUG_TRACE #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,nr_tti_rx); LOG_I(PHY,"Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,nr_tti_rx);
......
...@@ -557,7 +557,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -557,7 +557,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
ue->frame_parms.nb_antenna_ports_eNB); ue->frame_parms.nb_antenna_ports_eNB);
#endif #endif
#if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
# if DISABLE_LOG_X # if DISABLE_LOG_X
printf("[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n", printf("[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n",
ue->Mod_id, ue->Mod_id,
...@@ -621,9 +621,11 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -621,9 +621,11 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR #ifndef OAI_LMSSDR
#ifndef OAI_ADRV9371_ZC706
phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0); phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0);
#endif #endif
#endif #endif
#endif
#endif #endif
} }
...@@ -632,9 +634,11 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -632,9 +634,11 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR #ifndef OAI_LMSSDR
#ifndef OAI_ADRV9371_ZC706
phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0); phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0);
#endif #endif
#endif #endif
#endif
#endif #endif
} }
......
...@@ -627,7 +627,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -627,7 +627,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
int i, prach_len; int i, prach_len;
uint16_t first_nonzero_root_idx=0; uint16_t first_nonzero_root_idx=0;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_ADRV9371_ZC706)
prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_subframe-ue->hw_timing_advance-ue->N_TA_offset); prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_subframe-ue->hw_timing_advance-ue->N_TA_offset);
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id, LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
...@@ -1041,7 +1041,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -1041,7 +1041,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
mac_xface->macphy_exit("prach_fmt4 not fully implemented"); mac_xface->macphy_exit("prach_fmt4 not fully implemented");
return 0; // not reached return 0; // not reached
} else { } else {
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_ADRV9371_ZC706)
int j; int j;
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_subframe; int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_subframe;
LOG_D( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow ); LOG_D( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#endif #endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
#include "common_lib.h" #include "common_lib.h"
extern openair0_config_t openair0_cfg[]; extern openair0_config_t openair0_cfg[];
#endif #endif
...@@ -90,10 +90,10 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length ...@@ -90,10 +90,10 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
#ifdef EXMIMO #ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#endif #endif
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB);
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset); len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset);
#endif #endif
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]); len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]);
......
...@@ -81,7 +81,7 @@ extern double cpuf; ...@@ -81,7 +81,7 @@ extern double cpuf;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
#endif #endif
...@@ -162,7 +162,7 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t n ...@@ -162,7 +162,7 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t n
exit(-1); exit(-1);
} }
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
//unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162}; //unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
/* /*
unsigned int get_tx_amp_prach(int power_dBm, int power_max_dBm, int N_RB_UL) unsigned int get_tx_amp_prach(int power_dBm, int power_max_dBm, int N_RB_UL)
...@@ -1245,7 +1245,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1245,7 +1245,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
int frame_tx = proc->frame_tx; int frame_tx = proc->frame_tx;
int ulsch_start; int ulsch_start;
int overflow=0; int overflow=0;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
int k,l; int k,l;
int dummy_tx_buffer[frame_parms->samples_per_subframe] __attribute__((aligned(16))); int dummy_tx_buffer[frame_parms->samples_per_subframe] __attribute__((aligned(16)));
#endif #endif
...@@ -1256,7 +1256,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1256,7 +1256,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
#endif #endif
nsymb = (frame_parms->Ncp == 0) ? 14 : 12; nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)//this is the EXPRESS MIMO case #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)//this is the EXPRESS MIMO case
ulsch_start = (ue->rx_offset+nr_tti_tx*frame_parms->samples_per_subframe- ulsch_start = (ue->rx_offset+nr_tti_tx*frame_parms->samples_per_subframe-
ue->hw_timing_advance- ue->hw_timing_advance-
ue->timing_advance- ue->timing_advance-
...@@ -1274,7 +1274,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1274,7 +1274,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
ulsch_start = (frame_parms->samples_per_subframe*nr_tti_tx)-ue->N_TA_offset; //-ue->timing_advance; ulsch_start = (frame_parms->samples_per_subframe*nr_tti_tx)-ue->N_TA_offset; //-ue->timing_advance;
#endif //else EXMIMO #endif //else EXMIMO
//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) //#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
if (empty_subframe) if (empty_subframe)
{ {
//#if 1 //#if 1
...@@ -1322,7 +1322,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1322,7 +1322,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&ue->common_vars.txdataF[aa][nr_tti_tx*nsymb*frame_parms->ofdm_symbol_size], PHY_ofdm_mod(&ue->common_vars.txdataF[aa][nr_tti_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
dummy_tx_buffer, dummy_tx_buffer,
#else #else
&ue->common_vars.txdata[aa][ulsch_start], &ue->common_vars.txdata[aa][ulsch_start],
...@@ -1333,7 +1333,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1333,7 +1333,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
CYCLIC_PREFIX); CYCLIC_PREFIX);
else else
normal_prefix_mod(&ue->common_vars.txdataF[aa][nr_tti_tx*nsymb*frame_parms->ofdm_symbol_size], normal_prefix_mod(&ue->common_vars.txdataF[aa][nr_tti_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
dummy_tx_buffer, dummy_tx_buffer,
#else #else
&ue->common_vars.txdata[aa][ulsch_start], &ue->common_vars.txdata[aa][ulsch_start],
...@@ -1342,7 +1342,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1342,7 +1342,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
&ue->frame_parms); &ue->frame_parms);
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
apply_7_5_kHz(ue,dummy_tx_buffer,0); apply_7_5_kHz(ue,dummy_tx_buffer,0);
apply_7_5_kHz(ue,dummy_tx_buffer,1); apply_7_5_kHz(ue,dummy_tx_buffer,1);
#else #else
...@@ -1351,7 +1351,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ...@@ -1351,7 +1351,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
overflow = ulsch_start - 9*frame_parms->samples_per_subframe; overflow = ulsch_start - 9*frame_parms->samples_per_subframe;
...@@ -1463,7 +1463,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1463,7 +1463,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->tx_total_RE[nr_tti_tx] = 96; ue->tx_total_RE[nr_tti_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[nr_tti_tx], ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[nr_tti_tx],
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
...@@ -1879,7 +1879,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1879,7 +1879,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
} }
ue->tx_total_RE[nr_tti_tx] = nb_rb*12; ue->tx_total_RE[nr_tti_tx] = nb_rb*12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
tx_amp = get_tx_amp(ue->tx_power_dBm[nr_tti_tx], tx_amp = get_tx_amp(ue->tx_power_dBm[nr_tti_tx],
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
...@@ -1956,7 +1956,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8 ...@@ -1956,7 +1956,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
Po_SRS = ue->tx_power_max_dBm; Po_SRS = ue->tx_power_max_dBm;
} }
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
if (ue->mac_enabled==1) if (ue->mac_enabled==1)
{ {
tx_amp = get_tx_amp(Po_SRS, tx_amp = get_tx_amp(Po_SRS,
...@@ -2236,7 +2236,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2236,7 +2236,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->tx_power_dBm[nr_tti_tx] = Po_PUCCH; ue->tx_power_dBm[nr_tti_tx] = Po_PUCCH;
ue->tx_total_RE[nr_tti_tx] = 12; ue->tx_total_RE[nr_tti_tx] = 12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
...@@ -2344,7 +2344,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2344,7 +2344,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->tx_power_dBm[nr_tti_tx] = Po_PUCCH; ue->tx_power_dBm[nr_tti_tx] = Po_PUCCH;
ue->tx_total_RE[nr_tti_tx] = 12; ue->tx_total_RE[nr_tti_tx] = 12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
...@@ -2677,9 +2677,11 @@ void ue_measurement_procedures( ...@@ -2677,9 +2677,11 @@ void ue_measurement_procedures(
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR #ifndef OAI_LMSSDR
#ifndef OAI_ADRV9371_ZC706
phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0); phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0);
#endif #endif
#endif #endif
#endif
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
......
...@@ -754,7 +754,7 @@ rrc_ue_establish_drb( ...@@ -754,7 +754,7 @@ rrc_ue_establish_drb(
RADIO_ACCESS_BEARER,Rlc_info_um); RADIO_ACCESS_BEARER,Rlc_info_um);
*/ */
#ifdef PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U) # if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U) && !defined(OAI_ADRV9371_ZC706)
# ifdef OAI_EMU # ifdef OAI_EMU
ip_addr_offset3 = oai_emulation.info.nb_enb_local; ip_addr_offset3 = oai_emulation.info.nb_enb_local;
ip_addr_offset4 = NB_eNB_INST; ip_addr_offset4 = NB_eNB_INST;
......
...@@ -3596,7 +3596,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -3596,7 +3596,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ctxt_pP->module_id, ctxt_pP->frame, (int)DRB_configList->list.array[i]->drb_Identity); ctxt_pP->module_id, ctxt_pP->frame, (int)DRB_configList->list.array[i]->drb_Identity);
#if defined(PDCP_USE_NETLINK) && !defined(LINK_ENB_PDCP_TO_GTPV1U) #if defined(PDCP_USE_NETLINK) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
// can mean also IPV6 since ether -> ipv6 autoconf // can mean also IPV6 since ether -> ipv6 autoconf
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) # if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(OAI_ADRV9371_ZC706)
LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n", LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ctxt_pP->module_id); ctxt_pP->module_id);
......
...@@ -59,6 +59,12 @@ case USRP_X300_DEV: ...@@ -59,6 +59,12 @@ case USRP_X300_DEV:
case NONE_DEV: case NONE_DEV:
printf("[%s] has not loaded a HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH")); printf("[%s] has not loaded a HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break; break;
case ADRV9371_ZC706_DEV:
printf("[%s] has loaded ADRV9371_ZC706 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case UEDv2_DEV:
printf("[%s] has loaded UEDv2 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
default: default:
printf("[%s] invalid HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH")); printf("[%s] invalid HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
return -1; return -1;
......
...@@ -97,6 +97,10 @@ typedef enum { ...@@ -97,6 +97,10 @@ typedef enum {
LMSSDR_DEV, LMSSDR_DEV,
/*!\brief device is NONE*/ /*!\brief device is NONE*/
NONE_DEV, NONE_DEV,
/*!\brief device is ADRV9371_ZC706 */
ADRV9371_ZC706_DEV,
/*!\brief device is UEDv2 */
UEDv2_DEV,
MAX_RF_DEV_TYPE MAX_RF_DEV_TYPE
} dev_type_t; } dev_type_t;
...@@ -213,6 +217,14 @@ typedef struct { ...@@ -213,6 +217,14 @@ typedef struct {
unsigned int my_port; unsigned int my_port;
//! Configuration file for LMS7002M //! Configuration file for LMS7002M
char *configFilename; char *configFilename;
//! number of samples per tti
unsigned int samples_per_tti;
//! the sample rate for receive.
double rx_sample_rate;
//! the sample rate for transmit.
double tx_sample_rate;
} openair0_config_t; } openair0_config_t;
/*! \brief RF mapping */ /*! \brief RF mapping */
...@@ -244,7 +256,7 @@ typedef struct { ...@@ -244,7 +256,7 @@ typedef struct {
uint8_t transp_preference; uint8_t transp_preference;
//! compression enable (0: No comp/ 1: A-LAW) //! compression enable (0: No comp/ 1: A-LAW)
uint8_t if_compress; uint8_t if_compress;
//! radio front end preference (EXMIMO,USRP, BALDERF,LMSSDR) //! radio front end preference (EXMIMO,USRP, BALDERF,LMSSDR,ADRV9371_ZC706,UEDv2)
uint8_t rf_preference; uint8_t rf_preference;
} eth_params_t; } eth_params_t;
......
#ifndef OPENAIRINTERFACE5G_LIMITS_H_ #ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_ #define OPENAIRINTERFACE5G_LIMITS_H_
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR) #if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)
# define NUMBER_OF_eNB_MAX 1 # define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_UE_MAX 16 # define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3 # define NUMBER_OF_CONNECTED_eNB_MAX 3
......
...@@ -608,7 +608,7 @@ static void get_options (int argc, char **argv) { ...@@ -608,7 +608,7 @@ static void get_options (int argc, char **argv) {
// char line[1000]; // char line[1000];
// int l; // int l;
int k,i;//,j,k; int k,i;//,j,k;
#if defined(OAI_USRP) || defined(CPRIGW) #if defined(OAI_USRP) || defined(CPRIGW) || defined(OAI_ADRV9371_ZC706)
int clock_src; int clock_src;
#endif #endif
int CC_id; int CC_id;
...@@ -1003,7 +1003,7 @@ static void get_options (int argc, char **argv) { ...@@ -1003,7 +1003,7 @@ static void get_options (int argc, char **argv) {
break; break;
case 's': case 's':
#if defined(OAI_USRP) || defined(CPRIGW) #if defined(OAI_USRP) || defined(CPRIGW) || defined(OAI_ADRV9371_ZC706)
clock_src = atoi(optarg); clock_src = atoi(optarg);
...@@ -1913,7 +1913,7 @@ int main( int argc, char **argv ) { ...@@ -1913,7 +1913,7 @@ int main( int argc, char **argv ) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
#ifdef OAI_USRP #if defined(OAI_USRP) || defined(OAI_ADRV9371_ZC706)
UE[CC_id]->hw_timing_advance = timing_advance; UE[CC_id]->hw_timing_advance = timing_advance;
#else #else
UE[CC_id]->hw_timing_advance = 160; UE[CC_id]->hw_timing_advance = 160;
......
...@@ -1816,7 +1816,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) ...@@ -1816,7 +1816,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
} }
#else #else
#if 0 // defined(EXMIMO) || defined(OAI_USRP) #if 0 // defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_ADRV9371_ZC706)
if (otg_enabled==1) { if (otg_enabled==1) {
ctime = frame * 100; ctime = frame * 100;
......
...@@ -344,6 +344,10 @@ build_enb(){ ...@@ -344,6 +344,10 @@ build_enb(){
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES USRP=1 " SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES USRP=1 "
fi fi
if [ $HW = "ADRV9371_ZC706" ]; then
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES ADRV9371_ZC706=1 "
fi
if [ $HW = "EXMIMO" ]; then if [ $HW = "EXMIMO" ]; then
SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES EXMIMO=1 " SOFTMODEM_DIRECTIVES="$SOFTMODEM_DIRECTIVES EXMIMO=1 "
fi fi
......
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