merge to develop

parent a1024058
...@@ -4,7 +4,7 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di ...@@ -4,7 +4,7 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
However, the source code also contains third party software that is acknowledged here for reference. However, the source code also contains third party software that is acknowledged here for reference.
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/liblfds6.1.1/ ## ## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
See on [liblfds website](https://liblfds.org/) the license section. See on [liblfds website](https://liblfds.org/) the license section.
......
...@@ -5,3 +5,5 @@ iperf_*.* ...@@ -5,3 +5,5 @@ iperf_*.*
phones_list.txt phones_list.txt
modules_list.txt modules_list.txt
test_results*.html test_results*.html
pMain*
__pycache__
...@@ -62,6 +62,7 @@ def r2labUE0IpAddr = r2labBaseIpAddr + r2labUE0Idx ...@@ -62,6 +62,7 @@ def r2labUE0IpAddr = r2labBaseIpAddr + r2labUE0Idx
def r2labENB1Idx = '16' def r2labENB1Idx = '16'
def r2labENB1 = 'fit' + r2labENB1Idx def r2labENB1 = 'fit' + r2labENB1Idx
def r2labENB1IpAddr = r2labBaseIpAddr + r2labENB1Idx def r2labENB1IpAddr = r2labBaseIpAddr + r2labENB1Idx
def r2labDoAllOff = true
pipeline { pipeline {
agent { agent {
...@@ -136,19 +137,49 @@ pipeline { ...@@ -136,19 +137,49 @@ pipeline {
sh "python3 /home/eurecom/inria-scripts/booking-lease.py --book-lease --from ${BOOK_TIMESTAMP}T${r2labStartTime} --duration ${r2labDuration} --slice inria_oaici ${r2labuser} ${r2labpassword}" sh "python3 /home/eurecom/inria-scripts/booking-lease.py --book-lease --from ${BOOK_TIMESTAMP}T${r2labStartTime} --duration ${r2labDuration} --slice inria_oaici ${r2labuser} ${r2labpassword}"
sh "python3 /home/eurecom/inria-scripts/booking-lease.py --get-leases ${r2labuser} ${r2labpassword} | grep -v nightly" sh "python3 /home/eurecom/inria-scripts/booking-lease.py --get-leases ${r2labuser} ${r2labpassword} | grep -v nightly"
} }
// Adding a tempo after booking leases
sh "sleep 10"
LEASE_STATUS = sh returnStdout: true, script: "ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
LEASE_STATUS = LEASE_STATUS.trim()
if (LEASE_STATUS ==~ /.*Access currently denied to inria_oaici.*/) {
r2labDoAllOff = false
currentBuild.result = 'ABORTED'
error('Stopping early because R2LAB not available')
}
} }
} }
} }
stage ("Load Images") { stage ("Load Images") {
steps { steps {
script { script {
sh "ssh -t inria_oaici@faraday.inria.fr 'all-off'"
sh "sleep 10"
echo '\u2705 \u001B[32mLoad Image for Python Executor\u001B[0m' echo '\u2705 \u001B[32mLoad Image for Python Executor\u001B[0m'
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'" try {
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'" sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
} catch (Exception e) {
echo "Why is it wrong?"
}
try {
//sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait ${r2labPythonExeIdx}'"
} catch (Exception e) {
echo "Why is it wrong?"
}
echo '\u2705 \u001B[32mLoad Image for two (2) eNBs\u001B[0m' echo '\u2705 \u001B[32mLoad Image for two (2) eNBs\u001B[0m'
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'" try {
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'" sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
} catch (Exception e) {
echo "Why is it wrong?"
}
try {
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
} catch (Exception e) {
echo "Why is it wrong?"
}
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'" sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
sh "sleep 5" sh "sleep 5"
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'" sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
...@@ -415,9 +446,11 @@ pipeline { ...@@ -415,9 +446,11 @@ pipeline {
post { post {
always { always {
script { script {
echo '\u2705 \u001B[32mShutdown every node\u001B[0m' if (r2labDoAllOff) {
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"' echo '\u2705 \u001B[32mShutdown every node\u001B[0m'
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"' sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
}
} }
} }
} }
......
...@@ -62,6 +62,30 @@ then ...@@ -62,6 +62,30 @@ then
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted ` NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT" echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
# Testing Circular Dependencies protection
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
# Testing if explicit GNU GPL license banner
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . > files-w-gnu-gpl-license-banner.txt
# Looking at exotic/suspect banner
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
for FILE in $LIST_OF_FILES_W_BANNER
do
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then
echo $FILE >> ./files-w-suspect-banner.txt
fi
fi
done
exit 0 exit 0
fi fi
...@@ -131,8 +155,25 @@ if [ -f oai_rules_result_list.txt ] ...@@ -131,8 +155,25 @@ if [ -f oai_rules_result_list.txt ]
then then
rm -f oai_rules_result_list.txt rm -f oai_rules_result_list.txt
fi fi
if [ -f header-files-w-incorrect-define.txt ]
then
rm -f header-files-w-incorrect-define.txt
fi
if [ -f files-w-gnu-gpl-license-banner.txt ]
then
rm -f files-w-gnu-gpl-license-banner.txt
fi
if [ -f files-w-suspect-banner.txt ]
then
rm -f files-w-suspect-banner.txt
fi
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define-tmp.txt
for FULLFILE in $MODIFIED_FILES for FULLFILE in $MODIFIED_FILES
do do
# sometimes, we remove files
if [ ! -f $FULLFILE ]; then continue; fi
filename=$(basename -- "$FULLFILE") filename=$(basename -- "$FULLFILE")
EXT="${filename##*.}" EXT="${filename##*.}"
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ] if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
...@@ -144,8 +185,32 @@ do ...@@ -144,8 +185,32 @@ do
echo $FULLFILE echo $FULLFILE
echo $FULLFILE >> ./oai_rules_result_list.txt echo $FULLFILE >> ./oai_rules_result_list.txt
fi fi
# Testing if explicit GNU GPL license banner
egrep -i "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
# Looking at exotic/suspect banner
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE`
if [ $IS_BANNER -ne 0 ]
then
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then
echo $FILE >> ./files-w-suspect-banner.txt
fi
fi
fi
fi
# Testing Circular Dependencies protection
if [ $EXT = "h" ] || [ $EXT = "hpp" ]
then
grep $FULLFILE header-files-w-incorrect-define-tmp.txt >> header-files-w-incorrect-define.txt
fi fi
done done
rm -f header-files-w-incorrect-define-tmp.txt
echo "" echo ""
echo " ----------------------------------------------------------" echo " ----------------------------------------------------------"
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT" echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
......
...@@ -288,7 +288,7 @@ MCEs = ( ...@@ -288,7 +288,7 @@ MCEs = (
mnc_length = 2; mnc_length = 2;
} }
service_id=0; service_id=0;
lcid=8; #this must be properly defined lcid:8+service:0 -> rab_id:8 lcid=5; #this must be properly defined lcid:8+service:0 -> rab_id:5
} }
); );
} }
......
...@@ -76,6 +76,11 @@ nullPointer:common/utils/T/local_tracer.c:243 ...@@ -76,6 +76,11 @@ nullPointer:common/utils/T/local_tracer.c:243
// first iteration of the loop // first iteration of the loop
nullPointer:common/utils/T/tracer/multi.c:264 nullPointer:common/utils/T/tracer/multi.c:264
nullPointer:common/utils/T/tracer/multi.c:265 nullPointer:common/utils/T/tracer/multi.c:265
//-----------------------------------------------------------------------------
// this file is used for testing the RLC V2 implementation, this error is
// not a problem, the programmer has to know what she does when writing
// the tests
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
// //
//***************************************************************************** //*****************************************************************************
// //
......
This diff is collapsed.
...@@ -492,6 +492,77 @@ function report_build { ...@@ -492,6 +492,77 @@ function report_build {
awk '{print " <tr><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html awk '{print " <tr><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
echo " </table>" >> ./build_results.html echo " </table>" >> ./build_results.html
echo " </div>" >> ./build_results.html echo " </div>" >> ./build_results.html
echo " <br>" >> ./build_results.html
fi
if [ -f ./header-files-w-incorrect-define.txt ]
then
NB_FILES_IN_ERROR=`wc -l ./header-files-w-incorrect-define.txt | sed -e "s@ .*@@"`
if [ $NB_FILES_IN_ERROR -eq 0 ]
then
echo " <div class=\"alert alert-success\">" >> ./build_results.html
if [ $MR_TRIG -eq 1 ]; then echo " <strong>No Issue for CIRCULAR DEPENDENCY PROTECTION in modified files</strong>" >> ./build_results.html; fi
if [ $PU_TRIG -eq 1 ]; then echo " <strong>No Issue for CIRCULAR DEPENDENCY PROTECTION in the whole repository</strong>" >> ./build_results.html; fi
echo " </div>" >> ./build_results.html
else
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files MAY NOT HAVE CIRCULAR DEPENDENCY PROTECTION</strong>" >> ./build_results.html; fi
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository MAY NOT HAVE CIRCULAR DEPENDENCY PROTECTION in the whole repository</strong>" >> ./build_results.html; fi
echo " </div>" >> ./build_results.html
echo " <button data-toggle=\"collapse\" data-target=\"#oai-circular-details\">More details on circular dependency protection check</button>" >> ./build_results.html
echo " <div id=\"oai-circular-details\" class=\"collapse\">" >> ./build_results.html
echo " <table border = 1>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <th bgcolor = \"lightcyan\" >Potential Issue</th>" >> ./build_results.html
echo " <th bgcolor = \"lightcyan\" >Impacted File</th>" >> ./build_results.html
echo " <th bgcolor = \"lightcyan\" >Incorrect Macro</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
awk '{if($0 ~/error in/){print " <tr><td>error in declaration</td><td>"$4"</td><td>"$5"</td></tr>"};if($0 ~/files with same/){print " <tr><td>files with same #define</td><td>"$5"</td><td>"$6"</td></tr>"}}' ./header-files-w-incorrect-define.txt >> ./build_results.html
echo " </table>" >> ./build_results.html
echo " </div>" >> ./build_results.html
echo " <br>" >> ./build_results.html
fi
fi
if [ -f ./files-w-gnu-gpl-license-banner.txt ]
then
NB_FILES_IN_ERROR=`wc -l ./files-w-gnu-gpl-license-banner.txt | sed -e "s@ .*@@"`
if [ $NB_FILES_IN_ERROR -ne 0 ]
then
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a GNU GPL license banner</strong>" >> ./build_results.html; fi
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository HAVE a GNU GPL license banner</strong>" >> ./build_results.html; fi
echo " </div>" >> ./build_results.html
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-gpl\">More details on GNU GPL license banner issue</button>" >> ./build_results.html
echo " <div id=\"oai-license-gpl\" class=\"collapse\">" >> ./build_results.html
echo " <table border = 1>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
awk '{print " <tr><td>"$1"</td></tr>"}' ./files-w-gnu-gpl-license-banner.txt >> ./build_results.html
echo " </table>" >> ./build_results.html
echo " </div>" >> ./build_results.html
echo " <br>" >> ./build_results.html
fi
fi
if [ -f ./files-w-suspect-banner.txt ]
then
NB_FILES_IN_ERROR=`wc -l ./files-w-suspect-banner.txt | sed -e "s@ .*@@"`
if [ $NB_FILES_IN_ERROR -ne 0 ]
then
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a suspect license banner</strong>" >> ./build_results.html; fi
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository HAVE a suspect license banner</strong>" >> ./build_results.html; fi
echo " </div>" >> ./build_results.html
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-suspect\">More details on suspect banner files</button>" >> ./build_results.html
echo " <div id=\"oai-license-suspect\" class=\"collapse\">" >> ./build_results.html
echo " <table border = 1>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
awk '{print " <tr><td>"$1"</td></tr>"}' ././files-w-suspect-banner.txt >> ./build_results.html
echo " </table>" >> ./build_results.html
echo " </div>" >> ./build_results.html
echo " <br>" >> ./build_results.html
fi
fi fi
fi fi
......
This diff is collapsed.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<htmlTabRef>test-lte-m-10-tm1</htmlTabRef> <htmlTabRef>test-lte-m-10-tm1</htmlTabRef>
<htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName> <htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040102 040102
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<htmlTabRef>test-05-tm2</htmlTabRef> <htmlTabRef>test-05-tm2</htmlTabRef>
<htmlTabName>Test-05MHz-TM2</htmlTabName> <htmlTabName>Test-05MHz-TM2</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>3</repeatCount> <repeatCount>2</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Waiting for 35 seconds</desc> <desc>Waiting for 55 seconds</desc>
<idle_sleep_time_in_sec>35</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>55</idle_sleep_time_in_sec>
</testCase> </testCase>
<testCase id="000002"> <testCase id="000002">
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Waiting for 45 seconds</desc> <desc>Waiting for 55 seconds</desc>
<idle_sleep_time_in_sec>45</idle_sleep_time_in_sec> <idle_sleep_time_in_sec>55</idle_sleep_time_in_sec>
</testCase> </testCase>
<testCase id="000002"> <testCase id="000002">
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<testCase id="030102"> <testCase id="030102">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc> <desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
</testCase> </testCase>
<testCase id="030201"> <testCase id="030201">
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<testCase id="030101"> <testCase id="030101">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc> <desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
</testCase> </testCase>
<testCase id="030201"> <testCase id="030201">
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<testCase id="030103"> <testCase id="030103">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc> <desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
</testCase> </testCase>
<testCase id="030201"> <testCase id="030201">
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<testCase id="030104"> <testCase id="030104">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB #0 (FDD/Band7/5MHz)</desc> <desc>Initialize eNB #0 (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 123456</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 123456</Initialize_eNB_args>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
</testCase> </testCase>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<testCase id="030105"> <testCase id="030105">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB #1 (FDD/Band7/5MHz)</desc> <desc>Initialize eNB #1 (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 98765</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 98765</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
</testCase> </testCase>
......
This diff is collapsed.
...@@ -1104,9 +1104,8 @@ ...@@ -1104,9 +1104,8 @@
-n100 -R217 -a80 -s5 -n100 -R217 -a80 -s5
-n100 -R217 -a110 -s5 -b100 -n100 -R217 -a110 -s5 -b100
-n100 -e27 -s30 -n100 -e27 -s30
-n100 -e16 -s10 -n100 -e16 -s10</main_exec_args>
</main_exec_args> <tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10</tags>
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 </tags>
<search_expr_true>PDSCH test OK</search_expr_true> <search_expr_true>PDSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns> <nruns>3</nruns>
...@@ -1177,21 +1176,38 @@ ...@@ -1177,21 +1176,38 @@
<testCase id="015109"> <testCase id="015109">
<class>execution</class> <class>execution</class>
<desc>nr_pucchsim Test cases. (Test1: Format 0 ACK miss 106 PRB), <desc>nr_pucchsim Test cases. (Test1: Format 0 1-bit ACK miss 106 PRB),
(Test2: Format 1 ACK miss 106 PRB), (Test2: Format 0 2-bit ACK miss 106 PRB),
(Test3: Format 1 ACK miss 273 PRB), (Test3: Format 0 2-bit ACK miss, 1-bit SR 106 PRB),
(Test4: Format 1 NACKtoACK 106 PRB)</desc> (Test4: Format 2 3-bit 106 PRB),
(Test5: Format 2 4-bit 106 PRB),
(Test6: Format 2 5-bit 106 PRB),
(Test7: Format 2 6-bit 106 PRB),
(Test8: Format 2 7-bit 106 PRB),
(Test9: Format 2 8-bit 106 PRB),
(Test10: Format 2 9-bit 106 PRB),
(Test11: Format 2 10-bit 106 PRB),
(Test12: Format 2 11-bit 106 PRB)</desc>
<pre_compile_prog></pre_compile_prog> <pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog> <compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args> <compile_prog_args> --phy_simulators -c </compile_prog_args>
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec> <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args> <pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/nr_pucchsim.Rel15</main_exec> <main_exec> $OPENAIR_DIR/targets/bin/nr_pucchsim.Rel15</main_exec>
<main_exec_args>-R 106 -i 1 -P 0 -b 1 -s3 -n100 <main_exec_args>-R 106 -i 1 -P 0 -b 1 -s-2 -n1000
-R 106 -i 14 -P 1 -b 1 -s-6 -n100 -R 106 -i 1 -P 0 -b 2 -s-2 -n1000
-R 273 -i 14 -P 1 -b 1 -s-6 -n100 -R 106 -i 1 -P 0 -b 2 -s-2 -c -n1000
-R 106 -i 14 -P 1 -b 1 -s-6 -T 0.001 -n1000</main_exec_args> -R 106 -i 1 -P 2 -b 3 -s0 -n1000
<tags>nr_pucchsim.test1 nr_pucchsim.test2 nr_pucchsim.test3 nr_pucchsim.test4</tags> -R 106 -i 1 -P 2 -b 4 -s0 -n1000
-R 106 -i 1 -P 2 -b 5 -s1 -n1000
-R 106 -i 1 -P 2 -b 6 -s2 -n1000
-R 106 -i 1 -P 2 -b 7 -s3 -n1000
-R 106 -i 1 -P 2 -b 8 -s4 -n1000
-R 106 -i 1 -P 2 -b 9 -s5 -n1000
-R 106 -i 1 -P 2 -b 10 -s6 -n1000
-R 106 -i 1 -P 2 -b 11 -s6 -n1000
</main_exec_args>
<tags>nr_pucchsim.test1 nr_pucchsim.test2 nr_pucchsim.test3 nr_pucchsim.test4 nr_pucchsim.test5 nr_pucchsim.test6 nr_pucchsim.test7 nr_pucchsim.test8 nr_pucchsim.test9 nr_pucchsim.test10 nr_pucchsim.test11 nr_pucchsim.test12 </tags>
<search_expr_true>PUCCH test OK</search_expr_true> <search_expr_true>PUCCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns> <nruns>3</nruns>
...@@ -1248,11 +1264,11 @@ ...@@ -1248,11 +1264,11 @@
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec> <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args> <pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/nr_ulsim.Rel15</main_exec> <main_exec> $OPENAIR_DIR/targets/bin/nr_ulsim.Rel15</main_exec>
<main_exec_args>-n100 -m9 -r106 -s0 <main_exec_args>-n100 -m9 -r106 -s5
-n100 -m16 -s10 -n100 -m16 -s10
-n100 -m28 -s20 -n100 -m28 -s20
-n100 -m9 -R217 -r217 -s0 -n100 -m9 -R217 -r217 -s5
-n100 -m9 -R273 -r273 -s0</main_exec_args> -n100 -m9 -R273 -r273 -s5</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5</tags> <tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5</tags>
<search_expr_true>PUSCH test OK</search_expr_true> <search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
...@@ -408,6 +408,10 @@ function main() { ...@@ -408,6 +408,10 @@ function main() {
SKIP_SHARED_LIB_FLAG="True" SKIP_SHARED_LIB_FLAG="True"
echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries" echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
shift;; shift;;
--ninja)
CMAKE_CMD="$CMAKE_CMD -GNinja"
MAKE_CMD=ninja
shift;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -697,12 +701,7 @@ function main() { ...@@ -697,12 +701,7 @@ function main() {
if [ "$SIMUS_PHY" = "1" ] ; then if [ "$SIMUS_PHY" = "1" ] ; then
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
<<<<<<< HEAD
#simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim"
simlist="ldpctest"
=======
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"
>>>>>>> origin/develop
for f in $simlist ; do for f in $simlist ; do
compilations \ compilations \
phy_simulators $f \ phy_simulators $f \
......
...@@ -14,6 +14,7 @@ set(CMAKE_C_FLAGS ...@@ -14,6 +14,7 @@ set(CMAKE_C_FLAGS
set(OPENAIR_DIR $ENV{OPENAIR_DIR}) set(OPENAIR_DIR $ENV{OPENAIR_DIR})
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3) set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
include_directories (${OPENAIR_DIR}/openair2/COMMON)
set(CONF2UEDATA_LIB_SRC set(CONF2UEDATA_LIB_SRC
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
......
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators") set ( CMAKE_BUILD_TYPE )
set(PHYSIM True) set ( CFLAGS_PROCESSOR_USER "" )
set(RF_BOARD None) set ( UE_EXPANSION False )
set(XFORMS True) set ( PRE_SCD_THREAD False )
set(ENABLE_ITTI True) set ( UESIM_EXPANSION False )
set(DEBUG_PHY False) set ( ENABLE_VCD_FIFO False )
set(MU_RECIEVER False) set ( RF_BOARD "OAI_USRP")
set(NAS_UE False) set ( TRANSP_PRO "None")
set(MESSAGE_CHART_GENERATOR False) set ( PACKAGE_NAME "")
set(RRC_ASN1_VERSION "Rel15") set ( DEADLINE_SCHEDULER "False" )
set(T_TRACER True) set ( CPU_AFFINITY "False" )
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) set ( T_TRACER True )
\ No newline at end of file set ( UE_AUTOTEST_TRACE False )
set ( UE_DEBUG_TRACE False )
set ( UE_TIMING_TRACE False )
set ( USRP_REC_PLAY False )
set ( SKIP_SHARED_LIB_FLAG False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
...@@ -183,11 +183,15 @@ compilations() { ...@@ -183,11 +183,15 @@ compilations() {
else else
COV_SCAN_PREFIX="" COV_SCAN_PREFIX=""
fi fi
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $2
else
if [ "$VERBOSE_COMPILE" == "1" ]; then if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE $COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else else
$COV_SCAN_PREFIX make -j`nproc` $2 $COV_SCAN_PREFIX make -j`nproc` $2
fi fi
fi
} > $dlog/$2.$REL.txt 2>&1 } > $dlog/$2.$REL.txt 2>&1
set -e set -e
...@@ -217,7 +221,7 @@ install_protobuf_from_source(){ ...@@ -217,7 +221,7 @@ install_protobuf_from_source(){
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner #tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
#cd protobuf-2.6.1/ #cd protobuf-2.6.1/
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0 rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner
cd protobuf-3.3.0/ cd protobuf-3.3.0/
./configure ./configure
...@@ -353,8 +357,8 @@ install_bladerf_driver_from_source(){ ...@@ -353,8 +357,8 @@ install_bladerf_driver_from_source(){
$SUDO ldconfig $SUDO ldconfig
echo "Downloading FPGA and firmware images" echo "Downloading FPGA and firmware images"
cd /tmp/bladeRF cd /tmp/bladeRF
wget https://www.nuand.com/fx3/bladeRF_fw_latest.img wget --tries=3 --retry-connrefused https://www.nuand.com/fx3/bladeRF_fw_latest.img
wget https://www.nuand.com/fpga/hostedx40-latest.rbf wget --tries=3 --retry-connrefused https://www.nuand.com/fpga/hostedx40-latest.rbf
sudo mkdir -p /usr/share/Nuand/bladeRF sudo mkdir -p /usr/share/Nuand/bladeRF
sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img
sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf
...@@ -567,7 +571,7 @@ check_install_additional_tools (){ ...@@ -567,7 +571,7 @@ check_install_additional_tools (){
echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface" echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface"
( (
$SUDO rm -fr /tmp/netifaces-0.10.4.tar.gz /tmp/netifaces $SUDO rm -fr /tmp/netifaces-0.10.4.tar.gz /tmp/netifaces
wget -P /tmp https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-0.10.4.tar.gz wget --tries=3 --retry-connrefused -P /tmp https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-0.10.4.tar.gz
tar -xzvf /tmp/netifaces-0.10.4.tar.gz -C /tmp tar -xzvf /tmp/netifaces-0.10.4.tar.gz -C /tmp
cd /tmp/netifaces-0.10.4 cd /tmp/netifaces-0.10.4
$SUDO python setup.py install $SUDO python setup.py install
...@@ -619,6 +623,7 @@ check_install_oai_software() { ...@@ -619,6 +623,7 @@ check_install_oai_software() {
build-essential \ build-essential \
cmake \ cmake \
cmake-curses-gui \ cmake-curses-gui \
ninja-build \
doxygen \ doxygen \
doxygen-gui \ doxygen-gui \
texlive-latex-base \ texlive-latex-base \
......
...@@ -248,7 +248,8 @@ const char* eurecomVariablesNames[] = { ...@@ -248,7 +248,8 @@ const char* eurecomVariablesNames[] = {
"slot_number_TX1_gNB", "slot_number_TX1_gNB",
"slot_number_RX0_gNB", "slot_number_RX0_gNB",
"slot_number_RX1_gNB", "slot_number_RX1_gNB",
"ru_tx_ofdm_mask" "ru_tx_ofdm_mask",
"usrp_send_return"
}; };
const char* eurecomFunctionsNames[] = { const char* eurecomFunctionsNames[] = {
...@@ -282,6 +283,8 @@ const char* eurecomFunctionsNames[] = { ...@@ -282,6 +283,8 @@ const char* eurecomFunctionsNames[] = {
"lock_mutex_ru", "lock_mutex_ru",
"lock_mutex_ru1", "lock_mutex_ru1",
"lock_mutex_ru2", "lock_mutex_ru2",
/* uhd signals */
"trx_write_thread",
/* simulation signals */ /* simulation signals */
"do_DL_sig", "do_DL_sig",
"do_UL_sig", "do_UL_sig",
......
...@@ -226,6 +226,7 @@ typedef enum { ...@@ -226,6 +226,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX0_GNB, VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX0_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX1_GNB, VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX1_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_RU_TX_OFDM_MASK, VCD_SIGNAL_DUMPER_VARIABLES_RU_TX_OFDM_MASK,
VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN,
VCD_SIGNAL_DUMPER_VARIABLES_END VCD_SIGNAL_DUMPER_VARIABLES_END
...@@ -262,6 +263,8 @@ typedef enum { ...@@ -262,6 +263,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU, VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU1, VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU1,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU2, VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU2,
/* uhd signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD,
/* SIMULATION signals */ /* SIMULATION signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL, VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL, VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,
......
...@@ -73,10 +73,10 @@ typedef struct { ...@@ -73,10 +73,10 @@ typedef struct {
} T_cache_t; } T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (248) #define VCD_NUM_FUNCTIONS (249)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (186) #define VCD_NUM_VARIABLES (187)
/* first VCD function (to be kept up to date! see in T_messages.txt) */ /* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP) #define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
...@@ -2138,6 +2138,11 @@ ID = VCD_VARIABLE_RU_TX_OFDM_MASK ...@@ -2138,6 +2138,11 @@ ID = VCD_VARIABLE_RU_TX_OFDM_MASK
GROUP = ALL:VCD:ENB:VCD_VARIABLE GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value FORMAT = ulong,value
VCD_NAME = ru_tx_ofdm_mask VCD_NAME = ru_tx_ofdm_mask
ID = VCD_VARIABLE_USRP_SEND_RETURN
DESC = VCD variable USRP_SEND_RETURN
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = usrp_send_return
#functions #functions
...@@ -2286,6 +2291,11 @@ ID = VCD_FUNCTION_LOCK_MUTEX_RU2 ...@@ -2286,6 +2291,11 @@ ID = VCD_FUNCTION_LOCK_MUTEX_RU2
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = lock_mutex_ru2 VCD_NAME = lock_mutex_ru2
ID = VCD_FUNCTION_TRX_WRITE_THREAD
DESC = VCD function TRX_WRITE_THREAD
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = trx_write_thread
ID = VCD_FUNCTION_SIM_DO_DL_SIGNAL ID = VCD_FUNCTION_SIM_DO_DL_SIGNAL
DESC = VCD function SIM_DO_DL_SIGNAL DESC = VCD function SIM_DO_DL_SIGNAL
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
......
#ifndef _CONFIG_H_ #ifndef __COMMON_UTILS_T_TRACER_CONFIG__H__
#define _CONFIG_H_ #define __COMMON_UTILS_T_TRACER_CONFIG__H__
void clear_remote_config(void); void clear_remote_config(void);
void append_received_config_chunk(char *buf, int length); void append_received_config_chunk(char *buf, int length);
...@@ -7,4 +7,4 @@ void load_config_file(char *filename); ...@@ -7,4 +7,4 @@ void load_config_file(char *filename);
void verify_config(void); void verify_config(void);
void get_local_config(char **txt, int *len); void get_local_config(char **txt, int *len);
#endif /* _CONFIG_H_ */ #endif /* __COMMON_UTILS_T_TRACER_CONFIG__H__ */
...@@ -13,7 +13,8 @@ void usage(void) ...@@ -13,7 +13,8 @@ void usage(void)
"options:\n" "options:\n"
" -d <database file> this option is mandatory\n" " -d <database file> this option is mandatory\n"
" -ip <host> connect to given IP address (default %s)\n" " -ip <host> connect to given IP address (default %s)\n"
" -p <port> connect to given port (default %d)\n", " -p <port> connect to given port (default %d)\n"
" -e <event> event to trace (default VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER)\n",
DEFAULT_REMOTE_IP, DEFAULT_REMOTE_IP,
DEFAULT_REMOTE_PORT DEFAULT_REMOTE_PORT
); );
...@@ -47,6 +48,7 @@ int main(int n, char **v) ...@@ -47,6 +48,7 @@ int main(int n, char **v)
int ev_fun; int ev_fun;
int start_valid = 0; int start_valid = 0;
struct timespec start_time, stop_time, delta_time; struct timespec start_time, stop_time, delta_time;
char *name = "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER";
for (i = 1; i < n; i++) { for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
...@@ -55,6 +57,7 @@ int main(int n, char **v) ...@@ -55,6 +57,7 @@ int main(int n, char **v)
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; } if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p")) if (!strcmp(v[i], "-p"))
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; } { if (i > n-2) usage(); port = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-e")) { if (i > n-2) usage(); name = v[++i]; continue; }
usage(); usage();
} }
...@@ -71,10 +74,9 @@ int main(int n, char **v) ...@@ -71,10 +74,9 @@ int main(int n, char **v)
is_on = calloc(number_of_events, sizeof(int)); is_on = calloc(number_of_events, sizeof(int));
if (is_on == NULL) abort(); if (is_on == NULL) abort();
on_off(database, "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER", is_on, 1); on_off(database, name, is_on, 1);
ev_fun = event_id_from_name(database, ev_fun = event_id_from_name(database, name);
"VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER");
socket = connect_to(ip, port); socket = connect_to(ip, port);
......
...@@ -28,6 +28,7 @@ int bins[50]; ...@@ -28,6 +28,7 @@ int bins[50];
#define N 1000 #define N 1000
int data[N]; int data[N];
long start = 100;
void plot(void) void plot(void)
{ {
...@@ -45,7 +46,8 @@ void plot(void) ...@@ -45,7 +46,8 @@ void plot(void)
if (data[i] < vmin) vmin = data[i]; if (data[i] < vmin) vmin = data[i];
if (data[i] > vmax) vmax = data[i]; if (data[i] > vmax) vmax = data[i];
vavg += data[i]; vavg += data[i];
int ms2 = data[i]/binsize_ns; int ms2 = (data[i] - start * 1000)/binsize_ns;
if (ms2 < 0) ms2 = 0;
if (ms2 > 49) ms2 = 49; if (ms2 > 49) ms2 = 49;
bins[ms2]++; bins[ms2]++;
if (bins[ms2] > max) max = bins[ms2]; if (bins[ms2] > max) max = bins[ms2];
...@@ -55,7 +57,7 @@ void plot(void) ...@@ -55,7 +57,7 @@ void plot(void)
GOTO(1,1); GOTO(1,1);
for (i = 0; i < 50; i++) { for (i = 0; i < 50; i++) {
double binend = (i+1) * binsize_ns / 1000.; double binend = (i+1) * binsize_ns / 1000. + start;
int k; int k;
int width = bins[i] * 70 / max; int width = bins[i] * 70 / max;
/* force at least width of 1 if some point is there */ /* force at least width of 1 if some point is there */
...@@ -68,11 +70,23 @@ void plot(void) ...@@ -68,11 +70,23 @@ void plot(void)
printf("min %d ns max %d ns avg %ld ns\n", vmin, vmax, vavg); printf("min %d ns max %d ns avg %ld ns\n", vmin, vmax, vavg);
} }
void up(int x)
{
start += 5;
}
void down(int x)
{
start -= 5;
}
int main(void) int main(void)
{ {
int i; int i;
int pos = 0; int pos = 0;
signal(SIGINT, sig); signal(SIGINT, sig);
signal(SIGUSR1, up);
signal(SIGUSR2, down);
RESET(); RESET();
HIDE_CURSOR(); HIDE_CURSOR();
while (!feof(stdin)) { while (!feof(stdin)) {
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
* SUCH DAMAGE * SUCH DAMAGE
*/ */
#ifndef __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
#define __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
//#include "ws_symbol_export.h" //#include "ws_symbol_export.h"
/* radioType */ /* radioType */
...@@ -139,3 +142,4 @@ ...@@ -139,3 +142,4 @@
continues until the end of the frame) */ continues until the end of the frame) */
#define MAC_LTE_PAYLOAD_TAG 0x01 #define MAC_LTE_PAYLOAD_TAG 0x01
#endif
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef __COMMON_UTILS_ASSERTIONS__H__
#define __COMMON_UTILS_ASSERTIONS__H__
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>
...@@ -30,9 +33,6 @@ ...@@ -30,9 +33,6 @@
# include "backtrace.h" # include "backtrace.h"
#endif #endif
#ifndef ASSERTIONS_H_
#define ASSERTIONS_H_
void output_log_mem(void); void output_log_mem(void);
#define _Assert_Exit_ \ #define _Assert_Exit_ \
fprintf(stderr, "\nExiting execution\n"); \ fprintf(stderr, "\nExiting execution\n"); \
...@@ -83,4 +83,4 @@ do { \ ...@@ -83,4 +83,4 @@ do { \
} \ } \
} while(0) } while(0)
#endif /* ASSERTIONS_H_ */ #endif /* __COMMON_UTILS_ASSERTIONS__H__ */
This diff is collapsed.
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
* \warning * \warning
*/ */
#ifndef __COMMON_UTILS_NR_NR_COMMON__H__
#define __COMMON_UTILS_NR_NR_COMMON__H__
#include <stdint.h> #include <stdint.h>
#include "assertions.h" #include "assertions.h"
...@@ -63,3 +66,5 @@ void SLIV2SL(int SLIV,int *S,int *L); ...@@ -63,3 +66,5 @@ void SLIV2SL(int SLIV,int *S,int *L);
#define max(a,b) cmax(a,b) #define max(a,b) cmax(a,b)
#define min(a,b) cmin(a,b) #define min(a,b) cmin(a,b)
#endif #endif
#endif
/* /*
Author: Laurent THOMAS, Open Cells * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
copyleft: OpenAirInterface Software Alliance and it's licence * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#include <vector> #include <vector>
#include <map> #include <map>
#include <sys/eventfd.h> #include <sys/eventfd.h>
extern "C" {
#include <intertask_interface.h> #include <intertask_interface.h>
#include <common/utils/system.h> #include <common/utils/system.h>
...@@ -35,7 +55,6 @@ typedef struct task_list_s { ...@@ -35,7 +55,6 @@ typedef struct task_list_s {
int timer_expired(int fd); int timer_expired(int fd);
task_list_t tasks[TASK_MAX]; task_list_t tasks[TASK_MAX];
extern "C" {
void *pool_buffer_init (void) { void *pool_buffer_init (void) {
return 0; return 0;
} }
...@@ -86,6 +105,9 @@ extern "C" { ...@@ -86,6 +105,9 @@ extern "C" {
temp->ittiMsgHeader.messageId = message_id; temp->ittiMsgHeader.messageId = message_id;
temp->ittiMsgHeader.originTaskId = origin_task_id; temp->ittiMsgHeader.originTaskId = origin_task_id;
temp->ittiMsgHeader.ittiMsgSize = size; temp->ittiMsgHeader.ittiMsgSize = size;
temp->ittiMsgHeader.destinationTaskId=TASK_UNKNOWN;
temp->ittiMsgHeader.instance=0;
temp->ittiMsgHeader.lte_time={0};
return temp; return temp;
//return itti_alloc_new_message_sized(origin_task_id, message_id, messages_info[message_id].size); //return itti_alloc_new_message_sized(origin_task_id, message_id, messages_info[message_id].size);
} }
......
/* /*
Author: Laurent THOMAS, Open Cells * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
Copyleft: OpenAirInterface software alliance and it's license * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#ifndef INTERTASK_INTERFACE_H_ #ifndef INTERTASK_INTERFACE_H_
#define INTERTASK_INTERFACE_H_ #define INTERTASK_INTERFACE_H_
#include <stdint.h> #include <stdint.h>
...@@ -275,7 +294,7 @@ typedef struct { ...@@ -275,7 +294,7 @@ typedef struct {
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) //TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL)
//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL) //TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)
//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL) //TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)
void * rrc_enb_process_msg(void*);
#define FOREACH_TASK(TASK_DEF) \ #define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \ TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \ TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \
......
...@@ -243,6 +243,8 @@ void configure_linux(void) { ...@@ -243,6 +243,8 @@ void configure_linux(void) {
// Set CPU frequency to it's maximum // Set CPU frequency to it's maximum
if ( 0 != system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done")) if ( 0 != system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"))
LOG_W(HW,"Can't set cpu frequency\n"); LOG_E(HW,"Can't set cpu frequency\n");
mlockall(MCL_CURRENT | MCL_FUTURE);
} }
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
* \warning * \warning
*/ */
#ifndef __TELNETSRV_CPUMEASUR_DEF__H__
#define __TELNETSRV_CPUMEASUR_DEF__H__
#define CPU_PHYENB_MEASURE \ #define CPU_PHYENB_MEASURE \
{ \ { \
...@@ -97,3 +99,5 @@ ...@@ -97,3 +99,5 @@
{"pdcp_ip", &(pdcpvars->pdcp_ip),0},\ {"pdcp_ip", &(pdcpvars->pdcp_ip),0},\
{"ip_pdcp", &(pdcpvars->ip_pdcp),0},\ {"ip_pdcp", &(pdcpvars->ip_pdcp),0},\
} }
#endif
...@@ -110,13 +110,13 @@ void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt) { ...@@ -110,13 +110,13 @@ void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt) {
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt) { void measurcmd_display_macstats_ue(telnet_printfunc_t prnt) {
UE_list_t *UE_list = &(RC.mac[eNB_id]->UE_list); UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
for (int UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) { for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
for (int i=0; i<UE_list->numactiveCCs[UE_id]; i++) { for (int i=0; i<UE_info->numactiveCCs[UE_id]; i++) {
int CC_id = UE_list->ordered_CCids[i][UE_id]; int CC_id = UE_info->ordered_CCids[i][UE_id];
prnt("%s UE %i Id %i CCid %i %s\n",HDR,i,UE_id,CC_id,HDR); prnt("%s UE %i Id %i CCid %i %s\n",HDR,i,UE_id,CC_id,HDR);
eNB_UE_STATS *macuestatptr = &(UE_list->eNB_UE_stats[CC_id][UE_id]); eNB_UE_STATS *macuestatptr = &(UE_info->eNB_UE_stats[CC_id][UE_id]);
telnet_ltemeasurdef_t statsptr[]=LTEMAC_UEMEASURE; telnet_ltemeasurdef_t statsptr[]=LTEMAC_UEMEASURE;
measurcmd_display_measures(prnt, statsptr, sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t)); measurcmd_display_measures(prnt, statsptr, sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t));
} }
...@@ -155,7 +155,7 @@ void measurcmd_display_one_rlcstat(telnet_printfunc_t prnt, int UE_id, telnet_lt ...@@ -155,7 +155,7 @@ void measurcmd_display_one_rlcstat(telnet_printfunc_t prnt, int UE_id, telnet_lt
void measurcmd_display_rlcstats(telnet_printfunc_t prnt) { void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
UE_list_t *UE_list = &(RC.mac[eNB_id]->UE_list); UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
telnet_ltemeasurdef_t statsptr[]=LTE_RLCMEASURE; telnet_ltemeasurdef_t statsptr[]=LTE_RLCMEASURE;
int num_rlcmeasure = sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t ); int num_rlcmeasure = sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t );
unsigned int *rlcstats = malloc(num_rlcmeasure*sizeof(unsigned int)); unsigned int *rlcstats = malloc(num_rlcmeasure*sizeof(unsigned int));
...@@ -165,9 +165,9 @@ void measurcmd_display_rlcstats(telnet_printfunc_t prnt) { ...@@ -165,9 +165,9 @@ void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
statsptr[i].vptr = rlcstats + i; statsptr[i].vptr = rlcstats + i;
} }
for (int UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) { for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
#define NB_eNB_INST 1 #define NB_eNB_INST 1
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_list->eNB_UE_stats[0][UE_id].crnti, PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_info->eNB_UE_stats[0][UE_id].crnti,
eNB->frame,eNB->subframe,eNB_id); eNB->frame,eNB->subframe,eNB_id);
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DCCH", &ctxt, SRB_FLAG_YES, DCCH); measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DCCH", &ctxt, SRB_FLAG_YES, DCCH);
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DTCH", &ctxt, SRB_FLAG_NO, DTCH-2); measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DTCH", &ctxt, SRB_FLAG_NO, DTCH-2);
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
* \warning * \warning
*/ */
#ifndef __TELNETSRV_LTEMEASUR_DEF__H__
#define __TELNETSRV_LTEMEASUR_DEF__H__
#define LTEMAC_MEASURE \ #define LTEMAC_MEASURE \
{ \ { \
...@@ -125,3 +127,5 @@ ...@@ -125,3 +127,5 @@
{"timer_poll_retrans_tout", NULL, TELNET_VARTYPE_UINT, 0},\ {"timer_poll_retrans_tout", NULL, TELNET_VARTYPE_UINT, 0},\
{"timer_status_prohibit_tout", NULL, TELNET_VARTYPE_UINT, 0},\ {"timer_status_prohibit_tout", NULL, TELNET_VARTYPE_UINT, 0},\
} }
#endif
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
* \note * \note
* \warning * \warning
*/ */
#ifndef __TELNETSRV_MEASUREMENTS__H__
#define __TELNETSRV_MEASUREMENTS__H__
#include <dlfcn.h> #include <dlfcn.h>
#include "telnetsrv.h" #include "telnetsrv.h"
#include "openair1/PHY/defs_eNB.h" #include "openair1/PHY/defs_eNB.h"
...@@ -97,3 +101,4 @@ extern uint64_t measurcmd_getstatvalue(telnet_ltemeasurdef_t *measur,telnet_prin ...@@ -97,3 +101,4 @@ extern uint64_t measurcmd_getstatvalue(telnet_ltemeasurdef_t *measur,telnet_prin
extern void measurcmd_display_measures(telnet_printfunc_t prnt, telnet_ltemeasurdef_t *statsptr, int stats_size); extern void measurcmd_display_measures(telnet_printfunc_t prnt, telnet_ltemeasurdef_t *statsptr, int stats_size);
#endif /* TELNETSRV_MEASURCMD_MAIN */ #endif /* TELNETSRV_MEASURCMD_MAIN */
#endif
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
* \warning * \warning
*/ */
#ifndef __TELNETSRV_PHYCMD__H__
#define __TELNETSRV_PHYCMD__H__
#ifdef TELNETSRV_PHYCMD_MAIN #ifdef TELNETSRV_PHYCMD_MAIN
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
...@@ -61,3 +64,4 @@ extern void add_phy_cmds(void); ...@@ -61,3 +64,4 @@ extern void add_phy_cmds(void);
/*-------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------*/
#endif
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
* \note * \note
* \warning * \warning
*/ */
#ifndef __TELNETSRV_PROCCMD__H__
#define __TELNETSRV_PROCCMD__H__
#include <dlfcn.h> #include <dlfcn.h>
#include "telnetsrv.h" #include "telnetsrv.h"
...@@ -79,3 +83,4 @@ telnetshell_cmddef_t proc_cmdarray[] = { ...@@ -79,3 +83,4 @@ telnetshell_cmddef_t proc_cmdarray[] = {
extern void add_proccmd_cmds(void); extern void add_proccmd_cmds(void);
#endif /* TELNETSRV_PROCCMD_MAIN */ #endif /* TELNETSRV_PROCCMD_MAIN */
#endif
/* /*
Author: Laurent THOMAS, Open Cells * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
copyleft: OpenAirInterface Software Alliance and it's licence * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#include <common/utils/simple_executable.h> #include <common/utils/simple_executable.h>
#include "thread-pool.h" #include "thread-pool.h"
......
/* /*
Author: Laurent THOMAS, Open Cells * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
copyleft: OpenAirInterface Software Alliance and it's licence * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <sched.h> #include <sched.h>
#include <sys/types.h> #include <sys/types.h>
......
/* /*
Author: Laurent THOMAS, Open Cells * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
copyleft: OpenAirInterface Software Alliance and it's licence * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#ifndef THREAD_POOL_H #ifndef THREAD_POOL_H
#define THREAD_POOL_H #define THREAD_POOL_H
#include <stdbool.h> #include <stdbool.h>
...@@ -217,11 +236,11 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) { ...@@ -217,11 +236,11 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) { static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo); notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
AssertFatal(t->traceFd, "Thread pool used while not initialized");
if (t->measurePerf) if (t->measurePerf)
msg->returnTime=rdtsc(); msg->returnTime=rdtsc();
if (t->traceFd >= 0) if (t->traceFd > 0)
if(write(t->traceFd, msg, sizeof(*msg))); if(write(t->traceFd, msg, sizeof(*msg)));
return msg; return msg;
...@@ -229,7 +248,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_ ...@@ -229,7 +248,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) { static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo); notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
AssertFatal(t->traceFd, "Thread pool used while not initialized");
if (msg == NULL) if (msg == NULL)
return NULL; return NULL;
......
...@@ -14,19 +14,24 @@ ...@@ -14,19 +14,24 @@
This simulator allows to test L2 and above Layers using the nFAPI interface. This simulator allows to test L2 and above Layers using the nFAPI interface.
**This simulator is available starting the `v1.0.0` release on the `master` branch.** The UE executable is able to "simulate" multiple UEs in order to stimulate the scheduler in the eNB.
Currently the only validated deployment by CI and developers is *with S1 interface and eNB / UEs are on the same machine*.
Others deployments will be supported later after bug fixes and validation in the CI process.
1. [With S1 -- eNB and UE on same machine](L2NFAPI_S1.md)
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
Currently the Continuous Integration process is validating this simulator the following way:
* the LTE modem executable is run on one host (in our CI deployment it is a **Xenial Virtual Machine**)
* the UE(s) modem executable is run on another host (in our CI deployment it is also a **Xenial Virtual Machine**)
* We are testing:
* in S1 mode (ie we are connected to a 3rd-party EPC)
* in noS1 mode (no need for an EPC)
Normally it should be fine to run both executables on the same host using the `loopback` interface to communicate. **But we are not guaranting it**
1. [With S1 -- eNB and UE on 2 hosts](L2NFAPI_S1.md)
2. [No S1 -- eNB and UE on 2 hosts](L2NFAPI_NOS1.md)
----
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home) [oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
#include "PHY/phy_vars.h" #include "PHY/phy_vars.h"
#include "SCHED/sched_common_vars.h" #include "SCHED/sched_common_vars.h"
#include "LAYER2/MAC/mac_vars.h" #include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h" #include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h" #include "PHY_INTERFACE/phy_interface_vars.h"
#include "gnb_config.h" #include "gnb_config.h"
...@@ -108,7 +106,7 @@ static int wait_for_sync = 0; ...@@ -108,7 +106,7 @@ static int wait_for_sync = 0;
unsigned int mmapped_dma=0; unsigned int mmapped_dma=0;
int single_thread_flag=1; int single_thread_flag=1;
static int8_t threequarter_fs=0; int8_t threequarter_fs=0;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
...@@ -171,6 +169,10 @@ uint32_t target_ul_mcs = 20; ...@@ -171,6 +169,10 @@ uint32_t target_ul_mcs = 20;
uint32_t timing_advance = 0; uint32_t timing_advance = 0;
uint64_t num_missed_slots=0; // counter for the number of missed slots uint64_t num_missed_slots=0; // counter for the number of missed slots
int split73=0;
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
AssertFatal(false, "Must not be called in this context\n");
}
extern void reset_opp_meas(void); extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
...@@ -706,7 +708,6 @@ int stop_L1L2(module_id_t gnb_id) { ...@@ -706,7 +708,6 @@ int stop_L1L2(module_id_t gnb_id) {
*/ */
int restart_L1L2(module_id_t gnb_id) { int restart_L1L2(module_id_t gnb_id) {
RU_t *ru = RC.ru[gnb_id]; RU_t *ru = RC.ru[gnb_id];
int cc_id;
MessageDef *msg_p = NULL; MessageDef *msg_p = NULL;
LOG_W(GNB_APP, "restarting nr-softmodem\n"); LOG_W(GNB_APP, "restarting nr-softmodem\n");
/* block threads */ /* block threads */
...@@ -721,13 +722,9 @@ int restart_L1L2(module_id_t gnb_id) { ...@@ -721,13 +722,9 @@ int restart_L1L2(module_id_t gnb_id) {
memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id]->frame_parms, sizeof(NR_DL_FRAME_PARMS)); memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id]->frame_parms, sizeof(NR_DL_FRAME_PARMS));
set_function_spec_param(RC.ru[gnb_id]); set_function_spec_param(RC.ru[gnb_id]);
LOG_I(GNB_APP, "attempting to create ITTI tasks\n"); LOG_I(GNB_APP, "attempting to create ITTI tasks\n");
// No more rrc thread, as many race conditions are hidden behind
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) { rrc_enb_init();
LOG_E(RRC, "Create task for RRC eNB failed\n"); itti_mark_task_ready(TASK_RRC_ENB);
return -1;
} else {
LOG_I(RRC, "Re-created task for RRC gNB successfully\n");
}
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) { if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(PDCP, "Create task for L2L1 failed\n"); LOG_E(PDCP, "Create task for L2L1 failed\n");
...@@ -770,23 +767,23 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -770,23 +767,23 @@ static void wait_nfapi_init(char *thread_name) {
void init_pdcp(void) { void init_pdcp(void) {
//if (!NODE_IS_DU(RC.rrc[0]->node_type)) { //if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
pdcp_layer_init(); pdcp_layer_init();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1){ if (IS_SOFTMODEM_NOS1) {
printf("IS_SOFTMODEM_NOS1 option enabled \n"); printf("IS_SOFTMODEM_NOS1 option enabled \n");
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
} }
pdcp_module_init(pdcp_initmask); pdcp_module_init(pdcp_initmask);
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) { /*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
} else {*/ } else {*/
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind); pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
//} //}
/*} else { /*} else {
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind); pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
}*/ }*/
...@@ -840,7 +837,7 @@ int main( int argc, char **argv ) ...@@ -840,7 +837,7 @@ int main( int argc, char **argv )
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX); MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
init_opt(); init_opt();
#ifdef PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK
...@@ -857,7 +854,7 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -857,7 +854,7 @@ if(!IS_SOFTMODEM_NOS1)
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
if(IS_SOFTMODEM_NOS1) if(IS_SOFTMODEM_NOS1)
init_pdcp(); init_pdcp();
if (RC.nb_nr_inst > 0) { if (RC.nb_nr_inst > 0) {
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
...@@ -987,27 +984,27 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -987,27 +984,27 @@ if(!IS_SOFTMODEM_NOS1)
printf("oai_exit=%d\n",oai_exit); printf("oai_exit=%d\n",oai_exit);
// stop threads // stop threads
/*#ifdef XFORMS /*#ifdef XFORMS
printf("waiting for XFORMS thread\n"); printf("waiting for XFORMS thread\n");
if (do_forms==1) { if (do_forms==1) {
pthread_join(forms_thread,&status); pthread_join(forms_thread,&status);
fl_hide_form(form_stats->stats_form); fl_hide_form(form_stats->stats_form);
fl_free_form(form_stats->stats_form); fl_free_form(form_stats->stats_form);
fl_hide_form(form_stats_l2->stats_form); fl_hide_form(form_stats_l2->stats_form);
fl_free_form(form_stats_l2->stats_form); fl_free_form(form_stats_l2->stats_form);
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) { for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
fl_hide_form(form_enb[CC_id][UE_id]->phy_scope_gNB); fl_hide_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
fl_free_form(form_enb[CC_id][UE_id]->phy_scope_gNB); fl_free_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
} }
} }
} }
#endif*/ #endif*/
printf("stopping MODEM threads\n"); printf("stopping MODEM threads\n");
// cleanup // cleanup
stop_gNB(NB_gNB_INST); stop_gNB(NB_gNB_INST);
......
...@@ -357,10 +357,11 @@ static void UE_synch(void *arg) { ...@@ -357,10 +357,11 @@ static void UE_synch(void *arg) {
} }
void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) { void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
uint32_t nb_rb, start_rb;
uint8_t nb_symb_sch, start_symbol, mcs, precod_nbr_layers, harq_pid, rvidx;
uint16_t n_rnti;
uint32_t rb_size, rb_start;
uint16_t rnti, l_prime_mask, n_rb0, n_rb1, pdu_bit_map;
uint8_t nr_of_symbols, start_symbol_index, mcs_index, mcs_table, nrOfLayers, harq_process_id, rv_index, dmrs_config_type;
uint8_t ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, ptrs_time_density, ptrs_freq_density;
nr_dcireq_t dcireq; nr_dcireq_t dcireq;
nr_scheduled_response_t scheduled_response; nr_scheduled_response_t scheduled_response;
...@@ -381,30 +382,53 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) { ...@@ -381,30 +382,53 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
scheduled_response.frame = proc->frame_rx; scheduled_response.frame = proc->frame_rx;
scheduled_response.slot = proc->nr_tti_rx; scheduled_response.slot = proc->nr_tti_rx;
//--------------------------Temporary configuration-----------------------------// //--------------------------Temporary configuration-----------------------------//
n_rnti = 0x1234; rnti = 0x1234;
nb_rb = 50; rb_size = 50;
start_rb = 0; rb_start = 0;
nb_symb_sch = 12; nr_of_symbols = 12;
start_symbol = 2; start_symbol_index = 2;
precod_nbr_layers = 1; nrOfLayers = 1;
mcs = 9; mcs_index = 9;
harq_pid = 0; mcs_table = 0;
rvidx = 0; harq_process_id = 0;
rv_index = 0;
l_prime_mask = get_l_prime(nr_of_symbols, typeB, pusch_dmrs_pos0, pusch_len1);
dmrs_config_type = 0;
ptrs_mcs1 = 2;
ptrs_mcs2 = 4;
ptrs_mcs3 = 10;
n_rb0 = 25;
n_rb1 = 75;
pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, mcs_index, mcs_table);
ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, rb_size);
//------------------------------------------------------------------------------// //------------------------------------------------------------------------------//
scheduled_response.ul_config->slot = 8; scheduled_response.ul_config->slot = 8;
scheduled_response.ul_config->number_pdus = 1; scheduled_response.ul_config->number_pdus = 1;
scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH; scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.rnti = n_rnti; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rnti = rnti;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_size = rb_size;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_start = rb_start;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nr_of_symbols = nr_of_symbols;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = mcs; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.dmrs_config_type = dmrs_config_type;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = rvidx; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_index = mcs_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = rv_index;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nrOfLayers = nrOfLayers;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_process_id;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map = pdu_bit_map;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_time_density = ptrs_time_density;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list = (nfapi_nr_ue_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ue_ptrs_ports_t));
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
if (1 << ptrs_time_density >= nr_of_symbols) {
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
}
nr_ue_scheduled_response(&scheduled_response); nr_ue_scheduled_response(&scheduled_response);
...@@ -471,7 +495,6 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) { ...@@ -471,7 +495,6 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
} }
} }
// no UL for now // no UL for now
/* /*
if (UE->mac_enabled==1) { if (UE->mac_enabled==1) {
...@@ -521,7 +544,7 @@ void UE_processing(void *arg) { ...@@ -521,7 +544,7 @@ void UE_processing(void *arg) {
// then timing advance is processed and set to be applied in the next UL transmission */ // then timing advance is processed and set to be applied in the next UL transmission */
if (UE->mac_enabled == 1) { if (UE->mac_enabled == 1) {
if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot){ if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot) {
LOG_D(PHY,"Applying timing advance -- frame %d -- slot %d\n", frame_tx, slot_tx); LOG_D(PHY,"Applying timing advance -- frame %d -- slot %d\n", frame_tx, slot_tx);
//if (nfapi_mode!=3){ //if (nfapi_mode!=3){
...@@ -591,7 +614,6 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash) ...@@ -591,7 +614,6 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) { void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode); LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
void *dummy_tx[UE->frame_parms.nb_antennas_tx];
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms); *timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) { for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
...@@ -753,7 +775,7 @@ void *UE_thread(void *arg) { ...@@ -753,7 +775,7 @@ void *UE_thread(void *arg) {
#ifdef OAI_ADRV9371_ZC706 #ifdef OAI_ADRV9371_ZC706
/*uint32_t total_gain_dB_prev = 0; /*uint32_t total_gain_dB_prev = 0;
if (total_gain_dB_prev != UE->rx_total_gain_dB) { if (total_gain_dB_prev != UE->rx_total_gain_dB) {
total_gain_dB_prev = UE->rx_total_gain_dB; total_gain_dB_prev = UE->rx_total_gain_dB;
openair0_cfg[0].rx_gain[0] = UE->rx_total_gain_dB; openair0_cfg[0].rx_gain[0] = UE->rx_total_gain_dB;
UE->rfdevice.trx_set_gains_func(&UE->rfdevice,&openair0_cfg[0]); UE->rfdevice.trx_set_gains_func(&UE->rfdevice,&openair0_cfg[0]);
}*/ }*/
...@@ -837,7 +859,7 @@ void *UE_thread(void *arg) { ...@@ -837,7 +859,7 @@ void *UE_thread(void *arg) {
if ( decoded_frame_rx != curMsg->proc.frame_rx && if ( decoded_frame_rx != curMsg->proc.frame_rx &&
((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx ) ((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx )
LOG_D(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n", LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
decoded_frame_rx, curMsg->proc.frame_rx ); decoded_frame_rx, curMsg->proc.frame_rx );
nbSlotProcessing++; nbSlotProcessing++;
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "PHY/NR_REFSIG/nr_mod_table.h" #include "PHY/NR_REFSIG/nr_mod_table.h"
#include "LAYER2/MAC/mac_vars.h" #include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h" #include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h" #include "PHY_INTERFACE/phy_interface_vars.h"
#include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/TOOLS/sim.h"
...@@ -127,7 +126,6 @@ volatile int start_eNB = 0; ...@@ -127,7 +126,6 @@ volatile int start_eNB = 0;
volatile int start_UE = 0; volatile int start_UE = 0;
volatile int oai_exit = 0; volatile int oai_exit = 0;
static clock_source_t clock_source = unset;
int single_thread_flag=1; int single_thread_flag=1;
static double snr_dB=20; static double snr_dB=20;
...@@ -215,7 +213,7 @@ int emulate_rf = 0; ...@@ -215,7 +213,7 @@ int emulate_rf = 0;
tpool_t *Tpool; tpool_t *Tpool;
#ifdef UE_DLSCH_PARALLELISATION #ifdef UE_DLSCH_PARALLELISATION
tpool_t *Tpool_dl; tpool_t *Tpool_dl;
#endif #endif
...@@ -311,8 +309,8 @@ static void *scope_thread(void *arg) { ...@@ -311,8 +309,8 @@ static void *scope_thread(void *arg) {
while (!oai_exit) { while (!oai_exit) {
phy_scope_nrUE(form_nrue[0], phy_scope_nrUE(form_nrue[0],
PHY_vars_UE_g[0][0], PHY_vars_UE_g[0][0],
0,0,1); 0,0,1);
usleep(100*1000); usleep(100*1000);
} }
...@@ -383,9 +381,9 @@ static void get_options(void) { ...@@ -383,9 +381,9 @@ static void get_options(void) {
int tddflag=0, nonbiotflag, vcdflag=0; int tddflag=0, nonbiotflag, vcdflag=0;
char *loopfile=NULL; char *loopfile=NULL;
int dumpframe=0; int dumpframe=0;
//uint32_t noS1; //uint32_t noS1;
//uint32_t nokrnmod; //uint32_t nokrnmod;
//uint32_t nokrnmod;
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ; paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
...@@ -529,12 +527,12 @@ void init_openair0(void) { ...@@ -529,12 +527,12 @@ void init_openair0(void) {
else { else {
openair0_cfg[card].sample_rate=122.88e6; openair0_cfg[card].sample_rate=122.88e6;
openair0_cfg[card].samples_per_frame = 1228800; openair0_cfg[card].samples_per_frame = 1228800;
} }
} else { } else {
LOG_E(PHY,"Unsupported numerology!\n"); LOG_E(PHY,"Unsupported numerology!\n");
exit(-1); exit(-1);
} }
}else if(frame_parms[0]->N_RB_DL == 273) { } else if(frame_parms[0]->N_RB_DL == 273) {
if (numerology==1) { if (numerology==1) {
if (frame_parms[0]->threequarter_fs) { if (frame_parms[0]->threequarter_fs) {
AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n"); AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n");
...@@ -542,12 +540,12 @@ void init_openair0(void) { ...@@ -542,12 +540,12 @@ void init_openair0(void) {
else { else {
openair0_cfg[card].sample_rate=122.88e6; openair0_cfg[card].sample_rate=122.88e6;
openair0_cfg[card].samples_per_frame = 1228800; openair0_cfg[card].samples_per_frame = 1228800;
} }
} else { } else {
LOG_E(PHY,"Unsupported numerology!\n"); LOG_E(PHY,"Unsupported numerology!\n");
exit(-1); exit(-1);
} }
}else if(frame_parms[0]->N_RB_DL == 106) { } else if(frame_parms[0]->N_RB_DL == 106) {
if (numerology==0) { if (numerology==0) {
if (frame_parms[0]->threequarter_fs) { if (frame_parms[0]->threequarter_fs) {
openair0_cfg[card].sample_rate=23.04e6; openair0_cfg[card].sample_rate=23.04e6;
...@@ -556,15 +554,15 @@ void init_openair0(void) { ...@@ -556,15 +554,15 @@ void init_openair0(void) {
openair0_cfg[card].sample_rate=30.72e6; openair0_cfg[card].sample_rate=30.72e6;
openair0_cfg[card].samples_per_frame = 307200; openair0_cfg[card].samples_per_frame = 307200;
} }
} else if (numerology==1) { } else if (numerology==1) {
if (frame_parms[0]->threequarter_fs) { if (frame_parms[0]->threequarter_fs) {
openair0_cfg[card].sample_rate=46.08e6; openair0_cfg[card].sample_rate=46.08e6;
openair0_cfg[card].samples_per_frame = 460800; openair0_cfg[card].samples_per_frame = 460800;
} }
else { else {
openair0_cfg[card].sample_rate=61.44e6; openair0_cfg[card].sample_rate=61.44e6;
openair0_cfg[card].samples_per_frame = 614400; openair0_cfg[card].samples_per_frame = 614400;
} }
} else if (numerology==2) { } else if (numerology==2) {
openair0_cfg[card].sample_rate=122.88e6; openair0_cfg[card].sample_rate=122.88e6;
openair0_cfg[card].samples_per_frame = 1228800; openair0_cfg[card].samples_per_frame = 1228800;
...@@ -597,7 +595,8 @@ void init_openair0(void) { ...@@ -597,7 +595,8 @@ void init_openair0(void) {
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
openair0_cfg[card].Mod_id = 0; openair0_cfg[card].Mod_id = 0;
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
openair0_cfg[card].clock_source = clock_source; openair0_cfg[card].clock_source = get_softmodem_params()->clock_source;
openair0_cfg[card].time_source = get_softmodem_params()->timing_source;
openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx); openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx);
openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
...@@ -639,7 +638,7 @@ void init_pdcp(void) { ...@@ -639,7 +638,7 @@ void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT; pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
/*if (rlc_module_init() != 0) { /*if (rlc_module_init() != 0) {
LOG_I(RLC, "Problem at RLC initiation \n"); LOG_I(RLC, "Problem at RLC initiation \n");
} }
pdcp_layer_init(); pdcp_layer_init();
nr_ip_over_LTE_DRB_preconfiguration();*/ nr_ip_over_LTE_DRB_preconfiguration();*/
...@@ -649,6 +648,11 @@ void init_pdcp(void) { ...@@ -649,6 +648,11 @@ void init_pdcp(void) {
LOG_I(PDCP, "Before getting out from init_pdcp() \n"); LOG_I(PDCP, "Before getting out from init_pdcp() \n");
} }
// Stupid function addition because UE itti messages queues definition is common with eNB
void *rrc_enb_process_msg(void *notUsed) {
return NULL;
}
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2; //uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
...@@ -676,12 +680,12 @@ int main( int argc, char **argv ) { ...@@ -676,12 +680,12 @@ int main( int argc, char **argv ) {
set_taus_seed (0); set_taus_seed (0);
tpool_t pool; tpool_t pool;
Tpool = &pool; Tpool = &pool;
char params[]="-1,-1"; char params[]="-1,-1";
initTpool(params, Tpool, false); initTpool(params, Tpool, false);
#ifdef UE_DLSCH_PARALLELISATION #ifdef UE_DLSCH_PARALLELISATION
tpool_t pool_dl; tpool_t pool_dl;
Tpool_dl = &pool_dl; Tpool_dl = &pool_dl;
char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1"; char params_dl[]="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
initTpool(params_dl, Tpool_dl, false); initTpool(params_dl, Tpool_dl, false);
#endif #endif
cpuf=get_cpu_freq_GHz(); cpuf=get_cpu_freq_GHz();
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_UE { \ #define CMDLINE_PARAMS_DESC_UE { \
{"clock-source", CONFIG_HLP_EXCCLK, 0, iptr:&clock_source, defintval:0, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ {"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ {"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ {"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
......
...@@ -81,8 +81,8 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) { ...@@ -81,8 +81,8 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
} }
void get_common_options(uint32_t execmask) { void get_common_options(uint32_t execmask) {
uint32_t online_log_messages; uint32_t online_log_messages=0;
uint32_t glog_level ; uint32_t glog_level=0 ;
uint32_t start_telnetsrv = 0; uint32_t start_telnetsrv = 0;
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0; uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
uint32_t rfsim = 0, basicsim = 0, do_forms = 0; uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
...@@ -145,27 +145,27 @@ void get_common_options(uint32_t execmask) { ...@@ -145,27 +145,27 @@ void get_common_options(uint32_t execmask) {
if(worker_config != NULL) set_worker_conf(worker_config); if(worker_config != NULL) set_worker_conf(worker_config);
} }
void softmodem_printresources(int sig, telnet_printfunc_t pf) { void softmodem_printresources(int sig, telnet_printfunc_t pf) {
struct rusage usage; struct rusage usage;
struct timespec stop; struct timespec stop;
clock_gettime(CLOCK_BOOTTIME, &stop); clock_gettime(CLOCK_BOOTTIME, &stop);
uint64_t elapse = (stop.tv_sec - start.tv_sec) ; // in seconds uint64_t elapse = (stop.tv_sec - start.tv_sec) ; // in seconds
int st = getrusage(RUSAGE_SELF,&usage); int st = getrusage(RUSAGE_SELF,&usage);
if (!st) { if (!st) {
pf("\nRun time: %lluh %llus\n",(unsigned long long)elapse/3600,(unsigned long long)(elapse - (elapse/3600))); pf("\nRun time: %lluh %llus\n",(unsigned long long)elapse/3600,(unsigned long long)(elapse - (elapse/3600)));
pf("\tTime executing user inst.: %lds %ldus\n",(long)usage.ru_utime.tv_sec,(long)usage.ru_utime.tv_usec); pf("\tTime executing user inst.: %lds %ldus\n",(long)usage.ru_utime.tv_sec,(long)usage.ru_utime.tv_usec);
pf("\tTime executing system inst.: %lds %ldus\n",(long)usage.ru_stime.tv_sec,(long)usage.ru_stime.tv_usec); pf("\tTime executing system inst.: %lds %ldus\n",(long)usage.ru_stime.tv_sec,(long)usage.ru_stime.tv_usec);
pf("\tMax. Phy. memory usage: %ldkB\n",(long)usage.ru_maxrss); pf("\tMax. Phy. memory usage: %ldkB\n",(long)usage.ru_maxrss);
pf("\tPage fault number (no io): %ld\n",(long)usage.ru_minflt); pf("\tPage fault number (no io): %ld\n",(long)usage.ru_minflt);
pf("\tPage fault number (requiring io): %ld\n",(long)usage.ru_majflt); pf("\tPage fault number (requiring io): %ld\n",(long)usage.ru_majflt);
pf("\tNumber of file system read: %ld\n",(long)usage.ru_inblock); pf("\tNumber of file system read: %ld\n",(long)usage.ru_inblock);
pf("\tNumber of filesystem write: %ld\n",(long)usage.ru_oublock); pf("\tNumber of filesystem write: %ld\n",(long)usage.ru_oublock);
pf("\tNumber of context switch (process origin, io...): %ld\n",(long)usage.ru_nvcsw); pf("\tNumber of context switch (process origin, io...): %ld\n",(long)usage.ru_nvcsw);
pf("\tNumber of context switch (os origin, priority...): %ld\n",(long)usage.ru_nivcsw); pf("\tNumber of context switch (os origin, priority...): %ld\n",(long)usage.ru_nivcsw);
} }
} }
void signal_handler(int sig) { void signal_handler(int sig) {
...@@ -180,9 +180,9 @@ void signal_handler(int sig) { ...@@ -180,9 +180,9 @@ void signal_handler(int sig) {
backtrace_symbols_fd(array, size, 2); backtrace_symbols_fd(array, size, 2);
exit(-1); exit(-1);
} else { } else {
if(sig==SIGINT ||sig==SOFTMODEM_RTSIGNAL) if(sig==SIGINT ||sig==SOFTMODEM_RTSIGNAL)
softmodem_printresources(sig,(telnet_printfunc_t)printf); softmodem_printresources(sig,(telnet_printfunc_t)printf);
if (sig != SOFTMODEM_RTSIGNAL) { if (sig != SOFTMODEM_RTSIGNAL) {
printf("Linux signal %s...\n",strsignal(sig)); printf("Linux signal %s...\n",strsignal(sig));
exit_function(__FILE__, __FUNCTION__, __LINE__,"softmodem starting exit procedure\n"); exit_function(__FILE__, __FUNCTION__, __LINE__,"softmodem starting exit procedure\n");
} }
...@@ -192,7 +192,7 @@ void signal_handler(int sig) { ...@@ -192,7 +192,7 @@ void signal_handler(int sig) {
void set_softmodem_sighandler(void) { void set_softmodem_sighandler(void) {
struct sigaction act,oldact; struct sigaction act,oldact;
clock_gettime(CLOCK_BOOTTIME, &start); clock_gettime(CLOCK_BOOTTIME, &start);
memset(&act,0,sizeof(act)); memset(&act,0,sizeof(act));
act.sa_handler=signal_handler; act.sa_handler=signal_handler;
...@@ -201,6 +201,6 @@ void set_softmodem_sighandler(void) { ...@@ -201,6 +201,6 @@ void set_softmodem_sighandler(void) {
signal(SIGSEGV, signal_handler); signal(SIGSEGV, signal_handler);
signal(SIGINT, signal_handler); signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler); signal(SIGTERM, signal_handler);
signal(SIGABRT, signal_handler); signal(SIGABRT, signal_handler);
} }
...@@ -38,6 +38,11 @@ extern "C" ...@@ -38,6 +38,11 @@ extern "C"
#endif #endif
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */ /* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n" #define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
#define CONFIG_HLP_SPLIT73 "Split 7.3 (below rate matching) option: <cu|du>:<remote ip address>:<remote port>"
#define CONFIG_HLP_TPOOL "Thread pool configuration: \n\
default no pool (runs in calling thread),\n\
list of cores, comma separated (negative value is no core affinity)\n\
example: -1,3 launches two working threads one floating, the second set on core 3"
#define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n" #define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n"
#define CONFIG_HLP_CALUER "set UE RX calibration\n" #define CONFIG_HLP_CALUER "set UE RX calibration\n"
#define CONFIG_HLP_CALUERM "" #define CONFIG_HLP_CALUERM ""
...@@ -53,6 +58,7 @@ extern "C" ...@@ -53,6 +58,7 @@ extern "C"
#define CONFIG_HLP_EXTS "tells hardware to use an external timing reference\n" #define CONFIG_HLP_EXTS "tells hardware to use an external timing reference\n"
#define CONFIG_HLP_DMRSSYNC "tells RU to insert DMRS in subframe 1 slot 0" #define CONFIG_HLP_DMRSSYNC "tells RU to insert DMRS in subframe 1 slot 0"
#define CONFIG_HLP_CLK "tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)\n" #define CONFIG_HLP_CLK "tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)\n"
#define CONFIG_HLP_TME "tells hardware to use a time reference (0:internal, 1:external, 2:gpsdo)\n"
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n" #define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n" #define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n" #define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
...@@ -88,6 +94,8 @@ extern "C" ...@@ -88,6 +94,8 @@ extern "C"
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define RF_CONFIG_FILE softmodem_params.rf_config_file #define RF_CONFIG_FILE softmodem_params.rf_config_file
#define SPLIT73 softmodem_params.split73
#define TP_CONFIG softmodem_params.threadPoolConfig
#define PHY_TEST softmodem_params.phy_test #define PHY_TEST softmodem_params.phy_test
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync #define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag #define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
...@@ -103,9 +111,12 @@ extern "C" ...@@ -103,9 +111,12 @@ extern "C"
#define CMDLINE_PARAMS_DESC { \ #define CMDLINE_PARAMS_DESC { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\ {"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \ {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \ {"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
{"clock", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \ {"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \ {"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \ {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \ {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
...@@ -191,6 +202,8 @@ typedef struct { ...@@ -191,6 +202,8 @@ typedef struct {
uint64_t optmask; uint64_t optmask;
//THREAD_STRUCT thread_struct; //THREAD_STRUCT thread_struct;
char rf_config_file[1024]; char rf_config_file[1024];
char split73[1024];
char threadPoolConfig[1024];
int phy_test; int phy_test;
uint8_t usim_test; uint8_t usim_test;
int emulate_rf; int emulate_rf;
......
...@@ -29,7 +29,7 @@ typedef struct { ...@@ -29,7 +29,7 @@ typedef struct {
nfapi_mode_t nfapi_mode; nfapi_mode_t nfapi_mode;
} nfapi_params_t; } nfapi_params_t;
static nfapi_params_t nfapi_params; static nfapi_params_t nfapi_params = {0};
void set_thread_priority(int priority) { void set_thread_priority(int priority) {
//printf("%s(priority:%d)\n", __FUNCTION__, priority); //printf("%s(priority:%d)\n", __FUNCTION__, priority);
......
...@@ -49,7 +49,6 @@ extern RAN_CONTEXT_t RC; ...@@ -49,7 +49,6 @@ extern RAN_CONTEXT_t RC;
#include "fapi_stub.h" #include "fapi_stub.h"
//#include "fapi_l1.h" //#include "fapi_l1.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h" #include "PHY/LTE_TRANSPORT/transport_proto.h"
...@@ -692,13 +691,14 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) { ...@@ -692,13 +691,14 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) {
free(header); free(header);
} }
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) { int pnf_phy_hi_dci0_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
if (req->hi_dci0_request_body.number_of_dci == 0 && req->hi_dci0_request_body.number_of_hi == 0) if (req->hi_dci0_request_body.number_of_dci == 0 && req->hi_dci0_request_body.number_of_hi == 0)
LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi); LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
//phy_info* phy = (phy_info*)(pnf_p7->user_data); //phy_info* phy = (phy_info*)(pnf_p7->user_data);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc; if (proc ==NULL)
proc = &eNB->proc.L1_proc;
for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++) { for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++) {
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i); //LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
...@@ -719,7 +719,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t * ...@@ -719,7 +719,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *
return 0; return 0;
} }
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) { int pnf_phy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
if (RC.ru == 0) { if (RC.ru == 0) {
return -1; return -1;
} }
...@@ -740,7 +740,8 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request ...@@ -740,7 +740,8 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
int sfn = NFAPI_SFNSF2SFN(req->sfn_sf); int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
int sf = NFAPI_SFNSF2SF(req->sfn_sf); int sf = NFAPI_SFNSF2SF(req->sfn_sf);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc; if (proc==NULL)
proc = &eNB->proc.L1_proc;
nfapi_dl_config_request_pdu_t *dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list; nfapi_dl_config_request_pdu_t *dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list;
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[sf&1]; LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[sf&1];
pdcch_vars->num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols; pdcch_vars->num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols;
...@@ -797,7 +798,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request ...@@ -797,7 +798,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid]; uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid];
memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length); memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
handle_nfapi_dlsch_pdu( eNB, sfn,sf, &eNB->proc.L1_proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu); handle_nfapi_dlsch_pdu( eNB, sfn,sf, proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
} else { } else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index);
} }
...@@ -837,7 +838,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) { ...@@ -837,7 +838,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) {
return 0; return 0;
} }
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) { int pnf_phy_ul_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n", if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n",
__FUNCTION__, __FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(req->sfn_sf),
...@@ -866,7 +867,8 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request ...@@ -866,7 +867,8 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request
uint16_t curr_sfn = NFAPI_SFNSF2SFN(req->sfn_sf); uint16_t curr_sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
uint16_t curr_sf = NFAPI_SFNSF2SF(req->sfn_sf); uint16_t curr_sf = NFAPI_SFNSF2SF(req->sfn_sf);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc; if (proc==NULL)
proc = &eNB->proc.L1_proc;
nfapi_ul_config_request_pdu_t *ul_config_pdu_list = req->ul_config_request_body.ul_config_pdu_list; nfapi_ul_config_request_pdu_t *ul_config_pdu_list = req->ul_config_request_body.ul_config_pdu_list;
for (int i=0; i<req->ul_config_request_body.number_of_pdus; i++) { for (int i=0; i<req->ul_config_request_body.number_of_pdus; i++) {
......
...@@ -23,5 +23,5 @@ ...@@ -23,5 +23,5 @@
#define NFAPI_PNF_H__ #define NFAPI_PNF_H__
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port); void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
#endif #endif
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "fapi_nr_ue_constants.h" #include "fapi_nr_ue_constants.h"
#include "PHY/impl_defs_nr.h" #include "PHY/impl_defs_nr.h"
#define NFAPI_UE_MAX_NUM_CB 8
/* /*
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
...@@ -256,40 +258,124 @@ typedef struct { ...@@ -256,40 +258,124 @@ typedef struct {
} fapi_nr_ul_config_pucch_pdu; } fapi_nr_ul_config_pucch_pdu;
typedef enum {pusch_freq_hopping_disabled = 0 , pusch_freq_hopping_enabled = 1}pusch_freq_hopping_t; typedef struct
typedef struct{ {
uint8_t aperiodicSRS_ResourceTrigger; uint8_t rv_index;
} fapi_nr_ul_srs_config_t; uint8_t harq_process_id;
typedef struct { uint8_t new_data_indicator;
uint8_t bandwidth_part_ind; uint32_t tb_size;
uint16_t number_rbs; uint16_t num_cb;
uint16_t start_rb; uint8_t cb_present_and_position[(NFAPI_UE_MAX_NUM_CB+7) / 8];
uint8_t frame_offset;
uint16_t number_symbols;
uint16_t start_symbol;
pusch_freq_hopping_t pusch_freq_hopping;
uint8_t mcs;
uint8_t ndi;
uint8_t rv;
uint8_t harq_process_nbr;
int8_t accumulated_delta_PUSCH;
int8_t absolute_delta_PUSCH;
uint8_t n_layers;
uint8_t tpmi;
uint8_t n_dmrs_cdm_groups;
uint8_t dmrs_ports[4];
uint8_t n_front_load_symb;
fapi_nr_ul_srs_config_t srs_config;
uint8_t csi_reportTriggerSize;
uint8_t maxCodeBlockGroupsPerTransportBlock;
uint8_t ptrs_dmrs_association_port;
uint8_t beta_offset_ind;
} fapi_nr_ul_config_pusch_pdu_rel15_t;
typedef struct { } nfapi_nr_ue_pusch_data_t;
typedef struct
{
uint16_t harq_ack_bit_length;
uint16_t csi_part1_bit_length;
uint16_t csi_part2_bit_length;
uint8_t alpha_scaling;
uint8_t beta_offset_harq_ack;
uint8_t beta_offset_csi1;
uint8_t beta_offset_csi2;
} nfapi_nr_ue_pusch_uci_t;
typedef struct
{
uint16_t ptrs_port_index;//PT-RS antenna ports [TS38.214, sec6.2.3.1 and 38.212, section 7.3.1.1.2] Bitmap occupying the 12 LSBs with: bit 0: antenna port 0 bit 11: antenna port 11 and for each bit 0: PTRS port not used 1: PTRS port used
uint8_t ptrs_dmrs_port;//DMRS port corresponding to PTRS.
uint8_t ptrs_re_offset;//PT-RS resource element offset value taken from 0~11
} nfapi_nr_ue_ptrs_ports_t;
typedef struct
{
uint8_t num_ptrs_ports;
nfapi_nr_ue_ptrs_ports_t* ptrs_ports_list;
uint8_t ptrs_time_density;
uint8_t ptrs_freq_density;
uint8_t ul_ptrs_power;
}nfapi_nr_ue_pusch_ptrs_t;
typedef struct
{
uint8_t low_papr_group_number;//Group number for Low PAPR sequence generation.
uint16_t low_papr_sequence_number;//[TS38.211, sec 5.2.2] For DFT-S-OFDM.
uint8_t ul_ptrs_sample_density;//Number of PTRS groups [But I suppose this sentence is misplaced, so as the next one. --Chenyu]
uint8_t ul_ptrs_time_density_transform_precoding;//Number of samples per PTRS group
} nfapi_nr_ue_dfts_ofdm_t;
typedef struct
{
uint16_t beam_idx;//Index of the digital beam weight vector pre-stored at cell configuration. The vector maps this input port to output TXRUs. Value: 0->65535
}nfapi_nr_ue_dig_bf_interface_t;
typedef struct
{
nfapi_nr_ue_dig_bf_interface_t* dig_bf_interface_list;
} nfapi_nr_ue_ul_beamforming_number_of_prgs_t;
typedef struct
{
uint16_t num_prgs;
uint16_t prg_size;
//watchout: dig_bf_interface here, in table 3-43 it's dig_bf_interfaces
uint8_t dig_bf_interface;
nfapi_nr_ue_ul_beamforming_number_of_prgs_t* prgs_list;//
} nfapi_nr_ue_ul_beamforming_t;
typedef struct
{
uint16_t pdu_bit_map;//Bitmap indicating presence of optional PDUs (see above)
uint16_t rnti; uint16_t rnti;
fapi_nr_ul_config_pusch_pdu_rel15_t ulsch_pdu_rel15; uint32_t handle;//An opaque handling returned in the RxData.indication and/or UCI.indication message
} fapi_nr_ul_config_pusch_pdu; //BWP
uint16_t bwp_size;
uint16_t bwp_start;
uint8_t subcarrier_spacing;
uint8_t cyclic_prefix;
//pusch information always include
uint16_t target_code_rate;
uint8_t qam_mod_order;
uint8_t mcs_index;
uint8_t mcs_table;
uint8_t transform_precoding;
uint16_t data_scrambling_id;
uint8_t nrOfLayers;
//DMRS
uint16_t ul_dmrs_symb_pos;
uint8_t dmrs_config_type;
uint16_t ul_dmrs_scrambling_id;
uint8_t scid;
uint8_t num_dmrs_cdm_grps_no_data;
uint16_t dmrs_ports;//DMRS ports. [TS38.212 7.3.1.1.2] provides description between DCI 0-1 content and DMRS ports. Bitmap occupying the 11 LSBs with: bit 0: antenna port 1000 bit 11: antenna port 1011 and for each bit 0: DMRS port not used 1: DMRS port used
//Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2]
uint8_t resource_alloc;
uint8_t rb_bitmap[36];//
uint16_t rb_start;
uint16_t rb_size;
uint8_t vrb_to_prb_mapping;
uint8_t frequency_hopping;
uint16_t tx_direct_current_location;//The uplink Tx Direct Current location for the carrier. Only values in the value range of this field between 0 and 3299, which indicate the subcarrier index within the carrier corresponding 1o the numerology of the corresponding uplink BWP and value 3300, which indicates "Outside the carrier" and value 3301, which indicates "Undetermined position within the carrier" are used. [TS38.331, UplinkTxDirectCurrentBWP IE]
uint8_t uplink_frequency_shift_7p5khz;
//Resource Allocation in time domain
uint8_t start_symbol_index;
uint8_t nr_of_symbols;
//Optional Data only included if indicated in pduBitmap
nfapi_nr_ue_pusch_data_t pusch_data;
nfapi_nr_ue_pusch_uci_t pusch_uci;
nfapi_nr_ue_pusch_ptrs_t pusch_ptrs;
nfapi_nr_ue_dfts_ofdm_t dfts_ofdm;
//beamforming
nfapi_nr_ue_ul_beamforming_t beamforming;
//OAI specific
int8_t absolute_delta_PUSCH;
} nfapi_nr_ue_pusch_pdu_t;
typedef struct { typedef struct {
...@@ -300,7 +386,7 @@ typedef struct { ...@@ -300,7 +386,7 @@ typedef struct {
union { union {
fapi_nr_ul_config_prach_pdu prach_config_pdu; fapi_nr_ul_config_prach_pdu prach_config_pdu;
fapi_nr_ul_config_pucch_pdu pucch_config_pdu; fapi_nr_ul_config_pucch_pdu pucch_config_pdu;
fapi_nr_ul_config_pusch_pdu ulsch_config_pdu; nfapi_nr_ue_pusch_pdu_t pusch_config_pdu;
fapi_nr_ul_config_srs_pdu srs_config_pdu; fapi_nr_ul_config_srs_pdu srs_config_pdu;
}; };
} fapi_nr_ul_config_request_pdu_t; } fapi_nr_ul_config_request_pdu_t;
...@@ -341,7 +427,6 @@ typedef struct { ...@@ -341,7 +427,6 @@ typedef struct {
uint8_t SubcarrierSpacing; uint8_t SubcarrierSpacing;
uint16_t number_rbs; uint16_t number_rbs;
uint16_t start_rb; uint16_t start_rb;
uint8_t frame_offset;
uint16_t number_symbols; uint16_t number_symbols;
uint16_t start_symbol; uint16_t start_symbol;
uint16_t dlDmrsSymbPos; uint16_t dlDmrsSymbPos;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#define _NFAPI_NR_INTERFACE_H_ #define _NFAPI_NR_INTERFACE_H_
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include <nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h>
#define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5 #define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
#define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64 #define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define NFAPI_MAX_NUM_UL_UE_PER_GROUP 6 #define NFAPI_MAX_NUM_UL_UE_PER_GROUP 6
#define NFAPI_MAX_NUM_UL_PDU 8 #define NFAPI_MAX_NUM_UL_PDU 8
#define NFAPI_MAX_NUM_UCI_INDICATION 8
#define NFAPI_MAX_NUM_GROUPS 8 #define NFAPI_MAX_NUM_GROUPS 8
#define NFAPI_MAX_NUM_CB 8 #define NFAPI_MAX_NUM_CB 8
...@@ -1393,7 +1394,7 @@ typedef struct ...@@ -1393,7 +1394,7 @@ typedef struct
uint16_t timing_advance;//Timing advance 𝑇𝐴 measured for the UE [TS 38.213, Section 4.2] NTA_new = NTA_old + (TA − 31) ⋅ 16 ⋅ 64⁄2μ Value: 0 → 63 0xffff should be set if this field is invalid uint16_t timing_advance;//Timing advance 𝑇𝐴 measured for the UE [TS 38.213, Section 4.2] NTA_new = NTA_old + (TA − 31) ⋅ 16 ⋅ 64⁄2μ Value: 0 → 63 0xffff should be set if this field is invalid
uint16_t rssi; uint16_t rssi;
//variable ! fixme //variable ! fixme
uint32_t pdu; //MAC PDU uint8_t *pdu; //MAC PDU
} nfapi_nr_rx_data_pdu_t; } nfapi_nr_rx_data_pdu_t;
...@@ -1519,8 +1520,8 @@ typedef struct ...@@ -1519,8 +1520,8 @@ typedef struct
uint8_t ul_cqi; uint8_t ul_cqi;
uint16_t timing_advance; uint16_t timing_advance;
uint16_t rssi; uint16_t rssi;
nfapi_nr_sr_pdu_0_1_t sr;//67 nfapi_nr_sr_pdu_0_1_t *sr;//67
nfapi_nr_harq_pdu_0_1_t harq;//68 nfapi_nr_harq_pdu_0_1_t *harq;//68
}nfapi_nr_uci_pucch_pdu_format_0_1_t; }nfapi_nr_uci_pucch_pdu_format_0_1_t;
...@@ -1542,28 +1543,22 @@ typedef struct ...@@ -1542,28 +1543,22 @@ typedef struct
}nfapi_nr_uci_pucch_pdu_format_2_3_4_t; }nfapi_nr_uci_pucch_pdu_format_2_3_4_t;
//for SR, HARQ and CSI Part 1/ 2 PDUs typedef enum {
NFAPI_NR_UCI_PDCCH_PDU_TYPE = 0,
typedef struct NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE = 1,
{ NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE = 2,
nfapi_nr_uci_pusch_pdu_t* pusch_pdu; } nfapi_nr_uci_pdu_type_e;
nfapi_nr_uci_pucch_pdu_format_0_1_t* pucch_pdu_format_0_1;
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* pucch_pdu_format_2_3_4;
nfapi_nr_sr_pdu_0_1_t* sr_pdu_0_1;
nfapi_nr_sr_pdu_2_3_4_t* sr_pdu_2_3_4;
nfapi_nr_harq_pdu_0_1_t* harq_pdu_0_1;
nfapi_nr_harq_pdu_2_3_4_t* harq_pdu_2_3_4;
nfapi_nr_csi_part1_pdu_t* csi_part1_pdu;
nfapi_nr_csi_part2_pdu_t* csi_part2_pdu;
} nfapi_nr_uci_pdu_information_t;
typedef struct typedef struct
{ {
uint16_t pdu_type; uint16_t pdu_type; // 0 for PDU on PUSCH, 1 for PUCCH format 0 or 1, 2 for PUCCH format 2 to 4
uint16_t pdu_size; uint16_t pdu_size;
nfapi_nr_uci_pdu_information_t uci_pdu; union
{
nfapi_nr_uci_pusch_pdu_t pusch_pdu;
nfapi_nr_uci_pucch_pdu_format_0_1_t pucch_pdu_format_0_1;
nfapi_nr_uci_pucch_pdu_format_2_3_4_t pucch_pdu_format_2_3_4;
};
} nfapi_nr_uci_t; } nfapi_nr_uci_t;
typedef struct typedef struct
...@@ -1571,7 +1566,7 @@ typedef struct ...@@ -1571,7 +1566,7 @@ typedef struct
uint16_t sfn; uint16_t sfn;
uint16_t slot; uint16_t slot;
uint16_t num_ucis; uint16_t num_ucis;
nfapi_nr_uci_t* uci_list; nfapi_nr_uci_t uci_list[NFAPI_MAX_NUM_UCI_INDICATION];
} nfapi_nr_uci_indication_t; } nfapi_nr_uci_indication_t;
......
...@@ -24,6 +24,7 @@ extern "C" { ...@@ -24,6 +24,7 @@ extern "C" {
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "debug.h" #include "debug.h"
#include <openair2/PHY_INTERFACE/IF_Module.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -619,21 +620,21 @@ typedef struct nfapi_pnf_p7_config ...@@ -619,21 +620,21 @@ typedef struct nfapi_pnf_p7_config
* \param req A pointer to the dl config request message structure * \param req A pointer to the dl config request message structure
* \return not currently used * \return not currently used
*/ */
int (*dl_config_req)(nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req); int (*dl_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
/*! A callback for the UL_CONFIG.request /*! A callback for the UL_CONFIG.request
* \param config A poiner to the PNF P7 config * \param config A poiner to the PNF P7 config
* \param req A pointer to the ul config request message structure * \param req A pointer to the ul config request message structure
* \return not currently used * \return not currently used
*/ */
int (*ul_config_req)(nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req); int (*ul_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
/*! A callback for the HI_DCI0.request /*! A callback for the HI_DCI0.request
* \param config A poiner to the PNF P7 config * \param config A poiner to the PNF P7 config
* \param req A pointer to the hi dci0 request message structure * \param req A pointer to the hi dci0 request message structure
* \return not currently used * \return not currently used
*/ */
int (*hi_dci0_req)(nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req); int (*hi_dci0_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
/*! A callback for the TX_REQ.request /*! A callback for the TX_REQ.request
* \param config A poiner to the PNF P7 config * \param config A poiner to the PNF P7 config
......
...@@ -39,7 +39,7 @@ nfapi_pnf_config_t* nfapi_pnf_config_create() ...@@ -39,7 +39,7 @@ nfapi_pnf_config_t* nfapi_pnf_config_create()
_this->_public.codec_config.allocate = &malloc; _this->_public.codec_config.allocate = &malloc;
_this->_public.codec_config.deallocate = &free; _this->_public.codec_config.deallocate = &free;
return &(_this->_public); return (nfapi_pnf_config_t* )_this;
} }
void nfapi_pnf_config_destory(nfapi_pnf_config_t* config) void nfapi_pnf_config_destory(nfapi_pnf_config_t* config)
......
...@@ -576,20 +576,20 @@ void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf) ...@@ -576,20 +576,20 @@ void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
{ {
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf; pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - enter\n"); //NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - enter\n");
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req); (pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - exit\n"); //NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - exit\n");
} }
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req) if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
{ {
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf; pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy ul_config_req - enter\n"); NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy ul_config_req - enter\n");
(pnf_p7->_public.ul_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req); (pnf_p7->_public.ul_config_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
} }
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req) if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
{ {
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf; pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf;
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy hi_dci0 - enter\n"); NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy hi_dci0 - enter\n");
(pnf_p7->_public.hi_dci0_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req); (pnf_p7->_public.hi_dci0_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
} }
if(pnf_p7->_public.lbt_dl_config_req && pnf_p7->_public.dummy_subframe.lbt_dl_config_req) if(pnf_p7->_public.lbt_dl_config_req && pnf_p7->_public.dummy_subframe.lbt_dl_config_req)
{ {
...@@ -699,7 +699,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -699,7 +699,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(tx_subframe_buffer->dl_config_req != 0) if(tx_subframe_buffer->dl_config_req != 0)
{ {
if(pnf_p7->_public.dl_config_req) if(pnf_p7->_public.dl_config_req)
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), tx_subframe_buffer->dl_config_req); (pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
//deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7); //deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
} }
...@@ -709,14 +709,14 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -709,14 +709,14 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.dl_config_req && pnf_p7->_public.dummy_subframe.dl_config_req) if(pnf_p7->_public.dl_config_req && pnf_p7->_public.dummy_subframe.dl_config_req)
{ {
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf_tx; pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf_tx;
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req); (pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
} }
} }
if(tx_subframe_buffer->hi_dci0_req != 0) if(tx_subframe_buffer->hi_dci0_req != 0)
{ {
if(pnf_p7->_public.hi_dci0_req) if(pnf_p7->_public.hi_dci0_req)
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req); (pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
//deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7); //deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
} }
...@@ -726,7 +726,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -726,7 +726,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req) if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
{ {
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf_tx; pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf_tx;
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req); (pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
} }
} }
...@@ -777,7 +777,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -777,7 +777,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(subframe_buffer->ul_config_req != 0) if(subframe_buffer->ul_config_req != 0)
{ {
if(pnf_p7->_public.ul_config_req) if(pnf_p7->_public.ul_config_req)
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), subframe_buffer->ul_config_req); (pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), subframe_buffer->ul_config_req);
//deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7); //deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
} }
...@@ -787,7 +787,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf) ...@@ -787,7 +787,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req) if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
{ {
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf; pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req); (pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
} }
} }
......
...@@ -55,7 +55,7 @@ nfapi_vnf_config_t* nfapi_vnf_config_create() ...@@ -55,7 +55,7 @@ nfapi_vnf_config_t* nfapi_vnf_config_create()
_this->_public.codec_config.deallocate = &free; _this->_public.codec_config.deallocate = &free;
return &(_this->_public); return (nfapi_vnf_config_t* )_this;
} }
void nfapi_vnf_config_destory(nfapi_vnf_config_t* config) void nfapi_vnf_config_destory(nfapi_vnf_config_t* config)
......
...@@ -47,7 +47,7 @@ nfapi_vnf_p7_config_t* nfapi_vnf_p7_config_create() ...@@ -47,7 +47,7 @@ nfapi_vnf_p7_config_t* nfapi_vnf_p7_config_create()
_this->_public.codec_config.deallocate = &free; _this->_public.codec_config.deallocate = &free;
return &(_this->_public); return (nfapi_vnf_p7_config_t*)_this;
} }
void nfapi_vnf_p7_config_destory(nfapi_vnf_p7_config_t* config) void nfapi_vnf_p7_config_destory(nfapi_vnf_p7_config_t* config)
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
// add GPU mode (-G 1)
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
...@@ -26,12 +25,11 @@ ...@@ -26,12 +25,11 @@
#include <string.h> #include <string.h>
#include "assertions.h" #include "assertions.h"
#include "SIMULATION/TOOLS/sim.h" #include "SIMULATION/TOOLS/sim.h"
#include "PHY/CODING/nrLDPC_encoder/defs.h" #include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
// extern "C" {
#include "PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.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
...@@ -88,6 +86,7 @@ typedef struct { ...@@ -88,6 +86,7 @@ typedef struct {
RAN_CONTEXT_t RC; RAN_CONTEXT_t RC;
PHY_VARS_UE ***PHY_vars_UE_g; PHY_VARS_UE ***PHY_vars_UE_g;
uint16_t NB_UE_INST = 1; uint16_t NB_UE_INST = 1;
nrLDPC_encoderfunc_t encoder_orig;
short lift_size[51]= {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384}; short lift_size[51]= {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
...@@ -118,7 +117,6 @@ int test_ldpc(short No_iteration, ...@@ -118,7 +117,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];
...@@ -290,16 +288,19 @@ int test_ldpc(short No_iteration, ...@@ -290,16 +288,19 @@ int test_ldpc(short No_iteration,
no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*(1/((float)nom_rate/(float)denom_rate)))/Zc; no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*(1/((float)nom_rate/(float)denom_rate)))/Zc;
// printf("puncture:%d\n",no_punctured_columns); // printf("puncture:%d\n",no_punctured_columns);
removed_bit=(nrows-no_punctured_columns-2) * Zc+block_length-(int)(block_length/((float)nom_rate/(float)denom_rate)); removed_bit=(nrows-no_punctured_columns-2) * Zc+block_length-(int)(block_length/((float)nom_rate/(float)denom_rate));
encoder_implemparams_t impp=INIT0_LDPCIMPLEMPARAMS;
impp.gen_code=1;
if (ntrials==0) if (ntrials==0)
ldpc_encoder_orig(test_input[0],channel_input[0], Zc, BG, block_length, BG, 1); encoder_orig(test_input,channel_input, Zc, BG, block_length, BG, &impp);
impp.gen_code=0;
for (trial=0; trial < ntrials; trial++) for (trial=0; trial < ntrials; trial++)
{ {
segment_bler = 0; segment_bler = 0;
//// encoder //// encoder
start_meas(&time); start_meas(&time);
for(j=0;j<n_segments;j++) { for(j=0;j<n_segments;j++) {
ldpc_encoder_orig(test_input[j], channel_input[j],Zc,Kb,block_length,BG,0); encoder_orig(&(test_input[j]), &(channel_input[j]),Zc,Kb,block_length,BG,&impp);
} }
stop_meas(&time); stop_meas(&time);
...@@ -309,10 +310,11 @@ int test_ldpc(short No_iteration, ...@@ -309,10 +310,11 @@ int test_ldpc(short No_iteration,
ldpc_encoder_optim(test_input[j],channel_input_optim[j],Zc,Kb,block_length,BG,&tinput,&tprep,&tparity,&toutput); ldpc_encoder_optim(test_input[j],channel_input_optim[j],Zc,Kb,block_length,BG,&tinput,&tprep,&tparity,&toutput);
} }
stop_meas(time_optim);*/ stop_meas(time_optim);*/
impp.n_segments=n_segments;
for(j=0;j<(n_segments/8+1);j++) { for(j=0;j<(n_segments/8+1);j++) {
start_meas(time_optim); start_meas(time_optim);
ldpc_encoder_optim_8seg_multi(test_input,channel_input_optim,Zc,Kb,block_length, BG, n_segments,j,&tinput,&tprep,&tparity,&toutput); impp.macro_num=j;
nrLDPC_encoder(test_input,channel_input_optim,Zc,Kb,block_length, BG, &impp);
stop_meas(time_optim); stop_meas(time_optim);
} }
...@@ -399,25 +401,21 @@ int test_ldpc(short No_iteration, ...@@ -399,25 +401,21 @@ int test_ldpc(short No_iteration,
for(j=0;j<n_segments;j++) { for(j=0;j<n_segments;j++) {
start_meas(time_decoder);
if(run_cuda){
printf("***********run ldpc by cuda\n");
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 // decode the sequence
// decoder supports BG2, Z=128 & 256 // decoder supports BG2, Z=128 & 256
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate)); //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); ///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
//#ifdef __NR_LDPC_DECODER_LYC__H__RUN__ n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
if(run_cuda){ }
printf("run ldpc by cuda\n"); stop_meas(time_decoder);
start_meas(time_decoder);
n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder);
stop_meas(time_decoder);
}
//#else
else{
printf("run ldpc by cpu\n");
start_meas(time_decoder);
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
stop_meas(time_decoder);
}
//#endif
} }
//for (i=(Kb+nrows) * Zc-5;i<(Kb+nrows) * Zc;i++) //for (i=(Kb+nrows) * Zc-5;i<(Kb+nrows) * Zc;i++)
...@@ -520,10 +518,12 @@ int main(int argc, char *argv[]) ...@@ -520,10 +518,12 @@ int main(int argc, char *argv[])
unsigned int errors, errors_bit, crc_misses; unsigned int errors, errors_bit, crc_misses;
double errors_bit_uncoded; double errors_bit_uncoded;
short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560 short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
short run_cuda = 0;
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;
...@@ -540,9 +540,9 @@ int main(int argc, char *argv[]) ...@@ -540,9 +540,9 @@ int main(int argc, char *argv[])
time_stats_t time_optim[10], time_decoder[10]; time_stats_t time_optim[10], time_decoder[10];
n_iter_stats_t dec_iter[3]; n_iter_stats_t dec_iter[3];
short BG=0,Zc,Kb; short BG=0,Zc,Kb=0;
while ((c = getopt (argc, argv, "q:r:s:S:l:n:d:i:t:u:h:G:")) != -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':
...@@ -552,10 +552,7 @@ int main(int argc, char *argv[]) ...@@ -552,10 +552,7 @@ int main(int argc, char *argv[])
case 'r': case 'r':
nom_rate = atoi(optarg); nom_rate = atoi(optarg);
break; break;
case 'G':
run_cuda = atoi(optarg);
break;
case 'd': case 'd':
denom_rate = atoi(optarg); denom_rate = atoi(optarg);
break; break;
...@@ -563,6 +560,10 @@ int main(int argc, char *argv[]) ...@@ -563,6 +560,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);
...@@ -587,7 +588,6 @@ int main(int argc, char *argv[]) ...@@ -587,7 +588,6 @@ int main(int argc, char *argv[])
case 'u': case 'u':
test_uncoded = atoi(optarg); test_uncoded = atoi(optarg);
break; break;
case 'h': case 'h':
default: default:
...@@ -599,6 +599,7 @@ int main(int argc, char *argv[]) ...@@ -599,6 +599,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");
...@@ -606,7 +607,6 @@ int main(int argc, char *argv[]) ...@@ -606,7 +607,6 @@ int main(int argc, char *argv[])
printf("-t SNR simulation step, Default: 0.1\n"); printf("-t SNR simulation step, Default: 0.1\n");
printf("-i Max decoder iterations, Default: 5\n"); printf("-i Max decoder iterations, Default: 5\n");
printf("-u Set SNR per coded bit, Default: 0\n"); printf("-u Set SNR per coded bit, Default: 0\n");
printf("-G set 1 to run cuda for ldpc \n");
exit(1); exit(1);
break; break;
} }
...@@ -616,10 +616,10 @@ int main(int argc, char *argv[]) ...@@ -616,10 +616,10 @@ int main(int argc, char *argv[])
printf("block length %d: \n", block_length); printf("block length %d: \n", block_length);
printf("n_trials %d: \n", n_trials); printf("n_trials %d: \n", n_trials);
printf("SNR0 %f: \n", SNR0); printf("SNR0 %f: \n", SNR0);
load_nrLDPClib();
load_nrLDPClib_ref("_orig", &encoder_orig);
//for (block_length=8;block_length<=MAX_BLOCK_LENGTH;block_length+=8) //for (block_length=8;block_length<=MAX_BLOCK_LENGTH;block_length+=8)
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*!\file nrLDPC_decoder.c /*!\file nrLDPC_decoder.c
* \brief Defines the LDPC decoder * \brief Defines the LDPC decoder
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com> * \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
......
...@@ -38,7 +38,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -38,7 +38,7 @@ int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS *fp = ru->frame_parms; LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
RU_CALIBRATION *calibration = &ru->calibration; RU_CALIBRATION *calibration = &ru->calibration;
int i,j,p,re; int i,j,p,re;
init_dfts(); //load_dftslib();
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx); LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
if (ru->is_slave == 1) { if (ru->is_slave == 1) {
...@@ -76,7 +76,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -76,7 +76,7 @@ int phy_init_RU(RU_t *ru) {
} }
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
init_dfts(); load_dftslib();
init_7_5KHz(); init_7_5KHz();
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) ); ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
......
...@@ -625,7 +625,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue, ...@@ -625,7 +625,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
int th_id; int th_id;
LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
crcTableInit(); crcTableInit();
init_dfts(); load_dftslib();
init_frame_parms(&ue->frame_parms,1); init_frame_parms(&ue->frame_parms,1);
lte_sync_time_init(&ue->frame_parms); lte_sync_time_init(&ue->frame_parms);
init_lte_top(&ue->frame_parms); init_lte_top(&ue->frame_parms);
......
...@@ -96,7 +96,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -96,7 +96,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
while(gNB->configured == 0) usleep(10000); while(gNB->configured == 0) usleep(10000);
init_dfts(); load_dftslib();
/* /*
LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n", LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
gNB->Mod_id, gNB->Mod_id,
...@@ -112,7 +112,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -112,7 +112,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
);*/ );*/
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id); LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id);
crcTableInit(); crcTableInit();
init_dfts(); init_scrambling_luts();
init_pucch2_luts();
load_nrLDPClib(); load_nrLDPClib();
// PBCH DMRS gold sequences generation // PBCH DMRS gold sequences generation
nr_init_pbch_dmrs(gNB); nr_init_pbch_dmrs(gNB);
......
...@@ -657,8 +657,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -657,8 +657,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
abstraction_flag = 0; abstraction_flag = 0;
fp->nb_antennas_tx = 1; fp->nb_antennas_tx = 1;
fp->nb_antennas_rx=1; fp->nb_antennas_rx=1;
dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig; // dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig; // ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
phy_init_nr_top(ue); phy_init_nr_top(ue);
...@@ -710,9 +710,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -710,9 +710,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
} }
//------------- config DMRS parameters--------------// //------------- config DMRS parameters--------------//
dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1; // dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0; // dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
dmrs_Uplink_Config->pusch_maxLength = pusch_len1; // dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
//-------------------------------------------------// //-------------------------------------------------//
ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1; ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1;
ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0; ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0;
...@@ -745,15 +745,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -745,15 +745,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
/////////////////////////PUSCH PTRS init///////////////////////// /////////////////////////PUSCH PTRS init/////////////////////////
/////////// ///////////
ue->ptrs_configured = 0; // flag to be toggled by RCC
//------------- config PTRS parameters--------------// //------------- config PTRS parameters--------------//
ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 0; // setting MCS values to 0 indicate abscence of time_density field in the configuration // ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 2; // setting MCS values to 0 indicate abscence of time_density field in the configuration
ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 0; // ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 4;
ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 0; // ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 10;
ptrs_Uplink_Config->frequencyDensity.n_rb0 = 0; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration // ptrs_Uplink_Config->frequencyDensity.n_rb0 = 25; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
ptrs_Uplink_Config->frequencyDensity.n_rb1 = 0; // ptrs_Uplink_Config->frequencyDensity.n_rb1 = 75;
ptrs_Uplink_Config->resourceElementOffset = 0; // ptrs_Uplink_Config->resourceElementOffset = 0;
//-------------------------------------------------// //-------------------------------------------------//
/////////// ///////////
...@@ -988,7 +986,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue, ...@@ -988,7 +986,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
void phy_init_nr_top(PHY_VARS_NR_UE *ue) { void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
crcTableInit(); crcTableInit();
init_dfts(); load_dftslib();
init_context_synchro_nr(frame_parms); init_context_synchro_nr(frame_parms);
generate_ul_reference_signal_sequences(SHRT_MAX); generate_ul_reference_signal_sequences(SHRT_MAX);
// Polar encoder init for PBCH // Polar encoder init for PBCH
......
...@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
// do ifft of channel estimate // do ifft of channel estimate
switch(frame_parms->N_RB_DL) { switch(frame_parms->N_RB_DL) {
case 6: case 6:
dft128((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0], dft(DFT_128,(int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1); 1);
break; break;
case 25: case 25:
dft512((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0], dft(DFT_512,(int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1); 1);
break; break;
case 50: case 50:
dft1024((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0], dft(DFT_1024,(int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1); 1);
break; break;
case 100: case 100:
dft2048((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0], dft(DFT_2048,(int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1); 1);
break; break;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
......
...@@ -43,7 +43,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -43,7 +43,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uint8_t pilot0,pilot1,pilot2,pilot3; uint8_t pilot0,pilot1,pilot2,pilot3;
short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev; short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev;
short *fl, *fm, *fr, *fl_dc, *fm_dc, *fr_dc, *f1, *f2l, *f2r; short *fl=NULL, *fm=NULL, *fr=NULL, *fl_dc=NULL, *fm_dc=NULL, *fr_dc=NULL, *f1, *f2l=NULL, *f2r=NULL;
unsigned int *rballoc; unsigned int *rballoc;
int **rxdataF; int **rxdataF;
...@@ -58,10 +58,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -58,10 +58,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) || if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
((frame_parms->Ncp == EXTENDED) && (symbol>=6))) ((frame_parms->Ncp == EXTENDED) && (symbol>=6)))
rballoc = dlsch0_harq->rb_alloc_odd; rballoc = dlsch0_harq->rb_alloc_odd;
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF; rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF;
...@@ -69,56 +69,56 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -69,56 +69,56 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
ch_offset = frame_parms->ofdm_symbol_size; ch_offset = frame_parms->ofdm_symbol_size;
else else
ch_offset = frame_parms->ofdm_symbol_size*symbol; ch_offset = frame_parms->ofdm_symbol_size*symbol;
uespec_nushift = frame_parms->Nid_cell%3; uespec_nushift = frame_parms->Nid_cell%3;
subframe = Ns>>1; subframe = Ns>>1;
//generate ue specific pilots
lprime = symbol/3-1;
lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
//LOG_M("uespec_pilot_rx.m","uespec_pilot",uespec_pilot,300,1,1);
if (frame_parms->Ncp==0){
if (symbol==3 || symbol==6 || symbol==9 || symbol==12)
uespec_pilots = 1;
} else{
if (symbol==4 || symbol==7 || symbol==10)
uespec_pilots = 1;
}
if ((frame_parms->Ncp==0 && (symbol==6 ||symbol ==12)) || (frame_parms->Ncp==1 && symbol==7))
uespec_poffset = 2;
if (phy_vars_ue->frame_parms.Ncp == 0) { // normal prefix
pilot0 = 3;
pilot1 = 6;
pilot2 = 9;
pilot3 = 12;
} else { // extended prefix
pilot0 = 4;
pilot1 = 7;
pilot2 = 10;
}
//define the filter //generate ue specific pilots
pil_offset = (uespec_nushift+uespec_poffset)%3; lprime = symbol/3-1;
// printf("symbol=%d,pil_offset=%d\n",symbol,pil_offset); lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
switch (pil_offset) { //LOG_M("uespec_pilot_rx.m","uespec_pilot",uespec_pilot,300,1,1);
case 0:
fl = filt16_l0; if (frame_parms->Ncp==0){
fm = filt16_m0; if (symbol==3 || symbol==6 || symbol==9 || symbol==12)
fr = filt16_r0; uespec_pilots = 1;
fl_dc = filt16_l0; } else{
fm_dc = filt16_m0; if (symbol==4 || symbol==7 || symbol==10)
fr_dc = filt16_r0; uespec_pilots = 1;
f1 = filt16_1; }
f2l = filt16_2l0;
f2r = filt16_2r0; if ((frame_parms->Ncp==0 && (symbol==6 ||symbol ==12)) || (frame_parms->Ncp==1 && symbol==7))
uespec_poffset = 2;
if (phy_vars_ue->frame_parms.Ncp == 0) { // normal prefix
pilot0 = 3;
pilot1 = 6;
pilot2 = 9;
pilot3 = 12;
} else { // extended prefix
pilot0 = 4;
pilot1 = 7;
pilot2 = 10;
}
//define the filter
pil_offset = (uespec_nushift+uespec_poffset)%3;
// printf("symbol=%d,pil_offset=%d\n",symbol,pil_offset);
switch (pil_offset) {
case 0:
fl = filt16_l0;
fm = filt16_m0;
fr = filt16_r0;
fl_dc = filt16_l0;
fm_dc = filt16_m0;
fr_dc = filt16_r0;
f1 = filt16_1;
f2l = filt16_2l0;
f2r = filt16_2r0;
break; break;
case 1: case 1:
......
...@@ -657,35 +657,35 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -657,35 +657,35 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
} }
} }
void (*idft)(int16_t *,int16_t *, int); idft_size_idx_t idftsizeidx;
switch (ue->frame_parms.ofdm_symbol_size) { switch (ue->frame_parms.ofdm_symbol_size) {
case 128: case 128:
idft = idft128; idftsizeidx = IDFT_128;
break; break;
case 256: case 256:
idft = idft256; idftsizeidx = IDFT_256;
break; break;
case 512: case 512:
idft = idft512; idftsizeidx = IDFT_512;
break; break;
case 1024: case 1024:
idft = idft1024; idftsizeidx = IDFT_1024;
break; break;
case 1536: case 1536:
idft = idft1536; idftsizeidx = IDFT_1536;
break; break;
case 2048: case 2048:
idft = idft2048; idftsizeidx = IDFT_2048;
break; break;
default: default:
idft = idft512; idftsizeidx = IDFT_512;
break; break;
} }
...@@ -695,7 +695,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -695,7 +695,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) { for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) { if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) {
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l); //LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
idft((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8], idft(idftsizeidx,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1); (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
} }
} }
......
...@@ -724,31 +724,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -724,31 +724,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) { if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
switch (ue->frame_parms.N_RB_DL) { switch (ue->frame_parms.N_RB_DL) {
case 6: case 6:
idft128((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8], idft(IDFT_128,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa], (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8], idft(IDFT_512,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa], (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8], idft(IDFT_1024,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa], (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 75: case 75:
idft1536((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8], idft(IDFT_1536,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa], (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8], idft(IDFT_2048,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa], (int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
......
...@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch (frame_parms->N_RB_DL) { switch (frame_parms->N_RB_DL) {
case 6: case 6:
idft128((short*)syncF_tmp, /// complex input idft(IDFT_128,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 25: case 25:
idft512((short*)syncF_tmp, /// complex input idft(IDFT_512,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 50: case 50:
idft1024((short*)syncF_tmp, /// complex input idft(IDFT_1024,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft(IDFT_1536,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, (short*)sync_tmp,
1); /// complex output 1); /// complex output
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft(IDFT_2048,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
...@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch (frame_parms->N_RB_DL) { switch (frame_parms->N_RB_DL) {
case 6: case 6:
idft128((short*)syncF_tmp, /// complex input idft(IDFT_128,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 25: case 25:
idft512((short*)syncF_tmp, /// complex input idft(IDFT_512,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 50: case 50:
idft1024((short*)syncF_tmp, /// complex input idft(IDFT_1024,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft(IDFT_1536,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft(IDFT_2048,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
...@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch (frame_parms->N_RB_DL) { switch (frame_parms->N_RB_DL) {
case 6: case 6:
idft128((short*)syncF_tmp, /// complex input idft(IDFT_128,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 25: case 25:
idft512((short*)syncF_tmp, /// complex input idft(IDFT_512,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 50: case 50:
idft1024((short*)syncF_tmp, /// complex input idft(IDFT_1024,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft(IDFT_1536,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft(IDFT_2048,(short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
...@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars ...@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
switch (ru->frame_parms->N_RB_DL) { switch (ru->frame_parms->N_RB_DL) {
case 6: case 6:
idft128((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]), idft(IDFT_128,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
ru->dmrssync, /// complex output ru->dmrssync, /// complex output
1); 1);
break; break;
case 25: case 25:
idft512((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]), idft(IDFT_512,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
ru->dmrssync, /// complex output ru->dmrssync, /// complex output
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]), idft(IDFT_1024,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
ru->dmrssync, /// complex output ru->dmrssync, /// complex output
1); 1);
break; break;
case 75: case 75:
idft1536((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]), idft(IDFT_1536,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
ru->dmrssync, ru->dmrssync,
1); /// complex output 1); /// complex output
break; break;
case 100: case 100:
idft2048((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]), idft(IDFT_2048,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
ru->dmrssync, /// complex output ru->dmrssync, /// complex output
1); 1);
break; break;
......
...@@ -80,7 +80,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -80,7 +80,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
while (1) { while (1) {
//compute frequency-domain representation of 6144-sample chunk //compute frequency-domain representation of 6144-sample chunk
dft6144((int16_t *)rxp, dft(DFT_6144,(int16_t *)rxp,
sp,1); sp,1);
...@@ -267,7 +267,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -267,7 +267,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
} }
// ifft, accumulate energy over two half-frames // ifft, accumulate energy over two half-frames
idft256((int16_t*)autocorr0,(int16_t*)tmp_t,1); idft(IDFT_256,(int16_t*)autocorr0,(int16_t*)tmp_t,1);
/* /*
if (i==12288) { if (i==12288) {
sprintf(fname,"corr256F_%d.m",abs(f)); sprintf(fname,"corr256F_%d.m",abs(f));
...@@ -285,12 +285,12 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -285,12 +285,12 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
for (re=0; re<(256/4); re++) for (re=0; re<(256/4); re++)
autocorr0_t[re] = _mm_add_epi32(autocorr0_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re])); autocorr0_t[re] = _mm_add_epi32(autocorr0_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
idft256((int16_t*)autocorr1,(int16_t*)tmp_t,1); idft(IDFT_256,(int16_t*)autocorr1,(int16_t*)tmp_t,1);
for (re=0; re<(256/4); re++) for (re=0; re<(256/4); re++)
autocorr1_t[re] = _mm_add_epi32(autocorr1_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re])); autocorr1_t[re] = _mm_add_epi32(autocorr1_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
idft256((int16_t*)autocorr2,(int16_t*)tmp_t,1); idft(IDFT_256,(int16_t*)autocorr2,(int16_t*)tmp_t,1);
for (re=0; re<(256/4); re++) for (re=0; re<(256/4); re++)
autocorr2_t[re] = _mm_add_epi32(autocorr2_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re])); autocorr2_t[re] = _mm_add_epi32(autocorr2_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
......
...@@ -1029,7 +1029,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -1029,7 +1029,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
int N_RB_DL = frame_parms->N_RB_DL; int N_RB_DL = frame_parms->N_RB_DL;
int rank_tm3_tm4; int rank_tm3_tm4=-1;
ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx; ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx;
......
...@@ -50,8 +50,11 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB, ...@@ -50,8 +50,11 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time; int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n"); AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext; int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
int subframe = (eNB!=NULL) ? proc->subframe_rx : ru->proc.tti_rx;
uint8_t harq_pid; int subframe = proc->subframe_rx;
uint8_t harq_pid;
int16_t delta_phase = 0; int16_t delta_phase = 0;
int16_t *ru1 = ru_90; int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90; int16_t *ru2 = ru_90;
...@@ -246,25 +249,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB, ...@@ -246,25 +249,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
switch(frame_parms->N_RB_DL) { switch(frame_parms->N_RB_DL) {
case 6: case 6:
idft128((int16_t *) temp_in_ifft_0, idft(IDFT_128,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t *) temp_in_ifft_0, idft(IDFT_512,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t *) temp_in_ifft_0, idft(IDFT_1024,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t *) temp_in_ifft_0, idft(IDFT_2048,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
...@@ -575,25 +578,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -575,25 +578,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
switch(frame_parms->N_RB_DL) { switch(frame_parms->N_RB_DL) {
case 6: case 6:
idft128((int16_t *) temp_in_ifft_0, idft(IDFT_128,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t *) temp_in_ifft_0, idft(IDFT_512,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t *) temp_in_ifft_0, idft(IDFT_1024,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t *) temp_in_ifft_0, idft(IDFT_2048,(int16_t *) temp_in_ifft_0,
(int16_t *) ul_ch_estimates_time[aa], (int16_t *) ul_ch_estimates_time[aa],
1); 1);
break; break;
......
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.
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.
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.
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.
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.
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