Merge remote-tracking branch 'origin/develop' into ul-phr
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.
|
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
|
||||||
|
|
||||||
## Credits for source code openair3/GTPV1-U/nw-gtpv1u: ##
|
## Credits for source code openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c and nrLDPC_offload.h: ##
|
||||||
|
|
||||||
Amit Chawre <http://www.amitchawre.net/contact.html>: BSD 2-Clause Licence.
|
|
||||||
|
|
||||||
|
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") {
|
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 "./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 ."
|
sh "zip -r -qq localZip.zip ."
|
||||||
|
|
||||||
// Running astyle options on the list of modified files by the merge request
|
// here was an astyle formatting check, with corresponding messages. The same could be done with clang-format
|
||||||
// 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
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
echo "Git Branch is ${GIT_BRANCH}"
|
echo "Git Branch is ${GIT_BRANCH}"
|
||||||
echo "Git Commit is ${GIT_COMMIT}"
|
echo "Git Commit is ${GIT_COMMIT}"
|
||||||
@@ -132,9 +122,6 @@ pipeline {
|
|||||||
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
||||||
|
|
||||||
sh "zip -r -qq localZip.zip ."
|
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") {
|
stage ("Variant Builds") {
|
||||||
parallel {
|
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 {
|
post {
|
||||||
always {
|
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 "OAI Coding / Formatting Guideline Check script"
|
||||||
echo " Original Author: Raphael Defosseux"
|
echo " Original Author: Raphael Defosseux"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Requirement: astyle shall be installed"
|
|
||||||
echo ""
|
|
||||||
echo " By default (no options) the complete repository will be checked"
|
echo " By default (no options) the complete repository will be checked"
|
||||||
echo " In case of merge request, provided source and target branch,"
|
echo " In case of merge request, provided source and target branch,"
|
||||||
echo " the script will check only the modified files"
|
echo " the script will check only the modified files"
|
||||||
@@ -57,11 +55,10 @@ fi
|
|||||||
|
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
echo " ---- Checking the whole repository ----"
|
# in this file we previously had a list of files that were not properly
|
||||||
echo ""
|
# formatted. At the time of this MR, the Jenkinsfile expects this file, so
|
||||||
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`
|
# we simply produce an empty one
|
||||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
touch ./oai_rules_result.txt
|
||||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
|
||||||
|
|
||||||
# Testing Circular Dependencies protection
|
# 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
|
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_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_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_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 ]
|
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||||
then
|
then
|
||||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
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
|
# 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`
|
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
|
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 ]
|
if [ -f header-files-w-incorrect-define.txt ]
|
||||||
then
|
then
|
||||||
rm -f header-files-w-incorrect-define.txt
|
rm -f header-files-w-incorrect-define.txt
|
||||||
@@ -178,13 +171,6 @@ do
|
|||||||
EXT="${filename##*.}"
|
EXT="${filename##*.}"
|
||||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||||
then
|
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
|
# Testing if explicit GNU GPL license banner
|
||||||
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
|
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
|
||||||
if [ $GNU_EXCEPTION -eq 0 ]
|
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_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_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_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 ]
|
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||||
then
|
then
|
||||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||||
@@ -215,9 +201,10 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f header-files-w-incorrect-define-tmp.txt
|
rm -f header-files-w-incorrect-define-tmp.txt
|
||||||
echo ""
|
|
||||||
echo " ----------------------------------------------------------"
|
# in this script we previously produced a list of files that were not properly
|
||||||
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
|
# formatted. At the time of this MR, the Jenkinsfile expects this file, so
|
||||||
echo $NB_TO_FORMAT > ./oai_rules_result.txt
|
# we simply produce an empty file
|
||||||
|
touch ./oai_rules_result.txt
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -579,9 +579,17 @@ class Containerize():
|
|||||||
lUserName = self.eNB2UserName
|
lUserName = self.eNB2UserName
|
||||||
lPassWord = self.eNB2Password
|
lPassWord = self.eNB2Password
|
||||||
lSsh.open(lIpAddr, lUserName, lPassWord)
|
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||||
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
||||||
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
|
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)
|
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()
|
lSsh.close()
|
||||||
|
|
||||||
# Going to the Test Server
|
# Going to the Test Server
|
||||||
@@ -599,15 +607,26 @@ class Containerize():
|
|||||||
lPassWord = self.eNB2Password
|
lPassWord = self.eNB2Password
|
||||||
lSsh.open(lIpAddr, lUserName, lPassWord)
|
lSsh.open(lIpAddr, lUserName, lPassWord)
|
||||||
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
|
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 rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
|
||||||
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
|
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)
|
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()
|
lSsh.close()
|
||||||
|
|
||||||
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
|
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
|
||||||
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
|
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
|
||||||
|
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
return True
|
||||||
|
|
||||||
def DeployObject(self, HTML, EPC):
|
def DeployObject(self, HTML, EPC):
|
||||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
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())
|
result = re.search('service=(?P<svc_name>[a-zA-Z0-9\_]+)', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
svcName = result.group('svc_name')
|
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
|
# Checking Status
|
||||||
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
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(unhealthyNb) + ' unhealthy container(s)')
|
||||||
logging.debug(' -- ' + str(startingNb) + ' still starting 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
|
status = False
|
||||||
if healthyNb == 1:
|
if healthyNb == 1:
|
||||||
cnt = 0
|
cnt = 0
|
||||||
@@ -697,11 +719,12 @@ class Containerize():
|
|||||||
status = True
|
status = True
|
||||||
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
|
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
|
||||||
time.sleep(10)
|
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()
|
mySSH.close()
|
||||||
|
|
||||||
self.testCase_id = HTML.testCase_id
|
|
||||||
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
|
|
||||||
|
|
||||||
if status:
|
if status:
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
else:
|
else:
|
||||||
|
|||||||
+62
-23
@@ -56,7 +56,6 @@ class PhySim:
|
|||||||
self.__workSpacePath=''
|
self.__workSpacePath=''
|
||||||
self.__buildLogFile='compile_phy_sim.log'
|
self.__buildLogFile='compile_phy_sim.log'
|
||||||
self.__runLogFile=''
|
self.__runLogFile=''
|
||||||
self.__runResults=[]
|
|
||||||
self.__runLogPath='phy_sim_logs'
|
self.__runLogPath='phy_sim_logs'
|
||||||
|
|
||||||
|
|
||||||
@@ -64,20 +63,20 @@ class PhySim:
|
|||||||
#PRIVATE Methods
|
#PRIVATE Methods
|
||||||
#-----------------
|
#-----------------
|
||||||
|
|
||||||
def __CheckResults_PhySim(self,HTML,CONST,testcase_id):
|
def __CheckResults_LDPCTest(self,HTML,CONST,testcase_id):
|
||||||
mySSH = sshconnection.SSHConnection()
|
mySSH = sshconnection.SSHConnection()
|
||||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||||
#retrieve run log file and store it locally$
|
#retrieve run log file and store it locally$
|
||||||
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
|
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
#parse results looking for Encoding and Decoding mean values
|
#parse results looking for Encoding and Decoding mean values
|
||||||
self.__runResults=[]
|
runResults=[]
|
||||||
with open(self.__runLogFile) as f:
|
with open(self.__runLogFile) as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if 'mean' in line:
|
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
|
#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
|
#once parsed move the local logfile to its folder for tidiness
|
||||||
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
|
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
|
||||||
@@ -89,6 +88,38 @@ class PhySim:
|
|||||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
||||||
return HTML
|
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):
|
def __CheckBuild_PhySim(self, HTML, CONST):
|
||||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
||||||
@@ -100,21 +131,16 @@ class PhySim:
|
|||||||
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
#check build result from local compile log file
|
#check build result from local compile log file
|
||||||
buildStatus=False
|
|
||||||
with open(self.__buildLogFile) as f:
|
with open(self.__buildLogFile) as f:
|
||||||
#nr_prachsim is the last compile step
|
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
|
||||||
if 'nr_prachsim compiled' in f.read():
|
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
|
||||||
buildStatus=True
|
self.exitStatus=0
|
||||||
#update HTML based on build status
|
return HTML
|
||||||
if buildStatus:
|
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
||||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC')
|
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||||
self.exitStatus=0
|
HTML.CreateHtmlTabFooter(False)
|
||||||
else:
|
#exitStatus=1 will do a sys.exit in main
|
||||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
self.exitStatus = 1
|
||||||
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
|
return HTML
|
||||||
|
|
||||||
|
|
||||||
@@ -163,8 +189,7 @@ class PhySim:
|
|||||||
mySSH.command('source oaienv', '\$', 5)
|
mySSH.command('source oaienv', '\$', 5)
|
||||||
mySSH.command('cd cmake_targets', '\$', 5)
|
mySSH.command('cd cmake_targets', '\$', 5)
|
||||||
mySSH.command('mkdir -p log', '\$', 5)
|
mySSH.command('mkdir -p log', '\$', 5)
|
||||||
mySSH.command('chmod 777 log', '\$', 5)
|
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
|
||||||
mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500)
|
|
||||||
|
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
#check build status and update HTML object
|
#check build status and update HTML object
|
||||||
@@ -173,7 +198,8 @@ class PhySim:
|
|||||||
return lHTML
|
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
|
#create run logs folder locally
|
||||||
os.system('mkdir -p ./'+self.__runLogPath)
|
os.system('mkdir -p ./'+self.__runLogPath)
|
||||||
#log file is tc_<testcase_id>.log remotely
|
#log file is tc_<testcase_id>.log remotely
|
||||||
@@ -187,5 +213,18 @@ class PhySim:
|
|||||||
mySSH.close()
|
mySSH.close()
|
||||||
#return updated HTML to main
|
#return updated HTML to main
|
||||||
lHTML = cls_oai_html.HTMLManagement()
|
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
|
return lHTML
|
||||||
|
|||||||
@@ -321,20 +321,6 @@ class StaticCodeAnalysis():
|
|||||||
if ret is not None:
|
if ret is not None:
|
||||||
analyzed = True
|
analyzed = True
|
||||||
if analyzed:
|
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:
|
if re.search('=== Files with incorrect define protection ===', str(line)) is not None:
|
||||||
circularHeaderDependency = True
|
circularHeaderDependency = True
|
||||||
if circularHeaderDependency:
|
if circularHeaderDependency:
|
||||||
|
|||||||
@@ -214,7 +214,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -204,8 +204,7 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
prach_dtx_threshold = 200;
|
||||||
prach_dtx_threshold = 120;
|
|
||||||
pucch0_dtx_threshold = 150;
|
pucch0_dtx_threshold = 150;
|
||||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,7 +231,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
pucch0_dtx_threshold = 150;
|
pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -181,7 +181,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
pucch0_dtx_threshold = 80;
|
pucch0_dtx_threshold = 80;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
# pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,7 +234,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
# pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,7 +233,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
# pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 200;
|
||||||
# pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -235,7 +235,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
# pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 8;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 6;
|
|
||||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
thread_pool_size = 6;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ L1s = (
|
|||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
pusch_proc_threads = 8;
|
pusch_proc_threads = 8;
|
||||||
|
prach_dtx_threshold = 200;
|
||||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||||
astyle \
|
|
||||||
gawk \
|
gawk \
|
||||||
git
|
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 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 /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 ===" && \
|
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"
|
/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')
|
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('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('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)
|
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
|
||||||
if re.search('start-mini-as-ue', self.cfgDeploy):
|
if re.search('start-mini-as-ue', self.cfgDeploy):
|
||||||
dFile = 'docker-compose-mini-nrf-asue.yaml'
|
dFile = 'docker-compose-mini-nrf-asue.yaml'
|
||||||
@@ -537,7 +537,7 @@ class EPCManagement():
|
|||||||
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
|
||||||
|
|
||||||
logging.debug('Terminating OAI CN5G')
|
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('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|||||||
+22
-5
@@ -457,9 +457,18 @@ def GetParametersFromXML(action):
|
|||||||
if (string_field is not None):
|
if (string_field is not None):
|
||||||
CONTAINERS.testSvrId = string_field
|
CONTAINERS.testSvrId = string_field
|
||||||
|
|
||||||
else: # ie action == 'Run_PhySim':
|
elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest':
|
||||||
ldpc.runargs = test.findtext('physim_run_args')
|
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
|
#check if given test is in list
|
||||||
#it is in list if one of the strings in 'list' is at the beginning of 'test'
|
#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)
|
HTML=ldpc.Build_PhySim(HTML,CONST)
|
||||||
if ldpc.exitStatus==1:
|
if ldpc.exitStatus==1:
|
||||||
RAN.prematureExit = True
|
RAN.prematureExit = True
|
||||||
elif action == 'Run_PhySim':
|
elif action == 'Run_LDPCTest':
|
||||||
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
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':
|
elif action == 'Build_Image':
|
||||||
CONTAINERS.BuildImage(HTML)
|
CONTAINERS.BuildImage(HTML)
|
||||||
elif action == 'Build_Proxy':
|
elif action == 'Build_Proxy':
|
||||||
CONTAINERS.BuildProxy(HTML)
|
CONTAINERS.BuildProxy(HTML)
|
||||||
elif action == 'Copy_Image_to_Test':
|
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':
|
elif action == 'Deploy_Object':
|
||||||
CONTAINERS.DeployObject(HTML, EPC)
|
CONTAINERS.DeployObject(HTML, EPC)
|
||||||
if CONTAINERS.exitStatus==1:
|
if CONTAINERS.exitStatus==1:
|
||||||
|
|||||||
@@ -463,106 +463,75 @@ function report_build {
|
|||||||
echo " </table>" >> ./build_results.html
|
echo " </table>" >> ./build_results.html
|
||||||
echo " <h2>Build Summary</h2>" >> ./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
|
then
|
||||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
NB_FILES_IN_ERROR=`wc -l ./header-files-w-incorrect-define.txt | sed -e "s@ .*@@"`
|
||||||
NB_FILES=`cat ./oai_rules_result.txt`
|
if [ $NB_FILES_IN_ERROR -eq 0 ]
|
||||||
if [ $NB_FILES = "0" ]
|
then
|
||||||
then
|
|
||||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
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>No Issue for CIRCULAR DEPENDENCY PROTECTION in modified files</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 [ $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
|
echo " </div>" >> ./build_results.html
|
||||||
else
|
else
|
||||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
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_IN_ERROR} modified files MAY NOT HAVE CIRCULAR DEPENDENCY PROTECTION</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 [ $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 " </div>" >> ./build_results.html
|
||||||
fi
|
echo " <button data-toggle=\"collapse\" data-target=\"#oai-circular-details\">More details on circular dependency protection check</button>" >> ./build_results.html
|
||||||
if [ -f ./oai_rules_result_list.txt ]
|
echo " <div id=\"oai-circular-details\" class=\"collapse\">" >> ./build_results.html
|
||||||
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 " <table border = 1>" >> ./build_results.html
|
echo " <table border = 1>" >> ./build_results.html
|
||||||
echo " <tr>" >> ./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
|
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 " </table>" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
echo " <br>" >> ./build_results.html
|
echo " <br>" >> ./build_results.html
|
||||||
fi
|
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
|
then
|
||||||
NB_FILES_IN_ERROR=`wc -l ./header-files-w-incorrect-define.txt | sed -e "s@ .*@@"`
|
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||||
if [ $NB_FILES_IN_ERROR -eq 0 ]
|
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
|
||||||
then
|
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 class=\"alert alert-success\">" >> ./build_results.html
|
echo " </div>" >> ./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
|
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-gpl\">More details on GNU GPL license banner issue</button>" >> ./build_results.html
|
||||||
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 id=\"oai-license-gpl\" class=\"collapse\">" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " <table border = 1>" >> ./build_results.html
|
||||||
else
|
echo " <tr>" >> ./build_results.html
|
||||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./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
|
echo " </tr>" >> ./build_results.html
|
||||||
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
|
awk '{print " <tr><td>"$1"</td></tr>"}' ./files-w-gnu-gpl-license-banner.txt >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " </table>" >> ./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>" >> ./build_results.html
|
||||||
echo " <div id=\"oai-circular-details\" class=\"collapse\">" >> ./build_results.html
|
echo " <br>" >> ./build_results.html
|
||||||
echo " <table border = 1>" >> ./build_results.html
|
|
||||||
echo " <tr>" >> ./build_results.html
|
|
||||||
echo " <th bgcolor = \"lightcyan\" >Potential Issue</th>" >> ./build_results.html
|
|
||||||
echo " <th bgcolor = \"lightcyan\" >Impacted File</th>" >> ./build_results.html
|
|
||||||
echo " <th bgcolor = \"lightcyan\" >Incorrect Macro</th>" >> ./build_results.html
|
|
||||||
echo " </tr>" >> ./build_results.html
|
|
||||||
awk '{if($0 ~/error in/){print " <tr><td>error in declaration</td><td>"$4"</td><td>"$5"</td></tr>"};if($0 ~/files with same/){print " <tr><td>files with same #define</td><td>"$5"</td><td>"$6"</td></tr>"}}' ./header-files-w-incorrect-define.txt >> ./build_results.html
|
|
||||||
echo " </table>" >> ./build_results.html
|
|
||||||
echo " </div>" >> ./build_results.html
|
|
||||||
echo " <br>" >> ./build_results.html
|
|
||||||
fi
|
|
||||||
fi
|
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
|
then
|
||||||
NB_FILES_IN_ERROR=`wc -l ./files-w-gnu-gpl-license-banner.txt | sed -e "s@ .*@@"`
|
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||||
if [ $NB_FILES_IN_ERROR -ne 0 ]
|
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a suspect license banner</strong>" >> ./build_results.html; fi
|
||||||
then
|
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 class=\"alert alert-danger\">" >> ./build_results.html
|
echo " </div>" >> ./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
|
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-suspect\">More details on suspect banner files</button>" >> ./build_results.html
|
||||||
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 id=\"oai-license-suspect\" class=\"collapse\">" >> ./build_results.html
|
||||||
echo " </div>" >> ./build_results.html
|
echo " <table border = 1>" >> ./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 " <tr>" >> ./build_results.html
|
||||||
echo " <div id=\"oai-license-gpl\" class=\"collapse\">" >> ./build_results.html
|
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
||||||
echo " <table border = 1>" >> ./build_results.html
|
echo " </tr>" >> ./build_results.html
|
||||||
echo " <tr>" >> ./build_results.html
|
awk '{print " <tr><td>"$1"</td></tr>"}' ././files-w-suspect-banner.txt >> ./build_results.html
|
||||||
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
echo " </table>" >> ./build_results.html
|
||||||
echo " </tr>" >> ./build_results.html
|
echo " </div>" >> ./build_results.html
|
||||||
awk '{print " <tr><td>"$1"</td></tr>"}' ./files-w-gnu-gpl-license-banner.txt >> ./build_results.html
|
echo " <br>" >> ./build_results.html
|
||||||
echo " </table>" >> ./build_results.html
|
|
||||||
echo " </div>" >> ./build_results.html
|
|
||||||
echo " <br>" >> ./build_results.html
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -f ./files-w-suspect-banner.txt ]
|
|
||||||
then
|
|
||||||
NB_FILES_IN_ERROR=`wc -l ./files-w-suspect-banner.txt | sed -e "s@ .*@@"`
|
|
||||||
if [ $NB_FILES_IN_ERROR -ne 0 ]
|
|
||||||
then
|
|
||||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
|
||||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a suspect license banner</strong>" >> ./build_results.html; fi
|
|
||||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository HAVE a suspect license banner</strong>" >> ./build_results.html; fi
|
|
||||||
echo " </div>" >> ./build_results.html
|
|
||||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-suspect\">More details on suspect banner files</button>" >> ./build_results.html
|
|
||||||
echo " <div id=\"oai-license-suspect\" class=\"collapse\">" >> ./build_results.html
|
|
||||||
echo " <table border = 1>" >> ./build_results.html
|
|
||||||
echo " <tr>" >> ./build_results.html
|
|
||||||
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
|
||||||
echo " </tr>" >> ./build_results.html
|
|
||||||
awk '{print " <tr><td>"$1"</td></tr>"}' ././files-w-suspect-banner.txt >> ./build_results.html
|
|
||||||
echo " </table>" >> ./build_results.html
|
|
||||||
echo " </div>" >> ./build_results.html
|
|
||||||
echo " <br>" >> ./build_results.html
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
- Build_Proxy
|
- Build_Proxy
|
||||||
- Build_PhySim
|
- Build_PhySim
|
||||||
- Run_PhySim
|
- Run_LDPCTest
|
||||||
|
- Run_NRulsimTest
|
||||||
- Build_eNB
|
- Build_eNB
|
||||||
- WaitEndBuild_eNB
|
- WaitEndBuild_eNB
|
||||||
- Initialize_eNB
|
- Initialize_eNB
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<testCase id="090102">
|
<testCase id="090102">
|
||||||
<class>Initialize_OAI_UE</class>
|
<class>Initialize_OAI_UE</class>
|
||||||
<desc>Initialize NR UE USRP</desc>
|
<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>
|
<air_interface>NR</air_interface>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<testCase id="090104">
|
<testCase id="090104">
|
||||||
<class>Initialize_OAI_UE</class>
|
<class>Initialize_OAI_UE</class>
|
||||||
<desc>Initialize NR UE USRP</desc>
|
<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>
|
<air_interface>NR</air_interface>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -26,132 +26,125 @@
|
|||||||
<htmlTabName>Test-ldpc-GPU</htmlTabName>
|
<htmlTabName>Test-ldpc-GPU</htmlTabName>
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
<repeatCount>1</repeatCount>
|
<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>
|
<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">
|
<testCase id="000002">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 3872 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 3872 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000003">
|
<testCase id="000003">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 3872 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 3872 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000004">
|
<testCase id="000004">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 4224 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 4224 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000005">
|
<testCase id="000005">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 4224 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 4224 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000006">
|
<testCase id="000006">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 4576 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 4576 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000007">
|
<testCase id="000007">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 4576 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 4576 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000008">
|
<testCase id="000008">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 4928 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 4928 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000009">
|
<testCase id="000009">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 4928 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 4928 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000010">
|
<testCase id="000010">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 5280 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 5280 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000011">
|
<testCase id="000011">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 5280 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 5280 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000012">
|
<testCase id="000012">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 5632 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 5632 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000013">
|
<testCase id="000013">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 5632 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 5632 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000014">
|
<testCase id="000014">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 6336 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 6336 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000015">
|
<testCase id="000015">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 6336 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 6336 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000016">
|
<testCase id="000016">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 7040 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 7040 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000017">
|
<testCase id="000017">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 7040 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 7040 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000018">
|
<testCase id="000018">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 7744 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 7744 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000019">
|
<testCase id="000019">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 7744 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 7744 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000020">
|
<testCase id="000020">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with CPU</desc>
|
<desc>Run LDPC Test with CPU</desc>
|
||||||
<physim_run_args>-l 8448 -s10 -n100</physim_run_args>
|
<physim_run_args>-l 8448 -s10 -n100</physim_run_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000021">
|
<testCase id="000021">
|
||||||
<class>Run_PhySim</class>
|
<class>Run_LDPCTest</class>
|
||||||
<desc>Run LDPC Test with GPU</desc>
|
<desc>Run LDPC Test with GPU</desc>
|
||||||
<physim_run_args>-l 8448 -s10 -n100 -G 1</physim_run_args>
|
<physim_run_args>-l 8448 -s10 -n100 -G 1</physim_run_args>
|
||||||
</testCase>
|
</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:
|
services:
|
||||||
oai-nrf:
|
oai-nrf:
|
||||||
container_name: "l2sim-oai-nrf"
|
container_name: "l2sim-oai-nrf"
|
||||||
image: oai-nrf:latest
|
image: oai-nrf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||||
@@ -42,7 +42,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.131
|
ipv4_address: 192.168.71.131
|
||||||
oai-amf:
|
oai-amf:
|
||||||
container_name: "l2sim-oai-amf"
|
container_name: "l2sim-oai-amf"
|
||||||
image: oai-amf:latest
|
image: oai-amf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/paris
|
- TZ=Europe/paris
|
||||||
- INSTANCE=0
|
- INSTANCE=0
|
||||||
@@ -110,7 +110,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.132
|
ipv4_address: 192.168.71.132
|
||||||
oai-smf:
|
oai-smf:
|
||||||
container_name: "l2sim-oai-smf"
|
container_name: "l2sim-oai-smf"
|
||||||
image: oai-smf:latest
|
image: oai-smf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
- INSTANCE=0
|
- INSTANCE=0
|
||||||
@@ -156,7 +156,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.133
|
ipv4_address: 192.168.71.133
|
||||||
oai-spgwu:
|
oai-spgwu:
|
||||||
container_name: "l2sim-oai-spgwu"
|
container_name: "l2sim-oai-spgwu"
|
||||||
image: oai-spgwu-tiny:latest
|
image: oai-spgwu-tiny:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
- PID_DIRECTORY=/var/run
|
- PID_DIRECTORY=/var/run
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ version: '3.8'
|
|||||||
services:
|
services:
|
||||||
oai-nrf:
|
oai-nrf:
|
||||||
container_name: "rfsim5g-oai-nrf"
|
container_name: "rfsim5g-oai-nrf"
|
||||||
image: oai-nrf:latest
|
image: oai-nrf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||||
@@ -42,7 +42,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.131
|
ipv4_address: 192.168.71.131
|
||||||
oai-amf:
|
oai-amf:
|
||||||
container_name: "rfsim5g-oai-amf"
|
container_name: "rfsim5g-oai-amf"
|
||||||
image: oai-amf:latest
|
image: oai-amf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/paris
|
- TZ=Europe/paris
|
||||||
- INSTANCE=0
|
- INSTANCE=0
|
||||||
@@ -110,7 +110,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.132
|
ipv4_address: 192.168.71.132
|
||||||
oai-smf:
|
oai-smf:
|
||||||
container_name: "rfsim5g-oai-smf"
|
container_name: "rfsim5g-oai-smf"
|
||||||
image: oai-smf:latest
|
image: oai-smf:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
- INSTANCE=0
|
- INSTANCE=0
|
||||||
@@ -156,7 +156,7 @@ services:
|
|||||||
ipv4_address: 192.168.71.133
|
ipv4_address: 192.168.71.133
|
||||||
oai-spgwu:
|
oai-spgwu:
|
||||||
container_name: "rfsim5g-oai-spgwu"
|
container_name: "rfsim5g-oai-spgwu"
|
||||||
image: oai-spgwu-tiny:latest
|
image: oai-spgwu-tiny:august-dev
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
- PID_DIRECTORY=/var/run
|
- PID_DIRECTORY=/var/run
|
||||||
|
|||||||
@@ -828,6 +828,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")
|
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
|
||||||
|
|
||||||
Message("DEADLINE_SCHEDULER flag is ${DEADLINE_SCHEDULER}")
|
Message("DEADLINE_SCHEDULER flag is ${DEADLINE_SCHEDULER}")
|
||||||
@@ -2772,7 +2797,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 ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries (nr-softmodem ${T_LIB})
|
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
|
# nr-uesoftmodem is UE implementation
|
||||||
#######################################
|
#######################################
|
||||||
@@ -2818,6 +2847,7 @@ if (CUDA_FOUND)
|
|||||||
add_dependencies( nr-uesoftmodem ldpc_cuda)
|
add_dependencies( nr-uesoftmodem ldpc_cuda)
|
||||||
add_dependencies( nr-softmodem ldpc_cuda)
|
add_dependencies( nr-softmodem ldpc_cuda)
|
||||||
endif (CUDA_FOUND)
|
endif (CUDA_FOUND)
|
||||||
|
|
||||||
###################################"
|
###################################"
|
||||||
# Addexecutables for tests
|
# Addexecutables for tests
|
||||||
####################################
|
####################################
|
||||||
@@ -2981,6 +3011,11 @@ add_executable(nr_ulsim
|
|||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(T1_OFFLOAD_FOUND)
|
||||||
|
add_dependencies( nr_ulsim ldpc_offload)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(nr_ulsim
|
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
|
-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
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||||
|
|||||||
@@ -237,8 +237,9 @@ compilations() {
|
|||||||
echo_error "$2 compilation failed"
|
echo_error "$2 compilation failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -s $3 ] ; then
|
if [ -s "$3" ] ; then
|
||||||
cp $3 $4
|
rm -f "$4"
|
||||||
|
ln -s "$PWD/$3" "$4"
|
||||||
echo_success "$2 compiled"
|
echo_success "$2 compiled"
|
||||||
check_warnings "$dlog/$2.$REL.txt"
|
check_warnings "$dlog/$2.$REL.txt"
|
||||||
else
|
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
|
// 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];
|
log_mem_cnt_t log_mem_d[2];
|
||||||
int log_mem_flag=0;
|
int log_mem_flag=0;
|
||||||
int log_mem_multi=1;
|
int log_mem_multi=1;
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ typedef struct {
|
|||||||
#define MATLAB_CSHORT_BRACKET3 15
|
#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);
|
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 */
|
/*----------------macro definitions for reading log configuration from the config module */
|
||||||
#define CONFIG_STRING_LOG_PREFIX "log_config"
|
#define CONFIG_STRING_LOG_PREFIX "log_config"
|
||||||
|
|||||||
@@ -45,9 +45,7 @@ extern "C" {
|
|||||||
std::vector<MessageDef *> message_queue;
|
std::vector<MessageDef *> message_queue;
|
||||||
std::map<long,timer_elm_t> timer_map;
|
std::map<long,timer_elm_t> timer_map;
|
||||||
uint64_t next_timer=UINT64_MAX;
|
uint64_t next_timer=UINT64_MAX;
|
||||||
struct epoll_event *events =NULL;
|
|
||||||
int nb_fd_epoll=0;
|
int nb_fd_epoll=0;
|
||||||
int nb_events=0;
|
|
||||||
int epoll_fd=-1;
|
int epoll_fd=-1;
|
||||||
int sem_fd=-1;
|
int sem_fd=-1;
|
||||||
} task_list_t;
|
} task_list_t;
|
||||||
@@ -167,8 +165,6 @@ extern "C" {
|
|||||||
struct epoll_event event;
|
struct epoll_event event;
|
||||||
task_list_t *t=tasks[task_id];
|
task_list_t *t=tasks[task_id];
|
||||||
t->nb_fd_epoll++;
|
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.events = EPOLLIN | EPOLLERR;
|
||||||
event.data.u64 = 0;
|
event.data.u64 = 0;
|
||||||
event.data.fd = fd;
|
event.data.fd = fd;
|
||||||
@@ -185,10 +181,10 @@ extern "C" {
|
|||||||
t->nb_fd_epoll--;
|
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];
|
task_list_t *t=tasks[task_id];
|
||||||
uint64_t current_time=0;
|
uint64_t current_time=0;
|
||||||
|
int nb_events;
|
||||||
do {
|
do {
|
||||||
if ( t->next_timer != UINT64_MAX ) {
|
if ( t->next_timer != UINT64_MAX ) {
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
@@ -234,40 +230,41 @@ extern "C" {
|
|||||||
|
|
||||||
pthread_mutex_unlock(&t->queue_cond_lock);
|
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);
|
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);
|
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",
|
"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));
|
itti_get_task_name(task_id), t->nb_fd_epoll,
|
||||||
LOG_D(ITTI,"receive on %d descriptors for %s\n", t->nb_events, itti_get_task_name(task_id));
|
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 */
|
/* No data to read -> return */
|
||||||
return 0;
|
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 */
|
/* Check if there is an event for ITTI for the event fd */
|
||||||
if ((t->events[i].events & EPOLLIN) &&
|
if ((events[i].events & EPOLLIN) &&
|
||||||
(t->events[i].data.fd == t->sem_fd)) {
|
(events[i].data.fd == t->sem_fd)) {
|
||||||
eventfd_t sem_counter;
|
eventfd_t sem_counter;
|
||||||
/* Read will always return 1 */
|
/* Read will always return 1 */
|
||||||
AssertFatal( sizeof(sem_counter) == read (t->sem_fd, &sem_counter, sizeof(sem_counter)), "");
|
AssertFatal( sizeof(sem_counter) == read (t->sem_fd, &sem_counter, sizeof(sem_counter)), "");
|
||||||
/* Mark that the event has been processed */
|
/* Mark that the event has been processed */
|
||||||
t->events[i].events &= ~EPOLLIN;
|
events[i].events &= ~EPOLLIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*events = t->events;
|
return nb_events;
|
||||||
return t->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);
|
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) {
|
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];
|
task_list_t *t=tasks[task_id];
|
||||||
pthread_mutex_lock(&t->queue_cond_lock);
|
pthread_mutex_lock(&t->queue_cond_lock);
|
||||||
|
|
||||||
|
struct epoll_event events[t->nb_fd_epoll];
|
||||||
// Weird condition to deal with crap legacy itti interface
|
// Weird condition to deal with crap legacy itti interface
|
||||||
if ( t->nb_fd_epoll == 1 ) {
|
if ( t->nb_fd_epoll == 1 ) {
|
||||||
while (t->message_queue.empty()) {
|
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);
|
pthread_mutex_lock(&t->queue_cond_lock);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t->message_queue.empty()) {
|
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);
|
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
|
\param events events list
|
||||||
@returns number of events to handle
|
@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.
|
/** \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.
|
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) {
|
if (measr) {
|
||||||
mkfifo(measr,0666);
|
mkfifo(measr,0666);
|
||||||
AssertFatal(-1 != (pool->dummyTraceFd=
|
AssertFatal(-1 != (pool->dummyKeepReadingTraceFd=
|
||||||
open(measr, O_RDONLY| O_NONBLOCK)),"");
|
open(measr, O_RDONLY| O_NONBLOCK)),"");
|
||||||
AssertFatal(-1 != (pool->traceFd=
|
AssertFatal(-1 != (pool->traceFd=
|
||||||
open(measr, O_WRONLY|O_APPEND|O_NOATIME|O_NONBLOCK)),"");
|
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]);
|
int c=toupper(curptr[0]);
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
||||||
case 'N':
|
case 'N':
|
||||||
pool->activated=false;
|
pool->activated=false;
|
||||||
break;
|
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
|
#ifdef TEST_THREAD_POOL
|
||||||
volatile int oai_exit=0;
|
volatile int oai_exit=0;
|
||||||
|
|
||||||
|
|||||||
@@ -256,9 +256,8 @@ typedef struct thread_pool {
|
|||||||
bool activated;
|
bool activated;
|
||||||
bool measurePerf;
|
bool measurePerf;
|
||||||
int traceFd;
|
int traceFd;
|
||||||
int dummyTraceFd;
|
int dummyKeepReadingTraceFd;
|
||||||
uint64_t cpuCyclesMicroSec;
|
uint64_t cpuCyclesMicroSec;
|
||||||
uint64_t startProcessingUE;
|
|
||||||
int nbThreads;
|
int nbThreads;
|
||||||
notifiedFIFO_t incomingFifo;
|
notifiedFIFO_t incomingFifo;
|
||||||
struct one_thread *allthreads;
|
struct one_thread *allthreads;
|
||||||
@@ -389,5 +388,6 @@ static inline int abortTpool(tpool_t *t) {
|
|||||||
return nbRemoved;
|
return nbRemoved;
|
||||||
}
|
}
|
||||||
void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name);
|
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)
|
#define initTpool(PARAMPTR,TPOOLPTR, MEASURFLAG) initNamedTpool(PARAMPTR,TPOOLPTR, MEASURFLAG, NULL)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ notifiedFIFO_t measur_fifo;
|
|||||||
double get_cpu_freq_GHz(void)
|
double get_cpu_freq_GHz(void)
|
||||||
{
|
{
|
||||||
if (cpu_freq_GHz <1 ) {
|
if (cpu_freq_GHz <1 ) {
|
||||||
time_stats_t ts = {0};
|
time_stats_t ts = {0};
|
||||||
reset_meas(&ts);
|
reset_meas(&ts);
|
||||||
ts.trials++;
|
ts.trials++;
|
||||||
ts.in = rdtsc_oai();
|
ts.in = rdtsc_oai();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
ts.diff = (rdtsc_oai()-ts.in);
|
ts.diff = (rdtsc_oai()-ts.in);
|
||||||
cpu_freq_GHz = (double)ts.diff/1000000000;
|
cpu_freq_GHz = (double)ts.diff/1000000000;
|
||||||
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
||||||
}
|
}
|
||||||
return 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
|
The OpenAirInterface software can be obtained from our gitLab
|
||||||
server. You will need a git client to get the sources. The repository
|
server. You will need a git client to get the sources. The repository
|
||||||
is currently used for main developments.
|
is currently used for main developments.
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
|
|
||||||
You need to install the subversion/git using the following commands:
|
You need to install git using the following commands:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install subversion git
|
sudo apt-get install git
|
||||||
```
|
```
|
||||||
|
|
||||||
# Using EURECOM Gitlab
|
# Using EURECOM Gitlab
|
||||||
|
|
||||||
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
|
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
|
||||||
holds the source code for (eNB RAN + UE RAN).
|
holds the source code for the RAN (4G and 5G).
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository):
|
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"
|
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)
|
## In order to clone the Git repository (for OAI Users without login to gitlab server)
|
||||||
|
|
||||||
Cloning RAN repository (eNB RAN + UE RAN):
|
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
|
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.
|
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?
|
# Which branch to checkout?
|
||||||
|
|
||||||
On the RAN side:
|
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.
|
* **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.
|
* **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
|
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
|
https://gitlab.eurecom.fr/oai/openairinterface5g/tags
|
||||||
|
|
||||||
The tag naming conventions are :
|
The tag naming conventions are:
|
||||||
|
|
||||||
- On `master` branch: **v1.`x`.`y`** where
|
- 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.
|
* `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 \
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
gdb \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ RUN apt-get update && \
|
|||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
|
gdb \
|
||||||
python \
|
python \
|
||||||
python3 \
|
python3 \
|
||||||
python3-six \
|
python3-six \
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \
|
|||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
nettle \
|
nettle \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
gdb \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ RUN apt-get update && \
|
|||||||
net-tools \
|
net-tools \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
gdb \
|
||||||
python \
|
python \
|
||||||
python3 \
|
python3 \
|
||||||
python3-six \
|
python3-six \
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ RUN yum update -y && \
|
|||||||
tzdata \
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
gdb \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ RUN apt-get update && \
|
|||||||
libatlas3-base \
|
libatlas3-base \
|
||||||
libconfig9 \
|
libconfig9 \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
gdb \
|
||||||
python \
|
python \
|
||||||
python3 \
|
python3 \
|
||||||
python3-six \
|
python3-six \
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ RUN yum update -y && \
|
|||||||
nettle \
|
nettle \
|
||||||
tzdata \
|
tzdata \
|
||||||
atlas \
|
atlas \
|
||||||
|
gdb \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
iproute \
|
iproute \
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ RUN yum update -y && \
|
|||||||
iputils \
|
iputils \
|
||||||
iproute \
|
iproute \
|
||||||
atlas \
|
atlas \
|
||||||
|
gdb \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
libXpm \
|
libXpm \
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ RUN apt-get update && \
|
|||||||
libconfig9 \
|
libconfig9 \
|
||||||
openssl \
|
openssl \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
gdb \
|
||||||
python \
|
python \
|
||||||
python3 \
|
python3 \
|
||||||
python3-six \
|
python3-six \
|
||||||
|
|||||||
@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
|
|||||||
|
|
||||||
# render template and inline replace config file
|
# render template and inline replace config file
|
||||||
sed -i "${EXPRESSIONS}" ${c}
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Configuration file: ${c}"
|
||||||
|
cat ${c}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Load USRP binaries"
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
|
|||||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# enable printing of stack traces on assert
|
||||||
|
export gdbStacks=1
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "== Starting eNB soft modem"
|
echo "== Starting eNB soft modem"
|
||||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||||
|
|||||||
@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
|
|||||||
|
|
||||||
# render template and inline replace config file
|
# render template and inline replace config file
|
||||||
sed -i "${EXPRESSIONS}" ${c}
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Configuration file: ${c}"
|
||||||
|
cat ${c}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Load USRP binaries"
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
|
|||||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# enable printing of stack traces on assert
|
||||||
|
export gdbStacks=1
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "== Starting gNB soft modem"
|
echo "== Starting gNB soft modem"
|
||||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||||
|
|||||||
@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do
|
|||||||
|
|
||||||
# render template and inline replace config file
|
# render template and inline replace config file
|
||||||
sed -i "${EXPRESSIONS}" ${c}
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Configuration file: ${c}"
|
||||||
|
cat ${c}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Load USRP binaries"
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then
|
|||||||
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# enable printing of stack traces on assert
|
||||||
|
export gdbStacks=1
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "== Starting eNB soft modem"
|
echo "== Starting eNB soft modem"
|
||||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do
|
|||||||
|
|
||||||
# render template and inline replace config file
|
# render template and inline replace config file
|
||||||
sed -i "${EXPRESSIONS}" ${c}
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Configuration file: ${c}"
|
||||||
|
cat ${c}
|
||||||
done
|
done
|
||||||
|
|
||||||
#now generate USIM files
|
#now generate USIM files
|
||||||
@@ -38,6 +42,8 @@ cd $PREFIX
|
|||||||
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
|
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
|
||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Load USRP binaries"
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then
|
|||||||
new_args+=("$PREFIX/etc/ue.conf")
|
new_args+=("$PREFIX/etc/ue.conf")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# enable printing of stack traces on assert
|
||||||
|
export gdbStacks=1
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "== Starting LTE UE soft modem"
|
echo "== Starting LTE UE soft modem"
|
||||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||||
|
|||||||
@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do
|
|||||||
|
|
||||||
# render template and inline replace config file
|
# render template and inline replace config file
|
||||||
sed -i "${EXPRESSIONS}" ${c}
|
sed -i "${EXPRESSIONS}" ${c}
|
||||||
|
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Configuration file: ${c}"
|
||||||
|
cat ${c}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
|
echo "=================================="
|
||||||
|
echo "== Load USRP binaries"
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# enable printing of stack traces on assert
|
||||||
|
export gdbStacks=1
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
echo "== Starting NR UE soft modem"
|
echo "== Starting NR UE soft modem"
|
||||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
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->respEncode=(notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
|
||||||
L1proc->respDecode=(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,cpumeas(CPUMEAS_GETSTATE));
|
||||||
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true);
|
|
||||||
else
|
|
||||||
initTpool("n", L1proc->threadPool, true);
|
|
||||||
|
|
||||||
initNotifiedFIFO(L1proc->respEncode);
|
initNotifiedFIFO(L1proc->respEncode);
|
||||||
initNotifiedFIFO(L1proc->respDecode);
|
initNotifiedFIFO(L1proc->respDecode);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-15
@@ -221,8 +221,7 @@ void rx_func(void *param) {
|
|||||||
gNB->common_vars.rxdataF[aa],
|
gNB->common_vars.rxdataF[aa],
|
||||||
slot_rx,
|
slot_rx,
|
||||||
0,
|
0,
|
||||||
gNB->frame_parms.Ncp==EXTENDED?12:14,
|
gNB->frame_parms.Ncp==EXTENDED?12:14);
|
||||||
gNB->frame_parms.ofdm_symbol_size);
|
|
||||||
}
|
}
|
||||||
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
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 = RC.gNB[inst];
|
||||||
gNB_L1_proc_t *proc = &gNB->proc;
|
gNB_L1_proc_t *proc = &gNB->proc;
|
||||||
|
|
||||||
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
|
// ULSCH decoding threadpool
|
||||||
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);
|
initTpool(get_softmodem_params()->threadPoolConfig, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||||
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 decoder result FIFO
|
// ULSCH decoder result FIFO
|
||||||
initNotifiedFIFO(&gNB->respDecode);
|
initNotifiedFIFO(&gNB->respDecode);
|
||||||
|
|
||||||
@@ -536,7 +524,9 @@ void init_eNB_afterRU(void) {
|
|||||||
RC.nb_nr_inst = 1;
|
RC.nb_nr_inst = 1;
|
||||||
for (inst=0; inst<RC.nb_nr_inst; inst++) {
|
for (inst=0; inst<RC.nb_nr_inst; inst++) {
|
||||||
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
|
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
|
||||||
|
|
||||||
gNB = RC.gNB[inst];
|
gNB = RC.gNB[inst];
|
||||||
|
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||||
|
|
||||||
phy_init_nr_gNB(gNB,0,0);
|
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_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_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_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_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||||
|
|
||||||
#define CONFIG_HLP_FLOG "Enable online log \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}, \
|
{"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}, \
|
{"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}, \
|
{"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}, \
|
{"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}, \
|
{"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 dlsch_slot_bitmap;
|
||||||
extern uint64_t ulsch_slot_bitmap;
|
extern uint64_t ulsch_slot_bitmap;
|
||||||
extern char *uecap_file;
|
extern char *uecap_file;
|
||||||
|
extern int ldpc_offload_flag;
|
||||||
|
|
||||||
// In nr-gnb.c
|
// In nr-gnb.c
|
||||||
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
||||||
|
|||||||
+1
-1
@@ -678,7 +678,7 @@ void processSlotRX(void *arg) {
|
|||||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
||||||
#else
|
#else
|
||||||
uint64_t a=rdtsc_oai();
|
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);
|
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -243,20 +243,7 @@ uint64_t set_nrUE_optmask(uint64_t bitmask) {
|
|||||||
nrUE_params_t *get_nrUE_params(void) {
|
nrUE_params_t *get_nrUE_params(void) {
|
||||||
return &nrUE_params;
|
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) {
|
static void get_options(void) {
|
||||||
|
|
||||||
paramdef_t cmdline_params[] =CMDLINE_NRUEPARAMS_DESC ;
|
paramdef_t cmdline_params[] =CMDLINE_NRUEPARAMS_DESC ;
|
||||||
@@ -438,7 +425,7 @@ int main( int argc, char **argv ) {
|
|||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
T_Config_Init();
|
T_Config_Init();
|
||||||
#endif
|
#endif
|
||||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
initTpool(get_softmodem_params()->threadPoolConfig, &(nrUE_params.Tpool), cpumeas(CPUMEAS_GETSTATE));
|
||||||
//randominit (0);
|
//randominit (0);
|
||||||
set_taus_seed (0);
|
set_taus_seed (0);
|
||||||
|
|
||||||
@@ -447,7 +434,7 @@ int main( int argc, char **argv ) {
|
|||||||
|
|
||||||
init_opt() ;
|
init_opt() ;
|
||||||
load_nrLDPClib(NULL);
|
load_nrLDPClib(NULL);
|
||||||
|
|
||||||
if (ouput_vcd) {
|
if (ouput_vcd) {
|
||||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define CMDLINE_NRUEPARAMS_DESC { \
|
#define CMDLINE_NRUEPARAMS_DESC { \
|
||||||
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \
|
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||||
{"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}, \
|
{"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}, \
|
{"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}, \
|
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t optmask; //mask to store boolean config options
|
uint64_t optmask; //mask to store boolean config options
|
||||||
uint32_t ofdm_offset_divisor; // Divisor for sample offset computation for each OFDM symbol
|
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
|
uint8_t max_ldpc_iterations; // number of maximum LDPC iterations
|
||||||
tpool_t Tpool; // thread pool
|
tpool_t Tpool; // thread pool
|
||||||
} nrUE_params_t;
|
} nrUE_params_t;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ static softmodem_params_t softmodem_params;
|
|||||||
char *parallel_config=NULL;
|
char *parallel_config=NULL;
|
||||||
char *worker_config=NULL;
|
char *worker_config=NULL;
|
||||||
int usrp_tx_thread = 0;
|
int usrp_tx_thread = 0;
|
||||||
|
int ldpc_offload_flag=0;
|
||||||
uint8_t nfapi_mode=0;
|
uint8_t nfapi_mode=0;
|
||||||
|
|
||||||
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ extern int usrp_tx_thread;
|
|||||||
#define CMDLINE_PARAMS_DESC { \
|
#define CMDLINE_PARAMS_DESC { \
|
||||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, 0},\
|
{"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}, \
|
{"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}, \
|
{"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}, \
|
{"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}, \
|
{"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 int usrp_tx_thread;
|
||||||
extern uint16_t sl_ahead;
|
extern uint16_t sl_ahead;
|
||||||
extern uint16_t sf_ahead;
|
extern uint16_t sf_ahead;
|
||||||
|
extern int ldpc_offload_flag;
|
||||||
extern int oai_exit;
|
extern int oai_exit;
|
||||||
|
|
||||||
void tx_func(void *param);
|
void tx_func(void *param);
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ typedef struct
|
|||||||
//Resource Allocation in time domain
|
//Resource Allocation in time domain
|
||||||
uint8_t start_symbol_index;
|
uint8_t start_symbol_index;
|
||||||
uint8_t nr_of_symbols;
|
uint8_t nr_of_symbols;
|
||||||
|
uint32_t tbslbrm;
|
||||||
//Optional Data only included if indicated in pduBitmap
|
//Optional Data only included if indicated in pduBitmap
|
||||||
nfapi_nr_ue_pusch_data_t pusch_data;
|
nfapi_nr_ue_pusch_data_t pusch_data;
|
||||||
nfapi_nr_ue_pusch_uci_t pusch_uci;
|
nfapi_nr_ue_pusch_uci_t pusch_uci;
|
||||||
|
|||||||
@@ -1292,42 +1292,33 @@ typedef struct
|
|||||||
|
|
||||||
} nfapi_nr_pucch_pdu_t;
|
} nfapi_nr_pucch_pdu_t;
|
||||||
|
|
||||||
//for srs_pdu:
|
typedef struct {
|
||||||
|
uint16_t rnti; // UE RNTI, Value: 1->65535
|
||||||
typedef struct
|
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 rnti;//UE RNTI
|
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
|
||||||
uint32_t handle;//An opaque handling returned in the SRS.indication
|
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
|
||||||
//BWP
|
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
|
||||||
uint16_t bwp_size;
|
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
|
||||||
uint16_t bwp_start;
|
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 subcarrier_spacing;
|
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 cyclic_prefix;
|
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
|
||||||
uint8_t num_ant_ports;
|
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 num_symbols;
|
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||||
uint8_t num_repetitions;
|
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 time_start_position;//Starting position in the time domain l0; Note: the MAC undertakes the translation from startPosition to 𝑙0
|
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 config_index;
|
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)
|
||||||
uint16_t sequence_id;
|
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
|
||||||
uint8_t bandwidth_index;
|
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
|
||||||
uint8_t comb_size;
|
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||||
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 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 cyclic_shift;
|
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
|
||||||
uint8_t frequency_position;
|
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 frequency_shift;
|
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
|
||||||
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
|
|
||||||
|
|
||||||
nfapi_nr_ul_beamforming_t beamforming;
|
nfapi_nr_ul_beamforming_t beamforming;
|
||||||
|
|
||||||
} nfapi_nr_srs_pdu_t;
|
} nfapi_nr_srs_pdu_t;
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE = 0,
|
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE = 0,
|
||||||
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE = 1,
|
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 */
|
e_nrLDPC_outMode outMode; /**< Output format */
|
||||||
} t_nrLDPC_dec_params;
|
} 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.
|
Structure containing LDPC decoder processing time statistics.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#define __NRLDPC_DEFS__H__
|
#define __NRLDPC_DEFS__H__
|
||||||
#include <openair1/PHY/defs_nr_common.h>
|
#include <openair1/PHY/defs_nr_common.h>
|
||||||
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief LDPC encoder
|
\brief LDPC encoder
|
||||||
\param 1 input
|
\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_llrOut Output vector
|
||||||
\param p_profiler LDPC profiler statistics
|
\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_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
|
#endif
|
||||||
|
|||||||
@@ -24,14 +24,22 @@
|
|||||||
nrLDPC_decoderfunc_t nrLDPC_decoder;
|
nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||||
nrLDPC_encoderfunc_t nrLDPC_encoder;
|
nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||||
nrLDPC_initcallfunc_t nrLDPC_initcall;
|
nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||||
|
nrLDPC_decoffloadfunc_t nrLDPC_decoder_offload;
|
||||||
|
nrLDPC_dectopfunc_t top_testsuite;
|
||||||
#else
|
#else
|
||||||
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
/* 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(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
|
extern int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr); // for ldpctest
|
||||||
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
|
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
|
||||||
extern nrLDPC_initcallfunc_t nrLDPC_initcall;
|
extern nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||||
|
|
||||||
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
|
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||||
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
|
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||||
|
extern nrLDPC_decoffloadfunc_t nrLDPC_decoder_offload;
|
||||||
|
|
||||||
|
extern nrLDPC_dectopfunc_t top_testsuite;
|
||||||
|
|
||||||
// inline functions:
|
// inline functions:
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -71,6 +71,56 @@ int load_nrLDPClib(char *version) {
|
|||||||
return 0;
|
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) {
|
int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr) {
|
||||||
loader_shlibfunc_t shlib_encoder_fdesc;
|
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);
|
N = (BG==1)?(66*Z):(50*Z);
|
||||||
|
|
||||||
if (Tbslbrm == 0)
|
if (Tbslbrm == 0)
|
||||||
Ncb = N;
|
Ncb = N;
|
||||||
else {
|
else {
|
||||||
Nref = (3*Tbslbrm/(2*C)); //R_LBRM = 2/3
|
Nref = (3*Tbslbrm/(2*C)); //R_LBRM = 2/3
|
||||||
Ncb = min(N, Nref);
|
Ncb = min(N, Nref);
|
||||||
}
|
}
|
||||||
|
|
||||||
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
||||||
@@ -564,7 +564,6 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
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));
|
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
|
||||||
prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
|
|
||||||
// assume maximum of 64 RX antennas for PRACH receiver
|
// assume maximum of 64 RX antennas for PRACH receiver
|
||||||
prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
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->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_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
|
// assume maximum of 64 RX antennas for PRACH receiver
|
||||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
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);
|
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]);
|
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
|
||||||
|
|
||||||
free_and_zero(prach_vars->prach_ifft[0]);
|
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->rxsigF[ce_level]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_and_zero(prach_vars_br->prachF);
|
|
||||||
free_and_zero(prach_vars->rxsigF[0]);
|
free_and_zero(prach_vars->rxsigF[0]);
|
||||||
|
|
||||||
for (int ULSCH_id=0; ULSCH_id<NUMBER_OF_ULSCH_MAX; ULSCH_id++) {
|
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;
|
int idx = (j<<1) + i;
|
||||||
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
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[eNB_id][idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*
|
||||||
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 );
|
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();
|
crcTableInit();
|
||||||
init_scrambling_luts();
|
init_scrambling_luts();
|
||||||
init_pucch2_luts();
|
init_pucch2_luts();
|
||||||
|
|
||||||
load_nrLDPClib(NULL);
|
load_nrLDPClib(NULL);
|
||||||
|
|
||||||
|
if (gNB->ldpc_offload_flag)
|
||||||
|
load_nrLDPClib_offload();
|
||||||
|
|
||||||
init_codebook_gNB(gNB);
|
init_codebook_gNB(gNB);
|
||||||
|
|
||||||
// PBCH DMRS gold sequences generation
|
// PBCH DMRS gold sequences generation
|
||||||
@@ -613,6 +617,10 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
|
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] = (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);
|
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||||
@@ -767,6 +775,10 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
|||||||
free_and_zero(gNB->nr_csi_info);
|
free_and_zero(gNB->nr_csi_info);
|
||||||
|
|
||||||
for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) {
|
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]);
|
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
|
#ifdef DEBUG_CH
|
||||||
|
|
||||||
if (Ns==0)
|
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
|
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
|
#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));
|
// 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));
|
// beta = (int16_t) (((int32_t) SCALE * (int32_t) (k-pilot_pos1))/(pilot_pos2-pilot_pos1));
|
||||||
#ifdef DEBUG_CH
|
#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
|
#endif
|
||||||
//symbol_offset_subframe = frame_parms->N_RB_UL*12*k;
|
//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
|
#ifdef DEBUG_CH
|
||||||
|
|
||||||
if (l==pilot_pos1)
|
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
|
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
|
#endif
|
||||||
symbol_offset = frame_parms->N_RB_UL*12*l;
|
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;
|
uint32_t subframe_offset=((frame_parms->Ncp==0)?14:12)*frame_parms->ofdm_symbol_size*subframe;
|
||||||
|
|
||||||
memset(d,0,24*sizeof(int16_t));
|
memset(d,0,24*sizeof(int16_t));
|
||||||
|
const int nushift=frame_parms->nushift;
|
||||||
|
|
||||||
if (frame_parms->nb_antenna_ports_eNB==1)
|
if (frame_parms->nb_antenna_ports_eNB==1)
|
||||||
gain_lin_QPSK = (int16_t)(((int32_t)amp*ONE_OVER_SQRT2_Q15)>>15);
|
gain_lin_QPSK = (int16_t)(((int32_t)amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
else
|
else
|
||||||
@@ -245,7 +246,7 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
y1_16[7] = -y0_16[5];
|
y1_16[7] = -y0_16[5];
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m];
|
||||||
y1[j] += y1_16[m++];
|
y1[j] += y1_16[m++];
|
||||||
y0[j+1] += y0_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];
|
y1_16[7] = -y0_16[5];
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m];
|
||||||
y1[j] += y1_16[m++];
|
y1[j] += y1_16[m++];
|
||||||
y0[j+1] += y0_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];
|
y1_16[7] = -y0_16[5];
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m];
|
||||||
y1[j] += y1_16[m++];
|
y1[j] += y1_16[m++];
|
||||||
y0[j+1] += y0_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;
|
y0_16[7] = d[7]*gain_lin_QPSK;
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m++];
|
||||||
y0[j+1] += 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;
|
y0_16[7] = d[15]*gain_lin_QPSK;
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m++];
|
||||||
y0[j+1] += 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;
|
y0_16[7] = d[23]*gain_lin_QPSK;
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m++];
|
||||||
y0[j+1] += 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];
|
y1_16[7] = -y0_16[5];
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m];
|
||||||
y1[j] += y1_16[m++];
|
y1[j] += y1_16[m++];
|
||||||
y0[j+1] += y0_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;
|
y0_16[7] = d[7]*gain_lin_QPSK;
|
||||||
|
|
||||||
for (i=0,j=0,m=0; i<6; i++,j+=2) {
|
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] += y0_16[m++];
|
||||||
y0[j+1] += 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 Ncs_config;
|
||||||
uint8_t restricted_set;
|
uint8_t restricted_set;
|
||||||
uint8_t n_ra_prb;
|
uint8_t n_ra_prb;
|
||||||
int16_t *prachF=NULL;
|
|
||||||
int16_t **rxsigF=NULL;
|
int16_t **rxsigF=NULL;
|
||||||
int16_t *prach2;
|
|
||||||
uint8_t preamble_index;
|
uint8_t preamble_index;
|
||||||
uint16_t NCS,NCS2;
|
uint16_t NCS,NCS2;
|
||||||
uint16_t preamble_offset=0,preamble_offset_old;
|
uint16_t preamble_offset=0,preamble_offset_old;
|
||||||
@@ -77,12 +75,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
uint8_t not_found;
|
uint8_t not_found;
|
||||||
int k=0;
|
int k=0;
|
||||||
uint16_t u;
|
uint16_t u;
|
||||||
int16_t *Xu=0;
|
c16_t *Xu=0;
|
||||||
uint16_t offset;
|
|
||||||
int16_t Ncp;
|
int16_t Ncp;
|
||||||
uint16_t first_nonzero_root_idx=0;
|
uint16_t first_nonzero_root_idx=0;
|
||||||
uint8_t new_dft=0;
|
uint8_t new_dft=0;
|
||||||
uint8_t aa;
|
|
||||||
int32_t lev;
|
int32_t lev;
|
||||||
int16_t levdB;
|
int16_t levdB;
|
||||||
int fft_size=0,log2_ifft_size;
|
int fft_size=0,log2_ifft_size;
|
||||||
@@ -130,14 +126,11 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
tdd_mapindex,Nf);
|
tdd_mapindex,Nf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t *prach[nb_rx];
|
|
||||||
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
||||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||||
|
|
||||||
if (eNB) {
|
if (eNB) {
|
||||||
if (br_flag == 1) {
|
if (br_flag == 1) {
|
||||||
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
||||||
prachF = eNB->prach_vars_br.prachF;
|
|
||||||
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
||||||
|
|
||||||
if (LOG_DEBUGFLAG(PRACH)) {
|
if (LOG_DEBUGFLAG(PRACH)) {
|
||||||
@@ -151,7 +144,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||||
prachF = eNB->prach_vars.prachF;
|
|
||||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||||
|
|
||||||
//if (LOG_DEBUGFLAG(PRACH)) {
|
//if (LOG_DEBUGFLAG(PRACH)) {
|
||||||
@@ -179,7 +171,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
AssertFatal(ru!=NULL,"ru is null\n");
|
AssertFatal(ru!=NULL,"ru is null\n");
|
||||||
int8_t dBEn0=0;
|
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
|
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???
|
// 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];
|
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);
|
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);
|
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
|
// do DFT
|
||||||
switch (fp->N_RB_UL) {
|
switch (fp->N_RB_UL) {
|
||||||
@@ -562,37 +555,38 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
if (new_dft == 1) {
|
if (new_dft == 1) {
|
||||||
new_dft = 0;
|
new_dft = 0;
|
||||||
|
|
||||||
if (br_flag == 1) {
|
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++];
|
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));
|
if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
|
||||||
} else {
|
} 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];
|
prach_ifft = prach_ifftp[0];
|
||||||
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
|
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
|
||||||
}
|
}
|
||||||
|
c16_t prachF[1024] __attribute__((aligned(32)))={0};
|
||||||
memset(prachF, 0, sizeof(int16_t)*2*1024 );
|
|
||||||
|
if (LOG_DUMPFLAG(PRACH))
|
||||||
if (LOG_DUMPFLAG(PRACH)) {
|
for (int z=0; z<nb_rx; z++)
|
||||||
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
|
if( prach[z] ) {
|
||||||
|
char tmp[128];
|
||||||
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
|
sprintf(tmp,"prach_rx%d.m", z);
|
||||||
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],12288,1,1);
|
LOG_M(tmp,tmp,prach[z],6144+792,1,1);
|
||||||
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],12288,1,1);
|
sprintf(tmp,"prach_rxF%d.m", z);
|
||||||
}
|
LOG_M(tmp,tmp,rxsigF[z],12288,1,1);
|
||||||
|
}
|
||||||
for (aa=0; aa<nb_rx; aa++) {
|
|
||||||
|
for (int aa=0; aa<nb_rx; aa++) {
|
||||||
// Do componentwise product with Xu* on each antenna
|
// Do componentwise product with Xu* on each antenna
|
||||||
k=0;
|
k=0;
|
||||||
|
|
||||||
for (offset=0; offset<(N_ZC<<1); offset+=2) {
|
for (int offset=0; offset<N_ZC; offset++) {
|
||||||
prachF[offset] = (int16_t)(((int32_t)Xu[offset]*rxsigF[aa][k] + (int32_t)Xu[offset+1]*rxsigF[aa][k+1])>>15);
|
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+1] = (int16_t)(((int32_t)Xu[offset]*rxsigF[aa][k+1] - (int32_t)Xu[offset+1]*rxsigF[aa][k])>>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;
|
k+=2;
|
||||||
|
|
||||||
if (k==(12*2*fp->ofdm_symbol_size))
|
if (k==(12*2*fp->ofdm_symbol_size))
|
||||||
k=0;
|
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)
|
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
|
||||||
if (N_ZC == 839) {
|
if (N_ZC == 839) {
|
||||||
log2_ifft_size = 10;
|
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
|
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||||
for (i=0; i<2048; i++)
|
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;
|
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 {
|
} else {
|
||||||
idft(IDFT_256,prachF,prach_ifft_tmp,1);
|
idft(IDFT_256,(int16_t*)prachF,prach_ifft_tmp,1);
|
||||||
log2_ifft_size = 8;
|
log2_ifft_size = 8;
|
||||||
|
|
||||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
// 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) {
|
if (br_flag == 0) {
|
||||||
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
|
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("Xu.m","xu",Xu,N_ZC,1,1);
|
||||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,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);
|
LOG_M("SF2_3.m","sf2_3",&ru->common.rxdata[0][2*fp->samples_per_tti],2*fp->samples_per_tti,1,1);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
|
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("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("Xu_br.m","xu_br",Xu,N_ZC,1,1);
|
||||||
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,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}};
|
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);
|
turboDecode_t * rdata=(turboDecode_t *) NotifiedFifoData(req);
|
||||||
|
|
||||||
rdata->eNB=eNB;
|
rdata->eNB=eNB;
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
|||||||
int16_t* txdata,
|
int16_t* txdata,
|
||||||
int slot,
|
int slot,
|
||||||
int first_symbol,
|
int first_symbol,
|
||||||
int nsymb,
|
int nsymb);
|
||||||
int length);
|
|
||||||
|
|
||||||
void init_symbol_rotation(NR_DL_FRAME_PARMS *fp);
|
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,
|
int32_t *rxdataF,
|
||||||
int slot,
|
int slot,
|
||||||
int first_symbol,
|
int first_symbol,
|
||||||
int nsymb,
|
int nsymb);
|
||||||
int length);
|
|
||||||
|
|
||||||
/*! \brief Perform NR precoding. TS 38.211 V15.4.0 subclause 6.3.1.5
|
/*! \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
|
@param[in] datatx_F_precoding, Pointer to n_layers*re data array
|
||||||
|
|||||||
@@ -341,30 +341,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,
|
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||||
int16_t* trxdata,
|
int16_t* txdataF,
|
||||||
int slot,
|
int slot,
|
||||||
int first_symbol,
|
int first_symbol,
|
||||||
int nsymb,
|
int nsymb)
|
||||||
int length) {
|
{
|
||||||
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
|
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",
|
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
|
||||||
first_symbol + sidx,
|
sidx,
|
||||||
slot,
|
slot,
|
||||||
sidx + first_symbol + symb_offset,
|
sidx + symb_offset,
|
||||||
length,
|
this_rotation->r,
|
||||||
symbol_rotation[sidx + first_symbol + symb_offset].r,
|
this_rotation->i);
|
||||||
symbol_rotation[sidx + first_symbol + symb_offset].i);
|
|
||||||
|
|
||||||
rotate_cpx_vector(((c16_t*) trxdata) + sidx * length,
|
if (fp->N_RB_DL & 1) {
|
||||||
symbol_rotation + sidx + first_symbol + symb_offset,
|
rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
|
||||||
((c16_t*) trxdata) + sidx * length,
|
(fp->N_RB_DL + 1) * 6, 15);
|
||||||
length,
|
rotate_cpx_vector(this_symbol + fp->first_carrier_offset - 6,
|
||||||
15);
|
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);
|
symbol+symb_offset,rot2.r,rot2.i);
|
||||||
#endif
|
#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 *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],
|
if (frame_parms->N_RB_DL & 1) {
|
||||||
(int16_t *)shift_rot,
|
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
(frame_parms->N_RB_DL + 1) * 6, 15);
|
||||||
1,
|
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
|
||||||
frame_parms->ofdm_symbol_size,
|
&rot2,
|
||||||
15);
|
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
|
#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);
|
symbol+symb_offset,rot2.r,rot2.i);
|
||||||
#endif
|
#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],
|
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];
|
||||||
&rot2,
|
rotate_cpx_vector(this_symbol, &rot2, this_symbol, frame_parms->ofdm_symbol_size, 15);
|
||||||
(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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_FEP
|
#ifdef DEBUG_FEP
|
||||||
@@ -301,10 +314,8 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
int32_t *rxdataF,
|
int32_t *rxdataF,
|
||||||
int slot,
|
int slot,
|
||||||
int first_symbol,
|
int first_symbol,
|
||||||
int nsymb,
|
int nsymb)
|
||||||
int length) {
|
{
|
||||||
|
|
||||||
|
|
||||||
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
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;
|
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];
|
c16_t rot2 = frame_parms->symbol_rotation[1][symbol + symb_offset];
|
||||||
rot2.i=-rot2.i;
|
rot2.i=-rot2.i;
|
||||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,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 *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)],
|
if (frame_parms->N_RB_UL & 1) {
|
||||||
(int16_t *)shift_rot,
|
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||||
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
(frame_parms->N_RB_UL + 1) * 6, 15);
|
||||||
1,
|
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
|
||||||
length,
|
&rot2,
|
||||||
15);
|
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;
|
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]) {
|
const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]) {
|
||||||
int timing_advance = 0;
|
int timing_advance = 0;
|
||||||
int max_val = 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 int slot,
|
||||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||||
const nr_srs_info_t *nr_srs_info,
|
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_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_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[][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[][gNB->frame_parms.ofdm_symbol_size],
|
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[][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 *signal_power,
|
||||||
uint32_t *noise_power_per_rb,
|
uint32_t *noise_power_per_rb,
|
||||||
uint32_t *noise_power,
|
uint32_t *noise_power,
|
||||||
|
|||||||
@@ -315,19 +315,19 @@ int nr_find_pucch(uint16_t rnti,
|
|||||||
NR_gNB_SRS_t *new_gNB_srs(void);
|
NR_gNB_SRS_t *new_gNB_srs(void);
|
||||||
void free_gNB_srs(NR_gNB_SRS_t *srs);
|
void free_gNB_srs(NR_gNB_SRS_t *srs);
|
||||||
|
|
||||||
int nr_find_srs(uint16_t rnti,
|
int nr_find_srs(rnti_t rnti,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
PHY_VARS_gNB *gNB);
|
PHY_VARS_gNB *gNB);
|
||||||
|
|
||||||
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
nfapi_nr_srs_pdu_t *srs_pdu);
|
nfapi_nr_srs_pdu_t *srs_pdu);
|
||||||
|
|
||||||
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||||
nr_srs_info_t *nr_srs_info,
|
nr_srs_info_t *nr_srs_info,
|
||||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]);
|
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_ulsch.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
|
#include "SCHED_NR/fapi_nr_l1.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
@@ -380,6 +381,23 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
uint32_t r_offset;
|
uint32_t r_offset;
|
||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
int E;
|
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
|
#ifdef PRINT_CRC_CHECK
|
||||||
prnt_crc_cnt++;
|
prnt_crc_cnt++;
|
||||||
@@ -394,7 +412,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
LOG_E(PHY,"ulsch_decoding.c: NULL harq_process pointer\n");
|
LOG_E(PHY,"ulsch_decoding.c: NULL harq_process pointer\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
uint8_t dtx_det = 0;
|
||||||
t_nrLDPC_dec_params decParams;
|
t_nrLDPC_dec_params decParams;
|
||||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||||
|
|
||||||
@@ -421,6 +439,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->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)
|
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) {
|
if (harq_process->round == 0) {
|
||||||
harq_process->new_rx = true;
|
harq_process->new_rx = true;
|
||||||
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
||||||
@@ -430,6 +449,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
if (harq_process->ndi != pusch_pdu->pusch_data.new_data_indicator) {
|
if (harq_process->ndi != pusch_pdu->pusch_data.new_data_indicator) {
|
||||||
harq_process->new_rx = true;
|
harq_process->new_rx = true;
|
||||||
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
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);
|
LOG_D(PHY,"Missed ULSCH detection. NDI toggled but rv %d does not correspond to first reception\n",pusch_pdu->pusch_data.rv_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,12 +565,179 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
Kr = harq_process->K;
|
Kr = harq_process->K;
|
||||||
Kr_bytes = Kr>>3;
|
Kr_bytes = Kr>>3;
|
||||||
offset = 0;
|
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;
|
void (*nr_processULSegment_ptr)(void*) = &nr_processULSegment;
|
||||||
|
|
||||||
for (r=0; r<harq_process->C; r++) {
|
for (r=0; r<harq_process->C; r++) {
|
||||||
|
|
||||||
E = nr_get_E(G, harq_process->C, Qm, n_layers, 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}};
|
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);
|
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);
|
ldpcDecode_t * rdata=(ldpcDecode_t *) NotifiedFifoData(req);
|
||||||
@@ -580,5 +767,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));
|
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,12 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "PHY/INIT/phy_init.h"
|
||||||
#include "PHY/impl_defs_nr.h"
|
#include "PHY/impl_defs_nr.h"
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
#include "PHY/defs_gNB.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 "common/utils/LOG/log.h"
|
||||||
|
|
||||||
#include "nfapi/oai_integration/vendor_ext.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);
|
free_and_zero(srs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int nr_find_srs(uint16_t rnti,
|
int nr_find_srs(rnti_t rnti,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
PHY_VARS_gNB *gNB) {
|
PHY_VARS_gNB *gNB) {
|
||||||
|
|
||||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
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,
|
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
nfapi_nr_srs_pdu_t *srs_pdu) {
|
nfapi_nr_srs_pdu_t *srs_pdu) {
|
||||||
|
|
||||||
int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB);
|
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 nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||||
int frame,
|
frame_t frame,
|
||||||
int slot,
|
slot_t slot,
|
||||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||||
nr_srs_info_t *nr_srs_info,
|
nr_srs_info_t *nr_srs_info,
|
||||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) {
|
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) {
|
||||||
|
|
||||||
if(nr_srs_info->sc_list_length == 0) {
|
#ifdef SRS_DEBUG
|
||||||
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot);
|
LOG_I(NR_PHY,"Calling %s function\n", __FUNCTION__);
|
||||||
return -1;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
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
|
const 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
|
const 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 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;
|
int32_t *rx_signal;
|
||||||
bool no_srs_signal = true;
|
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));
|
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||||
rx_signal = &rxdataF[ant][symbol_offset];
|
rx_signal = &rxdataF[ant][symbol_offset];
|
||||||
|
|
||||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
for (int p_index = 0; p_index < N_ap; p_index++) {
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef SRS_DEBUG
|
#ifdef SRS_DEBUG
|
||||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
LOG_I(NR_PHY,"===== UE port %d --> gNB Rx antenna %i =====\n", p_index, ant);
|
||||||
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));
|
|
||||||
#endif
|
#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) {
|
if (no_srs_signal) {
|
||||||
LOG_W(NR_PHY, "No SRS signal\n");
|
LOG_W(NR_PHY, "No SRS signal\n");
|
||||||
@@ -152,4 +183,4 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
|||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,29 +57,6 @@ notifiedFIFO_t freeBlocks_dl;
|
|||||||
notifiedFIFO_elt_t *msgToPush_dl;
|
notifiedFIFO_elt_t *msgToPush_dl;
|
||||||
int nbDlProcessing =0;
|
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) {
|
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;
|
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 {
|
} else {
|
||||||
if ( !last ) {
|
if ( !last ) {
|
||||||
int nb=abortTpoolJob(&(pool_dl), req->key);
|
int nb=abortTpoolJob(&get_nrUE_params()->Tpool, req->key);
|
||||||
nb+=abortNotifiedFIFOJob(nf_p, 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,"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);
|
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_deinterleave);
|
||||||
reset_meas(&rdata->ts_rate_unmatch);
|
reset_meas(&rdata->ts_rate_unmatch);
|
||||||
reset_meas(&rdata->ts_ldpc_decode);
|
reset_meas(&rdata->ts_ldpc_decode);
|
||||||
pushTpool(&(pool_dl),req);
|
pushTpool(&get_nrUE_params()->Tpool,req);
|
||||||
nbDecode++;
|
nbDecode++;
|
||||||
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",nbDecode);
|
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",nbDecode);
|
||||||
r_offset += E;
|
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++) {
|
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)
|
if (req == NULL)
|
||||||
break; // Tpool has been stopped
|
break; // Tpool has been stopped
|
||||||
bool last = false;
|
bool last = false;
|
||||||
|
|||||||
@@ -480,45 +480,45 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
nbSymb = dlsch1_harq->nb_symbols;
|
nbSymb = dlsch1_harq->nb_symbols;
|
||||||
pduBitmap = dlsch1_harq->pduBitmap;
|
pduBitmap = dlsch1_harq->pduBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for PTRS bitmap and process it respectively */
|
/* Check for PTRS bitmap and process it respectively */
|
||||||
if((pduBitmap & 0x1) && (type == PDSCH)) {
|
if((pduBitmap & 0x1) && (type == PDSCH)) {
|
||||||
nr_pdsch_ptrs_processing(ue,
|
nr_pdsch_ptrs_processing(ue,
|
||||||
pdsch_vars,
|
pdsch_vars,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
dlsch0_harq,
|
dlsch0_harq,
|
||||||
dlsch1_harq,
|
dlsch1_harq,
|
||||||
gNB_id,
|
gNB_id,
|
||||||
nr_slot_rx,
|
nr_slot_rx,
|
||||||
symbol,
|
symbol,
|
||||||
(nb_rb_pdsch*12),
|
(nb_rb_pdsch*12),
|
||||||
dlsch[0]->rnti,rx_type);
|
dlsch[0]->rnti,rx_type);
|
||||||
pdsch_vars[gNB_id]->dl_valid_re[symbol-1] -= pdsch_vars[gNB_id]->ptrs_re_per_slot[0][symbol];
|
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 */
|
/* at last symbol in a slot calculate LLR's for whole slot */
|
||||||
if(symbol == (startSymbIdx + nbSymb -1)) {
|
if(symbol == (startSymbIdx + nbSymb -1)) {
|
||||||
for(uint8_t i =startSymbIdx; i < (startSymbIdx+nbSymb);i++) {
|
for(uint8_t i =startSymbIdx; i < (startSymbIdx+nbSymb);i++) {
|
||||||
/* re evaluating the first symbol flag as LLR's are done in symbol loop */
|
/* re evaluating the first symbol flag as LLR's are done in symbol loop */
|
||||||
if(i == startSymbIdx && i < 3) {
|
if(i == startSymbIdx && i < 3) {
|
||||||
first_symbol_flag =1;
|
first_symbol_flag =1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
first_symbol_flag=0;
|
first_symbol_flag=0;
|
||||||
}
|
}
|
||||||
/* Calculate LLR's for each symbol */
|
/* Calculate LLR's for each symbol */
|
||||||
nr_dlsch_llr(pdsch_vars, frame_parms,
|
nr_dlsch_llr(pdsch_vars, frame_parms,
|
||||||
rxdataF_comp_ptr, dl_ch_mag_ptr,
|
rxdataF_comp_ptr, dl_ch_mag_ptr,
|
||||||
dlsch0_harq, dlsch1_harq,
|
dlsch0_harq, dlsch1_harq,
|
||||||
rx_type, harq_pid,
|
rx_type, harq_pid,
|
||||||
gNB_id, gNB_id_i,
|
gNB_id, gNB_id_i,
|
||||||
first_symbol_flag,
|
first_symbol_flag,
|
||||||
i, nb_rb_pdsch,
|
i, nb_rb_pdsch,
|
||||||
codeword_TB0, codeword_TB1,
|
codeword_TB0, codeword_TB1,
|
||||||
pdsch_vars[gNB_id]->dl_valid_re[i-1],
|
pdsch_vars[gNB_id]->dl_valid_re[i-1],
|
||||||
nr_slot_rx, beamforming_mode);
|
nr_slot_rx, beamforming_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
int dmrs_type = dlsch[0]->harq_processes[harq_pid]->dmrsConfigType;
|
int dmrs_type = dlsch[0]->harq_processes[harq_pid]->dmrsConfigType;
|
||||||
uint8_t nb_re_dmrs;
|
uint8_t nb_re_dmrs;
|
||||||
uint16_t dmrs_len = get_num_dmrs(dlsch[0]->harq_processes[harq_pid]->dlDmrsSymbPos);
|
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;
|
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]->G = nr_get_G(dlsch[0]->harq_processes[harq_pid]->nb_rb,
|
||||||
dlsch[0]->harq_processes[harq_pid]->nb_symbols,
|
dlsch[0]->harq_processes[harq_pid]->nb_symbols,
|
||||||
nb_re_dmrs,
|
nb_re_dmrs,
|
||||||
dmrs_len,
|
dmrs_len,
|
||||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||||
dlsch[0]->harq_processes[harq_pid]->Nl);
|
dlsch[0]->harq_processes[harq_pid]->Nl);
|
||||||
nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr,
|
nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr,
|
||||||
dlsch[0]->harq_processes[harq_pid]->Nl,
|
dlsch[0]->harq_processes[harq_pid]->Nl,
|
||||||
dlsch[0]->harq_processes[harq_pid]->Qm,
|
dlsch[0]->harq_processes[harq_pid]->Qm,
|
||||||
dlsch[0]->harq_processes[harq_pid]->G,
|
dlsch[0]->harq_processes[harq_pid]->G,
|
||||||
codeword_TB0,
|
codeword_TB0,
|
||||||
codeword_TB1,
|
codeword_TB1,
|
||||||
pdsch_vars[gNB_id]->layer_llr);
|
pdsch_vars[gNB_id]->layer_llr);
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||||
if (cpumeas(CPUMEAS_GETSTATE))
|
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));
|
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
|
// Please keep it: useful for debugging
|
||||||
#ifdef DEBUG_PDSCH_RX
|
#ifdef DEBUG_PDSCH_RX
|
||||||
char filename[50];
|
char filename[50];
|
||||||
uint8_t aa = 0;
|
uint8_t aa = 0;
|
||||||
|
|
||||||
snprintf(filename, 50, "rxdataF0_symb_%d_nr_slot_rx_%d.m", symbol, nr_slot_rx);
|
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);
|
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);
|
||||||
|
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
|
||||||
start_meas(&ue->ulsch_rate_matching_stats);
|
start_meas(&ue->ulsch_rate_matching_stats);
|
||||||
if (nr_rate_matching_ldpc(0,
|
if (nr_rate_matching_ldpc(harq_process->pusch_pdu.tbslbrm,
|
||||||
harq_process->BG,
|
harq_process->BG,
|
||||||
*pz,
|
*pz,
|
||||||
harq_process->d[r],
|
harq_process->d[r],
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user