From 6d504b870527ea2d07a92f3ce0263808b69e4efb Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 24 Jul 2016 15:33:57 +0200 Subject: [PATCH 01/28] Gitlab CI: minor fixes to test case config file --- cmake_targets/autotests/test_case_list.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 2fecd2b292..d78e358e28 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -2154,7 +2154,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 5 lo -s -i 1 -f m + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 5 ppp0 -c 192.172.0.1 -f m -R throughput_test min=0.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec @@ -2175,7 +2175,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 75 lo -c 192.172.0.2 -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m False @@ -4084,7 +4084,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 5 lo -s -i 1 -f m + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 5 ppp0 -c 192.172.0.1 -f m -R False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -4104,7 +4104,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 75 lo -c 192.172.0.2 -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m False From dc18dabe3bba880aa721a8cafa4fd78a01664892 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 24 Jul 2016 20:08:21 +0200 Subject: [PATCH 02/28] Gitlab CI: iperf script changes for checking connectivity --- cmake_targets/autotests/tools/iperf_script | 64 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script index 9f5990655e..2431c8489d 100755 --- a/cmake_targets/autotests/tools/iperf_script +++ b/cmake_targets/autotests/tools/iperf_script @@ -34,6 +34,8 @@ #arg2 interface #arg3 iperf arguments +echo "Start time of script: `date`" + args=($*) timeout=${args[0]} iface=${args[1]} @@ -48,17 +50,57 @@ echo "iface = $iface" echo "iperf_args = ${iperf_args[@]}" echo "ip_client = $ip_client" + + +# 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`" + +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`" +fi + + +#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 " 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 - -fi -sleep 5 - +echo "Starting iperf at `date`...." iperf ${iperf_args[@]} From 051b0b38bd44decdb9435ffb6c67da2cedfa8939 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 24 Jul 2016 21:51:36 +0200 Subject: [PATCH 03/28] Gitlab CI: minor fix for iperf logging --- cmake_targets/autotests/tools/iperf_script | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script index 2431c8489d..731438d65d 100755 --- a/cmake_targets/autotests/tools/iperf_script +++ b/cmake_targets/autotests/tools/iperf_script @@ -82,13 +82,13 @@ if valid_ip $iface; then while [ "$?" != "0" ]; do ping -c 1 $iface >& /dev/null done - echo "$iface connectivity achieved at `date`" + 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`" + echo "$iface is now available at `date` , Seconds = $SECONDS" fi @@ -102,5 +102,5 @@ fi echo "Sleeping for additional $timeout seconds" sleep $timeout -echo "Starting iperf at `date`...." +echo "Starting iperf at `date` , Seconds = $SECONDS ...." iperf ${iperf_args[@]} From 964e622ac33a19ed0afeea8eda19e1fc0f4f86f8 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 25 Jul 2016 01:21:54 +0200 Subject: [PATCH 04/28] Gitlab CI: updates to test case config file for iperf --- cmake_targets/autotests/test_case_list.xml | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index d78e358e28..e2f34c7c90 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1194,7 +1194,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 16M -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m -u False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -1214,7 +1214,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 16M -i 1 -f m -u False @@ -1266,7 +1266,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 5 lo -s -i 1 -f m -u + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m -u throughput_test min=0.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec @@ -1287,7 +1287,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 75 lo -c 192.172.0.2 -b 33Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 33M -i 1 -f m -u False @@ -1361,7 +1361,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 10Mbits/s False @@ -1859,7 +1859,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 @@ -1934,7 +1934,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 @@ -2008,7 +2008,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 @@ -2082,7 +2082,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -f m -B 192.172.0.2 -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -2102,7 +2102,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -2154,7 +2154,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 5 ppp0 -c 192.172.0.1 -f m -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m throughput_test min=0.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec @@ -2175,7 +2175,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -2249,7 +2249,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -c 192.172.0.2 + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 False @@ -3585,7 +3585,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 16M -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -3605,7 +3605,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -u -f m -b 16M False @@ -3656,7 +3656,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -3676,7 +3676,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 75 lo -c 192.172.0.2 -b 33Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 33Mbits/s -i 1 -f m -u False @@ -3727,7 +3727,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -3747,7 +3747,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 10Mbits/s False @@ -3797,7 +3797,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -c 192.172.0.1 -B 192.172.0.2 @@ -4013,7 +4013,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -f m -B 192.172.0.2 -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -4033,7 +4033,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -4084,7 +4084,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 5 ppp0 -c 192.172.0.1 -f m -R + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -f m False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -4104,7 +4104,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf3_script 5 lo -s -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -7293,7 +7293,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 16Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 16Mbits/s -i 1 -f m -u False @@ -7367,7 +7367,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 33Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 33Mbits/s -i 1 -f m -u False @@ -7441,7 +7441,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 40Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 40Mbits/s -i 1 -f m -u False @@ -7738,7 +7738,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -7812,7 +7812,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False @@ -7886,7 +7886,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -i 1 -f m + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -i 1 -f m False From 3f20ce7b871b1c5655610d870239701ca51f3662 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 22 Jul 2016 20:51:02 +0200 Subject: [PATCH 05/28] mono-thread test --- targets/RT/USER/lte-softmodem.c | 89 +++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 3f419ed49c..18e26cb125 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1063,6 +1063,7 @@ static struct { */ static void* eNB_thread_tx( void* param ) { +return 0; static int eNB_thread_tx_status[NUM_ENB_THREADS]; eNB_proc_t *proc = (eNB_proc_t*)param; @@ -1344,6 +1345,7 @@ static void* eNB_thread_tx( void* param ) */ static void* eNB_thread_rx( void* param ) { +return 0; static int eNB_thread_rx_status[NUM_ENB_THREADS]; eNB_proc_t *proc = (eNB_proc_t*)param; @@ -1747,6 +1749,7 @@ void kill_eNB_proc(void) */ static void* eNB_thread( void* arg ) { +return 0; UNUSED(arg); static int eNB_thread_status; @@ -2834,6 +2837,86 @@ int T_port = 2021; /* default port to listen to to wait for the tracer */ int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */ #endif +void *processing_thread(void *_) +{ + PHY_VARS_eNB *phy = PHY_vars_eNB_g[0][0]; + int sched_frame = 0; + int sched_subframe = 0; + openair0_timestamp timestamp; + int spp; + int rxs; + void *rxp[2]; + void *txp[2]; + + spp = phy->lte_frame_parms.samples_per_tti; //openair0_cfg[0].samples_per_packet; + +loop: + T(T_ENB_MASTER_TICK, T_INT(0), T_INT(sched_frame), T_INT(sched_subframe)); + + /* received subframe n */ + rxp[0] = &rxdata[0][spp * sched_subframe]; + rxs = openair0.trx_read_func(&openair0, + ×tamp, + rxp, + spp, + 1); + if (rxs != spp) printf("WARN: received %d samples out of %d wanted\n", rxs, spp); + + /* transmit subframe n+3 */ + txp[0] = &txdata[0][spp * ((sched_subframe + 3) % 10)]; + openair0.trx_write_func(&openair0, + timestamp + spp * 3 -openair0_cfg[0].tx_sample_advance, + txp, + spp, + 1, + 1); + + /* process received subframe n */ + phy->proc[sched_subframe].subframe = sched_subframe; + phy->proc[sched_subframe].frame_rx = sched_frame; + phy->proc[sched_subframe].subframe_rx = sched_subframe; + phy_procedures_eNB_RX(sched_subframe, PHY_vars_eNB_g[0][0], 0, no_relay); + + /* generate subframe n+4 */ + phy->proc[sched_subframe].subframe = (sched_subframe+4) % 10; + phy->proc[sched_subframe].frame_tx = sched_frame + ((sched_subframe >= 6) ? 1 : 0); + phy->proc[sched_subframe].subframe_tx = (sched_subframe+4) % 10; + phy_procedures_eNB_TX(sched_subframe, PHY_vars_eNB_g[0][0], 0, no_relay, NULL); + do_OFDM_mod_rt(phy->proc[sched_subframe].subframe_tx, PHY_vars_eNB_g[0][0]); + + sched_subframe++; + if (sched_subframe == 10) { + sched_subframe = 0; + sched_frame++; + sched_frame %= 1024; + } + if (!oai_exit) goto loop; + + return 0; +} + +static void new_thread(void *(*f)(void *), void *data) +{ + pthread_t t; + pthread_attr_t att; + + if (pthread_attr_init(&att)) + { fprintf(stderr, "pthread_attr_init err\n"); exit(1); } + if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) + { fprintf(stderr, "pthread_attr_setdetachstate err\n"); exit(1); } + if (pthread_attr_setstacksize(&att, 10000000)) + { fprintf(stderr, "pthread_attr_setstacksize err\n"); exit(1); } + if (pthread_create(&t, &att, f, data)) + { fprintf(stderr, "pthread_create err\n"); exit(1); } + if (pthread_attr_destroy(&att)) + { fprintf(stderr, "pthread_attr_destroy err\n"); exit(1); } +} + +void new_threading(void) +{ + new_thread(processing_thread, 0); +} + int main( int argc, char **argv ) { int i,aa,card=0; @@ -3368,6 +3451,7 @@ int main( int argc, char **argv ) int s; char cpu_affinity[1024]; CPU_ZERO(&cpuset); +#if 0 #ifdef CPU_AFFINITY if (get_nprocs() > 2) { @@ -3381,6 +3465,7 @@ int main( int argc, char **argv ) LOG_I(HW, "Setting the affinity of main function to CPU 0, for device library to use CPU 0 only!\n"); } #endif +#endif /* Check the actual affinity mask assigned to the thread */ s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); @@ -3664,6 +3749,7 @@ int main( int argc, char **argv ) pthread_attr_setstacksize(&attr_UE_thread,8192);//5*PTHREAD_STACK_MIN); #ifndef DEADLINE_SCHEDULER +#if 0 sched_param_UE_thread.sched_priority = sched_get_priority_max(SCHED_FIFO); pthread_attr_setschedparam(&attr_UE_thread,&sched_param_UE_thread); sched_param_dlsch.sched_priority = sched_get_priority_max(SCHED_FIFO); //OPENAIR_THREAD_PRIORITY; @@ -3671,6 +3757,7 @@ int main( int argc, char **argv ) pthread_attr_setschedpolicy (&attr_dlsch_threads, SCHED_FIFO); printf("Setting eNB_thread FIFO scheduling policy with priority %d \n", sched_param_dlsch.sched_priority); #endif +#endif #endif @@ -3734,6 +3821,8 @@ int main( int argc, char **argv ) #endif } + new_threading(); + // Sleep to allow all threads to setup sleep(1); From b07efe7a01f243e89bb323895818e92ed6e2786f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 27 Jul 2016 11:36:35 +0200 Subject: [PATCH 06/28] add trace ENB_MAC_UE_DL_PDU_WITH_DATA to trace downlink pdu --- common/utils/T/T_messages.txt | 4 ++++ openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 05c08085c6..050c48d0a9 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -95,6 +95,10 @@ ID = ENB_MAC_UE_UL_CE DESC = MAC uplink UE received control element GROUP = ALL:MAC:ENB FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,ce +ID = ENB_MAC_UE_DL_PDU_WITH_DATA + DESC = MAC downlink PDU for an UE + GROUP = ALL:MAC:ENB + FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data #RLC logs ID = ENB_RLC_DL diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 81e1df4dc5..990542a771 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1110,6 +1110,9 @@ schedule_ue_spec( module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), TBS); } + T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), + T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS)); + aggregation = process_ue_cqi(module_idP,UE_id); UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb; From d62de525eb7615983d55bf657e0b28d7136d0749 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 27 Jul 2016 13:05:46 +0200 Subject: [PATCH 07/28] scroll by one line in textlist to scroll by only one line, hold CONTROL key and scroll with mouse wheel --- common/utils/T/tracer/event_selector.c | 3 +++ common/utils/T/tracer/gui/gui.h | 4 ++-- common/utils/T/tracer/gui/textlist.c | 4 ++-- common/utils/T/tracer/view/textlist.c | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/utils/T/tracer/event_selector.c b/common/utils/T/tracer/event_selector.c index a03846c056..2b6cfd878d 100644 --- a/common/utils/T/tracer/event_selector.c +++ b/common/utils/T/tracer/event_selector.c @@ -34,11 +34,14 @@ static void scroll(void *private, gui *g, int number_of_lines; int new_line; int inc; + int *d = notification_data; + int key_modifiers = *d; textlist_state(g, w, &visible_lines, &start_line, &number_of_lines); inc = 10; if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc < 1) inc = 1; + if (key_modifiers & KEY_CONTROL) inc = 1; if (!strcmp(notification, "scrollup")) inc = -inc; new_line = start_line + inc; diff --git a/common/utils/T/tracer/gui/gui.h b/common/utils/T/tracer/gui/gui.h index 673514f138..27e6603042 100644 --- a/common/utils/T/tracer/gui/gui.h +++ b/common/utils/T/tracer/gui/gui.h @@ -83,8 +83,8 @@ int new_color(gui *gui, char *color); /* notifications */ /* known notifications: * - textlist: - * - scrollup { void *: NULL } - * - scrolldown { void *: NULL } + * - scrollup { int: key_modifiers } + * - scrolldown { int: key_modifiers } * - click { int [2]: line, button } * - label: * - click { int: button } (if enabled) diff --git a/common/utils/T/tracer/gui/textlist.c b/common/utils/T/tracer/gui/textlist.c index 896cba5b9e..e919b7c0a5 100644 --- a/common/utils/T/tracer/gui/textlist.c +++ b/common/utils/T/tracer/gui/textlist.c @@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y, x -= this->common.x; /* scroll up */ if (button == 4 && up == 0) { - gui_notify(g, "scrollup", _this, NULL); + gui_notify(g, "scrollup", _this, &key_modifiers); } /* scroll down */ if (button == 5 && up == 0) { - gui_notify(g, "scrolldown", _this, NULL); + gui_notify(g, "scrolldown", _this, &key_modifiers); } /* button 1/2/3 click */ if (button >= 1 && button <= 3 && up == 0) { diff --git a/common/utils/T/tracer/view/textlist.c b/common/utils/T/tracer/view/textlist.c index 5227900e4e..ffa8cbf718 100644 --- a/common/utils/T/tracer/view/textlist.c +++ b/common/utils/T/tracer/view/textlist.c @@ -89,6 +89,8 @@ static void scroll(void *private, gui *g, int number_of_lines; int new_line; int inc; + int *d = notification_data; + int key_modifiers = *d; if (pthread_mutex_lock(&this->lock)) abort(); @@ -96,6 +98,7 @@ static void scroll(void *private, gui *g, inc = 10; if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc < 1) inc = 1; + if (key_modifiers & KEY_CONTROL) inc = 1; if (!strcmp(notification, "scrollup")) inc = -inc; new_line = start_line + inc; From 3f2a080cba3dc24a53dbc56888b23e8a2695c8df Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 27 Jul 2016 14:40:25 +0200 Subject: [PATCH 08/28] better autoscroll management in textlist left click: enable autoscroll and go to end of list right click: disable autoscroll --- common/utils/T/tracer/view/textlist.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/utils/T/tracer/view/textlist.c b/common/utils/T/tracer/view/textlist.c index ffa8cbf718..b89314191c 100644 --- a/common/utils/T/tracer/view/textlist.c +++ b/common/utils/T/tracer/view/textlist.c @@ -125,7 +125,19 @@ static void click(void *private, gui *g, if (pthread_mutex_lock(&this->lock)) abort(); - if (button == 1) this->autoscroll = 1 - this->autoscroll; + if (button == 1) this->autoscroll = 1; + if (button == 3) this->autoscroll = 0; + + if (this->autoscroll) { + int visible_lines, start_line, number_of_lines; + textlist_state(this->g, this->w, &visible_lines, &start_line, + &number_of_lines); + start_line = number_of_lines - visible_lines; + if (start_line < 0) start_line = 0; + textlist_set_start_line(this->g, this->w, start_line); + /* this call is not necessary, but if things change in textlist... */ + widget_dirty(this->g, this->w); + } if (pthread_mutex_unlock(&this->lock)) abort(); } From 56014444e2b027d57e1f08c57f2b2bace3464444 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 29 Jul 2016 09:54:23 +0200 Subject: [PATCH 09/28] bugfix thanks to Supreeth Herle for reporting. --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 67cc6cfc3a..d0c3caa42a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1671,7 +1671,7 @@ target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ) target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) -target_link_libraries (lte-softmodem ${T_LIB}) +target_link_libraries (lte-softmodem-nos1 ${T_LIB}) # rrh ################################ From a023de6e5d1a00c86f006d91e4bbb65b426d8377 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 29 Jul 2016 10:38:30 +0200 Subject: [PATCH 10/28] Revert "mono-thread test" This reverts commit 3f20ce7b871b1c5655610d870239701ca51f3662. it was mistakenly pushed to develop --- targets/RT/USER/lte-softmodem.c | 89 --------------------------------- 1 file changed, 89 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 18e26cb125..3f419ed49c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1063,7 +1063,6 @@ static struct { */ static void* eNB_thread_tx( void* param ) { -return 0; static int eNB_thread_tx_status[NUM_ENB_THREADS]; eNB_proc_t *proc = (eNB_proc_t*)param; @@ -1345,7 +1344,6 @@ return 0; */ static void* eNB_thread_rx( void* param ) { -return 0; static int eNB_thread_rx_status[NUM_ENB_THREADS]; eNB_proc_t *proc = (eNB_proc_t*)param; @@ -1749,7 +1747,6 @@ void kill_eNB_proc(void) */ static void* eNB_thread( void* arg ) { -return 0; UNUSED(arg); static int eNB_thread_status; @@ -2837,86 +2834,6 @@ int T_port = 2021; /* default port to listen to to wait for the tracer */ int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */ #endif -void *processing_thread(void *_) -{ - PHY_VARS_eNB *phy = PHY_vars_eNB_g[0][0]; - int sched_frame = 0; - int sched_subframe = 0; - openair0_timestamp timestamp; - int spp; - int rxs; - void *rxp[2]; - void *txp[2]; - - spp = phy->lte_frame_parms.samples_per_tti; //openair0_cfg[0].samples_per_packet; - -loop: - T(T_ENB_MASTER_TICK, T_INT(0), T_INT(sched_frame), T_INT(sched_subframe)); - - /* received subframe n */ - rxp[0] = &rxdata[0][spp * sched_subframe]; - rxs = openair0.trx_read_func(&openair0, - ×tamp, - rxp, - spp, - 1); - if (rxs != spp) printf("WARN: received %d samples out of %d wanted\n", rxs, spp); - - /* transmit subframe n+3 */ - txp[0] = &txdata[0][spp * ((sched_subframe + 3) % 10)]; - openair0.trx_write_func(&openair0, - timestamp + spp * 3 -openair0_cfg[0].tx_sample_advance, - txp, - spp, - 1, - 1); - - /* process received subframe n */ - phy->proc[sched_subframe].subframe = sched_subframe; - phy->proc[sched_subframe].frame_rx = sched_frame; - phy->proc[sched_subframe].subframe_rx = sched_subframe; - phy_procedures_eNB_RX(sched_subframe, PHY_vars_eNB_g[0][0], 0, no_relay); - - /* generate subframe n+4 */ - phy->proc[sched_subframe].subframe = (sched_subframe+4) % 10; - phy->proc[sched_subframe].frame_tx = sched_frame + ((sched_subframe >= 6) ? 1 : 0); - phy->proc[sched_subframe].subframe_tx = (sched_subframe+4) % 10; - phy_procedures_eNB_TX(sched_subframe, PHY_vars_eNB_g[0][0], 0, no_relay, NULL); - do_OFDM_mod_rt(phy->proc[sched_subframe].subframe_tx, PHY_vars_eNB_g[0][0]); - - sched_subframe++; - if (sched_subframe == 10) { - sched_subframe = 0; - sched_frame++; - sched_frame %= 1024; - } - if (!oai_exit) goto loop; - - return 0; -} - -static void new_thread(void *(*f)(void *), void *data) -{ - pthread_t t; - pthread_attr_t att; - - if (pthread_attr_init(&att)) - { fprintf(stderr, "pthread_attr_init err\n"); exit(1); } - if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) - { fprintf(stderr, "pthread_attr_setdetachstate err\n"); exit(1); } - if (pthread_attr_setstacksize(&att, 10000000)) - { fprintf(stderr, "pthread_attr_setstacksize err\n"); exit(1); } - if (pthread_create(&t, &att, f, data)) - { fprintf(stderr, "pthread_create err\n"); exit(1); } - if (pthread_attr_destroy(&att)) - { fprintf(stderr, "pthread_attr_destroy err\n"); exit(1); } -} - -void new_threading(void) -{ - new_thread(processing_thread, 0); -} - int main( int argc, char **argv ) { int i,aa,card=0; @@ -3451,7 +3368,6 @@ int main( int argc, char **argv ) int s; char cpu_affinity[1024]; CPU_ZERO(&cpuset); -#if 0 #ifdef CPU_AFFINITY if (get_nprocs() > 2) { @@ -3465,7 +3381,6 @@ int main( int argc, char **argv ) LOG_I(HW, "Setting the affinity of main function to CPU 0, for device library to use CPU 0 only!\n"); } #endif -#endif /* Check the actual affinity mask assigned to the thread */ s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); @@ -3749,7 +3664,6 @@ int main( int argc, char **argv ) pthread_attr_setstacksize(&attr_UE_thread,8192);//5*PTHREAD_STACK_MIN); #ifndef DEADLINE_SCHEDULER -#if 0 sched_param_UE_thread.sched_priority = sched_get_priority_max(SCHED_FIFO); pthread_attr_setschedparam(&attr_UE_thread,&sched_param_UE_thread); sched_param_dlsch.sched_priority = sched_get_priority_max(SCHED_FIFO); //OPENAIR_THREAD_PRIORITY; @@ -3757,7 +3671,6 @@ int main( int argc, char **argv ) pthread_attr_setschedpolicy (&attr_dlsch_threads, SCHED_FIFO); printf("Setting eNB_thread FIFO scheduling policy with priority %d \n", sched_param_dlsch.sched_priority); #endif -#endif #endif @@ -3821,8 +3734,6 @@ int main( int argc, char **argv ) #endif } - new_threading(); - // Sleep to allow all threads to setup sleep(1); From 2bacd7c71a64043b6fb62d2386f0aa157ecb82d2 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 30 Jul 2016 20:47:21 +0200 Subject: [PATCH 11/28] disable error check for python log file --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f2d95d4b7..d0f7aaf76f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,4 @@ 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' $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 From 7d7b9ffc985b92df861ea6ef519e66e2a14e66cf Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 30 Jul 2016 20:57:37 +0200 Subject: [PATCH 12/28] remove nano from test setup --- cmake_targets/autotests/test_case_list.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index e2f34c7c90..e50c651fa3 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1,6 +1,6 @@ -mozart tique stevens nano amerique +mozart tique stevens amerique /mnt/sradio/TEST_RESULTS/ https://gitlab.eurecom.fr/oai/openairinterface5g.git https://gitlab.eurecom.fr/oai/openair-cn.git @@ -12,7 +12,7 @@ 36000 010141 0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015514 015517 015602 015605 015702 015705 015802 015805 015808 015811 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 025502 025505 025508 025511 3 - mozart tique stevens nano amerique + mozart tique stevens amerique compilation Build oaisim.Rel8 From eba25f0361118acf98de39cede2d691dff7b0d78 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sun, 31 Jul 2016 13:55:21 +0200 Subject: [PATCH 13/28] add nscd to disable ypbind/ypcall errors in test setup --- cmake_targets/tools/build_helper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index ac8d9f34c1..1ac7e49e6e 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -285,7 +285,8 @@ check_install_additional_tools (){ android-tools-adb \ wvdial \ python-numpy \ - sshpass + sshpass \ + nscd $SUDO pip install paramiko $SUDO pip install pyroute2 From ec209bd43e053e471611015972800251a9004389 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 31 Jul 2016 19:33:39 +0200 Subject: [PATCH 14/28] if5 modifications. Use of asynchronous RX thread for RCC->RRU IF5 link --- openair1/PHY/LTE_TRANSPORT/if5_tools.c | 10 +- openair1/PHY/defs.h | 18 ++-- targets/RT/USER/lte-enb.c | 134 ++++++++++++++++--------- 3 files changed, 104 insertions(+), 58 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/if5_tools.c b/openair1/PHY/LTE_TRANSPORT/if5_tools.c index 1f3c76ddd4..8f5b7b32fe 100644 --- a/openair1/PHY/LTE_TRANSPORT/if5_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if5_tools.c @@ -66,7 +66,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 ); eNB->ifdevice.trx_write_func(&eNB->ifdevice, (proc_timestamp + packet_id*spp_eth), - txp, + (void**)txp, spp_eth, fp->nb_antennas_tx, 0); @@ -86,7 +86,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 ); eNB->ifdevice.trx_write_func(&eNB->ifdevice, (proc_timestamp + packet_id*spp_eth), - rxp, + (void**)rxp, spp_eth, fp->nb_antennas_rx, 0); @@ -131,7 +131,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe // Write the packet to the fronthaul if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice, packet_id, - &tx_buffer, + (void**)&tx_buffer, db_fulllength, 1, IF5_MOBIPASS)) < 0) { @@ -177,7 +177,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 ); eNB->ifdevice.trx_read_func(&eNB->ifdevice, ×tamp[packet_id], - txp, + (void**)txp, spp_eth, fp->nb_antennas_tx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 ); @@ -197,7 +197,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 ); eNB->ifdevice.trx_read_func(&eNB->ifdevice, ×tamp[packet_id], - rxp, + (void**)rxp, spp_eth, fp->nb_antennas_rx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 ); diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 7bcc3810ae..8e88fba00d 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -252,10 +252,12 @@ typedef struct eNB_proc_t_s { /// \brief Instance count for rx processing thread. /// \internal This variable is protected by \ref mutex_prach. int instance_cnt_prach; + /// \internal This variable is protected by \ref mutex_asynch_rxtx. + int instance_cnt_asynch_rxtx; /// pthread structure for FH processing thread pthread_t pthread_FH; - /// pthread structure for asychronous RX processing thread - pthread_t pthread_asynch_rx; + /// pthread structure for asychronous RX/TX processing thread + pthread_t pthread_asynch_rxtx; /// flag to indicate first RX acquisition int first_rx; /// pthread attributes for FH processing thread @@ -263,23 +265,27 @@ typedef struct eNB_proc_t_s { /// pthread attributes for prach processing thread pthread_attr_t attr_prach; /// pthread attributes for asynchronous RX thread - pthread_attr_t attr_asynch_rx; + pthread_attr_t attr_asynch_rxtx; /// scheduling parameters for FH thread struct sched_param sched_param_FH; /// scheduling parameters for prach thread struct sched_param sched_param_prach; - /// scheduling parameters for asynch_rx thread - struct sched_param sched_param_asynch_rx; - /// condition variable for FH thread + /// scheduling parameters for asynch_rxtx thread + struct sched_param sched_param_asynch_rxtx; + /// pthread structure for PRACH thread pthread_t pthread_prach; /// condition variable for FH thread pthread_cond_t cond_FH; /// condition variable for PRACH processing thread; pthread_cond_t cond_prach; + /// condition variable for asynch RX/TX thread + pthread_cond_t cond_asynch_rxtx; /// mutex for FH pthread_mutex_t mutex_FH; /// mutex for PRACH thread pthread_mutex_t mutex_prach; + /// mutex for asynch RX/TX thread + pthread_mutex_t mutex_asynch_rxtx; /// set of scheduling variables RXn-TXnp4 threads eNB_rxtx_proc_t proc_rxtx[2]; /// number of slave threads diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index ed8cfefecb..732fec7a4f 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -641,21 +641,22 @@ static void wait_system_ready (char *message, volatile int *start_flag) { #endif /*! - * \brief The Asynchronous RX FH thread of RAU/RCC/eNB. + * \brief The Asynchronous RX/TX FH thread of RAU/RCC/eNB/RRU. * This handles the RX FH for an asynchronous RRU/UE * \param param is a \ref eNB_proc_t structure which contains the info what to process. * \returns a pointer to an int. The storage is not on the heap and must not be freed. */ -static void* eNB_thread_asynch_rx( void* param ) { +static void* eNB_thread_asynch_rxtx( void* param ) { - static int eNB_thread_asynch_rx_status; + static int eNB_thread_asynch_rxtx_status; eNB_proc_t *proc = (eNB_proc_t*)param; PHY_VARS_eNB *eNB = PHY_vars_eNB_g[0][proc->CC_id]; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; - openair0_timestamp timestamp_rx; - int frame_rx,subframe_rx; + openair0_timestamp timestamp_rx,timestamp_tx; + int frame_rx,subframe_rx=0,subframe_tx=0; static int first_rx = 1; + static int first_tx = 1; uint16_t packet_type; uint32_t symbol_number=0; uint32_t symbol_mask, symbol_mask_full; @@ -768,40 +769,67 @@ static void* eNB_thread_asynch_rx( void* param ) { printf( "got sync (eNB_thread_asynch_rx)\n" ); - if (eNB->node_function == eNodeB_3GPP) { // acquisition from RF - if (eNB->rfdevice.trx_read_func) - rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice, - &proc->timestamp_rx, - (void**)dummy_rx, - fp->samples_per_tti, - fp->nb_antennas_rx); - else { - printf("eNB asynch RX\n"); - sleep(1); + // wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe + printf( "waiting for devices (eNB_thread_asynch_rx)\n"); + pthread_mutex_lock( &proc->mutex_asynch_rxtx); + + while (proc->instance_cnt_asynch_rxtx<0) + pthread_cond_wait( &proc->cond_asynch_rxtx, &proc->mutex_asynch_rxtx ); + + pthread_mutex_unlock(&proc->mutex_asynch_rxtx); + + printf( "devices ok (eNB_thread_asynch_rx)\n"); + + while (!oai_exit) { + if (eNB->node_function == eNodeB_3GPP) { // acquisition from RF + + if (eNB->rfdevice.trx_read_func) + rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice, + &proc->timestamp_rx, + (void**)dummy_rx, + fp->samples_per_tti, + fp->nb_antennas_rx); + else { + printf("eNB asynch RX\n"); + sleep(1); + } + if (rxs!=fp->samples_per_tti) { + exit_fun("error receiving samples\n"); + } } - if (rxs!=fp->samples_per_tti) { - exit_fun("error receiving samples\n"); - } - } - else if (eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF + else if (eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF /// **** recv_IF5 of rxdata from RRH **** /// - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 ); - recv_IF5(eNB, ×tamp_rx, subframe_rx++, IF5_RRH_GW_UL); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 ); - if (first_rx == 1) { - first_rx = 0; - subframe_rx = (timestamp_rx/fp->samples_per_tti)%10; - } - else { - // check timestamp - if ((timestamp_rx - proc->timestamp_rx) < (2*fp->samples_per_tti)) - printf("RX overflow ...\n"); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 ); + recv_IF5(eNB, ×tamp_rx, subframe_rx++, IF5_RRH_GW_UL); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 ); + if (first_rx == 1) { + first_rx = 0; + subframe_rx = (timestamp_rx/fp->samples_per_tti)%10; + } + else { + // check timestamp + if ((timestamp_rx - proc->timestamp_rx) < (2*fp->samples_per_tti)) + printf("RX overflow ...\n"); + + } + } // eNodeB_3GPP_BBU + + else if (eNB->node_function == NGFI_RRU_IF5) { + /// **** recv_IF5 of rxdata from RRH **** /// + subframe_tx = (subframe_tx+1)%10; + + recv_IF5(eNB, ×tamp_tx, subframe_tx, IF5_RRH_GW_DL); + printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx); + if (first_tx == 1) { + first_tx = 0; + subframe_tx = (timestamp_tx/fp->samples_per_tti)%10; + + } + } - } // eNodeB_3GPP_BBU - - else if (eNB->node_function == NGFI_RCC_IF4p5) { + else if (eNB->node_function == NGFI_RCC_IF4p5) { /// **** recv_IF4p5 of rxdataF from RRU **** /// /// **** recv_IF4p5 of rxsigF from RRU **** /// // get frame/subframe information from IF4p5 interface @@ -811,10 +839,10 @@ static void* eNB_thread_asynch_rx( void* param ) { symbol_mask = 0; symbol_mask_full = (1<symbols_per_tti)-1; prach_rx = 0; - + do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! recv_IF4p5(eNB, &frame_rx, &subframe_rx, &packet_type, &symbol_number); - + if (packet_type == IF4p5_PULFFT) { symbol_mask = symbol_mask | (1<frame_rx, proc->subframe_rx)>0) ? 1 : 0; @@ -834,9 +862,9 @@ static void* eNB_thread_asynch_rx( void* param ) { else { // should not get here AssertFatal(1==0, "Unknown eNB->node_function %d",eNB->node_function); } - - eNB_thread_asynch_rx_status=0; - return(&eNB_thread_asynch_rx_status); + } + eNB_thread_asynch_rxtx_status=0; + return(&eNB_thread_asynch_rxtx_status); } void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { @@ -848,16 +876,17 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { if (proc->first_rx==0) { - // Transmit TX buffer based on timestamp from RX + // Transmit TX buffer based on timestamp from RX + printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(3*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); // prepare tx buffer pointers for (i=0; inb_antennas_tx; i++) - txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+3)%10)*fp->samples_per_tti]; + txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+2)%10)*fp->samples_per_tti]; txs = eNB->rfdevice.trx_write_func(&eNB->rfdevice, - proc->timestamp_rx+(3*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance, + proc->timestamp_rx+(2*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance, txp, fp->samples_per_tti, fp->nb_antennas_tx, @@ -877,7 +906,7 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][*subframe*fp->samples_per_tti]; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 ); - + rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice, &(proc->timestamp_rx), rxp, @@ -888,6 +917,7 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023; proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10; + printf("trx_read <- USRP TS %llu (sf %d, first_rx %d)\n", proc->timestamp_rx,proc->subframe_rx,proc->first_rx); if (proc->first_rx == 0) { if (proc->subframe_rx != *subframe){ @@ -1232,6 +1262,12 @@ static void* eNB_thread_FH( void* param ) { if (eNB->start_rf(eNB) != 0) LOG_E(HW,"Could not start the RF device\n"); + // unlock asnych_rxtx thread + pthread_mutex_lock(&proc->mutex_asynch_rxtx); + proc->instance_cnt_asynch_rxtx=0; + pthread_mutex_unlock(&proc->mutex_asynch_rxtx); + pthread_cond_signal(&proc->cond_asynch_rxtx); + // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices while (!oai_exit) { @@ -1527,6 +1563,7 @@ void init_eNB_proc(int inst) { proc_rxtx[1].instance_cnt_rxtx = -1; proc->instance_cnt_prach = -1; proc->instance_cnt_FH = -1; + proc->instance_cnt_asynch_rxtx = -1; proc->CC_id = CC_id; proc->first_rx=4; @@ -1534,24 +1571,27 @@ void init_eNB_proc(int inst) { pthread_mutex_init( &proc_rxtx[0].mutex_rxtx, NULL); pthread_mutex_init( &proc_rxtx[1].mutex_rxtx, NULL); pthread_mutex_init( &proc->mutex_prach, NULL); + pthread_mutex_init( &proc->mutex_asynch_rxtx, NULL); pthread_cond_init( &proc_rxtx[0].cond_rxtx, NULL); pthread_cond_init( &proc_rxtx[1].cond_rxtx, NULL); pthread_cond_init( &proc->cond_prach, NULL); pthread_cond_init( &proc->cond_FH, NULL); + pthread_cond_init( &proc->cond_asynch_rxtx, NULL); #ifndef DEADLINE_SCHEDULER pthread_create( &proc_rxtx[0].pthread_rxtx, &proc_rxtx[0].attr_rxtx, eNB_thread_rxtx, &proc_rxtx[0] ); pthread_create( &proc_rxtx[1].pthread_rxtx, &proc_rxtx[1].attr_rxtx, eNB_thread_rxtx, &proc_rxtx[1] ); pthread_create( &proc->pthread_FH, &proc->attr_FH, eNB_thread_FH, &eNB->proc ); pthread_create( &proc->pthread_prach, &proc->attr_prach, eNB_thread_prach, &eNB->proc ); - if (eNB->node_timing == synch_to_other) - pthread_create( &proc->pthread_asynch_rx, &proc->attr_asynch_rx, eNB_thread_asynch_rx, &eNB->proc ); + if ((eNB->node_timing == synch_to_other) || + (eNB->node_function == NGFI_RRU_IF5)) + pthread_create( &proc->pthread_asynch_rxtx, &proc->attr_asynch_rxtx, eNB_thread_asynch_rxtx, &eNB->proc ); #else pthread_create( &proc_rxtx[0].pthread_rxtx, NULL, eNB_thread_rxtx, &eNB->proc_rxtx[0] ); pthread_create( &proc_rxtx[1].pthread_rxtx, NULL, eNB_thread_rxtx, &eNB->proc_rxtx[1] ); pthread_create( &proc->pthread_FH, NULL, eNB_thread_FH, &eNB->proc ); pthread_create( &proc->pthread_prach, NULL, eNB_thread_prach, &eNB->proc ); if (eNB->node_timing == synch_to_other) - pthread_create( &proc->pthread_asynch_rx, NULL, eNB_thread_asynch_rx, &eNB->proc ); + pthread_create( &proc->pthread_asynch_rxtx, NULL, eNB_thread_asynch_rxtx, &eNB->proc ); #endif char name[16]; @@ -1767,7 +1807,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->do_prach = NULL; eNB->fep = eNB_fep_rru_if5; eNB->proc_uespec_rx = NULL; - eNB->proc_tx = proc_tx_rru_if5; + eNB->proc_tx = NULL; eNB->tx_fh = NULL; eNB->rx_fh = rx_rf; eNB->start_rf = start_rf; From b2c21c624642462ccd76bee437285846a2b1d91f Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 31 Jul 2016 21:19:26 +0200 Subject: [PATCH 15/28] configuration files for IF5 rru (5,10 MHz) --- .../rru.band7.tm1.50PRB.if5.usrpb210.conf | 190 ++++++++++++++++++ .../CONF/rru.band7.tm1.if5.usrpb210.conf | 190 ++++++++++++++++++ targets/RT/USER/lte-enb.c | 8 +- 3 files changed, 384 insertions(+), 4 deletions(-) create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.50PRB.if5.usrpb210.conf create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if5.usrpb210.conf diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.50PRB.if5.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.50PRB.if5.usrpb210.conf new file mode 100644 index 0000000000..902420ae08 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.50PRB.if5.usrpb210.conf @@ -0,0 +1,190 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 50; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth0"; + remote_address = "34:e6:d7:3c:ae:fc"; + local_address = "74:d4:35:cc:8d:15"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "raw_if5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + } + ); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + } +); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if5.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if5.usrpb210.conf new file mode 100644 index 0000000000..8e1e1441bf --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if5.usrpb210.conf @@ -0,0 +1,190 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth0"; + remote_address = "34:e6:d7:3c:ae:fc"; + local_address = "74:d4:35:cc:8d:15"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "raw_if5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + } + ); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + } +); diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 732fec7a4f..da40b58379 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -821,7 +821,7 @@ static void* eNB_thread_asynch_rxtx( void* param ) { subframe_tx = (subframe_tx+1)%10; recv_IF5(eNB, ×tamp_tx, subframe_tx, IF5_RRH_GW_DL); - printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx); + // printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx); if (first_tx == 1) { first_tx = 0; subframe_tx = (timestamp_tx/fp->samples_per_tti)%10; @@ -877,8 +877,8 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { if (proc->first_rx==0) { // Transmit TX buffer based on timestamp from RX - printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(3*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff ); + // printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10); + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(2*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); // prepare tx buffer pointers @@ -917,7 +917,7 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023; proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10; - printf("trx_read <- USRP TS %llu (sf %d, first_rx %d)\n", proc->timestamp_rx,proc->subframe_rx,proc->first_rx); + // printf("trx_read <- USRP TS %llu (sf %d, first_rx %d)\n", proc->timestamp_rx,proc->subframe_rx,proc->first_rx); if (proc->first_rx == 0) { if (proc->subframe_rx != *subframe){ From dfe087a52e6cd82858b5d8acd5d25d0a977051cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 1 Aug 2016 13:06:34 +0200 Subject: [PATCH 16/28] fix gnutls download (closes #122) --- cmake_targets/tools/build_helper | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index ac8d9f34c1..c91de1ea77 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -205,10 +205,8 @@ install_gnutls_from_source(){ cd /tmp echo "Downloading gnutls archive" $SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23 - wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz - if [ $? -ne 0 ]; then + wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz || \ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz - fi if [ ! -f gnutls-3.1.23.tar.xz ]; then echo_error "Could not download gnutls source files" cd - From 9ec462e8802b5418c31cd0619cc8def512eb73e5 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 1 Aug 2016 20:30:42 +0200 Subject: [PATCH 17/28] debugging for IF4p5 --- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 1 + openair1/PHY/defs.h | 8 +- .../CONF/rru.band7.tm1.if4p5.usrpb210.conf | 190 ++++++++++++++++++ targets/RT/USER/lte-enb.c | 38 +--- targets/RT/USER/lte-softmodem.c | 11 +- 5 files changed, 205 insertions(+), 43 deletions(-) create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.usrpb210.conf diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 738fe842b6..217492dba6 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -261,6 +261,7 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) { void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet, int frame, int subframe) { + ul_packet->type = IF4p5_PACKET_TYPE; ul_packet->sub_type = IF4p5_PULFFT; diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 8e88fba00d..dd78e575bb 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -160,10 +160,10 @@ enum transmission_access_mode { typedef enum { eNodeB_3GPP=0, // classical eNodeB function eNodeB_3GPP_BBU, // eNodeB with NGFI IF5 - NGFI_RRU_IF5, // NGFI_RRU with IF5 - NGFI_RRU_IF4p5, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4p5) - NGFI_RCC_IF4p5, // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4p5) - NGFI_RAU_IF4p5 + NGFI_RCC_IF4p5, // NGFI_RCC (NGFI radio cloud center) + NGFI_RAU_IF4p5, + NGFI_RRU_IF5, // NGFI_RRU (NGFI remote radio-unit,IF5) + NGFI_RRU_IF4p5 // NGFI_RRU (NGFI remote radio-unit,IF4p5) } eNB_func_t; typedef enum { diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.usrpb210.conf new file mode 100644 index 0000000000..f99cdab2a2 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.usrpb210.conf @@ -0,0 +1,190 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "93"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth0"; + remote_address = "34:e6:d7:3c:ae:fc"; + local_address = "74:d4:35:cc:8d:15"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "raw_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + } + ); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + } +); diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index da40b58379..b0d1eb3d0e 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1248,7 +1248,8 @@ static void* eNB_thread_FH( void* param ) { printf( "got sync (eNB_thread_FH)\n" ); #if defined(ENABLE_ITTI) - wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); + if (eNB->node_function < NGFI_RRU_IF5) + wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); #endif @@ -1938,45 +1939,12 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst sleep(1); LOG_D(HW,"[lte-softmodem.c] eNB threads created\n"); - /* - printf("Creating main eNB_thread \n"); - error_code = pthread_create( &main_eNB_thread, &attr_dlsch_threads, eNB_thread, NULL ); - - if (error_code!= 0) { - LOG_D(HW,"[lte-softmodem.c] Could not allocate eNB_thread, error %d\n",error_code); - } else { - LOG_D( HW, "[lte-softmodem.c] Allocate eNB_thread successful\n" ); - pthread_setname_np( main_eNB_thread, "main eNB" ); - } - */ + } void stop_eNB(int nb_inst) { - /* -#ifdef DEBUG_THREADS - printf("Joining eNB_thread ..."); -#endif - - int *eNB_thread_status_p; - int result = pthread_join( main_eNB_thread, (void**)&eNB_thread_status_p ); - -#ifdef DEBUG_THREADS - if (result != 0) { - printf( "\nError joining main_eNB_thread.\n" ); - } else { - if (eNB_thread_status_p) { - printf( "status %d\n", *eNB_thread_status_p ); - } else { - printf( "The thread was killed. No status available.\n"); - } - } -#else - UNUSED(result); -#endif // DEBUG_THREADS - */ - for (int inst=0;inst Date: Mon, 1 Aug 2016 20:39:01 +0200 Subject: [PATCH 18/28] debugging for IF4p5 --- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 3 +- openair2/ENB_APP/enb_config.c | 10 +- openair2/ENB_APP/enb_config.h | 4 +- .../CONF/enb.band7.tm1.exmimo2.conf | 12 +- .../CONF/rcc.band7.tm1.if4p5.usrpb210.conf | 190 ++++++++++++++++++ targets/RT/USER/lte-softmodem.c | 4 +- 6 files changed, 207 insertions(+), 16 deletions(-) create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.usrpb210.conf diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 738fe842b6..4a4448ef76 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -197,7 +197,8 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t *frame = ((packet_header->frame_status)>>6)&0xffff; *subframe = ((packet_header->frame_status)>>22)&0x000f; - + + if (*packet_type == IF4p5_PDLFFT) { *symbol_number = ((packet_header->frame_status)>>26)&0x000f; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 770b4afa25..02e61711b8 100755 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -303,7 +303,7 @@ void enb_config_display(void) printf( "\ttx_scheduling_advance :\t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_scheduling_advance); printf( "\ttx_sample_advance : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_sample_advance); printf( "\tiq_txshift : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].iq_txshift); - printf( "\ttransport : \t%s Ethernet:\n",(enb_properties.properties[i]->rrh_gw_config[j].raw == 1)? "RAW" : (enb_properties.properties[i]->rrh_gw_config[j].rawif4 == 1)? "RAW_IF4" : (enb_properties.properties[i]->rrh_gw_config[j].udpif4 == 1)? "UDP_IF4" : (enb_properties.properties[i]->rrh_gw_config[j].rawif5_mobipass == 1)? "RAW_IF5_MOBIPASS" : "UDP"); + printf( "\ttransport : \t%s Ethernet:\n",(enb_properties.properties[i]->rrh_gw_config[j].raw == 1)? "RAW" : (enb_properties.properties[i]->rrh_gw_config[j].rawif4p5 == 1)? "RAW_IF4p5" : (enb_properties.properties[i]->rrh_gw_config[j].udpif4p5 == 1)? "UDP_IF4p5" : (enb_properties.properties[i]->rrh_gw_config[j].rawif5_mobipass == 1)? "RAW_IF5_MOBIPASS" : "UDP"); if (enb_properties.properties[i]->rrh_gw_config[j].exmimo == 1) { printf( "\tRF target : \tEXMIMO:\n"); } else if (enb_properties.properties[i]->rrh_gw_config[j].usrp_b200 == 1) { @@ -2296,10 +2296,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1; } else if (strcmp(tr_preference, "raw") == 0) { enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1; - } else if (strcmp(tr_preference, "udp_if4") == 0) { - enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4 = 1; - } else if (strcmp(tr_preference, "raw_if4") == 0) { - enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4 = 1; + } else if (strcmp(tr_preference, "udp_if4p5") == 0) { + enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4p5 = 1; + } else if (strcmp(tr_preference, "raw_if4p5") == 0) { + enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4p5 = 1; } else if (strcmp(tr_preference, "raw_if5_mobipass") == 0) { enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif5_mobipass = 1; } else {//if (strcmp(preference, "no") == 0) diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 6a8483c3d0..62418197f0 100755 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -87,8 +87,8 @@ typedef struct rrh_gw_config_s { char *remote_address; uint16_t local_port; uint16_t remote_port; - uint8_t udpif4; - uint8_t rawif4; + uint8_t udpif4p5; + uint8_t rawif4p5; uint8_t rawif5_mobipass; int tx_scheduling_advance; int tx_sample_advance; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf index 7bf097875d..4cec39bdc7 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf @@ -134,7 +134,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.171"; + mme_ip_address = ( { ipv4 = "127.0.0.3"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -143,17 +143,17 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth2"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.80/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth2"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.80/24"; + ENB_INTERFACE_NAME_FOR_S1U = "lo"; + ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; log_config : { - global_log_level ="debug"; + global_log_level ="info"; global_log_verbosity ="medium"; hw_log_level ="info"; hw_log_verbosity ="medium"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.usrpb210.conf new file mode 100644 index 0000000000..e8ffde20b6 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.usrpb210.conf @@ -0,0 +1,190 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "93"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "127.0.0.3"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; + ENB_INTERFACE_NAME_FOR_S1U = "lo"; + ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth0"; + remote_address = "74:d4:35:cc:8d:15"; + local_address = "34:e6:d7:3c:ae:fc"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "raw_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + } + ); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + } +); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index f2c3614850..8ac5a8307f 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1055,9 +1055,9 @@ static void get_options (int argc, char **argv) if (enb_properties->properties[i]->rrh_gw_config[j].raw == 1) { (eth_params+j)->transp_preference = ETH_RAW_MODE; - } else if (enb_properties->properties[i]->rrh_gw_config[j].rawif4 == 1) { + } else if (enb_properties->properties[i]->rrh_gw_config[j].rawif4p5 == 1) { (eth_params+j)->transp_preference = ETH_RAW_IF4p5_MODE; - } else if (enb_properties->properties[i]->rrh_gw_config[j].udpif4 == 1) { + } else if (enb_properties->properties[i]->rrh_gw_config[j].udpif4p5 == 1) { (eth_params+j)->transp_preference = ETH_UDP_IF4p5_MODE; } else if (enb_properties->properties[i]->rrh_gw_config[j].rawif5_mobipass == 1) { (eth_params+j)->transp_preference = ETH_RAW_IF5_MOBIPASS; From 350465fdef1a8be56155f35f2b03ddda52ae08e7 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Wed, 3 Aug 2016 21:14:38 +0200 Subject: [PATCH 19/28] fix 20 MHz config file --- .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 210c7ea740..534ed62dfd 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -22,6 +22,9 @@ eNBs = component_carriers = ( { + node_function = "eNodeB_3GPP"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; frame_type = "FDD"; tdd_config = 3; tdd_config_s = 0; From 714bae4ffd766bb7d17e210dc2be59350c508936 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Wed, 3 Aug 2016 21:17:41 +0200 Subject: [PATCH 20/28] minor fix for installation --- cmake_targets/tools/build_helper | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index ac8d9f34c1..c91de1ea77 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -205,10 +205,8 @@ install_gnutls_from_source(){ cd /tmp echo "Downloading gnutls archive" $SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23 - wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz - if [ $? -ne 0 ]; then + wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz || \ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz - fi if [ ! -f gnutls-3.1.23.tar.xz ]; then echo_error "Could not download gnutls source files" cd - From dc124abbad5d63105c3587f2eb51f3c896bc666a Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 30 Jul 2016 20:57:37 +0200 Subject: [PATCH 21/28] remove nano from test setup --- cmake_targets/autotests/test_case_list.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 2fecd2b292..0bc09f261a 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1,6 +1,6 @@ -mozart tique stevens nano amerique +mozart tique stevens amerique /mnt/sradio/TEST_RESULTS/ https://gitlab.eurecom.fr/oai/openairinterface5g.git https://gitlab.eurecom.fr/oai/openair-cn.git @@ -12,7 +12,7 @@ 36000 010141 0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015514 015517 015602 015605 015702 015705 015802 015805 015808 015811 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 025502 025505 025508 025511 3 - mozart tique stevens nano amerique + mozart tique stevens amerique compilation Build oaisim.Rel8 From 5056134772bcf574edfc87f66c7c6774fe5d175e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 4 Aug 2016 00:58:19 +0200 Subject: [PATCH 22/28] debugging of IF4p5 RRU --- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 28 +- openair1/PHY/defs.h | 9 +- openair1/PHY/vars.h | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 21 +- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c | 3 +- .../ETHERNET/USERSPACE/LIB/ethernet_lib.c | 2 +- targets/RT/USER/lte-enb.c | 376 +++++++++++------- targets/RT/USER/lte-softmodem.c | 347 ++++++++-------- targets/SIMU/USER/init_lte.c | 1 + 10 files changed, 464 insertions(+), 327 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 8f01fc5369..655c61c15c 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -133,7 +133,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type } } else if (packet_type == IF4p5_PRACH) { // FIX: hard coded prach samples length - db_fulllength = 839*2; + db_fulllength = 840*2; IF4p5_header_t *prach_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t); diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 0adb8685f0..df28dfd6fa 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -1065,7 +1065,7 @@ void rx_prach(PHY_VARS_eNB *eNB, int i; lte_frame_type_t frame_type = eNB->frame_parms.frame_type; - int subframe = eNB->proc.subframe_rx; + int subframe = eNB->proc.subframe_prach; uint16_t rootSequenceIndex = eNB->frame_parms.prach_config_common.rootSequenceIndex; uint8_t prach_ConfigIndex = eNB->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex; uint8_t Ncs_config = eNB->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig; @@ -1101,6 +1101,8 @@ void rx_prach(PHY_VARS_eNB *eNB, int fft_size,log2_ifft_size; uint8_t nb_ant_rx = 1; //eNB->frame_parms.nb_antennas_rx; + // int en; + for (aa=0; aacommon_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset]; } @@ -1282,8 +1284,11 @@ void rx_prach(PHY_VARS_eNB *eNB, k*=2; /// **** send_IF4 of rxsigF to RCC **** /// - send_IF4p5(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4p5_PRACH, k); + send_IF4p5(eNB, eNB->proc.frame_prach, eNB->proc.subframe_prach, IF4p5_PRACH, k); + // en = dB_fixed(signal_energy(&rxsigF[0][k],840)); + // if (en>60) + // printf("PRACH: Frame %d, Subframe %d => %d dB\n",eNB->proc.frame_rx,eNB->proc.subframe_rx,en); return; } else if (eNB->node_function == NGFI_RCC_IF4p5) { k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; @@ -1469,11 +1474,24 @@ void rx_prach(PHY_VARS_eNB *eNB, #endif // if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); }// antennas_rx + #ifdef PRACH_DEBUG - write_output("prach_ifft0.m","prach_t0",prach_ifft[0],2048,1,1); + if (en>40) { + k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; + + if (k<0) + k+=(eNB->frame_parms.ofdm_symbol_size); + + k*=12; + k+=13; + k*=2; + printf("Dumping prach, k = %d (n_ra_prb %d)\n",k,n_ra_prb); + write_output("rxsigF.m","prach_rxF",&rxsigF[0][k],840,1,1); + write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); + write_output("prach_ifft0.m","prach_t0",prach_ifft[0],1024,1,1); + exit(-1); + } #endif - // write_output("prach_ifft1.m","prach_t1",prach_ifft[1],2048,1,1); - } // new dft // check energy in nth time shift diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index dd78e575bb..9b5db4b421 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -260,6 +260,8 @@ typedef struct eNB_proc_t_s { pthread_t pthread_asynch_rxtx; /// flag to indicate first RX acquisition int first_rx; + /// flag to indicate first TX transmission + int first_tx; /// pthread attributes for FH processing thread pthread_attr_t attr_FH; /// pthread attributes for prach processing thread @@ -362,14 +364,15 @@ typedef struct PHY_VARS_eNB_s { eNB_func_t node_function; eNB_timing_t node_timing; int abstraction_flag; - void (*do_prach)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc); - void (*fep)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc); + void (*do_prach)(struct PHY_VARS_eNB_s *eNB); + void (*fep)(struct PHY_VARS_eNB_s *eNB); void (*proc_uespec_rx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type); void (*proc_tx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *rn); void (*tx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc); - void (*rx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc,int *frame, int *subframe); + void (*rx_fh)(struct PHY_VARS_eNB_s *eNB,int *frame, int *subframe); int (*start_rf)(struct PHY_VARS_eNB_s *eNB); int (*start_if)(struct PHY_VARS_eNB_s *eNB); + void (*fh_asynch)(struct PHY_VARS_eNB_s *eNB,int *frame, int *subframe); uint8_t local_flag; uint32_t rx_total_gain_dB; LTE_DL_FRAME_PARMS frame_parms; diff --git a/openair1/PHY/vars.h b/openair1/PHY/vars.h index 85bfe7a2a6..b8cb33239d 100755 --- a/openair1/PHY/vars.h +++ b/openair1/PHY/vars.h @@ -139,7 +139,7 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682 */ -char eNB_functions[5][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RRU_IF5","NGFI_RRU_IF4","NGFI_RCC_IF4"}; +char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RCC_IF4p5","NGFI_RAI_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",}; char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 6bf9273776..b1c37e9579 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1950,12 +1950,14 @@ void prach_procedures(PHY_VARS_eNB *eNB) { break; } + /* mac_xface->initiate_ra_proc(eNB->Mod_id, eNB->CC_id, frame, preamble_max, preamble_delay_list[preamble_max]*update_TA, 0,subframe,0); + */ } } else { @@ -2490,8 +2492,9 @@ void cba_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq_p } -void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { +void eNB_fep_full(PHY_VARS_eNB *eNB) { + eNB_proc_t *proc = &eNB->proc; int l; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; @@ -2503,7 +2506,7 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { &eNB->common_vars, l, proc->subframe_rx<<1, - 0, + 0, 0 ); slot_fep_ul(fp, @@ -2519,14 +2522,13 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { if (eNB->node_function == NGFI_RRU_IF4p5) { /// **** send_IF4 of rxdataF to RCC (no prach now) **** /// - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 ); send_IF4p5(eNB, proc->frame_rx, proc->subframe_rx, IF4p5_PULFFT, 0); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 ); - } + } } -void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { +void eNB_fep_rru_if5(PHY_VARS_eNB *eNB) { + eNB_proc_t *proc=&eNB->proc; uint8_t seqno=0; /// **** send_IF5 of rxdata to BBU **** /// @@ -2536,8 +2538,9 @@ void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { } -void do_prach(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { +void do_prach(PHY_VARS_eNB *eNB) { + eNB_proc_t *proc = &eNB->proc; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; // check if we have to detect PRACH first @@ -2594,9 +2597,9 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){ LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe); - if (eNB->fep) eNB->fep(eNB,proc); + if (eNB->fep) eNB->fep(eNB); - if (eNB->do_prach) eNB->do_prach(eNB,proc); + if (eNB->do_prach) eNB->do_prach(eNB); diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c index 02ca6ee7eb..3e06cf0356 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c @@ -224,7 +224,8 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam eth->tx_nsamps = nblocks; memcpy(buff[0], (void*)ð->eh, MAC_HEADER_SIZE_BYTES); - + + bytes_sent = send(eth->sockfd[Mod_id], buff[0], packet_size, diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c index d530558816..869777b6bf 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c @@ -83,7 +83,7 @@ int trx_eth_start(openair0_device *device) { } /* adjust MTU wrt number of samples per packet */ if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1; - if(ethernet_tune (device,RCV_TIMEOUT,5000)!=0) return -1; + if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1; } else if (eth->flags == ETH_UDP_IF4p5_MODE) { diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index b0d1eb3d0e..d6e262a4d5 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -365,13 +365,11 @@ void proc_tx_rru_if4p5(PHY_VARS_eNB *eNB, symbol_mask = 0; symbol_mask_full = (1<frame_parms.symbols_per_tti)-1; - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 ); + do { recv_IF4p5(eNB, &proc->frame_tx, &proc->subframe_tx, &packet_type, &symbol_number); symbol_mask = symbol_mask | (1<subframe_tx, eNB); } @@ -640,6 +638,151 @@ static void wait_system_ready (char *message, volatile int *start_flag) { } #endif + +// asynchronous UL with IF4p5 (RCC,RAU,eNodeB_BBU) +void fh_if5_asynch_UL(PHY_VARS_eNB *eNB,int *frame,int *subframe) { + + eNB_proc_t *proc = &eNB->proc; + LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; + + recv_IF5(eNB, &proc->timestamp_rx, *subframe, IF5_RRH_GW_UL); + + proc->subframe_rx = (proc->timestamp_rx/fp->samples_per_tti)%10; + proc->frame_rx = (proc->timestamp_rx/(10*fp->samples_per_tti))&1023; + + if (proc->first_rx != 0) { + proc->first_rx = 0; + *subframe = proc->subframe_rx; + *frame = proc->frame_rx; + } + else { + if (proc->subframe_rx != *subframe) { + LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe); + exit_fun("Exiting"); + } + if (proc->frame_rx != *frame) { + LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->frame_rx,*frame); + exit_fun("Exiting"); + } + } +} // eNodeB_3GPP_BBU + +// asynchronous UL with IF4p5 (RCC,RAU,eNodeB_BBU) +void fh_if4p5_asynch_UL(PHY_VARS_eNB *eNB,int *frame,int *subframe) { + + LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; + eNB_proc_t *proc = &eNB->proc; + + uint16_t packet_type; + uint32_t symbol_number,symbol_mask,symbol_mask_full,prach_rx; + + + symbol_number = 0; + symbol_mask = 0; + symbol_mask_full = (1<symbols_per_tti)-1; + prach_rx = 0; + + do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! + recv_IF4p5(eNB, &proc->frame_rx, &proc->subframe_rx, &packet_type, &symbol_number); + if (proc->first_rx != 0) { + *frame = proc->frame_rx; + *subframe = proc->subframe_rx; + proc->first_rx = 0; + } + else { + if (proc->frame_rx != *frame) { + LOG_E(PHY,"frame_rx %d is not what we expect %d\n",proc->frame_rx,*frame); + exit_fun("Exiting"); + } + if (proc->subframe_rx != *subframe) { + LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe); + exit_fun("Exiting"); + } + } + if (packet_type == IF4p5_PULFFT) { + symbol_mask = symbol_mask | (1<frame_rx, proc->subframe_rx)>0) ? 1 : 0; + } else if (packet_type == IF4p5_PRACH) { + prach_rx = 0; + } + } while( (symbol_mask != symbol_mask_full) || (prach_rx == 1)); + + +} + + +void fh_if5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) { + + LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; + eNB_proc_t *proc = &eNB->proc; + int subframe_tx,frame_tx; + openair0_timestamp timestamp_tx; + + recv_IF5(eNB, ×tamp_tx, *subframe, IF5_RRH_GW_DL); + // printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx); + + subframe_tx = (timestamp_tx/fp->samples_per_tti)%10; + frame_tx = (timestamp_tx/(fp->samples_per_tti*10))&1023; + + if (proc->first_tx != 0) { + *subframe = subframe_tx; + *frame = frame_tx; + proc->first_tx = 0; + } + else { + if (subframe_tx != *subframe) { + LOG_E(PHY,"subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe); + exit_fun("Exiting"); + } + if (frame_tx != *frame) { + LOG_E(PHY,"frame_tx %d is not what we expect %d\n",frame_tx,*frame); + exit_fun("Exiting"); + } + } +} + +void fh_if4p5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) { + + LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; + eNB_proc_t *proc = &eNB->proc; + + uint16_t packet_type; + uint32_t symbol_number,symbol_mask,symbol_mask_full; + int subframe_tx,frame_tx; + + symbol_number = 0; + symbol_mask = 0; + symbol_mask_full = (1<symbols_per_tti)-1; + + do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! + recv_IF4p5(eNB, &frame_tx, &subframe_tx, &packet_type, &symbol_number); + if (proc->first_tx != 0) { + *frame = frame_tx; + *subframe = subframe_tx; + proc->first_tx = 0; + } + else { + if (frame_tx != *frame) { + LOG_E(PHY,"frame_tx %d is not what we expect %d\n",frame_tx,*frame); + exit_fun("Exiting"); + } + if (subframe_tx != *subframe) { + LOG_E(PHY,"subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe); + exit_fun("Exiting"); + } + } + if (packet_type == IF4p5_PDLFFT) { + symbol_mask = symbol_mask | (1<CC_id]; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; - openair0_timestamp timestamp_rx,timestamp_tx; - int frame_rx,subframe_rx=0,subframe_tx=0; - static int first_rx = 1; - static int first_tx = 1; - uint16_t packet_type; - uint32_t symbol_number=0; - uint32_t symbol_mask, symbol_mask_full; - int prach_rx; - int dummy_rx[fp->nb_antennas_rx][fp->samples_per_tti]; - int rxs=0; + + int subframe=0, frame=0; + #ifdef DEADLINE_SCHEDULER struct sched_attr attr; @@ -781,94 +917,35 @@ static void* eNB_thread_asynch_rxtx( void* param ) { printf( "devices ok (eNB_thread_asynch_rx)\n"); + while (!oai_exit) { - if (eNB->node_function == eNodeB_3GPP) { // acquisition from RF - - if (eNB->rfdevice.trx_read_func) - rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice, - &proc->timestamp_rx, - (void**)dummy_rx, - fp->samples_per_tti, - fp->nb_antennas_rx); - else { - printf("eNB asynch RX\n"); - sleep(1); - } - if (rxs!=fp->samples_per_tti) { - exit_fun("error receiving samples\n"); - } - } - else if (eNB->node_function == eNodeB_3GPP_BBU) { // acquisition from IF - /// **** recv_IF5 of rxdata from RRH **** /// - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 ); - recv_IF5(eNB, ×tamp_rx, subframe_rx++, IF5_RRH_GW_UL); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 ); - if (first_rx == 1) { - first_rx = 0; - subframe_rx = (timestamp_rx/fp->samples_per_tti)%10; - } - else { - // check timestamp - if ((timestamp_rx - proc->timestamp_rx) < (2*fp->samples_per_tti)) - printf("RX overflow ...\n"); - - } - } // eNodeB_3GPP_BBU + + if (oai_exit) break; + + if (subframe==9) { + subframe=0; + frame++; + frame&=1023; + } else { + subframe++; + } + + if (eNB->fh_asynch) eNB->fh_asynch(eNB,&frame,&subframe); + else AssertFatal(1==0, "Unknown eNB->node_function %d",eNB->node_function); - else if (eNB->node_function == NGFI_RRU_IF5) { - /// **** recv_IF5 of rxdata from RRH **** /// - - subframe_tx = (subframe_tx+1)%10; - - recv_IF5(eNB, ×tamp_tx, subframe_tx, IF5_RRH_GW_DL); - // printf("Received subframe %d (TS %llu) from RCC\n",subframe_tx,timestamp_tx); - if (first_tx == 1) { - first_tx = 0; - subframe_tx = (timestamp_tx/fp->samples_per_tti)%10; - - } - - } - else if (eNB->node_function == NGFI_RCC_IF4p5) { - /// **** recv_IF4p5 of rxdataF from RRU **** /// - /// **** recv_IF4p5 of rxsigF from RRU **** /// - // get frame/subframe information from IF4p5 interface - // timed loop (200 us) - - symbol_number = 0; - symbol_mask = 0; - symbol_mask_full = (1<symbols_per_tti)-1; - prach_rx = 0; - - do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! - recv_IF4p5(eNB, &frame_rx, &subframe_rx, &packet_type, &symbol_number); - - if (packet_type == IF4p5_PULFFT) { - symbol_mask = symbol_mask | (1<frame_rx, proc->subframe_rx)>0) ? 1 : 0; - } else if (packet_type == IF4p5_PRACH) { - prach_rx = 0; - } - } while( (symbol_mask != symbol_mask_full) || (prach_rx == 1)); - - if (proc->first_rx == 0) { - if (subframe_rx < proc->subframe_rx+2){ - LOG_E(PHY,"RX overflow (proc->subframe_rx %d, subframe_rx %d)\n",proc->subframe_rx,subframe_rx); - } - } else { - proc->first_rx = 0; - } - } // node_timing == synch_to_externs, node_function = NGFI_IF4 - else { // should not get here - AssertFatal(1==0, "Unknown eNB->node_function %d",eNB->node_function); - } } + eNB_thread_asynch_rxtx_status=0; return(&eNB_thread_asynch_rxtx_status); } -void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { + + + +void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { + + eNB_proc_t *proc = &eNB->proc; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; void *rxp[fp->nb_antennas_rx],*txp[fp->nb_antennas_tx]; unsigned int rxs,txs; @@ -883,10 +960,10 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { // prepare tx buffer pointers for (i=0; inb_antennas_tx; i++) - txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+2)%10)*fp->samples_per_tti]; + txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+3)%10)*fp->samples_per_tti]; txs = eNB->rfdevice.trx_write_func(&eNB->rfdevice, - proc->timestamp_rx+(2*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance, + proc->timestamp_rx+(3*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance, txp, fp->samples_per_tti, fp->nb_antennas_tx, @@ -946,9 +1023,10 @@ void rx_rf(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { } -void rx_fh_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame, int *subframe) { +void rx_fh_if5(PHY_VARS_eNB *eNB,int *frame, int *subframe) { LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; + eNB_proc_t *proc = &eNB->proc; recv_IF5(eNB, &proc->timestamp_rx, *subframe, IF5_RRH_GW_UL); @@ -975,7 +1053,9 @@ void rx_fh_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame, int *subframe) { } -void rx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *subframe,int *frame) { +void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *subframe,int *frame) { + + eNB_proc_t *proc = &eNB->proc; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; @@ -990,9 +1070,7 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *subframe,int *frame) { prach_rx = 0; do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 ); recv_IF4p5(eNB, &proc->frame_rx, &proc->subframe_rx, &packet_type, &symbol_number); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 ); if (packet_type == IF4p5_PULFFT) { symbol_mask = symbol_mask | (1<proc; + + if (pthread_mutex_lock(&proc->mutex_FH) != 0) { + LOG_E( PHY, "[SCHED][eNB] error locking mutex for FH Slave\n"); + exit_fun( "error locking mutex" ); + } + + while (proc->instance_cnt_FH < 0) { + pthread_cond_wait( &proc->cond_FH,&proc->mutex_FH ); + } + proc->instance_cnt_FH++; + + pthread_mutex_unlock( &proc->mutex_FH ); + +} + + int wakeup_rxtx(eNB_proc_t *proc,eNB_rxtx_proc_t *proc_rxtx,LTE_DL_FRAME_PARMS *fp) { int i; @@ -1263,7 +1361,7 @@ static void* eNB_thread_FH( void* param ) { if (eNB->start_rf(eNB) != 0) LOG_E(HW,"Could not start the RF device\n"); - // unlock asnych_rxtx thread + // wakeup asnych_rxtx thread pthread_mutex_lock(&proc->mutex_asynch_rxtx); proc->instance_cnt_asynch_rxtx=0; pthread_mutex_unlock(&proc->mutex_asynch_rxtx); @@ -1274,6 +1372,8 @@ static void* eNB_thread_FH( void* param ) { if (oai_exit) break; + + // this is to check that we are in synch with the fronthaul timing if (subframe==9) { subframe=0; frame++; @@ -1282,36 +1382,10 @@ static void* eNB_thread_FH( void* param ) { subframe++; } - // This case is for synchronization to another thread - if ((eNB->node_timing == synch_to_other) && - ((eNB->node_function == NGFI_RCC_IF4p5) || - (eNB->node_function == eNodeB_3GPP_BBU))) { - //wait for event - - // how long should we wait here, for MOBIPASS this could be long - // if (pthread_mutex_timedlock(&proc->mutex_FH,&wait) != 0) { - if (pthread_mutex_lock(&proc->mutex_FH) != 0) { - LOG_E( PHY, "[SCHED][eNB] error locking mutex for FH\n"); - exit_fun( "error locking mutex" ); - break; - } - - while (proc->instance_cnt_FH < 0) { - // most of the time the thread is waiting here - // proc->instance_cnt_FH is -1 - pthread_cond_wait( &proc->cond_FH,&proc->mutex_FH ); // this unlocks mutex_rxtx while waiting and then locks it again - } - proc->instance_cnt_FH++; - - } - // Remaining cases are all for synchronization on FH interface - else if ((eNB->node_timing == synch_to_ext_device) && - (eNB->rx_fh)) - eNB->rx_fh(eNB,proc,&frame,&subframe); - - else { // should not get here - AssertFatal(1==0, "Unknown fronthaul interface : eNB->node_function %d",eNB->node_function); - } + + // synchronization on FH interface, acquire signals/data and block + if (eNB->rx_fh) eNB->rx_fh(eNB,&frame,&subframe); + else AssertFatal(1==0, "No fronthaul interface : eNB->node_function %d",eNB->node_function); T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx)); @@ -1494,7 +1568,7 @@ static void* eNB_thread_prach( void* param ) { break; } - + prach_procedures(eNB); if (pthread_mutex_lock(&proc->mutex_prach) != 0) { @@ -1567,8 +1641,9 @@ void init_eNB_proc(int inst) { proc->instance_cnt_asynch_rxtx = -1; proc->CC_id = CC_id; - proc->first_rx=4; - + proc->first_rx=1; + proc->first_tx=1; + pthread_mutex_init( &proc_rxtx[0].mutex_rxtx, NULL); pthread_mutex_init( &proc_rxtx[1].mutex_rxtx, NULL); pthread_mutex_init( &proc->mutex_prach, NULL); @@ -1584,7 +1659,8 @@ void init_eNB_proc(int inst) { pthread_create( &proc->pthread_FH, &proc->attr_FH, eNB_thread_FH, &eNB->proc ); pthread_create( &proc->pthread_prach, &proc->attr_prach, eNB_thread_prach, &eNB->proc ); if ((eNB->node_timing == synch_to_other) || - (eNB->node_function == NGFI_RRU_IF5)) + (eNB->node_function == NGFI_RRU_IF5) || + (eNB->node_function == NGFI_RRU_IF4p5)) pthread_create( &proc->pthread_asynch_rxtx, &proc->attr_asynch_rxtx, eNB_thread_asynch_rxtx, &eNB->proc ); #else pthread_create( &proc_rxtx[0].pthread_rxtx, NULL, eNB_thread_rxtx, &eNB->proc_rxtx[0] ); @@ -1784,9 +1860,9 @@ int start_rf(PHY_VARS_eNB *eNB) { return(eNB->rfdevice.trx_start_func(&eNB->rfdevice)); } -extern void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc); -extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc); -extern void do_prach(PHY_VARS_eNB *eNB,eNB_proc_t *proc); +extern void eNB_fep_rru_if5(PHY_VARS_eNB *eNB); +extern void eNB_fep_full(PHY_VARS_eNB *eNB); +extern void do_prach(PHY_VARS_eNB *eNB); void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst,eth_params_t *eth_params) { @@ -1813,6 +1889,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->rx_fh = rx_rf; eNB->start_rf = start_rf; eNB->start_if = start_if; + eNB->fh_asynch = fh_if5_asynch_DL; ret = openair0_device_load(&eNB->rfdevice, &openair0_cfg[0]); if (ret<0) { printf("Exiting, cannot initialize rf device\n"); @@ -1831,9 +1908,10 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->do_prach = do_prach; eNB->fep = eNB_fep_full; eNB->proc_uespec_rx = NULL; - eNB->proc_tx = proc_tx_rru_if4p5; + eNB->proc_tx = NULL;//proc_tx_rru_if4p5; eNB->tx_fh = NULL; eNB->rx_fh = rx_rf; + eNB->fh_asynch = fh_if4p5_asynch_DL; eNB->start_rf = start_rf; eNB->start_if = start_if; ret = openair0_device_load(&eNB->rfdevice, &openair0_cfg[0]); @@ -1862,6 +1940,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->rx_fh = rx_rf; eNB->start_rf = start_rf; eNB->start_if = NULL; + eNB->fh_asynch = NULL; ret = openair0_device_load(&eNB->rfdevice, &openair0_cfg[0]); if (ret<0) { printf("Exiting, cannot initialize rf device\n"); @@ -1877,11 +1956,14 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->proc_tx = proc_tx_full; eNB->tx_fh = tx_fh_if5; eNB->rx_fh = rx_fh_if5; + eNB->fh_asynch = (eNB->node_timing == synch_to_other) ? fh_if5_asynch_UL : NULL; + eNB->start_rf = NULL; eNB->start_if = start_if; eNB->rfdevice.host_type = BBU_HOST; eNB->ifdevice.host_type = BBU_HOST; + ret = openair0_transport_load(&eNB->ifdevice, &openair0_cfg[0], (eth_params+CC_id)); printf("openair0_transport_init returns %d for CC_id %d\n",ret,CC_id); if (ret<0) { @@ -1890,14 +1972,15 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst } break; case NGFI_RCC_IF4p5: - eNB->do_prach = do_prach; - eNB->fep = NULL; - eNB->proc_uespec_rx = phy_procedures_eNB_uespec_RX; - eNB->proc_tx = proc_tx_high; - eNB->tx_fh = tx_fh_if4p5; - eNB->rx_fh = rx_fh_if4p5; - eNB->start_rf = NULL; - eNB->start_if = start_if; + eNB->do_prach = do_prach; + eNB->fep = NULL; + eNB->proc_uespec_rx = phy_procedures_eNB_uespec_RX; + eNB->proc_tx = proc_tx_high; + eNB->tx_fh = tx_fh_if4p5; + eNB->rx_fh = rx_fh_if4p5; + eNB->start_rf = NULL; + eNB->start_if = start_if; + eNB->fh_asynch = (eNB->node_timing == synch_to_other) ? fh_if4p5_asynch_UL : NULL; eNB->rfdevice.host_type = BBU_HOST; eNB->ifdevice.host_type = BBU_HOST; ret = openair0_transport_load(&eNB->ifdevice, &openair0_cfg[0], (eth_params+CC_id)); @@ -1916,6 +1999,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->proc_tx = proc_tx_high; eNB->tx_fh = tx_fh_if4p5; eNB->rx_fh = rx_fh_if4p5; + eNB->fh_asynch = (eNB->node_timing == synch_to_other) ? fh_if4p5_asynch_UL : NULL; eNB->start_rf = NULL; eNB->start_if = start_if; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index cf5528598f..fc16d11e7d 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1088,6 +1088,8 @@ static void get_options (int argc, char **argv) } for (CC_id=0; CC_idproperties[i]->cc_node_function[CC_id]; node_timing[CC_id] = enb_properties->properties[i]->cc_node_timing[CC_id]; node_synch_ref[CC_id] = enb_properties->properties[i]->cc_node_synch_ref[CC_id]; @@ -1104,6 +1106,13 @@ static void get_options (int argc, char **argv) frame_parms[CC_id]->nb_antennas_tx = enb_properties->properties[i]->nb_antennas_tx[CC_id]; frame_parms[CC_id]->nb_antennas_tx_eNB = enb_properties->properties[i]->nb_antennas_tx[CC_id]; frame_parms[CC_id]->nb_antennas_rx = enb_properties->properties[i]->nb_antennas_rx[CC_id]; + + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = enb_properties->properties[i]->prach_config_index[CC_id]; + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset = enb_properties->properties[i]->prach_freq_offset[CC_id]; + + frame_parms[CC_id]->mode1_flag = (transmission_mode == 1) ? 1 : 0; + frame_parms[CC_id]->threequarter_fs = threequarter_fs; + //} // j } @@ -1182,6 +1191,156 @@ int T_port = 2021; /* default port to listen to to wait for the tracer */ int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */ #endif +void set_default_frame_parms() { + + int CC_id; + + for (CC_id=0; CC_idframe_type = FDD; + frame_parms[CC_id]->tdd_config = 3; + frame_parms[CC_id]->tdd_config_S = 0; + frame_parms[CC_id]->N_RB_DL = 100; + frame_parms[CC_id]->N_RB_UL = 100; + frame_parms[CC_id]->Ncp = NORMAL; + frame_parms[CC_id]->Ncp_UL = NORMAL; + frame_parms[CC_id]->Nid_cell = 0; + frame_parms[CC_id]->num_MBSFN_config = 0; + frame_parms[CC_id]->nb_antennas_tx_eNB = 1; + frame_parms[CC_id]->nb_antennas_tx = 1; + frame_parms[CC_id]->nb_antennas_rx = 1; + + frame_parms[CC_id]->nushift = 0; + + frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth; + frame_parms[CC_id]->phich_config_common.phich_duration = normal; + // UL RS Config + frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0 + frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0; + frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; + frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; + + frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22; + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1; + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0; + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0; + frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0; + + downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31. + downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0]; + downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0]; + downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0]; + //printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]); + + } + +} + +void init_openair0() { + + int card; + int i; + + for (card=0; cardN_RB_DL == 100) { + if (frame_parms[0]->threequarter_fs) { + openair0_cfg[card].sample_rate=23.04e6; + openair0_cfg[card].samples_per_frame = 230400; + openair0_cfg[card].tx_bw = 10e6; + openair0_cfg[card].rx_bw = 10e6; + } + else { + openair0_cfg[card].sample_rate=30.72e6; + openair0_cfg[card].samples_per_frame = 307200; + openair0_cfg[card].tx_bw = 10e6; + openair0_cfg[card].rx_bw = 10e6; + } + } else if(frame_parms[0]->N_RB_DL == 50) { + openair0_cfg[card].sample_rate=15.36e6; + openair0_cfg[card].samples_per_frame = 153600; + openair0_cfg[card].tx_bw = 5e6; + openair0_cfg[card].rx_bw = 5e6; + } else if (frame_parms[0]->N_RB_DL == 25) { + openair0_cfg[card].sample_rate=7.68e6; + openair0_cfg[card].samples_per_frame = 76800; + openair0_cfg[card].tx_bw = 2.5e6; + openair0_cfg[card].rx_bw = 2.5e6; + } else if (frame_parms[0]->N_RB_DL == 6) { + openair0_cfg[card].sample_rate=1.92e6; + openair0_cfg[card].samples_per_frame = 19200; + openair0_cfg[card].tx_bw = 1.5e6; + openair0_cfg[card].rx_bw = 1.5e6; + } + + if (frame_parms[0]->frame_type==TDD) + openair0_cfg[card].duplex_mode = duplex_mode_TDD; + else //FDD + openair0_cfg[card].duplex_mode = duplex_mode_FDD; + + + if (local_remote_radio == BBU_REMOTE_RADIO_HEAD) { + openair0_cfg[card].remote_addr = eth_params->remote_addr; + openair0_cfg[card].remote_port = eth_params->remote_port; + openair0_cfg[card].my_addr = eth_params->my_addr; + openair0_cfg[card].my_port = eth_params->my_port; + } + + printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, + ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx), + ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx)); + openair0_cfg[card].Mod_id = 0; + + if (UE_flag) { + printf("ETHERNET: Configuring UE ETH for %s:%d\n",rrh_UE_ip,rrh_UE_port); + openair0_cfg[card].remote_addr = &rrh_UE_ip[0]; + openair0_cfg[card].remote_port = rrh_UE_port; + } + + openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; + + + openair0_cfg[card].tx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx)); + openair0_cfg[card].rx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx)); + + for (i=0; i<4; i++) { + + if (irx_total_gain_dB; + } + else { + openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB; + } + + + } + + + } +} + int main( int argc, char **argv ) { int i,aa,card=0; @@ -1190,8 +1349,7 @@ int main( int argc, char **argv ) #endif int CC_id; - uint16_t Nid_cell = 0; - uint8_t cooperation_flag=0, abstraction_flag=0; + uint8_t abstraction_flag=0; uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2; #if defined (XFORMS) @@ -1211,39 +1369,18 @@ int main( int argc, char **argv ) memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs); set_latency_target(); - // det defaults - for (CC_id=0; CC_idframe_type = FDD; - frame_parms[CC_id]->tdd_config = 3; - frame_parms[CC_id]->tdd_config_S = 0; - frame_parms[CC_id]->N_RB_DL = 100; - frame_parms[CC_id]->N_RB_UL = 100; - frame_parms[CC_id]->Ncp = NORMAL; - frame_parms[CC_id]->Ncp_UL = NORMAL; - frame_parms[CC_id]->Nid_cell = Nid_cell; - frame_parms[CC_id]->num_MBSFN_config = 0; - frame_parms[CC_id]->nb_antennas_tx_eNB = 1; - frame_parms[CC_id]->nb_antennas_tx = 1; - frame_parms[CC_id]->nb_antennas_rx = 1; - } + // set default parameters + set_default_frame_parms(frame_parms); - for (CC_id=0; CC_idnushift = 0; - if (UE_flag==0) { - - } else { - //UE_flag==1 + if (UE_flag==1) { frame_parms[CC_id]->nb_antennas_tx = 1; frame_parms[CC_id]->nb_antennas_rx = 1; frame_parms[CC_id]->nb_antennas_tx_eNB = (transmission_mode == 1) ? 1 : 2; //initial value overwritten by initial sync later } - - frame_parms[CC_id]->mode1_flag = (transmission_mode == 1) ? 1 : 0; - frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth; - frame_parms[CC_id]->phich_config_common.phich_duration = normal; - // UL RS Config - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0 - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0; - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; - frame_parms[CC_id]->threequarter_fs = threequarter_fs; init_ul_hopping(frame_parms[CC_id]); init_frame_parms(frame_parms[CC_id],1); // phy_init_top(frame_parms[CC_id]); @@ -1392,11 +1515,7 @@ int main( int argc, char **argv ) for (CC_id=0; CC_idprach_config_common.rootSequenceIndex=22; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0; + // prach_fmt = get_prach_fmt(frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex, frame_parms->frame_type); // N_ZC = (prach_fmt <4)?839:139; } @@ -1457,7 +1576,7 @@ int main( int argc, char **argv ) PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*)); for (CC_id=0; CC_idNid_cell,cooperation_flag,transmission_mode,abstraction_flag); + PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,0,transmission_mode,abstraction_flag); PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id; if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0; @@ -1497,107 +1616,9 @@ int main( int argc, char **argv ) dump_frame_parms(frame_parms[0]); - for (card=0; cardN_RB_DL == 100) { - if (frame_parms[0]->threequarter_fs) { - openair0_cfg[card].sample_rate=23.04e6; - openair0_cfg[card].samples_per_frame = 230400; - openair0_cfg[card].tx_bw = 10e6; - openair0_cfg[card].rx_bw = 10e6; - } - else { - openair0_cfg[card].sample_rate=30.72e6; - openair0_cfg[card].samples_per_frame = 307200; - openair0_cfg[card].tx_bw = 10e6; - openair0_cfg[card].rx_bw = 10e6; - } - } else if(frame_parms[0]->N_RB_DL == 50) { - openair0_cfg[card].sample_rate=15.36e6; - openair0_cfg[card].samples_per_frame = 153600; - openair0_cfg[card].tx_bw = 5e6; - openair0_cfg[card].rx_bw = 5e6; - } else if (frame_parms[0]->N_RB_DL == 25) { - openair0_cfg[card].sample_rate=7.68e6; - openair0_cfg[card].samples_per_frame = 76800; - openair0_cfg[card].tx_bw = 2.5e6; - openair0_cfg[card].rx_bw = 2.5e6; - } else if (frame_parms[0]->N_RB_DL == 6) { - openair0_cfg[card].sample_rate=1.92e6; - openair0_cfg[card].samples_per_frame = 19200; - openair0_cfg[card].tx_bw = 1.5e6; - openair0_cfg[card].rx_bw = 1.5e6; - } - - if (frame_parms[0]->frame_type==TDD) - openair0_cfg[card].duplex_mode = duplex_mode_TDD; - else //FDD - openair0_cfg[card].duplex_mode = duplex_mode_FDD; - - - if (local_remote_radio == BBU_REMOTE_RADIO_HEAD) { - openair0_cfg[card].remote_addr = eth_params->remote_addr; - openair0_cfg[card].remote_port = eth_params->remote_port; - openair0_cfg[card].my_addr = eth_params->my_addr; - openair0_cfg[card].my_port = eth_params->my_port; - } - - printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, - ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx), - ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx)); - openair0_cfg[card].Mod_id = 0; -#ifdef ETHERNET - - if (UE_flag) { - printf("ETHERNET: Configuring UE ETH for %s:%d\n",rrh_UE_ip,rrh_UE_port); - openair0_cfg[card].remote_addr = &rrh_UE_ip[0]; - openair0_cfg[card].remote_port = rrh_UE_port; - } - - openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; -#endif - - // in the case of the USRP, the following variables need to be initialized before the init - // since the USRP only supports one CC (for the moment), we initialize all the cards with first CC. - // in the case of EXMIMO2, these values are overwirtten in the function setup_eNB/UE_buffer - - openair0_cfg[card].tx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx)); - openair0_cfg[card].rx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx)); - - for (i=0; i<4; i++) { - - if (irx_total_gain_dB; - } - else { - openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB; - } + init_openair0(); - } - - - } #ifndef DEADLINE_SCHEDULER @@ -1644,15 +1665,21 @@ int main( int argc, char **argv ) openair0_cfg[0].log_level = glog_level; - mac_xface = malloc(sizeof(MAC_xface)); + int eMBMS_active=0; - - l2_init(frame_parms[0],eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL, - 0,// cba_group_active - 0); // HO flag - - mac_xface->macphy_exit = &exit_fun; + if (node_function[0] >=NGFI_RAU_IF4p5) { // don't initialize L2 for RRU + mac_xface = malloc(sizeof(MAC_xface)); + l2_init(frame_parms[0],eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL, + 0,// cba_group_active + 0); // HO flag + mac_xface->macphy_exit = &exit_fun; + } + else if (node_function[0] == NGFI_RRU_IF4p5) { // Initialize PRACH in this case + + } + + #if defined(ENABLE_ITTI) @@ -1672,7 +1699,7 @@ int main( int argc, char **argv ) printf("Filling UE band info\n"); fill_ue_band_info(); mac_xface->dl_phy_sync_success (0, 0, 0, 1); - } else + } else if (node_function[0]>NGFI_RRU_IF4p5) mac_xface->mrbch_phy_sync_failure (0, 0, 0); } diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c index 583891f1ac..756d705870 100644 --- a/targets/SIMU/USER/init_lte.c +++ b/targets/SIMU/USER/init_lte.c @@ -70,6 +70,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX); LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL); LOG_I(PHY,"init eNB: Transmission mode %d\n", transmission_mode); + LOG_I(PHY,"init eNB: prach_config_index %d\n", frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex); for (i=0; i Date: Thu, 4 Aug 2016 01:14:33 +0200 Subject: [PATCH 23/28] modifications for RRC IF4p5 --- openair1/PHY/LTE_TRANSPORT/if4_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 26 ++++++++++++++++--- openair1/SCHED/phy_procedures_lte_eNb.c | 3 ++- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c | 12 +++++---- .../ETHERNET/USERSPACE/LIB/ethernet_lib.c | 8 ++++-- targets/RT/USER/lte-enb.c | 14 +++++----- 6 files changed, 45 insertions(+), 20 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 8f01fc5369..fb3e11780f 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -233,7 +233,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t } else if (*packet_type == IF4p5_PRACH) { // FIX: hard coded prach samples length - db_fulllength = 839*2; + db_fulllength = 840*2; memcpy((&rxsigF[0][0]), (int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t), diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 0adb8685f0..4d29ba55e7 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -1101,6 +1101,8 @@ void rx_prach(PHY_VARS_eNB *eNB, int fft_size,log2_ifft_size; uint8_t nb_ant_rx = 1; //eNB->frame_parms.nb_antennas_rx; + // int en; + for (aa=0; aacommon_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset]; } @@ -1299,7 +1301,12 @@ void rx_prach(PHY_VARS_eNB *eNB, // Adjust received rxsigF offset memmove((&rxsigF[0][k]), (&rxsigF[0][0]), - 839*2*sizeof(int16_t)); + 839*2*sizeof(int16_t)); + + //en = dB_fixed(signal_energy(&rxsigF[0][k],840)); + // if (en>60) + //printf("PRACH: Frame %d, Subframe %d => %d dB\n",eNB->proc.frame_rx,eNB->proc.subframe_rx,en); + } // in case of RCC and prach received rx_thread wakes up prach @@ -1470,9 +1477,22 @@ void rx_prach(PHY_VARS_eNB *eNB, // if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); }// antennas_rx #ifdef PRACH_DEBUG - write_output("prach_ifft0.m","prach_t0",prach_ifft[0],2048,1,1); + + if (en>40) { + k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; + + if (k<0) + k+=(eNB->frame_parms.ofdm_symbol_size); + + k*=12; + k+=13; + k*=2; + printf("Dumping prach, k = %d (n_ra_prb %d)\n",k,n_ra_prb); + write_output("rxsigF.m","prach_rxF",&rxsigF[0][k],840,1,1); + write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); + write_output("prach_ifft0.m","prach_t0",prach_ifft[0],1024,1,1); + } #endif - // write_output("prach_ifft1.m","prach_t1",prach_ifft[1],2048,1,1); } // new dft diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 6bf9273776..8385d97f41 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1949,13 +1949,14 @@ void prach_procedures(PHY_VARS_eNB *eNB) { update_TA = 1; break; } - + mac_xface->initiate_ra_proc(eNB->Mod_id, eNB->CC_id, frame, preamble_max, preamble_delay_list[preamble_max]*update_TA, 0,subframe,0); + } } else { diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c index 02ca6ee7eb..0b73324080 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c @@ -274,7 +274,7 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi if (bytes_received ==-1) { eth->num_rx_errors++; - perror("ETHERNET READ: "); + perror("ETHERNET IF5 READ: "); exit(-1); } else { /* store the timestamp value from packet's header */ @@ -314,14 +314,15 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam ssize_t packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t; IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0] + MAC_HEADER_SIZE_BYTES); - + + bytes_received = recv(eth->sockfd[Mod_id], buff[0], packet_size, MSG_PEEK); if (bytes_received ==-1) { eth->num_rx_errors++; - perror("ETHERNET READ: "); + perror("ETHERNET IF4p5 READ (header): "); exit(-1); } @@ -334,7 +335,8 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam } else { packet_size = RAW_IF4p5_PRACH_SIZE_BYTES; } - + + while(bytes_received < packet_size) { bytes_received = recv(eth->sockfd[Mod_id], buff[0], @@ -342,7 +344,7 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam 0); if (bytes_received ==-1) { eth->num_rx_errors++; - perror("ETHERNET READ: "); + perror("ETHERNET IF4p5 READ (payload): "); exit(-1); } else { eth->rx_actual_nsamps = bytes_received>>1; diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c index d530558816..38a6d5a571 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c @@ -63,6 +63,7 @@ int trx_eth_start(openair0_device *device) { /* initialize socket */ if (eth->flags == ETH_RAW_MODE) { + printf("Setting ETHERNET to ETH_RAW_IF5_MODE\n"); if (eth_socket_init_raw(device)!=0) return -1; /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ if (device->host_type == BBU_HOST) { @@ -74,6 +75,8 @@ int trx_eth_start(openair0_device *device) { if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1; if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1; } else if (eth->flags == ETH_RAW_IF4p5_MODE) { + + printf("Setting ETHERNET to ETH_RAW_IF4p5_MODE\n"); if (eth_socket_init_raw(device)!=0) return -1; /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ if (device->host_type == BBU_HOST) { @@ -83,12 +86,13 @@ int trx_eth_start(openair0_device *device) { } /* adjust MTU wrt number of samples per packet */ if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1; - if(ethernet_tune (device,RCV_TIMEOUT,5000)!=0) return -1; + if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1; } else if (eth->flags == ETH_UDP_IF4p5_MODE) { - + printf("Setting ETHERNET to UDP_IF4p5_MODE\n"); } else if (eth->flags == ETH_RAW_IF5_MOBIPASS) { + printf("Setting ETHERNET to RAW_IF5_MODE\n"); if (eth_socket_init_raw(device)!=0) return -1; /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ //if (device->host_type == BBU_HOST) { diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index b0d1eb3d0e..231b1bceb0 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -975,7 +975,7 @@ void rx_fh_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame, int *subframe) { } -void rx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *subframe,int *frame) { +void rx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *frame,int *subframe) { LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; @@ -988,27 +988,25 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,eNB_proc_t *proc,int *subframe,int *frame) { symbol_mask = 0; symbol_mask_full = (1<symbols_per_tti)-1; prach_rx = 0; - + do { // Blocking, we need a timeout on this !!!!!!!!!!!!!!!!!!!!!!! - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 ); recv_IF4p5(eNB, &proc->frame_rx, &proc->subframe_rx, &packet_type, &symbol_number); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 ); - if (packet_type == IF4p5_PULFFT) { symbol_mask = symbol_mask | (1<frame_rx, proc->subframe_rx)>0) ? 1 : 0; } else if (packet_type == IF4p5_PRACH) { prach_rx = 0; } + } while( (symbol_mask != symbol_mask_full) || (prach_rx == 1)); if (proc->first_rx == 0) { if (proc->subframe_rx != *subframe){ - LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe); + LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,*subframe); exit_fun("Exiting"); } if (proc->frame_rx != *frame) { - LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame); + LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,*frame); exit_fun("Exiting"); } } else { @@ -1271,7 +1269,7 @@ static void* eNB_thread_FH( void* param ) { // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices while (!oai_exit) { - + if (oai_exit) break; if (subframe==9) { From 626583c159d970e09bc97194b8a50fa8442466d8 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 4 Aug 2016 16:14:21 +0200 Subject: [PATCH 24/28] updated handler for ctrl-C to sync filesystem --- cmake_targets/tools/build_helper | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 40dd63bf27..4738acb7f3 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -1,4 +1,4 @@ -################################################################################ + ################################################################################ # # Copyright (c) 2015, EURECOM (www.eurecom.fr) # All rights reserved. @@ -458,6 +458,8 @@ CURPID=$$ ppid=$$ arraycounter=1 echo_info "** Trapped CTRL-C. Killing all subprocesses now..." +echo_info "** Calling sync now..." +sync while true do FORLOOP=FALSE From 1ec0c5bf63e6b9a4f6e3fd79eda5fd9897205119 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 4 Aug 2016 16:41:14 +0200 Subject: [PATCH 25/28] modifications for EXMIMO2 targets --- openair1/PHY/INIT/lte_init.c | 13 +- openair1/PHY/defs.h | 3 + openair1/SCHED/phy_procedures_lte_eNb.c | 7 ++ .../ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c | 26 ++-- .../CONF/enb.band38.tm1.exmimo2.conf | 7 +- .../CONF/enb.band7.exmimo2.conf | 3 + targets/RT/USER/lte-enb.c | 19 +-- targets/RT/USER/lte-softmodem.c | 114 +++++++++--------- targets/RT/USER/lte-ue.c | 80 ++++++------ 9 files changed, 152 insertions(+), 120 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index d583381781..2fa9c36d69 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -43,10 +43,6 @@ #include "assertions.h" #include -#ifdef EXMIMO -extern openair0_rf_map rf_map[MAX_NUM_CCs]; -#endif - extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map4[138]; uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10}; @@ -672,7 +668,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, int CC_id) { - //PHY_VARS_eNB *eNB = PHY_vars_eNB_g[Mod_id][CC_id]; + uint8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][0]); struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; //struct RadioResourceConfigCommonSCell_r10 *physicalConfigCommonSCell_r10 = sCellToAddMod_r10->radioResourceConfigCommonSCell_r10; @@ -682,13 +678,14 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, #ifdef EXMIMO #ifdef DRIVER2013 - exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[rf_map[CC_id].card].exmimo_config_ptr; + // exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[rf_map[CC_id].card].exmimo_config_ptr; #endif #endif if ((dl_CarrierFreq_r10>=36000) && (dl_CarrierFreq_r10<=36199)) { carrier_freq_local = 1900000000 + (dl_CarrierFreq_r10-36000)*100000; //band 33 from 3GPP 36.101 v 10.9 Table 5.7.3-1 LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); + /* #ifdef EXMIMO #ifdef DRIVER2013 //carrier_freq[CC_id] = carrier_freq_local; @@ -700,11 +697,12 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, p_exmimo_config->rf.rf_local[rf_map[CC_id].chain] = 8255063; //this should be taken form calibration file p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = B19G_TDD; #endif -#endif +#endif*/ } else if ((dl_CarrierFreq_r10>=6150) && (dl_CarrierFreq_r10<=6449)) { carrier_freq_local = 832000000 + (dl_CarrierFreq_r10-6150)*100000; //band 20 from 3GPP 36.101 v 10.9 Table 5.7.3-1 // this is actually for the UL only, but we use it for DL too, since there is no TDD mode for this band LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); +/* #ifdef EXMIMO #ifdef DRIVER2013 //carrier_freq[CC_id] = carrier_freq_local; @@ -717,6 +715,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = DD_TDD; #endif #endif +*/ } else { LOG_E(PHY,"[eNB %d] Frame %d: ARFCN %d of SCell %d for UE %d not supported\n",Mod_id,/*eNB->frame*/0,dl_CarrierFreq_r10,CC_id,UE_id); } diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 9b5db4b421..46679c7f7c 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -363,6 +363,7 @@ typedef struct PHY_VARS_eNB_s { eNB_proc_t proc; eNB_func_t node_function; eNB_timing_t node_timing; + openair0_rf_map rf_map; int abstraction_flag; void (*do_prach)(struct PHY_VARS_eNB_s *eNB); void (*fep)(struct PHY_VARS_eNB_s *eNB); @@ -579,6 +580,8 @@ typedef struct { uint8_t Mod_id; /// \brief Component carrier ID for this PHY instance uint8_t CC_id; + /// \brief Mapping of CC_id antennas to cards + openair0_rf_map rf_map; //uint8_t local_flag; /// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach) runmode_t mode; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 6fcd41ec28..164c21ce21 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1107,6 +1107,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, uint8_t smbv_alloc_cnt = 1; #endif + if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_DL)) return; + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),1); start_meas(&eNB->phy_proc_tx); @@ -2582,11 +2584,14 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){ eNB_proc_t *proc = &eNB->proc; + LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; const int subframe = proc->subframe_rx; const int frame = proc->frame_rx; + if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return; + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 1 ); start_meas(&eNB->phy_proc_rx); @@ -2620,6 +2625,8 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const const int subframe = proc->subframe_rx; const int frame = proc->frame_rx; + if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return; + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 1 ); start_meas(&eNB->phy_proc_rx); #ifdef DEBUG_PHY_PROC diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c index 736e126ccb..17a1d18ce6 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c @@ -501,6 +501,7 @@ int trx_exmimo_start(openair0_device *device) { printf("Starting ...\n"); openair0_config(device->openair0_cfg,0); openair0_start_rt_acquisition(0); + printf("Setting state to running\n"); exm->daq_state = running; exm->wait_first_read = 1; return(0); @@ -508,7 +509,8 @@ int trx_exmimo_start(openair0_device *device) { int trx_exmimo_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc, int flags) { - return(0); + + return(nsamps); } @@ -521,12 +523,12 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi struct timespec sleep_time; unsigned long tv_nsec; int i; - struct timespec wait; int n,n1,n2,ntot,first_len; int ret; - wait.tv_sec=0; - wait.tv_nsec=50000000L; + // struct timespec wait; + // wait.tv_sec=0; + // wait.tv_nsec=50000000L; if (exm->watchdog_exit == 1) return(0); @@ -535,7 +537,6 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi tv_nsec=(unsigned long)((double)(nsamps)*1e9/cfg->sample_rate); return(0); } - ret = pthread_mutex_timedlock(&exm->watchdog_mutex,&wait); switch (ret) { @@ -564,6 +565,9 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi return(0); break; } + + ret = pthread_mutex_lock(&exm->watchdog_mutex); + ts = exm->ts; if (exm->wait_first_read==1) { exm->wait_first_read=0; @@ -603,7 +607,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi printf("back\n"); #endif // get new timestamp, in case we have to sleep again - pthread_mutex_timedlock(&exm->watchdog_mutex,&wait); + pthread_mutex_lock(&exm->watchdog_mutex); ts = exm->ts; pthread_mutex_unlock(&exm->watchdog_mutex); if (old_ts == ts) { @@ -638,7 +642,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi } } } - pthread_mutex_timedlock(&exm->watchdog_mutex,&wait); + pthread_mutex_lock(&exm->watchdog_mutex); exm->last_ts_rx += n; pthread_mutex_unlock(&exm->watchdog_mutex); if (n==n1) { @@ -712,6 +716,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { exmimo_id_t *p_exmimo_id; int ret; exmimo_state_t *exm = (exmimo_state_t *)malloc(sizeof(exmimo_state_t)); + int card,ant; ret = openair0_open(); @@ -763,6 +768,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { device->priv = (void *)exm; + printf("EXMIMO2: Getting addresses for memory-mapped DMA\n"); + for (card=0; cardfirst_rx == 0) { if (proc->subframe_rx != *subframe){ - LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe); + LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,*subframe); exit_fun("Exiting"); } if (proc->frame_rx != *frame) { - LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame); + LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,*frame); exit_fun("Exiting"); } } else { @@ -1740,7 +1740,7 @@ void kill_eNB_proc(int inst) { Each rf chain is is addressed by the card number and the chain on the card. The rf_map specifies for each CC, on which rf chain the mapping should start. Multiple antennas are mapped to successive RF chains on the same card. */ -int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]) { +int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg) { int i, CC_id; int j; @@ -1808,17 +1808,17 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c for (i=0; inb_antennas_rx; i++) { free(phy_vars_eNB[CC_id]->common_vars.rxdata[0][i]); - rxdata[i] = (int32_t*)(32 + malloc16(32+openair0_cfg[rf_map[CC_id].card].samples_per_frame*sizeof(int32_t))); // FIXME broken memory allocation + rxdata[i] = (int32_t*)(32 + malloc16(32+openair0_cfg[phy_vars_eNB[CC_id]->rf_map.card].samples_per_frame*sizeof(int32_t))); // FIXME broken memory allocation phy_vars_eNB[CC_id]->common_vars.rxdata[0][i] = rxdata[i]-N_TA_offset; // N_TA offset for TDD FIXME! N_TA_offset > 16 => access of unallocated memory - memset(rxdata[i], 0, openair0_cfg[rf_map[CC_id].card].samples_per_frame*sizeof(int32_t)); + memset(rxdata[i], 0, openair0_cfg[phy_vars_eNB[CC_id]->rf_map.card].samples_per_frame*sizeof(int32_t)); printf("rxdata[%d] @ %p (%p) (N_TA_OFFSET %d)\n", i, phy_vars_eNB[CC_id]->common_vars.rxdata[0][i],rxdata[i],N_TA_offset); } for (i=0; inb_antennas_tx; i++) { free(phy_vars_eNB[CC_id]->common_vars.txdata[0][i]); - txdata[i] = (int32_t*)(32 + malloc16(32 + openair0_cfg[rf_map[CC_id].card].samples_per_frame*sizeof(int32_t))); // FIXME broken memory allocation + txdata[i] = (int32_t*)(32 + malloc16(32 + openair0_cfg[phy_vars_eNB[CC_id]->rf_map.card].samples_per_frame*sizeof(int32_t))); // FIXME broken memory allocation phy_vars_eNB[CC_id]->common_vars.txdata[0][i] = txdata[i]; - memset(txdata[i],0, openair0_cfg[rf_map[CC_id].card].samples_per_frame*sizeof(int32_t)); + memset(txdata[i],0, openair0_cfg[phy_vars_eNB[CC_id]->rf_map.card].samples_per_frame*sizeof(int32_t)); printf("txdata[%d] @ %p\n", i, phy_vars_eNB[CC_id]->common_vars.txdata[0][i]); } } @@ -2018,6 +2018,11 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst } } + if (setup_eNB_buffers(PHY_vars_eNB_g[inst],&openair0_cfg[inst])!=0) { + printf("Exiting, cannot initialize eNodeB Buffers\n"); + exit(-1); + } + init_eNB_proc(inst); } diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 38629b8ff4..4849e63807 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -118,13 +118,13 @@ unsigned short config_frames[4] = {2,9,11,13}; #endif // In lte-enb.c -extern int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]); +extern int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg); extern void init_eNB(eNB_func_t *, eNB_timing_t *,int,eth_params_t *); extern void stop_eNB(int); extern void kill_eNB_proc(void); // In lte-ue.c -extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]); +extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg); extern void fill_ue_band_info(void); extern void init_UE(int); @@ -177,7 +177,6 @@ static char threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -openair0_rf_map rf_map[MAX_NUM_CCs]; static char *conf_config_file_name = NULL; #if defined(ENABLE_ITTI) @@ -272,10 +271,10 @@ int16_t osa_log_verbosity = LOG_MED; #endif -#ifdef ETHERNET + char *rrh_UE_ip = "127.0.0.1"; int rrh_UE_port = 51000; -#endif + /* flag set by eNB conf file to specify if the radio head is local or remote (default option is local) */ uint8_t local_remote_radio = BBU_LOCAL_RADIO_HEAD; @@ -1704,60 +1703,7 @@ int main( int argc, char **argv ) mac_xface->mrbch_phy_sync_failure (0, 0, 0); } - number_of_cards = 1; - for(CC_id=0; CC_idhw_timing_advance = timing_advance; -#else - UE[CC_id]->hw_timing_advance = 160; -#endif - } - if (setup_ue_buffers(UE,&openair0_cfg[0],rf_map)!=0) { - printf("Error setting up eNB buffer\n"); - exit(-1); - } - - - - if (input_fd) { - printf("Reading in from file to antenna buffer %d\n",0); - if (fread(UE[0]->common_vars.rxdata[0], - sizeof(int32_t), - frame_parms[0]->samples_per_tti*10, - input_fd) != frame_parms[0]->samples_per_tti*10) - printf("error reading from file\n"); - } - //p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX; - } else { - - - - if (setup_eNB_buffers(PHY_vars_eNB_g[0],&openair0_cfg[0],rf_map)!=0) { - printf("Error setting up eNB buffer\n"); - exit(-1); - } - - printf("Setting eNB buffer to all-RX\n"); - - // Set LSBs for antenna switch (ExpressMIMO) - for (CC_id=0; CC_idhw_timing_advance = 0; - for (i=0; isamples_per_tti*10; i++) - for (aa=0; aanb_antennas_tx; aa++) - PHY_vars_eNB_g[0][CC_id]->common_vars.txdata[0][aa][i] = 0x00010001; - } - } mlockall(MCL_CURRENT | MCL_FUTURE); @@ -1829,6 +1775,58 @@ int main( int argc, char **argv ) if (UE_flag == 1) init_UE(1); else init_eNB(node_function,node_timing,1,eth_params); // Sleep to allow all threads to setup + + number_of_cards = 1; + + for(CC_id=0; CC_idrf_map.card=0; + PHY_vars_eNB_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; + } + + // connect the TX/RX buffers + if (UE_flag==1) { + + for (CC_id=0;CC_idhw_timing_advance = timing_advance; +#else + UE[CC_id]->hw_timing_advance = 160; +#endif + } + if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) { + printf("Error setting up eNB buffer\n"); + exit(-1); + } + + + + if (input_fd) { + printf("Reading in from file to antenna buffer %d\n",0); + if (fread(UE[0]->common_vars.rxdata[0], + sizeof(int32_t), + frame_parms[0]->samples_per_tti*10, + input_fd) != frame_parms[0]->samples_per_tti*10) + printf("error reading from file\n"); + } + //p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX; + } else { + + + + + + printf("Setting eNB buffer to all-RX\n"); + + // Set LSBs for antenna switch (ExpressMIMO) + for (CC_id=0; CC_idhw_timing_advance = 0; + for (i=0; isamples_per_tti*10; i++) + for (aa=0; aanb_antennas_tx; aa++) + PHY_vars_eNB_g[0][CC_id]->common_vars.txdata[0][aa][i] = 0x00010001; + } + } sleep(3); diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 3fda5d735f..88bce26d6c 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -104,7 +104,6 @@ extern int sync_var; extern openair0_config_t openair0_cfg[MAX_CARDS]; extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -extern openair0_rf_map rf_map[MAX_NUM_CCs]; extern int oai_exit; extern int32_t **rxdata; @@ -1559,56 +1558,59 @@ void fill_ue_band_info(void) } #endif -int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]) +int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg) { int i, CC_id; LTE_DL_FRAME_PARMS *frame_parms; - - for (CC_id=0; CC_idframe_parms); - } else { - printf("phy_vars_UE[%d] not initialized\n", CC_id); - return(-1); - } + openair0_rf_map *rf_map; - /* - if (frame_parms->frame_type == TDD) { - if (frame_parms->N_RB_DL == 100) + for (CC_id=0; CC_idrf_map; + + if (phy_vars_ue[CC_id]) { + frame_parms = &(phy_vars_ue[CC_id]->frame_parms); + } else { + printf("phy_vars_UE[%d] not initialized\n", CC_id); + return(-1); + } + + /* + if (frame_parms->frame_type == TDD) { + if (frame_parms->N_RB_DL == 100) N_TA_offset = 624; else if (frame_parms->N_RB_DL == 50) - N_TA_offset = 624/2; + N_TA_offset = 624/2; else if (frame_parms->N_RB_DL == 25) - N_TA_offset = 624/4; - } - */ - + N_TA_offset = 624/4; + } + */ + // replace RX signal buffers with mmaped HW versions - rxdata = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) ); - txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) ); - - for (i=0; inb_antennas_rx; i++) { - printf( "Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map[CC_id].card, rf_map[CC_id].chain+i ); - free( phy_vars_ue[CC_id]->common_vars.rxdata[i] ); + rxdata = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) ); + txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) ); + + for (i=0; inb_antennas_rx; i++) { + printf( "Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map->card, rf_map->chain+i ); + free( phy_vars_ue[CC_id]->common_vars.rxdata[i] ); rxdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) ); phy_vars_ue[CC_id]->common_vars.rxdata[i] = rxdata[i]; // what about the "-N_TA_offset" ? // N_TA offset for TDD printf("rxdata[%d] : %p\n",i,rxdata[i]); - } - - for (i=0; inb_antennas_tx; i++) { - printf( "Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map[CC_id].card, rf_map[CC_id].chain+i ); - free( phy_vars_ue[CC_id]->common_vars.txdata[i] ); - txdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) ); - phy_vars_ue[CC_id]->common_vars.txdata[i] = txdata[i]; - printf("txdata[%d] : %p\n",i,txdata[i]); - } - - // rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x] - // txdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.txdata[x] - // be careful when releasing memory! - // because no "release_ue_buffers"-function is available, at least rxdata and txdata memory will leak (only some bytes) - + } + + for (i=0; inb_antennas_tx; i++) { + printf( "Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map->card, rf_map->chain+i ); + free( phy_vars_ue[CC_id]->common_vars.txdata[i] ); + txdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) ); + phy_vars_ue[CC_id]->common_vars.txdata[i] = txdata[i]; + printf("txdata[%d] : %p\n",i,txdata[i]); + } + + // rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x] + // txdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.txdata[x] + // be careful when releasing memory! + // because no "release_ue_buffers"-function is available, at least rxdata and txdata memory will leak (only some bytes) + } return 0; From 6e1d81bef32f7e6a9002b8a5f363b32cb7f31db0 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 4 Aug 2016 18:19:54 +0200 Subject: [PATCH 26/28] band 38 tx gain exmimo2 --- .../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf index d4300301f8..3c608776d6 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf @@ -38,7 +38,7 @@ eNBs = Nid_cell_mbsfn = 0; nb_antennas_tx = 1; nb_antennas_rx = 1; - tx_gain = 25; + tx_gain = 10;//25; rx_gain = 120; prach_root = 0; prach_config_index = 0; From 3608e5bc9e84bb0b95ab2181b628abc40ad0df15 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 4 Aug 2016 19:13:48 +0200 Subject: [PATCH 27/28] Gitlab CI: fix for 20MHz tests --- cmake_targets/autotests/test_case_list.xml | 112 ++++++++++++--------- 1 file changed, 62 insertions(+), 50 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index e50c651fa3..11a0c172db 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -10,7 +10,7 @@ sudo -S -E /opt/ltebox/tools/stop_ltebox $OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py --reset-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py --stop-ue; uname -a; sudo -E dmesg 36000 - 010141 0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015514 015517 015602 015605 015702 015705 015802 015805 015808 015811 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 025502 025505 025508 025511 + 010141 0102+ 010304 010305 0104+ 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 3 mozart tique stevens amerique @@ -1078,7 +1078,7 @@ lte-softmodem - calisson + tique stevens amerique 390 @@ -1090,15 +1090,16 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -32 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -1120,7 +1121,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 14M -B 192.172.0.2 @@ -1298,7 +1299,7 @@ lte-softmodem - calisson + tique stevens amerique 390 @@ -1312,13 +1313,14 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -32 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -1340,9 +1342,9 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m - throughput_test min=0.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec + throughput_test min=0.0Mbits/sec max=10.0Mbits/sec average=10.0Mbits/sec False sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue @@ -1361,7 +1363,7 @@ /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 10Mbits/s + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 33M -i 1 -f m -u False @@ -1966,7 +1968,7 @@ lte-softmodem - calisson + tique stevens amerique 390 @@ -1980,13 +1982,14 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -32 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -2186,7 +2189,7 @@ lte-softmodem - calisson + tique stevens amerique 390 @@ -2200,13 +2203,14 @@ targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -32 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -3485,6 +3489,7 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf pdsch_referenceSignalPower -23 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_tx 1 @@ -3513,7 +3518,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 10; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 17Mbits/s -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 17Mbits/s @@ -3699,6 +3704,7 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf pdsch_referenceSignalPower -23 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_tx 1 @@ -3747,7 +3753,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 10Mbits/s + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -u -c 192.172.0.2 -b 33Mbits/s False @@ -3913,6 +3919,7 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf pdsch_referenceSignalPower -23 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_tx 1 @@ -4127,6 +4134,7 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf pdsch_referenceSignalPower -23 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf nb_antennas_tx 1 @@ -4175,7 +4183,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 75 lo -c 192.172.0.2 + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 False @@ -7156,7 +7164,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -7168,15 +7176,16 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -29 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -7198,7 +7207,7 @@ c sleep 50; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py --start-ue - $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script_phone 1 YT9115PX1E -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script_phone 1 YT9115PX1E -u -c 192.172.0.1 -b 14Mbits/s -B 192.172.0.2 @@ -7378,7 +7387,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -7390,15 +7399,16 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -29 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -7441,7 +7451,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 40Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 10 192.172.0.2 -c 192.172.0.2 -b 33M -i 1 -f m -u False @@ -7601,7 +7611,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -7613,15 +7623,16 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -29 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -7823,7 +7834,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -7835,15 +7846,16 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf downlink_frequency 2660000000L targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf pdsch_referenceSignalPower -29 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf tx_gain 90 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf rx_gain 125 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c From 8014a94020693ba21f0ed3a53d399af12da1e271 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 5 Aug 2016 09:58:57 +0200 Subject: [PATCH 28/28] IF4p5 with UDP. --- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c | 19 +--- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c | 103 +++++++++++++++++- .../ETHERNET/USERSPACE/LIB/ethernet_lib.c | 41 ++++--- .../ETHERNET/USERSPACE/LIB/ethernet_lib.h | 5 +- targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h | 3 + 5 files changed, 133 insertions(+), 38 deletions(-) diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c index cfff2158a7..126030d3d4 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c @@ -65,23 +65,18 @@ int eth_socket_init_raw(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; int Mod_id = device->Mod_id; const char *local_mac, *remote_mac; - int local_port=0, remote_port=0; int sock_dom=0; int sock_type=0; int sock_proto=0; if (device->host_type == RRH_HOST ) { /* RRH doesn't know remote MAC(will be retrieved from first packet send from BBU) and remote port(don't care) */ local_mac = device->openair0_cfg->my_addr; - local_port = device->openair0_cfg->my_port; remote_mac = malloc(ETH_ALEN); - memset(remote_mac,0,ETH_ALEN); - remote_port = 0; + memset((void*)remote_mac,0,ETH_ALEN); printf("[%s] local MAC addr %s remote MAC addr %s\n","RRH", local_mac,remote_mac); } else { local_mac = device->openair0_cfg->my_addr; - local_port = device->openair0_cfg->my_port; remote_mac = device->openair0_cfg->remote_addr; - remote_port = device->openair0_cfg->remote_port; printf("[%s] local MAC addr %s remote MAC addr %s\n","BBU", local_mac,remote_mac); } @@ -182,7 +177,7 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi printf("------- TX ------: nu=%x an_id=%d ts%d bytes_sent=%d\n", *(uint8_t *)(buff2+ETH_ALEN), *(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t)), - *(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)), + *(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)), bytes_sent); dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, RAW_PACKET_SIZE_BYTES(nsamps), TX_FLAG); #endif @@ -343,10 +338,10 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam buff[0], packet_size, 0); - if (bytes_received ==-1) { - eth->num_rx_errors++; - perror("ETHERNET IF4p5 READ (payload): "); - exit(-1); + if (bytes_received ==-1) { + eth->num_rx_errors++; + perror("ETHERNET IF4p5 READ (payload): "); + exit(-1); } else { eth->rx_actual_nsamps = bytes_received>>1; eth->rx_count++; @@ -425,7 +420,6 @@ int eth_get_dev_conf_raw(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; int Mod_id = device->Mod_id; - char str[INET_ADDRSTRLEN]; void *msg; ssize_t msg_len; @@ -456,7 +450,6 @@ int eth_get_dev_conf_raw_IF4p5(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; int Mod_id = device->Mod_id; - char str[INET_ADDRSTRLEN]; void *msg; ssize_t msg_len; diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c index a9706c73bd..863b0d02d2 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c @@ -63,7 +63,7 @@ uint16_t pck_seq_num = 1; uint16_t pck_seq_num_cur=0; uint16_t pck_seq_num_prev=0; - int eth_socket_init_udp(openair0_device *device) { +int eth_socket_init_udp(openair0_device *device) { int i = 0; eth_state_t *eth = (eth_state_t*)device->priv; @@ -138,6 +138,103 @@ uint16_t pck_seq_num_prev=0; return 0; } +int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) { + + // Read nblocks info from packet itself + int nblocks = nsamps; + int bytes_received=0; + eth_state_t *eth = (eth_state_t*)device->priv; + int Mod_id = device->Mod_id; + + ssize_t packet_size = sizeof_IF4p5_header_t; + IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0]); + + + bytes_received = recvfrom(eth->sockfd[Mod_id], + buff[0], + packet_size, + 0, + (struct sockaddr *)&dest_addr[Mod_id], + (socklen_t *)&addr_len[Mod_id]); + + if (bytes_received ==-1) { + eth->num_rx_errors++; + perror("ETHERNET IF4p5 READ (header): "); + exit(-1); + } + + *timestamp = test_header->sub_type; + + if (test_header->sub_type == IF4p5_PDLFFT) { + packet_size = UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks); + } else if (test_header->sub_type == IF4p5_PULFFT) { + packet_size = UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks); + } else { + packet_size = UDP_IF4p5_PRACH_SIZE_BYTES; + } + + + while(bytes_received < packet_size) { + bytes_received = recvfrom(eth->sockfd[Mod_id], + buff[0], + packet_size, + 0, + (struct sockaddr *)&dest_addr[Mod_id], + (socklen_t *)&addr_len[Mod_id]); + if (bytes_received ==-1) { + eth->num_rx_errors++; + perror("ETHERNET IF4p5 READ (payload): "); + exit(-1); + } else { + eth->rx_actual_nsamps = bytes_received>>1; + eth->rx_count++; + } + } + + eth->rx_nsamps = nsamps; + return(bytes_received); +} + +int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) { + + int nblocks = nsamps; + int bytes_sent = 0; + + eth_state_t *eth = (eth_state_t*)device->priv; + int Mod_id = device->Mod_id; + + ssize_t packet_size; + + if (flags == IF4p5_PDLFFT) { + packet_size = UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks); + } else if (flags == IF4p5_PULFFT) { + packet_size = UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks); + } else { + printf("trx_eth_write_udp_IF4p5: unknown flags %d\n",flags); + return(-1); + } + + eth->tx_nsamps = nblocks; + + bytes_sent = sendto(eth->sockfd[Mod_id], + buff[0], + packet_size, + 0, + (struct sockaddr*)&dest_addr[Mod_id], + addr_len[Mod_id]); + + if (bytes_sent == -1) { + eth->num_tx_errors++; + perror("ETHERNET WRITE: "); + exit(-1); + } else { + eth->tx_actual_nsamps = bytes_sent>>1; + eth->tx_count++; + } + + return (bytes_sent); +} + int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags) { int bytes_sent=0; @@ -216,7 +313,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi int bytes_received=0; eth_state_t *eth = (eth_state_t*)device->priv; - openair0_timestamp prev_timestamp = -1; + // openair0_timestamp prev_timestamp = -1; int Mod_id = device->Mod_id; int rcvfrom_flag =0; int block_cnt=0; @@ -298,7 +395,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi pck_seq_num_cur = *(uint16_t *)buff2; //printf("cur=%d prev=%d buff=%d\n",pck_seq_num_cur,pck_seq_num_prev,*(uint16_t *)(buff2)); if ( ( pck_seq_num_cur != (pck_seq_num_prev + 1) ) && !((pck_seq_num_prev==75) && (pck_seq_num_cur==1 ))){ - printf("out of order packet received1! %d|%d|%d\n",pck_seq_num_cur,pck_seq_num_prev, *timestamp); + printf("out of order packet received1! %d|%d|%d\n",pck_seq_num_cur,pck_seq_num_prev,(int)*timestamp); } VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,pck_seq_num_cur); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,pck_seq_num_prev); diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c index e5d606f2d7..6079781ba1 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c @@ -90,19 +90,15 @@ int trx_eth_start(openair0_device *device) { if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1; } else if (eth->flags == ETH_UDP_IF4p5_MODE) { printf("Setting ETHERNET to UDP_IF4p5_MODE\n"); - + if (eth_socket_init_udp(device)!=0) return -1; + if (device->host_type == BBU_HOST) { + if(eth_set_dev_conf_udp(device)!=0) return -1; + } else { + if(eth_get_dev_conf_udp(device)!=0) return -1; + } } else if (eth->flags == ETH_RAW_IF5_MOBIPASS) { printf("Setting ETHERNET to RAW_IF5_MODE\n"); if (eth_socket_init_raw(device)!=0) return -1; - /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ - //if (device->host_type == BBU_HOST) { - //if(eth_set_dev_conf_raw_IF4p5(device)!=0) return -1; - //} else { - //if(eth_get_dev_conf_raw_IF4p5(device)!=0) return -1; -// - /* adjust MTU wrt number of samples per packet */ - // if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1; - } else { if (eth_socket_init_udp(device)!=0) return -1; /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ @@ -171,7 +167,7 @@ int trx_eth_reply(openair0_device *device, void *msg, ssize_t msg_len) { -int trx_eth_stop(int card) { +int trx_eth_stop(openair0_device *device) { return(0); } @@ -199,11 +195,11 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { struct timeval timeout; struct ifreq ifr; char system_cmd[256]; - char* if_name=DEFAULT_IF; - struct in_addr ia; - struct if_nameindex *ids; + // char* if_name=DEFAULT_IF; + // struct in_addr ia; + // struct if_nameindex *ids; int ret=0; - int i=0; + // int i=0; /****************** socket level options ************************/ switch(option) { @@ -238,7 +234,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { (char *)&timeout,sizeof(timeout))) { perror("[ETHERNET] setsockopt()"); } else { - printf( "receive timeout= %u usec\n",timeout.tv_usec); + printf( "receive timeout= %u usec\n",(unsigned int)timeout.tv_usec); } break; @@ -251,7 +247,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { (char *)&timeout,sizeof(timeout))) { perror("[ETHERNET] setsockopt()"); } else { - printf( "send timeout= %d,%d sec\n",timeout.tv_sec,timeout.tv_usec); + printf( "send timeout= %d,%d sec\n",(int)timeout.tv_sec,(int)timeout.tv_usec); } break; @@ -311,7 +307,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { break; case RING_PAR: - ret=snprintf(system_cmd,sizeof(system_cmd),"ethtool -G %s rx %d tx %d",eth->if_name[Mod_id],value); + ret=snprintf(system_cmd,sizeof(system_cmd),"ethtool -G %s val %d",eth->if_name[Mod_id],value); if (ret > 0) { ret=system(system_cmd); if (ret == -1) { @@ -376,6 +372,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth } else if (eth->flags == ETH_RAW_IF4p5_MODE) { device->trx_write_func = trx_eth_write_raw_IF4p5; device->trx_read_func = trx_eth_read_raw_IF4p5; + } else if (eth->flags == ETH_UDP_IF4p5_MODE) { + device->trx_write_func = trx_eth_write_udp_IF4p5; + device->trx_read_func = trx_eth_read_udp_IF4p5; } else if (eth->flags == ETH_RAW_IF5_MOBIPASS) { device->trx_write_func = trx_eth_write_raw_IF4p5; device->trx_read_func = trx_eth_read_raw_IF4p5; @@ -460,7 +459,7 @@ void dump_dev(openair0_device *device) { device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate); printf(" BBU configured for %i tx/%i rx channels)\n", device->openair0_cfg->tx_num_channels,device->openair0_cfg->rx_num_channels); - printf(" Running flags: %s %s %s\n", + printf(" Running flags: %s %s (\n", ((eth->flags & ETH_RAW_MODE) ? "RAW socket mode - ":""), ((eth->flags & ETH_UDP_MODE) ? "UDP socket mode - ":"")); printf(" Number of iqs dumped when displaying packets: %i\n\n",eth->iqdumpcnt); @@ -470,14 +469,14 @@ void dump_dev(openair0_device *device) { void inline dump_txcounters(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg->Mod_id); - printf(" Sent packets: %llu send errors: %i\n", eth->tx_count, eth->num_tx_errors); + printf(" Sent packets: %llu send errors: %i\n", (long long unsigned int)eth->tx_count, eth->num_tx_errors); } void inline dump_rxcounters(openair0_device *device) { eth_state_t *eth = (eth_state_t*)device->priv; printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg->Mod_id); - printf(" Received packets: %llu missed packets errors: %i\n", eth->rx_count, eth->num_underflows); + printf(" Received packets: %llu missed packets errors: %i\n", (long long unsigned int)eth->rx_count, eth->num_underflows); } void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag, int nsamps) { diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h index 3adb0f45cb..0d80dbd023 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h @@ -176,9 +176,10 @@ typedef struct { void dump_packet(char *title, unsigned char* pkt, int bytes, unsigned int tx_rx_flag); unsigned short calc_csum (unsigned short *buf, int nwords); void dump_dev(openair0_device *device); -void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag,int nsamps); +/*void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag,int nsamps); void inline dump_rxcounters(openair0_device *device); void inline dump_txcounters(openair0_device *device); +*/ void dump_iqs(char * buff, int iq_cnt); @@ -224,6 +225,8 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc); int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags); int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc); +int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags); +int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc); int eth_get_dev_conf_raw(openair0_device *device); int eth_set_dev_conf_raw(openair0_device *device); int eth_get_dev_conf_raw_IF4p5(openair0_device *device); diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h b/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h index e118e9f99f..855ff49704 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h @@ -65,6 +65,9 @@ #define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES) +#define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) +#define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) +#define UDP_IF4p5_PRACH_SIZE_BYTES (sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES) // Mobipass packet sizes #define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280