Commit 849639f3 authored by Xenofon Foukas's avatar Xenofon Foukas

Merge remote-tracking branch 'oai/develop' into oai-integration

Conflicts:
	cmake_targets/tools/build_helper
	openair1/SCHED/phy_procedures_lte_eNb.c
parents 71c047d1 ae12ccd5
......@@ -32,8 +32,6 @@ job1:
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest.log `
- exce_log=`egrep -i 'warning|error|critical|exception' $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log |cat `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest.log. Please check the logs\e[0m" ; fi
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log. Please check the logs\e[0m" ; fi
......@@ -1631,7 +1631,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
include_directories(${LIBBOOST_INCLUDE_DIR})
endif (${RF_BOARD} STREQUAL "OAI_USRP")
pkg_search_module(OPENPGM openpgm-5.1)
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND})
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
else()
......@@ -1738,7 +1738,7 @@ add_executable(lte-softmodem
${T_SOURCE}
)
target_link_libraries (lte-softmodem
target_link_libraries (lte-softmodem -ldl
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} ${PRPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} LFDS7
-Wl,--end-group )
......@@ -1765,8 +1765,8 @@ add_executable(lte-softmodem-nos1
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
#${OPENAIR2_DIR}/RRC/NAS/nas_config.c # enable if you want rrc to mount ip interface
#${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
......@@ -2047,6 +2047,11 @@ foreach( d ${DirDefs} )
list(APPEND itti_compiler_options "-I${d}")
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")
set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h)
add_custom_command (
OUTPUT ${OPENAIR_BIN_DIR}/messages.xml
......
......@@ -12,10 +12,12 @@ Obj.# Case# Test# Description
01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10
01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10
01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10
01 01 14 Build lte-softmodem_noS1.LMSSDR.Rel10
01 01 20 Build lte-softmodem.USRP.Rel10
01 01 21 Build lte-softmodem.EXMIMO.Rel10
01 01 22 Build lte-softmodem.BLADERF.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10
01 01 24 Build lte-softmodem.LMSSDR.Rel10
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10
secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
......@@ -24,7 +26,7 @@ Obj.# Case# Test# Description
01 01 40 Build RRH Gateway for USRP (Rel 10)
01 01 41 Build RRH Gateway for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway for BLADERF (Rel 10)
01 01 43 Build RRH Gateway for LMSSDR (Rel 10)
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
......@@ -98,18 +100,24 @@ Obj.# Case# Test# Description
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX
01 55 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 55 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 55 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 55 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 55 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 55 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 55 06 Band 7 FDD 5MHz UL Throughput for 300 sec for 2TX/2RX
01 55 07 Band 7 FDD 10MHz UL Throughput for 300 sec for 2TX/2RX
01 55 08 Band 7 FDD 20MHz UL Throughput for 300 sec for 2TX/2RX
01 55 09 Band 7 FDD 5MHz DL Throughput for 300 sec for 2TX/2RX
01 55 10 Band 7 FDD 10MHz DL Throughput for 300 sec for 2TX/2RX
01 55 11 Band 7 FDD 20MHz DL Throughput for 300 sec for 2TX/2RX
01 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 12 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 13 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 14 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 15 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 16 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 17 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -128,12 +136,19 @@ Obj.# Case# Test# Description
01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 58 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 58 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 58 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
01 58 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
01 58 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 58 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 58 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
......@@ -206,19 +221,25 @@ Obj.# Case# Test# Description
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for TX/1RX
02 55 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
02 55 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
02 55 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
02 55 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
02 55 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
02 55 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 64 lte-softmodem-noS1 tests
02 Functional test case
03 Non-Functional test case
03 Autotests specific to OAI UE
04 Failure test case
......@@ -228,6 +249,4 @@ Obj.# Case# Test# Description
#TODO: Add test cases for 10,20 MHz
#TODO: Add test cases for TDD/FDD
#TODO: Test and compile seperately for Rel8/Rel10
#TODO: Case03.py eMBMS test case
#TODO: Case03.py eMBMS test case
\ No newline at end of file
......@@ -781,7 +781,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
task_eNB = task_eNB + 'echo eNB_traffic_exec PID = $! \n'
task_eNB = task_eNB + ' (date; sudo rm -f ' + logfile_pcap_tmp_eNB + ' ; sudo -E tshark -i any -s 65535 -a duration:' + str(timeout_cmd-10)+ ' -w ' + logfile_pcap_tmp_eNB+ ' ; sudo -E chown ' + user + ' ' + logfile_pcap_tmp_eNB + ' ; zip -j -9 ' + logfile_pcap_zip_eNB + ' ' + logfile_pcap_tmp_eNB + ' ) > ' + logfile_tshark_eNB + ' 2>&1 & \n '
task_eNB = task_eNB + ' (date; sudo rm -f ' + logfile_pcap_tmp_eNB + ' ; sudo -E tshark -i lo -s 65535 -a duration:' + str(timeout_cmd-10)+ ' -w ' + logfile_pcap_tmp_eNB+ ' ; sudo -E chown ' + user + ' ' + logfile_pcap_tmp_eNB + ' ; zip -j -9 ' + logfile_pcap_zip_eNB + ' ' + logfile_pcap_tmp_eNB + ' ) > ' + logfile_tshark_eNB + ' 2>&1 & \n '
task_eNB = task_eNB + 'array_exec_pid+=($!) \n'
task_eNB = task_eNB + 'echo eNB_tshark_exec PID = $! \n'
#terminate the eNB test case after timeout_cmd seconds
......@@ -1005,7 +1005,21 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
run_result_string = ' RUN_'+str(run) + ' = PASS'
else:
run_result_string = ' RUN_'+str(run) + ' = FAIL'
#If there is assertion, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"assertion\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0 :
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Assert)'
#If there is thread busy error, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"thread busy\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0:
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)'
run_result_string = run_result_string + tput_run_string
test_result=test_result & run_result
......
This diff is collapsed.
......@@ -34,12 +34,14 @@
#arg2 interface
#arg3 iperf arguments
echo "Start time of script: `date`"
args=($*)
timeout=${args[0]}
iface=${args[1]}
iperf_args=(${args[@]:2})
ip_client=echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p'
ip_client=`echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p'`
#array=${1:-1}
echo "args = ${args[@]}"
......@@ -48,17 +50,57 @@ echo "iface = $iface"
echo "iperf_args = ${iperf_args[@]}"
echo "ip_client = $ip_client"
sleep $timeout
echo " Waiting for IP Address..."
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
if [ -n "$ip_client" ]; then
echo "Waiting for route to be setup before iperf makes connection..."
var=`route -n | grep $ip_client`
if ["$var" != "" ] ; then break; fi
# Test an IP address for validity:
# Usage:
# valid_ip IP_ADDRESS
# if [[ $? -eq 0 ]]; then echo good; else echo bad; fi
# OR
# if valid_ip IP_ADDRESS; then echo good; else echo bad; fi
#
function valid_ip()
{
local ip=$1
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
OIFS=$IFS
IFS='.'
ip=($ip)
IFS=$OIFS
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \
&& ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
stat=$?
fi
return $stat
}
if valid_ip $iface; then
echo "$iface is Valid IP Address. Checking for connectivity..."
ping -c 1 $iface >& /dev/null
while [ "$?" != "0" ]; do
ping -c 1 $iface >& /dev/null
done
echo "$iface connectivity achieved at `date`, Seconds = $SECONDS"
else
echo "Waiting for Interface $iface to come up..."
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done
echo "$iface is now available at `date` , Seconds = $SECONDS"
fi
sleep 5
#if [ -n "$ip_client" ]; then
#echo "Waiting for route to be setup before iperf makes connection..."
# var=`route -n | grep $ip_client`
# if ["$var" != "" ] ; then break; fi
#
#fi
echo "Sleeping for additional $timeout seconds"
sleep $timeout
echo "Starting iperf at `date` , Seconds = $SECONDS ...."
iperf ${iperf_args[@]}
......@@ -33,6 +33,7 @@
# brief OAI automated build tool that can be used to install, compile, run OAI.
# author Navid Nikaein, Lionel GAUTHIER, Laurent Thomas
set -e
################################
# include helper functions
......@@ -59,6 +60,7 @@ RUN_GROUP=0
TEST_CASE_GROUP=""
BUILD_DOXYGEN=0
T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False"
trap handle_ctrl_c INT
function print_help() {
......@@ -131,6 +133,8 @@ Options
Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads
--T-tracer
Enables the T tracer.
--disable-hardware-dependency
Disable HW dependency during installation
Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
......@@ -277,6 +281,10 @@ function main() {
T_TRACER="True"
echo_info "Enabling the T tracer"
shift 1;;
--disable-hardware-dependency)
echo_info "Disabling hardware dependency for compiling software"
DISABLE_HARDWARE_DEPENDENCY="True"
shift 1;;
-h | --help)
print_help
exit 1;;
......@@ -386,10 +394,16 @@ function main() {
if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
install_usrp_uhd_driver
fi
fi
if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support"
check_install_bladerf_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
flash_firmware_bladerf
fi
fi
fi
......
......@@ -67,7 +67,45 @@ echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;}
########################
# distribution helpers #
########################
# This function return a string to identify the distribution we are running
# If we can't check the distribution, it returns "Unknown"
# This function return always true as exit code by design
# Examples:
# Ubuntu16.04
# Debian8.5
get_distribution_release() {
local distributor
if distributor=$(lsb_release -si 2>/dev/null) ; then
echo $distributor$(lsb_release -sr)
else
echo Unknown
fi
}
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"Ubuntu16.04") return 0 ;;
"Ubuntu14.04") return 0 ;;
esac
return 1
}
##################
# Error handlers #
##################
handler_EXIT() {
local exit_code=$?
[ "$exit_code" -eq 0 ] || echo_error "build have failed"
exit $exit_code
}
trap handler_EXIT EXIT
###########################
# Cleaners
......@@ -109,6 +147,7 @@ clean_all_files() {
compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
set +e
{
rm -f $3
if [ "$VERBOSE_COMPILE" == "1" ]; then
......@@ -118,12 +157,14 @@ compilations() {
fi
} > $dlog/$2.$REL.txt 2>&1
set -e
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
if [ -s $3 ] ; then
cp $3 $4
echo_success "$2 compiled"
else
echo_error "$2 compilation failed"
exit 1
fi
}
......@@ -217,23 +258,36 @@ install_gnutls_from_source(){
check_install_usrp_uhd_driver(){
#first we remove old installation
$SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y
$SUDO apt-get remove -y uhd || true
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y
v=$(lsb_release -cs)
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
#The new USRP repository
$SUDO add-apt-repository ppa:ettusresearch/uhd -y
$SUDO apt-get update
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
$SUDO apt-get -y install libuhd-dev libuhd003
}
install_usrp_uhd_driver() {
# We move uhd-host apart because it depends on linux kernel version
# On newer kernels, it fails to install
$SUDO apt-get -y install uhd-host
$SUDO uhd_images_downloader
}
check_install_bladerf_driver(){
$SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update
if [ "$(get_distribution_release)" == "Ubuntu14.04" ] ; then
$SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update
fi
$SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
}
flash_firmware_bladerf() {
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
}
check_install_additional_tools (){
......@@ -259,7 +313,10 @@ check_install_additional_tools (){
ctags \
ntpdate \
iperf3 \
android-tools-adb
android-tools-adb \
wvdial \
python-numpy \
sshpass
$SUDO pip install paramiko
$SUDO pip install pyroute2
......@@ -279,8 +336,26 @@ check_install_additional_tools (){
}
check_install_oai_software() {
local specific_packages=""
if ! check_supported_distribution; then
echo_error "Your distribution $(get_distribution_release) is not supported by oai !"
exit 1
fi
$SUDO apt-get update
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"Ubuntu14.04")
specific_packages="libtasn1-3-dev"
# For iperf3
$SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe"
$SUDO apt-get update
;;
"Ubuntu16.04")
specific_packages="libtasn1-6-dev"
;;
esac
$SUDO apt-get install -y \
$specific_packages \
autoconf \
automake \
bison \
......@@ -304,9 +379,9 @@ check_install_oai_software() {
iptables-dev \
libatlas-base-dev \
libatlas-dev \
libblas3gf \
libblas-dev \
libconfig8-dev \
libffi-dev \
libforms-bin \
libforms-dev \
libgcrypt11-dev \
......@@ -316,16 +391,16 @@ check_install_oai_software() {
libidn11-dev \
libmysqlclient-dev \
liboctave-dev \
libpgm-5.1 \
libpgm-dev \
libpython2.7-dev \
libsctp1 \
libsctp-dev \
libssl-dev \
libtasn1-3-dev \
libtool \
libusb-1.0-0-dev \
libxml2 \
libxml2-dev \
libxslt1-dev \
linux-headers-`uname -r` \
mscgen \
octave \
......@@ -338,12 +413,8 @@ check_install_oai_software() {
xmlstarlet \
python-pip \
pydb \
wvdial \
python-numpy \
sshpass \
libxslt1-dev \
android-tools-adb \
libyaml-dev
libyaml-dev \
wget
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
......@@ -373,6 +444,7 @@ install_asn1c_from_source(){
./configure
make -j`nproc`
$SUDO make install
cd -
) > $asn1_install_log 2>&1
}
......
......@@ -60,7 +60,9 @@ function help()
echo_error " -f, --rf-config-file filename RF specific configuration file"
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -M, --target-dl-mcs mcs Downlink target MCS."
echo_error " -m, --mscgen directory Generate mscgen output files in a directory"
echo_error " -n, --T-no-wait don't wait for tracer, start immediately"
echo_error " -p, --T-port port use given port"
echo_error " -m, --mscgen directory Generate mscgen output files in a directory"
echo_error " -s, --show-stdout Do not redirect stdout and stderr to file /tmp/lte_softmodem.stdout.txt."
echo_error " -S, --enable-missed-slot Continue execution in case of missed slot."
echo_error " -T, --target-ul-mcs mcs Uplink target MCS."
......@@ -188,7 +190,17 @@ function main()
exe_arguments="$exe_arguments -m $2"
shift 2;
;;
-V | --vcd)
-n | --T-no-wait)
echo "setting T tracer operation"
exe_arguments="$exe_arguments --T_nowait"
shift ;
;;
-p | --T-port)
echo "setting T tracer port"
exe_arguments="$exe_arguments --T_port $2"
shift 2;
;;
-V | --vcd)
echo "setting gtk-wave output"
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
......
......@@ -139,7 +139,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_add_view(input_signal_log, input_signal_view);
/* UE 0 PUSCH IQ data */
w = new_xy_plot(g, 55, 55, "PUSCH IQ", 50);
w = new_xy_plot(g, 55, 55, "PUSCH IQ [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
l = new_iqlog(h, database, "ENB_PHY_PUSCH_IQ", "nb_rb",
......@@ -149,11 +149,10 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUSCH_IQ", "UE_ID"),
filter_int(0)
));
filter_int(0)));
/* UE 0 estimated UL channel */
w = new_xy_plot(g, 256*2, 55, "UL estimated channel", 50);
w = new_xy_plot(g, 280, 55, "UL estimated channel [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, 0, 512*10, -10, 80);
l = new_framelog(h, database,
......@@ -165,12 +164,44 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_UL_CHANNEL_ESTIMATE", "UE_ID"),
filter_int(0)
));
filter_int(0)));
/* UE 0 PUCCH energy */
w = new_xy_plot(g, 128, 55, "PUCCH1 energy (SR) [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, 0, 1024*10, -10, 80);
l = new_ttilog(h, database,
"ENB_PHY_PUCCH_1_ENERGY", "frame", "subframe", "threshold", 0);
v = new_view_tti(10, g, w, new_color(g, "#ff0000"));
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1_ENERGY", "UE_ID"),
filter_int(0)));
l = new_ttilog(h, database,
"ENB_PHY_PUCCH_1_ENERGY", "frame", "subframe", "energy", 1);
v = new_view_tti(10, g, w, new_color(g, "#0c0c72"));
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1_ENERGY", "UE_ID"),
filter_int(0)));
/* UE 0 PUCCH IQ data */
w = new_xy_plot(g, 55, 55, "PUCCH IQ [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, -100, 100, -100, 100);
l = new_iqdotlog(h, database, "ENB_PHY_PUCCH_1AB_IQ", "I", "Q");
v = new_view_xy(500, 10, g, w, new_color(g,"#000"), XY_LOOP_MODE);
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1AB_IQ", "UE_ID"),
filter_int(0)));
/* downlink/uplink UE DCIs */
widget_add_child(g, top_container,
new_label(g,"DL/UL TICK/DCI/ACK/NACK "), -1);
new_label(g,"DL/UL TICK/DCI/ACK/NACK [all UEs]"), -1);
line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 8, 5);
......@@ -220,7 +251,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
/* harq processes' ticktime view */
widget_add_child(g, top_container,
new_label(g,"DL/UL HARQ (x8) "), -1);
new_label(g,"DL/UL HARQ (x8) [UE 0]"), -1);
line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 2*8+2, 3);
......@@ -491,6 +522,8 @@ int main(int n, char **v)
on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1);
on_off(database, "ENB_MASTER_TICK", is_on, 1);
on_off(database, "ENB_PHY_PUSCH_IQ", is_on, 1);
on_off(database, "ENB_PHY_PUCCH_1_ENERGY", is_on, 1);
on_off(database, "ENB_PHY_PUCCH_1AB_IQ", is_on, 1);
on_off(database, "LEGACY_RRC_INFO", is_on, 1);
on_off(database, "LEGACY_RRC_ERROR", is_on, 1);
......
CC=gcc
CFLAGS=-Wall -g -pthread -I..
OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o iqlog.o
OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o iqlog.o \
iqdotlog.o
logger.a: $(OBJS)
ar cr logger.a $(OBJS)
......
#include "logger.h"
#include "logger_defs.h"
#include "handler.h"
#include "database.h"
#include "filter/filter.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
struct iqdotlog {
struct logger common;
void *database;
int i_arg;
int q_arg;
};
static void _event(void *p, event e)
{
struct iqdotlog *l = p;
int i;
float I, Q;
if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0)
return;
I = e.e[l->i_arg].i;
Q = e.e[l->q_arg].i;
for (i = 0; i < l->common.vsize; i++)
l->common.v[i]->append(l->common.v[i], &I, &Q, 1);
}
logger *new_iqdotlog(event_handler *h, void *database,
char *event_name, char *I, char *Q)
{
struct iqdotlog *ret;
int event_id;
database_event_format f;
int i;
ret = calloc(1, sizeof(struct iqdotlog)); if (ret == NULL) abort();
ret->common.event_name = strdup(event_name);
if (ret->common.event_name == NULL) abort();
ret->database = database;
event_id = event_id_from_name(database, event_name);
ret->common.handler_id = register_handler_function(h,event_id,_event,ret);
f = get_format(database, event_id);
/* look for args */
ret->i_arg = -1;
ret->q_arg = -1;
for (i = 0; i < f.count; i++) {
if (!strcmp(f.name[i], I)) ret->i_arg = i;
if (!strcmp(f.name[i], Q)) ret->q_arg = i;
}
if (ret->i_arg == -1) {
printf("%s:%d: argument '%s' not found in event '%s'\n",
__FILE__, __LINE__, I, event_name);
abort();
}
if (ret->q_arg == -1) {
printf("%s:%d: argument '%s' not found in event '%s'\n",
__FILE__, __LINE__, Q, event_name);
abort();
}
if (strcmp(f.type[ret->i_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, I);
abort();
}
if (strcmp(f.type[ret->q_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, Q);
abort();
}
return ret;
}
......@@ -169,7 +169,7 @@ logger *new_iqlog(event_handler *h, void *database,
}
if (strcmp(f.type[ret->N_RB_UL_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, nb_rb);
__FILE__, __LINE__, N_RB_UL);
abort();
}
if (strcmp(f.type[ret->symbols_per_tti_arg], "int") != 0) {
......
......@@ -16,6 +16,8 @@ logger *new_ticklog(void *event_handler, void *database,
logger *new_iqlog(void *event_handler, void *database,
char *event_name, char *nb_rb, char *N_RB_UL, char *symbols_per_tti,
char *buffer_varname);
logger *new_iqdotlog(void *event_handler, void *database,
char *event_name, char *I, char *Q);
void framelog_set_skip(logger *_this, int skip_delay);
void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9);
......
This diff is collapsed.
common/utils/T/tracer/openair_logo.png

4.55 KB | W: | H:

common/utils/T/tracer/openair_logo.png

6.86 KB | W: | H:

common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include "database.h"
#include "utils.h"
#include "../T_defs.h"
......
......@@ -1126,12 +1126,8 @@ int generate_eNB_dlsch_params_from_dci(int frame,
dlsch[0]->harq_ids[subframe] = harq_pid;
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
if (dlsch0_harq->round == 0)
dlsch0_harq->status = ACTIVE;
}
break;
......@@ -1265,9 +1261,6 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
// MCS and TBS don't change across HARQ rounds
......@@ -1635,19 +1628,11 @@ int generate_eNB_dlsch_params_from_dci(int frame,
}
// reset HARQ process if this is the first transmission
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
if (dlsch0_harq->round == 0)
dlsch0_harq->status = ACTIVE;
}
if (dlsch1_harq->round == 0) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
if (dlsch1_harq->round == 0)
dlsch1_harq->status = ACTIVE;
}
dlsch0->rnti = rnti;
dlsch1->rnti = rnti;
......@@ -2022,19 +2007,11 @@ int generate_eNB_dlsch_params_from_dci(int frame,
}
// reset HARQ process if this is the first transmission
if ((dlsch0->active==1) && (dlsch0_harq->round == 0)) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
if ((dlsch0->active==1) && (dlsch0_harq->round == 0))
dlsch0_harq->status = ACTIVE;
}
if ((dlsch1->active==1) && (dlsch1_harq->round == 0)) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
if ((dlsch1->active==1) && (dlsch1_harq->round == 0))
dlsch1_harq->status = ACTIVE;
}
dlsch0->rnti = rnti;
dlsch1->rnti = rnti;
......@@ -2174,23 +2151,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// check if either TB is disabled (see 36-213 V8.6 p. 26)
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) {
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0))
dlsch0_harq->status = DISABLED;
}
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) {
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0))
dlsch1_harq->status = DISABLED;
}
dlsch0_harq->Nl = 1;
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......@@ -2355,17 +2325,11 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if ((dlsch0_harq->round == 0) && (dlsch0->active == 1) ) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
dlsch0_harq->mcs = mcs1;
}
if ((dlsch1_harq->round == 0) && (dlsch1->active == 1) ) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
dlsch1_harq->status = ACTIVE;
dlsch1_harq->mcs = mcs2;
}
......@@ -2529,9 +2493,6 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......@@ -2661,9 +2622,6 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// dlsch0_harq->Ndi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi;
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......@@ -6431,6 +6389,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (ulsch->harq_processes[harq_pid]->first_tx==1) {
// ulsch->harq_processes[harq_pid]->Ndi = 1;
ulsch->harq_processes[harq_pid]->first_tx=0;
ulsch->harq_processes[harq_pid]->DCINdi= ndi;
ulsch->harq_processes[harq_pid]->round = 0;
} else {
if (ulsch->harq_processes[harq_pid]->DCINdi!=ndi) { // new SDU opportunity
......
......@@ -258,13 +258,6 @@ typedef struct {
uint8_t error_threshold;
/// Pointers to 8 HARQ processes for the DLSCH
LTE_DL_eNB_HARQ_t *harq_processes[8];
/// circular list of free harq PIDs (the oldest come first)
/// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE)
int harq_pid_freelist[10];
/// the head position of the free list (if list is free then head=tail)
int head_freelist;
/// the tail position of the free list
int tail_freelist;
/// Number of soft channel bits
uint32_t G;
/// Codebook index for this dlsch (0,1,2,3)
......
......@@ -156,9 +156,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
for (i=0; i<10; i++)
dlsch->harq_ids[i] = Mdlharq;
dlsch->head_freelist = 0;
dlsch->tail_freelist = 0;
for (i=0; i<Mdlharq; i++) {
dlsch->harq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t));
LOG_T(PHY, "Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n",
......@@ -199,8 +196,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
msg("Can't get harq_p %d\n",i);
exit_flag=3;
}
put_harq_pid_in_freelist(dlsch, i);
}
if (exit_flag==0) {
......
......@@ -55,7 +55,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
unsigned int rx_offset;
void (*dft)(int16_t *,int16_t *, int);
int tmp_dft_in[2048]; // This is for misalignment issues for 6 and 15 PRBs
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
switch (frame_parms->ofdm_symbol_size) {
case 128:
......
......@@ -405,9 +405,6 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rnti);
......
This diff is collapsed.
......@@ -139,27 +139,6 @@ uint8_t is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t sched_su
return(0);
}
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid)
{
if (harq_pid >=0 && harq_pid < 8) {
DLSCH_ptr->harq_pid_freelist[harq_pid] = 1;
} else {
LOG_E(PHY, "%s:%d: critical error, get in touch with the authors\n", __FILE__, __LINE__);
abort();
}
}
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid)
{
if (harq_pid >=0 && harq_pid < 8) {
DLSCH_ptr->harq_pid_freelist[harq_pid] = 0;
} else {
LOG_E(PHY, "%s:%d: critical error, get in touch with the authors\n", __FILE__, __LINE__);
abort();
}
}
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
{
uint8_t i;
......@@ -224,12 +203,6 @@ int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rntiP) {
memset(&phy_vars_eNB->eNB_UE_stats[i],0,sizeof(LTE_eNB_UE_stats));
// mac_exit_wrapper("Removing UE");
/* clear the harq pid freelist */
phy_vars_eNB->dlsch_eNB[i][0]->head_freelist = 0;
phy_vars_eNB->dlsch_eNB[i][0]->tail_freelist = 0;
for (j = 0; j < 8; j++)
put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[i][0], j);
return(i);
}
}
......@@ -256,19 +229,13 @@ int8_t find_next_ue_index(PHY_VARS_eNB *phy_vars_eNB)
return(-1);
}
int prev_frame = -1;
int prev_subframe = -1;
int prev_harq_pid = 0;
int prev_harq_round = 0;
int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16_t rnti, const int frame, const uint8_t subframe,uint8_t *harq_pid,uint8_t *round,const uint8_t harq_flag)
{
LTE_eNB_DLSCH_t *DLSCH_ptr;
LTE_eNB_ULSCH_t *ULSCH_ptr;
uint8_t ulsch_subframe,ulsch_frame;
uint8_t i, j;
int i;
int8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][CC_id]);
int sf1=(10*frame)+subframe,sf2,sfdiff,sfdiff_max=7;
if (UE_id==-1) {
LOG_D(PHY,"Cannot find UE with rnti %x (Mod_id %d, CC_id %d)\n",rnti, Mod_id, CC_id);
......@@ -290,64 +257,19 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
}
}
if (prev_frame == frame && prev_subframe == subframe) {
*harq_pid = prev_harq_pid;
*round = prev_harq_round;
return (0);
}
/* let's go synchronous for the moment - maybe we can change at some point */
i = (frame * 10 + subframe) % 8;
// set to no available process first
*harq_pid = -1;
j = prev_harq_pid;
for (i = 0; i < 8; i++) {
j = (j + 1) % 8;
if (DLSCH_ptr->harq_processes[j] != NULL) {
if (DLSCH_ptr->harq_processes[j]->status == ACTIVE) {
sf2 = (DLSCH_ptr->harq_processes[j]->frame*10) + DLSCH_ptr->harq_processes[j]->subframe;
if (sf2<=sf1) {
sfdiff = sf1-sf2;
} else { // this happens when wrapping around 1024 frame barrier
sfdiff = 10240 + sf1-sf2;
}
LOG_D(PHY,"process %d is active, round %d (waiting %d)\n",i,DLSCH_ptr->harq_processes[j]->round,sfdiff);
if (sfdiff > sfdiff_max) {
prev_harq_pid = j;
prev_harq_round = DLSCH_ptr->harq_processes[j]->round;
prev_frame = frame;
prev_subframe = subframe;
*harq_pid = j;
*round = DLSCH_ptr->harq_processes[j]->round;
LOG_D(PHY,"process %d, %d is the allocated process\n", *harq_pid, *round);
return 0;
}
} else { // Send from the freelist
if (DLSCH_ptr->harq_pid_freelist[j] == 1) {
*harq_pid = j;
*round = 0;
prev_harq_pid = *harq_pid;
prev_harq_round = *round;
prev_frame = frame;
prev_subframe = subframe;
LOG_D(PHY,"process %d is first free process\n", *harq_pid);
return 0;
}
}
} else {
LOG_E(PHY,"[eNB %d] DLSCH process %d for rnti %x (UE_id %d) not allocated\n",Mod_id,i,rnti,UE_id);
return(-1);
}
}
if (*harq_pid == 255) {
if (DLSCH_ptr->harq_processes[i]->status == ACTIVE) {
*harq_pid = i;
*round = DLSCH_ptr->harq_processes[i]->round;
} else if (DLSCH_ptr->harq_processes[i]->status == SCH_IDLE) {
*harq_pid = i;
*round = 0;
LOG_I(PHY, "TEST, no process found\n");
return -1;
} else {
printf("%s:%d: bad state for harq process - PLEASE REPORT!!\n", __FILE__, __LINE__);
abort();
}
LOG_D(PHY,"get_ue_active_harq_pid DL => Frame %d, Subframe %d : harq_pid %d\n",
frame,subframe,*harq_pid);
} else { // This is a UL request
ULSCH_ptr = PHY_vars_eNB_g[Mod_id][CC_id]->ulsch_eNB[(uint32_t)UE_id];
......@@ -1956,7 +1878,6 @@ void process_HARQ_feedback(uint8_t UE_id,
dlsch_harq_proc->round = 0;
ue_stats->dlsch_l2_errors[dl_harq_pid[m]]++;
dlsch_harq_proc->status = SCH_IDLE;
put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]);
dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq;
}
} else {
......@@ -1973,7 +1894,6 @@ void process_HARQ_feedback(uint8_t UE_id,
// Received ACK so set round to 0 and set dlsch_harq_pid IDLE
dlsch_harq_proc->round = 0;
dlsch_harq_proc->status = SCH_IDLE;
put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]);
dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq;
ue_stats->total_TBS = ue_stats->total_TBS +
......@@ -2395,9 +2315,6 @@ void pucch_procedures(const unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_
phy_vars_eNB->eNB_UE_stats[UE_id].sr_received++;
if (phy_vars_eNB->first_sr[UE_id] == 1) { // this is the first request for uplink after Connection Setup, so clear HARQ process 0 use for Msg4
/* is this test necessary? */
if (phy_vars_eNB->dlsch_eNB[UE_id][0]->harq_processes[0]->status != SCH_IDLE)
put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[UE_id][0], 0);
phy_vars_eNB->first_sr[UE_id] = 0;
phy_vars_eNB->dlsch_eNB[UE_id][0]->harq_processes[0]->round=0;
phy_vars_eNB->dlsch_eNB[UE_id][0]->harq_processes[0]->status=SCH_IDLE;
......
......@@ -298,6 +298,12 @@ int rrc_mac_remove_ue(module_id_t mod_idP,rnti_t rntiP)
int UE_id = find_UE_id(mod_idP,rntiP);
int pCC_id = UE_PCCID(mod_idP,UE_id);
if (UE_id == -1) {
LOG_W(MAC,"rrc_mac_remove_ue: UE %x not found\n", rntiP);
mac_phy_remove_ue(mod_idP,rntiP);
return 0;
}
LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",UE_id,pCC_id, rntiP);
dump_ue_list(UE_list,0);
......
......@@ -103,7 +103,7 @@ rlc_am_get_buffer_occupancy_in_bytes (
}
#endif
return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
return rlc_pP->status_buffer_occupancy + rlc_pP->retrans_num_bytes_to_retransmit + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
}
//-----------------------------------------------------------------------------
void
......
......@@ -719,12 +719,12 @@ mac_eNB_get_rrc_status(
}
}
void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) {
const rnti_t rntiP)
{
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context(
&eNB_rrc_inst[Mod_instP],
......@@ -735,10 +735,9 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
ue_context_p->ue_context.ul_failure_timer=1;
}
else {
LOG_W(RRC,"Frame %d, Subframe %d: UE %x unknown \n",frameP,subframeP,rntiP);
rrc_mac_remove_ue(Mod_instP,rntiP);
LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
}
rrc_mac_remove_ue(Mod_instP,rntiP);
}
void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP,
......
......@@ -3795,14 +3795,29 @@ rrc_eNB_decode_ccch(
//#warning "TODO: stmsi_exist: remove UE from MAC/PHY (how?)"
LOG_I(RRC," S-TMSI exists, ue_context_p %p\n",ue_context_p);
stmsi_received=1;
/* replace rnti in the context */
/* for that, remove the context from the RB tree */
RB_REMOVE(rrc_ue_tree_s, &eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head, ue_context_p);
/* and insert again, after changing rnti everywhere it has to be changed */
ue_context_p->ue_id_rnti = ctxt_pP->rnti;
ue_context_p->ue_context.rnti = ctxt_pP->rnti;
RB_INSERT(rrc_ue_tree_s, &eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head, ue_context_p);
/* reset timers */
ue_context_p->ue_context.ul_failure_timer = 0;
ue_context_p->ue_context.ue_release_timer = 0;
// AssertFatal(0 == 1, "TODO: remove UE from MAC/PHY (how?)");
// ue_context_p = NULL;
} else {
ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, NOT_A_RANDOM_UE_IDENTITY);
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE;
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code;
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi;
if (ue_context_p == NULL)
LOG_E(RRC, "%s:%d:%s: rrc_eNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
if (ue_context_p != NULL) {
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE;
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code;
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi;
} else {
break;
}
}
MSC_LOG_RX_MESSAGE(
......
......@@ -137,27 +137,15 @@ typedef guint8 gboolean;
//static unsigned char g_PDUBuffer[1600];
//static unsigned int g_PDUOffset;
#ifdef JUMBO_FRAME
static unsigned char g_frameBuffer[9000];
#else
static unsigned char g_frameBuffer[1600];
#endif
//static unsigned char g_fileBuffer[1600];
static unsigned int g_frameOffset;
char in_ip[40];
char in_path[100];
static uint16_t in_port;
FILE *file_fd = NULL;
trace_mode_t opt_type = OPT_NONE;
static radio_type_t radio_type;
static unsigned int subframesSinceCaptureStart;
// double timing_perf[250];
// clock_t timing_in[250];
// clock_t timing_out[250];
int test=0;
int init_value=0;
static int g_socksd = -1;/* UDP socket used for sending frames */
static struct sockaddr_in g_serv_addr;
......@@ -277,66 +265,73 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
guint8 oob_event, guint8 oob_event_value,
uint8_t *pdu_buffer, unsigned int pdu_buffer_size)
{
#ifdef JUMBO_FRAME
static unsigned char frameBuffer[9000];
#else
static unsigned char frameBuffer[1600];
#endif
static unsigned int frameOffset;
ssize_t bytesSent;
g_frameOffset = 0;
frameOffset = 0;
uint16_t tmp16;
/********************************************************************/
/* Fixed start to each frame (allowing heuristic dissector to work) */
/* Not NULL terminated */
memset(g_frameBuffer+g_frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
memset(frameBuffer+frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
memcpy(g_frameBuffer+g_frameOffset, MAC_LTE_START_STRING,
memcpy(frameBuffer+frameOffset, MAC_LTE_START_STRING,
strlen(MAC_LTE_START_STRING));
g_frameOffset += strlen(MAC_LTE_START_STRING);
frameOffset += strlen(MAC_LTE_START_STRING);
/******************************************************************************/
/* Now write out fixed fields (the mandatory elements of struct mac_lte_info) */
g_frameBuffer[g_frameOffset++] = radioType;
g_frameBuffer[g_frameOffset++] = direction;
g_frameBuffer[g_frameOffset++] = rntiType;
frameBuffer[frameOffset++] = radioType;
frameBuffer[frameOffset++] = direction;
frameBuffer[frameOffset++] = rntiType;
/*************************************/
/* Now optional fields */
/* RNTI */
g_frameBuffer[g_frameOffset++] = MAC_LTE_RNTI_TAG;
frameBuffer[frameOffset++] = MAC_LTE_RNTI_TAG;
tmp16 = htons(rnti);
memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2);
g_frameOffset += 2;
memcpy(frameBuffer+frameOffset, &tmp16, 2);
frameOffset += 2;
/* UEId */
g_frameBuffer[g_frameOffset++] = MAC_LTE_UEID_TAG;
frameBuffer[frameOffset++] = MAC_LTE_UEID_TAG;
tmp16 = htons(ueid);
memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2);
g_frameOffset += 2;
memcpy(frameBuffer+frameOffset, &tmp16, 2);
frameOffset += 2;
/* Subframe number */
g_frameBuffer[g_frameOffset++] = MAC_LTE_SUBFRAME_TAG;
frameBuffer[frameOffset++] = MAC_LTE_SUBFRAME_TAG;
tmp16 = htons(subframeNumber); // frame counter : this will give an expert info as wireshark expects SF and not F
memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2);
g_frameOffset += 2;
memcpy(frameBuffer+frameOffset, &tmp16, 2);
frameOffset += 2;
g_frameBuffer[g_frameOffset++] = MAC_LTE_CRC_STATUS_TAG;
g_frameBuffer[g_frameOffset++] = crcStatus;
frameBuffer[frameOffset++] = MAC_LTE_CRC_STATUS_TAG;
frameBuffer[frameOffset++] = crcStatus;
#ifdef WIRESHARK_DEV
g_frameOffset += 2;
frameOffset += 2;
tmp16 = htons(subframeNumber); // subframe
memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2);
g_frameOffset += 2;
memcpy(frameBuffer+frameOffset, &tmp16, 2);
frameOffset += 2;
#endif
/***********************************************************/
/* For these optional fields, no need to encode if value is default */
if (!isPredefinedData) {
g_frameBuffer[g_frameOffset++] = MAC_LTE_PREDEFINED_DATA_TAG;
g_frameBuffer[g_frameOffset++] = isPredefinedData;
frameBuffer[frameOffset++] = MAC_LTE_PREDEFINED_DATA_TAG;
frameBuffer[frameOffset++] = isPredefinedData;
}
if (retx != 0) {
g_frameBuffer[g_frameOffset++] = MAC_LTE_RETX_TAG;
g_frameBuffer[g_frameOffset++] = retx;
frameBuffer[frameOffset++] = MAC_LTE_RETX_TAG;
frameBuffer[frameOffset++] = retx;
}
#ifdef WIRESHARK_DEV
......@@ -347,19 +342,19 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
switch (oob_event) {
case ltemac_send_preamble :
LOG_D(OPT,"oob event %d %d\n",ltemac_send_preamble );
//g_frameBuffer[g_frameOffset++]=0;
//g_frameBuffer[g_frameOffset++]=0;
//g_frameBuffer[g_frameOffset++]=0;
g_frameBuffer[g_frameOffset++] = MAC_LTE_OOB_EVENT_TAG;
g_frameBuffer[g_frameOffset++]=ltemac_send_preamble;
g_frameBuffer[g_frameOffset++]=rnti; // is the preamble
g_frameBuffer[g_frameOffset++]=oob_event_value;
//frameBuffer[frameOffset++]=0;
//frameBuffer[frameOffset++]=0;
//frameBuffer[frameOffset++]=0;
frameBuffer[frameOffset++] = MAC_LTE_OOB_EVENT_TAG;
frameBuffer[frameOffset++]=ltemac_send_preamble;
frameBuffer[frameOffset++]=rnti; // is the preamble
frameBuffer[frameOffset++]=oob_event_value;
break;
case ltemac_send_sr:
g_frameBuffer[g_frameOffset++]=ltemac_send_sr;
g_frameOffset+=2;
g_frameBuffer[g_frameOffset++]=oob_event_value;
frameBuffer[frameOffset++]=ltemac_send_sr;
frameOffset+=2;
frameBuffer[frameOffset++]=oob_event_value;
break;
case ltemac_sr_failure:
......@@ -372,23 +367,23 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
#endif
/***************************************/
/* Now write the MAC PDU */
g_frameBuffer[g_frameOffset++] = MAC_LTE_PAYLOAD_TAG;
frameBuffer[frameOffset++] = MAC_LTE_PAYLOAD_TAG;
/* Append actual PDU */
//memcpy(g_frameBuffer+g_frameOffset, g_PDUBuffer, g_PDUOffset);
//g_frameOffset += g_PDUOffset;
//memcpy(frameBuffer+frameOffset, g_PDUBuffer, g_PDUOffset);
//frameOffset += g_PDUOffset;
if (pdu_buffer != NULL) {
memcpy(g_frameBuffer+g_frameOffset, (void*)pdu_buffer, pdu_buffer_size);
g_frameOffset += pdu_buffer_size;
memcpy(frameBuffer+frameOffset, (void*)pdu_buffer, pdu_buffer_size);
frameOffset += pdu_buffer_size;
}
/* Send out the data over the UDP socket */
bytesSent = sendto(g_socksd, g_frameBuffer, g_frameOffset, 0,
bytesSent = sendto(g_socksd, frameBuffer, frameOffset, 0,
(const struct sockaddr *)&g_serv_addr, sizeof(g_serv_addr));
if (bytesSent != g_frameOffset) {
if (bytesSent != frameOffset) {
LOG_W(OPT, "sendto() failed (not a thread-safe func)- expected %d bytes, got %d (errno=%d)\n",
g_frameOffset, bytesSent, errno);
frameOffset, bytesSent, errno);
//exit(1);
}
}
......@@ -509,6 +504,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
/*---------------------------------------------------*/
int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
{
uint16_t in_port;
subframesSinceCaptureStart = 0;
if (path != NULL) {
......@@ -612,37 +608,4 @@ void terminate_opt(void)
break;
}
}
/*
double *timing_analyzer(int index, int direction ){
//
int i;
if (direction==0)// in
{
timing_in[index]=clock();
//if(timing_out[index+100]>timing_in[index+100]);
//timing_perf[index+100] +=(double)((double)(timing_out[index+100]-timing_in[index+100])/(double)CLOCKS_PER_SEC);
}
else
{
timing_out[index]=clock();
if(index==5)timing_perf[index]=0;
timing_perf[index] +=(double)((double)(timing_out[index]-timing_in[index])/(((double)CLOCKS_PER_SEC)/1000000));
//LOG_I(OPT,"timing_analyser index %d =%f\n",index,timing_perf[index]);
init_value++;
if(init_value==500)
{
for(i=0;i<6;i++)
{
LOG_I(OPT,"timing_analyser index %d =%f\n",i,timing_perf[i]);
}
init_value=0;
}
return(&timing_perf[0]);
}
}
*/
......@@ -14,14 +14,15 @@ typedef struct
int16_t q;
} complex16_t;
typedef struct
class SamplesPacket
{
public:
uint64_t timestamp; //timestamp of the packet
uint16_t first; //index of first unused sample in samples[]
uint16_t last; //end index of samples
static const uint16_t samplesCount = 1024; //maximum number of samples in packet
complex16_t samples[samplesCount]; //must be power of two
} SamplesPacket;
};
complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy assignment
{
......@@ -30,4 +31,4 @@ complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy
return other1;
}
#endif
\ No newline at end of file
#endif
......@@ -49,15 +49,16 @@ NUM_eNB=1
NUM_TRIALS=3
PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27]
MCS=[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]
#MCS=[0,4,9,10,13,16,17,22,27]
#PRB=[100]
#MCS=[16]
ANT_TX=1 # 2
ANT_TX=2 # 2
ANT_RX=2 # 2
CHANNEL=["N"]
#CHANNEL=["C","E","F","G","H","I","L","M"] # A,B,C,D,E,F,
TX_MODE=2 # 2,
MIN_SNR=0
MIN_SNR=10
MAX_SNR=40
PERF=75
OPT="-L"
......@@ -69,9 +70,9 @@ FRAME=2000
def execute(oai, user, pw, host,logfile,logdir,debug,cpu):
case = '10'
oai.send('cd $OPENAIR1_DIR;')
oai.send('cd SIMULATION/LTE_PHY;')
oai.send('cd $OPENAIR_TARGETS;')
oai.send('cd bin;')
oai.send('cp ./ulsim.Rel10 ./ulsim.Rel10.'+host)
try:
log.start()
test = '300'
......@@ -80,13 +81,13 @@ def execute(oai, user, pw, host,logfile,logdir,debug,cpu):
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
trace = logdir + '/log_' + host + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
trace = logdir + '/log_' + host + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'Exiting', 30)
trace = logdir + '/log_' + host + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
......@@ -100,42 +101,47 @@ def execute(oai, user, pw, host,logfile,logdir,debug,cpu):
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
for o in range(len(CHANNEL)):
MIN_SNR=0
MIN_SNR=10
for j in range(len(MCS)):
for m in range (1,ANT_RX):
for p in range(1,TX_MODE):
for q in range(MIN_SNR,MAX_SNR):
#if if PRB[i] :
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace
if cpu > -1 :
cmd = 'taskset -c ' + str(cpu) + ' ./ulsim.rel8.'+ host + ' ' + conf + tee
else :
cmd = './ulsim.rel8.'+ host + ' ' + conf + tee
if debug :
print cmd
for r in range(5,PRB[i]):
for q in range(MIN_SNR,MAX_SNR):
if r ==7 or r ==11 or r ==14 or r == 17 or r==19 or r == 21 or r == 23 or r == 26 or r == 28 :
continue
# match = oai.send_expect_re(cmd, 'passed', 0, 1000)
match =1
if match :
log.ok(case, str(test), name, conf, '', logfile)
MIN_SNR = q - 1 # just to speed up the test
test+=1
break # found the smallest snr
else :
if q == MAX_SNR -1 :
log.skip(case,str(test), name, conf,'','',logfile)
conf = '-B' + str(PRB[i]) + ' -r'+str(r) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+ '_rb'+str(r)+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace
if cpu > -1 :
cmd = 'taskset -c ' + str(cpu) + ' ./ulsim.Rel10.'+ host + ' ' + conf + tee
else :
cmd = './ulsim.Rel10.'+ host + ' ' + conf + tee
if debug :
print cmd
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
#match =1
if match :
log.ok(case, str(test), name, conf, '', logfile)
MIN_SNR = q - 1 # just to speed up the test
test+=1
break
try:
if os.path.isfile(trace) :
os.remove(trace)
except OSError, e: ## if failed, report it back to the user ##
print ("Error: %s - %s." % (e.filename,e.strerror))
break # found the smallest snr
else :
if q == MAX_SNR -1 :
log.skip(case,str(test), name, conf,'','',logfile)
test+=1
break
try:
if os.path.isfile(trace) :
os.remove(trace)
except OSError, e: ## if failed, report it back to the user ##
print ("Error: %s - %s." % (e.filename,e.strerror))
except log.err, e:
......
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