Merge remote-tracking branch 'origin/develop' into enhancement-ltem
Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/edci.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/mac.h openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_defs.h openair2/RRC/LTE/rrc_eNB.c openair2/RRC/LTE/rrc_eNB_S1AP.c
This commit is contained in:
+197
-217
@@ -115,10 +115,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- cppcheck") {
|
||||
stage ("Start VM -- basic-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,23 +126,7 @@ pipeline {
|
||||
stage ("Start VM -- enb-usrp") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- basic-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- phy-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +134,7 @@ pipeline {
|
||||
stage ("Start VM -- enb-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,7 +142,23 @@ pipeline {
|
||||
stage ("Start VM -- ue-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- phy-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- cppcheck") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Analysis with cppcheck") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNb-USRP") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,16 +187,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build basic-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build physical simulators") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +196,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNb-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +205,16 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build physical simulators") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,7 +252,7 @@ pipeline {
|
||||
archiveArtifacts artifacts: 'archives/vm_build_logs.zip'
|
||||
}
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||
def res=readFile('./oai_warning_files.txt').trim();
|
||||
if ("0".equals(res)) {
|
||||
@@ -263,7 +263,7 @@ pipeline {
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
} else {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
}
|
||||
if(fileExists('build_results.html')) {
|
||||
sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' build_results.html"
|
||||
@@ -280,7 +280,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Test phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -289,205 +289,185 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Test basic-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test on CI bench #1") {
|
||||
stages {
|
||||
stage ("Test FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
stage ("Test FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
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: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// 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
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -504,9 +484,9 @@ pipeline {
|
||||
if(fileExists('archives/vm_tests_logs.zip')) {
|
||||
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
} else {
|
||||
sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
}
|
||||
if(fileExists('test_simulator_results.html')) {
|
||||
sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_simulator_results.html"
|
||||
@@ -519,7 +499,7 @@ pipeline {
|
||||
}
|
||||
stage ("Destroy all Virtual Machines") {
|
||||
steps {
|
||||
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -527,7 +507,7 @@ pipeline {
|
||||
always {
|
||||
script {
|
||||
// Stage destroy may not be run if error in previous stage
|
||||
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
emailext attachmentsPattern: '*results*.html',
|
||||
body: '''Hi,
|
||||
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
||||
|
||||
@@ -53,6 +53,7 @@ def eNB_Repository
|
||||
def eNB_Branch
|
||||
def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
@@ -61,6 +62,7 @@ pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock (ciSmartPhoneResource)
|
||||
}
|
||||
// the following parameter options are commented out so it shows the ones
|
||||
// that you SHALL have to run the job.
|
||||
@@ -149,6 +151,14 @@ pipeline {
|
||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||
if (params.eNB_mergeRequest != null) {
|
||||
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
if (params.eNB_TargetBranch != null) {
|
||||
eNB_TargetBranch = params.eNB_TargetBranch
|
||||
} else {
|
||||
eNB_TargetBranch = 'develop'
|
||||
}
|
||||
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
@@ -184,7 +194,6 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
lock (ciSmartPhoneResource) {
|
||||
try {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
withCredentials([
|
||||
@@ -192,12 +201,11 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${testXMLFile}"
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${testXMLFile}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+123
-343
@@ -20,8 +20,8 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Build Check script"
|
||||
function build_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
@@ -31,9 +31,9 @@ function usage {
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " buildOnVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool build [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -44,356 +44,136 @@ function usage {
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo " --keep-vm-alive OR -k"
|
||||
echo " Keep the VM alive after the build."
|
||||
echo ""
|
||||
echo " --daemon OR -D"
|
||||
echo " Run as daemon"
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function variant_usage {
|
||||
echo "OAI VM Build Check script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ] || [ $# -gt 9 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP"
|
||||
KEEP_VM_ALIVE=0
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-ws|--workspace)
|
||||
JENKINS_WKSP="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-k|--keep-vm-alive)
|
||||
KEEP_VM_ALIVE=1
|
||||
shift
|
||||
;;
|
||||
-v1)
|
||||
VM_NAME=ci-enb-usrp
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
shift
|
||||
;;
|
||||
-v3)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
shift
|
||||
;;
|
||||
-v4)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
shift
|
||||
;;
|
||||
--variant)
|
||||
variant="$2"
|
||||
case $variant in
|
||||
enb-usrp)
|
||||
VM_NAME=ci-enb-usrp
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
;;
|
||||
phy-sim)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
;;
|
||||
cppcheck)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||
echo ""
|
||||
variant_usage
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -f $JENKINS_WKSP/localZip.zip ]
|
||||
then
|
||||
echo "Missing localZip.zip file!"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f /etc/apt/apt.conf.d/01proxy ]
|
||||
then
|
||||
echo "Missing /etc/apt/apt.conf.d/01proxy file!"
|
||||
echo "Is apt-cacher installed and configured?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
VM_CMDS=${VM_NAME}_cmds.txt
|
||||
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
|
||||
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_CMD_FILE = $VM_CMDS"
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
||||
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
fi
|
||||
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Copying GIT repo into VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
scp -o StrictHostKeyChecking=no localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
|
||||
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
|
||||
|
||||
echo "############################################################"
|
||||
echo "Running install and build script on VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
echo "mkdir tmp" >> $VM_CMDS
|
||||
echo "cd tmp" >> $VM_CMDS
|
||||
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
|
||||
echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "mkdir cmake_targets/log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
|
||||
echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
|
||||
echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"source oaienv\"" >> $VM_CMDS
|
||||
echo "source oaienv" >> $VM_CMDS
|
||||
echo "cd cmake_targets/" >> $VM_CMDS
|
||||
echo "mkdir log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
|
||||
echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
|
||||
echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
|
||||
|
||||
echo "############################################################"
|
||||
echo "Creating a tmp folder to store results and artifacts"
|
||||
echo "############################################################"
|
||||
if [ ! -d $JENKINS_WKSP/archives ]
|
||||
then
|
||||
mkdir $JENKINS_WKSP/archives
|
||||
fi
|
||||
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
if [ $KEEP_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "Destroying VM"
|
||||
echo "############################################################"
|
||||
uvt-kvm destroy $VM_NAME
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
fi
|
||||
rm -f $VM_CMDS
|
||||
|
||||
echo "############################################################"
|
||||
echo "Checking build status"
|
||||
echo "############################################################"
|
||||
|
||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
|
||||
STATUS=0
|
||||
NB_FOUND_FILES=0
|
||||
|
||||
for FULLFILE in $LOG_FILES
|
||||
do
|
||||
if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
|
||||
function build_on_vm {
|
||||
if [ ! -f $JENKINS_WKSP/localZip.zip ]
|
||||
then
|
||||
filename=$(basename -- "$FULLFILE")
|
||||
if [ "$LOG_PATTERN" == ".Rel14.txt" ]
|
||||
then
|
||||
PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
|
||||
fi
|
||||
if [ "$LOG_PATTERN" == "basic_simulator" ]
|
||||
then
|
||||
PASS_PATTERN="lte-"
|
||||
fi
|
||||
if [ "$LOG_PATTERN" == "cppcheck.xml" ]
|
||||
then
|
||||
PASS_PATTERN="results version"
|
||||
LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
|
||||
else
|
||||
LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
|
||||
fi
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
|
||||
echo "Missing localZip.zip file!"
|
||||
STATUS=1
|
||||
return
|
||||
fi
|
||||
if [ ! -f /etc/apt/apt.conf.d/01proxy ]
|
||||
then
|
||||
echo "Missing /etc/apt/apt.conf.d/01proxy file!"
|
||||
echo "Is apt-cacher installed and configured?"
|
||||
STATUS=1
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "STATUS seems OK"
|
||||
else
|
||||
echo "STATUS failed?"
|
||||
fi
|
||||
exit $STATUS
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_CMD_FILE = $VM_CMDS"
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
||||
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
fi
|
||||
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Copying GIT repo into VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
|
||||
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
|
||||
|
||||
echo "############################################################"
|
||||
echo "Running install and build script on VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip daemon cppcheck \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
else
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip daemon subversion libboost-dev \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip daemon subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
echo "mkdir tmp" >> $VM_CMDS
|
||||
echo "cd tmp" >> $VM_CMDS
|
||||
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
|
||||
echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "mkdir cmake_targets/log" >> $VM_CMDS
|
||||
echo "chmod 777 cmake_targets/log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
|
||||
echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"cppcheck $BUILD_OPTIONS .\" > ./my-vm-build.sh" >> $VM_CMDS
|
||||
echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
|
||||
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp -O /home/ubuntu/tmp/cmake_targets/log/cppcheck_build.txt -E /home/ubuntu/tmp/cmake_targets/log/cppcheck.xml ./my-vm-build.sh" >> $VM_CMDS
|
||||
fi
|
||||
else
|
||||
echo "echo \"source oaienv\"" >> $VM_CMDS
|
||||
echo "source oaienv" >> $VM_CMDS
|
||||
echo "cd cmake_targets/" >> $VM_CMDS
|
||||
echo "mkdir log" >> $VM_CMDS
|
||||
echo "chmod 777 log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
|
||||
echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"./build_oai -I $BUILD_OPTIONS\" > ./my-vm-build.sh" >> $VM_CMDS
|
||||
echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
|
||||
echo "echo \"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh\"" >> $VM_CMDS
|
||||
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
|
||||
rm -f $VM_CMDS
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 2;
|
||||
nb_antennas_tx = 2;
|
||||
nb_antennas_rx = 2;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -25;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 2;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 115;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -186,7 +186,6 @@ eNBs =
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
@@ -145,11 +145,9 @@ eNBs =
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
|
||||
+22
-150
@@ -20,8 +20,8 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Creation script"
|
||||
function create_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
@@ -31,9 +31,9 @@ function usage {
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " createVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool create [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -41,12 +41,7 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
@@ -54,144 +49,21 @@ function usage {
|
||||
echo ""
|
||||
}
|
||||
|
||||
function variant_usage {
|
||||
echo "OAI VM Build Check script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo ""
|
||||
function create_vm {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ] || [ $# -gt 6 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-v1)
|
||||
VM_NAME=ci-enb-usrp
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
VM_MEMORY=8192
|
||||
shift
|
||||
;;
|
||||
-v3)
|
||||
VM_NAME=ci-phy-sim
|
||||
shift
|
||||
;;
|
||||
-v4)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
VM_CPU=4
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
shift
|
||||
;;
|
||||
--variant)
|
||||
variant="$2"
|
||||
case $variant in
|
||||
enb-usrp)
|
||||
VM_NAME=ci-enb-usrp
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
VM_MEMORY=8192
|
||||
;;
|
||||
phy-sim)
|
||||
VM_NAME=ci-phy-sim
|
||||
;;
|
||||
cppcheck)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
VM_CPU=4
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||
echo ""
|
||||
variant_usage
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
VM_CMDS=${VM_NAME}_cmds.txt
|
||||
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
exit 0
|
||||
|
||||
@@ -20,15 +20,17 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Destroy script"
|
||||
function destroy_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " destroyAllRunningVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool destroy [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -36,66 +38,26 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -gt 4 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
function destroy_vm {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
echo "VM_TEMPLATE = $VM_TEMPLATE"
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
|
||||
|
||||
for CI_VM in $LIST_CI_VM
|
||||
do
|
||||
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
|
||||
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
|
||||
uvt-kvm destroy $CI_VM
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
done
|
||||
|
||||
exit 0
|
||||
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
|
||||
|
||||
for CI_VM in $LIST_CI_VM
|
||||
do
|
||||
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
|
||||
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
|
||||
uvt-kvm destroy $CI_VM
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
done
|
||||
}
|
||||
|
||||
+25
-11
@@ -78,6 +78,7 @@ class SSHConnection():
|
||||
self.eNBBranch = ''
|
||||
self.eNB_AllowMerge = False
|
||||
self.eNBCommitID = ''
|
||||
self.eNBTargetBranch = ''
|
||||
self.eNBUserName = ''
|
||||
self.eNBPassword = ''
|
||||
self.eNBSourceCodePath = ''
|
||||
@@ -264,16 +265,23 @@ class SSHConnection():
|
||||
# if the branch is not develop, then it is a merge request and we need to do
|
||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||
if (self.eNB_AllowMerge):
|
||||
if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'):
|
||||
self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||
if self.eNBTargetBranch == '':
|
||||
if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'):
|
||||
self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||
else:
|
||||
logging.debug('Merging with the target branch: ' + self.eNBTargetBranch)
|
||||
self.command('git merge --ff origin/' + self.eNBTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||
self.command('source oaienv', '\$', 5)
|
||||
self.command('cd cmake_targets', '\$', 5)
|
||||
self.command('mkdir -p log', '\$', 5)
|
||||
self.command('mkdir -p log', '\$', 5)
|
||||
self.command('chmod 777 log', '\$', 5)
|
||||
# no need to remove in log (git clean did the trick)
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_enb.log', 'Bypassing the Tests', 600)
|
||||
self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_enb.log', 'Bypassing the Tests', 600)
|
||||
self.command('mkdir -p build_log_' + SSH.testCase_id, '\$', 5)
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S mv log/* ' + 'build_log_' + SSH.testCase_id, '\$', 5)
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S mv compile_oai_enb.log ' + 'build_log_' + SSH.testCase_id, '\$', 5)
|
||||
self.command('mv log/* ' + 'build_log_' + SSH.testCase_id, '\$', 5)
|
||||
self.command('mv compile_oai_enb.log ' + 'build_log_' + SSH.testCase_id, '\$', 5)
|
||||
# Workaround to run with develop-nr
|
||||
self.command('if [ -e ran_build ]; then cp -rf ran_build lte_build_oai; fi', '\$', 30)
|
||||
self.close()
|
||||
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||
|
||||
@@ -364,10 +372,8 @@ class SSHConnection():
|
||||
rruCheck = True
|
||||
# Make a copy and adapt to EPC / eNB IP addresses
|
||||
self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||
self.command('sed -i -e \'s/mme_ip_address.*$/mme_ip_address = ( { ipv4 = "' + self.EPCIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1_MME.*$/ENB_IPV4_ADDRESS_FOR_S1_MME = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1U.*$/ENB_IPV4_ADDRESS_FOR_S1U = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_X2C.*$/ENB_IPV4_ADDRESS_FOR_X2C = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_MME_IP_ADDR/' + self.EPCIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
# Launch eNB with the modified config file
|
||||
self.command('source oaienv', '\$', 5)
|
||||
self.command('cd cmake_targets', '\$', 5)
|
||||
@@ -1756,7 +1762,10 @@ class SSHConnection():
|
||||
if (SSH.eNB_AllowMerge):
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >Target Branch</td>\n')
|
||||
self.htmlFile.write(' <td>develop</td>\n')
|
||||
if (self.eNBTargetBranch == ''):
|
||||
self.htmlFile.write(' <td>develop</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>' + self.eNBTargetBranch + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
|
||||
@@ -1903,6 +1912,8 @@ def Usage():
|
||||
print(' --eNBRepository=[eNB\'s Repository URL]')
|
||||
print(' --eNBBranch=[eNB\'s Branch Name]')
|
||||
print(' --eNBCommitID=[eNB\'s Commit Number]')
|
||||
print(' --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)]')
|
||||
print(' --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request]')
|
||||
print(' --eNBUserName=[eNB\'s Login User Name]')
|
||||
print(' --eNBPassword=[eNB\'s Login Password]')
|
||||
print(' --eNBSourceCodePath=[eNB\'s Source Code Path]')
|
||||
@@ -1999,6 +2010,9 @@ while len(argvs) > 1:
|
||||
elif re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
SSH.eNBCommitID = matchReg.group(1)
|
||||
elif re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
SSH.eNBTargetBranch = matchReg.group(1)
|
||||
elif re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
SSH.eNBUserName = matchReg.group(1)
|
||||
|
||||
Executable
+537
@@ -0,0 +1,537 @@
|
||||
#!/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
|
||||
# */
|
||||
|
||||
function top_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
echo " -- xenial image already synced"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " oai-ci-vm-tool (-h|--help) {create,destroy,build,wait,test,report-build,report-test} ..."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function variant_usage {
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
}
|
||||
|
||||
MY_DIR=$(dirname $(readlink -f $0))
|
||||
. $MY_DIR/createVM.sh
|
||||
. $MY_DIR/buildOnVM.sh
|
||||
. $MY_DIR/waitBuildOnVM.sh
|
||||
. $MY_DIR/destroyAllRunningVM.sh
|
||||
. $MY_DIR/runTestOnVM.sh
|
||||
. $MY_DIR/reportBuildLocally.sh
|
||||
. $MY_DIR/reportTestLocally.sh
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Syntax Error: too few arguments"
|
||||
echo ""
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP"
|
||||
KEEP_VM_ALIVE=0
|
||||
RUN_OPTIONS="none"
|
||||
DAEMON=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
|
||||
HELP_CMD=0
|
||||
CREATE_CMD=0
|
||||
BUILD_CMD=0
|
||||
WAIT_CMD=0
|
||||
DESTROY_CMD=0
|
||||
TEST_CMD=0
|
||||
REPORT_BUILD_CMD=0
|
||||
REPORT_TEST_CMD=0
|
||||
NBARGS=0
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
HELP_CMD=1
|
||||
shift
|
||||
;;
|
||||
create)
|
||||
CREATE_CMD=1
|
||||
# It is implied to keep the VM when creating it
|
||||
KEEP_VM_ALIVE=1
|
||||
shift
|
||||
;;
|
||||
build)
|
||||
BUILD_CMD=1
|
||||
shift
|
||||
;;
|
||||
wait)
|
||||
WAIT_CMD=1
|
||||
shift
|
||||
;;
|
||||
test)
|
||||
TEST_CMD=1
|
||||
shift
|
||||
;;
|
||||
destroy)
|
||||
DESTROY_CMD=1
|
||||
shift
|
||||
;;
|
||||
report-build)
|
||||
REPORT_BUILD_CMD=1
|
||||
shift
|
||||
;;
|
||||
report-test)
|
||||
REPORT_TEST_CMD=1
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
NBARGS=$[$NBARGS+1]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
NBARGS=$[$NBARGS+2]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-ws|--workspace)
|
||||
JENKINS_WKSP="$2"
|
||||
NBARGS=$[$NBARGS+4]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-k|--keep-vm-alive)
|
||||
KEEP_VM_ALIVE=1
|
||||
NBARGS=$[$NBARGS+8]
|
||||
shift
|
||||
;;
|
||||
-D|--daemon)
|
||||
DAEMON=1
|
||||
NBARGS=$[$NBARGS+16]
|
||||
shift
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
NBARGS=$[$NBARGS+32]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+1024]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+2048]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+4096]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+8192]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+16384]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+32768]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-v1)
|
||||
VM_NAME=ci-enb-usrp
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v3)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v4)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
--variant)
|
||||
variant="$2"
|
||||
case $variant in
|
||||
enb-usrp)
|
||||
VM_NAME=ci-enb-usrp
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
phy-sim)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
cppcheck)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=8192
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||
echo ""
|
||||
variant_usage
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
top_usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
MANY_CMDS=$[$CREATE_CMD+$BUILD_CMD+$WAIT_CMD+$DESTROY_CMD+$TEST_CMD+$REPORT_BUILD_CMD+$REPORT_TEST_CMD]
|
||||
if [ $MANY_CMDS -gt 1 ]
|
||||
then
|
||||
echo "Syntax Error: too many commands"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $HELP_CMD -eq 1 ]
|
||||
then
|
||||
if [ $MANY_CMDS -eq 0 ]
|
||||
then
|
||||
top_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $CREATE_CMD -eq 1 ]
|
||||
then
|
||||
create_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $BUILD_CMD -eq 1 ]
|
||||
then
|
||||
build_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $WAIT_CMD -eq 1 ]
|
||||
then
|
||||
wait_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $TEST_CMD -eq 1 ]
|
||||
then
|
||||
run_test_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $DESTROY_CMD -eq 1 ]
|
||||
then
|
||||
destroy_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ]
|
||||
then
|
||||
report_build_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $REPORT_TEST_CMD -eq 1 ]
|
||||
then
|
||||
report_test_usage
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ $MANY_CMDS -eq 0 ]
|
||||
then
|
||||
echo "Syntax Error: no command"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
# For create, mandatory options: jn, id. Optional: variant
|
||||
if [ $CREATE_CMD -eq 1 ] && [ $NBARGS -ne 3 ] && [ $NBARGS -ne 259 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for create command"
|
||||
create_usage
|
||||
exit 1
|
||||
fi
|
||||
# For build, mandatory options: jn, id, ws. Optional: variant, k, D
|
||||
if [ $BUILD_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ] && [ $NBARGS -ne 23 ] && [ $NBARGS -ne 279 ] && [ $NBARGS -ne 31 ] && [ $NBARGS -ne 287 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for build command"
|
||||
build_usage
|
||||
exit 1
|
||||
fi
|
||||
# For wait, mandatory options: jn, id, ws. Optional: variant, k
|
||||
if [ $WAIT_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for wait command"
|
||||
wait_usage
|
||||
exit 1
|
||||
fi
|
||||
# For test, mandatory options: jn, id, ws. Optional: variant, k
|
||||
if [ $TEST_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for test command"
|
||||
run_test_usage
|
||||
exit 1
|
||||
fi
|
||||
# For destroy, mandatory options: jn, id.
|
||||
if [ $DESTROY_CMD -eq 1 ] && [ $NBARGS -ne 3 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for destroy command"
|
||||
destroy_usage
|
||||
exit 1
|
||||
fi
|
||||
# For report-build, mandatory options: jn, id, ws, gu, pu, br,co.
|
||||
# or: jn, id, ws, gu, mr, sb, sc, tb, tc.
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for report-build command"
|
||||
report_build_usage
|
||||
exit 1
|
||||
fi
|
||||
# For report-test, mandatory options: jn, id, ws, gu, pu, br,co.
|
||||
# or: jn, id, ws, gu, mr, sb, sc, tb, tc.
|
||||
if [ $REPORT_TEST_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for report-test command"
|
||||
report_test_usage
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checking uvt-kvm is installed
|
||||
UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
|
||||
if [ $UVT_KVM_PATH -eq 0 ]
|
||||
then
|
||||
echo "Error: uvt-kvm is not installed"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
VM_CMDS=${VM_NAME}_cmds.txt
|
||||
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
|
||||
|
||||
STATUS=0
|
||||
if [ $CREATE_CMD -eq 1 ]
|
||||
then
|
||||
create_vm
|
||||
fi
|
||||
if [ $BUILD_CMD -eq 1 ]
|
||||
then
|
||||
build_on_vm
|
||||
if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
|
||||
then
|
||||
check_on_vm_build
|
||||
fi
|
||||
fi
|
||||
if [ $WAIT_CMD -eq 1 ]
|
||||
then
|
||||
wait_on_vm_build
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
check_on_vm_build
|
||||
fi
|
||||
fi
|
||||
if [ $TEST_CMD -eq 1 ]
|
||||
then
|
||||
ARCHIVES_LOC=${ARCHIVES_LOC}/test
|
||||
run_test_on_vm
|
||||
fi
|
||||
if [ $DESTROY_CMD -eq 1 ]
|
||||
then
|
||||
destroy_vm
|
||||
fi
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ]
|
||||
then
|
||||
report_build
|
||||
fi
|
||||
if [ $REPORT_TEST_CMD -eq 1 ]
|
||||
then
|
||||
report_test
|
||||
fi
|
||||
|
||||
# Did command pass or fail?
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "STATUS seems OK"
|
||||
else
|
||||
echo "STATUS failed?"
|
||||
fi
|
||||
exit $STATUS
|
||||
+218
-325
@@ -20,14 +20,13 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI Local Build Report script"
|
||||
function report_build_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo ""
|
||||
echo " reportBuildLocally.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool report-build [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
@@ -47,6 +46,9 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
@@ -79,7 +81,7 @@ function usage {
|
||||
}
|
||||
|
||||
function trigger_usage {
|
||||
echo "OAI Local Build Report script"
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
@@ -103,7 +105,7 @@ function details_table {
|
||||
COMPLETE_MESSAGE="start"
|
||||
for MESSAGE in $LIST_MESSAGES
|
||||
do
|
||||
if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]]
|
||||
if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]] || [[ $MESSAGE == *"/tmp/CI-eNB"* ]]
|
||||
then
|
||||
FILENAME=`echo $MESSAGE | sed -e "s#^/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" | awk -F ":" '{print $1}'`
|
||||
LINENB=`echo $MESSAGE | awk -F ":" '{print $2}'`
|
||||
@@ -153,8 +155,8 @@ function summary_table_row {
|
||||
echo " <td bgcolor = \"lightcyan\" >$1</th>" >> ./build_results.html
|
||||
if [ -f $2 ]
|
||||
then
|
||||
STATUS=`egrep -c "$3" $2`
|
||||
if [ $STATUS -eq 1 ]
|
||||
BUILD_STATUS=`egrep -c "$3" $2`
|
||||
if [ $BUILD_STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
@@ -263,342 +265,233 @@ function sca_summary_table_footer {
|
||||
echo " <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
|
||||
}
|
||||
|
||||
jb_checker=0
|
||||
mr_checker=0
|
||||
pu_checker=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
function report_build {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
let "jb_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
let "jb_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
let "jb_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "mr_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "mr_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "pu_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "pu_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
|
||||
done
|
||||
|
||||
if [ $jb_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing job information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: trigger action incoherent."
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $pu_checker -ne 3 ]
|
||||
cd ${JENKINS_WKSP}
|
||||
echo "<!DOCTYPE html>" > ./build_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
|
||||
echo "<head>" >> ./build_results.html
|
||||
echo " <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
|
||||
echo " <base href = \"http://www.openairinterface.org/\" />" >> ./build_results.html
|
||||
echo "</head>" >> ./build_results.html
|
||||
echo "<body>" >> ./build_results.html
|
||||
echo " <table style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <tr style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <a href=\"http://www.openairinterface.org/\">" >> ./build_results.html
|
||||
echo " <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./build_results.html
|
||||
echo " </img>" >> ./build_results.html
|
||||
echo " </a>" >> ./build_results.html
|
||||
echo " </td>" >> ./build_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./build_results.html
|
||||
echo " <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./build_results.html
|
||||
echo " </td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
echo " <table border = \"1\">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./build_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
|
||||
echo " <td>$GIT_URL</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing push information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $mr_checker -ne 15 ]
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing merge-request information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
echo "<!DOCTYPE html>" > ./build_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
|
||||
echo "<head>" >> ./build_results.html
|
||||
echo " <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
|
||||
echo " <base href = \"http://www.openairinterface.org/\" />" >> ./build_results.html
|
||||
echo "</head>" >> ./build_results.html
|
||||
echo "<body>" >> ./build_results.html
|
||||
echo " <table style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <tr style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
|
||||
echo " <a href=\"http://www.openairinterface.org/\">" >> ./build_results.html
|
||||
echo " <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./build_results.html
|
||||
echo " </img>" >> ./build_results.html
|
||||
echo " </a>" >> ./build_results.html
|
||||
echo " </td>" >> ./build_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./build_results.html
|
||||
echo " <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./build_results.html
|
||||
echo " </td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
echo " <table border = \"1\">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./build_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
|
||||
echo " <td>$GIT_URL</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
then
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
else
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ -f ./oai_rules_result_list.txt ]
|
||||
then
|
||||
awk '{print " <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
then
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
else
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ -f ./oai_rules_result_list.txt ]
|
||||
then
|
||||
awk '{print " <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
|
||||
fi
|
||||
echo " </table>" >> ./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
|
||||
fi
|
||||
echo " </table>" >> ./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
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
|
||||
echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
|
||||
|
||||
sca_summary_table_header "OAI Static Code Analysis with CPPCHECK"
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access out of bounds" arrayIndexOutOfBounds
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder
|
||||
sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
|
||||
sca_summary_table_header "OAI Static Code Analysis with CPPCHECK"
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access out of bounds" arrayIndexOutOfBounds
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds
|
||||
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder
|
||||
sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
|
||||
|
||||
summary_table_header "OAI Build eNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
|
||||
summary_table_footer
|
||||
summary_table_header "OAI Build eNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
|
||||
summary_table_footer
|
||||
|
||||
summary_table_header "OAI Build basic simulator option"
|
||||
summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html
|
||||
summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html
|
||||
summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html
|
||||
summary_table_footer
|
||||
summary_table_header "OAI Build basic simulator option"
|
||||
summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html
|
||||
summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html
|
||||
summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html
|
||||
summary_table_footer
|
||||
|
||||
summary_table_header "OAI Build Physical simulators option"
|
||||
summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html
|
||||
summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.html
|
||||
summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html
|
||||
summary_table_footer
|
||||
summary_table_header "OAI Build Physical simulators option"
|
||||
summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html
|
||||
summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.html
|
||||
summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html
|
||||
summary_table_footer
|
||||
|
||||
summary_table_header "OAI Build eNB -- ETHERNET transport option"
|
||||
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
summary_table_header "OAI Build UE -- ETHERNET transport option"
|
||||
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||
summary_table_footer
|
||||
if [ -f archives/gnb_usrp/nr-softmodem.Rel14.txt ]
|
||||
then
|
||||
summary_table_header "OAI Build gNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/gnb_usrp/nr-softmodem.Rel14.txt "Built target nr-softmodem" ./gnb_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/gnb_usrp/coding.Rel14.txt "Built target coding" ./gnb_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/gnb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./gnb_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/gnb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./gnb_usrp_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
echo " <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
|
||||
if [ -f archives/nrue_usrp/nr-uesoftmodem.Rel14.txt ]
|
||||
then
|
||||
summary_table_header "OAI Build 5G NR UE -- USRP option"
|
||||
summary_table_row "UE SoftModem - Release 14" ./archives/nrue_usrp/nr-uesoftmodem.Rel14.txt "Built target nr-uesoftmodem" ./nrue_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/nrue_usrp/coding.Rel14.txt "Built target coding" ./nrue_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/nrue_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./nrue_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/nrue_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./nrue_usrp_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
summary_table_header "Red Hat -- OAI Build eNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
|
||||
summary_table_footer
|
||||
summary_table_header "OAI Build eNB -- ETHERNET transport option"
|
||||
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
echo " <h3>Details</h3>" >> ./build_results.html
|
||||
summary_table_header "OAI Build UE -- ETHERNET transport option"
|
||||
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./basic_sim_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./phy_sim_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html ./enb_eth_row*.html ./ue_eth_row*.html ./enb_usrp_rh_row*.html
|
||||
if [ -e ./archives/red_hat ]
|
||||
then
|
||||
echo " <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
|
||||
|
||||
echo "</body>" >> ./build_results.html
|
||||
echo "</html>" >> ./build_results.html
|
||||
summary_table_header "Red Hat -- OAI Build eNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
exit 0
|
||||
echo " <h3>Details</h3>" >> ./build_results.html
|
||||
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./basic_sim_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./phy_sim_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
|
||||
for DETAILS_TABLE in `ls ./gnb_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
if [ -e ./archives/red_hat ]
|
||||
then
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
fi
|
||||
rm -f ./*_row*.html
|
||||
|
||||
echo "</body>" >> ./build_results.html
|
||||
echo "</html>" >> ./build_results.html
|
||||
}
|
||||
|
||||
+342
-478
@@ -20,14 +20,13 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI Test Report script"
|
||||
function report_test_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo ""
|
||||
echo " reportTestLocally.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool report-test [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
@@ -47,6 +46,9 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
@@ -78,513 +80,375 @@ function usage {
|
||||
echo ""
|
||||
}
|
||||
|
||||
function trigger_usage {
|
||||
echo "OAI Test Report script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
echo ""
|
||||
}
|
||||
function report_test {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
jb_checker=0
|
||||
mr_checker=0
|
||||
pu_checker=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
let "jb_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
let "jb_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
let "jb_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "mr_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "mr_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "pu_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "pu_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
if [ $jb_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing job information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: trigger action incoherent."
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $pu_checker -ne 3 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing push information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $mr_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing merge-request information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "<!DOCTYPE html>" > ./test_simulator_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./test_simulator_results.html
|
||||
echo "<head>" >> ./test_simulator_results.html
|
||||
echo " <title>Simulator Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./test_simulator_results.html
|
||||
echo " <base href = \"http://www.openairinterface.org/\" />" >> ./test_simulator_results.html
|
||||
echo "</head>" >> ./test_simulator_results.html
|
||||
echo "<body>" >> ./test_simulator_results.html
|
||||
echo " <table style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <tr style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <a href=\"http://www.openairinterface.org/\">" >> ./test_simulator_results.html
|
||||
echo " <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./test_simulator_results.html
|
||||
echo " </img>" >> ./test_simulator_results.html
|
||||
echo " </a>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./test_simulator_results.html
|
||||
echo " <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
echo " <br>" >> ./test_simulator_results.html
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./test_simulator_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./test_simulator_results.html
|
||||
echo " <td><a href=\"$GIT_URL\">$GIT_URL</a></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./test_simulator_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./test_simulator_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./test_simulator_results.html; fi
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
echo " <h2>Test Summary</h2>" >> ./test_simulator_results.html
|
||||
|
||||
ARCHIVES_LOC=archives/basic_sim/test
|
||||
if [ -d $ARCHIVES_LOC ]
|
||||
then
|
||||
echo " <h3>Basic Simulator Check</h3>" >> ./test_simulator_results.html
|
||||
cd ${JENKINS_WKSP}
|
||||
|
||||
echo "<!DOCTYPE html>" > ./test_simulator_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./test_simulator_results.html
|
||||
echo "<head>" >> ./test_simulator_results.html
|
||||
echo " <title>Simulator Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./test_simulator_results.html
|
||||
echo " <base href = \"http://www.openairinterface.org/\" />" >> ./test_simulator_results.html
|
||||
echo "</head>" >> ./test_simulator_results.html
|
||||
echo "<body>" >> ./test_simulator_results.html
|
||||
echo " <table style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <tr style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
|
||||
echo " <a href=\"http://www.openairinterface.org/\">" >> ./test_simulator_results.html
|
||||
echo " <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./test_simulator_results.html
|
||||
echo " </img>" >> ./test_simulator_results.html
|
||||
echo " </a>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
echo " <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./test_simulator_results.html
|
||||
echo " <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
echo " <br>" >> ./test_simulator_results.html
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
|
||||
echo " <th>Log File Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Command</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Status</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Statistics</th>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./test_simulator_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./test_simulator_results.html
|
||||
echo " <td><a href=\"$GIT_URL\">$GIT_URL</a></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./test_simulator_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./test_simulator_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./test_simulator_results.html; fi
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
echo " <h2>Test Summary</h2>" >> ./test_simulator_results.html
|
||||
|
||||
TRANS_MODES=("fdd" "tdd")
|
||||
BW_CASES=(05 10 20)
|
||||
for TMODE in ${TRANS_MODES[@]}
|
||||
do
|
||||
for BW in ${BW_CASES[@]}
|
||||
ARCHIVES_LOC=archives/basic_sim/test
|
||||
if [ -d $ARCHIVES_LOC ]
|
||||
then
|
||||
echo " <h3>Basic Simulator Check</h3>" >> ./test_simulator_results.html
|
||||
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
|
||||
echo " <th>Log File Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Command</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Status</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Statistics</th>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
|
||||
TRANS_MODES=("fdd" "tdd")
|
||||
BW_CASES=(05 10 20)
|
||||
for TMODE in ${TRANS_MODES[@]}
|
||||
do
|
||||
ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_enb.log
|
||||
UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
|
||||
if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
|
||||
then
|
||||
NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
|
||||
echo " <td>N/A</td>" >> ./test_simulator_results.html
|
||||
NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
|
||||
NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG`
|
||||
NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG`
|
||||
if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
|
||||
for BW in ${BW_CASES[@]}
|
||||
do
|
||||
ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_enb.log
|
||||
UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
|
||||
if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td><pre>" >> ./test_simulator_results.html
|
||||
if [ $NB_ENB_GOT_SYNC -eq 1 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_UE_GOT_SYNC -eq 2 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- UE --> got sync</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- UE NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- UE attached to eNB</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
|
||||
if [ $NB_SEGFAULT_ENB -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
|
||||
if [ $NB_SEGFAULT_UE -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- UE --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
|
||||
if [ $NB_ASSERTION_ENB -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
|
||||
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
|
||||
if [ $NB_ASSERTION_UE -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
|
||||
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </pre></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt
|
||||
if [ -f $PING_CASE ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"`
|
||||
echo " <td>$CMD</td>" >> ./test_simulator_results.html
|
||||
FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE`
|
||||
if [ $FILE_COMPLETE -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
|
||||
echo " <td>N/A</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"`
|
||||
NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"`
|
||||
if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ]
|
||||
NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
|
||||
NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG`
|
||||
NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG`
|
||||
if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td><pre>" >> ./test_simulator_results.html
|
||||
if [ $NB_ENB_GOT_SYNC -eq 1 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_UE_GOT_SYNC -eq 2 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- UE --> got sync</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- UE NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- UE attached to eNB</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
|
||||
if [ $NB_SEGFAULT_ENB -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
|
||||
if [ $NB_SEGFAULT_UE -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- UE --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
|
||||
if [ $NB_ASSERTION_ENB -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
|
||||
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
|
||||
fi
|
||||
NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
|
||||
if [ $NB_ASSERTION_UE -ne 0 ]
|
||||
then
|
||||
echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
|
||||
awk 'BEGIN{assertion=10}{if(assertion < 3){print " " $0; assertion++};if ($0 ~/Assertion/){print " " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </pre></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt
|
||||
if [ -f $PING_CASE ]
|
||||
then
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"`
|
||||
echo " <td>$CMD</td>" >> ./test_simulator_results.html
|
||||
FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE`
|
||||
if [ $FILE_COMPLETE -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
echo " <td>N/A</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"`
|
||||
NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"`
|
||||
if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td>" >> ./test_simulator_results.html
|
||||
echo " <pre>" >> ./test_simulator_results.html
|
||||
STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
|
||||
echo "Packet Loss : $STATS" >> ./test_simulator_results.html
|
||||
RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
|
||||
echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
|
||||
RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
|
||||
echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
|
||||
RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
|
||||
echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
|
||||
echo " </pre>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
|
||||
if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ]
|
||||
then
|
||||
IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt`
|
||||
else
|
||||
echo "There are no iperf files"
|
||||
IPERF_TESTS=""
|
||||
fi
|
||||
for IPERF_CASE in $IPERF_TESTS
|
||||
do
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"`
|
||||
echo " <td>$CMD</td>" >> ./test_simulator_results.html
|
||||
REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"`
|
||||
if [[ $REQ_BITRATE =~ .*K.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l`
|
||||
fi
|
||||
if [[ $REQ_BITRATE =~ .*M.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l`
|
||||
fi
|
||||
if [[ $REQ_BITRATE =~ .*G.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l`
|
||||
fi
|
||||
FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE`
|
||||
if [ $FILE_COMPLETE -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"`
|
||||
FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'`
|
||||
EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'`
|
||||
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
||||
JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'`
|
||||
PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'`
|
||||
PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"`
|
||||
else
|
||||
EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l`
|
||||
fi
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l`
|
||||
fi
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l`
|
||||
fi
|
||||
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
||||
PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
|
||||
if [[ $PERF_INT -lt 90 ]]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
||||
JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
|
||||
PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
|
||||
fi
|
||||
echo " <td>" >> ./test_simulator_results.html
|
||||
echo " <pre>" >> ./test_simulator_results.html
|
||||
STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
|
||||
echo "Packet Loss : $STATS" >> ./test_simulator_results.html
|
||||
RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
|
||||
echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
|
||||
RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
|
||||
echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
|
||||
RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
|
||||
echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
|
||||
echo "Bitrate : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
|
||||
echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
|
||||
echo "Jitter : $JITTER" >> ./test_simulator_results.html
|
||||
echo "Packet Loss : $PACKETLOSS" >> ./test_simulator_results.html
|
||||
echo " </pre>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
|
||||
if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ]
|
||||
then
|
||||
IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt`
|
||||
else
|
||||
echo "There are no iperf files"
|
||||
IPERF_TESTS=""
|
||||
fi
|
||||
for IPERF_CASE in $IPERF_TESTS
|
||||
do
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"`
|
||||
echo " <td>$CMD</td>" >> ./test_simulator_results.html
|
||||
REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"`
|
||||
if [[ $REQ_BITRATE =~ .*K.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l`
|
||||
fi
|
||||
if [[ $REQ_BITRATE =~ .*M.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l`
|
||||
fi
|
||||
if [[ $REQ_BITRATE =~ .*G.* ]]
|
||||
then
|
||||
REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"`
|
||||
FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l`
|
||||
fi
|
||||
FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE`
|
||||
if [ $FILE_COMPLETE -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"`
|
||||
FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'`
|
||||
EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'`
|
||||
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
||||
JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'`
|
||||
PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'`
|
||||
PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"`
|
||||
else
|
||||
EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l`
|
||||
fi
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l`
|
||||
fi
|
||||
if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]]
|
||||
then
|
||||
EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"`
|
||||
FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l`
|
||||
fi
|
||||
PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
|
||||
PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
|
||||
if [[ $PERF_INT -lt 90 ]]
|
||||
then
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
|
||||
JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
|
||||
PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
|
||||
fi
|
||||
echo " <td>" >> ./test_simulator_results.html
|
||||
echo " <pre>" >> ./test_simulator_results.html
|
||||
echo "Bitrate : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
|
||||
echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
|
||||
echo "Jitter : $JITTER" >> ./test_simulator_results.html
|
||||
echo "Packet Loss : $PACKETLOSS" >> ./test_simulator_results.html
|
||||
echo " </pre>" >> ./test_simulator_results.html
|
||||
echo " </td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
fi
|
||||
|
||||
ARCHIVES_LOC=archives/phy_sim/test
|
||||
if [ -d $ARCHIVES_LOC ]
|
||||
then
|
||||
echo " <h3>Physical Simulators Check</h3>" >> ./test_simulator_results.html
|
||||
ARCHIVES_LOC=archives/phy_sim/test
|
||||
if [ -d $ARCHIVES_LOC ]
|
||||
then
|
||||
echo " <h3>Physical Simulators Check</h3>" >> ./test_simulator_results.html
|
||||
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
|
||||
echo " <th>Log File Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Tests</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Errors</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Failures</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Failures</th>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
|
||||
XML_TESTS=`ls $ARCHIVES_LOC/*xml`
|
||||
for XML_FILE in $XML_TESTS
|
||||
do
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $XML_FILE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NB_TESTS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*tests='##" -e "s#' *time=.*##"`
|
||||
NB_ERRORS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*errors='##" -e "s#' *failures=.*##"`
|
||||
NB_FAILURES=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*failures='##" -e "s#' *hostname=.*##"`
|
||||
NB_SKIPPED=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*skipped='##" -e "s#' *tests=.*##"`
|
||||
if [ $NB_ERRORS -eq 0 ] && [ $NB_FAILURES -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$NAME</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$NAME</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td>$NB_TESTS</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_ERRORS</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_FAILURES</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_SKIPPED</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
done
|
||||
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
|
||||
echo " <h4>Details</h4>" >> ./test_simulator_results.html
|
||||
for XML_FILE in $XML_TESTS
|
||||
do
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
|
||||
echo " <th>Test Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Description</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Result</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Time</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Log File Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Tests</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Errors</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Failures</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Nb Failures</th>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
TESTCASES_LIST=`sed -e "s# #@#g" $XML_FILE | grep testcase`
|
||||
for TESTCASE in $TESTCASES_LIST
|
||||
|
||||
XML_TESTS=`ls $ARCHIVES_LOC/*xml`
|
||||
for XML_FILE in $XML_TESTS
|
||||
do
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
NAME=`echo $TESTCASE | sed -e "s#^.*name='##" -e "s#'@description=.*##" | sed -e "s#@# #g"`
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
DESC=`echo $TESTCASE | sed -e "s#^.*description='##" -e "s#'@Run_result=.*##" | sed -e "s#@# #g"`
|
||||
echo " <td>$DESC</td>" >> ./test_simulator_results.html
|
||||
RESULT=`echo $TESTCASE | sed -e "s#^.*RESULT='##" -e "s#'.*##" | sed -e "s#@# #g"`
|
||||
if [[ $RESULT =~ .*PASS.* ]]
|
||||
NAME=`echo $XML_FILE | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NB_TESTS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*tests='##" -e "s#' *time=.*##"`
|
||||
NB_ERRORS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*errors='##" -e "s#' *failures=.*##"`
|
||||
NB_FAILURES=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*failures='##" -e "s#' *hostname=.*##"`
|
||||
NB_SKIPPED=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*skipped='##" -e "s#' *tests=.*##"`
|
||||
if [ $NB_ERRORS -eq 0 ] && [ $NB_FAILURES -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$RESULT</td>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"green\" >$NAME</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$RESULT</td>" >> ./test_simulator_results.html
|
||||
echo " <td bgcolor = \"red\" >$NAME</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
TIME=`echo $TESTCASE | sed -e "s#^.*time='##" -e "s#'@RESULT=.*##" | sed -e "s#@# #g"`
|
||||
echo " <td>$TIME</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_TESTS</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_ERRORS</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_FAILURES</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$NB_SKIPPED</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
done
|
||||
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
done
|
||||
fi
|
||||
|
||||
echo "</body>" >> ./test_simulator_results.html
|
||||
echo "</html>" >> ./test_simulator_results.html
|
||||
echo " <h4>Details</h4>" >> ./test_simulator_results.html
|
||||
for XML_FILE in $XML_TESTS
|
||||
do
|
||||
echo " <table border = \"1\">" >> ./test_simulator_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
|
||||
echo " <th>Test Name</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Description</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Result</th>" >> ./test_simulator_results.html
|
||||
echo " <th>Time</th>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
PREV_SECTION=0
|
||||
PREV_TIME_IN_SECS=0
|
||||
TESTCASES_LIST=`sed -e "s# #@#g" $XML_FILE | grep testcase`
|
||||
for TESTCASE in $TESTCASES_LIST
|
||||
do
|
||||
NAME=`echo $TESTCASE | sed -e "s#^.*name='##" -e "s#'@description=.*##" | sed -e "s#@# #g"`
|
||||
SECTION=`echo $NAME | sed -e "s#\..*##"`
|
||||
if [ $SECTION != $PREV_SECTION ]
|
||||
then
|
||||
echo " <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html
|
||||
echo " <td align = \"center\" colspan = 4 >\"$SECTION\" series</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
PREV_SECTION=$SECTION
|
||||
PREV_TIME_IN_SECS=0
|
||||
fi
|
||||
DESC=`echo $TESTCASE | sed -e "s#^.*description='##" -e "s#'@Run_result=.*##" | sed -e "s#@# #g"`
|
||||
RESULT=`echo $TESTCASE | sed -e "s#^.*RESULT='##" -e "s#'.*##" | sed -e "s#@# #g"`
|
||||
TIME_IN_SECS=`echo $TESTCASE | sed -e "s#^.*time='##" -e "s#'@RESULT=.*##" | sed -e "s#@# #g" -e "s# s.*##"`
|
||||
TIME=`echo "$TIME_IN_SECS - $PREV_TIME_IN_SECS" | bc -l | awk '{printf "%.2f s", $0}'`
|
||||
PREV_TIME_IN_SECS=$TIME_IN_SECS
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td>$NAME</td>" >> ./test_simulator_results.html
|
||||
echo " <td>$DESC</td>" >> ./test_simulator_results.html
|
||||
if [[ $RESULT =~ .*PASS.* ]]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$RESULT</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
SPLITTED_LINE=`echo -e $TESTCASE | sed -e "s#@#\n#g"`
|
||||
NB_RUNS=`echo -e "${SPLITTED_LINE}" | grep -v Run_result | egrep -c "Run_"`
|
||||
NB_FAILS=`echo -e "${SPLITTED_LINE}" | grep -v Run_result | egrep -c "=FAIL"`
|
||||
echo " <td bgcolor = \"red\" >${RESULT} (${NB_FAILS}/${NB_RUNS})</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td>$TIME</td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
done
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
echo "</body>" >> ./test_simulator_results.html
|
||||
echo "</html>" >> ./test_simulator_results.html
|
||||
}
|
||||
|
||||
+556
-683
File diff suppressed because it is too large
Load Diff
Executable
+170
@@ -0,0 +1,170 @@
|
||||
#!/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
|
||||
# */
|
||||
|
||||
function wait_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
echo " -- xenial image already synced"
|
||||
echo " Default:"
|
||||
echo " -- eNB with USRP"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " oai-ci-vm-tool wait [OPTIONS]"
|
||||
echo ""
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
echo ""
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --keep-vm-alive OR -k"
|
||||
echo " Keep the VM alive after the build."
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function wait_on_vm_build {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_CMD_FILE = $VM_CMDS"
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
||||
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "You should have created the VM before doing anything"
|
||||
echo "############################################################"
|
||||
STATUS=1
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Waiting build process to end on VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS
|
||||
echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"ps -aux | grep build \"" >> $VM_CMDS
|
||||
echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
|
||||
fi
|
||||
|
||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
|
||||
rm -f $VM_CMDS
|
||||
}
|
||||
|
||||
function check_on_vm_build {
|
||||
echo "############################################################"
|
||||
echo "Creating a tmp folder to store results and artifacts"
|
||||
echo "############################################################"
|
||||
if [ ! -d $JENKINS_WKSP/archives ]
|
||||
then
|
||||
mkdir $JENKINS_WKSP/archives
|
||||
fi
|
||||
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
if [ $KEEP_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "Destroying VM"
|
||||
echo "############################################################"
|
||||
uvt-kvm destroy $VM_NAME
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
fi
|
||||
rm -f $VM_CMDS
|
||||
|
||||
echo "############################################################"
|
||||
echo "Checking build status"
|
||||
echo "############################################################"
|
||||
|
||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
|
||||
STATUS=0
|
||||
NB_FOUND_FILES=0
|
||||
|
||||
for FULLFILE in $LOG_FILES
|
||||
do
|
||||
if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
|
||||
then
|
||||
filename=$(basename -- "$FULLFILE")
|
||||
if [ "$LOG_PATTERN" == ".Rel14.txt" ]
|
||||
then
|
||||
PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
|
||||
fi
|
||||
if [ "$LOG_PATTERN" == "basic_simulator" ]
|
||||
then
|
||||
PASS_PATTERN="lte-"
|
||||
fi
|
||||
if [ "$LOG_PATTERN" == "cppcheck.xml" ]
|
||||
then
|
||||
PASS_PATTERN="results version"
|
||||
LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
|
||||
else
|
||||
LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
|
||||
fi
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
|
||||
|
||||
}
|
||||
@@ -40,19 +40,19 @@
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030114">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/10MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030106">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -46,42 +46,42 @@
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030105">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030114">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030115">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/10MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030124">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030125">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -44,42 +44,42 @@
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030102">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030112">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030122">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -290,36 +290,36 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
|
||||
add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
|
||||
|
||||
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
make_version(RRC_VERSION 8 6 0)
|
||||
make_version(LTE_RRC_VERSION 8 6 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
|
||||
make_version(RRC_VERSION 10 2 0)
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
add_definitions(-DCBA)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
|
||||
make_version(RRC_VERSION 10 2 0)
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
|
||||
make_version(RRC_VERSION 11 18 0)
|
||||
make_version(LTE_RRC_VERSION 11 18 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
|
||||
make_version(RRC_VERSION 12 16 0)
|
||||
make_version(LTE_RRC_VERSION 12 16 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
|
||||
make_version(RRC_VERSION 13 9 1)
|
||||
make_version(LTE_RRC_VERSION 13 9 1)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
|
||||
make_version(RRC_VERSION 14 7 0)
|
||||
make_version(LTE_RRC_VERSION 14 7 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
|
||||
make_version(RRC_VERSION 15 2 2)
|
||||
make_version(LTE_RRC_VERSION 15 2 2)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.2.2.asn1)
|
||||
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
add_definitions(-DRRC_VERSION=${RRC_VERSION})
|
||||
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
|
||||
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
|
||||
message("calling asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
|
||||
message("calling ASN1C_PREFIX=LTE_ asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
|
||||
execute_process(COMMAND mkdir -p ${RRC_FULL_DIR}
|
||||
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
COMMAND env "ASN1C_PREFIX=LTE_" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
@@ -339,7 +339,7 @@ include_directories ("${RRC_FULL_DIR}")
|
||||
add_custom_command (
|
||||
OUTPUT ${RRC_FULL_DIR}/asn_constant.h
|
||||
COMMAND mkdir -p ${RRC_FULL_DIR}
|
||||
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
COMMAND env "ASN1C_PREFIX=LTE_" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
DEPENDS ${RRC_GRAMMAR}
|
||||
)
|
||||
|
||||
|
||||
@@ -956,20 +956,20 @@
|
||||
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
||||
<pre_exec_args></pre_exec_args>
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel14</main_exec>
|
||||
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
|
||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
|
||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
|
||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
|
||||
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
|
||||
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
|
||||
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
|
||||
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
|
||||
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
|
||||
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
|
||||
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
|
||||
<main_exec_args> -m=5 -g=F -s=-1= -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
|
||||
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
|
||||
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
|
||||
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
|
||||
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
|
||||
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
|
||||
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
|
||||
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
|
||||
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
|
||||
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
|
||||
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
|
||||
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags>
|
||||
<search_expr_true>"passed"</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
|
||||
@@ -9,4 +9,5 @@ set(MU_RECIEVER False)
|
||||
set(NAS_UE False)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
set(RRC_ASN1_VERSION "Rel14")
|
||||
set (UE_TIMING_TRACE True)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
|
||||
@@ -252,7 +252,7 @@ install_usrp_uhd_driver_from_source(){
|
||||
rm -rf /tmp/uhd
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd
|
||||
git checkout tags/release_003_010_001_001
|
||||
git checkout tags/v3.13.0.2
|
||||
mkdir -p host/build
|
||||
cd host/build
|
||||
$CMAKE ../
|
||||
@@ -683,7 +683,7 @@ install_asn1c_from_source(){
|
||||
# better to use a given commit than a branch in case the branch
|
||||
# is updated and requires modifications in the source of OAI
|
||||
#git checkout velichkov_s1ap_plus_option_group
|
||||
git checkout d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372
|
||||
git checkout 0a7524184f16e7093990a31d8d4db487a16e5782
|
||||
autoreconf -iv
|
||||
./configure
|
||||
make -j`nproc`
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# OAI configuration module
|
||||
|
||||
The configuration module provides an api that other oai components can use to get parameters at init time. It defines a parameter structure, used to describe parameters attributes (for example name and type). The same structure includes a pointer to the variable where the configuration module writes the parameter value, at run time, when calling config_get or config_getlist functions. For each parameter a function to check the value can be specified and pre-defined functions are provided for some common parameter validations (integer in a range or in a list, string in a list). The module also include a mechanism to check that no unknown options have been entered on the command line
|
||||
|
||||
## Documentation
|
||||
|
||||
* [runtime usage](config/rtusage.md)
|
||||
* [developer usage](config/devusage.md)
|
||||
* [module architecture](config/arch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
@@ -0,0 +1,7 @@
|
||||
# config module source files
|
||||

|
||||
# config module components
|
||||

|
||||
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
@@ -0,0 +1,20 @@
|
||||
The configuration module objectives are
|
||||
1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
|
||||
1. Use a common configuration API in all oai modules
|
||||
1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.
|
||||
|
||||
As a developer you may need to look at these sections:
|
||||
|
||||
* [add parameters in an existing section](devusage/addaparam.md)
|
||||
* [add a parameter set, in a new section](devusage/addparamset.md)
|
||||
* [configuration module API](devusage/api.md)
|
||||
* [configuration module public structures](devusage/struct.md)
|
||||
|
||||
Whatever your need is, configuration module usage examples can be found in oai sources:
|
||||
* complex example, using all the configuration module functionalities, including parameter checking:
|
||||
[NB-IoT configuration code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_config.c) and [NB-IoT configuration include file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_paramdef.h)
|
||||
* very simple example, just reading a parameter set corresponding to a dedicated section: the telnetsrv_autoinit function in [common/utils/telnetsrv/telnetsrv.c, around line 726](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv.c#L726)
|
||||
* an example with run-time definition of parameters, in the logging sub-system: the log_getconfig function at the top of [openair2/UTIL/LOG/log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/UTIL/LOG/log.c)
|
||||
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
@@ -0,0 +1,86 @@
|
||||
To add a new parameter in an existing section you insert an item in a `paramdef_t` array, which describes the parameters to be read in the existing `config_get` call. You also need to increment the numparams argument.
|
||||
|
||||
existing code:
|
||||
```c
|
||||
unsigned int varopt1;
|
||||
paramdef_t someoptions[] = {
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* configuration parameters for some module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
{"opt1", "<help opt1>", 0, uptr:&varopt1, defuintval:0, TYPE_UINT, 0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
new code:
|
||||
```c
|
||||
unsigned int varopt1;
|
||||
|
||||
|
||||
/* varopt2 will be allocated by the config module and free at end_configmodule call
|
||||
except if PARAMFLAG_NOFREE bit is set in paramflags field*/
|
||||
char *varopt2;
|
||||
paramdef_t someoptions[] = {
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* configuration parameters for some module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
{"opt1", "<help opt1>", 0, uptr:&varopt1, defuintval:0,TYPE_UINT, 0 },
|
||||
{"opt2", "<help opt2>", 0, strptr:&varopt2,defstrval:"",TYPE_STRING,0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
|
||||
The corresponding configuration file may now include opt2 parameter in the somesection section:
|
||||
|
||||
```c
|
||||
somesection =
|
||||
{
|
||||
opt1 = 3;
|
||||
opt2 = "abcd";
|
||||
};
|
||||
```
|
||||
|
||||
In these examples the variables used to retrieve the parameters values are pointed by the `uptr` or `strptr` fields of the `paramdef_t` structure. After the `config_get` call `varopt1` and `varopt2` have been set to the value specified in the config file. It is also possible to specify a `NULL` value to the `< XXX >ptr` fields, which are then allocated by the config module and possibly free when calling `config_end()`, if the `PARAMFLAG_NOFREE` bit has not been set in the `paramflags` field.
|
||||
|
||||
The configuration module provides a mechanism to check the parameter value read from the configuration source. The following functions are implemented:
|
||||
1. Check an integer parameter against a list of authorized values
|
||||
1. Check an integer parameter against a list of authorized values and set the parameter to a new value
|
||||
1. Check an integer parameter against a range
|
||||
1. Check a C string parameter against a list of authorized values
|
||||
1. Check a C string parameter against a list of authorized values and set the parameter to a new integer value
|
||||
|
||||
A `checkedparam_t` structure array provides the parameter verification procedures:
|
||||
|
||||
```c
|
||||
/*
|
||||
definition of the verification to be done on param opt1 and opt2.
|
||||
opt1 is an integer option we must be set to 0,2,3,4 or 7 in the
|
||||
config source.
|
||||
if opt1 is set to 0 in the config file, it will be set to 1, etc
|
||||
opt2 is C string option with the authorize values "zero","oneThird","twoThird","one"
|
||||
*/
|
||||
#define OPT1_OKVALUES {0,2,3,4,7}
|
||||
#define OPT1_NEWVALUES {1,1,0,6,9}
|
||||
#define OPT2_OKVALUES {"zero","oneThird","twoThird","one"}
|
||||
|
||||
#define OPT_CHECK_DESC { \
|
||||
{ .s1a= { config_check_modify_integer, OPT1_OKVALUE, OPT1_NEWVALUES ,5 }}, \
|
||||
{ .s3= { config_check_strval, OPT2_OKVALUES,4 }}, \
|
||||
}
|
||||
checkedparam_t checkopt[] = OPT_CHECK_DESC;
|
||||
.....
|
||||
/* assign the verification procedures to the parameters definitions */
|
||||
for(int i=0 ; i < sizeof(someoptions)/sizeof(paramdesc_t) ; i ++) {
|
||||
someoptions[i].chkPptr = &(checkopt[i]);
|
||||
}
|
||||
....
|
||||
```
|
||||
When you need a specific verification algorithm, you can provide your own verification function and use it in place of the available ones, in the `checkedparam_t` union. If no existing structure definition match your need, you can enhance the configuration module. You then have to add a new verification function in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_userapi.c and add a new structure definition in the `checkedparam_t` type defined in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
@@ -0,0 +1,131 @@
|
||||
The configuration module maps a configuration file section to a `paramdef_t` structure array. One `config_get` call can be used to return the values of all the parameters described in the `paramdef_t` array.
|
||||
Retrieving a single occurence of a parameter set ( a group in the libconfig terminology) is just a two steps task:
|
||||
1. describe the parameters in a `paramdef_t` array
|
||||
1. call the `config_get` function
|
||||
|
||||
|
||||
[config_get example](../../config/devusage/addaparam.md)
|
||||
|
||||
|
||||
In oai some parameters set may be instantiated a variable number of occurrences. In a configuration file this is mapped to lists of group of parameters, with this syntax:
|
||||
```c
|
||||
NB-IoT_MACRLCs =
|
||||
/* start list element 1 */
|
||||
(
|
||||
/* start a group of parameters */
|
||||
{
|
||||
num_cc = 2;
|
||||
.....
|
||||
remote_s_portd = 55001;
|
||||
}
|
||||
),
|
||||
/* start list element 2 */
|
||||
(
|
||||
/* start a group of parameters */
|
||||
{
|
||||
num_cc = 1;
|
||||
......
|
||||
remote_s_portd = 65001;
|
||||
}
|
||||
);
|
||||
|
||||
```
|
||||
The configuration module provides the `config_getlist` call to support lists of group of parameters. Below is a commented code example, using the config_getlist call.
|
||||
|
||||
```c
|
||||
/* name of section containing the list */
|
||||
#define NBIOT_MACRLCLIST_CONFIG_STRING "NB-IoT_MACRLCs"
|
||||
|
||||
/*
|
||||
The following macro define the parameters names, as used in the
|
||||
configuration file
|
||||
*/
|
||||
#define CONFIG_STRING_MACRLC_CC "num_cc"
|
||||
.....
|
||||
#define CONFIG_MACRLC_S_PORTD "remote_s_portd"
|
||||
|
||||
/*
|
||||
now define a macro which will be used to initialize the NbIoT_MacRLC_Params
|
||||
variable. NbIoT_MacRLC_Params is an array of paramdef_t structure, each item
|
||||
describing a parameter. When using the config_getlist call you must let the config
|
||||
module allocate the memory for the parameters values.
|
||||
*/
|
||||
/*------------------------------------------------------------------------------------------------------------*/
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define MACRLCPARAMS_DESC { \
|
||||
{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
|
||||
............. \
|
||||
{CONFIG_MACRLC_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
/*
|
||||
the following macros define the indexes used to access the NbIoT_MacRLC_Params array
|
||||
items. They must be maintained consistent with the previous MACRLCPARAMS_DESC macro
|
||||
which is used to initialize the NbIoT_MacRLC_Params variable
|
||||
*/
|
||||
#define MACRLC_CC_IDX 0
|
||||
.........
|
||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||
|
||||
|
||||
|
||||
void RCconfig_NbIoTmacrlc(void) {
|
||||
|
||||
|
||||
/*
|
||||
define and initialize the array of paramdef_t structures describing the groups of
|
||||
parameters we want to read. It will be passed as the second argument of the
|
||||
config_getlist call, which will use it as an input only argument.
|
||||
*/
|
||||
paramdef_t NbIoT_MacRLC_Params[] = MACRLCPARAMS_DESC;
|
||||
|
||||
/*
|
||||
now define and initialize a paramlist_def_t structure which will be passed
|
||||
to the config_getlist call. The first field is the only one to be initialized
|
||||
it contains the name of the section to be read.
|
||||
that section contains the list of group of parameters.
|
||||
The two other fields are output parameters used to return respectively
|
||||
a pointer to a two dimensional array of paramdef_t structures pointers, and the
|
||||
number of items in the list of groups (size of first dimension, the second one
|
||||
being the number of parameters in each group.
|
||||
*/
|
||||
paramlist_def_t NbIoT_MacRLC_ParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0};
|
||||
|
||||
|
||||
/*
|
||||
the config_getlist will allocate the second field of the paramlist_def_t structure, a
|
||||
two dimensional array of paramdef_t pointers. In each param_def item it will allocate
|
||||
the value pointer and set the value to what it will get from the config source. The
|
||||
numelt field of the paramlist_def_t structure will be set to the number of groups of
|
||||
parameters in the list.
|
||||
in this example the last argument of config_getlist is unused, it may contain a
|
||||
character string, used as a prefix for the section name. It has to be specified when the
|
||||
list to be read is under another section.
|
||||
*/
|
||||
config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,
|
||||
sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t),
|
||||
NULL);
|
||||
|
||||
/*
|
||||
start a loop in the nuber of groups in the list, the numelt field of the
|
||||
paramlist_def_t structure has been set in the config_getlist call
|
||||
*/
|
||||
for (j=0 ; j<NbIoT_MacRLC_ParamList.numelt ; j++) {
|
||||
|
||||
..........
|
||||
|
||||
/* access the MACRLC_REMOTE_S_PORTD parameter in the j ieme group of the list */
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portd =
|
||||
*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
|
||||
............
|
||||
|
||||
} // MacRLC_ParamList.numelt > 0
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
@@ -0,0 +1,48 @@
|
||||
```c
|
||||
configmodule_interface_t *load_configmodule(int argc, char **argv)
|
||||
```
|
||||
* Parses the command line options, looking for the –O argument
|
||||
* Loads the `libparams_<configsource>.so` (today `libparams_libconfig.so`) shared library
|
||||
* Looks for `config_<config source>_init` symbol and calls it , passing it an array of string corresponding to the « : » separated strings used in the –O option
|
||||
* Looks for `config_<config source>_get`, `config_<config source>_getlist` and `config_<config source>_end` symbols which are the three functions a configuration library should implement. Get and getlist are mandatory, end is optional.
|
||||
* Stores all the necessary information in a `configmodule_interface_t structure`, which is of no use for caller as long as we only use one configuration source.
|
||||
|
||||
```c
|
||||
void End_configmodule(void)
|
||||
```
|
||||
* Free memory which has been allocated by the configuration module since its initialization.
|
||||
* Possibly calls the `config_<config source>_end` function
|
||||
|
||||
```c
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
```
|
||||
* Reads as many parameters as described in params, they must all be in the same configuration file section
|
||||
* Calls the `config_<config source>_get` function
|
||||
* Calls the `config_process_cmdline` function
|
||||
* `params` points to an array of `paramdef_t` structures which describes the parameters to be read, possibly including a pointer to a checking function. The following bits can possibly be set in the `paramflags` mask before calling
|
||||
- `PARAMFLAG_MANDATORY`: -1 is returned if the parameter is not explicitly defined in the config source.
|
||||
- `PARAMFLAG_DISABLECMDLINE`: parameter cannot be modified via the command line
|
||||
- `PARAMFLAG_DONOTREAD`: ignore the parameter, can be used at run-time, to alter a pre-defined `paramdef_t` array which is used in several `config_get` or/and `config_getlist` calls.
|
||||
- `PARAMFLAG_NOFREE`: do not free the memory possibly allocated by the config module to store the value of the parameter. Default behavior is for the config module to free the memory it has allocated when the `config_end` function is called.
|
||||
- `PARAMFLAG_BOOL`: Only relevant for integer types. tell the config module that when processing the command line, the corresponding option can be specified without any arggument and that in this case it must set the value to 1.
|
||||
|
||||
* `params` is also used as an output parameter, `< XXX >ptr >` field is used by the config module to store the value it has read. The following bits can possibly be set in the `paramflags` mask after the call:
|
||||
- `PARAMFLAG_MALLOCINCONFIG`: memory has been allocated for the ` < XXX >ptr > ` field
|
||||
- `PARAMFLAG_PARAMSET`: parameter has been found in the config source, it is not set to default value.
|
||||
- `PARAMFLAG_PARAMSET`: parameter has been set to its default value
|
||||
* `numparams` is the number of entries in the params array
|
||||
* `prefix` is a character string to be appended to the parameters name, it defines the parameters position in the configuration file hierarchy (the section name in libconfig terminology).
|
||||
* The returned value is the number of parameters which have been assigned a value or -1 if a severe error occured
|
||||
|
||||
```c
|
||||
int config_libconfig_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix)
|
||||
```
|
||||
* Reads multiple occurrences of a parameters array
|
||||
* Calls the `config_<config source>_get` function for each list occurrence
|
||||
* `params` points to an array of `paramdef_t` structures which describes the parameters in each occurrence of the list
|
||||
* `ParamList` points to a structure, where `paramarray` field points to an array of `paramdef_t` structure, allocated by the function. It is used to return the values of the parameters.
|
||||
* The returned value is the number of occurrences in the list or -1 in case of severe error
|
||||
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
@@ -0,0 +1,85 @@
|
||||
# `paramdef_t`structure
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L103). This structure is used by developers to describe parameters and by the configuration module to return parameters value. A pointer to a `paramdef_t` array is passed to `config_get` and `config_getlist` calls to instruct the configuration module what parameters it should read.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `optname` | parameter name, as used when looking for it in the config source, 63 bytes max (64 with trailing \0) | I |
|
||||
| `helstr` | pointer to a C string printed when using --help on the command line | I |
|
||||
| `strptr` `strlistptr` `u8ptr` `i8ptr` `u16ptr` `i16ptr` `uptr` `iptr` `u64ptr` `i64ptr` `dblptr` `voidptr` | a pointer to a variable where the parameter value(s) will be returned. This field is an anonymous union, the supported pointer types have been built to avoid type mismatch warnings at compile time. | O |
|
||||
| `defstrval` `defstrlistval` `defuintval` `defintval` `defint64val` `defintarrayval` `defdblval` | this field is an anonymous union, it can be used to define the default value for the parameter. It is ignored if `PARAMFLAG_MANDATORY` is set in the `paramflags` field.| I |
|
||||
| `type` | Supported parameter types are defined as integer macros. Supported simple types are `TYPE_STRING`, parameter value is returned in `strptr` field, `TYPE_INT8` `TYPE_UINT8` `TYPE_INT16` `TYPE_UINT16` `TYPE_INT32` `TYPE_UINT32` `TYPE_INT64` `TYPE_UINT64`, parameter value is returned in the corresponding uXptr or iXptr, `TYPE_MASK`, value is returned in `u32ptr`, `TYPE_DOUBLE` value is returned in `dblptr`, `TYPE_IPV4ADDR` value is returned in binary, network bytes order in `u32ptr` field. `TYPE_STRINGLIST`, `TYPE_INTARRAY` and `TYPE_UINTARRAY` are multiple values types. Multiple values are returned in respectively, `strlistptr`, `iptr` and `uptr` fields which then point to arrays. The `numelt` field gives the number of item in the array. | I |
|
||||
| `numelt` | For `TYPE_STRING` where `strptr` points to a preallocated string, this field must contain the size in bytes of the available memory. For all multiple values types, this field contains the number of values in the value field.| I/O |
|
||||
| `chkPptr` | possible pointer to the structure containing the info used to check parameter values | I |
|
||||
| `processedvalue` | When `chkPptr` is not `ǸULL`, is used to return a value, computed from the original parameter, as read from the configuration source. | O |
|
||||
|
||||
# `paramlist_def_t`structure
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L160).
|
||||
It is used as an argument to `config_getlist` calls, to get values of multiple occurrences of group of parameters.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `listname` | Name of the section containing the list, 63 bytes max (64 with trailing \0). It is used to prefix each paramater name when looking for its value. In the libconfig syntax, the parameter name full path build by the configuration module is: listname.[occurence index].optname. | I |
|
||||
| `paramarray` | Pointer to an array of `ǹumelt` `paramdef_t` pointers. It is allocated by the configuration module and is used to return the parameters values. All input fields of each `paramdef_t` occurence are a copy of the `paramdef_t` argument passed to the `config_getlist` call. | O |
|
||||
| `numelt` | Number of items in the `paramarray` field | O |
|
||||
|
||||
# `checkedparam_t` union
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L62).
|
||||
This union of structures is used to provide a parameter checking mechanism. Each `paramdef_t` instance may include a pointer to a `checkedparam_t`structure which is then used by the configuration module to check the value it got from the config source.
|
||||
Each structure in the union provides one parameter verification method, which returns `-1` when the verification fails. Currently the following structures are defined in the `checkedparam_t` union:
|
||||
|
||||
| structure name | Description |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `s1` | check an integer against a list of authorized values |
|
||||
| `s1a` | check an integer against a list of authorized values and set the parameter value to another integer depending on the read value|
|
||||
| `s2` | check an integer against an authorized range, defined by its min and max value|
|
||||
| `s3` | check a string against a list of authorized values |
|
||||
| `s3a` | check a string against a list of authorized values and set the parameter value to an integer depending on the read value|
|
||||
| `s4` | generic structure, to be used to provide a specific, not defined in the configuration module, verification algorithm |
|
||||
|
||||
each of these structures provide the required fields to perform the specified parameter check. The first field is a pointer to a function, taking one argument, the `paramdef_t` structure describing the parameter to be checked. This function is called by the configuration module, in the `config_get` call , after the parameter value has been set, it then uses the other fields of the structure to perform the check.
|
||||
The configuration module provides an implementation of the functions to be used to check parameters, qs described below.
|
||||
|
||||
## `s1` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f1` | pointer to the checking function. Initialize to `config_check_intval` to use the config module implementation |
|
||||
| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
|
||||
| `num_okintval` | number of used values in `okintval` |
|
||||
|
||||
## `s1a` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f1a` | pointer to the checking function. Initialize to `config_check_modify_integer` to use the config module implementation |
|
||||
| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
|
||||
| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okintval[i]` |
|
||||
| `num_okintval` | number of used values in `okintval` and `setintval` |
|
||||
|
||||
## `s2` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f2` | pointer to the checking function. Initialize to `config_check_intrange` to use the config module implementation |
|
||||
| `okintrange` | array of 2 integers containing the min and max values for the parameter |
|
||||
|
||||
## `s3` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f3` | pointer to the checking function. Initialize to `config_check_strval` to use the config module implementation |
|
||||
| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
|
||||
| `num_okstrval` | number of used values in `okstrtval` |
|
||||
|
||||
|
||||
## `s3a` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f3a` | pointer to the checking function. Initialize to `config_checkstr_assign_integer` to use the config module implementation |
|
||||
| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
|
||||
| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okstrval[i]` |
|
||||
| `num_okstrval` | number of used values in `okintval` and `setintval` |
|
||||
|
||||
## `s4` and `s5` structures
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f4` or `f5` | pointer to the checking function. they are generic structures to be used when no existing structure provides the required parameter verification. `f4` takes one argument, the `paramdef_t` structure corresponding to the parameter to be checked (`int (*f4)(paramdef_t *param)`), `f5` taxes no argument (`void (*checkfunc)(void)`) |
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
-O is the only mandatory command line option to start the eNodeb softmodem (lte-softmodem executable), it is used to specify the configuration source with the associated parameters:
|
||||
```bash
|
||||
$ ./lte-softmodem -O <configsource>:<parameter1>:<parameter2>:...
|
||||
```
|
||||
The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is used in the ue-softmodem executable and by the phy_simulators executables (ulsim, dlsim)
|
||||
|
||||
Currently the available config sources are:
|
||||
|
||||
- **libconfig**: libconfig file. [libconfig file format](http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files) Parameter1 is the file path and parameter 2 can be used to specify the level of console messages printed by the configuration module.
|
||||
```bash
|
||||
$ ./lte-softmodem -O libconfig:<config>:dbgl<debuglevel>
|
||||
```
|
||||
- **cmdlineonly**: command line only, the default mode for lte-uesoftmodem and the phy simiulators. In this case -O may be used to specify the config module debug level.
|
||||
|
||||
The debug level is a mask:
|
||||
* bit 1: print parameters values
|
||||
* bit 2: print memory allocation/free performed by the config module
|
||||
* bit 3: print command line processing messages
|
||||
* bit 4: disable execution abort when parameters checking fails
|
||||
|
||||
As a oai user, you may have to use bit 1 (dbgl1) , to check your configuration and get the full name of a parameter you would like to modify on the command line. Other bits are for developers usage, (dbgl7 will print all debug messages).
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O libconfig:<config>:dbgl1
|
||||
```
|
||||
```bash
|
||||
$ ./lte-uesoftmodem -O cmdlineonly:dbgl1
|
||||
```
|
||||
For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O <config>
|
||||
```
|
||||
|
||||
Configuration file parameters, except for the configuration file path, can be specified in a **config** section in the configuration file:
|
||||
|
||||
```
|
||||
config:
|
||||
{
|
||||
debugflags = 1;
|
||||
}
|
||||
```
|
||||
Configuration files examples can be found in the targets/PROJECTS/GENERIC-LTE-EPC/CONF sub-directory of the oai source tree. To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter:
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O <config> --eNBs.[0].component_carriers.[0].N_RB_DL 100
|
||||
```
|
||||
|
||||
As specified earlier, use the dbgl1 debug level to get the full name of a parameter you would like to modify on the command line.
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
@@ -0,0 +1,17 @@
|
||||
# OAI shared library loader
|
||||
|
||||
Shared libraries usage is modularization mechanism which provides the following advantages:
|
||||
1. Prevents including in the main executable code which is not used in a given configuration
|
||||
1. Provides flexibility, several implementation of a given functionality can be chosen at run-time, without any compilation step. For example you can build several devices (USRP, BladeFR, LimeSDR) and choose which one you want to use on the command line or via the configuration.
|
||||
1. Makes code evolution easier: as soon as the shared library interface is clearly defined, you can work on the functionality implemented in a shared library while regularly updating the other components of the code. You can decide to develop your own version of a functionality, decide to deliver it or not, letting the user decide wwhat version he wants to use.
|
||||
|
||||
The main drawback is a performance cost at init time, when loading libraries.
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
* [runtime usage](loader/rtusage.md)
|
||||
* [developer usage](loader/devusage.md)
|
||||
* [module architecture](loader/arch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
@@ -0,0 +1,7 @@
|
||||
# loader source files
|
||||
|
||||
The oai shared library loader is implemented in two source files, located in [common/utils](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils)
|
||||
1. [load_module_shlib.c](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.c) contains the loader implementation
|
||||
1. [load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.h) is the loader include file containing both private and public data type definitions. It also contain API prototypes.
|
||||
|
||||
[loader home page](../loader.md)
|
||||
@@ -0,0 +1,17 @@
|
||||
The configuration module objectives are
|
||||
1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
|
||||
1. Use a common configuration API in all oai modules
|
||||
1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.
|
||||
|
||||
As a developer you may need to look at these sections:
|
||||
|
||||
* [loading a shared library](devusage/loading.md)
|
||||
* [loader API](devusage/api.md)
|
||||
* [loader public structures](devusage/struct.md)
|
||||
|
||||
Loader usage examples can be found in oai sources:
|
||||
|
||||
* device and transport initialization code: [function `load_lib` in *targets/ARCH/COMMON/__common_lib.c__* ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/targets/ARCH/COMMON/common_lib.c#L91)
|
||||
* turbo encoder and decoder initialization: [function `load_codinglib`in *openair1/PHY/CODING/__coding_load.c__*](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c#L113)
|
||||
|
||||
[loader home page](../loader.md)
|
||||
@@ -0,0 +1,20 @@
|
||||
Loader API is defined in the [common/utils/load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h) include file.
|
||||
```c
|
||||
int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf)
|
||||
```
|
||||
* possibly initializes the loader, if it has not been already initialized
|
||||
* Formats the full shared library path, using the `modname` argument and the loader `shlibpath` and `shlibversion`configuration parameters.
|
||||
* loads the shared library, using the dlopen system call
|
||||
* looks for `< modname >_autoinit` symbol, using the `dlsym` system call and possibly call the corresponding function.
|
||||
* looks for `< modname >_checkbuildver` symbol, using the `dlsym` system call and possibly calls the corresponding function. If the return value of this call is `-1`, program execution is stopped. It is the responsibility of the shared library developer to implement or not a `< modname >_checkbuildver` function and to decide if a version mismatch is a fatal condition. The `< modname >_checkbuildver` function must match the `checkverfunc_t` function type. The first argument is the main executable version, as set in the `PACKAGE_VERSION` macro defined in the [oai CMakeLists](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/cmake_targets/CMakeLists.txt#L218), around line 218. The second argument points to the shared library version which should be set by the `< modname >_checkbuildver` function.
|
||||
* If the farray pointer is null, looks for `< modname >_getfarray` symbol, calls the corresponding function when the symbol is found. `< modname >_getfarray` takes one argument, a pointer to a `loader_shlibfunc_t` array, and returns the number of items in this array, as defined by the `getfarrayfunc_t` type. The `loader_shlibfunc_t` array returned by the shared library must be fully filled (both `fname` and `fptr` fields).
|
||||
* looks for the `numf` function symbols listed in the `farray[i].fname` arguments and set the corresponding `farray[i].fptr`function pointers
|
||||
|
||||
|
||||
```c
|
||||
void * get_shlibmodule_fptr(char *modname, char *fname)
|
||||
```
|
||||
Returns a pointer to the symbol `fname`, defined in module `modname`, or `NULL` if the symbol is not found.
|
||||
|
||||
[loader home page](../../loader.md)
|
||||
[loader developer home page](../devusage.md)
|
||||
@@ -0,0 +1,56 @@
|
||||
Implementing a shared library dynamic load using the oai loader is a two steps task:
|
||||
1. define the `loader_shlibfunc_t` array, describing the list of externally available functions implemented in the library. This is the interface of the module.
|
||||
1. Call the `load_module_shlib` function, passing it the previously defined array and the number of items in this array. The first argument to `load_module_shlib` is the name identifying the module, which is also used to format the corresponding library name, as described [here](loader/rtusage#shared-library-names)
|
||||
|
||||
After a successful `load__module_shlib` call, the function pointer of each `loader_shlibfunc_t` array item has been set and can be used to call the corresponding function.
|
||||
|
||||
Typical loader usage looks like:
|
||||
|
||||
```c
|
||||
/* shared library loader include file */
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
.............
|
||||
/*
|
||||
define and initialize the array, describing the list of functions
|
||||
implemented in "mymodule"
|
||||
*/
|
||||
loader_shlibfunc_t mymodule_fdesc[2];
|
||||
mymodule_fdesc[0].fname="mymodule_f1";
|
||||
mymodule_fdesc[1].fname="mymodule_f2";
|
||||
|
||||
/*
|
||||
load the library, it's name must be libmymod.so. Configuration can be
|
||||
used to specify a specific path to look for libmymod.so. Configuration
|
||||
can also specify a version, for example "V1", in this case the loader
|
||||
will look for libmymodV1.so
|
||||
*/
|
||||
ret=load_module_shlib("mymod",mymodule_fdesc, sizeof(mymodule_fdesc)/sizeof(loader_shlibfunc_t));
|
||||
if (ret < 0) {
|
||||
fprintf(stderr,"Library couldn't be loaded\n");
|
||||
} else {
|
||||
/*
|
||||
library has been loaded, we probably want to call some functions...
|
||||
*/
|
||||
ret=((funcf1_t)mymodule_fdesc[0].fptr)();
|
||||
|
||||
..................
|
||||
/*
|
||||
later and/or somewhere else in the code you may want to call function "mymodule_f2"
|
||||
You can use the loader get_shlibmodule_fptr(char *modname, char *fname) function
|
||||
to retrieve the pointer to that function
|
||||
*/
|
||||
funcf2_t *f2;
|
||||
int ret;
|
||||
int intarg1;
|
||||
char *strarg;
|
||||
........................
|
||||
f2 = (funcf2_t)get_shlibmodule_fptr("mymodule", "mymodule_f2")
|
||||
if (f2 != NULL) {
|
||||
ret = f2(intarg1,strarg);
|
||||
}
|
||||
...............
|
||||
```
|
||||
When loading a shared library the loader looks for a symbol named `< module name > _autoinit` and, if it finds it, calls it. The `autoinit` function is called without any argument and the returned value, if any, is not tested.
|
||||
|
||||
[loader home page](../loader.md)
|
||||
[loader developer home page](../../loader/devusage.md)
|
||||
@@ -0,0 +1,10 @@
|
||||
# `loader_shlibfunc_t`structure
|
||||
It is defined in include file [ common/util/load_module_shlib.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h#L38). This structure is used to list the symbols that should be searched by the loader when calling the `load_module_shlib` function.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `fname` | symbol name, is passed to the [`dlsym`](http://man7.org/linux/man-pages/man3/dlsym.3.html) system call performed by the loader to get a pointer to the symbol | I |
|
||||
| `fptr` | pointer to the symbol name, set by the loader. `fptr` is defined as a `int (*fptr)(void)` function type | O |
|
||||
|
||||
[loader home page](../../loader.md)
|
||||
[loader developer home page](../devusage.md)
|
||||
@@ -0,0 +1,50 @@
|
||||
## shared library names
|
||||
Shared library full names are built by the loader using the format:
|
||||
> < *path* >/lib< *module name* >< *module version* >.so
|
||||
|
||||
1. the < *module name* > is defined at development time, it comes from the `modname` argument of the `load_module_shlib` call.
|
||||
1. the < *module version* > and < *path* > optional parameters, are defined at run-time, depending on the configuration.
|
||||
|
||||
## loader parameters
|
||||
The loader is using the [configuration module](../../../config/DOC/config.md), and defines global and per library parameters. Global parameters must be specified under the **loader** section and library specific parameters under a **loader.<*module name*>** section. Module specific parameters override the global parameters.
|
||||
### Global loader parameters
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `shlibpath` | `string of char` | `""` | directory path used to look for shared libraries, may be superseded by the library specific `shlibpath`.|
|
||||
| `maxshlibs` | `integer` | 10 | Maximum number of shared libraries the loader can manage. |
|
||||
|
||||
### library specific loader parameters
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `shlibpath` | `string of char` | `""` | directory path used to look for this shared library.|
|
||||
| `shlibversion` | `string of char` | `""` | version to be used to load this shared library.|
|
||||
|
||||
### loader configuration examples
|
||||
|
||||
The following configuration file example just reproduce the default loader parameters:
|
||||
```c
|
||||
loader :
|
||||
{
|
||||
shlibpath = "./";
|
||||
maxshlibs = 10;
|
||||
liboai_device :
|
||||
{
|
||||
shlibpath = "./";
|
||||
shlibversion = "";
|
||||
}
|
||||
};
|
||||
```
|
||||
If you want to load a device called *liboai_device_USRP.so* without writting a specific configuration, you can start the softmodem using the following command:
|
||||
> ./lte-softmodem -O libconfig:/usr/local/oai/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf:dbgl5 --loader.oai_device.shlibversion _USRP
|
||||
|
||||
With this latest example, nn the softmodem logs, you can check that the right device library has been loaded:
|
||||
```bash
|
||||
[LIBCONFIG] loader.oai_device.shlibpath not found in /usr/local/oai/develop-nb-iot-merge/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf
|
||||
[LIBCONFIG] loader.oai_device.shlibversion set to default value ""
|
||||
[LIBCONFIG] loader.oai_device: 1/2 parameters successfully set, (1 to default value)
|
||||
[CONFIG] shlibversion set to _USRP from command line
|
||||
[CONFIG] loader.oai_device 1 options set from command line
|
||||
|
||||
```
|
||||
|
||||
[loader home page](../loader.md)
|
||||
@@ -75,8 +75,12 @@ ID = ENB_PHY_MSG3_ALLOCATION
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti : int,first_transmission : int,Msg3_frame : int,Msg3_subframe
|
||||
ID = ENB_PHY_INITIATE_RA_PROCEDURE
|
||||
DESC = eNodeB initiates a random access procedure after detecting enough energy for one of the preambles
|
||||
GROUP = ALL:PHY:ENB
|
||||
GROUP = ALL:PHY:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,preamble : int,energy : int,delay
|
||||
ID = ENB_PHY_MIB
|
||||
DESC = MIB data
|
||||
GROUP = ALL:PHY:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : buffer,data
|
||||
|
||||
#MAC logs
|
||||
ID = ENB_MAC_UE_DL_SDU
|
||||
@@ -97,7 +101,7 @@ ID = ENB_MAC_UE_UL_PDU
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu
|
||||
ID = ENB_MAC_UE_UL_PDU_WITH_DATA
|
||||
DESC = MAC uplink UE received PDU
|
||||
GROUP = ALL:MAC:ENB
|
||||
GROUP = ALL:MAC:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu : buffer,data
|
||||
ID = ENB_MAC_UE_UL_SDU
|
||||
DESC = MAC uplink UE received SDU
|
||||
@@ -113,12 +117,16 @@ ID = ENB_MAC_UE_UL_CE
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,ce
|
||||
ID = ENB_MAC_UE_DL_PDU_WITH_DATA
|
||||
DESC = MAC downlink PDU for an UE
|
||||
GROUP = ALL:MAC:ENB
|
||||
GROUP = ALL:MAC:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
|
||||
ID = ENB_MAC_SCHEDULING_REQUEST
|
||||
DESC = MAC scheduling request detected for an UE
|
||||
GROUP = ALL:MAC:ENB
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,rnti
|
||||
ID = ENB_MAC_UE_DL_RAR_PDU_WITH_DATA
|
||||
DESC = MAC downlink PDU for an UE
|
||||
GROUP = ALL:MAC:ENB:WIRESHARK
|
||||
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
|
||||
|
||||
#RLC logs
|
||||
ID = ENB_RLC_DL
|
||||
|
||||
@@ -60,6 +60,11 @@ macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
|
||||
multi: multi.o utils.o database.o config.o
|
||||
$(CC) $(CFLAGS) -o multi $^ $(LIBS)
|
||||
|
||||
multi.o: ../T_IDs.h
|
||||
|
||||
../T_IDs.h:
|
||||
cd .. && $(MAKE)
|
||||
|
||||
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
|
||||
|
||||
gui/gui.a:
|
||||
|
||||
@@ -16,6 +16,8 @@ void usage(void)
|
||||
" -f <name> <value> field 'name' of 'event' has to match 'value'\n"
|
||||
" type of 'name' must be int\n"
|
||||
" (you can use several -f options)\n"
|
||||
" -after <raw time> <nsec> 'event' time has to be greater than this\n"
|
||||
" -count <n> dump 'n' matching events (less if EOF reached)\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
@@ -51,6 +53,10 @@ int main(int n, char **v)
|
||||
int filter_count = 0;
|
||||
int buffer_arg;
|
||||
int found;
|
||||
int count = 1;
|
||||
int check_time = 0;
|
||||
time_t sec;
|
||||
long nsec;
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||
@@ -63,6 +69,14 @@ int main(int n, char **v)
|
||||
filter_value[filter_count++] = atoi(v[++i]);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-after")) { if (i>n-3) usage();
|
||||
check_time = 1;
|
||||
sec = atoll(v[++i]);
|
||||
nsec = atol(v[++i]);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-count"))
|
||||
{ if (i > n-2) usage(); count = atoi(v[++i]); continue; }
|
||||
if (file == NULL) { file = v[i]; continue; }
|
||||
if (event_name == NULL) { event_name = v[i]; continue; }
|
||||
if (buffer_name == NULL) { buffer_name = v[i]; continue; }
|
||||
@@ -111,13 +125,20 @@ int main(int n, char **v)
|
||||
break;
|
||||
if (i != filter_count)
|
||||
continue;
|
||||
if (check_time &&
|
||||
!(e.sending_time.tv_sec > sec ||
|
||||
(e.sending_time.tv_sec == sec && e.sending_time.tv_nsec >= nsec)))
|
||||
continue;
|
||||
if (fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, out) != 1)
|
||||
{ perror(output_file); exit(1); }
|
||||
found = 1;
|
||||
break;
|
||||
found++;
|
||||
if (found == count)
|
||||
break;
|
||||
}
|
||||
|
||||
if (found == 0) printf("ERROR: event not found\n");
|
||||
if (found != count)
|
||||
printf("WARNING: dumped %d events (wanted %d)\n", found, count);
|
||||
|
||||
fclose(out);
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ void framelog_set_skip(logger *_this, int skip_delay);
|
||||
void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9);
|
||||
|
||||
void textlog_dump_buffer(logger *_this, int dump_buffer);
|
||||
void textlog_raw_time(logger *_this, int raw_time);
|
||||
|
||||
#include "view/view.h"
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ struct textlog {
|
||||
/* local output buffer */
|
||||
OBUF o;
|
||||
int dump_buffer;
|
||||
int raw_time;
|
||||
};
|
||||
|
||||
static void _event(void *p, event e)
|
||||
@@ -51,9 +52,13 @@ static void _event(void *p, event e)
|
||||
|
||||
#ifdef T_SEND_TIME
|
||||
t = localtime(&e.sending_time.tv_sec);
|
||||
/* round tv_nsec to nearest millisecond */
|
||||
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec,
|
||||
e.sending_time.tv_nsec);
|
||||
if (l->raw_time)
|
||||
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld [%ld]: ",
|
||||
t->tm_hour, t->tm_min, t->tm_sec,
|
||||
e.sending_time.tv_nsec, e.sending_time.tv_sec);
|
||||
else
|
||||
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec,
|
||||
e.sending_time.tv_nsec);
|
||||
PUTS(&l->o, tt);
|
||||
#endif
|
||||
|
||||
@@ -215,3 +220,9 @@ void textlog_dump_buffer(logger *_this, int dump_buffer)
|
||||
struct textlog *l = _this;
|
||||
l->dump_buffer = dump_buffer;
|
||||
}
|
||||
|
||||
void textlog_raw_time(logger *_this, int raw_time)
|
||||
{
|
||||
struct textlog *l = _this;
|
||||
l->raw_time = raw_time;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
#define DEFAULT_IP "127.0.0.1"
|
||||
#define DEFAULT_PORT 9999
|
||||
|
||||
#define DEFAULT_LIVE_IP "127.0.0.1"
|
||||
#define DEFAULT_LIVE_PORT 2021
|
||||
|
||||
#define NO_PREAMBLE -1
|
||||
|
||||
typedef struct {
|
||||
int socket;
|
||||
struct sockaddr_in to;
|
||||
@@ -28,11 +33,33 @@ typedef struct {
|
||||
int dl_frame;
|
||||
int dl_subframe;
|
||||
int dl_data;
|
||||
/* mib */
|
||||
int mib_frame;
|
||||
int mib_subframe;
|
||||
int mib_data;
|
||||
/* RA preamble */
|
||||
int preamble_frame;
|
||||
int preamble_subframe;
|
||||
int preamble_preamble;
|
||||
/* RAR */
|
||||
int rar_rnti;
|
||||
int rar_frame;
|
||||
int rar_subframe;
|
||||
int rar_data;
|
||||
/* config */
|
||||
int no_mib;
|
||||
int no_sib;
|
||||
int max_mib;
|
||||
int max_sib;
|
||||
int live;
|
||||
/* runtime vars */
|
||||
int cur_mib;
|
||||
int cur_sib;
|
||||
} ev_data;
|
||||
|
||||
void ul(void *_d, event e)
|
||||
void trace(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int subframe, void *buf, int bufsize, int preamble)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
ssize_t ret;
|
||||
int fsf;
|
||||
int i;
|
||||
@@ -41,79 +68,124 @@ void ul(void *_d, event e)
|
||||
|
||||
PUTS(&d->buf, MAC_LTE_START_STRING);
|
||||
PUTC(&d->buf, FDD_RADIO);
|
||||
PUTC(&d->buf, DIRECTION_UPLINK);
|
||||
PUTC(&d->buf, C_RNTI);
|
||||
PUTC(&d->buf, direction);
|
||||
PUTC(&d->buf, rnti_type);
|
||||
|
||||
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
|
||||
PUTC(&d->buf, (e.e[d->ul_rnti].i>>8) & 255);
|
||||
PUTC(&d->buf, e.e[d->ul_rnti].i & 255);
|
||||
if (rnti_type == C_RNTI || rnti_type == RA_RNTI) {
|
||||
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
|
||||
PUTC(&d->buf, (rnti>>8) & 255);
|
||||
PUTC(&d->buf, rnti & 255);
|
||||
}
|
||||
|
||||
/* for newer version of wireshark? */
|
||||
fsf = (e.e[d->ul_frame].i << 4) + e.e[d->ul_subframe].i;
|
||||
fsf = (frame << 4) + subframe;
|
||||
/* for older version? */
|
||||
fsf = e.e[d->ul_subframe].i;
|
||||
//fsf = subframe;
|
||||
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
|
||||
PUTC(&d->buf, (fsf>>8) & 255);
|
||||
PUTC(&d->buf, fsf & 255);
|
||||
|
||||
if (preamble != NO_PREAMBLE) {
|
||||
PUTC(&d->buf, MAC_LTE_SEND_PREAMBLE_TAG);
|
||||
PUTC(&d->buf, preamble);
|
||||
PUTC(&d->buf, 0); /* rach attempt - always 0 for us (not sure of this) */
|
||||
}
|
||||
|
||||
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
|
||||
for (i = 0; i < e.e[d->ul_data].bsize; i++)
|
||||
PUTC(&d->buf, ((char*)e.e[d->ul_data].b)[i]);
|
||||
for (i = 0; i < bufsize; i++)
|
||||
PUTC(&d->buf, ((char*)buf)[i]);
|
||||
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
if (ret != d->buf.osize) abort();
|
||||
}
|
||||
|
||||
void ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
||||
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void dl(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
ssize_t ret;
|
||||
int fsf;
|
||||
int i;
|
||||
|
||||
d->buf.osize = 0;
|
||||
if (e.e[d->dl_rnti].i == 0xffff) {
|
||||
if (d->no_sib) return;
|
||||
if (d->max_sib && d->cur_sib == d->max_sib) return;
|
||||
d->cur_sib++;
|
||||
}
|
||||
|
||||
PUTS(&d->buf, MAC_LTE_START_STRING);
|
||||
PUTC(&d->buf, FDD_RADIO);
|
||||
PUTC(&d->buf, DIRECTION_DOWNLINK);
|
||||
PUTC(&d->buf, C_RNTI);
|
||||
|
||||
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
|
||||
PUTC(&d->buf, (e.e[d->dl_rnti].i>>8) & 255);
|
||||
PUTC(&d->buf, e.e[d->dl_rnti].i & 255);
|
||||
|
||||
/* for newer version of wireshark? */
|
||||
fsf = (e.e[d->dl_frame].i << 4) + e.e[d->dl_subframe].i;
|
||||
/* for older version? */
|
||||
fsf = e.e[d->dl_subframe].i;
|
||||
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
|
||||
PUTC(&d->buf, (fsf>>8) & 255);
|
||||
PUTC(&d->buf, fsf & 255);
|
||||
|
||||
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
|
||||
for (i = 0; i < e.e[d->dl_data].bsize; i++)
|
||||
PUTC(&d->buf, ((char*)e.e[d->dl_data].b)[i]);
|
||||
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
if (ret != d->buf.osize) abort();
|
||||
trace(d, DIRECTION_DOWNLINK,
|
||||
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
|
||||
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
|
||||
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
|
||||
void mib(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
if (d->no_mib) return;
|
||||
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
||||
d->cur_mib++;
|
||||
|
||||
trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
||||
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void preamble(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
||||
NULL, 0,
|
||||
e.e[d->preamble_preamble].i);
|
||||
}
|
||||
|
||||
void rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
||||
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
||||
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
int preamble_id, int rar_id)
|
||||
{
|
||||
database_event_format f;
|
||||
int i;
|
||||
|
||||
d->ul_rnti = -1;
|
||||
d->ul_frame = -1;
|
||||
d->ul_subframe = -1;
|
||||
d->ul_data = -1;
|
||||
d->ul_rnti = -1;
|
||||
d->ul_frame = -1;
|
||||
d->ul_subframe = -1;
|
||||
d->ul_data = -1;
|
||||
|
||||
d->dl_rnti = -1;
|
||||
d->dl_frame = -1;
|
||||
d->dl_subframe = -1;
|
||||
d->dl_data = -1;
|
||||
d->dl_rnti = -1;
|
||||
d->dl_frame = -1;
|
||||
d->dl_subframe = -1;
|
||||
d->dl_data = -1;
|
||||
|
||||
d->mib_frame = -1;
|
||||
d->mib_subframe = -1;
|
||||
d->mib_data = -1;
|
||||
|
||||
d->preamble_frame = -1;
|
||||
d->preamble_subframe = -1;
|
||||
d->preamble_preamble = -1;
|
||||
|
||||
d->rar_rnti = -1;
|
||||
d->rar_frame = -1;
|
||||
d->rar_subframe = -1;
|
||||
d->rar_data = -1;
|
||||
|
||||
#define G(var_name, var_type, var) \
|
||||
if (!strcmp(f.name[i], var_name)) { \
|
||||
@@ -144,6 +216,37 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
|
||||
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
|
||||
d->dl_data == -1) goto error;
|
||||
|
||||
/* MIB: frame, subframe, data */
|
||||
f = get_format(database, mib_id);
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("frame", "int", d->mib_frame);
|
||||
G("subframe", "int", d->mib_subframe);
|
||||
G("data", "buffer", d->mib_data);
|
||||
}
|
||||
if (d->mib_frame == -1 || d->mib_subframe == -1 || d->mib_data == -1)
|
||||
goto error;
|
||||
|
||||
/* preamble: frame, subframe, preamble */
|
||||
f = get_format(database, preamble_id);
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("frame", "int", d->preamble_frame);
|
||||
G("subframe", "int", d->preamble_subframe);
|
||||
G("preamble", "int", d->preamble_preamble);
|
||||
}
|
||||
if (d->preamble_frame == -1 || d->preamble_subframe == -1 ||
|
||||
d->preamble_preamble == -1) goto error;
|
||||
|
||||
/* rar: rnti, frame, subframe, data */
|
||||
f = get_format(database, rar_id);
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("rnti", "int", d->rar_rnti);
|
||||
G("frame", "int", d->rar_frame);
|
||||
G("subframe", "int", d->rar_subframe);
|
||||
G("data", "buffer", d->rar_data);
|
||||
}
|
||||
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
|
||||
d->rar_data == -1) goto error;
|
||||
|
||||
#undef G
|
||||
|
||||
return;
|
||||
@@ -179,9 +282,20 @@ void usage(void)
|
||||
" -d <database file> this option is mandatory\n"
|
||||
" -i <dump file> read events from this dump file\n"
|
||||
" -ip <IP address> send packets to this IP address (default %s)\n"
|
||||
" -p <port> send packets to this port (default %d)\n",
|
||||
" -p <port> send packets to this port (default %d)\n"
|
||||
" -no-mib do not report MIB\n"
|
||||
" -no-sib do not report SIBs\n"
|
||||
" -max-mib <n> report at maximum n MIB\n"
|
||||
" -max-sib <n> report at maximum n SIBs\n"
|
||||
" -live run live\n"
|
||||
" -live-ip <IP address> tracee's IP address (default %p)\n"
|
||||
" -live-port <por> tracee's port (default %d)\n"
|
||||
"-i and -live are mutually exclusive options. One of them must be provided\n"
|
||||
"but not both.\n",
|
||||
DEFAULT_IP,
|
||||
DEFAULT_PORT
|
||||
DEFAULT_PORT,
|
||||
DEFAULT_LIVE_IP,
|
||||
DEFAULT_LIVE_PORT
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
@@ -194,10 +308,13 @@ int main(int n, char **v)
|
||||
event_handler *h;
|
||||
int in;
|
||||
int i;
|
||||
int ul_id, dl_id;
|
||||
int ul_id, dl_id, mib_id = -1, preamble_id, rar_id;
|
||||
ev_data d;
|
||||
char *ip = DEFAULT_IP;
|
||||
int port = DEFAULT_PORT;
|
||||
char *live_ip = DEFAULT_LIVE_IP;
|
||||
int live_port = DEFAULT_LIVE_PORT;
|
||||
int live = 0;
|
||||
|
||||
memset(&d, 0, sizeof(ev_data));
|
||||
|
||||
@@ -209,6 +326,17 @@ int main(int n, char **v)
|
||||
{ if (i > n-2) usage(); input_filename = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-no-mib")) { d.no_mib = 1; continue; }
|
||||
if (!strcmp(v[i], "-no-sib")) { d.no_sib = 1; continue; }
|
||||
if (!strcmp(v[i], "-max-mib"))
|
||||
{ if (i > n-2) usage(); d.max_mib = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-max-sib"))
|
||||
{ if (i > n-2) usage(); d.max_sib = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-live")) { live = 1; continue; }
|
||||
if (!strcmp(v[i], "-live-ip"))
|
||||
{ if (i > n-2) usage(); live_ip = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-live-port"))
|
||||
{ if (i > n-2) usage(); live_port = atoi(v[++i]); continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
@@ -217,25 +345,59 @@ int main(int n, char **v)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (input_filename == NULL) {
|
||||
printf("ERROR: provide an input file (-i)\n");
|
||||
if (input_filename == NULL && live == 0) {
|
||||
printf("ERROR: provide an input file (-i) or run live (-live)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
in = open(input_filename, O_RDONLY);
|
||||
if (in == -1) { perror(input_filename); return 1; }
|
||||
if (input_filename != NULL && live != 0) {
|
||||
printf("ERROR: cannot use both -i and -live\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (live == 0) {
|
||||
in = open(input_filename, O_RDONLY);
|
||||
if (in == -1) { perror(input_filename); return 1; }
|
||||
} else
|
||||
in = connect_to(live_ip, live_port);
|
||||
|
||||
database = parse_database(database_filename);
|
||||
load_config_file(database_filename);
|
||||
|
||||
h = new_handler(database);
|
||||
|
||||
if (live) {
|
||||
char mt = 1;
|
||||
int number_of_events = number_of_ids(database);
|
||||
int *is_on = calloc(number_of_events, sizeof(int));
|
||||
if (is_on == NULL) { printf("ERROR: out of memory\n"); exit(1); }
|
||||
on_off(database, "ENB_MAC_UE_UL_PDU_WITH_DATA", is_on, 1);
|
||||
on_off(database, "ENB_MAC_UE_DL_PDU_WITH_DATA", is_on, 1);
|
||||
on_off(database, "ENB_PHY_MIB", is_on, 1);
|
||||
on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
|
||||
on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
|
||||
/* activate selected traces */
|
||||
if (socket_send(in, &mt, 1) == -1 ||
|
||||
socket_send(in, &number_of_events, sizeof(int)) == -1 ||
|
||||
socket_send(in, is_on, number_of_events * sizeof(int)) == -1) {
|
||||
printf("ERROR: socket_send failed\n");
|
||||
exit(1);
|
||||
}
|
||||
free(is_on);
|
||||
}
|
||||
|
||||
ul_id = event_id_from_name(database, "ENB_MAC_UE_UL_PDU_WITH_DATA");
|
||||
dl_id = event_id_from_name(database, "ENB_MAC_UE_DL_PDU_WITH_DATA");
|
||||
setup_data(&d, database, ul_id, dl_id);
|
||||
mib_id = event_id_from_name(database, "ENB_PHY_MIB");
|
||||
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
|
||||
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
|
||||
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id);
|
||||
|
||||
register_handler_function(h, ul_id, ul, &d);
|
||||
register_handler_function(h, dl_id, dl, &d);
|
||||
register_handler_function(h, mib_id, mib, &d);
|
||||
register_handler_function(h, preamble_id, preamble, &d);
|
||||
register_handler_function(h, rar_id, rar, &d);
|
||||
|
||||
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (d.socket == -1) { perror("socket"); exit(1); }
|
||||
@@ -253,7 +415,8 @@ int main(int n, char **v)
|
||||
event e;
|
||||
e = get_event(in, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (!(e.type == ul_id || e.type == dl_id)) continue;
|
||||
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
|
||||
e.type == preamble_id || e.type == rar_id)) continue;
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ void usage(void)
|
||||
" they will be processed in order\n"
|
||||
" by default, all is off\n"
|
||||
" -full also dump buffers' content\n"
|
||||
" -raw-time also prints 'raw time'\n"
|
||||
" -ip <host> connect to given IP address (default %s)\n"
|
||||
" -p <port> connect to given port (default %d)\n"
|
||||
" -x GUI output\n"
|
||||
@@ -91,6 +92,7 @@ int main(int n, char **v)
|
||||
int gui_active = 1;
|
||||
textlog_data textlog_data;
|
||||
int full = 0;
|
||||
int raw_time = 0;
|
||||
|
||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
|
||||
@@ -117,6 +119,7 @@ int main(int n, char **v)
|
||||
if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; }
|
||||
if (!strcmp(v[i], "-no-gui")) { gui_active = 0; continue; }
|
||||
if (!strcmp(v[i], "-full")) { full = 1; continue; }
|
||||
if (!strcmp(v[i], "-raw-time")) { raw_time = 1; continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
@@ -162,6 +165,7 @@ int main(int n, char **v)
|
||||
// "ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]");
|
||||
logger_add_view(textlog, out);
|
||||
if (full) textlog_dump_buffer(textlog, 1);
|
||||
if (raw_time) textlog_raw_time(textlog, 1);
|
||||
free(name);
|
||||
free(desc);
|
||||
}
|
||||
@@ -187,7 +191,7 @@ int main(int n, char **v)
|
||||
while (1) {
|
||||
event e;
|
||||
e = get_event(textlog_data.socket, &ebuf, database);
|
||||
if (e.type == -1) abort();
|
||||
if (e.type == -1) break;
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
# code example of adding a command to the telnet server
|
||||
|
||||
The following example is extracted from [the oai `openair1/PHY/CODING/coding_load.c` file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c).
|
||||
|
||||
```c
|
||||
/*
|
||||
include the telnet server data structures and API definitions
|
||||
*/
|
||||
#include "common/utils/telnetsrv/telnetsrv.h"
|
||||
|
||||
|
||||
/*
|
||||
define the null terminated array of telnetshell_cmddef_t structures
|
||||
which map each sub-command string to a function implementing it.
|
||||
you may also provide a help string which will be printed when
|
||||
the global help command is used. The prototype for the function
|
||||
implementing sub commands must match the `cmdfunc_t` type defined
|
||||
in `telnetsrv.h`
|
||||
*/
|
||||
static int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt);
|
||||
static telnetshell_cmddef_t coding_cmdarray[] = {
|
||||
{"mode","[sse,avx2,stdc,none]",coding_setmod_cmd},
|
||||
{"","",NULL},
|
||||
};
|
||||
|
||||
/*
|
||||
define the null terminated list of telnetshell_vardef_t structures defining the
|
||||
variables that can be set and get using the pre-defined get and set command
|
||||
of the telnet server
|
||||
*/
|
||||
telnetshell_vardef_t coding_vardef[] = {
|
||||
{"maxiter",TELNET_VARTYPE_INT32,&max_turbo_iterations},
|
||||
{"",0,NULL}
|
||||
};
|
||||
.................
|
||||
/*
|
||||
look for telnet server, if it is loaded, add the coding commands to it
|
||||
we use the shared library loader API to check the telnet server availibility
|
||||
The telnet server TELNET_ADDCMD_FNAME function takes three arguments:
|
||||
1. The name of the telnet command to be added, here "coding"
|
||||
1. The `coding_cmdarray` list of "coding" sub-commands we defined earlier
|
||||
1. The `coding_varde f`list of variables we defined earlier
|
||||
*/
|
||||
add_telnetcmd_func_t addcmd = (add_telnetcmd_func_t)get_shlibmodule_fptr("telnetsrv", TELNET_ADDCMD_FNAME);
|
||||
if (addcmd != NULL) {
|
||||
addcmd("coding",coding_vardef,coding_cmdarray);
|
||||
.......
|
||||
/*
|
||||
functions implementing the "coding mode" sub command, as defined in
|
||||
the `coding_cmdarray` passed earlier to the TELNET_ADDCMD_FNAME function.
|
||||
This function will be called by the telnet server, when the `coding_cmdarray`
|
||||
command is received from the telnet client
|
||||
*/
|
||||
int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
/*
|
||||
1. buff argument is an input argument, pointer to the string received
|
||||
from the telnet client, the command and sub-command parts are removed
|
||||
In this case it points after "coding setmod" and is of no use as
|
||||
we don't have second level sub-commands.
|
||||
1. debug argument is an input argument set by the telnet server
|
||||
1. prnt arguments is also an input argument, a function pointer, to be used
|
||||
in place of printf to print messages on the telnet client interface. As this function
|
||||
is called by the telnet server stdout points to the main executable console,
|
||||
*/
|
||||
if (debug > 0)
|
||||
prnt( "coding_setmod_cmd received %s\n",buff);
|
||||
|
||||
if (strcasestr(buff,"sse") != NULL) {
|
||||
decoding_setmode(MODE_DECODE_SSE);
|
||||
} else if (strcasestr(buff,"avx2") != NULL) {
|
||||
decoding_setmode(MODE_DECODE_AVX2);
|
||||
} else if (strcasestr(buff,"stdc") != NULL) {
|
||||
decoding_setmode(MODE_DECODE_C);
|
||||
} else if (strcasestr(buff,"none") != NULL) {
|
||||
decoding_setmode(MODE_DECODE_NONE);
|
||||
} else {
|
||||
prnt("%s: wrong setmod parameter...\n",buff);
|
||||
}
|
||||
prnt("Coding and decoding current mode: %s\n",modedesc[curmode]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
..............
|
||||
|
||||
```
|
||||
# telnet server API
|
||||
|
||||
```c
|
||||
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd)
|
||||
```
|
||||
Add a command and the `cmd` list of sub-commands to the telnet server. After a successful call to `add_telnetcmd` function, the telnet server calls the function defined for each sub-commands in the null terminated `cmd` array, when the character string received from the telnet client matches the command and sub-command strings.
|
||||
Also adds the list of variables described in the `var` array to the list of variable which can be set and read.
|
||||
The function returns -1 if one argument is NULL.
|
||||
The telnet server is dynamically loaded, to use the `add_telnetcmd` function, the shared library loader API should be used to check the availability of the telnet server and retrieve it's address, as shown in [the example at the top of this page](telnetaddcmd.md#code-example-of-adding-a-command-to-the-telnet-server).
|
||||
|
||||
# telnet server public data types
|
||||
## `telnetshell_vardef_t`structure
|
||||
This structure is used by developers to describe the variables that can be set or read using the get,set and getall sub-commands.
|
||||
|
||||
| Fields | type |Description |
|
||||
|:-----------|:------:|:-----------------------|
|
||||
| `varname` | `char[TELNET_CMD_MAXSIZE]` | variable name, as specified when using the get and set commands. |
|
||||
| `vartype` | `char` | Defines the type of the variable pointed by the `varvalptr`field. Supported values: TELNET_VARTYPE_INT32 TELNET_VARTYPE_INT16 TELNET_VARTYPE_INT64 TELNET_VARTYPE_STRING TELNET_VARTYPE_DOUBLE |
|
||||
| `varvalptr` | `void*` | Defines the type of the variable pointed by the `varvalptr`field |
|
||||
|
||||
## `telnetshell_cmddef_t`structure
|
||||
This structure is used by developers to describe the first level sub-commands to be added to the telnet server.
|
||||
|
||||
| Fields | type |Description |
|
||||
|:-----------|:------:|:-----------------------|
|
||||
| `cmdname` | `char[TELNET_CMD_MAXSIZE]` | command name, as tested by the telnet server to check it should call the `cmdfunc` function |
|
||||
| `helpstr` | `char[TELNET_HELPSTR_SIZE]` | character string to print when the elp`command is received from the telnet client |
|
||||
| `cmdfunc` | `cmdfunc_t` | pointer to the function implementing the `cmdname` sub command. |
|
||||
|
||||
[oai telnet server home](telnetsrv.md)
|
||||
@@ -0,0 +1,21 @@
|
||||
# telnet server principles
|
||||
|
||||
The oai telnet server is implemented in a shared library to be loaded by the [oai shared library loader](loader). The implementation includes a `telnetsrv_autoinit` function which is automatically called at load time, starts the telnet server and registers a first set of commands, which are delivered with the server (telnet, softmodem, loader).
|
||||
|
||||
Currently the telnet server only supports one user connection. The same dedicated thread is used to wait for a user connection and process the input received from this connection.
|
||||
|
||||
The telnet server provides an API which can be used by any oai component to add new CLI commands to the server. A pre-defined command can be used to get or set a list of variables.
|
||||
|
||||
|
||||
|
||||
# telnet server source files
|
||||
|
||||
telnet server source files are located in [common/utils/telnetsrv](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv)
|
||||
|
||||
1. [telnetsrv.c](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv/telnetsrv.c) contains the telnet server implementation, including the implementation of the telnet CLI command.
|
||||
1. [telnetsrv.h](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv/telnetsrv.h) is the telnet server include file containing both private and public data type definitions. It also contains API prototypes for functions that are used to register a new command in the server.
|
||||
1. `telnetsrv\_\<XXX\>.c`: implementation of \<XXX\> CLI command which are delivered with the telnet server.
|
||||
1. `telnetsrv\_\<XXX\>.h`: include file for the implementation of XXX CLI command. Usually included only in the corresponding `.c`file
|
||||
1. [telnetsrv_CMakeLists.txt](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv_CMakeLists.txt): CMakelists file containing the cmake instructions to build the telnet server. this file is included in the [global oai CMakelists](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/cmake_targets/CMakeLists.txt).
|
||||
|
||||
[oai telnet server home](telnetsrv.md)
|
||||
@@ -0,0 +1,21 @@
|
||||
getall command can be used to get the list of variables that can bet set or get from the telnet shell. Knowing the names of the variables they can then be set or read. Setting a variable is not always relevant, the telnet server doesn't provide a mechanism to restrict the set command.
|
||||
|
||||
```bash
|
||||
softmodem> telnet getall
|
||||
telnet, debug = 0
|
||||
telnet, prio = 0
|
||||
telnet, loopc = 10
|
||||
telnet, loopd = 5000
|
||||
telnet, phypb = 65000
|
||||
telnet, hsize = 50
|
||||
telnet, hfile = "oaitelnet.history"
|
||||
softmodem> telnet set loopc 100
|
||||
telnet, loopc set to
|
||||
100
|
||||
softmodem> telnet get loopc
|
||||
telnet, loopc = 100
|
||||
softmodem>
|
||||
|
||||
```
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,57 @@
|
||||
# oai telnet server global help
|
||||
|
||||
``` bash
|
||||
alblf@at8020-a:~$ telnet 10.133.10.77 9090
|
||||
Trying 10.133.10.77...
|
||||
Connected to 10.133.10.77.
|
||||
Escape character is '^]'.
|
||||
|
||||
softmodem> help
|
||||
module 0 = telnet:
|
||||
telnet [get set] debug <value>
|
||||
telnet [get set] prio <value>
|
||||
telnet [get set] loopc <value>
|
||||
telnet [get set] loopd <value>
|
||||
telnet [get set] phypb <value>
|
||||
telnet [get set] hsize <value>
|
||||
telnet [get set] hfile <value>
|
||||
telnet redirlog [here,file,off]
|
||||
telnet param [prio]
|
||||
telnet history [list,reset]
|
||||
module 1 = softmodem:
|
||||
softmodem show loglvl|thread|config
|
||||
softmodem log (enter help for details)
|
||||
softmodem thread (enter help for details)
|
||||
softmodem exit
|
||||
module 2 = phy:
|
||||
phy disp [phycnt,uedump,uestat UE<x>]
|
||||
module 3 = loader:
|
||||
loader [get set] mainversion <value>
|
||||
loader [get set] defpath <value>
|
||||
loader [get set] maxshlibs <value>
|
||||
loader [get set] numshlibs <value>
|
||||
loader show [params,modules]
|
||||
module 4 = coding:
|
||||
coding [get set] maxiter <value>
|
||||
coding mode [sse,avx2,stdc,none]
|
||||
softmodem>
|
||||
```
|
||||
|
||||
# oai telnet server, specific commands help
|
||||
|
||||
``` bash
|
||||
softmodem> softmodem log help
|
||||
log sub commands:
|
||||
show: display current log configuration
|
||||
online, noonline: enable or disable console logs
|
||||
enable, disable id1-id2: enable or disable logs for components index id1 to id2
|
||||
level_<level> id1-id2: set log level to <level> for components index id1 to id2
|
||||
level_<verbosity> id1-id2: set log verbosity to <verbosity> for components index id1 to id2
|
||||
use the show command to get the values for <level>, <verbosity> and the list of component indexes that can be used for id1 and id2
|
||||
softmodem>
|
||||
|
||||
|
||||
```
|
||||
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,44 @@
|
||||
The telnet server implements a simple history system
|
||||
```bash
|
||||
softmodem> telnet history list
|
||||
1: telnet history list
|
||||
2: telnet history list
|
||||
3: help
|
||||
4: loader show modules
|
||||
5: softmodem show loglvl
|
||||
6: help
|
||||
7: telnet history
|
||||
8: help
|
||||
9: telnet history list
|
||||
10: help
|
||||
11: loader show modules
|
||||
12: softmodem show loglvl
|
||||
13: softmodem log help
|
||||
14: softmodem log disable 0-35
|
||||
15: softmodem log show
|
||||
16: help
|
||||
17: telnet history list
|
||||
18: loader show modules
|
||||
19: softmodem thread show
|
||||
20: help
|
||||
21: softmodem thread help
|
||||
22: softmodem log show
|
||||
23: softmodem log help
|
||||
24: softmodem log level_error 0-4
|
||||
25: loader show modules
|
||||
26: loader show config
|
||||
27: help
|
||||
28: loader show params
|
||||
29: loader show modules
|
||||
softmodem> !28
|
||||
softmodem> loader show params
|
||||
loader parameters:
|
||||
Main executable build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
|
||||
Default shared lib path: ""
|
||||
Max number of shared lib : 10
|
||||
softmodem>
|
||||
|
||||
```
|
||||
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,47 @@
|
||||
loader command can be used to check loader configuration parameters and the list of loaded shared libraries and for each library the list of available functions.
|
||||
|
||||
```bash
|
||||
softmodem> loader show params
|
||||
loader parameters:
|
||||
Main executable build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
|
||||
Default shared lib path: ""
|
||||
Max number of shared lib : 10
|
||||
softmodem> loader show modules
|
||||
4 shared lib have been dynamicaly loaded by the oai loader
|
||||
Module 0: telnetsrv
|
||||
Shared library build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
|
||||
Shared library path: "libtelnetsrv.so"
|
||||
1 function pointers registered:
|
||||
function 0 add_telnetcmd at 0x7ff8b772a2b0
|
||||
Module 1: NB_IoT
|
||||
Shared library build version: ""
|
||||
Shared library path: "libNB_IoT.so"
|
||||
1 function pointers registered:
|
||||
function 0 RCConfig_NbIoT at 0x7ff8b6b1b390
|
||||
Module 2: coding
|
||||
Shared library build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
|
||||
Shared library path: "libcoding.so"
|
||||
13 function pointers registered:
|
||||
function 0 init_td8 at 0x7ff8adde63a0
|
||||
function 1 init_td16 at 0x7ff8adde9760
|
||||
function 2 init_td16avx2 at 0x7ff8addec050
|
||||
function 3 phy_threegpplte_turbo_decoder8 at 0x7ff8adde6780
|
||||
function 4 phy_threegpplte_turbo_decoder16 at 0x7ff8adde9a90
|
||||
function 5 phy_threegpplte_turbo_decoder_scalar at 0x7ff8addef4a0
|
||||
function 6 phy_threegpplte_turbo_decoder16avx2 at 0x7ff8addec530
|
||||
function 7 free_td8 at 0x7ff8adde61d0
|
||||
function 8 free_td16 at 0x7ff8adde9590
|
||||
function 9 free_td16avx2 at 0x7ff8addebe80
|
||||
function 10 threegpplte_turbo_encoder_sse at 0x7ff8adde45b0
|
||||
function 11 threegpplte_turbo_encoder at 0x7ff8adde4a30
|
||||
function 12 init_encoder_sse at 0x7ff8adde49d0
|
||||
Module 3: oai_device
|
||||
Shared library build version: ""
|
||||
Shared library path: "liboai_device_usrp.so"
|
||||
1 function pointers registered:
|
||||
function 0 device_init at 0x7ff8ac16a7a0
|
||||
softmodem>
|
||||
```
|
||||
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,95 @@
|
||||
The log command can be used to get the status of the log parameters and to dynamically modify these parameters. The log command has its own [help](telnethelp.md#oai-telnet-server-specific-commands-help)
|
||||
```bash
|
||||
softmodem> softmodem log disable 0-35
|
||||
log level/verbosity comp 0 PHY set to info / medium (disabled)
|
||||
log level/verbosity comp 1 MAC set to info / medium (disabled)
|
||||
log level/verbosity comp 2 EMU set to info / medium (disabled)
|
||||
log level/verbosity comp 3 OCG set to info / medium (disabled)
|
||||
log level/verbosity comp 4 OMG set to info / medium (disabled)
|
||||
log level/verbosity comp 5 OPT set to info / medium (disabled)
|
||||
log level/verbosity comp 6 OTG set to info / medium (disabled)
|
||||
log level/verbosity comp 7 OTG_LATENCY set to info / medium (disabled)
|
||||
log level/verbosity comp 8 OTG_LATENCY_BG set to info / medium (disabled)
|
||||
log level/verbosity comp 9 OTG_GP set to info / medium (disabled)
|
||||
log level/verbosity comp 10 OTG_GP_BG set to info / medium (disabled)
|
||||
log level/verbosity comp 11 OTG_JITTER set to info / medium (disabled)
|
||||
log level/verbosity comp 12 RLC set to info / medium (disabled)
|
||||
log level/verbosity comp 13 PDCP set to info / medium (disabled)
|
||||
log level/verbosity comp 14 RRC set to info / medium (disabled)
|
||||
log level/verbosity comp 15 NAS set to info / medium (disabled)
|
||||
log level/verbosity comp 16 PERF set to info / medium (disabled)
|
||||
log level/verbosity comp 17 OIP set to info / medium (disabled)
|
||||
log level/verbosity comp 18 CLI set to info / medium (disabled)
|
||||
log level/verbosity comp 19 MSC set to info / medium (disabled)
|
||||
log level/verbosity comp 20 OCM set to info / medium (disabled)
|
||||
log level/verbosity comp 21 UDP set to info / medium (disabled)
|
||||
log level/verbosity comp 22 GTPV1U set to info / medium (disabled)
|
||||
log level/verbosity comp 23 comp23? set to info / medium (disabled)
|
||||
log level/verbosity comp 24 S1AP set to info / medium (disabled)
|
||||
log level/verbosity comp 25 SCTP set to info / medium (disabled)
|
||||
log level/verbosity comp 26 HW set to info / medium (disabled)
|
||||
log level/verbosity comp 27 OSA set to info / medium (disabled)
|
||||
log level/verbosity comp 28 eRAL set to info / medium (disabled)
|
||||
log level/verbosity comp 29 mRAL set to info / medium (disabled)
|
||||
log level/verbosity comp 30 ENB_APP set to info / medium (disabled)
|
||||
log level/verbosity comp 31 FLEXRAN_AGENT set to info / medium (disabled)
|
||||
log level/verbosity comp 32 TMR set to info / medium (disabled)
|
||||
log level/verbosity comp 33 USIM set to info / medium (disabled)
|
||||
log level/verbosity comp 34 LOCALIZE set to info / medium (disabled)
|
||||
log level/verbosity comp 35 RRH set to info / medium (disabled)
|
||||
softmodem> softmodem log show
|
||||
Available log levels:
|
||||
emerg alert crit error warn notice info debug file trace
|
||||
Available verbosity:
|
||||
none low medium high full
|
||||
component verbosity level enabled
|
||||
00 PHY: medium info N
|
||||
01 MAC: medium info N
|
||||
02 EMU: medium info N
|
||||
03 OCG: medium info N
|
||||
04 OMG: medium info N
|
||||
05 OPT: medium info N
|
||||
06 OTG: medium info N
|
||||
07 OTG_LATENCY: medium info N
|
||||
08 OTG_LATENCY_BG: medium info N
|
||||
09 OTG_GP: medium info N
|
||||
10 OTG_GP_BG: medium info N
|
||||
11 OTG_JITTER: medium info N
|
||||
12 RLC: medium info N
|
||||
13 PDCP: medium info N
|
||||
14 RRC: medium info N
|
||||
15 NAS: medium info N
|
||||
16 PERF: medium info N
|
||||
17 OIP: medium info N
|
||||
18 CLI: medium info N
|
||||
19 MSC: medium info N
|
||||
20 OCM: medium info N
|
||||
21 UDP: medium info N
|
||||
22 GTPV1U: medium info N
|
||||
23 comp23?: medium info N
|
||||
24 S1AP: medium info N
|
||||
25 SCTP: medium info N
|
||||
26 HW: medium info N
|
||||
27 OSA: medium info N
|
||||
28 eRAL: medium info N
|
||||
29 mRAL: medium info N
|
||||
30 ENB_APP: medium info N
|
||||
31 FLEXRAN_AGENT: medium info N
|
||||
32 TMR: medium info N
|
||||
33 USIM: medium info N
|
||||
34 LOCALIZE: medium info N
|
||||
35 RRH: medium info N
|
||||
36 comp36?: medium info Y
|
||||
37 LOADER: medium alert Y
|
||||
softmodem> softmodem log level_error 0-4
|
||||
log level/verbosity comp 0 PHY set to error / medium (enabled)
|
||||
log level/verbosity comp 1 MAC set to error / medium (enabled)
|
||||
log level/verbosity comp 2 EMU set to error / medium (enabled)
|
||||
log level/verbosity comp 3 OCG set to error / medium (enabled)
|
||||
log level/verbosity comp 4 OMG set to error / medium (enabled)
|
||||
softmodem> exit
|
||||
Connection closed by foreign host.
|
||||
```
|
||||
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,40 @@
|
||||
The telnet server includes a **_loop_** command that can be used to iterate a given command. The number of iterations and the delay, in ms between two iterations can be modified, as shown in the following example:
|
||||
|
||||
```bash
|
||||
softmodem> telnet get loopc
|
||||
telnet, loopc = 10
|
||||
softmodem> telnet get loopd
|
||||
telnet, loopd = 2000
|
||||
softmodem> telnet set loopd 1000
|
||||
telnet, loopd set to
|
||||
1000
|
||||
softmodem> loop softmodem show thread
|
||||
2018-03-27 17:58:49.000 2/10
|
||||
id name state USRmod KRNmod prio nice vsize proc pol
|
||||
|
||||
3946 lte-softmodem S 20005 9440 20 0 236560384 2 0 other
|
||||
|
||||
3946 lte-softmodem S 7 95 20 0 236560384 2 0 other
|
||||
3948 telnet R 0 0 20 0 236560384 2 0 other
|
||||
3949 ITTI acceptor S 2 9 20 0 236560384 2 0 other
|
||||
3951 ITTI 12 S 2 2 20 0 236560384 7 0 other
|
||||
3952 ITTI 11 S 0 0 20 0 236560384 0 0 other
|
||||
3953 ITTI 9 S 0 0 20 0 236560384 1 0 other
|
||||
3954 ITTI 7 S 0 0 20 0 236560384 7 0 other
|
||||
3955 ITTI 8 S 0 0 20 0 236560384 7 0 other
|
||||
3956 ITTI 4 S 35 0 20 0 236560384 2 0 other
|
||||
3957 ru_thread S 15366 3072 -10 0 236560384 0 2 rt: rr
|
||||
3958 ru_thread_prach S 0 0 -10 0 236560384 7 1 rt: fifo
|
||||
3959 fep_thread S 1874 123 -10 0 236560384 5 1 rt: fifo
|
||||
3960 feptx_thread S 1554 101 -10 0 236560384 7 1 rt: fifo
|
||||
3969 ru_thread S 0 0 -10 0 236560384 0 2 rt: rr
|
||||
3970 ru_thread S 1313 5522 -10 0 236560384 5 2 rt: rr
|
||||
3971 ru_thread S 4 6 -10 0 236560384 1 2 rt: rr
|
||||
3972 lte-softmodem S 318 9 -10 0 236560384 7 1 rt: fifo
|
||||
3973 lte-softmodem S 6 13 -10 0 236560384 4 1 rt: fifo
|
||||
|
||||
```
|
||||
A **_loop_** command can be interrupted by pressing the **_enter_** key till getting the prompt.
|
||||
|
||||
[oai telnetserver home](telnetsrv.md)
|
||||
[oai telnetserver usage home](telnetusage.md)
|
||||
@@ -0,0 +1,7 @@
|
||||
The oai embedded telnet server is an optional monitoring and debugging tool. It provides a simple Command Line Interface to the oai softmem. New commands can easily be added by developers to the telnet server.
|
||||
|
||||
* [Using the telnet server](telnetusage.md)
|
||||
* [Adding commands to the oai telnet server](telnetaddcmd.md)
|
||||
* [telnet server architecture ](telnetarch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
@@ -0,0 +1,39 @@
|
||||
# starting the softmodem with the telnet server
|
||||
By default the embedded telnet server, which is implemented in a shared library, is not built. It can be built after compiling the softmodem executable using the `build_oai` script:
|
||||
|
||||
```bash
|
||||
cd \<oai repository\>/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
./build_oai --build-telnetsrv
|
||||
```
|
||||
|
||||
This will create the `libtelnetsrv.so` file in the `targets/bin` and `cmake_targets/lte_build_oai/build` sub directories of the oai repository.
|
||||
|
||||
When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader).
|
||||
|
||||
# using the Command Line Interface
|
||||
By default the telnet server listen on all the ip addresses configured on the system and on port 9090. This behavior can be changed using the `listenaddr` and `listenport` parameters.
|
||||
The telnet server includes a basic help, listing available commands and some commands also provide a specific detailed help sub-command.
|
||||
Below are examples of telnet sessions:
|
||||
|
||||
* [getting help](telnethelp.md)
|
||||
* [using the history](telnethist.md)
|
||||
* [using the get and set commands](telnetgetset.md)
|
||||
* [using the loop command](telnetloop.md)
|
||||
* [loader command](telnetloader.md)
|
||||
* [log command](telnetlog.md)
|
||||
|
||||
# telnet server parameters
|
||||
The telnet server is using the [oai configuration module](Config/Rtusage). Telnet parameters must be specified in the `telnetsrv` section. Some parameters can be modified via the telnet telnet server command, as specified in the last column of the following table.
|
||||
|
||||
| name | type | default | description | dynamic |
|
||||
|:---:|:---:|:---:|:----|:----:|
|
||||
| `listenaddr` | `ipV4 address, ascii format` | "0.0.0.0" | local address the server is listening on| N |
|
||||
| `listenport` | `integer` | 9090 | port number the server is listening on | N |
|
||||
| `loopcount` | `integer` | 10 | number of iterations for the loop command | Y |
|
||||
| `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations | Y |
|
||||
| `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y |
|
||||
| `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y |
|
||||
|
||||
[oai telnet server home](telnetsrv.md)
|
||||
@@ -0,0 +1,274 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
# real_time choice in {hard, rt-preempt, no}
|
||||
real_time = "no";
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = (
|
||||
{ mcc = 208; mnc = 92; mnc_length = 2; }
|
||||
);
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
nb_antenna_ports = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
prach_root = 0;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -108;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.148";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.196/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.196/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.196/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="high";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="debug";
|
||||
rlc_log_verbosity ="high";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="high";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 210;
|
||||
puCch10xSnr = 210;
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa";
|
||||
worker_config = "ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 73
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -28;
|
||||
max_rxgain = 96;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="high";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="high";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="high";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
@@ -0,0 +1,171 @@
|
||||
**Table of Contents**
|
||||
|
||||
1. [OpenAirInterface eNB Feature Set](#openairinterface-enb-feature-set)
|
||||
1. [eNB PHY Layer](#enb-phy-layer)
|
||||
2. [eNB MAC Layer](#enb-mac-layer)
|
||||
3. [eNB RLC Layer](#enb-rlc-layer)
|
||||
4. [eNB PDCP Layer](#enb-pdcp-layer)
|
||||
5. [eNB RRC Layer](#enb-rrc-layer)
|
||||
6. [eNB X2AP](#enb-x2ap)
|
||||
7. [eNB Advanced Features](#enb-advanced-features)
|
||||
2. [OpenAirInterface UE Feature Set](#openairinterface-ue-feature-set)
|
||||
1. [LTE UE PHY Layer](#lte-ue-phy-layer)
|
||||
2. [LTE UE MAC Layer](#lte-ue-mac-layer)
|
||||
3. [LTE UE RLC Layer](#lte-ue-rlc-layer)
|
||||
4. [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
|
||||
5. [LTE UE RRC Layer](#lte-ue-rrc-layer)
|
||||
|
||||
# OpenAirInterface Block diagram #
|
||||
|
||||

|
||||
|
||||
# OpenAirInterface eNB Feature Set #
|
||||
|
||||
## eNB PHY Layer ##
|
||||
|
||||
The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
|
||||
|
||||
- LTE release 8.6 compliant, and implements a subset of release 10
|
||||
- FDD and TDD configurations: 1 (experimental) and 3
|
||||
- Bandwidth: 5, 10, and 20 MHz
|
||||
- Transmission modes: 1, 2 (stable), 3, 4, 5, 6, 7 (experimental)
|
||||
- Max number of antennas: 2
|
||||
- CQI/PMI reporting: aperiodic, feedback mode 3 - 0 and 3 - 1
|
||||
- PRACH preamble format 0
|
||||
- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
|
||||
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
|
||||
- HARQ support (UL and DL)
|
||||
- Highly optimized base band processing (including turbo decoder)
|
||||
|
||||
### Performances ###
|
||||
|
||||
**Transmission Mode, Bandwidth** | **Expected Throughput** | **Measured Throughput** | **Measurement Conditions**
|
||||
-------------------------------- | ----------------------- | ------------------------| ----------------:
|
||||
FDD DL: 5 MHz, 25 PRBS/ MCS 28 | 16 - 17 Mbit/s | TM1: 17.0 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD DL: 10 MHz, 50 PRBS/ MCS 28 | 34 - 35 Mbit/s | TM1: 32.8 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD DL: 20 MHz, 100 PRBS/ MCS 28 | 70 Mbit/s | TM1: 69.9 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| | |
|
||||
FDD UL: 5 MHz, 25 PRBS/ MCS 20 | 9 Mbit/s | TM1: 8.28 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD UL: 10 MHz, 50 PRBS/ MCS 20 | 17 Mbit/s | TM1: 15.2 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD UL: 20 MHz, 100 PRBS/ MCS 20 | 35 Mbit/s | TM1: 18.6 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| |
|
||||
TDD DL: 5 MHz, 25 PRBS/ MCS **XX** | **TBC** Mbit/s | 3.33 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD DL: 10 MHz, 50 PRBS/ MCS **XX** | **TBC** Mbit/s | 8.90 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD DL: 20 MHz, 100 PRBS/ MCS **XX** | **TBC** Mbit/s | N/A | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| | |
|
||||
TDD UL: 5 MHz, 25 PRBS/ MCS **XX** | **TBC** Mbit/s | 1.66 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD UL: 10 MHz, 50 PRBS/ MCS **XX** | **TBC** Mbit/s | 1.89 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | **TBC** Mbit/s | N/A | COTS-UE Cat 4 (150/50 Mbps)
|
||||
|
||||
- Number of supported UEs: **To Be Completed**
|
||||
|
||||
## eNB MAC Layer ##
|
||||
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
|
||||
- RRC interface for CCCH, DCCH, and DTCH
|
||||
- Proportional fair scheduler (round robin scheduler soon)
|
||||
- DCI generation
|
||||
- HARQ Support
|
||||
- RA procedures and RNTI management
|
||||
- RLC interface (AM, UM)
|
||||
- UL power control
|
||||
- Link adaptation
|
||||
|
||||
## eNB RLC Layer ##
|
||||
|
||||
The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
|
||||
|
||||
- RLC TM (mainly used for BCCH and CCCH)
|
||||
* Neither segment nor concatenate RLC SDUs
|
||||
* Do not include a RLC header in the RLC PDU
|
||||
* Delivery of received RLC PDUs to upper layers
|
||||
- RLC UM (mainly used for DTCH)
|
||||
* Segment or concatenate RLC SDUs according to the TB size selected by MAC
|
||||
* Include a RLC header in the RLC PDU
|
||||
* Duplication detection
|
||||
* PDU reordering and reassembly
|
||||
- RLC AM, compatible with 9.3
|
||||
* Segmentation, re-segmentation, concatenation, and reassembly
|
||||
* Padding
|
||||
* Data transfer to the user
|
||||
* RLC PDU retransmission in support of error control and correction
|
||||
* Generation of data/control PDUs
|
||||
|
||||
## eNB PDCP Layer ##
|
||||
|
||||
The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and implements the following functions:
|
||||
|
||||
- User and control data transfer
|
||||
- Sequence number management
|
||||
- RB association with PDCP entity
|
||||
- PDCP entity association with one or two RLC entities
|
||||
- Integrity check and encryption using the AES and Snow3G algorithms
|
||||
|
||||
## eNB RRC Layer ##
|
||||
|
||||
The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
|
||||
|
||||
- System Information broadcast (SIB 1, 2, 3, and 13)
|
||||
* SIB1: Up to 6 PLMN IDs broadcast
|
||||
- RRC connection establishment
|
||||
- RRC connection reconfiguration (addition and removal of radio bearers, connection release)
|
||||
- RRC connection release
|
||||
- RRC connection re-establishment
|
||||
- Inter-frequency measurement collection and reporting (experimental)
|
||||
- eMBMS for multicast and broadcast (experimental)
|
||||
- Handover (experimental)
|
||||
- Paging (soon)
|
||||
|
||||
## eNB X2AP ##
|
||||
|
||||
The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following functions:
|
||||
|
||||
- X2 Setup Request
|
||||
- X2 Setup Response
|
||||
|
||||
## eNB Advanced Features ##
|
||||
|
||||
**To be completed**
|
||||
|
||||
# OpenAirInterface UE Feature Set #
|
||||
|
||||
## LTE UE PHY Layer ##
|
||||
|
||||
The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
|
||||
|
||||
- LTE release 8.6 compliant, and implements a subset of release 10
|
||||
- FDD and TDD configurations: 1 (experimental) and 3
|
||||
- Bandwidth: 5, 10, and 20 MHz
|
||||
- Transmission modes: 1, 2 (stable)
|
||||
- Max number of antennas: 2
|
||||
- CQI/PMI reporting: aperiodic, feedback mode 3 - 0 and 3 - 1
|
||||
- PRACH preamble format 0
|
||||
- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
|
||||
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
|
||||
|
||||
## LTE UE MAC Layer ##
|
||||
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
|
||||
- RRC interface for CCCH, DCCH, and DTCH
|
||||
- HARQ Support
|
||||
- RA procedures and RNTI management
|
||||
- RLC interface (AM, UM)
|
||||
- UL power control
|
||||
- Link adaptation
|
||||
|
||||
## LTE UE RLC Layer ##
|
||||
|
||||
The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
|
||||
|
||||
## LTE UE PDCP Layer ##
|
||||
|
||||
The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0.
|
||||
|
||||
## LTE UE RRC Layer ##
|
||||
|
||||
The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
|
||||
|
||||
- System Information decoding
|
||||
- RRC connection establishment
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 271 KiB |
@@ -33,7 +33,7 @@
|
||||
//#include "TDD-Config.h"
|
||||
//#include "MBSFN-SubframeConfigList.h"
|
||||
//#include "MobilityControlInfo.h"
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
//#include "SCellToAddMod-r10.h"
|
||||
//#endif
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
@@ -180,7 +180,8 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig, fp->prach_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (cfg->emtc_config.prach_ce_level_0_enable.value == 1) {
|
||||
fp->prach_emtc_config_common.prach_Config_enabled = 1;
|
||||
|
||||
@@ -260,6 +261,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
init_mpdcch(RC.eNB[Mod_id][CC_id]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -482,7 +484,8 @@ void
|
||||
phy_config_dedicated_eNB_step2 (PHY_VARS_eNB * eNB)
|
||||
{
|
||||
uint16_t UE_id;
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
@@ -499,8 +502,8 @@ phy_config_dedicated_eNB_step2 (PHY_VARS_eNB * eNB)
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated) {
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present == PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition = 0;
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present==LTE_PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition=0;
|
||||
else {
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition = 1;
|
||||
}
|
||||
@@ -558,7 +561,7 @@ phy_config_dedicated_eNB_step2 (PHY_VARS_eNB * eNB)
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->schedulingRequestConfig) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == SchedulingRequestConfig_PR_setup) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == LTE_SchedulingRequestConfig_PR_setup) {
|
||||
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
eNB->scheduling_request_config[UE_id].sr_ConfigIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
|
||||
eNB->scheduling_request_config[UE_id].dsr_TransMax = physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
|
||||
@@ -573,14 +576,14 @@ phy_config_dedicated_eNB_step2 (PHY_VARS_eNB * eNB)
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup = 1;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].freqDomainPosition = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_Bandwidth = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == LTE_SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup = 1;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].freqDomainPosition = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_Bandwidth = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_HoppingBandwidth = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].transmissionComb = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
|
||||
|
||||
@@ -723,7 +726,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
|
||||
#endif
|
||||
int i, UE_id;
|
||||
@@ -821,7 +824,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
|
||||
prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
// PRACH BR
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
@@ -890,7 +893,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
|
||||
#endif
|
||||
int i, UE_id;
|
||||
@@ -923,7 +926,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
|
||||
free_and_zero(prach_vars->prach_ifft[0]);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]);
|
||||
free_and_zero(prach_vars_br->prach_ifft[ce_level]);
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
@@ -101,7 +101,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (j=0;j<4;j++) {
|
||||
ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
|
||||
@@ -179,7 +179,7 @@ void phy_free_RU(RU_t *ru)
|
||||
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(ru->prach_rxsigF[i]);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
@@ -41,7 +41,7 @@ extern uint8_t nfapi_mode;
|
||||
|
||||
void phy_config_sib1_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
TDD_Config_t *tdd_Config,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t SIwindowsize,
|
||||
uint16_t SIperiod)
|
||||
{
|
||||
@@ -59,11 +59,11 @@ void phy_config_sib1_ue(module_id_t Mod_id,int CC_id,
|
||||
|
||||
void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList)
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList)
|
||||
{
|
||||
|
||||
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
@@ -114,7 +114,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
init_ul_hopping(fp);
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0;
|
||||
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon.present==SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon.present == LTE_SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 1;
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig;
|
||||
@@ -159,19 +159,19 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
fp->MBSFN_config[i].radioframeAllocationPeriod = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod;
|
||||
fp->MBSFN_config[i].radioframeAllocationOffset = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset;
|
||||
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
fp->MBSFN_config[i].fourFrames_flag = 0;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig =
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
}
|
||||
}
|
||||
@@ -203,11 +203,11 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
|
||||
/*
|
||||
* Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover
|
||||
*/
|
||||
void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed)
|
||||
void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, LTE_MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed)
|
||||
{
|
||||
|
||||
if(mobilityControlInfo!=NULL) {
|
||||
RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon;
|
||||
LTE_RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon;
|
||||
LOG_I(PHY,"radioResourceConfigCommon %p\n", radioResourceConfigCommon);
|
||||
memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms_before_ho,
|
||||
(void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms,
|
||||
@@ -264,7 +264,7 @@ void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, Mobi
|
||||
init_ul_hopping(fp);
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0;
|
||||
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon->present==SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon->present == LTE_SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 1;
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon->choice.setup.srs_BandwidthConfig;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon->choice.setup.srs_SubframeConfig;
|
||||
@@ -344,10 +344,10 @@ void phy_config_meas_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8
|
||||
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id)
|
||||
{
|
||||
|
||||
@@ -366,7 +366,7 @@ void phy_config_harq_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
extern uint16_t beta_cqi[16];
|
||||
|
||||
void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated )
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated )
|
||||
{
|
||||
|
||||
static uint8_t first_dedicated_configuration = 0;
|
||||
@@ -396,7 +396,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated) {
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present==PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present == LTE_PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
|
||||
phy_vars_ue->pucch_config_dedicated[eNB_id].ackNackRepetition=0;
|
||||
else {
|
||||
phy_vars_ue->pucch_config_dedicated[eNB_id].ackNackRepetition=1;
|
||||
@@ -448,25 +448,25 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
|
||||
LOG_I(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[eNB_id]);
|
||||
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
|
||||
case AntennaInfoDedicated__transmissionMode_tm1:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm1:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 1;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm2:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm2:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 2;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm3:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm3:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 3;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm4:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm4:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 4;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm5:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm5:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 5;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm6:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm6:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 6;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm7:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm7:
|
||||
lte_gold_ue_spec_port5(phy_vars_ue->lte_gold_uespec_port5_table, phy_vars_ue->frame_parms.Nid_cell, phy_vars_ue->pdcch_vars[0][eNB_id]->crnti);
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 7;
|
||||
break;
|
||||
@@ -479,7 +479,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->schedulingRequestConfig) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == SchedulingRequestConfig_PR_setup) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == LTE_SchedulingRequestConfig_PR_setup) {
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].sr_ConfigIndex=physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].dsr_TransMax=physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
|
||||
@@ -496,7 +496,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
|
||||
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 0;
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == LTE_SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 1;
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
@@ -525,14 +525,14 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
LOG_E(PHY,"Unsupported Aperiodic CQI Feedback Mode : %d\n",phy_vars_ue->cqi_report_config[eNB_id].cqi_ReportModeAperiodic);
|
||||
}
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) {
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_setup) {
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == LTE_CQI_ReportPeriodic_PR_setup) {
|
||||
// configure PUCCH CQI reporting
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PUCCH_ResourceIndex = physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex;
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex)
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = *physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex;
|
||||
}
|
||||
else if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_release) {
|
||||
else if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == LTE_CQI_ReportPeriodic_PR_release) {
|
||||
// handle release
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = -1;
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = -1;
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "PHICH-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_PHICH-Config.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_MobilityControlInfo.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#endif
|
||||
/** @addtogroup _PHY_STRUCTURES_
|
||||
* @{
|
||||
@@ -110,7 +110,7 @@ void phy_config_mib_eNB(int Mod_id,
|
||||
int CC_id,
|
||||
int eutra_band,
|
||||
int N_RB_DL,
|
||||
PHICH_Config_t *phich_config,
|
||||
LTE_PHICH_Config_t *phich_config,
|
||||
int Nid_cell,
|
||||
int Ncp,
|
||||
int p_eNB,
|
||||
@@ -128,7 +128,7 @@ void phy_config_mib_eNB(int Mod_id,
|
||||
@param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/
|
||||
void phy_config_sib1_eNB(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
TDD_Config_t *tdd_Config,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t SIwindowsize,
|
||||
uint16_t SIperiod);
|
||||
|
||||
@@ -143,7 +143,7 @@ void phy_config_sib1_eNB(module_id_t Mod_id,
|
||||
void phy_config_sib1_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t CH_index,
|
||||
TDD_Config_t *tdd_Config,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t SIwindowsize,
|
||||
uint16_t SIperiod);
|
||||
|
||||
@@ -166,14 +166,14 @@ void phy_config_sib1_ue(module_id_t Mod_id,
|
||||
@param additionalSpectrumEmission UL parameter (see 36.101)
|
||||
@param mbsfn_SubframeConfigList MBSFN subframe configuration
|
||||
*/
|
||||
void phy_config_sib2_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t CH_index,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
|
||||
void phy_config_sib2_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t CH_index,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -188,7 +188,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,
|
||||
void phy_config_afterHO_ue(module_id_t Mod_id,
|
||||
uint8_t CC_id,
|
||||
uint8_t eNB_index,
|
||||
MobilityControlInfo_t *mobilityControlInfo,
|
||||
LTE_MobilityControlInfo_t *mobilityControlInfo,
|
||||
uint8_t ho_failed);
|
||||
/*!
|
||||
\fn void phy_config_sib2_eNB(module_id_t Mod_id,
|
||||
@@ -206,13 +206,13 @@ void phy_config_afterHO_ue(module_id_t Mod_id,
|
||||
@param additionalSpectrumEmission UL parameter (see 36.101)
|
||||
@param mbsfn_SubframeConfigList MBSFN subframe configuration
|
||||
*/
|
||||
void phy_config_sib2_eNB(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
|
||||
void phy_config_sib2_eNB(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -229,7 +229,7 @@ void phy_config_sib2_eNB(module_id_t Mod_id,
|
||||
void phy_config_dedicated_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t CH_index,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated);
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated);
|
||||
|
||||
/*!
|
||||
\fn void phy_config_harq_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
|
||||
@@ -308,7 +308,7 @@ void phy_config_meas_ue(module_id_t Mod_id,
|
||||
void phy_config_dedicated_eNB(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
rnti_t rnti,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated);
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated);
|
||||
|
||||
/*!
|
||||
\fn void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB)
|
||||
@@ -349,15 +349,15 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
|
||||
uint32_t perfect_ce);
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id);
|
||||
|
||||
void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
uint16_t rnti,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -117,7 +117,6 @@ uint8_t *generate_dci0(uint8_t *dci,
|
||||
|
||||
uint8_t dci_flip[8];
|
||||
|
||||
|
||||
#ifdef DEBUG_DCI_ENCODING
|
||||
for (int i=0;i<1+((DCI_LENGTH+16)/8);i++)
|
||||
printf("i %d : %x\n",i,dci[i]);
|
||||
|
||||
@@ -1969,7 +1969,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
|
||||
}
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int get_narrowband_index(int N_RB_UL,int rb) {
|
||||
|
||||
switch (N_RB_UL) {
|
||||
@@ -1993,6 +1993,7 @@ int get_narrowband_index(int N_RB_UL,int rb) {
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe)
|
||||
{
|
||||
@@ -2012,7 +2013,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
|
||||
|
||||
ulsch->harq_mask |= 1 << harq_pid;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ulsch->ue_type = ulsch_pdu->ulsch_pdu_rel13.ue_type;
|
||||
AssertFatal(harq_pid ==0 || ulsch->ue_type == NOCE, "Harq PID is not zero for BL/CE UE\n");
|
||||
|
||||
@@ -2114,6 +2115,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
|
||||
}
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
int get_first_rb_in_narrowband(int N_RB_UL,int rb) {
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
// Rule for accumulation of subframes for BL/CE UEs
|
||||
uint8_t Nacc=4;
|
||||
uint16_t j0,j,idelta;
|
||||
@@ -96,7 +96,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
if (mbsfn_flag == 0) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#ifdef PHY_TX_THREAD
|
||||
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
|
||||
#else
|
||||
@@ -114,7 +114,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
|
||||
#else
|
||||
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
//#define DEBUG_DCI_DECODING 1
|
||||
//#define DEBUG_PHY
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
|
||||
int32_t **txdataF = ru->common.txdataF_BF;
|
||||
int32_t **rxdataF = ru->common.rxdataF;
|
||||
int16_t **prach_rxsigF = ru->prach_rxsigF;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
|
||||
#endif
|
||||
void *tx_buffer = ru->ifbuffer.tx[subframe&1];
|
||||
@@ -222,7 +222,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
|
||||
|
||||
int16_t *rxF;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (packet_type > IF4p5_PRACH)
|
||||
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
|
||||
else
|
||||
@@ -263,7 +263,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
|
||||
int32_t **txdataF = ru->common.txdataF_BF;
|
||||
int32_t **rxdataF = ru->common.rxdataF;
|
||||
int16_t **prach_rxsigF = ru->prach_rxsigF;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
|
||||
#endif
|
||||
void *rx_buffer = ru->ifbuffer.rx;
|
||||
@@ -360,7 +360,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
|
||||
|
||||
int16_t *rxF;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (*packet_type > IF4p5_PRACH)
|
||||
rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0];
|
||||
else
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "prach_extern.h"
|
||||
|
||||
|
||||
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
#define rx_prach0 rx_prach
|
||||
#endif
|
||||
|
||||
@@ -51,7 +50,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t Nf,
|
||||
uint8_t tdd_mapindex
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint8_t br_flag,
|
||||
uint8_t ce_level
|
||||
#endif
|
||||
@@ -97,7 +96,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
|
||||
int32_t *prach_ifft=(int32_t*)NULL;
|
||||
int32_t **prach_ifftp=(int32_t **)NULL;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int prach_ifft_cnt=0;
|
||||
#endif
|
||||
|
||||
@@ -114,7 +113,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
frame_type = fp->frame_type;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) {
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
|
||||
"emtc prach_Config is not enabled\n");
|
||||
@@ -149,7 +148,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||
|
||||
if (eNB) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) {
|
||||
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
@@ -176,7 +175,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) {
|
||||
subframe = ru->proc.subframe_prach_br;
|
||||
rxsigF = ru->prach_rxsigF_br[ce_level];
|
||||
@@ -427,7 +426,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if ((eNB==NULL) && (ru!=NULL) && ru->function == NGFI_RRU_IF4p5) {
|
||||
|
||||
/// **** send_IF4 of rxsigF to RAU **** ///
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
|
||||
|
||||
else
|
||||
@@ -572,7 +571,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if (new_dft == 1) {
|
||||
new_dft = 0;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) {
|
||||
Xu=(int16_t*)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
|
||||
prach_ifft = prach_ifftp[prach_ifft_cnt++];
|
||||
@@ -629,7 +628,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
} // new dft
|
||||
|
||||
// check energy in nth time shift, for
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if ((br_flag==0) ||
|
||||
(eNB->prach_vars_br.repetition_number[ce_level]==
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
|
||||
@@ -696,7 +695,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void rx_prach(PHY_VARS_eNB *eNB,
|
||||
RU_t *ru,
|
||||
@@ -738,4 +737,4 @@ void rx_prach(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
@@ -570,7 +570,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su
|
||||
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int i;
|
||||
|
||||
for (i=0;i<4;i++) {
|
||||
|
||||
@@ -105,7 +105,7 @@ typedef enum {
|
||||
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
typedef enum {
|
||||
CEmodeA = 0,
|
||||
CEmodeB = 1
|
||||
@@ -138,7 +138,7 @@ typedef enum {
|
||||
HARQ_SR_CQI
|
||||
} UCI_type_t;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
typedef enum {
|
||||
NOCE,
|
||||
CEMODEA,
|
||||
@@ -183,7 +183,7 @@ typedef struct {
|
||||
PRACH_TDD_PREAMBLE_MAP_elem map[6];
|
||||
} PRACH_TDD_PREAMBLE_MAP;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
typedef struct {
|
||||
uint16_t slss_id;
|
||||
|
||||
@@ -127,7 +127,7 @@ typedef struct {
|
||||
/// codeword this transport block is mapped to
|
||||
uint8_t codeword;
|
||||
#ifdef PHY_TX_THREAD
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
|
||||
uint8_t sib1_br_flag;
|
||||
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
|
||||
@@ -184,7 +184,7 @@ typedef struct {
|
||||
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
|
||||
int16_t sqrt_rho_b;
|
||||
#ifndef PHY_TX_THREAD
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
|
||||
uint8_t sib1_br_flag;
|
||||
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
|
||||
@@ -349,7 +349,7 @@ typedef struct {
|
||||
uint8_t tdd_bundling;
|
||||
/// Received Energy
|
||||
uint32_t stat;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// non BL/CE, CEmodeA, CEmodeB
|
||||
UE_type_t ue_type;
|
||||
/// Indicates the symbols that are left empty due to eMTC retuning.
|
||||
@@ -444,7 +444,7 @@ typedef struct {
|
||||
} LTE_eNB_UE_stats;
|
||||
|
||||
typedef struct {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// UE type (normal, CEModeA, CEModeB)
|
||||
uint8_t ue_type;
|
||||
#endif
|
||||
|
||||
@@ -582,7 +582,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t Nf, uint8_t tdd_mapindex
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t br_flag
|
||||
#endif
|
||||
|
||||
@@ -3593,7 +3593,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
|
||||
|
||||
if (cqi_req == 1) {
|
||||
|
||||
if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
|
||||
if( (LTE_AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (LTE_AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
|
||||
{
|
||||
ulsch->O_RI = 1;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ typedef struct eNB_proc_NB_IoT_t_s {
|
||||
int RU_mask;
|
||||
/// mask for RUs serving nbiot (PRACH)
|
||||
int RU_mask_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach_br;
|
||||
#endif
|
||||
|
||||
@@ -847,6 +847,7 @@ typedef struct {
|
||||
time_stats_t pdsch_procedures_stat[RX_NB_TH];
|
||||
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t dlsch_procedures_stat[RX_NB_TH];
|
||||
time_stats_t crnti_procedures_stats;
|
||||
|
||||
time_stats_t ofdm_demod_stats;
|
||||
time_stats_t dlsch_rx_pdcch_stats;
|
||||
|
||||
@@ -159,7 +159,7 @@ typedef struct {
|
||||
PRACH_CONFIG_INFO prach_ConfigInfo;
|
||||
} PRACH_CONFIG_COMMON;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/// PRACH-eMTC-Config from 36.331 RRC spec
|
||||
typedef struct {
|
||||
@@ -192,7 +192,7 @@ typedef struct {
|
||||
/// prach_Config_enabled=1 means enabled. \vr{[0..1]}
|
||||
uint8_t prach_Config_enabled;
|
||||
/// PRACH Configuration Information
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
|
||||
#endif
|
||||
} PRACH_eMTC_CONFIG_COMMON;
|
||||
@@ -644,7 +644,7 @@ typedef struct {
|
||||
uint8_t nb_antenna_ports_eNB;
|
||||
/// PRACH_CONFIG
|
||||
PRACH_CONFIG_COMMON prach_config_common;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// PRACH_eMTC_CONFIG
|
||||
PRACH_eMTC_CONFIG_COMMON prach_emtc_config_common;
|
||||
#endif
|
||||
|
||||
+25
-25
@@ -85,7 +85,7 @@ typedef struct RU_proc_t_s {
|
||||
int subframe_tx;
|
||||
/// subframe to act upon for reception of prach
|
||||
int subframe_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for reception of prach BL/CE UEs
|
||||
int subframe_prach_br;
|
||||
#endif
|
||||
@@ -97,7 +97,7 @@ typedef struct RU_proc_t_s {
|
||||
int frame_tx_unwrap;
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach_br;
|
||||
#endif
|
||||
@@ -109,7 +109,7 @@ typedef struct RU_proc_t_s {
|
||||
int instance_cnt_FH1;
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach_br;
|
||||
#endif
|
||||
@@ -131,7 +131,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_t pthread_FH1;
|
||||
/// pthread structure for RU prach processing thread
|
||||
pthread_t pthread_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread structure for RU prach processing thread BL/CE UEs
|
||||
pthread_t pthread_prach_br;
|
||||
#endif
|
||||
@@ -154,7 +154,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_attr_t attr_FH1;
|
||||
/// pthread attributes for RU prach
|
||||
pthread_attr_t attr_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread attributes for RU prach BL/CE UEs
|
||||
pthread_attr_t attr_prach_br;
|
||||
#endif
|
||||
@@ -173,7 +173,7 @@ typedef struct RU_proc_t_s {
|
||||
struct sched_param sched_param_FH1;
|
||||
/// scheduling parameters for RU prach thread
|
||||
struct sched_param sched_param_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// scheduling parameters for RU prach thread BL/CE UEs
|
||||
struct sched_param sched_param_prach_br;
|
||||
#endif
|
||||
@@ -186,7 +186,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_cond_t cond_FH1;
|
||||
/// condition variable for RU prach thread
|
||||
pthread_cond_t cond_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// condition variable for RU prach thread BL/CE UEs
|
||||
pthread_cond_t cond_prach_br;
|
||||
#endif
|
||||
@@ -207,7 +207,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_mutex_t mutex_FH1;
|
||||
/// mutex for RU prach
|
||||
pthread_mutex_t mutex_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mutex for RU prach BL/CE UEs
|
||||
pthread_mutex_t mutex_prach_br;
|
||||
#endif
|
||||
@@ -359,7 +359,7 @@ typedef struct RU_t_s{
|
||||
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru);
|
||||
/// function pointer to wakeup routine in lte-enb.
|
||||
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// function pointer to wakeup routine in lte-enb.
|
||||
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
|
||||
#endif
|
||||
@@ -484,7 +484,7 @@ typedef struct RRU_config_s {
|
||||
int prach_FreqOffset[MAX_BANDS_PER_RRU];
|
||||
/// prach_ConfigIndex for IF4p5
|
||||
int prach_ConfigIndex[MAX_BANDS_PER_RRU];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int emtc_prach_CElevel_enable[MAX_BANDS_PER_RRU][4];
|
||||
/// emtc_prach_FreqOffset for IF4p5 per CE Level
|
||||
int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4];
|
||||
@@ -619,7 +619,7 @@ typedef struct {
|
||||
int32_t **prach_ifft[4];
|
||||
|
||||
/// repetition number
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator of first frame in a group of PRACH repetitions
|
||||
int first_frame[4];
|
||||
/// current repetition for each CE level
|
||||
@@ -706,7 +706,7 @@ typedef struct eNB_proc_t_s {
|
||||
int subframe_rx;
|
||||
/// subframe to act upon for PRACH
|
||||
int subframe_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for reception of prach BL/CE UEs
|
||||
int subframe_prach_br;
|
||||
#endif
|
||||
@@ -716,7 +716,7 @@ typedef struct eNB_proc_t_s {
|
||||
int frame_tx;
|
||||
/// frame to act upon for PRACH
|
||||
int frame_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// frame to act upon for PRACH BL/CE UEs
|
||||
int frame_prach_br;
|
||||
#endif
|
||||
@@ -726,7 +726,7 @@ typedef struct eNB_proc_t_s {
|
||||
int instance_cnt_te;
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \internal This variable is protected by \ref mutex_prach for BL/CE UEs.
|
||||
int instance_cnt_prach_br;
|
||||
#endif
|
||||
@@ -748,7 +748,7 @@ typedef struct eNB_proc_t_s {
|
||||
pthread_attr_t attr_single;
|
||||
/// pthread attributes for prach processing thread
|
||||
pthread_attr_t attr_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread attributes for prach processing thread BL/CE UEs
|
||||
pthread_attr_t attr_prach_br;
|
||||
#endif
|
||||
@@ -762,7 +762,7 @@ typedef struct eNB_proc_t_s {
|
||||
struct sched_param sched_param_single;
|
||||
/// scheduling parameters for prach thread
|
||||
struct sched_param sched_param_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// scheduling parameters for prach thread
|
||||
struct sched_param sched_param_prach_br;
|
||||
#endif
|
||||
@@ -774,7 +774,7 @@ typedef struct eNB_proc_t_s {
|
||||
pthread_t pthread_te;
|
||||
/// pthread structure for PRACH thread
|
||||
pthread_t pthread_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread structure for PRACH thread BL/CE UEs
|
||||
pthread_t pthread_prach_br;
|
||||
#endif
|
||||
@@ -784,7 +784,7 @@ typedef struct eNB_proc_t_s {
|
||||
pthread_cond_t cond_te;
|
||||
/// condition variable for PRACH processing thread;
|
||||
pthread_cond_t cond_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// condition variable for PRACH processing thread BL/CE UEs;
|
||||
pthread_cond_t cond_prach_br;
|
||||
#endif
|
||||
@@ -796,7 +796,7 @@ typedef struct eNB_proc_t_s {
|
||||
pthread_mutex_t mutex_te;
|
||||
/// mutex for PRACH thread
|
||||
pthread_mutex_t mutex_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mutex for PRACH thread for BL/CE UEs
|
||||
pthread_mutex_t mutex_prach_br;
|
||||
#endif
|
||||
@@ -812,7 +812,7 @@ typedef struct eNB_proc_t_s {
|
||||
int RU_mask;
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach_br;
|
||||
#endif
|
||||
@@ -927,14 +927,14 @@ typedef struct PHY_VARS_eNB_s {
|
||||
nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU];
|
||||
/// NFAPI PRACH information
|
||||
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// NFAPI PRACH information BL/CE UEs
|
||||
nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES];
|
||||
#endif
|
||||
Sched_Rsp_t Sched_INFO;
|
||||
LTE_eNB_PDCCH pdcch_vars[2];
|
||||
LTE_eNB_PHICH phich_vars[2];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_EPDCCH epdcch_vars[2];
|
||||
LTE_eNB_MPDCCH mpdcch_vars[2];
|
||||
LTE_eNB_PRACH prach_vars_br;
|
||||
@@ -966,7 +966,7 @@ typedef struct PHY_VARS_eNB_s {
|
||||
uint32_t lte_gold_mbsfn_table[10][3][42];
|
||||
|
||||
uint32_t X_u[64][839];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t X_u_br[4][64][839];
|
||||
#endif
|
||||
uint8_t pbch_configured;
|
||||
@@ -1037,7 +1037,7 @@ typedef struct PHY_VARS_eNB_s {
|
||||
uint8_t cba_last_reception[4];
|
||||
|
||||
// Pointers for active physicalConfigDedicated to be applied in current subframe
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX];
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX];
|
||||
|
||||
|
||||
uint32_t rb_mask_ul[4];
|
||||
@@ -1074,12 +1074,12 @@ typedef struct PHY_VARS_eNB_s {
|
||||
|
||||
int hw_timing_advance;
|
||||
|
||||
time_stats_t phy_proc;
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx;
|
||||
time_stats_t rx_prach;
|
||||
|
||||
time_stats_t ofdm_mod_stats;
|
||||
time_stats_t dlsch_common_and_dci;
|
||||
time_stats_t dlsch_encoding_stats;
|
||||
time_stats_t dlsch_modulation_stats;
|
||||
time_stats_t dlsch_scrambling_stats;
|
||||
|
||||
+14
-15
@@ -63,7 +63,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
|
||||
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
eNB_rxtx_proc_t *proc,
|
||||
@@ -138,7 +138,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
|
||||
// adjust transmit amplitude here based on NFAPI info
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
extern uint32_t localRIV2alloc_LUT6[32];
|
||||
extern uint32_t localRIV2alloc_LUT25[512];
|
||||
extern uint32_t localRIV2alloc_LUT50_0[1600];
|
||||
@@ -155,10 +155,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
|
||||
uint8_t *sdu)
|
||||
{
|
||||
nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
|
||||
#endif
|
||||
LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
|
||||
@@ -177,7 +177,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[frame%2][subframe] = 0;
|
||||
#endif
|
||||
|
||||
@@ -246,7 +246,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
|
||||
rel8->rnti,UE_id,harq_pid);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->sib1_br_flag=0;
|
||||
#else
|
||||
@@ -337,13 +337,12 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
dlsch0->sib1_br_flag=0;
|
||||
dlsch0->i0 = 0xFFFF;
|
||||
#endif
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->i0,
|
||||
@@ -381,7 +380,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
|
||||
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
|
||||
#else
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
@@ -586,7 +585,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
@@ -608,7 +607,7 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_harq_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
@@ -627,7 +626,7 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
||||
uci->type = HARQ;
|
||||
uci->srs_active = srs_active;
|
||||
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
@@ -791,7 +790,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
||||
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
|
||||
eNB->pdcch_vars[subframe&1].num_dci = 0;
|
||||
eNB->phich_vars[subframe&1].num_hi = 0;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
eNB->mpdcch_vars[subframe&1].num_dci = 0;
|
||||
#endif
|
||||
|
||||
@@ -921,7 +920,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
||||
case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE:
|
||||
// handle_nfapi_epdcch_pdu(eNB,dl_config_pdu);
|
||||
break;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
|
||||
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
|
||||
eNB->mpdcch_vars[subframe&1].num_dci++;
|
||||
|
||||
@@ -136,7 +136,7 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
MCH_PDU *mch_pduP=NULL;
|
||||
// uint8_t sync_area=255;
|
||||
#endif
|
||||
@@ -149,7 +149,7 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
|
||||
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// if mcch is active, send regardless of the node type: eNB or RN
|
||||
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
|
||||
/*
|
||||
@@ -232,6 +232,9 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
|
||||
if (eNB->pbch_configured!=1) return;
|
||||
eNB->pbch_configured=0;
|
||||
}
|
||||
T(T_ENB_PHY_MIB, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
|
||||
T_BUFFER(pbch_pdu, 3));
|
||||
|
||||
generate_pbch (&eNB->pbch, txdataF, AMP, fp, pbch_pdu, frame & 3);
|
||||
|
||||
} else if ((subframe == 1) && (fp->frame_type == TDD)) {
|
||||
@@ -417,7 +420,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
int16_t UE_id=0;
|
||||
uint8_t num_pdcch_symbols=0;
|
||||
uint8_t num_dci=0;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t num_mdci = 0;
|
||||
#endif
|
||||
uint8_t ul_subframe;
|
||||
@@ -432,7 +435,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1);
|
||||
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
|
||||
|
||||
if (do_meas==1) start_meas(&eNB->dlsch_common_and_dci);
|
||||
|
||||
// clear the transmit data array for the current subframe
|
||||
for (aa = 0; aa < fp->nb_antenna_ports_eNB; aa++) {
|
||||
memset (&eNB->common_vars.txdataF[aa][subframe * fp->ofdm_symbol_size * (fp->symbols_per_tti)], 0, fp->ofdm_symbol_size * (fp->symbols_per_tti) * sizeof (int32_t));
|
||||
@@ -468,7 +472,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
// (subframe_select(fp,ul_subframe)==SF_UL)) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (eNB->ulsch[i] && eNB->ulsch[i]->ue_type >0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
@@ -526,7 +530,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
eNB->common_vars.txdataF,
|
||||
subframe);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
num_mdci = eNB->mpdcch_vars[subframe &1].num_dci;
|
||||
if (num_mdci > 0) {
|
||||
LOG_I (PHY, "[eNB %" PRIu8 "] Frame %d, subframe %d: Calling generate_mdci_top (mpdcch) (num_dci %" PRIu8 ")\n", eNB->Mod_id, frame, subframe, num_mdci);
|
||||
@@ -536,8 +540,11 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1);
|
||||
// Now scan UE specific DLSCH
|
||||
LTE_eNB_DLSCH_t *dlsch0,*dlsch1;
|
||||
@@ -839,7 +846,7 @@ void uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) {
|
||||
metric[0] = rx_pucch (eNB, pucch_format1b, i, uci->n_pucch_1_0_sr[0], 0, //n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[0], frame, subframe, PUCCH1a_THRES
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
);
|
||||
@@ -853,7 +860,7 @@ void uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) {
|
||||
metric[res] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[res][0], 0, // n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[res], frame, subframe, PUCCH1a_THRES
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
);
|
||||
@@ -868,7 +875,7 @@ void uci_procedures (PHY_VARS_eNB * eNB, eNB_rxtx_proc_t * proc) {
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
);
|
||||
@@ -1471,7 +1478,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe) {
|
||||
|
||||
uint32_t harq_pid;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@ extern uint32_t nfapi_mode;
|
||||
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
|
||||
void prach_procedures(PHY_VARS_eNB *eNB
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
int br_flag
|
||||
#endif
|
||||
@@ -63,7 +63,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
uint16_t i;
|
||||
int frame,subframe;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag==1) {
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
frame = eNB->proc.frame_prach_br;
|
||||
@@ -93,7 +93,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
ru=eNB->RU_list[i];
|
||||
for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) {
|
||||
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int ce_level;
|
||||
|
||||
if (br_flag==1)
|
||||
@@ -109,7 +109,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
&max_preamble_delay[0],
|
||||
frame,
|
||||
0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,br_flag
|
||||
#endif
|
||||
);
|
||||
@@ -121,7 +121,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
max_preamble_delay[0],
|
||||
eNB->prach_energy_counter);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag==1) {
|
||||
int prach_mask;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
/*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration
|
||||
@param frame_parms Pointer to DL frame parameter descriptor
|
||||
@returns Subframe Number (DL,S)
|
||||
@@ -346,7 +346,7 @@ void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeri
|
||||
|
||||
int ul_ACK_subframe2_dl_frame(LTE_DL_FRAME_PARMS *frame_parms,int frame, unsigned char subframe,unsigned char subframe_tx);
|
||||
|
||||
void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
|
||||
void get_retransmission_timing(LTE_TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc);
|
||||
@param phy_vars_eNB Pointer to eNB variables on which to act
|
||||
@param br_flag indicator for eMTC PRACH
|
||||
*/
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
int br_flag);
|
||||
#else
|
||||
|
||||
@@ -1715,7 +1715,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->phy_proc_tx);
|
||||
LOG_UI(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->ulsch_encoding_stats);
|
||||
}
|
||||
|
||||
@@ -3110,7 +3110,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
int subframe_rx = proc->subframe_rx;
|
||||
int frame_rx = proc->frame_rx;
|
||||
int pmch_mcs=-1;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int CC_id = ue->CC_id;
|
||||
#endif
|
||||
uint8_t sync_area=255;
|
||||
@@ -3123,7 +3123,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
|
||||
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n",
|
||||
ue->Mod_id,frame_rx,subframe_rx);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
pmch_mcs = ue_query_mch(ue->Mod_id,
|
||||
CC_id,
|
||||
@@ -3222,7 +3222,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
// if (subframe_rx==9)
|
||||
// mac_xface->macphy_exit("Why are we exiting here?");
|
||||
} else { // decoding successful
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
ue_send_mch_sdu(ue->Mod_id,
|
||||
CC_id,
|
||||
@@ -3244,7 +3244,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
ue->dlsch_mch_received_sf[subframe_rx][0]=1;
|
||||
}
|
||||
|
||||
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
} // decoding sucessful
|
||||
} // pmch_mcs>=0
|
||||
} // is_pmch_subframe=true
|
||||
@@ -3369,7 +3369,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
|
||||
if(m >= ue->frame_parms.symbols_per_tti>>1)
|
||||
slot = 1;
|
||||
stop_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -3604,9 +3604,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, " --> Unscrambling for CW0 %5.3f\n",
|
||||
LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
|
||||
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
|
||||
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
|
||||
|
||||
}
|
||||
@@ -3661,9 +3661,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, " --> Unscrambling for CW1 %5.3f\n",
|
||||
LOG_I(PHY, " --> Unscrambling for CW1 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
|
||||
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
|
||||
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
@@ -4005,7 +4005,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4099,7 +4099,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4319,7 +4319,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
|
||||
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
//proc->dci_slot0_available = 1;
|
||||
@@ -4328,7 +4328,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
//proc->dci_slot0_available=1;
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4337,7 +4337,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
//wait until slot1 FE is done
|
||||
@@ -4350,7 +4350,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
/**** End Subframe FE Processing ****/
|
||||
|
||||
@@ -4439,7 +4439,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4455,7 +4455,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4526,7 +4526,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)
|
||||
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
// duplicate harq structure
|
||||
@@ -4589,7 +4589,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
|
||||
@@ -4632,7 +4632,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
if(LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
start_meas(&ue->generic_stat);
|
||||
start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
}
|
||||
|
||||
pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
|
||||
@@ -4757,15 +4757,17 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_I(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
start_meas(&ue->generic_stat);
|
||||
start_meas(&ue->crnti_procedures_stats);
|
||||
}
|
||||
|
||||
// do procedures for C-RNTI
|
||||
if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
|
||||
@@ -4782,12 +4784,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->crnti_procedures_stats);
|
||||
}
|
||||
LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
// do procedures for SI-RNTI
|
||||
if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
|
||||
ue_pdsch_procedures(ue,
|
||||
|
||||
proc,
|
||||
eNB_id,
|
||||
SI_PDSCH,
|
||||
@@ -4870,7 +4874,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
} // not an S-subframe
|
||||
if(LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
@@ -4915,8 +4919,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
abstraction_flag);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
|
||||
@@ -5059,14 +5063,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING) ) {
|
||||
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
|
||||
static int cmpdouble(const void *p1, const void *p2) {
|
||||
return *(double *)p1 > *(double *)p2;
|
||||
}
|
||||
|
||||
double median(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
|
||||
}
|
||||
|
||||
double q1(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
|
||||
}
|
||||
|
||||
double q3(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize);
|
||||
}
|
||||
|
||||
void dumpVarArray(varArray_t *input) {
|
||||
double *ptr=dataArray(input);
|
||||
printf("dumping size=%ld\n", input->size);
|
||||
|
||||
for (int i=0; i < input->size; i++)
|
||||
printf("%.1f:", *ptr++);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
|
||||
reset_meas(res);
|
||||
for (int i=0; i<RX_NB_TH; i++) {
|
||||
res->diff+=src[i].diff;
|
||||
res->diff_square+=src[i].diff_square;
|
||||
res->trials+=src[i].trials;
|
||||
if (src[i].max > res->max)
|
||||
res->max=src[i].max;
|
||||
}
|
||||
res->p_time=src[lastActive].p_time;
|
||||
}
|
||||
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
|
||||
reset_meas(res);
|
||||
for (int i=0; i<RX_NB_TH; i++) {
|
||||
res->diff+=src[i][0].diff+src[i][1].diff;
|
||||
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
|
||||
res->trials+=src[i][0].trials+src[i][1].trials;
|
||||
if (src[i][0].max > res->max)
|
||||
res->max=src[i][0].max;
|
||||
if (src[i][1].max > res->max)
|
||||
res->max=src[i][1].max;}
|
||||
int last=src[lastActive][0].in < src[lastActive][1].in? 1 : 0 ;
|
||||
res->p_time=src[lastActive][last].p_time;
|
||||
}
|
||||
|
||||
void printStatIndent(time_stats_t *ptr, char *txt) {
|
||||
printf("|__ %-50s %.2f us (%d trials)\n",
|
||||
txt,
|
||||
ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
|
||||
ptr->trials);
|
||||
}
|
||||
|
||||
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
printf(" |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
|
||||
txt,
|
||||
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
|
||||
turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
|
||||
ptr->trials);
|
||||
}
|
||||
|
||||
double squareRoot(time_stats_t *ptr) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
|
||||
pow((double)ptr->diff/ptr->trials*timeBase,2));
|
||||
}
|
||||
|
||||
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
printf("%-50s :%.2f us (%d trials)\n",
|
||||
txt,
|
||||
(double)ptr->diff/ptr->trials*timeBase,
|
||||
ptr->trials);
|
||||
printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
|
||||
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
|
||||
}
|
||||
|
||||
void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
|
||||
fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
|
||||
squareRoot(ptr),
|
||||
(double)ptr->max, *(double*)dataArray(sortedList),
|
||||
median(sortedList),q1(sortedList),q3(sortedList),
|
||||
dropped);
|
||||
}
|
||||
|
||||
struct option * parse_oai_options(paramdef_t *options) {
|
||||
int l;
|
||||
|
||||
for(l=0; options[l].optname[0]!=0; l++) {};
|
||||
|
||||
struct option *long_options=calloc(sizeof(struct option),l);
|
||||
|
||||
for(int i=0; options[i].optname[0]!=0; i++) {
|
||||
long_options[i].name=options[i].optname;
|
||||
long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument;
|
||||
|
||||
if ( options[i].voidptr)
|
||||
switch (options[i].type) {
|
||||
case TYPE_INT:
|
||||
*options[i].iptr=options[i].defintval;
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*options[i].dblptr=options[i].defdblval;
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
*options[i].u8ptr=options[i].defintval;
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*options[i].u16ptr=options[i].defintval;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not parsed type for default value %s\n", options[i].optname );
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
};
|
||||
return long_options;
|
||||
}
|
||||
|
||||
void display_options_values(paramdef_t *options, int verbose) {
|
||||
for(paramdef_t * ptr=options; ptr->optname[0]!=0; ptr++) {
|
||||
char varText[256]="need specific display";
|
||||
|
||||
if (ptr->voidptr != NULL) {
|
||||
if ( (ptr->paramflags & PARAMFLAG_BOOL) )
|
||||
strcpy(varText, *(bool *)ptr->iptr ? "True": "False" );
|
||||
else switch (ptr->type) {
|
||||
case TYPE_INT:
|
||||
sprintf(varText,"%d",*ptr->iptr);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
sprintf(varText,"%.2f",*ptr->dblptr);
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
sprintf(varText,"%d",(int)*ptr->u8ptr);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
sprintf(varText,"%d",(int)*ptr->u16ptr);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
printf("--%-20s set to %s\n",ptr->optname, varText);
|
||||
if (verbose) printf("%s\n",ptr->helpstr);
|
||||
}
|
||||
}
|
||||
+284
-495
@@ -72,6 +72,9 @@ void feptx_ofdm(RU_t *ru);
|
||||
void feptx_prec(RU_t *ru);
|
||||
|
||||
double cpuf;
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
//#define MCS_COUNT 23//added for PHY abstraction
|
||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||
|
||||
int otg_enabled=0;
|
||||
/*the following parameters are used to control the processing times calculations*/
|
||||
@@ -535,23 +538,42 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
int n_users = 1;
|
||||
sub_frame_t subframe=7;
|
||||
int subframe=7;
|
||||
int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
|
||||
uint16_t n_rnti=0x1234;
|
||||
int nfapi_mode=0;
|
||||
int nfapi_mode=0;
|
||||
int abstx=0;
|
||||
int Nid_cell=0;
|
||||
int N_RB_DL=25;
|
||||
int tdd_config=3;
|
||||
int dci_flag=0;
|
||||
int threequarter_fs=0;
|
||||
double snr_step=1,input_snr_step=1, snr_int=30;
|
||||
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
|
||||
int test_perf=0;
|
||||
int n_frames;
|
||||
int n_ch_rlz = 1;
|
||||
int rx_sample_offset = 0;
|
||||
int xforms=0;
|
||||
int dump_table=0;
|
||||
int loglvl=OAILOG_WARNING;
|
||||
int mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0;
|
||||
int two_thread_flag=0;
|
||||
int num_rounds = 4;//,fix_rounds=0;
|
||||
int perfect_ce = 0;
|
||||
int extended_prefix_flag=0;
|
||||
int verbose=0, help=0;
|
||||
double SNR,snr0=-2.0,snr1,rate = 0;
|
||||
int print_perf=0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int c;
|
||||
int k,i,j,aa;
|
||||
int re;
|
||||
int loglvl=OAILOG_DEBUG;
|
||||
|
||||
int s,Kr,Kr_bytes;
|
||||
|
||||
double SNR,snr0=-2.0,snr1,rate = 0;
|
||||
double snr_step=1,input_snr_step=1, snr_int=30;
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
double s_re0[30720*2],s_im0[30720*2],r_re0[30720*2],r_im0[30720*2];
|
||||
@@ -560,17 +582,14 @@ int main(int argc, char **argv)
|
||||
double *s_im[2]={s_im0,s_im1};
|
||||
double *r_re[2]={r_re0,r_re1};
|
||||
double *r_im[2]={r_im0,r_im1};
|
||||
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
|
||||
|
||||
|
||||
uint8_t extended_prefix_flag=0,transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
|
||||
uint16_t Nid_cell=0;
|
||||
uint8_t transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
|
||||
|
||||
int eNB_id = 0;
|
||||
unsigned char mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0,round;
|
||||
unsigned char round;
|
||||
unsigned char i_mod = 2;
|
||||
unsigned short NB_RB;
|
||||
uint16_t tdd_config=3;
|
||||
|
||||
|
||||
SCM_t channel_model=Rayleigh1;
|
||||
@@ -602,18 +621,13 @@ int main(int argc, char **argv)
|
||||
FILE *input_fd=NULL;
|
||||
unsigned char input_file=0;
|
||||
|
||||
int n_frames;
|
||||
int n_ch_rlz = 1;
|
||||
channel_desc_t *eNB2UE[4];
|
||||
//uint8_t num_pdcch_symbols_2=0;
|
||||
uint8_t rx_sample_offset = 0;
|
||||
//char stats_buffer[4096];
|
||||
//int len;
|
||||
uint8_t num_rounds = 4;//,fix_rounds=0;
|
||||
|
||||
//int u;
|
||||
int n=0;
|
||||
int abstx=0;
|
||||
//int iii;
|
||||
|
||||
int ch_realization;
|
||||
@@ -625,9 +639,8 @@ int main(int argc, char **argv)
|
||||
// int bler;
|
||||
double blerr[4];
|
||||
short *uncoded_ber_bit=NULL;
|
||||
uint8_t N_RB_DL=25,osf=1;
|
||||
int osf=1;
|
||||
frame_t frame_type = FDD;
|
||||
int xforms=0;
|
||||
FD_lte_phy_scope_ue *form_ue = NULL;
|
||||
char title[255];
|
||||
|
||||
@@ -640,16 +653,12 @@ int main(int argc, char **argv)
|
||||
// time_stats_t ts;//,sts,usts;
|
||||
int avg_iter,iter_trials;
|
||||
int rballocset=0;
|
||||
int print_perf=0;
|
||||
int test_perf=0;
|
||||
int test_passed=0;
|
||||
int dump_table=0;
|
||||
|
||||
double effective_rate=0.0;
|
||||
char channel_model_input[10]="I";
|
||||
|
||||
int TB0_active = 1;
|
||||
uint32_t perfect_ce = 0;
|
||||
|
||||
// LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
|
||||
// LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
|
||||
@@ -657,20 +666,11 @@ int main(int argc, char **argv)
|
||||
uint8_t ue_category=4;
|
||||
uint32_t Nsoft;
|
||||
int sf;
|
||||
|
||||
|
||||
|
||||
int CCE_table[800];
|
||||
|
||||
int threequarter_fs=0;
|
||||
|
||||
|
||||
opp_enabled=1; // to enable the time meas
|
||||
|
||||
FILE *csv_fd=NULL;
|
||||
char csv_fname[32];
|
||||
int dci_flag=0;
|
||||
int two_thread_flag=0;
|
||||
char csv_fname[FILENAME_MAX];
|
||||
int DLSCH_RB_ALLOC = 0;
|
||||
|
||||
int dci_received;
|
||||
@@ -726,38 +726,97 @@ int main(int argc, char **argv)
|
||||
snr0 = 0;
|
||||
// num_layers = 1;
|
||||
perfect_ce = 0;
|
||||
static paramdef_t options[] = {
|
||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
||||
{ "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 },
|
||||
{ "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 },
|
||||
{ "cPdcch", "Number of PDCCH symbols",0, iptr:&num_pdcch_symbols, defintval:1, TYPE_INT, 0 },
|
||||
{ "CnidCell", "The cell id ",0, iptr:&Nid_cell, defintval:0, TYPE_INT, 0 },
|
||||
{ "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, iptr:&dci_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "Dtdd", "Enable tdd", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "eRounds", "Number of rounds",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 },
|
||||
{ "f_snr_step", "step size of SNR, default value is 1.",0, dblptr:&input_snr_step, defdblval:1, TYPE_DOUBLE, 0 },
|
||||
{ "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, dblptr:&forgetting_factor, defdblval:0.0, TYPE_DOUBLE, 0 },
|
||||
{ "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "Input_file_trch", " Input filename for TrCH data (binary)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, iptr:&two_thread_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "lMuMimo", "offset_mumimo_llr_drange_fix",0, u8ptr:&offset_mumimo_llr_drange_fix, defintval:0, TYPE_UINT8, 0 },
|
||||
{ "mcs1", "The MCS for TB 1", 0, iptr:&mcs1, defintval:0, TYPE_INT, 0 },
|
||||
{ "Mcs2", "The MCS for TB 2", 0, iptr:&mcs2, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "tmcs_i", "MCS of interfering UE",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 },
|
||||
{ "offsetRxSample", "Sample offset for receiver", 0, iptr:&rx_sample_offset, defintval:0, TYPE_INT, 0 },
|
||||
{ "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", dblptr:&snr0, defdblval:-2.0, TYPE_DOUBLE, 0 },
|
||||
{ "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 },
|
||||
{ "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 },
|
||||
{ "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "RNumRound", "Number of HARQ rounds (fixed)",0, iptr:&num_rounds, defintval:4, TYPE_INT, 0 },
|
||||
{ "Subframe", "subframe ",0, iptr:&subframe, defintval:7, TYPE_INT, 0 },
|
||||
{ "Trnti", "rnti",0, u16ptr:&n_rnti, defuintval:0x1234, TYPE_UINT16, 0 },
|
||||
{ "vi_mod", "i_mod",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:&print_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "q_tx_port", "Number of TX antennas ports used in eNB",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "yn_tx_phy","Number of TX antennas used in eNB",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "XForms", "Display the soft scope", PARAMFLAG_BOOL, iptr:&xforms, defintval:0, TYPE_INT, 0 },
|
||||
{ "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, iptr:&perfect_ce, defintval:0, TYPE_INT, 0 },
|
||||
{ "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 },
|
||||
{ "Loglvl", "log level",0, iptr:&loglvl, defintval:OAILOG_DEBUG, TYPE_INT, 0 },
|
||||
{ "zn_rx", "Number of RX antennas used in UE",0, iptr:NULL, defintval:2, TYPE_INT, 0 },
|
||||
{ "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 },
|
||||
{ "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 },
|
||||
{ "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 },
|
||||
{ "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
};
|
||||
|
||||
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:q:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:Pl:WXYL:")) != -1) {
|
||||
switch (c) {
|
||||
|
||||
struct option * long_options = parse_oai_options(options);
|
||||
|
||||
|
||||
int option_index;
|
||||
|
||||
int res;
|
||||
|
||||
while ((res=getopt_long_only(argc, argv, "", long_options, &option_index)) == 0) {
|
||||
if (options[option_index].voidptr != NULL ) {
|
||||
if (long_options[option_index].has_arg==no_argument)
|
||||
*(bool *)options[option_index].iptr=1;
|
||||
else switch (options[option_index].type) {
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
*(uint8_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(uint16_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (long_options[option_index].name[0]) {
|
||||
case 'a':
|
||||
awgn_flag = 1;
|
||||
channel_model = AWGN;
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
abstx = 1;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
tdd_config=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
N_RB_DL=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
num_pdcch_symbols=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
Nid_cell = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
dci_flag = 1;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
frame_type=TDD;
|
||||
break;
|
||||
@@ -768,18 +827,6 @@ int main(int argc, char **argv)
|
||||
TPC = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
threequarter_fs=1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
input_snr_step= atof(optarg);
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
forgetting_factor = atof(optarg);
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
input_fd = fopen(optarg,"r");
|
||||
input_file=1;
|
||||
@@ -791,139 +838,51 @@ int main(int argc, char **argv)
|
||||
input_trch_file=1;
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
two_thread_flag = 1;
|
||||
break;
|
||||
case 'l':
|
||||
offset_mumimo_llr_drange_fix=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
mcs1 = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
mcs2 = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'O':
|
||||
test_perf=atoi(optarg);
|
||||
//print_perf =1;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
mcs_i = atoi(optarg);
|
||||
i_mod = get_Qm(mcs_i);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
n_frames = atoi(optarg);
|
||||
break;
|
||||
|
||||
|
||||
case 'o':
|
||||
rx_sample_offset = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
DLSCH_RB_ALLOC = atoi(optarg);
|
||||
rballocset = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
snr0 = atof(optarg);
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
snr_int = atof(optarg);
|
||||
break;
|
||||
|
||||
|
||||
case 'N':
|
||||
n_ch_rlz= atof(optarg);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
extended_prefix_flag=1;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
memcpy(channel_model_input,optarg,10);
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'F',EVA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
|
||||
switch((char)*optarg) {
|
||||
case 'A':
|
||||
channel_model=SCM_A;
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
channel_model=SCM_B;
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
channel_model=SCM_C;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
channel_model=SCM_D;
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
channel_model=EPA;
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
channel_model=EVA;
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
channel_model=ETU;
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
channel_model=Rayleigh8;
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
channel_model=Rayleigh1;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
channel_model=Rayleigh1_corr;
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
channel_model=Rayleigh1_anticorr;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
channel_model=Rice8;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
channel_model=Rice1;
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
channel_model=AWGN;
|
||||
break;
|
||||
default:
|
||||
printf("Unsupported channel model!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
case 'R':
|
||||
num_rounds=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
subframe=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
n_rnti=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
dual_stream_UE=1;
|
||||
UE->use_ia_receiver = 1;
|
||||
@@ -945,10 +904,6 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
print_perf=1;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
n_tx_port=atoi(optarg);
|
||||
|
||||
@@ -999,15 +954,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
xforms=1;
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
perfect_ce=1;
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
n_rx=atoi(optarg);
|
||||
@@ -1019,51 +965,23 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
dump_table=1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6,7) -y TXant -z RXant -I trch_file\n",argv[0]);
|
||||
printf("-h This message\n");
|
||||
printf("-a Use AWGN channel and not multipath\n");
|
||||
printf("-c Number of PDCCH symbols\n");
|
||||
printf("-m MCS1 for TB 1\n");
|
||||
printf("-M MCS2 for TB 2\n");
|
||||
printf("-d Transmit the DCI and compute its error statistics\n");
|
||||
printf("-p Use extended prefix mode\n");
|
||||
printf("-n Number of frames to simulate\n");
|
||||
printf("-o Sample offset for receiver\n");
|
||||
printf("-s Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated\n", snr_int, snr_step);
|
||||
printf("-f step size of SNR, default value is 1.\n");
|
||||
printf("-C cell id\n");
|
||||
printf("-S subframe\n");
|
||||
printf("-D use TDD mode\n");
|
||||
printf("-b TDD config\n");
|
||||
printf("-B bandwidth configuration (in number of ressource blocks): 6, 25, 50, 100\n");
|
||||
printf("-r ressource block allocation (see section 7.1.6.3 in 36.213\n");
|
||||
printf("-g [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')\n");
|
||||
printf("-F forgetting factor (0 new channel every trial, 1 channel constant\n");
|
||||
printf("-x Transmission mode (1,2,6,7 for the moment)\n");
|
||||
printf("-q Number of TX antennas ports used in eNB\n");
|
||||
printf("-y Number of TX antennas used in eNB\n");
|
||||
printf("-z Number of RX antennas used in UE\n");
|
||||
printf("-t MCS of interfering UE\n");
|
||||
printf("-R Number of HARQ rounds (fixed)\n");
|
||||
printf("-A Turns on calibration mode for abstraction.\n");
|
||||
printf("-N Determines the number of Channel Realizations in Abstraction mode. Default value is 1. \n");
|
||||
printf("-O Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100) \n");
|
||||
printf("-I Input filename for TrCH data (binary)\n");
|
||||
printf("-u Enables the Interference Aware Receiver for TM5 (default is normal receiver)\n");
|
||||
printf("Wrong option: %s\n",long_options[option_index].name);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( res != -1 ) {
|
||||
printf("A wrong option has been found\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (help || verbose )
|
||||
display_options_values(options, true);
|
||||
if (help)
|
||||
exit(0);
|
||||
|
||||
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
|
||||
set_worker_conf("WORKER_ENABLE");
|
||||
|
||||
@@ -1073,8 +991,10 @@ int main(int argc, char **argv)
|
||||
AssertFatal(load_configmodule(argc,argv) != NULL,
|
||||
"cannot load configuration module, exiting\n");
|
||||
logInit();
|
||||
set_glog_onlinelog(true);
|
||||
// enable these lines if you need debug info
|
||||
set_glog(loglvl);
|
||||
SET_LOG_DEBUG(UE_TIMING);
|
||||
// moreover you need to init itti with the following line
|
||||
// however itti will catch all signals, so ctrl-c won't work anymore
|
||||
// alternatively you can disable ITTI completely in CMakeLists.txt
|
||||
@@ -1522,9 +1442,17 @@ int main(int argc, char **argv)
|
||||
reset_meas(&eNB->dlsch_interleaving_stats);
|
||||
reset_meas(&eNB->dlsch_rate_matching_stats);
|
||||
reset_meas(&eNB->dlsch_turbo_encoding_stats);
|
||||
|
||||
reset_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]); // total UE rx
|
||||
for (int i=0; i<RX_NB_TH; i++) {
|
||||
reset_meas(&UE->phy_proc_rx[i]); // total UE rx
|
||||
reset_meas(&UE->ue_front_end_stat[i]);
|
||||
reset_meas(&UE->pdsch_procedures_stat[i]);
|
||||
reset_meas(&UE->dlsch_procedures_stat[i]);
|
||||
reset_meas(&UE->dlsch_decoding_stats[i]);
|
||||
reset_meas(&UE->dlsch_llr_stats_parallelization[i][0]);
|
||||
reset_meas(&UE->dlsch_llr_stats_parallelization[i][1]);
|
||||
}
|
||||
reset_meas(&UE->ofdm_demod_stats);
|
||||
reset_meas(&UE->crnti_procedures_stats);
|
||||
reset_meas(&UE->dlsch_channel_estimation_stats);
|
||||
reset_meas(&UE->dlsch_freq_offset_estimation_stats);
|
||||
reset_meas(&UE->rx_dft_stats);
|
||||
@@ -1541,25 +1469,21 @@ int main(int argc, char **argv)
|
||||
reset_meas(&UE->dlsch_tc_intl1_stats);
|
||||
reset_meas(&UE->dlsch_tc_intl2_stats);
|
||||
// initialization
|
||||
struct list time_vector_tx;
|
||||
initialize(&time_vector_tx);
|
||||
struct list time_vector_tx_ifft;
|
||||
initialize(&time_vector_tx_ifft);
|
||||
struct list time_vector_tx_mod;
|
||||
initialize(&time_vector_tx_mod);
|
||||
struct list time_vector_tx_enc;
|
||||
initialize(&time_vector_tx_enc);
|
||||
|
||||
struct list time_vector_rx;
|
||||
initialize(&time_vector_rx);
|
||||
struct list time_vector_rx_fft;
|
||||
initialize(&time_vector_rx_fft);
|
||||
struct list time_vector_rx_demod;
|
||||
initialize(&time_vector_rx_demod);
|
||||
struct list time_vector_rx_dec;
|
||||
initialize(&time_vector_rx_dec);
|
||||
|
||||
|
||||
// initialization
|
||||
varArray_t *table_tx=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_ifft=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_mod=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_enc=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx=initVarArray(1000,sizeof(double));
|
||||
time_stats_t phy_proc_rx_tot;
|
||||
time_stats_t pdsch_procedures_tot;
|
||||
time_stats_t dlsch_procedures_tot;
|
||||
time_stats_t dlsch_decoding_tot;
|
||||
time_stats_t dlsch_llr_tot;
|
||||
time_stats_t ue_front_end_tot;
|
||||
varArray_t *table_rx_fft=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx_demod=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx_dec=initVarArray(1000,sizeof(double));
|
||||
|
||||
for (trials = 0; trials<n_frames; trials++) {
|
||||
//printf("Trial %d\n",trials);
|
||||
@@ -2004,120 +1928,53 @@ int main(int argc, char **argv)
|
||||
/* calculate the total processing time for each packet,
|
||||
* get the max, min, and number of packets that exceed t>2000us
|
||||
*/
|
||||
double t_tx = (double)eNB->phy_proc_tx.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_ifft = (double)eNB->ofdm_mod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_mod = (double)eNB->dlsch_modulation_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx = inMicroS(eNB->phy_proc_tx.p_time);
|
||||
double t_tx_ifft = inMicroS(eNB->ofdm_mod_stats.p_time);
|
||||
double t_rx = inMicroS(UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time);
|
||||
sumUpStats(&phy_proc_rx_tot, UE->phy_proc_rx, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&ue_front_end_tot, UE->ue_front_end_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&pdsch_procedures_tot, UE->pdsch_procedures_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&dlsch_procedures_tot, UE->dlsch_procedures_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&dlsch_decoding_tot, UE->dlsch_decoding_stats, UE->current_thread_id[subframe]);
|
||||
sumUpStatsSlot(&dlsch_llr_tot, UE->dlsch_llr_stats_parallelization, UE->current_thread_id[subframe]);
|
||||
|
||||
|
||||
double t_rx = (double)UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_dec = (double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = inMicroS(UE->ofdm_demod_stats.p_time);
|
||||
double t_rx_demod = inMicroS(UE->dlsch_rx_pdcch_stats.p_time);
|
||||
double t_rx_dec = inMicroS(UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].p_time);
|
||||
|
||||
if (t_tx > t_tx_max)
|
||||
t_tx_max = t_tx;
|
||||
|
||||
if (t_tx < t_tx_min)
|
||||
t_tx_min = t_tx;
|
||||
|
||||
if (t_rx > t_rx_max)
|
||||
t_rx_max = t_rx;
|
||||
|
||||
if (t_rx < t_rx_min)
|
||||
t_rx_min = t_rx;
|
||||
|
||||
if (t_tx > 2000)
|
||||
if (t_tx > 2000 )// 2ms is too much time for a subframe
|
||||
n_tx_dropped++;
|
||||
|
||||
if (t_rx > 2000)
|
||||
|
||||
if (t_rx > 2000 )
|
||||
n_rx_dropped++;
|
||||
|
||||
push_front(&time_vector_tx, t_tx);
|
||||
push_front(&time_vector_tx_ifft, t_tx_ifft);
|
||||
push_front(&time_vector_tx_mod, t_tx_mod);
|
||||
push_front(&time_vector_tx_enc, t_tx_enc);
|
||||
|
||||
push_front(&time_vector_rx, t_rx);
|
||||
push_front(&time_vector_rx_fft, t_rx_fft);
|
||||
push_front(&time_vector_rx_demod, t_rx_demod);
|
||||
push_front(&time_vector_rx_dec, t_rx_dec);
|
||||
|
||||
|
||||
appendVarArray(table_tx, &t_tx);
|
||||
appendVarArray(table_tx_ifft, &t_tx_ifft);
|
||||
appendVarArray(table_rx, &t_rx );
|
||||
appendVarArray(table_rx_fft, &t_rx_fft );
|
||||
appendVarArray(table_rx_demod, &t_rx_demod );
|
||||
appendVarArray(table_rx_dec, &t_rx_dec );
|
||||
|
||||
} //trials
|
||||
|
||||
// round_trials[0]: number of code word : goodput the protocol
|
||||
double table_tx[time_vector_tx.size];
|
||||
totable(table_tx, &time_vector_tx);
|
||||
double table_tx_ifft[time_vector_tx_ifft.size];
|
||||
totable(table_tx_ifft, &time_vector_tx_ifft);
|
||||
double table_tx_mod[time_vector_tx_mod.size];
|
||||
totable(table_tx_mod, &time_vector_tx_mod);
|
||||
double table_tx_enc[time_vector_tx_enc.size];
|
||||
totable(table_tx_enc, &time_vector_tx_enc);
|
||||
|
||||
double table_rx[time_vector_rx.size];
|
||||
totable(table_rx, &time_vector_rx);
|
||||
double table_rx_fft[time_vector_rx_fft.size];
|
||||
totable(table_rx_fft, &time_vector_rx_fft);
|
||||
double table_rx_demod[time_vector_rx_demod.size];
|
||||
totable(table_rx_demod, &time_vector_rx_demod);
|
||||
double table_rx_dec[time_vector_rx_dec.size];
|
||||
totable(table_rx_dec, &time_vector_rx_dec);
|
||||
|
||||
|
||||
// sort table
|
||||
qsort (table_tx, time_vector_tx.size, sizeof(double), &compare);
|
||||
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
|
||||
qsort (dataArray(table_tx), table_tx->size, table_tx->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_ifft), table_tx_ifft->size, table_tx_ifft->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_mod), table_tx_mod->size, table_tx_mod->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_enc), table_tx_enc->size, table_tx_enc->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx), table_rx->size, table_rx->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_fft), table_rx_fft->size, table_rx_fft->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_demod), table_rx_demod->size, table_rx_demod->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_dec), table_rx_dec->size, table_rx_dec->atomSize, &cmpdouble);
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
set_component_filelog(SIM); // file located in /tmp/usim.txt
|
||||
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_tx,table_tx->size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,table_rx->size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
double tx_q1 = table_tx[time_vector_tx.size/4];
|
||||
double tx_q3 = table_tx[3*time_vector_tx.size/4];
|
||||
|
||||
double tx_ifft_median = table_tx_ifft[time_vector_tx_ifft.size/2];
|
||||
double tx_ifft_q1 = table_tx_ifft[time_vector_tx_ifft.size/4];
|
||||
double tx_ifft_q3 = table_tx_ifft[3*time_vector_tx_ifft.size/4];
|
||||
|
||||
double tx_mod_median = table_tx_mod[time_vector_tx_mod.size/2];
|
||||
double tx_mod_q1 = table_tx_mod[time_vector_tx_mod.size/4];
|
||||
double tx_mod_q3 = table_tx_mod[3*time_vector_tx_mod.size/4];
|
||||
|
||||
double tx_enc_median = table_tx_enc[time_vector_tx_enc.size/2];
|
||||
double tx_enc_q1 = table_tx_enc[time_vector_tx_enc.size/4];
|
||||
double tx_enc_q3 = table_tx_enc[3*time_vector_tx_enc.size/4];
|
||||
|
||||
double rx_median = table_rx[time_vector_rx.size/2];
|
||||
double rx_q1 = table_rx[time_vector_rx.size/4];
|
||||
double rx_q3 = table_rx[3*time_vector_rx.size/4];
|
||||
|
||||
double rx_fft_median = table_rx_fft[time_vector_rx_fft.size/2];
|
||||
double rx_fft_q1 = table_rx_fft[time_vector_rx_fft.size/4];
|
||||
double rx_fft_q3 = table_rx_fft[3*time_vector_rx_fft.size/4];
|
||||
|
||||
double rx_demod_median = table_rx_demod[time_vector_rx_demod.size/2];
|
||||
double rx_demod_q1 = table_rx_demod[time_vector_rx_demod.size/4];
|
||||
double rx_demod_q3 = table_rx_demod[3*time_vector_rx_demod.size/4];
|
||||
|
||||
double rx_dec_median = table_rx_dec[time_vector_rx_dec.size/2];
|
||||
double rx_dec_q1 = table_rx_dec[time_vector_rx_dec.size/4];
|
||||
double rx_dec_q3 = table_rx_dec[3*time_vector_rx_dec.size/4];
|
||||
|
||||
double std_phy_proc_tx=0;
|
||||
double std_phy_proc_tx_ifft=0;
|
||||
double std_phy_proc_tx_mod=0;
|
||||
double std_phy_proc_tx_enc=0;
|
||||
|
||||
double std_phy_proc_rx=0;
|
||||
double std_phy_proc_rx_fft=0;
|
||||
double std_phy_proc_rx_demod=0;
|
||||
double std_phy_proc_rx_dec=0;
|
||||
|
||||
effective_rate = 1.0-((double)(errs[0]+errs[1]+errs[2]+errs[3])/((double)round_trials[0] + round_trials[1] + round_trials[2] + round_trials[3]));
|
||||
|
||||
printf("\n**********************SNR = %f dB (tx_lev %f)**************************\n",
|
||||
@@ -2149,108 +2006,49 @@ int main(int argc, char **argv)
|
||||
(double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
|
||||
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
if (print_perf==1) {
|
||||
printf("eNB TX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_tx = sqrt((double)eNB->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->phy_proc_tx.trials - pow((double)eNB->phy_proc_tx.diff/eNB->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
|
||||
std_phy_proc_tx_ifft = sqrt((double)eNB->ofdm_mod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->ofdm_mod_stats.trials - pow((double)eNB->ofdm_mod_stats.diff/eNB->ofdm_mod_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("OFDM_mod time :%f us (%d trials)\n",(double)eNB->ofdm_mod_stats.diff/eNB->ofdm_mod_stats.trials/cpu_freq_GHz/1000.0,eNB->ofdm_mod_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
|
||||
printf("Total PHY proc tx :%f us (%d trials)\n",(double)eNB->phy_proc_tx.diff/eNB->phy_proc_tx.trials/cpu_freq_GHz/1000.0,eNB->phy_proc_tx.trials);
|
||||
printf("|__ Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n",std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3,
|
||||
n_tx_dropped);
|
||||
printf("\neNB TX function statistics (per 1ms subframe)\n");
|
||||
printDistribution(&eNB->phy_proc_tx,table_tx,"PHY proc tx");
|
||||
printStatIndent(&eNB->dlsch_common_and_dci,"DL common channels and dci time");
|
||||
printStatIndent(&eNB->dlsch_encoding_stats,"DLSCH encoding time");
|
||||
printStatIndent2(&eNB->dlsch_rate_matching_stats,"DLSCH rate matching time",eNB->dlsch_rate_matching_stats.trials);
|
||||
printStatIndent2(&eNB->dlsch_turbo_encoding_stats,"DLSCH turbo encoding time", eNB->dlsch_turbo_encoding_stats.trials);
|
||||
printStatIndent2(&eNB->dlsch_interleaving_stats,"DLSCH interleaving time", eNB->dlsch_interleaving_stats.trials);
|
||||
printStatIndent(&eNB->dlsch_scrambling_stats, "DLSCH scrambling time");
|
||||
printStatIndent(&eNB->dlsch_modulation_stats, "DLSCH modulation time");
|
||||
printDistribution(&eNB->ofdm_mod_stats,table_tx_ifft,"OFDM_mod (idft) time");
|
||||
|
||||
std_phy_proc_tx_mod = sqrt((double)eNB->dlsch_modulation_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->dlsch_modulation_stats.trials - pow((double)eNB->dlsch_modulation_stats.diff/eNB->dlsch_modulation_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH modulation time :%f us (%d trials)\n",(double)eNB->dlsch_modulation_stats.diff/eNB->dlsch_modulation_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_modulation_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
|
||||
printf("DLSCH scrambling time :%f us (%d trials)\n",(double)eNB->dlsch_scrambling_stats.diff/eNB->dlsch_scrambling_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_scrambling_stats.trials);
|
||||
std_phy_proc_tx_enc = sqrt((double)eNB->dlsch_encoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->dlsch_encoding_stats.trials - pow((double)eNB->dlsch_encoding_stats.diff/eNB->dlsch_encoding_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH encoding time :%f us (%d trials)\n",(double)eNB->dlsch_encoding_stats.diff/eNB->dlsch_encoding_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_modulation_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
|
||||
printf("|__ DLSCH turbo encoding time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_turbo_encoding_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_turbo_encoding_stats.diff/eNB->dlsch_turbo_encoding_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_turbo_encoding_stats.trials);
|
||||
printf("|__ DLSCH rate-matching time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_rate_matching_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_rate_matching_stats.diff/eNB->dlsch_rate_matching_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_rate_matching_stats.trials);
|
||||
printf("|__ DLSCH sub-block interleaving time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_interleaving_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials);
|
||||
printf("\nUE RX function statistics (per 1ms subframe)\n");
|
||||
printDistribution(&phy_proc_rx_tot, table_rx,"Total PHY proc rx");
|
||||
printStatIndent(&ue_front_end_tot,"Front end processing");
|
||||
printStatIndent(&dlsch_llr_tot,"rx_pdsch processing");
|
||||
printStatIndent2(&pdsch_procedures_tot,"pdsch processing", pdsch_procedures_tot.trials);
|
||||
printStatIndent2(&dlsch_procedures_tot,"dlsch processing", dlsch_procedures_tot.trials);
|
||||
printStatIndent2(&UE->crnti_procedures_stats,"C-RNTI processing", UE->crnti_procedures_stats.trials);
|
||||
printStatIndent(&UE->ofdm_demod_stats,"ofdm demodulation");
|
||||
printStatIndent(&UE->dlsch_channel_estimation_stats,"DLSCH channel estimation time");
|
||||
printStatIndent(&UE->dlsch_freq_offset_estimation_stats,"DLSCH frequency offset estimation time");
|
||||
printStatIndent(&dlsch_decoding_tot, "DLSCH Decoding time ");
|
||||
printStatIndent(&UE->dlsch_unscrambling_stats,"DLSCH unscrambling time");
|
||||
printStatIndent(&UE->dlsch_rate_unmatching_stats,"DLSCH Rate Unmatching");
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits), avg iterations: %.1f %.2f us (%d cycles, %d trials)\n",
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ?
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus :
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
|
||||
printf("\n\nUE RX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials - pow((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials*2/3);
|
||||
printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median,
|
||||
rx_q1, rx_q3, n_rx_dropped);
|
||||
std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->ofdm_demod_stats.trials - pow((double)UE->ofdm_demod_stats.diff/UE->ofdm_demod_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH OFDM demodulation and channel_estimation time :%f us (%d trials)\n",(nsymb)*(double)UE->ofdm_demod_stats.diff/UE->ofdm_demod_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->ofdm_demod_stats.trials*2/3);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
|
||||
printf("|__ DLSCH rx dft :%f us (%d trials)\n",
|
||||
(nsymb*UE->frame_parms.nb_antennas_rx)*(double)UE->rx_dft_stats.diff/UE->rx_dft_stats.trials/cpu_freq_GHz/1000.0,UE->rx_dft_stats.trials*2/3);
|
||||
printf("|__ DLSCH channel estimation time :%f us (%d trials)\n",
|
||||
(4.0)*(double)UE->dlsch_channel_estimation_stats.diff/UE->dlsch_channel_estimation_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_channel_estimation_stats.trials*2/3);
|
||||
printf("|__ DLSCH frequency offset estimation time :%f us (%d trials)\n",
|
||||
(4.0)*(double)UE->dlsch_freq_offset_estimation_stats.diff/UE->dlsch_freq_offset_estimation_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_freq_offset_estimation_stats.trials*2/3);
|
||||
printf("DLSCH rx pdcch :%f us (%d trials)\n",(double)UE->dlsch_rx_pdcch_stats.diff/UE->dlsch_rx_pdcch_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_rx_pdcch_stats.trials);
|
||||
std_phy_proc_rx_demod = sqrt((double)UE->dlsch_llr_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_llr_stats.trials - pow((double)UE->dlsch_llr_stats.diff/UE->dlsch_llr_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH Channel Compensation and LLR generation time :%f us (%d trials)\n",(14-num_pdcch_symbols)*(double)UE->dlsch_llr_stats.diff/UE->dlsch_llr_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_llr_stats.trials/3);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_demod, rx_demod_median, rx_demod_q1, rx_demod_q3);
|
||||
printf("DLSCH unscrambling time :%f us (%d trials)\n",(double)UE->dlsch_unscrambling_stats.diff/UE->dlsch_unscrambling_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_unscrambling_stats.trials);
|
||||
std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials - pow((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)\n",
|
||||
eNB->dlsch[0][0]->harq_processes[0]->TBS/1000.0,(double)avg_iter/iter_trials,
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials,
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].max/cpu_freq_GHz/1000.0);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
|
||||
printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n",
|
||||
(double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials);
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n",
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ? UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus : UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials);
|
||||
printf(" |__ init %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/((double)avg_iter/iter_trials),
|
||||
UE->dlsch_tc_init_stats.trials);
|
||||
printf(" |__ alpha %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_alpha_stats.diff/UE->dlsch_tc_alpha_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_alpha_stats.diff/UE->dlsch_tc_alpha_stats.trials*2,
|
||||
UE->dlsch_tc_alpha_stats.trials);
|
||||
printf(" |__ beta %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_beta_stats.diff/UE->dlsch_tc_beta_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_beta_stats.diff/UE->dlsch_tc_beta_stats.trials*2,
|
||||
UE->dlsch_tc_beta_stats.trials);
|
||||
printf(" |__ gamma %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_gamma_stats.diff/UE->dlsch_tc_gamma_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_gamma_stats.diff/UE->dlsch_tc_gamma_stats.trials*2,
|
||||
UE->dlsch_tc_gamma_stats.trials);
|
||||
printf(" |__ ext %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_ext_stats.diff/UE->dlsch_tc_ext_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_ext_stats.diff/UE->dlsch_tc_ext_stats.trials*2,
|
||||
UE->dlsch_tc_ext_stats.trials);
|
||||
printf(" |__ intl1 %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_intl1_stats.diff/UE->dlsch_tc_intl1_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_intl1_stats.diff/UE->dlsch_tc_intl1_stats.trials,
|
||||
UE->dlsch_tc_intl1_stats.trials);
|
||||
printf(" |__ intl2+HD+CRC %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_intl2_stats.diff/UE->dlsch_tc_intl2_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_intl2_stats.diff/UE->dlsch_tc_intl2_stats.trials,
|
||||
UE->dlsch_tc_intl2_stats.trials);
|
||||
UE->dlsch_tc_intl1_stats.trials/(double)UE->dlsch_tc_init_stats.trials,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials*timeBase,
|
||||
(int)((double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials),
|
||||
UE->dlsch_turbo_decoding_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_init_stats,"init", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_alpha_stats,"alpha", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_beta_stats,"beta", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_gamma_stats,"gamma", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_ext_stats,"ext", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_intl1_stats,"turbo internal interleaver", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC", UE->dlsch_tc_init_stats.trials);
|
||||
|
||||
}
|
||||
|
||||
if ((transmission_mode != 3) && (transmission_mode != 4)) {
|
||||
@@ -2399,7 +2197,7 @@ int main(int argc, char **argv)
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
phy_proc_rx_tot.trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
@@ -2412,7 +2210,7 @@ int main(int argc, char **argv)
|
||||
get_time_meas_us(&eNB->dlsch_modulation_stats),
|
||||
get_time_meas_us(&eNB->dlsch_scrambling_stats),
|
||||
get_time_meas_us(&eNB->dlsch_encoding_stats),
|
||||
get_time_meas_us(&UE->phy_proc_rx[UE->current_thread_id[subframe]]),
|
||||
get_time_meas_us(&phy_proc_rx_tot),
|
||||
nsymb*get_time_meas_us(&UE->ofdm_demod_stats),
|
||||
get_time_meas_us(&UE->dlsch_rx_pdcch_stats),
|
||||
3*get_time_meas_us(&UE->dlsch_llr_stats),
|
||||
@@ -2420,45 +2218,36 @@ int main(int argc, char **argv)
|
||||
get_time_meas_us(&UE->dlsch_decoding_stats[UE->current_thread_id[subframe]])
|
||||
);
|
||||
//fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;",squareRoot(&UE->phy_proc_tx), t_tx_max, t_tx_min, median(table_tx), q1(table_tx), q3(table_tx), n_tx_dropped);
|
||||
//fprintf(time_meas_fd,"IFFT;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->ofdm_mod_stats),
|
||||
median(table_tx_ifft),q1(table_tx_ifft),q3(table_tx_ifft));
|
||||
//fprintf(time_meas_fd,"MOD;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->dlsch_modulation_stats),
|
||||
median(table_tx_mod), q1(table_tx_mod), q3(table_tx_mod));
|
||||
//fprintf(time_meas_fd,"ENC;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
|
||||
|
||||
|
||||
//fprintf(time_meas_fd,"UE_PROC_RX_STD;UE_PROC_RX_MAX;UE_PROC_RX_MIN;UE_PROC_RX_MED;UE_PROC_RX_Q1;UE_PROC_RX_Q3;UE_PROC_RX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->dlsch_encoding_stats),
|
||||
median(table_tx_enc),q1(table_tx_enc),q3(table_tx_enc));
|
||||
//fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;",
|
||||
squareRoot(&phy_proc_rx_tot), t_rx_max, t_rx_min,
|
||||
median(table_rx), q1(table_rx), q3(table_rx), n_rx_dropped);
|
||||
//fprintf(time_meas_fd,"FFT;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&UE->ofdm_demod_stats),
|
||||
median(table_rx_fft), q1(table_rx_fft), q3(table_rx_fft));
|
||||
//fprintf(time_meas_fd,"DEMOD;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&UE->dlsch_demodulation_stats),
|
||||
median(table_rx_demod), q1(table_rx_demod), q3(table_rx_demod));
|
||||
//fprintf(time_meas_fd,"DEC;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f\n",
|
||||
squareRoot(&UE->dlsch_decoding_stats[subframe]),
|
||||
median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec));
|
||||
|
||||
|
||||
/*
|
||||
fprintf(time_meas_fd,"%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;",
|
||||
eNB->phy_proc_tx.trials,
|
||||
eNB->ofdm_mod_stats.trials,
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
UE->dlsch_unscrambling_stats.trials,
|
||||
UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials);
|
||||
*/
|
||||
printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate );
|
||||
test_passed = 1;
|
||||
break;
|
||||
|
||||
+122
-226
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
* 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 ulsim.c
|
||||
\brief Top-level UL simulator
|
||||
@@ -60,32 +60,7 @@
|
||||
double cpuf;
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
//#define MCS_COUNT 23//added for PHY abstraction
|
||||
static int cmpdouble(const void *p1, const void *p2) {
|
||||
return *(double *)p1 > *(double *)p2;
|
||||
}
|
||||
|
||||
double median(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
|
||||
}
|
||||
|
||||
double q1(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
|
||||
}
|
||||
|
||||
double q3(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize);
|
||||
}
|
||||
|
||||
void dumpVarArray(varArray_t *input) {
|
||||
double *ptr=dataArray(input);
|
||||
printf("dumping size=%ld\n", input->size);
|
||||
|
||||
for (int i=0; i < input->size; i++)
|
||||
printf("%.1f:", *ptr++);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
|
||||
//Added for PHY abstractionopenair1/PHY/TOOLS/lte_phy_scope.h
|
||||
@@ -348,48 +323,8 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
}
|
||||
|
||||
void printStatIndent(time_stats_t *ptr, char *txt) {
|
||||
printf("|__ %-50s %.2f us (%d trials)\n",
|
||||
txt,
|
||||
inMicroS(ptr->diff/ptr->trials),
|
||||
ptr->trials);
|
||||
}
|
||||
|
||||
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
printf(" |__ %-45s %.2f us (cycles/block %7g, %5d trials)\n",
|
||||
txt,
|
||||
((double)ptr->diff)/ptr->trials*timeBase,
|
||||
round(((double)ptr->diff)/turbo_iter),
|
||||
ptr->trials);
|
||||
}
|
||||
|
||||
double squareRoot(time_stats_t *ptr) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
|
||||
pow((double)ptr->diff/ptr->trials*timeBase,2));
|
||||
}
|
||||
|
||||
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
printf("%-50s :%.2f us (%d trials)\n",
|
||||
txt,
|
||||
(double)ptr->diff/ptr->trials*timeBase,
|
||||
ptr->trials);
|
||||
printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
|
||||
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
|
||||
}
|
||||
|
||||
void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
|
||||
fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
|
||||
squareRoot(ptr),
|
||||
(double)ptr->max, *(double*)dataArray(sortedList),
|
||||
median(sortedList),q1(sortedList),q3(sortedList),
|
||||
dropped);
|
||||
}
|
||||
|
||||
enum eTypes { eBool, eInt, eFloat, eText };
|
||||
static int verbose,disable_bundling=0,cqi_flag=0, extended_prefix_flag=0, test_perf=0, subframe=3, transmission_m=1,n_rx=1;
|
||||
static int verbose,help,disable_bundling=0,cqi_flag=0, extended_prefix_flag=0, test_perf=0, subframe=3, transmission_m=1,n_rx=1;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i,j,aa,u;
|
||||
@@ -505,13 +440,13 @@ int main(int argc, char **argv) {
|
||||
// set_glog(LOG_DEBUG,LOG_HIGH);
|
||||
//hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF
|
||||
static paramdef_t options[] = {
|
||||
{ "awgn", "Additive white gaussian noise", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 },
|
||||
{ "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 },
|
||||
{ "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 },
|
||||
{ "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 },
|
||||
{ "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 },
|
||||
{ "e_snr_step", "step increasint snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 },
|
||||
{ "e_snr_step", "step increasing snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 },
|
||||
{ "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 },
|
||||
{ "osrs", "enable srs generation",PARAMFLAG_BOOL, iptr:&srs_flag, defintval:0, TYPE_INT, 0 },
|
||||
@@ -538,37 +473,12 @@ int main(int argc, char **argv) {
|
||||
{ "bundling_disable", "bundling disable",PARAMFLAG_BOOL, iptr:&disable_bundling, defintval:0, TYPE_INT, 0 },
|
||||
{ "Y", "n_ch_rlz",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 },
|
||||
{ "X", "abstx", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "test perf mode ?",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 },
|
||||
{ "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 },
|
||||
{ "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
};
|
||||
int l;
|
||||
|
||||
for(l=0; options[l].optname[0]!=0; l++) {};
|
||||
|
||||
struct option *long_options=calloc(sizeof(struct option),l);
|
||||
|
||||
for(int i=0; options[i].optname[0]!=0; i++) {
|
||||
long_options[i].name=options[i].optname;
|
||||
long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument;
|
||||
|
||||
if ( options[i].voidptr)
|
||||
switch (options[i].type) {
|
||||
case TYPE_INT:
|
||||
*options[i].iptr=options[i].defintval;
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*options[i].dblptr=options[i].defdblval;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not parsed type for default value %s\n", options[i].optname );
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
};
|
||||
struct option * long_options = parse_oai_options(options);
|
||||
|
||||
int option_index;
|
||||
|
||||
@@ -579,113 +489,121 @@ int main(int argc, char **argv) {
|
||||
if (long_options[option_index].has_arg==no_argument)
|
||||
*(bool *)options[option_index].iptr=1;
|
||||
else switch (options[option_index].type) {
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
case TYPE_UINT8:
|
||||
*(uint8_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(uint16_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (long_options[option_index].name[0]) {
|
||||
case 'T':
|
||||
tdd_config=atoi(optarg);
|
||||
frame_type=TDD;
|
||||
break;
|
||||
case 'T':
|
||||
tdd_config=atoi(optarg);
|
||||
frame_type=TDD;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
channel_model = AWGN;
|
||||
chMod = 1;
|
||||
break;
|
||||
case 'a':
|
||||
channel_model = AWGN;
|
||||
chMod = 1;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
case 'g':
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
chMod=ptr->M;
|
||||
break;
|
||||
}
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
chMod=ptr->M;
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
transmission_m=atoi(optarg);
|
||||
AssertFatal(transmission_m==1 || transmission_m==2,
|
||||
"Unsupported transmission mode %d\n",transmission_m);
|
||||
break;
|
||||
case 'x':
|
||||
transmission_m=atoi(optarg);
|
||||
AssertFatal(transmission_m==1 || transmission_m==2,
|
||||
"Unsupported transmission mode %d\n",transmission_m);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
nb_rb = atoi(optarg);
|
||||
nb_rb_set = 1;
|
||||
break;
|
||||
case 'r':
|
||||
nb_rb = atoi(optarg);
|
||||
nb_rb_set = 1;
|
||||
break;
|
||||
|
||||
//case 'c':
|
||||
// cyclic_shift = atoi(optarg);
|
||||
// break;
|
||||
|
||||
case 'i':
|
||||
input_fdUL = fopen(optarg,"r");
|
||||
printf("Reading in %s (%p)\n",optarg,input_fdUL);
|
||||
AssertFatal(input_fdUL != (FILE *)NULL,"Unknown file %s\n",optarg);
|
||||
break;
|
||||
case 'i':
|
||||
input_fdUL = fopen(optarg,"r");
|
||||
printf("Reading in %s (%p)\n",optarg,input_fdUL);
|
||||
AssertFatal(input_fdUL != (FILE *)NULL,"Unknown file %s\n",optarg);
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
beta_ACK = atoi(optarg);
|
||||
AssertFatal(beta_ACK>15,"beta_ack must be in (0..15)\n");
|
||||
break;
|
||||
case 'A':
|
||||
beta_ACK = atoi(optarg);
|
||||
AssertFatal(beta_ACK>15,"beta_ack must be in (0..15)\n");
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
beta_CQI = atoi(optarg);
|
||||
AssertFatal((beta_CQI>15)||(beta_CQI<2),"beta_cqi must be in (2..15)\n");
|
||||
break;
|
||||
case 'C':
|
||||
beta_CQI = atoi(optarg);
|
||||
AssertFatal((beta_CQI>15)||(beta_CQI<2),"beta_cqi must be in (2..15)\n");
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
beta_RI = atoi(optarg);
|
||||
AssertFatal((beta_RI>15)||(beta_RI<2),"beta_ri must be in (0..13)\n");
|
||||
break;
|
||||
case 'R':
|
||||
beta_RI = atoi(optarg);
|
||||
AssertFatal((beta_RI>15)||(beta_RI<2),"beta_ri must be in (0..13)\n");
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
dump_perf=1;
|
||||
opp_enabled=1;
|
||||
break;
|
||||
case 'P':
|
||||
dump_perf=1;
|
||||
opp_enabled=1;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Wrong option\n");
|
||||
exit(1);
|
||||
break;
|
||||
default:
|
||||
printf("Wrong option: %s\n",long_options[option_index].name);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,34 +612,12 @@ int main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
paramdef_t *ptr=options ;
|
||||
|
||||
for( ptr=options; ptr->optname[0]!=0; ptr++) {
|
||||
char varText[256]="need specific display";
|
||||
|
||||
if (ptr->voidptr != NULL) {
|
||||
if ( (ptr->paramflags & PARAMFLAG_BOOL) )
|
||||
strcpy(varText, *(bool *)ptr->iptr ? "True": "False" );
|
||||
else switch (ptr->type) {
|
||||
case TYPE_INT:
|
||||
sprintf(varText,"%d",*ptr->iptr);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
sprintf(varText,"%.2f",*ptr->dblptr);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Option: %20s set to %s\n",ptr->optname, varText);
|
||||
|
||||
if (verbose)
|
||||
printf("%s\n",ptr->helpstr);
|
||||
}
|
||||
if (help || verbose )
|
||||
display_options_values(options, true);
|
||||
if (help)
|
||||
exit(0);
|
||||
|
||||
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
|
||||
set_worker_conf("WORKER_ENABLE");
|
||||
RC.nb_L1_inst = 1;
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
||||
#define GTPV1_U_MESSAGES_TYPES_H_
|
||||
|
||||
#include "asn_constant.h"
|
||||
#include "LTE_asn_constant.h"
|
||||
|
||||
|
||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_LTE_DRB_Identity
|
||||
|
||||
#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
|
||||
#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "TDD-Config.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
//#include "rrm_config_structs.h"
|
||||
//#include "platform_types.h"
|
||||
@@ -347,25 +347,25 @@ typedef struct {
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
|
||||
signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
|
||||
int (*rrc_mac_config_req)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t UE_id,uint8_t eNB_index,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
MAC_MainConfig_t *mac_MainConfig,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t *logicalChannelConfig,
|
||||
MeasGapConfig_t *measGapConfig,
|
||||
TDD_Config_t *tdd_Config,
|
||||
LTE_LogicalChannelConfig_t *logicalChannelConfig,
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t *SIwindowsize,
|
||||
uint16_t *SIperiod
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
MBMS_flag_t MBMS_Flag,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
struct PMCH_InfoList_r9 *pmch_InfoList
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
struct LTE_PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
#endif
|
||||
@@ -373,7 +373,7 @@ typedef struct {
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t sourceL2Id
|
||||
,uint32_t destinationL2Id
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user