Commit f4e9e62c authored by Francesco Mani's avatar Francesco Mani

Merge remote-tracking branch 'origin/develop' into NR_RRC_harq_hacks

parents 079afffb 2a748e1a
...@@ -57,6 +57,7 @@ OAI_UE_PROCESS_ASSERTION = -22 ...@@ -57,6 +57,7 @@ OAI_UE_PROCESS_ASSERTION = -22
OAI_UE_PROCESS_FAILED = -23 OAI_UE_PROCESS_FAILED = -23
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24 OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
OAI_UE_PROCESS_SEG_FAULT = -25 OAI_UE_PROCESS_SEG_FAULT = -25
OAI_UE_PROCESS_NO_MBMS_MSGS = -26
OAI_UE_PROCESS_OK = +6 OAI_UE_PROCESS_OK = +6
UE_STATUS_DETACHED = 0 UE_STATUS_DETACHED = 0
......
...@@ -326,7 +326,7 @@ class HTMLManagement(): ...@@ -326,7 +326,7 @@ class HTMLManagement():
continue continue
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <th colspan=8>' + str('eNB') + ' Server Characteristics</th>\n') self.htmlFile.write(' <th colspan=8>' + str(machine) + ' Server Characteristics</th>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td>OS Version</td>\n') self.htmlFile.write(' <td>OS Version</td>\n')
......
...@@ -2436,6 +2436,7 @@ class OaiCiTest(): ...@@ -2436,6 +2436,7 @@ class OaiCiTest():
nrCRCOK = 0 nrCRCOK = 0
mbms_messages = 0 mbms_messages = 0
HTML.SethtmlUEFailureMsg('') HTML.SethtmlUEFailureMsg('')
global_status = CONST.ALL_PROCESSES_OK
for line in ue_log_file.readlines(): for line in ue_log_file.readlines():
result = re.search('nr_synchro_time', str(line)) result = re.search('nr_synchro_time', str(line))
if result is not None: if result is not None:
...@@ -2629,36 +2630,36 @@ class OaiCiTest(): ...@@ -2629,36 +2630,36 @@ class OaiCiTest():
else: else:
statMsg = 'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)' statMsg = 'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)'
logging.debug('\u001B[1;30;41m ' + statMsg + ' \u001B[0m') logging.debug('\u001B[1;30;41m ' + statMsg + ' \u001B[0m')
global_status = OAI_UE_PROCESS_NO_MBMS_MSGS
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + statMsg + '\n') HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + statMsg + '\n')
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
if not nrUEFlag: if not nrUEFlag:
return CONST.OAI_UE_PROCESS_SEG_FAULT global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
else: else:
if not frequency_found: if not frequency_found:
return CONST.OAI_UE_PROCESS_SEG_FAULT global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
if foundAssertion: if foundAssertion:
logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m') logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m')
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE showed an assertion!\n') HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE showed an assertion!\n')
if not nrUEFlag: if not nrUEFlag:
if not mib_found or not frequency_found: if not mib_found or not frequency_found:
return CONST.OAI_UE_PROCESS_ASSERTION global_status = CONST.OAI_UE_PROCESS_ASSERTION
else: else:
if not frequency_found: if not frequency_found:
return CONST.OAI_UE_PROCESS_ASSERTION global_status = CONST.OAI_UE_PROCESS_ASSERTION
if foundRealTimeIssue: if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m') logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE faced real time issues!\n') HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE faced real time issues!\n')
#return CONST.ENB_PROCESS_REALTIME_ISSUE
if nrUEFlag: if nrUEFlag:
if not frequency_found: if not frequency_found:
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
else: else:
if no_cell_sync_found and not mib_found: if no_cell_sync_found and not mib_found:
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m') logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m')
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE could not synchronize!\n') HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE could not synchronize!\n')
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
return 0 return global_status
def TerminateFlexranCtrl(self): def TerminateFlexranCtrl(self):
......
...@@ -366,7 +366,7 @@ class RANManagement(): ...@@ -366,7 +366,7 @@ class RANManagement():
count = 40 count = 40
buildOAIprocess = True buildOAIprocess = True
while (count > 0) and buildOAIprocess: while (count > 0) and buildOAIprocess:
mySSH.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 3) mySSH.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 6)
result = re.search('build_oai', mySSH.getBefore()) result = re.search('build_oai', mySSH.getBefore())
if result is None: if result is None:
buildOAIprocess = False buildOAIprocess = False
...@@ -610,7 +610,11 @@ class RANManagement(): ...@@ -610,7 +610,11 @@ class RANManagement():
enbDidSync = True enbDidSync = True
time.sleep(10) time.sleep(10)
if enbDidSync and eNBinNoS1: rruCheck = False
result = re.search('^rru|^du.band', str(config_file))
if result is not None:
rruCheck = True
if enbDidSync and eNBinNoS1 and not rruCheck:
mySSH.command('ifconfig oaitun_enb1', '\$', 4) mySSH.command('ifconfig oaitun_enb1', '\$', 4)
mySSH.command('ifconfig oaitun_enb1', '\$', 4) mySSH.command('ifconfig oaitun_enb1', '\$', 4)
result = re.search('inet addr:1|inet 1', mySSH.getBefore()) result = re.search('inet addr:1|inet 1', mySSH.getBefore())
...@@ -815,6 +819,7 @@ class RANManagement(): ...@@ -815,6 +819,7 @@ class RANManagement():
X2HO_state = CONST.X2_HO_REQ_STATE__IDLE X2HO_state = CONST.X2_HO_REQ_STATE__IDLE
X2HO_inNbProcedures = 0 X2HO_inNbProcedures = 0
X2HO_outNbProcedures = 0 X2HO_outNbProcedures = 0
global_status = CONST.ALL_PROCESSES_OK
for line in enb_log_file.readlines(): for line in enb_log_file.readlines():
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE: if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line)) result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
...@@ -1033,30 +1038,23 @@ class RANManagement(): ...@@ -1033,30 +1038,23 @@ class RANManagement():
rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU' rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
htmleNBFailureMsg += rruMsg + '\n' htmleNBFailureMsg += rruMsg + '\n'
self.prematureExit(True) self.prematureExit = True
return CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED global_status = CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with a Segmentation Fault! \u001B[0m')
if self.htmlObj is not None: global_status = CONST.ENB_PROCESS_SEG_FAULT
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
return CONST.ENB_PROCESS_SEG_FAULT
if foundAssertion: if foundAssertion:
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with an assertion! \u001B[0m') logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with an assertion! \u001B[0m')
htmleNBFailureMsg += msgAssertion htmleNBFailureMsg += msgAssertion
if self.htmlObj is not None: global_status = CONST.ENB_PROCESS_ASSERTION
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
return CONST.ENB_PROCESS_ASSERTION
if foundRealTimeIssue: if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m') logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m')
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n' htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n'
#return CONST.ENB_PROCESS_REALTIME_ISSUE
if rlcDiscardBuffer > 0: if rlcDiscardBuffer > 0:
rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)' rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
htmleNBFailureMsg += rlcMsg + '\n' htmleNBFailureMsg += rlcMsg + '\n'
if self.htmlObj is not None: global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
return CONST.ENB_PROCESS_REALTIME_ISSUE
if self.htmlObj is not None: if self.htmlObj is not None:
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg) self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
return 0 return global_status
...@@ -724,8 +724,8 @@ function report_test { ...@@ -724,8 +724,8 @@ function report_test {
echo " </pre></td>" >> ./test_simulator_results.html echo " </pre></td>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html
fi fi
#PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_ping*.log 2> /dev/null` PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_ping*.log 2> /dev/null`
#analyzePingFiles analyzePingFiles
IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_iperf_dl*client*txt 2> /dev/null` IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_iperf_dl*client*txt 2> /dev/null`
analyzeIperfFiles analyzeIperfFiles
......
...@@ -529,9 +529,9 @@ function install_epc_on_vm { ...@@ -529,9 +529,9 @@ function install_epc_on_vm {
echo "############################################################" echo "############################################################"
echo "[ -f 01proxy ] && sudo cp 01proxy /etc/apt/apt.conf.d/" > $LOC_EPC_VM_CMDS echo "[ -f 01proxy ] && sudo cp 01proxy /etc/apt/apt.conf.d/" > $LOC_EPC_VM_CMDS
echo "touch /home/ubuntu/.hushlogin" >> $LOC_EPC_VM_CMDS echo "touch /home/ubuntu/.hushlogin" >> $LOC_EPC_VM_CMDS
echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf\"" >> $LOC_EPC_VM_CMDS echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf\"" >> $LOC_EPC_VM_CMDS
echo "sudo apt-get update > zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS echo "sudo apt-get update > zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS
echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf >> zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS
# Installing HSS # Installing HSS
echo "echo \"cd /opt\"" >> $LOC_EPC_VM_CMDS echo "echo \"cd /opt\"" >> $LOC_EPC_VM_CMDS
...@@ -594,8 +594,6 @@ function start_epc { ...@@ -594,8 +594,6 @@ function start_epc {
echo "echo \"cd /opt/hss_sim0609\"" > $LOC_EPC_VM_CMDS echo "echo \"cd /opt/hss_sim0609\"" > $LOC_EPC_VM_CMDS
echo "cd /opt/hss_sim0609" >> $LOC_EPC_VM_CMDS echo "cd /opt/hss_sim0609" >> $LOC_EPC_VM_CMDS
echo "sudo rm -f hss.log" >> $LOC_EPC_VM_CMDS echo "sudo rm -f hss.log" >> $LOC_EPC_VM_CMDS
#echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $LOC_EPC_VM_CMDS
#echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $LOC_EPC_VM_CMDS
echo "echo \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS echo "echo \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS
echo "sudo su -c \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS echo "sudo su -c \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS
...@@ -662,8 +660,6 @@ function terminate_epc { ...@@ -662,8 +660,6 @@ function terminate_epc {
echo "cd /opt/ltebox/tools" >> $1 echo "cd /opt/ltebox/tools" >> $1
echo "echo \"sudo ./stop_ltebox\"" >> $1 echo "echo \"sudo ./stop_ltebox\"" >> $1
echo "sudo ./stop_ltebox" >> $1 echo "sudo ./stop_ltebox" >> $1
echo "echo \"sudo daemon --name=simulated_hss --stop\"" >> $1
echo "sudo daemon --name=simulated_hss --stop" >> $1
echo "echo \"sudo killall --signal SIGKILL hss_sim\"" >> $1 echo "echo \"sudo killall --signal SIGKILL hss_sim\"" >> $1
echo "sudo killall --signal SIGKILL hss_sim" >> $1 echo "sudo killall --signal SIGKILL hss_sim" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1 ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<testCase id="010101"> <testCase id="010101">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build RCC</desc> <desc>Build RCC</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
<backgroundBuild>True</backgroundBuild> <backgroundBuild>True</backgroundBuild>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<testCase id="000101"> <testCase id="000101">
<class>WaitEndBuild_eNB</class> <class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build RCC</desc> <desc>Wait for end of Build RCC</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
</testCase> </testCase>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<testCase id="010102"> <testCase id="010102">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build Master RRU</desc> <desc>Build Master RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
<backgroundBuild>True</backgroundBuild> <backgroundBuild>True</backgroundBuild>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<testCase id="000102"> <testCase id="000102">
<class>WaitEndBuild_eNB</class> <class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build Master RRU</desc> <desc>Wait for end of Build Master RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
</testCase> </testCase>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<testCase id="010103"> <testCase id="010103">
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build Slave RRU</desc> <desc>Build Slave RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>2</eNB_instance> <eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId> <eNB_serverId>2</eNB_serverId>
<backgroundBuild>True</backgroundBuild> <backgroundBuild>True</backgroundBuild>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<testCase id="000103"> <testCase id="000103">
<class>WaitEndBuild_eNB</class> <class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build Slave RRU</desc> <desc>Wait for end of Build Slave RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args> <Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
<eNB_instance>2</eNB_instance> <eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId> <eNB_serverId>2</eNB_serverId>
</testCase> </testCase>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<htmlTabRef>test-multi-rru-10</htmlTabRef> <htmlTabRef>test-multi-rru-10</htmlTabRef>
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName> <htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount> <repeatCount>2</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030211 030212 030213 030211 030212 030213
030111 030112 030113 030111 030112 030113
......
...@@ -39,6 +39,33 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) ...@@ -39,6 +39,33 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project (OpenAirInterface) project (OpenAirInterface)
##############################################
# Base CUDA setting
##############################################
find_package(CUDA)
if (CUDA_FOUND)
message ("cuda include ${CUDA_INCLUDE_DIRS}")
message ("cuda library ${CUDA_LIBRARY_DIRS}")
add_definitions("-L/usr/local/cuda/lib64")
SET(CUDA_NVCC_FLAGS
"${CUDA_NVCC_FLAGS};-arch=sm_60;")
# Disable warnings for CUDA
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-lpthread;-w;-O3;--default-stream;per-thread;-I/usr/local/cuda/inc;-L/usr/local/cuda/lib -lcutil;-rdc=true;-lcudadevrt")
SET(CUDA_VERBOSE_BUILD ON)
SET(CUDA_HOST_COMPILER "/usr/bin/g++")
SET(CUDA_SEPARABLE_COMPILATION ON)
else (CUDA_FOUND)
message ("No CUDA tool installed")
endif ()
########################################### ###########################################
# macros to define options as there is numerous options in oai # macros to define options as there is numerous options in oai
################################################ ################################################
...@@ -169,13 +196,30 @@ endif() ...@@ -169,13 +196,30 @@ endif()
set(CMAKE_C_FLAGS set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC") "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
# add autotools definitions that were maybe used! # add autotools definitions that were maybe used!
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'") if (CUDA_FOUND)
set(CMAKE_C_FLAGS set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}" set(CUDA_CMAKE_C_FLAGS
) "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D CUDA_FLAG"
set(CMAKE_CXX_FLAGS )
set(CUDA_CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG"
)
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER} -D CUDA_FLAG"
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER} -D CUDA_FLAG"
)
else (CUDA_FOUND)
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER}" "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER}"
) )
endif ()
add_definitions("-DASN_DISABLE_OER_SUPPORT") add_definitions("-DASN_DISABLE_OER_SUPPORT")
...@@ -2798,12 +2842,54 @@ target_link_libraries(smallblocktest ...@@ -2798,12 +2842,54 @@ target_link_libraries(smallblocktest
m pthread ${ATLAS_LIBRARIES} dl m pthread ${ATLAS_LIBRARIES} dl
) )
add_executable(ldpctest
${PHY_NR_CODINGIF} # temp_C_flag = CMAKE_C_FLAGS
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c #set(CMAKE_C_FLAGS " ")
${T_SOURCE} set (TEMP_C_FLAG ${CMAKE_C_FLAGS})
${SHLIB_LOADER_SOURCES} set (CMAKE_C_FLAGS ${CUDA_CMAKE_C_FLAGS})
)
set (TEMP_CXX_FLAG ${CMAKE_CXX_FLAGS})
set (CMAKE_CXX_FLAGS ${CUDA_CMAKE_CXX_FLAGS})
if (CUDA_FOUND)
###################################################
# For CUDA library
###################################################
CUDA_ADD_LIBRARY(LDPC_CU
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
)
CUDA_ADD_CUFFT_TO_TARGET(LDPC_CU)
cuda_add_executable(ldpctest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(ldpctest -ldl
-Wl,--start-group
LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB
-Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl
)
else (CUDA_FOUND)
add_executable(ldpctest
${PHY_NR_CODINGIF}
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
endif ()
set (CMAKE_C_FLAGS ${TEMP_C_FLAG})
set (CMAKE_CXX_FLAGS ${TEMP_CXX_FLAG})
# add_executable(ldpctest
# ${PHY_NR_CODINGIF}
# ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
# ${T_SOURCE}
# ${SHLIB_LOADER_SOURCES}
# )
add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
target_link_libraries(ldpctest target_link_libraries(ldpctest
......
...@@ -702,6 +702,7 @@ function main() { ...@@ -702,6 +702,7 @@ function main() {
echo_info "Compiling physical unitary tests simulators" echo_info "Compiling physical unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim" simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
# simlist="ldpctest"
for f in $simlist ; do for f in $simlist ; do
compilations \ compilations \
phy_simulators $f \ phy_simulators $f \
......
...@@ -303,9 +303,11 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -303,9 +303,11 @@ The following features are valid for the gNB and the 5G-NR UE.
**gNB MAC** **gNB MAC**
- MAC -> PHY configuration using NR FAPI P5 interface - MAC -> PHY configuration using NR FAPI P5 interface
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU - MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
- Scheduler for RA procedure at gNB - Scheduler for RA procedreat gNB
- MAC downlink scheduler (fixed allocations) - MAC downlink scheduler (fixed allocations)
- MAC header generation (including timing advance) - MAC header generation (including timing advance)
- ACK / NACK handling and HARQ procedures for downlink
- **As of May 2020** only DL was validated with COTS phone ; UL in progress, validated with OAI UE in noS1 mode
# OpenAirInterface 5G-NR UE Feature Set # # OpenAirInterface 5G-NR UE Feature Set #
...@@ -351,7 +353,11 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -351,7 +353,11 @@ The following features are valid for the gNB and the 5G-NR UE.
- Initial sync and MIB detection - Initial sync and MIB detection
- MAC -> PHY configuration of PHY via UE FAPI P5 interface - MAC -> PHY configuration of PHY via UE FAPI P5 interface
- Basic MAC to control PHY via UE FAPI P7 interface - Basic MAC to control PHY via UE FAPI P7 interface
<<<<<<< HEAD
- Random access procedure - Random access procedure
=======
- Random ccess procedure
>>>>>>> origin/develop
**RLC** **RLC**
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "SIMULATION/TOOLS/sim.h" #include "SIMULATION/TOOLS/sim.h"
#include "PHY/CODING/nrLDPC_extern.h" #include "PHY/CODING/nrLDPC_extern.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h"
#define MAX_NUM_DLSCH_SEGMENTS 16 #define MAX_NUM_DLSCH_SEGMENTS 16
#define MAX_BLOCK_LENGTH 8448 #define MAX_BLOCK_LENGTH 8448
...@@ -102,7 +102,8 @@ int test_ldpc(short No_iteration, ...@@ -102,7 +102,8 @@ int test_ldpc(short No_iteration,
unsigned int *crc_misses, unsigned int *crc_misses,
time_stats_t *time_optim, time_stats_t *time_optim,
time_stats_t *time_decoder, time_stats_t *time_decoder,
n_iter_stats_t *dec_iter) n_iter_stats_t *dec_iter,
short run_cuda)
{ {
//clock initiate //clock initiate
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder; //time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
...@@ -114,7 +115,6 @@ int test_ldpc(short No_iteration, ...@@ -114,7 +115,6 @@ int test_ldpc(short No_iteration,
double sigma; double sigma;
sigma = 1.0/sqrt(2*SNR); sigma = 1.0/sqrt(2*SNR);
opp_enabled=1; opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz(); cpu_freq_GHz = get_cpu_freq_GHz();
//short test_input[block_length]; //short test_input[block_length];
...@@ -400,12 +400,22 @@ int test_ldpc(short No_iteration, ...@@ -400,12 +400,22 @@ int test_ldpc(short No_iteration,
for(j=0;j<n_segments;j++) { for(j=0;j<n_segments;j++) {
start_meas(time_decoder); start_meas(time_decoder);
// decode the sequence #ifdef CUDA_FLAG
// decoder supports BG2, Z=128 & 256 if(run_cuda){
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate)); printf("***********run ldpc by cuda\n");
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL); n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder);
}
else{
printf("**************run ldpc by cpu\n");
// decode the sequence
// decoder supports BG2, Z=128 & 256
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler); n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
}
#else
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
#endif
stop_meas(time_decoder); stop_meas(time_decoder);
} }
...@@ -513,6 +523,8 @@ int main(int argc, char *argv[]) ...@@ -513,6 +523,8 @@ int main(int argc, char *argv[])
short No_iteration=5; short No_iteration=5;
int n_segments=1; int n_segments=1;
//double rate=0.333; //double rate=0.333;
short run_cuda = 0;
int nom_rate=1; int nom_rate=1;
int denom_rate=3; int denom_rate=3;
double SNR0=-2.0,SNR,SNR_lin; double SNR0=-2.0,SNR,SNR_lin;
...@@ -531,7 +543,7 @@ int main(int argc, char *argv[]) ...@@ -531,7 +543,7 @@ int main(int argc, char *argv[])
short BG=0,Zc,Kb=0; short BG=0,Zc,Kb=0;
while ((c = getopt (argc, argv, "q:r:s:S:l:n:d:i:t:u:h")) != -1) while ((c = getopt (argc, argv, "q:r:s:S:l:G:n:d:i:t:u:h")) != -1)
switch (c) switch (c)
{ {
case 'q': case 'q':
...@@ -549,6 +561,10 @@ int main(int argc, char *argv[]) ...@@ -549,6 +561,10 @@ int main(int argc, char *argv[])
case 'l': case 'l':
block_length = atoi(optarg); block_length = atoi(optarg);
break; break;
case 'G':
run_cuda = atoi(optarg);
break;
case 'n': case 'n':
n_trials = atoi(optarg); n_trials = atoi(optarg);
...@@ -584,6 +600,7 @@ int main(int argc, char *argv[]) ...@@ -584,6 +600,7 @@ int main(int argc, char *argv[])
printf("-r Nominator rate, (1, 2, 22), Default: 1\n"); printf("-r Nominator rate, (1, 2, 22), Default: 1\n");
printf("-d Denominator rate, (3, 5, 25), Default: 1\n"); printf("-d Denominator rate, (3, 5, 25), Default: 1\n");
printf("-l Block length (l > 3840 -> BG1, rest BG2 ), Default: 8448\n"); printf("-l Block length (l > 3840 -> BG1, rest BG2 ), Default: 8448\n");
printf("-G give 1 to run cuda for LDPC, Default: 0\n");
printf("-n Number of simulation trials, Default: 1\n"); printf("-n Number of simulation trials, Default: 1\n");
//printf("-M MCS2 for TB 2\n"); //printf("-M MCS2 for TB 2\n");
printf("-s SNR per information bit (EbNo) in dB, Default: -2\n"); printf("-s SNR per information bit (EbNo) in dB, Default: -2\n");
...@@ -674,7 +691,8 @@ int main(int argc, char *argv[]) ...@@ -674,7 +691,8 @@ int main(int argc, char *argv[])
&crc_misses, &crc_misses,
time_optim, time_optim,
time_decoder, time_decoder,
dec_iter); dec_iter,
run_cuda);
printf("SNR %f, BLER %f (%u/%d)\n", SNR, (float)decoded_errors[i]/(float)n_trials, decoded_errors[i], n_trials); printf("SNR %f, BLER %f (%u/%d)\n", SNR, (float)decoded_errors[i]/(float)n_trials, decoded_errors[i], n_trials);
printf("SNR %f, BER %f (%u/%d)\n", SNR, (float)errors_bit/(float)n_trials/(float)block_length/(double)n_segments, decoded_errors[i], n_trials); printf("SNR %f, BER %f (%u/%d)\n", SNR, (float)errors_bit/(float)n_trials/(float)block_length/(double)n_segments, decoded_errors[i], n_trials);
......
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.
#ifndef __NR_LDPC_DECODER_LYC__H__
#define __NR_LDPC_DECODER_LYC__H__
/*! \file PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h
* \brief LDPC cuda support BG1 all length
* \author NCTU OpinConnect Terng-Yin Hsu,WEI-YING,LIN
* \email tyhsu@cs.nctu.edu.tw
* \date 13-05-2020
* \version
* \note
* \warning
*/
/***
\brief LDPC decoder
\param p_decParams LDPC decoder parameters
\param p_llr Input LLRs
\param p_llrOut Output vector
\param p_profiler LDPC profiler statistics
****/
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder);
#endif
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