Merge remote-tracking branch 'origin/develop' into nr_prs
This commit is contained in:
+107
@@ -0,0 +1,107 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: Google
|
||||
AccessModifierOffset: -1
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: After
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 200
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: true
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*\.h>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
||||
Priority: 1
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 2
|
||||
UseTab: Never
|
||||
...
|
||||
|
||||
@@ -21,7 +21,6 @@ The Regents of the University of California: BSD 3-Clause Licence.
|
||||
|
||||
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
|
||||
|
||||
## Credits for source code openair3/GTPV1-U/nw-gtpv1u: ##
|
||||
|
||||
Amit Chawre <http://www.amitchawre.net/contact.html>: BSD 2-Clause Licence.
|
||||
## Credits for source code openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c and nrLDPC_offload.h: ##
|
||||
|
||||
Intel Corporation SPDX-License-Identifier: BSD-3-Clause Licence
|
||||
|
||||
@@ -338,6 +338,27 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
//avra is offline, re-enable once it is available
|
||||
//stage ("Test T1 Offload") {
|
||||
// when { expression {doMandatoryTests} }
|
||||
// steps {
|
||||
// script {
|
||||
// triggerSlaveJob ('RAN-T1-Offload-Test', 'Test-T1-Offload')
|
||||
// }
|
||||
// }
|
||||
// post {
|
||||
// always {
|
||||
// script {
|
||||
// finalizeSlaveJob('RAN-T1-Offload-Test')
|
||||
// }
|
||||
// }
|
||||
// failure {
|
||||
// script {
|
||||
// currentBuild.result = 'FAILURE'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
stage ("Images Push to Registries") {
|
||||
|
||||
@@ -111,17 +111,7 @@ pipeline {
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
sh "zip -r -qq localZip.zip ."
|
||||
|
||||
// Running astyle options on the list of modified files by the merge request
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||
def res=readFile('./oai_rules_result.txt').trim();
|
||||
if ("0".equals(res)) {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): All Changed files in Merge Request follow OAI Formatting Rules"
|
||||
addGitLabMRComment comment: message
|
||||
} else {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Some Changed files in Merge Request DO NOT follow OAI Formatting Rules"
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
// here was an astyle formatting check, with corresponding messages. The same could be done with clang-format
|
||||
} else {
|
||||
echo "Git Branch is ${GIT_BRANCH}"
|
||||
echo "Git Commit is ${GIT_COMMIT}"
|
||||
@@ -132,9 +122,6 @@ pipeline {
|
||||
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
||||
|
||||
sh "zip -r -qq localZip.zip ."
|
||||
// Running astyle options on all C/H files in the repository
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,7 +174,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Variant Builds") {
|
||||
parallel {
|
||||
@@ -349,142 +336,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test MONOLITHIC - FDD - Band 7 - B210") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('eNB-CI-FDD-Band7-B210', 'Test-Mono-FDD-Band7')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-CI-FDD-Band7-B210')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test MONOLITHIC - TDD - Band 40 - B210") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('eNB-CI-TDD-Band40-B210', 'Test-Mono-TDD-Band40')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-CI-TDD-Band40-B210')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
sh "sleep 60"
|
||||
triggerSlaveJob ('eNB-CI-IF4p5-FDD-Band7-B210', 'Test-IF4p5-FDD-Band7')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-CI-IF4p5-FDD-Band7-B210')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
sh "sleep 60"
|
||||
triggerSlaveJob ('eNB-CI-IF4p5-TDD-Band40-B210', 'Test-IF4p5-TDD-Band40')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-CI-IF4p5-TDD-Band40-B210')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test OAI UE - FDD - Band 20 - B200") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJobNoGitLab ('UE-CI-FDD-Band20-B200')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('UE-CI-FDD-Band20-B200')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test OAI UE - OAI eNB - FDD - Band 7 - B200") {
|
||||
when {
|
||||
expression {doFullTestsuite}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
// Delayed trigger on slave job, so it is always the last one to run
|
||||
sh "sleep 240"
|
||||
triggerSlaveJob ('eNB-UE-CI-MONO-FDD-Band7-B200', 'Test-eNB-OAI-UE-FDD-Band7')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('eNB-UE-CI-MONO-FDD-Band7-B200')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -560,68 +411,3 @@ OAI CI Team''',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Slave Job functions
|
||||
|
||||
def triggerSlaveJob (jobName, gitlabStatusName) {
|
||||
// Workaround for the "cancelled" GitLab pipeline notification
|
||||
// The slave job is triggered with the propagate false so the following commands are executed
|
||||
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
||||
// localStatus variable MUST be analyzed to properly assess the status
|
||||
localStatus = build job: jobName,
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||
], propagate: false
|
||||
localResult = localStatus.getResult()
|
||||
echo "${jobName} Slave Job status is ${localResult}"
|
||||
gitlabCommitStatus(name: gitlabStatusName) {
|
||||
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
echo "${jobName} Slave Job is OK"
|
||||
} else {
|
||||
echo "${jobName} Slave Job is KO"
|
||||
sh "ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def triggerSlaveJobNoGitLab (jobName) {
|
||||
// Workaround for the "cancelled" GitLab pipeline notification
|
||||
// The slave job is triggered with the propagate false so the following commands are executed
|
||||
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
||||
// localStatus variable MUST be analyzed to properly assess the status
|
||||
localStatus = build job: jobName,
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
|
||||
], propagate: false
|
||||
localResult = localStatus.getResult()
|
||||
echo "${jobName} Slave Job status is ${localResult}"
|
||||
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
echo "${jobName} Slave Job is OK"
|
||||
} else {
|
||||
echo "${jobName} Slave Job is KO"
|
||||
sh "ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
|
||||
def finalizeSlaveJob(jobName) {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
fileName = "test_results-${jobName}.html"
|
||||
if (!fileExists(fileName)) {
|
||||
copyArtifacts(projectName: jobName,
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists(fileName)) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
|
||||
archiveArtifacts artifacts: fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# OAI is using a style that is similar to the Google style
|
||||
--style=google
|
||||
# long options can be written without the preceding '--'
|
||||
# Convert tabs to spaces
|
||||
convert-tabs
|
||||
# Indentation is 2 spaces
|
||||
indent=spaces=2
|
||||
# Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block.
|
||||
indent-switches
|
||||
# Indent preprocessor blocks at bracket level 0.
|
||||
indent-preproc-block
|
||||
# Indent multi-line preprocessor #define statements.
|
||||
indent-preproc-define
|
||||
# Indent C++ comments beginning in column one.
|
||||
indent-col1-comments
|
||||
# Pad empty lines around header blocks
|
||||
break-blocks
|
||||
delete-empty-lines
|
||||
# Attach a pointer or reference operator (*, &, or ^) to the variable name (right)
|
||||
align-pointer=name
|
||||
# The code line length is 200 characters/columns (this is the maximum allowed by astyle)
|
||||
max-code-length=200
|
||||
# If the line contains logical conditionals they will be placed first on the new line.
|
||||
break-after-logical
|
||||
# Force use of the linux end of line
|
||||
lineend=linux
|
||||
@@ -24,8 +24,6 @@ function usage {
|
||||
echo "OAI Coding / Formatting Guideline Check script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " Requirement: astyle shall be installed"
|
||||
echo ""
|
||||
echo " By default (no options) the complete repository will be checked"
|
||||
echo " In case of merge request, provided source and target branch,"
|
||||
echo " the script will check only the modified files"
|
||||
@@ -57,11 +55,10 @@ fi
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo " ---- Checking the whole repository ----"
|
||||
echo ""
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive --exclude=ci-scripts --exclude=cmake_targets *.c *.h | grep -c Formatted || true`
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
||||
# in this file we previously had a list of files that were not properly
|
||||
# formatted. At the time of this MR, the Jenkinsfile expects this file, so
|
||||
# we simply produce an empty one
|
||||
touch ./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
|
||||
@@ -77,7 +74,7 @@ then
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
|
||||
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|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc|openair1/PHY/CODING/types.h" || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
@@ -151,10 +148,6 @@ echo ""
|
||||
# Retrieve the list of modified files since the latest develop commit
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
NB_TO_FORMAT=0
|
||||
if [ -f oai_rules_result_list.txt ]
|
||||
then
|
||||
rm -f oai_rules_result_list.txt
|
||||
fi
|
||||
if [ -f header-files-w-incorrect-define.txt ]
|
||||
then
|
||||
rm -f header-files-w-incorrect-define.txt
|
||||
@@ -178,13 +171,6 @@ do
|
||||
EXT="${filename##*.}"
|
||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||
then
|
||||
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted || true`
|
||||
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
|
||||
if [ $TO_FORMAT -ne 0 ]
|
||||
then
|
||||
echo $FULLFILE
|
||||
echo $FULLFILE >> ./oai_rules_result_list.txt
|
||||
fi
|
||||
# Testing if explicit GNU GPL license banner
|
||||
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
|
||||
if [ $GNU_EXCEPTION -eq 0 ]
|
||||
@@ -198,7 +184,7 @@ do
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | 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|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc|openair1/PHY/CODING/types.h" || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
@@ -215,9 +201,10 @@ do
|
||||
fi
|
||||
done
|
||||
rm -f header-files-w-incorrect-define-tmp.txt
|
||||
echo ""
|
||||
echo " ----------------------------------------------------------"
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
|
||||
echo $NB_TO_FORMAT > ./oai_rules_result.txt
|
||||
|
||||
# in this script we previously produced a list of files that were not properly
|
||||
# formatted. At the time of this MR, the Jenkinsfile expects this file, so
|
||||
# we simply produce an empty file
|
||||
touch ./oai_rules_result.txt
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -579,9 +579,17 @@ class Containerize():
|
||||
lUserName = self.eNB2UserName
|
||||
lPassWord = self.eNB2Password
|
||||
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
|
||||
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||
ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
|
||||
if ret != 0:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.exitStatus = 1
|
||||
return False
|
||||
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||
if lSsh.getBefore().count('cannot remove'):
|
||||
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.exitStatus = 1
|
||||
return False
|
||||
lSsh.close()
|
||||
|
||||
# Going to the Test Server
|
||||
@@ -599,15 +607,26 @@ class Containerize():
|
||||
lPassWord = self.eNB2Password
|
||||
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
|
||||
# copyout has no return code and will quit if something fails
|
||||
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
|
||||
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
|
||||
logging.debug(lSsh.getBefore())
|
||||
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.exitStatus = 1
|
||||
return False
|
||||
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||
if lSsh.getBefore().count('cannot remove'):
|
||||
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.exitStatus = 1
|
||||
return False
|
||||
lSsh.close()
|
||||
|
||||
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
|
||||
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
|
||||
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return True
|
||||
|
||||
def DeployObject(self, HTML, EPC):
|
||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||
@@ -656,7 +675,7 @@ class Containerize():
|
||||
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
|
||||
if result is not None:
|
||||
svcName = result.group('svc_name')
|
||||
mySSH.command('docker-compose --file ci-docker-compose.yml up -d ' + svcName, '\$', 10)
|
||||
mySSH.command('docker-compose --file ci-docker-compose.yml up -d ' + svcName, '\$', 15)
|
||||
|
||||
# Checking Status
|
||||
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
||||
@@ -683,6 +702,9 @@ class Containerize():
|
||||
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
|
||||
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
|
||||
|
||||
status = False
|
||||
if healthyNb == 1:
|
||||
cnt = 0
|
||||
@@ -697,11 +719,12 @@ class Containerize():
|
||||
status = True
|
||||
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
|
||||
time.sleep(10)
|
||||
else:
|
||||
# containers are unhealthy, so we won't start. However, logs are stored at the end
|
||||
# in UndeployObject so we here store the logs of the unhealthy container to report it
|
||||
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
|
||||
mySSH.close()
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
|
||||
|
||||
if status:
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
|
||||
+62
-23
@@ -56,7 +56,6 @@ class PhySim:
|
||||
self.__workSpacePath=''
|
||||
self.__buildLogFile='compile_phy_sim.log'
|
||||
self.__runLogFile=''
|
||||
self.__runResults=[]
|
||||
self.__runLogPath='phy_sim_logs'
|
||||
|
||||
|
||||
@@ -64,20 +63,20 @@ class PhySim:
|
||||
#PRIVATE Methods
|
||||
#-----------------
|
||||
|
||||
def __CheckResults_PhySim(self,HTML,CONST,testcase_id):
|
||||
def __CheckResults_LDPCTest(self,HTML,CONST,testcase_id):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
#retrieve run log file and store it locally$
|
||||
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
|
||||
mySSH.close()
|
||||
#parse results looking for Encoding and Decoding mean values
|
||||
self.__runResults=[]
|
||||
runResults=[]
|
||||
with open(self.__runLogFile) as f:
|
||||
for line in f:
|
||||
if 'mean' in line:
|
||||
self.__runResults.append(line)
|
||||
runResults.append(line)
|
||||
#the values are appended for each mean value (2), so we take these 2 values from the list
|
||||
info=self.__runResults[0]+self.__runResults[1]
|
||||
info = runResults[0] + runResults[1]
|
||||
|
||||
#once parsed move the local logfile to its folder for tidiness
|
||||
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
|
||||
@@ -89,6 +88,38 @@ class PhySim:
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
||||
return HTML
|
||||
|
||||
def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id):
|
||||
html_queue = SimpleQueue()
|
||||
#retrieve run log file and store it locally
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
filename = self.__workSpacePath + self.__runLogFile
|
||||
ret = mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, filename, '.')
|
||||
if ret != 0:
|
||||
error_msg = f'could not recover test result file {filename}'
|
||||
logging.error(error_msg)
|
||||
html_queue.put(f'<pre style="background-color:white">{error_msg}</pre>')
|
||||
HTML.CreateHtmlTestRowQueue("could not recover results", 'KO', 1, html_queue)
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
PUSCH_OK = False
|
||||
with open(self.__runLogFile) as f:
|
||||
PUSCH_OK = 'PUSCH test OK' in f.read()
|
||||
|
||||
# once parsed move the local logfile to its folder for tidiness
|
||||
os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.')
|
||||
|
||||
#updating the HTML with results
|
||||
if PUSCH_OK:
|
||||
html_queue.put('<pre style="background-color:white">succeeded</pre>')
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
||||
else:
|
||||
error_msg = 'error: no "PUSCH test OK"'
|
||||
logging.error(error_msg)
|
||||
html_queue.put(f'<pre style="background-color:white">{error_msg}</pre>')
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, html_queue)
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
def __CheckBuild_PhySim(self, HTML, CONST):
|
||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
||||
@@ -100,21 +131,16 @@ class PhySim:
|
||||
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
||||
mySSH.close()
|
||||
#check build result from local compile log file
|
||||
buildStatus=False
|
||||
with open(self.__buildLogFile) as f:
|
||||
#nr_prachsim is the last compile step
|
||||
if 'nr_prachsim compiled' in f.read():
|
||||
buildStatus=True
|
||||
#update HTML based on build status
|
||||
if buildStatus:
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||
self.exitStatus=0
|
||||
else:
|
||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
#exitStatus=1 will do a sys.exit in main
|
||||
self.exitStatus=1
|
||||
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
|
||||
self.exitStatus=0
|
||||
return HTML
|
||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
#exitStatus=1 will do a sys.exit in main
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
|
||||
@@ -163,8 +189,7 @@ class PhySim:
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
mySSH.command('mkdir -p log', '\$', 5)
|
||||
mySSH.command('chmod 777 log', '\$', 5)
|
||||
mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500)
|
||||
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
|
||||
|
||||
mySSH.close()
|
||||
#check build status and update HTML object
|
||||
@@ -173,7 +198,8 @@ class PhySim:
|
||||
return lHTML
|
||||
|
||||
|
||||
def Run_PhySim(self,htmlObj,constObj,testcase_id):
|
||||
def Run_LDPCTest(self,htmlObj,constObj,testcase_id):
|
||||
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
|
||||
#create run logs folder locally
|
||||
os.system('mkdir -p ./'+self.__runLogPath)
|
||||
#log file is tc_<testcase_id>.log remotely
|
||||
@@ -187,5 +213,18 @@ class PhySim:
|
||||
mySSH.close()
|
||||
#return updated HTML to main
|
||||
lHTML = cls_oai_html.HTMLManagement()
|
||||
lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id)
|
||||
lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id)
|
||||
return lHTML
|
||||
|
||||
def Run_NRulsimTest(self, htmlObj, constObj, testcase_id):
|
||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
||||
os.system(f'mkdir -p ./{self.__runLogPath}')
|
||||
self.__runLogFile = f'physim_{testcase_id}.log'
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
mySSH.command(f'cd {self.__workSpacePath}', '\$', 5)
|
||||
mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30)
|
||||
mySSH.close()
|
||||
#return updated HTML to main
|
||||
lHTML = self.__CheckResults_NRulsimTest(htmlObj, constObj, testcase_id)
|
||||
return lHTML
|
||||
|
||||
@@ -141,7 +141,7 @@ class PhySim:
|
||||
logging.debug('oai-physim size is unknown')
|
||||
|
||||
# logging to OC Cluster and then switch to corresponding project
|
||||
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 30)
|
||||
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server https://api.oai.cs.eurecom.fr:6443', '\$', 30)
|
||||
if mySSH.getBefore().count('Login successful.') == 0:
|
||||
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
||||
mySSH.close()
|
||||
|
||||
@@ -321,20 +321,6 @@ class StaticCodeAnalysis():
|
||||
if ret is not None:
|
||||
analyzed = True
|
||||
if analyzed:
|
||||
ret = re.search('Nb Files that do NOT follow OAI rules: (?P<nb_errors>[0-9\.]+)', str(line))
|
||||
if ret is not None:
|
||||
nbFilesNotFormatted = int(ret.group('nb_errors'))
|
||||
|
||||
if re.search('=== Files not properly formatted ===', str(line)) is not None:
|
||||
listFiles = True
|
||||
if listFiles:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
listFiles = False
|
||||
elif re.search('Running in|Files not properly formatted', str(line)) is not None:
|
||||
pass
|
||||
else:
|
||||
listFilesNotFormatted.append(str(line).strip())
|
||||
|
||||
if re.search('=== Files with incorrect define protection ===', str(line)) is not None:
|
||||
circularHeaderDependency = True
|
||||
if circularHeaderDependency:
|
||||
|
||||
@@ -214,7 +214,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -204,8 +204,7 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
prach_dtx_threshold = 200;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -211,7 +211,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
@@ -181,7 +181,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
@@ -210,7 +210,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 80;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 120;
|
||||
prach_dtx_threshold = 200;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -235,7 +235,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -210,7 +210,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 6;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
@@ -211,7 +211,6 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 6;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -218,6 +218,7 @@ L1s = (
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 200;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
@@ -8,7 +8,6 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
astyle \
|
||||
gawk \
|
||||
git
|
||||
|
||||
@@ -18,9 +17,6 @@ COPY . .
|
||||
RUN /bin/bash -c "if [[ -v MERGE_REQUEST ]]; then echo 'Source Branch = $SRC_BRANCH'; echo 'Target Branch = $TARGET_BRANCH'; else echo 'Push to develop'; fi"
|
||||
RUN /bin/bash -c "if [[ -v MERGE_REQUEST ]]; then ./ci-scripts/checkCodingFormattingRules.sh --src-branch $SRC_BRANCH --target-branch $TARGET_BRANCH; else ./ci-scripts/checkCodingFormattingRules.sh; fi"
|
||||
|
||||
RUN echo "=== Files not properly formatted ===" && \
|
||||
/bin/bash -c "if [[ -f oai_rules_result_list.txt ]]; then cat oai_rules_result_list.txt; fi"
|
||||
|
||||
RUN echo "=== Files with incorrect define protection ===" && \
|
||||
/bin/bash -c "if [[ -f header-files-w-incorrect-define.txt ]]; then cat header-files-w-incorrect-define.txt; fi"
|
||||
|
||||
|
||||
+2
-2
@@ -253,7 +253,7 @@ class EPCManagement():
|
||||
logging.debug('Starting OAI CN5G')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
|
||||
if re.search('start-mini-as-ue', self.cfgDeploy):
|
||||
dFile = 'docker-compose-mini-nrf-asue.yaml'
|
||||
@@ -537,7 +537,7 @@ class EPCManagement():
|
||||
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
||||
|
||||
logging.debug('Terminating OAI CN5G')
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||
time.sleep(2)
|
||||
|
||||
+22
-5
@@ -457,9 +457,18 @@ def GetParametersFromXML(action):
|
||||
if (string_field is not None):
|
||||
CONTAINERS.testSvrId = string_field
|
||||
|
||||
else: # ie action == 'Run_PhySim':
|
||||
elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest':
|
||||
ldpc.runargs = test.findtext('physim_run_args')
|
||||
|
||||
|
||||
elif action == 'LicenceAndFormattingCheck':
|
||||
pass
|
||||
|
||||
elif action == 'Cppcheck_Analysis':
|
||||
pass
|
||||
|
||||
else:
|
||||
logging.error(f"unknown action {action}")
|
||||
|
||||
|
||||
#check if given test is in list
|
||||
#it is in list if one of the strings in 'list' is at the beginning of 'test'
|
||||
@@ -914,14 +923,22 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
HTML=ldpc.Build_PhySim(HTML,CONST)
|
||||
if ldpc.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Run_PhySim':
|
||||
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
||||
elif action == 'Run_LDPCTest':
|
||||
HTML=ldpc.Run_LDPCTest(HTML,CONST,id)
|
||||
if ldpc.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Run_NRulsimTest':
|
||||
HTML=ldpc.Run_NRulsimTest(HTML,CONST,id)
|
||||
if ldpc.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Build_Image':
|
||||
CONTAINERS.BuildImage(HTML)
|
||||
elif action == 'Build_Proxy':
|
||||
CONTAINERS.BuildProxy(HTML)
|
||||
elif action == 'Copy_Image_to_Test':
|
||||
CONTAINERS.Copy_Image_to_Test_Server(HTML)
|
||||
success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
|
||||
if not success:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Deploy_Object':
|
||||
CONTAINERS.DeployObject(HTML, EPC)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
|
||||
@@ -463,106 +463,75 @@ function report_build {
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
if [ -f ./header-files-w-incorrect-define.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
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 [ $PU_TRIG -eq 1 ]; then echo " <strong>All files in repository follow OAI rules. <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>All modified files in Merge-Request follow OAI rules. <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html; fi
|
||||
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 [ $PU_TRIG -eq 1 ]; then echo " <strong>$NB_FILES files in repository DO NOT follow OAI rules. <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>$NB_FILES modified files in Merge-Request DO NOT follow OAI rules. <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html; fi
|
||||
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
|
||||
fi
|
||||
if [ -f ./oai_rules_result_list.txt ]
|
||||
then
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-formatting-details\">More details on formatting check</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-formatting-details\" class=\"collapse\">" >> ./build_results.html
|
||||
echo " <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
|
||||
echo " <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./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\" >Filename</th>" >> ./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 '{print " <tr><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./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
|
||||
if [ -f ./header-files-w-incorrect-define.txt ]
|
||||
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
|
||||
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
|
||||
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
|
||||
if [ -f ./files-w-gnu-gpl-license-banner.txt ]
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
- Build_Proxy
|
||||
- Build_PhySim
|
||||
- Run_PhySim
|
||||
- Run_LDPCTest
|
||||
- Run_NRulsimTest
|
||||
- Build_eNB
|
||||
- WaitEndBuild_eNB
|
||||
- Initialize_eNB
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<testCase id="090102">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize NR UE USRP</desc>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 50 --rrc_config_path . --dlsch-parallel 4 --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 50 --rrc_config_path . --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<air_interface>NR</air_interface>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<testCase id="090104">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize NR UE USRP</desc>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 75 --rrc_config_path . --dlsch-parallel 4 --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --ue-rxgain 75 --rrc_config_path . --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<air_interface>NR</air_interface>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -26,132 +26,125 @@
|
||||
<htmlTabName>Test-ldpc-GPU</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021</TestCaseRequestedList>
|
||||
<TestCaseRequestedList>000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>Build_PhySim</class>
|
||||
<desc>Build for physical simulator</desc>
|
||||
<physim_build_args>--phy_simulators --ninja --noavx512</physim_build_args>
|
||||
<forced_workspace_cleanup>FALSE</forced_workspace_cleanup>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 3872 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 3872 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 4224 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000005">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 4224 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000006">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 4576 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000007">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 4576 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000008">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 4928 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000009">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 4928 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000010">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 5280 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 5280 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 5632 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 5632 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000014">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 6336 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000015">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 6336 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000016">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 7040 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000017">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 7040 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000018">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 7744 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000019">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 7744 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000020">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with CPU</desc>
|
||||
<physim_run_args>-l 8448 -s10 -n100</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000021">
|
||||
<class>Run_PhySim</class>
|
||||
<class>Run_LDPCTest</class>
|
||||
<desc>Run LDPC Test with GPU</desc>
|
||||
<physim_run_args>-l 8448 -s10 -n100 -G 1</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<!--
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
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
|
||||
|
||||
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
|
||||
-->
|
||||
|
||||
<testCaseList>
|
||||
<htmlTabRef>build-offload</htmlTabRef>
|
||||
<htmlTabName>Build physical simulators</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>000001</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>Build_PhySim</class>
|
||||
<desc>Build physical simulators</desc>
|
||||
<physim_build_args>--phy_simulators --ninja --noavx512</physim_build_args>
|
||||
<forced_workspace_cleanup>FALSE</forced_workspace_cleanup>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
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
|
||||
|
||||
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
|
||||
-->
|
||||
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-t1-offload</htmlTabRef>
|
||||
<htmlTabName>Test T1 Offload</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>000001 000002 000003 000004</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>Run_NRulsimTest</class>
|
||||
<desc>Run T1 Offload nr_ulsim</desc>
|
||||
<physim_run_args>-n2 -s30 -m9 -r50 -R106 -o</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>Run_NRulsimTest</class>
|
||||
<desc>Run T1 Offload nr_ulsim</desc>
|
||||
<physim_run_args>-n2 -s30 -m9 -r106 -R106 -o</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>Run_NRulsimTest</class>
|
||||
<desc>Run T1 Offload nr_ulsim</desc>
|
||||
<physim_run_args>-n2 -s30 -m16 -r106 -R106 -o</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
<class>Run_NRulsimTest</class>
|
||||
<desc>Run T1 Offload nr_ulsim</desc>
|
||||
<physim_run_args>-n2 -s30 -m9 -r273 -R273 -o</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -2,7 +2,7 @@ version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "l2sim-oai-nrf"
|
||||
image: oai-nrf:latest
|
||||
image: oai-nrf:august-dev
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "l2sim-oai-amf"
|
||||
image: oai-amf:latest
|
||||
image: oai-amf:august-dev
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
@@ -110,7 +110,7 @@ services:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "l2sim-oai-smf"
|
||||
image: oai-smf:latest
|
||||
image: oai-smf:august-dev
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "l2sim-oai-spgwu"
|
||||
image: oai-spgwu-tiny:latest
|
||||
image: oai-spgwu-tiny:august-dev
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
|
||||
@@ -2,7 +2,7 @@ version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oai-nrf:latest
|
||||
image: oai-nrf:august-dev
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oai-amf:latest
|
||||
image: oai-amf:august-dev
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
@@ -110,7 +110,7 @@ services:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oai-smf:latest
|
||||
image: oai-smf:august-dev
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oai-spgwu-tiny:latest
|
||||
image: oai-spgwu-tiny:august-dev
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
|
||||
@@ -854,6 +854,31 @@ TARGET_LINK_LIBRARIES(benetel_5g pthread dl rt m numa)
|
||||
|
||||
##########################################################
|
||||
|
||||
# LDPC offload library
|
||||
##########################################################
|
||||
|
||||
# there is no generic way to test for T1 Offload, it simply comes with the
|
||||
# shared object
|
||||
if (EXISTS "/usr/local/lib64/librte_pmd_hpac_sdfec_pmd.so")
|
||||
set(T1_OFFLOAD_FOUND TRUE)
|
||||
else()
|
||||
set(T1_OFFLOAD_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
if(T1_OFFLOAD_FOUND)
|
||||
message(STATUS "T1 Offload support detected")
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib64/pkgconfig/")
|
||||
pkg_search_module(LIBDPDK REQUIRED libdpdk=20.05.0)
|
||||
add_library(ldpc_offload MODULE ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c)
|
||||
set_target_properties(ldpc_offload PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API")
|
||||
target_compile_options(ldpc_offload PRIVATE ${LIBDPDK_CFLAGS})
|
||||
target_link_libraries(ldpc_offload ${LIBDPDK_LDFLAGS} rte_pmd_hpac_sdfec_pmd "-Wl,-rpath /usr/local/lib64")
|
||||
else()
|
||||
message(STATUS "No T1 Offload support detected")
|
||||
endif ()
|
||||
|
||||
##########################################################
|
||||
|
||||
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
|
||||
|
||||
Message("DEADLINE_SCHEDULER flag is ${DEADLINE_SCHEDULER}")
|
||||
@@ -2799,7 +2824,11 @@ target_link_libraries (nr-softmodem pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRA
|
||||
target_link_libraries (nr-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${T_LIB})
|
||||
|
||||
add_dependencies( nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
add_dependencies( nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
|
||||
|
||||
if(T1_OFFLOAD_FOUND)
|
||||
add_dependencies( nr-softmodem ldpc_offload)
|
||||
endif ()
|
||||
|
||||
# nr-uesoftmodem is UE implementation
|
||||
#######################################
|
||||
@@ -2845,6 +2874,7 @@ if (CUDA_FOUND)
|
||||
add_dependencies( nr-uesoftmodem ldpc_cuda)
|
||||
add_dependencies( nr-softmodem ldpc_cuda)
|
||||
endif (CUDA_FOUND)
|
||||
|
||||
###################################"
|
||||
# Addexecutables for tests
|
||||
####################################
|
||||
@@ -3008,6 +3038,11 @@ add_executable(nr_ulsim
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
if(T1_OFFLOAD_FOUND)
|
||||
add_dependencies( nr_ulsim ldpc_offload)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(nr_ulsim
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||
|
||||
@@ -237,8 +237,9 @@ compilations() {
|
||||
echo_error "$2 compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
if [ -s $3 ] ; then
|
||||
cp $3 $4
|
||||
if [ -s "$3" ] ; then
|
||||
rm -f "$4"
|
||||
ln -s "$PWD/$3" "$4"
|
||||
echo_success "$2 compiled"
|
||||
check_warnings "$dlog/$2.$REL.txt"
|
||||
else
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * 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
|
||||
# *
|
||||
# * 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
|
||||
# */
|
||||
|
||||
# file indent_source_code
|
||||
# brief
|
||||
# author Lionel Gauthier
|
||||
# company Eurecom
|
||||
# email: lionel.gauthier@eurecom.fr
|
||||
#
|
||||
################################
|
||||
# include helper functions
|
||||
################################
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
source $THIS_SCRIPT_PATH/build_helper
|
||||
|
||||
function main()
|
||||
{
|
||||
local MAX_CODE_LENGTH=200
|
||||
local INDENT_SPACES=2
|
||||
set_openair_env
|
||||
|
||||
|
||||
# remove trailing white spaces
|
||||
#find $OPENAIR_DIR/openair1 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
|
||||
#find $OPENAIR_DIR/openair2 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
|
||||
#find $OPENAIR_DIR/openair3 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
|
||||
#find $OPENAIR_DIR/openair3 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
|
||||
#find $OPENAIR_DIR/targets -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
|
||||
|
||||
# Style google not available on 14.04
|
||||
|
||||
exit 0
|
||||
# will use indent
|
||||
command -v astyle >/dev/null 2>&1 || { echo >&2 "astyle required but it's not installed."; sudo apt-get install astyle; }
|
||||
astyle --recursive --convert-tabs --indent=spaces=$INDENT_SPACES --style=kr --indent-col1-comments --max-code-length=$MAX_CODE_LENGTH \
|
||||
$OPENAIR_DIR/openair1/*.h \
|
||||
$OPENAIR_DIR/openair1/*.c \
|
||||
$OPENAIR_DIR/openair2/*.h \
|
||||
$OPENAIR_DIR/openair2/*.c \
|
||||
$OPENAIR_DIR/openair3/*.h \
|
||||
$OPENAIR_DIR/openair3/*.c \
|
||||
$OPENAIR_DIR/openair3/*.h \
|
||||
$OPENAIR_DIR/openair3/*.c \
|
||||
$OPENAIR_DIR/targets/*.h \
|
||||
$OPENAIR_DIR/targets/*.c
|
||||
}
|
||||
|
||||
|
||||
main "$@"
|
||||
@@ -48,6 +48,10 @@
|
||||
|
||||
// main log variables
|
||||
|
||||
// Fixme: a better place to be shure it is called
|
||||
void read_cpu_hardware (void) __attribute__ ((constructor));
|
||||
void read_cpu_hardware (void) {__builtin_cpu_init(); }
|
||||
|
||||
log_mem_cnt_t log_mem_d[2];
|
||||
int log_mem_flag=0;
|
||||
int log_mem_multi=1;
|
||||
|
||||
@@ -366,6 +366,7 @@ typedef struct {
|
||||
#define MATLAB_CSHORT_BRACKET3 15
|
||||
|
||||
int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, unsigned int format, int multiVec);
|
||||
#define write_output(a, b, c, d, e, f) write_file_matlab(a, b, c, d, e, f, 0)
|
||||
|
||||
/*----------------macro definitions for reading log configuration from the config module */
|
||||
#define CONFIG_STRING_LOG_PREFIX "log_config"
|
||||
|
||||
@@ -45,9 +45,7 @@ extern "C" {
|
||||
std::vector<MessageDef *> message_queue;
|
||||
std::map<long,timer_elm_t> timer_map;
|
||||
uint64_t next_timer=UINT64_MAX;
|
||||
struct epoll_event *events =NULL;
|
||||
int nb_fd_epoll=0;
|
||||
int nb_events=0;
|
||||
int epoll_fd=-1;
|
||||
int sem_fd=-1;
|
||||
} task_list_t;
|
||||
@@ -167,8 +165,6 @@ extern "C" {
|
||||
struct epoll_event event;
|
||||
task_list_t *t=tasks[task_id];
|
||||
t->nb_fd_epoll++;
|
||||
t->events = (struct epoll_event *)realloc((void *)t->events,
|
||||
t->nb_fd_epoll * sizeof(struct epoll_event));
|
||||
event.events = EPOLLIN | EPOLLERR;
|
||||
event.data.u64 = 0;
|
||||
event.data.fd = fd;
|
||||
@@ -185,10 +181,10 @@ extern "C" {
|
||||
t->nb_fd_epoll--;
|
||||
}
|
||||
|
||||
static inline int itti_get_events_locked(task_id_t task_id, struct epoll_event **events) {
|
||||
static inline int itti_get_events_locked(task_id_t task_id, struct epoll_event *events, int max_events) {
|
||||
task_list_t *t=tasks[task_id];
|
||||
uint64_t current_time=0;
|
||||
|
||||
int nb_events;
|
||||
do {
|
||||
if ( t->next_timer != UINT64_MAX ) {
|
||||
struct timespec tp;
|
||||
@@ -234,40 +230,41 @@ extern "C" {
|
||||
|
||||
pthread_mutex_unlock(&t->queue_cond_lock);
|
||||
LOG_D(ITTI,"enter blocking wait for %s, timeout: %d ms\n", itti_get_task_name(task_id), epoll_timeout);
|
||||
t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout);
|
||||
nb_events = epoll_wait(t->epoll_fd, events, max_events, epoll_timeout);
|
||||
|
||||
if ( t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) )
|
||||
if ( nb_events < 0 && (errno == EINTR || errno == EAGAIN ) )
|
||||
pthread_mutex_lock(&t->queue_cond_lock);
|
||||
} while (t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) );
|
||||
} while (nb_events < 0 && (errno == EINTR || errno == EAGAIN ) );
|
||||
|
||||
AssertFatal (t->nb_events >=0,
|
||||
AssertFatal (nb_events >=0,
|
||||
"epoll_wait failed for task %s, nb fds %d, timeout %lu: %s!\n",
|
||||
itti_get_task_name(task_id), t->nb_fd_epoll, t->next_timer != UINT64_MAX ? t->next_timer-current_time : -1, strerror(errno));
|
||||
LOG_D(ITTI,"receive on %d descriptors for %s\n", t->nb_events, itti_get_task_name(task_id));
|
||||
itti_get_task_name(task_id), t->nb_fd_epoll,
|
||||
t->next_timer != UINT64_MAX ? t->next_timer-current_time : -1,
|
||||
strerror(errno));
|
||||
LOG_D(ITTI,"receive on %d descriptors for %s\n", nb_events, itti_get_task_name(task_id));
|
||||
|
||||
if (t->nb_events == 0)
|
||||
if (nb_events == 0)
|
||||
/* No data to read -> return */
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < t->nb_events; i++) {
|
||||
for (int i = 0; i < nb_events; i++) {
|
||||
/* Check if there is an event for ITTI for the event fd */
|
||||
if ((t->events[i].events & EPOLLIN) &&
|
||||
(t->events[i].data.fd == t->sem_fd)) {
|
||||
if ((events[i].events & EPOLLIN) &&
|
||||
(events[i].data.fd == t->sem_fd)) {
|
||||
eventfd_t sem_counter;
|
||||
/* Read will always return 1 */
|
||||
AssertFatal( sizeof(sem_counter) == read (t->sem_fd, &sem_counter, sizeof(sem_counter)), "");
|
||||
/* Mark that the event has been processed */
|
||||
t->events[i].events &= ~EPOLLIN;
|
||||
events[i].events &= ~EPOLLIN;
|
||||
}
|
||||
}
|
||||
|
||||
*events = t->events;
|
||||
return t->nb_events;
|
||||
return nb_events;
|
||||
}
|
||||
|
||||
int itti_get_events(task_id_t task_id, struct epoll_event **events) {
|
||||
int itti_get_events(task_id_t task_id, struct epoll_event *events, int nb_evts) {
|
||||
pthread_mutex_lock(&tasks[task_id]->queue_cond_lock);
|
||||
return itti_get_events_locked(task_id, events);
|
||||
return itti_get_events_locked(task_id, events, nb_evts);
|
||||
}
|
||||
|
||||
void itti_receive_msg(task_id_t task_id, MessageDef **received_msg) {
|
||||
@@ -275,15 +272,16 @@ extern "C" {
|
||||
task_list_t *t=tasks[task_id];
|
||||
pthread_mutex_lock(&t->queue_cond_lock);
|
||||
|
||||
struct epoll_event events[t->nb_fd_epoll];
|
||||
// Weird condition to deal with crap legacy itti interface
|
||||
if ( t->nb_fd_epoll == 1 ) {
|
||||
while (t->message_queue.empty()) {
|
||||
itti_get_events_locked(task_id, &t->events);
|
||||
itti_get_events_locked(task_id, events, t->nb_fd_epoll);
|
||||
pthread_mutex_lock(&t->queue_cond_lock);
|
||||
}
|
||||
} else {
|
||||
if (t->message_queue.empty()) {
|
||||
itti_get_events_locked(task_id, &t->events);
|
||||
itti_get_events_locked(task_id, events, t->nb_fd_epoll);
|
||||
pthread_mutex_lock(&t->queue_cond_lock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ void itti_unsubscribe_event_fd(task_id_t task_id, int fd);
|
||||
\param events events list
|
||||
@returns number of events to handle
|
||||
**/
|
||||
int itti_get_events(task_id_t task_id, struct epoll_event **events);
|
||||
int itti_get_events(task_id_t task_id, struct epoll_event *events, int nb_max_evts);
|
||||
|
||||
/** \brief Retrieves a message in the queue associated to task_id.
|
||||
If the queue is empty, the thread is blocked till a new message arrives.
|
||||
|
||||
@@ -111,7 +111,7 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
|
||||
|
||||
if (measr) {
|
||||
mkfifo(measr,0666);
|
||||
AssertFatal(-1 != (pool->dummyTraceFd=
|
||||
AssertFatal(-1 != (pool->dummyKeepReadingTraceFd=
|
||||
open(measr, O_RDONLY| O_NONBLOCK)),"");
|
||||
AssertFatal(-1 != (pool->traceFd=
|
||||
open(measr, O_WRONLY|O_APPEND|O_NOATIME|O_NONBLOCK)),"");
|
||||
@@ -130,6 +130,7 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
|
||||
int c=toupper(curptr[0]);
|
||||
|
||||
switch (c) {
|
||||
|
||||
case 'N':
|
||||
pool->activated=false;
|
||||
break;
|
||||
@@ -161,6 +162,17 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
|
||||
}
|
||||
}
|
||||
|
||||
void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, char *name) {
|
||||
char threads[1024] = "n";
|
||||
if (nbThreads) {
|
||||
strcpy(threads,"-1");
|
||||
for (int i=1; i < nbThreads; i++)
|
||||
strncat(threads,",-1", sizeof(threads-1));
|
||||
}
|
||||
threads[sizeof(threads-1)]=0;
|
||||
initNamedTpool(threads, pool, performanceMeas, name);
|
||||
}
|
||||
|
||||
#ifdef TEST_THREAD_POOL
|
||||
volatile int oai_exit=0;
|
||||
|
||||
|
||||
@@ -256,9 +256,8 @@ typedef struct thread_pool {
|
||||
bool activated;
|
||||
bool measurePerf;
|
||||
int traceFd;
|
||||
int dummyTraceFd;
|
||||
int dummyKeepReadingTraceFd;
|
||||
uint64_t cpuCyclesMicroSec;
|
||||
uint64_t startProcessingUE;
|
||||
int nbThreads;
|
||||
notifiedFIFO_t incomingFifo;
|
||||
struct one_thread *allthreads;
|
||||
@@ -389,5 +388,6 @@ static inline int abortTpool(tpool_t *t) {
|
||||
return nbRemoved;
|
||||
}
|
||||
void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name);
|
||||
void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, char *name);
|
||||
#define initTpool(PARAMPTR,TPOOLPTR, MEASURFLAG) initNamedTpool(PARAMPTR,TPOOLPTR, MEASURFLAG, NULL)
|
||||
#endif
|
||||
|
||||
@@ -39,14 +39,14 @@ notifiedFIFO_t measur_fifo;
|
||||
double get_cpu_freq_GHz(void)
|
||||
{
|
||||
if (cpu_freq_GHz <1 ) {
|
||||
time_stats_t ts = {0};
|
||||
reset_meas(&ts);
|
||||
ts.trials++;
|
||||
ts.in = rdtsc_oai();
|
||||
sleep(1);
|
||||
ts.diff = (rdtsc_oai()-ts.in);
|
||||
cpu_freq_GHz = (double)ts.diff/1000000000;
|
||||
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
||||
time_stats_t ts = {0};
|
||||
reset_meas(&ts);
|
||||
ts.trials++;
|
||||
ts.in = rdtsc_oai();
|
||||
sleep(1);
|
||||
ts.diff = (rdtsc_oai()-ts.in);
|
||||
cpu_freq_GHz = (double)ts.diff/1000000000;
|
||||
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
||||
}
|
||||
return cpu_freq_GHz;
|
||||
}
|
||||
|
||||
+6
-46
@@ -1,41 +1,20 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">The OpenAirInterface repository: the sources</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The OpenAirInterface software can be obtained from our gitLab
|
||||
server. You will need a git client to get the sources. The repository
|
||||
is currently used for main developments.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
You need to install the subversion/git using the following commands:
|
||||
You need to install git using the following commands:
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
sudo apt-get install subversion git
|
||||
sudo apt-get install git
|
||||
```
|
||||
|
||||
# Using EURECOM Gitlab
|
||||
|
||||
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
|
||||
holds the source code for (eNB RAN + UE RAN).
|
||||
|
||||
For legal issues (licenses), the core network (EPC) source code is now moved away from
|
||||
the above openairinterface5g git repository.
|
||||
|
||||
* A more recent version is available under our GitHub domain:
|
||||
* [OAI GitHub openair-cn domain](https://github.com/OPENAIRINTERFACE)
|
||||
* Check its wiki pages for more details
|
||||
holds the source code for the RAN (4G and 5G).
|
||||
|
||||
Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository):
|
||||
|
||||
@@ -44,18 +23,6 @@ git config --global user.name "Your Name"
|
||||
git config --global user.email "Your email address"
|
||||
```
|
||||
|
||||
- Add a certificate from gitlab.eurecom.fr to your Ubuntu 14.04 installation:
|
||||
|
||||
```shell
|
||||
echo -n | openssl s_client -showcerts -connect gitlab.eurecom.fr:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
|
||||
```
|
||||
|
||||
- Disable certificate check completely if you do not have root access to /etc/ssl directory
|
||||
|
||||
```shell
|
||||
git config --global http.sslverify false
|
||||
```
|
||||
|
||||
## In order to clone the Git repository (for OAI Users without login to gitlab server)
|
||||
|
||||
Cloning RAN repository (eNB RAN + UE RAN):
|
||||
@@ -70,13 +37,6 @@ Please send email to [contact@openairinterface.org](mailto:contact@openairinterf
|
||||
as a developer (only important for users who want to commit code to the repository). If
|
||||
you do not have account on gitlab.eurecom.fr, please register yourself to gitlab.eurecom.fr and provide the identifiant in the email.
|
||||
|
||||
* Clone with using ssh keys:
|
||||
* You will need to put your ssh keys in https://gitlab.eurecom.fr/profile/keys
|
||||
to access to the git repo. Once that is done, clone the git repository using:
|
||||
* `git clone git@gitlab.eurecom.fr:oai/openairinterface5g.git`
|
||||
* Clone with user name/password prompt:
|
||||
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openairinterface5g.git`
|
||||
|
||||
# Which branch to checkout?
|
||||
|
||||
On the RAN side:
|
||||
@@ -84,15 +44,15 @@ On the RAN side:
|
||||
* **master**: This branch is targeted for the user community. Since January 2019, it is also subject to a Continuous Integration process. The update frequency is about once every 2-3 months. We are also performing bug fixes on this branch.
|
||||
* **develop**: This branch contains recent commits that are tested on our CI test bench. The update frequency is about once a week.
|
||||
|
||||
Please see the work flow and policies page :
|
||||
Please see the work flow and policies page:
|
||||
|
||||
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home
|
||||
|
||||
you can find the latest stable tag release here :
|
||||
you can find the latest stable tag release here:
|
||||
|
||||
https://gitlab.eurecom.fr/oai/openairinterface5g/tags
|
||||
|
||||
The tag naming conventions are :
|
||||
The tag naming conventions are:
|
||||
|
||||
- On `master` branch: **v1.`x`.`y`** where
|
||||
* `x` is the minor release number, incremented every 2-3 months when we are merging `develop` into `master` branch.
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format our code.
|
||||
|
||||
# Integration into editors
|
||||
|
||||
Integration into various editors (`vim`, `emacs`, `VSCode`, `CLion`) is on the
|
||||
[clang-format project page](https://clang.llvm.org/docs/ClangFormat.html).
|
||||
|
||||
There is also an [eclipse plugin](https://github.com/wangzw/CppStyle).
|
||||
|
||||
# Integration into git
|
||||
|
||||
## Short version
|
||||
|
||||
See below for a more detailed explanation. In short: Add this to `~/.gitconfig`:
|
||||
```
|
||||
[clangFormat]
|
||||
binary = clang-format-12
|
||||
style = file
|
||||
```
|
||||
Now stage files for reformatting, then run `git clang-format`. It will reformat
|
||||
only the code that is staged, and you can view reformatted code with `git
|
||||
diff`. To add modified lines to your commit, stage them as well, then commit.
|
||||
|
||||
There is also a pre-commit hook that you can install. To install it, copy it
|
||||
`pre-commit-clang` to `.git/hooks/pre-commit`, and make it executable.
|
||||
|
||||
## Long version
|
||||
|
||||
In order to integrate `clang-format` into `git`, follow these steps:
|
||||
|
||||
1) Copy `pre-commit-clang` to `.git/hooks/pre-commit` and make it executable.
|
||||
|
||||
2) Install clang-format-12 (needs at least Ubuntu 20, remove anything else)
|
||||
```bash
|
||||
$ sudo apt-get remove clang-format*
|
||||
$ sudo apt-get install clang-format-12
|
||||
```
|
||||
|
||||
3) Configure `git` (set correct executable, set mode, provide more convenient alias)
|
||||
```bash
|
||||
$ git config --global clangFormat.binary clang-format-12
|
||||
$ git config --global clangFormat.style file
|
||||
$ git config --global alias.clang-format clang-format-12
|
||||
```
|
||||
|
||||
When this is done, you are set up. How to use:
|
||||
|
||||
4) When committing new code, add the code to commit into the staging (`git add
|
||||
-p` or `git add <file>`) _and stash the rest_ (e.g., `git stash -p`, this is
|
||||
quite important or reformatting might not work properly, or you don't know
|
||||
what has been reformatted)
|
||||
|
||||
5) Run git clang-format. The staged code will be reformatted. After this, you
|
||||
still have your changes in the staging area, and the formatted code appears
|
||||
as additional modification. Thus, your changes can be seen with
|
||||
```bash
|
||||
$ git diff --staged
|
||||
```
|
||||
while the modifications of clang-format with
|
||||
```bash
|
||||
$ git diff
|
||||
```
|
||||
So now, you can add all or parts of reformatted code to the staging area
|
||||
|
||||
6) Commit. It won't work if code is not properly formatted due to the
|
||||
pre-commit hook. Force committing with `git commit --no-verify`
|
||||
@@ -43,6 +43,7 @@ RUN yum update -y && \
|
||||
tzdata \
|
||||
procps-ng \
|
||||
atlas \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-pip \
|
||||
net-tools \
|
||||
|
||||
@@ -53,6 +53,7 @@ RUN apt-get update && \
|
||||
iputils-ping \
|
||||
iproute2 \
|
||||
iperf \
|
||||
gdb \
|
||||
python \
|
||||
python3 \
|
||||
python3-six \
|
||||
|
||||
@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \
|
||||
lksctp-tools \
|
||||
nettle \
|
||||
tzdata \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-pip \
|
||||
net-tools \
|
||||
|
||||
@@ -52,6 +52,7 @@ RUN apt-get update && \
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
gdb \
|
||||
python \
|
||||
python3 \
|
||||
python3-six \
|
||||
|
||||
@@ -41,6 +41,7 @@ RUN yum update -y && \
|
||||
tzdata \
|
||||
procps-ng \
|
||||
atlas \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-pip \
|
||||
net-tools \
|
||||
|
||||
@@ -47,6 +47,7 @@ RUN apt-get update && \
|
||||
libatlas3-base \
|
||||
libconfig9 \
|
||||
net-tools \
|
||||
gdb \
|
||||
python \
|
||||
python3 \
|
||||
python3-six \
|
||||
|
||||
@@ -44,6 +44,7 @@ RUN yum update -y && \
|
||||
nettle \
|
||||
tzdata \
|
||||
atlas \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-pip \
|
||||
iproute \
|
||||
|
||||
@@ -46,6 +46,7 @@ RUN yum update -y && \
|
||||
iputils \
|
||||
iproute \
|
||||
atlas \
|
||||
gdb \
|
||||
python3 \
|
||||
python3-pip \
|
||||
libXpm \
|
||||
|
||||
@@ -50,6 +50,7 @@ RUN apt-get update && \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
gdb \
|
||||
python \
|
||||
python3 \
|
||||
python3-six \
|
||||
|
||||
@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file: ${c}"
|
||||
cat ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||
fi
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export gdbStacks=1
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting eNB soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
|
||||
@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file: ${c}"
|
||||
cat ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||
fi
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export gdbStacks=1
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting gNB soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
|
||||
@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file: ${c}"
|
||||
cat ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||
fi
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export gdbStacks=1
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting eNB soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
|
||||
@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file: ${c}"
|
||||
cat ${c}
|
||||
done
|
||||
|
||||
#now generate USIM files
|
||||
@@ -38,6 +42,8 @@ cd $PREFIX
|
||||
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then
|
||||
new_args+=("$PREFIX/etc/ue.conf")
|
||||
fi
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export gdbStacks=1
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting LTE UE soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
|
||||
@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do
|
||||
|
||||
# render template and inline replace config file
|
||||
sed -i "${EXPRESSIONS}" ${c}
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file: ${c}"
|
||||
cat ${c}
|
||||
done
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
if [[ -v USE_B2XX ]]; then
|
||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||
elif [[ -v USE_X3XX ]]; then
|
||||
@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
# enable printing of stack traces on assert
|
||||
export gdbStacks=1
|
||||
|
||||
echo "=================================="
|
||||
echo "== Starting NR UE soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
|
||||
@@ -1273,11 +1273,7 @@ int main ( int argc, char **argv ) {
|
||||
L1proc->respEncode=(notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
|
||||
L1proc->respDecode=(notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
|
||||
|
||||
if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 )
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true);
|
||||
else
|
||||
initTpool("n", L1proc->threadPool, true);
|
||||
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool,cpumeas(CPUMEAS_GETSTATE));
|
||||
initNotifiedFIFO(L1proc->respEncode);
|
||||
initNotifiedFIFO(L1proc->respDecode);
|
||||
}
|
||||
|
||||
+5
-15
@@ -221,8 +221,7 @@ void rx_func(void *param) {
|
||||
gNB->common_vars.rxdataF[aa],
|
||||
slot_rx,
|
||||
0,
|
||||
gNB->frame_parms.Ncp==EXTENDED?12:14,
|
||||
gNB->frame_parms.ofdm_symbol_size);
|
||||
gNB->frame_parms.Ncp==EXTENDED?12:14);
|
||||
}
|
||||
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
||||
}
|
||||
@@ -430,19 +429,8 @@ void init_gNB_Tpool(int inst) {
|
||||
gNB = RC.gNB[inst];
|
||||
gNB_L1_proc_t *proc = &gNB->proc;
|
||||
|
||||
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->thread_pool_size,numCPU);
|
||||
int threadCnt = min(numCPU, gNB->thread_pool_size);
|
||||
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
|
||||
char pool[80];
|
||||
sprintf(pool,"-1");
|
||||
int s_offset = 0;
|
||||
for (int icpu=1; icpu<threadCnt; icpu++) {
|
||||
sprintf(pool+2+s_offset,",-1");
|
||||
s_offset += 3;
|
||||
}
|
||||
if (getenv("noThreads")) strcpy(pool, "n");
|
||||
initTpool(pool, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||
// ULSCH decoding threadpool
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||
// ULSCH decoder result FIFO
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
|
||||
@@ -536,7 +524,9 @@ void init_eNB_afterRU(void) {
|
||||
RC.nb_nr_inst = 1;
|
||||
for (inst=0; inst<RC.nb_nr_inst; inst++) {
|
||||
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
|
||||
|
||||
gNB = RC.gNB[inst];
|
||||
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||
|
||||
phy_init_nr_gNB(gNB,0,0);
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
#define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n"
|
||||
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
|
||||
#define CONFIG_HLP_LDPC_OFFLOAD "enable LDPC offload\n"
|
||||
#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||
|
||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
{"D" , CONFIG_HLP_DLBM_PHYTEST,0, u64ptr:&dlsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||
{"U" , CONFIG_HLP_ULBM_PHYTEST,0, u64ptr:&ulsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||
{"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, 0, iptr:&ldpc_offload_flag, defstrval:0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap.xml", TYPE_STRING, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
@@ -44,6 +45,7 @@ extern uint32_t target_ul_bw;
|
||||
extern uint64_t dlsch_slot_bitmap;
|
||||
extern uint64_t ulsch_slot_bitmap;
|
||||
extern char *uecap_file;
|
||||
extern int ldpc_offload_flag;
|
||||
|
||||
// In nr-gnb.c
|
||||
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
||||
|
||||
+1
-1
@@ -679,7 +679,7 @@ void processSlotRX(void *arg) {
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
||||
#else
|
||||
uint64_t a=rdtsc_oai();
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &phy_pdcch_config, &rxtxD->txFifo);
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, &phy_pdcch_config, &rxtxD->txFifo);
|
||||
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -245,20 +245,7 @@ uint64_t set_nrUE_optmask(uint64_t bitmask) {
|
||||
nrUE_params_t *get_nrUE_params(void) {
|
||||
return &nrUE_params;
|
||||
}
|
||||
/* initialie thread pools used for NRUE processing paralleliation */
|
||||
void init_tpools(uint8_t nun_dlsch_threads) {
|
||||
char params[NR_RX_NB_TH*NR_NB_TH_SLOT*3+1]={0};
|
||||
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
|
||||
memcpy(params+(i*3),"-1,",3);
|
||||
}
|
||||
if (getenv("noThreads")) {
|
||||
initTpool("n", &(nrUE_params.Tpool), false);
|
||||
init_dlsch_tpool(0);
|
||||
} else {
|
||||
initTpool(params, &(nrUE_params.Tpool), false);
|
||||
init_dlsch_tpool( nun_dlsch_threads);
|
||||
}
|
||||
}
|
||||
|
||||
static void get_options(void) {
|
||||
|
||||
paramdef_t cmdline_params[] =CMDLINE_NRUEPARAMS_DESC ;
|
||||
@@ -442,7 +429,7 @@ int main( int argc, char **argv ) {
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, &(nrUE_params.Tpool), cpumeas(CPUMEAS_GETSTATE));
|
||||
//randominit (0);
|
||||
set_taus_seed (0);
|
||||
|
||||
@@ -451,7 +438,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
init_opt() ;
|
||||
load_nrLDPClib(NULL);
|
||||
|
||||
|
||||
if (ouput_vcd) {
|
||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{"tx_subdev", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&tx_subdev, defstrval:"", TYPE_STRING, 0}, \
|
||||
{"rx_subdev", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&rx_subdev, defstrval:"", TYPE_STRING, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:&nrUE_params.nr_dlsch_parallel, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:NULL, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:&nrUE_params.ofdm_offset_divisor, defuintval:8, TYPE_UINT32, 0}, \
|
||||
{"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0, u8ptr:&nrUE_params.max_ldpc_iterations, defuintval:5, TYPE_UINT8, 0}, \
|
||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -80,7 +80,6 @@
|
||||
typedef struct {
|
||||
uint64_t optmask; //mask to store boolean config options
|
||||
uint32_t ofdm_offset_divisor; // Divisor for sample offset computation for each OFDM symbol
|
||||
uint8_t nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
|
||||
uint8_t max_ldpc_iterations; // number of maximum LDPC iterations
|
||||
tpool_t Tpool; // thread pool
|
||||
} nrUE_params_t;
|
||||
|
||||
@@ -46,7 +46,7 @@ static softmodem_params_t softmodem_params;
|
||||
char *parallel_config=NULL;
|
||||
char *worker_config=NULL;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
int ldpc_offload_flag=0;
|
||||
uint8_t nfapi_mode=0;
|
||||
|
||||
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
||||
|
||||
@@ -139,7 +139,7 @@ extern int usrp_tx_thread;
|
||||
#define CMDLINE_PARAMS_DESC { \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, 0},\
|
||||
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:&SPLIT73, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"n", TYPE_STRING, 0}, \
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
|
||||
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
|
||||
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, iptr:&SA, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -283,6 +283,7 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern int usrp_tx_thread;
|
||||
extern uint16_t sl_ahead;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int ldpc_offload_flag;
|
||||
extern int oai_exit;
|
||||
|
||||
void tx_func(void *param);
|
||||
|
||||
@@ -333,6 +333,7 @@ typedef struct
|
||||
//Resource Allocation in time domain
|
||||
uint8_t start_symbol_index;
|
||||
uint8_t nr_of_symbols;
|
||||
uint32_t tbslbrm;
|
||||
//Optional Data only included if indicated in pduBitmap
|
||||
nfapi_nr_ue_pusch_data_t pusch_data;
|
||||
nfapi_nr_ue_pusch_uci_t pusch_uci;
|
||||
|
||||
@@ -1290,42 +1290,33 @@ typedef struct
|
||||
|
||||
} nfapi_nr_pucch_pdu_t;
|
||||
|
||||
//for srs_pdu:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t rnti;//UE RNTI
|
||||
uint32_t handle;//An opaque handling returned in the SRS.indication
|
||||
//BWP
|
||||
uint16_t bwp_size;
|
||||
uint16_t bwp_start;
|
||||
uint8_t subcarrier_spacing;
|
||||
uint8_t cyclic_prefix;
|
||||
|
||||
uint8_t num_ant_ports;
|
||||
uint8_t num_symbols;
|
||||
uint8_t num_repetitions;
|
||||
uint8_t time_start_position;//Starting position in the time domain l0; Note: the MAC undertakes the translation from startPosition to 𝑙0
|
||||
uint8_t config_index;
|
||||
uint16_t sequence_id;
|
||||
uint8_t bandwidth_index;
|
||||
uint8_t comb_size;
|
||||
uint8_t comb_offset;//Transmission comb offset 𝑘 ̄ TC [TS38.211, Sec 6.4.1.4.3] Value: 0 → 1 (combSize = 0) Value: 0 → 3 (combSize = 1)
|
||||
uint8_t cyclic_shift;
|
||||
uint8_t frequency_position;
|
||||
uint16_t frequency_shift;
|
||||
uint8_t frequency_hopping;
|
||||
uint8_t group_or_sequence_hopping;//Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRS-Resource
|
||||
uint8_t resource_type;//Type of SRS resource allocation
|
||||
uint16_t t_srs;//SRS-Periodicity in slots [TS38.211 Sec 6.4.1.4.4] Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
|
||||
uint16_t t_offset;//Slot offset value [TS38.211, Sec 6.4.1.4.3] Value:0->2559
|
||||
|
||||
typedef struct {
|
||||
uint16_t rnti; // UE RNTI, Value: 1->65535
|
||||
uint32_t handle; // An opaque handling returned in the SRS.indication
|
||||
uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
|
||||
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
|
||||
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
|
||||
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
|
||||
uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
|
||||
uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
|
||||
uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
|
||||
uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
|
||||
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
|
||||
uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
|
||||
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
|
||||
uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
|
||||
uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
|
||||
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
|
||||
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
|
||||
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
|
||||
uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
|
||||
uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
|
||||
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
|
||||
nfapi_nr_ul_beamforming_t beamforming;
|
||||
|
||||
} nfapi_nr_srs_pdu_t;
|
||||
|
||||
//
|
||||
|
||||
typedef enum {
|
||||
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE = 0,
|
||||
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE = 1,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,135 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause
|
||||
* Copyright(c) 2017 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef _MAIN_H_
|
||||
#define _MAIN_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include <rte_common.h>
|
||||
#include <rte_hexdump.h>
|
||||
#include <rte_log.h>
|
||||
|
||||
#define TEST_SUCCESS 0
|
||||
#define TEST_FAILED -1
|
||||
#define TEST_SKIPPED 1
|
||||
|
||||
#define MAX_BURST 512U
|
||||
#define DEFAULT_BURST 32U
|
||||
#define DEFAULT_OPS 64U
|
||||
#define DEFAULT_ITER 6U
|
||||
|
||||
enum op_data_type {
|
||||
DATA_INPUT = 0,
|
||||
DATA_SOFT_OUTPUT,
|
||||
DATA_HARD_OUTPUT,
|
||||
DATA_HARQ_INPUT,
|
||||
DATA_HARQ_OUTPUT,
|
||||
DATA_NUM_TYPES,
|
||||
};
|
||||
|
||||
#define TEST_ASSERT(cond, msg, ...) do { \
|
||||
if (!(cond)) { \
|
||||
printf("TestCase %s() line %d failed: " \
|
||||
msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
|
||||
return TEST_FAILED; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Compare two buffers (length in bytes) */
|
||||
#define TEST_ASSERT_BUFFERS_ARE_EQUAL(a, b, len, msg, ...) do { \
|
||||
if (memcmp((a), (b), len)) { \
|
||||
printf("TestCase %s() line %d failed: " \
|
||||
msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
|
||||
rte_memdump(stdout, "Buffer A", (a), len); \
|
||||
rte_memdump(stdout, "Buffer B", (b), len); \
|
||||
return TEST_FAILED; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TEST_ASSERT_SUCCESS(val, msg, ...) do { \
|
||||
typeof(val) _val = (val); \
|
||||
if (!(_val == 0)) { \
|
||||
printf("TestCase %s() line %d failed (err %d): " \
|
||||
msg "\n", __func__, __LINE__, _val, \
|
||||
##__VA_ARGS__); \
|
||||
return TEST_FAILED; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TEST_ASSERT_FAIL(val, msg, ...) \
|
||||
TEST_ASSERT_SUCCESS(!(val), msg, ##__VA_ARGS__)
|
||||
|
||||
#define TEST_ASSERT_NOT_NULL(val, msg, ...) do { \
|
||||
if ((val) == NULL) { \
|
||||
printf("TestCase %s() line %d failed (null): " \
|
||||
msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
|
||||
return TEST_FAILED; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
struct unit_test_case {
|
||||
int (*setup)(void);
|
||||
void (*teardown)(void);
|
||||
int (*testcase)(void);
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#define TEST_CASE(testcase) {NULL, NULL, testcase, #testcase}
|
||||
|
||||
#define TEST_CASE_ST(setup, teardown, testcase) \
|
||||
{setup, teardown, testcase, #testcase}
|
||||
|
||||
#define TEST_CASES_END() {NULL, NULL, NULL, NULL}
|
||||
|
||||
struct unit_test_suite {
|
||||
const char *suite_name;
|
||||
int (*setup)(void);
|
||||
void (*teardown)(void);
|
||||
struct unit_test_case unit_test_cases[];
|
||||
};
|
||||
|
||||
int unit_test_suite_runner(struct unit_test_suite *suite);
|
||||
|
||||
typedef int (test_callback)(void);
|
||||
TAILQ_HEAD(test_commands_list, test_command);
|
||||
struct test_command {
|
||||
TAILQ_ENTRY(test_command) next;
|
||||
const char *command;
|
||||
test_callback *callback;
|
||||
};
|
||||
|
||||
void add_test_command(struct test_command *t);
|
||||
|
||||
/* Register a test function */
|
||||
#define REGISTER_TEST_COMMAND(name, testsuite) \
|
||||
static int test_func_##name(void) \
|
||||
{ \
|
||||
return unit_test_suite_runner(&testsuite); \
|
||||
} \
|
||||
static struct test_command test_struct_##name = { \
|
||||
.command = RTE_STR(name), \
|
||||
.callback = test_func_##name, \
|
||||
}; \
|
||||
RTE_INIT(test_register_##name) \
|
||||
{ \
|
||||
add_test_command(&test_struct_##name); \
|
||||
}
|
||||
|
||||
const char *get_vector_filename(void);
|
||||
|
||||
unsigned int get_num_ops(void);
|
||||
|
||||
unsigned int get_burst_sz(void);
|
||||
|
||||
unsigned int get_num_lcores(void);
|
||||
|
||||
double get_snr(void);
|
||||
|
||||
unsigned int get_iter_max(void);
|
||||
|
||||
bool get_init_device(void);
|
||||
|
||||
#endif
|
||||
@@ -75,6 +75,20 @@ typedef struct nrLDPC_dec_params {
|
||||
e_nrLDPC_outMode outMode; /**< Output format */
|
||||
} t_nrLDPC_dec_params;
|
||||
|
||||
/**
|
||||
Structure containing LDPC decoder parameters.
|
||||
*/
|
||||
typedef struct nrLDPCoffload_params {
|
||||
uint8_t BG; /**< Base graph */
|
||||
uint16_t Z;
|
||||
uint16_t Kr;
|
||||
uint8_t rv;
|
||||
uint32_t E;
|
||||
uint16_t n_cb;
|
||||
uint16_t F; /**< Filler bits */
|
||||
uint8_t Qm; /**< Modulation */
|
||||
} t_nrLDPCoffload_params;
|
||||
|
||||
/**
|
||||
Structure containing LDPC decoder processing time statistics.
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define __NRLDPC_DEFS__H__
|
||||
#include <openair1/PHY/defs_nr_common.h>
|
||||
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||
|
||||
/**
|
||||
\brief LDPC encoder
|
||||
\param 1 input
|
||||
@@ -71,5 +72,9 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
|
||||
\param p_llrOut Output vector
|
||||
\param p_profiler LDPC profiler statistics
|
||||
*/
|
||||
|
||||
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_time_stats* );
|
||||
typedef int32_t(*nrLDPC_decoffloadfunc_t)(t_nrLDPC_dec_params* , uint8_t, uint8_t, uint8_t , uint8_t, uint16_t, uint32_t, uint8_t, int8_t*, int8_t* ,uint8_t);
|
||||
typedef int32_t(*nrLDPC_dectopfunc_t)(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,14 +24,22 @@
|
||||
nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||
nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||
nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||
nrLDPC_decoffloadfunc_t nrLDPC_decoder_offload;
|
||||
nrLDPC_dectopfunc_t top_testsuite;
|
||||
#else
|
||||
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
||||
extern int load_nrLDPClib(char *version) ;
|
||||
extern int load_nrLDPClib_offload(void) ;
|
||||
extern int free_nrLDPClib_offload(void) ;
|
||||
extern int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr); // for ldpctest
|
||||
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
|
||||
extern nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||
|
||||
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||
extern nrLDPC_decoffloadfunc_t nrLDPC_decoder_offload;
|
||||
|
||||
extern nrLDPC_dectopfunc_t top_testsuite;
|
||||
|
||||
// inline functions:
|
||||
#endif
|
||||
|
||||
@@ -71,6 +71,56 @@ int load_nrLDPClib(char *version) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int load_nrLDPClib_offload(void) {
|
||||
loader_shlibfunc_t shlib_decoffload_fdesc;
|
||||
|
||||
shlib_decoffload_fdesc.fname = "nrLDPC_decod_offload";
|
||||
int ret=load_module_shlib("ldpc_offload",&shlib_decoffload_fdesc,1,NULL);
|
||||
AssertFatal( (ret >= 0),"Error loading ldpc decoder offload");
|
||||
nrLDPC_decoder_offload = (nrLDPC_decoffloadfunc_t)shlib_decoffload_fdesc.fptr;
|
||||
|
||||
t_nrLDPC_dec_params decParams;
|
||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||
int8_t l[68*384];
|
||||
int8_t llrProcBuf[22*384];
|
||||
|
||||
p_decParams->Z = 384;
|
||||
p_decParams->BG = 1;
|
||||
|
||||
AssertFatal(nrLDPC_decoder_offload(p_decParams,0, 0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
25344,
|
||||
8,
|
||||
l,
|
||||
llrProcBuf, 0)>=0,
|
||||
"error loading LDPC decoder offload library\n");
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int free_nrLDPClib_offload(void) {
|
||||
t_nrLDPC_dec_params decParams;
|
||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||
int8_t l[68*384];
|
||||
int8_t llrProcBuf[22*384];
|
||||
|
||||
p_decParams->Z = 384;
|
||||
p_decParams->BG = 1;
|
||||
|
||||
nrLDPC_decoder_offload(p_decParams,0,0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
25344,
|
||||
8,
|
||||
l,
|
||||
llrProcBuf, 2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr) {
|
||||
loader_shlibfunc_t shlib_encoder_fdesc;
|
||||
|
||||
|
||||
@@ -497,10 +497,10 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
||||
N = (BG==1)?(66*Z):(50*Z);
|
||||
|
||||
if (Tbslbrm == 0)
|
||||
Ncb = N;
|
||||
Ncb = N;
|
||||
else {
|
||||
Nref = (3*Tbslbrm/(2*C)); //R_LBRM = 2/3
|
||||
Ncb = min(N, Nref);
|
||||
Nref = (3*Tbslbrm/(2*C)); //R_LBRM = 2/3
|
||||
Ncb = min(N, Nref);
|
||||
}
|
||||
|
||||
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
||||
@@ -564,7 +564,6 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -475,9 +475,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
srs_vars[srs_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
|
||||
}
|
||||
|
||||
LOG_I(PHY,"PRACH allocation\n");
|
||||
// PRACH
|
||||
prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
|
||||
@@ -485,8 +483,6 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
|
||||
prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
// PRACH BR
|
||||
prach_vars_br->prachF = (int16_t *)malloc16_clear( 1024*2*sizeof(int32_t) );
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
@@ -576,8 +572,6 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_SRS_MAX; UE_id++) free_and_zero(srs_vars[UE_id].srs);
|
||||
|
||||
free_and_zero(prach_vars->prachF);
|
||||
|
||||
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
|
||||
|
||||
free_and_zero(prach_vars->prach_ifft[0]);
|
||||
@@ -589,7 +583,6 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
|
||||
free_and_zero(prach_vars->rxsigF[ce_level]);
|
||||
}
|
||||
|
||||
free_and_zero(prach_vars_br->prachF);
|
||||
free_and_zero(prach_vars->rxsigF[0]);
|
||||
|
||||
for (int ULSCH_id=0; ULSCH_id<NUMBER_OF_ULSCH_MAX; ULSCH_id++) {
|
||||
|
||||
@@ -689,8 +689,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
|
||||
int idx = (j<<1) + i;
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates[eNB_id][idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_tti*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates_time[eNB_id][idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates[eNB_id][idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*
|
||||
max(fp->symbols_per_tti*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH),6144) );
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates_time[eNB_id][idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*max(fp->ofdm_symbol_size*2,6144) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,8 +508,12 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
crcTableInit();
|
||||
init_scrambling_luts();
|
||||
init_pucch2_luts();
|
||||
|
||||
load_nrLDPClib(NULL);
|
||||
|
||||
if (gNB->ldpc_offload_flag)
|
||||
load_nrLDPClib_offload();
|
||||
|
||||
init_codebook_gNB(gNB);
|
||||
|
||||
// PBCH DMRS gold sequences generation
|
||||
@@ -633,6 +637,10 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
|
||||
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
|
||||
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t**)malloc16_clear(MAX_NUM_NR_SRS_AP*sizeof(int32_t*));
|
||||
for(int ap=0; ap<MAX_NUM_NR_SRS_AP; ap++) {
|
||||
gNB->nr_srs_info[id]->srs_generated_signal[ap] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
@@ -787,6 +795,10 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
free_and_zero(gNB->nr_csi_info);
|
||||
|
||||
for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) {
|
||||
for(int i=0; i<MAX_NUM_NR_SRS_AP; i++) {
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal[i]);
|
||||
}
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal);
|
||||
free_and_zero(gNB->nr_srs_info[id]);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
#ifdef DEBUG_CH
|
||||
|
||||
if (Ns==0)
|
||||
LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
||||
LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,0);
|
||||
else
|
||||
LOG_M("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
||||
LOG_M("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,0);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -311,7 +311,7 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// alpha = (int16_t) (((int32_t) SCALE * (int32_t) (pilot_pos2-k))/(pilot_pos2-pilot_pos1));
|
||||
// beta = (int16_t) (((int32_t) SCALE * (int32_t) (k-pilot_pos1))/(pilot_pos2-pilot_pos1));
|
||||
#ifdef DEBUG_CH
|
||||
LOG_D(PHY,"lte_ul_channel_estimation: k=%d, alpha = %d, beta = %d\n",k,alpha,beta);
|
||||
LOG_D(PHY,"lte_ul_channel_estimation: k=%d\n",k);
|
||||
#endif
|
||||
//symbol_offset_subframe = frame_parms->N_RB_UL*12*k;
|
||||
|
||||
@@ -436,9 +436,9 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
#ifdef DEBUG_CH
|
||||
|
||||
if (l==pilot_pos1)
|
||||
write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,1);
|
||||
write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,0);
|
||||
else
|
||||
write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,1);
|
||||
write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],Msc_RS,1,0);
|
||||
|
||||
#endif
|
||||
symbol_offset = frame_parms->N_RB_UL*12*l;
|
||||
|
||||
@@ -74,7 +74,8 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint32_t subframe_offset=((frame_parms->Ncp==0)?14:12)*frame_parms->ofdm_symbol_size*subframe;
|
||||
|
||||
memset(d,0,24*sizeof(int16_t));
|
||||
|
||||
const int nushift=frame_parms->nushift;
|
||||
|
||||
if (frame_parms->nb_antenna_ports_eNB==1)
|
||||
gain_lin_QPSK = (int16_t)(((int32_t)amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||
else
|
||||
@@ -245,7 +246,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y1_16[7] = -y0_16[5];
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m];
|
||||
y1[j] += y1_16[m++];
|
||||
y0[j+1] += y0_16[m];
|
||||
@@ -287,7 +288,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y1_16[7] = -y0_16[5];
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m];
|
||||
y1[j] += y1_16[m++];
|
||||
y0[j+1] += y0_16[m];
|
||||
@@ -329,7 +330,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y1_16[7] = -y0_16[5];
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m];
|
||||
y1[j] += y1_16[m++];
|
||||
y0[j+1] += y0_16[m];
|
||||
@@ -360,7 +361,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y0_16[7] = d[7]*gain_lin_QPSK;
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m++];
|
||||
y0[j+1] += y0_16[m++];
|
||||
}
|
||||
@@ -385,7 +386,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y0_16[7] = d[15]*gain_lin_QPSK;
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m++];
|
||||
y0[j+1] += y0_16[m++];
|
||||
}
|
||||
@@ -410,7 +411,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y0_16[7] = d[23]*gain_lin_QPSK;
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m++];
|
||||
y0[j+1] += y0_16[m++];
|
||||
}
|
||||
@@ -533,7 +534,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y1_16[7] = -y0_16[5];
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m];
|
||||
y1[j] += y1_16[m++];
|
||||
y0[j+1] += y0_16[m];
|
||||
@@ -644,7 +645,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
y0_16[7] = d[7]*gain_lin_QPSK;
|
||||
|
||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
||||
if ((i!=(frame_parms->nushift))&&(i!=(frame_parms->nushift+3))) {
|
||||
if ((i!=(nushift))&&(i!=((nushift+3)%6))) {
|
||||
y0[j] += y0_16[m++];
|
||||
y0[j+1] += y0_16[m++];
|
||||
}
|
||||
|
||||
@@ -62,9 +62,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint8_t Ncs_config;
|
||||
uint8_t restricted_set;
|
||||
uint8_t n_ra_prb;
|
||||
int16_t *prachF=NULL;
|
||||
int16_t **rxsigF=NULL;
|
||||
int16_t *prach2;
|
||||
uint8_t preamble_index;
|
||||
uint16_t NCS,NCS2;
|
||||
uint16_t preamble_offset=0,preamble_offset_old;
|
||||
@@ -77,12 +75,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint8_t not_found;
|
||||
int k=0;
|
||||
uint16_t u;
|
||||
int16_t *Xu=0;
|
||||
uint16_t offset;
|
||||
c16_t *Xu=0;
|
||||
int16_t Ncp;
|
||||
uint16_t first_nonzero_root_idx=0;
|
||||
uint8_t new_dft=0;
|
||||
uint8_t aa;
|
||||
int32_t lev;
|
||||
int16_t levdB;
|
||||
int fft_size=0,log2_ifft_size;
|
||||
@@ -130,14 +126,11 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
tdd_mapindex,Nf);
|
||||
}
|
||||
|
||||
int16_t *prach[nb_rx];
|
||||
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||
|
||||
if (eNB) {
|
||||
if (br_flag == 1) {
|
||||
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
||||
prachF = eNB->prach_vars_br.prachF;
|
||||
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
@@ -151,7 +144,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
} else {
|
||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||
prachF = eNB->prach_vars.prachF;
|
||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||
|
||||
//if (LOG_DEBUGFLAG(PRACH)) {
|
||||
@@ -179,7 +171,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
AssertFatal(ru!=NULL,"ru is null\n");
|
||||
int8_t dBEn0=0;
|
||||
for (aa=0; aa<nb_rx; aa++) {
|
||||
int16_t *prach[nb_rx];
|
||||
for (int aa=0; aa<nb_rx; aa++) {
|
||||
if (ru->if_south == LOCAL_RF || ru->function == NGFI_RAU_IF5) { // set the time-domain signal if we have to use it in this node
|
||||
// DJP - indexing below in subframe zero takes us off the beginning of the array???
|
||||
prach[aa] = (int16_t *)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset];
|
||||
@@ -291,9 +284,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
|
||||
}
|
||||
|
||||
for (aa=0; aa<nb_rx; aa++) {
|
||||
for (int aa=0; aa<nb_rx; aa++) {
|
||||
AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa);
|
||||
prach2 = prach[aa] + (Ncp<<1);
|
||||
int16_t *prach2 = prach[aa] + (Ncp<<1); // <<1 because type int16 but input is c16
|
||||
|
||||
// do DFT
|
||||
switch (fp->N_RB_UL) {
|
||||
@@ -562,37 +555,38 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (new_dft == 1) {
|
||||
new_dft = 0;
|
||||
|
||||
|
||||
if (br_flag == 1) {
|
||||
Xu=(int16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
|
||||
Xu=(c16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
|
||||
prach_ifft = prach_ifftp[prach_ifft_cnt++];
|
||||
|
||||
|
||||
if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
|
||||
} else {
|
||||
Xu=(int16_t *)eNB->X_u[preamble_offset-first_nonzero_root_idx];
|
||||
Xu=(c16_t *)eNB->X_u[preamble_offset-first_nonzero_root_idx];
|
||||
prach_ifft = prach_ifftp[0];
|
||||
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
|
||||
}
|
||||
|
||||
memset(prachF, 0, sizeof(int16_t)*2*1024 );
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
|
||||
|
||||
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
|
||||
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],12288,1,1);
|
||||
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],12288,1,1);
|
||||
}
|
||||
|
||||
for (aa=0; aa<nb_rx; aa++) {
|
||||
c16_t prachF[1024] __attribute__((aligned(32)))={0};
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH))
|
||||
for (int z=0; z<nb_rx; z++)
|
||||
if( prach[z] ) {
|
||||
char tmp[128];
|
||||
sprintf(tmp,"prach_rx%d.m", z);
|
||||
LOG_M(tmp,tmp,prach[z],6144+792,1,1);
|
||||
sprintf(tmp,"prach_rxF%d.m", z);
|
||||
LOG_M(tmp,tmp,rxsigF[z],12288,1,1);
|
||||
}
|
||||
|
||||
for (int aa=0; aa<nb_rx; aa++) {
|
||||
// Do componentwise product with Xu* on each antenna
|
||||
k=0;
|
||||
|
||||
for (offset=0; offset<(N_ZC<<1); offset+=2) {
|
||||
prachF[offset] = (int16_t)(((int32_t)Xu[offset]*rxsigF[aa][k] + (int32_t)Xu[offset+1]*rxsigF[aa][k+1])>>15);
|
||||
prachF[offset+1] = (int16_t)(((int32_t)Xu[offset]*rxsigF[aa][k+1] - (int32_t)Xu[offset+1]*rxsigF[aa][k])>>15);
|
||||
|
||||
for (int offset=0; offset<N_ZC; offset++) {
|
||||
prachF[offset].r = (int16_t)(((int32_t)Xu[offset].r*rxsigF[aa][k] + (int32_t)Xu[offset].i*rxsigF[aa][k+1])>>15);
|
||||
prachF[offset].i = (int16_t)(((int32_t)Xu[offset].r*rxsigF[aa][k+1] - (int32_t)Xu[offset].i*rxsigF[aa][k])>>15);
|
||||
k+=2;
|
||||
|
||||
|
||||
if (k==(12*2*fp->ofdm_symbol_size))
|
||||
k=0;
|
||||
}
|
||||
@@ -600,13 +594,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
|
||||
if (N_ZC == 839) {
|
||||
log2_ifft_size = 10;
|
||||
idft(IDFT_1024,prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_1024,(int16_t*)prachF,prach_ifft_tmp,1);
|
||||
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
for (i=0; i<2048; i++)
|
||||
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[i<<1] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>9;
|
||||
} else {
|
||||
idft(IDFT_256,prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_256,(int16_t*)prachF,prach_ifft_tmp,1);
|
||||
log2_ifft_size = 8;
|
||||
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
@@ -674,14 +668,12 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (br_flag == 0) {
|
||||
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
|
||||
LOG_M("SF2_3.m","sf2_3",&ru->common.rxdata[0][2*fp->samples_per_tti],2*fp->samples_per_tti,1,1);
|
||||
} else {
|
||||
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
|
||||
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
|
||||
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
|
||||
}
|
||||
|
||||
@@ -335,7 +335,10 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc,
|
||||
}
|
||||
|
||||
union turboReqUnion id= {.s={ulsch->rnti,proc->frame_rx,proc->subframe_rx,0,0}};
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(turboDecode_t), id.p, proc->respDecode, processULSegment);
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(turboDecode_t),
|
||||
id.p,
|
||||
proc->respDecode,
|
||||
processULSegment);
|
||||
turboDecode_t * rdata=(turboDecode_t *) NotifiedFifoData(req);
|
||||
|
||||
rdata->eNB=eNB;
|
||||
|
||||
@@ -112,8 +112,7 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||
int16_t* txdata,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length);
|
||||
int nsymb);
|
||||
|
||||
void init_symbol_rotation(NR_DL_FRAME_PARMS *fp);
|
||||
|
||||
@@ -123,8 +122,7 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *rxdataF,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length);
|
||||
int nsymb);
|
||||
|
||||
/*! \brief Perform NR precoding. TS 38.211 V15.4.0 subclause 6.3.1.5
|
||||
@param[in] datatx_F_precoding, Pointer to n_layers*re data array
|
||||
|
||||
@@ -345,30 +345,41 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
|
||||
}
|
||||
|
||||
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||
int16_t* trxdata,
|
||||
int16_t* txdataF,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length) {
|
||||
int nsymb)
|
||||
{
|
||||
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
|
||||
|
||||
c16_t *symbol_rotation = fp->symbol_rotation[0];
|
||||
c16_t *symbol_rotation = fp->symbol_rotation[0] + symb_offset;
|
||||
|
||||
for (int sidx=0;sidx<nsymb;sidx++) {
|
||||
for (int sidx = first_symbol; sidx < first_symbol + nsymb; sidx++) {
|
||||
c16_t *this_rotation = symbol_rotation + sidx;
|
||||
c16_t *this_symbol = ((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size;
|
||||
|
||||
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d, length %d (%d,%d)\n",
|
||||
first_symbol + sidx,
|
||||
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
|
||||
sidx,
|
||||
slot,
|
||||
sidx + first_symbol + symb_offset,
|
||||
length,
|
||||
symbol_rotation[sidx + first_symbol + symb_offset].r,
|
||||
symbol_rotation[sidx + first_symbol + symb_offset].i);
|
||||
sidx + symb_offset,
|
||||
this_rotation->r,
|
||||
this_rotation->i);
|
||||
|
||||
rotate_cpx_vector(((c16_t*) trxdata) + sidx * length,
|
||||
symbol_rotation + sidx + first_symbol + symb_offset,
|
||||
((c16_t*) trxdata) + sidx * length,
|
||||
length,
|
||||
15);
|
||||
if (fp->N_RB_DL & 1) {
|
||||
rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
|
||||
(fp->N_RB_DL + 1) * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + fp->first_carrier_offset - 6,
|
||||
this_rotation,
|
||||
this_symbol + fp->first_carrier_offset - 6,
|
||||
(fp->N_RB_DL + 1) * 6, 15);
|
||||
} else {
|
||||
rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
|
||||
fp->N_RB_DL * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + fp->first_carrier_offset,
|
||||
this_rotation,
|
||||
this_symbol + fp->first_carrier_offset,
|
||||
fp->N_RB_DL * 6, 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,20 +107,36 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
symbol+symb_offset,rot2.r,rot2.i);
|
||||
#endif
|
||||
|
||||
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
&rot2,
|
||||
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *this_symbol = (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
|
||||
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
(int16_t *)shift_rot,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
1,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
if (frame_parms->N_RB_DL & 1) {
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||
(frame_parms->N_RB_DL + 1) * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
|
||||
&rot2,
|
||||
this_symbol + frame_parms->first_carrier_offset - 6,
|
||||
(frame_parms->N_RB_DL + 1) * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
|
||||
1, (frame_parms->N_RB_DL + 1) * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
|
||||
(int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6),
|
||||
(int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
|
||||
1, (frame_parms->N_RB_DL + 1) * 6, 15);
|
||||
} else {
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||
frame_parms->N_RB_DL * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset,
|
||||
&rot2,
|
||||
this_symbol + frame_parms->first_carrier_offset,
|
||||
frame_parms->N_RB_DL * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
|
||||
1, frame_parms->N_RB_DL * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset),
|
||||
(int16_t *)(shift_rot + frame_parms->first_carrier_offset),
|
||||
(int16_t *)(this_symbol + frame_parms->first_carrier_offset),
|
||||
1, frame_parms->N_RB_DL * 6, 15);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
@@ -223,11 +239,8 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
symbol+symb_offset,rot2.r,rot2.i);
|
||||
#endif
|
||||
|
||||
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
&rot2,
|
||||
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
c16_t *this_symbol = (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol, frame_parms->ofdm_symbol_size, 15);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
@@ -301,10 +314,8 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *rxdataF,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length) {
|
||||
|
||||
|
||||
int nsymb)
|
||||
{
|
||||
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
int soffset = (slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
|
||||
|
||||
@@ -313,19 +324,36 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
c16_t rot2 = frame_parms->symbol_rotation[1][symbol + symb_offset];
|
||||
rot2.i=-rot2.i;
|
||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i);
|
||||
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
&rot2,
|
||||
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
length,
|
||||
15);
|
||||
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *this_symbol = (c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)];
|
||||
|
||||
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
(int16_t *)shift_rot,
|
||||
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
1,
|
||||
length,
|
||||
15);
|
||||
if (frame_parms->N_RB_UL & 1) {
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||
(frame_parms->N_RB_UL + 1) * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
|
||||
&rot2,
|
||||
this_symbol + frame_parms->first_carrier_offset - 6,
|
||||
(frame_parms->N_RB_UL + 1) * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
|
||||
1, (frame_parms->N_RB_UL+1) * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
|
||||
(int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6),
|
||||
(int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
|
||||
1, (frame_parms->N_RB_UL+1) * 6, 15);
|
||||
} else {
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||
frame_parms->N_RB_UL * 6, 15);
|
||||
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset,
|
||||
&rot2,
|
||||
this_symbol + frame_parms->first_carrier_offset,
|
||||
frame_parms->N_RB_UL * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
|
||||
1, frame_parms->N_RB_UL * 6, 15);
|
||||
multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset),
|
||||
(int16_t *)(shift_rot + frame_parms->first_carrier_offset),
|
||||
(int16_t *)(this_symbol + frame_parms->first_carrier_offset),
|
||||
1, frame_parms->N_RB_UL * 6, 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ int nr_est_timing_advance_pusch(PHY_VARS_gNB* gNB, int UE_id)
|
||||
return max_pos - sync_pos;
|
||||
}
|
||||
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]) {
|
||||
int timing_advance = 0;
|
||||
int max_val = 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -71,12 +71,12 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
|
||||
const int slot,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const nr_srs_info_t *nr_srs_info,
|
||||
const int32_t *srs_generated_signal,
|
||||
const int32_t **srs_generated_signal,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_ls_estimated_channel[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_ls_estimated_channel[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][1<<srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
uint32_t *signal_power,
|
||||
uint32_t *noise_power_per_rb,
|
||||
uint32_t *noise_power,
|
||||
|
||||
@@ -323,19 +323,19 @@ int nr_find_pucch(uint16_t rnti,
|
||||
NR_gNB_SRS_t *new_gNB_srs(void);
|
||||
void free_gNB_srs(NR_gNB_SRS_t *srs);
|
||||
|
||||
int nr_find_srs(uint16_t rnti,
|
||||
int frame,
|
||||
int slot,
|
||||
int nr_find_srs(rnti_t rnti,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
PHY_VARS_gNB *gNB);
|
||||
|
||||
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu);
|
||||
|
||||
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "defs.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
@@ -381,6 +382,23 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
uint32_t offset;
|
||||
int kc;
|
||||
int E;
|
||||
int8_t llrProcBuf[22*384];
|
||||
int ret = 0;
|
||||
int i,j;
|
||||
int8_t enable_ldpc_offload = phy_vars_gNB->ldpc_offload_flag;
|
||||
int16_t z_ol [68*384];
|
||||
int8_t l_ol [68*384];
|
||||
__m128i *pv_ol128 = (__m128i*)&z_ol;
|
||||
__m128i *pl_ol128 = (__m128i*)&l_ol;
|
||||
int no_iteration_ldpc = 2;
|
||||
int length_dec;
|
||||
uint8_t crc_type;
|
||||
int K_bits_F;
|
||||
int16_t z [68*384 + 16] __attribute__ ((aligned(16)));
|
||||
int8_t l [68*384 + 16] __attribute__ ((aligned(16)));
|
||||
|
||||
__m128i *pv = (__m128i*)&z;
|
||||
__m128i *pl = (__m128i*)&l;
|
||||
|
||||
#ifdef PRINT_CRC_CHECK
|
||||
prnt_crc_cnt++;
|
||||
@@ -395,7 +413,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
LOG_E(PHY,"ulsch_decoding.c: NULL harq_process pointer\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t dtx_det = 0;
|
||||
t_nrLDPC_dec_params decParams;
|
||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||
|
||||
@@ -422,6 +440,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
harq_process->round = nr_rv_to_round(pusch_pdu->pusch_data.rv_index);
|
||||
|
||||
harq_process->new_rx = false; // flag to indicate if this is a new reception for this harq (initialized to false)
|
||||
dtx_det = 0;
|
||||
if (harq_process->round == 0) {
|
||||
harq_process->new_rx = true;
|
||||
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
||||
@@ -431,6 +450,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
if (harq_process->ndi != pusch_pdu->pusch_data.new_data_indicator) {
|
||||
harq_process->new_rx = true;
|
||||
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
||||
|
||||
LOG_D(PHY,"Missed ULSCH detection. NDI toggled but rv %d does not correspond to first reception\n",pusch_pdu->pusch_data.rv_index);
|
||||
}
|
||||
|
||||
@@ -546,12 +566,179 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
Kr = harq_process->K;
|
||||
Kr_bytes = Kr>>3;
|
||||
offset = 0;
|
||||
|
||||
//if ((enable_ldpc_offload)&& (dtx_det==0))
|
||||
if (enable_ldpc_offload){
|
||||
// if (dtx_det==0) {
|
||||
|
||||
if (harq_process->C == 1) {
|
||||
if (A > 3824)
|
||||
crc_type = CRC24_A;
|
||||
else
|
||||
crc_type = CRC16;
|
||||
|
||||
length_dec = harq_process->B;
|
||||
}
|
||||
else {
|
||||
crc_type = CRC24_B;
|
||||
length_dec = (harq_process->B+24*harq_process->C)/harq_process->C;
|
||||
}
|
||||
|
||||
for (r=0; r<harq_process->C; r++) {
|
||||
E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
|
||||
memset(harq_process->c[r],0,Kr_bytes);
|
||||
|
||||
if ((dtx_det==0)&&(pusch_pdu->pusch_data.rv_index==0)){
|
||||
//if (dtx_det==0){
|
||||
if (mcs >9){
|
||||
memcpy((&z_ol[0]),ulsch_llr+r_offset,E*sizeof(short));
|
||||
|
||||
for (i=0, j=0; j < ((kc*harq_process->Z)>>4)+1; i+=2, j++)
|
||||
{
|
||||
pl_ol128[j] = _mm_packs_epi16(pv_ol128[i],pv_ol128[i+1]);
|
||||
}
|
||||
|
||||
ret = nrLDPC_decoder_offload(p_decParams, harq_pid,
|
||||
ULSCH_id,r,
|
||||
pusch_pdu->pusch_data.rv_index,
|
||||
harq_process->F,
|
||||
E,
|
||||
Qm,
|
||||
(int8_t*)&pl_ol128[0],
|
||||
llrProcBuf, 1);
|
||||
if (ret<0) {
|
||||
LOG_E(PHY,"ulsch_decoding.c: Problem in LDPC decoder offload\n");
|
||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else{
|
||||
K_bits_F = Kr-harq_process->F;
|
||||
|
||||
t_nrLDPC_time_stats procTime = {0};
|
||||
t_nrLDPC_time_stats* p_procTime = &procTime ;
|
||||
/// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1)
|
||||
int16_t harq_e[3*8448];
|
||||
|
||||
nr_deinterleaving_ldpc(E,
|
||||
Qm,
|
||||
harq_e,
|
||||
ulsch_llr+r_offset);
|
||||
|
||||
if (nr_rate_matching_ldpc_rx(pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes,
|
||||
p_decParams->BG,
|
||||
p_decParams->Z,
|
||||
harq_process->d[r],
|
||||
harq_e,
|
||||
harq_process->C,
|
||||
pusch_pdu->pusch_data.rv_index,
|
||||
harq_process->new_rx,
|
||||
E,
|
||||
harq_process->F,
|
||||
Kr-harq_process->F-2*(p_decParams->Z))==-1) {
|
||||
|
||||
LOG_E(PHY,"ulsch_decoding.c: Problem in rate_matching\n");
|
||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//set first 2*Z_c bits to zeros
|
||||
memset(&z[0],0,2*harq_process->Z*sizeof(int16_t));
|
||||
//set Filler bits
|
||||
memset((&z[0]+K_bits_F),127,harq_process->F*sizeof(int16_t));
|
||||
//Move coded bits before filler bits
|
||||
memcpy((&z[0]+2*harq_process->Z),harq_process->d[r],(K_bits_F-2*harq_process->Z)*sizeof(int16_t));
|
||||
//skip filler bits
|
||||
memcpy((&z[0]+Kr),harq_process->d[r]+(Kr-2*harq_process->Z),(kc*harq_process->Z-Kr)*sizeof(int16_t));
|
||||
//Saturate coded bits before decoding into 8 bits values
|
||||
for (i=0, j=0; j < ((kc*harq_process->Z)>>4)+1; i+=2, j++)
|
||||
{
|
||||
pl[j] = _mm_packs_epi16(pv[i],pv[i+1]);
|
||||
}
|
||||
|
||||
no_iteration_ldpc = nrLDPC_decoder(p_decParams,
|
||||
(int8_t*)&pl[0],
|
||||
llrProcBuf,
|
||||
p_procTime);
|
||||
|
||||
}
|
||||
|
||||
for (int m=0; m < Kr>>3; m ++) {
|
||||
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
||||
}
|
||||
|
||||
if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) {
|
||||
#ifdef PRINT_CRC_CHECK
|
||||
LOG_I(PHY, "Segment %d CRC OK\n",r);
|
||||
#endif
|
||||
no_iteration_ldpc = 2;
|
||||
} else {
|
||||
#ifdef PRINT_CRC_CHECK
|
||||
LOG_I(PHY, "segment %d CRC NOK\n",r);
|
||||
#endif
|
||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||
}
|
||||
//}
|
||||
|
||||
r_offset += E;
|
||||
|
||||
/*for (int k=0;k<8;k++)
|
||||
{
|
||||
printf("output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
||||
printf("llrprocbuf [%d] = %x adr %p\n", k, llrProcBuf[k], llrProcBuf+k);
|
||||
}
|
||||
*/
|
||||
}
|
||||
else{
|
||||
dtx_det = 0;
|
||||
no_iteration_ldpc = ulsch->max_ldpc_iterations+1;
|
||||
}
|
||||
bool decodeSuccess = (no_iteration_ldpc <= ulsch->max_ldpc_iterations);
|
||||
if (decodeSuccess) {
|
||||
memcpy(harq_process->b+offset,
|
||||
harq_process->c[r],
|
||||
Kr_bytes - (harq_process->F>>3) -((harq_process->C>1)?3:0));
|
||||
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||
harq_process->processedSegments++;
|
||||
}
|
||||
else {
|
||||
LOG_D(PHY,"uplink segment error %d/%d\n",r,harq_process->C);
|
||||
LOG_D(PHY, "ULSCH %d in error\n",ULSCH_id);
|
||||
break; //don't even attempt to decode other segments
|
||||
}
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
|
||||
|
||||
if ((harq_process->processedSegments==(harq_process->C))) {
|
||||
LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
|
||||
phy_vars_gNB->Mod_id,harq_process->slot,harq_process->TBS);
|
||||
harq_process->status = SCH_IDLE;
|
||||
harq_process->round = 0;
|
||||
ulsch->harq_mask &= ~(1 << harq_pid);
|
||||
|
||||
LOG_D(PHY, "ULSCH received ok \n");
|
||||
nr_fill_indication(phy_vars_gNB,harq_process->frame, harq_process->slot, ULSCH_id, harq_pid, 0,0);
|
||||
|
||||
} else {
|
||||
LOG_D(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n",
|
||||
phy_vars_gNB->Mod_id, harq_process->frame, harq_process->slot,
|
||||
harq_pid,harq_process->status, harq_process->round,harq_process->TBS,r);
|
||||
harq_process->handled = 1;
|
||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||
LOG_D(PHY, "ULSCH %d in error\n",ULSCH_id);
|
||||
nr_fill_indication(phy_vars_gNB,harq_process->frame, harq_process->slot, ULSCH_id, harq_pid, 1,0);
|
||||
}
|
||||
ulsch->last_iteration_cnt = no_iteration_ldpc;
|
||||
}
|
||||
|
||||
else {
|
||||
dtx_det = 0;
|
||||
void (*nr_processULSegment_ptr)(void*) = &nr_processULSegment;
|
||||
|
||||
for (r=0; r<harq_process->C; r++) {
|
||||
|
||||
E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
|
||||
|
||||
union ldpcReqUnion id = {.s={ulsch->rnti,frame,nr_tti_rx,0,0}};
|
||||
notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(ldpcDecode_t), id.p, &phy_vars_gNB->respDecode, nr_processULSegment_ptr);
|
||||
ldpcDecode_t * rdata=(ldpcDecode_t *) NotifiedFifoData(req);
|
||||
@@ -581,5 +768,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,12 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "PHY/CODING/nrSmallBlock/nr_small_block_defs.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
@@ -54,9 +56,9 @@ void free_gNB_srs(NR_gNB_SRS_t *srs)
|
||||
free_and_zero(srs);
|
||||
}
|
||||
|
||||
int nr_find_srs(uint16_t rnti,
|
||||
int frame,
|
||||
int slot,
|
||||
int nr_find_srs(rnti_t rnti,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
PHY_VARS_gNB *gNB) {
|
||||
|
||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
||||
@@ -78,8 +80,8 @@ int nr_find_srs(uint16_t rnti,
|
||||
}
|
||||
|
||||
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu) {
|
||||
|
||||
int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB);
|
||||
@@ -94,23 +96,28 @@ void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
frame_t frame,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) {
|
||||
|
||||
if(nr_srs_info->sc_list_length == 0) {
|
||||
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,"Calling %s function\n", __FUNCTION__);
|
||||
#endif
|
||||
|
||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
|
||||
uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot
|
||||
uint8_t l0 = frame_parms->symbols_per_slot - 1 - srs_pdu->time_start_position; // starting symbol in this slot
|
||||
uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size;
|
||||
const uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot
|
||||
const uint8_t l0 = frame_parms->symbols_per_slot - 1 - srs_pdu->time_start_position; // starting symbol in this slot
|
||||
const uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size;
|
||||
const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*NR_NB_SC_PER_RB;
|
||||
|
||||
const uint8_t N_ap = 1<<srs_pdu->num_ant_ports;
|
||||
const uint8_t N_symb_SRS = 1<<srs_pdu->num_symbols;
|
||||
const uint8_t K_TC = 2<<srs_pdu->comb_size;
|
||||
const uint16_t M_sc_b_SRS = srs_bandwidth_config[srs_pdu->config_index][srs_pdu->bandwidth_index][0] * NR_NB_SC_PER_RB/K_TC;
|
||||
|
||||
int32_t *rx_signal;
|
||||
bool no_srs_signal = true;
|
||||
@@ -119,32 +126,56 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||
rx_signal = &rxdataF[ant][symbol_offset];
|
||||
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] = rx_signal[nr_srs_info->sc_list[sc_idx]];
|
||||
|
||||
if (rx_signal[nr_srs_info->sc_list[sc_idx]] != 0) {
|
||||
no_srs_signal = false;
|
||||
}
|
||||
for (int p_index = 0; p_index < N_ap; p_index++) {
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"________ Rx antenna %i ________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,"::::::::::::: %i :::::::::::::\n", subcarrier_log/12);
|
||||
}
|
||||
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
|
||||
subcarrier_log,
|
||||
(int16_t)(srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]&0xFFFF),
|
||||
(int16_t)((srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]>>16)&0xFFFF));
|
||||
LOG_I(NR_PHY,"===== UE port %d --> gNB Rx antenna %i =====\n", p_index, ant);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
for (int l_line = 0; l_line < N_symb_SRS; l_line++) {
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,":::::::: OFDM symbol %d ::::::::\n", l0+l_line);
|
||||
#endif
|
||||
|
||||
uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][l_line];
|
||||
if (subcarrier>frame_parms->ofdm_symbol_size) {
|
||||
subcarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
uint16_t l_line_offset = l_line*frame_parms->ofdm_symbol_size;
|
||||
|
||||
for (int k = 0; k < M_sc_b_SRS; k++) {
|
||||
|
||||
srs_received_signal[ant][l_line_offset+subcarrier] = rx_signal[l_line_offset+subcarrier];
|
||||
|
||||
if (rx_signal[l_line_offset+subcarrier] != 0) {
|
||||
no_srs_signal = false;
|
||||
}
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
int subcarrier_log = subcarrier-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,"------------ %d ------------\n", subcarrier_log/12);
|
||||
}
|
||||
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
|
||||
subcarrier_log,
|
||||
(int16_t)(srs_received_signal[ant][l_line_offset+subcarrier]&0xFFFF),
|
||||
(int16_t)((srs_received_signal[ant][l_line_offset+subcarrier]>>16)&0xFFFF));
|
||||
#endif
|
||||
|
||||
// Subcarrier increment
|
||||
subcarrier += K_TC;
|
||||
if (subcarrier >= frame_parms->ofdm_symbol_size) {
|
||||
subcarrier=subcarrier-frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
} // for (int k = 0; k < M_sc_b_SRS; k++)
|
||||
} // for (int l_line = 0; l_line < N_symb_SRS; l_line++)
|
||||
} // for (int p_index = 0; p_index < N_ap; p_index++)
|
||||
} // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++)
|
||||
|
||||
if (no_srs_signal) {
|
||||
LOG_W(NR_PHY, "No SRS signal\n");
|
||||
@@ -152,4 +183,4 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,29 +57,6 @@ notifiedFIFO_t freeBlocks_dl;
|
||||
notifiedFIFO_elt_t *msgToPush_dl;
|
||||
int nbDlProcessing =0;
|
||||
|
||||
|
||||
static tpool_t pool_dl;
|
||||
//extern double cpuf;
|
||||
|
||||
void init_dlsch_tpool(uint8_t num_dlsch_threads) {
|
||||
char *params = NULL;
|
||||
|
||||
if( num_dlsch_threads==0) {
|
||||
params = calloc(1,2);
|
||||
memcpy(params,"N",1);
|
||||
}
|
||||
else {
|
||||
params = calloc(1,(num_dlsch_threads*3)+1);
|
||||
for (int i=0; i<num_dlsch_threads; i++) {
|
||||
memcpy(params+(i*3),"-1,",3);
|
||||
}
|
||||
}
|
||||
|
||||
initNamedTpool(params, &pool_dl, false,"dlsch");
|
||||
free(params);
|
||||
}
|
||||
|
||||
|
||||
void free_nr_ue_dlsch(NR_UE_DLSCH_t **dlschptr, uint16_t N_RB_DL) {
|
||||
|
||||
uint16_t a_segments = MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*NR_MAX_NB_LAYERS;
|
||||
@@ -207,7 +184,7 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
|
||||
|
||||
} else {
|
||||
if ( !last ) {
|
||||
int nb=abortTpoolJob(&(pool_dl), req->key);
|
||||
int nb=abortTpoolJob(&get_nrUE_params()->Tpool, req->key);
|
||||
nb+=abortNotifiedFIFOJob(nf_p, req->key);
|
||||
LOG_D(PHY,"downlink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb);
|
||||
LOG_D(PHY, "DLSCH %d in error\n",rdata->dlsch_id);
|
||||
@@ -606,7 +583,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
reset_meas(&rdata->ts_deinterleave);
|
||||
reset_meas(&rdata->ts_rate_unmatch);
|
||||
reset_meas(&rdata->ts_ldpc_decode);
|
||||
pushTpool(&(pool_dl),req);
|
||||
pushTpool(&get_nrUE_params()->Tpool,req);
|
||||
nbDecode++;
|
||||
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",nbDecode);
|
||||
r_offset += E;
|
||||
@@ -614,7 +591,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
for (r=0; r<nbDecode; r++) {
|
||||
notifiedFIFO_elt_t *req=pullTpool(&nf, &(pool_dl));
|
||||
notifiedFIFO_elt_t *req=pullTpool(&nf, &get_nrUE_params()->Tpool);
|
||||
if (req == NULL)
|
||||
break; // Tpool has been stopped
|
||||
bool last = false;
|
||||
|
||||
@@ -480,45 +480,45 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
nbSymb = dlsch1_harq->nb_symbols;
|
||||
pduBitmap = dlsch1_harq->pduBitmap;
|
||||
}
|
||||
|
||||
|
||||
/* Check for PTRS bitmap and process it respectively */
|
||||
if((pduBitmap & 0x1) && (type == PDSCH)) {
|
||||
nr_pdsch_ptrs_processing(ue,
|
||||
pdsch_vars,
|
||||
frame_parms,
|
||||
dlsch0_harq,
|
||||
dlsch1_harq,
|
||||
gNB_id,
|
||||
nr_slot_rx,
|
||||
symbol,
|
||||
(nb_rb_pdsch*12),
|
||||
dlsch[0]->rnti,rx_type);
|
||||
pdsch_vars,
|
||||
frame_parms,
|
||||
dlsch0_harq,
|
||||
dlsch1_harq,
|
||||
gNB_id,
|
||||
nr_slot_rx,
|
||||
symbol,
|
||||
(nb_rb_pdsch*12),
|
||||
dlsch[0]->rnti,rx_type);
|
||||
pdsch_vars[gNB_id]->dl_valid_re[symbol-1] -= pdsch_vars[gNB_id]->ptrs_re_per_slot[0][symbol];
|
||||
}
|
||||
|
||||
|
||||
/* at last symbol in a slot calculate LLR's for whole slot */
|
||||
if(symbol == (startSymbIdx + nbSymb -1)) {
|
||||
for(uint8_t i =startSymbIdx; i < (startSymbIdx+nbSymb);i++) {
|
||||
/* re evaluating the first symbol flag as LLR's are done in symbol loop */
|
||||
if(i == startSymbIdx && i < 3) {
|
||||
first_symbol_flag =1;
|
||||
first_symbol_flag =1;
|
||||
}
|
||||
else {
|
||||
first_symbol_flag=0;
|
||||
first_symbol_flag=0;
|
||||
}
|
||||
/* Calculate LLR's for each symbol */
|
||||
nr_dlsch_llr(pdsch_vars, frame_parms,
|
||||
rxdataF_comp_ptr, dl_ch_mag_ptr,
|
||||
dlsch0_harq, dlsch1_harq,
|
||||
rx_type, harq_pid,
|
||||
gNB_id, gNB_id_i,
|
||||
first_symbol_flag,
|
||||
i, nb_rb_pdsch,
|
||||
codeword_TB0, codeword_TB1,
|
||||
pdsch_vars[gNB_id]->dl_valid_re[i-1],
|
||||
nr_slot_rx, beamforming_mode);
|
||||
rxdataF_comp_ptr, dl_ch_mag_ptr,
|
||||
dlsch0_harq, dlsch1_harq,
|
||||
rx_type, harq_pid,
|
||||
gNB_id, gNB_id_i,
|
||||
first_symbol_flag,
|
||||
i, nb_rb_pdsch,
|
||||
codeword_TB0, codeword_TB1,
|
||||
pdsch_vars[gNB_id]->dl_valid_re[i-1],
|
||||
nr_slot_rx, beamforming_mode);
|
||||
}
|
||||
|
||||
|
||||
int dmrs_type = dlsch[0]->harq_processes[harq_pid]->dmrsConfigType;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint16_t dmrs_len = get_num_dmrs(dlsch[0]->harq_processes[harq_pid]->dlDmrsSymbPos);
|
||||
@@ -528,29 +528,29 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
nb_re_dmrs = 4*dlsch[0]->harq_processes[harq_pid]->n_dmrs_cdm_groups;
|
||||
}
|
||||
dlsch[0]->harq_processes[harq_pid]->G = nr_get_G(dlsch[0]->harq_processes[harq_pid]->nb_rb,
|
||||
dlsch[0]->harq_processes[harq_pid]->nb_symbols,
|
||||
nb_re_dmrs,
|
||||
dmrs_len,
|
||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||
dlsch[0]->harq_processes[harq_pid]->Nl);
|
||||
dlsch[0]->harq_processes[harq_pid]->nb_symbols,
|
||||
nb_re_dmrs,
|
||||
dmrs_len,
|
||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||
dlsch[0]->harq_processes[harq_pid]->Nl);
|
||||
nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr,
|
||||
dlsch[0]->harq_processes[harq_pid]->Nl,
|
||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||
dlsch[0]->harq_processes[harq_pid]->G,
|
||||
codeword_TB0,
|
||||
codeword_TB1,
|
||||
pdsch_vars[gNB_id]->layer_llr);
|
||||
dlsch[0]->harq_processes[harq_pid]->Nl,
|
||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||
dlsch[0]->harq_processes[harq_pid]->G,
|
||||
codeword_TB0,
|
||||
codeword_TB1,
|
||||
pdsch_vars[gNB_id]->layer_llr);
|
||||
}
|
||||
|
||||
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
|
||||
|
||||
// Please keep it: useful for debugging
|
||||
#ifdef DEBUG_PDSCH_RX
|
||||
char filename[50];
|
||||
uint8_t aa = 0;
|
||||
|
||||
|
||||
snprintf(filename, 50, "rxdataF0_symb_%d_nr_slot_rx_%d.m", symbol, nr_slot_rx);
|
||||
write_output(filename, "rxdataF0", &common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0], NR_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size, 1, 1);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user