Commit 402bd21b authored by laurent's avatar laurent

merge harmony

parents 55b3b262 6599d1c9
......@@ -34,4 +34,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
when: manual
......@@ -42,6 +42,7 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project (OpenAirInterface)
#add_definitions("-DEMIT_ASN_DEBUG=1")
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C)
......@@ -178,7 +179,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
# these changes are related to hardcoded path to include .h files
add_definitions(-DCMAKER)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
set(GIT_BRANCH "UNKNOWN")
......@@ -547,7 +548,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp)
LINK_DIRECTORIES("/opt/lib")
set(option_HW_lib "-luhd -rdynamic -ldl")
set(option_HW_lib "-luhd -rdynamic -ldl -lboost_system")
elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
......@@ -1635,7 +1636,6 @@ target_link_libraries (lte-softmodem -ldl
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB})
......@@ -1670,7 +1670,6 @@ target_link_libraries (lte-softmodem-nos1
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} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
......@@ -1693,7 +1692,7 @@ target_link_libraries(rrh_gw
UTIL LFDS
-Wl,--end-group )
target_link_libraries (rrh_gw rt pthread m )
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} -lboost_system ) #Added manually as it is not found for some reason for USRP
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib})
target_link_libraries (rrh_gw ${LIB_LMS_LIBRARIES})
target_link_libraries (rrh_gw ${T_LIB})
......
......@@ -104,25 +104,31 @@ Obj.# Case# Test# Description
01 51 06 mbmssim (TBD)
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2)
01 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 12 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 13 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 14 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 15 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 16 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 17 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -140,7 +146,7 @@ Obj.# Case# Test# Description
01 57 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX(TM2)
01 58 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
......@@ -153,6 +159,18 @@ Obj.# Case# Test# Description
01 58 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
......@@ -165,7 +183,7 @@ Obj.# Case# Test# Description
01 60 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 60 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX, 2TX/2RX
01 61 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 61 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 61 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -183,7 +201,7 @@ Obj.# Case# Test# Description
01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX
01 65 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 65 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 65 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -225,7 +243,7 @@ Obj.# Case# Test# Description
01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for 1TX/1RX and 2TX/2RX (TM2)
02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
......@@ -238,7 +256,18 @@ Obj.# Case# Test# Description
02 55 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 64 lte-softmodem-noS1 tests
......
......@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'sudo -E killall -9 -q -r ' + programList
cmd = 'sudo -E killall -s INT -q -r ' + programList + ' ; sleep 5 ; sudo -E killall -9 -q -r ' + programList
result = oai.send(cmd, True)
print "Killing old programs..." + result
programArray = programList.split()
......@@ -588,7 +588,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
RRH_pre_exec_args = testcase.findtext('RRH_pre_exec_args',default='')
RRH_main_exec = testcase.findtext('RRH_main_exec',default='')
RRH_main_exec_args = testcase.findtext('RRH_main_exec_args',default='')
RRH_terminate_missing_procs = testcase.findtext('RRH_terminate_missing_procs',default='True')
RRH_terminate_missing_procs = testcase.findtext('RRH_terminate_missing_procs',default='False')
eNBMachine = testcase.findtext('eNB',default='')
......@@ -601,7 +601,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
eNB_main_exec_args = testcase.findtext('eNB_main_exec_args',default='')
eNB_traffic_exec = testcase.findtext('eNB_traffic_exec',default='')
eNB_traffic_exec_args = testcase.findtext('eNB_traffic_exec_args',default='')
eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='True')
eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='False')
eNB_search_expr_true = testcase.findtext('eNB_search_expr_true','')
if re.compile('\w+').match(eNB_search_expr_true) != None:
eNB_search_expr_true = eNB_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's'
......@@ -616,7 +616,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
UE_main_exec_args = testcase.findtext('UE_main_exec_args',default='')
UE_traffic_exec = testcase.findtext('UE_traffic_exec',default='')
UE_traffic_exec_args = testcase.findtext('UE_traffic_exec_args',default='')
UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='True')
UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='False')
UE_search_expr_true = testcase.findtext('UE_search_expr_true','')
UE_stop_script = testcase.findtext('UE_stop_script','')
if re.compile('\w+').match(UE_search_expr_true) != None:
......@@ -637,7 +637,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
HSS_main_exec_args = testcase.findtext('HSS_main_exec_args',default='')
EPC_traffic_exec = testcase.findtext('EPC_traffic_exec',default='')
EPC_traffic_exec_args = testcase.findtext('EPC_traffic_exec_args',default='')
EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='True')
EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='False')
EPC_search_expr_true = testcase.findtext('EPC_search_expr_true','')
if re.compile('\w+').match(EPC_search_expr_true) != None:
EPC_search_expr_true = EPC_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's'
......@@ -1304,6 +1304,8 @@ logdirOpenaircnRepo = logdir + 'openair-cn/'
if flag_remove_logdir == True:
print "Removing directory: " + locallogdir
os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir )
else:
os.system('mkdir -p ' + locallogdir)
paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log')
res=os.system(' echo > ' + paramiko_logfile)
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ def start_ue () :
time.sleep ( 2)
#Now we check if ppp0 interface is up and running
try:
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep 192.'
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep UP'
status, out = commands.getstatusoutput(cmd)
if (out == '') :
print "Waiting for UE to connect and get IP Address..."
......
......@@ -31,6 +31,26 @@
# \author Navid Nikaein, Rohit Gupta
# To free unused memory else test setup runs out of memory
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
mem_threshold=0.2 #If free memory is less than this threshold, then VM drop cache is called
mem_tot=`vmstat -s -S k |grep "total memory" | awk '{print $1}'`
mem_free=`vmstat -s -S k |grep "free memory" | awk '{print $1}'`
mem_frac=`bc <<< "scale=4;$mem_free/$mem_tot"`
echo $mem_frac
#mem_frac=`bc <<< "scale=4;`echo $mem_free`/`echo $mem_tot`"`
echo "Total Memory = $mem_tot k "
echo "Free Memory = $mem_free k"
echo "Fraction free memory = $mem_frac "
res=`bc <<< "$mem_frac < 0.2" `
echo "Comparison Result = $res"
if [ "$res" == "1" ]
then
echo "Free memory less than threshold = $mem_threshold"
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
fi
......@@ -48,7 +48,7 @@ PRINT_STATS="False"
VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="True" #Only valid when lowlatecy flag is set to False
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel10"
HW="None"
TP="None"
......@@ -332,7 +332,7 @@ function main() {
if [ "$HW" = "EXMIMO" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "ETHERNET" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_USRP" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
......
......@@ -233,7 +233,9 @@ check_install_additional_tools (){
wvdial \
python-numpy \
sshpass \
nscd
nscd \
bc \
ntp
$SUDO pip install paramiko
$SUDO pip install pyroute2
......
......@@ -257,6 +257,9 @@ function main()
ip rule add fwmark 1 table lte
ifconfig oip1 up
ip route add default dev oip1 table lte
# the actual IP address depends on the EPC/MME config file for address pool
ip route add from 192.188.0.0/24 table lte
ip route add to 192.188.0.0/24 table lte
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
......
#!/bin/sh
echo "building ctags for openair1 and openair2 ..."
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 targets
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common
......@@ -132,18 +132,18 @@ void log_map8(llr_t* systematic,
msg("log_map, frame_length %d\n",frame_length);
#endif
start_meas(gamma_stats) ;
if (gamma_stats) start_meas(gamma_stats) ;
compute_gamma8(m11,m10,systematic,y_parity,frame_length,term_flag) ;
stop_meas(gamma_stats);
start_meas(alpha_stats) ;
if (gamma_stats) stop_meas(gamma_stats);
if (alpha_stats) start_meas(alpha_stats) ;
compute_alpha8(alpha,beta,m11,m10,frame_length,F) ;
stop_meas(alpha_stats);
start_meas(beta_stats) ;
if (alpha_stats) stop_meas(alpha_stats);
if (beta_stats) start_meas(beta_stats) ;
compute_beta8(alpha,beta,m11,m10,frame_length,F,offset8_flag) ;
stop_meas(beta_stats);
start_meas(ext_stats) ;
if (beta_stats) stop_meas(beta_stats);
if (ext_stats) start_meas(ext_stats) ;
compute_ext8(alpha,beta,m11,m10,ext,systematic,frame_length) ;
stop_meas(ext_stats);
if (ext_stats) stop_meas(ext_stats);
}
......@@ -963,7 +963,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
}
start_meas(init_stats);
if (init_stats) start_meas(init_stats);
if ((n&15)>0) {
......@@ -1326,7 +1326,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
msg("\n");
#endif //DEBUG_LOGMAP
stop_meas(init_stats);
if (init_stats) stop_meas(init_stats);
// do log_map from first parity bit
......@@ -1338,7 +1338,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
printf("\n*******************ITERATION %d (n %d, n2 %d), ext %p\n\n",iteration_cnt,n,n2,ext);
#endif //DEBUG_LOGMAP
start_meas(intl1_stats);
if (intl1_stats) start_meas(intl1_stats);
pi4_p=pi4tab8[iind];
for (i=0; i<(n2>>4); i++) { // steady-state portion
......@@ -1379,7 +1379,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
#endif
}
stop_meas(intl1_stats);
if (intl1_stats) stop_meas(intl1_stats);
// do log_map from second parity bit
......@@ -1484,7 +1484,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
// Check if we decoded the block
if (iteration_cnt>1) {
start_meas(intl2_stats);
if (intl2_stats) start_meas(intl2_stats);
if ((n2&0x7f) == 0) { // n2 is a multiple of 128 bits
......@@ -1623,7 +1623,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
break;
}
stop_meas(intl2_stats);
if (intl2_stats) stop_meas(intl2_stats);
if ((crc == oldcrc) && (crc!=0)) {
return(iteration_cnt);
......
......@@ -518,7 +518,8 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// if (rvidx==3)
// for (cnt=0;cnt<Ncb;cnt++)
// counter_buffer[rvidx][cnt]=0;
AssertFatal(Ncb>=(3*RTC<<5),"Exiting, RM condition (Ncb %d, Nir/C %d, Nsoft %d, Kw %d\n",Ncb,Nir/C,Nsoft,3*(RTC<<5));
if (Ncb>(3*(RTC<<5)))
AssertFatal(1==0,"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)\n",Ncb,RTC,Nir/C,Nsoft,3*(RTC<<5));
Gp = G/Nl/Qm;
......
......@@ -73,7 +73,6 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
\details Only a subset of phy_vars_eNb is initialized.
@param[out] phy_vars_eNb Pointer to eNB Variables
@param is_secondary_eNb Flag to indicate this eNB gets synch from another
@param cooperation_flag 0 for no cooperation, 1 for Delay Diversity and 2 for Distributed Alamouti
@param abstraction_flag 1 indicates memory should be allocated for abstracted MODEM
@returns 0 on success
@returns -1 if any memory allocation failed
......@@ -81,7 +80,6 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
*/
int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNb,
unsigned char is_secondary_eNb,
unsigned char cooperation_flag,
unsigned char abstraction_flag);
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB decoding + primary/secondary synch).
......@@ -301,6 +299,18 @@ void phy_init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
//void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
void lte_param_init(unsigned char N_tx,
unsigned char N_rx,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce);
#ifdef Rel10
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
......
......@@ -45,7 +45,7 @@
*/
//#define DEBUG_PHY
t
/*
......
This diff is collapsed.
......@@ -52,7 +52,8 @@ void lte_param_init(unsigned char N_tx,
frame_parms->nb_antennas_tx = N_tx;
frame_parms->nb_antennas_rx = N_rx;
frame_parms->nb_antennas_tx_eNB = N_tx;
frame_parms->phich_config_common.phich_resource = one;
frame_parms->phich_config_common.phich_resource = oneSixth;
frame_parms->phich_config_common.phich_duration = normal;
frame_parms->tdd_config = tdd_config;
frame_parms->frame_type = frame_type;
// frame_parms->Csrs = 2;
......@@ -82,7 +83,7 @@ void lte_param_init(unsigned char N_tx,
lte_gold(frame_parms,UE->lte_gold_table[i],Nid_cell+i);
phy_init_lte_ue(UE,1,0);
phy_init_lte_eNB(eNB,0,0,0);
phy_init_lte_eNB(eNB,0,0);
generate_pcfich_reg_mapping(&UE->frame_parms);
generate_phich_reg_mapping(&UE->frame_parms);
......
......@@ -191,6 +191,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
printf("frame_parms->tdd_config=%d\n",frame_parms->tdd_config);
printf("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S);
printf("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag);
printf("frame_parms->nb_antennas_tx_eNB(nb_antenna_ports)=%d\n",frame_parms->nb_antennas_tx_eNB);
printf("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx);
printf("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx);
printf("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size);
......
......@@ -35,9 +35,9 @@ phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
{
LOG_D(PHY,"Gain control: rssi %d (%d,%d)\n",
rx_power_fil_dB,
ue->measurements.rssi,
ue->measurements.rx_power_avg_dB[eNB_id]
rx_power_fil_dB,
ue->measurements.rssi,
ue->measurements.rx_power_avg_dB[eNB_id]
);
// Gain control with hysterisis
......
......@@ -41,8 +41,8 @@ static int16_t temp_out_ifft_0[2048*4] __attribute__((aligned(16)));
static int16_t temp_out_ifft_1[2048*4] __attribute__((aligned(16)));
static int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(16)));
static int32_t temp_in_ifft_1[2048*2] __attribute__((aligned(16)));
static int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
static int32_t temp_in_ifft_1[2048*2] __attribute__((aligned(32)));
static int32_t temp_in_fft_0[2048*2] __attribute__((aligned(16)));
static int32_t temp_in_fft_1[2048*2] __attribute__((aligned(16)));
......
......@@ -1754,7 +1754,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *common_vars,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
log2_maxh = (log2_approx(avgs)/2) + 6 + frame_parms->nb_antennas_rx - 1;
log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef DEBUG_PHY
LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs);
#endif
......@@ -2086,17 +2086,16 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
frame_parms,
txdataF,
subframe);
wbar[0] = &wbar0[0];
wbar[1] = &wbar1[0];
y[0] = &yseq0[0];
y[1] = &yseq1[0];
// reset all bits to <NIL>, here we set <NIL> elements as 2
memset(e, 2, DCI_BITS_MAX);
// // here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
// for (i=0; i<DCI_BITS_MAX; i++)
// e[i]=2;//taus()&1;
// memset(e, 2, DCI_BITS_MAX);
// here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
for (i=0; i<DCI_BITS_MAX; i++)
e[i]=taus()&1;
e_ptr = e;
......@@ -2197,15 +2196,15 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
printf(" PDCCH Modulation (TX diversity): REG %d\n",i>>2);
#endif
// first antenna position n -> x0
((int16_t*)&y[0][i])[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[0][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
((int16_t*)&y[0][i])[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[0][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
// second antenna position n -> -x1*
((int16_t*)&y[1][i])[0] = (*e_ptr == 1) ? gain_lin_QPSK : -gain_lin_QPSK;
((int16_t*)&y[1][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? gain_lin_QPSK : -gain_lin_QPSK;
e_ptr++;
((int16_t*)&y[1][i])[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)&y[1][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
e_ptr++;
// fill in the rest of the ALAMOUTI precoding
......
......@@ -6221,6 +6221,9 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (dci_format == format0) {
if (!ulsch)
return -1;
if (rnti == ra_rnti)
harq_pid = 0;
else
......
......@@ -143,7 +143,7 @@ typedef struct {
/// downlink power offset field
uint8_t dl_power_off;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t e[MAX_NUM_CHANNEL_BITS];
uint8_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
/// Turbo-code outputs (36-212 V8.6 2009-03, p.12
uint8_t *d[MAX_NUM_DLSCH_SEGMENTS];//[(96+3+(3*6144))];
/// Sub-block interleaver outputs (36-212 V8.6 2009-03, p.16-17)
......@@ -407,7 +407,7 @@ typedef struct {
/// coded RI bits
int16_t q_RI[MAX_RI_PAYLOAD];
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
int16_t e[MAX_NUM_CHANNEL_BITS];
int16_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
uint8_t h[MAX_NUM_CHANNEL_BITS];
/// Pointer to the payload
......
This diff is collapsed.
......@@ -48,6 +48,34 @@
#include "PHY/extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
static inline unsigned int lte_gold_scram(unsigned int *x1, unsigned int *x2, unsigned char reset) __attribute__((always_inline));
static inline unsigned int lte_gold_scram(unsigned int *x1, unsigned int *x2, unsigned char reset)
{
int n;
if (reset) {
*x1 = 1+ (1<<31);
*x2=*x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
// skip first 50 double words (1600 bits)
// printf("n=0 : x1 %x, x2 %x\n",x1,x2);
for (n=1; n<50; n++) {
*x1 = (*x1>>1) ^ (*x1>>4);
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
}
}
*x1 = (*x1>>1) ^ (*x1>>4);
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
return(*x1^*x2);
// printf("n=%d : c %x\n",n,x1^x2);
}
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag,
LTE_eNB_DLSCH_t *dlsch,
......@@ -75,53 +103,57 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_SCRAMBLING
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, length %d\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G);
#endif
s = lte_gold_generic(&x1, &x2, 1);
s = lte_gold_scram(&x1, &x2, 1);
for (i=0; i<(1+(G>>5)); i++) {
#ifdef DEBUG_SCRAMBLING
printf("scrambling %d : %d => ",k,e[k]);
#endif
e[0] = (e[0]) ^ (s&1);
e[1] = (e[1]) ^ ((s>>1)&1);
e[2] = (e[2]) ^ ((s>>2)&1);
e[3] = (e[3]) ^ ((s>>3)&1);
e[4] = (e[4]) ^ ((s>>4)&1);
e[5] = (e[5]) ^ ((s>>5)&1);
e[6] = (e[6]) ^ ((s>>6)&1);
e[7] = (e[7]) ^ ((s>>7)&1);
e[8] = (e[8]) ^ ((s>>8)&1);
e[9] = (e[9]) ^ ((s>>9)&1);
e[10] = (e[10]) ^ ((s>>10)&1);
e[11] = (e[11]) ^ ((s>>11)&1);
e[12] = (e[12]) ^ ((s>>12)&1);
e[13] = (e[13]) ^ ((s>>13)&1);
e[14] = (e[14]) ^ ((s>>14)&1);
e[15] = (e[15]) ^ ((s>>15)&1);
e[16] = (e[16]) ^ ((s>>16)&1);
e[17] = (e[17]) ^ ((s>>17)&1);
e[18] = (e[18]) ^ ((s>>18)&1);
e[19] = (e[19]) ^ ((s>>19)&1);
e[20] = (e[20]) ^ ((s>>20)&1);
e[21] = (e[21]) ^ ((s>>21)&1);
e[22] = (e[22]) ^ ((s>>22)&1);
e[23] = (e[23]) ^ ((s>>23)&1);
e[24] = (e[24]) ^ ((s>>24)&1);
e[25] = (e[25]) ^ ((s>>25)&1);
e[26] = (e[26]) ^ ((s>>26)&1);
e[27] = (e[27]) ^ ((s>>27)&1);
e[28] = (e[28]) ^ ((s>>28)&1);
e[29] = (e[29]) ^ ((s>>29)&1);
e[30] = (e[30]) ^ ((s>>30)&1);
e[31] = (e[31]) ^ ((s>>31)&1);
e[0] = (e[0]&1) ^ (s&1);
e[1] = (e[1]&1) ^ ((s>>1)&1);
e[2] = (e[2]&1) ^ ((s>>2)&1);
e[3] = (e[3]&1) ^ ((s>>3)&1);
e[4] = (e[4]&1) ^ ((s>>4)&1);
e[5] = (e[5]&1) ^ ((s>>5)&1);
e[6] = (e[6]&1) ^ ((s>>6)&1);
e[7] = (e[7]&1) ^ ((s>>7)&1);
e[8] = (e[8]&1) ^ ((s>>8)&1);
e[9] = (e[9]&1) ^ ((s>>9)&1);
e[10] = (e[10]&1) ^ ((s>>10)&1);
e[11] = (e[11]&1) ^ ((s>>11)&1);
e[12] = (e[12]&1) ^ ((s>>12)&1);
e[13] = (e[13]&1) ^ ((s>>13)&1);
e[14] = (e[14]&1) ^ ((s>>14)&1);
e[15] = (e[15]&1) ^ ((s>>15)&1);
e[16] = (e[16]&1) ^ ((s>>16)&1);
e[17] = (e[17]&1) ^ ((s>>17)&1);
e[18] = (e[18]&1) ^ ((s>>18)&1);
e[19] = (e[19]&1) ^ ((s>>19)&1);
e[20] = (e[20]&1) ^ ((s>>20)&1);
e[21] = (e[21]&1) ^ ((s>>21)&1);
e[22] = (e[22]&1) ^ ((s>>22)&1);
e[23] = (e[23]&1) ^ ((s>>23)&1);
e[24] = (e[24]&1) ^ ((s>>24)&1);
e[25] = (e[25]&1) ^ ((s>>25)&1);
e[26] = (e[26]&1) ^ ((s>>26)&1);
e[27] = (e[27]&1) ^ ((s>>27)&1);
e[28] = (e[28]&1) ^ ((s>>28)&1);
e[29] = (e[29]&1) ^ ((s>>29)&1);
e[30] = (e[30]&1) ^ ((s>>30)&1);
e[31] = (e[31]&1) ^ ((s>>31)&1);
// This is not faster for some unknown reason
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
// ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
#ifdef DEBUG_SCRAMBLING
printf("%d\n",e[k]);
#endif
s = lte_gold_generic(&x1, &x2, 0);
s = lte_gold_scram(&x1, &x2, 0);
e += 32;
}
......@@ -153,7 +185,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_SCRAMBLING
printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d length %d\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G);
#endif
s = lte_gold_generic(&x1, &x2, 1);
s = lte_gold_scram(&x1, &x2, 1);
for (i=0; i<(1+(G>>5)); i++) {
for (j=0; j<32; j++,k++) {
......@@ -166,6 +198,30 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
#endif
}
s = lte_gold_generic(&x1, &x2, 0);
s = lte_gold_scram(&x1, &x2, 0);
}
}
void init_unscrambling_lut() {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
}
}
}
void init_scrambling_lut() {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1);
}
}
}
......@@ -319,8 +319,8 @@ void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a)
AMP);
if (dlsch_encoding(a,
&eNB->frame_parms,
if (dlsch_encoding(eNB,
a,
1,
eNB->dlsch_MCH,
proc->frame_tx,
......
......@@ -93,7 +93,8 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag);
/** \fn dlsch_encoding(uint8_t *input_buffer,
/** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
uint8_t *input_buffer,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
......@@ -105,6 +106,7 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag);
- Channel coding (Turbo coding)
- Rate matching (sub-block interleaving, bit collection, selection and transmission
- Code block concatenation
@param eNB Pointer to eNB PHY context
@param input_buffer Pointer to input buffer for sub-frame
@param frame_parms Pointer to frame descriptor structure
@param num_pdcch_symbols Number of PDCCH symbols in this subframe
......@@ -116,8 +118,8 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag);
@param i_stats Time statistics for interleaving
@returns status
*/
int32_t dlsch_encoding(uint8_t *a,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t dlsch_encoding(PHY_VARS_eNB *eNB,
uint8_t *a,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
......@@ -126,6 +128,39 @@ int32_t dlsch_encoding(uint8_t *a,
time_stats_t *te_stats,
time_stats_t *i_stats);
/** \fn dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
uint8_t *input_buffer,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
uint8_t subframe)
\brief This function performs a subset of the bit-coding functions for LTE as described in 36-212, Release 8.Support is limited to turbo-coded channels (DLSCH/ULSCH). This version spawns 1 worker thread. The implemented functions are:
- CRC computation and addition
- Code block segmentation and sub-block CRC addition
- Channel coding (Turbo coding)
- Rate matching (sub-block interleaving, bit collection, selection and transmission
- Code block concatenation
@param eNB Pointer to eNB PHY context
@param input_buffer Pointer to input buffer for sub-frame
@param num_pdcch_symbols Number of PDCCH symbols in this subframe
@param dlsch Pointer to dlsch to be encoded
@param frame Frame number
@param subframe Subframe number
@param rm_stats Time statistics for rate-matching
@param te_stats Time statistics for turbo-encoding
@param i_stats Time statistics for interleaving
@returns status
*/
int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
uint8_t *a,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
uint8_t subframe,
time_stats_t *rm_stats,
time_stats_t *te_stats,
time_stats_t *i_stats);
void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *DLSCH_pdu,
LTE_eNB_DLSCH_t *dlsch);
......@@ -1544,6 +1579,32 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
uint8_t Nbundled,
uint8_t llr8_flag);
/*!
\brief Decoding of ULSCH data component from 36-212. This one spawns 1 worker thread in parallel,half of the segments in each thread.
@param phy_vars_eNB Pointer to eNB top-level descriptor
@param UE_id ID of UE transmitting this PUSCH
@param harq_pid HARQ process ID
@param llr8_flag If 1, indicate that the 8-bit turbo decoder should be used
@returns 0 on success
*/
int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,
int UE_id,
int harq_pid,
int llr8_flag);
/*!
\brief Decoding of ULSCH data component from 36-212. This one is single thread.
@param phy_vars_eNB Pointer to eNB top-level descriptor
@param UE_id ID of UE transmitting this PUSCH
@param harq_pid HARQ process ID
@param llr8_flag If 1, indicate that the 8-bit turbo decoder should be used
@returns 0 on success
*/
int ulsch_decoding_data(PHY_VARS_eNB *eNB,
int UE_id,
int harq_pid,
int llr8_flag);
uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
eNB_rxtx_proc_t *proc,
uint8_t UE_index,
......@@ -1648,17 +1709,16 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7]);
void generate_pucch(int32_t **txdataF,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t ncs_cell[20][7],
PUCCH_FMT_t fmt,
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
uint16_t n1_pucch,
uint16_t n2_pucch,
uint8_t shortened_format,
uint8_t *payload,
int16_t amp,
uint8_t subframe);
void generate_pucch1x(int32_t **txdataF,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t ncs_cell[20][7],
PUCCH_FMT_t fmt,
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
uint16_t n1_pucch,
uint8_t shortened_format,
uint8_t *payload,
int16_t amp,
uint8_t subframe);
void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue,
UE_rxtx_proc_t *proc,
......@@ -1755,6 +1815,9 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
void init_prach_tables(int N_ZC);
void init_unscrambling_lut(void);
void init_scrambling_lut(void);
/*!
\brief Return the status of MBSFN in this frame/subframe
@param frame Frame index
......
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,10 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
void (*dft)(int16_t *,int16_t *, int);
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
unsigned int rx_offset;
switch (frame_parms->ofdm_symbol_size) {
case 128:
dft = dft128;
......@@ -103,28 +107,37 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
#endif
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
rx_offset = slot_offset +nb_prefix_samples0;
if (l==0) {
dft(
#ifndef OFDMA_ULSCH
(int16_t *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
nb_prefix_samples0],
#else
(int16_t *)&eNB_common_vars->rxdata[eNB_id][aa][((frame_parms->samples_per_tti>>1)*Ns) +
nb_prefix_samples0],
#endif
(int16_t *)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],1);
dft( (int16_t *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][rx_offset],
(int16_t *)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
1
);
} else {
dft(
#ifndef OFDMA_ULSCH
(short *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
#else
(short *)&eNB_common_vars->rxdata[eNB_id][aa][((frame_parms->samples_per_tti>>1)*Ns) +
#endif
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1)],
(short*)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],1);
rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*l;
if(rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
{
memcpy((void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][frame_length_samples],
(void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][0],
frame_parms->ofdm_symbol_size*sizeof(int));
}
if( (rx_offset & 7) != 0){
memcpy((void *)&tmp_dft_in,
(void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][(rx_offset % frame_length_samples)],
frame_parms->ofdm_symbol_size*sizeof(int));
dft( (short *) tmp_dft_in,
(short*) &eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
1
);
}
else{
dft( (short *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][rx_offset],
(short*)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
1
);
}
}
}
......
......@@ -296,10 +296,10 @@ int32_t subcarrier_energy(int32_t *,uint32_t, int32_t* subcarrier_energy, uint16
*/
int32_t signal_energy_nodc(int32_t *,uint32_t);
/*!\fn double signal_energy_fp(double s_re[2][30720], double s_im[2][30720],uint32_t, uint32_t,uint32_t);
/*!\fn double signal_energy_fp(double *s_re[2], double *s_im[2],uint32_t, uint32_t,uint32_t);
\brief Computes the signal energy per subcarrier
*/
double signal_energy_fp(double s_re[2][30720], double s_im[2][30720], uint32_t nb_antennas, uint32_t length,uint32_t offset);
double signal_energy_fp(double *s_re[2], double *s_im[2], uint32_t nb_antennas, uint32_t length,uint32_t offset);
/*!\fn double signal_energy_fp2(struct complex *, uint32_t);
\brief Computes the signal energy per subcarrier
......
......@@ -255,7 +255,7 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length)
}
#endif
double signal_energy_fp(double s_re[2][30720],double s_im[2][30720],uint32_t nb_antennas,uint32_t length,uint32_t offset)
double signal_energy_fp(double *s_re[2],double *s_im[2],uint32_t nb_antennas,uint32_t length,uint32_t offset)
{
int32_t aa,i;
......
......@@ -222,6 +222,21 @@ typedef struct {
/// scheduling parameters for RXn-TXnp4 thread
struct sched_param sched_param_rxtx;
} eNB_rxtx_proc_t;
typedef struct {
struct PHY_VARS_eNB_s *eNB;
int UE_id;
int harq_pid;
int llr8_flag;
int ret;
} td_params;
typedef struct {
struct PHY_VARS_eNB_s *eNB;
LTE_eNB_DLSCH_t *dlsch;
int G;
} te_params;
/// Context data structure for eNB subframe processing
typedef struct eNB_proc_t_s {
/// Component Carrier index
......@@ -240,6 +255,10 @@ typedef struct eNB_proc_t_s {
int frame_prach;
/// \internal This variable is protected by \ref mutex_fep.
int instance_cnt_fep;
/// \internal This variable is protected by \ref mutex_td.
int instance_cnt_td;
/// \internal This variable is protected by \ref mutex_te.
int instance_cnt_te;
/// \brief Instance count for FH processing thread.
/// \internal This variable is protected by \ref mutex_FH.
int instance_cnt_FH;
......@@ -260,6 +279,10 @@ typedef struct eNB_proc_t_s {
int first_tx;
/// pthread attributes for parallel fep thread
pthread_attr_t attr_fep;
/// pthread attributes for parallel turbo-decoder thread
pthread_attr_t attr_td;
/// pthread attributes for parallel turbo-encoder thread
pthread_attr_t attr_te;
/// pthread attributes for FH processing thread
pthread_attr_t attr_FH;
/// pthread attributes for single eNB processing thread
......@@ -270,6 +293,10 @@ typedef struct eNB_proc_t_s {
pthread_attr_t attr_asynch_rxtx;
/// scheduling parameters for parallel fep thread
struct sched_param sched_param_fep;
/// scheduling parameters for parallel turbo-decoder thread
struct sched_param sched_param_td;
/// scheduling parameters for parallel turbo-encoder thread
struct sched_param sched_param_te;
/// scheduling parameters for FH thread
struct sched_param sched_param_FH;
/// scheduling parameters for single eNB thread
......@@ -280,10 +307,18 @@ typedef struct eNB_proc_t_s {
struct sched_param sched_param_asynch_rxtx;
/// pthread structure for parallel fep thread
pthread_t pthread_fep;
/// pthread structure for parallel turbo-decoder thread
pthread_t pthread_td;
/// pthread structure for parallel turbo-encoder thread
pthread_t pthread_te;
/// pthread structure for PRACH thread
pthread_t pthread_prach;
/// condition variable for parallel fep thread
pthread_cond_t cond_fep;
/// condition variable for parallel turbo-decoder thread
pthread_cond_t cond_td;
/// condition variable for parallel turbo-encoder thread
pthread_cond_t cond_te;
/// condition variable for FH thread
pthread_cond_t cond_FH;
/// condition variable for PRACH processing thread;
......@@ -292,12 +327,20 @@ typedef struct eNB_proc_t_s {
pthread_cond_t cond_asynch_rxtx;
/// mutex for parallel fep thread
pthread_mutex_t mutex_fep;
/// mutex for parallel turbo-decoder thread
pthread_mutex_t mutex_td;
/// mutex for parallel turbo-encoder thread
pthread_mutex_t mutex_te;
/// 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;
/// parameters for turbo-decoding worker thread
td_params tdp;
/// parameters for turbo-encoding worker thread
te_params tep;
/// set of scheduling variables RXn-TXnp4 threads
eNB_rxtx_proc_t proc_rxtx[2];
/// number of slave threads
......@@ -378,6 +421,8 @@ typedef struct PHY_VARS_eNB_s {
int abstraction_flag;
void (*do_prach)(struct PHY_VARS_eNB_s *eNB);
void (*fep)(struct PHY_VARS_eNB_s *eNB);
int (*td)(struct PHY_VARS_eNB_s *eNB,int UE_id,int harq_pid,int llr8_flag);
int (*te)(struct PHY_VARS_eNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *);
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);
......@@ -839,6 +884,69 @@ typedef struct {
} PHY_VARS_UE;
void exit_fun(const char* s);
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
while (*instance_cnt < 0) {
// most of the time the thread is waiting here
// proc->instance_cnt_rxtx is -1
pthread_cond_wait(cond,mutex); // this unlocks mutex_rxtx while waiting and then locks it again
}
if (pthread_mutex_unlock(mutex) != 0) {
LOG_E(PHY,"[SCHED][eNB] error unlocking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
return(0);
}
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
while (*instance_cnt == 0) {
// most of the time the thread will skip this
// waits only if proc->instance_cnt_rxtx is 0
pthread_cond_wait(cond,mutex); // this unlocks mutex_rxtx while waiting and then locks it again
}
if (pthread_mutex_unlock(mutex) != 0) {
LOG_E(PHY,"[SCHED][eNB] error unlocking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
return(0);
}
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
*instance_cnt=*instance_cnt-1;
if (pthread_mutex_unlock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error unlocking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
return(0);
}
#include "PHY/INIT/defs.h"
......
......@@ -121,5 +121,8 @@ extern char eNB_functions[6][20];
extern char eNB_timing[2][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
#endif /*__PHY_EXTERN_H__ */
......@@ -151,6 +151,10 @@ char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RCC_IF4p5","NGF
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
#endif
/// lookup table for unscrambling in RX
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
/// lookup table for scrambling in TX
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
#endif /*__PHY_VARS_H__ */
......@@ -163,8 +163,9 @@ void phy_procedures_UE_S_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abst
@param abstraction_flag Indicator of PHY abstraction
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
@param phy_vars_rn pointer to the RN variables
@param do_meas Do inline timing measurement
*/
void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn,int do_meas);
/*! \brief Scheduling for eNB RX UE-specific procedures in normal subframes.
@param phy_vars_eNB Pointer to eNB variables on which to act
......
......@@ -60,7 +60,6 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int subframe = proc->subframe_tx;
LTE_eNB_DLSCH_t *DLSCH_ptr = eNB->dlsch[0][0];
/*
uint32_t rand = taus();
......
......@@ -1030,14 +1030,14 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
LOG_D(PHY,"Generating DLSCH/PDSCH %d\n",ra_flag);
// 36-212
start_meas(&eNB->dlsch_encoding_stats);
dlsch_encoding(DLSCH_pdu,
fp,
num_pdcch_symbols,
dlsch,
frame,subframe,
&eNB->dlsch_rate_matching_stats,
&eNB->dlsch_turbo_encoding_stats,
&eNB->dlsch_interleaving_stats);
eNB->te(eNB,
DLSCH_pdu,
num_pdcch_symbols,
dlsch,
frame,subframe,
&eNB->dlsch_rate_matching_stats,
&eNB->dlsch_turbo_encoding_stats,
&eNB->dlsch_interleaving_stats);
stop_meas(&eNB->dlsch_encoding_stats);
// 36-211
start_meas(&eNB->dlsch_scrambling_stats);
......@@ -1053,6 +1053,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
0,
subframe<<1);
stop_meas(&eNB->dlsch_scrambling_stats);
start_meas(&eNB->dlsch_modulation_stats);
......@@ -1084,7 +1085,8 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
relaying_type_t r_type,
PHY_VARS_RN *rn)
PHY_VARS_RN *rn,
int do_meas)
{
UNUSED(rn);
int frame=proc->frame_tx;
......@@ -1113,7 +1115,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
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+offset,1);
start_meas(&eNB->phy_proc_tx);
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
T(T_ENB_PHY_DL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
......@@ -1399,7 +1401,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0);
stop_meas(&eNB->phy_proc_tx);
if (do_meas==1) stop_meas(&eNB->phy_proc_tx);
}
......@@ -2508,6 +2510,8 @@ void fep0(PHY_VARS_eNB *eNB,int slot) {
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int l;
// printf("fep0: slot %d\n",slot);
remove_7_5_kHz(eNB,(slot&1)+(proc->subframe_rx<<1));
for (l=0; l<fp->symbols_per_tti/2; l++) {
slot_fep_ul(fp,
......@@ -2520,58 +2524,29 @@ void fep0(PHY_VARS_eNB *eNB,int slot) {
}
}
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
*instance_cnt=*instance_cnt-1;
if (pthread_mutex_unlock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error unlocking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
return(0);
}
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
while (*instance_cnt < 0) {
// most of the time the thread is waiting here
// proc->instance_cnt_rxtx is -1
pthread_cond_wait(cond,mutex); // this unlocks mutex_rxtx while waiting and then locks it again
}
if (pthread_mutex_unlock(mutex) != 0) {
LOG_E(PHY,"[SCHED][eNB] error unlocking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
return(0);
}
extern int oai_exit;
static void *fep_thread(void *param) {
PHY_VARS_eNB *eNB = (PHY_VARS_eNB *)param;
eNB_proc_t *proc = &eNB->proc;
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
fep0(eNB,0);
if (release_thread(&proc->mutex_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
if (pthread_cond_signal(&proc->cond_fep) != 0) {
printf("[eNB] ERROR pthread_cond_signal for fep thread exit\n");
exit_fun( "ERROR pthread_cond_signal" );
return NULL;
}
}
return(NULL);
}
......@@ -2586,13 +2561,49 @@ void init_fep_thread(PHY_VARS_eNB *eNB,pthread_attr_t *attr_fep) {
pthread_create(&proc->pthread_fep, attr_fep, fep_thread, (void*)eNB);
}
extern void *td_thread(void*);
void init_td_thread(PHY_VARS_eNB *eNB,pthread_attr_t *attr_td) {
eNB_proc_t *proc = &eNB->proc;
proc->tdp.eNB = eNB;
proc->instance_cnt_td = -1;
pthread_mutex_init( &proc->mutex_td, NULL);
pthread_cond_init( &proc->cond_td, NULL);
pthread_create(&proc->pthread_td, attr_td, td_thread, (void*)&proc->tdp);
}
extern void *te_thread(void*);
void init_te_thread(PHY_VARS_eNB *eNB,pthread_attr_t *attr_te) {
eNB_proc_t *proc = &eNB->proc;
proc->tep.eNB = eNB;
proc->instance_cnt_te = -1;
pthread_mutex_init( &proc->mutex_te, NULL);
pthread_cond_init( &proc->cond_te, NULL);
printf("Creating te_thread\n");
pthread_create(&proc->pthread_te, attr_te, te_thread, (void*)&proc->tep);
}
void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
eNB_proc_t *proc = &eNB->proc;
struct timespec wait;
int wait_cnt=0;
wait.tv_sec=0;
wait.tv_nsec=5000000L;
......@@ -2600,7 +2611,7 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
start_meas(&eNB->ofdm_demod_stats);
if (pthread_mutex_timedlock(&proc->mutex_fep,&wait) != 0) {
printf("[eNB] ERROR pthread_mutex_lock for fep thread %d (IC %d)\n", proc->instance_cnt_fep);
printf("[eNB] ERROR pthread_mutex_lock for fep thread (IC %d)\n", proc->instance_cnt_fep);
exit_fun( "error locking mutex_fep" );
return;
}
......@@ -2626,26 +2637,13 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
// call second slot in this symbol
fep0(eNB,1);
if (pthread_mutex_timedlock(&proc->mutex_fep,&wait) != 0) {
printf("[eNB] ERROR pthread_mutex_lock for fep thread %d (IC %d)\n", proc->instance_cnt_fep);
exit_fun( "error locking mutex_fep" );
return;
}
while (proc->instance_cnt_fep==0) {
wait_cnt++;
if (wait_cnt>10000)
break;
};
pthread_mutex_unlock( &proc->mutex_fep );
if (wait_cnt>1000000) {
printf("[eNB] parallel FEP didn't finish\n");
exit_fun( "error" );
}
wait_on_busy_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread");
stop_meas(&eNB->ofdm_demod_stats);
}
void eNB_fep_full(PHY_VARS_eNB *eNB) {
eNB_proc_t *proc = &eNB->proc;
......
......@@ -713,12 +713,14 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if (ue->mac_enabled==1){
// ask L2 for RACH transport
if ((mode != rx_calib_ue) && (mode != rx_calib_ue_med) && (mode != rx_calib_ue_byp) && (mode != no_L2_connect) ) {
LOG_D(PHY,"Getting PRACH resources\n");
ue->prach_resources[eNB_id] = mac_xface->ue_get_rach(ue->Mod_id,
ue->CC_id,
frame_tx,
eNB_id,
subframe_tx);
LOG_D(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[ue->Mod_id].radioResourceConfigCommon);
LOG_D(PHY,"Prach resources %p\n",ue->prach_resources[eNB_id]);
}
}
......@@ -734,14 +736,8 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#endif
if (abstraction_flag == 0) {
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
LOG_I(PHY,"mode %d\n",mode);
if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) {
ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id);
......@@ -751,6 +747,15 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
}
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
ue->tx_total_RE[subframe_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
......@@ -1189,17 +1194,16 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if (abstraction_flag == 0) {
generate_pucch(ue->common_vars.txdataF,
&ue->frame_parms,
ue->ncs_cell,
format,
&ue->pucch_config_dedicated[eNB_id],
n1_pucch,
0, // n2_pucch
1, // shortened format
pucch_ack_payload,
tx_amp,
subframe_tx);
generate_pucch1x(ue->common_vars.txdataF,
&ue->frame_parms,
ue->ncs_cell,
format,
&ue->pucch_config_dedicated[eNB_id],
n1_pucch,
1, // shortened format
pucch_ack_payload,
tx_amp,
subframe_tx);
} else {
#ifdef PHY_ABSTRACTION
......@@ -1240,17 +1244,16 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if (abstraction_flag == 0) {
generate_pucch(ue->common_vars.txdataF,
&ue->frame_parms,
ue->ncs_cell,
pucch_format1,
&ue->pucch_config_dedicated[eNB_id],
ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex,
0, // n2_pucch
1, // shortened format
pucch_ack_payload, // this is ignored anyway, we just need a pointer
tx_amp,
subframe_tx);
generate_pucch1x(ue->common_vars.txdataF,
&ue->frame_parms,
ue->ncs_cell,
pucch_format1,
&ue->pucch_config_dedicated[eNB_id],
ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex,
1, // shortened format
pucch_ack_payload, // this is ignored anyway, we just need a pointer
tx_amp,
subframe_tx);
} else {
LOG_D(PHY,"Calling generate_pucch_emul ...\n");
generate_pucch_emul(ue,
......@@ -2483,6 +2486,11 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
pdsch_vars = NULL;
return;
break;
default:
pdsch_vars = NULL;
return;
break;
}
harq_pid = dlsch0->current_harq_pid;
......@@ -2730,6 +2738,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
}
} // for l=1..l2
ue_measurement_procedures(l-1,ue,proc,eNB_id,abstraction_flag,mode);
// If this is PMCH, call procedures and return
if (pmch_flag == 1) {
......@@ -2743,7 +2752,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->rx_offset,
0,
0);
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
// do procedures for C-RNTI
......
......@@ -1381,6 +1381,7 @@ int main(int argc, char **argv)
char csv_fname[32];
int dci_flag=1;
int llr8_flag=1;
int two_thread_flag=0;
int DLSCH_RB_ALLOC;
#if defined(__arm__)
......@@ -1412,7 +1413,7 @@ int main(int argc, char **argv)
// num_layers = 1;
perfect_ce = 0;
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XY")) != -1) {
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:WXY")) != -1) {
switch (c) {
case 'a':
awgn_flag = 1;
......@@ -1479,7 +1480,10 @@ int main(int argc, char **argv)
case 'L':
llr8_flag=1;
break;
case 'W':
two_thread_flag = 1;
break;
case 'l':
offset_mumimo_llr_drange_fix=atoi(optarg);
break;
......@@ -1779,6 +1783,15 @@ int main(int argc, char **argv)
perfect_ce);
eNB->mac_enabled=1;
if (two_thread_flag == 0) {
eNB->te = dlsch_encoding;
}
else {
eNB->te = dlsch_encoding_2threads;
init_td_thread(eNB,NULL);
init_te_thread(eNB,NULL);
}
// callback functions required for phy_procedures_tx
mac_xface->get_dci_sdu = get_dci_sdu;
mac_xface->get_dlsch_sdu = get_dlsch_sdu;
......@@ -2272,7 +2285,6 @@ int main(int argc, char **argv)
if (input_fd==NULL) {
start_meas(&eNB->phy_proc_tx);
// Simulate HARQ procedures!!!
memset(CCE_table,0,800*sizeof(int));
......@@ -2345,7 +2357,7 @@ int main(int argc, char **argv)
proc_eNB->subframe_tx = subframe;
eNB->abstraction_flag=0;
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL);
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,1);
start_meas(&eNB->ofdm_mod_stats);
......@@ -2366,7 +2378,7 @@ int main(int argc, char **argv)
proc_eNB->subframe_tx = subframe+1;
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL);
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,0);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id],
......@@ -2392,6 +2404,8 @@ int main(int argc, char **argv)
write_output("txsig0.m","txs0", &eNB->common_vars.txdata[eNB_id][0][subframe* eNB->frame_parms.samples_per_tti],
eNB->frame_parms.samples_per_tti,1,1);
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],
nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
}
}
......
......@@ -56,69 +56,7 @@
PHY_VARS_eNB *PHY_vars_eNB;
PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,lte_frame_type_t frame_type, uint16_t Nid_cell,uint8_t tdd_config,
uint8_t N_RB_DL,uint8_t osf,uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
srand(1);
randominit(1);
set_taus_seed(1);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->Nid_cell_mbsfn = 1;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->phich_config_common.phich_resource = oneSixth;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
lte_gold_mbsfn(lte_frame_parms,PHY_vars_UE->lte_gold_mbsfn_table,Nid_cell);
lte_gold_mbsfn(lte_frame_parms,PHY_vars_eNB->lte_gold_mbsfn_table,Nid_cell);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
PHY_vars_UE->perfect_ce = perfect_ce;
printf("Done lte_param_init\n");
}
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_1E[2];
#define UL_RB_ALLOC 0x1ff;
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
......@@ -315,7 +253,7 @@ int main(int argc, char **argv)
if (transmission_mode==2)
n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce);
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,0,osf,perfect_ce);
......
......@@ -353,8 +353,8 @@ int main(int argc, char **argv)
eNB2->frame_parms.nushift=(Nid_cell+2)%6;
eNB2->Mod_id=2;
phy_init_lte_eNB(eNB1,0,0,0);
phy_init_lte_eNB(eNB2,0,0,0);
phy_init_lte_eNB(eNB1,0,0);
phy_init_lte_eNB(eNB2,0,0);
#ifdef XFORMS
fl_initialize (&argc, argv, NULL, 0, 0);
......
This diff is collapsed.
......@@ -66,7 +66,7 @@ int main(int argc, char **argv)
uint8_t snr1set=0;
//mod_sym_t **txdataF;
int **txdata;
double **s_re,**s_im,**r_re,**r_im;
double s_re[2][30720],s_im[2][30720],r_re[2][30720],r_im[2][30720];
double ricean_factor=0.0000005,iqim=0.0;
int trial, n_trials, ntrials=1, n_errors;
......@@ -325,10 +325,6 @@ int main(int argc, char **argv)
txdata = eNB->common_vars.txdata[eNB_id];
s_re = malloc(2*sizeof(double*));
s_im = malloc(2*sizeof(double*));
r_re = malloc(2*sizeof(double*));
r_im = malloc(2*sizeof(double*));
nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
printf("FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d\n",NUMBER_OF_OFDM_CARRIERS,
......@@ -352,19 +348,6 @@ int main(int argc, char **argv)
exit(-1);
}
for (i=0; i<2; i++) {
s_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
bzero(s_re[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
s_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
bzero(s_im[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
bzero(r_re[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
bzero(r_im[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
}
init_ncs_cell(&eNB->frame_parms,eNB->ncs_cell);
init_ncs_cell(&UE->frame_parms,UE->ncs_cell);
......@@ -378,17 +361,16 @@ int main(int argc, char **argv)
pucch_payload = 0;
generate_pucch(UE->common_vars.txdataF,
frame_parms,
UE->ncs_cell,
pucch_format,
&pucch_config_dedicated,
n1_pucch,
n2_pucch,
0, //shortened_format,
&pucch_payload,
AMP, //amp,
subframe); //subframe
generate_pucch1x(UE->common_vars.txdataF,
frame_parms,
UE->ncs_cell,
pucch_format,
&pucch_config_dedicated,
n1_pucch,
0, //shortened_format,
&pucch_payload,
AMP, //amp,
subframe); //subframe
write_output("txsigF0.m","txsF0", &UE->common_vars.txdataF[0][2*subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX],OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX*nsymb,1,1);
tx_lev = 0;
......@@ -453,7 +435,7 @@ int main(int argc, char **argv)
multipath_channel(UE2eNB,s_re,s_im,r_re,r_im,
2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES,0);
eNB->frame_parms.samples_per_tti,0);
sigma2_dB = N0;//10*log10((double)tx_lev) - SNR;
tx_gain = sqrt(pow(10.0,.1*(N0+SNR))/(double)tx_lev);
......@@ -509,8 +491,7 @@ int main(int argc, char **argv)
if (sig==1) {
((short*) &eNB->common_vars.rxdata[0][aa][subframe*frame_parms->samples_per_tti])[2*i] = (short) (((tx_gain*r_re[aa][i]) +sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
((short*) &eNB->common_vars.rxdata[0][aa][subframe*frame_parms->samples_per_tti])[2*i+1] = (short) (((tx_gain*r_im[aa][i]) + (iqim*r_re[aa][i]*tx_gain) + sqrt(sigma2/2)*gaussdouble(
0.0,1.0)));
((short*) &eNB->common_vars.rxdata[0][aa][subframe*frame_parms->samples_per_tti])[2*i+1] = (short) (((tx_gain*r_im[aa][i]) + (iqim*r_re[aa][i]*tx_gain) + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
} else {
((short*) &eNB->common_vars.rxdata[0][aa][subframe*frame_parms->samples_per_tti])[2*i] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
((short*) &eNB->common_vars.rxdata[0][aa][subframe*frame_parms->samples_per_tti])[2*i+1] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
......@@ -603,18 +584,6 @@ int main(int argc, char **argv)
}
for (i=0; i<2; i++) {
free(s_re[i]);
free(s_im[i]);
free(r_re[i]);
free(r_im[i]);
}
free(s_re);
free(s_im);
free(r_re);
free(r_im);
lte_sync_time_free();
return(n_errors);
......
......@@ -676,8 +676,10 @@ int main(int argc, char **argv)
eNB->ulsch[0] = new_eNB_ulsch(max_turbo_iterations,N_RB_DL,0);
UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0);
if (parallel_flag == 1) init_fep_thread(eNB,&eNB->proc.attr_fep);
if (parallel_flag == 1) {
init_fep_thread(eNB,NULL);
init_td_thread(eNB,NULL);
}
// Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) {
eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0);
......@@ -1171,7 +1173,8 @@ int main(int argc, char **argv)
}
eNB->fep = (parallel_flag == 1) ? eNB_fep_full_2thread : eNB_fep_full;
eNB->fep = (parallel_flag == 1) ? eNB_fep_full_2thread : eNB_fep_full;
eNB->td = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
eNB->do_prach = NULL;
phy_procedures_eNB_common_RX(eNB);
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
void adc(double r_re[2][30720],
double r_im[2][30720],
void adc(double *r_re[2],
double *r_im[2],
unsigned int input_offset,
unsigned int output_offset,
unsigned int **output,
......
......@@ -31,8 +31,8 @@
#include <stdio.h>
#include "PHY/TOOLS/defs.h"
void dac(double s_re[2][30720],
double s_im[2][30720],
void dac(double *s_re[2],
double *s_im[2],
uint32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
......@@ -81,8 +81,8 @@ void dac(double s_re[2][30720],
}
}
double dac_fixed_gain(double s_re[2][30720],
double s_im[2][30720],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
uint32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
......@@ -121,6 +121,7 @@ double dac_fixed_gain(double s_re[2][30720],
//printf("DL: amp1 %f dB (%d,%d), tx_power %f\n",20*log10(amp1),input_offset,input_offset_meas,txpwr_dBm);
*/
for (i=0; i<length; i++) {
for (aa=0; aa<nb_tx_antennas; aa++) {
s_re[aa][i] = amp*((double)(((short *)input[aa]))[((i+input_offset)<<1)])/amp1; ///(1<<(B-1));
......
......@@ -64,16 +64,16 @@ void rf_rx(double **r_re,
double IQ_imb_dB,
double IQ_phase);
void rf_rx_simple(double r_re[2][30720],
double r_im[2][30720],
void rf_rx_simple(double *r_re[2],
double *r_im[2],
unsigned int nb_rx_antennas,
unsigned int length,
double s_time,
double rx_gain_dB);
void adc(double r_re[2][30720],
double r_im[2][30720],
void adc(double *r_re[2],
double *r_im[2],
unsigned int input_offset,
unsigned int output_offset,
int **output,
......@@ -81,8 +81,8 @@ void adc(double r_re[2][30720],
unsigned int length,
unsigned char B);
void dac(double s_re[2][30720],
double s_im[2][30720],
void dac(double *s_re[2],
double *s_im[2],
int **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
......@@ -92,8 +92,8 @@ void dac(double s_re[2][30720],
unsigned int meas_length,
unsigned int meas_offset);
double dac_fixed_gain(double s_re[2][30720],
double s_im[2][30720],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
int **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
......
......@@ -206,8 +206,8 @@ void rf_rx(double **r_re,
}
}
void rf_rx_simple(double r_re[2][30720],
double r_im[2][30720],
void rf_rx_simple(double *r_re[2],
double *r_im[2],
unsigned int nb_rx_antennas,
unsigned int length,
double s_time,
......
......@@ -219,10 +219,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
/**\fn void multipath_channel(channel_desc_t *desc,
double tx_sig_re[2][30720],
double tx_sig_im[2][30720],
double rx_sig_re[2][30720],
double rx_sig_im[2][30720],
double tx_sig_re[2],
double tx_sig_im[2],
double rx_sig_re[2],
double rx_sig_im[2],
uint32_t length,
uint8_t keep_channel)
......@@ -237,10 +237,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
*/
void multipath_channel(channel_desc_t *desc,
double tx_sig_re[2][30720],
double tx_sig_im[2][30720],
double rx_sig_re[2][30720],
double rx_sig_im[2][30720],
double *tx_sig_re[2],
double *tx_sig_im[2],
double *rx_sig_re[2],
double *rx_sig_im[2],
uint32_t length,
uint8_t keep_channel);
/*
......
......@@ -44,10 +44,10 @@ uint8_t multipath_channel_nosigconv(channel_desc_t *desc)
//#define CHANNEL_SSE
#ifdef CHANNEL_SSE
void multipath_channel(channel_desc_t *desc,
double tx_sig_re[2][30720],
double tx_sig_im[2][30720],
double rx_sig_re[2][30720],
double rx_sig_im[2][30720],
double tx_sig_re[2][30720*2],
double tx_sig_im[2][30720*2],
double rx_sig_re[2][30720*2],
double rx_sig_im[2][30720*2],
uint32_t length,
uint8_t keep_channel)
{
......@@ -150,10 +150,10 @@ void multipath_channel(channel_desc_t *desc,
#else
void multipath_channel(channel_desc_t *desc,
double tx_sig_re[2][30720],
double tx_sig_im[2][30720],
double rx_sig_re[2][30720],
double rx_sig_im[2][30720],
double *tx_sig_re[2],
double *tx_sig_im[2],
double *rx_sig_re[2],
double *rx_sig_im[2],
uint32_t length,
uint8_t keep_channel)
{
......
......@@ -215,6 +215,7 @@ typedef struct protocol_ctxt_s {
frame_t frame; /*!< \brief LTE frame number.*/
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */
} protocol_ctxt_t;
// warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
......
......@@ -179,7 +179,7 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
} RrcConfigurationReq;
// UE: NAS -> RRC messages
......
This diff is collapsed.
This diff is collapsed.
......@@ -187,6 +187,9 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n310[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_t311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[CC_id] = enb_properties->properties[enb_id]->ue_TransmissionMode[CC_id];
}
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
......@@ -255,6 +258,8 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end, con
str = inet_ntoa(addr);
strcpy(s1ap_register_eNB->enb_ip_address.ipv4_address, str);
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
register_enb_pending++;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment