Commit 5832204f authored by Clayton Shepard's avatar Clayton Shepard Committed by rdoost

Added Iris hardware support.

Signed-off-by: rdoost's avatarRahman Doost <doost@rice.edu>
parent c1f7678e
Pipeline #11169 failed with stage
in 0 seconds
...@@ -551,6 +551,15 @@ set(TPLIB_ETHERNET_SOURCE ...@@ -551,6 +551,15 @@ set(TPLIB_ETHERNET_SOURCE
) )
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} ) add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
set(option_HWIRISLIB_lib "-l SoapySDR")
set(HWLIB_IRIS_SOURCE
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
)
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.6/)
target_link_libraries(oai_irisdevif SoapySDR)
include_directories("${OPENAIR_TARGETS}/ARCH/mobipass/") include_directories("${OPENAIR_TARGETS}/ARCH/mobipass/")
set(TPLIB_MOBIPASS_SOURCE set(TPLIB_MOBIPASS_SOURCE
${OPENAIR_TARGETS}/ARCH/mobipass/interface.c ${OPENAIR_TARGETS}/ARCH/mobipass/interface.c
...@@ -1787,6 +1796,15 @@ include_directories(${CRYPTO_INCLUDE_DIRS}) ...@@ -1787,6 +1796,15 @@ include_directories(${CRYPTO_INCLUDE_DIRS})
if (${RF_BOARD} STREQUAL "OAI_USRP") if (${RF_BOARD} STREQUAL "OAI_USRP")
find_package(Boost REQUIRED) find_package(Boost REQUIRED)
include_directories(${LIBBOOST_INCLUDE_DIR}) include_directories(${LIBBOOST_INCLUDE_DIR})
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
include_directories("/usr/local/include/")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
LINK_DIRECTORIES("/usr/local/lib")
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
endif (${RF_BOARD} STREQUAL "OAI_USRP") endif (${RF_BOARD} STREQUAL "OAI_USRP")
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2) pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
......
...@@ -107,7 +107,7 @@ Options ...@@ -107,7 +107,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, IRIS, 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
...@@ -231,7 +231,7 @@ function main() { ...@@ -231,7 +231,7 @@ function main() {
-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" != "IRIS" ] ; 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
...@@ -243,6 +243,9 @@ function main() { ...@@ -243,6 +243,9 @@ function main() {
if [ "$HW" == "LMSSDR" ] ; then if [ "$HW" == "LMSSDR" ] ; then
HW="OAI_LMSSDR" HW="OAI_LMSSDR"
fi fi
if [ "$HW" == "IRIS" ] ; then
HW="OAI_IRIS"
fi
echo_info "Setting hardware to: $HW" echo_info "Setting hardware to: $HW"
fi fi
shift 2;; shift 2;;
...@@ -416,6 +419,8 @@ function main() { ...@@ -416,6 +419,8 @@ function main() {
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_LMSSDR" ] ; then elif [ "$HW" = "OAI_LMSSDR" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_IRIS" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "None" ] ; then elif [ "$HW" = "None" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
else else
...@@ -484,6 +489,13 @@ function main() { ...@@ -484,6 +489,13 @@ function main() {
flash_firmware_bladerf flash_firmware_bladerf
fi fi
fi fi
if [ "$HW" == "OAI_IRIS" ] ; then
echo_info "installing packages for IRIS support"
check_install_soapy
#if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
# flash_firmware_iris
#fi
fi
echo_info "installing protobuf/protobuf-c for flexran agent support" echo_info "installing protobuf/protobuf-c for flexran agent support"
install_protobuf_from_source install_protobuf_from_source
install_protobuf_c_from_source install_protobuf_c_from_source
...@@ -756,6 +768,14 @@ function main() { ...@@ -756,6 +768,14 @@ function main() {
ln -sf liboai_lmssdrdevif.so liboai_device.so ln -sf liboai_lmssdrdevif.so liboai_device.so
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
echo_info "liboai_device.so is linked to LMSSDR device library" echo_info "liboai_device.so is linked to LMSSDR device library"
elif [ "$HW" == "OAI_IRIS" ] ; then
compilations \
$build_dir oai_irisdevif \
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
ln -s liboai_irisdevif.so liboai_device.so
ln -s $dbin/liboai_irisdevif.so.$REL $dbin/liboai_device.so
echo_info "liboai_device.so is linked to IRIS device library"
else else
echo_info "liboai_device.so is not linked to any device library" echo_info "liboai_device.so is not linked to any device library"
fi fi
......
...@@ -379,6 +379,74 @@ check_install_lmssdr_driver(){ ...@@ -379,6 +379,74 @@ check_install_lmssdr_driver(){
} }
install_soapy_from_source(){
soapy_install_log=$OPENAIR_DIR/cmake_targets/log/soapy_install_log.txt
echo_info "\nInstalling Soapy EcoSystem from source. The log file for Soapy installation is here: $soapy_install_log "
(
cd /tmp
echo "Downloading SoapySDR"
rm -rf /tmp/soapysdr
git clone https://github.com/pothosware/SoapySDR.git
cd soapysdr
#git checkout tags/release_003_010_001_001
mkdir -p build
cd build
$CMAKE ../
echo "Compiling SoapySDR"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
cd /tmp
echo "Downloading SoapyRemote"
rm -rf /tmp/soapyremote
git clone https://github.com/pothosware/SoapyRemote.git
cd soapyremote
#git checkout tags/release_003_010_001_001
mkdir -p build
cd build
cmake ../
echo "Compiling SoapyRemote"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
) >& $soapy_install_log
}
install_soapy_iris_from_source(){
iris_install_log=$OPENAIR_DIR/cmake_targets/log/iris_install_log.txt
echo_info "\nInstalling Iris driver from source. The log file for Iris driver installation is here: $iris_install_log "
(
cd /tmp
echo "Downloading SoapyIris"
rm -rf /tmp/sklk-soapyiris
git clone https://github.com/skylarkwireless/sklk-soapyiris.git
cd sklk-soapyiris
mkdir -p build
cd build
cmake ../
echo "Compiling SoapyIris"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
) >& $iris_install_log
}
check_install_soapy () {
#if [[ "$OS_DISTRO" == "ubuntu" ]]; then
#first we remove old installation
$SUDO apt-get remove -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote || true
$SUDO add-apt-repository -y ppa:myriadrf/drivers
$SUDO apt-get update
$SUDO apt-get install -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote
#elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
# $SUDO $INSTALLER -y install software-properties-common python3-software-properties python-software-properties subversion git python3 python-numpy python3-numpy cmake swig python-dev
# install_soapy_from_source
#fi
install_soapy_iris_from_source
}
check_install_additional_tools (){ check_install_additional_tools (){
$SUDO $INSTALLER update -y $SUDO $INSTALLER update -y
if [[ "$OS_DISTRO" == "ubuntu" ]]; then if [[ "$OS_DISTRO" == "ubuntu" ]]; then
......
...@@ -48,7 +48,7 @@ int set_device(openair0_device *device) { ...@@ -48,7 +48,7 @@ int set_device(openair0_device *device) {
case USRP_B200_DEV: case USRP_B200_DEV:
printf("[%s] has loaded USRP B200 device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU")); printf("[%s] has loaded USRP B200 device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break; break;
case USRP_X300_DEV: case USRP_X300_DEV:
printf("[%s] has loaded USRP X300 device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU")); printf("[%s] has loaded USRP X300 device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break; break;
case BLADERF_DEV: case BLADERF_DEV:
...@@ -57,6 +57,9 @@ case USRP_X300_DEV: ...@@ -57,6 +57,9 @@ case USRP_X300_DEV:
case LMSSDR_DEV: case LMSSDR_DEV:
printf("[%s] has loaded LMSSDR device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU")); printf("[%s] has loaded LMSSDR device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break; break;
case IRIS_DEV:
printf("[%s] has loaded Iris device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break;
case NONE_DEV: case NONE_DEV:
printf("[%s] has not loaded a HW device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU")); printf("[%s] has not loaded a HW device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break; break;
......
...@@ -95,6 +95,8 @@ typedef enum { ...@@ -95,6 +95,8 @@ typedef enum {
BLADERF_DEV, BLADERF_DEV,
/*!\brief device is LMSSDR (SoDeRa)*/ /*!\brief device is LMSSDR (SoDeRa)*/
LMSSDR_DEV, LMSSDR_DEV,
/*!\brief device is Iris */
IRIS_DEV,
/*!\brief device is NONE*/ /*!\brief device is NONE*/
NONE_DEV, NONE_DEV,
MAX_RF_DEV_TYPE MAX_RF_DEV_TYPE
......
IRIS_OBJ += $(OPENAIR_TARGETS)/ARCH/IRIS/USERSPACE/LIB/iris_lib.o
IRIS_FILE_OBJ += $(OPENAIR_TARGETS)/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
IRIS_CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/COMMON -I$(OPENAIR_TARGETS)/ARCH/IRIS/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/COMMON
This diff is collapsed.
...@@ -761,9 +761,9 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) { ...@@ -761,9 +761,9 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
proc->timestamp_rx = ts-ru->ts_offset; proc->timestamp_rx = ts-ru->ts_offset;
// AssertFatal(rxs == fp->samples_per_tti, // AssertFatal(rxs == fp->samples_per_tti,
// "rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs); // "rx_rf: Asked for %d samples, got %d from SDR\n",fp->samples_per_tti,rxs);
if(rxs != fp->samples_per_tti){ if(rxs != fp->samples_per_tti){
LOG_E(PHY,"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs); LOG_E(PHY,"rx_rf: Asked for %d samples, got %d from SDR\n",fp->samples_per_tti,rxs);
late_control=STATE_BURST_TERMINATE; late_control=STATE_BURST_TERMINATE;
} }
......
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